From 8f8de1d424b5b5b3240c2e5db24d906886715e67 Mon Sep 17 00:00:00 2001 From: iOS Date: Sun, 28 Jan 2024 19:04:21 +0100 Subject: [PATCH] sunday push --- .../icons/test-pack/UnteribergBlazon.svg | 417 +++++++++++++ .obsidian/plugins/cron/data.json | 2 +- .../obsidian-activity-history/data.json | 42 +- .obsidian/plugins/obsidian-commits/data.json | 428 ++++++++----- .../plugins/obsidian-icon-folder/data.json | 7 +- .../obsidian-reminder-plugin/data.json | 64 +- .../plugins/obsidian-tasks-plugin/main.js | 104 ++-- .../obsidian-tasks-plugin/manifest.json | 2 +- .../plugins/obsidian-tasks-plugin/styles.css | 36 +- .obsidian/plugins/obsidian-tracker/main.js | 4 +- .../plugins/obsidian-tracker/manifest.json | 2 +- .obsidian/plugins/templater-obsidian/main.js | 2 +- .../plugins/templater-obsidian/manifest.json | 2 +- .obsidian/workspace-mobile.json | 55 +- 00.01 Admin/Calendars/2023-10-02.md | 2 +- 00.01 Admin/Calendars/2023-12-24.md | 2 +- 00.01 Admin/Calendars/2023-12-28.md | 2 +- 00.01 Admin/Calendars/2024-01-17.md | 6 +- 00.01 Admin/Calendars/2024-01-19.md | 9 +- 00.01 Admin/Calendars/2024-01-20.md | 142 +++++ 00.01 Admin/Calendars/2024-01-21.md | 139 +++++ 00.01 Admin/Calendars/2024-01-22.md | 140 +++++ 00.01 Admin/Calendars/2024-01-23.md | 136 ++++ 00.01 Admin/Calendars/2024-01-24.md | 136 ++++ 00.01 Admin/Calendars/2024-01-25.md | 134 ++++ 00.01 Admin/Calendars/2024-01-26.md | 136 ++++ 00.01 Admin/Calendars/2024-01-27.md | 134 ++++ 00.01 Admin/Calendars/2024-01-28.md | 134 ++++ .../2022-03-19 🏠 Arrivée Meggi-mo.md | 12 + .../2022-03-24 🎡 Départ de Meggi-mo.md | 11 + .../2022-03-31 🏠 Arrivée de Papa.md | 9 + .../Events/2022-04-04 🗼 Départ Papa.md | 9 + ...-04-10 🗳️ 1er tour Présidentielle.md | 11 + ... 2nd tour élections présidentielles.md | 8 + .../2022-04-27 📍 Arrivée à Lisbonne.md | 9 + .../2022-05-01 🏠 Départ de Lisbonne.md | 9 + ... Definite arrival of Meggi-mo to Züzü.md | 9 + .../Events/2022-10-14 📍 Weekend à GVA.md | 17 + .../2022-10-21 🗼 Weekend à Paris.md | 16 + ...9 💍 Fiançailles Marguerite & Arnold.md | 10 + .../Events/2022-12-26 🏠 Papa à Zürich.md | 12 + .../2022-12-30 🏠 Stef & Kyna in Zürich.md | 12 + .../Events/2023-01-23 🩺 Médecin.md | 13 + .../Events/2023-02-06 📍 Genève.md | 12 + .../Events/2023-02-09 🩺 Médecin.md | 13 + .../2023-02-11 💍 Mariage Eloi & Zélie.md | 91 +++ .../2023-02-19 🎞️ Tár @ Riff Raff.md | 13 + .../Events/2023-03-06 🩺 Médecin.md | 12 + ...023-03-11 🏠 Marg & Arnold à Zürich.md | 13 + ...8 🇨🇭 Molly & boyfriend in Zürich.md | 12 + .../Events/2023-04-14 🩺 Médecin.md | 13 + .../Events/2023-12-21 🏠 Arrivée Papa.md | 10 + .../Events/2023-12-27 🗼 Départ Papa.md | 10 + ...024-01-20 ⚽️ US Orleans - PSG (1-4).md | 11 + 00.01 Admin/Test Sheet 2.md | 2 +- 00.01 Admin/Test sheet.md | 2 +- ...ell the Real Story of Human Trafficking.md | 3 +- ...rs ago. His mother is still on the case.md | 2 +- .../Hvaldimir, the Whale Who Went AWOL.md | 80 +++ ...at bolster Boston’s lacking nightlife.md | 84 +++ ...uspect. Now, I’m looking for answers..md | 586 ++++++++++++++++++ ... So Much in the World's Richest Country.md | 2 +- 01.02 Home/@Shopping list.md | 20 +- 01.02 Home/Bandes Dessinées.md | 6 + 01.02 Home/Household.md | 6 +- 01.03 Family/Joséphine Bédier.md | 3 +- 02.03 Zürich/Barfussbar.md | 114 ++++ 02.03 Zürich/Old Crow.md | 114 ++++ 03.02 Travels/Hoch Ybrig.md | 124 ++++ 03.02 Travels/Klewenalp.md | 114 ++++ 03.04 Cinematheque/Dexter (2006–2013).md | 2 +- ...Vampire - The Vampire Chronicles (1994).md | 103 +++ 03.04 Cinematheque/Rain Man (1988).md | 102 +++ 03.05 Vinyls/@Vinyls.md | 3 + ...36 Chambers) (by Wu‐Tang Clan - 1993).md | 80 +++ .../Highway to Hell (by ACDC - 1979).md | 79 +++ ...re Consultation (by Doc Gynéco - 1996).md | 3 +- .../Thriller (by Michael Jackson - 1982).md | 83 +++ 05.02 Networks/Configuring UFW.md | 8 +- 06.01 Finances/2024.ledger | 136 ++++ 80 files changed, 4317 insertions(+), 340 deletions(-) create mode 100644 .obsidian/icons/test-pack/UnteribergBlazon.svg create mode 100644 00.01 Admin/Calendars/2024-01-20.md create mode 100644 00.01 Admin/Calendars/2024-01-21.md create mode 100644 00.01 Admin/Calendars/2024-01-22.md create mode 100644 00.01 Admin/Calendars/2024-01-23.md create mode 100644 00.01 Admin/Calendars/2024-01-24.md create mode 100644 00.01 Admin/Calendars/2024-01-25.md create mode 100644 00.01 Admin/Calendars/2024-01-26.md create mode 100644 00.01 Admin/Calendars/2024-01-27.md create mode 100644 00.01 Admin/Calendars/2024-01-28.md create mode 100644 00.01 Admin/Calendars/Events/2022-03-19 🏠 Arrivée Meggi-mo.md create mode 100644 00.01 Admin/Calendars/Events/2022-03-24 🎡 Départ de Meggi-mo.md create mode 100644 00.01 Admin/Calendars/Events/2022-03-31 🏠 Arrivée de Papa.md create mode 100644 00.01 Admin/Calendars/Events/2022-04-04 🗼 Départ Papa.md create mode 100644 00.01 Admin/Calendars/Events/2022-04-10 🗳️ 1er tour Présidentielle.md create mode 100644 00.01 Admin/Calendars/Events/2022-04-24 🗳️ 2nd tour élections présidentielles.md create mode 100644 00.01 Admin/Calendars/Events/2022-04-27 📍 Arrivée à Lisbonne.md create mode 100644 00.01 Admin/Calendars/Events/2022-05-01 🏠 Départ de Lisbonne.md create mode 100644 00.01 Admin/Calendars/Events/2022-05-15 🏠 Definite arrival of Meggi-mo to Züzü.md create mode 100644 00.01 Admin/Calendars/Events/2022-10-14 📍 Weekend à GVA.md create mode 100644 00.01 Admin/Calendars/Events/2022-10-21 🗼 Weekend à Paris.md create mode 100644 00.01 Admin/Calendars/Events/2022-11-19 💍 Fiançailles Marguerite & Arnold.md create mode 100644 00.01 Admin/Calendars/Events/2022-12-26 🏠 Papa à Zürich.md create mode 100644 00.01 Admin/Calendars/Events/2022-12-30 🏠 Stef & Kyna in Zürich.md create mode 100644 00.01 Admin/Calendars/Events/2023-01-23 🩺 Médecin.md create mode 100644 00.01 Admin/Calendars/Events/2023-02-06 📍 Genève.md create mode 100644 00.01 Admin/Calendars/Events/2023-02-09 🩺 Médecin.md create mode 100644 00.01 Admin/Calendars/Events/2023-02-11 💍 Mariage Eloi & Zélie.md create mode 100644 00.01 Admin/Calendars/Events/2023-02-19 🎞️ Tár @ Riff Raff.md create mode 100644 00.01 Admin/Calendars/Events/2023-03-06 🩺 Médecin.md create mode 100644 00.01 Admin/Calendars/Events/2023-03-11 🏠 Marg & Arnold à Zürich.md create mode 100644 00.01 Admin/Calendars/Events/2023-03-18 🇨🇭 Molly & boyfriend in Zürich.md create mode 100644 00.01 Admin/Calendars/Events/2023-04-14 🩺 Médecin.md create mode 100644 00.01 Admin/Calendars/Events/2023-12-21 🏠 Arrivée Papa.md create mode 100644 00.01 Admin/Calendars/Events/2023-12-27 🗼 Départ Papa.md create mode 100644 00.01 Admin/Calendars/Events/2024-01-20 ⚽️ US Orleans - PSG (1-4).md create mode 100644 00.03 News/Hvaldimir, the Whale Who Went AWOL.md create mode 100644 00.03 News/Inside the house shows that bolster Boston’s lacking nightlife.md create mode 100644 00.03 News/My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers..md create mode 100644 02.03 Zürich/Barfussbar.md create mode 100644 02.03 Zürich/Old Crow.md create mode 100644 03.02 Travels/Hoch Ybrig.md create mode 100644 03.02 Travels/Klewenalp.md create mode 100644 03.04 Cinematheque/Interview with the Vampire - The Vampire Chronicles (1994).md create mode 100644 03.04 Cinematheque/Rain Man (1988).md create mode 100644 03.05 Vinyls/Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993).md create mode 100644 03.05 Vinyls/Highway to Hell (by ACDC - 1979).md create mode 100644 03.05 Vinyls/Thriller (by Michael Jackson - 1982).md diff --git a/.obsidian/icons/test-pack/UnteribergBlazon.svg b/.obsidian/icons/test-pack/UnteribergBlazon.svg new file mode 100644 index 00000000..ddb35446 --- /dev/null +++ b/.obsidian/icons/test-pack/UnteribergBlazon.svg @@ -0,0 +1,417 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.obsidian/plugins/cron/data.json b/.obsidian/plugins/cron/data.json index 99bc04b3..abe88783 100644 --- a/.obsidian/plugins/cron/data.json +++ b/.obsidian/plugins/cron/data.json @@ -19,7 +19,7 @@ "601d1cc7-a4f3-4f19-aa9f-3bddd7ab6b1d": { "locked": false, "lockedDeviceName": "iPhone", - "lastRun": "2024-01-19T09:01:36+01:00" + "lastRun": "2024-01-28T13:55:59+01:00" } } } \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-activity-history/data.json b/.obsidian/plugins/obsidian-activity-history/data.json index 5f9b3e55..c6a442ce 100644 --- a/.obsidian/plugins/obsidian-activity-history/data.json +++ b/.obsidian/plugins/obsidian-activity-history/data.json @@ -12,8 +12,8 @@ "checkpointList": [ { "path": "/", - "date": "2024-01-19", - "size": 20731743 + "date": "2024-01-28", + "size": 20824586 } ], "activityHistory": [ @@ -2970,7 +2970,43 @@ }, { "date": "2024-01-19", - "value": 12670 + "value": 12950 + }, + { + "date": "2024-01-20", + "value": 4180 + }, + { + "date": "2024-01-21", + "value": 66825 + }, + { + "date": "2024-01-22", + "value": 1700 + }, + { + "date": "2024-01-23", + "value": 10135 + }, + { + "date": "2024-01-24", + "value": 3671 + }, + { + "date": "2024-01-25", + "value": 4474 + }, + { + "date": "2024-01-26", + "value": 1434 + }, + { + "date": "2024-01-27", + "value": 1743 + }, + { + "date": "2024-01-28", + "value": 6173 } ] } diff --git a/.obsidian/plugins/obsidian-commits/data.json b/.obsidian/plugins/obsidian-commits/data.json index dba4c190..12f821fa 100644 --- a/.obsidian/plugins/obsidian-commits/data.json +++ b/.obsidian/plugins/obsidian-commits/data.json @@ -1335,7 +1335,7 @@ "links": 5 }, "01.03 Family/Joséphine Bédier.md": { - "size": 1864, + "size": 2107, "tags": 3, "links": 6 }, @@ -1520,7 +1520,7 @@ "links": 18 }, "05.02 Networks/Configuring UFW.md": { - "size": 18073, + "size": 20005, "tags": 2, "links": 7 }, @@ -1570,7 +1570,7 @@ "links": 1 }, "01.02 Home/Household.md": { - "size": 3215, + "size": 3639, "tags": 2, "links": 4 }, @@ -3015,7 +3015,7 @@ "links": 1 }, "01.02 Home/Bandes Dessinées.md": { - "size": 2166, + "size": 2441, "tags": 2, "links": 4 }, @@ -12477,7 +12477,7 @@ "00.03 News/Why Parents Struggle So Much in the World's Richest Country.md": { "size": 27199, "tags": 3, - "links": 1 + "links": 2 }, "00.03 News/A Gaza Conundrum The Story Behind the Rise of Hamas.md": { "size": 53340, @@ -12562,12 +12562,12 @@ "00.03 News/An Iowa paperboy disappeared 41 years ago. His mother is still on the case.md": { "size": 63764, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/After Two Decades Undercover, She’s Ready to Tell the Real Story of Human Trafficking.md": { "size": 42929, "tags": 3, - "links": 1 + "links": 2 }, "00.01 Admin/Calendars/Events/2024-02-14 ⚽️ PSG - Real Sociedad.md": { "size": 186, @@ -12632,7 +12632,7 @@ "00.01 Admin/Calendars/2024-01-19.md": { "size": 1412, "tags": 0, - "links": 4 + "links": 8 }, "03.02 Travels/Bleu Nuit.md": { "size": 1459, @@ -12662,20 +12662,130 @@ "03.05 Vinyls/Première Consultation (by Doc Gynéco - 1996).md": { "size": 1450, "tags": 0, - "links": 0 + "links": 1 }, "03.05 Vinyls/I Walk the Line (by Johnny Cash - 1987).md": { "size": 1425, "tags": 0, - "links": 0 + "links": 1 + }, + "00.01 Admin/Calendars/2024-01-20.md": { + "size": 1412, + "tags": 0, + "links": 7 + }, + "03.02 Travels/Hoch Ybrig.md": { + "size": 1996, + "tags": 3, + "links": 2 + }, + "00.01 Admin/Calendars/Events/2024-01-20 ⚽️ US Orleans - PSG (1-4).md": { + "size": 277, + "tags": 0, + "links": 2 + }, + "00.01 Admin/Calendars/2024-01-21.md": { + "size": 1412, + "tags": 0, + "links": 7 + }, + "03.02 Travels/Klewenalp.md": { + "size": 1522, + "tags": 3, + "links": 2 + }, + "00.03 News/My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers..md": { + "size": 50717, + "tags": 4, + "links": 1 + }, + "00.03 News/Hvaldimir, the Whale Who Went AWOL.md": { + "size": 5906, + "tags": 2, + "links": 2 + }, + "00.01 Admin/Calendars/2024-01-22.md": { + "size": 1585, + "tags": 0, + "links": 9 + }, + "00.01 Admin/Calendars/2024-01-23.md": { + "size": 1255, + "tags": 0, + "links": 6 + }, + "00.03 News/Inside the house shows that bolster Boston’s lacking nightlife.md": { + "size": 6081, + "tags": 4, + "links": 1 + }, + "03.04 Cinematheque/Rain Man (1988).md": { + "size": 2353, + "tags": 0, + "links": 1 + }, + "00.01 Admin/Calendars/2024-01-24.md": { + "size": 1412, + "tags": 0, + "links": 6 + }, + "03.04 Cinematheque/Interview with the Vampire - The Vampire Chronicles (1994).md": { + "size": 2269, + "tags": 0, + "links": 1 + }, + "00.01 Admin/Calendars/2024-01-25.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "02.03 Zürich/Old Crow.md": { + "size": 1563, + "tags": 1, + "links": 2 + }, + "02.03 Zürich/Barfussbar.md": { + "size": 1574, + "tags": 1, + "links": 2 + }, + "00.01 Admin/Calendars/2024-01-26.md": { + "size": 1412, + "tags": 0, + "links": 9 + }, + "00.01 Admin/Calendars/2024-01-27.md": { + "size": 1412, + "tags": 0, + "links": 7 + }, + "00.01 Admin/Calendars/2024-01-28.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "03.05 Vinyls/Thriller (by Michael Jackson - 1982).md": { + "size": 1511, + "tags": 0, + "links": 1 + }, + "03.05 Vinyls/Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993).md": { + "size": 1531, + "tags": 0, + "links": 1 + }, + "03.05 Vinyls/Highway to Hell (by ACDC - 1979).md": { + "size": 1469, + "tags": 0, + "links": 1 } }, "commitTypes": { "/": { - "Refactor": 6582, - "Create": 2390, - "Link": 8810, - "Expand": 2073 + "Refactor": 6600, + "Create": 2415, + "Link": 8867, + "Expand": 2088 } }, "dailyCommits": { @@ -12687,39 +12797,54 @@ "4": 46, "5": 15, "6": 69, - "7": 832, - "8": 1108, - "9": 1052, - "10": 737, - "11": 525, - "12": 6722, - "13": 618, - "14": 558, - "15": 632, - "16": 700, - "17": 799, - "18": 929, - "19": 689, - "20": 721, - "21": 764, - "22": 718, - "23": 1345 + "7": 837, + "8": 1123, + "9": 1054, + "10": 738, + "11": 538, + "12": 6724, + "13": 633, + "14": 570, + "15": 636, + "16": 702, + "17": 812, + "18": 935, + "19": 692, + "20": 735, + "21": 767, + "22": 720, + "23": 1348 } }, "weeklyCommits": { "/": { - "Mon": 2858, - "Tue": 1670, - "Wed": 7832, - "Thu": 1280, - "Fri": 1411, + "Mon": 2865, + "Tue": 1684, + "Wed": 7840, + "Thu": 1295, + "Fri": 1421, "Sat": 0, - "Sun": 4804 + "Sun": 4865 } }, "recentCommits": { "/": { "Expanded": [ + " Barfussbar ", + " Barfussbar ", + " The Old Crow ", + " 2024-01-22 ", + " Household ", + " Klewenalp ", + " Joséphine Bédier ", + " 2024-01-20 ⚽️ US Orleans - PSG (1-4) ", + " 2024-01-20 ⚽️ US Orleans - PSG ", + " 2024-01-20 ⚽️ US Orleans - PSG ", + " 2024-01-20 ⚽️ US Orleans - PSG ", + " Hoch Ybrig ", + " Hoch Ybrig ", + " Configuring UFW ", + " Bandes Dessinées ", " Sawerdo ", " Les Sales Gosses ", " Le Bologne ", @@ -12755,24 +12880,34 @@ " 2024-01-11 ", " Storage and Syncing ", " Household ", - " Bookmarks - Gift ideas ", - " Bookmarks - Gift ideas ", - " 2024-01-06 ", - " @Finances ", - " Vesoul (by Jacques Brel) ", - " Sings & Plays 12 Negro Spirituals (by Bill Coleman - 1968) ", - " Hosting Tasks ", - " 2024-01-05 ", - " @Vinyls ", - " Collection Barbara (by Barbara - 1992) ", - " I Can Understand It (by Bobby Womack - 1974) ", - " Reggea Rebel (by Bob Marley & the Wailers - 1984) ", - " Template Music ", - " Nastradamus (by Nas - 1999) ", - " Test Sheet 2 ", - " Nas - Nastradamus " + " Bookmarks - Gift ideas " ], "Created": [ + " Highway to Hell (by ACDC - 1979) ", + " Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993) ", + " Thriller (by Michael Jackson - 1982) ", + " 2024-01-28 ", + " 2024-01-27 ", + " 2024-01-26 ", + " Untitled ", + " Untitled ", + " 2024-01-25 ", + " Interview with the Vampire - The Vampire Chronicles (1994) ", + " When Jewelry Influences Watchmakers ", + " 2024-01-24 ", + " Rain Man (1988) ", + " Inside the house shows that bolster Boston’s lacking nightlife ", + " 2024-01-23 ", + " 2024-01-22 ", + " Olympic Champion Carissa Moore Goes in Search of a New Identity ", + " Hvaldimir, the Whale Who Went AWOL ", + " The ballad of Lars and Bruno ", + " My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers. ", + " Untitled ", + " 2024-01-21 ", + " 2024-01-20 ⚽️ US Orleans - PSG ", + " Untitled ", + " 2024-01-20 ", " I Walk the Line (by Johnny Cash - 1987) ", " Première Consultation (by Doc Gynéco - 1996) ", " Untitled ", @@ -12798,34 +12933,23 @@ " An Iowa paperboy disappeared 41 years ago. His mother is still on the case ", "", " A Knife Forged in Fire ", - " 2024-01-14 ", - " 2024-01-13 ", - " Ferrari (2023) ", - " 2024-01-12 ", - " 2024-01-11 ", - " 2024-01-10 ", - " 2024-01-09 ", - " The Sea Beyond (2020–) ", - " 2024-01-08 ", - " Perfect Days (2023) ", - " Untitled ", - " Galette des rois à la frangipane la recette légère et moelleuse de Christian Le Squer ", - " Fifth Sun ", - " A Gaza Conundrum The Story Behind the Rise of Hamas ", - " Why Parents Struggle So Much in the World's Richest Country ", - " Was Frank Gore the Last NFL Running Back - ESPN ", - " Fun is dead. ", - " How a Script Doctor Found His Own Voice ", - " 2024-01-07 ", - " Dogman (2018) ", - " For Greater Glory - The True Story of Cristiada (2012) ", - " 2024-01-06 ", - " Babylon (2022) ", - " Untitled ", - " Untitled ", - " Duets (by Nas) " + " 2024-01-14 " ], "Renamed": [ + " Highway to Hell (by ACDC - 1979) ", + " Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993) ", + " Thriller (by Michael Jackson - 1982) ", + " Barfussbar ", + " Old Crow ", + " The Old Crow ", + " Interview with the Vampire - The Vampire Chronicles (1994) ", + " Rain Man (1988) ", + " Inside the house shows that bolster Boston’s lacking nightlife ", + " Hvaldimir, the Whale Who Went AWOL ", + " My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers. ", + " Klewenalp ", + " 2024-01-20 ⚽️ US Orleans - PSG (1-4) ", + " Hoch Ybrig ", " I Walk the Line (by Johnny Cash - 1987) ", " Première Consultation (by Doc Gynéco - 1996) ", " Sawerdo ", @@ -12862,23 +12986,18 @@ " How a Script Doctor Found His Own Voice ", " Dogman (2018) ", " For Greater Glory - The True Story of Cristiada (2012) ", - " Babylon (2022) ", - " Vesoul (by Jacques Brel - 1975) ", - " Vesoul (by Jacques Brel - 1975) ", - " Sings & Plays 12 Negro Spirituals (by Bill Coleman - 1968) ", - " Duets (by Nas) ", - " Timeless (by Thylacine - 2020) ", - " 9 Pieces (by Thylacine - 2022) ", - " Space Is Only Noise (by Nicolas Jaar - 2011) ", - " Talisman (by Fakear - 2023) ", - " Animal (by Fakear - 2016) ", - " In the Heat of the Night (by Imagination - 1982) ", - " I’m Every Woman (by Chaka Khan - 1978) ", - " East Saint Louis Toodle-Oo Black Beauty (by Duke Ellington And His Orchestra - 1936) ", - " Ethiopian Modern Instrumentals Hits (by Various Artists - 2003) ", - " King of the Delta Blues Singers (by Robert Johnson - 1961) " + " Babylon (2022) " ], "Tagged": [ + " Barfussbar ", + " The Old Crow ", + " Inside the house shows that bolster Boston’s lacking nightlife ", + " Hvaldimir, the Whale Who Went AWOL ", + " My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers. ", + " Klewenalp ", + " Hoch Ybrig ", + " Hoch Ybrig ", + " Hoch Ybrig ", " Sawerdo ", " Les Sales Gosses ", " Le Bologne ", @@ -12920,18 +13039,10 @@ " Template Music ", " 2023-12-15 Eczema ", " 2023-04-29 Wedding Marguerite ", - " 2023-02-11 Wedding Eloi ", - " 2023-02-10 Wedding Eloi ", - " 2022-12-26 Christmas with Papa ", - " 2024-01-01 Unsollicited Contact ", - " 2023-12-18 Preparation for 2024 ", - " 2023-12-21 Christmas with Papa ", - " 2023-12-21 Arrival Papa ", - " Galbar ", - " Bei Babette ", - " Kafi Dihei " + " 2023-02-11 Wedding Eloi " ], "Refactored": [ + " 2024-01-23 ", " Geneva ", " Warm lemon and Parmesan couscous ", " Cucumber Lemon Feta Cheese Couscous Salad ", @@ -12981,10 +13092,12 @@ " Household ", " 2023-09-23 ", " 2023-09-20 ", - " 2023-09-16 ", - " 2023-08-28 " + " 2023-09-16 " ], "Deleted": [ + " When Jewelry Influences Watchmakers ", + " Olympic Champion Carissa Moore Goes in Search of a New Identity ", + " The ballad of Lars and Bruno ", " 2024-01-19 ", " Notice 2024-01-15 19-56-51 ", " Seasonal Activities ", @@ -13032,63 +13145,60 @@ " Bunkers ", " 2023-02-14 Bayern - PSG ", " Untitled ", - " Andy Wahlou ", - " 2023-04-07 Mum in Zürich ", - " Test ", - " Why are Americans dying so young " + " Andy Wahlou " ], "Linked": [ - " Sawerdo ", - " Les Sales Gosses ", - " Le Bologne ", - " Chez Philippe ", - " 2024-01-18 ", - " Bleu Nuit ", + " 2024-01-26 ", + " 2024-01-28 ", + " Highway to Hell (by ACDC - 1979) ", + " Thriller (by Michael Jackson - 1982) ", + " Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993) ", + " 2024-01-27 ", + " Hvaldimir, the Whale Who Went AWOL ", + " 2024-01-27 ", + " After Two Decades Undercover, She’s Ready to Tell the Real Story of Human Trafficking ", + " 2024-01-26 ", + " 2024-01-25 ", + " 2024-01-26 ", + " 2024-01-24 ", + " Barfussbar ", + " The Old Crow ", + " 2024-01-25 ", + " 2024-01-24 ", + " Interview with the Vampire - The Vampire Chronicles (1994) ", + " 2024-01-24 ", + " 2024-01-23 ", + " Rain Man (1988) ", + " 2024-01-23 ", + " 2024-01-21 ", + " 2024-01-22 ", + " Inside the house shows that bolster Boston’s lacking nightlife ", + " 2024-01-23 ", + " 2024-01-22 ", + " 2024-01-22 ", + " 2024-01-22 ", + " 2024-01-22 ", + " 2024-01-22 ", + " 2024-01-21 ", + " Olympic Champion Carissa Moore Goes in Search of a New Identity ", + " Hvaldimir, the Whale Who Went AWOL ", + " My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers. ", + " 2024-01-21 ", + " Klewenalp ", + " 2024-01-21 ", + " 2024-01-20 ⚽️ US Orleans - PSG ", + " 2024-01-20 ", + " Why Parents Struggle So Much in the World's Richest Country ", + " 2024-01-20 ", + " Hoch Ybrig ", + " 2024-01-20 ", " 2024-01-19 ", - " 2024-01-18 ", - " 2024-01-18 ", - " 2024-01-17 ", - " The Color of Money (1986) ", - " 2024-01-17 ", - " 2024-01-17 ", - " 2024-01-17 ", - " 2024-01-17 ", - " 2024-01-16 ", - "", - " 2024-01-16 ", - " 2024-01-15 ", - " More American Graffiti (1979) ", - " A Gaza Conundrum The Story Behind the Rise of Hamas ", - " Sicilian aubergine stew with couscous ", - " Incredible Sicilian aubergine stew with couscous Jamie Oliver ", - " Warm lemon and Parmesan couscous ", - " Warm lemon and Parmesan couscous ", - " Cucumber Lemon Feta Cheese Couscous Salad ", - " Spicy Mongolian Beef ", - " Spicy Mongolian Beef - 30 Minute Meal ", - " 2024-01-15 ", - " Was Frank Gore the Last NFL Running Back - ESPN ", - " 2024-01-14 ", - " 2024-01-14 ⚽️ RC Lens - PSG ", - " After Two Decades Undercover, She’s Ready to Tell the Real Story of Human Trafficking ", - " A Knife Forged in Fire ", - "", " An Iowa paperboy disappeared 41 years ago. His mother is still on the case ", - " 2023-12-15 Eczema ", - " 2024-01-14 ", - " How a Script Doctor Found His Own Voice ", - " 2024-01-13 ", - " @@Travels ", - " @@Zürich ", - " @Life Admin ", - " @Italy ", - " @Switzerland ", - " Geneva ", - " Household ", - " @@Zürich ", - " 2024-01-13 ", - " Entertainment ", - " Interiors " + " Première Consultation (by Doc Gynéco - 1996) ", + " I Walk the Line (by Johnny Cash - 1987) ", + " Sawerdo ", + " Les Sales Gosses ", + " Le Bologne " ], "Removed Tags from": [ " Warm lemon and Parmesan couscous ", diff --git a/.obsidian/plugins/obsidian-icon-folder/data.json b/.obsidian/plugins/obsidian-icon-folder/data.json index bbc0f51e..1ded9f03 100644 --- a/.obsidian/plugins/obsidian-icon-folder/data.json +++ b/.obsidian/plugins/obsidian-icon-folder/data.json @@ -6,11 +6,11 @@ "emojiStyle": "native", "iconColor": null, "recentlyUsedIcons": [ + "TpUnteribergBlazon", "TpServerRemix1ByMerlin2525", "TpPharmacieLogoSvgVector", "TpBenBoisVinylRecords", - "💿", - "TpRL.D" + "💿" ], "recentlyUsedIconsSize": 5, "rules": [], @@ -118,5 +118,6 @@ "03.05 Vinyls": "TpBenBoisVinylRecords", "03.05 Vinyls/@Vinyls.md": "TpBenBoisVinylRecords", "01.06 Health": "TpPharmacieLogoSvgVector", - "05.02 Networks": "TpServerRemix1ByMerlin2525" + "05.02 Networks": "TpServerRemix1ByMerlin2525", + "03.02 Travels/Hoch Ybrig.md": "TpUnteribergBlazon" } \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-reminder-plugin/data.json b/.obsidian/plugins/obsidian-reminder-plugin/data.json index 1794a10b..c8e61de2 100644 --- a/.obsidian/plugins/obsidian-reminder-plugin/data.json +++ b/.obsidian/plugins/obsidian-reminder-plugin/data.json @@ -257,7 +257,7 @@ "01.03 Family/Joséphine Bédier.md": [ { "title": ":birthday: **[[Joséphine Bédier|Joséphine]]** %%done_del%%", - "time": "2024-01-21", + "time": "2025-01-21", "rowNumber": 105 } ], @@ -334,13 +334,8 @@ "01.02 Home/Household.md": [ { "title": "🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%%", - "time": "2024-01-22", - "rowNumber": 88 - }, - { - "title": "♻ [[Household]]: *Cardboard* recycling collection %%done_del%%", - "time": "2024-01-23", - "rowNumber": 78 + "time": "2024-01-29", + "rowNumber": 89 }, { "title": "♻ [[Household]]: *Paper* recycling collection %%done_del%%", @@ -350,32 +345,37 @@ { "title": "🛎️ :house: [[Household]]: Pay rent %%done_del%%", "time": "2024-01-31", - "rowNumber": 86 + "rowNumber": 87 }, { "title": ":bed: [[Household]] Change bedsheets %%done_del%%", "time": "2024-02-03", - "rowNumber": 93 + "rowNumber": 95 + }, + { + "title": "♻ [[Household]]: *Cardboard* recycling collection %%done_del%%", + "time": "2024-02-06", + "rowNumber": 78 }, { "title": ":blue_car: [[Household]]: Change to Summer tyres @ [[Rex Automobile CH]] %%done_del%%", "time": "2024-04-15", - "rowNumber": 101 + "rowNumber": 103 }, { "title": ":blue_car: [[Household]]: Change to Winter tyres @ [[Rex Automobile CH]] %%done_del%%", "time": "2024-10-15", - "rowNumber": 102 + "rowNumber": 104 }, { "title": ":ski: [[Household]]: Organise yearly ski servicing ([[Ski Rental Zürich]]) %%done_del%%", "time": "2024-10-31", - "rowNumber": 109 + "rowNumber": 111 }, { "title": ":blue_car: [[Household]]: Renew [road vignette](https://www.e-vignette.ch/) %%done_del%%", "time": "2024-12-20", - "rowNumber": 103 + "rowNumber": 105 } ], "01.03 Family/Pia Bousquié.md": [ @@ -468,13 +468,13 @@ "05.02 Networks/Configuring UFW.md": [ { "title": "🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%%", - "time": "2024-01-20", + "time": "2024-02-03", "rowNumber": 239 }, { "title": "🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%%", - "time": "2024-01-20", - "rowNumber": 292 + "time": "2024-02-03", + "rowNumber": 294 } ], "01.03 Family/Amélie Solanet.md": [ @@ -749,7 +749,7 @@ "00.01 Admin/Calendars/2023-10-02.md": [ { "title": "07:40 :racehorse: [[@Lifestyle|Polo]]: Ask [[Juan Bautista Bossio|Juan]] to buy tacos (2 52; 1 53)", - "time": "2024-01-31", + "time": "2024-02-01", "rowNumber": 103 }, { @@ -780,11 +780,6 @@ } ], "00.01 Admin/Calendars/2023-12-24.md": [ - { - "title": "19:55 :fried_egg: [[@Life Admin|Admin]]: Buy tupperware", - "time": "2024-01-31", - "rowNumber": 104 - }, { "title": "17:08 :grapes: [[@Life Admin|Admin]]: Re-buy white wines [[Finca Racons]] [[Nadine Saxer - Blanc de Noir]]", "time": "2024-05-30", @@ -820,7 +815,7 @@ "00.01 Admin/Calendars/2023-12-28.md": [ { "title": "15:31 :man_in_tuxedo: [[@Lifestyle|Social]]: Contact Thomas de Villoutreys (:test_wappen_genf_matt:)", - "time": "2024-01-21", + "time": "2024-02-21", "rowNumber": 104 } ], @@ -1010,21 +1005,18 @@ "title": "12:53 :judge: [[@Life Admin|Admin]]: Encheres a suivre", "time": "2024-02-13", "rowNumber": 104 - }, - { - "title": "12:54 :judge: [[@Life Admin|Admin]]: Enchere a mettre", - "time": "2024-01-21", - "rowNumber": 105 - }, + } + ], + "00.01 Admin/Calendars/2024-01-22.md": [ { - "title": "19:48 :judge: [[@Life Admin|Admin]]: Enchere à suivre", - "time": "2024-01-29", - "rowNumber": 106 + "title": "10:44 :computer: [[@IT & Computer|Computer]]: Check battery issue of file server", + "time": "2024-02-02", + "rowNumber": 103 }, { - "title": "20:35 :judge: [[@Life Admin|Admin]]: Enchere à suivre", - "time": "2024-01-27", - "rowNumber": 107 + "title": "16:06 :ski: [[@Lifestyle|Lifestyle]]: Look for a ski bag & a ski boot bag", + "time": "2024-04-15", + "rowNumber": 104 } ] }, diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index ae963af8..5e266d18 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -122,14 +122,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -"use strict";var Uv=Object.create;var _i=Object.defineProperty,qv=Object.defineProperties,Wv=Object.getOwnPropertyDescriptor,Yv=Object.getOwnPropertyDescriptors,Gv=Object.getOwnPropertyNames,Rm=Object.getOwnPropertySymbols,jv=Object.getPrototypeOf,Cm=Object.prototype.hasOwnProperty,$v=Object.prototype.propertyIsEnumerable;var Mm=(r,e,t)=>e in r?_i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ke=(r,e)=>{for(var t in e||(e={}))Cm.call(e,t)&&Mm(r,t,e[t]);if(Rm)for(var t of Rm(e))$v.call(e,t)&&Mm(r,t,e[t]);return r},ot=(r,e)=>qv(r,Yv(e));var b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Bv=(r,e)=>{for(var t in e)_i(r,t,{get:e[t],enumerable:!0})},Am=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gv(e))!Cm.call(r,s)&&s!==t&&_i(r,s,{get:()=>e[s],enumerable:!(n=Wv(e,s))||n.enumerable});return r};var vi=(r,e,t)=>(t=r!=null?Uv(jv(r)):{},Am(e||!r||!r.__esModule?_i(t,"default",{value:r,enumerable:!0}):t,r)),Hv=r=>Am(_i({},"__esModule",{value:!0}),r);var L=(r,e,t)=>new Promise((n,s)=>{var i=u=>{try{o(t.next(u))}catch(l){s(l)}},a=u=>{try{o(t.throw(u))}catch(l){s(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,a);o((t=t.apply(r,e)).next())});var Se=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.matchAnyPattern=fn.extractTerms=fn.repeatedTimeunitPattern=void 0;function Qv(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}fn.repeatedTimeunitPattern=Qv;function Pm(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}fn.extractTerms=Pm;function Xv(r){return`(?:${Pm(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}fn.matchAnyPattern=Xv});var Te=b((pl,ml)=>{(function(r,e){typeof pl=="object"&&typeof ml!="undefined"?ml.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(pl,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",i="minute",a="hour",o="day",u="week",l="month",c="quarter",f="year",m="date",y="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function($,N,w){var H=String($);return!H||H.length>=N?$:""+Array(N+1-H.length).join(w)+$},I={s:v,z:function($){var N=-$.utcOffset(),w=Math.abs(N),H=Math.floor(w/60),C=w%60;return(N<=0?"+":"-")+v(H,2,"0")+":"+v(C,2,"0")},m:function $(N,w){if(N.date(){"use strict";var Zv=pn&&pn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pn,"__esModule",{value:!0});pn.findYearClosestToRef=pn.findMostLikelyADYear=void 0;var Jv=Zv(Te());function ew(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}pn.findMostLikelyADYear=ew;function tw(r,e,t){let n=Jv.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let i=s.add(1,"y"),a=s.add(-1,"y");return Math.abs(i.diff(n)){"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.parseTimeUnits=ne.TIME_UNITS_PATTERN=ne.parseYear=ne.YEAR_PATTERN=ne.parseOrdinalNumberPattern=ne.ORDINAL_NUMBER_PATTERN=ne.parseNumberPattern=ne.NUMBER_PATTERN=ne.TIME_UNIT_DICTIONARY=ne.ORDINAL_WORD_DICTIONARY=ne.INTEGER_WORD_DICTIONARY=ne.MONTH_DICTIONARY=ne.FULL_MONTH_NAME_DICTIONARY=ne.WEEKDAY_DICTIONARY=void 0;var ao=Se(),rw=ut();ne.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};ne.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};ne.MONTH_DICTIONARY=Object.assign(Object.assign({},ne.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});ne.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};ne.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};ne.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ne.NUMBER_PATTERN=`(?:${ao.matchAnyPattern(ne.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Im(r){let e=r.toLowerCase();return ne.INTEGER_WORD_DICTIONARY[e]!==void 0?ne.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}ne.parseNumberPattern=Im;ne.ORDINAL_NUMBER_PATTERN=`(?:${ao.matchAnyPattern(ne.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function nw(r){let e=r.toLowerCase();return ne.ORDINAL_WORD_DICTIONARY[e]!==void 0?ne.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ne.parseOrdinalNumberPattern=nw;ne.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function sw(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return rw.findMostLikelyADYear(e)}ne.parseYear=sw;var Fm=`(${ne.NUMBER_PATTERN})\\s{0,3}(${ao.matchAnyPattern(ne.TIME_UNIT_DICTIONARY)})`,Nm=new RegExp(Fm,"i");ne.TIME_UNITS_PATTERN=ao.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Fm);function iw(r){let e={},t=r,n=Nm.exec(t);for(;n;)aw(e,n),t=t.substring(n[0].length).trim(),n=Nm.exec(t);return e}ne.parseTimeUnits=iw;function aw(r,e){let t=Im(e[1]),n=ne.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Lm=b((hl,gl)=>{(function(r,e){typeof hl=="object"&&typeof gl!="undefined"?gl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(hl,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var i=s.add;s.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):i.bind(this)(o,u)};var a=s.startOf;s.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var f=this.quarter()-1;return c?this.month(3*f).startOf(r).startOf("day"):this.month(3*f+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Kt=b(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.implySimilarTime=wr.assignSimilarTime=wr.assignSimilarDate=wr.assignTheNextDay=void 0;var Um=ze();function ow(r,e){e=e.add(1,"day"),qm(r,e),Wm(r,e)}wr.assignTheNextDay=ow;function qm(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}wr.assignSimilarDate=qm;function uw(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",Um.Meridiem.AM):r.assign("meridiem",Um.Meridiem.PM)}wr.assignSimilarTime=uw;function Wm(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}wr.implySimilarTime=Wm});var Ym=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.toTimezoneOffset=Un.TIMEZONE_ABBR_MAP=void 0;Un.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function lw(r){var e;return r==null?null:typeof r=="number"?r:(e=Un.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Un.toTimezoneOffset=lw});var Le=b(Er=>{"use strict";var Gm=Er&&Er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Er,"__esModule",{value:!0});Er.ParsingResult=Er.ParsingComponents=Er.ReferenceWithTimezone=void 0;var cw=Gm(Lm()),oo=Gm(Te()),yl=Kt(),dw=Ym();oo.default.extend(cw.default);var Tl=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=dw.toTimezoneOffset(e.timezone))}};Er.ReferenceWithTimezone=Tl;var qn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=oo.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new qn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return oo.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let s=-e.getTimezoneOffset(),i=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-i}static createRelativeFromReference(e,t){let n=oo.default(e.instant);for(let i in t)n=n.add(t[i],i);let s=new qn(e);return t.hour||t.minute||t.second?(yl.assignSimilarTime(s,n),yl.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(yl.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};Er.ParsingComponents=qn;var wi=class{constructor(e,t,n,s,i){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new qn(e),this.end=i}clone(){let e=new wi(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};Er.ParsingResult=wi});var Y=b(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.AbstractParserWithWordBoundaryChecking=void 0;var bl=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let i=2;i{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var vl=lt(),fw=Le(),pw=Y(),mw=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${vl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),hw=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${vl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),_l=class extends pw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?hw:mw}innerExtract(e,t){let n=vl.parseTimeUnits(t[1]);return fw.ParsingComponents.createRelativeFromReference(e.reference,n)}};wl.default=_l});var Km=b(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var gw=ut(),zm=lt(),Vm=lt(),lo=lt(),yw=Se(),Tw=Y(),bw=new RegExp(`(?:on\\s{0,3})?(${lo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${lo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${yw.matchAnyPattern(zm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Vm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),$m=1,Bm=2,_w=3,Hm=4,El=class extends Tw.AbstractParserWithWordBoundaryChecking{innerPattern(){return bw}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=zm.MONTH_DICTIONARY[t[_w].toLowerCase()],i=lo.parseOrdinalNumberPattern(t[$m]);if(i>31)return t.index=t.index+t[$m].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[Hm]){let a=Vm.parseYear(t[Hm]);n.start.assign("year",a)}else{let a=gw.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[Bm]){let a=lo.parseOrdinalNumberPattern(t[Bm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};kl.default=El});var eh=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var vw=ut(),Zm=lt(),co=lt(),Jm=lt(),ww=Se(),Ew=Y(),kw=new RegExp(`(${ww.matchAnyPattern(Zm.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${co.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${co.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Jm.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),Sw=1,Ow=2,Qm=3,Xm=4,Sl=class extends Ew.AbstractParserWithWordBoundaryChecking{innerPattern(){return kw}innerExtract(e,t){let n=Zm.MONTH_DICTIONARY[t[Sw].toLowerCase()],s=co.parseOrdinalNumberPattern(t[Ow]);if(s>31)return null;let i=e.createParsingComponents({day:s,month:n});if(t[Xm]){let u=Jm.parseYear(t[Xm]);i.assign("year",u)}else{let u=vw.findYearClosestToRef(e.refDate,s,n);i.imply("year",u)}if(!t[Qm])return i;let a=co.parseOrdinalNumberPattern(t[Qm]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",a),o}};Ol.default=Sl});var nh=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var Dl=lt(),Dw=ut(),xw=Se(),rh=lt(),Rw=Y(),Mw=new RegExp(`((?:in)\\s*)?(${xw.matchAnyPattern(Dl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${rh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Cw=1,Aw=2,th=3,xl=class extends Rw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Mw}innerExtract(e,t){let n=t[Aw].toLowerCase();if(t[0].length<=3&&!Dl.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[Cw]||"").length,t.index+t[0].length);s.start.imply("day",1);let i=Dl.MONTH_DICTIONARY[n];if(s.start.assign("month",i),t[th]){let a=rh.parseYear(t[th]);s.start.assign("year",a)}else{let a=Dw.findYearClosestToRef(e.refDate,1,i);s.start.imply("year",a)}return s}};Rl.default=xl});var ah=b(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var ih=lt(),Pw=Se(),Nw=Y(),Iw=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Pw.matchAnyPattern(ih.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Fw=1,Lw=2,sh=3,Uw=4,Ml=class extends Nw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Iw}innerExtract(e,t){let n=t[sh]?parseInt(t[sh]):ih.MONTH_DICTIONARY[t[Lw].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[Fw]);return{day:parseInt(t[Uw]),month:n,year:s}}};Cl.default=Ml});var oh=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var qw=Y(),Ww=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Yw=1,Gw=2,Al=class extends qw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ww}innerExtract(e,t){let n=parseInt(t[Gw]),s=parseInt(t[Yw]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Pl.default=Al});var Wn=b(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.AbstractTimeExpressionParser=void 0;var Ot=ze();function jw(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function $w(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var uh=2,bs=3,fo=4,po=5,Ei=6,Nl=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let s=t.index+t[1].length,i=t[0].substring(t[1].length),a=e.createParsingResult(s,i,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return i.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),i=0,a=null,o=parseInt(t[uh]);if(o>100){if(this.strictMode||t[bs]!=null)return null;i=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[bs]!=null){if(t[bs].length==1&&!t[Ei])return null;i=parseInt(t[bs])}if(i>=60)return null;if(o>12&&(a=Ot.Meridiem.PM),t[Ei]!=null){if(o>12)return null;let u=t[Ei][0].toLowerCase();u=="a"&&(a=Ot.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Ot.Meridiem.PM,o!=12&&(o+=12))}if(s.assign("hour",o),s.assign("minute",i),a!==null?s.assign("meridiem",a):o<12?s.imply("meridiem",Ot.Meridiem.AM):s.imply("meridiem",Ot.Meridiem.PM),t[po]!=null){let u=parseInt(t[po].substring(0,3));if(u>=1e3)return null;s.assign("millisecond",u)}if(t[fo]!=null){let u=parseInt(t[fo]);if(u>=60)return null;s.assign("second",u)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[po]!=null){let u=parseInt(t[po].substring(0,3));if(u>=1e3)return null;s.assign("millisecond",u)}if(t[fo]!=null){let u=parseInt(t[fo]);if(u>=60)return null;s.assign("second",u)}let i=parseInt(t[uh]),a=0,o=-1;if(t[bs]!=null?a=parseInt(t[bs]):i>100&&(a=i%100,i=Math.floor(i/100)),a>=60||i>24)return null;if(i>=12&&(o=Ot.Meridiem.PM),t[Ei]!=null){if(i>12)return null;let u=t[Ei][0].toLowerCase();u=="a"&&(o=Ot.Meridiem.AM,i==12&&(i=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),u=="p"&&(o=Ot.Meridiem.PM,i!=12&&(i+=12)),n.start.isCertain("meridiem")||(o==Ot.Meridiem.AM?(n.start.imply("meridiem",Ot.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ot.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",i),s.assign("minute",a),o>=0?s.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>i?s.imply("meridiem",Ot.Meridiem.AM):i<=12&&(s.assign("hour",i+12),s.assign("meridiem",Ot.Meridiem.PM)):i>12?s.imply("meridiem",Ot.Meridiem.PM):i<=12&&s.imply("meridiem",Ot.Meridiem.AM),s.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let i=parseInt(s),a=parseInt(n);if(i>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=jw(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=$w(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};mo.AbstractTimeExpressionParser=Nl});var lh=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var ho=ze(),Bw=Wn(),Il=class extends Bw.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",ho.Meridiem.PM)):s<6&&n.assign("meridiem",ho.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",ho.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",ho.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Fl.default=Il});var Qt=b(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.addImpliedTimeUnits=_s.reverseTimeUnits=void 0;function Hw(r){let e={};for(let t in r)e[t]=-r[t];return e}_s.reverseTimeUnits=Hw;function zw(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}_s.addImpliedTimeUnits=zw});var ch=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var Ul=lt(),Vw=Le(),Kw=Y(),Qw=Qt(),Xw=new RegExp(`(${Ul.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),Zw=new RegExp(`(${Ul.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Ll=class extends Kw.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Zw:Xw}innerExtract(e,t){let n=Ul.parseTimeUnits(t[1]),s=Qw.reverseTimeUnits(n);return Vw.ParsingComponents.createRelativeFromReference(e.reference,s)}};ql.default=Ll});var dh=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var Yl=lt(),Jw=Le(),eE=Y(),tE=new RegExp(`(${Yl.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),rE=new RegExp("("+Yl.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),nE=1,Wl=class extends eE.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?rE:tE}innerExtract(e,t){let n=Yl.parseTimeUnits(t[nE]);return Jw.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gl.default=Wl});var ws=b(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.MergingRefiner=vs.Filter=void 0;var jl=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};vs.Filter=jl;var $l=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],i=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),s=c}}return s!=null&&n.push(s),n}};vs.MergingRefiner=$l});var kr=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var sE=ws(),Bl=class extends sE.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(i=>{t.start.isCertain(i)||t.start.assign(i,n.start.get(i))}),t.start.getCertainComponents().forEach(i=>{n.start.isCertain(i)||n.start.assign(i,t.start.get(i))})),t.start.date().getTime()>n.start.date().getTime()){let i=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&i.add(-7,"days").isBefore(a)?(i=i.add(-7,"days"),t.start.imply("day",i.date()),t.start.imply("month",i.month()+1),t.start.imply("year",i.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(i)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index{"use strict";var iE=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});var aE=iE(kr()),zl=class extends aE.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ki.default=zl});var ph=b(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.mergeDateTimeComponent=Es.mergeDateTimeResult=void 0;var oE=ze();function uE(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=Vl(n,s),r.end!=null||e.end!=null){let i=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=Vl(i,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var lE=ws(),mh=ph(),Kl=class extends lE.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let s=t.start.isOnlyDate()?mh.mergeDateTimeResult(t,n):mh.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};Ql.default=Kl});var hh=b(Si=>{"use strict";var cE=Si&&Si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Si,"__esModule",{value:!0});var dE=cE(Lr()),Xl=class extends dE.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Si.default=Xl});var gh=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var fE=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),pE={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},Zl=class{constructor(e){this.timezone=Object.assign(Object.assign({},pE),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(i=>{var a,o;let u=e.text.substring(i.index+i.text.length),l=fE.exec(u);if(!l)return;let c=l[1].toUpperCase(),f=(o=(a=s[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(f===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${f} for: ${i.start}`)});let m=i.start.get("timezoneOffset");m!==null&&f!=m&&(i.start.isCertain("timezoneOffset")||c!=l[1])||i.start.isOnlyDate()&&c!=l[1]||(i.text+=l[0],i.start.isCertain("timezoneOffset")||i.start.assign("timezoneOffset",f),i.end!=null&&!i.end.isCertain("timezoneOffset")&&i.end.assign("timezoneOffset",f))}),t}};Jl.default=Zl});var go=b(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var mE=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),hE=1,gE=2,yE=3,ec=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),i=mE.exec(s);if(!i)return;e.debug(()=>{console.log(`Extracting timezone: '${i[0]}' into : ${n}`)});let a=parseInt(i[gE]),o=parseInt(i[yE]||"0"),u=a*60+o;u>14*60||(i[hE]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=i[0])}),t}};tc.default=ec});var yh=b(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var rc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let i=1;is.text.length&&(s=a):(n.push(s),s=a)}return s!=null&&n.push(s),n}};nc.default=rc});var Th=b(Oi=>{"use strict";var TE=Oi&&Oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oi,"__esModule",{value:!0});var bE=TE(Te()),sc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=bE.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let i=0;i<3&&s.isAfter(n.start.dayjs());i++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Oi.default=sc});var bh=b(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var _E=ws(),ic=class extends _E.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};ac.default=ic});var lc=b(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var vE=Y(),wE=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),EE=1,kE=2,SE=3,_h=4,OE=5,vh=6,wh=7,Eh=8,kh=9,oc=class extends vE.AbstractParserWithWordBoundaryChecking{innerPattern(){return wE}innerExtract(e,t){let n={};if(n.year=parseInt(t[EE]),n.month=parseInt(t[kE]),n.day=parseInt(t[SE]),t[_h]!=null)if(n.hour=parseInt(t[_h]),n.minute=parseInt(t[OE]),t[vh]!=null&&(n.second=parseInt(t[vh])),t[wh]!=null&&(n.millisecond=parseInt(t[wh])),t[Eh]==null)n.timezoneOffset=0;else{let s=parseInt(t[Eh]),i=0;t[kh]!=null&&(i=parseInt(t[kh]));let a=s*60;a<0?a-=i:a+=i,n.timezoneOffset=a}return n}};uc.default=oc});var Sh=b(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var DE=ws(),cc=class extends DE.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};dc.default=cc});var Ur=b(ks=>{"use strict";var Yn=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});ks.includeCommonConfiguration=void 0;var xE=Yn(gh()),RE=Yn(go()),Oh=Yn(yh()),ME=Yn(Th()),CE=Yn(bh()),AE=Yn(lc()),PE=Yn(Sh());function NE(r,e=!1){return r.parsers.unshift(new AE.default),r.refiners.unshift(new PE.default),r.refiners.unshift(new xE.default),r.refiners.unshift(new RE.default),r.refiners.unshift(new Oh.default),r.refiners.push(new Oh.default),r.refiners.push(new ME.default),r.refiners.push(new CE.default(e)),r}ks.includeCommonConfiguration=NE});var Wr=b(we=>{"use strict";var IE=we&&we.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(we,"__esModule",{value:!0});we.noon=we.morning=we.midnight=we.yesterdayEvening=we.evening=we.lastNight=we.tonight=we.theDayAfter=we.tomorrow=we.theDayBefore=we.yesterday=we.today=we.now=void 0;var Sr=Le(),Ss=IE(Te()),qr=Kt(),Di=ze();function FE(r){let e=Ss.default(r.instant),t=new Sr.ParsingComponents(r,{});return qr.assignSimilarDate(t,e),qr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}we.now=FE;function LE(r){let e=Ss.default(r.instant),t=new Sr.ParsingComponents(r,{});return qr.assignSimilarDate(t,e),qr.implySimilarTime(t,e),t}we.today=LE;function UE(r){return Dh(r,1)}we.yesterday=UE;function Dh(r,e){return fc(r,-e)}we.theDayBefore=Dh;function qE(r){return fc(r,1)}we.tomorrow=qE;function fc(r,e){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return t=t.add(e,"day"),qr.assignSimilarDate(n,t),qr.implySimilarTime(n,t),n}we.theDayAfter=fc;function WE(r,e=22){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Di.Meridiem.PM),qr.assignSimilarDate(n,t),n}we.tonight=WE;function YE(r,e=0){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),qr.assignSimilarDate(n,t),n.imply("hour",e),n}we.lastNight=YE;function GE(r,e=20){let t=new Sr.ParsingComponents(r,{});return t.imply("meridiem",Di.Meridiem.PM),t.imply("hour",e),t}we.evening=GE;function jE(r,e=20){let t=Ss.default(r.instant),n=new Sr.ParsingComponents(r,{});return t=t.add(-1,"day"),qr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",Di.Meridiem.PM),n}we.yesterdayEvening=jE;function $E(r){let e=new Sr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}we.midnight=$E;function BE(r,e=6){let t=new Sr.ParsingComponents(r,{});return t.imply("meridiem",Di.Meridiem.AM),t.imply("hour",e),t}we.morning=BE;function HE(r){let e=new Sr.ParsingComponents(r,{});return e.imply("meridiem",Di.Meridiem.AM),e.imply("hour",12),e}we.noon=HE});var xh=b(cr=>{"use strict";var zE=cr&&cr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),VE=cr&&cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),KE=cr&&cr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&zE(e,r,t);return VE(e,r),e},QE=cr&&cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cr,"__esModule",{value:!0});var XE=QE(Te()),ZE=Y(),JE=Kt(),xi=KE(Wr()),ek=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,pc=class extends ZE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return ek}innerExtract(e,t){let n=XE.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();switch(s){case"now":return xi.now(e.reference);case"today":return xi.today(e.reference);case"yesterday":return xi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return xi.tomorrow(e.reference);case"tonight":return xi.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),JE.assignSimilarDate(i,n),i.imply("hour",0));break}return i}};cr.default=pc});var Rh=b(Ri=>{"use strict";var tk=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});var yo=ze(),rk=Y(),nk=tk(Te()),sk=Kt(),ik=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,mc=class extends rk.AbstractParserWithWordBoundaryChecking{innerPattern(){return ik}innerExtract(e,t){let n=nk.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",yo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",yo.Meridiem.PM),s.imply("hour",20);break;case"midnight":sk.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",yo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",yo.Meridiem.AM),s.imply("hour",12);break}return s}};Ri.default=mc});var Gn=b(mn=>{"use strict";var ak=mn&&mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0});mn.toDayJSClosestWeekday=mn.toDayJSWeekday=void 0;var Mh=ak(Te());function ok(r,e,t){if(!t)return Ch(r,e);let n=Mh.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}mn.toDayJSWeekday=ok;function Ch(r,e){let t=Mh.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var Ah=lt(),uk=Se(),lk=Y(),ck=Gn(),dk=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${uk.matchAnyPattern(Ah.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),fk=1,pk=2,mk=3,hc=class extends lk.AbstractParserWithWordBoundaryChecking{innerPattern(){return dk}innerExtract(e,t){let n=t[pk].toLowerCase(),s=Ah.WEEKDAY_DICTIONARY[n],i=t[fk],a=t[mk],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=ck.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};gc.default=hc});var Fh=b(Mi=>{"use strict";var hk=Mi&&Mi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mi,"__esModule",{value:!0});var Ih=lt(),Nh=Le(),gk=hk(Te()),yk=Y(),Tk=Se(),bk=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${Tk.matchAnyPattern(Ih.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),_k=1,vk=2,yc=class extends yk.AbstractParserWithWordBoundaryChecking{innerPattern(){return bk}innerExtract(e,t){let n=t[_k].toLowerCase(),s=t[vk].toLowerCase(),i=Ih.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let u={};return u[i]=1,Nh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[i]=-1,Nh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=gk.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Mi.default=yc});var dr=b(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.ParsingContext=xs.Chrono=void 0;var Os=Le(),wk=Tc(),Ds=class{constructor(e){e=e||wk.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Ds({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new To(e,t,n),i=[];return this.parsers.forEach(a=>{let o=Ds.executeParser(s,a);i=i.concat(o)}),i.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){i=a.refine(s,i)}),i}static executeParser(e,t){let n=[],s=t.pattern(e),i=e.text,a=e.text,o=s.exec(a);for(;o;){let u=o.index+i.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=i.substring(o.index+1),o=s.exec(a);continue}let c=null;l instanceof Os.ParsingResult?c=l:l instanceof Os.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=i.substring(u+c.text.length),o=s.exec(a)}return n}};xs.Chrono=Ds;var To=class{constructor(e,t,n){this.text=e,this.reference=new Os.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Os.ParsingComponents?e:new Os.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let i=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=s?this.createParsingComponents(s):null;return new Os.ParsingResult(this.reference,e,i,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};xs.ParsingContext=To});var jn=b(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var Lh=ut(),Ek=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),bo=1,Uh=5,qh=2,Wh=3,bc=4,_c=class{constructor(e){this.groupNumberMonth=e?Wh:qh,this.groupNumberDay=e?qh:Wh}pattern(){return Ek}extract(e,t){if(t[bo]=="/"||t[Uh]=="/"){t.index+=t[0].length;return}let n=t.index+t[bo].length,s=t[0].substr(t[bo].length,t[0].length-t[bo].length-t[Uh].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[bc]&&t[0].indexOf("/")<0)return;let i=e.createParsingResult(n,s),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(i.start.assign("day",o),i.start.assign("month",a),t[bc]){let u=parseInt(t[bc]),l=Lh.findMostLikelyADYear(u);i.start.assign("year",l)}else{let u=Lh.findYearClosestToRef(e.refDate,o,a);i.start.imply("year",u)}return i}};vc.default=_c});var Gh=b(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Yh=lt(),kk=Le(),Sk=Y(),Ok=Qt(),Dk=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Yh.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),wc=class extends Sk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Dk}innerExtract(e,t){let n=t[1].toLowerCase(),s=Yh.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=Ok.reverseTimeUnits(s);break}return kk.ParsingComponents.createRelativeFromReference(e.reference,s)}};Ec.default=wc});var $h=b(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var xk=ws(),kc=Le(),Rk=lt(),Mk=Qt();function jh(r){return r.text.match(/\s+(before|from)$/i)!=null}function Ck(r){return r.text.match(/\s+(after|since)$/i)!=null}var Sc=class extends xk.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!jh(t)&&!Ck(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=Rk.parseTimeUnits(t.text);jh(t)&&(s=Mk.reverseTimeUnits(s));let i=kc.ParsingComponents.createRelativeFromReference(new kc.ReferenceWithTimezone(n.start.date()),s);return new kc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,i)}};Oc.default=Sc});var Tc=b(Ge=>{"use strict";var Xe=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createConfiguration=Ge.createCasualConfiguration=Ge.parseDate=Ge.parse=Ge.GB=Ge.strict=Ge.casual=void 0;var Ak=Xe(jm()),Pk=Xe(Km()),Nk=Xe(eh()),Ik=Xe(nh()),Fk=Xe(ah()),Lk=Xe(oh()),Uk=Xe(lh()),qk=Xe(ch()),Wk=Xe(dh()),Yk=Xe(fh()),Gk=Xe(hh()),jk=Ur(),$k=Xe(xh()),Bk=Xe(Rh()),Hk=Xe(Ph()),zk=Xe(Fh()),Dc=dr(),Vk=Xe(jn()),Kk=Xe(Gh()),Qk=Xe($h());Ge.casual=new Dc.Chrono(Bh(!1));Ge.strict=new Dc.Chrono(_o(!0,!1));Ge.GB=new Dc.Chrono(_o(!1,!0));function Xk(r,e,t){return Ge.casual.parse(r,e,t)}Ge.parse=Xk;function Zk(r,e,t){return Ge.casual.parseDate(r,e,t)}Ge.parseDate=Zk;function Bh(r=!1){let e=_o(!1,r);return e.parsers.unshift(new $k.default),e.parsers.unshift(new Bk.default),e.parsers.unshift(new Ik.default),e.parsers.unshift(new zk.default),e.parsers.unshift(new Kk.default),e}Ge.createCasualConfiguration=Bh;function _o(r=!0,e=!1){return jk.includeCommonConfiguration({parsers:[new Vk.default(e),new Ak.default,new Pk.default,new Nk.default,new Hk.default,new Fk.default,new Lk.default,new Uk.default(r),new qk.default(r),new Wk.default(r)],refiners:[new Qk.default,new Gk.default,new Yk.default]},r)}Ge.createConfiguration=_o});var Hh=b(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var Jk=Wn(),xc=class extends Jk.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Rc.default=xc});var Ci=b(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.parseTimeUnits=xe.TIME_UNITS_PATTERN=xe.parseYear=xe.YEAR_PATTERN=xe.parseNumberPattern=xe.NUMBER_PATTERN=xe.TIME_UNIT_DICTIONARY=xe.INTEGER_WORD_DICTIONARY=xe.MONTH_DICTIONARY=xe.WEEKDAY_DICTIONARY=void 0;var Mc=Se(),e1=ut();xe.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};xe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};xe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};xe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};xe.NUMBER_PATTERN=`(?:${Mc.matchAnyPattern(xe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Vh(r){let e=r.toLowerCase();return xe.INTEGER_WORD_DICTIONARY[e]!==void 0?xe.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}xe.parseNumberPattern=Vh;xe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function t1(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return e1.findMostLikelyADYear(e)}xe.parseYear=t1;var Kh=`(${xe.NUMBER_PATTERN})\\s{0,5}(${Mc.matchAnyPattern(xe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,zh=new RegExp(Kh,"i");xe.TIME_UNITS_PATTERN=Mc.repeatedTimeunitPattern("",Kh);function r1(r){let e={},t=r,n=zh.exec(t);for(;n;)n1(e,n),t=t.substring(n[0].length),n=zh.exec(t);return e}xe.parseTimeUnits=r1;function n1(r,e){let t=Vh(e[1]),n=xe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Xh=b(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Qh=Ci(),s1=Se(),i1=Y(),a1=Gn(),o1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${s1.matchAnyPattern(Qh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),u1=1,l1=3,c1=2,Cc=class extends i1.AbstractParserWithWordBoundaryChecking{innerPattern(){return o1}innerExtract(e,t){let n=t[c1].toLowerCase(),s=Qh.WEEKDAY_DICTIONARY[n],i=t[u1],a=t[l1],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=a1.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Ac.default=Cc});var tg=b(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var hn=ze(),d1=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),f1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),p1=2,Zh=3,Jh=4,eg=5,Rs=class{pattern(e){return d1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Rs.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),i=f1.exec(s);return i&&(n.end=Rs.extractTimeComponent(n.start.clone(),i),n.end&&(n.text+=i[0])),n}static extractTimeComponent(e,t){let n=0,s=0,i=null;if(n=parseInt(t[p1]),t[Zh]!=null&&(s=parseInt(t[Zh])),s>=60||n>24)return null;if(n>=12&&(i=hn.Meridiem.PM),t[eg]!=null){if(n>12)return null;let a=t[eg].toLowerCase();a.match(/morgen|vormittag/)&&(i=hn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(i=hn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(i=hn.Meridiem.AM,n=0):n<6?i=hn.Meridiem.AM:(i=hn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),i!==null?e.assign("meridiem",i):n<12?e.imply("meridiem",hn.Meridiem.AM):e.imply("meridiem",hn.Meridiem.PM),t[Jh]!=null){let a=parseInt(t[Jh]);if(a>=60)return null;e.assign("second",a)}return e}};Pc.default=Rs});var rg=b(Ai=>{"use strict";var m1=Ai&&Ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ai,"__esModule",{value:!0});var h1=m1(kr()),Nc=class extends h1.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Ai.default=Nc});var ng=b(Pi=>{"use strict";var g1=Pi&&Pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pi,"__esModule",{value:!0});var y1=g1(Lr()),Ic=class extends y1.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Pi.default=Ic});var Fc=b(Ii=>{"use strict";var T1=Ii&&Ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ii,"__esModule",{value:!0});var b1=T1(Te()),$n=ze(),_1=Y(),v1=Kt(),w1=Qt(),Ni=class extends _1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=b1.default(e.refDate),s=t[2].toLowerCase(),i=e.createParsingComponents();return v1.implySimilarTime(i,n),Ni.extractTimeComponents(i,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=w1.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break}return e}};Ii.default=Ni});var ag=b(fr=>{"use strict";var E1=fr&&fr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),k1=fr&&fr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),S1=fr&&fr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&E1(e,r,t);return k1(e,r),e},ig=fr&&fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fr,"__esModule",{value:!0});var O1=ig(Te()),D1=Y(),Bn=Kt(),x1=ig(Fc()),sg=S1(Wr()),R1=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),M1=1,C1=2,Lc=class extends D1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return R1}innerExtract(e,t){let n=O1.default(e.refDate),s=(t[M1]||"").toLowerCase(),i=(t[C1]||"").toLowerCase(),a=e.createParsingComponents();switch(s){case"jetzt":a=sg.now(e.reference);break;case"heute":a=sg.today(e.reference);break;case"morgen":Bn.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Bn.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Bn.assignSimilarDate(a,n),Bn.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Bn.assignSimilarDate(a,n),Bn.implySimilarTime(a,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Bn.assignSimilarDate(a,n),a.imply("hour",0));break}return i&&(a=x1.default.extractTimeComponents(a,i)),a}};fr.default=Lc});var fg=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var A1=ut(),cg=Ci(),dg=Ci(),P1=Se(),N1=Y(),I1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${P1.matchAnyPattern(cg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${dg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),og=1,ug=2,F1=3,lg=4,Uc=class extends N1.AbstractParserWithWordBoundaryChecking{innerPattern(){return I1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=cg.MONTH_DICTIONARY[t[F1].toLowerCase()],i=parseInt(t[og]);if(i>31)return t.index=t.index+t[og].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[lg]){let a=dg.parseYear(t[lg]);n.start.assign("year",a)}else{let a=A1.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[ug]){let a=parseInt(t[ug]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};qc.default=Uc});var pg=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var vo=Ci(),L1=Le(),U1=Y(),q1=Qt(),W1=Se(),Wc=class extends U1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${vo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${W1.matchAnyPattern(vo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?vo.parseNumberPattern(t[2]):1,s=vo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],i={};i[s]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(i=q1.reverseTimeUnits(i)),L1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Yc.default=Wc});var gg=b(Ze=>{"use strict";var pr=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var Y1=Ur(),mg=dr(),G1=pr(jn()),j1=pr(lc()),$1=pr(Hh()),B1=pr(Xh()),H1=pr(tg()),z1=pr(rg()),V1=pr(ng()),K1=pr(ag()),Q1=pr(Fc()),X1=pr(fg()),Z1=pr(pg());Ze.casual=new mg.Chrono(hg());Ze.strict=new mg.Chrono(Gc(!0));function J1(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=J1;function eS(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=eS;function hg(r=!0){let e=Gc(!1,r);return e.parsers.unshift(new Q1.default),e.parsers.unshift(new K1.default),e.parsers.unshift(new Z1.default),e}Ze.createCasualConfiguration=hg;function Gc(r=!0,e=!0){return Y1.includeCommonConfiguration({parsers:[new j1.default,new G1.default(e),new $1.default,new H1.default,new X1.default,new B1.default],refiners:[new z1.default,new V1.default]},r)}Ze.createConfiguration=Gc});var Tg=b(mr=>{"use strict";var tS=mr&&mr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),rS=mr&&mr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),nS=mr&&mr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&tS(e,r,t);return rS(e,r),e},sS=mr&&mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mr,"__esModule",{value:!0});var iS=sS(Te()),aS=ze(),oS=Y(),yg=Kt(),wo=nS(Wr()),jc=class extends oS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=iS.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();switch(s){case"maintenant":return wo.now(e.reference);case"aujourd'hui":return wo.today(e.reference);case"hier":return wo.yesterday(e.reference);case"demain":return wo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(yg.assignSimilarDate(i,n),i.imply("hour",22),i.imply("meridiem",aS.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),yg.assignSimilarDate(i,n),i.imply("hour",0))}return i}};mr.default=jc});var bg=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var Fi=ze(),uS=Y(),$c=class extends uS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",Fi.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",Fi.Meridiem.AM);break}return s}};Bc.default=$c});var _g=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var lS=Wn(),Hc=class extends lS.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};zc.default=Hc});var vg=b(Li=>{"use strict";var cS=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});var dS=cS(Lr()),Vc=class extends dS.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Li.default=Vc});var wg=b(Ui=>{"use strict";var fS=Ui&&Ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ui,"__esModule",{value:!0});var pS=fS(kr()),Kc=class extends pS.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ui.default=Kc});var gn=b(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.parseTimeUnits=be.TIME_UNITS_PATTERN=be.parseYear=be.YEAR_PATTERN=be.parseOrdinalNumberPattern=be.ORDINAL_NUMBER_PATTERN=be.parseNumberPattern=be.NUMBER_PATTERN=be.TIME_UNIT_DICTIONARY=be.INTEGER_WORD_DICTIONARY=be.MONTH_DICTIONARY=be.WEEKDAY_DICTIONARY=void 0;var Qc=Se();be.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};be.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};be.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};be.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};be.NUMBER_PATTERN=`(?:${Qc.matchAnyPattern(be.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function kg(r){let e=r.toLowerCase();return be.INTEGER_WORD_DICTIONARY[e]!==void 0?be.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}be.parseNumberPattern=kg;be.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function mS(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}be.parseOrdinalNumberPattern=mS;be.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function hS(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}be.parseYear=hS;var Sg=`(${be.NUMBER_PATTERN})\\s{0,5}(${Qc.matchAnyPattern(be.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Eg=new RegExp(Sg,"i");be.TIME_UNITS_PATTERN=Qc.repeatedTimeunitPattern("",Sg);function gS(r){let e={},t=r,n=Eg.exec(t);for(;n;)yS(e,n),t=t.substring(n[0].length),n=Eg.exec(t);return e}be.parseTimeUnits=gS;function yS(r,e){let t=kg(e[1]),n=be.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Dg=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var Og=gn(),TS=Se(),bS=Y(),_S=Gn(),vS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${TS.matchAnyPattern(Og.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),wS=1,ES=2,Xc=class extends bS.AbstractParserWithWordBoundaryChecking{innerPattern(){return vS}innerExtract(e,t){let n=t[wS].toLowerCase(),s=Og.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let i=t[ES];i=i||"",i=i.toLowerCase();let a=null;i=="dernier"?a="last":i=="prochain"&&(a="next");let o=_S.toDayJSWeekday(e.refDate,s,a);return e.createParsingComponents().assign("weekday",s).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Zc.default=Xc});var Cg=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var qi=ze(),kS=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),SS=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),OS=2,xg=3,Rg=4,Mg=5,Ms=class{pattern(e){return kS}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Ms.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),i=SS.exec(s);return i&&(n.end=Ms.extractTimeComponent(n.start.clone(),i),n.end&&(n.text+=i[0])),n}static extractTimeComponent(e,t){let n=0,s=0,i=null;if(n=parseInt(t[OS]),t[xg]!=null&&(s=parseInt(t[xg])),s>=60||n>24)return null;if(n>=12&&(i=qi.Meridiem.PM),t[Mg]!=null){if(n>12)return null;let a=t[Mg][0].toLowerCase();a=="a"&&(i=qi.Meridiem.AM,n==12&&(n=0)),a=="p"&&(i=qi.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),i!==null?e.assign("meridiem",i):n<12?e.imply("meridiem",qi.Meridiem.AM):e.imply("meridiem",qi.Meridiem.PM),t[Rg]!=null){let a=parseInt(t[Rg]);if(a>=60)return null;e.assign("second",a)}return e}};Jc.default=Ms});var Lg=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var DS=ut(),Ig=gn(),Fg=gn(),Eo=gn(),xS=Se(),RS=Y(),MS=new RegExp(`(?:on\\s*?)?(${Eo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Eo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${xS.matchAnyPattern(Ig.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Fg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ag=1,Pg=2,CS=3,Ng=4,ed=class extends RS.AbstractParserWithWordBoundaryChecking{innerPattern(){return MS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ig.MONTH_DICTIONARY[t[CS].toLowerCase()],i=Eo.parseOrdinalNumberPattern(t[Ag]);if(i>31)return t.index=t.index+t[Ag].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[Ng]){let a=Fg.parseYear(t[Ng]);n.start.assign("year",a)}else{let a=DS.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[Pg]){let a=Eo.parseOrdinalNumberPattern(t[Pg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};td.default=ed});var qg=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var Ug=gn(),AS=Le(),PS=Y(),NS=Qt(),rd=class extends PS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Ug.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Ug.parseTimeUnits(t[1]),s=NS.reverseTimeUnits(n);return AS.ParsingComponents.createRelativeFromReference(e.reference,s)}};nd.default=rd});var Yg=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var Wg=gn(),IS=Le(),FS=Y(),sd=class extends FS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Wg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Wg.parseTimeUnits(t[1]);return IS.ParsingComponents.createRelativeFromReference(e.reference,n)}};id.default=sd});var Gg=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var ko=gn(),LS=Le(),US=Y(),qS=Qt(),WS=Se(),ad=class extends US.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${ko.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${WS.matchAnyPattern(ko.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?ko.parseNumberPattern(t[1]):1,s=ko.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],i={};i[s]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(i=qS.reverseTimeUnits(i)),LS.ParsingComponents.createRelativeFromReference(e.reference,i)}};od.default=ad});var Bg=b(Je=>{"use strict";var Xt=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var YS=Ur(),jg=dr(),GS=Xt(Tg()),jS=Xt(bg()),$S=Xt(jn()),BS=Xt(_g()),HS=Xt(vg()),zS=Xt(wg()),VS=Xt(Dg()),KS=Xt(Cg()),QS=Xt(Lg()),XS=Xt(qg()),ZS=Xt(Yg()),JS=Xt(Gg());Je.casual=new jg.Chrono($g());Je.strict=new jg.Chrono(ud(!0));function eO(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=eO;function tO(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=tO;function $g(r=!0){let e=ud(!1,r);return e.parsers.unshift(new GS.default),e.parsers.unshift(new jS.default),e.parsers.unshift(new JS.default),e}Je.createCasualConfiguration=$g;function ud(r=!0,e=!0){return YS.includeCommonConfiguration({parsers:[new $S.default(e),new QS.default,new BS.default,new KS.default,new XS.default,new ZS.default,new VS.default],refiners:[new HS.default,new zS.default]},r)}Je.createConfiguration=ud});var Hg=b(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.toHankaku=void 0;function rO(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,nO)}So.toHankaku=rO;function nO(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Vg=b(Wi=>{"use strict";var sO=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var ld=Hg(),iO=ut(),aO=sO(Te()),oO=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,zg=1,uO=2,cd=3,lO=4,cO=5,dO=6,dd=class{pattern(){return oO}extract(e,t){let n=parseInt(ld.toHankaku(t[cO])),s=parseInt(ld.toHankaku(t[dO])),i=e.createParsingComponents({day:s,month:n});if(t[zg]&&t[zg].match("\u540C|\u4ECA|\u672C")){let a=aO.default(e.refDate);i.assign("year",a.year())}if(t[uO]){let a=t[lO],o=a=="\u5143"?1:parseInt(ld.toHankaku(a));t[cd]=="\u4EE4\u548C"?o+=2018:t[cd]=="\u5E73\u6210"?o+=1988:t[cd]=="\u662D\u548C"&&(o+=1925),i.assign("year",o)}else{let a=iO.findYearClosestToRef(e.refDate,s,n);i.imply("year",a)}return i}};Wi.default=dd});var Kg=b(Yi=>{"use strict";var fO=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var pO=fO(kr()),fd=class extends pO.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Yi.default=fd});var Xg=b(hr=>{"use strict";var mO=hr&&hr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),hO=hr&&hr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gO=hr&&hr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&mO(e,r,t);return hO(e,r),e},yO=hr&&hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hr,"__esModule",{value:!0});var TO=yO(Te()),Qg=ze(),pd=gO(Wr()),bO=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,md=class{pattern(){return bO}extract(e,t){let n=t[0],s=TO.default(e.refDate),i=e.createParsingComponents();switch(n){case"\u6628\u65E5":return pd.yesterday(e.reference);case"\u660E\u65E5":return pd.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return pd.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(i.imply("hour",22),i.assign("meridiem",Qg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(i.imply("hour",6),i.assign("meridiem",Qg.Meridiem.AM)),i.assign("day",s.date()),i.assign("month",s.month()+1),i.assign("year",s.year()),i}};hr.default=md});var ey=b(et=>{"use strict";var hd=et&&et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(et,"__esModule",{value:!0});et.createConfiguration=et.createCasualConfiguration=et.parseDate=et.parse=et.strict=et.casual=void 0;var _O=hd(Vg()),vO=hd(Kg()),wO=hd(Xg()),Zg=dr();et.casual=new Zg.Chrono(Jg());et.strict=new Zg.Chrono(gd());function EO(r,e,t){return et.casual.parse(r,e,t)}et.parse=EO;function kO(r,e,t){return et.casual.parseDate(r,e,t)}et.parseDate=kO;function Jg(){let r=gd();return r.parsers.unshift(new wO.default),r}et.createCasualConfiguration=Jg;function gd(){return{parsers:[new _O.default],refiners:[new vO.default]}}et.createConfiguration=gd});var Oo=b(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.parseYear=Or.YEAR_PATTERN=Or.MONTH_DICTIONARY=Or.WEEKDAY_DICTIONARY=void 0;Or.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};Or.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};Or.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function SO(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Or.parseYear=SO});var ry=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});var ty=Oo(),OO=Se(),DO=Y(),xO=Gn(),RO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${OO.matchAnyPattern(ty.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),MO=1,CO=2,AO=3,yd=class extends DO.AbstractParserWithWordBoundaryChecking{innerPattern(){return RO}innerExtract(e,t){let n=t[CO].toLowerCase(),s=ty.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let i=t[MO],a=t[AO],o=i||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=xO.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Td.default=yd});var ny=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var PO=Wn(),bd=class extends PO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};_d.default=bd});var sy=b(Gi=>{"use strict";var NO=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var IO=NO(Lr()),vd=class extends IO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Gi.default=vd});var iy=b(ji=>{"use strict";var FO=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var LO=FO(kr()),wd=class extends LO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ji.default=wd});var dy=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var UO=ut(),ly=Oo(),cy=Oo(),qO=Se(),WO=Y(),YO=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${qO.matchAnyPattern(ly.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${cy.YEAR_PATTERN}))?(?=\\W|$)`,"i"),ay=1,oy=2,GO=3,uy=4,Ed=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(){return YO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=ly.MONTH_DICTIONARY[t[GO].toLowerCase()],i=parseInt(t[ay]);if(i>31)return t.index=t.index+t[ay].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[uy]){let a=cy.parseYear(t[uy]);n.start.assign("year",a)}else{let a=UO.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[oy]){let a=parseInt(t[oy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};kd.default=Ed});var fy=b(Yr=>{"use strict";var jO=Yr&&Yr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),$O=Yr&&Yr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),BO=Yr&&Yr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&jO(e,r,t);return $O(e,r),e};Object.defineProperty(Yr,"__esModule",{value:!0});var HO=Y(),Do=BO(Wr()),Sd=class extends HO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return Do.now(e.reference);case"hoje":return Do.today(e.reference);case"amanha":case"amanh\xE3":return Do.tomorrow(e.reference);case"ontem":return Do.yesterday(e.reference)}return s}};Yr.default=Sd});var py=b($i=>{"use strict";var zO=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});var xo=ze(),VO=Y(),KO=Kt(),QO=zO(Te()),Od=class extends VO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=QO.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",xo.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",xo.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",xo.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":KO.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",xo.Meridiem.AM),s.imply("hour",12);break}return s}};$i.default=Od});var gy=b(tt=>{"use strict";var yn=tt&&tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tt,"__esModule",{value:!0});tt.createConfiguration=tt.createCasualConfiguration=tt.parseDate=tt.parse=tt.strict=tt.casual=void 0;var XO=Ur(),my=dr(),ZO=yn(jn()),JO=yn(ry()),eD=yn(ny()),tD=yn(sy()),rD=yn(iy()),nD=yn(dy()),sD=yn(fy()),iD=yn(py());tt.casual=new my.Chrono(hy());tt.strict=new my.Chrono(Dd(!0));function aD(r,e,t){return tt.casual.parse(r,e,t)}tt.parse=aD;function oD(r,e,t){return tt.casual.parseDate(r,e,t)}tt.parseDate=oD;function hy(r=!0){let e=Dd(!1,r);return e.parsers.push(new sD.default),e.parsers.push(new iD.default),e}tt.createCasualConfiguration=hy;function Dd(r=!0,e=!0){return XO.includeCommonConfiguration({parsers:[new ZO.default(e),new JO.default,new eD.default,new nD.default],refiners:[new tD.default,new rD.default]},r)}tt.createConfiguration=Dd});var yy=b(Bi=>{"use strict";var uD=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var lD=uD(kr()),xd=class extends lD.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Bi.default=xd});var Ty=b(Hi=>{"use strict";var cD=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var dD=cD(Lr()),Rd=class extends dD.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Hi.default=Rd});var by=b(Gr=>{"use strict";var fD=Gr&&Gr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),pD=Gr&&Gr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mD=Gr&&Gr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&fD(e,r,t);return pD(e,r),e};Object.defineProperty(Gr,"__esModule",{value:!0});var hD=Y(),Ro=mD(Wr()),Md=class extends hD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return Ro.now(e.reference);case"vandaag":return Ro.today(e.reference);case"morgen":case"morgend":return Ro.tomorrow(e.reference);case"gisteren":return Ro.yesterday(e.reference)}return s}};Gr.default=Md});var _y=b(zi=>{"use strict";var gD=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var Mo=ze(),yD=Y(),TD=gD(Te()),bD=Kt(),_D=1,vD=2,Cd=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=TD.default(e.refDate),s=e.createParsingComponents();switch(t[_D]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[vD].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",Mo.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",Mo.Meridiem.PM),s.imply("hour",20);break;case"middernacht":bD.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",Mo.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",Mo.Meridiem.AM),s.imply("hour",12);break}return s}};zi.default=Cd});var Lt=b(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.parseTimeUnits=de.TIME_UNITS_PATTERN=de.parseYear=de.YEAR_PATTERN=de.parseOrdinalNumberPattern=de.ORDINAL_NUMBER_PATTERN=de.parseNumberPattern=de.NUMBER_PATTERN=de.TIME_UNIT_DICTIONARY=de.ORDINAL_WORD_DICTIONARY=de.INTEGER_WORD_DICTIONARY=de.MONTH_DICTIONARY=de.WEEKDAY_DICTIONARY=void 0;var Co=Se(),wD=ut();de.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};de.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};de.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};de.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};de.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};de.NUMBER_PATTERN=`(?:${Co.matchAnyPattern(de.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function wy(r){let e=r.toLowerCase();return de.INTEGER_WORD_DICTIONARY[e]!==void 0?de.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}de.parseNumberPattern=wy;de.ORDINAL_NUMBER_PATTERN=`(?:${Co.matchAnyPattern(de.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function ED(r){let e=r.toLowerCase();return de.ORDINAL_WORD_DICTIONARY[e]!==void 0?de.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}de.parseOrdinalNumberPattern=ED;de.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function kD(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return wD.findMostLikelyADYear(e)}de.parseYear=kD;var Ey=`(${de.NUMBER_PATTERN})\\s{0,5}(${Co.matchAnyPattern(de.TIME_UNIT_DICTIONARY)})\\s{0,5}`,vy=new RegExp(Ey,"i");de.TIME_UNITS_PATTERN=Co.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Ey);function SD(r){let e={},t=r,n=vy.exec(t);for(;n;)OD(e,n),t=t.substring(n[0].length),n=vy.exec(t);return e}de.parseTimeUnits=SD;function OD(r,e){let t=wy(e[1]),n=de.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Sy=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});var ky=Lt(),DD=Le(),xD=Y(),Ad=class extends xD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+ky.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=ky.parseTimeUnits(t[1]);return DD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Pd.default=Ad});var Dy=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var Oy=Lt(),RD=Se(),MD=Y(),CD=Gn(),AD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${RD.matchAnyPattern(Oy.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),PD=1,ND=2,ID=3,Nd=class extends MD.AbstractParserWithWordBoundaryChecking{innerPattern(){return AD}innerExtract(e,t){let n=t[ND].toLowerCase(),s=Oy.WEEKDAY_DICTIONARY[n],i=t[PD],a=t[ID],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=CD.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Id.default=Nd});var Py=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var FD=ut(),Cy=Lt(),Ao=Lt(),Ay=Lt(),LD=Se(),UD=Y(),qD=new RegExp(`(?:on\\s*?)?(${Ao.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Ao.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+LD.matchAnyPattern(Cy.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Ay.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),WD=3,xy=1,Ry=2,My=4,Fd=class extends UD.AbstractParserWithWordBoundaryChecking{innerPattern(){return qD}innerExtract(e,t){let n=Cy.MONTH_DICTIONARY[t[WD].toLowerCase()],s=Ao.parseOrdinalNumberPattern(t[xy]);if(s>31)return t.index=t.index+t[xy].length,null;let i=e.createParsingComponents({day:s,month:n});if(t[My]){let u=Ay.parseYear(t[My]);i.assign("year",u)}else{let u=FD.findYearClosestToRef(e.refDate,s,n);i.imply("year",u)}if(!t[Ry])return i;let a=Ao.parseOrdinalNumberPattern(t[Ry]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",a),o}};Ld.default=Fd});var Ly=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Iy=Lt(),YD=ut(),GD=Se(),Fy=Lt(),jD=Y(),$D=new RegExp(`(${GD.matchAnyPattern(Iy.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Fy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),BD=1,Ny=2,Ud=class extends jD.AbstractParserWithWordBoundaryChecking{innerPattern(){return $D}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[BD],i=Iy.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",i),t[Ny]){let a=Fy.parseYear(t[Ny]);n.assign("year",a)}else{let a=YD.findYearClosestToRef(e.refDate,1,i);n.imply("year",a)}return n}};qd.default=Ud});var Uy=b(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});var HD=Y(),zD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),VD=1,KD=2,Wd=class extends HD.AbstractParserWithWordBoundaryChecking{innerPattern(){return zD}innerExtract(e,t){let n=parseInt(t[KD]),s=parseInt(t[VD]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Yd.default=Wd});var qy=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var QD=Wn(),Gd=class extends QD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};jd.default=Gd});var Gy=b(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var Yy=Lt(),XD=Se(),ZD=Y(),JD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${XD.matchAnyPattern(Yy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),e0=1,t0=2,Wy=3,r0=4,$d=class extends ZD.AbstractParserWithWordBoundaryChecking{innerPattern(){return JD}innerExtract(e,t){let n=t[Wy]?parseInt(t[Wy]):Yy.MONTH_DICTIONARY[t[t0].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[e0]);return{day:parseInt(t[r0]),month:n,year:s}}};Bd.default=$d});var jy=b(Vi=>{"use strict";var n0=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var s0=Y(),Po=ze(),Hd=Kt(),i0=n0(Te()),a0=1,o0=2,zd=class extends s0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[a0].toLowerCase(),s=t[o0].toLowerCase(),i=e.createParsingComponents(),a=i0.default(e.refDate);switch(n){case"gisteren":Hd.assignSimilarDate(i,a.add(-1,"day"));break;case"van":Hd.assignSimilarDate(i,a);break;case"morgen":Hd.assignTheNextDay(i,a);break}switch(s){case"ochtend":i.imply("meridiem",Po.Meridiem.AM),i.imply("hour",6);break;case"middag":i.imply("meridiem",Po.Meridiem.AM),i.imply("hour",12);break;case"namiddag":i.imply("meridiem",Po.Meridiem.PM),i.imply("hour",15);break;case"avond":i.imply("meridiem",Po.Meridiem.PM),i.imply("hour",20);break}return i}};Vi.default=zd});var By=b(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var $y=Lt(),u0=Le(),l0=Y(),c0=Qt(),d0=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${$y.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Vd=class extends l0.AbstractParserWithWordBoundaryChecking{innerPattern(){return d0}innerExtract(e,t){let n=t[1].toLowerCase(),s=$y.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=c0.reverseTimeUnits(s);break}return u0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Kd.default=Vd});var Vy=b(Ki=>{"use strict";var f0=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var zy=Lt(),Hy=Le(),p0=f0(Te()),m0=Y(),h0=Se(),g0=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${h0.matchAnyPattern(zy.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),y0=1,T0=2,Qd=class extends m0.AbstractParserWithWordBoundaryChecking{innerPattern(){return g0}innerExtract(e,t){let n=t[y0].toLowerCase(),s=t[T0].toLowerCase(),i=zy.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[i]=1,Hy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[i]=-1,Hy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=p0.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Ki.default=Qd});var Ky=b(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var Zd=Lt(),b0=Le(),_0=Y(),v0=Qt(),w0=new RegExp("("+Zd.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),E0=new RegExp("("+Zd.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Xd=class extends _0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?E0:w0}innerExtract(e,t){let n=Zd.parseTimeUnits(t[1]),s=v0.reverseTimeUnits(n);return b0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Jd.default=Xd});var Qy=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var tf=Lt(),k0=Le(),S0=Y(),O0=new RegExp("("+tf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),D0=new RegExp("("+tf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),x0=1,ef=class extends S0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?D0:O0}innerExtract(e,t){let n=tf.parseTimeUnits(t[x0]);return k0.ParsingComponents.createRelativeFromReference(e.reference,n)}};rf.default=ef});var eT=b(rt=>{"use strict";var ct=rt&&rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rt,"__esModule",{value:!0});rt.createConfiguration=rt.createCasualConfiguration=rt.parseDate=rt.parse=rt.strict=rt.casual=void 0;var R0=Ur(),Xy=dr(),M0=ct(yy()),C0=ct(Ty()),A0=ct(by()),P0=ct(_y()),N0=ct(jn()),I0=ct(Sy()),F0=ct(Dy()),L0=ct(Py()),Zy=ct(Ly()),U0=ct(Uy()),q0=ct(qy()),W0=ct(Gy()),Y0=ct(jy()),G0=ct(By()),j0=ct(Vy()),$0=ct(Ky()),B0=ct(Qy());rt.casual=new Xy.Chrono(Jy());rt.strict=new Xy.Chrono(nf(!0));function H0(r,e,t){return rt.casual.parse(r,e,t)}rt.parse=H0;function z0(r,e,t){return rt.casual.parseDate(r,e,t)}rt.parseDate=z0;function Jy(r=!0){let e=nf(!1,r);return e.parsers.unshift(new A0.default),e.parsers.unshift(new P0.default),e.parsers.unshift(new Y0.default),e.parsers.unshift(new Zy.default),e.parsers.unshift(new j0.default),e.parsers.unshift(new G0.default),e}rt.createCasualConfiguration=Jy;function nf(r=!0,e=!0){return R0.includeCommonConfiguration({parsers:[new N0.default(e),new I0.default,new L0.default,new Zy.default,new F0.default,new W0.default,new U0.default,new q0.default(r),new $0.default(r),new B0.default(r)],refiners:[new C0.default,new M0.default]},r)}rt.createConfiguration=nf});var sT=b(Qi=>{"use strict";var V0=Qi&&Qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qi,"__esModule",{value:!0});var K0=V0(Te()),Q0=Y(),X0=1,tT=2,Z0=3,rT=4,nT=5,J0=6,sf=class extends Q0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),i=K0.default(e.refDate),a=i;if(t[X0])s.start.imply("hour",i.hour()),s.start.imply("minute",i.minute()),s.start.imply("second",i.second()),s.start.imply("millisecond",i.millisecond());else if(t[tT]){let o=t[tT],u=t[Z0];o=="\u660E"||o=="\u807D"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?s.start.imply("hour",6):u=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[rT]){let u=t[rT][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?s.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):u=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):u=="\u51CC"&&s.start.imply("hour",0)}else if(t[nT]){let o=t[nT];o=="\u660E"||o=="\u807D"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[J0];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?s.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):l=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):l=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year()),s}};Qi.default=sf});var Cs=b(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.zhStringToYear=At.zhStringToNumber=At.WEEKDAY_OFFSET=At.NUMBER=void 0;At.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};At.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function ex(r){let e=0;for(let t=0;t{"use strict";var rx=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var nx=rx(Te()),sx=Y(),Hn=Cs(),af=1,iT=2,of=3,uf=class extends sx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Hn.NUMBER).join("")+"]{4}|["+Object.keys(Hn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Hn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Hn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=nx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=parseInt(t[iT]);if(isNaN(i)&&(i=Hn.zhStringToNumber(t[iT])),s.start.assign("month",i),t[of]){let a=parseInt(t[of]);isNaN(a)&&(a=Hn.zhStringToNumber(t[of])),s.start.assign("day",a)}else s.start.imply("day",n.date());if(t[af]){let a=parseInt(t[af]);isNaN(a)&&(a=Hn.zhStringToYear(t[af])),s.start.assign("year",a)}else s.start.imply("year",n.year());return s}};Xi.default=uf});var uT=b(Zi=>{"use strict";var ix=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var ax=ix(Te()),ox=Y(),oT=Cs(),ux=new RegExp("(\\d+|["+Object.keys(oT.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),lf=1,lx=2,cf=class extends ox.AbstractParserWithWordBoundaryChecking{innerPattern(){return ux}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[lf]);if(isNaN(s)&&(s=oT.zhStringToNumber(t[lf])),isNaN(s)){let u=t[lf];if(u==="\u5E7E")s=3;else if(u==="\u534A")s=.5;else return null}let i=ax.default(e.refDate),o=t[lx][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(s,"d"):o=="\u661F"||o=="\u79AE"?i=i.add(s*7,"d"):o=="\u6708"?i=i.add(s,"month"):o=="\u5E74"&&(i=i.add(s,"year")),n.start.assign("year",i.year()),n.start.assign("month",i.month()+1),n.start.assign("day",i.date()),n):(o=="\u79D2"?i=i.add(s,"second"):o=="\u5206"?i=i.add(s,"minute"):(o=="\u5C0F"||o=="\u9418")&&(i=i.add(s,"hour")),n.start.imply("year",i.year()),n.start.imply("month",i.month()+1),n.start.imply("day",i.date()),n.start.assign("hour",i.hour()),n.start.assign("minute",i.minute()),n.start.assign("second",i.second()),n)}};Zi.default=cf});var cT=b(Ji=>{"use strict";var cx=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var dx=cx(Te()),fx=Y(),lT=Cs(),px=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(lT.WEEKDAY_OFFSET).join("|")+")"),df=class extends fx.AbstractParserWithWordBoundaryChecking{innerPattern(){return px}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=lT.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=dx.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(i-7),l=!0):a=="next"?(u=u.day(i+7),l=!0):a=="this"?u=u.day(i):Math.abs(i-7-c){"use strict";var mx=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var hx=mx(Te()),gx=Y(),Jt=Cs(),yx=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Tx=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),No=1,Io=2,Fo=3,Lo=4,Uo=5,qo=6,Zt=7,As=8,Wo=9,ff=class extends gx.AbstractParserWithWordBoundaryChecking{innerPattern(){return yx}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=hx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=n.clone();if(t[No]){var a=t[No];a=="\u660E"||a=="\u807D"?n.hour()>1&&i.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?i.add(-1,"day"):a=="\u524D"?i.add(-2,"day"):a=="\u5927\u524D"?i.add(-3,"day"):a=="\u5F8C"?i.add(2,"day"):a=="\u5927\u5F8C"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else if(t[Lo]){var o=t[Lo];o=="\u660E"||o=="\u807D"?i.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?i.add(-1,"day"):o=="\u524D"?i.add(-2,"day"):o=="\u5927\u524D"?i.add(-3,"day"):o=="\u5F8C"?i.add(2,"day"):o=="\u5927\u5F8C"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else s.start.imply("day",i.date()),s.start.imply("month",i.month()+1),s.start.imply("year",i.year());let u=0,l=0,c=-1;if(t[As]){var f=parseInt(t[As]);if(isNaN(f)&&(f=Jt.zhStringToNumber(t[As])),f>=60)return null;s.start.assign("second",f)}if(u=parseInt(t[qo]),isNaN(u)&&(u=Jt.zhStringToNumber(t[qo])),t[Zt]?t[Zt]=="\u534A"?l=30:t[Zt]=="\u6B63"||t[Zt]=="\u6574"?l=0:(l=parseInt(t[Zt]),isNaN(l)&&(l=Jt.zhStringToNumber(t[Zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Wo]){if(u>12)return null;var m=t[Wo][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12))}else if(t[Io]){var y=t[Io],k=y[0];k=="\u671D"||k=="\u65E9"?(c=0,u==12&&(u=0)):k=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Fo]){var E=t[Fo],x=E[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Uo]){var v=t[Uo],I=v[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(c=0,u==12&&(u=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(c=1,u!=12&&(u+=12))}if(s.start.assign("hour",u),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):u<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=Tx.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let F=i.clone();if(s.end=e.createParsingComponents(),t[No]){var a=t[No];a=="\u660E"||a=="\u807D"?n.hour()>1&&F.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?F.add(-1,"day"):a=="\u524D"?F.add(-2,"day"):a=="\u5927\u524D"?F.add(-3,"day"):a=="\u5F8C"?F.add(2,"day"):a=="\u5927\u5F8C"&&F.add(3,"day"),s.end.assign("day",F.date()),s.end.assign("month",F.month()+1),s.end.assign("year",F.year())}else if(t[Lo]){var o=t[Lo];o=="\u660E"||o=="\u807D"?F.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?F.add(-1,"day"):o=="\u524D"?F.add(-2,"day"):o=="\u5927\u524D"?F.add(-3,"day"):o=="\u5F8C"?F.add(2,"day"):o=="\u5927\u5F8C"&&F.add(3,"day"),s.end.assign("day",F.date()),s.end.assign("month",F.month()+1),s.end.assign("year",F.year())}else s.end.imply("day",F.date()),s.end.imply("month",F.month()+1),s.end.imply("year",F.year());if(u=0,l=0,c=-1,t[As]){var f=parseInt(t[As]);if(isNaN(f)&&(f=Jt.zhStringToNumber(t[As])),f>=60)return null;s.end.assign("second",f)}if(u=parseInt(t[qo]),isNaN(u)&&(u=Jt.zhStringToNumber(t[qo])),t[Zt]?t[Zt]=="\u534A"?l=30:t[Zt]=="\u6B63"||t[Zt]=="\u6574"?l=0:(l=parseInt(t[Zt]),isNaN(l)&&(l=Jt.zhStringToNumber(t[Zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Wo]){if(u>12)return null;var m=t[Wo][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Io]){var y=t[Io],k=y[0];k=="\u671D"||k=="\u65E9"?(c=0,u==12&&(u=0)):k=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Fo]){var E=t[Fo],x=E[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Uo]){var v=t[Uo],I=v[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(c=0,u==12&&(u=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(c=1,u!=12&&(u+=12))}return s.text=s.text+t[0],s.end.assign("hour",u),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>u?s.end.imply("meridiem",0):u>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var bx=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var _x=bx(Te()),vx=Y(),fT=Cs(),wx=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(fT.WEEKDAY_OFFSET).join("|")+")"),pf=class extends vx.AbstractParserWithWordBoundaryChecking{innerPattern(){return wx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=fT.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=_x.default(e.refDate),o=!1,u=a.day();return Math.abs(i-7-u){"use strict";var Ex=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var kx=Ex(kr()),mf=class extends kx.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};ra.default=mf});var hT=b(na=>{"use strict";var Sx=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var Ox=Sx(Lr()),hf=class extends Ox.default{patternBetween(){return/^\s*$/i}};na.default=hf});var gT=b(je=>{"use strict";var jr=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0});je.createConfiguration=je.createCasualConfiguration=je.parseDate=je.parse=je.strict=je.casual=je.hant=void 0;var gf=dr(),Dx=jr(go()),xx=Ur(),Rx=jr(sT()),Mx=jr(aT()),Cx=jr(uT()),Ax=jr(cT()),Px=jr(dT()),Nx=jr(pT()),Ix=jr(mT()),Fx=jr(hT());je.hant=new gf.Chrono(yf());je.casual=new gf.Chrono(yf());je.strict=new gf.Chrono(Tf());function Lx(r,e,t){return je.casual.parse(r,e,t)}je.parse=Lx;function Ux(r,e,t){return je.casual.parseDate(r,e,t)}je.parseDate=Ux;function yf(){let r=Tf();return r.parsers.unshift(new Rx.default),r}je.createCasualConfiguration=yf;function Tf(){let r=xx.includeCommonConfiguration({parsers:[new Mx.default,new Ax.default,new Nx.default,new Px.default,new Cx.default],refiners:[new Ix.default,new Fx.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof Dx.default)),r}je.createConfiguration=Tf});var _T=b(sa=>{"use strict";var qx=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var Wx=qx(Te()),Yx=Y(),Gx=1,yT=2,jx=3,TT=4,bT=5,$x=6,bf=class extends Yx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),i=Wx.default(e.refDate),a=i;if(t[Gx])s.start.imply("hour",i.hour()),s.start.imply("minute",i.minute()),s.start.imply("second",i.second()),s.start.imply("millisecond",i.millisecond());else if(t[yT]){let o=t[yT],u=t[jx];o=="\u660E"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?s.start.imply("hour",6):u=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[TT]){let u=t[TT][0];u=="\u65E9"||u=="\u4E0A"?s.start.imply("hour",6):u=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):u=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):u=="\u51CC"&&s.start.imply("hour",0)}else if(t[bT]){let o=t[bT];o=="\u660E"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[$x];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?s.start.imply("hour",6):l=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):l=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):l=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year()),s}};sa.default=bf});var Ps=b(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.zhStringToYear=Pt.zhStringToNumber=Pt.WEEKDAY_OFFSET=Pt.NUMBER=void 0;Pt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Pt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function Bx(r){let e=0;for(let t=0;t{"use strict";var zx=ia&&ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ia,"__esModule",{value:!0});var Vx=zx(Te()),Kx=Y(),zn=Ps(),_f=1,vT=2,vf=3,wf=class extends Kx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(zn.NUMBER).join("")+"]{4}|["+Object.keys(zn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(zn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(zn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=Vx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=parseInt(t[vT]);if(isNaN(i)&&(i=zn.zhStringToNumber(t[vT])),s.start.assign("month",i),t[vf]){let a=parseInt(t[vf]);isNaN(a)&&(a=zn.zhStringToNumber(t[vf])),s.start.assign("day",a)}else s.start.imply("day",n.date());if(t[_f]){let a=parseInt(t[_f]);isNaN(a)&&(a=zn.zhStringToYear(t[_f])),s.start.assign("year",a)}else s.start.imply("year",n.year());return s}};ia.default=wf});var kT=b(aa=>{"use strict";var Qx=aa&&aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aa,"__esModule",{value:!0});var Xx=Qx(Te()),Zx=Y(),ET=Ps(),Jx=new RegExp("(\\d+|["+Object.keys(ET.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Ef=1,eR=2,kf=class extends Zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Jx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ef]);if(isNaN(s)&&(s=ET.zhStringToNumber(t[Ef])),isNaN(s)){let u=t[Ef];if(u==="\u51E0")s=3;else if(u==="\u534A")s=.5;else return null}let i=Xx.default(e.refDate),o=t[eR][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(s,"d"):o=="\u661F"||o=="\u793C"?i=i.add(s*7,"d"):o=="\u6708"?i=i.add(s,"month"):o=="\u5E74"&&(i=i.add(s,"year")),n.start.assign("year",i.year()),n.start.assign("month",i.month()+1),n.start.assign("day",i.date()),n):(o=="\u79D2"?i=i.add(s,"second"):o=="\u5206"?i=i.add(s,"minute"):(o=="\u5C0F"||o=="\u949F")&&(i=i.add(s,"hour")),n.start.imply("year",i.year()),n.start.imply("month",i.month()+1),n.start.imply("day",i.date()),n.start.assign("hour",i.hour()),n.start.assign("minute",i.minute()),n.start.assign("second",i.second()),n)}};aa.default=kf});var OT=b(oa=>{"use strict";var tR=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var rR=tR(Te()),nR=Y(),ST=Ps(),sR=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(ST.WEEKDAY_OFFSET).join("|")+")"),Sf=class extends nR.AbstractParserWithWordBoundaryChecking{innerPattern(){return sR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=ST.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=rR.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(i-7),l=!0):a=="next"?(u=u.day(i+7),l=!0):a=="this"?u=u.day(i):Math.abs(i-7-c){"use strict";var iR=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var aR=iR(Te()),oR=Y(),tr=Ps(),uR=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),lR=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Yo=1,Go=2,jo=3,$o=4,Bo=5,Ho=6,er=7,Ns=8,zo=9,Of=class extends oR.AbstractParserWithWordBoundaryChecking{innerPattern(){return uR}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=aR.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=n.clone();if(t[Yo]){let c=t[Yo];c=="\u660E"?n.hour()>1&&i.add(1,"day"):c=="\u6628"?i.add(-1,"day"):c=="\u524D"?i.add(-2,"day"):c=="\u5927\u524D"?i.add(-3,"day"):c=="\u540E"?i.add(2,"day"):c=="\u5927\u540E"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else if(t[$o]){let c=t[$o];c=="\u660E"?i.add(1,"day"):c=="\u6628"?i.add(-1,"day"):c=="\u524D"?i.add(-2,"day"):c=="\u5927\u524D"?i.add(-3,"day"):c=="\u540E"?i.add(2,"day"):c=="\u5927\u540E"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else s.start.imply("day",i.date()),s.start.imply("month",i.month()+1),s.start.imply("year",i.year());let a=0,o=0,u=-1;if(t[Ns]){let c=parseInt(t[Ns]);if(isNaN(c)&&(c=tr.zhStringToNumber(t[Ns])),c>=60)return null;s.start.assign("second",c)}if(a=parseInt(t[Ho]),isNaN(a)&&(a=tr.zhStringToNumber(t[Ho])),t[er]?t[er]=="\u534A"?o=30:t[er]=="\u6B63"||t[er]=="\u6574"?o=0:(o=parseInt(t[er]),isNaN(o)&&(o=tr.zhStringToNumber(t[er]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[zo]){if(a>12)return null;let c=t[zo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Go]){let f=t[Go][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[jo]){let f=t[jo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Bo]){let f=t[Bo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}if(s.start.assign("hour",a),s.start.assign("minute",o),u>=0?s.start.assign("meridiem",u):a<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=lR.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let l=i.clone();if(s.end=e.createParsingComponents(),t[Yo]){let c=t[Yo];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),s.end.assign("day",l.date()),s.end.assign("month",l.month()+1),s.end.assign("year",l.year())}else if(t[$o]){let c=t[$o];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),s.end.assign("day",l.date()),s.end.assign("month",l.month()+1),s.end.assign("year",l.year())}else s.end.imply("day",l.date()),s.end.imply("month",l.month()+1),s.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Ns]){let c=parseInt(t[Ns]);if(isNaN(c)&&(c=tr.zhStringToNumber(t[Ns])),c>=60)return null;s.end.assign("second",c)}if(a=parseInt(t[Ho]),isNaN(a)&&(a=tr.zhStringToNumber(t[Ho])),t[er]?t[er]=="\u534A"?o=30:t[er]=="\u6B63"||t[er]=="\u6574"?o=0:(o=parseInt(t[er]),isNaN(o)&&(o=tr.zhStringToNumber(t[er]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[zo]){if(a>12)return null;let c=t[zo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),s.start.isCertain("meridiem")||(u==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Go]){let f=t[Go][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[jo]){let f=t[jo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Bo]){let f=t[Bo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}return s.text=s.text+t[0],s.end.assign("hour",a),s.end.assign("minute",o),u>=0?s.end.assign("meridiem",u):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>a?s.end.imply("meridiem",0):a>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var cR=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var dR=cR(Te()),fR=Y(),xT=Ps(),pR=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(xT.WEEKDAY_OFFSET).join("|")+")"),Df=class extends fR.AbstractParserWithWordBoundaryChecking{innerPattern(){return pR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=xT.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=dR.default(e.refDate),o=!1,u=a.day();return Math.abs(i-7-u){"use strict";var mR=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var hR=mR(kr()),xf=class extends hR.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};ca.default=xf});var CT=b(da=>{"use strict";var gR=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var yR=gR(Lr()),Rf=class extends yR.default{patternBetween(){return/^\s*$/i}};da.default=Rf});var AT=b($e=>{"use strict";var $r=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.strict=$e.casual=$e.hans=void 0;var Mf=dr(),TR=$r(go()),bR=Ur(),_R=$r(_T()),vR=$r(wT()),wR=$r(kT()),ER=$r(OT()),kR=$r(DT()),SR=$r(RT()),OR=$r(MT()),DR=$r(CT());$e.hans=new Mf.Chrono(Cf());$e.casual=new Mf.Chrono(Cf());$e.strict=new Mf.Chrono(Af());function xR(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=xR;function RR(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=RR;function Cf(){let r=Af();return r.parsers.unshift(new _R.default),r}$e.createCasualConfiguration=Cf;function Af(){let r=bR.includeCommonConfiguration({parsers:[new vR.default,new ER.default,new SR.default,new kR.default,new wR.default],refiners:[new OR.default,new DR.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof TR.default)),r}$e.createConfiguration=Af});var NT=b(Ut=>{"use strict";var PT=Ut&&Ut.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),MR=Ut&&Ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),CR=Ut&&Ut.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&PT(e,r,t)},AR=Ut&&Ut.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&PT(e,r,t);return MR(e,r),e};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.hans=void 0;CR(gT(),Ut);Ut.hans=AR(AT())});var Nt=b(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.parseTimeUnits=ee.TIME_UNITS_PATTERN=ee.parseYear=ee.YEAR_PATTERN=ee.parseOrdinalNumberPattern=ee.ORDINAL_NUMBER_PATTERN=ee.parseNumberPattern=ee.NUMBER_PATTERN=ee.TIME_UNIT_DICTIONARY=ee.ORDINAL_WORD_DICTIONARY=ee.INTEGER_WORD_DICTIONARY=ee.MONTH_DICTIONARY=ee.FULL_MONTH_NAME_DICTIONARY=ee.WEEKDAY_DICTIONARY=ee.REGEX_PARTS=void 0;var Vo=Se(),PR=ut();ee.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ee.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};ee.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};ee.MONTH_DICTIONARY=Object.assign(Object.assign({},ee.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});ee.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};ee.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};ee.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};ee.NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function FT(r){let e=r.toLowerCase();return ee.INTEGER_WORD_DICTIONARY[e]!==void 0?ee.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}ee.parseNumberPattern=FT;ee.ORDINAL_NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function NR(r){let e=r.toLowerCase();return ee.ORDINAL_WORD_DICTIONARY[e]!==void 0?ee.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ee.parseOrdinalNumberPattern=NR;var Pf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ee.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Pf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Pf}|[5-9][0-9]${Pf})`;function IR(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return PR.findMostLikelyADYear(e)}ee.parseYear=IR;var LT=`(${ee.NUMBER_PATTERN})\\s{0,3}(${Vo.matchAnyPattern(ee.TIME_UNIT_DICTIONARY)})`,IT=new RegExp(LT,"i");ee.TIME_UNITS_PATTERN=Vo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",LT);function FR(r){let e={},t=r,n=IT.exec(t);for(;n;)LR(e,n),t=t.substring(n[0].length).trim(),n=IT.exec(t);return e}ee.parseTimeUnits=FR;function LR(r,e){let t=FT(e[1]),n=ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var qT=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var fa=Nt(),UR=Le(),qR=Y(),UT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${fa.TIME_UNITS_PATTERN})${fa.REGEX_PARTS.rightBoundary}`,WR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${UT}`,fa.REGEX_PARTS.flags),YR=new RegExp(UT,"i"),Nf=class extends qR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return fa.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?YR:WR}innerExtract(e,t){let n=fa.parseTimeUnits(t[1]);return UR.ParsingComponents.createRelativeFromReference(e.reference,n)}};If.default=Nf});var $T=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var GR=ut(),pa=Nt(),jT=Nt(),Ko=Nt(),jR=Se(),$R=Y(),BR=new RegExp(`(?:\u0441)?\\s*(${Ko.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Ko.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${jR.matchAnyPattern(pa.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${jT.YEAR_PATTERN}(?![^\\s]\\d)))?${pa.REGEX_PARTS.rightBoundary}`,pa.REGEX_PARTS.flags),WT=1,YT=2,HR=3,GT=4,Ff=class extends $R.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return pa.REGEX_PARTS.leftBoundary}innerPattern(){return BR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=pa.MONTH_DICTIONARY[t[HR].toLowerCase()],i=Ko.parseOrdinalNumberPattern(t[WT]);if(i>31)return t.index=t.index+t[WT].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[GT]){let a=jT.parseYear(t[GT]);n.start.assign("year",a)}else{let a=GR.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[YT]){let a=Ko.parseOrdinalNumberPattern(t[YT]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Lf.default=Ff});var zT=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var ma=Nt(),zR=ut(),VR=Se(),HT=Nt(),KR=Y(),QR=new RegExp(`((?:\u0432)\\s*)?(${VR.matchAnyPattern(ma.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${HT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,ma.REGEX_PARTS.flags),XR=2,BT=3,Uf=class extends KR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ma.REGEX_PARTS.leftBoundary}innerPattern(){return QR}innerExtract(e,t){let n=t[XR].toLowerCase();if(t[0].length<=3&&!ma.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let i=ma.MONTH_DICTIONARY[n];if(s.start.assign("month",i),t[BT]){let a=HT.parseYear(t[BT]);s.start.assign("year",a)}else{let a=zR.findYearClosestToRef(e.refDate,1,i);s.start.imply("year",a)}return s}};qf.default=Uf});var KT=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var Qo=ze(),ZR=Wn(),VT=Nt(),Wf=class extends ZR.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return VT.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${VT.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Qo.Meridiem.PM)):s<6&&n.assign("meridiem",Qo.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Qo.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Qo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Yf.default=Wf});var QT=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var Xo=Nt(),JR=Le(),eM=Y(),tM=Qt(),rM=new RegExp(`(${Xo.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Xo.REGEX_PARTS.flags),Gf=class extends eM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Xo.REGEX_PARTS.leftBoundary}innerPattern(){return rM}innerExtract(e,t){let n=Xo.parseTimeUnits(t[1]),s=tM.reverseTimeUnits(n);return JR.ParsingComponents.createRelativeFromReference(e.reference,s)}};jf.default=Gf});var XT=b(ha=>{"use strict";var nM=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var sM=nM(kr()),$f=class extends sM.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};ha.default=$f});var ZT=b(ga=>{"use strict";var iM=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var aM=iM(Lr()),Bf=class extends aM.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};ga.default=Bf});var JT=b(Br=>{"use strict";var oM=Br&&Br.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),uM=Br&&Br.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),lM=Br&&Br.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&oM(e,r,t);return uM(e,r),e};Object.defineProperty(Br,"__esModule",{value:!0});var cM=Y(),ya=lM(Wr()),Hf=Nt(),dM=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${Hf.REGEX_PARTS.rightBoundary}`,Hf.REGEX_PARTS.flags),zf=class extends cM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Hf.REGEX_PARTS.leftBoundary}innerPattern(e){return dM}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return ya.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ya.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ya.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return ya.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return ya.theDayBefore(e.reference,2)}return s}};Br.default=zf});var eb=b(gr=>{"use strict";var fM=gr&&gr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),pM=gr&&gr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mM=gr&&gr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&fM(e,r,t);return pM(e,r),e},hM=gr&&gr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gr,"__esModule",{value:!0});var gM=Y(),Vn=mM(Wr()),yM=Kt(),TM=hM(Te()),Vf=Nt(),bM=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${Vf.REGEX_PARTS.rightBoundary}`,Vf.REGEX_PARTS.flags),Kf=class extends gM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Vf.REGEX_PARTS.leftBoundary}innerPattern(){return bM}innerExtract(e,t){let n=TM.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return Vn.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return Vn.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return Vn.morning(e.reference);if(s.match(/в\s*полдень/))return Vn.noon(e.reference);if(s.match(/прошлой\s*ночью/))return Vn.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return Vn.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),yM.assignSimilarDate(i,n),i.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?Vn.midnight(e.reference):i}};gr.default=Kf});var tb=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var Ta=Nt(),_M=Se(),vM=Y(),wM=Gn(),EM=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${_M.matchAnyPattern(Ta.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Ta.REGEX_PARTS.rightBoundary}`,Ta.REGEX_PARTS.flags),kM=1,SM=2,OM=3,Qf=class extends vM.AbstractParserWithWordBoundaryChecking{innerPattern(){return EM}patternLeftBoundary(){return Ta.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[SM].toLowerCase(),s=Ta.WEEKDAY_DICTIONARY[n],i=t[kM],a=t[OM],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=wM.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Xf.default=Qf});var nb=b(_a=>{"use strict";var DM=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var ba=Nt(),rb=Le(),xM=DM(Te()),RM=Y(),MM=Se(),CM=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${MM.matchAnyPattern(ba.TIME_UNIT_DICTIONARY)})(?=\\s*)${ba.REGEX_PARTS.rightBoundary}`,ba.REGEX_PARTS.flags),AM=1,PM=2,Zf=class extends RM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ba.REGEX_PARTS.leftBoundary}innerPattern(){return CM}innerExtract(e,t){let n=t[AM].toLowerCase(),s=t[PM].toLowerCase(),i=ba.TIME_UNIT_DICTIONARY[s];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[i]=1,rb.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[i]=-1,rb.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=xM.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};_a.default=Zf});var sb=b(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var va=Nt(),NM=Le(),IM=Y(),FM=Qt(),LM=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${va.TIME_UNITS_PATTERN})${va.REGEX_PARTS.rightBoundary}`,va.REGEX_PARTS.flags),Jf=class extends IM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return va.REGEX_PARTS.leftBoundary}innerPattern(){return LM}innerExtract(e,t){let n=t[1].toLowerCase(),s=va.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=FM.reverseTimeUnits(s);break}return NM.ParsingComponents.createRelativeFromReference(e.reference,s)}};ep.default=Jf});var ob=b(nt=>{"use strict";var qt=nt&&nt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nt,"__esModule",{value:!0});nt.createConfiguration=nt.createCasualConfiguration=nt.parseDate=nt.parse=nt.strict=nt.casual=void 0;var UM=qt(qT()),qM=qt($T()),WM=qt(zT()),YM=qt(KT()),GM=qt(QT()),jM=qt(XT()),$M=qt(ZT()),BM=Ur(),HM=qt(JT()),zM=qt(eb()),VM=qt(tb()),KM=qt(nb()),ib=dr(),QM=qt(jn()),XM=qt(sb());nt.casual=new ib.Chrono(ab());nt.strict=new ib.Chrono(tp(!0));function ZM(r,e,t){return nt.casual.parse(r,e,t)}nt.parse=ZM;function JM(r,e,t){return nt.casual.parseDate(r,e,t)}nt.parseDate=JM;function ab(){let r=tp(!1);return r.parsers.unshift(new HM.default),r.parsers.unshift(new zM.default),r.parsers.unshift(new WM.default),r.parsers.unshift(new KM.default),r.parsers.unshift(new XM.default),r}nt.createCasualConfiguration=ab;function tp(r=!0){return BM.includeCommonConfiguration({parsers:[new QM.default(!0),new UM.default,new qM.default,new VM.default,new YM.default(r),new GM.default],refiners:[new $M.default,new jM.default]},r)}nt.createConfiguration=tp});var ze=b(se=>{"use strict";var eC=se&&se.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),tC=se&&se.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Tn=se&&se.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&eC(e,r,t);return tC(e,r),e};Object.defineProperty(se,"__esModule",{value:!0});se.parseDate=se.parse=se.casual=se.strict=se.ru=se.zh=se.nl=se.pt=se.ja=se.fr=se.de=se.Meridiem=se.Chrono=se.en=void 0;var rp=Tn(Tc());se.en=rp;var rC=dr();Object.defineProperty(se,"Chrono",{enumerable:!0,get:function(){return rC.Chrono}});var nC;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(nC=se.Meridiem||(se.Meridiem={}));var sC=Tn(gg());se.de=sC;var iC=Tn(Bg());se.fr=iC;var aC=Tn(ey());se.ja=aC;var oC=Tn(gy());se.pt=oC;var uC=Tn(eT());se.nl=uC;var lC=Tn(NT());se.zh=lC;var cC=Tn(ob());se.ru=cC;se.strict=rp.strict;se.casual=rp.casual;function dC(r,e,t){return se.casual.parse(r,e,t)}se.parse=dC;function fC(r,e,t){return se.casual.parseDate(r,e,t)}se.parseDate=fC});var s_=b((r_,n_)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(p){return Object.prototype.toString.call(p)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",i=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=i?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var p=Object.getOwnPropertyNames(d);return p.push.apply(p,Object.getOwnPropertySymbols(d)),p}:Object.keys;function c(){this._events={},this._conf&&f.call(this,this._conf)}function f(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function m(d,p){var h="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(h+=" Event name: "+p+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(h);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(h),console.trace&&console.trace()}var y=function(d,p,h){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,p];case 3:return[d,p,h];default:for(var T=new Array(g);g--;)T[g]=arguments[g];return T}};function k(d,p){for(var h={},g,T=d.length,_=p?p.length:0,S=0;S0;)d=_[D],S.call(M,d,h[d]);this._listeners={},this._listenersCount=0,R()}}});function x(d,p,h,g){var T=Object.assign({},p);if(!d)return T;if(typeof d!="object")throw TypeError("options must be an object");var _=Object.keys(d),S=_.length,M,D,R;function U(ae){throw Error('Invalid "'+M+'" option value'+(ae?". Reason: "+ae:""))}for(var ge=0;ge0;)if(M===d[D])return _;S(p)}}var F=I(["function"]),le=I(["object","function"]);function B(d,p,h){var g,T,_=0,S,M=new d(function(D,R,U){h=x(h,{timeout:0,overload:!1},{timeout:function(Re,ve){return Re*=1,(typeof Re!="number"||Re<0||!Number.isFinite(Re))&&ve("timeout must be a positive number"),Re}}),g=!h.overload&&typeof d.prototype.cancel=="function"&&typeof U=="function";function ge(){T&&(T=null),_&&(clearTimeout(_),_=0)}var ae=function(Re){ge(),D(Re)},te=function(Re){ge(),R(Re)};g?p(ae,te,U):(T=[function(Re){te(Re||Error("canceled"))}],p(ae,te,function(Re){if(S)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Re!="function")throw TypeError("onCancel callback must be a function");T.push(Re)}),S=!0),h.timeout>0&&(_=setTimeout(function(){var Re=Error("timeout");Re.code="ETIMEDOUT",_=0,M.cancel(Re),R(Re)},h.timeout))});return g||(M.cancel=function(D){if(!!T){for(var R=T.length,U=1;U0;)te=Ct[M],te!=="_listeners"&&(qe=W(d,p,h[te],g+1,T),qe&&(ae?ae.push.apply(ae,qe):ae=qe));return ae}else if(Ft==="**"){for(un=g+1===T||g+2===T&&ln==="*",un&&h._listeners&&(ae=W(d,p,h,T,T)),Ct=l(h),M=Ct.length;M-- >0;)te=Ct[M],te!=="_listeners"&&(te==="*"||te==="**"?(h[te]._listeners&&!un&&(qe=W(d,p,h[te],T,T),qe&&(ae?ae.push.apply(ae,qe):ae=qe)),qe=W(d,p,h[te],g,T)):te===ln?qe=W(d,p,h[te],g+2,T):qe=W(d,p,h[te],g,T),qe&&(ae?ae.push.apply(ae,qe):ae=qe));return ae}else h[Ft]&&(ae=W(d,p,h[Ft],g+1,T));if(Re=h["*"],Re&&W(d,p,Re,g+1,T),ve=h["**"],ve)if(g0;)te=Ct[M],te!=="_listeners"&&(te===ln?W(d,p,ve[te],g+2,T):te===Ft?W(d,p,ve[te],g+1,T):(_r={},_r[te]=ve[te],W(d,p,{"**":_r},g+1,T)));else ve._listeners?W(d,p,ve,T,T):ve["*"]&&ve["*"]._listeners&&W(d,p,ve["*"],T,T);return ae}function j(d,p,h){var g=0,T=0,_,S=this.delimiter,M=S.length,D;if(typeof d=="string")if((_=d.indexOf(S))!==-1){D=new Array(5);do D[g++]=d.slice(T,_),T=_+M;while((_=d.indexOf(S,T))!==-1);D[g++]=d.slice(T)}else D=[d],g=1;else D=d,g=d.length;if(g>1){for(_=0;_+10&&R._listeners.length>this._maxListeners&&(R._listeners.warned=!0,m.call(this,R._listeners.length,U))):R._listeners=p,!0;return!0}function ce(d,p,h,g){for(var T=l(d),_=T.length,S,M,D,R=d._listeners,U;_-- >0;)M=T[_],S=d[M],M==="_listeners"?D=h:D=h?h.concat(M):[M],U=g||typeof M=="symbol",R&&p.push(U?D:D.join(this.delimiter)),typeof S=="object"&&ce.call(this,S,p,D,U);return p}function Ie(d){for(var p=l(d),h=p.length,g,T,_;h-- >0;)T=p[h],g=d[T],g&&(_=!0,T!=="_listeners"&&!Ie(g)&&delete d[T]);return _}function $(d,p,h){this.emitter=d,this.event=p,this.listener=h}$.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function N(d,p,h){if(h===!0)T=!0;else if(h===!1)g=!0;else{if(!h||typeof h!="object")throw TypeError("options should be an object or true");var g=h.async,T=h.promisify,_=h.nextTick,S=h.objectify}if(g||_||T){var M=p,D=p._origin||p;if(_&&!s)throw Error("process.nextTick is not supported");T===r&&(T=p.constructor.name==="AsyncFunction"),p=function(){var R=arguments,U=this,ge=this.event;return T?_?Promise.resolve():new Promise(function(ae){u(ae)}).then(function(){return U.event=ge,M.apply(U,R)}):(_?process.nextTick:u)(function(){U.event=ge,M.apply(U,R)})},p._async=!0,p._origin=D}return[p,S?new $(this,d,p):this]}function w(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,d)}w.EventEmitter2=w,w.prototype.listenTo=function(d,p,h){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;h=x(h,{on:r,off:r,reducers:r},{on:F,off:F,reducers:le});function T(_){if(typeof _!="object")throw TypeError("events must be an object");var S=h.reducers,M=ie.call(g,d),D;M===-1?D=new E(g,d,h):D=g._observers[M];for(var R=l(_),U=R.length,ge,ae=typeof S=="function",te=0;te0;)T=h[g],(!d||T._target===d)&&(T.unsubscribe(p),_=!0);return _},w.prototype.delimiter=".",w.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},w.prototype.getMaxListeners=function(){return this._maxListeners},w.prototype.event="",w.prototype.once=function(d,p,h){return this._once(d,p,!1,h)},w.prototype.prependOnceListener=function(d,p,h){return this._once(d,p,!0,h)},w.prototype._once=function(d,p,h,g){return this._many(d,1,p,h,g)},w.prototype.many=function(d,p,h,g){return this._many(d,p,h,!1,g)},w.prototype.prependMany=function(d,p,h,g){return this._many(d,p,h,!0,g)},w.prototype._many=function(d,p,h,g,T){var _=this;if(typeof h!="function")throw new Error("many only accepts instances of Function");function S(){return--p===0&&_.off(d,S),h.apply(this,arguments)}return S._origin=h,this._on(d,S,g,T)},w.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p,h=this.wildcard,g,T,_,S,M;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(h&&(p=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(T=d.length,i){for(_=0;_3)for(g=new Array(D-1),S=1;S3)for(T=new Array(R-1),M=1;M0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,m.call(this,this._events[d].length,d))):this._events[d]=p,T)},w.prototype.off=function(d,p){if(typeof p!="function")throw new Error("removeListener only takes instances of Function");var h,g=[];if(this.wildcard){var T=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=W.call(this,null,T,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;h=this._events[d],g.push({_listeners:h})}for(var _=0;_0){for(g=this._all,p=0,h=g.length;p0;)g=p[h[_]],typeof g=="function"?T.push(g):T.push.apply(T,g);return T}else{if(this.wildcard){if(S=this.listenerTree,!S)return[];var M=[],D=typeof d=="string"?d.split(this.delimiter):d.slice();return W.call(this,M,D,S,0),M}return p?(g=p[d],g?typeof g=="function"?[g]:g:[]):[]}},w.prototype.eventNames=function(d){var p=this._events;return this.wildcard?ce.call(this,this.listenerTree,[],null,d):p?l(p):[]},w.prototype.listenerCount=function(d){return this.listeners(d).length},w.prototype.hasListeners=function(d){if(this.wildcard){var p=[],h=typeof d=="string"?d.split(this.delimiter):d.slice();return W.call(this,p,h,this.listenerTree,0),p.length>0}var g=this._events,T=this._all;return!!(T&&T.length||g&&(d===r?l(g).length:g[d]))},w.prototype.listenersAny=function(){return this._all?this._all:[]},w.prototype.waitFor=function(d,p){var h=this,g=typeof p;return g==="number"?p={timeout:p}:g==="function"&&(p={filter:p}),p=x(p,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:F,Promise:v}),B(p.Promise,function(T,_,S){function M(){var D=p.filter;if(!(D&&!D.apply(h,arguments)))if(h.off(d,M),p.handleError){var R=arguments[0];R?_(R):T(y.apply(null,arguments).slice(1))}else T(y.apply(null,arguments))}S(function(){h.off(d,M)}),h._on(d,M,!1)},{timeout:p.timeout,overload:p.overload})};function H(d,p,h){h=x(h,{Promise,timeout:0,overload:!1},{Promise:v});var g=h.Promise;return B(g,function(T,_,S){var M;if(typeof d.addEventListener=="function"){M=function(){T(y.apply(null,arguments))},S(function(){d.removeEventListener(p,M)}),d.addEventListener(p,M,{once:!0});return}var D=function(){R&&d.removeListener("error",R),T(y.apply(null,arguments))},R;p!=="error"&&(R=function(U){d.removeListener(p,D),_(U)},d.once("error",R)),S(function(){R&&d.removeListener("error",R),d.removeListener(p,D)}),d.once(p,D)},{timeout:h.timeout,overload:h.overload})}var C=w.prototype;if(Object.defineProperties(w,{defaultMaxListeners:{get:function(){return C._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");C._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(C,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return w});else if(typeof r_=="object")n_.exports=w;else{var X=new Function("","return this")();X.EventEmitter2=w}})()});var C_=b(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var R_=Symbol("MustacheDataPath");function x_({target:r,propertyName:e}){return[...r[R_]||[],e]}function M_(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let s=t[n];if(s===void 0&&!(n in t)){let i=x_({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(i),s;throw Error(`Missing Mustache data property: ${i.join(" > ")}`)}return s&&typeof s=="object"?(s[R_]=x_({target:t,propertyName:n}),M_(s,e)):s}})}Lp.default=M_});var Pr=b(Tr=>{"use strict";Tr.__esModule=!0;Tr.Tokens=Tr.StructuralCharacters=Tr.Operators=void 0;var $A;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})($A=Tr.Operators||(Tr.Operators={}));var BA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(BA=Tr.StructuralCharacters||(Tr.StructuralCharacters={}));var HA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(HA=Tr.Tokens||(Tr.Tokens={}))});var Gp=b(ri=>{"use strict";ri.__esModule=!0;ri.VALID_TOKENS=ri.OPERATOR_PRECEDENCE=void 0;var Ue=Pr();ri.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};ri.VALID_TOKENS={identifierOnly:[{name:Ue.Tokens.IDENTIFIER},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Ue.Tokens.IDENTIFIER},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.OPEN_PARENTHESIS},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.NOT}],binaryOperator:[{name:Ue.Tokens.OPERATOR,value:Ue.Operators.AND},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.OR},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.XOR}],binaryOperatorOrClose:[{name:Ue.Tokens.OPERATOR,value:Ue.Operators.AND},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.OR},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.XOR},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.CLOSE_PARENTHESIS}]}});var jp=b(vt=>{"use strict";vt.__esModule=!0;vt.ESCAPE_CHARACTER=vt.EOL=vt.COMMENT_DELIMITER=vt.QUOTED_IDENTIFIER_DELIMITER=vt.SEPARATORS=vt.OPERATORS=vt.STRUCTURAL_CHARACTERS=void 0;var ni=Pr();vt.STRUCTURAL_CHARACTERS={"(":ni.StructuralCharacters.OPEN_PARENTHESIS,")":ni.StructuralCharacters.CLOSE_PARENTHESIS};vt.OPERATORS={AND:ni.Operators.AND,OR:ni.Operators.OR,XOR:ni.Operators.XOR,NOT:ni.Operators.NOT};vt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));vt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);vt.COMMENT_DELIMITER=String.fromCodePoint(35);vt.EOL=String.fromCodePoint(10);vt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var F_=b(ir=>{"use strict";var $p=ir&&ir.__assign||function(){return $p=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";qu.__esModule=!0;qu.lex=void 0;var si=Pr(),Bt=jp(),ii=F_(),QA=function(r){for(var e=null,t=null,n=null,s=0;s{"use strict";var U_=Ht&&Ht.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";var Nr=oi&&oi.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";wt.__esModule=!0;wt.throwInvalidExpression=wt.isOperator=wt.isIdentifier=wt.notUtil=wt.xorUtil=wt.orUtil=wt.andUtil=void 0;var G_=Pr(),nP=function(r,e){return r&&e};wt.andUtil=nP;var sP=function(r,e){return r||e};wt.orUtil=sP;var iP=function(r,e){return r!==e};wt.xorUtil=iP;var aP=function(r){return!r};wt.notUtil=aP;var oP=function(r){var e=r.name,t=r.value;return e===G_.Tokens.IDENTIFIER&&typeof t=="string"};wt.isIdentifier=oP;var uP=function(r){var e=r.name,t=r.value;return e===G_.Tokens.OPERATOR&&typeof t=="string"};wt.isOperator=uP;var lP=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};wt.throwInvalidExpression=lP});var j_=b(Gu=>{"use strict";var Wa;Gu.__esModule=!0;Gu.OPERATOR_MAP=void 0;var Vp=Pr(),Kp=zp();Gu.OPERATOR_MAP=(Wa={},Wa[Vp.Operators.AND]=Kp.andUtil,Wa[Vp.Operators.OR]=Kp.orUtil,Wa[Vp.Operators.XOR]=Kp.xorUtil,Wa)});var B_=b(an=>{"use strict";var ui=an&&an.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";var Qp=Ir&&Ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});Ir.__esModule=!0;Ir.parse=Ir.evaluate=Ir.getEvaluator=void 0;var H_=B_();Qp(Ir,H_,"getEvaluator");Qp(Ir,H_,"evaluate");var mP=Hp();Qp(Ir,mP,"parse")});var FP={};Bv(FP,{default:()=>cl});module.exports=Hv(FP);var Lv=require("obsidian");var Ys=require("obsidian");var UP=new Error("timeout while waiting for mutex to become available"),qP=new Error("mutex already locked"),zv=new Error("request for lock canceled"),Vv=function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?i(c.value):s(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},fl=class{constructor(e,t=zv){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return Vv(this,void 0,void 0,function*(){let[n,s]=yield this.acquire(t);try{return yield e(n)}finally{s()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let s=this._value,i=t;this._value-=t,t=this._value+1,n.resolve([s,this._newReleaser(i)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},Kv=function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?i(c.value):s(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},io=class{constructor(e){this._semaphore=new fl(1,e)}acquire(){return Kv(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Zo=vi(ze());var Dt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new Dt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new Dt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Wt=class{static parseDate(e,t=!1){return window.moment(Zo.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Wt.parseRelativeDateRange,Wt.parseNumberedDateRange,Wt.parseAbsoluteDateRange];for(let s of n){let i=s(e,t);if(i.isValid())return i}return Dt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Zo.parse(e,void 0,{forwardDate:t});if(n.length===0)return Dt.buildInvalid();let s=n[0].start,i=n[1]&&n[1].start?n[1].start:s,a=window.moment(s.date()),o=window.moment(i.date());return new Dt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,s=e.match(n);if(s&&s.length===3){let i=s[1],a=s[2],o=Dt.buildRelative(a);switch(i){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Dt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[s,i,a]of n){let o=e.match(s);if(o){let u=o[0].trim();return new Dt(window.moment(u,i).startOf(a),window.moment(u,i).endOf(a))}}return Dt.buildInvalid()}};var pC={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Hr(r){for(let[e,t]of Object.entries(pC))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Jo=["MO","TU","WE","TH","FR","SA","SU"],Be=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(Jo.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=Jo[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Ae=function(r){return r!=null},Yt=function(r){return typeof r=="number"},np=function(r){return typeof r=="string"&&Jo.includes(r)},dt=Array.isArray,rr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=pe(t,e/t.length)),t.slice(0,e)+String(n))}var lb=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},gt=function(r,e){var t=r%e;return t*e<0?t+e:t},eu=function(r,e){return{div:Math.floor(r/e),mod:gt(r,e)}},Gt=function(r){return!Ae(r)||r.length===0},We=function(r){return!Gt(r)},he=function(r,e){return We(r)&&r.indexOf(e)!==-1};var Dr=function(r,e,t,n,s,i){return n===void 0&&(n=0),s===void 0&&(s=0),i===void 0&&(i=0),new Date(Date.UTC(r,e-1,t,n,s,i))},mC=[31,28,31,30,31,30,31,31,30,31,30,31],fb=1e3*60*60*24,tu=9999,pb=Dr(1970,1,1),hC=[6,0,1,2,3,4,5];var Is=function(r){return r%4===0&&r%100!==0||r%400===0},sp=function(r){return r instanceof Date},Qn=function(r){return sp(r)&&!isNaN(r.getTime())},cb=function(r){return r.getTimezoneOffset()*60*1e3},gC=function(r,e){var t=r.getTime()-cb(r),n=e.getTime()-cb(e),s=t-n;return Math.round(s/fb)},wa=function(r){return gC(r,pb)},ru=function(r){return new Date(pb.getTime()+r*fb)},yC=function(r){var e=r.getUTCMonth();return e===1&&Is(r.getUTCFullYear())?29:mC[e]},zr=function(r){return hC[r.getUTCDay()]},ip=function(r,e){var t=Dr(r,e+1,1);return[zr(t),yC(t)]},nu=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},su=function(r){var e=new Date(r.getTime());return e},ap=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Kr=TC;var op=function(r,e){return op=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])},op(r,e)};function Ls(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");op(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ft=function(){return ft=Object.assign||function(e){for(var t,n=1,s=arguments.length;ne[0].length)&&(e=i,t=s)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function ka(r,e){e===void 0&&(e=Xn);var t={},n=new kC(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var m=n.acceptNumber();if(m&&(t.interval=parseInt(m[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=G.DAILY,n.nextSymbol()&&(a(),f());break;case"weekday(s)":t.freq=G.WEEKLY,t.byweekday=[G.MO,G.TU,G.WE,G.TH,G.FR],n.nextSymbol(),f();break;case"week(s)":t.freq=G.WEEKLY,n.nextSymbol()&&(i(),f());break;case"hour(s)":t.freq=G.HOURLY,n.nextSymbol()&&(i(),f());break;case"minute(s)":t.freq=G.MINUTELY,n.nextSymbol()&&(i(),f());break;case"month(s)":t.freq=G.MONTHLY,n.nextSymbol()&&(i(),f());break;case"year(s)":t.freq=G.YEARLY,n.nextSymbol()&&(i(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=G.WEEKLY;var y=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[G[y]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var k=u();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(G[k]),n.nextSymbol()}c(),f();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=G.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var E=o();if(!E)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(E),n.nextSymbol()}i(),f();break;default:throw new Error("Unknown symbol")}}function i(){var m=n.accept("on"),y=n.accept("the");if(!!(m||y))do{var k=l(),E=u(),x=o();if(k)E?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(G[E].nth(k))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(k),n.accept("day(s)"));else if(E)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(G[E]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[G.MO,G.TU,G.WE,G.TH,G.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var v=n.acceptNumber();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(v[0],10)];n.accept("comma");){if(v=n.acceptNumber(),!v)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(v[0],10))}}else if(x)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(x);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var m=n.accept("at");if(!!m)do{var y=n.acceptNumber();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(y[0],10)];n.accept("comma");){if(y=n.acceptNumber(),!y)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(y[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var m=parseInt(n.value[1],10);if(m<-366||m>366)throw new Error("Nth out of range: "+m);return n.nextSymbol(),n.accept("last")?-m:m;default:return!1}}function c(){n.accept("on"),n.accept("the");var m=l();if(!!m)for(t.bymonthday=[m],n.nextSymbol();n.accept("comma");){if(m=l(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(m),n.nextSymbol()}}function f(){if(n.symbol==="until"){var m=Date.parse(n.text);if(!m)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(m)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ue;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ue||(ue={}));function Sa(r){return r12){var n=Math.floor(this.month/12),s=gt(this.month,12);this.month=s,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var i=eu(this.hour,24),a=i.div,o=i.mod;if(a&&(this.hour=o,this.addDaily(a)),Gt(s)||he(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,i){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=eu(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,s)),(Gt(s)||he(s,this.hour))&&(Gt(i)||he(i,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,i,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=eu(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,s,i)),(Gt(s)||he(s,this.hour))&&(Gt(i)||he(i,this.minute))&&(Gt(a)||he(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=ip(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>tu))return;t=ip(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,i=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(s){case ue.YEARLY:return this.addYears(i);case ue.MONTHLY:return this.addMonths(i);case ue.WEEKLY:return this.addWeekly(i,a);case ue.DAILY:return this.addDaily(i);case ue.HOURLY:return this.addHours(i,n,o);case ue.MINUTELY:return this.addMinutes(i,n,o,u);case ue.SECONDLY:return this.addSeconds(i,n,o,u,l)}},e}(qs);function lp(r){for(var e=[],t=Object.keys(r),n=0,s=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||We(e.byweekno)||We(e.byyearday)||Boolean(e.bymonthday)||We(e.bymonthday)||Ae(e.byweekday)||Ae(e.byeaster)))switch(e.freq){case G.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case G.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case G.WEEKLY:e.byweekday=[zr(e.dtstart)];break}if(Ae(e.bymonth)&&!dt(e.bymonth)&&(e.bymonth=[e.bymonth]),Ae(e.byyearday)&&!dt(e.byyearday)&&Yt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ae(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(dt(e.bymonthday)){for(var s=[],i=[],t=0;t0?s.push(n):n<0&&i.push(n)}e.bymonthday=s,e.bynmonthday=i}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ae(e.byweekno)&&!dt(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ae(e.byweekday))e.bynweekday=null;else if(Yt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(np(e.byweekday))e.byweekday=[Be.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Be)!e.byweekday.n||e.freq>G.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;tG.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=We(a)?a:null,e.bynweekday=We(o)?o:null}return Ae(e.byhour)?Yt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+gt(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),m=gt(l,7),y=Math.floor(f+m/4),k=0;k0&&E<=y){var x=void 0;E>1?(x=c+(E-1)*7,c!==u&&(x-=7-u)):x=c;for(var v=0;v<7&&(o.wnomask[x]=1,x++,o.wdaymask[x]!==e.wkst);v++);}}if(he(e.byweekno,1)){var x=c+y*7;if(c!==u&&(x-=7-u),x=4?(le=0,ie=B+gt(F-e.wkst,7)):ie=n-c,I=Math.floor(52+gt(ie,7)/4)}if(he(e.byweekno,I))for(var x=0;xi)return Qr(r);if(I>=t){var F=qb(I,e);if(!r.accept(F)||o&&(--o,!o))return Qr(r)}}else for(var v=y;vi)return Qr(r);if(I>=t){var F=qb(I,e);if(!r.accept(F)||o&&(--o,!o))return Qr(r)}}}if(e.interval===0||(u.add(e,E),u.year>tu))return Qr(r);Sa(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function FC(r,e,t){var n=t.bymonth,s=t.byweekno,i=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return We(n)&&!he(n,r.mmask[e])||We(s)&&!r.wnomask[e]||We(i)&&!he(i,r.wdaymask[e])||We(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!he(r.eastermask,e)||(We(o)||We(u))&&!he(o,r.mdaymask[e])&&!he(u,r.nmdaymask[e])||We(l)&&(e=r.yearlen&&!he(l,e+1-r.yearlen)&&!he(l,-r.nextyearlen+e-r.yearlen))}function qb(r,e){return new Zn(r,e.tzid).rezonedDate()}function Qr(r){return r.getValue()}function LC(r,e,t,n,s){for(var i=!1,a=e;a=G.HOURLY&&We(s)&&!he(s,e.hour)||n>=G.MINUTELY&&We(i)&&!he(i,e.minute)||n>=G.SECONDLY&&We(a)&&!he(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var nr={MO:new Be(0),TU:new Be(1),WE:new Be(2),TH:new Be(3),FR:new Be(4),SA:new Be(5),SU:new Be(6)},Oa={freq:ue.YEARLY,dtstart:null,interval:1,wkst:nr.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},wb=Object.keys(Oa),G=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Sb,this.origOptions=lp(e);var n=_b(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return ka(e,t)},r.fromText=function(e,t){return gb(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return iu(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new up("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Kr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!Qn(e)||!Qn(t))throw new Error("Invalid date passed in to RRule.between");var i={before:t,after:e,inc:n};if(s)return this._iter(new up("between",i,s));var a=this._cacheGet("between",i);return a===!1&&(a=this._iter(new Kr("between",i)),this._cacheAdd("between",a,i)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Qn(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new Kr("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Qn(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new Kr("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Ra(this.origOptions)},r.prototype.toText=function(e,t,n){return yb(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Tb(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ue.YEARLY,r.MONTHLY=ue.MONTHLY,r.WEEKLY=ue.WEEKLY,r.DAILY=ue.DAILY,r.HOURLY=ue.HOURLY,r.MINUTELY=ue.MINUTELY,r.SECONDLY=ue.SECONDLY,r.MO=nr.MO,r.TU=nr.TU,r.WE=nr.WE,r.TH=nr.TH,r.FR=nr.FR,r.SA=nr.SA,r.SU=nr.SU,r.parseString=xa,r.optionsToString=Ra,r}();function Wb(r,e,t,n,s,i){var a={},o=r.accept;function u(m,y){t.forEach(function(k){k.between(m,y,!0).forEach(function(E){a[Number(E)]=!0})})}s.forEach(function(m){var y=new Zn(m,i).rezonedDate();a[Number(y)]=!0}),r.accept=function(m){var y=Number(m);return isNaN(y)?o.call(this,m):!a[y]&&(u(new Date(y-1),new Date(y+1)),!a[y])?(a[y]=!0,o.call(this,m)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(m){var y=Number(m);return a[y]?!0:(a[y]=!0,o.call(this,m))});for(var l=0;l1||s.length||i.length||a.length){var c=new fp(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(m){c.rrule(new G(dp(m,o,u),l))}),s.forEach(function(m){c.rdate(m)}),i.forEach(function(m){c.exrule(new G(dp(m,o,u),l))}),a.forEach(function(m){c.exdate(m)}),e.compatible&&e.dtstart&&c.rdate(o),c}var f=n[0]||{};return new G(dp(f,f.dtstart||e.dtstart||o,f.tzid||e.tzid||u),l)}function au(r,e){return e===void 0&&(e={}),WC(r,YC(e))}function dp(r,e,t){return ft(ft({},r),{dtstart:e,tzid:t})}function YC(r){var e=[],t=Object.keys(r),n=Object.keys(Yb);if(t.forEach(function(s){he(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return ft(ft({},Yb),r)}function GC(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=lb(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function jC(r){var e=GC(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function $C(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` -`),n=0;n0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function BC(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Gb(r,e){return BC(e),r.split(",").map(function(t){return Ea(t)})}function jb(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;ne in r?Ti(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Se=(r,e)=>{for(var t in e||(e={}))Pm.call(e,t)&&Am(r,t,e[t]);if(Cm)for(var t of Cm(e))Hv.call(e,t)&&Am(r,t,e[t]);return r},ot=(r,e)=>Yv(r,Gv(e));var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),zv=(r,e)=>{for(var t in e)Ti(r,t,{get:e[t],enumerable:!0})},Nm=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of $v(e))!Pm.call(r,s)&&s!==t&&Ti(r,s,{get:()=>e[s],enumerable:!(n=jv(e,s))||n.enumerable});return r};var _i=(r,e,t)=>(t=r!=null?Wv(Bv(r)):{},Nm(e||!r||!r.__esModule?Ti(t,"default",{value:r,enumerable:!0}):t,r)),Vv=r=>Nm(Ti({},"__esModule",{value:!0}),r);var L=(r,e,t)=>new Promise((n,s)=>{var i=u=>{try{o(t.next(u))}catch(l){s(l)}},a=u=>{try{o(t.throw(u))}catch(l){s(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,a);o((t=t.apply(r,e)).next())});var Oe=T(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.matchAnyPattern=pn.extractTerms=pn.repeatedTimeunitPattern=void 0;function Zv(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}pn.repeatedTimeunitPattern=Zv;function Im(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}pn.extractTerms=Im;function Jv(r){return`(?:${Im(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}pn.matchAnyPattern=Jv});var be=T((ml,hl)=>{(function(r,e){typeof ml=="object"&&typeof hl!="undefined"?hl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(ml,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",i="minute",a="hour",o="day",u="week",l="month",c="quarter",f="year",m="date",y="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function($,N,w){var H=String($);return!H||H.length>=N?$:""+Array(N+1-H.length).join(w)+$},I={s:v,z:function($){var N=-$.utcOffset(),w=Math.abs(N),H=Math.floor(w/60),C=w%60;return(N<=0?"+":"-")+v(H,2,"0")+":"+v(C,2,"0")},m:function $(N,w){if(N.date(){"use strict";var ew=mn&&mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0});mn.findYearClosestToRef=mn.findMostLikelyADYear=void 0;var tw=ew(be());function rw(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}mn.findMostLikelyADYear=rw;function nw(r,e,t){let n=tw.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let i=s.add(1,"y"),a=s.add(-1,"y");return Math.abs(i.diff(n)){"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.parseTimeUnits=ne.TIME_UNITS_PATTERN=ne.parseYear=ne.YEAR_PATTERN=ne.parseOrdinalNumberPattern=ne.ORDINAL_NUMBER_PATTERN=ne.parseNumberPattern=ne.NUMBER_PATTERN=ne.TIME_UNIT_DICTIONARY=ne.ORDINAL_WORD_DICTIONARY=ne.INTEGER_WORD_DICTIONARY=ne.MONTH_DICTIONARY=ne.FULL_MONTH_NAME_DICTIONARY=ne.WEEKDAY_DICTIONARY=void 0;var oo=Oe(),sw=ut();ne.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};ne.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};ne.MONTH_DICTIONARY=Object.assign(Object.assign({},ne.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});ne.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};ne.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};ne.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ne.NUMBER_PATTERN=`(?:${oo.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 Lm(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=Lm;ne.ORDINAL_NUMBER_PATTERN=`(?:${oo.matchAnyPattern(ne.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function iw(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=iw;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 aw(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 sw.findMostLikelyADYear(e)}ne.parseYear=aw;var Um=`(${ne.NUMBER_PATTERN})\\s{0,3}(${oo.matchAnyPattern(ne.TIME_UNIT_DICTIONARY)})`,Fm=new RegExp(Um,"i");ne.TIME_UNITS_PATTERN=oo.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Um);function ow(r){let e={},t=r,n=Fm.exec(t);for(;n;)uw(e,n),t=t.substring(n[0].length).trim(),n=Fm.exec(t);return e}ne.parseTimeUnits=ow;function uw(r,e){let t=Lm(e[1]),n=ne.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var qm=T((gl,yl)=>{(function(r,e){typeof gl=="object"&&typeof yl!="undefined"?yl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(gl,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var i=s.add;s.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):i.bind(this)(o,u)};var a=s.startOf;s.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var f=this.quarter()-1;return c?this.month(3*f).startOf(r).startOf("day"):this.month(3*f+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Kt=T(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.implySimilarTime=kr.assignSimilarTime=kr.assignSimilarDate=kr.assignTheNextDay=void 0;var Wm=ze();function lw(r,e){e=e.add(1,"day"),Ym(r,e),jm(r,e)}kr.assignTheNextDay=lw;function Ym(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}kr.assignSimilarDate=Ym;function cw(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",Wm.Meridiem.AM):r.assign("meridiem",Wm.Meridiem.PM)}kr.assignSimilarTime=cw;function jm(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}kr.implySimilarTime=jm});var Gm=T(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.toTimezoneOffset=Un.TIMEZONE_ABBR_MAP=void 0;Un.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function dw(r){var e;return r==null?null:typeof r=="number"?r:(e=Un.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Un.toTimezoneOffset=dw});var Le=T(Sr=>{"use strict";var $m=Sr&&Sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.ParsingResult=Sr.ParsingComponents=Sr.ReferenceWithTimezone=void 0;var fw=$m(qm()),uo=$m(be()),bl=Kt(),pw=Gm();uo.default.extend(fw.default);var Tl=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=pw.toTimezoneOffset(e.timezone))}};Sr.ReferenceWithTimezone=Tl;var qn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=uo.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new qn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return uo.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let s=-e.getTimezoneOffset(),i=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-i}static createRelativeFromReference(e,t){let n=uo.default(e.instant);for(let i in t)n=n.add(t[i],i);let s=new qn(e);return t.hour||t.minute||t.second?(bl.assignSimilarTime(s,n),bl.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(bl.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};Sr.ParsingComponents=qn;var vi=class{constructor(e,t,n,s,i){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new qn(e),this.end=i}clone(){let e=new vi(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}', ...}]`}};Sr.ParsingResult=vi});var Y=T(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.AbstractParserWithWordBoundaryChecking=void 0;var _l=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let i=2;i{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var wl=lt(),mw=Le(),hw=Y(),gw=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${wl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),yw=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${wl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),vl=class extends hw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?yw:gw}innerExtract(e,t){let n=wl.parseTimeUnits(t[1]);return mw.ParsingComponents.createRelativeFromReference(e.reference,n)}};El.default=vl});var Xm=T(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var bw=ut(),Km=lt(),Qm=lt(),co=lt(),Tw=Oe(),_w=Y(),vw=new RegExp(`(?:on\\s{0,3})?(${co.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${co.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Tw.matchAnyPattern(Km.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Qm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Hm=1,zm=2,ww=3,Vm=4,kl=class extends _w.AbstractParserWithWordBoundaryChecking{innerPattern(){return vw}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Km.MONTH_DICTIONARY[t[ww].toLowerCase()],i=co.parseOrdinalNumberPattern(t[Hm]);if(i>31)return t.index=t.index+t[Hm].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[Vm]){let a=Qm.parseYear(t[Vm]);n.start.assign("year",a)}else{let a=bw.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[zm]){let a=co.parseOrdinalNumberPattern(t[zm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Sl.default=kl});var rh=T(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var Ew=ut(),eh=lt(),fo=lt(),th=lt(),kw=Oe(),Sw=Y(),Ow=new RegExp(`(${kw.matchAnyPattern(eh.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${fo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${fo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${th.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),Dw=1,xw=2,Zm=3,Jm=4,Ol=class extends Sw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ow}innerExtract(e,t){let n=eh.MONTH_DICTIONARY[t[Dw].toLowerCase()],s=fo.parseOrdinalNumberPattern(t[xw]);if(s>31)return null;let i=e.createParsingComponents({day:s,month:n});if(t[Jm]){let u=th.parseYear(t[Jm]);i.assign("year",u)}else{let u=Ew.findYearClosestToRef(e.refDate,s,n);i.imply("year",u)}if(!t[Zm])return i;let a=fo.parseOrdinalNumberPattern(t[Zm]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",a),o}};Dl.default=Ol});var ih=T(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var xl=lt(),Rw=ut(),Mw=Oe(),sh=lt(),Cw=Y(),Aw=new RegExp(`((?:in)\\s*)?(${Mw.matchAnyPattern(xl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${sh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Pw=1,Nw=2,nh=3,Rl=class extends Cw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Aw}innerExtract(e,t){let n=t[Nw].toLowerCase();if(t[0].length<=3&&!xl.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[Pw]||"").length,t.index+t[0].length);s.start.imply("day",1);let i=xl.MONTH_DICTIONARY[n];if(s.start.assign("month",i),t[nh]){let a=sh.parseYear(t[nh]);s.start.assign("year",a)}else{let a=Rw.findYearClosestToRef(e.refDate,1,i);s.start.imply("year",a)}return s}};Ml.default=Rl});var uh=T(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var oh=lt(),Iw=Oe(),Fw=Y(),Lw=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Iw.matchAnyPattern(oh.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Uw=1,qw=2,ah=3,Ww=4,Cl=class extends Fw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Lw}innerExtract(e,t){let n=t[ah]?parseInt(t[ah]):oh.MONTH_DICTIONARY[t[qw].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[Uw]);return{day:parseInt(t[Ww]),month:n,year:s}}};Al.default=Cl});var lh=T(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});var Yw=Y(),jw=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Gw=1,$w=2,Pl=class extends Yw.AbstractParserWithWordBoundaryChecking{innerPattern(){return jw}innerExtract(e,t){let n=parseInt(t[$w]),s=parseInt(t[Gw]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Nl.default=Pl});var Wn=T(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.AbstractTimeExpressionParser=void 0;var Ot=ze();function Bw(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 Hw(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 ch=2,bs=3,po=4,mo=5,wi=6,Il=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let s=t.index+t[1].length,i=t[0].substring(t[1].length),a=e.createParsingResult(s,i,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return i.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),i=0,a=null,o=parseInt(t[ch]);if(o>100){if(this.strictMode||t[bs]!=null)return null;i=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[bs]!=null){if(t[bs].length==1&&!t[wi])return null;i=parseInt(t[bs])}if(i>=60)return null;if(o>12&&(a=Ot.Meridiem.PM),t[wi]!=null){if(o>12)return null;let u=t[wi][0].toLowerCase();u=="a"&&(a=Ot.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Ot.Meridiem.PM,o!=12&&(o+=12))}if(s.assign("hour",o),s.assign("minute",i),a!==null?s.assign("meridiem",a):o<12?s.imply("meridiem",Ot.Meridiem.AM):s.imply("meridiem",Ot.Meridiem.PM),t[mo]!=null){let u=parseInt(t[mo].substring(0,3));if(u>=1e3)return null;s.assign("millisecond",u)}if(t[po]!=null){let u=parseInt(t[po]);if(u>=60)return null;s.assign("second",u)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[mo]!=null){let u=parseInt(t[mo].substring(0,3));if(u>=1e3)return null;s.assign("millisecond",u)}if(t[po]!=null){let u=parseInt(t[po]);if(u>=60)return null;s.assign("second",u)}let i=parseInt(t[ch]),a=0,o=-1;if(t[bs]!=null?a=parseInt(t[bs]):i>100&&(a=i%100,i=Math.floor(i/100)),a>=60||i>24)return null;if(i>=12&&(o=Ot.Meridiem.PM),t[wi]!=null){if(i>12)return null;let u=t[wi][0].toLowerCase();u=="a"&&(o=Ot.Meridiem.AM,i==12&&(i=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),u=="p"&&(o=Ot.Meridiem.PM,i!=12&&(i+=12)),n.start.isCertain("meridiem")||(o==Ot.Meridiem.AM?(n.start.imply("meridiem",Ot.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ot.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",i),s.assign("minute",a),o>=0?s.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>i?s.imply("meridiem",Ot.Meridiem.AM):i<=12&&(s.assign("hour",i+12),s.assign("meridiem",Ot.Meridiem.PM)):i>12?s.imply("meridiem",Ot.Meridiem.PM):i<=12&&s.imply("meridiem",Ot.Meridiem.AM),s.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let i=parseInt(s),a=parseInt(n);if(i>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Bw(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=Hw(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};ho.AbstractTimeExpressionParser=Il});var dh=T(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var go=ze(),zw=Wn(),Fl=class extends zw.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",go.Meridiem.PM)):s<6&&n.assign("meridiem",go.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",go.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",go.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Ll.default=Fl});var Qt=T(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.addImpliedTimeUnits=Ts.reverseTimeUnits=void 0;function Vw(r){let e={};for(let t in r)e[t]=-r[t];return e}Ts.reverseTimeUnits=Vw;function Kw(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}Ts.addImpliedTimeUnits=Kw});var fh=T(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var ql=lt(),Qw=Le(),Xw=Y(),Zw=Qt(),Jw=new RegExp(`(${ql.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),eE=new RegExp(`(${ql.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Ul=class extends Xw.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?eE:Jw}innerExtract(e,t){let n=ql.parseTimeUnits(t[1]),s=Zw.reverseTimeUnits(n);return Qw.ParsingComponents.createRelativeFromReference(e.reference,s)}};Wl.default=Ul});var ph=T(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var jl=lt(),tE=Le(),rE=Y(),nE=new RegExp(`(${jl.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),sE=new RegExp("("+jl.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),iE=1,Yl=class extends rE.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?sE:nE}innerExtract(e,t){let n=jl.parseTimeUnits(t[iE]);return tE.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gl.default=Yl});var vs=T(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.MergingRefiner=_s.Filter=void 0;var $l=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};_s.Filter=$l;var Bl=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],i=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),s=c}}return s!=null&&n.push(s),n}};_s.MergingRefiner=Bl});var Or=T(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var aE=vs(),Hl=class extends aE.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(i=>{t.start.isCertain(i)||t.start.assign(i,n.start.get(i))}),t.start.getCertainComponents().forEach(i=>{n.start.isCertain(i)||n.start.assign(i,t.start.get(i))})),t.start.date().getTime()>n.start.date().getTime()){let i=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&i.add(-7,"days").isBefore(a)?(i=i.add(-7,"days"),t.start.imply("day",i.date()),t.start.imply("month",i.month()+1),t.start.imply("year",i.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(i)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index{"use strict";var oE=Ei&&Ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ei,"__esModule",{value:!0});var uE=oE(Or()),Vl=class extends uE.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Ei.default=Vl});var hh=T(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.mergeDateTimeComponent=ws.mergeDateTimeResult=void 0;var lE=ze();function cE(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=Kl(n,s),r.end!=null||e.end!=null){let i=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=Kl(i,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var dE=vs(),gh=hh(),Ql=class extends dE.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let s=t.start.isOnlyDate()?gh.mergeDateTimeResult(t,n):gh.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};Xl.default=Ql});var yh=T(ki=>{"use strict";var fE=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});var pE=fE(Yr()),Zl=class extends pE.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};ki.default=Zl});var bh=T(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var mE=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),hE={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},Jl=class{constructor(e){this.timezone=Object.assign(Object.assign({},hE),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(i=>{var a,o;let u=e.text.substring(i.index+i.text.length),l=mE.exec(u);if(!l)return;let c=l[1].toUpperCase(),f=(o=(a=s[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(f===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${f} for: ${i.start}`)});let m=i.start.get("timezoneOffset");m!==null&&f!=m&&(i.start.isCertain("timezoneOffset")||c!=l[1])||i.start.isOnlyDate()&&c!=l[1]||(i.text+=l[0],i.start.isCertain("timezoneOffset")||i.start.assign("timezoneOffset",f),i.end!=null&&!i.end.isCertain("timezoneOffset")&&i.end.assign("timezoneOffset",f))}),t}};ec.default=Jl});var yo=T(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var gE=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),yE=1,bE=2,TE=3,tc=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),i=gE.exec(s);if(!i)return;e.debug(()=>{console.log(`Extracting timezone: '${i[0]}' into : ${n}`)});let a=parseInt(i[bE]),o=parseInt(i[TE]||"0"),u=a*60+o;u>14*60||(i[yE]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=i[0])}),t}};rc.default=tc});var Th=T(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var nc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let i=1;is.text.length&&(s=a):(n.push(s),s=a)}return s!=null&&n.push(s),n}};sc.default=nc});var _h=T(Si=>{"use strict";var _E=Si&&Si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Si,"__esModule",{value:!0});var vE=_E(be()),ic=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=vE.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let i=0;i<3&&s.isAfter(n.start.dayjs());i++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Si.default=ic});var vh=T(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var wE=vs(),ac=class extends wE.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}};oc.default=ac});var cc=T(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var EE=Y(),kE=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"),SE=1,OE=2,DE=3,wh=4,xE=5,Eh=6,kh=7,Sh=8,Oh=9,uc=class extends EE.AbstractParserWithWordBoundaryChecking{innerPattern(){return kE}innerExtract(e,t){let n={};if(n.year=parseInt(t[SE]),n.month=parseInt(t[OE]),n.day=parseInt(t[DE]),t[wh]!=null)if(n.hour=parseInt(t[wh]),n.minute=parseInt(t[xE]),t[Eh]!=null&&(n.second=parseInt(t[Eh])),t[kh]!=null&&(n.millisecond=parseInt(t[kh])),t[Sh]==null)n.timezoneOffset=0;else{let s=parseInt(t[Sh]),i=0;t[Oh]!=null&&(i=parseInt(t[Oh]));let a=s*60;a<0?a-=i:a+=i,n.timezoneOffset=a}return n}};lc.default=uc});var Dh=T(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var RE=vs(),dc=class extends RE.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};fc.default=dc});var jr=T(Es=>{"use strict";var Yn=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});Es.includeCommonConfiguration=void 0;var ME=Yn(bh()),CE=Yn(yo()),xh=Yn(Th()),AE=Yn(_h()),PE=Yn(vh()),NE=Yn(cc()),IE=Yn(Dh());function FE(r,e=!1){return r.parsers.unshift(new NE.default),r.refiners.unshift(new IE.default),r.refiners.unshift(new ME.default),r.refiners.unshift(new CE.default),r.refiners.unshift(new xh.default),r.refiners.push(new xh.default),r.refiners.push(new AE.default),r.refiners.push(new PE.default(e)),r}Es.includeCommonConfiguration=FE});var $r=T(we=>{"use strict";var LE=we&&we.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(we,"__esModule",{value:!0});we.noon=we.morning=we.midnight=we.yesterdayEvening=we.evening=we.lastNight=we.tonight=we.theDayAfter=we.tomorrow=we.theDayBefore=we.yesterday=we.today=we.now=void 0;var Dr=Le(),ks=LE(be()),Gr=Kt(),Oi=ze();function UE(r){let e=ks.default(r.instant),t=new Dr.ParsingComponents(r,{});return Gr.assignSimilarDate(t,e),Gr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}we.now=UE;function qE(r){let e=ks.default(r.instant),t=new Dr.ParsingComponents(r,{});return Gr.assignSimilarDate(t,e),Gr.implySimilarTime(t,e),t}we.today=qE;function WE(r){return Rh(r,1)}we.yesterday=WE;function Rh(r,e){return pc(r,-e)}we.theDayBefore=Rh;function YE(r){return pc(r,1)}we.tomorrow=YE;function pc(r,e){let t=ks.default(r.instant),n=new Dr.ParsingComponents(r,{});return t=t.add(e,"day"),Gr.assignSimilarDate(n,t),Gr.implySimilarTime(n,t),n}we.theDayAfter=pc;function jE(r,e=22){let t=ks.default(r.instant),n=new Dr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Oi.Meridiem.PM),Gr.assignSimilarDate(n,t),n}we.tonight=jE;function GE(r,e=0){let t=ks.default(r.instant),n=new Dr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Gr.assignSimilarDate(n,t),n.imply("hour",e),n}we.lastNight=GE;function $E(r,e=20){let t=new Dr.ParsingComponents(r,{});return t.imply("meridiem",Oi.Meridiem.PM),t.imply("hour",e),t}we.evening=$E;function BE(r,e=20){let t=ks.default(r.instant),n=new Dr.ParsingComponents(r,{});return t=t.add(-1,"day"),Gr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",Oi.Meridiem.PM),n}we.yesterdayEvening=BE;function HE(r){let e=new Dr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}we.midnight=HE;function zE(r,e=6){let t=new Dr.ParsingComponents(r,{});return t.imply("meridiem",Oi.Meridiem.AM),t.imply("hour",e),t}we.morning=zE;function VE(r){let e=new Dr.ParsingComponents(r,{});return e.imply("meridiem",Oi.Meridiem.AM),e.imply("hour",12),e}we.noon=VE});var Mh=T(dr=>{"use strict";var KE=dr&&dr.__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]}),QE=dr&&dr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),XE=dr&&dr.__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)&&KE(e,r,t);return QE(e,r),e},ZE=dr&&dr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dr,"__esModule",{value:!0});var JE=ZE(be()),ek=Y(),tk=Kt(),Di=XE($r()),rk=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,mc=class extends ek.AbstractParserWithWordBoundaryChecking{innerPattern(e){return rk}innerExtract(e,t){let n=JE.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();switch(s){case"now":return Di.now(e.reference);case"today":return Di.today(e.reference);case"yesterday":return Di.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Di.tomorrow(e.reference);case"tonight":return Di.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),tk.assignSimilarDate(i,n),i.imply("hour",0));break}return i}};dr.default=mc});var Ch=T(xi=>{"use strict";var nk=xi&&xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xi,"__esModule",{value:!0});var bo=ze(),sk=Y(),ik=nk(be()),ak=Kt(),ok=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,hc=class extends sk.AbstractParserWithWordBoundaryChecking{innerPattern(){return ok}innerExtract(e,t){let n=ik.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",bo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",bo.Meridiem.PM),s.imply("hour",20);break;case"midnight":ak.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",bo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",bo.Meridiem.AM),s.imply("hour",12);break}return s}};xi.default=hc});var jn=T(hn=>{"use strict";var uk=hn&&hn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hn,"__esModule",{value:!0});hn.toDayJSClosestWeekday=hn.toDayJSWeekday=void 0;var Ah=uk(be());function lk(r,e,t){if(!t)return Ph(r,e);let n=Ah.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}hn.toDayJSWeekday=lk;function Ph(r,e){let t=Ah.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Nh=lt(),ck=Oe(),dk=Y(),fk=jn(),pk=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${ck.matchAnyPattern(Nh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),mk=1,hk=2,gk=3,gc=class extends dk.AbstractParserWithWordBoundaryChecking{innerPattern(){return pk}innerExtract(e,t){let n=t[hk].toLowerCase(),s=Nh.WEEKDAY_DICTIONARY[n],i=t[mk],a=t[gk],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=fk.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};yc.default=gc});var Uh=T(Ri=>{"use strict";var yk=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});var Lh=lt(),Fh=Le(),bk=yk(be()),Tk=Y(),_k=Oe(),vk=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${_k.matchAnyPattern(Lh.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),wk=1,Ek=2,bc=class extends Tk.AbstractParserWithWordBoundaryChecking{innerPattern(){return vk}innerExtract(e,t){let n=t[wk].toLowerCase(),s=t[Ek].toLowerCase(),i=Lh.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let u={};return u[i]=1,Fh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[i]=-1,Fh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=bk.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}};Ri.default=bc});var fr=T(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.ParsingContext=Ds.Chrono=void 0;var Ss=Le(),kk=Tc(),Os=class{constructor(e){e=e||kk.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Os({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new To(e,t,n),i=[];return this.parsers.forEach(a=>{let o=Os.executeParser(s,a);i=i.concat(o)}),i.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){i=a.refine(s,i)}),i}static executeParser(e,t){let n=[],s=t.pattern(e),i=e.text,a=e.text,o=s.exec(a);for(;o;){let u=o.index+i.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=i.substring(o.index+1),o=s.exec(a);continue}let c=null;l instanceof Ss.ParsingResult?c=l:l instanceof Ss.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=i.substring(u+c.text.length),o=s.exec(a)}return n}};Ds.Chrono=Os;var To=class{constructor(e,t,n){this.text=e,this.reference=new Ss.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Ss.ParsingComponents?e:new Ss.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let i=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=s?this.createParsingComponents(s):null;return new Ss.ParsingResult(this.reference,e,i,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};Ds.ParsingContext=To});var Gn=T(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var qh=ut(),Sk=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"),_o=1,Wh=5,Yh=2,jh=3,_c=4,vc=class{constructor(e){this.groupNumberMonth=e?jh:Yh,this.groupNumberDay=e?Yh:jh}pattern(){return Sk}extract(e,t){if(t[_o]=="/"||t[Wh]=="/"){t.index+=t[0].length;return}let n=t.index+t[_o].length,s=t[0].substr(t[_o].length,t[0].length-t[_o].length-t[Wh].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[_c]&&t[0].indexOf("/")<0)return;let i=e.createParsingResult(n,s),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(i.start.assign("day",o),i.start.assign("month",a),t[_c]){let u=parseInt(t[_c]),l=qh.findMostLikelyADYear(u);i.start.assign("year",l)}else{let u=qh.findYearClosestToRef(e.refDate,o,a);i.start.imply("year",u)}return i}};wc.default=vc});var $h=T(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var Gh=lt(),Ok=Le(),Dk=Y(),xk=Qt(),Rk=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Gh.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Ec=class extends Dk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Rk}innerExtract(e,t){let n=t[1].toLowerCase(),s=Gh.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=xk.reverseTimeUnits(s);break}return Ok.ParsingComponents.createRelativeFromReference(e.reference,s)}};kc.default=Ec});var Hh=T(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var Mk=vs(),Sc=Le(),Ck=lt(),Ak=Qt();function Bh(r){return r.text.match(/\s+(before|from)$/i)!=null}function Pk(r){return r.text.match(/\s+(after|since)$/i)!=null}var Oc=class extends Mk.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Bh(t)&&!Pk(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=Ck.parseTimeUnits(t.text);Bh(t)&&(s=Ak.reverseTimeUnits(s));let i=Sc.ParsingComponents.createRelativeFromReference(new Sc.ReferenceWithTimezone(n.start.date()),s);return new Sc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,i)}};Dc.default=Oc});var Tc=T(Ge=>{"use strict";var Xe=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createConfiguration=Ge.createCasualConfiguration=Ge.parseDate=Ge.parse=Ge.GB=Ge.strict=Ge.casual=void 0;var Nk=Xe(Bm()),Ik=Xe(Xm()),Fk=Xe(rh()),Lk=Xe(ih()),Uk=Xe(uh()),qk=Xe(lh()),Wk=Xe(dh()),Yk=Xe(fh()),jk=Xe(ph()),Gk=Xe(mh()),$k=Xe(yh()),Bk=jr(),Hk=Xe(Mh()),zk=Xe(Ch()),Vk=Xe(Ih()),Kk=Xe(Uh()),xc=fr(),Qk=Xe(Gn()),Xk=Xe($h()),Zk=Xe(Hh());Ge.casual=new xc.Chrono(zh(!1));Ge.strict=new xc.Chrono(vo(!0,!1));Ge.GB=new xc.Chrono(vo(!1,!0));function Jk(r,e,t){return Ge.casual.parse(r,e,t)}Ge.parse=Jk;function e1(r,e,t){return Ge.casual.parseDate(r,e,t)}Ge.parseDate=e1;function zh(r=!1){let e=vo(!1,r);return e.parsers.unshift(new Hk.default),e.parsers.unshift(new zk.default),e.parsers.unshift(new Lk.default),e.parsers.unshift(new Kk.default),e.parsers.unshift(new Xk.default),e}Ge.createCasualConfiguration=zh;function vo(r=!0,e=!1){return Bk.includeCommonConfiguration({parsers:[new Qk.default(e),new Nk.default,new Ik.default,new Fk.default,new Vk.default,new Uk.default,new qk.default,new Wk.default(r),new Yk.default(r),new jk.default(r)],refiners:[new Zk.default,new $k.default,new Gk.default]},r)}Ge.createConfiguration=vo});var Vh=T(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var t1=Wn(),Rc=class extends t1.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)}};Mc.default=Rc});var Mi=T(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.parseTimeUnits=xe.TIME_UNITS_PATTERN=xe.parseYear=xe.YEAR_PATTERN=xe.parseNumberPattern=xe.NUMBER_PATTERN=xe.TIME_UNIT_DICTIONARY=xe.INTEGER_WORD_DICTIONARY=xe.MONTH_DICTIONARY=xe.WEEKDAY_DICTIONARY=void 0;var Cc=Oe(),r1=ut();xe.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};xe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};xe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};xe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};xe.NUMBER_PATTERN=`(?:${Cc.matchAnyPattern(xe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Qh(r){let e=r.toLowerCase();return xe.INTEGER_WORD_DICTIONARY[e]!==void 0?xe.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}xe.parseNumberPattern=Qh;xe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function n1(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 r1.findMostLikelyADYear(e)}xe.parseYear=n1;var Xh=`(${xe.NUMBER_PATTERN})\\s{0,5}(${Cc.matchAnyPattern(xe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Kh=new RegExp(Xh,"i");xe.TIME_UNITS_PATTERN=Cc.repeatedTimeunitPattern("",Xh);function s1(r){let e={},t=r,n=Kh.exec(t);for(;n;)i1(e,n),t=t.substring(n[0].length),n=Kh.exec(t);return e}xe.parseTimeUnits=s1;function i1(r,e){let t=Qh(e[1]),n=xe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Jh=T(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var Zh=Mi(),a1=Oe(),o1=Y(),u1=jn(),l1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${a1.matchAnyPattern(Zh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),c1=1,d1=3,f1=2,Ac=class extends o1.AbstractParserWithWordBoundaryChecking{innerPattern(){return l1}innerExtract(e,t){let n=t[f1].toLowerCase(),s=Zh.WEEKDAY_DICTIONARY[n],i=t[c1],a=t[d1],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=u1.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Pc.default=Ac});var ng=T(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var gn=ze(),p1=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"),m1=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"),h1=2,eg=3,tg=4,rg=5,xs=class{pattern(e){return p1}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=xs.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),i=m1.exec(s);return i&&(n.end=xs.extractTimeComponent(n.start.clone(),i),n.end&&(n.text+=i[0])),n}static extractTimeComponent(e,t){let n=0,s=0,i=null;if(n=parseInt(t[h1]),t[eg]!=null&&(s=parseInt(t[eg])),s>=60||n>24)return null;if(n>=12&&(i=gn.Meridiem.PM),t[rg]!=null){if(n>12)return null;let a=t[rg].toLowerCase();a.match(/morgen|vormittag/)&&(i=gn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(i=gn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(i=gn.Meridiem.AM,n=0):n<6?i=gn.Meridiem.AM:(i=gn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),i!==null?e.assign("meridiem",i):n<12?e.imply("meridiem",gn.Meridiem.AM):e.imply("meridiem",gn.Meridiem.PM),t[tg]!=null){let a=parseInt(t[tg]);if(a>=60)return null;e.assign("second",a)}return e}};Nc.default=xs});var sg=T(Ci=>{"use strict";var g1=Ci&&Ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ci,"__esModule",{value:!0});var y1=g1(Or()),Ic=class extends y1.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Ci.default=Ic});var ig=T(Ai=>{"use strict";var b1=Ai&&Ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ai,"__esModule",{value:!0});var T1=b1(Yr()),Fc=class extends T1.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Ai.default=Fc});var Lc=T(Ni=>{"use strict";var _1=Ni&&Ni.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ni,"__esModule",{value:!0});var v1=_1(be()),$n=ze(),w1=Y(),E1=Kt(),k1=Qt(),Pi=class extends w1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=v1.default(e.refDate),s=t[2].toLowerCase(),i=e.createParsingComponents();return E1.implySimilarTime(i,n),Pi.extractTimeComponents(i,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=k1.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",$n.Meridiem.AM);break}return e}};Ni.default=Pi});var ug=T(pr=>{"use strict";var S1=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]}),O1=pr&&pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),D1=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)&&S1(e,r,t);return O1(e,r),e},og=pr&&pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pr,"__esModule",{value:!0});var x1=og(be()),R1=Y(),Bn=Kt(),M1=og(Lc()),ag=D1($r()),C1=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),A1=1,P1=2,Uc=class extends R1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return C1}innerExtract(e,t){let n=x1.default(e.refDate),s=(t[A1]||"").toLowerCase(),i=(t[P1]||"").toLowerCase(),a=e.createParsingComponents();switch(s){case"jetzt":a=ag.now(e.reference);break;case"heute":a=ag.today(e.reference);break;case"morgen":Bn.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Bn.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Bn.assignSimilarDate(a,n),Bn.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Bn.assignSimilarDate(a,n),Bn.implySimilarTime(a,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Bn.assignSimilarDate(a,n),a.imply("hour",0));break}return i&&(a=M1.default.extractTimeComponents(a,i)),a}};pr.default=Uc});var mg=T(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var N1=ut(),fg=Mi(),pg=Mi(),I1=Oe(),F1=Y(),L1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${I1.matchAnyPattern(fg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${pg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),lg=1,cg=2,U1=3,dg=4,qc=class extends F1.AbstractParserWithWordBoundaryChecking{innerPattern(){return L1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=fg.MONTH_DICTIONARY[t[U1].toLowerCase()],i=parseInt(t[lg]);if(i>31)return t.index=t.index+t[lg].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[dg]){let a=pg.parseYear(t[dg]);n.start.assign("year",a)}else{let a=N1.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[cg]){let a=parseInt(t[cg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Wc.default=qc});var hg=T(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var wo=Mi(),q1=Le(),W1=Y(),Y1=Qt(),j1=Oe(),Yc=class extends W1.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*)?(${wo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${j1.matchAnyPattern(wo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?wo.parseNumberPattern(t[2]):1,s=wo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],i={};i[s]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(i=Y1.reverseTimeUnits(i)),q1.ParsingComponents.createRelativeFromReference(e.reference,i)}};jc.default=Yc});var bg=T(Ze=>{"use strict";var mr=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 G1=jr(),gg=fr(),$1=mr(Gn()),B1=mr(cc()),H1=mr(Vh()),z1=mr(Jh()),V1=mr(ng()),K1=mr(sg()),Q1=mr(ig()),X1=mr(ug()),Z1=mr(Lc()),J1=mr(mg()),eS=mr(hg());Ze.casual=new gg.Chrono(yg());Ze.strict=new gg.Chrono(Gc(!0));function tS(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=tS;function rS(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=rS;function yg(r=!0){let e=Gc(!1,r);return e.parsers.unshift(new Z1.default),e.parsers.unshift(new X1.default),e.parsers.unshift(new eS.default),e}Ze.createCasualConfiguration=yg;function Gc(r=!0,e=!0){return G1.includeCommonConfiguration({parsers:[new B1.default,new $1.default(e),new H1.default,new V1.default,new J1.default,new z1.default],refiners:[new K1.default,new Q1.default]},r)}Ze.createConfiguration=Gc});var _g=T(hr=>{"use strict";var nS=hr&&hr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),sS=hr&&hr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),iS=hr&&hr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&nS(e,r,t);return sS(e,r),e},aS=hr&&hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hr,"__esModule",{value:!0});var oS=aS(be()),uS=ze(),lS=Y(),Tg=Kt(),Eo=iS($r()),$c=class extends lS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=oS.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();switch(s){case"maintenant":return Eo.now(e.reference);case"aujourd'hui":return Eo.today(e.reference);case"hier":return Eo.yesterday(e.reference);case"demain":return Eo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(Tg.assignSimilarDate(i,n),i.imply("hour",22),i.imply("meridiem",uS.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),Tg.assignSimilarDate(i,n),i.imply("hour",0))}return i}};hr.default=$c});var vg=T(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var Ii=ze(),cS=Y(),Bc=class extends cS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",Ii.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",Ii.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",Ii.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",Ii.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",Ii.Meridiem.AM);break}return s}};Hc.default=Bc});var wg=T(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var dS=Wn(),zc=class extends dS.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)}};Vc.default=zc});var Eg=T(Fi=>{"use strict";var fS=Fi&&Fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fi,"__esModule",{value:!0});var pS=fS(Yr()),Kc=class extends pS.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Fi.default=Kc});var kg=T(Li=>{"use strict";var mS=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});var hS=mS(Or()),Qc=class extends hS.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Li.default=Qc});var yn=T(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.parseTimeUnits=Te.TIME_UNITS_PATTERN=Te.parseYear=Te.YEAR_PATTERN=Te.parseOrdinalNumberPattern=Te.ORDINAL_NUMBER_PATTERN=Te.parseNumberPattern=Te.NUMBER_PATTERN=Te.TIME_UNIT_DICTIONARY=Te.INTEGER_WORD_DICTIONARY=Te.MONTH_DICTIONARY=Te.WEEKDAY_DICTIONARY=void 0;var Xc=Oe();Te.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};Te.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};Te.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};Te.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};Te.NUMBER_PATTERN=`(?:${Xc.matchAnyPattern(Te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Og(r){let e=r.toLowerCase();return Te.INTEGER_WORD_DICTIONARY[e]!==void 0?Te.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Te.parseNumberPattern=Og;Te.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function gS(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Te.parseOrdinalNumberPattern=gS;Te.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function yS(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}Te.parseYear=yS;var Dg=`(${Te.NUMBER_PATTERN})\\s{0,5}(${Xc.matchAnyPattern(Te.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Sg=new RegExp(Dg,"i");Te.TIME_UNITS_PATTERN=Xc.repeatedTimeunitPattern("",Dg);function bS(r){let e={},t=r,n=Sg.exec(t);for(;n;)TS(e,n),t=t.substring(n[0].length),n=Sg.exec(t);return e}Te.parseTimeUnits=bS;function TS(r,e){let t=Og(e[1]),n=Te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Rg=T(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var xg=yn(),_S=Oe(),vS=Y(),wS=jn(),ES=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${_S.matchAnyPattern(xg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),kS=1,SS=2,Zc=class extends vS.AbstractParserWithWordBoundaryChecking{innerPattern(){return ES}innerExtract(e,t){let n=t[kS].toLowerCase(),s=xg.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let i=t[SS];i=i||"",i=i.toLowerCase();let a=null;i=="dernier"?a="last":i=="prochain"&&(a="next");let o=wS.toDayJSWeekday(e.refDate,s,a);return e.createParsingComponents().assign("weekday",s).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Jc.default=Zc});var Pg=T(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var Ui=ze(),OS=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"),DS=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"),xS=2,Mg=3,Cg=4,Ag=5,Rs=class{pattern(e){return OS}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Rs.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),i=DS.exec(s);return i&&(n.end=Rs.extractTimeComponent(n.start.clone(),i),n.end&&(n.text+=i[0])),n}static extractTimeComponent(e,t){let n=0,s=0,i=null;if(n=parseInt(t[xS]),t[Mg]!=null&&(s=parseInt(t[Mg])),s>=60||n>24)return null;if(n>=12&&(i=Ui.Meridiem.PM),t[Ag]!=null){if(n>12)return null;let a=t[Ag][0].toLowerCase();a=="a"&&(i=Ui.Meridiem.AM,n==12&&(n=0)),a=="p"&&(i=Ui.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),i!==null?e.assign("meridiem",i):n<12?e.imply("meridiem",Ui.Meridiem.AM):e.imply("meridiem",Ui.Meridiem.PM),t[Cg]!=null){let a=parseInt(t[Cg]);if(a>=60)return null;e.assign("second",a)}return e}};ed.default=Rs});var qg=T(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var RS=ut(),Lg=yn(),Ug=yn(),ko=yn(),MS=Oe(),CS=Y(),AS=new RegExp(`(?:on\\s*?)?(${ko.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${ko.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${MS.matchAnyPattern(Lg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Ug.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ng=1,Ig=2,PS=3,Fg=4,td=class extends CS.AbstractParserWithWordBoundaryChecking{innerPattern(){return AS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Lg.MONTH_DICTIONARY[t[PS].toLowerCase()],i=ko.parseOrdinalNumberPattern(t[Ng]);if(i>31)return t.index=t.index+t[Ng].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[Fg]){let a=Ug.parseYear(t[Fg]);n.start.assign("year",a)}else{let a=RS.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[Ig]){let a=ko.parseOrdinalNumberPattern(t[Ig]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};rd.default=td});var Yg=T(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var Wg=yn(),NS=Le(),IS=Y(),FS=Qt(),nd=class extends IS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Wg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Wg.parseTimeUnits(t[1]),s=FS.reverseTimeUnits(n);return NS.ParsingComponents.createRelativeFromReference(e.reference,s)}};sd.default=nd});var Gg=T(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var jg=yn(),LS=Le(),US=Y(),id=class extends US.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${jg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=jg.parseTimeUnits(t[1]);return LS.ParsingComponents.createRelativeFromReference(e.reference,n)}};ad.default=id});var $g=T(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var So=yn(),qS=Le(),WS=Y(),YS=Qt(),jS=Oe(),od=class extends WS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${So.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${jS.matchAnyPattern(So.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]?So.parseNumberPattern(t[1]):1,s=So.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],i={};i[s]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(i=YS.reverseTimeUnits(i)),qS.ParsingComponents.createRelativeFromReference(e.reference,i)}};ud.default=od});var zg=T(Je=>{"use strict";var Xt=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var GS=jr(),Bg=fr(),$S=Xt(_g()),BS=Xt(vg()),HS=Xt(Gn()),zS=Xt(wg()),VS=Xt(Eg()),KS=Xt(kg()),QS=Xt(Rg()),XS=Xt(Pg()),ZS=Xt(qg()),JS=Xt(Yg()),eO=Xt(Gg()),tO=Xt($g());Je.casual=new Bg.Chrono(Hg());Je.strict=new Bg.Chrono(ld(!0));function rO(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=rO;function nO(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=nO;function Hg(r=!0){let e=ld(!1,r);return e.parsers.unshift(new $S.default),e.parsers.unshift(new BS.default),e.parsers.unshift(new tO.default),e}Je.createCasualConfiguration=Hg;function ld(r=!0,e=!0){return GS.includeCommonConfiguration({parsers:[new HS.default(e),new ZS.default,new zS.default,new XS.default,new JS.default,new eO.default,new QS.default],refiners:[new VS.default,new KS.default]},r)}Je.createConfiguration=ld});var Vg=T(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.toHankaku=void 0;function sO(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,iO)}Oo.toHankaku=sO;function iO(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Qg=T(qi=>{"use strict";var aO=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});var cd=Vg(),oO=ut(),uO=aO(be()),lO=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Kg=1,cO=2,dd=3,dO=4,fO=5,pO=6,fd=class{pattern(){return lO}extract(e,t){let n=parseInt(cd.toHankaku(t[fO])),s=parseInt(cd.toHankaku(t[pO])),i=e.createParsingComponents({day:s,month:n});if(t[Kg]&&t[Kg].match("\u540C|\u4ECA|\u672C")){let a=uO.default(e.refDate);i.assign("year",a.year())}if(t[cO]){let a=t[dO],o=a=="\u5143"?1:parseInt(cd.toHankaku(a));t[dd]=="\u4EE4\u548C"?o+=2018:t[dd]=="\u5E73\u6210"?o+=1988:t[dd]=="\u662D\u548C"&&(o+=1925),i.assign("year",o)}else{let a=oO.findYearClosestToRef(e.refDate,s,n);i.imply("year",a)}return i}};qi.default=fd});var Xg=T(Wi=>{"use strict";var mO=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var hO=mO(Or()),pd=class extends hO.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Wi.default=pd});var Jg=T(gr=>{"use strict";var gO=gr&&gr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),yO=gr&&gr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),bO=gr&&gr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&gO(e,r,t);return yO(e,r),e},TO=gr&&gr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gr,"__esModule",{value:!0});var _O=TO(be()),Zg=ze(),md=bO($r()),vO=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,hd=class{pattern(){return vO}extract(e,t){let n=t[0],s=_O.default(e.refDate),i=e.createParsingComponents();switch(n){case"\u6628\u65E5":return md.yesterday(e.reference);case"\u660E\u65E5":return md.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return md.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(i.imply("hour",22),i.assign("meridiem",Zg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(i.imply("hour",6),i.assign("meridiem",Zg.Meridiem.AM)),i.assign("day",s.date()),i.assign("month",s.month()+1),i.assign("year",s.year()),i}};gr.default=hd});var ry=T(et=>{"use strict";var gd=et&&et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(et,"__esModule",{value:!0});et.createConfiguration=et.createCasualConfiguration=et.parseDate=et.parse=et.strict=et.casual=void 0;var wO=gd(Qg()),EO=gd(Xg()),kO=gd(Jg()),ey=fr();et.casual=new ey.Chrono(ty());et.strict=new ey.Chrono(yd());function SO(r,e,t){return et.casual.parse(r,e,t)}et.parse=SO;function OO(r,e,t){return et.casual.parseDate(r,e,t)}et.parseDate=OO;function ty(){let r=yd();return r.parsers.unshift(new kO.default),r}et.createCasualConfiguration=ty;function yd(){return{parsers:[new wO.default],refiners:[new EO.default]}}et.createConfiguration=yd});var Do=T(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.parseYear=xr.YEAR_PATTERN=xr.MONTH_DICTIONARY=xr.WEEKDAY_DICTIONARY=void 0;xr.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};xr.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};xr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function DO(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)}xr.parseYear=DO});var sy=T(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});var ny=Do(),xO=Oe(),RO=Y(),MO=jn(),CO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${xO.matchAnyPattern(ny.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),AO=1,PO=2,NO=3,bd=class extends RO.AbstractParserWithWordBoundaryChecking{innerPattern(){return CO}innerExtract(e,t){let n=t[PO].toLowerCase(),s=ny.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let i=t[AO],a=t[NO],o=i||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=MO.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Td.default=bd});var iy=T(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var IO=Wn(),_d=class extends IO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};vd.default=_d});var ay=T(Yi=>{"use strict";var FO=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var LO=FO(Yr()),wd=class extends LO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Yi.default=wd});var oy=T(ji=>{"use strict";var UO=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var qO=UO(Or()),Ed=class extends qO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ji.default=Ed});var py=T(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});var WO=ut(),dy=Do(),fy=Do(),YO=Oe(),jO=Y(),GO=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*)(${YO.matchAnyPattern(dy.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${fy.YEAR_PATTERN}))?(?=\\W|$)`,"i"),uy=1,ly=2,$O=3,cy=4,kd=class extends jO.AbstractParserWithWordBoundaryChecking{innerPattern(){return GO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=dy.MONTH_DICTIONARY[t[$O].toLowerCase()],i=parseInt(t[uy]);if(i>31)return t.index=t.index+t[uy].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[cy]){let a=fy.parseYear(t[cy]);n.start.assign("year",a)}else{let a=WO.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[ly]){let a=parseInt(t[ly]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Sd.default=kd});var my=T(Br=>{"use strict";var BO=Br&&Br.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),HO=Br&&Br.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zO=Br&&Br.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&BO(e,r,t);return HO(e,r),e};Object.defineProperty(Br,"__esModule",{value:!0});var VO=Y(),xo=zO($r()),Od=class extends VO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return xo.now(e.reference);case"hoje":return xo.today(e.reference);case"amanha":case"amanh\xE3":return xo.tomorrow(e.reference);case"ontem":return xo.yesterday(e.reference)}return s}};Br.default=Od});var hy=T(Gi=>{"use strict";var KO=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var Ro=ze(),QO=Y(),XO=Kt(),ZO=KO(be()),Dd=class extends QO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=ZO.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",Ro.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",Ro.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",Ro.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":XO.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",Ro.Meridiem.AM),s.imply("hour",12);break}return s}};Gi.default=Dd});var by=T(tt=>{"use strict";var bn=tt&&tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tt,"__esModule",{value:!0});tt.createConfiguration=tt.createCasualConfiguration=tt.parseDate=tt.parse=tt.strict=tt.casual=void 0;var JO=jr(),gy=fr(),eD=bn(Gn()),tD=bn(sy()),rD=bn(iy()),nD=bn(ay()),sD=bn(oy()),iD=bn(py()),aD=bn(my()),oD=bn(hy());tt.casual=new gy.Chrono(yy());tt.strict=new gy.Chrono(xd(!0));function uD(r,e,t){return tt.casual.parse(r,e,t)}tt.parse=uD;function lD(r,e,t){return tt.casual.parseDate(r,e,t)}tt.parseDate=lD;function yy(r=!0){let e=xd(!1,r);return e.parsers.push(new aD.default),e.parsers.push(new oD.default),e}tt.createCasualConfiguration=yy;function xd(r=!0,e=!0){return JO.includeCommonConfiguration({parsers:[new eD.default(e),new tD.default,new rD.default,new iD.default],refiners:[new nD.default,new sD.default]},r)}tt.createConfiguration=xd});var Ty=T($i=>{"use strict";var cD=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});var dD=cD(Or()),Rd=class extends dD.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};$i.default=Rd});var _y=T(Bi=>{"use strict";var fD=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var pD=fD(Yr()),Md=class extends pD.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Bi.default=Md});var vy=T(Hr=>{"use strict";var mD=Hr&&Hr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),hD=Hr&&Hr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gD=Hr&&Hr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&mD(e,r,t);return hD(e,r),e};Object.defineProperty(Hr,"__esModule",{value:!0});var yD=Y(),Mo=gD($r()),Cd=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return Mo.now(e.reference);case"vandaag":return Mo.today(e.reference);case"morgen":case"morgend":return Mo.tomorrow(e.reference);case"gisteren":return Mo.yesterday(e.reference)}return s}};Hr.default=Cd});var wy=T(Hi=>{"use strict";var bD=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var Co=ze(),TD=Y(),_D=bD(be()),vD=Kt(),wD=1,ED=2,Ad=class extends TD.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=_D.default(e.refDate),s=e.createParsingComponents();switch(t[wD]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[ED].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",Co.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",Co.Meridiem.PM),s.imply("hour",20);break;case"middernacht":vD.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",Co.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",Co.Meridiem.AM),s.imply("hour",12);break}return s}};Hi.default=Ad});var Lt=T(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.parseTimeUnits=de.TIME_UNITS_PATTERN=de.parseYear=de.YEAR_PATTERN=de.parseOrdinalNumberPattern=de.ORDINAL_NUMBER_PATTERN=de.parseNumberPattern=de.NUMBER_PATTERN=de.TIME_UNIT_DICTIONARY=de.ORDINAL_WORD_DICTIONARY=de.INTEGER_WORD_DICTIONARY=de.MONTH_DICTIONARY=de.WEEKDAY_DICTIONARY=void 0;var Ao=Oe(),kD=ut();de.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};de.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};de.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};de.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};de.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};de.NUMBER_PATTERN=`(?:${Ao.matchAnyPattern(de.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function ky(r){let e=r.toLowerCase();return de.INTEGER_WORD_DICTIONARY[e]!==void 0?de.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}de.parseNumberPattern=ky;de.ORDINAL_NUMBER_PATTERN=`(?:${Ao.matchAnyPattern(de.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function SD(r){let e=r.toLowerCase();return de.ORDINAL_WORD_DICTIONARY[e]!==void 0?de.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}de.parseOrdinalNumberPattern=SD;de.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function OD(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 kD.findMostLikelyADYear(e)}de.parseYear=OD;var Sy=`(${de.NUMBER_PATTERN})\\s{0,5}(${Ao.matchAnyPattern(de.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ey=new RegExp(Sy,"i");de.TIME_UNITS_PATTERN=Ao.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Sy);function DD(r){let e={},t=r,n=Ey.exec(t);for(;n;)xD(e,n),t=t.substring(n[0].length),n=Ey.exec(t);return e}de.parseTimeUnits=DD;function xD(r,e){let t=ky(e[1]),n=de.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Dy=T(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var Oy=Lt(),RD=Le(),MD=Y(),Pd=class extends MD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Oy.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Oy.parseTimeUnits(t[1]);return RD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Nd.default=Pd});var Ry=T(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});var xy=Lt(),CD=Oe(),AD=Y(),PD=jn(),ND=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${CD.matchAnyPattern(xy.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),ID=1,FD=2,LD=3,Id=class extends AD.AbstractParserWithWordBoundaryChecking{innerPattern(){return ND}innerExtract(e,t){let n=t[FD].toLowerCase(),s=xy.WEEKDAY_DICTIONARY[n],i=t[ID],a=t[LD],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=PD.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Fd.default=Id});var Iy=T(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});var UD=ut(),Py=Lt(),Po=Lt(),Ny=Lt(),qD=Oe(),WD=Y(),YD=new RegExp(`(?:on\\s*?)?(${Po.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Po.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+qD.matchAnyPattern(Py.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Ny.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),jD=3,My=1,Cy=2,Ay=4,Ld=class extends WD.AbstractParserWithWordBoundaryChecking{innerPattern(){return YD}innerExtract(e,t){let n=Py.MONTH_DICTIONARY[t[jD].toLowerCase()],s=Po.parseOrdinalNumberPattern(t[My]);if(s>31)return t.index=t.index+t[My].length,null;let i=e.createParsingComponents({day:s,month:n});if(t[Ay]){let u=Ny.parseYear(t[Ay]);i.assign("year",u)}else{let u=UD.findYearClosestToRef(e.refDate,s,n);i.imply("year",u)}if(!t[Cy])return i;let a=Po.parseOrdinalNumberPattern(t[Cy]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",a),o}};Ud.default=Ld});var qy=T(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});var Ly=Lt(),GD=ut(),$D=Oe(),Uy=Lt(),BD=Y(),HD=new RegExp(`(${$D.matchAnyPattern(Ly.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Uy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),zD=1,Fy=2,qd=class extends BD.AbstractParserWithWordBoundaryChecking{innerPattern(){return HD}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[zD],i=Ly.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",i),t[Fy]){let a=Uy.parseYear(t[Fy]);n.assign("year",a)}else{let a=GD.findYearClosestToRef(e.refDate,1,i);n.imply("year",a)}return n}};Wd.default=qd});var Wy=T(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var VD=Y(),KD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),QD=1,XD=2,Yd=class extends VD.AbstractParserWithWordBoundaryChecking{innerPattern(){return KD}innerExtract(e,t){let n=parseInt(t[XD]),s=parseInt(t[QD]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};jd.default=Yd});var Yy=T($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});var ZD=Wn(),Gd=class extends ZD.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)}};$d.default=Gd});var $y=T(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});var Gy=Lt(),JD=Oe(),e0=Y(),t0=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${JD.matchAnyPattern(Gy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),r0=1,n0=2,jy=3,s0=4,Bd=class extends e0.AbstractParserWithWordBoundaryChecking{innerPattern(){return t0}innerExtract(e,t){let n=t[jy]?parseInt(t[jy]):Gy.MONTH_DICTIONARY[t[n0].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[r0]);return{day:parseInt(t[s0]),month:n,year:s}}};Hd.default=Bd});var By=T(zi=>{"use strict";var i0=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var a0=Y(),No=ze(),zd=Kt(),o0=i0(be()),u0=1,l0=2,Vd=class extends a0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[u0].toLowerCase(),s=t[l0].toLowerCase(),i=e.createParsingComponents(),a=o0.default(e.refDate);switch(n){case"gisteren":zd.assignSimilarDate(i,a.add(-1,"day"));break;case"van":zd.assignSimilarDate(i,a);break;case"morgen":zd.assignTheNextDay(i,a);break}switch(s){case"ochtend":i.imply("meridiem",No.Meridiem.AM),i.imply("hour",6);break;case"middag":i.imply("meridiem",No.Meridiem.AM),i.imply("hour",12);break;case"namiddag":i.imply("meridiem",No.Meridiem.PM),i.imply("hour",15);break;case"avond":i.imply("meridiem",No.Meridiem.PM),i.imply("hour",20);break}return i}};zi.default=Vd});var zy=T(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var Hy=Lt(),c0=Le(),d0=Y(),f0=Qt(),p0=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${Hy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Kd=class extends d0.AbstractParserWithWordBoundaryChecking{innerPattern(){return p0}innerExtract(e,t){let n=t[1].toLowerCase(),s=Hy.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=f0.reverseTimeUnits(s);break}return c0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Qd.default=Kd});var Qy=T(Vi=>{"use strict";var m0=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var Ky=Lt(),Vy=Le(),h0=m0(be()),g0=Y(),y0=Oe(),b0=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${y0.matchAnyPattern(Ky.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),T0=1,_0=2,Xd=class extends g0.AbstractParserWithWordBoundaryChecking{innerPattern(){return b0}innerExtract(e,t){let n=t[T0].toLowerCase(),s=t[_0].toLowerCase(),i=Ky.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[i]=1,Vy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[i]=-1,Vy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=h0.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Vi.default=Xd});var Xy=T(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var Jd=Lt(),v0=Le(),w0=Y(),E0=Qt(),k0=new RegExp("("+Jd.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),S0=new RegExp("("+Jd.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Zd=class extends w0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?S0:k0}innerExtract(e,t){let n=Jd.parseTimeUnits(t[1]),s=E0.reverseTimeUnits(n);return v0.ParsingComponents.createRelativeFromReference(e.reference,s)}};ef.default=Zd});var Zy=T(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var rf=Lt(),O0=Le(),D0=Y(),x0=new RegExp("("+rf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),R0=new RegExp("("+rf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),M0=1,tf=class extends D0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?R0:x0}innerExtract(e,t){let n=rf.parseTimeUnits(t[M0]);return O0.ParsingComponents.createRelativeFromReference(e.reference,n)}};nf.default=tf});var rb=T(rt=>{"use strict";var ct=rt&&rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rt,"__esModule",{value:!0});rt.createConfiguration=rt.createCasualConfiguration=rt.parseDate=rt.parse=rt.strict=rt.casual=void 0;var C0=jr(),Jy=fr(),A0=ct(Ty()),P0=ct(_y()),N0=ct(vy()),I0=ct(wy()),F0=ct(Gn()),L0=ct(Dy()),U0=ct(Ry()),q0=ct(Iy()),eb=ct(qy()),W0=ct(Wy()),Y0=ct(Yy()),j0=ct($y()),G0=ct(By()),$0=ct(zy()),B0=ct(Qy()),H0=ct(Xy()),z0=ct(Zy());rt.casual=new Jy.Chrono(tb());rt.strict=new Jy.Chrono(sf(!0));function V0(r,e,t){return rt.casual.parse(r,e,t)}rt.parse=V0;function K0(r,e,t){return rt.casual.parseDate(r,e,t)}rt.parseDate=K0;function tb(r=!0){let e=sf(!1,r);return e.parsers.unshift(new N0.default),e.parsers.unshift(new I0.default),e.parsers.unshift(new G0.default),e.parsers.unshift(new eb.default),e.parsers.unshift(new B0.default),e.parsers.unshift(new $0.default),e}rt.createCasualConfiguration=tb;function sf(r=!0,e=!0){return C0.includeCommonConfiguration({parsers:[new F0.default(e),new L0.default,new q0.default,new eb.default,new U0.default,new j0.default,new W0.default,new Y0.default(r),new H0.default(r),new z0.default(r)],refiners:[new P0.default,new A0.default]},r)}rt.createConfiguration=sf});var ab=T(Ki=>{"use strict";var Q0=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var X0=Q0(be()),Z0=Y(),J0=1,nb=2,ex=3,sb=4,ib=5,tx=6,af=class extends Z0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),i=X0.default(e.refDate),a=i;if(t[J0])s.start.imply("hour",i.hour()),s.start.imply("minute",i.minute()),s.start.imply("second",i.second()),s.start.imply("millisecond",i.millisecond());else if(t[nb]){let o=t[nb],u=t[ex];o=="\u660E"||o=="\u807D"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?s.start.imply("hour",6):u=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[sb]){let u=t[sb][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?s.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):u=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):u=="\u51CC"&&s.start.imply("hour",0)}else if(t[ib]){let o=t[ib];o=="\u660E"||o=="\u807D"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[tx];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?s.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):l=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):l=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year()),s}};Ki.default=af});var Ms=T(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.zhStringToYear=At.zhStringToNumber=At.WEEKDAY_OFFSET=At.NUMBER=void 0;At.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};At.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function rx(r){let e=0;for(let t=0;t{"use strict";var sx=Qi&&Qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qi,"__esModule",{value:!0});var ix=sx(be()),ax=Y(),Hn=Ms(),of=1,ob=2,uf=3,lf=class extends ax.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Hn.NUMBER).join("")+"]{4}|["+Object.keys(Hn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Hn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Hn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=ix.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=parseInt(t[ob]);if(isNaN(i)&&(i=Hn.zhStringToNumber(t[ob])),s.start.assign("month",i),t[uf]){let a=parseInt(t[uf]);isNaN(a)&&(a=Hn.zhStringToNumber(t[uf])),s.start.assign("day",a)}else s.start.imply("day",n.date());if(t[of]){let a=parseInt(t[of]);isNaN(a)&&(a=Hn.zhStringToYear(t[of])),s.start.assign("year",a)}else s.start.imply("year",n.year());return s}};Qi.default=lf});var cb=T(Xi=>{"use strict";var ox=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var ux=ox(be()),lx=Y(),lb=Ms(),cx=new RegExp("(\\d+|["+Object.keys(lb.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"),cf=1,dx=2,df=class extends lx.AbstractParserWithWordBoundaryChecking{innerPattern(){return cx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[cf]);if(isNaN(s)&&(s=lb.zhStringToNumber(t[cf])),isNaN(s)){let u=t[cf];if(u==="\u5E7E")s=3;else if(u==="\u534A")s=.5;else return null}let i=ux.default(e.refDate),o=t[dx][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(s,"d"):o=="\u661F"||o=="\u79AE"?i=i.add(s*7,"d"):o=="\u6708"?i=i.add(s,"month"):o=="\u5E74"&&(i=i.add(s,"year")),n.start.assign("year",i.year()),n.start.assign("month",i.month()+1),n.start.assign("day",i.date()),n):(o=="\u79D2"?i=i.add(s,"second"):o=="\u5206"?i=i.add(s,"minute"):(o=="\u5C0F"||o=="\u9418")&&(i=i.add(s,"hour")),n.start.imply("year",i.year()),n.start.imply("month",i.month()+1),n.start.imply("day",i.date()),n.start.assign("hour",i.hour()),n.start.assign("minute",i.minute()),n.start.assign("second",i.second()),n)}};Xi.default=df});var fb=T(Zi=>{"use strict";var fx=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var px=fx(be()),mx=Y(),db=Ms(),hx=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(db.WEEKDAY_OFFSET).join("|")+")"),ff=class extends mx.AbstractParserWithWordBoundaryChecking{innerPattern(){return hx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=db.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=px.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(i-7),l=!0):a=="next"?(u=u.day(i+7),l=!0):a=="this"?u=u.day(i):Math.abs(i-7-c){"use strict";var gx=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var yx=gx(be()),bx=Y(),Jt=Ms(),Tx=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),_x=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Io=1,Fo=2,Lo=3,Uo=4,qo=5,Wo=6,Zt=7,Cs=8,Yo=9,pf=class extends bx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tx}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=yx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=n.clone();if(t[Io]){var a=t[Io];a=="\u660E"||a=="\u807D"?n.hour()>1&&i.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?i.add(-1,"day"):a=="\u524D"?i.add(-2,"day"):a=="\u5927\u524D"?i.add(-3,"day"):a=="\u5F8C"?i.add(2,"day"):a=="\u5927\u5F8C"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else if(t[Uo]){var o=t[Uo];o=="\u660E"||o=="\u807D"?i.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?i.add(-1,"day"):o=="\u524D"?i.add(-2,"day"):o=="\u5927\u524D"?i.add(-3,"day"):o=="\u5F8C"?i.add(2,"day"):o=="\u5927\u5F8C"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else s.start.imply("day",i.date()),s.start.imply("month",i.month()+1),s.start.imply("year",i.year());let u=0,l=0,c=-1;if(t[Cs]){var f=parseInt(t[Cs]);if(isNaN(f)&&(f=Jt.zhStringToNumber(t[Cs])),f>=60)return null;s.start.assign("second",f)}if(u=parseInt(t[Wo]),isNaN(u)&&(u=Jt.zhStringToNumber(t[Wo])),t[Zt]?t[Zt]=="\u534A"?l=30:t[Zt]=="\u6B63"||t[Zt]=="\u6574"?l=0:(l=parseInt(t[Zt]),isNaN(l)&&(l=Jt.zhStringToNumber(t[Zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Yo]){if(u>12)return null;var m=t[Yo][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12))}else if(t[Fo]){var y=t[Fo],k=y[0];k=="\u671D"||k=="\u65E9"?(c=0,u==12&&(u=0)):k=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Lo]){var E=t[Lo],x=E[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[qo]){var v=t[qo],I=v[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(c=0,u==12&&(u=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(c=1,u!=12&&(u+=12))}if(s.start.assign("hour",u),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):u<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=_x.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let F=i.clone();if(s.end=e.createParsingComponents(),t[Io]){var a=t[Io];a=="\u660E"||a=="\u807D"?n.hour()>1&&F.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?F.add(-1,"day"):a=="\u524D"?F.add(-2,"day"):a=="\u5927\u524D"?F.add(-3,"day"):a=="\u5F8C"?F.add(2,"day"):a=="\u5927\u5F8C"&&F.add(3,"day"),s.end.assign("day",F.date()),s.end.assign("month",F.month()+1),s.end.assign("year",F.year())}else if(t[Uo]){var o=t[Uo];o=="\u660E"||o=="\u807D"?F.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?F.add(-1,"day"):o=="\u524D"?F.add(-2,"day"):o=="\u5927\u524D"?F.add(-3,"day"):o=="\u5F8C"?F.add(2,"day"):o=="\u5927\u5F8C"&&F.add(3,"day"),s.end.assign("day",F.date()),s.end.assign("month",F.month()+1),s.end.assign("year",F.year())}else s.end.imply("day",F.date()),s.end.imply("month",F.month()+1),s.end.imply("year",F.year());if(u=0,l=0,c=-1,t[Cs]){var f=parseInt(t[Cs]);if(isNaN(f)&&(f=Jt.zhStringToNumber(t[Cs])),f>=60)return null;s.end.assign("second",f)}if(u=parseInt(t[Wo]),isNaN(u)&&(u=Jt.zhStringToNumber(t[Wo])),t[Zt]?t[Zt]=="\u534A"?l=30:t[Zt]=="\u6B63"||t[Zt]=="\u6574"?l=0:(l=parseInt(t[Zt]),isNaN(l)&&(l=Jt.zhStringToNumber(t[Zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Yo]){if(u>12)return null;var m=t[Yo][0].toLowerCase();m=="a"&&(c=0,u==12&&(u=0)),m=="p"&&(c=1,u!=12&&(u+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Fo]){var y=t[Fo],k=y[0];k=="\u671D"||k=="\u65E9"?(c=0,u==12&&(u=0)):k=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Lo]){var E=t[Lo],x=E[0];x=="\u4E0A"||x=="\u671D"||x=="\u65E9"||x=="\u51CC"?(c=0,u==12&&(u=0)):(x=="\u4E0B"||x=="\u664F"||x=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[qo]){var v=t[qo],I=v[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(c=0,u==12&&(u=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(c=1,u!=12&&(u+=12))}return s.text=s.text+t[0],s.end.assign("hour",u),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>u?s.end.imply("meridiem",0):u>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var vx=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var wx=vx(be()),Ex=Y(),mb=Ms(),kx=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(mb.WEEKDAY_OFFSET).join("|")+")"),mf=class extends Ex.AbstractParserWithWordBoundaryChecking{innerPattern(){return kx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=mb.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=wx.default(e.refDate),o=!1,u=a.day();return Math.abs(i-7-u){"use strict";var Sx=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var Ox=Sx(Or()),hf=class extends Ox.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};ta.default=hf});var yb=T(ra=>{"use strict";var Dx=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var xx=Dx(Yr()),gf=class extends xx.default{patternBetween(){return/^\s*$/i}};ra.default=gf});var bb=T($e=>{"use strict";var zr=$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.hant=void 0;var yf=fr(),Rx=zr(yo()),Mx=jr(),Cx=zr(ab()),Ax=zr(ub()),Px=zr(cb()),Nx=zr(fb()),Ix=zr(pb()),Fx=zr(hb()),Lx=zr(gb()),Ux=zr(yb());$e.hant=new yf.Chrono(bf());$e.casual=new yf.Chrono(bf());$e.strict=new yf.Chrono(Tf());function qx(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=qx;function Wx(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=Wx;function bf(){let r=Tf();return r.parsers.unshift(new Cx.default),r}$e.createCasualConfiguration=bf;function Tf(){let r=Mx.includeCommonConfiguration({parsers:[new Ax.default,new Nx.default,new Fx.default,new Ix.default,new Px.default],refiners:[new Lx.default,new Ux.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof Rx.default)),r}$e.createConfiguration=Tf});var wb=T(na=>{"use strict";var Yx=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var jx=Yx(be()),Gx=Y(),$x=1,Tb=2,Bx=3,_b=4,vb=5,Hx=6,_f=class extends Gx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),i=jx.default(e.refDate),a=i;if(t[$x])s.start.imply("hour",i.hour()),s.start.imply("minute",i.minute()),s.start.imply("second",i.second()),s.start.imply("millisecond",i.millisecond());else if(t[Tb]){let o=t[Tb],u=t[Bx];o=="\u660E"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?s.start.imply("hour",6):u=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[_b]){let u=t[_b][0];u=="\u65E9"||u=="\u4E0A"?s.start.imply("hour",6):u=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):u=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):u=="\u51CC"&&s.start.imply("hour",0)}else if(t[vb]){let o=t[vb];o=="\u660E"?i.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[Hx];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?s.start.imply("hour",6):l=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):l=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):l=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year()),s}};na.default=_f});var As=T(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.zhStringToYear=Pt.zhStringToNumber=Pt.WEEKDAY_OFFSET=Pt.NUMBER=void 0;Pt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Pt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function zx(r){let e=0;for(let t=0;t{"use strict";var Kx=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var Qx=Kx(be()),Xx=Y(),zn=As(),vf=1,Eb=2,wf=3,Ef=class extends Xx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(zn.NUMBER).join("")+"]{4}|["+Object.keys(zn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(zn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(zn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=Qx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=parseInt(t[Eb]);if(isNaN(i)&&(i=zn.zhStringToNumber(t[Eb])),s.start.assign("month",i),t[wf]){let a=parseInt(t[wf]);isNaN(a)&&(a=zn.zhStringToNumber(t[wf])),s.start.assign("day",a)}else s.start.imply("day",n.date());if(t[vf]){let a=parseInt(t[vf]);isNaN(a)&&(a=zn.zhStringToYear(t[vf])),s.start.assign("year",a)}else s.start.imply("year",n.year());return s}};sa.default=Ef});var Ob=T(ia=>{"use strict";var Zx=ia&&ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ia,"__esModule",{value:!0});var Jx=Zx(be()),eR=Y(),Sb=As(),tR=new RegExp("(\\d+|["+Object.keys(Sb.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"),kf=1,rR=2,Sf=class extends eR.AbstractParserWithWordBoundaryChecking{innerPattern(){return tR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[kf]);if(isNaN(s)&&(s=Sb.zhStringToNumber(t[kf])),isNaN(s)){let u=t[kf];if(u==="\u51E0")s=3;else if(u==="\u534A")s=.5;else return null}let i=Jx.default(e.refDate),o=t[rR][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(s,"d"):o=="\u661F"||o=="\u793C"?i=i.add(s*7,"d"):o=="\u6708"?i=i.add(s,"month"):o=="\u5E74"&&(i=i.add(s,"year")),n.start.assign("year",i.year()),n.start.assign("month",i.month()+1),n.start.assign("day",i.date()),n):(o=="\u79D2"?i=i.add(s,"second"):o=="\u5206"?i=i.add(s,"minute"):(o=="\u5C0F"||o=="\u949F")&&(i=i.add(s,"hour")),n.start.imply("year",i.year()),n.start.imply("month",i.month()+1),n.start.imply("day",i.date()),n.start.assign("hour",i.hour()),n.start.assign("minute",i.minute()),n.start.assign("second",i.second()),n)}};ia.default=Sf});var xb=T(aa=>{"use strict";var nR=aa&&aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aa,"__esModule",{value:!0});var sR=nR(be()),iR=Y(),Db=As(),aR=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Db.WEEKDAY_OFFSET).join("|")+")"),Of=class extends iR.AbstractParserWithWordBoundaryChecking{innerPattern(){return aR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=Db.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=sR.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(i-7),l=!0):a=="next"?(u=u.day(i+7),l=!0):a=="this"?u=u.day(i):Math.abs(i-7-c){"use strict";var oR=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var uR=oR(be()),lR=Y(),tr=As(),cR=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),dR=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),jo=1,Go=2,$o=3,Bo=4,Ho=5,zo=6,er=7,Ps=8,Vo=9,Df=class extends lR.AbstractParserWithWordBoundaryChecking{innerPattern(){return cR}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=uR.default(e.refDate),s=e.createParsingResult(t.index,t[0]),i=n.clone();if(t[jo]){let c=t[jo];c=="\u660E"?n.hour()>1&&i.add(1,"day"):c=="\u6628"?i.add(-1,"day"):c=="\u524D"?i.add(-2,"day"):c=="\u5927\u524D"?i.add(-3,"day"):c=="\u540E"?i.add(2,"day"):c=="\u5927\u540E"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else if(t[Bo]){let c=t[Bo];c=="\u660E"?i.add(1,"day"):c=="\u6628"?i.add(-1,"day"):c=="\u524D"?i.add(-2,"day"):c=="\u5927\u524D"?i.add(-3,"day"):c=="\u540E"?i.add(2,"day"):c=="\u5927\u540E"&&i.add(3,"day"),s.start.assign("day",i.date()),s.start.assign("month",i.month()+1),s.start.assign("year",i.year())}else s.start.imply("day",i.date()),s.start.imply("month",i.month()+1),s.start.imply("year",i.year());let a=0,o=0,u=-1;if(t[Ps]){let c=parseInt(t[Ps]);if(isNaN(c)&&(c=tr.zhStringToNumber(t[Ps])),c>=60)return null;s.start.assign("second",c)}if(a=parseInt(t[zo]),isNaN(a)&&(a=tr.zhStringToNumber(t[zo])),t[er]?t[er]=="\u534A"?o=30:t[er]=="\u6B63"||t[er]=="\u6574"?o=0:(o=parseInt(t[er]),isNaN(o)&&(o=tr.zhStringToNumber(t[er]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Vo]){if(a>12)return null;let c=t[Vo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Go]){let f=t[Go][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[$o]){let f=t[$o][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Ho]){let f=t[Ho][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}if(s.start.assign("hour",a),s.start.assign("minute",o),u>=0?s.start.assign("meridiem",u):a<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=dR.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let l=i.clone();if(s.end=e.createParsingComponents(),t[jo]){let c=t[jo];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),s.end.assign("day",l.date()),s.end.assign("month",l.month()+1),s.end.assign("year",l.year())}else if(t[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"),s.end.assign("day",l.date()),s.end.assign("month",l.month()+1),s.end.assign("year",l.year())}else s.end.imply("day",l.date()),s.end.imply("month",l.month()+1),s.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Ps]){let c=parseInt(t[Ps]);if(isNaN(c)&&(c=tr.zhStringToNumber(t[Ps])),c>=60)return null;s.end.assign("second",c)}if(a=parseInt(t[zo]),isNaN(a)&&(a=tr.zhStringToNumber(t[zo])),t[er]?t[er]=="\u534A"?o=30:t[er]=="\u6B63"||t[er]=="\u6574"?o=0:(o=parseInt(t[er]),isNaN(o)&&(o=tr.zhStringToNumber(t[er]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Vo]){if(a>12)return null;let c=t[Vo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),s.start.isCertain("meridiem")||(u==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Go]){let f=t[Go][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[$o]){let f=t[$o][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Ho]){let f=t[Ho][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}return s.text=s.text+t[0],s.end.assign("hour",a),s.end.assign("minute",o),u>=0?s.end.assign("meridiem",u):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>a?s.end.imply("meridiem",0):a>12&&s.end.imply("meridiem",1),s.end.date().getTime(){"use strict";var fR=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var pR=fR(be()),mR=Y(),Mb=As(),hR=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Mb.WEEKDAY_OFFSET).join("|")+")"),xf=class extends mR.AbstractParserWithWordBoundaryChecking{innerPattern(){return hR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,i=Mb.WEEKDAY_OFFSET[s];if(i===void 0)return null;let a=pR.default(e.refDate),o=!1,u=a.day();return Math.abs(i-7-u){"use strict";var gR=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var yR=gR(Or()),Rf=class extends yR.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};la.default=Rf});var Pb=T(ca=>{"use strict";var bR=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var TR=bR(Yr()),Mf=class extends TR.default{patternBetween(){return/^\s*$/i}};ca.default=Mf});var Nb=T(Be=>{"use strict";var Vr=Be&&Be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Be,"__esModule",{value:!0});Be.createConfiguration=Be.createCasualConfiguration=Be.parseDate=Be.parse=Be.strict=Be.casual=Be.hans=void 0;var Cf=fr(),_R=Vr(yo()),vR=jr(),wR=Vr(wb()),ER=Vr(kb()),kR=Vr(Ob()),SR=Vr(xb()),OR=Vr(Rb()),DR=Vr(Cb()),xR=Vr(Ab()),RR=Vr(Pb());Be.hans=new Cf.Chrono(Af());Be.casual=new Cf.Chrono(Af());Be.strict=new Cf.Chrono(Pf());function MR(r,e,t){return Be.casual.parse(r,e,t)}Be.parse=MR;function CR(r,e,t){return Be.casual.parseDate(r,e,t)}Be.parseDate=CR;function Af(){let r=Pf();return r.parsers.unshift(new wR.default),r}Be.createCasualConfiguration=Af;function Pf(){let r=vR.includeCommonConfiguration({parsers:[new ER.default,new SR.default,new DR.default,new OR.default,new kR.default],refiners:[new xR.default,new RR.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof _R.default)),r}Be.createConfiguration=Pf});var Fb=T(Ut=>{"use strict";var Ib=Ut&&Ut.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),AR=Ut&&Ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),PR=Ut&&Ut.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ib(e,r,t)},NR=Ut&&Ut.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Ib(e,r,t);return AR(e,r),e};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.hans=void 0;PR(bb(),Ut);Ut.hans=NR(Nb())});var Nt=T(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 Ko=Oe(),IR=ut();ee.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ee.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};ee.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};ee.MONTH_DICTIONARY=Object.assign(Object.assign({},ee.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});ee.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};ee.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};ee.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};ee.NUMBER_PATTERN=`(?:${Ko.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 Ub(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=Ub;ee.ORDINAL_NUMBER_PATTERN=`(?:${Ko.matchAnyPattern(ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function FR(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=FR;var Nf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ee.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Nf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Nf}|[5-9][0-9]${Nf})`;function LR(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 IR.findMostLikelyADYear(e)}ee.parseYear=LR;var qb=`(${ee.NUMBER_PATTERN})\\s{0,3}(${Ko.matchAnyPattern(ee.TIME_UNIT_DICTIONARY)})`,Lb=new RegExp(qb,"i");ee.TIME_UNITS_PATTERN=Ko.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",qb);function UR(r){let e={},t=r,n=Lb.exec(t);for(;n;)qR(e,n),t=t.substring(n[0].length).trim(),n=Lb.exec(t);return e}ee.parseTimeUnits=UR;function qR(r,e){let t=Ub(e[1]),n=ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Yb=T(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var da=Nt(),WR=Le(),YR=Y(),Wb=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${da.TIME_UNITS_PATTERN})${da.REGEX_PARTS.rightBoundary}`,jR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${Wb}`,da.REGEX_PARTS.flags),GR=new RegExp(Wb,"i"),If=class extends YR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return da.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?GR:jR}innerExtract(e,t){let n=da.parseTimeUnits(t[1]);return WR.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ff.default=If});var Hb=T(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var $R=ut(),fa=Nt(),Bb=Nt(),Qo=Nt(),BR=Oe(),HR=Y(),zR=new RegExp(`(?:\u0441)?\\s*(${Qo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Qo.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${BR.matchAnyPattern(fa.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Bb.YEAR_PATTERN}(?![^\\s]\\d)))?${fa.REGEX_PARTS.rightBoundary}`,fa.REGEX_PARTS.flags),jb=1,Gb=2,VR=3,$b=4,Lf=class extends HR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return fa.REGEX_PARTS.leftBoundary}innerPattern(){return zR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=fa.MONTH_DICTIONARY[t[VR].toLowerCase()],i=Qo.parseOrdinalNumberPattern(t[jb]);if(i>31)return t.index=t.index+t[jb].length,null;if(n.start.assign("month",s),n.start.assign("day",i),t[$b]){let a=Bb.parseYear(t[$b]);n.start.assign("year",a)}else{let a=$R.findYearClosestToRef(e.refDate,i,s);n.start.imply("year",a)}if(t[Gb]){let a=Qo.parseOrdinalNumberPattern(t[Gb]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Uf.default=Lf});var Kb=T(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var pa=Nt(),KR=ut(),QR=Oe(),Vb=Nt(),XR=Y(),ZR=new RegExp(`((?:\u0432)\\s*)?(${QR.matchAnyPattern(pa.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Vb.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,pa.REGEX_PARTS.flags),JR=2,zb=3,qf=class extends XR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return pa.REGEX_PARTS.leftBoundary}innerPattern(){return ZR}innerExtract(e,t){let n=t[JR].toLowerCase();if(t[0].length<=3&&!pa.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let i=pa.MONTH_DICTIONARY[n];if(s.start.assign("month",i),t[zb]){let a=Vb.parseYear(t[zb]);s.start.assign("year",a)}else{let a=KR.findYearClosestToRef(e.refDate,1,i);s.start.imply("year",a)}return s}};Wf.default=qf});var Xb=T(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var Xo=ze(),eM=Wn(),Qb=Nt(),Yf=class extends eM.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return Qb.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))?(?!\\/)${Qb.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Xo.Meridiem.PM)):s<6&&n.assign("meridiem",Xo.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Xo.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Xo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};jf.default=Yf});var Zb=T($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var Zo=Nt(),tM=Le(),rM=Y(),nM=Qt(),sM=new RegExp(`(${Zo.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Zo.REGEX_PARTS.flags),Gf=class extends rM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Zo.REGEX_PARTS.leftBoundary}innerPattern(){return sM}innerExtract(e,t){let n=Zo.parseTimeUnits(t[1]),s=nM.reverseTimeUnits(n);return tM.ParsingComponents.createRelativeFromReference(e.reference,s)}};$f.default=Gf});var Jb=T(ma=>{"use strict";var iM=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var aM=iM(Or()),Bf=class extends aM.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};ma.default=Bf});var eT=T(ha=>{"use strict";var oM=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var uM=oM(Yr()),Hf=class extends uM.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};ha.default=Hf});var tT=T(Kr=>{"use strict";var lM=Kr&&Kr.__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]}),cM=Kr&&Kr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),dM=Kr&&Kr.__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)&&lM(e,r,t);return cM(e,r),e};Object.defineProperty(Kr,"__esModule",{value:!0});var fM=Y(),ga=dM($r()),zf=Nt(),pM=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)${zf.REGEX_PARTS.rightBoundary}`,zf.REGEX_PARTS.flags),Vf=class extends fM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return zf.REGEX_PARTS.leftBoundary}innerPattern(e){return pM}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return ga.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ga.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ga.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return ga.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return ga.theDayBefore(e.reference,2)}return s}};Kr.default=Vf});var rT=T(yr=>{"use strict";var mM=yr&&yr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),hM=yr&&yr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gM=yr&&yr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&mM(e,r,t);return hM(e,r),e},yM=yr&&yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yr,"__esModule",{value:!0});var bM=Y(),Vn=gM($r()),TM=Kt(),_M=yM(be()),Kf=Nt(),vM=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)${Kf.REGEX_PARTS.rightBoundary}`,Kf.REGEX_PARTS.flags),Qf=class extends bM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Kf.REGEX_PARTS.leftBoundary}innerPattern(){return vM}innerExtract(e,t){let n=_M.default(e.refDate),s=t[0].toLowerCase(),i=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return Vn.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return Vn.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return Vn.morning(e.reference);if(s.match(/в\s*полдень/))return Vn.noon(e.reference);if(s.match(/прошлой\s*ночью/))return Vn.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return Vn.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),TM.assignSimilarDate(i,n),i.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?Vn.midnight(e.reference):i}};yr.default=Qf});var nT=T(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var ya=Nt(),wM=Oe(),EM=Y(),kM=jn(),SM=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*)?(${wM.matchAnyPattern(ya.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)?${ya.REGEX_PARTS.rightBoundary}`,ya.REGEX_PARTS.flags),OM=1,DM=2,xM=3,Xf=class extends EM.AbstractParserWithWordBoundaryChecking{innerPattern(){return SM}patternLeftBoundary(){return ya.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[DM].toLowerCase(),s=ya.WEEKDAY_DICTIONARY[n],i=t[OM],a=t[xM],o=i||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=kM.toDayJSWeekday(e.refDate,s,u);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Zf.default=Xf});var iT=T(Ta=>{"use strict";var RM=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var ba=Nt(),sT=Le(),MM=RM(be()),CM=Y(),AM=Oe(),PM=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*(${AM.matchAnyPattern(ba.TIME_UNIT_DICTIONARY)})(?=\\s*)${ba.REGEX_PARTS.rightBoundary}`,ba.REGEX_PARTS.flags),NM=1,IM=2,Jf=class extends CM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ba.REGEX_PARTS.leftBoundary}innerPattern(){return PM}innerExtract(e,t){let n=t[NM].toLowerCase(),s=t[IM].toLowerCase(),i=ba.TIME_UNIT_DICTIONARY[s];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[i]=1,sT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[i]=-1,sT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=MM.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}};Ta.default=Jf});var aT=T(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var _a=Nt(),FM=Le(),LM=Y(),UM=Qt(),qM=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*(${_a.TIME_UNITS_PATTERN})${_a.REGEX_PARTS.rightBoundary}`,_a.REGEX_PARTS.flags),ep=class extends LM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return _a.REGEX_PARTS.leftBoundary}innerPattern(){return qM}innerExtract(e,t){let n=t[1].toLowerCase(),s=_a.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=UM.reverseTimeUnits(s);break}return FM.ParsingComponents.createRelativeFromReference(e.reference,s)}};tp.default=ep});var lT=T(nt=>{"use strict";var qt=nt&&nt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nt,"__esModule",{value:!0});nt.createConfiguration=nt.createCasualConfiguration=nt.parseDate=nt.parse=nt.strict=nt.casual=void 0;var WM=qt(Yb()),YM=qt(Hb()),jM=qt(Kb()),GM=qt(Xb()),$M=qt(Zb()),BM=qt(Jb()),HM=qt(eT()),zM=jr(),VM=qt(tT()),KM=qt(rT()),QM=qt(nT()),XM=qt(iT()),oT=fr(),ZM=qt(Gn()),JM=qt(aT());nt.casual=new oT.Chrono(uT());nt.strict=new oT.Chrono(rp(!0));function eC(r,e,t){return nt.casual.parse(r,e,t)}nt.parse=eC;function tC(r,e,t){return nt.casual.parseDate(r,e,t)}nt.parseDate=tC;function uT(){let r=rp(!1);return r.parsers.unshift(new VM.default),r.parsers.unshift(new KM.default),r.parsers.unshift(new jM.default),r.parsers.unshift(new XM.default),r.parsers.unshift(new JM.default),r}nt.createCasualConfiguration=uT;function rp(r=!0){return zM.includeCommonConfiguration({parsers:[new ZM.default(!0),new WM.default,new YM.default,new QM.default,new GM.default(r),new $M.default],refiners:[new HM.default,new BM.default]},r)}nt.createConfiguration=rp});var ze=T(se=>{"use strict";var rC=se&&se.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),nC=se&&se.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Tn=se&&se.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&rC(e,r,t);return nC(e,r),e};Object.defineProperty(se,"__esModule",{value:!0});se.parseDate=se.parse=se.casual=se.strict=se.ru=se.zh=se.nl=se.pt=se.ja=se.fr=se.de=se.Meridiem=se.Chrono=se.en=void 0;var np=Tn(Tc());se.en=np;var sC=fr();Object.defineProperty(se,"Chrono",{enumerable:!0,get:function(){return sC.Chrono}});var iC;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(iC=se.Meridiem||(se.Meridiem={}));var aC=Tn(bg());se.de=aC;var oC=Tn(zg());se.fr=oC;var uC=Tn(ry());se.ja=uC;var lC=Tn(by());se.pt=lC;var cC=Tn(rb());se.nl=cC;var dC=Tn(Fb());se.zh=dC;var fC=Tn(lT());se.ru=fC;se.strict=np.strict;se.casual=np.casual;function pC(r,e,t){return se.casual.parse(r,e,t)}se.parse=pC;function mC(r,e,t){return se.casual.parseDate(r,e,t)}se.parseDate=mC});var a_=T((s_,i_)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(p){return Object.prototype.toString.call(p)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",i=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=i?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var p=Object.getOwnPropertyNames(d);return p.push.apply(p,Object.getOwnPropertySymbols(d)),p}:Object.keys;function c(){this._events={},this._conf&&f.call(this,this._conf)}function f(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function m(d,p){var h="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(h+=" Event name: "+p+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(h);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(h),console.trace&&console.trace()}var y=function(d,p,h){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,p];case 3:return[d,p,h];default:for(var b=new Array(g);g--;)b[g]=arguments[g];return b}};function k(d,p){for(var h={},g,b=d.length,_=p?p.length:0,S=0;S0;)d=_[D],S.call(M,d,h[d]);this._listeners={},this._listenersCount=0,R()}}});function x(d,p,h,g){var b=Object.assign({},p);if(!d)return b;if(typeof d!="object")throw TypeError("options must be an object");var _=Object.keys(d),S=_.length,M,D,R;function U(ae){throw Error('Invalid "'+M+'" option value'+(ae?". Reason: "+ae:""))}for(var ge=0;ge0;)if(M===d[D])return _;S(p)}}var F=I(["function"]),le=I(["object","function"]);function B(d,p,h){var g,b,_=0,S,M=new d(function(D,R,U){h=x(h,{timeout:0,overload:!1},{timeout:function(Re,ve){return Re*=1,(typeof Re!="number"||Re<0||!Number.isFinite(Re))&&ve("timeout must be a positive number"),Re}}),g=!h.overload&&typeof d.prototype.cancel=="function"&&typeof U=="function";function ge(){b&&(b=null),_&&(clearTimeout(_),_=0)}var ae=function(Re){ge(),D(Re)},te=function(Re){ge(),R(Re)};g?p(ae,te,U):(b=[function(Re){te(Re||Error("canceled"))}],p(ae,te,function(Re){if(S)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Re!="function")throw TypeError("onCancel callback must be a function");b.push(Re)}),S=!0),h.timeout>0&&(_=setTimeout(function(){var Re=Error("timeout");Re.code="ETIMEDOUT",_=0,M.cancel(Re),R(Re)},h.timeout))});return g||(M.cancel=function(D){if(!!b){for(var R=b.length,U=1;U0;)te=Ct[M],te!=="_listeners"&&(qe=W(d,p,h[te],g+1,b),qe&&(ae?ae.push.apply(ae,qe):ae=qe));return ae}else if(Ft==="**"){for(ln=g+1===b||g+2===b&&cn==="*",ln&&h._listeners&&(ae=W(d,p,h,b,b)),Ct=l(h),M=Ct.length;M-- >0;)te=Ct[M],te!=="_listeners"&&(te==="*"||te==="**"?(h[te]._listeners&&!ln&&(qe=W(d,p,h[te],b,b),qe&&(ae?ae.push.apply(ae,qe):ae=qe)),qe=W(d,p,h[te],g,b)):te===cn?qe=W(d,p,h[te],g+2,b):qe=W(d,p,h[te],g,b),qe&&(ae?ae.push.apply(ae,qe):ae=qe));return ae}else h[Ft]&&(ae=W(d,p,h[Ft],g+1,b));if(Re=h["*"],Re&&W(d,p,Re,g+1,b),ve=h["**"],ve)if(g0;)te=Ct[M],te!=="_listeners"&&(te===cn?W(d,p,ve[te],g+2,b):te===Ft?W(d,p,ve[te],g+1,b):(wr={},wr[te]=ve[te],W(d,p,{"**":wr},g+1,b)));else ve._listeners?W(d,p,ve,b,b):ve["*"]&&ve["*"]._listeners&&W(d,p,ve["*"],b,b);return ae}function G(d,p,h){var g=0,b=0,_,S=this.delimiter,M=S.length,D;if(typeof d=="string")if((_=d.indexOf(S))!==-1){D=new Array(5);do D[g++]=d.slice(b,_),b=_+M;while((_=d.indexOf(S,b))!==-1);D[g++]=d.slice(b)}else D=[d],g=1;else D=d,g=d.length;if(g>1){for(_=0;_+10&&R._listeners.length>this._maxListeners&&(R._listeners.warned=!0,m.call(this,R._listeners.length,U))):R._listeners=p,!0;return!0}function ce(d,p,h,g){for(var b=l(d),_=b.length,S,M,D,R=d._listeners,U;_-- >0;)M=b[_],S=d[M],M==="_listeners"?D=h:D=h?h.concat(M):[M],U=g||typeof M=="symbol",R&&p.push(U?D:D.join(this.delimiter)),typeof S=="object"&&ce.call(this,S,p,D,U);return p}function Ie(d){for(var p=l(d),h=p.length,g,b,_;h-- >0;)b=p[h],g=d[b],g&&(_=!0,b!=="_listeners"&&!Ie(g)&&delete d[b]);return _}function $(d,p,h){this.emitter=d,this.event=p,this.listener=h}$.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function N(d,p,h){if(h===!0)b=!0;else if(h===!1)g=!0;else{if(!h||typeof h!="object")throw TypeError("options should be an object or true");var g=h.async,b=h.promisify,_=h.nextTick,S=h.objectify}if(g||_||b){var M=p,D=p._origin||p;if(_&&!s)throw Error("process.nextTick is not supported");b===r&&(b=p.constructor.name==="AsyncFunction"),p=function(){var R=arguments,U=this,ge=this.event;return b?_?Promise.resolve():new Promise(function(ae){u(ae)}).then(function(){return U.event=ge,M.apply(U,R)}):(_?process.nextTick:u)(function(){U.event=ge,M.apply(U,R)})},p._async=!0,p._origin=D}return[p,S?new $(this,d,p):this]}function w(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,d)}w.EventEmitter2=w,w.prototype.listenTo=function(d,p,h){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;h=x(h,{on:r,off:r,reducers:r},{on:F,off:F,reducers:le});function b(_){if(typeof _!="object")throw TypeError("events must be an object");var S=h.reducers,M=ie.call(g,d),D;M===-1?D=new E(g,d,h):D=g._observers[M];for(var R=l(_),U=R.length,ge,ae=typeof S=="function",te=0;te0;)b=h[g],(!d||b._target===d)&&(b.unsubscribe(p),_=!0);return _},w.prototype.delimiter=".",w.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},w.prototype.getMaxListeners=function(){return this._maxListeners},w.prototype.event="",w.prototype.once=function(d,p,h){return this._once(d,p,!1,h)},w.prototype.prependOnceListener=function(d,p,h){return this._once(d,p,!0,h)},w.prototype._once=function(d,p,h,g){return this._many(d,1,p,h,g)},w.prototype.many=function(d,p,h,g){return this._many(d,p,h,!1,g)},w.prototype.prependMany=function(d,p,h,g){return this._many(d,p,h,!0,g)},w.prototype._many=function(d,p,h,g,b){var _=this;if(typeof h!="function")throw new Error("many only accepts instances of Function");function S(){return--p===0&&_.off(d,S),h.apply(this,arguments)}return S._origin=h,this._on(d,S,g,b)},w.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p,h=this.wildcard,g,b,_,S,M;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(h&&(p=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(b=d.length,i){for(_=0;_3)for(g=new Array(D-1),S=1;S3)for(b=new Array(R-1),M=1;M0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,m.call(this,this._events[d].length,d))):this._events[d]=p,b)},w.prototype.off=function(d,p){if(typeof p!="function")throw new Error("removeListener only takes instances of Function");var h,g=[];if(this.wildcard){var b=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=W.call(this,null,b,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;h=this._events[d],g.push({_listeners:h})}for(var _=0;_0){for(g=this._all,p=0,h=g.length;p0;)g=p[h[_]],typeof g=="function"?b.push(g):b.push.apply(b,g);return b}else{if(this.wildcard){if(S=this.listenerTree,!S)return[];var M=[],D=typeof d=="string"?d.split(this.delimiter):d.slice();return W.call(this,M,D,S,0),M}return p?(g=p[d],g?typeof g=="function"?[g]:g:[]):[]}},w.prototype.eventNames=function(d){var p=this._events;return this.wildcard?ce.call(this,this.listenerTree,[],null,d):p?l(p):[]},w.prototype.listenerCount=function(d){return this.listeners(d).length},w.prototype.hasListeners=function(d){if(this.wildcard){var p=[],h=typeof d=="string"?d.split(this.delimiter):d.slice();return W.call(this,p,h,this.listenerTree,0),p.length>0}var g=this._events,b=this._all;return!!(b&&b.length||g&&(d===r?l(g).length:g[d]))},w.prototype.listenersAny=function(){return this._all?this._all:[]},w.prototype.waitFor=function(d,p){var h=this,g=typeof p;return g==="number"?p={timeout:p}:g==="function"&&(p={filter:p}),p=x(p,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:F,Promise:v}),B(p.Promise,function(b,_,S){function M(){var D=p.filter;if(!(D&&!D.apply(h,arguments)))if(h.off(d,M),p.handleError){var R=arguments[0];R?_(R):b(y.apply(null,arguments).slice(1))}else b(y.apply(null,arguments))}S(function(){h.off(d,M)}),h._on(d,M,!1)},{timeout:p.timeout,overload:p.overload})};function H(d,p,h){h=x(h,{Promise,timeout:0,overload:!1},{Promise:v});var g=h.Promise;return B(g,function(b,_,S){var M;if(typeof d.addEventListener=="function"){M=function(){b(y.apply(null,arguments))},S(function(){d.removeEventListener(p,M)}),d.addEventListener(p,M,{once:!0});return}var D=function(){R&&d.removeListener("error",R),b(y.apply(null,arguments))},R;p!=="error"&&(R=function(U){d.removeListener(p,D),_(U)},d.once("error",R)),S(function(){R&&d.removeListener("error",R),d.removeListener(p,D)}),d.once(p,D)},{timeout:h.timeout,overload:h.overload})}var C=w.prototype;if(Object.defineProperties(w,{defaultMaxListeners:{get:function(){return C._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");C._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(C,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return w});else if(typeof s_=="object")i_.exports=w;else{var X=new Function("","return this")();X.EventEmitter2=w}})()});var P_=T(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});var C_=Symbol("MustacheDataPath");function M_({target:r,propertyName:e}){return[...r[C_]||[],e]}function A_(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let s=t[n];if(s===void 0&&!(n in t)){let i=M_({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(i),s;throw Error(`Missing Mustache data property: ${i.join(" > ")}`)}return s&&typeof s=="object"?(s[C_]=M_({target:t,propertyName:n}),A_(s,e)):s}})}Up.default=A_});var Lr=T(_r=>{"use strict";_r.__esModule=!0;_r.Tokens=_r.StructuralCharacters=_r.Operators=void 0;var HA;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(HA=_r.Operators||(_r.Operators={}));var zA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(zA=_r.StructuralCharacters||(_r.StructuralCharacters={}));var VA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(VA=_r.Tokens||(_r.Tokens={}))});var $p=T(ti=>{"use strict";ti.__esModule=!0;ti.VALID_TOKENS=ti.OPERATOR_PRECEDENCE=void 0;var Ue=Lr();ti.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};ti.VALID_TOKENS={identifierOnly:[{name:Ue.Tokens.IDENTIFIER},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Ue.Tokens.IDENTIFIER},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.OPEN_PARENTHESIS},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.NOT}],binaryOperator:[{name:Ue.Tokens.OPERATOR,value:Ue.Operators.AND},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.OR},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.XOR}],binaryOperatorOrClose:[{name:Ue.Tokens.OPERATOR,value:Ue.Operators.AND},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.OR},{name:Ue.Tokens.OPERATOR,value:Ue.Operators.XOR},{name:Ue.Tokens.STRUCTURAL_CHARACTER,value:Ue.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Bp=T(vt=>{"use strict";vt.__esModule=!0;vt.ESCAPE_CHARACTER=vt.EOL=vt.COMMENT_DELIMITER=vt.QUOTED_IDENTIFIER_DELIMITER=vt.SEPARATORS=vt.OPERATORS=vt.STRUCTURAL_CHARACTERS=void 0;var ri=Lr();vt.STRUCTURAL_CHARACTERS={"(":ri.StructuralCharacters.OPEN_PARENTHESIS,")":ri.StructuralCharacters.CLOSE_PARENTHESIS};vt.OPERATORS={AND:ri.Operators.AND,OR:ri.Operators.OR,XOR:ri.Operators.XOR,NOT:ri.Operators.NOT};vt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));vt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);vt.COMMENT_DELIMITER=String.fromCodePoint(35);vt.EOL=String.fromCodePoint(10);vt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var U_=T(ar=>{"use strict";var Hp=ar&&ar.__assign||function(){return Hp=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";Wu.__esModule=!0;Wu.lex=void 0;var ni=Lr(),Bt=Bp(),si=U_(),ZA=function(r){for(var e=null,t=null,n=null,s=0;s{"use strict";var W_=Ht&&Ht.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";var Ur=ai&&ai.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";wt.__esModule=!0;wt.throwInvalidExpression=wt.isOperator=wt.isIdentifier=wt.notUtil=wt.xorUtil=wt.orUtil=wt.andUtil=void 0;var $_=Lr(),iP=function(r,e){return r&&e};wt.andUtil=iP;var aP=function(r,e){return r||e};wt.orUtil=aP;var oP=function(r,e){return r!==e};wt.xorUtil=oP;var uP=function(r){return!r};wt.notUtil=uP;var lP=function(r){var e=r.name,t=r.value;return e===$_.Tokens.IDENTIFIER&&typeof t=="string"};wt.isIdentifier=lP;var cP=function(r){var e=r.name,t=r.value;return e===$_.Tokens.OPERATOR&&typeof t=="string"};wt.isOperator=cP;var dP=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};wt.throwInvalidExpression=dP});var B_=T(Gu=>{"use strict";var Ya;Gu.__esModule=!0;Gu.OPERATOR_MAP=void 0;var Qp=Lr(),Xp=Kp();Gu.OPERATOR_MAP=(Ya={},Ya[Qp.Operators.AND]=Xp.andUtil,Ya[Qp.Operators.OR]=Xp.orUtil,Ya[Qp.Operators.XOR]=Xp.xorUtil,Ya)});var z_=T(on=>{"use strict";var oi=on&&on.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,i;n{"use strict";var Zp=qr&&qr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});qr.__esModule=!0;qr.parse=qr.evaluate=qr.getEvaluator=void 0;var V_=z_();Zp(qr,V_,"getEvaluator");Zp(qr,V_,"evaluate");var gP=Vp();Zp(qr,gP,"parse")});var UP={};zv(UP,{default:()=>dl});module.exports=Vv(UP);var qv=require("obsidian");var Ws=require("obsidian");var WP=new Error("timeout while waiting for mutex to become available"),YP=new Error("mutex already locked"),Kv=new Error("request for lock canceled"),Qv=function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?i(c.value):s(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},pl=class{constructor(e,t=Kv){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 Qv(this,void 0,void 0,function*(){let[n,s]=yield this.acquire(t);try{return yield e(n)}finally{s()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let s=this._value,i=t;this._value-=t,t=this._value+1,n.resolve([s,this._newReleaser(i)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},Xv=function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?i(c.value):s(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},ao=class{constructor(e){this._semaphore=new pl(1,e)}acquire(){return Xv(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 Jo=_i(ze());var Dt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new Dt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new Dt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Wt=class{static parseDate(e,t=!1){return window.moment(Jo.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Wt.parseRelativeDateRange,Wt.parseNumberedDateRange,Wt.parseAbsoluteDateRange];for(let s of n){let i=s(e,t);if(i.isValid())return i}return Dt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Jo.parse(e,void 0,{forwardDate:t});if(n.length===0)return Dt.buildInvalid();let s=n[0].start,i=n[1]&&n[1].start?n[1].start:s,a=window.moment(s.date()),o=window.moment(i.date());return new Dt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,s=e.match(n);if(s&&s.length===3){let i=s[1],a=s[2],o=Dt.buildRelative(a);switch(i){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Dt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[s,i,a]of n){let o=e.match(s);if(o){let u=o[0].trim();return new Dt(window.moment(u,i).startOf(a),window.moment(u,i).endOf(a))}}return Dt.buildInvalid()}};var hC={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Qr(r){for(let[e,t]of Object.entries(hC))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var eu=["MO","TU","WE","TH","FR","SA","SU"],He=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(eu.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=eu[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Ae=function(r){return r!=null},Yt=function(r){return typeof r=="number"},sp=function(r){return typeof r=="string"&&eu.includes(r)},dt=Array.isArray,rr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=pe(t,e/t.length)),t.slice(0,e)+String(n))}var dT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},gt=function(r,e){var t=r%e;return t*e<0?t+e:t},tu=function(r,e){return{div:Math.floor(r/e),mod:gt(r,e)}},jt=function(r){return!Ae(r)||r.length===0},We=function(r){return!jt(r)},he=function(r,e){return We(r)&&r.indexOf(e)!==-1};var Rr=function(r,e,t,n,s,i){return n===void 0&&(n=0),s===void 0&&(s=0),i===void 0&&(i=0),new Date(Date.UTC(r,e-1,t,n,s,i))},gC=[31,28,31,30,31,30,31,31,30,31,30,31],mT=1e3*60*60*24,ru=9999,hT=Rr(1970,1,1),yC=[6,0,1,2,3,4,5];var Ns=function(r){return r%4===0&&r%100!==0||r%400===0},ip=function(r){return r instanceof Date},Qn=function(r){return ip(r)&&!isNaN(r.getTime())},fT=function(r){return r.getTimezoneOffset()*60*1e3},bC=function(r,e){var t=r.getTime()-fT(r),n=e.getTime()-fT(e),s=t-n;return Math.round(s/mT)},va=function(r){return bC(r,hT)},nu=function(r){return new Date(hT.getTime()+r*mT)},TC=function(r){var e=r.getUTCMonth();return e===1&&Ns(r.getUTCFullYear())?29:gC[e]},Xr=function(r){return yC[r.getUTCDay()]},ap=function(r,e){var t=Rr(r,e+1,1);return[Xr(t),TC(t)]},su=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()))},iu=function(r){var e=new Date(r.getTime());return e},op=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}(),Jr=_C;var up=function(r,e){return up=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])},up(r,e)};function Fs(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");up(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ft=function(){return ft=Object.assign||function(e){for(var t,n=1,s=arguments.length;ne[0].length)&&(e=i,t=s)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Ea(r,e){e===void 0&&(e=Xn);var t={},n=new OC(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var m=n.acceptNumber();if(m&&(t.interval=parseInt(m[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=j.DAILY,n.nextSymbol()&&(a(),f());break;case"weekday(s)":t.freq=j.WEEKLY,t.byweekday=[j.MO,j.TU,j.WE,j.TH,j.FR],n.nextSymbol(),f();break;case"week(s)":t.freq=j.WEEKLY,n.nextSymbol()&&(i(),f());break;case"hour(s)":t.freq=j.HOURLY,n.nextSymbol()&&(i(),f());break;case"minute(s)":t.freq=j.MINUTELY,n.nextSymbol()&&(i(),f());break;case"month(s)":t.freq=j.MONTHLY,n.nextSymbol()&&(i(),f());break;case"year(s)":t.freq=j.YEARLY,n.nextSymbol()&&(i(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=j.WEEKLY;var y=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[j[y]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var k=u();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(j[k]),n.nextSymbol()}c(),f();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=j.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var E=o();if(!E)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(E),n.nextSymbol()}i(),f();break;default:throw new Error("Unknown symbol")}}function i(){var m=n.accept("on"),y=n.accept("the");if(!!(m||y))do{var k=l(),E=u(),x=o();if(k)E?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(j[E].nth(k))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(k),n.accept("day(s)"));else if(E)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(j[E]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[j.MO,j.TU,j.WE,j.TH,j.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var v=n.acceptNumber();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(v[0],10)];n.accept("comma");){if(v=n.acceptNumber(),!v)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(v[0],10))}}else if(x)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(x);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var m=n.accept("at");if(!!m)do{var y=n.acceptNumber();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(y[0],10)];n.accept("comma");){if(y=n.acceptNumber(),!y)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(y[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var m=parseInt(n.value[1],10);if(m<-366||m>366)throw new Error("Nth out of range: "+m);return n.nextSymbol(),n.accept("last")?-m:m;default:return!1}}function c(){n.accept("on"),n.accept("the");var m=l();if(!!m)for(t.bymonthday=[m],n.nextSymbol();n.accept("comma");){if(m=l(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(m),n.nextSymbol()}}function f(){if(n.symbol==="until"){var m=Date.parse(n.text);if(!m)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(m)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ue;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ue||(ue={}));function ka(r){return r12){var n=Math.floor(this.month/12),s=gt(this.month,12);this.month=s,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var i=tu(this.hour,24),a=i.div,o=i.mod;if(a&&(this.hour=o,this.addDaily(a)),jt(s)||he(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,i){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=tu(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,s)),(jt(s)||he(s,this.hour))&&(jt(i)||he(i,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,i,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=tu(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,s,i)),(jt(s)||he(s,this.hour))&&(jt(i)||he(i,this.minute))&&(jt(a)||he(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=ap(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>ru))return;t=ap(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,i=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(s){case ue.YEARLY:return this.addYears(i);case ue.MONTHLY:return this.addMonths(i);case ue.WEEKLY:return this.addWeekly(i,a);case ue.DAILY:return this.addDaily(i);case ue.HOURLY:return this.addHours(i,n,o);case ue.MINUTELY:return this.addMinutes(i,n,o,u);case ue.SECONDLY:return this.addSeconds(i,n,o,u,l)}},e}(Us);function cp(r){for(var e=[],t=Object.keys(r),n=0,s=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||We(e.byweekno)||We(e.byyearday)||Boolean(e.bymonthday)||We(e.bymonthday)||Ae(e.byweekday)||Ae(e.byeaster)))switch(e.freq){case j.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case j.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case j.WEEKLY:e.byweekday=[Xr(e.dtstart)];break}if(Ae(e.bymonth)&&!dt(e.bymonth)&&(e.bymonth=[e.bymonth]),Ae(e.byyearday)&&!dt(e.byyearday)&&Yt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ae(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(dt(e.bymonthday)){for(var s=[],i=[],t=0;t0?s.push(n):n<0&&i.push(n)}e.bymonthday=s,e.bynmonthday=i}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ae(e.byweekno)&&!dt(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ae(e.byweekday))e.bynweekday=null;else if(Yt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(sp(e.byweekday))e.byweekday=[He.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof He)!e.byweekday.n||e.freq>j.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;tj.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=We(a)?a:null,e.bynweekday=We(o)?o:null}return Ae(e.byhour)?Yt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+gt(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),m=gt(l,7),y=Math.floor(f+m/4),k=0;k0&&E<=y){var x=void 0;E>1?(x=c+(E-1)*7,c!==u&&(x-=7-u)):x=c;for(var v=0;v<7&&(o.wnomask[x]=1,x++,o.wdaymask[x]!==e.wkst);v++);}}if(he(e.byweekno,1)){var x=c+y*7;if(c!==u&&(x-=7-u),x=4?(le=0,ie=B+gt(F-e.wkst,7)):ie=n-c,I=Math.floor(52+gt(ie,7)/4)}if(he(e.byweekno,I))for(var x=0;xi)return en(r);if(I>=t){var F=YT(I,e);if(!r.accept(F)||o&&(--o,!o))return en(r)}}else for(var v=y;vi)return en(r);if(I>=t){var F=YT(I,e);if(!r.accept(F)||o&&(--o,!o))return en(r)}}}if(e.interval===0||(u.add(e,E),u.year>ru))return en(r);ka(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function UC(r,e,t){var n=t.bymonth,s=t.byweekno,i=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return We(n)&&!he(n,r.mmask[e])||We(s)&&!r.wnomask[e]||We(i)&&!he(i,r.wdaymask[e])||We(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!he(r.eastermask,e)||(We(o)||We(u))&&!he(o,r.mdaymask[e])&&!he(u,r.nmdaymask[e])||We(l)&&(e=r.yearlen&&!he(l,e+1-r.yearlen)&&!he(l,-r.nextyearlen+e-r.yearlen))}function YT(r,e){return new Zn(r,e.tzid).rezonedDate()}function en(r){return r.getValue()}function qC(r,e,t,n,s){for(var i=!1,a=e;a=j.HOURLY&&We(s)&&!he(s,e.hour)||n>=j.MINUTELY&&We(i)&&!he(i,e.minute)||n>=j.SECONDLY&&We(a)&&!he(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var nr={MO:new He(0),TU:new He(1),WE:new He(2),TH:new He(3),FR:new He(4),SA:new He(5),SU:new He(6)},Sa={freq:ue.YEARLY,dtstart:null,interval:1,wkst:nr.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},kT=Object.keys(Sa),j=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new DT,this.origOptions=cp(e);var n=wT(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Ea(e,t)},r.fromText=function(e,t){return bT(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return au(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new lp("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Jr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!Qn(e)||!Qn(t))throw new Error("Invalid date passed in to RRule.between");var i={before:t,after:e,inc:n};if(s)return this._iter(new lp("between",i,s));var a=this._cacheGet("between",i);return a===!1&&(a=this._iter(new Jr("between",i)),this._cacheAdd("between",a,i)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Qn(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new Jr("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Qn(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new Jr("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return xa(this.origOptions)},r.prototype.toText=function(e,t,n){return TT(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return _T(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ue.YEARLY,r.MONTHLY=ue.MONTHLY,r.WEEKLY=ue.WEEKLY,r.DAILY=ue.DAILY,r.HOURLY=ue.HOURLY,r.MINUTELY=ue.MINUTELY,r.SECONDLY=ue.SECONDLY,r.MO=nr.MO,r.TU=nr.TU,r.WE=nr.WE,r.TH=nr.TH,r.FR=nr.FR,r.SA=nr.SA,r.SU=nr.SU,r.parseString=Da,r.optionsToString=xa,r}();function jT(r,e,t,n,s,i){var a={},o=r.accept;function u(m,y){t.forEach(function(k){k.between(m,y,!0).forEach(function(E){a[Number(E)]=!0})})}s.forEach(function(m){var y=new Zn(m,i).rezonedDate();a[Number(y)]=!0}),r.accept=function(m){var y=Number(m);return isNaN(y)?o.call(this,m):!a[y]&&(u(new Date(y-1),new Date(y+1)),!a[y])?(a[y]=!0,o.call(this,m)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(m){var y=Number(m);return a[y]?!0:(a[y]=!0,o.call(this,m))});for(var l=0;l1||s.length||i.length||a.length){var c=new pp(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(m){c.rrule(new j(fp(m,o,u),l))}),s.forEach(function(m){c.rdate(m)}),i.forEach(function(m){c.exrule(new j(fp(m,o,u),l))}),a.forEach(function(m){c.exdate(m)}),e.compatible&&e.dtstart&&c.rdate(o),c}var f=n[0]||{};return new j(fp(f,f.dtstart||e.dtstart||o,f.tzid||e.tzid||u),l)}function ou(r,e){return e===void 0&&(e={}),jC(r,GC(e))}function fp(r,e,t){return ft(ft({},r),{dtstart:e,tzid:t})}function GC(r){var e=[],t=Object.keys(r),n=Object.keys(GT);if(t.forEach(function(s){he(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return ft(ft({},GT),r)}function $C(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=dT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function BC(r){var e=$C(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function HC(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` +`),n=0;n0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function zC(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function $T(r,e){return zC(e),r.split(",").map(function(t){return wa(t)})}function BT(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nn}static nextAfterYears(e,t,n,s){let i=1;for(s!==void 0&&(i=Number.parseInt(s.trim(),10));st.isSkippingTooManyYears(e,t,i);)t=st.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new G(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function ou(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var vn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return vn.instance||(vn.instance=new vn),vn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(vn.empty)}isEmpty(){return this.get()===vn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+ou(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ye=vn;ye.empty="";var pp=5;function mp(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,s,i)=>{let a=[];return a=a.concat(zC(n,s,i,t,e)),a=a.concat(VC(n,s,i,r.recurrenceSymbol)),a=a.concat(HC(n,s,i,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`}),a=a.slice(0,i.autoSuggestMaxItems),a}}function HC(r,e,t,n){let s=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),i=[];if(r.includes(n.dueDateSymbol)||i.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||i.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||i.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),s(r)||(i.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),i.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),i.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),i.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),i.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||i.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Wt.parseDate("today",!0).format(z.dateFormat);i.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=hp(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=i.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?i:o}function zC(r,e,t,n,s){let i=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=hp(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length1?Wt.parseDate(Hr(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(z.dateFormat)}`,appendText:`${l} ${f.format(z.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let m=1,y=i.filter(k=>c&&c.length>=m&&k.toLowerCase().includes(c.toLowerCase())).slice(0,s);y.length===0&&(y=i.slice(0,s));for(let k of y){let x=`${Wt.parseDate(k,!0).format(z.dateFormat)}`;a.push({suggestionType:"match",displayText:`${k} (${x})`,appendText:`${l} ${x} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function VC(r,e,t,n){var u;let s=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=hp(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length0){let k=(u=st.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(k){let E=`${l} ${k} `;if(i.push({suggestionType:"match",displayText:`\u2705 ${k}`,appendText:E,insertAt:o.index,insertSkip:o[0].length}),o[0]==E)return[]}}let f=1,m=t.autoSuggestMaxItems/2,y=s.filter(k=>c&&c.length>=f&&k.toLowerCase().includes(c.toLowerCase())).slice(0,m);y.length===0&&c.trim().length===0&&(y=s.slice(0,m));for(let k of y)i.push({suggestionType:"match",displayText:`${k}`,appendText:`${l} ${k} `,insertAt:o.index,insertSkip:o[0].length})}return i}function hp(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s}function KC(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([s,i])=>[s,0])),n=Object.fromEntries(e.map(([s,i])=>[i,s]));for(let s of r)s in t?t[s]++:s in n&&(t[n[s]]=Math.max(0,t[n[s]]-1));return Object.values(t).some(s=>s>0)}function Vb(r,e){return(t,n,s)=>KC(t.slice(0,n),e)?r(t,n,s):[]}function Kb(r,e){return ye.getInstance().includedIn(r)&&QC(r,e)}function QC(r,e){if(r.length===0)return!1;let t=fe.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var wn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};var Jn=class{constructor(){this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideCancelledDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideTags=!1}},gp=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new wn}applyQueryLayoutOptions(e){let t=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,s]of t)yp(e,n,s);this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode")}};function yp(r,e,t){e&&r.push(XC(t))}function XC(r){return`tasks-layout-hide-${r}`}var En=class extends gp{constructor(t,n){super(n);this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","cancelledDate","doneDate","blockLink"];this._hiddenTaskLayoutComponents=[];this._taskListHiddenClasses=[];t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Jn,this._shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}shownTaskLayoutComponents(){return this._shownTaskLayoutComponents}hiddenTaskLayoutComponents(){return this._hiddenTaskLayoutComponents}taskListHiddenClasses(){return this._taskListHiddenClasses}applyOptions(){this.applyTaskLayoutOptions(),this.applyQueryLayoutOptions(this._taskListHiddenClasses)}applyTaskLayoutOptions(){let t=[[this.taskLayoutOptions.hidePriority,"priority"],[this.taskLayoutOptions.hideRecurrenceRule,"recurrenceRule"],[this.taskLayoutOptions.hideCreatedDate,"createdDate"],[this.taskLayoutOptions.hideStartDate,"startDate"],[this.taskLayoutOptions.hideScheduledDate,"scheduledDate"],[this.taskLayoutOptions.hideDueDate,"dueDate"],[this.taskLayoutOptions.hideCancelledDate,"cancelledDate"],[this.taskLayoutOptions.hideDoneDate,"doneDate"]];for(let[n,s]of t)this.hideComponent(n,s),yp(this._taskListHiddenClasses,n,s);yp(this._taskListHiddenClasses,this.taskLayoutOptions.hideTags,"tags")}hideComponent(t,n){t&&(this._hiddenTaskLayoutComponents.push(n),this._shownTaskLayoutComponents=this._shownTaskLayoutComponents.filter(s=>s!=n))}};var Tp={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,cancelledDateRegex:/❌ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},es=class{constructor(e){this.symbols=e}serialize(e){let t=new En,n="",s=!1;for(let i of t.shownTaskLayoutComponents())n+=this.componentToString(e,s,i);return n}componentToString(e,t,n){var m;let{prioritySymbols:s,startDateSymbol:i,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,dueDateSymbol:f}=this.symbols;switch(n){case"description":return e.description;case"priority":{let y="";return e.priority==="0"?y=" "+s.Highest:e.priority==="1"?y=" "+s.High:e.priority==="2"?y=" "+s.Medium:e.priority==="4"?y=" "+s.Low:e.priority==="5"&&(y=" "+s.Lowest),y}case"startDate":return e.startDate?t?" "+i:` ${i} ${e.startDate.format(z.dateFormat)}`:"";case"createdDate":return e.createdDate?t?" "+a:` ${a} ${e.createdDate.format(z.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t?" "+o:` ${o} ${e.scheduledDate.format(z.dateFormat)}`;case"doneDate":return e.doneDate?t?" "+u:` ${u} ${e.doneDate.format(z.dateFormat)}`:"";case"cancelledDate":return e.cancelledDate?t?" "+l:` ${l} ${e.cancelledDate.format(z.dateFormat)}`:"";case"dueDate":return e.dueDate?t?" "+f:` ${f} ${e.dueDate.format(z.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t?" "+c:` ${c} ${e.recurrence.toText()}`:"";case"blockLink":return(m=e.blockLink)!=null?m:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,s="3",i=null,a=null,o=null,u=null,l=null,c=null,f="",m=null,y="",k=20,E=0;do{n=!1;let x=e.match(t.priorityRegex);x!==null&&(s=this.parsePriority(x[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let v=e.match(t.doneDateRegex);v!==null&&(u=window.moment(v[1],z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let I=e.match(t.cancelledDateRegex);I!==null&&(l=window.moment(I[1],z.dateFormat),e=e.replace(t.cancelledDateRegex,"").trim(),n=!0);let F=e.match(t.dueDateRegex);F!==null&&(o=window.moment(F[1],z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let le=e.match(t.scheduledDateRegex);le!==null&&(a=window.moment(le[1],z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let B=e.match(t.startDateRegex);B!==null&&(i=window.moment(B[1],z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let ie=e.match(t.createdDateRegex);ie!==null&&(c=window.moment(ie[1],z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let W=e.match(t.recurrenceRegex);W!==null&&(f=W[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let j=e.match(z.hashTagsFromEnd);if(j!=null){e=e.replace(z.hashTagsFromEnd,"").trim(),n=!0;let ce=j[0].trim();y=y.length>0?[ce,y].join(" "):ce}E++}while(n&&E<=k);return f.length>0&&(m=st.fromText({recurrenceRuleText:f,startDate:i,scheduledDate:a,dueDate:o})),y.length>0&&(e+=" "+y),{description:e,priority:s,startDate:i,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:m,tags:fe.extractHashtags(e)}}};function kn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var bp={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:kn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:kn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:kn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:kn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:kn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:kn(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:kn(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:kn(/repeat:: *([a-zA-Z0-9, !]+)/)}},uu=class extends es{constructor(){super(bp)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let s=super.componentToString(e,t,n);return s!==""&&!["blockLink","description"].includes(n)?` [${s.trim()}]`:s}};var jt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(jt||{}),Ve=class{constructor(e,t,n,s,i="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=i}};var xt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static makeDone(){return new xt(new Ve("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new xt(new Ve("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new xt(new Ve(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new xt(new Ve("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new xt(new Ve("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new xt(new Ve("Q","Non-Task","A",!0,"NON_TASK"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return jt[e]||"TODO"}static createUnknownStatus(e){return new xt(new Ve(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=xt.getTypeFromStatusTypeString(e[3]);return new xt(new Ve(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return xt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},Q=xt;Q.DONE=xt.makeDone(),Q.EMPTY=xt.makeEmpty(),Q.TODO=xt.makeTodo();var lu=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Ne=class{constructor(){this.coreStatuses=[Q.makeTodo().configuration,Q.makeDone().configuration],this.customStatuses=[Q.makeInProgress().configuration,Q.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new Q(e);return t.findIndex(s=>new Q(s).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Ne.deleteAllCustomStatuses(e),new Ne().customStatuses.forEach(n=>{Ne.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(a=>a.symbol==s[0]&&a.name==s[1]&&a.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):Ne.addStatus(e.customStatuses,Q.createFromImportedValue(s))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Ne.allStatuses(e).forEach(n=>{t.add(n)})}};var Qb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Zr=class{constructor(e,t,n,s,i,a){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=i;this.stable=a}static get values(){let e=[];return Qb.forEach(t=>{e=[...e,new Zr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Zr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Zr.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Jr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new es(Tp),buildSuggestions:mp(Tp,pp)},dataview:{displayName:"Dataview",taskSerializer:new uu,buildSuggestions:Vb(mp(bp,pp),[["(",")"],["[","]"]])}},Zb={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Ne,features:Zr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new lu,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},Sn=ke({},Zb);function Xb(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var K=()=>(Xb(Zr.settingsFlags,Sn.features),Xb(Zb.loggingOptions.minLevels,Sn.loggingOptions.minLevels),Sn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,i;let n=Q.getTypeFromStatusTypeString(r.type);t[e]=new Ve((s=r.symbol)!=null?s:" ",r.name,(i=r.nextStatusSymbol)!=null?i:"x",r.availableAsCommand,n)}),ke({},Sn)),Ke=r=>(Sn=ke(ke({},Sn),r),K());var ts=(r,e)=>(Sn.generalSettings[r]=e,K()),Jb=r=>{var e;return(e=Sn.features[r])!=null?e:!1};function Ca(){return Jr[K().taskFormat]}function cu(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function e_(r){let e=[...r],t="";return e.forEach(n=>{t+=cu(n)}),t}var Ee=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==Q.EMPTY.symbol)}static getInstance(){return Ee.instance||(Ee.instance=new Ee),Ee.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof Q?this._registeredStatuses.push(e):this._registeredStatuses.push(new Q(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):Q.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):Q.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:Q.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return Q.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:Q.createUnknownStatus(e.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(e){let t=this.getNextStatusOrCreate(e),n=this.getNextRecurrenceStatusOfType(t,"TODO");if(n)return n;let s=this.getNextRecurrenceStatusOfType(t,"IN_PROGRESS");return s||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(e,t){if(e.type===t)return e;let n=e;for(let s=0;s!this.hasSymbol(i.symbol)),n=new Ee,s=[];return t.forEach(i=>{if(n.hasSymbol(i.symbol))return;let a=Ee.copyStatusWithNewName(i,`Unknown (${i.symbol})`);s.push(a),n.add(a)}),s.sort((i,a)=>i.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new Ve(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new Q(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[Q.makeTodo(),Q.makeInProgress(),Q.makeDone(),Q.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",s=[],i=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);s.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(t,l,i,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(t,c,i,o,!0)}}),` +`).map(function(s){return s.replace(/^RRULE:/,"EXRULE:")}).filter(function(s){return!/^DTSTART/.test(s)}))}),this._rdate.length&&t.push(VT("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(VT("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(` +`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(j);function HT(r,e){if(!(r instanceof j))throw new TypeError(String(r)+" is not RRule instance");he(e.map(String),String(r))||e.push(r)}function zT(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");he(e.map(Number),Number(r))||(e.push(r),Zr(e))}function VT(r,e,t){var n=!t||t.toUpperCase()==="UTC",s=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),i=e.map(function(a){return Is(a.valueOf(),n)}).join(",");return"".concat(s).concat(i)}function sr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?1:!r.isValid()&&e.isValid()?-1:r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var st=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:s,scheduledDate:i,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=s,this.scheduledDate=i,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:s}){try{let i=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(i==null)return null;let a=i[1].trim(),o=i[2]!==void 0,u=j.parseText(a);if(u!==null){let l=null;s?l=window.moment(s):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new j(u);return new st({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:s})}}catch(i){i instanceof Error&&console.log(i.message)}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){let e=this.nextReferenceDate();if(e!==null){let t=null,n=null,s=null;if(this.referenceDate){if(this.startDate){let i=window.moment.duration(this.startDate.diff(this.referenceDate));t=window.moment(e),t.add(Math.round(i.asDays()),"days")}if(this.scheduledDate){let i=window.moment.duration(this.scheduledDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(i.asDays()),"days")}if(this.dueDate){let i=window.moment.duration(this.dueDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(i.asDays()),"days")}}return{startDate:t,scheduledDate:n,dueDate:s}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||sr(this.startDate,e.startDate)!==0||sr(this.scheduledDate,e.scheduledDate)!==0||sr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextReferenceDate(){if(this.baseOnToday){let e=window.moment();return this.nextReferenceDateFromToday(e).toDate()}else return this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new j(ot(Se({},this.rrule.origOptions),{dtstart:e.startOf("day").utc(!0).toDate()}));return this.nextAfter(e.endOf("day"),t)}nextReferenceDateFromOriginalReferenceDate(){var t;let e=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");return this.nextAfter(e,this.rrule)}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),s=this.toText(),i=s.match(/every( \d+)? month(s)?(.*)?/);i!==null&&(s.includes(" on ")||(n=st.nextAfterMonths(e,n,t,i[1])));let a=s.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=st.nextAfterYears(e,n,t,a[1])),st.addTimezone(n)}static nextAfterMonths(e,t,n,s){let i=1;for(s!==void 0&&(i=Number.parseInt(s.trim(),10));st.isSkippingTooManyMonths(e,t,i);)t=st.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let s=t.month()-e.month();return s+=(t.year()-e.year())*12,s>n}static nextAfterYears(e,t,n,s){let i=1;for(s!==void 0&&(i=Number.parseInt(s.trim(),10));st.isSkippingTooManyYears(e,t,i);)t=st.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new j(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function uu(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var wn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return wn.instance||(wn.instance=new wn),wn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(wn.empty)}isEmpty(){return this.get()===wn.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)"+uu(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ye=wn;ye.empty="";var mp=5;function hp(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,s,i)=>{let a=[];return a=a.concat(KC(n,s,i,t,e)),a=a.concat(QC(n,s,i,r.recurrenceSymbol)),a=a.concat(VC(n,s,i,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`}),a=a.slice(0,i.autoSuggestMaxItems),a}}function VC(r,e,t,n){let s=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),i=[];if(r.includes(n.dueDateSymbol)||i.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||i.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||i.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),s(r)||(i.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),i.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),i.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),i.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),i.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||i.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Wt.parseDate("today",!0).format(z.dateFormat);i.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=gp(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=i.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?i:o}function KC(r,e,t,n,s){let i=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=gp(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length1?Wt.parseDate(Qr(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(z.dateFormat)}`,appendText:`${l} ${f.format(z.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let m=1,y=i.filter(k=>c&&c.length>=m&&k.toLowerCase().includes(c.toLowerCase())).slice(0,s);y.length===0&&(y=i.slice(0,s));for(let k of y){let x=`${Wt.parseDate(k,!0).format(z.dateFormat)}`;a.push({suggestionType:"match",displayText:`${k} (${x})`,appendText:`${l} ${x} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function QC(r,e,t,n){var u;let s=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=gp(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length0){let k=(u=st.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(k){let E=`${l} ${k} `;if(i.push({suggestionType:"match",displayText:`\u2705 ${k}`,appendText:E,insertAt:o.index,insertSkip:o[0].length}),o[0]==E)return[]}}let f=1,m=t.autoSuggestMaxItems/2,y=s.filter(k=>c&&c.length>=f&&k.toLowerCase().includes(c.toLowerCase())).slice(0,m);y.length===0&&c.trim().length===0&&(y=s.slice(0,m));for(let k of y)i.push({suggestionType:"match",displayText:`${k}`,appendText:`${l} ${k} `,insertAt:o.index,insertSkip:o[0].length})}return i}function gp(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s}function XC(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([s,i])=>[s,0])),n=Object.fromEntries(e.map(([s,i])=>[i,s]));for(let s of r)s in t?t[s]++:s in n&&(t[n[s]]=Math.max(0,t[n[s]]-1));return Object.values(t).some(s=>s>0)}function QT(r,e){return(t,n,s)=>XC(t.slice(0,n),e)?r(t,n,s):[]}function XT(r,e){return ye.getInstance().includedIn(r)&&ZC(r,e)}function ZC(r,e){if(r.length===0)return!1;let t=fe.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var En=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};var Ra=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","cancelledDate","doneDate","blockLink"],yp=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new En}applyQueryLayoutOptions(e){let t=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,s]of t)bp(e,n,s);this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode")}};function bp(r,e,t){e&&r.push(JC(t))}function JC(r){return`tasks-layout-hide-${r}`}var lu=class extends yp{constructor(t,n){super(n);this._taskListHiddenClasses=[];t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Cr,this.applyTaskLayoutOptions(),this.applyQueryLayoutOptions(this._taskListHiddenClasses)}taskListHiddenClasses(){return this._taskListHiddenClasses}applyTaskLayoutOptions(){this.taskLayoutOptions.toggleableComponents.forEach(t=>{bp(this._taskListHiddenClasses,!this.taskLayoutOptions.isShown(t),t)}),bp(this._taskListHiddenClasses,!this.taskLayoutOptions.areTagsShown(),"tags")}};var Cr=class{constructor(){this.visible={};this.tagsVisible=!0;Ra.forEach(e=>{this.visible[e]=!0})}isShown(e){return this.visible[e]}areTagsShown(){return this.tagsVisible}hide(e){this.visible[e]=!1}setVisibility(e,t){this.visible[e]=t}setTagsVisibility(e){this.tagsVisible=e}get shownComponents(){return Ra.filter(e=>this.visible[e])}get hiddenComponents(){return Ra.filter(e=>!this.visible[e])}get toggleableComponents(){return Ra.filter(e=>e!=="description"&&e!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(e=>{this.visible[e]=!this.visible[e]}),this.setTagsVisibility(!this.areTagsShown())}};var Tp={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,cancelledDateRegex:/❌ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},Jn=class{constructor(e){this.symbols=e}serialize(e){let t=new Cr,n="",s=!1;for(let i of t.shownComponents)n+=this.componentToString(e,s,i);return n}componentToString(e,t,n){var m;let{prioritySymbols:s,startDateSymbol:i,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,dueDateSymbol:f}=this.symbols;switch(n){case"description":return e.description;case"priority":{let y="";return e.priority==="0"?y=" "+s.Highest:e.priority==="1"?y=" "+s.High:e.priority==="2"?y=" "+s.Medium:e.priority==="4"?y=" "+s.Low:e.priority==="5"&&(y=" "+s.Lowest),y}case"startDate":return e.startDate?t?" "+i:` ${i} ${e.startDate.format(z.dateFormat)}`:"";case"createdDate":return e.createdDate?t?" "+a:` ${a} ${e.createdDate.format(z.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t?" "+o:` ${o} ${e.scheduledDate.format(z.dateFormat)}`;case"doneDate":return e.doneDate?t?" "+u:` ${u} ${e.doneDate.format(z.dateFormat)}`:"";case"cancelledDate":return e.cancelledDate?t?" "+l:` ${l} ${e.cancelledDate.format(z.dateFormat)}`:"";case"dueDate":return e.dueDate?t?" "+f:` ${f} ${e.dueDate.format(z.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t?" "+c:` ${c} ${e.recurrence.toText()}`:"";case"blockLink":return(m=e.blockLink)!=null?m:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,s="3",i=null,a=null,o=null,u=null,l=null,c=null,f="",m=null,y="",k=20,E=0;do{n=!1;let x=e.match(t.priorityRegex);x!==null&&(s=this.parsePriority(x[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let v=e.match(t.doneDateRegex);v!==null&&(u=window.moment(v[1],z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let I=e.match(t.cancelledDateRegex);I!==null&&(l=window.moment(I[1],z.dateFormat),e=e.replace(t.cancelledDateRegex,"").trim(),n=!0);let F=e.match(t.dueDateRegex);F!==null&&(o=window.moment(F[1],z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let le=e.match(t.scheduledDateRegex);le!==null&&(a=window.moment(le[1],z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let B=e.match(t.startDateRegex);B!==null&&(i=window.moment(B[1],z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let ie=e.match(t.createdDateRegex);ie!==null&&(c=window.moment(ie[1],z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let W=e.match(t.recurrenceRegex);W!==null&&(f=W[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let G=e.match(z.hashTagsFromEnd);if(G!=null){e=e.replace(z.hashTagsFromEnd,"").trim(),n=!0;let ce=G[0].trim();y=y.length>0?[ce,y].join(" "):ce}E++}while(n&&E<=k);return f.length>0&&(m=st.fromText({recurrenceRuleText:f,startDate:i,scheduledDate:a,dueDate:o})),y.length>0&&(e+=" "+y),{description:e,priority:s,startDate:i,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:m,tags:fe.extractHashtags(e)}}};function kn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var _p={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:kn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:kn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:kn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:kn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:kn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:kn(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:kn(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:kn(/repeat:: *([a-zA-Z0-9, !]+)/)}},cu=class extends Jn{constructor(){super(_p)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let s=super.componentToString(e,t,n);return s!==""&&!["blockLink","description"].includes(n)?` [${s.trim()}]`:s}};var Gt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Gt||{}),Ve=class{constructor(e,t,n,s,i="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=i}};var xt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static makeDone(){return new xt(new Ve("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new xt(new Ve("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new xt(new Ve(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new xt(new Ve("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new xt(new Ve("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new xt(new Ve("Q","Non-Task","A",!0,"NON_TASK"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Gt[e]||"TODO"}static createUnknownStatus(e){return new xt(new Ve(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=xt.getTypeFromStatusTypeString(e[3]);return new xt(new Ve(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return xt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},Q=xt;Q.DONE=xt.makeDone(),Q.EMPTY=xt.makeEmpty(),Q.TODO=xt.makeTodo();var du=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Ne=class{constructor(){this.coreStatuses=[Q.makeTodo().configuration,Q.makeDone().configuration],this.customStatuses=[Q.makeInProgress().configuration,Q.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new Q(e);return t.findIndex(s=>new Q(s).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Ne.deleteAllCustomStatuses(e),new Ne().customStatuses.forEach(n=>{Ne.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(a=>a.symbol==s[0]&&a.name==s[1]&&a.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):Ne.addStatus(e.customStatuses,Q.createFromImportedValue(s))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Ne.allStatuses(e).forEach(n=>{t.add(n)})}};var ZT=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var tn=class{constructor(e,t,n,s,i,a){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=i;this.stable=a}static get values(){let e=[];return ZT.forEach(t=>{e=[...e,new tn(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return tn.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of tn.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 rn={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Jn(Tp),buildSuggestions:hp(Tp,mp)},dataview:{displayName:"Dataview",taskSerializer:new cu,buildSuggestions:QT(hp(_p,mp),[["(",")"],["[","]"]])}},e_={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Ne,features:tn.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new du,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},Sn=Se({},e_);function JT(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var K=()=>(JT(tn.settingsFlags,Sn.features),JT(e_.loggingOptions.minLevels,Sn.loggingOptions.minLevels),Sn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,i;let n=Q.getTypeFromStatusTypeString(r.type);t[e]=new Ve((s=r.symbol)!=null?s:" ",r.name,(i=r.nextStatusSymbol)!=null?i:"x",r.availableAsCommand,n)}),Se({},Sn)),Ke=r=>(Sn=Se(Se({},Sn),r),K());var es=(r,e)=>(Sn.generalSettings[r]=e,K()),t_=r=>{var e;return(e=Sn.features[r])!=null?e:!1};function Ca(){return rn[K().taskFormat]}function fu(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function r_(r){let e=[...r],t="";return e.forEach(n=>{t+=fu(n)}),t}var Ee=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==Q.EMPTY.symbol)}static getInstance(){return Ee.instance||(Ee.instance=new Ee),Ee.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof Q?this._registeredStatuses.push(e):this._registeredStatuses.push(new Q(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):Q.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):Q.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:Q.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return Q.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:Q.createUnknownStatus(e.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(e){let t=this.getNextStatusOrCreate(e),n=this.getNextRecurrenceStatusOfType(t,"TODO");if(n)return n;let s=this.getNextRecurrenceStatusOfType(t,"IN_PROGRESS");return s||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(e,t){if(e.type===t)return e;let n=e;for(let s=0;s!this.hasSymbol(i.symbol)),n=new Ee,s=[];return t.forEach(i=>{if(n.hasSymbol(i.symbol))return;let a=Ee.copyStatusWithNewName(i,`Unknown (${i.symbol})`);s.push(a),n.add(a)}),s.sort((i,a)=>i.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new Ve(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new Q(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[Q.makeTodo(),Q.makeInProgress(),Q.makeDone(),Q.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",s=[],i=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);s.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(t,l,i,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(t,c,i,o,!0)}}),` \`\`\`${n} flowchart LR @@ -146,8 +146,8 @@ ${i.join(` linkStyle default stroke:gray \`\`\` -`}addEdgeIfNotToInternal(e,t,n,s,i){let a=e.findIndex(l=>l.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;i?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${s+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=e_(e.name),s=e.type;if(t){let i=cu(e.symbol),a=cu(e.nextStatusSymbol),o=`[${i}] -> [${a}]`,u=`'${n}'`,l=`(${s})`;return`["${u}
${o}
${l}"]:::${s}`}else return`["${n}"]:::${s}`}};var yr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),s=Math.round(n.diff(e.dueDate)/yr.milliSecondsPerDay),i;s>=7?i=1:s>=-14?i=(s+14)*.8/21+.2:i=.2,t+=i*yr.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*yr.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*yr.startedCoefficient),e.priority){case"0":t+=1.5*yr.priorityCoefficient;break;case"1":t+=1*yr.priorityCoefficient;break;case"2":t+=.65*yr.priorityCoefficient;break;case"3":t+=.325*yr.priorityCoefficient;break;case"5":t-=.3*yr.priorityCoefficient;break}return t}},en=yr;en.dueCoefficient=12,en.scheduledCoefficient=5,en.startedCoefficient=-3,en.priorityCoefficient=6,en.milliSecondsPerDay=1e3*60*60*24;var bt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=K();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),s=e.substring(t,n),i=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(i||(i=/(\d{4})(\d{2})(\d{2})/.exec(s)),i){let a=window.moment([parseInt(i[1]),parseInt(i[2])-1,parseInt(i[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,i=e.scheduledDateIsInferred;return n===null?i&&(i=!1,s=null):i?s=n:this.canApplyFallback(e)&&(s=n,i=!0),new fe(ot(ke({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:i}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new fe(ot(ke({},s),{scheduledDateIsInferred:!1}))),s))}};var t_=require("obsidian");var tn=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var He=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new tn("Overdue",1):t.isSame(e,"day")?new tn("Today",2):new tn("Future",3):new tn("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new tn("",0);let t=this.fromNowOrder(e);return new tn(e.fromNow(),t)}fromNowOrder(e){let t=window.moment(),n=e.isSameOrBefore(t,"day"),s=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+s.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let s=e.fromNow(!0).split(" "),i,a=Number(s[0]);isNaN(a)?i=1:i=a;let o=s[1];return t?n.subtract(i,o):n.add(i,o)}postpone(e="days",t=1){if(!this._date)throw new t_.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Ws=class{constructor(e){this._path=e}get path(){return this._path}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}};var rn=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return rn.priorityNameUsingNone(e).replace("None","Normal")}};var JC=require("obsidian"),i_=vi(s_());var _p=class extends i_.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let i in this.options.minLevels)t.startsWith(i)&&i.length>=s.length&&(n=this.options.minLevels[i],s=i);return new vp(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Rt=new _p,vp=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){r.debug(`${e} ==> ${s+1} : ${n.toFileLineString()}`)})}var $t=class{},z=$t;z.dateFormat="YYYY-MM-DD",z.dateTimeFormat="YYYY-MM-DD HH:mm",z.indentationRegex=/^([\s\t>]*)/,z.listMarkerRegex=/([-*+]|[0-9]+\.)/,z.checkboxRegex=/\[(.)\]/u,z.afterCheckboxRegex=/ *(.*)/u,z.taskRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source+" +"+$t.checkboxRegex.source+$t.afterCheckboxRegex.source,"u"),z.nonTaskRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source+"? *("+$t.checkboxRegex.source+")?"+$t.afterCheckboxRegex.source,"u"),z.listItemRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source),z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,z.hashTagsFromEnd=new RegExp($t.hashTags.source+"$");var fe=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:i,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:f,cancelledDate:m,recurrence:y,blockLink:k,tags:E,originalMarkdown:x,scheduledDateIsInferred:v}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=i,this.taskLocation=n,this.tags=E,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=f,this.cancelledDate=m,this.recurrence=y,this.blockLink=k,this.originalMarkdown=x,this.scheduledDateIsInferred=v}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=fe.extractTaskComponents(e);return s===null||!ye.getInstance().includedIn(s.body)?null:fe.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let s=fe.extractTaskComponents(e);if(s===null)return null;let{taskSerializer:i}=Ca(),a=i.deserialize(s.body),o=!1;return bt.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ye.getInstance().equals(u)),new fe(ot(ke(ke({},s),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(z.taskRegex);if(t===null)return null;let n=t[1],s=t[2],i=t[3],a=Ee.getInstance().bySymbolOrCreate(i),o=t[4].trim(),u=o.match(z.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(z.blockLinkRegex,"").trim()),{indentation:n,listMarker:s,status:a,body:o,blockLink:l}}toString(){return Ca().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Rt.getLogger("tasks.Task"),t="toggle()";du(e,t,this);let n=Ee.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(n);return fu(e,t,s),s}handleNewStatus(e){if(e.identicalTo(this.status))return[this];let t=null;if(e.isCompleted())if(this.status.isCompleted())t=this.doneDate;else{let{setDoneDate:o}=K();o&&(t=window.moment())}let n=null;if(e.isCancelled())if(this.status.isCancelled())n=this.cancelledDate;else{let{setCancelledDate:o}=K();o&&(n=window.moment())}let s=null;e.isCompleted()&&!this.status.isCompleted()&&this.recurrence!==null&&(s=this.recurrence.next());let i=new fe(ot(ke({},this),{status:e,doneDate:t,cancelledDate:n})),a=[];if(s!==null){let{setCreatedDate:o}=K(),u=null;o&&(u=window.moment());let l=null,f=Ee.getInstance().getNextRecurrenceStatusOrCreate(e),m=new fe(ot(ke(ke({},this),s),{status:f,blockLink:"",createdDate:u,cancelledDate:l}));a.push(m)}return a.push(i),a}toggleWithRecurrenceInUsersOrder(){let e=this.toggle();return this.putRecurrenceInUsersOrder(e)}handleNewStatusWithRecurrenceInUsersOrder(e){Rt.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${e.symbol}'`);let n=this.handleNewStatus(e);return this.putRecurrenceInUsersOrder(n)}putRecurrenceInUsersOrder(e){let{recurrenceOnNextLine:t}=K();return t?e.reverse():e}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=rn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(z.hashTags,"").trim()}get priorityName(){return rn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=en.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new He(this.cancelledDate)}get created(){return new He(this.createdDate)}get done(){return new He(this.doneDate)}get due(){return new He(this.dueDate)}get scheduled(){return new He(this.scheduledDate)}get start(){return new He(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Xr);return new He(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new Ws(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let i of t)if(this[i]!==e[i])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(i,a){return i===e.tags[a]}))return!1;t=fe.allDateFields();for(let i of t){let a=this[i],o=e[i];if(Xr(a,o)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(e){var t,n;return(n=(t=e.match(z.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}};var Aa=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var pt=class{constructor(e,t,n,s,i){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=i}static fromUnknownPosition(e){return new pt(e,0,0,0,null)}fromRenamedFile(e){return new pt(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var rs=class{constructor({metadataCache:e,vault:t,events:n}){this.logger=Rt.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new io,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){this.logger.info("Unloading Cache");for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let e=this.metadataCache.on("resolved",()=>L(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=K(),t=this.vault.on("create",i=>{i instanceof Ys.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(i)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",i=>{i instanceof Ys.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==i.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(i,a)=>{i instanceof Ys.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{let o=new Aa(()=>bt.fromPath(i.path));this.tasks=this.tasks.map(u=>u.path===a?e?bt.updateTaskPath(u,i.path,o.value):new fe(ot(ke({},u),{taskLocation:u.taskLocation.fromRenamedFile(i.path)})):u),this.notifySubscribers()}))});this.vaultEventReferences.push(s)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>L(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return L(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),s=t.listItems,i=[];if(s!==void 0){let a=yield this.vault.cachedRead(e);i=this.getTasksFromFileContent(a,s,t,e)}fe.tasksListsIdentical(n,i)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...i),this.logger.debug("Cache.indexFile: "+e.path+`: read ${i.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let i=[],a=e.split(` -`),o=a.length,u=new Aa(()=>bt.fromPath(s.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let m=f.position.start.line;if(m>=o)return this.logger.debug(`${s.path} Obsidian gave us a line number ${m} past the end of the file. ${o}.`),i;if((l===null||l.position.end.linel.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;i?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${s+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=r_(e.name),s=e.type;if(t){let i=fu(e.symbol),a=fu(e.nextStatusSymbol),o=`[${i}] -> [${a}]`,u=`'${n}'`,l=`(${s})`;return`["${u}
${o}
${l}"]:::${s}`}else return`["${n}"]:::${s}`}};var br=class{static calculate(e){var n,s,i;let t=0;if((n=e.dueDate)!=null&&n.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(e.dueDate)/br.milliSecondsPerDay),u;o>=7?u=1:o>=-14?u=(o+14)*.8/21+.2:u=.2,t+=u*br.dueCoefficient}switch((s=e.scheduledDate)!=null&&s.isValid()&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*br.scheduledCoefficient),(i=e.startDate)!=null&&i.isValid()&&window.moment().isBefore(e.startDate)&&(t+=1*br.startedCoefficient),e.priority){case"0":t+=1.5*br.priorityCoefficient;break;case"1":t+=1*br.priorityCoefficient;break;case"2":t+=.65*br.priorityCoefficient;break;case"3":t+=.325*br.priorityCoefficient;break;case"5":t-=.3*br.priorityCoefficient;break}return t}},nn=br;nn.dueCoefficient=12,nn.scheduledCoefficient=5,nn.startedCoefficient=-3,nn.priorityCoefficient=6,nn.milliSecondsPerDay=1e3*60*60*24;var Tt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=K();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),s=e.substring(t,n),i=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(i||(i=/(\d{4})(\d{2})(\d{2})/.exec(s)),i){let a=window.moment([parseInt(i[1]),parseInt(i[2])-1,parseInt(i[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,i=e.scheduledDateIsInferred;return n===null?i&&(i=!1,s=null):i?s=n:this.canApplyFallback(e)&&(s=n,i=!0),new fe(ot(Se({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:i}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new fe(ot(Se({},s),{scheduledDateIsInferred:!1}))),s))}};var n_=require("obsidian");var Ar=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var Ye=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Ar("Overdue",1):t.isSame(e,"day")?new Ar("Today",2):t.isValid()?new Ar("Future",3):new Ar("Invalid date",0):new Ar("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Ar("",0);let t=this.fromNowOrder(e);return new Ar(e.fromNow(),t)}fromNowOrder(e){if(!e.isValid())return 0;let t=window.moment(),n=e.isSameOrBefore(t,"day"),s=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+s.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let s=e.fromNow(!0).split(" "),i,a=Number(s[0]);isNaN(a)?i=1:i=a;let o=s[1];return t?n.subtract(i,o):n.add(i,o)}postpone(e="days",t=1){if(!this._date)throw new n_.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var qs=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 sn=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 sn.priorityNameUsingNone(e).replace("None","Normal")}};var tA=require("obsidian"),o_=_i(a_());var vp=class extends o_.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let i in this.options.minLevels)t.startsWith(i)&&i.length>=s.length&&(n=this.options.minLevels[i],s=i);return new wp(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Rt=new vp,wp=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){r.debug(`${e} ==> ${s+1} : ${n.toFileLineString()}`)})}var $t=class{},z=$t;z.dateFormat="YYYY-MM-DD",z.dateTimeFormat="YYYY-MM-DD HH:mm",z.indentationRegex=/^([\s\t>]*)/,z.listMarkerRegex=/([-*+]|[0-9]+\.)/,z.checkboxRegex=/\[(.)\]/u,z.afterCheckboxRegex=/ *(.*)/u,z.taskRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source+" +"+$t.checkboxRegex.source+$t.afterCheckboxRegex.source,"u"),z.nonTaskRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source+"? *("+$t.checkboxRegex.source+")?"+$t.afterCheckboxRegex.source,"u"),z.listItemRegex=new RegExp($t.indentationRegex.source+$t.listMarkerRegex.source),z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,z.hashTagsFromEnd=new RegExp($t.hashTags.source+"$");var fe=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:i,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:f,cancelledDate:m,recurrence:y,blockLink:k,tags:E,originalMarkdown:x,scheduledDateIsInferred:v}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=i,this.taskLocation=n,this.tags=E,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=f,this.cancelledDate=m,this.recurrence=y,this.blockLink=k,this.originalMarkdown=x,this.scheduledDateIsInferred=v}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=fe.extractTaskComponents(e);return s===null||!ye.getInstance().includedIn(s.body)?null:fe.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let s=fe.extractTaskComponents(e);if(s===null)return null;let{taskSerializer:i}=Ca(),a=i.deserialize(s.body),o=!1;return Tt.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ye.getInstance().equals(u)),new fe(ot(Se(Se({},s),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(z.taskRegex);if(t===null)return null;let n=t[1],s=t[2],i=t[3],a=Ee.getInstance().bySymbolOrCreate(i),o=t[4].trim(),u=o.match(z.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(z.blockLinkRegex,"").trim()),{indentation:n,listMarker:s,status:a,body:o,blockLink:l}}toString(){return Ca().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Rt.getLogger("tasks.Task"),t="toggle()";pu(e,t,this);let n=Ee.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(n);return mu(e,t,s),s}handleNewStatus(e){if(e.identicalTo(this.status))return[this];let t=null;if(e.isCompleted())if(this.status.isCompleted())t=this.doneDate;else{let{setDoneDate:o}=K();o&&(t=window.moment())}let n=null;if(e.isCancelled())if(this.status.isCancelled())n=this.cancelledDate;else{let{setCancelledDate:o}=K();o&&(n=window.moment())}let s=null;e.isCompleted()&&!this.status.isCompleted()&&this.recurrence!==null&&(s=this.recurrence.next());let i=new fe(ot(Se({},this),{status:e,doneDate:t,cancelledDate:n})),a=[];if(s!==null){let{setCreatedDate:o}=K(),u=null;o&&(u=window.moment());let l=null,f=Ee.getInstance().getNextRecurrenceStatusOrCreate(e),m=new fe(ot(Se(Se({},this),s),{status:f,blockLink:"",createdDate:u,cancelledDate:l}));a.push(m)}return a.push(i),a}toggleWithRecurrenceInUsersOrder(){let e=this.toggle();return this.putRecurrenceInUsersOrder(e)}handleNewStatusWithRecurrenceInUsersOrder(e){Rt.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${e.symbol}'`);let n=this.handleNewStatus(e);return this.putRecurrenceInUsersOrder(n)}putRecurrenceInUsersOrder(e){let{recurrenceOnNextLine:t}=K();return t?e.reverse():e}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=sn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(z.hashTags,"").trim()}get priorityName(){return sn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=nn.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new Ye(this.cancelledDate)}get created(){return new Ye(this.createdDate)}get done(){return new Ye(this.doneDate)}get due(){return new Ye(this.dueDate)}get scheduled(){return new Ye(this.scheduledDate)}get start(){return new Ye(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let e=this.happensDates,t=Array.from(e).sort(sr);for(let n of t)if(n!=null&&n.isValid())return new Ye(n);return new Ye(null)}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 qs(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let i of t)if(this[i]!==e[i])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(i,a){return i===e.tags[a]}))return!1;t=fe.allDateFields();for(let i of t){let a=this[i],o=e[i];if(sr(a,o)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(e){var t,n;return(n=(t=e.match(z.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}};var Aa=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var pt=class{constructor(e,t,n,s,i){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=i}static fromUnknownPosition(e){return new pt(e,0,0,0,null)}fromRenamedFile(e){return new pt(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var ts=class{constructor({metadataCache:e,vault:t,events:n}){this.logger=Rt.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new ao,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){this.logger.info("Unloading Cache");for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let e=this.metadataCache.on("resolved",()=>L(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=K(),t=this.vault.on("create",i=>{i instanceof Ws.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(i)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",i=>{i instanceof Ws.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==i.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(i,a)=>{i instanceof Ws.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${i.path}`),this.tasksMutex.runExclusive(()=>{let o=new Aa(()=>Tt.fromPath(i.path));this.tasks=this.tasks.map(u=>u.path===a?e?Tt.updateTaskPath(u,i.path,o.value):new fe(ot(Se({},u),{taskLocation:u.taskLocation.fromRenamedFile(i.path)})):u),this.notifySubscribers()}))});this.vaultEventReferences.push(s)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>L(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return L(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),s=t.listItems,i=[];if(s!==void 0){let a=yield this.vault.cachedRead(e);i=this.getTasksFromFileContent(a,s,t,e)}fe.tasksListsIdentical(n,i)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...i),this.logger.debug("Cache.indexFile: "+e.path+`: read ${i.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let i=[],a=e.split(` +`),o=a.length,u=new Aa(()=>Tt.fromPath(s.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let m=f.position.start.line;if(m>=o)return this.logger.debug(`${s.path} Obsidian gave us a line number ${m} past the end of the file. ${o}.`),i;if((l===null||l.position.end.line=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var Ap=require("obsidian");var E_=require("obsidian");function nn(){}function Sp(r){return r()}function a_(){return Object.create(null)}function ns(r){r.forEach(Sp)}function pu(r){return typeof r=="function"}function u_(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function l_(r){return Object.keys(r).length===0}var c_=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,Na=class{constructor(e){this.options=e,this._listeners="WeakMap"in c_?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let s of t)Na.entries.set(s.target,s),(n=this._listeners.get(s.target))===null||n===void 0||n(s)})}};Na.entries="WeakMap"in c_?new WeakMap:void 0;var d_=!1;function tA(){d_=!0}function rA(){d_=!1}function O(r,e){r.appendChild(e)}function Bs(r,e,t){r.insertBefore(e,t||null)}function ss(r){r.parentNode&&r.parentNode.removeChild(r)}function Op(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function f_(r){return function(e){return e.preventDefault(),r.call(this,e)}}function A(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function p_(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function sA(r){return Array.from(r.childNodes)}function Dp(r,e){e=""+e,r.data!==e&&(r.data=e)}function mt(r,e){r.value=e==null?"":e}function xp(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),$s=e}var cA=new Set;function dA(r,e){r&&r.i&&(cA.delete(r),r.i(e))}var fA=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],gq=new Set([...fA]);function pA(r,e,t,n){let{fragment:s,after_update:i}=r.$$;s&&s.m(e,t),n||Fa(()=>{let a=r.$$.on_mount.map(Sp).filter(pu);r.$$.on_destroy?r.$$.on_destroy.push(...a):ns(a),r.$$.on_mount=[]}),i.forEach(Fa)}function g_(r,e){let t=r.$$;t.fragment!==null&&(lA(t.after_update),ns(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function mA(r,e){r.$$.dirty[0]===-1&&(js.push(r),oA(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let k=y.length?y[0]:m;return l.ctx&&s(l.ctx[f],l.ctx[f]=k)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](k),c&&mA(r,f)),m}):[],l.update(),c=!0,ns(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){tA();let f=sA(e.target);l.fragment&&l.fragment.l(f),f.forEach(ss)}else l.fragment&&l.fragment.c();e.intro&&dA(r.$$.fragment),pA(r,e.target,e.anchor,e.customElement),rA(),h_()}Pa(u)}var hA;typeof HTMLElement=="function"&&(hA=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Sp).filter(pu);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){ns(this.$$.on_disconnect)}$destroy(){g_(this,1),this.$destroy=nn}$on(r,e){if(!pu(e))return nn;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!l_(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var hu=class{$destroy(){g_(this,1),this.$destroy=nn}$on(e,t){if(!pu(t))return nn;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!l_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Mp=vi(ze());function T_(r,e,t){let n=r.slice();return n[55]=e[t],n}function b_(r,e,t){let n=r.slice();return n[58]=e[t].value,n[59]=e[t].label,n[60]=e[t].symbol,n[61]=e[t].accessKey,n[62]=e[t].accessKeyIndex,n}function gA(r){let e,t=r[60]+"",n;return{c(){e=V("span"),n=Qe(t)},m(s,i){Bs(s,e,i),O(e,n)},p:nn,d(s){s&&ss(e)}}}function __(r){let e,t,n,s,i,a,o,u,l=r[59].substring(0,r[62])+"",c,f,m=r[59].substring(r[62],r[62]+1)+"",y,k,E=r[59].substring(r[62]+1)+"",x,v,I=r[60]&&r[60].charCodeAt(0)>=256,F,le,B,ie,W,j=I&&gA(r);return B=p_(r[40][0]),{c(){e=V("span"),t=V("input"),a=Z(),o=V("label"),u=V("span"),c=Qe(l),f=V("span"),y=Qe(m),k=V("span"),x=Qe(E),v=Z(),j&&j.c(),le=Z(),A(t,"type","radio"),A(t,"id",n="priority-"+r[58]),t.__value=s=r[58],t.value=t.__value,A(t,"accesskey",i=r[19](r[61])),A(f,"class","accesskey"),A(o,"for",F="priority-"+r[58]),B.p(t)},m(ce,Ie){Bs(ce,e,Ie),O(e,t),t.checked=t.__value===r[1].priority,O(e,a),O(e,o),O(o,u),O(u,c),O(o,f),O(f,y),O(o,k),O(k,x),O(o,v),j&&j.m(o,null),O(e,le),ie||(W=it(t,"change",r[39]),ie=!0)},p(ce,Ie){Ie[0]&524288&&i!==(i=ce[19](ce[61]))&&A(t,"accesskey",i),Ie[0]&3&&(t.checked=t.__value===ce[1].priority),I&&j.p(ce,Ie)},d(ce){ce&&ss(e),j&&j.d(),B.r(),ie=!1,W()}}}function v_(r){let e,t=r[55].name+"",n,s,i=r[55].symbol+"",a,o,u;return{c(){e=V("option"),n=Qe(t),s=Qe(" ["),a=Qe(i),o=Qe("]"),e.__value=u=r[55],e.value=e.__value},m(l,c){Bs(l,e,c),O(e,n),O(e,s),O(e,a),O(e,o)},p(l,c){c[0]&1&&t!==(t=l[55].name+"")&&Dp(n,t),c[0]&1&&i!==(i=l[55].symbol+"")&&Dp(a,i),c[0]&1&&u!==(u=l[55])&&(e.__value=u,e.value=e.__value)},d(l){l&&ss(e)}}}function yA(r){let e,t,n,s,i,a,o,u,l,c,f,m,y,k,E,x,v,I,F,le,B,ie,W,j,ce,Ie,$,N,w,H,C,X,d,p,h,g,T,_,S,M,D,R,U,ge,ae,te,Re,ve,_r,un,Ft,ln,Ct,qe,Ba,Fn,ms,oe,Me,Fe,cn,vr,hs,Ha,Et,Vt,za,Va,um,Ka,mi,Qa,lm,dn,Xa,cm,Ye,Za,dm,or,fm,hi,pm,mm,Ja,hm,eo,gm,ur,ym,gi,Tm,bm,to,_m,ro,vm,lr,wm,yi,Em,km,no,Sm,gs,Ln,Om,so,Dm,Ti,dl,xm,ys=r[27],kt=[];for(let q=0;qtion',i=Z(),a=V("textarea"),u=Z(),l=V("div"),c=V("label"),f=Qe("Priority"),y=Z();for(let q=0;qart',Re=Z(),ve=V("input"),un=Z(),Ft=V("code"),ln=Qe(r[21]),Ct=Z(),qe=new Rr(!1),Ba=Z(),Fn=V("div"),ms=V("label"),ms.innerHTML=`Only - future dates:`,oe=Z(),Me=V("input"),cn=Z(),vr=V("div"),hs=V("label"),hs.innerHTML='Status',Ha=Z(),Et=V("select");for(let q=0;qr[46].call(Et)),A(Va,"class","tasks-modal-warning"),A(vr,"class","tasks-modal-section"),A(Qa,"for","status"),A(dn,"id","status"),A(dn,"type","checkbox"),A(dn,"class","task-list-item-checkbox tasks-modal-checkbox"),dn.checked=Xa=r[1].status.isCompleted(),dn.disabled=!0,A(Ka,"class","tasks-modal-section tasks-modal-status"),A(Za,"for","created"),A(or,"id","created"),A(or,"type","text"),A(or,"placeholder",Hs),ht(or,"tasks-modal-error",!r[3]),Ja.a=null,A(eo,"for","done"),A(ur,"id","done"),A(ur,"type","text"),A(ur,"placeholder",Hs),ht(ur,"tasks-modal-error",!r[12]),to.a=null,A(ro,"for","cancelled"),A(lr,"id","cancelled"),A(lr,"type","text"),A(lr,"placeholder",Hs),ht(lr,"tasks-modal-error",!r[14]),no.a=null,A(Ye,"class","tasks-modal-section tasks-modal-dates"),Ln.disabled=so=!r[18],A(Ln,"type","submit"),A(Ln,"class","mod-cta"),A(Ti,"type","button"),A(gs,"class","tasks-modal-section tasks-modal-buttons"),ht(t,"with-accesskeys",r[15]),A(e,"class","tasks-modal")},m(q,re){Bs(q,e,re),O(e,t),O(t,n),O(n,s),O(n,i),O(n,a),mt(a,r[1].description),r[38](a),O(t,u),O(t,l),O(l,c),O(c,f),O(l,y);for(let me=0;meno ${oe} date`;let cn=Mp.parseDate(Me,Fe,{forwardDate:Fe!=null});return cn!==null?window.moment(cn).format("YYYY-MM-DD"):`invalid ${oe} date`}function _(oe,Me){return T(oe,Me,v.forwardOnly?new Date:void 0)}function S(oe){let Me=null,Fe=Mp.parseDate(oe,new Date,{forwardDate:v.forwardOnly});return Fe!==null&&(Me=window.moment(Fe)),Me}Rp(()=>{let{provideAccessKeys:oe}=K();t(15,p=oe);let Me=ye.getInstance().removeAsWordFrom(i.description);(Me!=i.description||!ye.getInstance().includedIn(i.description))&&(d=!0);let Fe="none";i.priority==="5"?Fe="lowest":i.priority==="4"?Fe="low":i.priority==="2"?Fe="medium":i.priority==="1"?Fe="high":i.priority==="0"&&(Fe="highest"),t(1,v={description:Me,status:i.status,priority:Fe,recurrenceRule:i.recurrence?i.recurrence.toText():"",createdDate:new He(i.createdDate).formatAsDate(),startDate:new He(i.startDate).formatAsDate(),scheduledDate:new He(i.scheduledDate).formatAsDate(),dueDate:new He(i.dueDate).formatAsDate(),doneDate:new He(i.doneDate).formatAsDate(),cancelledDate:new He(i.cancelledDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{x.focus()},10)});let M=oe=>{if(oe.key&&!oe.altKey&&!oe.ctrlKey){let Me=g.find(Fe=>Fe.label.charAt(0).toLowerCase()==oe.key);Me&&t(1,v.priority=Me.value,v)}},D=()=>{a([])},R=oe=>{oe.key==="Enter"&&(oe.preventDefault(),h&&ge())},U=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},ge=()=>{let oe=v.description.trim();d&&(oe=ye.getInstance().prependTo(oe));let Me=S(v.startDate),Fe=S(v.scheduledDate),cn=S(v.dueDate),vr=S(v.cancelledDate),hs=S(v.createdDate),Ha=S(v.doneDate),Et=null;v.recurrenceRule&&(Et=st.fromText({recurrenceRuleText:v.recurrenceRule,startDate:Me,scheduledDate:Fe,dueDate:cn}));let Vt;switch(v.priority){case"lowest":Vt="5";break;case"low":Vt="4";break;case"medium":Vt="2";break;case"high":Vt="1";break;case"highest":Vt="0";break;default:Vt="3"}let za=new fe(Object.assign(Object.assign({},i),{description:oe,status:v.status,priority:Vt,recurrence:Et,startDate:Me,scheduledDate:Fe,dueDate:cn,doneDate:Ha,createdDate:hs,cancelledDate:vr}));a([za])},ae=[[]];function te(){v.description=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Re(oe){mu[oe?"unshift":"push"](()=>{x=oe,t(16,x)})}function ve(){v.priority=this.__value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function _r(){v.recurrenceRule=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function un(){v.dueDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ft(){v.scheduledDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function ln(){v.startDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ct(){v.forwardOnly=this.checked,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function qe(){v.status=m_(this),t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ba(){v.createdDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Fn(){v.doneDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function ms(){v.cancelledDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}return r.$$set=oe=>{"task"in oe&&t(33,i=oe.task),"onSubmit"in oe&&t(34,a=oe.onSubmit),"statusOptions"in oe&&t(0,o=oe.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&32768){e:t(19,n=oe=>p?oe:null)}if(r.$$.dirty[0]&258){e:t(1,v.dueDate=Hr(v.dueDate),v),t(8,ce=_("due",v.dueDate)),t(9,Ie=!ce.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.startDate=Hr(v.startDate),v),t(4,B=_("start",v.startDate)),t(5,ie=!B.includes("invalid"))}if(r.$$.dirty[0]&66){e:t(1,v.scheduledDate=Hr(v.scheduledDate),v),t(6,W=_("scheduled",v.scheduledDate)),t(7,j=!W.includes("invalid"))}if(r.$$.dirty[0]&2050){e:t(1,v.doneDate=Hr(v.doneDate),v),t(11,w=_("done",v.doneDate)),t(12,H=!w.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.createdDate=Hr(v.createdDate),v),t(2,F=_("created",v.createdDate)),t(3,le=!F.includes("invalid"))}if(r.$$.dirty[0]&8194){e:t(1,v.cancelledDate=Hr(v.cancelledDate),v),t(13,C=_("cancelled",v.cancelledDate)),t(14,X=!C.includes("invalid"))}if(r.$$.dirty[0]&2|r.$$.dirty[1]&16){e:if(t(10,N=!0),!v.recurrenceRule)t(17,$="not recurring");else{let oe=t(35,s=st.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();oe?!v.startDate&&!v.scheduledDate&&!v.dueDate?(t(17,$="due, scheduled or start date required"),t(10,N=!1)):t(17,$=oe):(t(17,$="invalid recurrence rule"),t(10,N=!1))}}if(r.$$.dirty[0]&2){e:t(36,I=v.description.trim()!=="")}if(r.$$.dirty[0]&22184|r.$$.dirty[1]&32){e:t(18,h=Ie&&N&&j&&ie&&I&&X&&le&&H)}},[o,v,F,le,B,ie,W,j,ce,Ie,N,w,H,C,X,p,x,$,h,n,l,c,f,m,y,k,E,g,M,D,R,U,ge,i,a,s,I,te,Re,ve,ae,_r,un,Ft,ln,Ct,qe,Ba,Fn,ms]}var Cp=class extends hu{constructor(e){super(),y_(this,e,TA,yA,u_,{task:33,onSubmit:34,statusOptions:0},null,[-1,-1,-1])}},w_=Cp;var On=class extends E_.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=i=>{i.length&&s(i),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:t}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new w_({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Ee.getInstance().registeredStatuses;return Ee.getInstance().bySymbol(this.task.status.symbol)===Q.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function bA(){let{setCreatedDate:r}=K();return r?window.moment():null}function _A(r){let{setCreatedDate:e}=K();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ye.getInstance().isEmpty(),s=!ye.getInstance().includedIn(r.description);return t||n&&s}var gu=({line:r,path:e})=>{var m,y;let t=fe.parseTaskSignifiers(r,pt.fromUnknownPosition(e),bt.fromPath(e)),n=bA();if(t!==null)return _A(t)?new fe(ot(ke({},t),{createdDate:n})):t;let s=r.match(z.nonTaskRegex);if(s===null)return console.error("Tasks: Cannot create task on line:",r),new fe({status:Q.TODO,description:"",taskLocation:pt.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let i=s[1],a=(m=s[2])!=null?m:"-",o=(y=s[4])!=null?y:" ",u=Ee.getInstance().bySymbolOrCreate(o),l=s[5],c=r.match(z.blockLinkRegex),f=c!==null?c[0]:"";return f!==""&&(l=l.replace(z.blockLinkRegex,"")),new fe({status:u,description:l,taskLocation:pt.fromUnknownPosition(e),indentation:i,listMarker:a,blockLink:f,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var k_=(r,e,t,n)=>{var f;if(r)return t instanceof Ap.MarkdownView;if(!(t instanceof Ap.MarkdownView))return;let s=(f=t.file)==null?void 0:f.path;if(s===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=gu({line:o,path:s}),l=m=>{let y=bt.removeInferredStatusIfNeeded(u,m).map(k=>k.toFileLineString()).join(` -`);e.setLine(a,y)};new On({app:n,task:u,onSubmit:l}).open()};var Pp=require("obsidian");var S_=(r,e,t)=>{var u;if(r)return t instanceof Pp.MarkdownView;if(!(t instanceof Pp.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let s=e.getCursor(),i=s.line,a=e.getLine(i),o=vA(a,n);e.setLine(i,o.text),e.setCursor(wA(s,o))},vA=(r,e)=>{let t=fe.fromLine({line:r,taskLocation:pt.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(s=>s.toFileLineString());return{text:n.join(` -`),moveTo:{line:n.length-1}}}else{let n=r.match(z.taskRegex);if(n!==null){let s=n[3],a=Ee.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(z.taskRegex,`$1- [${a}] $4`)}}else if(z.listItemRegex.test(r)){let s=r.replace(z.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(z.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},wA=(r,e)=>{var i;let t={line:0,ch:r.ch},n=ke(ke({},t),(i=e.moveTo)!=null?i:{}),s=e.text.split(` -`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var yu=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,s)=>k_(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:S_})}};var EA=Object.prototype.toString,Vs=Array.isArray||function(e){return EA.call(e)==="[object Array]"};function Ip(r){return typeof r=="function"}function kA(r){return Vs(r)?"array":typeof r}function Np(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function O_(r,e){return r!=null&&typeof r=="object"&&e in r}function SA(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var OA=RegExp.prototype.test;function DA(r,e){return OA.call(r,e)}var xA=/\S/;function RA(r){return!DA(xA,r)}var MA={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function CA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return MA[t]})}var AA=/\s*/,PA=/\s+/,D_=/\s*=/,NA=/\s*\}/,IA=/#|\^|\/|>|\{|&|=|!/;function FA(r,e){if(!r)return[];var t=!1,n=[],s=[],i=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;i.length;)delete s[i.pop()];else i=[];a=!1,o=!1}var f,m,y;function k(j){if(typeof j=="string"&&(j=j.split(PA,2)),!Vs(j)||j.length!==2)throw new Error("Invalid tags: "+j);f=new RegExp(Np(j[0])+"\\s*"),m=new RegExp("\\s*"+Np(j[1])),y=new RegExp("\\s*"+Np("}"+j[1]))}k(e||sr.tags);for(var E=new Ua(r),x,v,I,F,le,B;!E.eos();){if(x=E.pos,I=E.scanUntil(f),I)for(var ie=0,W=I.length;ie"?le=[v,I,x,E.pos,u,l,t]:le=[v,I,x,E.pos],l++,s.push(le),v==="#"||v==="^")n.push(le);else if(v==="/"){if(B=n.pop(),!B)throw new Error('Unopened section "'+I+'" at '+x);if(B[1]!==I)throw new Error('Unclosed section "'+B[1]+'" at '+x)}else v==="name"||v==="{"||v==="&"?o=!0:v==="="&&k(I)}if(c(),B=n.pop(),B)throw new Error('Unclosed section "'+B[1]+'" at '+E.pos);return UA(LA(s))}function LA(r){for(var e=[],t,n,s=0,i=r.length;s0?n[n.length-1][4]:e;break;default:t.push(s)}return e}function Ua(r){this.string=r,this.tail=r,this.pos=0}Ua.prototype.eos=function(){return this.tail===""};Ua.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Ua.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function zs(r,e){this.view=r,this.cache={".":this.view},this.parent=e}zs.prototype.push=function(e){return new zs(e,this)};zs.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var s=this,i,a,o,u=!1;s;){if(e.indexOf(".")>0)for(i=s.view,a=e.split("."),o=0;i!=null&&o"?l=this.renderPartial(o,t,n,i):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,i):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Mt.prototype.renderSection=function(e,t,n,s,i){var a=this,o="",u=t.lookup(e[1]);function l(m){return a.render(m,t,n,i)}if(!!u){if(Vs(u))for(var c=0,f=u.length;c=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var Pp=require("obsidian");var S_=require("obsidian");function an(){}function Op(r){return r()}function u_(){return Object.create(null)}function rs(r){r.forEach(Op)}function hu(r){return typeof r=="function"}function c_(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function d_(r){return Object.keys(r).length===0}var f_=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,Na=class{constructor(e){this.options=e,this._listeners="WeakMap"in f_?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let s of t)Na.entries.set(s.target,s),(n=this._listeners.get(s.target))===null||n===void 0||n(s)})}};Na.entries="WeakMap"in f_?new WeakMap:void 0;var p_=!1;function nA(){p_=!0}function sA(){p_=!1}function O(r,e){r.appendChild(e)}function $s(r,e,t){r.insertBefore(e,t||null)}function ns(r){r.parentNode&&r.parentNode.removeChild(r)}function Dp(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function m_(r){return function(e){return e.preventDefault(),r.call(this,e)}}function A(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function h_(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 aA(r){return Array.from(r.childNodes)}function xp(r,e){e=""+e,r.data!==e&&(r.data=e)}function mt(r,e){r.value=e==null?"":e}function Rp(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Gs=e}var fA=new Set;function pA(r,e){r&&r.i&&(fA.delete(r),r.i(e))}var mA=["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"],vq=new Set([...mA]);function hA(r,e,t,n){let{fragment:s,after_update:i}=r.$$;s&&s.m(e,t),n||Fa(()=>{let a=r.$$.on_mount.map(Op).filter(hu);r.$$.on_destroy?r.$$.on_destroy.push(...a):rs(a),r.$$.on_mount=[]}),i.forEach(Fa)}function b_(r,e){let t=r.$$;t.fragment!==null&&(dA(t.after_update),rs(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function gA(r,e){r.$$.dirty[0]===-1&&(js.push(r),lA(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let k=y.length?y[0]:m;return l.ctx&&s(l.ctx[f],l.ctx[f]=k)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](k),c&&gA(r,f)),m}):[],l.update(),c=!0,rs(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){nA();let f=aA(e.target);l.fragment&&l.fragment.l(f),f.forEach(ns)}else l.fragment&&l.fragment.c();e.intro&&pA(r.$$.fragment),hA(r,e.target,e.anchor,e.customElement),sA(),y_()}Pa(u)}var yA;typeof HTMLElement=="function"&&(yA=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Op).filter(hu);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){rs(this.$$.on_disconnect)}$destroy(){b_(this,1),this.$destroy=an}$on(r,e){if(!hu(e))return an;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&&!d_(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var yu=class{$destroy(){b_(this,1),this.$destroy=an}$on(e,t){if(!hu(t))return an;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!d_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Cp=_i(ze());function __(r,e,t){let n=r.slice();return n[55]=e[t],n}function v_(r,e,t){let n=r.slice();return n[58]=e[t].value,n[59]=e[t].label,n[60]=e[t].symbol,n[61]=e[t].accessKey,n[62]=e[t].accessKeyIndex,n}function bA(r){let e,t=r[60]+"",n;return{c(){e=V("span"),n=Qe(t)},m(s,i){$s(s,e,i),O(e,n)},p:an,d(s){s&&ns(e)}}}function w_(r){let e,t,n,s,i,a,o,u,l=r[59].substring(0,r[62])+"",c,f,m=r[59].substring(r[62],r[62]+1)+"",y,k,E=r[59].substring(r[62]+1)+"",x,v,I=r[60]&&r[60].charCodeAt(0)>=256,F,le,B,ie,W,G=I&&bA(r);return B=h_(r[40][0]),{c(){e=V("span"),t=V("input"),a=Z(),o=V("label"),u=V("span"),c=Qe(l),f=V("span"),y=Qe(m),k=V("span"),x=Qe(E),v=Z(),G&&G.c(),le=Z(),A(t,"type","radio"),A(t,"id",n="priority-"+r[58]),t.__value=s=r[58],t.value=t.__value,A(t,"accesskey",i=r[19](r[61])),A(f,"class","accesskey"),A(o,"for",F="priority-"+r[58]),B.p(t)},m(ce,Ie){$s(ce,e,Ie),O(e,t),t.checked=t.__value===r[1].priority,O(e,a),O(e,o),O(o,u),O(u,c),O(o,f),O(f,y),O(o,k),O(k,x),O(o,v),G&&G.m(o,null),O(e,le),ie||(W=it(t,"change",r[39]),ie=!0)},p(ce,Ie){Ie[0]&524288&&i!==(i=ce[19](ce[61]))&&A(t,"accesskey",i),Ie[0]&3&&(t.checked=t.__value===ce[1].priority),I&&G.p(ce,Ie)},d(ce){ce&&ns(e),G&&G.d(),B.r(),ie=!1,W()}}}function E_(r){let e,t=r[55].name+"",n,s,i=r[55].symbol+"",a,o,u;return{c(){e=V("option"),n=Qe(t),s=Qe(" ["),a=Qe(i),o=Qe("]"),e.__value=u=r[55],e.value=e.__value},m(l,c){$s(l,e,c),O(e,n),O(e,s),O(e,a),O(e,o)},p(l,c){c[0]&1&&t!==(t=l[55].name+"")&&xp(n,t),c[0]&1&&i!==(i=l[55].symbol+"")&&xp(a,i),c[0]&1&&u!==(u=l[55])&&(e.__value=u,e.value=e.__value)},d(l){l&&ns(e)}}}function TA(r){let e,t,n,s,i,a,o,u,l,c,f,m,y,k,E,x,v,I,F,le,B,ie,W,G,ce,Ie,$,N,w,H,C,X,d,p,h,g,b,_,S,M,D,R,U,ge,ae,te,Re,ve,wr,ln,Ft,cn,Ct,qe,Ha,Fn,ps,oe,Me,Fe,dn,Er,ms,za,Et,Vt,Va,Ka,cm,Qa,pi,Xa,dm,fn,Za,fm,je,Ja,pm,ur,mm,mi,hm,gm,eo,ym,to,bm,lr,Tm,hi,_m,vm,ro,wm,no,Em,cr,km,gi,Sm,Om,so,Dm,hs,Ln,xm,io,Rm,yi,fl,Mm,gs=r[27],kt=[];for(let q=0;qtion',i=Z(),a=V("textarea"),u=Z(),l=V("div"),c=V("label"),f=Qe("Priority"),y=Z();for(let q=0;qart',Re=Z(),ve=V("input"),ln=Z(),Ft=V("code"),cn=Qe(r[21]),Ct=Z(),qe=new Pr(!1),Ha=Z(),Fn=V("div"),ps=V("label"),ps.innerHTML=`Only + future dates:`,oe=Z(),Me=V("input"),dn=Z(),Er=V("div"),ms=V("label"),ms.innerHTML='Status',za=Z(),Et=V("select");for(let q=0;qr[46].call(Et)),A(Ka,"class","tasks-modal-warning"),A(Er,"class","tasks-modal-section"),A(Xa,"for","status"),A(fn,"id","status"),A(fn,"type","checkbox"),A(fn,"class","task-list-item-checkbox tasks-modal-checkbox"),fn.checked=Za=r[1].status.isCompleted(),fn.disabled=!0,A(Qa,"class","tasks-modal-section tasks-modal-status"),A(Ja,"for","created"),A(ur,"id","created"),A(ur,"type","text"),A(ur,"placeholder",Bs),ht(ur,"tasks-modal-error",!r[3]),eo.a=null,A(to,"for","done"),A(lr,"id","done"),A(lr,"type","text"),A(lr,"placeholder",Bs),ht(lr,"tasks-modal-error",!r[12]),ro.a=null,A(no,"for","cancelled"),A(cr,"id","cancelled"),A(cr,"type","text"),A(cr,"placeholder",Bs),ht(cr,"tasks-modal-error",!r[14]),so.a=null,A(je,"class","tasks-modal-section tasks-modal-dates"),Ln.disabled=io=!r[18],A(Ln,"type","submit"),A(Ln,"class","mod-cta"),A(yi,"type","button"),A(hs,"class","tasks-modal-section tasks-modal-buttons"),ht(t,"with-accesskeys",r[15]),A(e,"class","tasks-modal")},m(q,re){$s(q,e,re),O(e,t),O(t,n),O(n,s),O(n,i),O(n,a),mt(a,r[1].description),r[38](a),O(t,u),O(t,l),O(l,c),O(c,f),O(l,y);for(let me=0;meno ${oe} date`;let dn=Cp.parseDate(Me,Fe,{forwardDate:Fe!=null});return dn!==null?window.moment(dn).format("YYYY-MM-DD"):`invalid ${oe} date`}function _(oe,Me){return b(oe,Me,v.forwardOnly?new Date:void 0)}function S(oe){let Me=null,Fe=Cp.parseDate(oe,new Date,{forwardDate:v.forwardOnly});return Fe!==null&&(Me=window.moment(Fe)),Me}Mp(()=>{let{provideAccessKeys:oe}=K();t(15,p=oe);let Me=ye.getInstance().removeAsWordFrom(i.description);(Me!=i.description||!ye.getInstance().includedIn(i.description))&&(d=!0);let Fe="none";i.priority==="5"?Fe="lowest":i.priority==="4"?Fe="low":i.priority==="2"?Fe="medium":i.priority==="1"?Fe="high":i.priority==="0"&&(Fe="highest"),t(1,v={description:Me,status:i.status,priority:Fe,recurrenceRule:i.recurrence?i.recurrence.toText():"",createdDate:new Ye(i.createdDate).formatAsDate(),startDate:new Ye(i.startDate).formatAsDate(),scheduledDate:new Ye(i.scheduledDate).formatAsDate(),dueDate:new Ye(i.dueDate).formatAsDate(),doneDate:new Ye(i.doneDate).formatAsDate(),cancelledDate:new Ye(i.cancelledDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{x.focus()},10)});let M=oe=>{if(oe.key&&!oe.altKey&&!oe.ctrlKey){let Me=g.find(Fe=>Fe.label.charAt(0).toLowerCase()==oe.key);Me&&t(1,v.priority=Me.value,v)}},D=()=>{a([])},R=oe=>{oe.key==="Enter"&&(oe.preventDefault(),h&&ge())},U=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},ge=()=>{let oe=v.description.trim();d&&(oe=ye.getInstance().prependTo(oe));let Me=S(v.startDate),Fe=S(v.scheduledDate),dn=S(v.dueDate),Er=S(v.cancelledDate),ms=S(v.createdDate),za=S(v.doneDate),Et=null;v.recurrenceRule&&(Et=st.fromText({recurrenceRuleText:v.recurrenceRule,startDate:Me,scheduledDate:Fe,dueDate:dn}));let Vt;switch(v.priority){case"lowest":Vt="5";break;case"low":Vt="4";break;case"medium":Vt="2";break;case"high":Vt="1";break;case"highest":Vt="0";break;default:Vt="3"}let Va=new fe(Object.assign(Object.assign({},i),{description:oe,status:v.status,priority:Vt,recurrence:Et,startDate:Me,scheduledDate:Fe,dueDate:dn,doneDate:za,createdDate:ms,cancelledDate:Er}));a([Va])},ae=[[]];function te(){v.description=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Re(oe){gu[oe?"unshift":"push"](()=>{x=oe,t(16,x)})}function ve(){v.priority=this.__value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function wr(){v.recurrenceRule=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function ln(){v.dueDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ft(){v.scheduledDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function cn(){v.startDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ct(){v.forwardOnly=this.checked,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function qe(){v.status=g_(this),t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Ha(){v.createdDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function Fn(){v.doneDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}function ps(){v.cancelledDate=this.value,t(1,v),t(8,ce),t(4,B),t(6,W),t(11,w),t(2,F),t(13,C),t(0,o)}return r.$$set=oe=>{"task"in oe&&t(33,i=oe.task),"onSubmit"in oe&&t(34,a=oe.onSubmit),"statusOptions"in oe&&t(0,o=oe.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&32768){e:t(19,n=oe=>p?oe:null)}if(r.$$.dirty[0]&258){e:t(1,v.dueDate=Qr(v.dueDate),v),t(8,ce=_("due",v.dueDate)),t(9,Ie=!ce.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.startDate=Qr(v.startDate),v),t(4,B=_("start",v.startDate)),t(5,ie=!B.includes("invalid"))}if(r.$$.dirty[0]&66){e:t(1,v.scheduledDate=Qr(v.scheduledDate),v),t(6,W=_("scheduled",v.scheduledDate)),t(7,G=!W.includes("invalid"))}if(r.$$.dirty[0]&2050){e:t(1,v.doneDate=Qr(v.doneDate),v),t(11,w=_("done",v.doneDate)),t(12,H=!w.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.createdDate=Qr(v.createdDate),v),t(2,F=_("created",v.createdDate)),t(3,le=!F.includes("invalid"))}if(r.$$.dirty[0]&8194){e:t(1,v.cancelledDate=Qr(v.cancelledDate),v),t(13,C=_("cancelled",v.cancelledDate)),t(14,X=!C.includes("invalid"))}if(r.$$.dirty[0]&2|r.$$.dirty[1]&16){e:if(t(10,N=!0),!v.recurrenceRule)t(17,$="not recurring");else{let oe=t(35,s=st.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();oe?!v.startDate&&!v.scheduledDate&&!v.dueDate?(t(17,$="due, scheduled or start date required"),t(10,N=!1)):t(17,$=oe):(t(17,$="invalid recurrence rule"),t(10,N=!1))}}if(r.$$.dirty[0]&2){e:t(36,I=v.description.trim()!=="")}if(r.$$.dirty[0]&22184|r.$$.dirty[1]&32){e:t(18,h=Ie&&N&&G&&ie&&I&&X&&le&&H)}},[o,v,F,le,B,ie,W,G,ce,Ie,N,w,H,C,X,p,x,$,h,n,l,c,f,m,y,k,E,g,M,D,R,U,ge,i,a,s,I,te,Re,ve,ae,wr,ln,Ft,cn,Ct,qe,Ha,Fn,ps]}var Ap=class extends yu{constructor(e){super(),T_(this,e,_A,TA,c_,{task:33,onSubmit:34,statusOptions:0},null,[-1,-1,-1])}},k_=Ap;var On=class extends S_.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=i=>{i.length&&s(i),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:t}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new k_({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Ee.getInstance().registeredStatuses;return Ee.getInstance().bySymbol(this.task.status.symbol)===Q.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function vA(){let{setCreatedDate:r}=K();return r?window.moment():null}function wA(r){let{setCreatedDate:e}=K();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ye.getInstance().isEmpty(),s=!ye.getInstance().includedIn(r.description);return t||n&&s}var bu=({line:r,path:e})=>{var m,y;let t=fe.parseTaskSignifiers(r,pt.fromUnknownPosition(e),Tt.fromPath(e)),n=vA();if(t!==null)return wA(t)?new fe(ot(Se({},t),{createdDate:n})):t;let s=r.match(z.nonTaskRegex);if(s===null)return console.error("Tasks: Cannot create task on line:",r),new fe({status:Q.TODO,description:"",taskLocation:pt.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let i=s[1],a=(m=s[2])!=null?m:"-",o=(y=s[4])!=null?y:" ",u=Ee.getInstance().bySymbolOrCreate(o),l=s[5],c=r.match(z.blockLinkRegex),f=c!==null?c[0]:"";return f!==""&&(l=l.replace(z.blockLinkRegex,"")),new fe({status:u,description:l,taskLocation:pt.fromUnknownPosition(e),indentation:i,listMarker:a,blockLink:f,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var O_=(r,e,t,n)=>{var f;if(r)return t instanceof Pp.MarkdownView;if(!(t instanceof Pp.MarkdownView))return;let s=(f=t.file)==null?void 0:f.path;if(s===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=bu({line:o,path:s}),l=m=>{let y=Tt.removeInferredStatusIfNeeded(u,m).map(k=>k.toFileLineString()).join(` +`);e.setLine(a,y)};new On({app:n,task:u,onSubmit:l}).open()};var Np=require("obsidian");var D_=(r,e,t)=>{var u;if(r)return t instanceof Np.MarkdownView;if(!(t instanceof Np.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let s=e.getCursor(),i=s.line,a=e.getLine(i),o=EA(a,n);e.setLine(i,o.text),e.setCursor(kA(s,o))},EA=(r,e)=>{let t=fe.fromLine({line:r,taskLocation:pt.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(s=>s.toFileLineString());return{text:n.join(` +`),moveTo:{line:n.length-1}}}else{let n=r.match(z.taskRegex);if(n!==null){let s=n[3],a=Ee.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(z.taskRegex,`$1- [${a}] $4`)}}else if(z.listItemRegex.test(r)){let s=r.replace(z.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(z.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},kA=(r,e)=>{var i;let t={line:0,ch:r.ch},n=Se(Se({},t),(i=e.moveTo)!=null?i:{}),s=e.text.split(` +`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var Tu=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,s)=>O_(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:D_})}};var SA=Object.prototype.toString,zs=Array.isArray||function(e){return SA.call(e)==="[object Array]"};function Fp(r){return typeof r=="function"}function OA(r){return zs(r)?"array":typeof r}function Ip(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function x_(r,e){return r!=null&&typeof r=="object"&&e in r}function DA(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var xA=RegExp.prototype.test;function RA(r,e){return xA.call(r,e)}var MA=/\S/;function CA(r){return!RA(MA,r)}var AA={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function PA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return AA[t]})}var NA=/\s*/,IA=/\s+/,R_=/\s*=/,FA=/\s*\}/,LA=/#|\^|\/|>|\{|&|=|!/;function UA(r,e){if(!r)return[];var t=!1,n=[],s=[],i=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;i.length;)delete s[i.pop()];else i=[];a=!1,o=!1}var f,m,y;function k(G){if(typeof G=="string"&&(G=G.split(IA,2)),!zs(G)||G.length!==2)throw new Error("Invalid tags: "+G);f=new RegExp(Ip(G[0])+"\\s*"),m=new RegExp("\\s*"+Ip(G[1])),y=new RegExp("\\s*"+Ip("}"+G[1]))}k(e||ir.tags);for(var E=new Ua(r),x,v,I,F,le,B;!E.eos();){if(x=E.pos,I=E.scanUntil(f),I)for(var ie=0,W=I.length;ie"?le=[v,I,x,E.pos,u,l,t]:le=[v,I,x,E.pos],l++,s.push(le),v==="#"||v==="^")n.push(le);else if(v==="/"){if(B=n.pop(),!B)throw new Error('Unopened section "'+I+'" at '+x);if(B[1]!==I)throw new Error('Unclosed section "'+B[1]+'" at '+x)}else v==="name"||v==="{"||v==="&"?o=!0:v==="="&&k(I)}if(c(),B=n.pop(),B)throw new Error('Unclosed section "'+B[1]+'" at '+E.pos);return WA(qA(s))}function qA(r){for(var e=[],t,n,s=0,i=r.length;s0?n[n.length-1][4]:e;break;default:t.push(s)}return e}function Ua(r){this.string=r,this.tail=r,this.pos=0}Ua.prototype.eos=function(){return this.tail===""};Ua.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Ua.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Hs(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Hs.prototype.push=function(e){return new Hs(e,this)};Hs.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var s=this,i,a,o,u=!1;s;){if(e.indexOf(".")>0)for(i=s.view,a=e.split("."),o=0;i!=null&&o"?l=this.renderPartial(o,t,n,i):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,i):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Mt.prototype.renderSection=function(e,t,n,s,i){var a=this,o="",u=t.lookup(e[1]);function l(m){return a.render(m,t,n,i)}if(!!u){if(zs(u))for(var c=0,f=u.length;c0||!n)&&(i[a]=s+i[a]);return i.join(` -`)};Mt.prototype.renderPartial=function(e,t,n,s){if(!!n){var i=this.getConfigTags(s),a=Ip(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var f=this.parse(c,i);return this.renderTokens(f,t,n,c,s)}}};Mt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Mt.prototype.escapedValue=function(e,t,n){var s=this.getConfigEscape(n)||sr.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&s===sr.escape?String(i):s(i)};Mt.prototype.rawValue=function(e){return e[1]};Mt.prototype.getConfigTags=function(e){return Vs(e)?e:e&&typeof e=="object"?e.tags:void 0};Mt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Vs(e))return e.escape};var sr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){La.templateCache=r},get templateCache(){return La.templateCache}},La=new Mt;sr.clearCache=function(){return La.clearCache()};sr.parse=function(e,t){return La.parse(e,t)};sr.render=function(e,t,n,s){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+kA(e)+'" was given as the first argument for mustache#render(template, view, partials)');return La.render(e,t,n,s)};sr.escape=CA;sr.Scanner=Ua;sr.Context=zs;sr.Writer=Mt;var Fp=sr;var A_=vi(C_());function P_(r,e){Fp.escape=function(t){return t};try{return Fp.render(r,(0,A_.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. +`)};Mt.prototype.renderPartial=function(e,t,n,s){if(!!n){var i=this.getConfigTags(s),a=Fp(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var f=this.parse(c,i);return this.renderTokens(f,t,n,c,s)}}};Mt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Mt.prototype.escapedValue=function(e,t,n){var s=this.getConfigEscape(n)||ir.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&s===ir.escape?String(i):s(i)};Mt.prototype.rawValue=function(e){return e[1]};Mt.prototype.getConfigTags=function(e){return zs(e)?e:e&&typeof e=="object"?e.tags:void 0};Mt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!zs(e))return e.escape};var ir={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){La.templateCache=r},get templateCache(){return La.templateCache}},La=new Mt;ir.clearCache=function(){return La.clearCache()};ir.parse=function(e,t){return La.parse(e,t)};ir.render=function(e,t,n,s){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+OA(e)+'" was given as the first argument for mustache#render(template, view, partials)');return La.render(e,t,n,s)};ir.escape=PA;ir.Scanner=Ua;ir.Context=Hs;ir.Writer=Mt;var Lp=ir;var N_=_i(P_());function I_(r,e){Lp.escape=function(t){return t};try{return Lp.render(r,(0,N_.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 Tu(r){return{query:{file:new Ws(r)}}}function is(r,e){let t=`Error: ${r}. + ${r}`,Error(n)}}function _u(r){return{query:{file:new qs(r)}}}function ss(r,e){let t=`Error: ${r}. The error message was: - `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var sn=class{constructor(e,t,n,s){this.instruction=e,this.property=t,this.comparator=sn.maybeReverse(s,n)}static maybeReverse(e,t){return e?sn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var Dn=class{constructor(e,t,n,s){this.instruction=e,this.property=t,this.grouper=n,this.reverse=s}};var Oe=class{canCreateFilterForLine(e){return Oe.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return ou(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Oe.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new sn(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=Oe.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new Dn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var De=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new De("None of",e,"NOT")}static booleanXor(e){return new De("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let s=0;s1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let s=0;se(t,n,s)*-1}};var Dn=class{constructor(e,t,n,s){this.instruction=e,this.property=t,this.grouper=n,this.reverse=s}};var ke=class{canCreateFilterForLine(e){return ke.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return uu(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ke.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Tr(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new Dn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var _t=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction?`${e}${this.instruction} `:`${e}${this.instruction} => ${t.asString(e+" ")} -`}};var Mr=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}static fromObject(e,t){let n=new Mr(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Mr(e);return n._error=t,n}};var J=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new J(Mr.fromObject(e.instruction,e))}static fromError(e,t){return new J(Mr.fromError(e,t))}};var bu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?J.fromFilter(new _t(e,this._filter,new De(e))):J.fromError(e,`do not understand filter: ${e}`)}};var Cr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new bu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return J.fromError(e,`do not understand filter: ${e}`)}};var xn=class extends Oe{constructor(){super(...arguments);this._filters=new Cr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Ar=class extends xn{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ar.oldStatusName(e),s=Ar.oldStatusName(t);return ns?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Ar.oldStatusName(e)]}};var _u=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted. +`}};var Nr=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 Nr(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Nr(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(Nr.fromObject(e.instruction,e))}static fromError(e,t){return new J(Nr.fromError(e,t))}};var Ir=class extends ke{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return ke.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let n=t[1].toLowerCase(),s=t[2],i=Gt[s.toUpperCase()];if(!i)return this.helpMessage(e);let a;switch(n){case"is":a=o=>o.status.type===i;break;case"is not":a=o=>o.status.type!==i;break;default:return this.helpMessage(e)}return J.fromFilter(new _t(e,a,new De(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(e){let t=Object.values(Gt).filter(s=>s!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. + Allowed options: 'is' and 'is not' (without quotes). + Allowed values: ${t} + Note: values are case-insensitive, + so 'in_progress' works too, for example. + Example: ${this.fieldNameSingular()} is not NON_TASK`;return J.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ir.groupName(e),s=Ir.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Ir.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var vu=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted. Possible causes: - The query is an a template file, and is not intended to be searched. @@ -196,7 +201,7 @@ Possible causes: instead of in to a template file. See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text -`}};var at=class extends Oe{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Cr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var m;let n=this.checkForUnexpandedTemplateText(t);if(n)return J.fromError(t,n);let s=this.filterInstructions.createFilterOrErrorMessage(t);if(s.filter!==void 0)return s;let i=Oe.getMatch(this.filterRegExp(),t);if(i===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=i[1],o=(m=i[2])==null?void 0:m.toLowerCase(),u=i[3],l=Wt.parseDateRange(u);if(!l.isValid()){let y=Wt.parseDate(a);y.isValid()&&(l=new Dt(y,y))}if(!l.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),f=at.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return J.fromFilter(new _t(t,c,f))}buildFilterFunction(t,n){let s;switch(t){case"before":s=i=>i?i.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":s=i=>i?i.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":s=i=>i?i.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":s=i=>i?i.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:s=i=>i?i.isSameOrAfter(n.start)&&i.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,i){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=i.start.format(o);break;case"after":case"on or before":u=i.end.format(o);break;case"in or before":a="on or before",u=i.end.format(o);break;case"in or after":a="on or after",u=i.start.format(o);break;default:if(!i.start.isSame(i.end)){let c=`${t} date is between:`,f=[new De(`${i.start.format(o)} and`),new De(`${i.end.format(o)} inclusive`)];return s&&f.push(new De(`OR no ${t} date`)),new De(c,f)}a="on",u=i.start.format(o);break}let l=`${t} date is ${a} ${u}`;return s&&(l+=` OR no ${t} date`),new De(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Xr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}checkForUnexpandedTemplateText(t){return new _u().findUnexpandedDateText(t)}};var Ks=class extends at{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Up=class extends Oe{createFilterOrErrorMessage(e){var n;let t=Oe.getMatch(this.filterRegExp(),e);if(t!==null){let s=t[5],i=null;switch(s.toLowerCase()){case"lowest":i="5";break;case"low":i="4";break;case"none":i="3";break;case"medium":i="2";break;case"high":i="1";break;case"highest":i="0";break}if(i===null)return J.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(i)<0;break;case"below":o=u=>u.priority.localeCompare(i)>0;break;case"not":o=u=>u.priority!==i;break;default:o=u=>u.priority===i,a=`${this.fieldName()} is ${s}`}return J.fromFilter(new _t(e,o,new De(a)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return Up.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},as=Up;as.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Qs=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Xs=class extends Qs{constructor(t){super();this.stringToFind=t}matches(t){return Xs.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new De(t)}};var Rn=class extends Qs{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,s=t.match(n);if(s!==null){let i=new RegExp(s[1],s[2]);return new Rn(i)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions +`}};var wu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?J.fromFilter(new _t(e,this._filter,new De(e))):J.fromError(e,`do not understand filter: ${e}`)}};var Fr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new wu(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 at=class extends ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Fr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var m;let n=this.checkForUnexpandedTemplateText(t);if(n)return J.fromError(t,n);let s=this.filterInstructions.createFilterOrErrorMessage(t);if(s.filter!==void 0)return s;let i=ke.getMatch(this.filterRegExp(),t);if(i===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=i[1],o=(m=i[2])==null?void 0:m.toLowerCase(),u=i[3],l=Wt.parseDateRange(u);if(!l.isValid()){let y=Wt.parseDate(a);y.isValid()&&(l=new Dt(y,y))}if(!l.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),f=at.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return J.fromFilter(new _t(t,c,f))}buildFilterFunction(t,n){let s;switch(t){case"before":s=i=>i?i.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":s=i=>i?i.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":s=i=>i?i.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":s=i=>i?i.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:s=i=>i?i.isSameOrAfter(n.start)&&i.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,i){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=i.start.format(o);break;case"after":case"on or before":u=i.end.format(o);break;case"in or before":a="on or before",u=i.end.format(o);break;case"in or after":a="on or after",u=i.start.format(o);break;default:if(!i.start.isSame(i.end)){let c=`${t} date is between:`,f=[new De(`${i.start.format(o)} and`),new De(`${i.end.format(o)} inclusive`)];return s&&f.push(new De(`OR no ${t} date`)),new De(c,f)}a="on",u=i.start.format(o);break}let l=`${t} date is ${a} ${u}`;return s&&(l+=` OR no ${t} date`),new De(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>sr(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.isValid()?[n.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(t){return new vu().findUnexpandedDateText(t)}};var Vs=class extends at{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var qp=class extends ke{createFilterOrErrorMessage(e){var n;let t=ke.getMatch(this.filterRegExp(),e);if(t!==null){let s=t[5],i=null;switch(s.toLowerCase()){case"lowest":i="5";break;case"low":i="4";break;case"none":i="3";break;case"medium":i="2";break;case"high":i="1";break;case"highest":i="0";break}if(i===null)return J.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(i)<0;break;case"below":o=u=>u.priority.localeCompare(i)>0;break;case"not":o=u=>u.priority!==i;break;default:o=u=>u.priority===i,a=`${this.fieldName()} is ${s}`}return J.fromFilter(new _t(e,o,new De(a)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return qp.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},is=qp;is.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Ks=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Qs=class extends Ks{constructor(t){super();this.stringToFind=t}matches(t){return Qs.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new De(t)}};var xn=class extends Ks{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,s=t.match(n);if(s!==null){let i=new RegExp(s[1],s[2]);return new xn(i)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions Regular expressions must look like this: /pattern/ @@ -222,29 +227,24 @@ 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 s=qA(t,"using regex: ",this.regexAsString());return new De(s)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function qA(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let s=2,i=((o=n.index)!=null?o:s)-s;return`${e.padEnd(i)}${t}`}var Pe=class extends Oe{createFilterOrErrorMessage(e){let t=Oe.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let n=t[1].toLowerCase(),s=t[2],i=null;if(n.includes("include"))i=new Xs(s);else if(n.includes("regex")){try{i=Rn.validateAndConstruct(s)}catch(u){let l=is("Parsing regular expression",u)+` +`}explanation(t){let s=YA(t,"using regex: ",this.regexAsString());return new De(s)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function YA(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let s=2,i=((o=n.index)!=null?o:s)-s;return`${e.padEnd(i)}${t}`}var Pe=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let n=t[1].toLowerCase(),s=t[2],i=null;if(n.includes("include"))i=new Qs(s);else if(n.includes("regex")){try{i=xn.validateAndConstruct(s)}catch(u){let l=ss("Parsing regular expression",u)+` -${Rn.helpMessage()}`;return J.fromError(e,l)}if(i===null)return J.fromError(e,`Invalid instruction: '${e}' +${xn.helpMessage()}`;return J.fromError(e,l)}if(i===null)return J.fromError(e,`Invalid instruction: '${e}' -${Rn.helpMessage()}`)}if(i===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new _t(e,this.getFilter(i,a),i.explanation(e));return J.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(e,t){return n=>{let s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Zs=class extends Pe{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Js=class extends Oe{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return J.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}grouperInstruction(e){return super.grouperInstruction(!e)}};var ei=class{static by(e,t){let n=[new Js().comparator(),new Ar().comparator(),new Ks().comparator(),new as().comparator(),new Zs().comparator()],s=[];for(let i of e)s.push(i.comparator);return t.sort(ei.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let i=s(t,n);if(i!==0)return i}return 0}}};var vu=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var wu=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let s=e.keys().next().value.length;for(let i=0;it.set(o,a)),e.pop();return t}};var ku=class extends Eu{},Su=class{constructor(e,t,n){this.root=new ku(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let s of e){let i=[];for(let a of n)for(let o of a.values){let u=s.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new ku([]),a.children.set(l,c),i.push(c)),c.values.push(o)}}n=i}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Ou=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` +${xn.helpMessage()}`)}if(i===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new _t(e,this.getFilter(i,a),i.explanation(e));return J.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(e,t){return n=>{let s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Xs=class extends Pe{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Zs=class extends ke{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return J.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}grouperInstruction(e){return super.grouperInstruction(!e)}};var Js=class{static by(e,t,n){let s=this.defaultSorters().map(a=>a.comparator),i=[];for(let a of e)i.push(a.comparator);return t.sort(Js.makeCompositeComparator([...i,...s],n))}static defaultSorters(){return[new Ir().createNormalSorter(),new Zs().createNormalSorter(),new Vs().createNormalSorter(),new is().createNormalSorter(),new Xs().createNormalSorter()]}static makeCompositeComparator(e,t){return(n,s)=>{for(let i of e){let a=i(n,s,t);if(a!==0)return a}return 0}}};var Eu=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var ku=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let s=e.keys().next().value.length;for(let i=0;it.set(o,a)),e.pop();return t}};var Ou=class extends Su{},Du=class{constructor(e,t,n){this.root=new Ou(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let s of e){let i=[];for(let a of n)for(let o of a.values){let u=s.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new Ou([]),a.children.set(l,c),i.push(c)),c.values.push(o)}}n=i}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var xu=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 ti=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new Su(e,t,n).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): +`;return e+=this.tasksAsStringOfLines(),e}};var ei=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new Du(e,t,n).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): `;for(let n of this._groupers){let s=n.reverse?" reverse":"";e+=`- ${n.property}${s} `}for(let n of this.groups)e+=n.toString(),e+=` --- `;return e+=` ${this.totalTasksCount()} tasks -`,e}addTaskGroups(e){for(let[t,n]of e){let s=new Ou(t,n);this.addTaskGroup(s)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let s=t.groups,i=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var os=class extends Pe{fieldName(){return"description"}value(e){return ye.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=os.cleanDescription(e.description),s=os.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){e=ye.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let s=n[1];e=s.substring(s.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Du=class extends at{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var xu=class extends at{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Ru=class extends xn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var qa=class extends Mr{};function qp(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,s=e&&new Function(...t,n);return s instanceof Function?qa.fromObject(e,s):qa.fromError(e,"Error parsing group function")}catch(n){return qa.fromError(e,is(`Failed parsing expression "${e}"`,n))}}function Wp(r,e){let t=e.map(([n,s])=>s);return r(...t)}function Yp(r,e,t){try{return Wp(r,e)}catch(n){return is(`Failed calculating expression "${t}"`,n)}}function Mu(r,e){return[["task",r],["query",e?e.query:null]]}function N_(r,e,t){let n=Mu(r,t||null),s=qp(n,e);return s.error?s.error:Yp(s.queryComponent,n,e)}var Cu=class{constructor(e){this.line=e,this.functionOrError=qp(Mu(null,null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return Wp(this.functionOrError.queryComponent,Mu(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?Yp(this.functionOrError.queryComponent,Mu(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var Au=class extends Oe{createFilterOrErrorMessage(e){let t=Oe.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],s=new Cu(n);return s.isValid()?J.fromFilter(new _t(e,WA(s),new De(e))):J.fromError(e,s.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsGrouping(){return!0}createGrouperFromLine(e){let t=Oe.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],s=t[2];return new Dn(e,"function",GA(s),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function WA(r){return(e,t)=>{let n=t.queryContext();return YA(r,e,n)}}function YA(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function GA(r){return(e,t)=>{let n=t.queryContext();return jA(e,r,n)}}function jA(r,e,t){try{let n=N_(r,e,t);return Array.isArray(n)?n.map(i=>i.toString()):n===null?[]:[n.toString()]}catch(n){let s=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[s+n.message]:[s+"Unknown error"]}}var Pu=class extends Pe{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var Nu=class extends at{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Iu=class extends at{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Fu=class extends at{constructor(){let e=new Cr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var Lu=class extends xn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Uu=class extends Pe{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let s=e.matchesAnyOf(this.values(n));return t?!s:s}}createGrouper(e){return new Dn(this.grouperInstruction(e),this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNamePlural()}`;return e&&(t+=" reverse"),t}};var us=class extends Uu{constructor(){super();this.filterInstructions=new Cr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let s=!!n[1],i=isNaN(+n[2])?1:+n[2],a=us.makeCompareByTagComparator(i);return new sn(t,this.fieldNameSingular(),a,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return us.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let i=t-1;if(n.tags.length=t)return 1;if(s.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var V_=vi(z_());var ju=class extends Oe{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return J.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let s=(0,V_.parse)(n);for(let o of s)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=$u(u);if(l===null)return J.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return J.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return J.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return J.fromError(t,`unknown boolean operator '${o.value}'`)}let i=(o,u)=>this.filterTaskWithParsedQuery(o,s,u),a=this.constructExplanation(s);return J.fromFilter(new _t(t,i,a))}catch(s){let i=s instanceof Error?s.message:"unknown error type";return J.fromError(t,`malformed boolean query -- ${i} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n,s){let i=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,s);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=i(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=i(o.pop()),c=i(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=i(o.pop()),c=i(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=i(o.pop()),c=i(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return i(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let i=this.subFields[s.value.trim()];n.push(i.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let i=n.pop();n.push(De.booleanNot([i]))}else if(s.value==="OR"){let i=n.pop(),a=n.pop();n.push(De.booleanOr([a,i]))}else if(s.value==="AND"){let i=n.pop(),a=n.pop();n.push(De.booleanAnd([a,i]))}else if(s.value==="XOR"){let i=n.pop(),a=n.pop();n.push(De.booleanXor([a,i]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s.name);return n[0]}};var Bu=class extends Pe{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var Hu=class extends Pe{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Mn=class extends Oe{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return Oe.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=Oe.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let n=t[1].toLowerCase(),s=t[2],i=jt[s.toUpperCase()];if(!i)return this.helpMessage(e);let a;switch(n){case"is":a=o=>o.status.type===i;break;case"is not":a=o=>o.status.type!==i;break;default:return this.helpMessage(e)}return J.fromFilter(new _t(e,a,new De(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(e){let t=Object.values(jt).filter(s=>s!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. - Allowed options: 'is' and 'is not' (without quotes). - Allowed values: ${t} - Note: values are case-insensitive, - so 'in_progress' works too, for example. - Example: ${this.fieldNameSingular()} is not NON_TASK`;return J.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Mn.groupName(e),s=Mn.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Mn.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var zu=class extends Pe{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var Vu=class extends Pe{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Ku=class extends Pe{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Qu=class extends Pe{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return J.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Xu=class extends at{fieldName(){return"cancelled"}date(e){return e.cancelledDate}filterResultIfFieldMissing(){return!1}};var Xp=[()=>new Hu,()=>new Mn,()=>new Ar,()=>new Lu,()=>new as,()=>new Fu,()=>new Xu,()=>new Du,()=>new Iu,()=>new Nu,()=>new Ks,()=>new xu,()=>new Zs,()=>new Vu,()=>new Ku,()=>new Qu,()=>new os,()=>new us,()=>new Pu,()=>new Ru,()=>new Bu,()=>new Js,()=>new zu,()=>new Au,()=>new ju];function $u(r){for(let e of Xp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function K_(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Xp){let s=t().createSorterFromLine(r);if(s)return s}return null}function Q_(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Xp){let s=t().createGrouperFromLine(r);if(s)return s}return null}var Cn=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new Cn(void 0,e)}queryContext(){return this.queryPath?Tu(this.queryPath):void 0}};function X_(r){return`task${r!==1?"s":""}`}var ds=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${X_(e)}`:`${e} of ${t} ${X_(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new ds(new ti([],[],Cn.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function Z_(r){return r.endsWith("\\")}function J_(r){return r.endsWith("\\\\")}function gP(r){return r.replace(/^[ \t]*/,"")}function yP(r){return r.replace(/[ \t]*\\$/,"")}function TP(r,e){let t=r;return e&&(t=gP(r)),J_(t)?t=t.slice(0,-1):Z_(r)&&(t=yP(t)),t}function bP(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function _P(r){let e=[],t=!1;for(let n of r.split(` -`)){let s=TP(n,t);bP(e,t,s),J_(n)?t=!1:t=Z_(n)}return e.join(` -`)}function ev(r){return _P(r).split(` -`).map(e=>e.trim()).filter(e=>e!=="")}var li=class{constructor(e=""){this.indentation=e}explainQuery(e){if(e.error!==void 0)return this.explainError(e);let t=[];return t.push(this.explainFilters(e)),t.push(this.explainGroups(e)),t.push(this.explainSorters(e)),t.push(this.explainQueryLimits(e)),t.push(this.explainDebugSettings()),t.filter(n=>n!=="").join(` +`,e}addTaskGroups(e){for(let[t,n]of e){let s=new xu(t,n);this.addTaskGroup(s)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let s=t.groups,i=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var as=class extends Pe{fieldName(){return"description"}value(e){return ye.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=as.cleanDescription(e.description),s=as.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){e=ye.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let s=n[1];e=s.substring(s.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Ru=class extends at{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Mu=class extends at{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Rn=class extends ke{constructor(){super(...arguments);this._filters=new Fr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Cu=class extends Rn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var qa=class extends Nr{};function Wp(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,s=e&&new Function(...t,n);return s instanceof Function?qa.fromObject(e,s):qa.fromError(e,"Error parsing group function")}catch(n){return qa.fromError(e,ss(`Failed parsing expression "${e}"`,n))}}function Yp(r,e){let t=e.map(([n,s])=>s);return r(...t)}function jp(r,e,t){try{return Yp(r,e)}catch(n){return ss(`Failed calculating expression "${t}"`,n)}}function Au(r,e){return[["task",r],["query",e?e.query:null]]}function F_(r,e,t){let n=Au(r,t||null),s=Wp(n,e);return s.error?s.error:jp(s.queryComponent,n,e)}var Wa=class{constructor(e){this.line=e,this.functionOrError=Wp(Au(null,null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return Yp(this.functionOrError.queryComponent,Au(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?jp(this.functionOrError.queryComponent,Au(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};function Gp(r){if(r===null)return"null";let e=typeof r;return e==="object"?r.constructor.name:e}var Pu=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],s=new Wa(n);return s.isValid()?J.fromFilter(new _t(e,jA(s),new De(e))):J.fromError(e,s.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(e){let t=ke.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1],s=t[2],i=new Wa(s);if(!i.isValid())throw new Error(i.parseError);let a=(o,u,l)=>{try{let c=l.queryContext(),f=this.validateTaskSortKey(i.evaluate(o,c)),m=this.validateTaskSortKey(i.evaluate(u,c));return this.compareTaskSortKeys(f,m)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${e}'`),c}};return new Tr(e,this.fieldNameSingular(),a,n)}validateTaskSortKey(e){function t(n){throw new Error(`"${n}" is not a valid sort key`)}return e===void 0&&t("undefined"),Number.isNaN(e)&&t("NaN (Not a Number)"),Array.isArray(e)&&t("array"),e}compareTaskSortKeys(e,t){let n=Gp(e),s=Gp(t),i=this.compareTaskSortKeysIfOptionalMoment(e,t,n,s);if(i!==void 0)return i;let a=this.compareTaskSortKeysIfEitherIsNull(e,t);if(a!==void 0)return a;if(n!==s)throw new Error(`Unable to compare two different sort key types '${n}' and '${s}' order`);if(n==="string")return e.localeCompare(t,void 0,{numeric:!0});if(n==="TasksDate")return sr(e.moment,t.moment);if(n==="boolean")return Number(t)-Number(e);let o=Number(e)-Number(t);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${n}' and '${s}'`);return o}compareTaskSortKeysIfOptionalMoment(e,t,n,s){let i=n==="Moment",a=s==="Moment";if(i&&a||i&&t===null||a&&e===null)return sr(e,t)}compareTaskSortKeysIfEitherIsNull(e,t){if(e===null&&t===null)return 0;if(e===null&&t!==null)return-1;if(e!==null&&t===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(e){let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],s=t[2];return new Dn(e,"function",$A(s),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function jA(r){return(e,t)=>{let n=t.queryContext();return GA(r,e,n)}}function GA(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function $A(r){return(e,t)=>{let n=t.queryContext();return BA(e,r,n)}}function BA(r,e,t){try{let n=F_(r,e,t);return Array.isArray(n)?n.map(i=>i.toString()):n===null?[]:[n.toString()]}catch(n){let s=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[s+n.message]:[s+"Unknown error"]}}var Nu=class extends Pe{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var Iu=class extends at{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Fu=class extends at{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Lu=class extends at{constructor(){let e=new Fr;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 Uu=class extends Rn{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 Mn=class extends Rn{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=Mn.oldStatusName(e),s=Mn.oldStatusName(t);return ns?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Mn.oldStatusName(e)]}};var qu=class extends Pe{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let s=e.matchesAnyOf(this.values(n));return t?!s:s}}createGrouper(e){return new Dn(this.grouperInstruction(e),this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNamePlural()}`;return e&&(t+=" reverse"),t}};var os=class extends qu{constructor(){super();this.filterInstructions=new Fr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let s=!!n[1],i=isNaN(+n[2])?1:+n[2],a=os.makeCompareByTagComparator(i);return new Tr(t,this.fieldNameSingular(),a,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return os.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let i=t-1;if(n.tags.length=t)return 1;if(s.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var Q_=_i(K_());var $u=class extends ke{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return J.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let s=(0,Q_.parse)(n);for(let o of s)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=Bu(u);if(l===null)return J.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return J.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return J.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return J.fromError(t,`unknown boolean operator '${o.value}'`)}let i=(o,u)=>this.filterTaskWithParsedQuery(o,s,u),a=this.constructExplanation(s);return J.fromFilter(new _t(t,i,a))}catch(s){let i=s instanceof Error?s.message:"unknown error type";return J.fromError(t,`malformed boolean query -- ${i} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n,s){let i=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,s);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=i(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=i(o.pop()),c=i(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=i(o.pop()),c=i(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=i(o.pop()),c=i(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return i(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let i=this.subFields[s.value.trim()];n.push(i.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let i=n.pop();n.push(De.booleanNot([i]))}else if(s.value==="OR"){let i=n.pop(),a=n.pop();n.push(De.booleanOr([a,i]))}else if(s.value==="AND"){let i=n.pop(),a=n.pop();n.push(De.booleanAnd([a,i]))}else if(s.value==="XOR"){let i=n.pop(),a=n.pop();n.push(De.booleanXor([a,i]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s.name);return n[0]}};var Hu=class extends Pe{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var zu=class extends Pe{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Vu=class extends Pe{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var Ku=class extends Pe{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Qu=class extends Pe{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Xu=class extends Pe{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return J.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Zu=class extends at{fieldName(){return"cancelled"}date(e){return e.cancelledDate}filterResultIfFieldMissing(){return!1}};var Jp=[()=>new zu,()=>new Ir,()=>new Mn,()=>new Uu,()=>new is,()=>new Lu,()=>new Zu,()=>new Ru,()=>new Fu,()=>new Iu,()=>new Vs,()=>new Mu,()=>new Xs,()=>new Ku,()=>new Qu,()=>new Xu,()=>new as,()=>new os,()=>new Nu,()=>new Cu,()=>new Hu,()=>new Zs,()=>new Vu,()=>new Pu,()=>new $u];function Bu(r){for(let e of Jp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function X_(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Jp){let s=t().createSorterFromLine(r);if(s)return s}return null}function Z_(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Jp){let s=t().createGrouperFromLine(r);if(s)return s}return null}var Cn=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new Cn(void 0,e)}queryContext(){return this.queryPath?_u(this.queryPath):void 0}};function J_(r){return`task${r!==1?"s":""}`}var cs=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} ${J_(e)}`:`${e} of ${t} ${J_(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new cs(new ei([],[],Cn.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function ev(r){return r.endsWith("\\")}function tv(r){return r.endsWith("\\\\")}function bP(r){return r.replace(/^[ \t]*/,"")}function TP(r){return r.replace(/[ \t]*\\$/,"")}function _P(r,e){let t=r;return e&&(t=bP(r)),tv(t)?t=t.slice(0,-1):ev(r)&&(t=TP(t)),t}function vP(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function wP(r){let e=[],t=!1;for(let n of r.split(` +`)){let s=_P(n,t);vP(e,t,s),tv(n)?t=!1:t=ev(n)}return e.join(` +`)}function rv(r){return wP(r).split(` +`).map(e=>e.trim()).filter(e=>e!=="")}var ui=class{constructor(e=""){this.indentation=e}explainQuery(e){if(e.error!==void 0)return this.explainError(e);let t=[];return t.push(this.explainFilters(e)),t.push(this.explainGroups(e)),t.push(this.explainSorters(e)),t.push(this.explainQueryLimits(e)),t.push(this.explainDebugSettings()),t.filter(n=>n!=="").join(` `)}explainError(e){let t="";return t+=`Query has an error: `,t+=e.error+` `,t}explainFilters(e){return e.filters.length===0?this.indent(`No filters supplied. All tasks will match the query. @@ -257,13 +257,13 @@ ${this.totalTasksCount()} tasks `;n.push(this.indent(s))}if(e.taskGroupLimit!==void 0){let s=t(e.taskGroupLimit)+` per group (if any "group by" options are supplied). `;n.push(this.indent(s))}return n.join(` `)}explainDebugSettings(){let e="",{debugSettings:t}=K();return t.ignoreSortInstructions&&(e+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting. -`)),e}indent(e){return this.indentation+e}};var on=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new Jn;this._queryLayoutOptions=new wn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|cancelled date|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=Rt.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.filePath=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),ev(e).forEach(n=>{let s=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case this.shortModeRegexp.test(s):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(s):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(s):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(s):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(s):this.parseLimit(s);break;case this.parseSortBy(s):break;case this.parseGroupBy(s):break;case this.hideOptionsRegexp.test(s):this.parseHideOptions(s);break;case this.commentRegexp.test(s):break;case this.parseFilter(s):break;default:this.setError("do not understand query",s)}})}formatQueryForLogging(){return`[${this.source.split(` +`)),e}indent(e){return this.indentation+e}};var un=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new Cr;this._queryLayoutOptions=new En;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|cancelled date|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=Rt.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.filePath=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),rv(e).forEach(n=>{let s=this.expandPlaceholders(n,t);if(this.error===void 0)try{this.parseLine(s)}catch(i){let a;i instanceof Error?a=i.message:a="Unknown error",this.setError(a,s);return}})}parseLine(e){switch(!0){case this.shortModeRegexp.test(e):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(e):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(e):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(e):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(e):this.parseLimit(e);break;case this.parseSortBy(e):break;case this.parseGroupBy(e):break;case this.hideOptionsRegexp.test(e):this.parseHideOptions(e);break;case this.commentRegexp.test(e):break;case this.parseFilter(e):break;default:this.setError("do not understand query",e)}}formatQueryForLogging(){return`[${this.source.split(` `).join(" ; ")}]`}expandPlaceholders(e,t){if(e.includes("{{")&&e.includes("}}")&&this.filePath===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" but no file path has been supplied, so cannot expand placeholder values. The query is: -${e}`,e;let n=e;if(t){let s=Tu(t);try{n=P_(e,s)}catch(i){return i instanceof Error?this._error=i.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new on(`${this.source} -${e.source}`,this.filePath)}explainQuery(){return new li().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e} -Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new Cn(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=K(),s=n.ignoreSortInstructions?e:ei.by(this.sorting,e),i=s.slice(0,this.limit),a=new ti(this.grouping,i,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new ds(a,s.length)}catch(n){let s="Search failed";return ds.fromError(is(s,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.hidePriority=n;break;case"cancelled date":this._taskLayoutOptions.hideCancelledDate=n;break;case"created date":this._taskLayoutOptions.hideCreatedDate=n;break;case"start date":this._taskLayoutOptions.hideStartDate=n;break;case"scheduled date":this._taskLayoutOptions.hideScheduledDate=n;break;case"due date":this._taskLayoutOptions.hideDueDate=n;break;case"done date":this._taskLayoutOptions.hideDoneDate=n;break;case"recurrence rule":this._taskLayoutOptions.hideRecurrenceRule=n;break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.hideTags=n;break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=$u(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=K_(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=Q_(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var An=class{constructor(e=An.empty){this._source=e}static getInstance(){return An.instance||(An.instance=new An),An.instance}set(e){this._source=e}query(e=void 0){return new on(this._source,e)}hasInstructions(){return this._source.trim()!==An.empty}},ar=An;ar.empty="";var Zu=class{constructor({obsidianEvents:e}){this.logger=Rt.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Ga=require("obsidian");var Ya,Zp,Jp,vP=["md"];function tl(){return Rt.getLogger("tasks.File")}var tv=({metadataCache:r,vault:e,workspace:t})=>{Ya=r,Zp=e,Jp=t},ci=t=>L(void 0,[t],function*({originalTask:r,newTasks:e}){if(Zp===void 0||Ya===void 0||Jp===void 0){Ju("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=tl(),s="replaceTaskWithTasks()";du(n,s,r),fu(n,s,e),nv({originalTask:r,newTasks:e,vault:Zp,metadataCache:Ya,workspace:Jp,previousTries:0})});function Ju(r){console.error(r),new Ga.Notice(r,15e3)}function rv(r){console.warn(r),new Ga.Notice(r,1e4)}function wP(r){tl().debug(r)}var Pn=class extends Error{},el=class extends Error{},nv=a=>L(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:i}){let o=tl();o.debug(`tryRepetitive after ${i} previous tries`);let u=()=>{if(i>10){let c=`Tasks: Could not find the correct task line to update. +${e}`,e;let n=e;if(t){let s=_u(t);try{n=I_(e,s)}catch(i){return i instanceof Error?this._error=i.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new un(`${this.source} +${e.source}`,this.filePath)}explainQuery(){return new ui().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e} +Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new Cn(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=K(),s=n.ignoreSortInstructions?e:Js.by(this.sorting,e,t),i=s.slice(0,this.limit),a=new ei(this.grouping,i,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new cs(a,s.length)}catch(n){let s="Search failed";return cs.fromError(ss(s,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.setVisibility("priority",!n);break;case"cancelled date":this._taskLayoutOptions.setVisibility("cancelledDate",!n);break;case"created date":this._taskLayoutOptions.setVisibility("createdDate",!n);break;case"start date":this._taskLayoutOptions.setVisibility("startDate",!n);break;case"scheduled date":this._taskLayoutOptions.setVisibility("scheduledDate",!n);break;case"due date":this._taskLayoutOptions.setVisibility("dueDate",!n);break;case"done date":this._taskLayoutOptions.setVisibility("doneDate",!n);break;case"recurrence rule":this._taskLayoutOptions.setVisibility("recurrenceRule",!n);break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.setTagsVisibility(!n);break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=Bu(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=X_(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=Z_(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var An=class{constructor(e=An.empty){this._source=e}static getInstance(){return An.instance||(An.instance=new An),An.instance}set(e){this._source=e}query(e=void 0){return new un(this._source,e)}hasInstructions(){return this._source.trim()!==An.empty}},or=An;or.empty="";var Ju=class{constructor({obsidianEvents:e}){this.logger=Rt.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Ga=require("obsidian");var ja,em,tm,EP=["md"];function rl(){return Rt.getLogger("tasks.File")}var nv=({metadataCache:r,vault:e,workspace:t})=>{ja=r,em=e,tm=t},li=t=>L(void 0,[t],function*({originalTask:r,newTasks:e}){if(em===void 0||ja===void 0||tm===void 0){el("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=rl(),s="replaceTaskWithTasks()";pu(n,s,r),mu(n,s,e),iv({originalTask:r,newTasks:e,vault:em,metadataCache:ja,workspace:tm,previousTries:0})});function el(r){console.error(r),new Ga.Notice(r,15e3)}function sv(r){console.warn(r),new Ga.Notice(r,1e4)}function kP(r){rl().debug(r)}var Pn=class extends Error{},tl=class extends Error{},iv=a=>L(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:i}){let o=rl();o.debug(`tryRepetitive after ${i} previous tries`);let u=()=>{if(i>10){let c=`Tasks: Could not find the correct task line to update. The task line not updated is: ${r.originalMarkdown} @@ -278,27 +278,27 @@ Recommendations: 1. Close all panes that have the above file open, and then re-open the file. 2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. -`;Ju(c);return}let l=Math.min(Math.pow(10,i),100);o.debug(`timeout = ${l}`),setTimeout(()=>{nv({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:i+1})},l)};try{let[l,c,f]=yield sv(r,t),m=[...f.slice(0,l),...e.map(y=>y.toFileLineString()),...f.slice(l+1)];yield t.modify(c,m.join(` -`))}catch(l){if(l instanceof Pn)return l.message&&rv(l.message),u();if(l instanceof el)return u();l instanceof Error&&Ju(l.message)}});function sv(r,e){return L(this,null,function*(){if(Ya===void 0)throw new Pn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ga.TFile))throw new Pn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!vP.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=Ya.getFileCache(t);if(n==null||n===null)throw new Pn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let s=n.listItems;if(s===void 0||s.length===0)throw new Pn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` -`),o=EP(r,a,s,wP);if(o===void 0)throw new el;return[o,t,a]})}function em(r,e){return L(this,null,function*(){try{let[t,n,s]=yield sv(r,e);return[t,n]}catch(t){t instanceof Pn?t.message&&rv(t.message):t instanceof Error&&Ju(t.message)}})}function iv(r,e){return r{iv({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:i+1})},l)};try{let[l,c,f]=yield av(r,t),m=[...f.slice(0,l),...e.map(y=>y.toFileLineString()),...f.slice(l+1)];yield t.modify(c,m.join(` +`))}catch(l){if(l instanceof Pn)return l.message&&sv(l.message),u();if(l instanceof tl)return u();l instanceof Error&&el(l.message)}});function av(r,e){return L(this,null,function*(){if(ja===void 0)throw new Pn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ga.TFile))throw new Pn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!EP.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=ja.getFileCache(t);if(n==null||n===null)throw new Pn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let s=n.listItems;if(s===void 0||s.length===0)throw new Pn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` +`),o=SP(r,a,s,kP);if(o===void 0)throw new tl;return[o,t,a]})}function rm(r,e){return L(this,null,function*(){try{let[t,n,s]=yield av(r,e);return[t,n]}catch(t){t instanceof Pn?t.message&&sv(t.message):t instanceof Error&&el(t.message)}})}function ov(r,e){return r"",Ce.dateAttributeCalculator=(e,t)=>{let s="far";function i(o){let u=window.moment().startOf("day"),l="",c=u.diff(o,"days");return isNaN(c)?null:c===0?"today":(c>0?l+="past-":c<0&&(l+="future-"),Math.abs(c)<=7?l+=Math.abs(c).toString()+"d":l+=s,l)}let a=t[e];if(a instanceof window.moment){let o=i(a);if(o)return o}return""};var DP={createdDate:new Ce("task-created","taskCreated",Ce.dateAttributeCalculator),dueDate:new Ce("task-due","taskDue",Ce.dateAttributeCalculator),startDate:new Ce("task-start","taskStart",Ce.dateAttributeCalculator),scheduledDate:new Ce("task-scheduled","taskScheduled",Ce.dateAttributeCalculator),doneDate:new Ce("task-done","taskDone",Ce.dateAttributeCalculator),cancelledDate:new Ce("task-cancelled","taskCancelled",Ce.dateAttributeCalculator),description:new Ce("task-description",Ce.noAttributeName,Ce.noAttributeValueCalculator),recurrenceRule:new Ce("task-recurring",Ce.noAttributeName,Ce.noAttributeValueCalculator),priority:new Ce("task-priority","taskPriority",(r,e)=>rn.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),blockLink:new Ce("task-block-link",Ce.noAttributeName,Ce.noAttributeValueCalculator)};var rm=class{constructor(e){this.newStatus=e}apply(e){return this.isCheckedForTask(e)?[e]:e.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(e){return this.newStatus.symbol===e.status.symbol}};function av(r){let e=[],t=new Ne().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let s of r.registeredStatuses)t.includes(s.symbol)===n&&e.push(new rm(s));return e}var ov=require("obsidian");function ja(r,e){return L(this,null,function*(){yield ci({originalTask:r,newTasks:e})})}var di=class extends ov.Menu{constructor(t){super();this.taskSaver=t}addItemsForInstructions(t,n){for(let s of t)this.addItemForInstruction(n,s)}addItemForInstruction(t,n){this.addItem(s=>this.getMenuItemCallback(t,s,n))}getMenuItemCallback(t,n,s){n.setTitle(s.instructionDisplayName()).setChecked(s.isCheckedForTask(t)).onClick(()=>L(this,null,function*(){let i=s.apply(t);(i.length!==1||!Object.is(i[0],t))&&(yield this.taskSaver(t,i))}))}};var nl=class extends di{constructor(e,t,n=ja){super(n);let s=av(e);this.addItemsForInstructions(s,t)}};var Nn=class{static obsidianMarkdownRenderer(e,t,n,s){return L(this,null,function*(){if(!s)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield uv.MarkdownRenderer.renderMarkdown(e,t,n,s)})}constructor({textRenderer:e=Nn.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,taskLayoutOptions:s,queryLayoutOptions:i}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.taskLayoutOptions=s,this.queryLayoutOptions=i}renderTaskLine(e,t,n){return L(this,null,function*(){let s=document.createElement("li");this.parentUlElement.appendChild(s),s.classList.add("task-list-item","plugin-tasks-list-item");let i=document.createElement("span");s.appendChild(i),i.classList.add("tasks-list-text"),yield this.taskToHtml(e,i,s);let a=document.createElement("input");return s.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,s.classList.add("is-checked")),a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),a.disabled=!0;let u=e.toggleWithRecurrenceInUsersOrder();ci({originalTask:e,newTasks:u})}),a.addEventListener("contextmenu",o=>{new nl(Ee.getInstance(),e).showAtPosition({x:o.clientX,y:o.clientY})}),a.setAttribute("title","Right-click for options"),s.prepend(a),s.setAttribute("data-task",e.status.symbol.trim()),s.setAttribute("data-line",t.toString()),s.setAttribute("data-task-status-name",e.status.name),s.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,i,n),s})}taskToHtml(e,t,n){return L(this,null,function*(){let s=new rl,i=new En(this.taskLayoutOptions,this.queryLayoutOptions),a=Jr.tasksPluginEmoji.taskSerializer;for(let o of i.shownTaskLayoutComponents()){let u=a.componentToString(e,this.queryLayoutOptions.shortMode,o);if(u){let l=document.createElement("span");t.appendChild(l);let c=document.createElement("span");l.appendChild(c),yield this.renderComponentText(c,u,o,e),this.addInternalClasses(o,c),s.addClassName(l,o),s.addDataAttribute(l,e,o),s.addDataAttribute(n,e,o)}}for(let o of i.hiddenTaskLayoutComponents())s.addDataAttribute(n,e,o);n.dataset.taskPriority===void 0&&s.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,s){return L(this,null,function*(){if(n==="description"){t=ye.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:i}=K();i.showTaskHiddenData&&(t+=`
\u{1F41B} ${s.lineNumber} . ${s.sectionStart} . ${s.sectionIndex} . '${s.originalMarkdown}'
'${s.path}' > '${s.precedingHeader}'
`),yield this.textRenderer(t,e,s.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(s){let i=/["&\x00\r\n]/g,a=s.replace(i,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let s=t.getElementsByClassName("tag");for(let i=0;i{function f(E,x,v){x&&E.createDiv().setText(m({signifier:v,date:x}))}function m({signifier:E,date:x}){return`${E} ${x.format(z.dateFormat)} (${x.from(window.moment().startOf("day"))})`}let y=t.createDiv();y.addClasses(["tooltip","pop-up"]),e.recurrence&&y.createDiv().setText(`${s} ${e.recurrence.toText()}`),f(y,e.createdDate,a),f(y,e.startDate,i),f(y,e.scheduledDate,o),f(y,e.dueDate,u),f(y,e.cancelledDate,l),f(y,e.doneDate,c);let k=e.getLinkText({isFilenameUnique:n});k&&y.createDiv().setText(`\u{1F517} ${k}`),t.addEventListener("mouseleave",()=>{y.remove()})})}};var sl=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return L(this,null,function*(){var f;let n=new lv.MarkdownRenderChild(e);t.addChild(n);let s=e.findAll(".task-list-item").filter(m=>{var E;let y=(E=m.textContent)==null?void 0:E.split(` +${u}`);return}break}i++}}return s}var dv=require("obsidian");var cv=require("obsidian");var nl=class{constructor(){this.data=RP}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}addClassName(e,t){let n=this.data[t].className;e.classList.add(n)}},nm=class{constructor(e,t,n){if(e==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=e,this.attributeName=t,this.attributeValueCalculator=n}addDataAttribute(e,t,n){if(this.attributeName===nm.noAttributeName)return;let s=this.attributeValueCalculator(n,t);s!==""&&(e.dataset[this.attributeName]=s)}},Ce=nm;Ce.noAttributeName="",Ce.noAttributeValueCalculator=()=>"",Ce.dateAttributeCalculator=(e,t)=>{let s="far";function i(o){let u=window.moment().startOf("day"),l="",c=u.diff(o,"days");return isNaN(c)?null:c===0?"today":(c>0?l+="past-":c<0&&(l+="future-"),Math.abs(c)<=7?l+=Math.abs(c).toString()+"d":l+=s,l)}let a=t[e];if(a instanceof window.moment){let o=i(a);if(o)return o}return""};var RP={createdDate:new Ce("task-created","taskCreated",Ce.dateAttributeCalculator),dueDate:new Ce("task-due","taskDue",Ce.dateAttributeCalculator),startDate:new Ce("task-start","taskStart",Ce.dateAttributeCalculator),scheduledDate:new Ce("task-scheduled","taskScheduled",Ce.dateAttributeCalculator),doneDate:new Ce("task-done","taskDone",Ce.dateAttributeCalculator),cancelledDate:new Ce("task-cancelled","taskCancelled",Ce.dateAttributeCalculator),description:new Ce("task-description",Ce.noAttributeName,Ce.noAttributeValueCalculator),recurrenceRule:new Ce("task-recurring",Ce.noAttributeName,Ce.noAttributeValueCalculator),priority:new Ce("task-priority","taskPriority",(r,e)=>sn.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),blockLink:new Ce("task-block-link",Ce.noAttributeName,Ce.noAttributeValueCalculator)};var sm=class{constructor(e){this.newStatus=e}apply(e){return this.isCheckedForTask(e)?[e]:e.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(e){return this.newStatus.symbol===e.status.symbol}};function uv(r){let e=[],t=new Ne().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let s of r.registeredStatuses)t.includes(s.symbol)===n&&e.push(new sm(s));return e}var lv=require("obsidian");function $a(r,e){return L(this,null,function*(){yield li({originalTask:r,newTasks:e})})}var ci=class extends lv.Menu{constructor(t){super();this.taskSaver=t}addItemsForInstructions(t,n){for(let s of t)this.addItemForInstruction(n,s)}addItemForInstruction(t,n){this.addItem(s=>this.getMenuItemCallback(t,s,n))}getMenuItemCallback(t,n,s){n.setTitle(s.instructionDisplayName()).setChecked(s.isCheckedForTask(t)).onClick(()=>L(this,null,function*(){let i=s.apply(t);(i.length!==1||!Object.is(i[0],t))&&(yield this.taskSaver(t,i))}))}};var sl=class extends ci{constructor(e,t,n=$a){super(n);let s=uv(e);this.addItemsForInstructions(s,t)}};var Nn=class{static obsidianMarkdownRenderer(e,t,n,s){return L(this,null,function*(){if(!s)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield cv.MarkdownRenderer.renderMarkdown(e,t,n,s)})}constructor({textRenderer:e=Nn.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,taskLayoutOptions:s,queryLayoutOptions:i}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.taskLayoutOptions=s,this.queryLayoutOptions=i}renderTaskLine(e,t,n){return L(this,null,function*(){let s=document.createElement("li");this.parentUlElement.appendChild(s),s.classList.add("task-list-item","plugin-tasks-list-item");let i=document.createElement("span");s.appendChild(i),i.classList.add("tasks-list-text"),yield this.taskToHtml(e,i,s);let a=document.createElement("input");return s.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,s.classList.add("is-checked")),a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),a.disabled=!0;let u=e.toggleWithRecurrenceInUsersOrder();li({originalTask:e,newTasks:u})}),a.addEventListener("contextmenu",o=>{new sl(Ee.getInstance(),e).showAtPosition({x:o.clientX,y:o.clientY})}),a.setAttribute("title","Right-click for options"),s.prepend(a),s.setAttribute("data-task",e.status.symbol.trim()),s.setAttribute("data-line",t.toString()),s.setAttribute("data-task-status-name",e.status.name),s.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,i,n),s})}taskToHtml(e,t,n){return L(this,null,function*(){let s=new nl,i=rn.tasksPluginEmoji.taskSerializer;for(let a of this.taskLayoutOptions.shownComponents){let o=i.componentToString(e,this.queryLayoutOptions.shortMode,a);if(o){let u=document.createElement("span");t.appendChild(u);let l=document.createElement("span");u.appendChild(l),yield this.renderComponentText(l,o,a,e),this.addInternalClasses(a,l),s.addClassName(u,a),s.addDataAttribute(u,e,a),s.addDataAttribute(n,e,a)}}for(let a of this.taskLayoutOptions.hiddenComponents)s.addDataAttribute(n,e,a);n.dataset.taskPriority===void 0&&s.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,s){return L(this,null,function*(){if(n==="description"){t=ye.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:i}=K();i.showTaskHiddenData&&(t+=`
\u{1F41B} ${s.lineNumber} . ${s.sectionStart} . ${s.sectionIndex} . '${s.originalMarkdown}'
'${s.path}' > '${s.precedingHeader}'
`),yield this.textRenderer(t,e,s.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(s){let i=/["&\x00\r\n]/g,a=s.replace(i,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let s=t.getElementsByClassName("tag");for(let i=0;i{function f(E,x,v){x&&E.createDiv().setText(m({signifier:v,date:x}))}function m({signifier:E,date:x}){return`${E} ${x.format(z.dateFormat)} (${x.from(window.moment().startOf("day"))})`}let y=t.createDiv();y.addClasses(["tooltip","pop-up"]),e.recurrence&&y.createDiv().setText(`${s} ${e.recurrence.toText()}`),f(y,e.createdDate,a),f(y,e.startDate,i),f(y,e.scheduledDate,o),f(y,e.dueDate,u),f(y,e.cancelledDate,l),f(y,e.doneDate,c);let k=e.getLinkText({isFilenameUnique:n});k&&y.createDiv().setText(`\u{1F517} ${k}`),t.addEventListener("mouseleave",()=>{y.remove()})})}};var il=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return L(this,null,function*(){var f;let n=new dv.MarkdownRenderChild(e);t.addChild(n);let s=e.findAll(".task-list-item").filter(m=>{var E;let y=(E=m.textContent)==null?void 0:E.split(` `);if(y===void 0)return!1;let k=null;for(let x=0;xcv.ViewPlugin.fromClass(nm),nm=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let m=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. -If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(m),new dv.Notice(m,45e3)}return!1}let{state:s}=this.view,i=this.view.posAtDOM(t),a=s.doc.lineAt(i),o=fe.fromLine({line:a.text,taskLocation:pt.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(m=>m.toFileLineString()).join(s.lineBreak),c=s.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var fi=require("obsidian");function pv(r,e,t,n=void 0){let s="";e.isEmpty()||(s+=`Only tasks containing the global filter '${e.get()}'. +`),u=0,l=[];for(let m=a.lineStart;m<=a.lineEnd;m++){let y=o[m];if(y===void 0)continue;let k=null,E=fe.fromLine({line:y,taskLocation:new pt(i,m,a.lineStart,u,k),fallbackDate:null});E!==null&&(l.push(E),u++)}let c=new Nn({obsidianComponent:n,parentUlElement:e,taskLayoutOptions:new Cr,queryLayoutOptions:new En});for(let m=0;mfv.ViewPlugin.fromClass(im),im=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let m=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. +If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(m),new pv.Notice(m,45e3)}return!1}let{state:s}=this.view,i=this.view.posAtDOM(t),a=s.doc.lineAt(i),o=fe.fromLine({line:a.text,taskLocation:pt.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(m=>m.toFileLineString()).join(s.lineBreak),c=s.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var di=require("obsidian");function hv(r,e,t,n=void 0){let s="";e.isEmpty()||(s+=`Only tasks containing the global filter '${e.get()}'. -`);let i=new li(" "),a=new on(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.query(n);s+=`Explanation of the global query: +`);let i=new ui(" "),a=new un(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.query(n);s+=`Explanation of the global query: ${i.explainQuery(o)} `}return s+=`Explanation of this Tasks code block query: -${i.explainQuery(a)}`,s}function il(r,e,t){let n=new on(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function mv(r){for(let t of fe.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function al(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function sm(r,e,t,n){let s=r[e];return gv(s,r,e,t,n)}function hv(r,e,t,n){let s=window.moment();return gv(s,r,e,t,n)}function gv(r,e,t,n,s){let i=new He(r).postpone(n,s),a=bt.removeInferredStatusIfNeeded(e,[new fe(ot(ke({},e),{[t]:i}))])[0];return{postponedDate:i,postponedTask:a}}function yv(r,e){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} changed to ${t}`}function Tv(r,e,t){return`\u2139\uFE0F ${im(r,e,t)} (right-click for more options)`}function xP(r){return r.charAt(0).toUpperCase()+r.slice(1)}function im(r,e,t){let n=al(r),s=r[n];return _v(n,s,e,t)}function bv(r,e,t){let n=al(r),s=window.moment().startOf("day");return _v(n,s,e,t)}function _v(r,e,t,n){let i=new He(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";return e.isSameOrBefore(window.moment(),"day")?`${xP(r.replace("Date",""))} in ${a} ${n}, on ${i}`.replace(" in 0 days"," today").replace("in a day","tomorrow"):`Postpone ${r.replace("Date"," date")} by ${a} ${n}, to ${i}`}var am=require("obsidian");var In=class extends di{constructor(e,t,n=ja){super(n);let s=(l,c,f,m,y,k)=>{let E=y(t,m,f);c.setTitle(E).onClick(()=>In.postponeOnClickCallback(l,t,m,f,k,n))},i=bv,a=hv;this.addItem(l=>s(e,l,"days",0,i,a)),this.addItem(l=>s(e,l,"day",1,i,a)),this.addSeparator();let o=im,u=sm;this.addItem(l=>s(e,l,"days",2,o,u)),this.addItem(l=>s(e,l,"days",3,o,u)),this.addItem(l=>s(e,l,"days",4,o,u)),this.addItem(l=>s(e,l,"days",5,o,u)),this.addItem(l=>s(e,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>s(e,l,"week",1,o,u)),this.addItem(l=>s(e,l,"weeks",2,o,u)),this.addItem(l=>s(e,l,"weeks",3,o,u)),this.addItem(l=>s(e,l,"month",1,o,u))}static postponeOnClickCallback(o,u,l,c){return L(this,arguments,function*(e,t,n,s,i=sm,a=ja){let f=al(t);if(f===null){let k="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new am.Notice(k,1e4)}let{postponedDate:m,postponedTask:y}=i(t,f,s,n);yield a(t,y),In.postponeSuccessCallback(e,f,m)})}static postponeSuccessCallback(e,t,n){e.disabled=!0;let s=yv(n,t);new am.Notice(s,2e3)}};var ol=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return L(this,null,function*(){n.addChild(new om({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},om=class extends fi.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:i,filePath:a}){super(s);switch(this.app=t,this.events=n,this.source=i,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=il(this.source,ar.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=il(this.source,ar.getInstance(),this.filePath),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=il(this.source,ar.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return L(this,arguments,function*({tasks:t,state:n}){var a;let i=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,i):this.query.error!==void 0?this.renderErrorMessage(i,this.query.error):this.renderLoadingMessage(i),(a=this.containerEl.firstChild)==null||a.replaceWith(i)})}renderQuerySearchResults(t,n,s){return L(this,null,function*(){this.query.debug(`[render] Render called: plugin state: ${n}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(s);let i=this.query.applyQueryToTasks(t);if(i.searchErrorMessage!==void 0){this.renderErrorMessage(s,i.searchErrorMessage);return}yield this.addAllTaskGroups(i.taskGroups,s);let a=i.totalTasksCount;this.addTaskCount(s,i),this.query.debug(`[render] ${a} tasks displayed`)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=pv(this.source,ye.getInstance(),ar.getInstance(),this.filePath),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTaskList(t,n){return L(this,null,function*(){let s=new En(this.query.taskLayoutOptions,this.query.queryLayoutOptions),i=n.createEl("ul");i.addClasses(["contains-task-list","plugin-tasks-query-result"]),i.addClasses(s.taskListHiddenClasses());let a=this.getGroupingAttribute();a&&a.length>0&&(i.dataset.taskGroupBy=a);let o=new Nn({obsidianComponent:this,parentUlElement:i,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[u,l]of t.entries()){let c=this.isFilenameUnique({task:l}),f=yield o.renderTaskLine(l,u,c);f.querySelectorAll("[data-footnote-id]").forEach(E=>E.remove());let y=f.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(y,l);let k=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(y,l,k,c),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(y,l),!this.query.queryLayoutOptions.hidePostponeButton&&mv(l)&&this.addPostponeButton(y,l,k),i.appendChild(f)}n.appendChild(i)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(i=>{i.preventDefault();let a=u=>L(this,null,function*(){yield ci({originalTask:n,newTasks:bt.removeInferredStatusIfNeeded(n,u)})});new On({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return L(this,null,function*(){for(let s of t.groups)yield this.addGroupHeadings(n,s.groupHeadings),yield this.createTaskList(s.tasks,n)})}addGroupHeadings(t,n){return L(this,null,function*(){for(let s of n)yield this.addGroupHeading(t,s)})}addGroupHeading(t,n){return L(this,null,function*(){let s="h6";n.nestingLevel===0?s="h4":n.nestingLevel===1&&(s="h5");let i=t.createEl(s,{cls:"tasks-group-heading"});yield fi.MarkdownRenderer.renderMarkdown(n.displayName,i,this.filePath,this)})}addBacklinks(t,n,s,i){var c;let a=t.createSpan({cls:"tasks-backlink"});s||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),s&&o.addClass("internal-link-short-mode");let u;s?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:i}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",f=>L(this,null,function*(){let m=yield em(n,l);if(m){let[y,k]=m,E=this.app.workspace.getLeaf(fi.Keymap.isModEvent(f));f.preventDefault(),yield E.openFile(k,{eState:{line:y}})}})),o.addEventListener("mousedown",f=>L(this,null,function*(){if(f.button===1){let m=yield em(n,l);if(m){let[y,k]=m,E=this.app.workspace.getLeaf("tab");f.preventDefault(),yield E.openFile(k,{eState:{line:y}})}}})),s||a.append(")")}addPostponeButton(t,n,s){let a="day",o=Tv(n,1,a),u=t.createEl("button",{attr:{id:"postpone-button",title:o}}),l=s?["tasks-postpone","tasks-postpone-short-mode"]:["tasks-postpone"];u.addClasses(l),u.setText(" \u23E9"),u.addEventListener("click",c=>{c.preventDefault(),In.postponeOnClickCallback(u,n,1,a)}),u.addEventListener("contextmenu",c=>L(this,null,function*(){c.stopPropagation(),new In(u,n).showAtPosition({x:c.clientX,y:c.clientY})}))}addTaskCount(t,n){this.query.queryLayoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===s)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var _e=require("obsidian");var ul=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e} +${i.explainQuery(a)}`,s}function al(r,e,t){let n=new un(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function gv(r){for(let t of fe.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function ol(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function am(r,e,t,n){let s=r[e];return bv(s,r,e,t,n)}function yv(r,e,t,n){let s=window.moment();return bv(s,r,e,t,n)}function bv(r,e,t,n,s){let i=new Ye(r).postpone(n,s),a=Tt.removeInferredStatusIfNeeded(e,[new fe(ot(Se({},e),{[t]:i}))])[0];return{postponedDate:i,postponedTask:a}}function Tv(r,e){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} changed to ${t}`}function _v(r,e,t){return`\u2139\uFE0F ${om(r,e,t)} (right-click for more options)`}function MP(r){return r.charAt(0).toUpperCase()+r.slice(1)}function om(r,e,t){let n=ol(r),s=r[n];return wv(n,s,e,t)}function vv(r,e,t){let n=ol(r),s=window.moment().startOf("day");return wv(n,s,e,t)}function wv(r,e,t,n){let i=new Ye(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";return e.isSameOrBefore(window.moment(),"day")?`${MP(r.replace("Date",""))} in ${a} ${n}, on ${i}`.replace(" in 0 days"," today").replace("in a day","tomorrow"):`Postpone ${r.replace("Date"," date")} by ${a} ${n}, to ${i}`}var um=require("obsidian");var In=class extends ci{constructor(e,t,n=$a){super(n);let s=(l,c,f,m,y,k)=>{let E=y(t,m,f);c.setTitle(E).onClick(()=>In.postponeOnClickCallback(l,t,m,f,k,n))},i=vv,a=yv;this.addItem(l=>s(e,l,"days",0,i,a)),this.addItem(l=>s(e,l,"day",1,i,a)),this.addSeparator();let o=om,u=am;this.addItem(l=>s(e,l,"days",2,o,u)),this.addItem(l=>s(e,l,"days",3,o,u)),this.addItem(l=>s(e,l,"days",4,o,u)),this.addItem(l=>s(e,l,"days",5,o,u)),this.addItem(l=>s(e,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>s(e,l,"week",1,o,u)),this.addItem(l=>s(e,l,"weeks",2,o,u)),this.addItem(l=>s(e,l,"weeks",3,o,u)),this.addItem(l=>s(e,l,"month",1,o,u))}static postponeOnClickCallback(o,u,l,c){return L(this,arguments,function*(e,t,n,s,i=am,a=$a){let f=ol(t);if(f===null){let k="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new um.Notice(k,1e4)}let{postponedDate:m,postponedTask:y}=i(t,f,s,n);yield a(t,y),In.postponeSuccessCallback(e,f,m)})}static postponeSuccessCallback(e,t,n){e.style.pointerEvents="none";let s=Tv(n,t);new um.Notice(s,2e3)}};var ul=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return L(this,null,function*(){n.addChild(new lm({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},lm=class extends di.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:i,filePath:a}){super(s);switch(this.app=t,this.events=n,this.source=i,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=al(this.source,or.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=al(this.source,or.getInstance(),this.filePath),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=al(this.source,or.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return L(this,arguments,function*({tasks:t,state:n}){var a;let i=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,i):this.query.error!==void 0?this.renderErrorMessage(i,this.query.error):this.renderLoadingMessage(i),(a=this.containerEl.firstChild)==null||a.replaceWith(i)})}renderQuerySearchResults(t,n,s){return L(this,null,function*(){this.query.debug(`[render] Render called: plugin state: ${n}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(s);let i=this.query.applyQueryToTasks(t);if(i.searchErrorMessage!==void 0){this.renderErrorMessage(s,i.searchErrorMessage);return}yield this.addAllTaskGroups(i.taskGroups,s);let a=i.totalTasksCount;this.addTaskCount(s,i),this.query.debug(`[render] ${a} tasks displayed`)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=hv(this.source,ye.getInstance(),or.getInstance(),this.filePath),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTaskList(t,n){return L(this,null,function*(){let s=new lu(this.query.taskLayoutOptions,this.query.queryLayoutOptions),i=n.createEl("ul");i.addClasses(["contains-task-list","plugin-tasks-query-result"]),i.addClasses(s.taskListHiddenClasses());let a=this.getGroupingAttribute();a&&a.length>0&&(i.dataset.taskGroupBy=a);let o=new Nn({obsidianComponent:this,parentUlElement:i,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[u,l]of t.entries()){let c=this.isFilenameUnique({task:l}),f=yield o.renderTaskLine(l,u,c);f.querySelectorAll("[data-footnote-id]").forEach(E=>E.remove());let y=f.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(y,l);let k=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(y,l,k,c),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(y,l),!this.query.queryLayoutOptions.hidePostponeButton&&gv(l)&&this.addPostponeButton(y,l,k),i.appendChild(f)}n.appendChild(i)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit",href:"#",title:"Edit task"}).onClickEvent(i=>{i.preventDefault();let a=u=>L(this,null,function*(){yield li({originalTask:n,newTasks:Tt.removeInferredStatusIfNeeded(n,u)})});new On({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return L(this,null,function*(){for(let s of t.groups)yield this.addGroupHeadings(n,s.groupHeadings),yield this.createTaskList(s.tasks,n)})}addGroupHeadings(t,n){return L(this,null,function*(){for(let s of n)yield this.addGroupHeading(t,s)})}addGroupHeading(t,n){return L(this,null,function*(){let s="h6";n.nestingLevel===0?s="h4":n.nestingLevel===1&&(s="h5");let i=t.createEl(s,{cls:"tasks-group-heading"});yield di.MarkdownRenderer.renderMarkdown(n.displayName,i,this.filePath,this)})}addBacklinks(t,n,s,i){var c;let a=t.createSpan({cls:"tasks-backlink"});s||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),s&&o.addClass("internal-link-short-mode");let u;s?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:i}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",f=>L(this,null,function*(){let m=yield rm(n,l);if(m){let[y,k]=m,E=this.app.workspace.getLeaf(di.Keymap.isModEvent(f));f.preventDefault(),yield E.openFile(k,{eState:{line:y}})}})),o.addEventListener("mousedown",f=>L(this,null,function*(){if(f.button===1){let m=yield rm(n,l);if(m){let[y,k]=m,E=this.app.workspace.getLeaf("tab");f.preventDefault(),yield E.openFile(k,{eState:{line:y}})}}})),s||a.append(")")}addPostponeButton(t,n,s){let a="day",o=_v(n,1,a),u=t.createEl("a",{cls:"tasks-postpone"+(s?" tasks-postpone-short-mode":""),href:"#",title:o});u.addEventListener("click",l=>{l.preventDefault(),In.postponeOnClickCallback(u,n,1,a)}),u.addEventListener("contextmenu",l=>L(this,null,function*(){l.stopPropagation(),new In(u,n).showAtPosition({x:l.clientX,y:l.clientY})}))}addTaskCount(t,n){this.query.queryLayoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===s)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var _e=require("obsidian");var ll=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e} `,this._markdown+=`${t} `}addRow(e){let t=this.makeRowText(e);this._markdown+=`${t} `}addRowIfNew(e){let t=this.makeRowText(e);this._markdown.includes(t)||(this._markdown+=`${t} -`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function vv(r,e){return r.findIndex(t=>t.symbol===e)}function RP(r,e){let t=Q.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Fr(r.symbol)} is ${Fr(t)}: you may wish to review this type.`))}function MP(r,e,t){let n=vv(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Fr(e.nextStatusSymbol)} is unknown: create a status with symbol ${Fr(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let s=r[n];if(s){if(s.type!=="TODO"&&s.type!=="IN_PROGRESS"){let i="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${Fr(s.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${i}).`].join("
");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function CP(r,e,t){let n=[];return e.symbol===Q.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):vv(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Fr(e.symbol)}': this status will be ignored.`),n):(RP(e,n),MP(r,e,n),n)}function wv(r){let e=new ul(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Ne.allStatuses(r);return t.forEach((n,s)=>{e.addRow([Fr(n.symbol),Fr(n.nextStatusSymbol),n.name,Fr(n.type),CP(t,n,s).join("
")])}),e.markdown}function Ev(r,e,t,n){let i=wv(r),a=e.mermaidDiagram(!0);return`# ${t} +`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function Ev(r,e){return r.findIndex(t=>t.symbol===e)}function CP(r,e){let t=Q.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Wr(r.symbol)} is ${Wr(t)}: you may wish to review this type.`))}function AP(r,e,t){let n=Ev(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Wr(e.nextStatusSymbol)} is unknown: create a status with symbol ${Wr(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let s=r[n];if(s){if(s.type!=="TODO"&&s.type!=="IN_PROGRESS"){let i="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${Wr(s.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${i}).`].join("
");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function PP(r,e,t){let n=[];return e.symbol===Q.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):Ev(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Wr(e.symbol)}': this status will be ignored.`),n):(CP(e,n),AP(r,e,n),n)}function kv(r){let e=new ll(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Ne.allStatuses(r);return t.forEach((n,s)=>{e.addRow([Wr(n.symbol),Wr(n.nextStatusSymbol),n.name,Wr(n.type),PP(t,n,s).join("
")])}),e.markdown}function Sv(r,e,t,n){let i=kv(r),a=e.mermaidDiagram(!0);return`# ${t} ## About this file @@ -327,14 +327,14 @@ ${i} These are the settings actually used by Tasks. -${a}`}function Fr(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function kv(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function Sv(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function Ov(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function Dv(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function xv(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Rv(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Mv(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var Cv=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

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

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

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

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

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

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

See the documentation to get started!

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

The format that Tasks uses to read and write tasks.

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

See the documentation.

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

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

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

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

See the documentation.

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

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

See the documentation.

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

The format that Tasks uses to read and write tasks.

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

See the documentation.

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

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

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

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

See the documentation.

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

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

')).addToggle(s=>{let i=K();s.setValue(i.provideAccessKeys).onChange(a=>L(this,null,function*(){Ke({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let i=t.createEl("details",{cls:"tasks-nested-settings",attr:ke({},n.open||s[n.text]?{open:!0}:{})});i.empty(),i.ontoggle=()=>{s[n.text]=i.open,Ke({headingOpened:s}),this.plugin.saveSettings()};let a=i.createEl("summary");if(new _e.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=i.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Jb(o.featureFlag))&&(o.type==="checkbox"?new _e.Setting(i).setName(o.name).setDesc(o.description).addToggle(u=>{let l=K();l.generalSettings[o.settingName]||ts(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>L(this,null,function*(){ts(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new _e.Setting(i).setName(o.name).setDesc(o.description).addText(u=>{let l=K();l.generalSettings[o.settingName]||ts(o.settingName,o.initialValue);let c=f=>L(this,null,function*(){ts(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0))}):o.type==="textarea"?new _e.Setting(i).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=K();l.generalSettings[o.settingName]||ts(o.settingName,o.initialValue);let c=f=>L(this,null,function*(){ts(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](i,this),o.notice!==null)){let u=i.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:s}=K();s.coreStatuses.forEach(a=>{Av(t,a,s.coreStatuses,s,n,n.plugin,!0)}),new _e.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>L(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,f=this.plugin.manifest.version,m=Ee.getInstance(),y=Ev(s,m,o,f),k=yield app.vault.create(c,y);yield this.app.workspace.getLeaf(!0).openFile(k)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=K();s.customStatuses.forEach(l=>{Av(t,l,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new _e.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>L(this,null,function*(){Ne.addStatus(s.customStatuses,new Ve("","","",!1,"TODO")),yield pi(s,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",kv()],["Aura Theme",Sv()],["Ebullientworks Theme",Ov()],["ITS Theme & SlRvb Checkboxes",Dv()],["Minimal Theme",Rv()],["Things Theme",Mv()],["LYT Mode Theme (Dark mode only)",xv()]];for(let[l,c]of a)new _e.Setting(t).addButton(m=>{let y=`${l}: Add ${c.length} supported Statuses`;m.setButtonText(y).onClick(()=>L(this,null,function*(){yield NP(c,s,n)}))}).infoEl.remove();new _e.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>L(this,null,function*(){let f=this.plugin.getTasks().map(y=>y.status),m=Ee.getInstance().findUnknownStatuses(f);m.length!==0&&(m.forEach(y=>{Ne.addStatus(s.customStatuses,y)}),yield pi(s,n))}))}).infoEl.remove(),new _e.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>L(this,null,function*(){Ne.resetAllCustomStatuses(s),yield pi(s,n)}))}).infoEl.remove()}},$a=It;$a.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Av(r,e,t,n,s,i,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new Q(e).previewText();let u=new _e.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>L(this,null,function*(){Ne.deleteStatus(t,e)&&(yield pi(n,s))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>L(this,null,function*(){let c=new zt(i,e,a);c.onClose=()=>L(this,null,function*(){c.saved&&Ne.replaceStatus(t,e,c.statusConfiguration())&&(yield pi(n,s))}),c.open()}))}),u.infoEl.remove()}function NP(r,e,t){return L(this,null,function*(){Ne.bulkAddStatusCollection(e,r).forEach(s=>{new _e.Notice(s)}),yield pi(e,t)})}function pi(r,e){return L(this,null,function*(){Ke({statusSettings:r}),Ne.applyToStatusRegistry(r,Ee.getInstance()),yield e.saveSettings(!0)})}function IP(r){let{settingEl:e,infoEl:t,controlEl:n}=r,s=n.querySelector("textarea");s!==null&&(e.style.display="block",t.style.marginRight="0px",s.style.minWidth="-webkit-fill-available")}var Pv=require("obsidian");var ll=class extends Pv.EditorSuggest{constructor(t,n){super(t);this.settings=n,t.scope.register([],"Tab",()=>{var i;let s=(i=this.context)==null?void 0:i.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let i=n.getLine(t.line);return Kb(i,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:i.length},query:i}:null}getSuggestions(t){var a,o,u;let n=t.query,s=t.editor.getCursor();return((u=(o=(a=Ca()).buildSuggestions)==null?void 0:o.call(a,n,s.ch,this.settings))!=null?u:[]).map(l=>ot(ke({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=s==null?void 0:s.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(f);return}let i=t.context.editor.getCursor(),a={line:i.line,ch:(c=t.insertAt)!=null?c:i.ch},o=t.insertSkip?{line:i.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:i.line,ch:a.ch+t.appendText.length})}};var Nv=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` -`);t(o)}).open(),n};var Iv=(r,e)=>{let t=gu({line:"",path:""});return new On({app:r,task:t,onSubmit:e})};var Fv=r=>({createTaskLineModal:()=>Nv(r,Iv)});var cl=class extends Lv.Plugin{get apiV1(){return Fv(app)}onload(){return L(this,null,function*(){Rt.registerConsoleLogger(),wp("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=K();Rt.configure(t),this.addSettingTab(new $a({plugin:this})),tv({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Zu({obsidianEvents:this.app.workspace});this.cache=new rs({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new sl({plugin:this}),this.queryRenderer=new ol({plugin:this,events:n}),this.registerEditorExtension(fv()),this.registerEditorSuggest(new ll(this.app,K())),new yu({plugin:this})})}loadTaskStatuses(){return L(this,null,function*(){let{statusSettings:t}=K();Ne.applyToStatusRegistry(t,Ee.getInstance())})}onunload(){var t;wp("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return L(this,null,function*(){let t=yield this.loadData();Ke(t),t=K(),ye.getInstance().set(t.globalFilter),ye.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),ar.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return L(this,null,function*(){yield this.saveData(K())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; +show urgency`).setValue(i.globalQuery).onChange(a=>L(this,null,function*(){Ke({globalQuery:a}),or.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=K();Pv.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new _e.Setting(t).setName("Set created date on every added task").setDesc(It.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

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

See the documentation.

')).addToggle(s=>{let i=K();s.setValue(i.provideAccessKeys).onChange(a=>L(this,null,function*(){Ke({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let i=t.createEl("details",{cls:"tasks-nested-settings",attr:Se({},n.open||s[n.text]?{open:!0}:{})});i.empty(),i.ontoggle=()=>{s[n.text]=i.open,Ke({headingOpened:s}),this.plugin.saveSettings()};let a=i.createEl("summary");if(new _e.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=i.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!t_(o.featureFlag))&&(o.type==="checkbox"?new _e.Setting(i).setName(o.name).setDesc(o.description).addToggle(u=>{let l=K();l.generalSettings[o.settingName]||es(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>L(this,null,function*(){es(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new _e.Setting(i).setName(o.name).setDesc(o.description).addText(u=>{let l=K();l.generalSettings[o.settingName]||es(o.settingName,o.initialValue);let c=f=>L(this,null,function*(){es(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0))}):o.type==="textarea"?new _e.Setting(i).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=K();l.generalSettings[o.settingName]||es(o.settingName,o.initialValue);let c=f=>L(this,null,function*(){es(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,_e.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](i,this),o.notice!==null)){let u=i.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:s}=K();s.coreStatuses.forEach(a=>{Nv(t,a,s.coreStatuses,s,n,n.plugin,!0)}),new _e.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>L(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,f=this.plugin.manifest.version,m=Ee.getInstance(),y=Sv(s,m,o,f),k=yield app.vault.create(c,y);yield this.app.workspace.getLeaf(!0).openFile(k)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=K();s.customStatuses.forEach(l=>{Nv(t,l,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new _e.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>L(this,null,function*(){Ne.addStatus(s.customStatuses,new Ve("","","",!1,"TODO")),yield fi(s,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",Ov()],["Aura Theme",Dv()],["Ebullientworks Theme",xv()],["ITS Theme & SlRvb Checkboxes",Rv()],["Minimal Theme",Cv()],["Things Theme",Av()],["LYT Mode Theme (Dark mode only)",Mv()]];for(let[l,c]of a)new _e.Setting(t).addButton(m=>{let y=`${l}: Add ${c.length} supported Statuses`;m.setButtonText(y).onClick(()=>L(this,null,function*(){yield FP(c,s,n)}))}).infoEl.remove();new _e.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>L(this,null,function*(){let f=this.plugin.getTasks().map(y=>y.status),m=Ee.getInstance().findUnknownStatuses(f);m.length!==0&&(m.forEach(y=>{Ne.addStatus(s.customStatuses,y)}),yield fi(s,n))}))}).infoEl.remove(),new _e.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>L(this,null,function*(){Ne.resetAllCustomStatuses(s),yield fi(s,n)}))}).infoEl.remove()}},Ba=It;Ba.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Nv(r,e,t,n,s,i,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new Q(e).previewText();let u=new _e.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>L(this,null,function*(){Ne.deleteStatus(t,e)&&(yield fi(n,s))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>L(this,null,function*(){let c=new zt(i,e,a);c.onClose=()=>L(this,null,function*(){c.saved&&Ne.replaceStatus(t,e,c.statusConfiguration())&&(yield fi(n,s))}),c.open()}))}),u.infoEl.remove()}function FP(r,e,t){return L(this,null,function*(){Ne.bulkAddStatusCollection(e,r).forEach(s=>{new _e.Notice(s)}),yield fi(e,t)})}function fi(r,e){return L(this,null,function*(){Ke({statusSettings:r}),Ne.applyToStatusRegistry(r,Ee.getInstance()),yield e.saveSettings(!0)})}function LP(r){let{settingEl:e,infoEl:t,controlEl:n}=r,s=n.querySelector("textarea");s!==null&&(e.style.display="block",t.style.marginRight="0px",s.style.minWidth="-webkit-fill-available")}var Iv=require("obsidian");var cl=class extends Iv.EditorSuggest{constructor(t,n){super(t);this.settings=n,t.scope.register([],"Tab",()=>{var i;let s=(i=this.context)==null?void 0:i.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let i=n.getLine(t.line);return XT(i,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:i.length},query:i}:null}getSuggestions(t){var a,o,u;let n=t.query,s=t.editor.getCursor();return((u=(o=(a=Ca()).buildSuggestions)==null?void 0:o.call(a,n,s.ch,this.settings))!=null?u:[]).map(l=>ot(Se({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=s==null?void 0:s.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(f);return}let i=t.context.editor.getCursor(),a={line:i.line,ch:(c=t.insertAt)!=null?c:i.ch},o=t.insertSkip?{line:i.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:i.line,ch:a.ch+t.appendText.length})}};var Fv=(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 Lv=(r,e)=>{let t=bu({line:"",path:""});return new On({app:r,task:t,onSubmit:e})};var Uv=r=>({createTaskLineModal:()=>Fv(r,Lv)});var dl=class extends qv.Plugin{get apiV1(){return Uv(app)}onload(){return L(this,null,function*(){Rt.registerConsoleLogger(),Ep("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=K();Rt.configure(t),this.addSettingTab(new Ba({plugin:this})),nv({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Ju({obsidianEvents:this.app.workspace});this.cache=new ts({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new il({plugin:this}),this.queryRenderer=new ul({plugin:this,events:n}),this.registerEditorExtension(mv()),this.registerEditorSuggest(new cl(this.app,K())),new Tu({plugin:this})})}loadTaskStatuses(){return L(this,null,function*(){let{statusSettings:t}=K();Ne.applyToStatusRegistry(t,Ee.getInstance())})}onunload(){var t;Ep("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return L(this,null,function*(){let t=yield this.loadData();Ke(t),t=K(),ye.getInstance().set(t.globalFilter),ye.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),or.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return L(this,null,function*(){yield this.saveData(K())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; /*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index 8235e41a..b491bf54 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "5.6.0", + "version": "6.0.0", "minAppVersion": "1.1.1", "description": "Task management for Obsidian", "helpUrl": "https://publish.obsidian.md/tasks/", diff --git a/.obsidian/plugins/obsidian-tasks-plugin/styles.css b/.obsidian/plugins/obsidian-tasks-plugin/styles.css index ec4138fe..08180d0e 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/styles.css +++ b/.obsidian/plugins/obsidian-tasks-plugin/styles.css @@ -46,19 +46,27 @@ ul.contains-task-list .task-list-item-checkbox { } } -/* Pencil icon. */ -.tasks-edit { - background-color: var(--text-faint); - mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E"); - -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E"); - mask-size: contain; - -webkit-mask-size: contain; - display: inline-block; +/* Edit and postpone */ +.tasks-edit, .tasks-postpone { width: 1em; height: 1em; vertical-align: middle; - margin-left: 0.5em; + margin-left: .33em; cursor: pointer; + font-family: var(--font-interface); + color: var(--text-accent); +} + +a.tasks-edit, a.tasks-postpone { + text-decoration: none; +} + +.tasks-edit::after { + content: '📝'; +} + +.tasks-postpone::after { + content: '⏩'; } /* Urgency score */ @@ -77,16 +85,6 @@ ul.contains-task-list .task-list-item-checkbox { text-decoration: none; } -/* Postpone icon. */ -.tasks-postpone { - background-color: transparent; - padding: 0; - font-size: var(--font-text-size); - background-color: transparent; - display: contents; - cursor: pointer; -} - .tasks-list-text { position: relative; } diff --git a/.obsidian/plugins/obsidian-tracker/main.js b/.obsidian/plugins/obsidian-tracker/main.js index 1d889fa4..45abf465 100644 --- a/.obsidian/plugins/obsidian-tracker/main.js +++ b/.obsidian/plugins/obsidian-tracker/main.js @@ -1,2 +1,2 @@ -"use strict";var t=require("obsidian");function e(t,e,n,r){return new(n||(n=Promise))((function(i,a){function l(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,o)}u((r=r.apply(t,e||[])).next())}))}function n(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function r(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function i(t){let e,i,l;function o(t,n,r=0,a=t.length){if(r>>1;i(t[e],n)<0?r=e+1:a=e}while(rn(t(e),r),l=(e,n)=>t(e)-n):(e=t===n||t===r?t:a,i=t,l=t),{left:o,center:function(t,e,n=0,r=t.length){const i=o(t,e,n,r-1);return i>n&&l(t[i-1],e)>-l(t[i],e)?i-1:i},right:function(t,n,r=0,a=t.length){if(r>>1;i(t[e],n)<=0?r=e+1:a=e}while(r=t))-(null==e||!(e>=e))||(te?1:0)}const h=Math.sqrt(50),d=Math.sqrt(10),g=Math.sqrt(2);function p(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),l=a>=h?10:a>=d?5:a>=g?2:1;let o,u,s;return i<0?(s=Math.pow(10,-i)/l,o=Math.round(t*s),u=Math.round(e*s),o/se&&--u,s=-s):(s=Math.pow(10,i)*l,o=Math.round(t/s),u=Math.round(e/s),o*se&&--u),u=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function x(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function A(t,e,r=0,i=1/0,a){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=e&&e<=i))return t;for(a=void 0===a?c:function(t=n){if(t===n)return c;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){const n=i-r+1,l=e-r+1,o=Math.log(n),u=.5*Math.exp(2*o/3),s=.5*Math.sqrt(o*u*(n-u)/n)*(l-n/2<0?-1:1);A(t,e,Math.max(r,Math.floor(e-l*u/n+s)),Math.min(i,Math.floor(e+(n-l)*u/n+s)),a)}const n=t[e];let l=r,o=i;for(w(t,r,e),a(t[i],n)>0&&w(t,r,i);l0;)--o}0===a(t[r],n)?w(t,r,o):(++o,w(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}return t}function w(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e){return function(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return x(t);if(e>=1)return v(t);var r,i=(r-1)*e,a=Math.floor(i),l=v(A(t,a).subarray(0,a+1));return l+(x(t.subarray(a+1))-l)*(i-a)}}(t,.5,e)}function D(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r+t(e)}function I(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function L(){return!this.__axis}function V(t,e){var n=[],r=null,i=null,a=6,l=6,o=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=t===M||t===E?-1:1,f=t===E||t===T?"x":"y",c=t===M||t===_?S:B;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):C:i,p=Math.max(a,0)+o,y=e.range(),m=+y[0]+u,v=+y[y.length-1]+u,x=(e.bandwidth?I:N)(e.copy(),u),A=h.selection?h.selection():h,w=A.selectAll(".domain").data([null]),b=A.selectAll(".tick").data(d,e).order(),D=b.exit(),k=b.enter().append("g").attr("class","tick"),S=b.select("line"),B=b.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(k),S=S.merge(k.append("line").attr("stroke","currentColor").attr(f+"2",s*a)),B=B.merge(k.append("text").attr("fill","currentColor").attr(f,s*p).attr("dy",t===M?"0em":t===_?"0.71em":"0.32em")),h!==A&&(w=w.transition(h),b=b.transition(h),S=S.transition(h),B=B.transition(h),D=D.transition(h).attr("opacity",F).attr("transform",(function(t){return isFinite(t=x(t))?c(t+u):this.getAttribute("transform")})),k.attr("opacity",F).attr("transform",(function(t){var e=this.parentNode.__axis;return c((e&&isFinite(e=e(t))?e:x(t))+u)}))),D.remove(),w.attr("d",t===E||t===T?l?"M"+s*l+","+m+"H"+u+"V"+v+"H"+s*l:"M"+u+","+m+"V"+v:l?"M"+m+","+s*l+"V"+u+"H"+v+"V"+s*l:"M"+m+","+u+"H"+v),b.attr("opacity",1).attr("transform",(function(t){return c(x(t)+u)})),S.attr(f+"2",s*a),B.attr(f,s*p).text(g),A.filter(L).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===T?"start":t===E?"end":"middle"),A.each((function(){this.__axis=x}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=l=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(l=+t,h):l},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(u=+t,h):u},h}function O(t){return V(_,t)}function P(t){return V(E,t)}var $={value:()=>{}};function Y(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),l=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l0)for(var n,r,i=new Array(n),a=0;a=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),X.hasOwnProperty(e)?{space:X[e],local:t}:t}function j(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===H&&e.documentElement.namespaceURI===H?e.createElement(t):e.createElementNS(n,t)}}function q(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function G(t){var e=W(t);return(e.local?q:j)(e)}function Q(){}function Z(t){return null==t?Q:function(){return this.querySelector(t)}}function K(){return[]}function J(t){return null==t?K:function(){return this.querySelectorAll(t)}}function tt(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function et(t){return function(){return this.matches(t)}}function nt(t){return function(e){return e.matches(t)}}var rt=Array.prototype.find;function it(){return this.firstElementChild}var at=Array.prototype.filter;function lt(){return Array.from(this.children)}function ot(t){return new Array(t.length)}function ut(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function st(t,e,n,r,i,a){for(var l,o=0,u=e.length,s=a.length;oe?1:t>=e?0:NaN}function gt(t){return function(){this.removeAttribute(t)}}function pt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function yt(t,e){return function(){this.setAttribute(t,e)}}function mt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function vt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function xt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function At(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function wt(t){return function(){this.style.removeProperty(t)}}function bt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function kt(t,e){return t.style.getPropertyValue(e)||At(t).getComputedStyle(t,null).getPropertyValue(e)}function Ct(t){return function(){delete this[t]}}function Mt(t,e){return function(){this[t]=e}}function Tt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function _t(t){return t.trim().split(/^|\s+/)}function Et(t){return t.classList||new Ft(t)}function Ft(t){this._node=t,this._names=_t(t.getAttribute("class")||"")}function St(t,e){for(var n=Et(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Jt=[null];function te(t,e){this._groups=t,this._parents=e}function ee(){return new te([[document.documentElement]],Jt)}function ne(t){return"string"==typeof t?new te([[document.querySelector(t)]],[document.documentElement]):new te([[t]],Jt)}function re(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ie(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ae(){}te.prototype=ee.prototype={constructor:te,select:function(t){"function"!=typeof t&&(t=Z(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=A&&(A=x+1);!(v=y[A])&&++A=0;)(r=i[a])&&(l&&4^r.compareDocumentPosition(l)&&l.parentNode.insertBefore(r,l),l=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=dt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?wt:"function"==typeof e?Dt:bt)(t,e,null==n?"":n)):kt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ct:"function"==typeof e?Tt:Mt)(t,e)):this.node()[t]},classed:function(t,e){var n=_t(t+"");if(arguments.length<2){for(var r=Et(this.node()),i=-1,a=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),l=a.length;if(!(arguments.length<2)){for(o=e?Gt:qt,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?De(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?De(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=he.exec(t))?new Me(e[1],e[2],e[3],1):(e=de.exec(t))?new Me(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ge.exec(t))?De(e[1],e[2],e[3],e[4]):(e=pe.exec(t))?De(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ye.exec(t))?Be(e[1],e[2]/100,e[3]/100,1):(e=me.exec(t))?Be(e[1],e[2]/100,e[3]/100,e[4]):ve.hasOwnProperty(t)?be(ve[t]):"transparent"===t?new Me(NaN,NaN,NaN,0):null}function be(t){return new Me(t>>16&255,t>>8&255,255&t,1)}function De(t,e,n,r){return r<=0&&(t=e=n=NaN),new Me(t,e,n,r)}function ke(t){return t instanceof ae||(t=we(t)),t?new Me((t=t.rgb()).r,t.g,t.b,t.opacity):new Me}function Ce(t,e,n,r){return 1===arguments.length?ke(t):new Me(t,e,n,null==r?1:r)}function Me(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Te(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}`}function _e(){const t=Ee(this.opacity);return`${1===t?"rgb(":"rgba("}${Fe(this.r)}, ${Fe(this.g)}, ${Fe(this.b)}${1===t?")":`, ${t})`}`}function Ee(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Fe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Se(t){return((t=Fe(t))<16?"0":"")+t.toString(16)}function Be(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ie(t,e,n,r)}function Ne(t){if(t instanceof Ie)return new Ie(t.h,t.s,t.l,t.opacity);if(t instanceof ae||(t=we(t)),!t)return new Ie;if(t instanceof Ie)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),l=NaN,o=a-i,u=(a+i)/2;return o?(l=e===a?(n-r)/o+6*(n0&&u<1?0:l,new Ie(l,o,u,t.opacity)}function Ie(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Le(t){return(t=(t||0)%360)<0?t+360:t}function Ve(t){return Math.max(0,Math.min(1,t||0))}function Oe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}re(ae,we,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xe,formatHex:xe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ne(this).formatHsl()},formatRgb:Ae,toString:Ae}),re(Me,Ce,ie(ae,{brighter(t){return t=null==t?oe:Math.pow(oe,t),new Me(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?le:Math.pow(le,t),new Me(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Me(Fe(this.r),Fe(this.g),Fe(this.b),Ee(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Te,formatHex:Te,formatHex8:function(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}${Se(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:_e,toString:_e})),re(Ie,(function(t,e,n,r){return 1===arguments.length?Ne(t):new Ie(t,e,n,null==r?1:r)}),ie(ae,{brighter(t){return t=null==t?oe:Math.pow(oe,t),new Ie(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?le:Math.pow(le,t),new Ie(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Me(Oe(t>=240?t-240:t+120,i,r),Oe(t,i,r),Oe(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ie(Le(this.h),Ve(this.s),Ve(this.l),Ee(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ee(this.opacity);return`${1===t?"hsl(":"hsla("}${Le(this.h)}, ${100*Ve(this.s)}%, ${100*Ve(this.l)}%${1===t?")":`, ${t})`}`}}));const Pe=Math.PI/180,$e=180/Math.PI,Ye=.96422,ze=1,Re=.82521,Ue=4/29,He=6/29,Xe=3*He*He,We=He*He*He;function je(t){if(t instanceof Ge)return new Ge(t.l,t.a,t.b,t.opacity);if(t instanceof tn)return en(t);t instanceof Me||(t=ke(t));var e,n,r=Je(t.r),i=Je(t.g),a=Je(t.b),l=Qe((.2225045*r+.7168786*i+.0606169*a)/ze);return r===i&&i===a?e=n=l:(e=Qe((.4360747*r+.3850649*i+.1430804*a)/Ye),n=Qe((.0139322*r+.0971045*i+.7141733*a)/Re)),new Ge(116*l-16,500*(e-l),200*(l-n),t.opacity)}function qe(t,e,n,r){return 1===arguments.length?je(t):new Ge(t,e,n,null==r?1:r)}function Ge(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Qe(t){return t>We?Math.pow(t,1/3):t/Xe+Ue}function Ze(t){return t>He?t*t*t:Xe*(t-Ue)}function Ke(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Je(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function en(t){if(isNaN(t.h))return new Ge(t.l,0,0,t.opacity);var e=t.h*Pe;return new Ge(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}re(Ge,qe,ie(ae,{brighter(t){return new Ge(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Ge(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Me(Ke(3.1338561*(e=Ye*Ze(e))-1.6168667*(t=ze*Ze(t))-.4906146*(n=Re*Ze(n))),Ke(-.9787684*e+1.9161415*t+.033454*n),Ke(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),re(tn,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof tn)return new tn(t.h,t.c,t.l,t.opacity);if(t instanceof Ge||(t=je(t)),0===t.a&&0===t.b)return new tn(NaN,0()=>t;function rn(t){return 1==(t=+t)?an:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):nn(isNaN(e)?n:e)}}function an(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):nn(isNaN(t)?e:t)}var ln=function t(e){var n=rn(e);function r(t,e){var r=n((t=Ce(t)).r,(e=Ce(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),l=an(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=l(e),t+""}}return r.gamma=t,r}(1);var on,un=(on=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],l=r>0?t[r-1]:2*i-a,o=ra&&(i=e.slice(a,i),o[l]?o[l]+=i:o[++l]=i),(n=n[0])===(r=r[0])?o[l]?o[l]+=r:o[++l]=r:(o[++l]=null,u.push({i:l,x:hn(n,r)})),a=pn.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:hn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,l.rotate,o,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:hn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,l.skewX,o,u),function(t,e,n,r,a,l){if(t!==n||e!==r){var o=a.push(i(a)+"scale(",null,",",null,")");l.push({i:o-4,x:hn(t,n)},{i:o-2,x:hn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,l.scaleX,l.scaleY,o,u),a=l=null,function(t){for(var e,n=-1,r=u.length;++n=0&&e._call.call(void 0,t),e=e._next;--En}()}finally{En=0,function(){var t,e,n=Tn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Tn=e);_n=t,Hn(r)}(),In=0}}function Un(){var t=Vn.now(),e=t-Nn;e>Bn&&(Ln-=e,Nn=t)}function Hn(t){En||(Fn&&(Fn=clearTimeout(Fn)),t-In>24?(t<1/0&&(Fn=setTimeout(Rn,t-Vn.now()-Ln)),Sn&&(Sn=clearInterval(Sn))):(Sn||(Nn=Vn.now(),Sn=setInterval(Un,Bn)),En=1,On(Rn)))}function Xn(t,e,n){var r=new Yn;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Yn.prototype=zn.prototype={constructor:Yn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Pn():+n)+(null==e?0:+e),this._next||_n===this||(_n?_n._next=this:Tn=this,_n=this),this._call=t,this._time=n,Hn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Hn())}};var Wn=Y("start","end","cancel","interrupt"),jn=[],qn=0,Gn=1,Qn=2,Zn=3,Kn=4,Jn=5,tr=6;function er(t,e,n,r,i,a){var l=t.__transition;if(l){if(n in l)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=Gn,n.timer.restart(l,n.delay,n.time),n.delay<=t&&l(t-n.delay)}function l(a){var s,f,c,h;if(n.state!==Gn)return u();for(s in i)if((h=i[s]).name===n.name){if(h.state===Zn)return Xn(l);h.state===Kn?(h.state=tr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+sqn)throw new Error("too late; already scheduled");return n}function rr(t,e){var n=ir(t,e);if(n.state>Zn)throw new Error("too late; already running");return n}function ir(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ar(t,e){var n,r;return function(){var i=rr(this,t),a=i.tween;if(a!==n)for(var l=0,o=(r=n=a).length;l=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?nr:rr;return function(){var l=a(this,t),o=l.on;o!==r&&(i=(r=o).copy()).on(e,n),l.on=i}}(n,t,e))},attr:function(t,e){var n=W(t),r="transform"===n?Cn:ur;return this.attrTween(t,"function"==typeof e?(n.local?gr:dr)(n,r,or(this,"attr."+t,e)):null==e?(n.local?fr:sr)(n):(n.local?hr:cr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=W(t);return this.tween(n,(r.local?pr:yr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?kn:ur;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=kt(this,t),l=(this.style.removeProperty(t),kt(this,t));return a===l?null:a===n&&l===r?i:i=e(n=a,r=l)}}(t,r)).on("end.style."+t,br(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var l=kt(this,t),o=n(this),u=o+"";return null==o&&(this.style.removeProperty(t),u=o=kt(this,t)),l===u?null:l===r&&u===i?a:(i=u,a=e(r=l,o))}}(t,r,or(this,"style."+t,e))).each(function(t,e){var n,r,i,a,l="style."+e,o="end."+l;return function(){var u=rr(this,t),s=u.on,f=null==u.value[l]?a||(a=br(e)):void 0;s===n&&i===f||(r=(n=s).copy()).on(o,i=f),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var l=kt(this,t);return l===a?null:l===r?i:i=e(r=l,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(or(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ir(this.node(),n).tween,a=0,l=i.length;aQn&&n.state=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Nr;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eSr)if(Math.abs(f*o-u*s)>Sr&&i){let h=n-a,d=r-l,g=o*o+u*u,p=h*h+d*d,y=Math.sqrt(g),m=Math.sqrt(c),v=i*Math.tan((Er-Math.acos((g+c-p)/(2*y*m)))/2),x=v/m,A=v/y;Math.abs(x-1)>Sr&&this._append`L${t+x*s},${e+x*f}`,this._append`A${i},${i},0,0,${+(f*h>s*d)},${this._x1=t+A*o},${this._y1=e+A*u}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(r),o=n*Math.sin(r),u=t+l,s=e+o,f=1^a,c=a?r-i:i-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>Sr||Math.abs(this._y1-s)>Sr)&&this._append`L${u},${s}`,n&&(c<0&&(c=c%Fr+Fr),c>Br?this._append`A${n},${n},0,1,${f},${t-l},${e-o}A${n},${n},0,1,${f},${this._x1=u},${this._y1=s}`:c>Sr&&this._append`A${n},${n},0,${+(c>=Er)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Lr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Vr(t){return(t=Lr(Math.abs(t)))?t[1]:NaN}var Or,Pr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $r(t){if(!(e=Pr.exec(t)))throw new Error("invalid format: "+t);var e;return new Yr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Yr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function zr(t,e){var n=Lr(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}$r.prototype=Yr.prototype,Yr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Rr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>zr(100*t,e),r:zr,s:function(t,e){var n=Lr(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Or=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,l=r.length;return a===l?r:a>l?r+new Array(a-l+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Lr(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ur(t){return t}var Hr,Xr,Wr,jr=Array.prototype.map,qr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gr(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ur:(e=jr.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],l=0,o=e[0],u=0;i>0&&o>0&&(u+o+1>r&&(o=Math.max(1,r-u)),a.push(t.substring(i-=o,i+o)),!((u+=o+1)>r));)o=e[l=(l+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?Ur:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(jr.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function c(t){var e=(t=$r(t)).fill,n=t.align,c=t.sign,h=t.symbol,d=t.zero,g=t.width,p=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(p=!0,v="g"):Rr[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",A="$"===h?a:/[%p]/.test(v)?u:"",w=Rr[v],b=/[defgprs%]/.test(v);function D(t){var i,a,u,h=x,D=A;if("c"===v)D=w(t)+D,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==c&&(k=!1),h=(k?"("===c?c:s:"-"===c||"("===c?"":c)+h,D=("s"===v?qr[8+Or/3]:"")+D+(k&&"("===c?")":""),b)for(i=-1,a=t.length;++i(u=t.charCodeAt(i))||u>57){D=(46===u?l+t.slice(i+1):t.slice(i))+D,t=t.slice(0,i);break}}p&&!d&&(t=r(t,1/0));var C=h.length+t.length+D.length,M=C>1)+h+t+D+M.slice(C);break;default:t=M+h+t+D}return o(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),D.toString=function(){return t+""},D}return{format:c,formatPrefix:function(t,e){var n=c(((t=$r(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Vr(e)/3))),i=Math.pow(10,-r),a=qr[8+r/3];return function(t){return n(i*t)+a}}}}function Qr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Hr=Gr({thousands:",",grouping:[3],currency:["$",""]}),Xr=Hr.format,Wr=Hr.formatPrefix;const Zr=Symbol("implicit");function Kr(){var t=new u,e=[],n=[],r=Zr;function i(i){let a=t.get(i);if(void 0===a){if(r!==Zr)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new u;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Kr(e,n).unknown(r)},Qr.apply(i,arguments),i}function Jr(t){return+t}var ti=[0,1];function ei(t){return t}function ni(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function ri(t,e,n){var r=t[0],i=t[1],a=e[0],l=e[1];return ie&&(n=t,t=e,e=n),s=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?ii:ri,i=a=null,c}function c(e){return null==e||isNaN(e=+e)?n:(i||(i=r(l.map(t),o,u)))(t(s(e)))}return c.invert=function(n){return s(e((a||(a=r(o,l.map(t),hn)))(n)))},c.domain=function(t){return arguments.length?(l=Array.from(t,Jr),f()):l.slice()},c.range=function(t){return arguments.length?(o=Array.from(t),f()):o.slice()},c.rangeRound=function(t){return o=Array.from(t),u=vn,f()},c.clamp=function(t){return arguments.length?(s=!!t||ei,f()):s!==ei},c.interpolate=function(t){return arguments.length?(u=t,f()):u},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,r){return t=n,e=r,f()}}function oi(){return li()(ei,ei)}function ui(t,e,n,r){var i,a=m(t,e,n);switch((r=$r(null==r?",f":r)).type){case"s":var l=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Vr(e)/3)))-Vr(Math.abs(t)))}(a,l))||(r.precision=i),Wr(r,l);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Vr(e)-Vr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Vr(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Xr(r)}function si(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e=i))return[];const o=a-i+1,u=new Array(o);if(r)if(l<0)for(let t=0;t0;){if((i=y(u,s,n))===r)return a[l]=u,a[o]=s,e(a);if(i>0)u=Math.floor(u/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function fi(){var t=oi();return t.copy=function(){return ai(t,fi())},Qr.apply(t,arguments),si(t)}const ci=new Date,hi=new Date;function di(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n0))return l;let o;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(odi((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(ci.setTime(+e),hi.setTime(+r),t(ci),t(hi),Math.floor(n(ci,hi))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const gi=di((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));gi.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?di((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):gi:null),gi.range;const pi=1e3,yi=6e4,mi=36e5,vi=864e5,xi=6048e5,Ai=2592e6,wi=31536e6,bi=di((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*pi)}),((t,e)=>(e-t)/pi),(t=>t.getUTCSeconds()));bi.range;const Di=di((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pi)}),((t,e)=>{t.setTime(+t+e*yi)}),((t,e)=>(e-t)/yi),(t=>t.getMinutes()));Di.range;const ki=di((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*yi)}),((t,e)=>(e-t)/yi),(t=>t.getUTCMinutes()));ki.range;const Ci=di((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pi-t.getMinutes()*yi)}),((t,e)=>{t.setTime(+t+e*mi)}),((t,e)=>(e-t)/mi),(t=>t.getHours()));Ci.range;const Mi=di((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*mi)}),((t,e)=>(e-t)/mi),(t=>t.getUTCHours()));Mi.range;const Ti=di((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yi)/vi),(t=>t.getDate()-1));Ti.range;const _i=di((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/vi),(t=>t.getUTCDate()-1));_i.range;const Ei=di((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/vi),(t=>Math.floor(t/vi)));function Fi(t){return di((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yi)/xi))}Ei.range;const Si=Fi(0),Bi=Fi(1),Ni=Fi(2),Ii=Fi(3),Li=Fi(4),Vi=Fi(5),Oi=Fi(6);function Pi(t){return di((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/xi))}Si.range,Bi.range,Ni.range,Ii.range,Li.range,Vi.range,Oi.range;const $i=Pi(0),Yi=Pi(1),zi=Pi(2),Ri=Pi(3),Ui=Pi(4),Hi=Pi(5),Xi=Pi(6);$i.range,Yi.range,zi.range,Ri.range,Ui.range,Hi.range,Xi.range;const Wi=di((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Wi.range;const ji=di((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));ji.range;const qi=di((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));qi.every=t=>isFinite(t=Math.floor(t))&&t>0?di((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,qi.range;const Gi=di((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));Gi.every=t=>isFinite(t=Math.floor(t))&&t>0?di((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,Gi.range;const[Qi,Zi]=function(t,e,n,r,a,l){const o=[[bi,1,pi],[bi,5,5e3],[bi,15,15e3],[bi,30,3e4],[l,1,yi],[l,5,3e5],[l,15,9e5],[l,30,18e5],[a,1,mi],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,vi],[r,2,1728e5],[n,1,xi],[e,1,Ai],[e,3,7776e6],[t,1,wi]];function u(e,n,r){const a=Math.abs(n-e)/r,l=i((([,,t])=>t)).right(o,a);if(l===o.length)return t.every(m(e/wi,n/wi,r));if(0===l)return gi.every(Math.max(m(e,n,r),1));const[u,s]=o[a/o[l-1][2][t.toLowerCase(),e])))}function ca(t,e,n){var r=ia.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=ia.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function da(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ga(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ya(t,e,n){var r=ia.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ma(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function va(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function xa(t,e,n){var r=ia.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Aa(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function wa(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ba(t,e,n){var r=ia.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Da(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ka(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ca(t,e,n){var r=ia.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=ia.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ta(t,e,n){var r=ia.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _a(t,e,n){var r=aa.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ea(t,e,n){var r=ia.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Fa(t,e,n){var r=ia.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Sa(t,e){return oa(t.getDate(),e,2)}function Ba(t,e){return oa(t.getHours(),e,2)}function Na(t,e){return oa(t.getHours()%12||12,e,2)}function Ia(t,e){return oa(1+Ti.count(qi(t),t),e,3)}function La(t,e){return oa(t.getMilliseconds(),e,3)}function Va(t,e){return La(t,e)+"000"}function Oa(t,e){return oa(t.getMonth()+1,e,2)}function Pa(t,e){return oa(t.getMinutes(),e,2)}function $a(t,e){return oa(t.getSeconds(),e,2)}function Ya(t){var e=t.getDay();return 0===e?7:e}function za(t,e){return oa(Si.count(qi(t)-1,t),e,2)}function Ra(t){var e=t.getDay();return e>=4||0===e?Li(t):Li.ceil(t)}function Ua(t,e){return t=Ra(t),oa(Li.count(qi(t),t)+(4===qi(t).getDay()),e,2)}function Ha(t){return t.getDay()}function Xa(t,e){return oa(Bi.count(qi(t)-1,t),e,2)}function Wa(t,e){return oa(t.getFullYear()%100,e,2)}function ja(t,e){return oa((t=Ra(t)).getFullYear()%100,e,2)}function qa(t,e){return oa(t.getFullYear()%1e4,e,4)}function Ga(t,e){var n=t.getDay();return oa((t=n>=4||0===n?Li(t):Li.ceil(t)).getFullYear()%1e4,e,4)}function Qa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+oa(e/60|0,"0",2)+oa(e%60,"0",2)}function Za(t,e){return oa(t.getUTCDate(),e,2)}function Ka(t,e){return oa(t.getUTCHours(),e,2)}function Ja(t,e){return oa(t.getUTCHours()%12||12,e,2)}function tl(t,e){return oa(1+_i.count(Gi(t),t),e,3)}function el(t,e){return oa(t.getUTCMilliseconds(),e,3)}function nl(t,e){return el(t,e)+"000"}function rl(t,e){return oa(t.getUTCMonth()+1,e,2)}function il(t,e){return oa(t.getUTCMinutes(),e,2)}function al(t,e){return oa(t.getUTCSeconds(),e,2)}function ll(t){var e=t.getUTCDay();return 0===e?7:e}function ol(t,e){return oa($i.count(Gi(t)-1,t),e,2)}function ul(t){var e=t.getUTCDay();return e>=4||0===e?Ui(t):Ui.ceil(t)}function sl(t,e){return t=ul(t),oa(Ui.count(Gi(t),t)+(4===Gi(t).getUTCDay()),e,2)}function fl(t){return t.getUTCDay()}function cl(t,e){return oa(Yi.count(Gi(t)-1,t),e,2)}function hl(t,e){return oa(t.getUTCFullYear()%100,e,2)}function dl(t,e){return oa((t=ul(t)).getUTCFullYear()%100,e,2)}function gl(t,e){return oa(t.getUTCFullYear()%1e4,e,4)}function pl(t,e){var n=t.getUTCDay();return oa((t=n>=4||0===n?Ui(t):Ui.ceil(t)).getUTCFullYear()%1e4,e,4)}function yl(){return"+0000"}function ml(){return"%"}function vl(t){return+t}function xl(t){return Math.floor(+t/1e3)}function Al(t){return new Date(t)}function wl(t){return t instanceof Date?+t:+new Date(+t)}function bl(t,e,n,r,i,a,l,o,u,s){var f=oi(),c=f.invert,h=f.domain,d=s(".%L"),g=s(":%S"),p=s("%I:%M"),y=s("%I %p"),m=s("%a %d"),v=s("%b %d"),x=s("%B"),A=s("%Y");function w(t){return(u(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:vl,s:xl,S:$a,u:Ya,U:za,V:Ua,w:Ha,W:Xa,x:null,X:null,y:Wa,Y:qa,Z:Qa,"%":ml},A={a:function(t){return l[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:Za,e:Za,f:nl,g:dl,G:pl,H:Ka,I:Ja,j:tl,L:el,m:rl,M:il,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:vl,s:xl,S:al,u:ll,U:ol,V:sl,w:fl,W:cl,x:null,X:null,y:hl,Y:gl,Z:yl,"%":ml},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:wa,e:wa,f:Ta,g:ma,G:ya,H:Da,I:Da,j:ba,L:Ma,m:Aa,M:ka,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:xa,Q:Ea,s:Fa,S:Ca,u:ha,U:da,V:ga,w:ca,W:pa,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:ma,Y:ya,Z:va,"%":_a};function b(t,e){return function(n){var r,i,a,l=[],o=-1,u=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++o53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Ji(ta(a.y,0,1))).getUTCDay(),r=i>4||0===i?Yi.ceil(r):Yi(r),r=_i.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Ki(ta(a.y,0,1))).getDay(),r=i>4||0===i?Bi.ceil(r):Bi(r),r=Ti.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Ji(ta(a.y,0,1)).getUTCDay():Ki(ta(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Ji(a)):Ki(a)}}function k(t,e,n,r){for(var i,a,l=0,o=e.length,u=n.length;l=u)return-1;if(37===(i=e.charCodeAt(l++))){if(i=e.charAt(l++),!(a=w[i in ra?e.charAt(l++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=b(n,x),x.X=b(r,x),x.c=b(e,x),A.x=b(n,A),A.X=b(r,A),A.c=b(e,A),{format:function(t){var e=b(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=D(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=b(t+="",A);return e.toString=function(){return t},e},utcParse:function(t){var e=D(t+="",!0);return e.toString=function(){return t},e}}}(t),na=ea.format,ea.parse,ea.utcFormat,ea.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var kl=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map((function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r{un(t[t.length-1])})(kl);const Ml=Math.abs,Tl=Math.atan2,_l=Math.cos,El=Math.max,Fl=Math.min,Sl=Math.sin,Bl=Math.sqrt,Nl=1e-12,Il=Math.PI,Ll=Il/2,Vl=2*Il;function Ol(t){return t>=1?Ll:t<=-1?-Ll:Math.asin(t)}function Pl(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Ir(e)}function $l(t){return t.innerRadius}function Yl(t){return t.outerRadius}function zl(t){return t.startAngle}function Rl(t){return t.endAngle}function Ul(t){return t&&t.padAngle}function Hl(t,e,n,r,i,a,l){var o=t-n,u=e-r,s=(l?a:-a)/Bl(o*o+u*u),f=s*u,c=-s*o,h=t+f,d=e+c,g=n+f,p=r+c,y=(h+g)/2,m=(d+p)/2,v=g-h,x=p-d,A=v*v+x*x,w=i-a,b=h*p-g*d,D=(x<0?-1:1)*Bl(El(0,w*w*A-b*b)),k=(b*x-v*D)/A,C=(-b*v-x*D)/A,M=(b*x+v*D)/A,T=(-b*v+x*D)/A,_=k-y,E=C-m,F=M-y,S=T-m;return _*_+E*E>F*F+S*S&&(k=M,C=T),{cx:k,cy:C,x01:-f,y01:-c,x11:k*(i/w-1),y11:C*(i/w-1)}}function Xl(){var t=$l,e=Yl,n=Cl(0),r=null,i=zl,a=Rl,l=Ul,o=null,u=Pl(s);function s(){var s,f,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Ll,g=a.apply(this,arguments)-Ll,p=Ml(g-d),y=g>d;if(o||(o=s=u()),hNl)if(p>Vl-Nl)o.moveTo(h*_l(d),h*Sl(d)),o.arc(0,0,h,d,g,!y),c>Nl&&(o.moveTo(c*_l(g),c*Sl(g)),o.arc(0,0,c,g,d,y));else{var m,v,x=d,A=g,w=d,b=g,D=p,k=p,C=l.apply(this,arguments)/2,M=C>Nl&&(r?+r.apply(this,arguments):Bl(c*c+h*h)),T=Fl(Ml(h-c)/2,+n.apply(this,arguments)),_=T,E=T;if(M>Nl){var F=Ol(M/c*Sl(C)),S=Ol(M/h*Sl(C));(D-=2*F)>Nl?(w+=F*=y?1:-1,b-=F):(D=0,w=b=(d+g)/2),(k-=2*S)>Nl?(x+=S*=y?1:-1,A-=S):(k=0,x=A=(d+g)/2)}var B=h*_l(x),N=h*Sl(x),I=c*_l(b),L=c*Sl(b);if(T>Nl){var V,O=h*_l(A),P=h*Sl(A),$=c*_l(w),Y=c*Sl(w);if(p1?0:t<-1?Il:Math.acos(t)}((z*U+R*H)/(Bl(z*z+R*R)*Bl(U*U+H*H)))/2),W=Bl(V[0]*V[0]+V[1]*V[1]);_=Fl(T,(c-W)/(X-1)),E=Fl(T,(h-W)/(X+1))}else _=E=0}k>Nl?E>Nl?(m=Hl($,Y,B,N,h,E,y),v=Hl(O,P,I,L,h,E,y),o.moveTo(m.cx+m.x01,m.cy+m.y01),ENl&&D>Nl?_>Nl?(m=Hl(I,L,O,P,c,-_,y),v=Hl(B,N,$,Y,c,-_,y),o.lineTo(m.cx+m.x01,m.cy+m.y01),_t?1:e>=t?0:NaN}function Kl(t){return t}function Jl(t,e,n){this.k=t,this.x=e,this.y=n}var to,eo,no;jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Jl.prototype={constructor:Jl,scale:function(t){return 1===t?this:new Jl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Jl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Jl.prototype,function(t){t[t.Tag=0]="Tag",t[t.Frontmatter=1]="Frontmatter",t[t.Wiki=2]="Wiki",t[t.WikiLink=3]="WikiLink",t[t.WikiDisplay=4]="WikiDisplay",t[t.Text=5]="Text",t[t.dvField=6]="dvField",t[t.Table=7]="Table",t[t.FileMeta=8]="FileMeta",t[t.Task=9]="Task",t[t.TaskDone=10]="TaskDone",t[t.TaskNotDone=11]="TaskNotDone"}(to||(to={})),function(t){t[t.Line=0]="Line",t[t.Bar=1]="Bar",t[t.Pie=2]="Pie",t[t.Radar=3]="Radar",t[t.Summary=4]="Summary",t[t.Table=5]="Table",t[t.Month=6]="Month",t[t.Heatmap=7]="Heatmap",t[t.Bullet=8]="Bullet",t[t.Unknown=9]="Unknown"}(eo||(eo={})),function(t){t[t.Number=0]="Number",t[t.Int=1]="Int",t[t.Date=2]="Date",t[t.Time=3]="Time",t[t.DateTime=4]="DateTime",t[t.String=5]="String"}(no||(no={}));class ro{constructor(t,e){this.date=t,this.value=e}}class io{constructor(t,e,n){if(this.type=e,this.target=n,this.separator="",this.id=t,this.accessor=-1,this.accessor1=-1,this.accessor2=-1,this.valueType=no.Number,this.usedAsXDataset=!1,this.numTargets=0,e===to.Table){let t,e=new RegExp("\\[(?[0-9]+)\\]\\[(?[0-9]+)\\](\\[(?[0-9]+)\\])?","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);if(Number.isNumber(r)&&void 0!==t.groups.accessor1){let i=parseFloat(t.groups.accessor1);if(Number.isNumber(i)){let a;void 0!==t.groups.accessor2&&(a=parseFloat(t.groups.accessor2)),this.accessor=r,this.accessor1=i,Number.isNumber(a)&&(this.accessor2=a),this.parentTarget=n.replace(e,"")}break}}}else{let t,e=new RegExp("\\[(?[0-9]+)\\]","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);Number.isNumber(r)&&(this.accessor=r,this.parentTarget=n.replace(e,""));break}}}equalTo(t){return this.type===t.type&&this.target===t.target}getType(){return this.type}getTarget(){return this.target}getParentTarget(){return this.parentTarget}getId(){return this.id}getAccessor(t=0){switch(t){case 0:return this.accessor;case 1:return this.accessor1;case 2:return this.accessor2}return null}setSeparator(t){this.separator=t}getSeparator(t=!1){return""===this.separator?t?",":"/":this.separator}addNumTargets(t=1){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}}class ao{constructor(t,e){this.currentIndex=0,this.name="untitled",this.query=e,this.values=[],this.parent=t,this.id=-1,this.yMin=null,this.yMax=null,this.startDate=null,this.endDate=null,this.numTargets=0,this.lineInfo=null,this.barInfo=null,this.isTmpDataset=!1,this.valueType=null==e?void 0:e.valueType;for(let e=0;e=0&&n=0&&nthis.yMax)&&(this.yMax=e),(null===this.startDate||tthis.endDate)&&(this.endDate=t.clone()))}recalculateMinMax(){this.yMin=Math.min(...this.values),this.yMax=Math.max(...this.values)}getYMin(){return this.yMin}getYMax(){return this.yMax}getStartDate(){return this.startDate}getEndDate(){return this.endDate}shift(t,e){let n=!1;for(let r=0;r=e)&&(this.values[r]=this.values[r]+t,n=!0);n&&(this.yMin=this.yMin+t,this.yMax=this.yMax+t)}setPenalty(t){for(let e=0;ethis.yMax&&(this.yMax=t))}getQuery(){return this.query}accumulateValues(){let t=0;for(let e=0;ethis.yMax&&(this.yMax=t)}getValues(){return this.values}getLength(){return this.values.length}getLengthNotNull(){let t=0;for(let e=0;e[\d\.\/-]+)\s*,\s*(?[\d\.\/-]+)\s*\)/).groups;e&&(this.translateX=parseFloat(e.x),this.translateY=parseFloat(e.y))}}}class bo{constructor(t,e){this.filePath=t,this.tableIndex=e,this.xDataset=null,this.yDatasets=[]}}class Do{constructor(){this.fileTotal=0,this.fileAvailable=0,this.fileOutOfDateRange=0,this.fileNotInFormat=0,this.errorMessage="",this.minDate=window.moment(""),this.maxDate=window.moment(""),this.gotAnyValidXValue=!1,this.gotAnyValidYValue=!1}}const ko=function(){const t=["HH","H","hh","h"],e=["mm","m"],n=["ss","s",""];let r=[];for(let i of t)for(let t of e)for(let e of n){let n=`${i}:${t}`;""!==e&&(n+=`:${e}`),i.contains("h")&&(n+=" a"),r.push(n)}return r}();function Co(t,e,n){if(!e&&!n)return t;let r=t;if(r.startsWith("^")&&(r=r.slice(1)),e){let t=new RegExp("^("+e+")","gm");t.test(r)&&(r=r.replace(t,""))}if(n){let t=new RegExp("("+n+")$","gm");t.test(r)&&(r=r.replace(t,""))}return r}function Mo(t,e){let n=e;t.length>4&&t.startsWith("[[")&&t.endsWith("]]")&&(t=t.substring(2,t.length-2)),"iso-8601"===e.toLowerCase()&&(n=window.moment.ISO_8601);let r=window.moment(t,n,!0);return r=r.startOf("day"),r}function To(t,e,n=!0){if(!t||!e||0===e.length)return[null,t];let r=null;const i="^(?[0-9]+)("+e.join("|")+")$",a=new RegExp(i,"gm");let l=a.exec(t);return l&&void 0!==l.groups&&void 0!==l.groups.value&&(r=parseFloat(l.groups.value),Number.isNumber(r)&&!Number.isNaN(r))?(n&&(t=t.replace(a,"")),[r,t]):[null,t]}function _o(t){if(!t)return null;let e=window.moment.duration(0),n=!1,r=!1;t.startsWith("+")&&(r=!1,t=t.substring(1)),t.startsWith("-")&&(r=!0,t=t.substring(1));let i=null;[i,t]=To(t,["year","years","Y","y"]),null!==i&&(r&&(i*=-1),e.add(i,"years"),n=!0);let a=null;[a,t]=To(t,["month","months","M"]),null!==a&&(r&&(a*=-1),e.add(a,"months"),n=!0);let l=null;[l,t]=To(t,["week","weeks","W","w"]),null!==l&&(r&&(l*=-1),e.add(l,"weeks"),n=!0);let o=null;[o,t]=To(t,["day","days","D","d"]),null!==o&&(r&&(o*=-1),e.add(o,"days"),n=!0);let u=null;[u,t]=To(t,["hour","hours","H","h"]),null!==u&&(r&&(u*=-1),e.add(u,"hours"),n=!0);let s=null;[s,t]=To(t,["minute","minutes","m"]),null!==s&&(r&&(s*=-1),e.add(s,"minutes"),n=!0);let f=null;return[f,t]=To(t,["second","seconds","S","s"]),null!==f&&(r&&(f*=-1),e.add(f,"seconds"),n=!0),n?e:null}function Eo(t,e){let n=null,r=_o(t);return r&&window.moment.isDuration(r)&&(n=Bo(e),n=n.add(r),n&&n.isValid()),n}function Fo(t,e){return null==t?null:"iso-8601"===e.toLowerCase()?t.format():t.format(e)}function So(t,e){return Mo(Fo(window.moment(t),e),e)}function Bo(t){return Mo(Fo(window.moment(),t),t)}function No(t,e){for(var n=(e=e.replace(/^\./,"")).split("."),r=0,i=n.length;rt!==e)),i=n.reverse().findIndex((t=>t!==e));return-1===r&&-1===i?t:t.substring(r,t.length-i)}function Lo(t){if(null===t)return null;let e=new RegExp(']*?alt\\s*=\\s*[""\']?(?[^\'"" >]+?)[ \'""][^>]*?>',"g");return t.replace(e,((...t)=>{let e=t[t.length-1];return e&&e.emoji?e.emoji.trim():""}))}function Vo(t,e=null){let n=null,r=no.Number;if("string"==typeof t)if(t.includes(":")){let e=!1;t.startsWith("-")&&(e=!0,t=t.substring(1));let i=window.moment(t,ko,!0);i.isValid()&&(n=i.diff(window.moment("00:00","HH:mm",!0),"seconds"),e&&(n*=-1),r=no.Time)}else if(e){const r=Object.keys(e);for(let n of r)if("string"==typeof n){let r=new RegExp(n,"gm");if(r.test(t)&&Number.isNumber(e[n])){let i=e[n].toString();t=t.replace(r,i);break}}n=parseFloat(t),Number.isNaN(n)&&(n=null)}else n=parseFloat(t),Number.isNaN(n)&&(n=null);else"number"==typeof t&&(n=t);return{type:r,value:n}}function Oo(t,e="",n=""){var r=ne("body").append("svg");let i=r.append("text").text(t).attr("x",-99999).attr("y",-99999);e&&i.attr("class",e),n&&i.attr("transform","rotate("+n+")");var a=r.node().getBBox();return r.remove(),{width:a.width,height:a.height}}function Po(t,e,n){let r=(0|parseFloat(t.attr("width")))+e,i=(0|parseFloat(t.attr("height")))+n;t.attr("width",r),t.attr("height",i)}function $o(t,e,n){let r=new wo(t.attr("transform"));t.attr("transform","translate("+(r.translateX+e)+","+(r.translateY+n)+")")}function Yo(t){return t=(t=(t=t.replace(/(^\\s\*)|(\\s\*$)/gi,"")).replace(/\[ \]{2,}/gi," ")).replace(/\\n /,"\\n")}class zo{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+zo.version}static addUnaryOp(t){return zo.max_unop_len=Math.max(t.length,zo.max_unop_len),zo.unary_ops[t]=1,zo}static addBinaryOp(t,e,n){return zo.max_binop_len=Math.max(t.length,zo.max_binop_len),zo.binary_ops[t]=e,n?zo.right_associative.add(t):zo.right_associative.delete(t),zo}static addIdentifierChar(t){return zo.additional_identifier_chars.add(t),zo}static addLiteral(t,e){return zo.literals[t]=e,zo}static removeUnaryOp(t){return delete zo.unary_ops[t],t.length===zo.max_unop_len&&(zo.max_unop_len=zo.getMaxKeyLen(zo.unary_ops)),zo}static removeAllUnaryOps(){return zo.unary_ops={},zo.max_unop_len=0,zo}static removeIdentifierChar(t){return zo.additional_identifier_chars.delete(t),zo}static removeBinaryOp(t){return delete zo.binary_ops[t],t.length===zo.max_binop_len&&(zo.max_binop_len=zo.getMaxKeyLen(zo.binary_ops)),zo.right_associative.delete(t),zo}static removeAllBinaryOps(){return zo.binary_ops={},zo.max_binop_len=0,zo}static removeLiteral(t){return delete zo.literals[t],zo}static removeAllLiterals(){return zo.literals={},zo}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new zo(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map((t=>t.length)))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return zo.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!zo.binary_ops[String.fromCharCode(t)]||zo.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return zo.isIdentifierStart(t)||zo.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(zo.hooks[t]){const n={context:this,node:e};return zo.hooks.run(t,n),n.node}return e}searchHook(t){if(zo.hooks[t]){const e={context:this};return zo.hooks[t].find((function(t){return t.call(e.context,e),e.node})),e.node}}gobbleSpaces(){let t=this.code;for(;t===zo.SPACE_CODE||t===zo.TAB_CODE||t===zo.LF_CODE||t===zo.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:zo.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,n,r=[];for(;this.index0;){if(zo.binary_ops.hasOwnProperty(t)&&(!zo.isIdentifierStart(this.code)||this.index+t.lengthi.right_a&&t.right_a?n>t.prec:n<=t.prec;for(;r.length>2&&o(r[r.length-2]);)l=r.pop(),e=r.pop().value,a=r.pop(),t={type:zo.BINARY_EXP,operator:e,left:a,right:l},r.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),r.push(i,t)}for(o=r.length-1,t=r[o];o>1;)t={type:zo.BINARY_EXP,operator:r[o-1].value,left:r[o-2],right:t},o-=2;return t}gobbleToken(){let t,e,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(t=this.code,zo.isDecimalDigit(t)||t===zo.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===zo.SQUOTE_CODE||t===zo.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(t===zo.OBRACK_CODE)r=this.gobbleArray();else{for(e=this.expr.substr(this.index,zo.max_unop_len),n=e.length;n>0;){if(zo.unary_ops.hasOwnProperty(e)&&(!zo.isIdentifierStart(this.code)||this.index+e.length=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===zo.COMMA_CODE){if(this.index++,r++,r!==e.length)if(t===zo.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===zo.CBRACK_CODE)for(let t=e.length;t{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)}))}}(zo),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),zo.max_unop_len=zo.getMaxKeyLen(zo.unary_ops),zo.max_binop_len=zo.getMaxKeyLen(zo.binary_ops);const Uo=t=>new zo(t).parse();Object.getOwnPropertyNames(zo).forEach((t=>{void 0===Uo[t]&&"prototype"!==t&&(Uo[t]=zo[t])})),Uo.Jsep=zo;var Ho={name:"ternary",init(t){t.hooks.add("after-expression",(function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:i},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}}))}};Uo.plugins.register(Ho);var Xo,Wo={};function jo(t){if("number"==typeof t){if(0===t)return!1}else if(t instanceof ao&&t.getValues().some((function(t){return 0===t})))return!1;return!0}Xo=Wo,function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(n){return function(n,r){var i,a,l,o,u,s,f,c,h,d=1,g=n.length,p="";for(a=0;a=0),o.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case"e":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case"f":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case"g":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(o.type)?p+=i:(!t.number.test(o.type)||c&&!o.sign?h="":(h=c?"+":"-",i=i.toString().replace(t.sign,"")),s=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",f=o.width-(h+i).length,u=o.width&&f>0?s.repeat(f):"",p+=o.align?h+i+u:"0"===s?h+u+i:u+h+i)}return p}(function(e){if(r[e])return r[e];for(var n,i=e,a=[],l=0;i;){if(null!==(n=t.text.exec(i)))a.push(n[0]);else if(null!==(n=t.modulo.exec(i)))a.push("%");else{if(null===(n=t.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){l|=1;var o=[],u=n[2],s=[];if(null===(s=t.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(s[1]);""!==(u=u.substring(s[0].length));)if(null!==(s=t.key_access.exec(u)))o.push(s[1]);else{if(null===(s=t.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(s[1])}n[2]=o}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}i=i.substring(n[0].length)}return r[e]=a}(n),arguments)}function n(t,n){return e.apply(null,[t].concat(n||[]))}var r=Object.create(null);Xo.sprintf=e,Xo.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}();const qo={min:function(t,e){return x(t.getValues())},minDate:function(t,e){let n=x(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: min not found"},max:function(t,e){return v(t.getValues())},maxDate:function(t,e){let n=v(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: max not found"},startDate:function(t,e){if(t){let e=t.getStartDate();if(e&&e.isValid())return e}return e.startDate},endDate:function(t,e){if(t){let e=t.getEndDate();if(e&&e.isValid())return e}return e.endDate},sum:function(t,e){return k(t.getValues())},count:function(t,e){return"Error: deprecated function 'count'"},numTargets:function(t,e){return t.getNumTargets()},days:function(t,e){return"Error: deprecated function 'days'"},numDays:function(t,e){return t.getLength()},numDaysHavingData:function(t,e){return t.getLengthNotNull()},maxStreak:function(t,e){let n=0,r=0;for(let e of t)null!==e.value?n++:n=0,n>=r&&(r=n);return r},maxStreakStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)null!==e.value?(0===n&&(i=e.date),n++):n=0,n>=r&&(r=n,a=i);return a},maxStreakEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},maxBreaks:function(t,e){let n=0,r=0;for(let e of t)null===e.value?n++:n=0,n>r&&(r=n);return r},maxBreaksStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)null===e.value?(0===n&&(i=e.date),n++):n=0,n>=r&&(r=n,a=i);return a},maxBreaksEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},lastStreak:function(t,e){return"Error: deprecated function 'lastStreak'"},currentStreak:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(null===e[t].value)break;n++}}return n},currentStreakStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(null===i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},currentBreaks:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(null!==e[t].value)break;n++}}return n},currentBreaksStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(null!==i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},average:function(t,e){let n=t.getLengthNotNull();return jo(n)?k(t.getValues())/n:"Error: divide by zero in expression"},median:function(t,e){return b(t.getValues())},variance:function(t,e){return function(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let l=-1;for(let o of t)null!=(o=e(o,++l,t))&&(o=+o)>=o&&(n=o-i,i+=n/++r,a+=n*(o-i))}if(r>1)return a/(r-1)}(t.getValues())}},Go={"-":function(t){if("number"==typeof t)return-1*t;if(t instanceof ao){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){null!==n[e]&&(n[e]=-1*t)})),e.recalculateMinMax(),e}return"Error: unknown operation for '-'"},"+":function(t){if("number"==typeof t)return t;if(t instanceof ao){return t.cloneToTmpDataset()}return"Error: unknown operation for '+'"}},Qo={"+":function(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("number"==typeof t&&e instanceof ao){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&e instanceof ao){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '+'"},"-":function(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("number"==typeof t&&e instanceof ao){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n}if(t instanceof ao&&e instanceof ao){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '-'"},"*":function(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;if("number"==typeof t&&e instanceof ao){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&e instanceof ao){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '*'"},"/":function(t,e){if(!jo(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t/e;if("number"==typeof t&&e instanceof ao){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&e instanceof ao){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '/'"},"%":function(t,e){if(!jo(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t%e;if("number"==typeof t&&e instanceof ao){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof ao&&e instanceof ao){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '%'"}},Zo={normalize:function(t,e,n){let r=t.getYMin(),i=t.getYMax();if(null!==r&&null!==i&&i>r){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){n[e]=(t-r)/(i-r)})),e.recalculateMinMax(),e}return"Error: invalid data range for function 'normalize'"},setMissingValues:function(t,e,n){if(e&&e.length>0){let n=e[0],r=t.cloneToTmpDataset();return Number.isNumber(n)&&!Number.isNaN(n)?(r.getValues().forEach((function(t,e,r){null===t&&(r[e]=n)})),r.recalculateMinMax(),r):"Error: invalid arguments for function 'setMissingValues'"}return"Error: invalid arguments for function 'setMissingValues"}};function Ko(t,e){switch(t.type){case"Literal":return t.value;case"Identifier":let n=t.name;return n in qo||n in Zo?`Error: deprecated template variable '${n}', use '${n}()' instead`:`Error: unknown function name '${n}'`;case"UnaryExpression":let r=t,i=Ko(r.argument,e);return"string"==typeof i?i:Go[r.operator](i);case"BinaryExpression":let a=t,l=Ko(a.left,e),o=Ko(a.right,e),u=function(t,e){return"string"==typeof t?t:"string"==typeof e?e:"number"==typeof t||window.moment.isMoment(t)||t instanceof ao?"number"==typeof e||window.moment.isMoment(e)||e instanceof ao?"":"Error: invalide operant type":"Error: invalid operant type"}(l,o);return"string"==typeof u&&u.startsWith("Error:")?u:Qo[a.operator](l,o);case"CallExpression":let s=t,f=s.callee.name,c=function(t,e){return t.map((function(t){return Ko(t,e)}))}(s.arguments,e);if("string"==typeof c)return c;if("dataset"===f){if(1===c.length){let t=c[0];if("string"==typeof t)return t;if("number"!=typeof t)return"Error: function 'dataset' only accepts id in number";let n=function(t,e){return e.datasets.getDatasetById(t)}(t,e);return n||`Error: no dataset found for id '${t}'`}}else{if(f in qo){if(0===c.length){let t=null;for(let n of e.datasets)t||n.getQuery().usedAsXDataset||(t=n);return t?qo[f](t,e):`No available dataset found for function ${f}`}if(1===c.length){let t=c[0];return"string"==typeof t?t:t instanceof ao?qo[f](t,e):`Error: function '${f}' only accepts Dataset`}return`Error: Too many arguments for function ${f}`}if(f in Zo){if(1===c.length){if("string"==typeof c[0])return c[0];if(c[0]instanceof ao){let t=c[0];return Zo[f](t,null,e)}return`Error: function ${f} only accept Dataset`}if(c.length>1){if("string"==typeof c[0])return c[0];if(c[0]instanceof ao){let t=c[0];return Zo[f](t,c.filter((function(t,e,n){return e>0})),e)}return`Error: function ${f} only accept Dataset`}return`Error: Too many arguments for function ${f}`}}return`Error: unknown function name '${f}'`}return"Error: unknown expression"}function Jo(t,e){let n,r=[],i=new RegExp("{{(?[\\w+\\-*\\/0-9\\s()\\[\\]%.,]+)(::(?[\\w+\\-*\\/0-9\\s()\\[\\]%.:]+))?}}","gm");for(;n=i.exec(t);){let t=n[0];if(!r.some((e=>e.source===t))&&(void 0!==n.groups&&void 0!==n.groups.expr)){let i=n.groups.expr,a=null;try{a=Uo(i)}catch(t){return"Error:"+t.message}if(!a)return"Error: failed to parse expression";const l=Ko(a,e);if("string"==typeof l)return l;if("number"==typeof l||window.moment.isMoment(l)){let e=null;void 0!==n.groups.format&&(e=n.groups.format),r.push({source:t,value:l,format:e})}}}return r}function tu(t,e){let n=Jo(t,e);if("string"==typeof n)return n;let r=n;for(let n of r){let r=n.source,i=n.value,a=n.format,l="";"number"==typeof i?l=a?Wo.sprintf("%"+a,i):i.toFixed(1):window.moment.isMoment(i)&&(l=Fo(i,a||e.dateFormat)),l&&(t=t.split(r).join(l))}return t}function eu(t,e){if(t=t.trim(),/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)$/.test(t))return parseFloat(t);let n=Jo(t,e);if("string"==typeof n)return n;let r=n;return r.length>0?r[0].value:"Error: failed to resolve values"}function nu(t,e,n,r){let i="",a=.5*n.dataAreaSize.width,l=.7*a,o=l*r.ratioInnerRadius,u=[];for(let t of r.data){let e=eu(t,n);if("string"==typeof e){i=e;break}"number"==typeof e&&u.push(e)}if(""!==i)return i;let s=[];for(let t of r.label){let e=tu(t,n);if(e.startsWith("Error")){i=e;break}s.push(e)}if(""!==i)return i;let f=r.hideLabelLessThan,c=s.map((function(t){return Oo(t,"tracker-tick-label")})),h=[];for(let t of r.extLabel){let e=tu(t,n);if(e.startsWith("Error")){i=e;break}h.push(e)}if(""!==i)return i;let d=h.map((function(t){return Oo(t,"tracker-pie-label")})),g=r.showExtLabelOnlyIfNoLabel,p=Kr().range(r.dataColor),y=e.dataArea.append("g");y.attr("transform",(function(){return"translate("+.5*n.dataAreaSize.width+","+.5*n.dataAreaSize.height+")"}));let m=function(){var t=Kl,e=Zl,n=null,r=Cl(0),i=Cl(Vl),a=Cl(0);function l(l){var o,u,s,f,c,h=(l=Wl(l)).length,d=0,g=new Array(h),p=new Array(h),y=+r.apply(this,arguments),m=Math.min(Vl,Math.max(-Vl,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/h,a.apply(this,arguments)),x=v*(m<0?-1:1);for(o=0;o0&&(d+=c);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(l[t],l[e])})),o=0,s=d?(m-h*x)/d:0;o0?c*s:0)+x,p[u]={data:l[u],index:o,value:c,startAngle:y,endAngle:f,padAngle:v};return p}return l.value=function(e){return arguments.length?(t="function"==typeof e?e:Cl(+e),l):t},l.sortValues=function(t){return arguments.length?(e=t,n=null,l):e},l.sort=function(t){return arguments.length?(n=t,e=null,l):n},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Cl(+t),l):r},l.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Cl(+t),l):i},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Cl(+t),l):a},l}(),v=m(u),x=y.selectAll("sector").data(v).enter().append("g").attr("class","sector"),A=Xl().innerRadius(o).outerRadius(l);var w=Xl().innerRadius(.9*a).outerRadius(.9*a);function b(t){return(t.endAngle-t.startAngle)/(2*Math.PI)Math.sqrt(Math.pow(u[0]-l[0],2)+Math.pow(u[1]-l[1],2))?[l,u]:[l,o,u]}x.append("path").attr("fill",(function(t,e){return p(e.toString())})).attr("d",A),y.selectAll("label").data(m(u)).enter().append("text").text((function(t,e){return b(t)?"":s[e]})).attr("transform",(function(t){return"translate("+A.centroid(t)[0]+","+A.centroid(t)[1]+")"})).style("text-anchor","middle").attr("class","tracker-pie-label"),y.selectAll("extLabel").data(v).enter().append("text").text((function(t,e){return g?""===s[e]||b(t)?h[e]:"":h[e]})).attr("transform",(function(t,e){let n=w.centroid(t),r=D(t);return n[0]=(.99*a-d[e].width)*(rc&&(c=s[t].width,f=t);let h=c/u[f].length,d=s[f].height,g=u.length,p=2*h,y=d,m=2*h,v=0,x=0;"vertical"===r.legendOrientation?(v=3*p+m+c,x=(g+1)*y):"horizontal"===r.legendOrientation&&(v=(2*p+m)*g+p+k(s,(function(t,e){return t.width})),x=y+d);let A=0,w=0;if("top"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o,Po(i,0,x+y),$o(a,0,x+y);else if("bottom"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o+n.dataAreaSize.height+y,Po(i,0,x+y);else if("left"===r.legendPosition)A=0,w=o+n.dataAreaSize.height/2-x/2,Po(i,v+p,0),$o(a,v+p,0);else{if("right"!==r.legendPosition)return;A=n.dataAreaSize.width+p,w=o+n.dataAreaSize.height/2-x/2,Po(i,v+p,0)}let b=e.graphArea.append("g").attr("id","legend").attr("transform","translate("+A+","+w+")"),D=b.append("rect").attr("class","tracker-legend").attr("width",v).attr("height",x);r.legendBgColor&&D.style("fill",r.legendBgColor),r.legendBorderColor&&D.style("stroke",r.legendBorderColor);let C=p,M=d,T=C+p+m,_=M;if("vertical"===r.legendOrientation)b.selectAll("markers").data(u).enter().append("circle").attr("cx",C+m/2).attr("cy",(function(t,e){return M+e*y})).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),b.selectAll("labels").data(u).enter().append("text").attr("x",T).attr("y",(function(t,e){return _+e*y})).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}));else if("horizontal"===r.legendOrientation){let t=0;t=0,b.selectAll("markers").data(u).enter().append("circle").attr("cx",(function(e,n){return 0===n?t=C+m/2:t+=s[n].width+p+m+p,t})).attr("cy",M).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),t=0,b.selectAll("labels").data(u).enter().append("text").attr("x",(function(e,n){return 0===n?t=T:t+=s[n].width+p+m+p,t})).attr("y",_).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}))}}(0,r,e,n),function(t,e,n){let r=ne(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,r,e)}function iu(t,e,n){if(!e||!n)return;let r="";n.template,r=n.template;let i=tu(r,e);if(i.startsWith("Error:"))return i;if(r=i,""!==r){let e=ne(t).append("div");if(r.includes("\n")||r.includes("\\n")){let t=r.split(/(\n|\\n)/);for(let n of t)"\n"!==n&&"\\n"!==n&&e.append("div").text(n)}else e.text(r);""!==n.style&&e.attr("style",n.style)}}let au=!1,lu=2.8,ou=1.8;function uu(t,e){let n=e.dataset;if(0===n.length)return!1;let r=null;if(null===e.selectedDataset){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;if(r)return e.selectedDataset=r.getId(),!0}else{let i=e.selectedDataset,a=n.findIndex((t=>t===i));if(a>=0){if(a===e.dataset.length-1){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;return!!r&&(e.selectedDataset=r.getId(),!0)}{a++;let i=n[a];if(r=t.datasets.getDatasetById(i),e.selectedDataset=i,r&&!r.getQuery().usedAsXDataset)return!0;uu(t,e)}}}return!1}function su(t,e,n,r){ne(e).select("#svg").remove();for(var i=Object.getOwnPropertyNames(t),a=0;a").attr("id","arrowLeft").attr("transform","translate("+6.5*s+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){fu(e,r);let l=i.clone().add(1,"month");du(t,e,n,r,l)})).style("cursor","pointer"),p.append("text").text("◦").attr("id","arrowToday").attr("transform","translate("+6*s+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(i){fu(e,r);let a=Bo(n.dateFormat);du(t,e,n,r,a)})).style("cursor","pointer"),g+=8;let k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];"mon"===r.startWeekOn.toLowerCase()&&k.push(k.shift());let C=Oo(k[0],"tracker-month-weekday");e.graphArea.selectAll("weekDays").data(k).enter().append("text").text((function(t){return t})).attr("transform",(function(t,e){return"translate("+(e+.5)*s+","+(g+C.height)+")"})).attr("class","tracker-month-weekday").attr("text-anchor","middle").style("cursor","default").on("click",(function(t){fu(e,r)})),g+=C.height+8;let M=null;r.dividingLineColor?M=r.dividingLineColor:r.color&&(M=r.color);let T=e.graphArea.append("rect").attr("x",0).attr("y",g).attr("width",6.5*s+C.width).attr("height",1).attr("class","tracker-month-dividing-line");M&&T.style("fill",M),g+=1,p.attr("height",g),e.header=p,$o(e.dataArea,0,g)}function hu(t,e,n,r,i){if(!n||!r)return;let a=r.mode;if("circle"!==a&&"annotation"!==a)return"Unknown month view mode";let l=r.selectedDataset;if(null===l)return;let o=n.datasets.getDatasetById(l);if(!o)return;let u=r.dataset.findIndex((t=>t===l));l<0&&(u=0);let s=r.threshold[u];i.month(),i.daysInMonth();let f=Oo("30","tracker-month-label"),c=Math.max(f.width,f.height)*lu,h=c/lu*ou/2,d=(c-2*h)/2,g=x(o.getValues());null!==r.yMin[u]&&(g=r.yMin[u]);let p=v(o.getValues());null!==r.yMax[u]&&(p=r.yMax[u]);let y=!0;(null===p||null===g||p<=g)&&(y=!1);const m=i.clone().startOf("month");let A=m.clone().subtract(m.day(),"days");"mon"===r.startWeekOn.toLowerCase()&&(A=A.add(1,"days"));const w=i.clone().endOf("month");let b=w.clone().add(7-w.day()-1,"days");"mon"===r.startWeekOn.toLowerCase()&&(b=b.add(1,"days"));const D=o.getStartDate(),k=o.getEndDate();let C=r.showAnnotation,M=r.annotation,T=M[u],_=r.showAnnotationOfAllTargets,E=[],F=0,S=0,B=0;for(let t=A.clone();t<=b;t.add(1,"days")){t=Mo(Fo(t,n.dateFormat),n.dateFormat),"2021-09-13"===t.format("YYYY-MM-DD")&&(au=!1),"mon"===r.startWeekOn.toLowerCase()?(F=t.day()-1,F<0&&(F=6),S=Math.floor(B/7)):(F=t.day(),S=Math.floor(B/7));let e=!0;(t.diff(m)<0||t.diff(w)>0)&&(e=!1);let i=!0;D&&k&&t.diff(D)>=0&&t.diff(k)<=0&&(i=!1);const a=o.getValue(t);au&&(console.log(o),console.log(Fo(t,n.dateFormat)),console.log(a));let l=!1;r.circleColorByValue?(y||null!==a&&a>s)&&(l=!0):null!==a&&a>s&&(l=!0);let u=null;r.circleColorByValue&&y&&null!==a&&(u=(a-g)/(p-g)),au&&(console.log(g),console.log(p),console.log(u));let f=o.getValue(t,1),c=o.getValue(t,-1),h=!1;null!==a&&a>s&&null!==c&&c>s&&(h=!0);let d=!1;null!==a&&a>s&&null!==f&&f>s&&(d=!0),au&&(console.log(`preValue: ${c}, curValue: ${a}, nextValue: ${f}`),console.log(r.threshold),console.log(`streakIn: ${h}, streakOut: ${d}`));let v="";if(C)if(_)for(let e of r.dataset){let i=r.dataset.findIndex((t=>t===e));if(i>=0){let a=n.datasets.getDatasetById(e).getValue(t),l=r.threshold[i];null!==a&&a>l&&(v+=M[i])}}else a>s&&(v=T);E.push({date:Fo(t,n.dateFormat),value:a,scaledValue:u,dayInMonth:t.date(),isInThisMonth:e,isOutOfDataRange:i,row:S,col:F,showCircle:l,streakIn:h,streakOut:d,annotation:v}),B++,au&&(au=!1)}let N=(F+1)*c,I=fi().domain([-.5,6.5]).range([0,N]);if("circle"===a&&r.showCircle&&r.showStreak){let t="#69b3a2";r.circleColor?t=r.circleColor:r.color&&(t=r.color),e.dataArea.selectAll("streakIn").data(E.filter((function(t){return t.streakIn}))).enter().append("rect").attr("x",(function(t){return I(t.col)-h-d})).attr("y",(function(t){return I(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?Mn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})),e.dataArea.selectAll("streakOut").data(E.filter((function(t){return t.streakOut}))).enter().append("rect").attr("x",(function(t){return I(t.col)+h})).attr("y",(function(t){return I(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?Mn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1}))}let L="#69b3a2";r.circleColor?L=r.circleColor:r.color&&(L=r.color),"circle"===a&&r.showCircle&&e.dataArea.selectAll("dot").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).style("fill",(function(t){if(t.showCircle){if(!r.circleColorByValue)return L;if(null!==t.scaledValue){return Mn("white",L)(.8*t.scaledValue+.2)}return"none"}return"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).style("cursor","default");let V=Fo(window.moment(),n.dateFormat);if("circle"===a&&r.showTodayRing){let t=e.dataArea.selectAll("todayRing").data(E.filter((function(t){return t.date===V}))).enter().append("circle").attr("r",.9*h).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).attr("class","tracker-month-today-circle").style("cursor","default");""!==r.todayRingColor?t.style("stroke",r.todayRingColor):t.style("stroke","white")}"circle"===a&&r.showSelectedRing&&e.dataArea.selectAll("selectedRing").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).attr("id",(function(t){return"tracker-selected-circle-"+t.date})).attr("class","tracker-month-selected-circle").style("cursor","default").style("stroke","none"),e.dataArea.selectAll("dayLabel").data(E).enter().append("text").text((function(t){return t.dayInMonth.toString()})).attr("transform",(function(t){return"translate("+I(t.col)+","+(I(t.row)+f.height/4)+")"})).style("fill-opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).attr("date",(function(t){return t.date})).attr("value",(function(t){return t.value})).attr("valueType",(function(t){return no[o.valueType]})).attr("class","tracker-month-label").on("click",(function(t){fu(e,r);let n=ne(this).attr("date");if(r.selectedDate=n,r.showSelectedRing&&e.dataArea.select("#tracker-selected-circle-"+n).style("stroke",r.selectedRingColor),r.showSelectedValue){let t=ne(this).attr("value"),n="";if("Time"===ne(this).attr("valueType")){n=window.moment("00:00","HH:mm",!0).add(parseFloat(t),"seconds").format("HH:mm")}else n=t;e.monitor.text(n)}})).style("cursor","pointer"),"annotation"===a&&C&&e.dataArea.selectAll("dayAnnotation").data(E).enter().append("text").text((function(t){return t.annotation})).attr("transform",(function(t){let e=I(t.col),n=I(t.row)+f.height/4;return t.annotation&&(n+=h),"translate("+e+","+n+")"})).attr("class","tracker-month-annotation");let O=parseFloat(e.svg.attr("width")),P=parseFloat(e.svg.attr("height")),$=parseFloat(e.graphArea.attr("width")),Y=parseFloat(e.graphArea.attr("height")),z=7*c+parseFloat(e.header.attr("height")),R=7*c;z>P&&Po(e.svg,0,z-P),R>O&&Po(e.svg,R-O,0),z>Y&&Po(e.graphArea,0,z-Y),R>$&&Po(e.svg,R-$,0)}function du(t,e,n,r,i){n&&gu&&(cu(t,e=su(e,t,n),n,r,i),hu(0,e,n,r,i))}function gu(t,e,n){if(!e||!gu)return;n.dataset;let r=0;for(let t of e.datasets)t.getQuery().usedAsXDataset||r++;if(0===r)return"No available dataset found";if(uu(e,n),null===n.selectedDataset)return"No available dataset found";let i={};i=su(i,t,e);let a=null;if(n.initMonth){if(a=Eo(n.initMonth,e.dateFormat),!a){let t=window.moment(n.initMonth,"YYYY-MM",!0);if(!t.isValid())return"Invalid initMonth";a=t}}else a=e.datasets.getDates().last();a&&(cu(t,i,e,n,a),hu(0,i,e,n,a),function(t,e,n){let r=ne(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,i,e))}function pu(t,e,n){if(e&&pu)return"Under construction"}function yu(t,e,n){if(!e||!n)return;let r=parseFloat(n.dataset);e.datasets.getDatasetById(r),"horizontal"===n.orientation?e.dataAreaSize={width:250,height:24}:"vertical"===n.orientation&&(e.dataAreaSize={width:24,height:250});let i=function(t,e,n){let r={};if(!e||!n)return;let i=ne(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);r.svg=i;let a=i.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);r.graphArea=a;let l=a.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return r.dataArea=l,r}(t,e,n),a=function(t,e,n,r){if(!e||!n)return;let i=n.range,a=i[i.length-1],l=[0,a],o=n.valueUnit,u=function(t){return o&&o.endsWith("%")?ui(0,a,7)(t)+" %":ui(0,a,7)(t)},s=Oo(u(a),"tracker-tick-label");if("horizontal"===n.orientation){let n=fi();n.domain(l).range([0,e.dataAreaSize.width]),t.scale=n;let r=O(n);r.tickFormat(u);let i=t.dataArea.append("g").attr("id","axis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",e.dataAreaSize.width+s.width),i.attr("height",6+s.height),Po(t.svg,+s.width,6+s.height),Po(t.graphArea,+s.width,6+s.height)}else if("vertical"===n.orientation){let n=fi();n.domain(l).range([e.dataAreaSize.height,0]),t.scale=n;let r=P(n);r.tickFormat(u);let i=t.dataArea.append("g").attr("id","axis").attr("x",0).attr("y",0).call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",6+s.width),i.attr("height",e.dataAreaSize.width),Po(t.svg,6+s.width,0),Po(t.graphArea,6+s.width,0),$o(t.dataArea,6+s.width,0)}}(i,e,n);if("string"==typeof a)return a;!function(t,e,n){if(!e||!n)return;if(n.title){let r=Oo(n.title,"tracker-title-small");if("horizontal"===n.orientation){let i=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",r.width/2).attr("y",e.dataAreaSize.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=i,Po(t.svg,r.width+6,0),Po(t.graphArea,r.width+6,0),$o(t.dataArea,r.width+6,0)}else if("vertical"===n.orientation){let i=e.dataAreaSize.width/2;r.width>e.dataAreaSize.width&&(Po(t.svg,r.width-e.dataAreaSize.width,0),Po(t.graphArea,r.width-e.dataAreaSize.width,0),$o(t.dataArea,r.width/2-e.dataAreaSize.width/2,0),i=r.width/2);let a=parseFloat(t.axis.attr("width")),l=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",i+a).attr("y",r.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=l,Po(t.svg,0,r.height+6),Po(t.graphArea,0,r.height+6),$o(t.dataArea,0,r.height+6)}}if(n.valueUnit){let r=Oo(n.valueUnit,"tracker-tick-label");if("horizontal"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",-1*(r.width+6)).attr("y",e.dataAreaSize.height+6).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i}else if("vertical"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",e.dataAreaSize.width/2-r.width/2).attr("y",-(r.height/2+6)).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i,Po(t.svg,0,r.height+6),Po(t.graphArea,0,r.height+6),$o(t.dataArea,0,r.height+6)}}}(i,e,n),function(t,e,n,r){if(!e||!n)return;let i=t.scale,a=n.range,l=n.rangeColor,o=[],u=0;for(let t=0;t=e&&(n=r=e):(n>e&&(n=e),r=a&&(n=r=a):(n>a&&(n=a),ro)&&(o=e.getYMax()),s=e.valueType===no.Time,null===u)u=s;else if(s!==u)return"Not all values in time format"}let f=null;"left"===r?f=n.yMin[0]:"right"===r&&(f=n.yMin[1]);let c=!1;"number"!=typeof f?f=l:c=!0;let h=null;"left"===r?h=n.yMax[0]:"right"===r&&(h=n.yMax[1]);let d=!1;if("number"!=typeof h?h=o:d=!0,h0&&(g=0));let v=[g,p];("left"===r&&n.reverseYAxis[0]||"right"===r&&n.reverseYAxis[1])&&(v=[p,g]),m.domain(v).range([e.dataAreaSize.height,0]),"left"===r?t.leftYScale=m:"right"===r&&(t.rightYScale=m);let x="";"left"===r?x=n.yAxisColor[0]:"right"===r&&(x=n.yAxisColor[1]);let A="";"left"===r?A=n.yAxisLabelColor[0]:"right"===r&&(A=n.yAxisLabelColor[1]);let w="";"left"===r?w=n.yAxisLabel[0]:"right"===r&&(w=n.yAxisLabel[1]);let b="",k=null,C=null;"left"===r?(b=n.yAxisUnit[0],k=n.yAxisTickInterval[0],C=n.yAxisTickLabelFormat[0]):"right"===r&&(b=n.yAxisUnit[1],k=n.yAxisTickInterval[1],C=n.yAxisTickLabelFormat[1]);let M,_=null;if(s?_=_o(k):(_=parseFloat(k),Number.isNumber(_)&&!Number.isNaN(_)||(_=null)),"left"===r?M=P(m):"right"===r&&(M=V(T,m)),M){let t=function(t,e,n,r=!1){if(r){if(n){function i(t){return window.moment("00:00","HH:mm",!0).add(t,"seconds").format(n)}return i}{function a(n){const r=Math.abs(e-t);let i=window.moment("00:00","HH:mm",!0).add(n,"seconds").format("HH:mm");return r>43200&&(ne||(n-t)/3600%2<1)&&(i=""),i}return a}}if(n){function l(t){return Wo.sprintf("%"+n,t)}return l}return ui(t,e,10)}(g,p,C,s);t&&M.tickFormat(t);let e=function(t,e,n,r=!1){const i=Math.abs(e-t);let a=[];r?a=n&&window.moment.isDuration(n)?D(t,e,Math.abs(n.asSeconds())):i>18e3?D(t=3600*Math.floor(t/3600),e=3600*Math.ceil(e/3600),3600):D(t=1800*Math.floor(t/1800),e=1800*Math.ceil(e/1800),1800):n&&"number"==typeof n&&(a=D(t,e,n));return 0===a.length?null:a}(g,p,_,s);e&&M.tickValues(e)}let E=t.dataArea.append("g").attr("id","yAxis").call(M).attr("class","tracker-axis");"right"==r&&E.attr("transform","translate("+e.dataAreaSize.width+" ,0)"),"left"===r?t.leftYAxis=E:"right"===r&&(t.rightYAxis=E);let F=E.selectAll("path");x&&F.style("stroke",x);let S=E.selectAll("line");x&&S.style("stroke",x);let B=E.selectAll("text").attr("class","tracker-tick-label");x&&B.style("fill",x);let N=0;for(let t of B)if(t.textContent){let e=Oo(t.textContent,"tracker-axis-label");e.width>N&&(N=e.width)}""!==b&&(w+=" ("+b+")");let I=Oo(w),L=E.append("text").text(w).attr("transform","rotate(-90)").attr("x",-1*e.dataAreaSize.height/2).attr("class","tracker-axis-label");"left"===r?L.attr("y",-6-N-I.height/2):L.attr("y",6+N+I.height),A&&L.style("fill",A);let O=I.height+N+6;E.attr("width",O),Po(t.svg,O,0),Po(t.graphArea,O,0),"left"===r&&($o(t.dataArea,O,0),t.title&&$o(t.title,O,0))}function xu(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showLine[r.getId()]){let e=function(t,e){var n=Cl(!0),r=null,i=ql,a=null,l=Pl(o);function o(o){var u,s,f,c=(o=Wl(o)).length,h=!1;for(null==r&&(a=i(f=l())),u=0;u<=c;++u)!(u0&&(i.style("stroke",n.pointBorderColor[r.getId()]),i.style("stroke-width",n.pointBorderWidth[r.getId()]))),n.allowInspectData&&function(t,e,n){let r=e.dataArea.append("svg").style("opacity",0),i=r.append("rect").attr("x",0).attr("y",0),a=r.append("text"),l=a.append("tspan").attr("class","tracker-tooltip-label"),o=a.append("tspan").attr("class","tracker-tooltip-label"),u=3,s=3;t.on("mouseenter",(function(t){const[e,f]=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}(t);let c=0,h=0,d="date: "+ne(this).attr("date"),g=Oo(d,"tracker-tooltip-label");l.text(d),g.width>c&&(c=g.width),h+=g.height,l.attr("x",u).attr("y",h);let p="value: ",y=ne(this).attr("valueType"),m=ne(this).attr("value");if("Time"===y){p+=window.moment("00:00","HH:mm",!0).add(parseFloat(m),"seconds").format("HH:mm"),o.text(p)}else p+=m,o.text(p);let v=Oo(p,"tracker-tooltip-label");v.width>c&&(c=v.width),h+=s+v.height,o.attr("x",u).attr("y",h),c+=2*u,h+=2*s,a.attr("width",c).attr("height",h),i.attr("width",c).attr("height",h).attr("class","tracker-tooltip");let x=e,A=f,w=12,b=12;x=e+w+c>n.dataAreaSize.width?e-c-w:e+w,A=f-b-h<0?f+b:f-b-h,r.attr("x",x).attr("y",A),r.transition().duration(200).style("opacity",1)})).on("mouseleave",(function(){r.transition().duration(500).style("opacity",0)}))}(i,t,e)}}function wu(t,e,n,r,i,a,l){if(!e||!n)return;let o=e.dataAreaSize.width/r.getLength(),u=o;o-1>0&&(u=o-1),u/=l;let s=null;"left"===i?s=t.leftYScale:"right"===i&&(s=t.rightYScale);let f=t.dataArea.selectAll("bar").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("rect").attr("x",(function(e,n){if(0===n){let n=a+1-l/2;if(n<1)return t.xScale(e.date)-o/2+a*u+n*u}return t.xScale(e.date)-o/2+a*u})).attr("y",(function(t){return s(Math.max(t.value,0))})).attr("width",(function(t,e){if(0===e){let t=a+1-l/2;return t<0?0:t<1?u*t:u}if(e===r.getLength()-1){let t=1-(a+1-l/2);return t<0?0:t<1?u*t:u}return u})).attr("height",(function(t){if(null!==t.value)return Math.abs(s(t.value)-s(0))})).attr("class","tracker-bar");n.barColor[r.getId()]&&f.style("fill",n.barColor[r.getId()])}function bu(t,e,n){let r=t.svg;t.graphArea;let i=t.dataArea,a=t.title,l=t.xAxis,o=t.leftYAxis,u=t.rightYAxis,s=0;a&&(s=parseFloat(a.attr("height")));let f=parseFloat(l.attr("height")),c=0;o&&(c=parseFloat(o.attr("width")));let h=0;u&&(h=parseFloat(u.attr("width")));let d=e.datasets,g=d.getXDatasetIds(),p=d.getNames(),y=p.map((function(t){return Oo(t,"tracker-legend-label")})),m=0,v=0;for(let t=0;tv&&(v=y[t].width,m=t);let x=v/p[m].length,A=y[m].height,w=p.length-g.length,b=2*x,D=A,C=2*x,M=0,T=0;"vertical"===n.legendOrientation?(M=3*b+C+v,T=(w+1)*D):"horizontal"===n.legendOrientation&&(M=(2*b+C)*w+b+k(y,(function(t,e){return g.includes(e)?0:t.width})),T=D+A);let _=0,E=0;if("top"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=s,Po(r,0,T+D),$o(i,0,T+D);else if("bottom"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=s+e.dataAreaSize.height+f+D,Po(r,0,T+D);else if("left"===n.legendPosition)_=0,E=s+e.dataAreaSize.height/2-T/2,Po(r,M+b,0),$o(i,M+b,0);else{if("right"!==n.legendPosition)return;_=e.dataAreaSize.width+c+h+b,E=s+e.dataAreaSize.height/2-T/2,Po(r,M+b,0)}let F=t.graphArea.append("g").attr("id","legend").attr("transform","translate("+_+","+E+")"),S=F.append("rect").attr("class","tracker-legend").attr("width",M).attr("height",T);n.legendBgColor&&S.style("fill",n.legendBgColor),n.legendBorderColor&&S.style("stroke",n.legendBorderColor);let B=b,N=A,I=B+b+C,L=N;if("vertical"===n.legendOrientation){n.GetGraphType()===eo.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",B).attr("x2",B+C).attr("y1",(function(t,e){let n=g.filter((t=>ttttt!g.includes(e)))).enter().append("rect").attr("x",(function(t,e){let n=b;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n0&&(u=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==u?u:r}else{if("boolean"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=Bu(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let e=0;e0&&(u=_u(i[e-1].trim())),""===n)a[e]=null!==u?u:r;else{let r=_u(n);if(null===r){l="Invalid inputs for "+t;break}a[e]=r,o++}}else{let t=_u(i[i.length-1].trim());a[e]=o>0&&null!==t?t:r}}else if(""===e);else{let n=_u(e);if(null!==n){a[0]=n,o++;for(let t=1;ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n0&&(u=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==u?u:r}else{if("number"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=Bu(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let n=0;n0&&(u=Vo(i[n-1].trim()).value),""===e)null!==u&&Number.isNumber(u)?a[n]=u:a[n]=r;else{let r=Vo(e).value;if(null===r){l="Invalid inputs for "+t;break}a[n]=r,o++}}else{let t=Vo(i[e.length-1].trim()).value;a[n]=o>0&&null!==t?t:r}}else if(""===e);else{let n=Vo(e).value;if(null!==n){a[0]=n,o++;for(let t=1;tl.length;)l.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return o="Too many inputs for parameter '"+t+"'",o;if(0===e.length)return o="Empty array not allowd for "+t,o;for(let n=0;n0&&(s=e[n-1].trim()),"string"!=typeof a){o="Invalid inputs for "+t;break}if(a=a.trim(),""===a)l[n]=null!==s?s:r;else if(i){if(!i(a)){o="Invalid inputs for "+t;break}l[n]=a,u++}else l[n]=a,u++}else{let t=e[e.length-1].trim();l[n]=u>0?t:r}}}else if("string"==typeof e){let a=Bu(e);if(a.length>1){if(a.length>n)return o="Too many inputs for parameter '"+t+"'",o;for(let e=0;e0&&(s=a[e-1].trim()),""===n)l[e]=null!==s?s:r;else if(i){if(!i(n)){o="Invalid inputs for "+t;break}l[e]=n,u++}else l[e]=n,u++}else{let t=a[a.length-1].trim();l[e]=u>0?t:r}}else if(""===e);else if(i)if(i(e)){l[0]=e,u++;for(let t=1;t1)for(let e of r){let r=parseFloat(e.trim());if(Number.isNaN(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}else{if(""===e){return`Empty ${t} is not allowed.`}{let r=parseFloat(e);if(!Number.isNumber(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}}}else{if("number"!=typeof e){return`Invalid ${t}`}n.push(e)}return n}function Pu(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let t of e)"string"==typeof t&&n.push(t.trim())}else{if("string"!=typeof e){return`Invalid ${t}`}{let r=Bu(e);if(r.length>1)for(let t of r)n.push(t.trim());else{if(""===e){return`Empty ${t} is not allowed.`}n.push(e)}}}for(let t=0;t2)return"yAxisLabel accepts not more than two values for left and right y-axes";e.yAxisLabel=n;let r=Vu("yAxisColor",null==t?void 0:t.yAxisColor,2,"",Su,!0);if("string"==typeof r)return r;if(r.length>2)return"yAxisColor accepts not more than two values for left and right y-axes";e.yAxisColor=r;let i=Vu("yAxisLabelColor",null==t?void 0:t.yAxisLabelColor,2,"",Su,!0);if("string"==typeof i)return i;if(i.length>2)return"yAxisLabelColor accepts not more than two values for left and right y-axes";e.yAxisLabelColor=i;let a=Vu("yAxisUnit",null==t?void 0:t.yAxisUnit,2,"",null,!0);if("string"==typeof a)return a;if(a.length>2)return"yAxisUnit accepts not more than two values for left and right y-axes";e.yAxisUnit=a,e.xAxisTickInterval=Lu(null==t?void 0:t.xAxisTickInterval,e.xAxisTickInterval);let l=Vu("yAxisTickInterval",null==t?void 0:t.yAxisTickInterval,2,null,null,!0);if("string"==typeof l)return l;if(l.length>2)return"yAxisTickInterval accepts not more than two values for left and right y-axes";e.yAxisTickInterval=l,e.xAxisTickLabelFormat=Lu(null==t?void 0:t.xAxisTickLabelFormat,e.xAxisTickLabelFormat);let o=Vu("yAxisTickLabelFormat",null==t?void 0:t.yAxisTickLabelFormat,2,null,null,!0);if("string"==typeof o)return o;if(o.length>2)return"yAxisTickLabelFormat accepts not more than two values for left and right y-axes";e.yAxisTickLabelFormat=o;let u=Iu("yMin",null==t?void 0:t.yMin,2,null,!0);if("string"==typeof u)return u;if(u.length>2)return"yMin accepts not more than two values for left and right y-axes";e.yMin=u;let s=Iu("yMax",null==t?void 0:t.yMax,2,null,!0);if("string"==typeof s)return s;if(s.length>2)return"yMax accepts not more than two values for left and right y-axes";e.yMax=s;let f=Nu("reverseYAxis",null==t?void 0:t.reverseYAxis,2,!1,!0);return"string"==typeof f?f:f.length>2?"reverseYAxis accepts not more than two values for left and right y-axes":void(e.reverseYAxis=f)}function Yu(t){let e=[];if(null!==t){const n=Object.keys(t);for(let t of n)e.push(t.toString())}return e}function zu(t,e){return Mo(Co(t.basename,e.dateFormatPrefix,e.dateFormatSuffix),e.dateFormat)}function Ru(t,e,n){let r=window.moment(""),i=t.frontmatter;if(i&&No(i,e.getTarget())){let t=No(i,e.getTarget());"string"==typeof t&&(t=Co(t,n.dateFormatPrefix,n.dateFormatSuffix),r=Mo(t,n.dateFormat))}return r}function Uu(t,e,n){let r,i=window.moment(""),a=new RegExp(e,"gm");for(;r=a.exec(t);)if(void 0!==r.groups&&void 0!==r.groups.value){let t=r.groups.value.trim();if(t=Co(t,n.dateFormatPrefix,n.dateFormatSuffix),i=Mo(t,n.dateFormat),i.isValid())return i}return i}function Hu(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),Uu(t,"(^|\\s)#"+r+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",n)}function Xu(t,e,n){return window.moment(""),Uu(t,e.getTarget(),n)}function Wu(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),r=r.replace("-","[\\s\\-]"),Uu(t,"(^| |\\t)\\*{0,2}"+r+"\\*{0,2}(::[ |\\t]*(?[\\d\\.\\/\\-\\w,@; \\t:]*))(\\r\\?\\n|\\r|$)",n)}function ju(e,n,r){let i=window.moment("");if(e&&e instanceof t.TFile){let t=n.getTarget();if("cDate"===t){i=So(e.stat.ctime,r.dateFormat)}else if("mDate"===t){i=So(e.stat.mtime,r.dateFormat)}else"name"===t&&(i=zu(e,r))}return i}function qu(t,e,n){window.moment("");let r=e.getType(),i=e.getTarget();return i=r===to.Task?"\\[[\\sx]\\]\\s"+i:r===to.TaskDone?"\\[x\\]\\s"+i:r===to.TaskNotDone?"\\[\\s\\]\\s"+i:"\\[[\\sx]\\]\\s"+i,Uu(t,i,n)}function Gu(t,e,n,r){if(t.has(e)){t.get(e).push({query:n,value:r})}else{let i=new Array;i.push({query:n,value:r}),t.set(e,i)}}function Qu(t,e,n,r,i,a){let l,o=new RegExp(e,"gmu"),u=0,s=!1;for(;l=o.exec(t);)if(a.ignoreAttachedValue[n.getId()])u+=a.constValue[n.getId()],s=!0,n.addNumTargets();else if(void 0!==l.groups&&void 0!==l.groups.value){let t=l.groups.value.trim().split(n.getSeparator());if(!t)continue;if(1===t.length){let e=Vo(t[0].trim(),a.textValueMap);null!==e.value&&(e.type===no.Time?(u=e.value,s=!0,n.valueType=no.Time,n.addNumTargets()):a.ignoreZeroValue[n.getId()]&&0===e.value||(u+=e.value,s=!0,n.addNumTargets()))}else if(t.length>n.getAccessor()&&n.getAccessor()>=0){let e=Vo(t[n.getAccessor()].trim(),a.textValueMap);null!==e.value&&(e.type===no.Time?(u=e.value,s=!0,n.valueType=no.Time,n.addNumTargets()):(u+=e.value,s=!0,n.addNumTargets()))}}else u+=a.constValue[n.getId()],s=!0,n.addNumTargets();if(s){return Gu(r,i.get(a.xDataset[n.getId()]),n,u),!0}return!1}function Zu(e,n,r,i,a,l){if(e&&e instanceof t.TFile){let t=r.getTarget(),o=l.get(i.xDataset[r.getId()]);if("cDate"===t){let t=e.stat.ctime;return r.valueType=no.Date,r.addNumTargets(),Gu(a,o,r,t),!0}if("mDate"===t){let t=e.stat.mtime;return r.valueType=no.Date,r.addNumTargets(),Gu(a,o,r,t),!0}if("size"===t){let t=e.stat.size;return r.addNumTargets(),Gu(a,o,r,t),!0}if("numWords"===t){return Gu(a,o,r,function(t){t=Yo(t);var e=new RegExp(["(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-"+/A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source+"])+",/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source].join("|"),"g");return(t.match(e)||[]).length}(n)),!0}if("numChars"===t){let t=n.length;return r.addNumTargets(),Gu(a,o,r,t),!0}if("numSentences"===t){let t=function(t){return(((t=Yo(t))||"").match(/[^.。!!??\s][^.。!!??]*(?:[.!?](?!['‘’"“”「」『』]?\s|$)[^.。!!??]*)*[.。!!??]?['’"”」』]?(?=\s||$)/gm)||[]).length}(n);return r.addNumTargets(),Gu(a,o,r,t),!0}if("name"===t){let t=0,n=!1,l=Vo(e.basename,i.textValueMap);null!==l.value&&(l.type===no.Time?(t=l.value,n=!0,r.valueType=no.Time,r.addNumTargets()):i.ignoreZeroValue[r.getId()]&&0===l.value||(t+=l.value,n=!0,r.addNumTargets()));let u=null;if(n&&(u=t),null!==u)return Gu(a,o,r,u),!0}}return!1}const Ku={folder:"/",dateFormat:"YYYY-MM-DD"};class Ju extends t.PluginSettingTab{constructor(t,e){super(t,e),this.plugin=e}display(){let{containerEl:n}=this;n.empty(),new t.Setting(n).setName("Default folder location").setDesc("Files in this folder will be parsed and used as input data of the tracker plugin.\nYou can also override it using 'folder' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("Folder Path").setValue(this.plugin.settings.folder).onChange((t=>e(this,void 0,void 0,(function*(){this.plugin.settings.folder=t,yield this.plugin.saveSettings()})))))),new t.Setting(n).setName("Default date format").setDesc("This format is used to parse the date in your diary title.\nYou can also override it using 'dateFormat' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("YYYY-MM-DD").setValue(this.plugin.settings.dateFormat).onChange((t=>e(this,void 0,void 0,(function*(){this.plugin.settings.dateFormat=t,yield this.plugin.saveSettings()}))))))}}class ts extends t.Plugin{onload(){return e(this,void 0,void 0,(function*(){console.log("loading obsidian-tracker plugin"),yield this.loadSettings(),this.addSettingTab(new Ju(this.app,this)),this.registerMarkdownCodeBlockProcessor("tracker",this.postprocessor.bind(this)),this.addCommand({id:"add-line-chart-tracker",name:"Add Line Chart Tracker",callback:()=>this.addCodeBlock(eo.Line)}),this.addCommand({id:"add-bar-chart-tracker",name:"Add Bar Chart Tracker",callback:()=>this.addCodeBlock(eo.Bar)}),this.addCommand({id:"add-summary-tracker",name:"Add Summary Tracker",callback:()=>this.addCodeBlock(eo.Summary)})}))}loadSettings(){return e(this,void 0,void 0,(function*(){this.settings=Object.assign({},Ku,yield this.loadData())}))}saveSettings(){return e(this,void 0,void 0,(function*(){yield this.saveData(this.settings)}))}renderErrorMessage(t,e,n){!function(t,e){ne(t).select("#svg").remove(),ne(t).append("div").text(e).style("background-color","white").style("margin-bottom","20px").style("padding","10px").style("color","red")}(e,t),n.appendChild(e)}onunload(){console.log("unloading obsidian-tracker plugin")}getFilesInFolder(e,n=!0){let r=[];for(let i of e.children)i instanceof t.TFile?"md"===i.extension&&r.push(i):i instanceof t.TFolder&&n&&(r=r.concat(this.getFilesInFolder(i)));return r}getFiles(n,r,i=!0){return e(this,void 0,void 0,(function*(){if(!n)return;let e=r.folder,i=r.specifiedFilesOnly,a=r.file,l=r.fileContainsLinkedFiles,o=r.fileMultiplierAfterLink;if(!i){let r=this.app.vault.getAbstractFileByPath(t.normalizePath(e));if(r&&r instanceof t.TFolder){let t=this.getFilesInFolder(r);for(let e of t)n.push(e)}}for(let e of a){let r=e;r.endsWith(".md")||(r+=".md"),r=t.normalizePath(r);let i=this.app.vault.getAbstractFileByPath(r);i&&i instanceof t.TFile&&n.push(i)}let u=1,s=!0;""===o?s=!1:/^[0-9]+$/.test(o)?(u=parseFloat(o),s=!1):/\?/.test(o)||(s=!1);for(let e of l){e.endsWith(".md")||(e+=".md");let i=this.app.vault.getAbstractFileByPath(t.normalizePath(e));if(i&&i instanceof t.TFile){let a=this.app.metadataCache.getFileCache(i),l=(yield this.app.vault.adapter.read(i.path)).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/);if(!(null==a?void 0:a.links))continue;for(let i of a.links){if(!i)continue;let a=this.app.metadataCache.getFirstLinkpathDest(i.link,e);if(a&&a instanceof t.TFile){if(s){let t=i.position.end.line;if(t>=0&&t1)for(let e of t){if(e=e.trim(),""===e){a="Empty search target is not allowed.";break}l.push(e)}else""===r.searchTarget?a="Empty search target is not allowed.":l.push(r.searchTarget)}else a="Invalid search target (searchTarget)";for(let t=0;tt!==to.Table)).length>0)return"searchType 'table' doestn't work with other types for now";let f=[],c=Vu("separator",r.separator,o,"",null,!0);if("string"==typeof c)return c;f=c.map((t=>"comma"===t||"\\,"===t?",":t));let h=Iu("xDataset",r.xDataset,o,-1,!0);if("string"==typeof h)return h;let d=h.map((t=>t<0||t>=o?-1:t)),g=[];for(let t=0;tt.getId()===e)))return a="Duplicated dataset id for key '"+t+"'",a;C.push(t),m.push(t)}for(let t of i)if(!y.includes(t)&&!m.includes(t))return a="'"+t+"' is not an available key",a;if(0===v.length+x.length+A.length+w.length+k.length+b.length+D.length)return"No output parameter provided, please place line, bar, pie, month, bullet, or summary.";p.folder=Lu(null==r?void 0:r.folder,n.settings.folder),""===p.folder.trim()&&(p.folder=n.settings.folder);let M=n.app.vault.getAbstractFileByPath(t.normalizePath(p.folder));if(!(M&&M instanceof t.TFolder))return"Folder '"+p.folder+"' doesn't exist";if("string"==typeof r.file){let t=Pu("file",r.file);if("string"==typeof t)return t;p.file=t}if("boolean"==typeof r.specifiedFilesOnly&&(p.specifiedFilesOnly=r.specifiedFilesOnly),"string"==typeof r.fileContainsLinkedFiles){let t=Pu("fileContainsLinkedFiles",r.fileContainsLinkedFiles);if("string"==typeof t)return t;p.fileContainsLinkedFiles=t}p.fileMultiplierAfterLink=Lu(null==r?void 0:r.fileMultiplierAfterLink,p.fileMultiplierAfterLink);const T=r.dateFormat;if("string"==typeof r.dateFormat?""===r.dateFormat?p.dateFormat=n.settings.dateFormat:p.dateFormat=T:p.dateFormat=n.settings.dateFormat,p.dateFormatPrefix=Lu(null==r?void 0:r.dateFormatPrefix,p.dateFormatPrefix),p.dateFormatSuffix=Lu(null==r?void 0:r.dateFormatSuffix,p.dateFormatSuffix),"string"==typeof r.startDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.startDate))return"'m' for 'minute' is too small for parameter startDate, please use 'd' for 'day' or 'M' for month";let t=Co(r.startDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=Eo(t,p.dateFormat),e?n=!0:(e=Mo(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid startDate, the format of startDate may not match your dateFormat "+p.dateFormat;p.startDate=e}if("string"==typeof r.endDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.endDate))return"'m' for 'minute' is too small for parameter endDate, please use 'd' for 'day' or 'M' for month";let t=Co(r.endDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=Eo(t,p.dateFormat),e?n=!0:(e=Mo(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid endDate, the format of endDate may not match your dateFormat "+p.dateFormat;p.endDate=e}if(null!==p.startDate&&p.startDate.isValid()&&null!==p.endDate&&p.endDate.isValid()&&p.endDateparseInt(t,10))),2==e.length&&(p.aspectRatio=new xo(e[0],e[1]),p.dataAreaSize=p.aspectRatio.recalculateSize(p.dataAreaSize))}let O=Iu("margin",r.margin,4,10,!0);if("string"==typeof O)return O;if(O.length>4)return"margin accepts not more than four values for top, right, bottom, and left margins.";p.margin=new Ao(O[0],O[1],O[2],O[3]);for(let t of C){let e=new uo,n=r[t],i=Yu(e),l=Yu(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let o=-1,u=t.replace("dataset","");o=""===u?0:parseFloat(u),e.id=o,e.name=Lu(null==n?void 0:n.name,e.name);let s=Pu("xData",null==n?void 0:n.xData);if("string"==typeof s)return s;e.xData=s;let f=e.xData.length,c=Pu("yData",null==n?void 0:n.yData);if("string"==typeof c)return c;if(e.yData=c,e.yData.length!==f)return"Number of elements in xData and yData not matched";p.customDataset.push(e)}for(let t of v){let e=new fo,n=r[t],i=Yu(e),l=Yu(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let u=$u(n,e);if("string"==typeof u)return u;let s=Vu("lineColor",null==n?void 0:n.lineColor,o,"",Su,!0);if("string"==typeof s)return s;e.lineColor=s;let f=Iu("lineWidth",null==n?void 0:n.lineWidth,o,1.5,!0);if("string"==typeof f)return f;e.lineWidth=f;let c=Nu("showLine",null==n?void 0:n.showLine,o,!0,!0);if("string"==typeof c)return c;e.showLine=c;let h=Nu("showPoint",null==n?void 0:n.showPoint,o,!0,!0);if("string"==typeof h)return h;e.showPoint=h;let d=Vu("pointColor",null==n?void 0:n.pointColor,o,"#69b3a2",Su,!0);if("string"==typeof d)return d;e.pointColor=d;let g=Vu("pointBorderColor",null==n?void 0:n.pointBorderColor,o,"#69b3a2",Su,!0);if("string"==typeof g)return g;e.pointBorderColor=g;let y=Iu("pointBorderWidth",null==n?void 0:n.pointBorderWidth,o,0,!0);if("string"==typeof y)return y;e.pointBorderWidth=y;let m=Iu("pointSize",null==n?void 0:n.pointSize,o,3,!0);if("string"==typeof m)return m;e.pointSize=m;let v=Nu("fillGap",null==n?void 0:n.fillGap,o,!1,!0);if("string"==typeof v)return v;e.fillGap=v;let x=Vu("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",Fu,!0);if("string"==typeof x)return x;e.yAxisLocation=x,p.line.push(e)}for(let t of x){let e=new co,n=r[t],i=Yu(e),l=Yu(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let u=$u(n,e);if("string"==typeof u)return u;let s=Vu("barColor",null==n?void 0:n.barColor,o,"",Su,!0);if("string"==typeof s)return s;e.barColor=s;let f=Vu("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",Fu,!0);if("string"==typeof f)return f;e.yAxisLocation=f,p.bar.push(e)}for(let t of A){let e=new ho,n=r[t],i=Yu(e),l=Yu(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=Lu(null==n?void 0:n.title,e.title);let o=Pu("data",null==n?void 0:n.data);if("string"==typeof o)return o;e.data=o;let u=e.data.length,s=Vu("dataColor",null==n?void 0:n.dataColor,u,null,Su,!0);if("string"==typeof s)return s;e.dataColor=s;let f=Vu("dataName",null==n?void 0:n.dataName,u,"",null,!0);if("string"==typeof f)return f;e.dataName=f;let c=Vu("label",null==n?void 0:n.label,u,"",null,!0);if("string"==typeof c)return c;e.label=c,"number"==typeof(null==n?void 0:n.hideLabelLessThan)&&(e.hideLabelLessThan=n.hideLabelLessThan);let h=Vu("extLabel",null==n?void 0:n.extLabel,u,"",null,!0);if("string"==typeof h)return h;e.extLabel=h,"boolean"==typeof(null==n?void 0:n.showExtLabelOnlyIfNoLabel)&&(e.showExtLabelOnlyIfNoLabel=n.showExtLabelOnlyIfNoLabel),"number"==typeof(null==n?void 0:n.ratioInnerRadius)&&(e.ratioInnerRadius=n.ratioInnerRadius),"boolean"==typeof(null==n?void 0:n.showLegend)&&(e.showLegend=n.showLegend),e.legendPosition=Lu(null==n?void 0:n.legendPosition,"right");let d="horizontal";d="top"===e.legendPosition||"bottom"===e.legendPosition?"horizontal":"left"===e.legendPosition||"right"===e.legendPosition?"vertical":"horizontal",e.legendOrientation=Lu(null==n?void 0:n.legendOrientation,d),e.legendBgColor=Lu(null==n?void 0:n.legendBgColor,e.legendBgColor),e.legendBorderColor=Lu(null==n?void 0:n.legendBorderColor,e.legendBorderColor),p.pie.push(e)}for(let t of w){let e=new go,n=r[t],i=Yu(e),l=Yu(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.template=Lu(null==n?void 0:n.template,e.template),e.style=Lu(null==n?void 0:n.style,e.style),p.summary.push(e)}for(let t of b){let e=new po,n=r[t],i=Yu(e),l=Yu(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.mode=Lu(null==n?void 0:n.mode,e.mode);let o=Ou("dataset",null==n?void 0:n.dataset);if("string"==typeof o)return o;if(0===o.length)for(let t of g)o.push(t.getId());e.dataset=o;let u=e.dataset.length;e.startWeekOn=Lu(null==n?void 0:n.startWeekOn,e.startWeekOn),"boolean"==typeof(null==n?void 0:n.showCircle)&&(e.showCircle=n.showCircle);let s=Ou("threshold",null==n?void 0:n.threshold);if("string"==typeof s)return s;if(e.threshold=s,0===e.threshold.length)for(let t=0;t1))return a="Empty range is not allowed",a;{let t=u[0];if(t<0)return a="Negative range value is not allowed",a;for(let e=1;ee(this,void 0,void 0,(function*(){let n=null;s.queries.some((t=>{let e=t.getType();return t.getTarget(),e===to.Frontmatter||e===to.Tag||e===to.Wiki||e===to.WikiLink||e===to.WikiDisplay}))&&(n=this.app.metadataCache.getFileCache(t));let r=null;s.queries.some((t=>{let e=t.getType(),n=t.getTarget();return e===to.Tag||e===to.Text||e===to.dvField||e===to.Task||e===to.TaskDone||e===to.TaskNotDone||e===to.FileMeta&&("numWords"===n||"numChars"===n||"numSentences"===n)}))&&(r=yield this.app.vault.adapter.read(t.path));let i=new Map,a=!1;for(let e of s.xDataset)if(!i.has(e)){let l=window.moment("");if(-1===e)l=zu(t,s);else{let i=s.queries[e];switch(i.getType()){case to.Frontmatter:l=Ru(n,i,s);break;case to.Tag:l=Hu(r,i,s);break;case to.Text:l=Xu(r,i,s);break;case to.dvField:l=Wu(r,i,s);break;case to.FileMeta:l=ju(t,i,s);break;case to.Task:case to.TaskDone:case to.TaskNotDone:l=qu(r,i,s)}}l.isValid()?(null!==s.startDate&&ls.endDate&&(a=!0,h.fileOutOfDateRange++)):(a=!0,h.fileNotInFormat++),a||(h.gotAnyValidXValue||(h.gotAnyValidXValue=!0),i.set(e,Fo(l,s.dateFormat)),h.fileAvailable++,1==h.fileAvailable?(h.minDate=l.clone(),h.maxDate=l.clone()):(lh.maxDate&&(h.maxDate=l.clone())))}if(a)return;const l=s.queries.filter((t=>t.getType()!==to.Table&&!t.usedAsXDataset)).map((a=>e(this,void 0,void 0,(function*(){if(n&&a.getType()===to.Tag){let t=function(t,e,n,r,i){let a=t.frontmatter,l=[];if(a&&a.tags){let t=0,o=!1;if(Array.isArray(a.tags))l=l.concat(a.tags);else if("string"==typeof a.tags){let t=a.tags.split(e.getSeparator(!0));for(let e of t){let t=e.trim();""!==t&&l.push(t)}}for(let a of l){if(a===e.getTarget())t+=n.constValue[e.getId()],o=!0,e.addNumTargets();else{if(!a.startsWith(e.getTarget()+"/"))continue;t+=n.constValue[e.getId()],o=!0,e.addNumTargets()}let l=null;return o&&(l=t),Gu(r,i.get(n.xDataset[e.getId()]),e,l),!0}}return!1}(n,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&a.getType()===to.Frontmatter&&"tags"!==a.getTarget()){let t=function(t,e,n,r,i){let a=t.frontmatter;if(a){let t=No(a,e.getTarget());if(t){let a=Vo(t,n.textValueMap);if(null===a.value&&("true"!==t&&"false"!==t||(a.type=no.Number,a.value="true"===t?1:0)),null!==a.value)return a.type===no.Time&&(e.valueType=no.Time),e.addNumTargets(),Gu(r,i.get(n.xDataset[e.getId()]),e,a.value),!0}else if(e.getParentTarget()&&No(a,e.getParentTarget())){let t=No(a,e.getParentTarget()),l=null;if(Array.isArray(t)?l=t.map((t=>t.toString())):"string"==typeof t&&(l=t.split(e.getSeparator())),l&&l.length>e.getAccessor()&&e.getAccessor()>=0){let t=Vo(l[e.getAccessor()].trim(),n.textValueMap);if(null!==t.value)return t.type===no.Time&&(e.valueType=no.Time),e.addNumTargets(),Gu(r,i.get(n.xDataset[e.getId()]),e,t.value),!0}}}return!1}(n,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&(a.getType()===to.Wiki||a.getType()===to.WikiLink||a.getType()===to.WikiDisplay)){let t=function(t,e,n,r,i){let a=t.links;if(!a)return!1;let l=e.getTarget(),o=e.getType(),u="",s=l;for(let t of a){if(!t)continue;let e="";o===to.Wiki?e=t.displayText?t.displayText:t.link:o===to.WikiLink?e=t.link:o===to.WikiDisplay?t.displayText&&(e=t.displayText):e=t.displayText?t.displayText:t.link,e=e.trim(),u+=e+"\n"}return Qu(u,s,e,r,i,n)}(n,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&a.getType()===to.Tag){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a.length>1&&a.startsWith("#")&&(a=a.substring(1)),Qu(t,"(^|\\s)#"+a+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&a.getType()===to.Text){let t=function(t,e,n,r,i){return Qu(t,e.getTarget(),e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(a.getType()===to.FileMeta){let e=Zu(t,r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=e)}if(r&&a.getType()===to.dvField){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a=a.replace("-","[\\s\\-]"),Qu(t,String.raw`(^| |\t|\|)(\[|\()?\*{0,2}`+a+String.raw`\*{0,2}(::[ |\t]*(?[\p{ExtPict}\d\.\/\-\w,@; \t:`+"\\w$€£¥¢₹₨₱₩฿₫₪α-ωΑ-Ω©®℗™℠一-鿿㐀-䶿 、-〿"+String.raw`]*)(\]|\))?)`,e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&(a.getType()===to.Task||a.getType()===to.TaskDone||a.getType()===to.TaskNotDone)){let t=function(t,e,n,r,i){let a=e.getType(),l=e.getTarget();return l=a===to.Task?"\\[[\\sx]\\]\\s"+l:a===to.TaskDone?"\\[x\\]\\s"+l:a===to.TaskNotDone?"\\[\\s\\]\\s"+l:"\\[[\\sx]\\]\\s"+l,Qu(t,l,e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}}))));yield Promise.all(l)}))));if(yield Promise.all(d),yield this.collectDataFromTable(c,s,h),h.errorMessage)return this.renderErrorMessage(h.errorMessage,i,r);let g="";if(h.minDate.isValid()&&h.maxDate.isValid()&&0!==h.fileAvailable&&h.gotAnyValidXValue||(g="No valid date as X value found in notes",h.fileOutOfDateRange>0&&(g+=`\n${h.fileOutOfDateRange} files are out of the date range.`),h.fileNotInFormat&&(g+=`\n${h.fileNotInFormat} files are not in the right format.`)),null===s.startDate&&null===s.endDate?(s.startDate=h.minDate.clone(),s.endDate=h.maxDate.clone()):null!==s.startDate&&null===s.endDate?s.startDateh.minDate?s.startDate=h.minDate.clone():g="Invalid date range":(s.startDateh.maxDate&&s.endDate>h.maxDate)&&(g="Invalid date range"),g)return this.renderErrorMessage(g,i,r);if(!h.gotAnyValidYValue)return this.renderErrorMessage("No valid Y value found in notes",i,r);let p=new lo(s.startDate,s.endDate);for(let t of s.queries){let e=p.createDataset(t,s);e.addNumTargets(t.getNumTargets());for(let n=s.startDate.clone();n<=s.endDate;n.add(1,"days"))if(c.has(Fo(n,s.dateFormat))){let r=c.get(Fo(n,s.dateFormat)).filter((function(e){return e.query.equalTo(t)}));if(r.length>0){let t=null;for(let e=0;et.getType()===to.Table)),a=[],l=!1;for(let n of e){let e=n.getParentTarget(),r=this.app.vault.getAbstractFileByPath(t.normalizePath(e+".md"));if(!(r&&r instanceof t.TFile)){l=!0;break}let i=n.getAccessor(),o=n.usedAsXDataset,u=a.find((t=>t.filePath===e&&t.tableIndex===i));if(u)o?u.xDataset=n:u.yDatasets.push(n);else{let t=new bo(e,i);o?t.xDataset=n:t.yDatasets.push(n),a.push(t)}}if(l)i.errorMessage="File containing tables not found";else for(let e of a){let a=e.xDataset;if(!a)continue;let l=e.yDatasets,o=a.getParentTarget(),u=a.getAccessor(),s="";o+=".md";let f=this.app.vault.getAbstractFileByPath(t.normalizePath(o));if(!(f&&f instanceof t.TFile))continue;{i.fileAvailable++;let t,e=yield this.app.vault.adapter.read(f.path),n=new RegExp("((\\r?\\n){2}|^)([^\\r\\n]*\\|[^\\r\\n]*(\\r?\\n)?)+(?=(\\r?\\n){2}|$)","gm"),r=0;for(;t=n.exec(e);){if(r===u){s=t[0];break}r++}}let c=s.split(/\r?\n/);c=c.filter((t=>""!==t));let h=0,d=0;if(c.length>=2){let t=c.shift().trim();t=Io(t,"|"),h=t.split("|").length;let e=c.shift().trim();e=Io(e,"|");let n=e.split("|");for(let t of n)if(!t.includes("-"))break;d=c.length}if(0==d)continue;let g=a.getAccessor(1);if(g>=h)continue;let p=[];for(let t of c){let e=Io(t.trim(),"|").split("|");if(gi.maxDate&&(i.maxDate=t.clone())):(i.minDate=t.clone(),i.maxDate=t.clone())):p.push(null)}else p.push(null)}if(p.every((t=>null===t)))return void(i.errorMessage="No valid date as X value found in table");i.gotAnyValidXValue||(i.gotAnyValidXValue=!0);for(let t of l){let e=t.getAccessor(1);if(e>=h)continue;let a=0;for(let l of c){let o=Io(l.trim(),"|").split("|");if(et.getAccessor(2)&&t.getAccessor(2)>=0){let e=null,o=Vo(l[t.getAccessor(2)].trim(),r.textValueMap);null!==o.value&&(o.type===no.Time&&(t.valueType=no.Time),e=o.value,ae?1:t>=e?0:NaN}function r(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function i(t){let e,i,o;function l(t,n,r=0,a=t.length){if(r>>1;i(t[e],n)<0?r=e+1:a=e}while(rn(t(e),r),o=(e,n)=>t(e)-n):(e=t===n||t===r?t:a,i=t,o=t),{left:l,center:function(t,e,n=0,r=t.length){const i=l(t,e,n,r-1);return i>n&&o(t[i-1],e)>-o(t[i],e)?i-1:i},right:function(t,n,r=0,a=t.length){if(r>>1;i(t[e],n)<=0?r=e+1:a=e}while(r=t))-(null==e||!(e>=e))||(te?1:0)}const c=Math.sqrt(50),h=Math.sqrt(10),d=Math.sqrt(2);function g(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=c?10:a>=h?5:a>=d?2:1;let l,u,s;return i<0?(s=Math.pow(10,-i)/o,l=Math.round(t*s),u=Math.round(e*s),l/se&&--u,s=-s):(s=Math.pow(10,i)*o,l=Math.round(t/s),u=Math.round(e/s),l*se&&--u),u=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function v(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function x(t,e,r=0,i=1/0,a){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=e&&e<=i))return t;for(a=void 0===a?f:function(t=n){if(t===n)return f;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){const n=i-r+1,o=e-r+1,l=Math.log(n),u=.5*Math.exp(2*l/3),s=.5*Math.sqrt(l*u*(n-u)/n)*(o-n/2<0?-1:1);x(t,e,Math.max(r,Math.floor(e-o*u/n+s)),Math.min(i,Math.floor(e+(n-o)*u/n+s)),a)}const n=t[e];let o=r,l=i;for(A(t,r,e),a(t[i],n)>0&&A(t,r,i);o0;)--l}0===a(t[r],n)?A(t,r,l):(++l,A(t,l,i)),l<=e&&(r=l+1),e<=l&&(i=l-1)}return t}function A(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function w(t,e){return function(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return v(t);if(e>=1)return m(t);var r,i=(r-1)*e,a=Math.floor(i),o=m(x(t,a).subarray(0,a+1));return o+(v(t.subarray(a+1))-o)*(i-a)}}(t,.5,e)}function b(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r+t(e)}function N(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function I(){return!this.__axis}function L(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=t===C||t===_?-1:1,f=t===_||t===M?"x":"y",c=t===C||t===T?F:S;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):k:i,p=Math.max(a,0)+l,y=e.range(),m=+y[0]+u,v=+y[y.length-1]+u,x=(e.bandwidth?N:B)(e.copy(),u),A=h.selection?h.selection():h,w=A.selectAll(".domain").data([null]),b=A.selectAll(".tick").data(d,e).order(),D=b.exit(),F=b.enter().append("g").attr("class","tick"),S=b.select("line"),L=b.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(F),S=S.merge(F.append("line").attr("stroke","currentColor").attr(f+"2",s*a)),L=L.merge(F.append("text").attr("fill","currentColor").attr(f,s*p).attr("dy",t===C?"0em":t===T?"0.71em":"0.32em")),h!==A&&(w=w.transition(h),b=b.transition(h),S=S.transition(h),L=L.transition(h),D=D.transition(h).attr("opacity",E).attr("transform",(function(t){return isFinite(t=x(t))?c(t+u):this.getAttribute("transform")})),F.attr("opacity",E).attr("transform",(function(t){var e=this.parentNode.__axis;return c((e&&isFinite(e=e(t))?e:x(t))+u)}))),D.remove(),w.attr("d",t===_||t===M?o?"M"+s*o+","+m+"H"+u+"V"+v+"H"+s*o:"M"+u+","+m+"V"+v:o?"M"+m+","+s*o+"V"+u+"H"+v+"V"+s*o:"M"+m+","+u+"H"+v),b.attr("opacity",1).attr("transform",(function(t){return c(x(t)+u)})),S.attr(f+"2",s*a),L.attr(f,s*p).text(g),A.filter(I).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===M?"start":t===_?"end":"middle"),A.each((function(){this.__axis=x}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(l=+t,h):l},h.offset=function(t){return arguments.length?(u=+t,h):u},h}function V(t){return L(T,t)}function O(t){return L(_,t)}var P={value:()=>{}};function $(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,l=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var n,r,i=new Array(n),a=0;a=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),H.hasOwnProperty(e)?{space:H[e],local:t}:t}function W(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===U&&e.documentElement.namespaceURI===U?e.createElement(t):e.createElementNS(n,t)}}function j(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function q(t){var e=X(t);return(e.local?j:W)(e)}function G(){}function Q(t){return null==t?G:function(){return this.querySelector(t)}}function Z(){return[]}function K(t){return null==t?Z:function(){return this.querySelectorAll(t)}}function J(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function tt(t){return function(){return this.matches(t)}}function et(t){return function(e){return e.matches(t)}}var nt=Array.prototype.find;function rt(){return this.firstElementChild}var it=Array.prototype.filter;function at(){return Array.from(this.children)}function ot(t){return new Array(t.length)}function lt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function ut(t,e,n,r,i,a){for(var o,l=0,u=e.length,s=a.length;le?1:t>=e?0:NaN}function dt(t){return function(){this.removeAttribute(t)}}function gt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pt(t,e){return function(){this.setAttribute(t,e)}}function yt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function vt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function xt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function At(t){return function(){this.style.removeProperty(t)}}function wt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function bt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Dt(t,e){return t.style.getPropertyValue(e)||xt(t).getComputedStyle(t,null).getPropertyValue(e)}function kt(t){return function(){delete this[t]}}function Ct(t,e){return function(){this[t]=e}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Tt(t){return t.trim().split(/^|\s+/)}function _t(t){return t.classList||new Et(t)}function Et(t){this._node=t,this._names=Tt(t.getAttribute("class")||"")}function Ft(t,e){for(var n=_t(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Kt=[null];function Jt(t,e){this._groups=t,this._parents=e}function te(){return new Jt([[document.documentElement]],Kt)}function ee(t){return"string"==typeof t?new Jt([[document.querySelector(t)]],[document.documentElement]):new Jt([[t]],Kt)}function ne(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function re(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ie(){}Jt.prototype=te.prototype={constructor:Jt,select:function(t){"function"!=typeof t&&(t=Q(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=A&&(A=x+1);!(v=y[A])&&++A=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ht);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?At:"function"==typeof e?bt:wt)(t,e,null==n?"":n)):Dt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?kt:"function"==typeof e?Mt:Ct)(t,e)):this.node()[t]},classed:function(t,e){var n=Tt(t+"");if(arguments.length<2){for(var r=_t(this.node()),i=-1,a=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?qt:jt,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?be(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?be(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ce.exec(t))?new Ce(e[1],e[2],e[3],1):(e=he.exec(t))?new Ce(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=de.exec(t))?be(e[1],e[2],e[3],e[4]):(e=ge.exec(t))?be(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=pe.exec(t))?Se(e[1],e[2]/100,e[3]/100,1):(e=ye.exec(t))?Se(e[1],e[2]/100,e[3]/100,e[4]):me.hasOwnProperty(t)?we(me[t]):"transparent"===t?new Ce(NaN,NaN,NaN,0):null}function we(t){return new Ce(t>>16&255,t>>8&255,255&t,1)}function be(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ce(t,e,n,r)}function De(t){return t instanceof ie||(t=Ae(t)),t?new Ce((t=t.rgb()).r,t.g,t.b,t.opacity):new Ce}function ke(t,e,n,r){return 1===arguments.length?De(t):new Ce(t,e,n,null==r?1:r)}function Ce(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Me(){return`#${Fe(this.r)}${Fe(this.g)}${Fe(this.b)}`}function Te(){const t=_e(this.opacity);return`${1===t?"rgb(":"rgba("}${Ee(this.r)}, ${Ee(this.g)}, ${Ee(this.b)}${1===t?")":`, ${t})`}`}function _e(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ee(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fe(t){return((t=Ee(t))<16?"0":"")+t.toString(16)}function Se(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ne(t,e,n,r)}function Be(t){if(t instanceof Ne)return new Ne(t.h,t.s,t.l,t.opacity);if(t instanceof ie||(t=Ae(t)),!t)return new Ne;if(t instanceof Ne)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(o=e===a?(n-r)/l+6*(n0&&u<1?0:o,new Ne(o,l,u,t.opacity)}function Ne(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ie(t){return(t=(t||0)%360)<0?t+360:t}function Le(t){return Math.max(0,Math.min(1,t||0))}function Ve(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}ne(ie,Ae,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ve,formatHex:ve,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Be(this).formatHsl()},formatRgb:xe,toString:xe}),ne(Ce,ke,re(ie,{brighter(t){return t=null==t?oe:Math.pow(oe,t),new Ce(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ae:Math.pow(ae,t),new Ce(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ce(Ee(this.r),Ee(this.g),Ee(this.b),_e(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Me,formatHex:Me,formatHex8:function(){return`#${Fe(this.r)}${Fe(this.g)}${Fe(this.b)}${Fe(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Te,toString:Te})),ne(Ne,(function(t,e,n,r){return 1===arguments.length?Be(t):new Ne(t,e,n,null==r?1:r)}),re(ie,{brighter(t){return t=null==t?oe:Math.pow(oe,t),new Ne(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ae:Math.pow(ae,t),new Ne(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ce(Ve(t>=240?t-240:t+120,i,r),Ve(t,i,r),Ve(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ne(Ie(this.h),Le(this.s),Le(this.l),_e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_e(this.opacity);return`${1===t?"hsl(":"hsla("}${Ie(this.h)}, ${100*Le(this.s)}%, ${100*Le(this.l)}%${1===t?")":`, ${t})`}`}}));const Oe=Math.PI/180,Pe=180/Math.PI,$e=.96422,Ye=1,ze=.82521,Re=4/29,Ue=6/29,He=3*Ue*Ue,Xe=Ue*Ue*Ue;function We(t){if(t instanceof qe)return new qe(t.l,t.a,t.b,t.opacity);if(t instanceof Je)return tn(t);t instanceof Ce||(t=De(t));var e,n,r=Ke(t.r),i=Ke(t.g),a=Ke(t.b),o=Ge((.2225045*r+.7168786*i+.0606169*a)/Ye);return r===i&&i===a?e=n=o:(e=Ge((.4360747*r+.3850649*i+.1430804*a)/$e),n=Ge((.0139322*r+.0971045*i+.7141733*a)/ze)),new qe(116*o-16,500*(e-o),200*(o-n),t.opacity)}function je(t,e,n,r){return 1===arguments.length?We(t):new qe(t,e,n,null==r?1:r)}function qe(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ge(t){return t>Xe?Math.pow(t,1/3):t/He+Re}function Qe(t){return t>Ue?t*t*t:He*(t-Re)}function Ze(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ke(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Je(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function tn(t){if(isNaN(t.h))return new qe(t.l,0,0,t.opacity);var e=t.h*Oe;return new qe(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ne(qe,je,re(ie,{brighter(t){return new qe(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new qe(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ce(Ze(3.1338561*(e=$e*Qe(e))-1.6168667*(t=Ye*Qe(t))-.4906146*(n=ze*Qe(n))),Ze(-.9787684*e+1.9161415*t+.033454*n),Ze(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ne(Je,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Je)return new Je(t.h,t.c,t.l,t.opacity);if(t instanceof qe||(t=We(t)),0===t.a&&0===t.b)return new Je(NaN,0()=>t;function nn(t){return 1==(t=+t)?rn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):en(isNaN(e)?n:e)}}function rn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):en(isNaN(t)?e:t)}var an=function t(e){var n=nn(e);function r(t,e){var r=n((t=ke(t)).r,(e=ke(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=rn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);var on,ln=(on=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=ra&&(i=e.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:cn(n,r)})),a=gn.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:cn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,l,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:cn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,l,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var l=a.push(i(a)+"scale(",null,",",null,")");o.push({i:l-4,x:cn(t,n)},{i:l-2,x:cn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,l,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n=0&&e._call.call(void 0,t),e=e._next;--_n}()}finally{_n=0,function(){var t,e,n=Mn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Mn=e);Tn=t,Un(r)}(),Nn=0}}function Rn(){var t=Ln.now(),e=t-Bn;e>Sn&&(In-=e,Bn=t)}function Un(t){_n||(En&&(En=clearTimeout(En)),t-Nn>24?(t<1/0&&(En=setTimeout(zn,t-Ln.now()-In)),Fn&&(Fn=clearInterval(Fn))):(Fn||(Bn=Ln.now(),Fn=setInterval(Rn,Sn)),_n=1,Vn(zn)))}function Hn(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}$n.prototype=Yn.prototype={constructor:$n,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?On():+n)+(null==e?0:+e),this._next||Tn===this||(Tn?Tn._next=this:Mn=this,Tn=this),this._call=t,this._time=n,Un()},stop:function(){this._call&&(this._call=null,this._time=1/0,Un())}};var Xn=$("start","end","cancel","interrupt"),Wn=[],jn=0,qn=1,Gn=2,Qn=3,Zn=4,Kn=5,Jn=6;function tr(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=qn,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var s,f,c,h;if(n.state!==qn)return u();for(s in i)if((h=i[s]).name===n.name){if(h.state===Qn)return Hn(o);h.state===Zn?(h.state=Jn,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+sjn)throw new Error("too late; already scheduled");return n}function nr(t,e){var n=rr(t,e);if(n.state>Qn)throw new Error("too late; already running");return n}function rr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ir(t,e){var n,r;return function(){var i=nr(this,t),a=i.tween;if(a!==n)for(var o=0,l=(r=n=a).length;o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?er:nr;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}(n,t,e))},attr:function(t,e){var n=X(t),r="transform"===n?kn:lr;return this.attrTween(t,"function"==typeof e?(n.local?dr:hr)(n,r,or(this,"attr."+t,e)):null==e?(n.local?sr:ur)(n):(n.local?cr:fr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=X(t);return this.tween(n,(r.local?gr:pr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Dn:lr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Dt(this,t),o=(this.style.removeProperty(t),Dt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,wr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Dt(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=Dt(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,l))}}(t,r,or(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var u=nr(this,t),s=u.on,f=null==u.value[o]?a||(a=wr(e)):void 0;s===n&&i===f||(r=(n=s).copy()).on(l,i=f),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Dt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(or(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=rr(this.node(),n).tween,a=0,o=i.length;aGn&&n.state=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Br;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eFr)if(Math.abs(f*l-u*s)>Fr&&i){let h=n-a,d=r-o,g=l*l+u*u,p=h*h+d*d,y=Math.sqrt(g),m=Math.sqrt(c),v=i*Math.tan((_r-Math.acos((g+c-p)/(2*y*m)))/2),x=v/m,A=v/y;Math.abs(x-1)>Fr&&this._append`L${t+x*s},${e+x*f}`,this._append`A${i},${i},0,0,${+(f*h>s*d)},${this._x1=t+A*l},${this._y1=e+A*u}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(r),l=n*Math.sin(r),u=t+o,s=e+l,f=1^a,c=a?r-i:i-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>Fr||Math.abs(this._y1-s)>Fr)&&this._append`L${u},${s}`,n&&(c<0&&(c=c%Er+Er),c>Sr?this._append`A${n},${n},0,1,${f},${t-o},${e-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=s}`:c>Fr&&this._append`A${n},${n},0,${+(c>=_r)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Ir(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Lr(t){return(t=Ir(Math.abs(t)))?t[1]:NaN}var Vr,Or=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pr(t){if(!(e=Or.exec(t)))throw new Error("invalid format: "+t);var e;return new $r({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function $r(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Yr(t,e){var n=Ir(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Pr.prototype=$r.prototype,$r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var zr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Yr(100*t,e),r:Yr,s:function(t,e){var n=Ir(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Vr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ir(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Rr(t){return t}var Ur,Hr,Xr,Wr=Array.prototype.map,jr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qr(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Rr:(e=Wr.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(t.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?Rr:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Wr.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function c(t){var e=(t=Pr(t)).fill,n=t.align,c=t.sign,h=t.symbol,d=t.zero,g=t.width,p=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(p=!0,v="g"):zr[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",A="$"===h?a:/[%p]/.test(v)?u:"",w=zr[v],b=/[defgprs%]/.test(v);function D(t){var i,a,u,h=x,D=A;if("c"===v)D=w(t)+D,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==c&&(k=!1),h=(k?"("===c?c:s:"-"===c||"("===c?"":c)+h,D=("s"===v?jr[8+Vr/3]:"")+D+(k&&"("===c?")":""),b)for(i=-1,a=t.length;++i(u=t.charCodeAt(i))||u>57){D=(46===u?o+t.slice(i+1):t.slice(i))+D,t=t.slice(0,i);break}}p&&!d&&(t=r(t,1/0));var C=h.length+t.length+D.length,M=C>1)+h+t+D+M.slice(C);break;default:t=M+h+t+D}return l(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),D.toString=function(){return t+""},D}return{format:c,formatPrefix:function(t,e){var n=c(((t=Pr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Lr(e)/3))),i=Math.pow(10,-r),a=jr[8+r/3];return function(t){return n(i*t)+a}}}}function Gr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Ur=qr({thousands:",",grouping:[3],currency:["$",""]}),Hr=Ur.format,Xr=Ur.formatPrefix;const Qr=Symbol("implicit");function Zr(){var t=new l,e=[],n=[],r=Qr;function i(i){let a=t.get(i);if(void 0===a){if(r!==Qr)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new l;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Zr(e,n).unknown(r)},Gr.apply(i,arguments),i}function Kr(t){return+t}var Jr=[0,1];function ti(t){return t}function ei(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function ni(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return ie&&(n=t,t=e,e=n),s=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?ri:ni,i=a=null,c}function c(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),l,u)))(t(s(e)))}return c.invert=function(n){return s(e((a||(a=r(l,o.map(t),cn)))(n)))},c.domain=function(t){return arguments.length?(o=Array.from(t,Kr),f()):o.slice()},c.range=function(t){return arguments.length?(l=Array.from(t),f()):l.slice()},c.rangeRound=function(t){return l=Array.from(t),u=mn,f()},c.clamp=function(t){return arguments.length?(s=!!t||ti,f()):s!==ti},c.interpolate=function(t){return arguments.length?(u=t,f()):u},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,r){return t=n,e=r,f()}}function oi(){return ai()(ti,ti)}function li(t,e,n,r){var i,a=y(t,e,n);switch((r=Pr(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Lr(e)/3)))-Lr(Math.abs(t)))}(a,o))||(r.precision=i),Xr(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Lr(e)-Lr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Lr(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Hr(r)}function ui(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e=i))return[];const l=a-i+1,u=new Array(l);if(r)if(o<0)for(let t=0;t0;){if((i=p(u,s,n))===r)return a[o]=u,a[l]=s,e(a);if(i>0)u=Math.floor(u/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function si(){var t=oi();return t.copy=function(){return ii(t,si())},Gr.apply(t,arguments),ui(t)}const fi=new Date,ci=new Date;function hi(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const o=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n0))return o;let l;do{o.push(l=new Date(+n)),e(n,a),t(n)}while(lhi((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(fi.setTime(+e),ci.setTime(+r),t(fi),t(ci),Math.floor(n(fi,ci))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const di=hi((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));di.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?hi((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):di:null),di.range;const gi=1e3,pi=6e4,yi=36e5,mi=864e5,vi=6048e5,xi=2592e6,Ai=31536e6,wi=hi((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*gi)}),((t,e)=>(e-t)/gi),(t=>t.getUTCSeconds()));wi.range;const bi=hi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*gi)}),((t,e)=>{t.setTime(+t+e*pi)}),((t,e)=>(e-t)/pi),(t=>t.getMinutes()));bi.range;const Di=hi((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*pi)}),((t,e)=>(e-t)/pi),(t=>t.getUTCMinutes()));Di.range;const ki=hi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*gi-t.getMinutes()*pi)}),((t,e)=>{t.setTime(+t+e*yi)}),((t,e)=>(e-t)/yi),(t=>t.getHours()));ki.range;const Ci=hi((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*yi)}),((t,e)=>(e-t)/yi),(t=>t.getUTCHours()));Ci.range;const Mi=hi((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pi)/mi),(t=>t.getDate()-1));Mi.range;const Ti=hi((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/mi),(t=>t.getUTCDate()-1));Ti.range;const _i=hi((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/mi),(t=>Math.floor(t/mi)));function Ei(t){return hi((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pi)/vi))}_i.range;const Fi=Ei(0),Si=Ei(1),Bi=Ei(2),Ni=Ei(3),Ii=Ei(4),Li=Ei(5),Vi=Ei(6);function Oi(t){return hi((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/vi))}Fi.range,Si.range,Bi.range,Ni.range,Ii.range,Li.range,Vi.range;const Pi=Oi(0),$i=Oi(1),Yi=Oi(2),zi=Oi(3),Ri=Oi(4),Ui=Oi(5),Hi=Oi(6);Pi.range,$i.range,Yi.range,zi.range,Ri.range,Ui.range,Hi.range;const Xi=hi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Xi.range;const Wi=hi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Wi.range;const ji=hi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));ji.every=t=>isFinite(t=Math.floor(t))&&t>0?hi((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,ji.range;const qi=hi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));qi.every=t=>isFinite(t=Math.floor(t))&&t>0?hi((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,qi.range;const[Gi,Qi]=function(t,e,n,r,a,o){const l=[[wi,1,gi],[wi,5,5e3],[wi,15,15e3],[wi,30,3e4],[o,1,pi],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,yi],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,mi],[r,2,1728e5],[n,1,vi],[e,1,xi],[e,3,7776e6],[t,1,Ai]];function u(e,n,r){const a=Math.abs(n-e)/r,o=i((([,,t])=>t)).right(l,a);if(o===l.length)return t.every(y(e/Ai,n/Ai,r));if(0===o)return di.every(Math.max(y(e,n,r),1));const[u,s]=l[a/l[o-1][2][t.toLowerCase(),e])))}function fa(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ca(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function da(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ga(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=ra.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ya(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ma(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function va(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function xa(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Aa(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function wa(t,e,n){var r=ra.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ba(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Da(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ka(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ca(t,e,n){var r=ra.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=ra.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ta(t,e,n){var r=ia.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function _a(t,e,n){var r=ra.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ea(t,e,n){var r=ra.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Fa(t,e){return oa(t.getDate(),e,2)}function Sa(t,e){return oa(t.getHours(),e,2)}function Ba(t,e){return oa(t.getHours()%12||12,e,2)}function Na(t,e){return oa(1+Mi.count(ji(t),t),e,3)}function Ia(t,e){return oa(t.getMilliseconds(),e,3)}function La(t,e){return Ia(t,e)+"000"}function Va(t,e){return oa(t.getMonth()+1,e,2)}function Oa(t,e){return oa(t.getMinutes(),e,2)}function Pa(t,e){return oa(t.getSeconds(),e,2)}function $a(t){var e=t.getDay();return 0===e?7:e}function Ya(t,e){return oa(Fi.count(ji(t)-1,t),e,2)}function za(t){var e=t.getDay();return e>=4||0===e?Ii(t):Ii.ceil(t)}function Ra(t,e){return t=za(t),oa(Ii.count(ji(t),t)+(4===ji(t).getDay()),e,2)}function Ua(t){return t.getDay()}function Ha(t,e){return oa(Si.count(ji(t)-1,t),e,2)}function Xa(t,e){return oa(t.getFullYear()%100,e,2)}function Wa(t,e){return oa((t=za(t)).getFullYear()%100,e,2)}function ja(t,e){return oa(t.getFullYear()%1e4,e,4)}function qa(t,e){var n=t.getDay();return oa((t=n>=4||0===n?Ii(t):Ii.ceil(t)).getFullYear()%1e4,e,4)}function Ga(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+oa(e/60|0,"0",2)+oa(e%60,"0",2)}function Qa(t,e){return oa(t.getUTCDate(),e,2)}function Za(t,e){return oa(t.getUTCHours(),e,2)}function Ka(t,e){return oa(t.getUTCHours()%12||12,e,2)}function Ja(t,e){return oa(1+Ti.count(qi(t),t),e,3)}function to(t,e){return oa(t.getUTCMilliseconds(),e,3)}function eo(t,e){return to(t,e)+"000"}function no(t,e){return oa(t.getUTCMonth()+1,e,2)}function ro(t,e){return oa(t.getUTCMinutes(),e,2)}function io(t,e){return oa(t.getUTCSeconds(),e,2)}function ao(t){var e=t.getUTCDay();return 0===e?7:e}function oo(t,e){return oa(Pi.count(qi(t)-1,t),e,2)}function lo(t){var e=t.getUTCDay();return e>=4||0===e?Ri(t):Ri.ceil(t)}function uo(t,e){return t=lo(t),oa(Ri.count(qi(t),t)+(4===qi(t).getUTCDay()),e,2)}function so(t){return t.getUTCDay()}function fo(t,e){return oa($i.count(qi(t)-1,t),e,2)}function co(t,e){return oa(t.getUTCFullYear()%100,e,2)}function ho(t,e){return oa((t=lo(t)).getUTCFullYear()%100,e,2)}function go(t,e){return oa(t.getUTCFullYear()%1e4,e,4)}function po(t,e){var n=t.getUTCDay();return oa((t=n>=4||0===n?Ri(t):Ri.ceil(t)).getUTCFullYear()%1e4,e,4)}function yo(){return"+0000"}function mo(){return"%"}function vo(t){return+t}function xo(t){return Math.floor(+t/1e3)}function Ao(t){return new Date(t)}function wo(t){return t instanceof Date?+t:+new Date(+t)}function bo(t,e,n,r,i,a,o,l,u,s){var f=oi(),c=f.invert,h=f.domain,d=s(".%L"),g=s(":%S"),p=s("%I:%M"),y=s("%I %p"),m=s("%a %d"),v=s("%b %d"),x=s("%B"),A=s("%Y");function w(t){return(u(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:vo,s:xo,S:Pa,u:$a,U:Ya,V:Ra,w:Ua,W:Ha,x:null,X:null,y:Xa,Y:ja,Z:Ga,"%":mo},A={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:Qa,e:Qa,f:eo,g:ho,G:po,H:Za,I:Ka,j:Ja,L:to,m:no,M:ro,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:vo,s:xo,S:io,u:ao,U:oo,V:uo,w:so,W:fo,x:null,X:null,y:co,Y:go,Z:yo,"%":mo},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:Aa,e:Aa,f:Ma,g:ya,G:pa,H:ba,I:ba,j:wa,L:Ca,m:xa,M:Da,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:va,Q:_a,s:Ea,S:ka,u:ca,U:ha,V:da,w:fa,W:ga,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:ya,Y:pa,Z:ma,"%":Ta};function b(t,e){return function(n){var r,i,a,o=[],l=-1,u=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++l53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Ki(Ji(a.y,0,1))).getUTCDay(),r=i>4||0===i?$i.ceil(r):$i(r),r=Ti.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Zi(Ji(a.y,0,1))).getDay(),r=i>4||0===i?Si.ceil(r):Si(r),r=Mi.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Ki(Ji(a.y,0,1)).getUTCDay():Zi(Ji(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Ki(a)):Zi(a)}}function k(t,e,n,r){for(var i,a,o=0,l=e.length,u=n.length;o=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in na?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=b(n,x),x.X=b(r,x),x.c=b(e,x),A.x=b(n,A),A.X=b(r,A),A.c=b(e,A),{format:function(t){var e=b(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=D(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=b(t+="",A);return e.toString=function(){return t},e},utcParse:function(t){var e=D(t+="",!0);return e.toString=function(){return t},e}}}(t),ea=ta.format,ta.parse,ta.utcFormat,ta.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ko=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map((function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r{ln(t[t.length-1])})(ko);const Mo=Math.abs,To=Math.atan2,_o=Math.cos,Eo=Math.max,Fo=Math.min,So=Math.sin,Bo=Math.sqrt,No=1e-12,Io=Math.PI,Lo=Io/2,Vo=2*Io;function Oo(t){return t>=1?Lo:t<=-1?-Lo:Math.asin(t)}function Po(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Nr(e)}function $o(t){return t.innerRadius}function Yo(t){return t.outerRadius}function zo(t){return t.startAngle}function Ro(t){return t.endAngle}function Uo(t){return t&&t.padAngle}function Ho(t,e,n,r,i,a,o){var l=t-n,u=e-r,s=(o?a:-a)/Bo(l*l+u*u),f=s*u,c=-s*l,h=t+f,d=e+c,g=n+f,p=r+c,y=(h+g)/2,m=(d+p)/2,v=g-h,x=p-d,A=v*v+x*x,w=i-a,b=h*p-g*d,D=(x<0?-1:1)*Bo(Eo(0,w*w*A-b*b)),k=(b*x-v*D)/A,C=(-b*v-x*D)/A,M=(b*x+v*D)/A,T=(-b*v+x*D)/A,_=k-y,E=C-m,F=M-y,S=T-m;return _*_+E*E>F*F+S*S&&(k=M,C=T),{cx:k,cy:C,x01:-f,y01:-c,x11:k*(i/w-1),y11:C*(i/w-1)}}function Xo(){var t=$o,e=Yo,n=Co(0),r=null,i=zo,a=Ro,o=Uo,l=null,u=Po(s);function s(){var s,f,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Lo,g=a.apply(this,arguments)-Lo,p=Mo(g-d),y=g>d;if(l||(l=s=u()),hNo)if(p>Vo-No)l.moveTo(h*_o(d),h*So(d)),l.arc(0,0,h,d,g,!y),c>No&&(l.moveTo(c*_o(g),c*So(g)),l.arc(0,0,c,g,d,y));else{var m,v,x=d,A=g,w=d,b=g,D=p,k=p,C=o.apply(this,arguments)/2,M=C>No&&(r?+r.apply(this,arguments):Bo(c*c+h*h)),T=Fo(Mo(h-c)/2,+n.apply(this,arguments)),_=T,E=T;if(M>No){var F=Oo(M/c*So(C)),S=Oo(M/h*So(C));(D-=2*F)>No?(w+=F*=y?1:-1,b-=F):(D=0,w=b=(d+g)/2),(k-=2*S)>No?(x+=S*=y?1:-1,A-=S):(k=0,x=A=(d+g)/2)}var B=h*_o(x),N=h*So(x),I=c*_o(b),L=c*So(b);if(T>No){var V,O=h*_o(A),P=h*So(A),$=c*_o(w),Y=c*So(w);if(p1?0:t<-1?Io:Math.acos(t)}((z*U+R*H)/(Bo(z*z+R*R)*Bo(U*U+H*H)))/2),W=Bo(V[0]*V[0]+V[1]*V[1]);_=Fo(T,(c-W)/(X-1)),E=Fo(T,(h-W)/(X+1))}else _=E=0}k>No?E>No?(m=Ho($,Y,B,N,h,E,y),v=Ho(O,P,I,L,h,E,y),l.moveTo(m.cx+m.x01,m.cy+m.y01),ENo&&D>No?_>No?(m=Ho(I,L,O,P,c,-_,y),v=Ho(B,N,$,Y,c,-_,y),l.lineTo(m.cx+m.x01,m.cy+m.y01),_t?1:e>=t?0:NaN}function Ko(t){return t}function Jo(t,e,n){this.k=t,this.x=e,this.y=n}var tl,el,nl;jo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Jo.prototype={constructor:Jo,scale:function(t){return 1===t?this:new Jo(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Jo(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Jo.prototype,function(t){t[t.Tag=0]="Tag",t[t.Frontmatter=1]="Frontmatter",t[t.Wiki=2]="Wiki",t[t.WikiLink=3]="WikiLink",t[t.WikiDisplay=4]="WikiDisplay",t[t.Text=5]="Text",t[t.dvField=6]="dvField",t[t.Table=7]="Table",t[t.FileMeta=8]="FileMeta",t[t.Task=9]="Task",t[t.TaskDone=10]="TaskDone",t[t.TaskNotDone=11]="TaskNotDone"}(tl||(tl={})),function(t){t[t.Line=0]="Line",t[t.Bar=1]="Bar",t[t.Pie=2]="Pie",t[t.Radar=3]="Radar",t[t.Summary=4]="Summary",t[t.Table=5]="Table",t[t.Month=6]="Month",t[t.Heatmap=7]="Heatmap",t[t.Bullet=8]="Bullet",t[t.Unknown=9]="Unknown"}(el||(el={})),function(t){t[t.Number=0]="Number",t[t.Int=1]="Int",t[t.Date=2]="Date",t[t.Time=3]="Time",t[t.DateTime=4]="DateTime",t[t.String=5]="String"}(nl||(nl={}));class rl{constructor(t,e){this.date=t,this.value=e}}class il{constructor(t,e,n){if(this.type=e,this.target=n,this.separator="",this.id=t,this.accessor=-1,this.accessor1=-1,this.accessor2=-1,this.valueType=nl.Number,this.usedAsXDataset=!1,this.numTargets=0,e===tl.Table){let t,e=new RegExp("\\[(?[0-9]+)\\]\\[(?[0-9]+)\\](\\[(?[0-9]+)\\])?","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);if(Number.isNumber(r)&&void 0!==t.groups.accessor1){let i=parseFloat(t.groups.accessor1);if(Number.isNumber(i)){let a;void 0!==t.groups.accessor2&&(a=parseFloat(t.groups.accessor2)),this.accessor=r,this.accessor1=i,Number.isNumber(a)&&(this.accessor2=a),this.parentTarget=n.replace(e,"")}break}}}else{let t,e=new RegExp("\\[(?[0-9]+)\\]","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);Number.isNumber(r)&&(this.accessor=r,this.parentTarget=n.replace(e,""));break}}}equalTo(t){return this.type===t.type&&this.target===t.target}getType(){return this.type}getTarget(){return this.target}getParentTarget(){return this.parentTarget}getId(){return this.id}getAccessor(t=0){switch(t){case 0:return this.accessor;case 1:return this.accessor1;case 2:return this.accessor2}return null}setSeparator(t){this.separator=t}getSeparator(t=!1){return""===this.separator?t?",":"/":this.separator}addNumTargets(t=1){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}}class al{constructor(t,e){this.currentIndex=0,this.name="untitled",this.query=e,this.values=[],this.parent=t,this.id=-1,this.yMin=null,this.yMax=null,this.startDate=null,this.endDate=null,this.numTargets=0,this.lineInfo=null,this.barInfo=null,this.isTmpDataset=!1,this.valueType=null==e?void 0:e.valueType;for(let e=0;e=0&&n=0&&nthis.yMax)&&(this.yMax=e),(null===this.startDate||tthis.endDate)&&(this.endDate=t.clone()))}recalculateMinMax(){this.yMin=Math.min(...this.values),this.yMax=Math.max(...this.values)}getYMin(){return this.yMin}getYMax(){return this.yMax}getStartDate(){return this.startDate}getEndDate(){return this.endDate}shift(t,e){let n=!1;for(let r=0;r=e)&&(this.values[r]=this.values[r]+t,n=!0);n&&(this.yMin=this.yMin+t,this.yMax=this.yMax+t)}setPenalty(t){for(let e=0;ethis.yMax&&(this.yMax=t))}getQuery(){return this.query}accumulateValues(){let t=0;for(let e=0;ethis.yMax&&(this.yMax=t)}getValues(){return this.values}getLength(){return this.values.length}getLengthNotNull(){let t=0;for(let e=0;e[\d\.\/-]+)\s*,\s*(?[\d\.\/-]+)\s*\)/).groups;e&&(this.translateX=parseFloat(e.x),this.translateY=parseFloat(e.y))}}}class wl{constructor(t,e){this.filePath=t,this.tableIndex=e,this.xDataset=null,this.yDatasets=[]}}class bl{constructor(){this.fileTotal=0,this.fileAvailable=0,this.fileOutOfDateRange=0,this.fileNotInFormat=0,this.errorMessage="",this.minDate=window.moment(""),this.maxDate=window.moment(""),this.gotAnyValidXValue=!1,this.gotAnyValidYValue=!1}}const Dl=function(){const t=["HH","H","hh","h"],e=["mm","m"],n=["ss","s",""];let r=[];for(let i of t)for(let t of e)for(let e of n){let n=`${i}:${t}`;""!==e&&(n+=`:${e}`),i.contains("h")&&(n+=" a"),r.push(n)}return r}();function kl(t,e,n){if(!e&&!n)return t;let r=t;if(r.startsWith("^")&&(r=r.slice(1)),e){let t=new RegExp("^("+e+")","gm");t.test(r)&&(r=r.replace(t,""))}if(n){let t=new RegExp("("+n+")$","gm");t.test(r)&&(r=r.replace(t,""))}return r}function Cl(t,e){let n=e;t.length>4&&t.startsWith("[[")&&t.endsWith("]]")&&(t=t.substring(2,t.length-2)),"iso-8601"===e.toLowerCase()&&(n=window.moment.ISO_8601);let r=window.moment(t,n,!0);return r=r.startOf("day"),r}function Ml(t,e,n=!0){if(!t||!e||0===e.length)return[null,t];let r=null;const i="^(?[0-9]+)("+e.join("|")+")$",a=new RegExp(i,"gm");let o=a.exec(t);return o&&void 0!==o.groups&&void 0!==o.groups.value&&(r=parseFloat(o.groups.value),Number.isNumber(r)&&!Number.isNaN(r))?(n&&(t=t.replace(a,"")),[r,t]):[null,t]}function Tl(t){if(!t)return null;let e=window.moment.duration(0),n=!1,r=!1;t.startsWith("+")&&(r=!1,t=t.substring(1)),t.startsWith("-")&&(r=!0,t=t.substring(1));let i=null;[i,t]=Ml(t,["year","years","Y","y"]),null!==i&&(r&&(i*=-1),e.add(i,"years"),n=!0);let a=null;[a,t]=Ml(t,["month","months","M"]),null!==a&&(r&&(a*=-1),e.add(a,"months"),n=!0);let o=null;[o,t]=Ml(t,["week","weeks","W","w"]),null!==o&&(r&&(o*=-1),e.add(o,"weeks"),n=!0);let l=null;[l,t]=Ml(t,["day","days","D","d"]),null!==l&&(r&&(l*=-1),e.add(l,"days"),n=!0);let u=null;[u,t]=Ml(t,["hour","hours","H","h"]),null!==u&&(r&&(u*=-1),e.add(u,"hours"),n=!0);let s=null;[s,t]=Ml(t,["minute","minutes","m"]),null!==s&&(r&&(s*=-1),e.add(s,"minutes"),n=!0);let f=null;return[f,t]=Ml(t,["second","seconds","S","s"]),null!==f&&(r&&(f*=-1),e.add(f,"seconds"),n=!0),n?e:null}function _l(t,e){let n=null,r=Tl(t);return r&&window.moment.isDuration(r)&&(n=Sl(e),n=n.add(r),n&&n.isValid()),n}function El(t,e){return null==t?null:"iso-8601"===e.toLowerCase()?t.format():t.format(e)}function Fl(t,e){return Cl(El(window.moment(t),e),e)}function Sl(t){return Cl(El(window.moment(),t),t)}function Bl(t,e){for(var n=(e=e.replace(/^\./,"")).split("."),r=0,i=n.length;rt!==e)),i=n.reverse().findIndex((t=>t!==e));return-1===r&&-1===i?t:t.substring(r,t.length-i)}function Il(t){if(null===t)return null;let e=new RegExp(']*?alt\\s*=\\s*[""\']?(?[^\'"" >]+?)[ \'""][^>]*?>',"g");return t.replace(e,((...t)=>{let e=t[t.length-1];return e&&e.emoji?e.emoji.trim():""}))}function Ll(t,e=null){let n=null,r=nl.Number;if("string"==typeof t)if(t.includes(":")){let e=!1;t.startsWith("-")&&(e=!0,t=t.substring(1));let i=window.moment(t,Dl,!0);i.isValid()&&(n=i.diff(window.moment("00:00","HH:mm",!0),"seconds"),e&&(n*=-1),r=nl.Time)}else if(e){const r=Object.keys(e);for(let n of r)if("string"==typeof n){let r=new RegExp(n,"gm");if(r.test(t)&&Number.isNumber(e[n])){let i=e[n].toString();t=t.replace(r,i);break}}n=parseFloat(t),Number.isNaN(n)&&(n=null)}else n=parseFloat(t),Number.isNaN(n)&&(n=null);else"number"==typeof t&&(n=t);return{type:r,value:n}}function Vl(t,e="",n=""){var r=ee("body").append("svg");let i=r.append("text").text(t).attr("x",-99999).attr("y",-99999);e&&i.attr("class",e),n&&i.attr("transform","rotate("+n+")");var a=r.node().getBBox();return r.remove(),{width:a.width,height:a.height}}function Ol(t,e,n){let r=(0|parseFloat(t.attr("width")))+e,i=(0|parseFloat(t.attr("height")))+n;t.attr("width",r),t.attr("height",i)}function Pl(t,e,n){let r=new Al(t.attr("transform"));t.attr("transform","translate("+(r.translateX+e)+","+(r.translateY+n)+")")}function $l(t){return t=(t=(t=t.replace(/(^\\s\*)|(\\s\*$)/gi,"")).replace(/\[ \]{2,}/gi," ")).replace(/\\n /,"\\n")}class Yl{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+Yl.version}static addUnaryOp(t){return Yl.max_unop_len=Math.max(t.length,Yl.max_unop_len),Yl.unary_ops[t]=1,Yl}static addBinaryOp(t,e,n){return Yl.max_binop_len=Math.max(t.length,Yl.max_binop_len),Yl.binary_ops[t]=e,n?Yl.right_associative.add(t):Yl.right_associative.delete(t),Yl}static addIdentifierChar(t){return Yl.additional_identifier_chars.add(t),Yl}static addLiteral(t,e){return Yl.literals[t]=e,Yl}static removeUnaryOp(t){return delete Yl.unary_ops[t],t.length===Yl.max_unop_len&&(Yl.max_unop_len=Yl.getMaxKeyLen(Yl.unary_ops)),Yl}static removeAllUnaryOps(){return Yl.unary_ops={},Yl.max_unop_len=0,Yl}static removeIdentifierChar(t){return Yl.additional_identifier_chars.delete(t),Yl}static removeBinaryOp(t){return delete Yl.binary_ops[t],t.length===Yl.max_binop_len&&(Yl.max_binop_len=Yl.getMaxKeyLen(Yl.binary_ops)),Yl.right_associative.delete(t),Yl}static removeAllBinaryOps(){return Yl.binary_ops={},Yl.max_binop_len=0,Yl}static removeLiteral(t){return delete Yl.literals[t],Yl}static removeAllLiterals(){return Yl.literals={},Yl}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new Yl(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map((t=>t.length)))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return Yl.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!Yl.binary_ops[String.fromCharCode(t)]||Yl.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return Yl.isIdentifierStart(t)||Yl.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(Yl.hooks[t]){const n={context:this,node:e};return Yl.hooks.run(t,n),n.node}return e}searchHook(t){if(Yl.hooks[t]){const e={context:this};return Yl.hooks[t].find((function(t){return t.call(e.context,e),e.node})),e.node}}gobbleSpaces(){let t=this.code;for(;t===Yl.SPACE_CODE||t===Yl.TAB_CODE||t===Yl.LF_CODE||t===Yl.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:Yl.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,n,r=[];for(;this.index0;){if(Yl.binary_ops.hasOwnProperty(t)&&(!Yl.isIdentifierStart(this.code)||this.index+t.lengthi.right_a&&t.right_a?n>t.prec:n<=t.prec;for(;r.length>2&&l(r[r.length-2]);)o=r.pop(),e=r.pop().value,a=r.pop(),t={type:Yl.BINARY_EXP,operator:e,left:a,right:o},r.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),r.push(i,t)}for(l=r.length-1,t=r[l];l>1;)t={type:Yl.BINARY_EXP,operator:r[l-1].value,left:r[l-2],right:t},l-=2;return t}gobbleToken(){let t,e,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(t=this.code,Yl.isDecimalDigit(t)||t===Yl.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===Yl.SQUOTE_CODE||t===Yl.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(t===Yl.OBRACK_CODE)r=this.gobbleArray();else{for(e=this.expr.substr(this.index,Yl.max_unop_len),n=e.length;n>0;){if(Yl.unary_ops.hasOwnProperty(e)&&(!Yl.isIdentifierStart(this.code)||this.index+e.length=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===Yl.COMMA_CODE){if(this.index++,r++,r!==e.length)if(t===Yl.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===Yl.CBRACK_CODE)for(let t=e.length;t{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)}))}}(Yl),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),Yl.max_unop_len=Yl.getMaxKeyLen(Yl.unary_ops),Yl.max_binop_len=Yl.getMaxKeyLen(Yl.binary_ops);const Rl=t=>new Yl(t).parse();Object.getOwnPropertyNames(Yl).forEach((t=>{void 0===Rl[t]&&"prototype"!==t&&(Rl[t]=Yl[t])})),Rl.Jsep=Yl;var Ul={name:"ternary",init(t){t.hooks.add("after-expression",(function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:i},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}}))}};Rl.plugins.register(Ul);var Hl,Xl={};function Wl(t){if("number"==typeof t){if(0===t)return!1}else if(t instanceof al&&t.getValues().some((function(t){return 0===t})))return!1;return!0}Hl=Xl,function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(n){return function(n,r){var i,a,o,l,u,s,f,c,h,d=1,g=n.length,p="";for(a=0;a=0),l.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,l.width?parseInt(l.width):0);break;case"e":i=l.precision?parseFloat(i).toExponential(l.precision):parseFloat(i).toExponential();break;case"f":i=l.precision?parseFloat(i).toFixed(l.precision):parseFloat(i);break;case"g":i=l.precision?String(Number(i.toPrecision(l.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=l.precision?i.substring(0,l.precision):i;break;case"t":i=String(!!i),i=l.precision?i.substring(0,l.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=l.precision?i.substring(0,l.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=l.precision?i.substring(0,l.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(l.type)?p+=i:(!t.number.test(l.type)||c&&!l.sign?h="":(h=c?"+":"-",i=i.toString().replace(t.sign,"")),s=l.pad_char?"0"===l.pad_char?"0":l.pad_char.charAt(1):" ",f=l.width-(h+i).length,u=l.width&&f>0?s.repeat(f):"",p+=l.align?h+i+u:"0"===s?h+u+i:u+h+i)}return p}(function(e){if(r[e])return r[e];for(var n,i=e,a=[],o=0;i;){if(null!==(n=t.text.exec(i)))a.push(n[0]);else if(null!==(n=t.modulo.exec(i)))a.push("%");else{if(null===(n=t.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){o|=1;var l=[],u=n[2],s=[];if(null===(s=t.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(l.push(s[1]);""!==(u=u.substring(s[0].length));)if(null!==(s=t.key_access.exec(u)))l.push(s[1]);else{if(null===(s=t.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");l.push(s[1])}n[2]=l}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}i=i.substring(n[0].length)}return r[e]=a}(n),arguments)}function n(t,n){return e.apply(null,[t].concat(n||[]))}var r=Object.create(null);Hl.sprintf=e,Hl.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}();const jl={min:function(t,e){return v(t.getValues())},minDate:function(t,e){let n=v(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: min not found"},max:function(t,e){return m(t.getValues())},maxDate:function(t,e){let n=m(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: max not found"},startDate:function(t,e){if(t){let e=t.getStartDate();if(e&&e.isValid())return e}return e.startDate},endDate:function(t,e){if(t){let e=t.getEndDate();if(e&&e.isValid())return e}return e.endDate},sum:function(t,e){return D(t.getValues())},count:function(t,e){return"Error: deprecated function 'count'"},numTargets:function(t,e){return t.getNumTargets()},days:function(t,e){return"Error: deprecated function 'days'"},numDays:function(t,e){return t.getLength()},numDaysHavingData:function(t,e){return t.getLengthNotNull()},maxStreak:function(t,e){let n=0,r=0;for(let e of t)e.value?n++:n=0,n>=r&&(r=n);return r},maxStreakStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?(0===n&&(i=e.date),n++):n=0,n>=r&&(r=n,a=i);return a},maxStreakEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},maxBreaks:function(t,e){let n=0,r=0;for(let e of t)e.value?n=0:n++,n>r&&(r=n);return r},maxBreaksStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?n=0:(0===n&&(i=e.date),n++),n>=r&&(r=n,a=i);return a},maxBreaksEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},lastStreak:function(t,e){return"Error: deprecated function 'lastStreak'"},currentStreak:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(!e[t].value)break;n++}}return n},currentStreakStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(!i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},currentBreaks:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(e[t].value)break;n++}}return n},currentBreaksStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},average:function(t,e){let n=t.getLengthNotNull();return Wl(n)?D(t.getValues())/n:"Error: divide by zero in expression"},median:function(t,e){return w(t.getValues())},variance:function(t,e){return function(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let l of t)null!=(l=e(l,++o,t))&&(l=+l)>=l&&(n=l-i,i+=n/++r,a+=n*(l-i))}if(r>1)return a/(r-1)}(t.getValues())}},ql={"-":function(t){if("number"==typeof t)return-1*t;if(t instanceof al){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){null!==n[e]&&(n[e]=-1*t)})),e.recalculateMinMax(),e}return"Error: unknown operation for '-'"},"+":function(t){if("number"==typeof t)return t;if(t instanceof al){return t.cloneToTmpDataset()}return"Error: unknown operation for '+'"}},Gl={"+":function(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("number"==typeof t&&e instanceof al){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&e instanceof al){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '+'"},"-":function(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("number"==typeof t&&e instanceof al){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n}if(t instanceof al&&e instanceof al){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '-'"},"*":function(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;if("number"==typeof t&&e instanceof al){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&e instanceof al){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '*'"},"/":function(t,e){if(!Wl(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t/e;if("number"==typeof t&&e instanceof al){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&e instanceof al){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '/'"},"%":function(t,e){if(!Wl(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t%e;if("number"==typeof t&&e instanceof al){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof al&&e instanceof al){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '%'"}},Ql={normalize:function(t,e,n){let r=t.getYMin(),i=t.getYMax();if(null!==r&&null!==i&&i>r){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){n[e]=(t-r)/(i-r)})),e.recalculateMinMax(),e}return"Error: invalid data range for function 'normalize'"},setMissingValues:function(t,e,n){if(e&&e.length>0){let n=e[0],r=t.cloneToTmpDataset();return Number.isNumber(n)&&!Number.isNaN(n)?(r.getValues().forEach((function(t,e,r){null===t&&(r[e]=n)})),r.recalculateMinMax(),r):"Error: invalid arguments for function 'setMissingValues'"}return"Error: invalid arguments for function 'setMissingValues"}};function Zl(t,e){switch(t.type){case"Literal":return t.value;case"Identifier":let n=t.name;return n in jl||n in Ql?`Error: deprecated template variable '${n}', use '${n}()' instead`:`Error: unknown function name '${n}'`;case"UnaryExpression":let r=t,i=Zl(r.argument,e);return"string"==typeof i?i:ql[r.operator](i);case"BinaryExpression":let a=t,o=Zl(a.left,e),l=Zl(a.right,e),u=function(t,e){return"string"==typeof t?t:"string"==typeof e?e:"number"==typeof t||window.moment.isMoment(t)||t instanceof al?"number"==typeof e||window.moment.isMoment(e)||e instanceof al?"":"Error: invalide operant type":"Error: invalid operant type"}(o,l);return"string"==typeof u&&u.startsWith("Error:")?u:Gl[a.operator](o,l);case"CallExpression":let s=t,f=s.callee.name,c=function(t,e){return t.map((function(t){return Zl(t,e)}))}(s.arguments,e);if("string"==typeof c)return c;if("dataset"===f){if(1===c.length){let t=c[0];if("string"==typeof t)return t;if("number"!=typeof t)return"Error: function 'dataset' only accepts id in number";let n=function(t,e){return e.datasets.getDatasetById(t)}(t,e);return n||`Error: no dataset found for id '${t}'`}}else{if(f in jl){if(0===c.length){let t=null;for(let n of e.datasets)t||n.getQuery().usedAsXDataset||(t=n);return t?jl[f](t,e):`No available dataset found for function ${f}`}if(1===c.length){let t=c[0];return"string"==typeof t?t:t instanceof al?jl[f](t,e):`Error: function '${f}' only accepts Dataset`}return`Error: Too many arguments for function ${f}`}if(f in Ql){if(1===c.length){if("string"==typeof c[0])return c[0];if(c[0]instanceof al){let t=c[0];return Ql[f](t,null,e)}return`Error: function ${f} only accept Dataset`}if(c.length>1){if("string"==typeof c[0])return c[0];if(c[0]instanceof al){let t=c[0];return Ql[f](t,c.filter((function(t,e,n){return e>0})),e)}return`Error: function ${f} only accept Dataset`}return`Error: Too many arguments for function ${f}`}}return`Error: unknown function name '${f}'`}return"Error: unknown expression"}function Kl(t,e){let n,r=[],i=new RegExp("{{(?[\\w+\\-*\\/0-9\\s()\\[\\]%.,]+)(::(?[\\w+\\-*\\/0-9\\s()\\[\\]%.:]+))?}}","gm");for(;n=i.exec(t);){let t=n[0];if(!r.some((e=>e.source===t))&&(void 0!==n.groups&&void 0!==n.groups.expr)){let i=n.groups.expr,a=null;try{a=Rl(i)}catch(t){return"Error:"+t.message}if(!a)return"Error: failed to parse expression";const o=Zl(a,e);if("string"==typeof o)return o;if("number"==typeof o||window.moment.isMoment(o)){let e=null;void 0!==n.groups.format&&(e=n.groups.format),r.push({source:t,value:o,format:e})}}}return r}function Jl(t,e){let n=Kl(t,e);if("string"==typeof n)return n;let r=n;for(let n of r){let r=n.source,i=n.value,a=n.format,o="";"number"==typeof i?o=a?Xl.sprintf("%"+a,i):i.toFixed(1):window.moment.isMoment(i)&&(o=El(i,a||e.dateFormat)),o&&(t=t.split(r).join(o))}return t}function tu(t,e){if(t=t.trim(),/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)$/.test(t))return parseFloat(t);let n=Kl(t,e);if("string"==typeof n)return n;let r=n;return r.length>0?r[0].value:"Error: failed to resolve values"}function eu(t,e,n,r){let i="",a=.5*n.dataAreaSize.width,o=.7*a,l=o*r.ratioInnerRadius,u=[];for(let t of r.data){let e=tu(t,n);if("string"==typeof e){i=e;break}"number"==typeof e&&u.push(e)}if(""!==i)return i;let s=[];for(let t of r.label){let e=Jl(t,n);if(e.startsWith("Error")){i=e;break}s.push(e)}if(""!==i)return i;let f=r.hideLabelLessThan,c=s.map((function(t){return Vl(t,"tracker-tick-label")})),h=[];for(let t of r.extLabel){let e=Jl(t,n);if(e.startsWith("Error")){i=e;break}h.push(e)}if(""!==i)return i;let d=h.map((function(t){return Vl(t,"tracker-pie-label")})),g=r.showExtLabelOnlyIfNoLabel,p=Zr().range(r.dataColor),y=e.dataArea.append("g");y.attr("transform",(function(){return"translate("+.5*n.dataAreaSize.width+","+.5*n.dataAreaSize.height+")"}));let m=function(){var t=Ko,e=Zo,n=null,r=Co(0),i=Co(Vo),a=Co(0);function o(o){var l,u,s,f,c,h=(o=Wo(o)).length,d=0,g=new Array(h),p=new Array(h),y=+r.apply(this,arguments),m=Math.min(Vo,Math.max(-Vo,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/h,a.apply(this,arguments)),x=v*(m<0?-1:1);for(l=0;l0&&(d+=c);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(o[t],o[e])})),l=0,s=d?(m-h*x)/d:0;l0?c*s:0)+x,p[u]={data:o[u],index:l,value:c,startAngle:y,endAngle:f,padAngle:v};return p}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Co(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Co(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Co(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Co(+t),o):a},o}(),v=m(u),x=y.selectAll("sector").data(v).enter().append("g").attr("class","sector"),A=Xo().innerRadius(l).outerRadius(o);var w=Xo().innerRadius(.9*a).outerRadius(.9*a);function b(t){return(t.endAngle-t.startAngle)/(2*Math.PI)Math.sqrt(Math.pow(u[0]-o[0],2)+Math.pow(u[1]-o[1],2))?[o,u]:[o,l,u]}x.append("path").attr("fill",(function(t,e){return p(e.toString())})).attr("d",A),y.selectAll("label").data(m(u)).enter().append("text").text((function(t,e){return b(t)?"":s[e]})).attr("transform",(function(t){return"translate("+A.centroid(t)[0]+","+A.centroid(t)[1]+")"})).style("text-anchor","middle").attr("class","tracker-pie-label"),y.selectAll("extLabel").data(v).enter().append("text").text((function(t,e){return g?""===s[e]||b(t)?h[e]:"":h[e]})).attr("transform",(function(t,e){let n=w.centroid(t),r=D(t);return n[0]=(.99*a-d[e].width)*(rc&&(c=s[t].width,f=t);let h=c/u[f].length,d=s[f].height,g=u.length,p=2*h,y=d,m=2*h,v=0,x=0;"vertical"===r.legendOrientation?(v=3*p+m+c,x=(g+1)*y):"horizontal"===r.legendOrientation&&(v=(2*p+m)*g+p+D(s,(function(t,e){return t.width})),x=y+d);let A=0,w=0;if("top"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=l,Ol(i,0,x+y),Pl(a,0,x+y);else if("bottom"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=l+n.dataAreaSize.height+y,Ol(i,0,x+y);else if("left"===r.legendPosition)A=0,w=l+n.dataAreaSize.height/2-x/2,Ol(i,v+p,0),Pl(a,v+p,0);else{if("right"!==r.legendPosition)return;A=n.dataAreaSize.width+p,w=l+n.dataAreaSize.height/2-x/2,Ol(i,v+p,0)}let b=e.graphArea.append("g").attr("id","legend").attr("transform","translate("+A+","+w+")"),k=b.append("rect").attr("class","tracker-legend").attr("width",v).attr("height",x);r.legendBgColor&&k.style("fill",r.legendBgColor),r.legendBorderColor&&k.style("stroke",r.legendBorderColor);let C=p,M=d,T=C+p+m,_=M;if("vertical"===r.legendOrientation)b.selectAll("markers").data(u).enter().append("circle").attr("cx",C+m/2).attr("cy",(function(t,e){return M+e*y})).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),b.selectAll("labels").data(u).enter().append("text").attr("x",T).attr("y",(function(t,e){return _+e*y})).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}));else if("horizontal"===r.legendOrientation){let t=0;t=0,b.selectAll("markers").data(u).enter().append("circle").attr("cx",(function(e,n){return 0===n?t=C+m/2:t+=s[n].width+p+m+p,t})).attr("cy",M).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),t=0,b.selectAll("labels").data(u).enter().append("text").attr("x",(function(e,n){return 0===n?t=T:t+=s[n].width+p+m+p,t})).attr("y",_).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}))}}(0,r,e,n),function(t,e,n){let r=ee(t),i=e.svg,a=parseFloat(i.attr("width")),o=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${o}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(o*n.fixedScale).toString()+"px"))}(t,r,e)}function ru(t,e,n){if(!e||!n)return;let r="";n.template,r=n.template;let i=Jl(r,e);if(i.startsWith("Error:"))return i;if(r=i,""!==r){let e=ee(t).append("div");if(r.includes("\n")||r.includes("\\n")){let t=r.split(/(\n|\\n)/);for(let n of t)"\n"!==n&&"\\n"!==n&&e.append("div").text(n)}else e.text(r);""!==n.style&&e.attr("style",n.style)}}let iu=!1,au=2.8,ou=1.8;function lu(t,e){let n=e.dataset;if(0===n.length)return!1;let r=null;if(null===e.selectedDataset){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;if(r)return e.selectedDataset=r.getId(),!0}else{let i=e.selectedDataset,a=n.findIndex((t=>t===i));if(a>=0){if(a===e.dataset.length-1){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;return!!r&&(e.selectedDataset=r.getId(),!0)}{a++;let i=n[a];if(r=t.datasets.getDatasetById(i),e.selectedDataset=i,r&&!r.getQuery().usedAsXDataset)return!0;lu(t,e)}}}return!1}function uu(t,e,n,r){ee(e).select("#svg").remove();for(var i=Object.getOwnPropertyNames(t),a=0;a").attr("id","arrowLeft").attr("transform","translate("+6.5*s+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){su(e,r);let o=i.clone().add(1,"month");hu(t,e,n,r,o)})).style("cursor","pointer"),p.append("text").text("◦").attr("id","arrowToday").attr("transform","translate("+6*s+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(i){su(e,r);let a=Sl(n.dateFormat);hu(t,e,n,r,a)})).style("cursor","pointer"),g+=8;let k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];"mon"===r.startWeekOn.toLowerCase()&&k.push(k.shift());let C=Vl(k[0],"tracker-month-weekday");e.graphArea.selectAll("weekDays").data(k).enter().append("text").text((function(t){return t})).attr("transform",(function(t,e){return"translate("+(e+.5)*s+","+(g+C.height)+")"})).attr("class","tracker-month-weekday").attr("text-anchor","middle").style("cursor","default").on("click",(function(t){su(e,r)})),g+=C.height+8;let M=null;r.dividingLineColor?M=r.dividingLineColor:r.color&&(M=r.color);let T=e.graphArea.append("rect").attr("x",0).attr("y",g).attr("width",6.5*s+C.width).attr("height",1).attr("class","tracker-month-dividing-line");M&&T.style("fill",M),g+=1,p.attr("height",g),e.header=p,Pl(e.dataArea,0,g)}function cu(t,e,n,r,i){if(!n||!r)return;let a=r.mode;if("circle"!==a&&"annotation"!==a)return"Unknown month view mode";let o=r.selectedDataset;if(null===o)return;let l=n.datasets.getDatasetById(o);if(!l)return;let u=r.dataset.findIndex((t=>t===o));o<0&&(u=0);let s=r.threshold[u];i.month(),i.daysInMonth();let f=Vl("30","tracker-month-label"),c=Math.max(f.width,f.height)*au,h=c/au*ou/2,d=(c-2*h)/2,g=v(l.getValues());null!==r.yMin[u]&&(g=r.yMin[u]);let p=m(l.getValues());null!==r.yMax[u]&&(p=r.yMax[u]);let y=!0;(null===p||null===g||p<=g)&&(y=!1);const x=i.clone().startOf("month");let A=x.clone().subtract(x.day(),"days");"mon"===r.startWeekOn.toLowerCase()&&(A=A.add(1,"days"));const w=i.clone().endOf("month");let b=w.clone().add(7-w.day()-1,"days");"mon"===r.startWeekOn.toLowerCase()&&(b=b.add(1,"days"));const D=l.getStartDate(),k=l.getEndDate();let C=r.showAnnotation,M=r.annotation,T=M[u],_=r.showAnnotationOfAllTargets,E=[],F=0,S=0,B=0;for(let t=A.clone();t<=b;t.add(1,"days")){t=Cl(El(t,n.dateFormat),n.dateFormat),"2021-09-13"===t.format("YYYY-MM-DD")&&(iu=!1),"mon"===r.startWeekOn.toLowerCase()?(F=t.day()-1,F<0&&(F=6),S=Math.floor(B/7)):(F=t.day(),S=Math.floor(B/7));let e=!0;(t.diff(x)<0||t.diff(w)>0)&&(e=!1);let i=!0;D&&k&&t.diff(D)>=0&&t.diff(k)<=0&&(i=!1);const a=l.getValue(t);iu&&(console.log(l),console.log(El(t,n.dateFormat)),console.log(a));let o=!1;r.circleColorByValue?(y||null!==a&&a>s)&&(o=!0):null!==a&&a>s&&(o=!0);let u=null;r.circleColorByValue&&y&&null!==a&&(u=(a-g)/(p-g)),iu&&(console.log(g),console.log(p),console.log(u));let f=l.getValue(t,1),c=l.getValue(t,-1),h=!1;null!==a&&a>s&&null!==c&&c>s&&(h=!0);let d=!1;null!==a&&a>s&&null!==f&&f>s&&(d=!0),iu&&(console.log(`preValue: ${c}, curValue: ${a}, nextValue: ${f}`),console.log(r.threshold),console.log(`streakIn: ${h}, streakOut: ${d}`));let m="";if(C)if(_)for(let e of r.dataset){let i=r.dataset.findIndex((t=>t===e));if(i>=0){let a=n.datasets.getDatasetById(e).getValue(t),o=r.threshold[i];null!==a&&a>o&&(m+=M[i])}}else a>s&&(m=T);E.push({date:El(t,n.dateFormat),value:a,scaledValue:u,dayInMonth:t.date(),isInThisMonth:e,isOutOfDataRange:i,row:S,col:F,showCircle:o,streakIn:h,streakOut:d,annotation:m}),B++,iu&&(iu=!1)}let N=(F+1)*c,I=si().domain([-.5,6.5]).range([0,N]);if("circle"===a&&r.showCircle&&r.showStreak){let t="#69b3a2";r.circleColor?t=r.circleColor:r.color&&(t=r.color),e.dataArea.selectAll("streakIn").data(E.filter((function(t){return t.streakIn}))).enter().append("rect").attr("x",(function(t){return I(t.col)-h-d})).attr("y",(function(t){return I(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?Cn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})),e.dataArea.selectAll("streakOut").data(E.filter((function(t){return t.streakOut}))).enter().append("rect").attr("x",(function(t){return I(t.col)+h})).attr("y",(function(t){return I(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?Cn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1}))}let L="#69b3a2";r.circleColor?L=r.circleColor:r.color&&(L=r.color),"circle"===a&&r.showCircle&&e.dataArea.selectAll("dot").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).style("fill",(function(t){if(t.showCircle){if(!r.circleColorByValue)return L;if(null!==t.scaledValue){return Cn("white",L)(.8*t.scaledValue+.2)}return"none"}return"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).style("cursor","default");let V=El(window.moment(),n.dateFormat);if("circle"===a&&r.showTodayRing){let t=e.dataArea.selectAll("todayRing").data(E.filter((function(t){return t.date===V}))).enter().append("circle").attr("r",.9*h).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).attr("class","tracker-month-today-circle").style("cursor","default");""!==r.todayRingColor?t.style("stroke",r.todayRingColor):t.style("stroke","white")}"circle"===a&&r.showSelectedRing&&e.dataArea.selectAll("selectedRing").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).attr("id",(function(t){return"tracker-selected-circle-"+t.date})).attr("class","tracker-month-selected-circle").style("cursor","default").style("stroke","none"),e.dataArea.selectAll("dayLabel").data(E).enter().append("text").text((function(t){return t.dayInMonth.toString()})).attr("transform",(function(t){return"translate("+I(t.col)+","+(I(t.row)+f.height/4)+")"})).style("fill-opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).attr("date",(function(t){return t.date})).attr("value",(function(t){return t.value})).attr("valueType",(function(t){return nl[l.valueType]})).attr("class","tracker-month-label").on("click",(function(t){su(e,r);let n=ee(this).attr("date");if(r.selectedDate=n,r.showSelectedRing&&e.dataArea.select("#tracker-selected-circle-"+n).style("stroke",r.selectedRingColor),r.showSelectedValue){let t=ee(this).attr("value"),n="";if("Time"===ee(this).attr("valueType")){n=window.moment("00:00","HH:mm",!0).add(parseFloat(t),"seconds").format("HH:mm")}else n=t;e.monitor.text(n)}})).style("cursor","pointer"),"annotation"===a&&C&&e.dataArea.selectAll("dayAnnotation").data(E).enter().append("text").text((function(t){return t.annotation})).attr("transform",(function(t){let e=I(t.col),n=I(t.row)+f.height/4;return t.annotation&&(n+=h),"translate("+e+","+n+")"})).attr("class","tracker-month-annotation");let O=parseFloat(e.svg.attr("width")),P=parseFloat(e.svg.attr("height")),$=parseFloat(e.graphArea.attr("width")),Y=parseFloat(e.graphArea.attr("height")),z=7*c+parseFloat(e.header.attr("height")),R=7*c;z>P&&Ol(e.svg,0,z-P),R>O&&Ol(e.svg,R-O,0),z>Y&&Ol(e.graphArea,0,z-Y),R>$&&Ol(e.svg,R-$,0)}function hu(t,e,n,r,i){n&&du&&(fu(t,e=uu(e,t,n),n,r,i),cu(0,e,n,r,i))}function du(t,e,n){if(!e||!du)return;n.dataset;let r=0;for(let t of e.datasets)t.getQuery().usedAsXDataset||r++;if(0===r)return"No available dataset found";if(lu(e,n),null===n.selectedDataset)return"No available dataset found";let i={};i=uu(i,t,e);let a=null;if(n.initMonth){if(a=_l(n.initMonth,e.dateFormat),!a){let t=window.moment(n.initMonth,"YYYY-MM",!0);if(!t.isValid())return"Invalid initMonth";a=t}}else a=e.datasets.getDates().last();a&&(fu(t,i,e,n,a),cu(0,i,e,n,a),function(t,e,n){let r=ee(t),i=e.svg,a=parseFloat(i.attr("width")),o=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${o}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(o*n.fixedScale).toString()+"px"))}(t,i,e))}function gu(t,e,n){if(e&&gu)return"Under construction"}function pu(t,e,n){if(!e||!n)return;let r=parseFloat(n.dataset);e.datasets.getDatasetById(r),"horizontal"===n.orientation?e.dataAreaSize={width:250,height:24}:"vertical"===n.orientation&&(e.dataAreaSize={width:24,height:250});let i=function(t,e,n){let r={};if(!e||!n)return;let i=ee(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);r.svg=i;let a=i.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);r.graphArea=a;let o=a.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return r.dataArea=o,r}(t,e,n),a=function(t,e,n,r){if(!e||!n)return;let i=n.range,a=i[i.length-1],o=[0,a],l=n.valueUnit,u=function(t){return l&&l.endsWith("%")?li(0,a,7)(t)+" %":li(0,a,7)(t)},s=Vl(u(a),"tracker-tick-label");if("horizontal"===n.orientation){let n=si();n.domain(o).range([0,e.dataAreaSize.width]),t.scale=n;let r=V(n);r.tickFormat(u);let i=t.dataArea.append("g").attr("id","axis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",e.dataAreaSize.width+s.width),i.attr("height",6+s.height),Ol(t.svg,+s.width,6+s.height),Ol(t.graphArea,+s.width,6+s.height)}else if("vertical"===n.orientation){let n=si();n.domain(o).range([e.dataAreaSize.height,0]),t.scale=n;let r=O(n);r.tickFormat(u);let i=t.dataArea.append("g").attr("id","axis").attr("x",0).attr("y",0).call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",6+s.width),i.attr("height",e.dataAreaSize.width),Ol(t.svg,6+s.width,0),Ol(t.graphArea,6+s.width,0),Pl(t.dataArea,6+s.width,0)}}(i,e,n);if("string"==typeof a)return a;!function(t,e,n){if(!e||!n)return;if(n.title){let r=Vl(n.title,"tracker-title-small");if("horizontal"===n.orientation){let i=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",r.width/2).attr("y",e.dataAreaSize.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=i,Ol(t.svg,r.width+6,0),Ol(t.graphArea,r.width+6,0),Pl(t.dataArea,r.width+6,0)}else if("vertical"===n.orientation){let i=e.dataAreaSize.width/2;r.width>e.dataAreaSize.width&&(Ol(t.svg,r.width-e.dataAreaSize.width,0),Ol(t.graphArea,r.width-e.dataAreaSize.width,0),Pl(t.dataArea,r.width/2-e.dataAreaSize.width/2,0),i=r.width/2);let a=parseFloat(t.axis.attr("width")),o=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",i+a).attr("y",r.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=o,Ol(t.svg,0,r.height+6),Ol(t.graphArea,0,r.height+6),Pl(t.dataArea,0,r.height+6)}}if(n.valueUnit){let r=Vl(n.valueUnit,"tracker-tick-label");if("horizontal"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",-1*(r.width+6)).attr("y",e.dataAreaSize.height+6).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i}else if("vertical"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",e.dataAreaSize.width/2-r.width/2).attr("y",-(r.height/2+6)).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i,Ol(t.svg,0,r.height+6),Ol(t.graphArea,0,r.height+6),Pl(t.dataArea,0,r.height+6)}}}(i,e,n),function(t,e,n,r){if(!e||!n)return;let i=t.scale,a=n.range,o=n.rangeColor,l=[],u=0;for(let t=0;t=e&&(n=r=e):(n>e&&(n=e),r=a&&(n=r=a):(n>a&&(n=a),rl)&&(l=e.getYMax()),s=e.valueType===nl.Time,null===u)u=s;else if(s!==u)return"Not all values in time format"}let f=null;"left"===r?f=n.yMin[0]:"right"===r&&(f=n.yMin[1]);let c=!1;"number"!=typeof f?f=o:c=!0;let h=null;"left"===r?h=n.yMax[0]:"right"===r&&(h=n.yMax[1]);let d=!1;if("number"!=typeof h?h=l:d=!0,h0&&(g=0));let v=[g,p];("left"===r&&n.reverseYAxis[0]||"right"===r&&n.reverseYAxis[1])&&(v=[p,g]),m.domain(v).range([e.dataAreaSize.height,0]),"left"===r?t.leftYScale=m:"right"===r&&(t.rightYScale=m);let x="";"left"===r?x=n.yAxisColor[0]:"right"===r&&(x=n.yAxisColor[1]);let A="";"left"===r?A=n.yAxisLabelColor[0]:"right"===r&&(A=n.yAxisLabelColor[1]);let w="";"left"===r?w=n.yAxisLabel[0]:"right"===r&&(w=n.yAxisLabel[1]);let D="",k=null,C=null;"left"===r?(D=n.yAxisUnit[0],k=n.yAxisTickInterval[0],C=n.yAxisTickLabelFormat[0]):"right"===r&&(D=n.yAxisUnit[1],k=n.yAxisTickInterval[1],C=n.yAxisTickLabelFormat[1]);let T,_=null;if(s?_=Tl(k):(_=parseFloat(k),Number.isNumber(_)&&!Number.isNaN(_)||(_=null)),"left"===r?T=O(m):"right"===r&&(T=L(M,m)),T){let t=function(t,e,n,r=!1){if(r){if(n){function i(t){return window.moment("00:00","HH:mm",!0).add(t,"seconds").format(n)}return i}{function a(n){const r=Math.abs(e-t);let i=window.moment("00:00","HH:mm",!0).add(n,"seconds").format("HH:mm");return r>43200&&(ne||(n-t)/3600%2<1)&&(i=""),i}return a}}if(n){function o(t){return Xl.sprintf("%"+n,t)}return o}return li(t,e,10)}(g,p,C,s);t&&T.tickFormat(t);let e=function(t,e,n,r=!1){const i=Math.abs(e-t);let a=[];r?a=n&&window.moment.isDuration(n)?b(t,e,Math.abs(n.asSeconds())):i>18e3?b(t=3600*Math.floor(t/3600),e=3600*Math.ceil(e/3600),3600):b(t=1800*Math.floor(t/1800),e=1800*Math.ceil(e/1800),1800):n&&"number"==typeof n&&(a=b(t,e,n));return 0===a.length?null:a}(g,p,_,s);e&&T.tickValues(e)}let E=t.dataArea.append("g").attr("id","yAxis").call(T).attr("class","tracker-axis");"right"==r&&E.attr("transform","translate("+e.dataAreaSize.width+" ,0)"),"left"===r?t.leftYAxis=E:"right"===r&&(t.rightYAxis=E);let F=E.selectAll("path");x&&F.style("stroke",x);let S=E.selectAll("line");x&&S.style("stroke",x);let B=E.selectAll("text").attr("class","tracker-tick-label");x&&B.style("fill",x);let N=0;for(let t of B)if(t.textContent){let e=Vl(t.textContent,"tracker-axis-label");e.width>N&&(N=e.width)}""!==D&&(w+=" ("+D+")");let I=Vl(w),V=E.append("text").text(w).attr("transform","rotate(-90)").attr("x",-1*e.dataAreaSize.height/2).attr("class","tracker-axis-label");"left"===r?V.attr("y",-6-N-I.height/2):V.attr("y",6+N+I.height),A&&V.style("fill",A);let P=I.height+N+6;E.attr("width",P),Ol(t.svg,P,0),Ol(t.graphArea,P,0),"left"===r&&(Pl(t.dataArea,P,0),t.title&&Pl(t.title,P,0))}function vu(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showLine[r.getId()]){let e=function(t,e){var n=Co(!0),r=null,i=qo,a=null,o=Po(l);function l(l){var u,s,f,c=(l=Wo(l)).length,h=!1;for(null==r&&(a=i(f=o())),u=0;u<=c;++u)!(u0&&(i.style("stroke",n.pointBorderColor[r.getId()]),i.style("stroke-width",n.pointBorderWidth[r.getId()]))),n.allowInspectData&&function(t,e,n){let r=e.dataArea.append("svg").style("opacity",0),i=r.append("rect").attr("x",0).attr("y",0),a=r.append("text"),o=a.append("tspan").attr("class","tracker-tooltip-label"),l=a.append("tspan").attr("class","tracker-tooltip-label"),u=3,s=3;t.on("mouseenter",(function(t){const[e,f]=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}(t);let c=0,h=0,d="date: "+ee(this).attr("date"),g=Vl(d,"tracker-tooltip-label");o.text(d),g.width>c&&(c=g.width),h+=g.height,o.attr("x",u).attr("y",h);let p="value: ",y=ee(this).attr("valueType"),m=ee(this).attr("value");if("Time"===y){p+=window.moment("00:00","HH:mm",!0).add(parseFloat(m),"seconds").format("HH:mm"),l.text(p)}else p+=m,l.text(p);let v=Vl(p,"tracker-tooltip-label");v.width>c&&(c=v.width),h+=s+v.height,l.attr("x",u).attr("y",h),c+=2*u,h+=2*s,a.attr("width",c).attr("height",h),i.attr("width",c).attr("height",h).attr("class","tracker-tooltip");let x=e,A=f,w=12,b=12;x=e+w+c>n.dataAreaSize.width?e-c-w:e+w,A=f-b-h<0?f+b:f-b-h,r.attr("x",x).attr("y",A),r.transition().duration(200).style("opacity",1)})).on("mouseleave",(function(){r.transition().duration(500).style("opacity",0)}))}(i,t,e)}}function Au(t,e,n,r,i,a,o){if(!e||!n)return;let l=e.dataAreaSize.width/r.getLength(),u=l;l-1>0&&(u=l-1),u/=o;let s=null;"left"===i?s=t.leftYScale:"right"===i&&(s=t.rightYScale);let f=t.dataArea.selectAll("bar").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("rect").attr("x",(function(e,n){if(0===n){let n=a+1-o/2;if(n<1)return t.xScale(e.date)-l/2+a*u+n*u}return t.xScale(e.date)-l/2+a*u})).attr("y",(function(t){return s(Math.max(t.value,0))})).attr("width",(function(t,e){if(0===e){let t=a+1-o/2;return t<0?0:t<1?u*t:u}if(e===r.getLength()-1){let t=1-(a+1-o/2);return t<0?0:t<1?u*t:u}return u})).attr("height",(function(t){if(null!==t.value)return Math.abs(s(t.value)-s(0))})).attr("class","tracker-bar");n.barColor[r.getId()]&&f.style("fill",n.barColor[r.getId()])}function wu(t,e,n){let r=t.svg;t.graphArea;let i=t.dataArea,a=t.title,o=t.xAxis,l=t.leftYAxis,u=t.rightYAxis,s=0;a&&(s=parseFloat(a.attr("height")));let f=parseFloat(o.attr("height")),c=0;l&&(c=parseFloat(l.attr("width")));let h=0;u&&(h=parseFloat(u.attr("width")));let d=e.datasets,g=d.getXDatasetIds(),p=d.getNames(),y=p.map((function(t){return Vl(t,"tracker-legend-label")})),m=0,v=0;for(let t=0;tv&&(v=y[t].width,m=t);let x=v/p[m].length,A=y[m].height,w=p.length-g.length,b=2*x,k=A,C=2*x,M=0,T=0;"vertical"===n.legendOrientation?(M=3*b+C+v,T=(w+1)*k):"horizontal"===n.legendOrientation&&(M=(2*b+C)*w+b+D(y,(function(t,e){return g.includes(e)?0:t.width})),T=k+A);let _=0,E=0;if("top"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=s,Ol(r,0,T+k),Pl(i,0,T+k);else if("bottom"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=s+e.dataAreaSize.height+f+k,Ol(r,0,T+k);else if("left"===n.legendPosition)_=0,E=s+e.dataAreaSize.height/2-T/2,Ol(r,M+b,0),Pl(i,M+b,0);else{if("right"!==n.legendPosition)return;_=e.dataAreaSize.width+c+h+b,E=s+e.dataAreaSize.height/2-T/2,Ol(r,M+b,0)}let F=t.graphArea.append("g").attr("id","legend").attr("transform","translate("+_+","+E+")"),S=F.append("rect").attr("class","tracker-legend").attr("width",M).attr("height",T);n.legendBgColor&&S.style("fill",n.legendBgColor),n.legendBorderColor&&S.style("stroke",n.legendBorderColor);let B=b,N=A,I=B+b+C,L=N;if("vertical"===n.legendOrientation){n.GetGraphType()===el.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",B).attr("x2",B+C).attr("y1",(function(t,e){let n=g.filter((t=>ttttt!g.includes(e)))).enter().append("rect").attr("x",(function(t,e){let n=b;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return o="Too many inputs for parameter '"+t+"'",o;if(0===e.length)return o="Empty array not allowd for "+t,o;for(let n=0;n0&&(u=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){o="Invalid inputs for "+t;break}a[n]=null!==u?u:r}else{if("boolean"!=typeof i){o="Invalid inputs for "+t;break}a[n]=i,l++}}else{let t=e[e.length-1];a[n]=l>0?t:r}}}else if("string"==typeof e){let i=Su(e);if(i.length>1){if(i.length>n)return o="Too many inputs for parameter '"+t+"'",o;for(let e=0;e0&&(u=Tu(i[e-1].trim())),""===n)a[e]=null!==u?u:r;else{let r=Tu(n);if(null===r){o="Invalid inputs for "+t;break}a[e]=r,l++}}else{let t=Tu(i[i.length-1].trim());a[e]=l>0&&null!==t?t:r}}else if(""===e);else{let n=Tu(e);if(null!==n){a[0]=n,l++;for(let t=1;ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return o="Too many inputs for parameter '"+t+"'",o;if(0===e.length)return o="Empty array not allowd for "+t,o;for(let n=0;n0&&(u=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){o="Invalid inputs for "+t;break}a[n]=null!==u?u:r}else{if("number"!=typeof i){o="Invalid inputs for "+t;break}a[n]=i,l++}}else{let t=e[e.length-1];a[n]=l>0?t:r}}}else if("string"==typeof e){let i=Su(e);if(i.length>1){if(i.length>n)return o="Too many inputs for parameter '"+t+"'",o;for(let n=0;n0&&(u=Ll(i[n-1].trim()).value),""===e)null!==u&&Number.isNumber(u)?a[n]=u:a[n]=r;else{let r=Ll(e).value;if(null===r){o="Invalid inputs for "+t;break}a[n]=r,l++}}else{let t=Ll(i[e.length-1].trim()).value;a[n]=l>0&&null!==t?t:r}}else if(""===e);else{let n=Ll(e).value;if(null!==n){a[0]=n,l++;for(let t=1;to.length;)o.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n0&&(s=e[n-1].trim()),"string"!=typeof a){l="Invalid inputs for "+t;break}if(a=a.trim(),""===a)o[n]=null!==s?s:r;else if(i){if(!i(a)){l="Invalid inputs for "+t;break}o[n]=a,u++}else o[n]=a,u++}else{let t=e[e.length-1].trim();o[n]=u>0?t:r}}}else if("string"==typeof e){let a=Su(e);if(a.length>1){if(a.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let e=0;e0&&(s=a[e-1].trim()),""===n)o[e]=null!==s?s:r;else if(i){if(!i(n)){l="Invalid inputs for "+t;break}o[e]=n,u++}else o[e]=n,u++}else{let t=a[a.length-1].trim();o[e]=u>0?t:r}}else if(""===e);else if(i)if(i(e)){o[0]=e,u++;for(let t=1;t1)for(let e of r){let r=parseFloat(e.trim());if(Number.isNaN(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}else{if(""===e){return`Empty ${t} is not allowed.`}{let r=parseFloat(e);if(!Number.isNumber(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}}}else{if("number"!=typeof e){return`Invalid ${t}`}n.push(e)}return n}function Ou(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let t of e)"string"==typeof t&&n.push(t.trim())}else{if("string"!=typeof e){return`Invalid ${t}`}{let r=Su(e);if(r.length>1)for(let t of r)n.push(t.trim());else{if(""===e){return`Empty ${t} is not allowed.`}n.push(e)}}}for(let t=0;t2)return"yAxisLabel accepts not more than two values for left and right y-axes";e.yAxisLabel=n;let r=Lu("yAxisColor",null==t?void 0:t.yAxisColor,2,"",Fu,!0);if("string"==typeof r)return r;if(r.length>2)return"yAxisColor accepts not more than two values for left and right y-axes";e.yAxisColor=r;let i=Lu("yAxisLabelColor",null==t?void 0:t.yAxisLabelColor,2,"",Fu,!0);if("string"==typeof i)return i;if(i.length>2)return"yAxisLabelColor accepts not more than two values for left and right y-axes";e.yAxisLabelColor=i;let a=Lu("yAxisUnit",null==t?void 0:t.yAxisUnit,2,"",null,!0);if("string"==typeof a)return a;if(a.length>2)return"yAxisUnit accepts not more than two values for left and right y-axes";e.yAxisUnit=a,e.xAxisTickInterval=Iu(null==t?void 0:t.xAxisTickInterval,e.xAxisTickInterval);let o=Lu("yAxisTickInterval",null==t?void 0:t.yAxisTickInterval,2,null,null,!0);if("string"==typeof o)return o;if(o.length>2)return"yAxisTickInterval accepts not more than two values for left and right y-axes";e.yAxisTickInterval=o,e.xAxisTickLabelFormat=Iu(null==t?void 0:t.xAxisTickLabelFormat,e.xAxisTickLabelFormat);let l=Lu("yAxisTickLabelFormat",null==t?void 0:t.yAxisTickLabelFormat,2,null,null,!0);if("string"==typeof l)return l;if(l.length>2)return"yAxisTickLabelFormat accepts not more than two values for left and right y-axes";e.yAxisTickLabelFormat=l;let u=Nu("yMin",null==t?void 0:t.yMin,2,null,!0);if("string"==typeof u)return u;if(u.length>2)return"yMin accepts not more than two values for left and right y-axes";e.yMin=u;let s=Nu("yMax",null==t?void 0:t.yMax,2,null,!0);if("string"==typeof s)return s;if(s.length>2)return"yMax accepts not more than two values for left and right y-axes";e.yMax=s;let f=Bu("reverseYAxis",null==t?void 0:t.reverseYAxis,2,!1,!0);return"string"==typeof f?f:f.length>2?"reverseYAxis accepts not more than two values for left and right y-axes":void(e.reverseYAxis=f)}function $u(t){let e=[];if(null!==t){const n=Object.keys(t);for(let t of n)e.push(t.toString())}return e}function Yu(t,e){return Cl(kl(t.basename,e.dateFormatPrefix,e.dateFormatSuffix),e.dateFormat)}function zu(t,e,n){let r=window.moment(""),i=t.frontmatter;if(i&&Bl(i,e.getTarget())){let t=Bl(i,e.getTarget());"string"==typeof t&&(t=kl(t,n.dateFormatPrefix,n.dateFormatSuffix),r=Cl(t,n.dateFormat))}return r}function Ru(t,e,n){let r,i=window.moment(""),a=new RegExp(e,"gm");for(;r=a.exec(t);)if(void 0!==r.groups&&void 0!==r.groups.value){let t=r.groups.value.trim();if(t=kl(t,n.dateFormatPrefix,n.dateFormatSuffix),i=Cl(t,n.dateFormat),i.isValid())return i}return i}function Uu(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),Ru(t,"(^|\\s)#"+r+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",n)}function Hu(t,e,n){return window.moment(""),Ru(t,e.getTarget(),n)}function Xu(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),r=r.replace("-","[\\s\\-]"),Ru(t,"(^| |\\t)\\*{0,2}"+r+"\\*{0,2}(::[ |\\t]*(?[\\d\\.\\/\\-\\w,@; \\t:]*))(\\r\\?\\n|\\r|$)",n)}function Wu(e,n,r){let i=window.moment("");if(e&&e instanceof t.TFile){let t=n.getTarget();if("cDate"===t){i=Fl(e.stat.ctime,r.dateFormat)}else if("mDate"===t){i=Fl(e.stat.mtime,r.dateFormat)}else"name"===t&&(i=Yu(e,r))}return i}function ju(t,e,n){window.moment("");let r=e.getType(),i=e.getTarget();return i=r===tl.Task?"\\[[\\sx]\\]\\s"+i:r===tl.TaskDone?"\\[x\\]\\s"+i:r===tl.TaskNotDone?"\\[\\s\\]\\s"+i:"\\[[\\sx]\\]\\s"+i,Ru(t,i,n)}function qu(t,e,n,r){if(t.has(e)){t.get(e).push({query:n,value:r})}else{let i=new Array;i.push({query:n,value:r}),t.set(e,i)}}function Gu(t,e,n,r,i,a){let o,l=new RegExp(e,"gmu"),u=0,s=!1;for(;o=l.exec(t);)if(a.ignoreAttachedValue[n.getId()])u+=a.constValue[n.getId()],s=!0,n.addNumTargets();else if(void 0!==o.groups&&void 0!==o.groups.value){let t=o.groups.value.trim().split(n.getSeparator());if(!t)continue;if(1===t.length){let e=Ll(t[0].trim(),a.textValueMap);null!==e.value&&(e.type===nl.Time?(u=e.value,s=!0,n.valueType=nl.Time,n.addNumTargets()):a.ignoreZeroValue[n.getId()]&&0===e.value||(u+=e.value,s=!0,n.addNumTargets()))}else if(t.length>n.getAccessor()&&n.getAccessor()>=0){let e=Ll(t[n.getAccessor()].trim(),a.textValueMap);null!==e.value&&(e.type===nl.Time?(u=e.value,s=!0,n.valueType=nl.Time,n.addNumTargets()):(u+=e.value,s=!0,n.addNumTargets()))}}else u+=a.constValue[n.getId()],s=!0,n.addNumTargets();if(s){return qu(r,i.get(a.xDataset[n.getId()]),n,u),!0}return!1}function Qu(e,n,r,i,a,o){if(e&&e instanceof t.TFile){let t=r.getTarget(),l=o.get(i.xDataset[r.getId()]);if("cDate"===t){let t=e.stat.ctime;return r.valueType=nl.Date,r.addNumTargets(),qu(a,l,r,t),!0}if("mDate"===t){let t=e.stat.mtime;return r.valueType=nl.Date,r.addNumTargets(),qu(a,l,r,t),!0}if("size"===t){let t=e.stat.size;return r.addNumTargets(),qu(a,l,r,t),!0}if("numWords"===t){return qu(a,l,r,function(t){t=$l(t);var e=new RegExp(["(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-"+/A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source+"])+",/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source].join("|"),"g");return(t.match(e)||[]).length}(n)),!0}if("numChars"===t){let t=n.length;return r.addNumTargets(),qu(a,l,r,t),!0}if("numSentences"===t){let t=function(t){return(((t=$l(t))||"").match(/[^.。!!??\s][^.。!!??]*(?:[.!?](?!['‘’"“”「」『』]?\s|$)[^.。!!??]*)*[.。!!??]?['’"”」』]?(?=\s||$)/gm)||[]).length}(n);return r.addNumTargets(),qu(a,l,r,t),!0}if("name"===t){let t=0,n=!1,o=Ll(e.basename,i.textValueMap);null!==o.value&&(o.type===nl.Time?(t=o.value,n=!0,r.valueType=nl.Time,r.addNumTargets()):i.ignoreZeroValue[r.getId()]&&0===o.value||(t+=o.value,n=!0,r.addNumTargets()));let u=null;if(n&&(u=t),null!==u)return qu(a,l,r,u),!0}}return!1}const Zu={folder:"/",dateFormat:"YYYY-MM-DD"};class Ku extends t.PluginSettingTab{constructor(t,e){super(t,e),this.plugin=e}display(){let{containerEl:n}=this;n.empty(),new t.Setting(n).setName("Default folder location").setDesc("Files in this folder will be parsed and used as input data of the tracker plugin.\nYou can also override it using 'folder' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("Folder Path").setValue(this.plugin.settings.folder).onChange((t=>e(this,void 0,void 0,(function*(){this.plugin.settings.folder=t,yield this.plugin.saveSettings()})))))),new t.Setting(n).setName("Default date format").setDesc("This format is used to parse the date in your diary title.\nYou can also override it using 'dateFormat' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("YYYY-MM-DD").setValue(this.plugin.settings.dateFormat).onChange((t=>e(this,void 0,void 0,(function*(){this.plugin.settings.dateFormat=t,yield this.plugin.saveSettings()}))))))}}class Ju extends t.Plugin{onload(){return e(this,void 0,void 0,(function*(){console.log("loading obsidian-tracker plugin"),yield this.loadSettings(),this.addSettingTab(new Ku(this.app,this)),this.registerMarkdownCodeBlockProcessor("tracker",this.postprocessor.bind(this)),this.addCommand({id:"add-line-chart-tracker",name:"Add Line Chart Tracker",callback:()=>this.addCodeBlock(el.Line)}),this.addCommand({id:"add-bar-chart-tracker",name:"Add Bar Chart Tracker",callback:()=>this.addCodeBlock(el.Bar)}),this.addCommand({id:"add-summary-tracker",name:"Add Summary Tracker",callback:()=>this.addCodeBlock(el.Summary)})}))}loadSettings(){return e(this,void 0,void 0,(function*(){this.settings=Object.assign({},Zu,yield this.loadData())}))}saveSettings(){return e(this,void 0,void 0,(function*(){yield this.saveData(this.settings)}))}renderErrorMessage(t,e,n){!function(t,e){ee(t).select("#svg").remove(),ee(t).append("div").text(e).style("background-color","white").style("margin-bottom","20px").style("padding","10px").style("color","red")}(e,t),n.appendChild(e)}onunload(){console.log("unloading obsidian-tracker plugin")}getFilesInFolder(e,n=!0){let r=[];for(let i of e.children)i instanceof t.TFile?"md"===i.extension&&r.push(i):i instanceof t.TFolder&&n&&(r=r.concat(this.getFilesInFolder(i)));return r}getFiles(n,r,i=!0){return e(this,void 0,void 0,(function*(){if(!n)return;let e=r.folder,i=r.specifiedFilesOnly,a=r.file,o=r.fileContainsLinkedFiles,l=r.fileMultiplierAfterLink;if(!i){let r=this.app.vault.getAbstractFileByPath(t.normalizePath(e));if(r&&r instanceof t.TFolder){let t=this.getFilesInFolder(r);for(let e of t)n.push(e)}}for(let e of a){let r=e;r.endsWith(".md")||(r+=".md"),r=t.normalizePath(r);let i=this.app.vault.getAbstractFileByPath(r);i&&i instanceof t.TFile&&n.push(i)}let u=1,s=!0;""===l?s=!1:/^[0-9]+$/.test(l)?(u=parseFloat(l),s=!1):/\?/.test(l)||(s=!1);for(let e of o){e.endsWith(".md")||(e+=".md");let i=this.app.vault.getAbstractFileByPath(t.normalizePath(e));if(i&&i instanceof t.TFile){let a=this.app.metadataCache.getFileCache(i),o=(yield this.app.vault.adapter.read(i.path)).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/);if(!(null==a?void 0:a.links))continue;for(let i of a.links){if(!i)continue;let a=this.app.metadataCache.getFirstLinkpathDest(i.link,e);if(a&&a instanceof t.TFile){if(s){let t=i.position.end.line;if(t>=0&&t1)for(let e of t){if(e=e.trim(),""===e){a="Empty search target is not allowed.";break}o.push(e)}else""===r.searchTarget?a="Empty search target is not allowed.":o.push(r.searchTarget)}else a="Invalid search target (searchTarget)";for(let t=0;tt!==tl.Table)).length>0)return"searchType 'table' doestn't work with other types for now";let f=[],c=Lu("separator",r.separator,l,"",null,!0);if("string"==typeof c)return c;f=c.map((t=>"comma"===t||"\\,"===t?",":t));let h=Nu("xDataset",r.xDataset,l,-1,!0);if("string"==typeof h)return h;let d=h.map((t=>t<0||t>=l?-1:t)),g=[];for(let t=0;tt.getId()===e)))return a="Duplicated dataset id for key '"+t+"'",a;C.push(t),m.push(t)}for(let t of i)if(!y.includes(t)&&!m.includes(t))return a="'"+t+"' is not an available key",a;if(0===v.length+x.length+A.length+w.length+k.length+b.length+D.length)return"No output parameter provided, please place line, bar, pie, month, bullet, or summary.";p.folder=Iu(null==r?void 0:r.folder,n.settings.folder),""===p.folder.trim()&&(p.folder=n.settings.folder);let M=n.app.vault.getAbstractFileByPath(t.normalizePath(p.folder));if(!(M&&M instanceof t.TFolder))return"Folder '"+p.folder+"' doesn't exist";if("string"==typeof r.file){let t=Ou("file",r.file);if("string"==typeof t)return t;p.file=t}if("boolean"==typeof r.specifiedFilesOnly&&(p.specifiedFilesOnly=r.specifiedFilesOnly),"string"==typeof r.fileContainsLinkedFiles){let t=Ou("fileContainsLinkedFiles",r.fileContainsLinkedFiles);if("string"==typeof t)return t;p.fileContainsLinkedFiles=t}p.fileMultiplierAfterLink=Iu(null==r?void 0:r.fileMultiplierAfterLink,p.fileMultiplierAfterLink);const T=r.dateFormat;if("string"==typeof r.dateFormat?""===r.dateFormat?p.dateFormat=n.settings.dateFormat:p.dateFormat=T:p.dateFormat=n.settings.dateFormat,p.dateFormatPrefix=Iu(null==r?void 0:r.dateFormatPrefix,p.dateFormatPrefix),p.dateFormatSuffix=Iu(null==r?void 0:r.dateFormatSuffix,p.dateFormatSuffix),"string"==typeof r.startDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.startDate))return"'m' for 'minute' is too small for parameter startDate, please use 'd' for 'day' or 'M' for month";let t=kl(r.startDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=_l(t,p.dateFormat),e?n=!0:(e=Cl(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid startDate, the format of startDate may not match your dateFormat "+p.dateFormat;p.startDate=e}if("string"==typeof r.endDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.endDate))return"'m' for 'minute' is too small for parameter endDate, please use 'd' for 'day' or 'M' for month";let t=kl(r.endDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=_l(t,p.dateFormat),e?n=!0:(e=Cl(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid endDate, the format of endDate may not match your dateFormat "+p.dateFormat;p.endDate=e}if(null!==p.startDate&&p.startDate.isValid()&&null!==p.endDate&&p.endDate.isValid()&&p.endDateparseInt(t,10))),2==e.length&&(p.aspectRatio=new vl(e[0],e[1]),p.dataAreaSize=p.aspectRatio.recalculateSize(p.dataAreaSize))}let O=Nu("margin",r.margin,4,10,!0);if("string"==typeof O)return O;if(O.length>4)return"margin accepts not more than four values for top, right, bottom, and left margins.";p.margin=new xl(O[0],O[1],O[2],O[3]);for(let t of C){let e=new ul,n=r[t],i=$u(e),o=$u(n);for(let t of o)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let l=-1,u=t.replace("dataset","");l=""===u?0:parseFloat(u),e.id=l,e.name=Iu(null==n?void 0:n.name,e.name);let s=Ou("xData",null==n?void 0:n.xData);if("string"==typeof s)return s;e.xData=s;let f=e.xData.length,c=Ou("yData",null==n?void 0:n.yData);if("string"==typeof c)return c;if(e.yData=c,e.yData.length!==f)return"Number of elements in xData and yData not matched";p.customDataset.push(e)}for(let t of v){let e=new fl,n=r[t],i=$u(e),o=$u(n);for(let t of o)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let u=Pu(n,e);if("string"==typeof u)return u;let s=Lu("lineColor",null==n?void 0:n.lineColor,l,"",Fu,!0);if("string"==typeof s)return s;e.lineColor=s;let f=Nu("lineWidth",null==n?void 0:n.lineWidth,l,1.5,!0);if("string"==typeof f)return f;e.lineWidth=f;let c=Bu("showLine",null==n?void 0:n.showLine,l,!0,!0);if("string"==typeof c)return c;e.showLine=c;let h=Bu("showPoint",null==n?void 0:n.showPoint,l,!0,!0);if("string"==typeof h)return h;e.showPoint=h;let d=Lu("pointColor",null==n?void 0:n.pointColor,l,"#69b3a2",Fu,!0);if("string"==typeof d)return d;e.pointColor=d;let g=Lu("pointBorderColor",null==n?void 0:n.pointBorderColor,l,"#69b3a2",Fu,!0);if("string"==typeof g)return g;e.pointBorderColor=g;let y=Nu("pointBorderWidth",null==n?void 0:n.pointBorderWidth,l,0,!0);if("string"==typeof y)return y;e.pointBorderWidth=y;let m=Nu("pointSize",null==n?void 0:n.pointSize,l,3,!0);if("string"==typeof m)return m;e.pointSize=m;let v=Bu("fillGap",null==n?void 0:n.fillGap,l,!1,!0);if("string"==typeof v)return v;e.fillGap=v;let x=Lu("yAxisLocation",null==n?void 0:n.yAxisLocation,l,"left",Eu,!0);if("string"==typeof x)return x;e.yAxisLocation=x,p.line.push(e)}for(let t of x){let e=new cl,n=r[t],i=$u(e),o=$u(n);for(let t of o)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let u=Pu(n,e);if("string"==typeof u)return u;let s=Lu("barColor",null==n?void 0:n.barColor,l,"",Fu,!0);if("string"==typeof s)return s;e.barColor=s;let f=Lu("yAxisLocation",null==n?void 0:n.yAxisLocation,l,"left",Eu,!0);if("string"==typeof f)return f;e.yAxisLocation=f,p.bar.push(e)}for(let t of A){let e=new hl,n=r[t],i=$u(e),o=$u(n);for(let t of o)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=Iu(null==n?void 0:n.title,e.title);let l=Ou("data",null==n?void 0:n.data);if("string"==typeof l)return l;e.data=l;let u=e.data.length,s=Lu("dataColor",null==n?void 0:n.dataColor,u,null,Fu,!0);if("string"==typeof s)return s;e.dataColor=s;let f=Lu("dataName",null==n?void 0:n.dataName,u,"",null,!0);if("string"==typeof f)return f;e.dataName=f;let c=Lu("label",null==n?void 0:n.label,u,"",null,!0);if("string"==typeof c)return c;e.label=c,"number"==typeof(null==n?void 0:n.hideLabelLessThan)&&(e.hideLabelLessThan=n.hideLabelLessThan);let h=Lu("extLabel",null==n?void 0:n.extLabel,u,"",null,!0);if("string"==typeof h)return h;e.extLabel=h,"boolean"==typeof(null==n?void 0:n.showExtLabelOnlyIfNoLabel)&&(e.showExtLabelOnlyIfNoLabel=n.showExtLabelOnlyIfNoLabel),"number"==typeof(null==n?void 0:n.ratioInnerRadius)&&(e.ratioInnerRadius=n.ratioInnerRadius),"boolean"==typeof(null==n?void 0:n.showLegend)&&(e.showLegend=n.showLegend),e.legendPosition=Iu(null==n?void 0:n.legendPosition,"right");let d="horizontal";d="top"===e.legendPosition||"bottom"===e.legendPosition?"horizontal":"left"===e.legendPosition||"right"===e.legendPosition?"vertical":"horizontal",e.legendOrientation=Iu(null==n?void 0:n.legendOrientation,d),e.legendBgColor=Iu(null==n?void 0:n.legendBgColor,e.legendBgColor),e.legendBorderColor=Iu(null==n?void 0:n.legendBorderColor,e.legendBorderColor),p.pie.push(e)}for(let t of w){let e=new dl,n=r[t],i=$u(e),o=$u(n);for(let t of o)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.template=Iu(null==n?void 0:n.template,e.template),e.style=Iu(null==n?void 0:n.style,e.style),p.summary.push(e)}for(let t of b){let e=new gl,n=r[t],i=$u(e),o=$u(n);for(let t of o)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.mode=Iu(null==n?void 0:n.mode,e.mode);let l=Vu("dataset",null==n?void 0:n.dataset);if("string"==typeof l)return l;if(0===l.length)for(let t of g)l.push(t.getId());e.dataset=l;let u=e.dataset.length;e.startWeekOn=Iu(null==n?void 0:n.startWeekOn,e.startWeekOn),"boolean"==typeof(null==n?void 0:n.showCircle)&&(e.showCircle=n.showCircle);let s=Vu("threshold",null==n?void 0:n.threshold);if("string"==typeof s)return s;if(e.threshold=s,0===e.threshold.length)for(let t=0;t1))return a="Empty range is not allowed",a;{let t=u[0];if(t<0)return a="Negative range value is not allowed",a;for(let e=1;ee(this,void 0,void 0,(function*(){let n=null;s.queries.some((t=>{let e=t.getType();return t.getTarget(),e===tl.Frontmatter||e===tl.Tag||e===tl.Wiki||e===tl.WikiLink||e===tl.WikiDisplay}))&&(n=this.app.metadataCache.getFileCache(t));let r=null;s.queries.some((t=>{let e=t.getType(),n=t.getTarget();return e===tl.Tag||e===tl.Text||e===tl.dvField||e===tl.Task||e===tl.TaskDone||e===tl.TaskNotDone||e===tl.FileMeta&&("numWords"===n||"numChars"===n||"numSentences"===n)}))&&(r=yield this.app.vault.adapter.read(t.path));let i=new Map,a=!1;for(let e of s.xDataset)if(!i.has(e)){let o=window.moment("");if(-1===e)o=Yu(t,s);else{let i=s.queries[e];switch(i.getType()){case tl.Frontmatter:o=zu(n,i,s);break;case tl.Tag:o=Uu(r,i,s);break;case tl.Text:o=Hu(r,i,s);break;case tl.dvField:o=Xu(r,i,s);break;case tl.FileMeta:o=Wu(t,i,s);break;case tl.Task:case tl.TaskDone:case tl.TaskNotDone:o=ju(r,i,s)}}o.isValid()?(null!==s.startDate&&os.endDate&&(a=!0,h.fileOutOfDateRange++)):(a=!0,h.fileNotInFormat++),a||(h.gotAnyValidXValue||(h.gotAnyValidXValue=!0),i.set(e,El(o,s.dateFormat)),h.fileAvailable++,1==h.fileAvailable?(h.minDate=o.clone(),h.maxDate=o.clone()):(oh.maxDate&&(h.maxDate=o.clone())))}if(a)return;const o=s.queries.filter((t=>t.getType()!==tl.Table&&!t.usedAsXDataset)).map((a=>e(this,void 0,void 0,(function*(){if(n&&a.getType()===tl.Tag){let t=function(t,e,n,r,i){let a=t.frontmatter,o=[];if(a&&a.tags){let t=0,l=!1;if(Array.isArray(a.tags))o=o.concat(a.tags);else if("string"==typeof a.tags){let t=a.tags.split(e.getSeparator(!0));for(let e of t){let t=e.trim();""!==t&&o.push(t)}}for(let a of o){if(a===e.getTarget())t+=n.constValue[e.getId()],l=!0,e.addNumTargets();else{if(!a.startsWith(e.getTarget()+"/"))continue;t+=n.constValue[e.getId()],l=!0,e.addNumTargets()}let o=null;return l&&(o=t),qu(r,i.get(n.xDataset[e.getId()]),e,o),!0}}return!1}(n,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&a.getType()===tl.Frontmatter&&"tags"!==a.getTarget()){let t=function(t,e,n,r,i){let a=t.frontmatter;if(a){let t=Bl(a,e.getTarget());if(t){let a=Ll(t,n.textValueMap);if(null===a.value&&("true"!==t&&"false"!==t||(a.type=nl.Number,a.value="true"===t?1:0)),null!==a.value)return a.type===nl.Time&&(e.valueType=nl.Time),e.addNumTargets(),qu(r,i.get(n.xDataset[e.getId()]),e,a.value),!0}else if(e.getParentTarget()&&Bl(a,e.getParentTarget())){let t=Bl(a,e.getParentTarget()),o=null;if(Array.isArray(t)?o=t.map((t=>t.toString())):"string"==typeof t&&(o=t.split(e.getSeparator())),o&&o.length>e.getAccessor()&&e.getAccessor()>=0){let t=Ll(o[e.getAccessor()].trim(),n.textValueMap);if(null!==t.value)return t.type===nl.Time&&(e.valueType=nl.Time),e.addNumTargets(),qu(r,i.get(n.xDataset[e.getId()]),e,t.value),!0}}}return!1}(n,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&(a.getType()===tl.Wiki||a.getType()===tl.WikiLink||a.getType()===tl.WikiDisplay)){let t=function(t,e,n,r,i){let a=t.links;if(!a)return!1;let o=e.getTarget(),l=e.getType(),u="",s=o;for(let t of a){if(!t)continue;let e="";l===tl.Wiki?e=t.displayText?t.displayText:t.link:l===tl.WikiLink?e=t.link:l===tl.WikiDisplay?t.displayText&&(e=t.displayText):e=t.displayText?t.displayText:t.link,e=e.trim(),u+=e+"\n"}return Gu(u,s,e,r,i,n)}(n,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&a.getType()===tl.Tag){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a.length>1&&a.startsWith("#")&&(a=a.substring(1)),Gu(t,"(^|\\s)#"+a+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&a.getType()===tl.Text){let t=function(t,e,n,r,i){return Gu(t,e.getTarget(),e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(a.getType()===tl.FileMeta){let e=Qu(t,r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=e)}if(r&&a.getType()===tl.dvField){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a=a.replace("-","[\\s\\-]"),Gu(t,String.raw`(^| |\t|\|)(\[|\()?\*{0,2}`+a+String.raw`\*{0,2}(::[ |\t]*(?[\p{ExtPict}\d\.\/\-\w,@; \t:`+"\\w$€£¥¢₹₨₱₩฿₫₪α-ωΑ-Ω©®℗™℠一-鿿㐀-䶿 、-〿"+String.raw`]*)(\]|\))?)`,e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&(a.getType()===tl.Task||a.getType()===tl.TaskDone||a.getType()===tl.TaskNotDone)){let t=function(t,e,n,r,i){let a=e.getType(),o=e.getTarget();return o=a===tl.Task?"\\[[\\sx]\\]\\s"+o:a===tl.TaskDone?"\\[x\\]\\s"+o:a===tl.TaskNotDone?"\\[\\s\\]\\s"+o:"\\[[\\sx]\\]\\s"+o,Gu(t,o,e,r,i,n)}(r,a,s,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}}))));yield Promise.all(o)}))));if(yield Promise.all(d),yield this.collectDataFromTable(c,s,h),h.errorMessage)return this.renderErrorMessage(h.errorMessage,i,r);let g="";if(h.minDate.isValid()&&h.maxDate.isValid()&&0!==h.fileAvailable&&h.gotAnyValidXValue||(g="No valid date as X value found in notes",h.fileOutOfDateRange>0&&(g+=`\n${h.fileOutOfDateRange} files are out of the date range.`),h.fileNotInFormat&&(g+=`\n${h.fileNotInFormat} files are not in the right format.`)),null===s.startDate&&null===s.endDate?(s.startDate=h.minDate.clone(),s.endDate=h.maxDate.clone()):null!==s.startDate&&null===s.endDate?s.startDateh.minDate?s.startDate=h.minDate.clone():g="Invalid date range":(s.startDateh.maxDate&&s.endDate>h.maxDate)&&(g="Invalid date range"),g)return this.renderErrorMessage(g,i,r);if(!h.gotAnyValidYValue)return this.renderErrorMessage("No valid Y value found in notes",i,r);let p=new ol(s.startDate,s.endDate);for(let t of s.queries){let e=p.createDataset(t,s);e.addNumTargets(t.getNumTargets());for(let n=s.startDate.clone();n<=s.endDate;n.add(1,"days"))if(c.has(El(n,s.dateFormat))){let r=c.get(El(n,s.dateFormat)).filter((function(e){return e.query.equalTo(t)}));if(r.length>0){let t=null;for(let e=0;et.getType()===tl.Table)),a=[],o=!1;for(let n of e){let e=n.getParentTarget(),r=this.app.vault.getAbstractFileByPath(t.normalizePath(e+".md"));if(!(r&&r instanceof t.TFile)){o=!0;break}let i=n.getAccessor(),l=n.usedAsXDataset,u=a.find((t=>t.filePath===e&&t.tableIndex===i));if(u)l?u.xDataset=n:u.yDatasets.push(n);else{let t=new wl(e,i);l?t.xDataset=n:t.yDatasets.push(n),a.push(t)}}if(o)i.errorMessage="File containing tables not found";else for(let e of a){let a=e.xDataset;if(!a)continue;let o=e.yDatasets,l=a.getParentTarget(),u=a.getAccessor(),s="";l+=".md";let f=this.app.vault.getAbstractFileByPath(t.normalizePath(l));if(!(f&&f instanceof t.TFile))continue;{i.fileAvailable++;let t,e=yield this.app.vault.adapter.read(f.path),n=new RegExp("((\\r?\\n){2}|^)([^\\r\\n]*\\|[^\\r\\n]*(\\r?\\n)?)+(?=(\\r?\\n){2}|$)","gm"),r=0;for(;t=n.exec(e);){if(r===u){s=t[0];break}r++}}let c=s.split(/\r?\n/);c=c.filter((t=>""!==t));let h=0,d=0;if(c.length>=2){let t=c.shift().trim();t=Nl(t,"|"),h=t.split("|").length;let e=c.shift().trim();e=Nl(e,"|");let n=e.split("|");for(let t of n)if(!t.includes("-"))break;d=c.length}if(0==d)continue;let g=a.getAccessor(1);if(g>=h)continue;let p=[];for(let t of c){let e=Nl(t.trim(),"|").split("|");if(gi.maxDate&&(i.maxDate=t.clone())):(i.minDate=t.clone(),i.maxDate=t.clone())):p.push(null)}else p.push(null)}if(p.every((t=>null===t)))return void(i.errorMessage="No valid date as X value found in table");i.gotAnyValidXValue||(i.gotAnyValidXValue=!0);for(let t of o){let e=t.getAccessor(1);if(e>=h)continue;let a=0;for(let o of c){let l=Nl(o.trim(),"|").split("|");if(et.getAccessor(2)&&t.getAccessor(2)>=0){let e=null,l=Ll(o[t.getAccessor(2)].trim(),r.textValueMap);null!==l.value&&(l.type===nl.Time&&(t.valueType=nl.Time),e=l.value,a>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-20Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-20NSave + +  + +# 2024-01-20 + +  + +> [!summary]+ +> Daily note for 2024-01-20 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-20 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🎿: [[Hoch Ybrig]] + +🍽️: [[Korean Barbecue-Style Meatballs]] + +📺: [[2024-01-20 ⚽️ US Orleans - PSG (1-4)]] + +  + +Je n’ai pas compris. Tout va bien de mon coté, qu’est-ce que tu racontes? + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-20]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-21.md b/00.01 Admin/Calendars/2024-01-21.md new file mode 100644 index 00000000..a5778f01 --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-21.md @@ -0,0 +1,139 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-21 +Date: 2024-01-21 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 8.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 3.75 +Coffee: 1 +Steps: 4323 +Weight: +Ski: 9 +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-20|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-22|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-21Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-21NSave + +  + +# 2024-01-21 + +  + +> [!summary]+ +> Daily note for 2024-01-21 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-21 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  +- [x] 16:52 :judge: [[@Life Admin|Admin]]: Enchère à suivre 📅 2024-01-25 ✅ 2024-01-25 + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🎿: [[Klewenalp]] + +🍽️: [[Warm lemon and Parmesan couscous]] + +📺: [[Tschugger (2021–)]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-21]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-22.md b/00.01 Admin/Calendars/2024-01-22.md new file mode 100644 index 00000000..41663199 --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-22.md @@ -0,0 +1,140 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-22 +Date: 2024-01-22 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 8 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 3.5 +Coffee: 5 +Steps: 13547 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-21|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-23|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-22Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-22NSave + +  + +# 2024-01-22 + +  + +> [!summary]+ +> Daily note for 2024-01-22 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-22 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  +- [ ] 10:44 :computer: [[@IT & Computer|Computer]]: Check battery issue of file server 📅2024-02-02 +- [ ] 16:06 :ski: [[@Lifestyle|Lifestyle]]: Look for a ski bag & a ski boot bag 📅2024-04-15 + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🍴: [[Big Shells With Spicy Lamb Sausage and Pistachios]] + +🍽️: [[Spicy Szechuan Noodles with Garlic Chilli Oil]] + +📺: [[Tschugger (2021–)]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-22]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-23.md b/00.01 Admin/Calendars/2024-01-23.md new file mode 100644 index 00000000..c13e29a1 --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-23.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-23 +Date: 2024-01-23 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 8 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 3 +Coffee: 6 +Steps: 17702 +Weight: 93.6 +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-22|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-24|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-23Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-23NSave + +  + +# 2024-01-23 + +  + +> [!summary]+ +> Daily note for 2024-01-23 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-23 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🍽️: [[Chilli con Carne]] + +📺: [[Rain Man (1988)]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-23]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-24.md b/00.01 Admin/Calendars/2024-01-24.md new file mode 100644 index 00000000..c4122970 --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-24.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-24 +Date: 2024-01-24 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 3.8 +Coffee: 6 +Steps: 12985 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-23|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-25|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-24Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-24NSave + +  + +# 2024-01-24 + +  + +> [!summary]+ +> Daily note for 2024-01-24 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-24 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +📺: [[Interview with the Vampire - The Vampire Chronicles (1994)]] + +🍸: [[Old Crow]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-24]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-25.md b/00.01 Admin/Calendars/2024-01-25.md new file mode 100644 index 00000000..550c4cf0 --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-25.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-25 +Date: 2024-01-25 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 4 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 3.6 +Coffee: 3 +Steps: 10346 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-24|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-26|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-25Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-25NSave + +  + +# 2024-01-25 + +  + +> [!summary]+ +> Daily note for 2024-01-25 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-25 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🍽️: [[Korean Barbecue-Style Meatballs]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-25]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-26.md b/00.01 Admin/Calendars/2024-01-26.md new file mode 100644 index 00000000..839c9d00 --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-26.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-26 +Date: 2024-01-26 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 8.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 3.25 +Coffee: 3 +Steps: 7995 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-25|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-27|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-26Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-26NSave + +  + +# 2024-01-26 + +  + +> [!summary]+ +> Daily note for 2024-01-26 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-26 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🚗: [[@@Zürich|Zürich]] à [[@France|Villefranche s/Saone]] puis [[@France|Macon]] + +💽: [[Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993)]], [[Thriller (by Michael Jackson - 1982)]], [[Highway to Hell (by ACDC - 1979)]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-26]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-27.md b/00.01 Admin/Calendars/2024-01-27.md new file mode 100644 index 00000000..1ed5cd6a --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-27.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-27 +Date: 2024-01-27 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 9 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 2.58 +Coffee: 5 +Steps: 7127 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-26|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-28|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-27Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-27NSave + +  + +# 2024-01-27 + +  + +> [!summary]+ +> Daily note for 2024-01-27 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-27 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🚗: [[@France|Macon]] à [[@@Zürich|Zürich]] via [[Geneva|Genève]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-27]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2024-01-28.md b/00.01 Admin/Calendars/2024-01-28.md new file mode 100644 index 00000000..1e27bdd5 --- /dev/null +++ b/00.01 Admin/Calendars/2024-01-28.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2024-01-28 +Date: 2024-01-28 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: +Coffee: 3 +Steps: +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2024-01-27|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2024-01-29|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2024-01-28Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2024-01-28NSave + +  + +# 2024-01-28 + +  + +> [!summary]+ +> Daily note for 2024-01-28 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2024-01-28 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2024-01-28]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-03-19 🏠 Arrivée Meggi-mo.md b/00.01 Admin/Calendars/Events/2022-03-19 🏠 Arrivée Meggi-mo.md new file mode 100644 index 00000000..122f1493 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-03-19 🏠 Arrivée Meggi-mo.md @@ -0,0 +1,12 @@ +--- +title: "🧚🏼 Arrivée Meggi-mo" +allDay: true +date: 2022-03-19 +endDate: 2022-03-20 +CollapseMetaTable: true +--- + +# Arrivée de [[@@MRCK|Meggi-mo]] + + +- [l] Arrivée à [[@@Zürich|Zürich]] de Meggi-mo, le [[2022-03-19|19/03/2022]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-03-24 🎡 Départ de Meggi-mo.md b/00.01 Admin/Calendars/Events/2022-03-24 🎡 Départ de Meggi-mo.md new file mode 100644 index 00000000..0887e8ee --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-03-24 🎡 Départ de Meggi-mo.md @@ -0,0 +1,11 @@ +--- +title: "🧚🏼 Départ de Meggi-mo" +allDay: true +date: 2022-03-24 +endDate: 2022-03-25 +CollapseMetaTable: true +--- + +# Départ de Meggi-mo + +Départ de ma [[@@MRCK|Meggi-mo]] le [[2022-03-24|24/03/2022]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-03-31 🏠 Arrivée de Papa.md b/00.01 Admin/Calendars/Events/2022-03-31 🏠 Arrivée de Papa.md new file mode 100644 index 00000000..052297da --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-03-31 🏠 Arrivée de Papa.md @@ -0,0 +1,9 @@ +--- +title: "👨‍👩‍👧 Arrivée de Papa" +allDay: false +startTime: 20:25 +endTime: 20:30 +date: 2022-03-31 +--- + +- [l] [[2022-03-31]], arrivée de [[Amaury de Villeneuve|Papa]] à [[@@Zürich|Zürich]] diff --git a/00.01 Admin/Calendars/Events/2022-04-04 🗼 Départ Papa.md b/00.01 Admin/Calendars/Events/2022-04-04 🗼 Départ Papa.md new file mode 100644 index 00000000..c6442f28 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-04-04 🗼 Départ Papa.md @@ -0,0 +1,9 @@ +--- +title: "👨‍👩‍👧 Départ Papa" +allDay: false +startTime: 13:30 +endTime: 14:00 +date: 2022-04-04 +--- + +[[2022-04-04]], départ de [[Amaury de Villeneuve|Papa]] \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-04-10 🗳️ 1er tour Présidentielle.md b/00.01 Admin/Calendars/Events/2022-04-10 🗳️ 1er tour Présidentielle.md new file mode 100644 index 00000000..43d43410 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-04-10 🗳️ 1er tour Présidentielle.md @@ -0,0 +1,11 @@ +--- + +title: "🗳 1er tour Présidentielle" +allDay: true +date: 2022-04-10 +endDate: 2022-04-11 +CollapseMetaTable: true + +--- + +1er tour des élections présidentielles à [[@@Paris|Paris]], le [[2022-04-10|10 avril 2022]]; avec [[@@MRCK|Meggi-mo]] dans l'isoloir. diff --git a/00.01 Admin/Calendars/Events/2022-04-24 🗳️ 2nd tour élections présidentielles.md b/00.01 Admin/Calendars/Events/2022-04-24 🗳️ 2nd tour élections présidentielles.md new file mode 100644 index 00000000..d1cf3be0 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-04-24 🗳️ 2nd tour élections présidentielles.md @@ -0,0 +1,8 @@ +--- +title: "🗳 2nd tour élections présidentielles" +allDay: true +date: 2022-04-24 +endDate: 2022-04-25 +--- + +2nd tour des élections présidentielles le [[2022-04-24|24 Avril]] à [[@@Paris|Paris]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-04-27 📍 Arrivée à Lisbonne.md b/00.01 Admin/Calendars/Events/2022-04-27 📍 Arrivée à Lisbonne.md new file mode 100644 index 00000000..edee1338 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-04-27 📍 Arrivée à Lisbonne.md @@ -0,0 +1,9 @@ +--- +title: "🛩 Arrivée à Lisbonne" +allDay: false +startTime: 16:00 +endTime: 16:30 +date: 2022-04-27 +--- + +Arrival on [[2022-04-27|this day]] in [[Lisbon]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-05-01 🏠 Départ de Lisbonne.md b/00.01 Admin/Calendars/Events/2022-05-01 🏠 Départ de Lisbonne.md new file mode 100644 index 00000000..e0351d91 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-05-01 🏠 Départ de Lisbonne.md @@ -0,0 +1,9 @@ +--- +title: "🛩 Départ de Lisbonne" +allDay: false +startTime: 15:30 +endTime: 16:00 +date: 2022-05-01 +--- + +Departure from [[Lisbon]] to [[@@Zürich|Zürich]] [[2022-05-01|this day]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-05-15 🏠 Definite arrival of Meggi-mo to Züzü.md b/00.01 Admin/Calendars/Events/2022-05-15 🏠 Definite arrival of Meggi-mo to Züzü.md new file mode 100644 index 00000000..6f2fd72c --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-05-15 🏠 Definite arrival of Meggi-mo to Züzü.md @@ -0,0 +1,9 @@ +--- +title: "🧚🏼 Definite arrival of Meggi-mo to Züzü" +allDay: true +startTime: 06:30 +endTime: 07:00 +date: 2022-05-15 +--- + +[[@@MRCK|Meggi-mo]] is arriving to [[@@Zürich|Zürich]] for good on [[2022-05-15|that day]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-10-14 📍 Weekend à GVA.md b/00.01 Admin/Calendars/Events/2022-10-14 📍 Weekend à GVA.md new file mode 100644 index 00000000..e79d478c --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-10-14 📍 Weekend à GVA.md @@ -0,0 +1,17 @@ +--- + +title: "🚆 Weekend in GVA" +allDay: true +date: 2022-10-14 +endDate: 2022-10-17 +CollapseMetaTable: true + +--- + +Weekend à [[Geneva]] avec [[@@MRCK|Meggi-mo]]. + +  + +Départ: [[2022-10-14]] de [[@@Zürich|Zürich]] + +Retour: [[2022-10-16]] à [[@@Zürich|Zürich]] \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-10-21 🗼 Weekend à Paris.md b/00.01 Admin/Calendars/Events/2022-10-21 🗼 Weekend à Paris.md new file mode 100644 index 00000000..22a2d918 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-10-21 🗼 Weekend à Paris.md @@ -0,0 +1,16 @@ +--- +title: "🗼 Weekend à Paris" +allDay: true +date: 2022-10-21 +endDate: 2022-10-24 +CollapseMetaTable: true + +--- + +Weekend à [[@@Paris|Paris]] avec [[@@MRCK|Meggi-mo]]. + +  + +Départ: [[2022-10-21]] de [[@@Zürich|Zürich]] + +Retour: [[2022-10-23]] à [[@@Zürich|Zürich]] \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-11-19 💍 Fiançailles Marguerite & Arnold.md b/00.01 Admin/Calendars/Events/2022-11-19 💍 Fiançailles Marguerite & Arnold.md new file mode 100644 index 00000000..4b31a67b --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-11-19 💍 Fiançailles Marguerite & Arnold.md @@ -0,0 +1,10 @@ +--- +title: "💍 Fiançailles Marguerite & Arnold" +allDay: false +startTime: 16:30 +endTime: 15:00 +date: 2022-11-19 +CollapseMetaTable: true +--- + +Fiançailles de [[Marguerite de Villeneuve|Marguerite]] et [[Arnold Moulin|Arnold]] [[2022-11-19|ce jour]] à [[Geneva|Genève]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2022-12-26 🏠 Papa à Zürich.md b/00.01 Admin/Calendars/Events/2022-12-26 🏠 Papa à Zürich.md new file mode 100644 index 00000000..23127bf4 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-12-26 🏠 Papa à Zürich.md @@ -0,0 +1,12 @@ +--- + +title: "👪 Papa à Zürich" +allDay: true +date: 2022-12-26 +endDate: 2022-12-31 +completed: null +CollapseMetaTable: true + +--- + +[[Amaury de Villeneuve|Papa]] arrive à [[@@Zürich|Zürich]] le [[2022-12-26|26 décembre]] à 13h26. diff --git a/00.01 Admin/Calendars/Events/2022-12-30 🏠 Stef & Kyna in Zürich.md b/00.01 Admin/Calendars/Events/2022-12-30 🏠 Stef & Kyna in Zürich.md new file mode 100644 index 00000000..143e9fb3 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2022-12-30 🏠 Stef & Kyna in Zürich.md @@ -0,0 +1,12 @@ +--- + +title: "Stef & Kyna in Zürich" +allDay: true +date: 2022-12-30 +endDate: 2023-01-05 +completed: null +CollapseMetaTable: true + +--- + +Stef & Kyna arrivent à [[@@Zürich|Zürich]] le [[2022-12-30|30 décembre]] avec Swiss le matin. diff --git a/00.01 Admin/Calendars/Events/2023-01-23 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-01-23 🩺 Médecin.md new file mode 100644 index 00000000..c32582d8 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-01-23 🩺 Médecin.md @@ -0,0 +1,13 @@ +--- + +title: Médecin +allDay: false +startTime: 11:15 +endTime: 12:15 +date: 2023-01-23 +completed: null +CollapseMetaTable: true + +--- + +[[2023-01-23|Ce jour]], 1er RDV avec [[Dr Cleopatra Morales]]. diff --git a/00.01 Admin/Calendars/Events/2023-02-06 📍 Genève.md b/00.01 Admin/Calendars/Events/2023-02-06 📍 Genève.md new file mode 100644 index 00000000..2a48ac3f --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-02-06 📍 Genève.md @@ -0,0 +1,12 @@ +--- + +title: Genève +allDay: true +date: 2023-02-06 +endDate: 2023-02-08 +completed: null +CollapseMetaTable: true + +--- + +Depart à [[Geneva|Genève]] [[2023-02-06|ce jour]] et retour le [[223-02-07|lendemain]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-02-09 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-02-09 🩺 Médecin.md new file mode 100644 index 00000000..00dd4061 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-02-09 🩺 Médecin.md @@ -0,0 +1,13 @@ +--- + +title: ⚕ Médecin +allDay: false +startTime: 12:15 +endTime: 13:15 +date: 2023-02-09 +completed: null +CollapseMetaTable: true + +--- + +[[2023-02-09|Ce jour]], RDV de suivi avec [[Dr Cleopatra Morales]] \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-02-11 💍 Mariage Eloi & Zélie.md b/00.01 Admin/Calendars/Events/2023-02-11 💍 Mariage Eloi & Zélie.md new file mode 100644 index 00000000..5e20b705 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-02-11 💍 Mariage Eloi & Zélie.md @@ -0,0 +1,91 @@ +--- + +title: "👰‍♀ Mariage Eloi & Zélie" +allDay: true +date: 2023-02-10 +endDate: 2023-02-12 +CollapseMetaTable: true + +--- + +Mariage d’[[Eloi de Villeneuve|Éloi]] avec [[Zélie]] en [[@France|Bretagne]] (Rennes) [[2023-02-11|ce jour]]. + +  + +🚆: 23h11, arrivée à Rennes + +  + +🏨: **Hotel Saint Antoine**
27 avenue Janvier
Rennes + +  + +### Vendredi 10 Février + +  + +#### 17h: Mariage civil + +Mairie de Montfort-sur-Meu (35) + +  + +#### 20h30: Veillée de Prière + +Chapelle du château de la Châsse +Iffendic (35) + +  + +--- + +  + +### Samedi 11 Février + +  + +#### 14h: Messe de Mariage + +Saint-Louis-Marie +Montfort-sur-Meu (35) + +  + +#### 16h30: Cocktail + +Château de la Châsse +Iffendic (35) + +  + +#### 19h30: Dîner + +Château de la Châsse +Iffendic (35) + +  + +--- + +  + +### Dimanche 12 Février + +  + +#### 11h: Messe + +Chapelle du château de la Châsse +Iffendic (35) + +  + +#### 12h: Déjeuner breton + +Château de la Châsse +Iffendic (35) + +  + +🚆: 13h35, départ de Rennes \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-02-19 🎞️ Tár @ Riff Raff.md b/00.01 Admin/Calendars/Events/2023-02-19 🎞️ Tár @ Riff Raff.md new file mode 100644 index 00000000..4f2da539 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-02-19 🎞️ Tár @ Riff Raff.md @@ -0,0 +1,13 @@ +--- + +title: 🎬 Tár @ Riff Raff +allDay: false +startTime: 20:30 +endTime: 22:30 +date: 2023-02-19 +completed: null +CollapseMetaTable: true + +--- + +[[2023-02-19|Ce jour]], [[Tár (2022)]] @ [[Riff Raff Kino Bar]]. diff --git a/00.01 Admin/Calendars/Events/2023-03-06 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-03-06 🩺 Médecin.md new file mode 100644 index 00000000..9780ae6c --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-03-06 🩺 Médecin.md @@ -0,0 +1,12 @@ +--- +title: 🩺 Médecin +allDay: false +startTime: 15:00 +endTime: 15:30 +date: 2023-03-06 +completed: null +CollapseMetaTable: true + +--- + +[[2023-03-06|Ce jour]], rdv avec [[Dr Awad Abuawad]] diff --git a/00.01 Admin/Calendars/Events/2023-03-11 🏠 Marg & Arnold à Zürich.md b/00.01 Admin/Calendars/Events/2023-03-11 🏠 Marg & Arnold à Zürich.md new file mode 100644 index 00000000..e69a2915 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-03-11 🏠 Marg & Arnold à Zürich.md @@ -0,0 +1,13 @@ +--- + +title: 👨‍👩‍👧‍👦 Marg & Arnold à Zürich +allDay: true +date: 2023-03-11 +endDate: 2023-03-13 +completed: null +CollapseMetaTable: true + +--- + +Arrivée le [[2023-03-11|11 mars]] de [[Marguerite de Villeneuve|Marg]] et [[Arnold Moulin|Arnold]]. +Départ le [[2023-03-12|lendemain]]. diff --git a/00.01 Admin/Calendars/Events/2023-03-18 🇨🇭 Molly & boyfriend in Zürich.md b/00.01 Admin/Calendars/Events/2023-03-18 🇨🇭 Molly & boyfriend in Zürich.md new file mode 100644 index 00000000..2f3197c0 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-03-18 🇨🇭 Molly & boyfriend in Zürich.md @@ -0,0 +1,12 @@ +--- +title: 👨‍👩‍👧‍👦 Molly & boyfriend in Zürich +allDay: true +date: 2023-03-18 +endDate: 2023-03-20 +completed: null +CollapseMetaTable: true + +--- + +Weekend in [[@@Zürich|Zürich]] for [[@@MRCK|Meggi-mo]]‘s cousin Molly and boyfriend. +Arrival on [[2023-03-18|18th March]] and departure on Monday [[2023-03-20|20th March]]. diff --git a/00.01 Admin/Calendars/Events/2023-04-14 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-04-14 🩺 Médecin.md new file mode 100644 index 00000000..502d286d --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-04-14 🩺 Médecin.md @@ -0,0 +1,13 @@ +--- + +title: 🩺 Médecin +allDay: false +startTime: 11:45 +endTime: 12:15 +date: 2023-04-14 +completed: null +CollapseMetaTable: true + +--- + +[[2023-04-14|Ce jour]], rdv avec [[Dr Cleopatra Morales]] diff --git a/00.01 Admin/Calendars/Events/2023-12-21 🏠 Arrivée Papa.md b/00.01 Admin/Calendars/Events/2023-12-21 🏠 Arrivée Papa.md new file mode 100644 index 00000000..b0d95b10 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-12-21 🏠 Arrivée Papa.md @@ -0,0 +1,10 @@ +--- +title: 🏠 Arrivée Papa +allDay: false +startTime: 20:26 +endTime: 21:26 +date: 2023-12-21 +completed: null +--- + +[[2023-12-21|Ce jour]], arrivée de [[Amaury de Villeneuve|Papa]] à [[@@Zürich|Zürich]] diff --git a/00.01 Admin/Calendars/Events/2023-12-27 🗼 Départ Papa.md b/00.01 Admin/Calendars/Events/2023-12-27 🗼 Départ Papa.md new file mode 100644 index 00000000..544487a5 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2023-12-27 🗼 Départ Papa.md @@ -0,0 +1,10 @@ +--- +title: 🗼 Départ Papa +allDay: false +startTime: 13:30 +endTime: 14:30 +date: 2023-12-27 +completed: null +--- + +[[2023-12-27|Ce jour]], départ de [[Amaury de Villeneuve|Papa]] de [[@@Zürich|Zürich]] pour [[@@Paris|Paris]] diff --git a/00.01 Admin/Calendars/Events/2024-01-20 ⚽️ US Orleans - PSG (1-4).md b/00.01 Admin/Calendars/Events/2024-01-20 ⚽️ US Orleans - PSG (1-4).md new file mode 100644 index 00000000..aa6d0241 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2024-01-20 ⚽️ US Orleans - PSG (1-4).md @@ -0,0 +1,11 @@ +--- +title: ⚽️ US Orleans - PSG (1-4) +allDay: false +startTime: 20:45 +endTime: 22:45 +date: 2024-01-20 +completed: null +--- + +[[2024-01-20|Ce jour]], US Orléans - [[Paris SG]]: 1-4 +Buteurs:: ⚽️ Saint Ruf (USO)
⚽️⚽️ M’Bappé
⚽️ G. Ramos
⚽️ Mayulu diff --git a/00.01 Admin/Test Sheet 2.md b/00.01 Admin/Test Sheet 2.md index 2746a4dc..ff3e1cd7 100644 --- a/00.01 Admin/Test Sheet 2.md +++ b/00.01 Admin/Test Sheet 2.md @@ -83,7 +83,7 @@ This is accompanying text on that floating situation. - [-] Cancelled `- [-]` -- [/] In Progress `- [/]` +- [x] In Progress `- [/]` ✅ 2024-01-20 - [?] Question `- [?]` diff --git a/00.01 Admin/Test sheet.md b/00.01 Admin/Test sheet.md index 05f244c7..50915703 100644 --- a/00.01 Admin/Test sheet.md +++ b/00.01 Admin/Test sheet.md @@ -260,7 +260,7 @@ players: Donnarumma,Bernat,Marquinhos,Kimpembe,Hakimi,Villeneuve,Verratti,St Hil - [-] Cancelled `- [-]` -- [/] In Progress `- [/]` +- [x] In Progress `- [/]` ✅ 2024-01-20 - [?] Question `- [?]` diff --git a/00.03 News/After Two Decades Undercover, She’s Ready to Tell the Real Story of Human Trafficking.md b/00.03 News/After Two Decades Undercover, She’s Ready to Tell the Real Story of Human Trafficking.md index f2267264..ac4a9fd3 100644 --- a/00.03 News/After Two Decades Undercover, She’s Ready to Tell the Real Story of Human Trafficking.md +++ b/00.03 News/After Two Decades Undercover, She’s Ready to Tell the Real Story of Human Trafficking.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2024-01-26]] --- @@ -40,7 +40,6 @@ Eventually, Bolen asked Paulina to send pictures of her daughter, and she agreed On Sept. 17, just as they’d arranged, Paulina sat on a bench outside Perimeter Mall with a stroller parked in front of her, scanning the parking lot nervously. Part of her hoped Bolen wouldn’t show. When he did, she could see he was handsome, a preppy guy in a pink polo shirt and khakis. “Paulina?” he asked eagerly. She nodded. As he smiled and pulled back the blanket draped across the stroller, he found himself surrounded, handcuffs slipped around his wrists. -## Editor’s picks “Paulina” watched his face fall, his confusion giving way to distress as [FBI](https://www.rollingstone.com/t/fbi/) agents took him into custody. It was her first undercover arrest. It would be the first of many. diff --git a/00.03 News/An Iowa paperboy disappeared 41 years ago. His mother is still on the case.md b/00.03 News/An Iowa paperboy disappeared 41 years ago. His mother is still on the case.md index b99eedd9..f7273922 100644 --- a/00.03 News/An Iowa paperboy disappeared 41 years ago. His mother is still on the case.md +++ b/00.03 News/An Iowa paperboy disappeared 41 years ago. His mother is still on the case.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2024-01-19]] --- diff --git a/00.03 News/Hvaldimir, the Whale Who Went AWOL.md b/00.03 News/Hvaldimir, the Whale Who Went AWOL.md new file mode 100644 index 00000000..01e598b8 --- /dev/null +++ b/00.03 News/Hvaldimir, the Whale Who Went AWOL.md @@ -0,0 +1,80 @@ +--- + +Alias: [""] +Tag: ["🏕️", "🐋"] +Date: 2024-01-21 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2024-01-21 +Link: https://www.nytimes.com/2024/01/14/magazine/hvaldimir-whale.html +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: [[2024-01-27]] + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-HvaldimirtheWhaleWhoWentAWOLNSave + +  + +# Hvaldimir, the Whale Who Went AWOL + +![](https://static01.nyt.com/images/2024/01/21/magazine/21mag-hvaldimir2/21mag-hvaldimir2-articleLarge.jpg?quality=75&auto=webp&disable=upscale) + +Hvaldimir near a salmon farm in the fjords off the coast of Stavanger, Norway, in Nov.Credit...Conor McDonnell + +The Great Read + +Hvaldimir escaped captivity and became a global celebrity. Now, no one can agree about what to do with him. + +Hvaldimir near a salmon farm in the fjords off the coast of Stavanger, Norway, in Nov.Credit...Conor McDonnell + +- Published Jan. 14, 2024Updated Jan. 18, 2024 + +On April 26, 2019, a beluga whale appeared near Tufjord, a village in northern Norway, immediately alarming fishermen in the area. Belugas in that part of the world typically inhabit the remote Arctic and are rarely spotted as far south as the Norwegian mainland. Although they occasionally travel solo, they tend to live and move in groups. This particular whale was entirely alone and unusually comfortable around humans, trailing boats and opening his mouth as though expecting to be fed. And he seemed to be tangled in rope. + +When a commercial fisherman named Joar Hesten got a closer look, he realized that the whale was in fact wearing a harness: one strap girdling his neck and another gripping his torso just behind his flippers. Hesten contacted a local scientist, and word eventually reached the Norwegian Directorate of Fisheries, which dispatched an inspector, Jorgen Ree Wiig. After several failed attempts by Wiig and a colleague to free the beluga while onboard a dinghy, Hesten put on an immersion suit and plunged into the water. Though the whale was not quite as hefty as an average adult male of his species, he was still a formidable presence, by best estimates close to 14 feet long and about 2,700 pounds. Swimming beside him, Hesten managed to unclasp one of the straps. Together, they used a grappling-hook-like device to remove the rest of the stubborn harness. + +A few days later, the beluga followed a boat to Hammerfest, one of the northernmost towns in the world, where he took up residence, frequently interacting with people in the harbor. News of the friendly white whale spread quickly. In early May, a video of the [beluga went viral, eventually earning a spot on “The Ellen DeGeneres Show.”](https://www.facebook.com/ellentv/videos/i-saw-a-video-of-a-beluga-whale-finding-someones-phone-for-them-sometimes-i-cant/2282757485297261/) In it, several young women stand on a dock in Hammerfest, speaking excitedly with their hands outstretched just above the water. The beluga levitates to the surface in an upright position, as smooth, plump and silent as a balloon. There is something in his mouth — something rectangular. “Oh, my God!” one woman exclaims as the whale returns a smartphone her friend dropped in the sea. The women cheer and caress the whale, whose mouth continues to hang open. Later viral videos would show him [stealing (and returning) a kayaker’s GoPro](https://www.youtube.com/watch?v=ehSnnjZlp2A) and [playing fetch with a rugby ball](https://www.youtube.com/watch?v=NQ3sAIEg6OY). By midsummer, he had become an international celebrity, drawing large groups of tourists. + +Image + +![](https://static01.nyt.com/images/2024/01/21/magazine/21mag-hvaldimir-02/21mag-hvaldimir-02-articleLarge.jpg?quality=75&auto=webp&disable=upscale) + +After escaping captivity, Hvaldimir took up residence in Hammerfest, Norway, where he quickly became an international celebrity.Credit...Joakim Eskildsen/Institute, for The New York Times + +All the while, marine experts had been speculating about the whale’s origin. Clearly this animal had spent time in captivity — but where? The first major clues came from the harness: One of its plastic buckles was embossed with the words “Equipment St. Petersburg.” And it appeared to have a camera mount, hinting at reconnaissance of some kind. The beluga also knew how to closely follow boats and had a habit of wrapping rope around propellers, which could suggest specialized training. As several experts told media outlets at the time, the whale had most likely escaped from the nearby Russian Navy. Based on a poll of more than 25,000 respondents, the Norwegian Broadcasting Corporation christened the beluga Hvaldimir, a portmanteau of *hval*, the Norwegian word for whale, and the Russian name Vladimir. + +--- + +Thank you for your patience while we verify access. If you are in Reader mode please exit and [log into](https://myaccount.nytimes.com/auth/login?response_type=cookie&client_id=vi&redirect_uri=&asset=opttrunc) your Times account, or [subscribe](https://www.nytimes.com/subscription?campaignId=89WYR&redirect_uri=) for all of The Times. + +--- + +Thank you for your patience while we verify access. + +Already a subscriber? Log in. + +Want all of The Times? Subscribe. + +Advertisement + +[SKIP ADVERTISEMENT](https://www.nytimes.com/2024/01/14/magazine/hvaldimir-whale.html?unlocked_article_code=1.PE0.QVx4.jAdHbPnZ92re&smid=url-share#after-bottom) + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Inside the house shows that bolster Boston’s lacking nightlife.md b/00.03 News/Inside the house shows that bolster Boston’s lacking nightlife.md new file mode 100644 index 00000000..35a4d9fb --- /dev/null +++ b/00.03 News/Inside the house shows that bolster Boston’s lacking nightlife.md @@ -0,0 +1,84 @@ +--- + +Alias: [""] +Tag: ["🎭", "🇺🇸", "🎸", "🎫"] +Date: 2024-01-23 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2024-01-23 +Link: https://www.bostonglobe.com/2023/11/14/arts/underground-concert-scene-boston/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-InsidethehouseshowsthatbolsterBostonslackingnightlifeNSave + +  + +# Inside the house shows that bolster Boston’s lacking nightlife + +Local concerts like these are one reason Joe and other young people migrate to Boston. In a city with a [lackluster nightlife scene](https://www.bostonglobe.com/2023/09/08/metro/boston-nightlife/) that’s financially and logistically inaccessible for many young people, student-run house shows provide a place for twenty-somethings to hang out at a cost far lower than clubs or bars. + +Get The Big To-Do + +Your guide to staying entertained, from live shows and outdoor fun to the newest in museums, movies, TV, books, dining, and more. + +“We came to Berklee looking for something like this,” said Joe, who also plays with his roommates in their band, Mt. Greylock. “This is the part of Berklee that Berklee doesn’t promote. You learn how to perform, how to create crowds, how to control crowds, how to network.” + +The shows at Mt. Greylock started in the fall of 2021, after Joe and his bandmates moved to their new digs. When things were at their busiest, the crew hosted three or four shows a month — sometimes two in one weekend, Joe said. Now, the group has aged and gone their separate ways, but they still “throw together a ‘bill” every month or so. + +Although it’s incredibly popular among young people, Boston’s DIY concert scene is one wary of newcomers. Cryptic Instagram accounts post their playbills without show addresses. Sometimes, a private message yields a mysterious instruction — “walk through the fence gate ... do not walk down the driveway” — while others elicit no response. For many members of Generation Z, it’s the last remaining thing passed through word of mouth. + +But after visitors find their way inside, this behind-the-scenes concert crowd is inclusive, curious, and supportive. Already a niche of its own, the DIY concert scene is full of microcosms for just about every artist and genre, from punk to rap to shoegaze. + +This late-October show has the first Berklee-only lineup at Mt. Greylock in at least a year, Joe says. The house’s “Halloweekend” shows are always busy, and this one is no exception: Dozens of young people pack into the two-room venue. The living room is unfurnished except for two couches against the walls, facing the area where musicians set up their amps, mics, and instruments. + +The house looks like a typical college student’s apartment: lost-and-found street signs and posters adorn the walls, green plastic ivy dangles from the ceiling, and pink and orange lights cast a warm glow over the ever-growing crowd. The music starts with opener Anson Chen Trio, and the crowd gathers just feet away from the musicians, bopping and swaying to alternative rock. + +![Christopher Normann performs at a house show in Allston.](https://bostonglobe-prod.cdn.arcpublishing.com/resizer/bigP6_T17Ehen5PY12WaoK5Pv7Y=/20x0/cloudfront-us-east-1.images.arcpublishing.com/bostonglobe/HPQ4QLNUOGJELAZY5H6AR4DZJA.jpg) + +Christopher Normann performs at a house show in Allston.Josh Reynolds for The Boston Globe + +Mt. Greylock is one of dozens of venues in Allston, each with its own regular crowd, music style, and visual aesthetic. In the close-knit community, show-hopping is not uncommon — especially for artists. + +After finishing a set with Anson Chen Trio, drummer Sebastian Salazar quickly packed his equipment to play at another venue nearby. The Berklee student said he is used to multi-gig days — last weekend, he started the morning at a church gig and ended backing for a rapper at the Allston-Brighton concert venue, Roadrunner — and the underground scene in Allston gives him plenty of opportunities to get exposure. + +Joe said the two years since shows started at Greylock have been mostly smooth sailing. The house shows get loud, but neighbors rarely complain — there’s a sense of camaraderie between this unit and the others in its complex that keeps them all safe from noise complaints or angry knocks. + +“Oh, they hear,” Joe said when asked whether his neighbors know the shows are going on. “Most of the time we get shut down or have issues is when the cops are just driving by and they see a \[expletive\] ton of kids on the street by our house.” + +For Will Doley, a Boston University sophomore from Atlanta, Boston’s concert scene is far different from the idea of college he grew up with in the South — in a good way. + +“I came to Boston to go to a school where I didn’t have to rush a fraternity,” Doley said while standing with a group of friends outside Mt. Greylock venue in between sets. + +And Doley’s not alone. In fact, college students have begun moving to the neighborhood just to be closer to the music, Joe said. + +“The word spreads pretty quickly that Allston has a really good scene going on,” he said. “It’s definitely a poppin’ area in Boston in terms of art.” + +Cameron Lane, a Berklee student and solo artist who plays many of Boston’s secret venues, said the DIY concert scene has been nothing but kind to her — and the secrecy among the community is what keeps it safe. + +“I understand why people want to gatekeep the community to people who you know are going to treat it with love and care,” Lane said. “It’s a beautiful thing, and it’s something we want to protect forever.” + +--- + +Vivi Smilgius can be reached at [vivi.smilgius@globe.com](mailto:vivi.smilgius@globe.com). Follow her [@viviraye](https://www.twitter.com/viviraye). + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers..md b/00.03 News/My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers..md new file mode 100644 index 00000000..b22ea659 --- /dev/null +++ b/00.03 News/My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers..md @@ -0,0 +1,586 @@ +--- + +Alias: [""] +Tag: ["🚔", "🇺🇸", "🚙", "💥"] +Date: 2024-01-21 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2024-01-21 +Link: https://eu.jsonline.com/story/news/investigations/2024/01/17/milwaukee-reporter-investigates-cousins-1978-car-bombing-death/71883074007/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-MycousinwaskilledbyacarbombinMilwaukeeNSave + +  + +# My cousin was killed by a car bomb in Milwaukee. A mob boss was the top suspect. Now, I’m looking for answers. + +Florence Grady and Augie Palmisano reached the elevator doors at the same time. + +Both were tenants at Juneau Village Garden Apartments in downtown Milwaukee. And shortly before 9 a.m. that Friday — June 30, 1978 — both were heading to the basement of the apartment complex. + +Grady was carrying a basket of clothes to the laundry. Augie was going to the underground parking garage. They chatted about the weather and Summerfest. + +When they reached the basement, she went to the laundry room. He walked to his car, a 1977 Mercury Marquis. + +Less than a minute later, there was a massive explosion. Grady thought the boiler had exploded. But when she looked into the garage, she saw Augie’s car in flames. + +The blast shook the city. Paintings fell from walls and books tumbled off shelves. One woman said her recliner lifted off the ground. Tenants ran from the building as firefighters and police rushed to the scene. + +Augie Palmisano was my cousin. + +His murder has never been solved. + +## We don't talk about Augie + +I was told very little about Augie’s life when I was a child. I heard even less about his death — except when my father was trying to scare me straight. + +“Don’t fall in with the wrong crowd. Look what happened to Cousin Augie.” + +“Don’t gamble. You don’t want to end up like Cousin Augie.” + +“Don’t talk back to the wrong person. You know what happened to Cousin Augie.” + +I actually knew almost nothing about what happened to Augie. I was four years old when he was killed, and have no memory of ever meeting him.  + +The most I heard about Augie probably came from TV news in the early 1980s when reputed Milwaukee crime boss Frank Balistrieri was facing gambling and extortion charges. I remember a TV reporter talking about how Balistrieri was suspected of being involved in Augie’s murder. I hurried from the living room to the kitchen, where my mom was making dinner, and told her they were talking about Cousin Augie on the news. She looked mortified. + +Through the years my siblings and I have heard various stories, typically passed on in hushed conspiratorial tones, about why Augie was murdered. In one version, he was killed over gambling debts. In another, he became some sort of Mafia kingpin. In yet another widely believed — and still often repeated — theory, he was an informant. + +I had no idea which of those stories was true. + +I was raised hearing stories about my grandparents and their families coming from Sicily to the United States, and how they rose to success through hard work and sacrifice. They were more than family stories to me. They were lessons in how to live. + +But my father didn’t ever want to talk about Augie. He was the youngest of 13 in a Sicilian immigrant family, and I think he wanted to keep his own children out of trouble and far away from even the mention of organized crime.  + +After my dad died 11 years ago, I thought my Aunt Marjorie — the last survivor of the 13 Spicuzza siblings — might tell me why Augie was killed. + +“Why do you want to talk about *that*?” she snapped, ending the discussion before it started. + +Now an investigative reporter at the Milwaukee Journal Sentinel, I mustered the courage to try to find out what happened to Augie, and why.  + +I turned to police files, FBI reports and newspaper articles — and tracked down former detectives, FBI agents, prosecutors and others who knew Augie, many of whom agreed to speak with me about the case for the first time. + +What I found was a story about loyalty, jealousy, and power — and what some people are willing to do for it. + +## 'The King of Commission Row' + +Agostino (August) Palmisano was born in 1928. He was the son of my great-uncle Giovanni (John) Palmisano and his wife, Angeline, making him my father's first cousin. + +Like many Sicilian Americans in Milwaukee, Augie’s story is [rooted in the Third Ward](https://www.jsonline.com/videos/news/2024/01/17/declines-and-glorious-comebacks-are-all-part-of-milwaukees-historic-third-ward/72112702007/). + +The Third Ward – which lies on the southern edge of downtown – was an Irish enclave for much of the 19th century. It came to be known as the “Bloody Third” due to its rough reputation, thanks in part to the high number of saloons and brawls.  + +After a massive fire in 1892 destroyed more than 400 buildings and left some 2,000 people homeless, Italian immigrants moved into the neighborhood.  + +Most, including my father’s family, came from Sicily. And many of them made a living in the produce business, selling fruits and vegetables – first from push carts, then horse-drawn wagons and eventually trucks. The Palmisano and Spicuzza families were among them. + +Augie grew up helping at his father’s produce business in the heart of what was then known as Commission Row — a gritty stretch of Broadway that was packed with fruit and vegetable merchants. One fading black and white photograph shows a John Palmisano & Sons Wholesale Produce truck with “AUGIE” painted on the driver’s side door. + +Augie graduated from Lincoln High School on Milwaukee’s east side, where he ran cross country, acted in plays, and was a manager for the football team. I’ve been told so many Sicilian Americans attended Lincoln High that at one point plays were called from the sideline in Italian. It was the same school that Frank Balistrieri graduated from a decade earlier.  + +In 1952, Augie married Jean Rose Lassa. They had four children together and bought a home for the family in Whitefish Bay. He worked second shift at American Motors while helping run the family produce company. After his father died in 1964, Augie took over the company, which by then was named Palmisano Produce.  + +In the years that followed, Augie started running the tavern adjacent to Palmisano Produce. It was called Richie’s on Broadway, but he eventually renamed it Palmy’s. + +Augie’s side-by-side businesses – perched on the corner of North Broadway and East St. Paul Avenue – became a gateway of sorts to Commission Row.  + +The tavern was especially popular with Commission Row’s produce workers. It had a long bar, a pool table, a couple of pinball machines, and a jukebox that frequently played Frank Sinatra songs. A typical Friday night included a fish fry featuring the catch of the day from Lake Michigan. + +By many accounts, it was a wild place where illegal craps games were sometimes played on the pool table, people would stop for dice or card games, and a lot of money changed hands. + +Most nights, Augie held court while tending bar, ready with a witty remark or practical joke, or just to loan a friend some cash or a sympathetic ear.  + +Behind the bar hung a painting that showed Augie and a bottle of Early Times whisky, both hovering larger than life over his two businesses. The artist who painted it said it was meant to portray him as “the King of Commission Row.” + +As his legitimate businesses grew, so did his gambling operation.  + +## 'A Harvard education in the hustle game' + +One afternoon, I went to the now-shuttered Journal Sentinel printing plant in West Milwaukee to search for more information in our archives, known by people in the industry as “the morgue.” I found several small, musty-smelling manila envelopes and file cards with Augie’s name on them – all stamped “DEAD” in green ink – and many more devoted to Frank Balistrieri. I borrowed them all.  + +The envelopes were filled with newspaper clippings and microfiche that offered more glimpses into Augie’s life.  + +He first became front page news in the early 1960s. + +“Gambling Crackdown! 3 Arrested,” was splashed across the top of the Milwaukee Sentinel – above the name of the newspaper – on March 23, 1962.  + +The front page of The Milwaukee Journal that same day featured a photograph of Augie with his hand covering his face. It was the first picture I can remember seeing of my cousin. + +Augie was nearly 6 feet tall and had a slender build, which made him appear even taller. He had dark brown eyes and black hair parted on the side. But in the photograph, it looked like he was trying to disappear beneath his left hand and hat. Only his nose and ear were visible. + +The articles detailed how Augie was accused of accepting bets on college basketball games. He was eventually convicted and fined $1,000.  + +Through the clips — and hundreds of pages of FBI records — I learned that Augie grew his small gambling activities into a fairly large bookmaking operation, one that reportedly spanned several taverns across the city. Although profitable, it also drew unwanted attention from law enforcement, who seemingly had his tavern under constant surveillance for months at a time. + +Augie’s tavern was one of nine locations raided on Super Bowl Sunday in 1974, when 60 FBI agents searched locations in and around Milwaukee. In the raids, agents confiscated piles of gambling records, guns and about $20,000 in cash. + +Agents also found something else in the basement of Augie’s tavern – 93 sticks of dynamite stashed in a crawlspace. It was unclear how long the dynamite had been there, and Augie said he had no idea where it came from. The charges linked to the dynamite were dropped, and he eventually pleaded guilty to conducting a gambling business.  + +A Milwaukee Sentinel article about the case said Augie’s attorney argued he “comes from a good family, is the father of four children, gets up daily at 4 a.m. to start operations at Palmisano Produce, works eight hours operating a truck and then helps run his tavern.” The article said Augie “had been working 12 to 14 hours a day, six days a week since he was a young man.” + +One of Augie's former employees, who asked not to be identified because of safety concerns, told me he was “a good dude” who “had his hands in everything.” + +“I got a Harvard education working at Palmy’s,” the man said. “I really got a Harvard education in the hustle game.” + +The way he tells it, Augie was “bigger than God,” and at the center of it all. + +He, like others, described Augie as well-liked and funny, somebody who played by his own rules but would also lend people money or give them food when they needed it. + +I asked the former employee – who said he fled town after Augie’s murder – why my cousin was killed. His eyes filled with tears. + +“He was too big. He got too big,” he said. “And Frank Balistrieri couldn’t put up with it.” + +## Fancy pants + +Most Sicilian Americans in Milwaukee had nothing to do with organized crime. + +The same could not be said about Frank Balistrieri. + +Born in 1918, Balistrieri graduated from Marquette University and briefly attended law school there. But by the 1950s, the FBI had placed him on its nationwide list of "top hoodlums." + +Balistrieri reportedly took over as Milwaukee’s organized crime boss by the early 1960s, and had a wide range of legal and illegal business interests: nightclubs, restaurants, strip clubs, vending machines and gambling. + +FBI documents show that starting around that time, Balistrieri decided bookmakers in Milwaukee should be required to give him a cut of their profits, and sent his enforcers to collect.  + +And Balistrieri – who frequently conducted business from a table at Snug’s restaurant on the ground floor of the Shorecrest Hotel, which was owned by his family – became a key figure in skimming money from Las Vegas casinos, a story made famous in the 1995 movie “Casino.” + +Balistrieri was a short man, but had an ominous presence. Franklyn Gimbel, a former federal prosecutor who won a tax evasion case against Balistrieri in 1967, said his eyes were like “spotlights… from his skull that penetrated everything he looked at.” + +Some called him “Frankie Bal,” “Mr. Big,” or “Mr. B.” He was also known as "Fancy Pants" due to his hand-tailored, custom-made suits. That nickname was especially popular among people who didn't like him. + +Balistrieri demanded respect, and was notoriously ruthless when it came to getting it. + +Longtime Milwaukee Sentinel investigative reporter Mary Zahn and columnist Bill Janz [once reported that Balistrieri’s willingness to resort to violence](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-frank-balistrieri-tapes-part-2-of-the-milwaukee-sentinel-investigative-series/71245585007/) even drew criticism from his father-in-law, John Alioto, who preceded him as Milwaukee’s crime boss. Alioto pleaded for more merciful solutions after Balistrieri threatened to kill two men during an argument secretly recorded by the FBI. + +“L’amazzari,” Balistrieri said in Sicilian. *I’ve got to kill them.* + +He was suspected by law enforcement of ordering a [string of murders in and around Milwaukee](https://www.jsonline.com/picture-gallery/news/special-reports/2024/01/17/unsolved-murders-and-attempted-murders-linked-to-milwaukee-mob-boss-frank-balistrieri/71818393007/), none of which were ever solved. + +In 1960, nightclub owner [Isadore “Izzy” Pogrob was shot to death](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-frank-balistrieri-tapes-part-1-of-the-milwaukee-sentinel-investigative-series/71145060007/) and left in a ditch in Mequon. The murder reportedly happened soon after Balistrieri got a phone call at one of his taverns, glanced over at several of his associates, and slid his index finger across his throat. + +In 1963, the body of Anthony Biernat, a jukebox distributor, was found in the basement of a vacant farmhouse near Kenosha. He’d been tied up and beaten to death, and his body was covered in lime in an apparent effort to speed decay. + +In 1972, [Louis Fazio was shot several times](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-balistrieri-tapes-part-9-undercover-agent-was-target-for-balistrieris-hit-men/71245882007/) with a .38-caliber gun outside his home. Balistrieri was later heard gloating about Fazio’s death. + +In 1975, August Maniaci was murdered outside his East Side home by someone with a .22-caliber pistol equipped with a silencer. Maniaci had openly feuded with Balistrieri. + +Soon after, an informant told the FBI that Balistrieri thought Maniaci’s brother Vince might try to get revenge. Balistrieri reportedly put out the word that Vince “should be killed like his brother.” + +Balistrieri was never charged in any of the murders. + +## Vincent Maniaci + +Vincent Maniaci was my cousin’s best friend. They were so close, they were like brothers, a former FBI agent told me.  + +Vince ran a bar on Water Street named Little Caesar’s Cocktail Lounge, later known as Under the Bridge. He was also a regular at Augie’s tavern, often seen laughing and joking with my cousin as he tended bar.  + +Like Augie, Vince had some run-ins with the law. The same year his brother was murdered, Vince was sent to prison for fencing four stolen mink coats and threatening someone who owed him money. + +When he was released from prison, the FBI was so convinced somebody wanted Vince dead that agents started following him everywhere he went.  + +The morning of Aug. 17, 1977, Vince tried to start his car but could tell something was wrong. The accelerator was so stiff he couldn’t push it down to the floor. He drove 15 to 20 mph – as fast as it would go – from the north side halfway house where he was staying to the East Side.  + +After a brief stop he went to his mechanic, who opened the hood and immediately spotted a package with wires coming out of it. “I’m going to call police,” he told a shaken Vince. “It looks like a bomb.” + +Vince ran for cover and was picked up by the FBI agents who’d been following him. They took him to an agent’s house, where he had a stiff drink and told investigators he had no idea who would want him dead. Soon afterward, federal officials sent Vince back to prison for his own protection. + +Members of the Milwaukee Police Department bomb squad found a taped-up gray package placed near the engine on the driver's side of Vince’s car, jammed near the accelerator and wired to the ignition with alligator clips. The bomb had 20 sticks of dynamite and a booster but luckily failed to detonate, possibly due to faulty wiring. + +A police report described the device as an “overkill bomb” designed to “destroy all traces of possible evidence that could connect anyone” with the crime.   + +## Donnie Brasco + +Not long after someone planted a bomb in Vince’s car, the FBI brought in an agent named Joseph Pistone to help infiltrate the Balistrieri crime family. + +Today, Pistone is better known by his undercover name: Donnie Brasco. + +He wrote about his experience in a book, which inspired the 1997 movie starring Johnny Depp as Pistone and Al Pacino as [New York crime family member Benjamin “Lefty” Ruggiero](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-balistrieri-tapes-part-9-undercover-agent-was-target-for-balistrieris-hit-men/71245882007/).  + +One scene from Pistone’s book in particular stuck with me – the strong reaction Ruggiero had when Pistone mentioned Milwaukee. Ruggiero didn’t know it at the time, but “Donnie” was trying to help another undercover FBI agent who was posing as a new vending machine company owner in Milwaukee. + +*“He’s crazy, Donnie. Doesn’t the f------ guy know you can’t operate a vending business anywhere without connections? Especially Milwaukee. They’re crazy out there. It ain’t like in New York, Donnie, where they may just throw you a beating and chase you out. Out there they’re vicious. They answer to Chicago, you know. They blow people up. Donnie, if this guy’s a friend of yours, you better tell him to get the hell out of that town.”*  + +[When I reached Pistone](https://www.jsonline.com/story/news/special-reports/2024/01/17/qa-former-fbi-agent-joe-pistone-aka-donnie-brasco-on-infiltrating-the-milwaukee-mafia/72182698007/), he was gracious with his time, patient, and had an impressive memory. + +At the time, organized crime in Milwaukee wasn’t as well-known as the Outfit in Chicago or the Mafia in New York. But Pistone said Balistrieri was a [“very well-known” Mafia boss](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-balistrieri-tapes-part-6-top-mobster-bonanno-visited-balistrieri-to-discuss-problems/71245735007/) throughout the U.S. who was closely aligned with the Chicago Outfit — and notorious for his brutality.  + +Pistone recalled one night when Balistrieri took him and others to a charity banquet on a whim. Pistone said people scrambled to clear a table in a prime spot for Balistrieri and his entourage.  + +“It had to be a couple hundred people. Everything just stopped when they saw him. The maitre d’ came over and said, ‘Oh, Mr. Balistrieri, I didn't know you were coming,'" Pistone remembered. "It was like, you know, if you were in a foreign country, a president walking in. Or the queen walked in, I mean, you could see that that everybody knew who he was. And either they were terribly afraid of him or respected him." + +“But he was the man," Pistone said. "He was the man in Milwaukee.” + +Despite Pistone’s encyclopedic knowledge of the Mafia, he didn’t have a lot of answers when it came to Augie. + +Pistone told me he doesn’t believe he ever met my cousin, but clearly remembers his murder – which he also wrote about in his book.  + +“He wasn’t a boss,” Pistone said. “I think he probably was involved in bookmaking operations.” + +He did recall Balistrieri claiming that Augie was “a snitch.”  + +“Whether he was, I don't know,” Pistone said, adding that he made it a point not to know. + +“It's human nature,” he said. “You’re going to act differently if you know that somebody, you know, is on your side.” + +Pistone’s work in Milwaukee in 1978 would eventually help dismantle organized crime here. But not before it claimed another life -- Augie's. + +## Closing time + +Augie spent his final hours like he did much of his life. He was working. + +He closed his tavern at 2 a.m., then spent 20 minutes cleaning up with his 24-year-old son, John, before they left together.  + +"I'll see you tomorrow," Augie told his son as he walked toward his car. + +Augie stopped at Pitch’s Lounge and Restaurant on the East Side, where he joined an old friend known as “Teach” for breakfast. “Teach” would later tell police Augie came and left alone, but that he was too drunk to remember the exact time. + +Augie’s routine was to stay awake after closing his tavern long enough to go back to the Third Ward and check on the day’s produce delivery, which typically arrived at 4 a.m. It was Friday, an especially busy day at work, so he would often sleep for only a few hours at his apartment before heading back to work on Commission Row. + +That’s where he was going when he stepped into the elevator with his neighbor, Florence Grady. + +She was the last person to see him alive. + +## The seat of the blast + +Augie’s car was still engulfed in flames when firefighters arrived. + +The explosion mangled the overhead door to the parking garage so badly that firefighters had to pry it open and prop it up with wooden beams. The blast also shattered the lights, leaving it almost pitch-black inside. The air was heavy with smoke, and the garage was flooded from the sprinkler system and water streaming from burst pipes in the ceiling.  + +The front of Augie’s Marquis was essentially gone, and parts of his car lay scattered across the garage. The damage spread to 28 nearby cars, but miraculously no one else was injured because Augie was alone in the garage that morning. + +It wasn’t until firefighters extinguished the flames that they found Augie’s body. His right foot was missing — investigators determined it had been incinerated by the blast. His face was so badly burned that police identified him through fingerprints. + +He was 49 years old. + +Those who responded to the crime scene that morning included about 25 firefighters, members of the Milwaukee Police Department bomb squad, the state fire marshal, and Milwaukee County District Attorney E. Michael McCann, as well as numerous police officers and FBI agents. + +Notably absent, according to police reports: longtime Milwaukee Police Chief Harold Breier, who famously said there was “no prosecutable evidence of organized crime” in the city.  + +“We demand honest government in Milwaukee,” Breier said in that 1975 TV interview. “Our city wouldn’t stand for it. We’re different. We’re quite a community." + +Ted Engelbart, then a new member of the bomb squad, was at the crime scene that morning. He told me that they quickly realized it wasn’t an accidental fire. + +Engelbart said they determined the “seat of the blast” was in the front of the car, and the bomb was placed near the engine. The explosion followed the path of least resistance – right toward Augie. + +The bomb even moved the foundation of the apartment building. Had it exploded outside, the damage would have extended several city blocks, said Engelbart, who’s now retired. + +“That is sending a message,” Engelbart said. “Something like this tells other people, ‘Oh, watch your ass.’” + +The bomb likely had numerous sticks of dynamite and a booster, much like the one found in Vince’s car. Among the debris, investigators found a key component: an alligator clip just like the one in the bomb that nearly killed Augie’s best friend. + +McCann, the former DA, told me that the incident was “clearly no act of passing violence.”  + +## John Palmisano + +The explosion woke up Augie’s son, John, who like his dad had an apartment at Juneau Village.  + +After the building manager knocked on John’s door and told him Augie’s car was on fire, John called Palmy’s, then drove to Commission Row to look for his dad. Somebody said they thought they’d seen Augie early that morning, but nobody knew where he was. + +After John returned to the apartment building, an officer showed him a silver watch with a broken band found near the mangled car. John recognized it as his father’s watch.  + +Police who stopped at Palmy’s later that day found a locked door with a note that read: “Sorry, the tavern is closed. My father died today.” + +## 'Augie got put on a troublemaker list' + +In the aftermath of Augie’s murder, Milwaukee police detectives interviewed nearly every resident of Juneau Village Garden Apartments, talked to business owners and workers along Commission Row, and spoke to Augie’s friends throughout the city, according to police reports from the time. + +Just hours after the bombing, an anonymous caller reported seeing a late model white Cadillac with Ohio license plates occupied by people “who appeared to be gangster types.” The FBI traced the license plate number to a car dealership, whose manager said the sedan had been leased to a “self employed contractor” named Larry John. The reports don’t say whether investigators found him or determined if that was the getaway car. + +Several days after the murder, a detective stopped at a halfway house to question Anthony Francis Pipito, a Balistrieri employee who’d been convicted of armed burglary and other crimes. Asked whether he had any information about Augie’s murder, Pipito told the detective he wouldn’t give him “any information regarding Frank Balistrieri.”  + +Asked why he brought up Balistrieri, Pipito refused to answer. + +Others dropped similar hints. When detectives went to the Iron Horse Diner in Glendale to interview its owner, Anthony Fazio, he told them that only four or five people in Milwaukee “would be able to hire a bomber.” He added that police “should probably start looking on Prospect Avenue.” + +The detective wrote, “Probably meant Snug’s bar – Frank Balistrieri.” + +Fazio, whose brother Louis was murdered six years earlier, told detectives he and others believed “that some people in the Milwaukee Police Department are on the take and therefore we are not conducting a proper investigation into this homicide,” the report said. + +He also warned them people “who might have information regarding this murder are afraid to come forward because they fear for their lives.” + +A newspaper article about the murder quoted a Palmisano Produce truck driver who said Augie was “good to bums, paupers, rich men and poor men” and would feed people off the street. The owner of the building described Augie as a “nice fellow” who always paid his rent on time and slept very little, often starting work before 5 a.m. + +But the narrative that Augie was a Mafia leader or suspected informant seemed to stick. + +One front-page article, quoting police sources, described Augie as a “substantial figure in organized crime in Milwaukee,” and said that “somebody thought he was going to talk.”  + +Another said his killing was “part of a long standing feud between criminal factions in the city.” + +Yet another said Augie “had been branded as a troublemaker by organized crime leaders” for protesting too publicly about the attempted bombing of his close friend, Vince Maniaci.  + +“Augie got put on a troublemaker list,” a source told The Milwaukee Journal. + +## The Satin Doll + +One person didn’t hesitate to name Balistrieri as a suspect in Augie’s murder: lounge owner Minnette Wilson. + +Today, a fading Schlitz sign still hangs over the lounge Wilson owned on West Fond du Lac Avenue. The concrete walls of the now-shuttered tavern are covered in graffiti, and weeds grow through cracks in the parking lot. + +But in 1978, Satin Doll’s Lounge was a hotspot for jazz, vice and wild characters. And few were wilder than its owner. Wilson was a stunning former dancer who performed with Duke Ellington and claimed to have inspired his hit song “Satin Doll.”  + +She often went by the Satin Doll, or just the Doll. + +When a pair of detectives first went to the lounge to interview Wilson about Augie’s murder, she was visibly distraught. The lounge was packed, and she told them she was too busy and upset about her old friend’s death to talk – noting Augie’s funeral had just been held. + +Detectives spotted two large portraits of Augie hanging on the back walls of the lounge and suggested a follow-up interview. + +“It is apparent that she is more than just a close friend of the deceased,” they wrote in their report. “We were unable to determine at this time just how close the relationship was.” + +But there’s nothing else that might indicate they were romantically involved.  + +Wilson told another pair of detectives who returned the following night that she and Augie had dinner together a couple of times in the days leading up to his murder, and he didn’t show any signs of concern about his safety. But she added he was “the type of person that if something was bothering him, even though it would be quite serious, he would not tell anyone else about it,” the police report said. + +“She several times stated that she feels that one Frank Balistrieri, otherwise known as Frankie Bal, was responsible for having August Palmisano killed,” detectives wrote. + +As they were leaving, Wilson told detectives: “Frankie Bal has gone too far this time.” + +## 'I'm in a lot of trouble' + +Detectives kept getting hints Balistrieri was behind Augie’s murder, but they struggled to find details about a motive.  + +A painting found in Augie’s apartment led them to his close friend, a stockbroker named Sante DiAntoni, who went by Sam Denton. Denton told police that when he and his wife found out Augie was murdered, they both sat on their bed and cried.  + +After what detectives described as a “long conversation,” Denton revealed more. He said about six months before the murder, Augie confided in him that he’d been threatened over his friendship with Vince Maniaci, who by then had fled town for Hawaii.  + +“I think I’m in a lot of trouble,” Denton recalled Augie saying. “I was told if I help Vince, I would be in more trouble – that I should stay away from Vince forever.”  + +Three months later Vince decided to come back to Milwaukee, and Augie went to pick him up at the airport, Denton said. Augie waited for three hours but Vince never showed up. Augie later found out that Vince had arrived in Milwaukee but immediately took a flight back to Hawaii. Denton told police that Augie was very upset and frightened, and thought Vince may have been threatened when he arrived at the airport. + +Then, a month before the murder, Vince again called Augie and told him that he was having trouble finding a job, and wanted to come home to Milwaukee. + +“It’s better for you to stay where you are, and I’ll stay where I am. That will be best for both of us,” Denton overheard Augie tell Vince.  + +Denton told detectives he hoped they would solve the case, but said he didn’t think it would be possible. + +## A meeting at FBI headquarters + +Less than a week after Augie was killed, a group of federal agents met with Milwaukee police detectives at FBI headquarters in downtown Milwaukee.  + +There had been tension simmering between the FBI and Milwaukee Police Department for years, with some officers accusing agents of not sharing enough information with them. Several former FBI agents told me they knew some officers were on Balistrieri’s payroll and were worried about corrupt cops leaking information — concerns also documented in FBI reports from the time.  + +But that day, the agents had information to share. They told detectives the FBI was contemplating a grand jury investigation focused on the attempted car bombing of Vincent Maniaci as well as Augie’s murder, and said the agency might be willing to give out immunity in some cases with the idea of “shaking loose information not forthcoming at this time.” + +The agents then told police they’d identified a possible hit man in the Maniaci car bombing case, and said he was also a suspect in Augie’s murder. His name was Nick George Montos, a career criminal who escaped from prison five times and was the first person to make the FBI’s Ten Most Wanted list twice.  + +FBI agents conducting surveillance had spotted Montos following Vince Maniaci before someone tried to kill him.  + +Gary Magnesen, one of the FBI agents at the meeting that day, told me they nicknamed Montos “The Mope” because he looked so unremarkable. + +“A car pulled up almost right in front of us - a black sedan - and a short little guy dressed in gray work clothes got out of the car,” Magnesen said. “He was a Chicago guy. They had used him quite a bit. He was not Italian and he was not part of the mob, but he was a guy that was an expert in bomb making.” + +Retired FBI Agent Bob Walsh told me he also saw Montos in Milwaukee when he noticed him trailing Vince into a McDonald’s shortly before the attempted bombing. + +But neither police nor FBI knew whether Montos was in Milwaukee the day Augie was murdered.  + +The FBI also asked about similarities in the explosives used in the two bombings. They suspected both bombs were closely linked, and likely built by the same person. + +## No answer + +A few weeks later, Milwaukee police detectives tried to talk to Frank Balistrieri at his large Shepard Avenue home on Milwaukee’s East Side. Detectives stopped several times one day, noting the car in the driveway. + +“No one would come to the door,” they wrote of the visit. “However, it seemed as if someone was present in the home.” + +They also went to the home of Peter Balistrieri, Frank’s brother. Nobody answered there either. + +“In addition, we checked at the Shorecrest Hotel,” the report said. “But found that neither one of the Balistrieri brothers were in.” + +It appears the officers never returned. + +Over time, tips coming into the Milwaukee police slowed to a trickle. + +One anonymous caller told police that someone using the name “Michael Block” had moved into Juneau Village shortly before Augie was killed and hadn’t been seen since the murder. He reportedly left behind an expensive razor and nice clothing.   + +Another tipster told police the killer was a Mafia hitman named Richard Montey, who’d since gone into hiding using the alias “Dick Montage” and was living in a cabin behind a tavern near Athens, in northern Wisconsin.  + +Yet another called police and said their son’s friend, a man nicknamed “Dough Pop,” would get high on cocaine and brag that he had something to do with Augie’s murder. + +Police hit one dead end after another. But the feds were just getting started. + +## 'He called me a name to my face' + +Frank Balistrieri had been on the FBI’s radar for years. Augie’s murder helped inspire an all-out crackdown, former agents told me. + +“Now we had a crime, a very serious crime – a homicide – to tie him to,” Magnesen said. “Once those murders began, we knew he was behind it. The problem was to prove it. So that’s when we started pushing really hard.” + +Just weeks after the meeting at FBI headquarters, undercover FBI agent Gail Cobb, who was posing as a new vending machine company owner named Tony Conte, was summoned by Balistrieri to a meeting at Snug’s restaurant in the Shorecrest Hotel.  + +He went with New York Mafia member “Lefty” Ruggiero, who was helping him work out an arrangement between the New York and Milwaukee crime families over vending machine profits [with the help of undercover agent Joe Pistone](https://www.jsonline.com/story/news/special-reports/2024/01/17/qa-former-fbi-agent-joe-pistone-aka-donnie-brasco-on-infiltrating-the-milwaukee-mafia/72182698007/) posing as "Donnie Brasco." + +It was July 29, 1978 — nearly a month after Augie's murder. + +Balistrieri, sitting across the table from Cobb, had reached out to shake his hand when Ruggiero introduced him as Conte. Balistrieri recoiled in shock. + +“We’ve been looking for you all week. We were going to hit you," Cobb remembered him saying. "We figured you were the G.” (The G, or G-man, is short for a government agent.) + +[Balistrieri reportedly laughed](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-balistrieri-tapes-part-9-undercover-agent-was-target-for-balistrieris-hit-men/71245882007/) as he explained that he’d had three guys following Cobb. The would-be hit men had even trailed Cobb to the meeting and were still waiting until Balistrieri waved them away. + +After Ruggiero reassured him Cobb wasn’t an informant, Balistrieri made it clear the vending machine business in Milwaukee belonged to him.  + +Then the conversation turned to Augie.  + +“He was arrogant. He called me a name to my face,” Balistrieri said, touching his fingers to his face.  + +He added: “Now they can’t find his skin.”   + +There was no recording of the exchange. It would have been too dangerous for Cobb to wear a wire to the Shorecrest that night. + +Shortly afterward, a shaken Cobb told Pistone: “First thing I’m going to do is put a remote starter in my Cadillac.” + +A few weeks later, Cobb and Pistone were at a bar with Balistrieri when they ran into Peter Picciurro, the owner of Pitch’s Lounge & Restaurant, where Augie had his last meal. + +Balistrieri reportedly laughed as he told the two men that Picciurro hadn’t talked to him since “the guy had his accident” and “got blown up.” + +“They were buddies — goombahs — real close,” Balistrieri added. + +That same night, Balistrieri bragged to the undercover agents that nobody had ever lived to be a witness against him. + +Only in this case, if Balistrieri was trying to gain power by making an example out of Augie, he may have instead set in motion his own downfall. + +## A full-court press + +In October 1978, Cobb was frozen out by Balistrieri, who reportedly had discovered that he was an undercover agent. But by then he and Pistone had already gathered extensive information about Balistrieri’s gambling ring and extortion activities.  + +The FBI’s investigations into Balistrieri and his associates would ultimately involve a federal grand jury, subpoenas, search warrants, wiretapping and other physical and electronic surveillance. + +“We call it a full-court press,” said Magnesen, the longtime FBI agent who’s now retired. + +The FBI targeted several locations for surveillance, including the Shorecrest Hotel. After obtaining blueprints to the Shorecrest and a search warrant, a group of [FBI agents broke into the building](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-balistrieri-tapes-part-8-microphones-gave-fbi-a-chair-at-balistrieris-table/71245852007/) one night. They were able to slip in through the front door after two agents pretended to make out in front of the entrance -- blocking the door from view as an FBI lock expert cut a key in real time.  + +Magnesen, one of the agents who broke in that night, said he still remembers the concrete dust falling on them as they drilled a hole in the basement ceiling. They then placed a listening device under the carpet. + +It turned out they had put the microphone in the wrong place, and had to enter the Shorecrest for a second time to move the microphone. + +Magnesen said one of the conversations agents heard thanks to that microphone was a worried discussion about a subpoena served to Nick Montos, who Balistrieri warned had “real, real, real good information” on what he called “the boom.” + +That quote was one of several glimmers of hope that prosecutors would be able to charge Balistrieri with the murders they believed he’d ordered.  + +Despite Balistrieri gloating about the deaths, officials never felt like they had enough evidence to win a homicide conviction. + +In 1980, after months of around-the-clock surveillance, the FBI broke down Balistrieri’s front door with a sledgehammer. He was later charged with gambling, tax evasion and extortion. + +## John Franke + +One September afternoon, former federal prosecutor John Franke led me down the staircase to the basement of his suburban Milwaukee home, stopping at a stash of bankers boxes.  + +“They sat in storage in different houses for the last, what is it, 40 years?” he said. + +Franke peered inside one of the boxes, which was filled with court documents, FBI wiretap transcripts, notebooks and other files from the years he spent working to win convictions against Balistrieri and his associates. + +As Franke flipped through a manila folder, an old black and white photograph caught my eye.   + +“Is that Augie?” I asked.   + +“That might be your cousin. Yeah, it probably is,” Franke said, turning it over and reading the name on the back. “Augie Palmisano.”   + +The file also held pictures of Balistrieri, including a booking photo and another of him dressed in one of his custom suits.   + +“Fancy Pants,” Franke said. "Well-dressed as always." + +Frank Balistrieri had proven to be slippery in the past. About a decade before Franke joined what was known as the Organized Crime Strike Force, a federal tax evasion case against Balistrieri was nearly derailed when Balistrieri discovered the FBI had illegally planted microphones to conduct electronic surveillance without a warrant. + +To prepare for the Balistrieri trials some 10 years later, Franke and others on the Organized Crime Strike Force spent weeks listening to hours of conversations between Balistrieri and his associates that had been secretly -- but this time, legally -- recorded by the FBI. + +“I don't know how many hours I spent in that room with those big old reel-to-reel tapes running,” Franke told me.   + +In 1983, Balistrieri was convicted of gambling and tax charges. The following year, he and his two sons were convicted of extortion. At the trials, former undercover agents Pistone and Cobb were among those who testified. + +Franke said one thing that "caught everyone's attention" was the explosion that killed Augie. While he was prosecuting the case, people would tell him where they were when the bomb went off, he said, because it could be felt from blocks away. + +“That was a pretty dramatic moment in terms of, creating the sense in the community that maybe there is organized crime here, and maybe it’s something that we should actually worry about,” Franke said. “Because it’s not just, you know, gangsters gunning down gangsters. It’s people doing things that could kill innocent people easily.” + +When I asked if he thought Balistrieri got away with murder, Franke fell silent.  + +“The most compelling statement from Frank was not recorded,” he said after a long pause. “That would be ‘they can't find his skin. He was arrogant to my face.’” + +But it was clear he was reviewing the case in his mind.   + +“Look, you're making me pause. Because I'm sure if we thought that was enough, we would have pursued it. But, proving beyond a reasonable doubt that he ordered it just because he was gloating about someone's death,” Franke said. “I don't know. Maybe we missed something. But it really probably wasn't enough to convince a jury.”  + +## Bad blood   + +The convictions of Balistrieri and his associates dealt [a massive blow to organized crime in Milwaukee](https://www.jsonline.com/story/news/special-reports/2024/01/17/balistrieri-tapes-part-12-balistrieri-convictions-left-void-in-local-mafia-fbi-agents-say/71246015007/), and the investigations that led to them are widely considered to be among the greatest success stories for the FBI here. + +For his crimes in Milwaukee, Balistrieri was sentenced to 13 years in prison. + +Two years later, in a separate federal case involving [skimming money from Las Vegas casinos](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-balistrieri-tapes-part-11-lure-of-casino-funds-outweighed-hatred/71245969007/), Balistrieri pleaded guilty and was sentenced to a concurrent 10 years.  + +He was released from prison early due to his failing health in 1991, and died two years later at age 74. + +Nick Montos had a long criminal career and spent years as a fugitive. In 1995, he tried to rob a Massachusetts antique store, where he tied up the 73-year-old Jewish owner and called her an antisemitic slur. She was able to escape and fight off Montos, then 78, with a baseball bat. He was still a prisoner when he died at age 92. + +Montos was never charged in Augie's murder or Vince's attempted car bombing. But to this day, retired FBI agents Magnesen and Walsh told me they believe that Montos built the bomb that killed my cousin on the orders of Balistrieri.  + +As for motive? Magnesen said it was well known Augie “had contempt" for Frank Balistrieri. And he wasn’t the only one. + +“All of the soldiers and so on despised (Balistrieri) because he didn’t have cred. He was a nobody really. He had never really shown himself to be a good criminal or anything like that. So they didn’t like him,” Magnesen said. “And Augie Palmisano – although he was not a made member – he didn’t like (Balistrieri) at all either. And would talk about him on the street.” + +Magnesen said Balistrieri, through his enforcer, put pressure on Augie to pay a percentage of his gambling winnings to him — “or else.” That enforcer was observed by another FBI agent in a big argument with Augie shortly before he was murdered, he added. + +Magnesen stressed that my cousin was neither a made member of the Mafia nor was he a "rat," as Balistrieri had claimed. + +“Palmisano was not an informant. But (Balistrieri) told the Chicago people he was, and therefore a threat to him and therefore a threat to them,” Magnesen said. “He just lied. He did everything he could to get them to do his dirty work.” + +FBI documents corroborate that there was bad blood between the two, including a July 1978 report stating that Augie had “openly showed his disgust with Balistrieri for having a bomb placed in Vincent Maniaci’s vehicle.”  + +The report also said that Balistrieri had previously accused Augie of operating a bookmaking business without paying off “the LCN,” or La Cosa Nostra. + +Family history suggests the bad blood may have started years earlier, when Augie’s brother married Balistrieri’s sister, against the Palmisano family's wishes. The relationship reportedly got worse when Balistrieri and Augie began [feuding over a shared relative](https://www.jsonline.com/story/news/special-reports/2024/01/17/the-balistrieri-tapes-part-9-undercover-agent-was-target-for-balistrieris-hit-men/71245882007/) they both wanted to hire who'd taken a job as a bartender at Augie's tavern.  + +Former FBI Agent Bob Walsh said Augie and Vince refused to take orders from Balistrieri.  + +“They were sort of outsiders,” Walsh said. “He couldn’t control them. They were kind of on their own.” + +He believes Balistrieri used them as an example to scare others into doing as they were told. + +“I think he wanted to show that he’s in charge here,” Walsh said. “And every once in a while, you’ve got to flex your muscles and put somebody down.” + +## Chasing ghosts + +In the more than four decades since Augie’s murder, the Third Ward has undergone a seismic shift. What was once the working-class stretch known as Commission Row has been replaced by posh boutiques, restaurants, bars and other high-end businesses that now line Broadway. + +The building that was home to Palmisano Produce and Richie’s on Broadway, or Palmy’s, is now Café Benelux. The boards that used to cover the windows are gone, as is the pool table. Now the bar serves Belgian beers and craft cocktails, and a staircase leads to a rooftop patio. + +As for me, trying to report on the 45-year-old unsolved murder of a cousin I never knew has felt a bit like chasing ghosts – or trying to put together a puzzle with too many missing pieces.  + +Many of the key figures involved have died. Some would only talk anonymously because they were still afraid of the reach of organized crime, or simply didn’t return my phone calls. Others declined to be interviewed, like Frank Balistrieri’s son, John. Augie’s children did not respond to interview requests. + +It’s been a relief to learn that Augie was not some murderer or Mafia kingpin – nor was he a “made” member, according to the FBI agents I interviewed who knew him. Those same agents said that while Augie was no angel, he was funny, charismatic and well liked. And many of his gambling activities that were front-page news decades ago are now basically legal.  + +Months spent poring over hundreds of pages of police reports, FBI files, court records and wiretap transcripts made me realize that in a sense I’d been blaming Augie for his own murder – or at least trying to figure out what he did that led to the car bombing. + +Franke noticed I was still struggling to make sense of the murder when I called him months after our initial interview to ask about additional documents that may shed some light on the case. + +“Mary, I know you’re trying to understand what your cousin did or didn’t do that led to his death,” Franke told me. “But this was about power.” + +He was right. Augie may have been a gambler who refused to give Balistrieri a cut of his profits, and criticized the attempted murder of his best friend. And he probably even called Balistrieri a name to his face. But he didn't deserve to die the way he did.  + +He was a businessman and a hustler. A convicted gambler and a devoted friend. A rebel who bucked authority. He was adored. And he had some powerful enemies. + +His name was Augie Palmisano, and he was my cousin. + +*Contact Mary Spicuzza at (414) 224-2324 or mary.spicuzza@jrn.com. Follow her on Twitter at @MSpicuzzaMJS*. + +SMS Facebook Twitter Email + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Why Parents Struggle So Much in the World's Richest Country.md b/00.03 News/Why Parents Struggle So Much in the World's Richest Country.md index 710d13bd..ec79b020 100644 --- a/00.03 News/Why Parents Struggle So Much in the World's Richest Country.md +++ b/00.03 News/Why Parents Struggle So Much in the World's Richest Country.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2024-01-20]] --- diff --git a/01.02 Home/@Shopping list.md b/01.02 Home/@Shopping list.md index 448b76f5..f5b76db8 100644 --- a/01.02 Home/@Shopping list.md +++ b/01.02 Home/@Shopping list.md @@ -92,7 +92,7 @@ style: number #### Dairy -- [x] 🧈 Beurre ✅ 2024-01-13 +- [x] 🧈 Beurre ✅ 2024-01-23 - [x] 🧀 Fromage à servir ✅ 2023-06-12 - [x] 🧀 Fromage rapé ✅ 2023-10-26 - [x] 🧀 Parmeggiano ✅ 2024-01-13 @@ -117,19 +117,19 @@ style: number #### Fresh -- [x] 🍎 Fruit ✅ 2024-01-13 +- [x] 🍎 Fruit ✅ 2024-01-23 - [x] 🍌 Bananas ✅ 2023-09-23 -- [x] 🌰 Walnuts ✅ 2024-01-17 +- [x] 🌰 Walnuts ✅ 2024-01-23 - [x] 🥜 Peanuts ✅ 2024-01-16 -- [x] 🥜 Pine nuts ✅ 2023-10-08 -- [x] 🍅 Tomatoes ✅ 2024-01-06 +- [x] 🥜 Pine nuts ✅ 2024-01-22 +- [x] 🍅 Tomatoes ✅ 2024-01-23 - [x] 🫑 Bell pepper ✅ 2023-12-08 - [x] 🥦 Fennel ✅ 2022-10-29 - [x] 🥦 Radish ✅ 2022-10-29 - [x] 🥦 Broccoli ✅ 2023-12-08 - [x] 🫛 Green beans ✅ 2024-01-13 -- [x] 🫛 Green peas ✅ 2024-01-16 -- [x] 🫘 Red beans ✅ 2023-12-23 +- [x] 🫛 Green peas ✅ 2024-01-22 +- [x] 🫘 Red beans ✅ 2024-01-23 - [x] 🍄 Mushrooms ✅ 2024-01-08 - [x] 🧅 Onions ✅ 2024-01-06 - [x] 🧅 Spring onion ✅ 2024-01-06 @@ -144,7 +144,7 @@ style: number - [x] 🥩 Cured meat ✅ 2022-12-31 - [x] 🍖 Fresh meat ✅ 2023-11-04 -- [x] 🍖 Minced meat ✅ 2024-01-06 +- [x] 🍖 Minced meat ✅ 2024-01-23 - [x] 🥓 Bacon ✅ 2023-04-07 - [x] 🐑 Lamb shank ✅ 2023-12-23 - [x] 🐔 Chicken thighs ✅ 2023-10-07 @@ -157,7 +157,7 @@ style: number #### Bases - [x] 🍝 Pasta ✅ 2023-12-23 -- [x] 🍜 Noodles ✅ 2024-01-13 +- [x] 🍜 Noodles ✅ 2024-01-23 - [x] 🌾 Bulgur ✅ 2022-10-29 - [x] 🍚 Rice ✅ 2023-11-10 - [x] 🥔 Potatoes ✅ 2024-01-13 @@ -195,7 +195,7 @@ style: number - [x] 🌿 Bay leaves ✅ 2022-08-05 - [x] 🌿 Oregano ✅ 2022-03-14 - [x] 🌿 Herbes de Provence ✅ 2022-03-14 -- [x] 🌿 Coriander ✅ 2023-12-21 +- [x] 🌿 Coriander ✅ 2024-01-23 - [x] 🌿 Parsley ✅ 2024-01-16 - [x] 🌿 Fresh mint ✅ 2023-12-23 diff --git a/01.02 Home/Bandes Dessinées.md b/01.02 Home/Bandes Dessinées.md index 65bf3ece..c5c55122 100644 --- a/01.02 Home/Bandes Dessinées.md +++ b/01.02 Home/Bandes Dessinées.md @@ -67,6 +67,10 @@ style: number 12. Shadow 13. Le Prix de l’Argent 14. La Loi du Dollar +15. Les Trois Yeux des Gardiens du Tao +16. Les Voies de la Vertu +17. Mer Noire +18. Colère Rouge   @@ -92,6 +96,7 @@ style: number 12. Un Monde Parfait 13. Point de Non-Retour 14. Piégés! +15. Deuil & Espoir   @@ -164,6 +169,7 @@ Articles: [[Why Bill Watterson Vanished - The American Conservative]], [[Bill Wa 6. Cixi Impératrice 7. Les Pétaures se cachent pour mourir 8. La Bête Fabuleuse +9. La Forêt Noiseuse   diff --git a/01.02 Home/Household.md b/01.02 Home/Household.md index 32764f0f..3a811b81 100644 --- a/01.02 Home/Household.md +++ b/01.02 Home/Household.md @@ -76,7 +76,8 @@ style: number - [ ] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-01-30 - [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-01-16 ✅ 2024-01-15 - [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-01-02 ✅ 2024-01-01 -- [ ] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-01-23 +- [ ] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-02-06 +- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-01-23 ✅ 2024-01-22 - [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-01-09 ✅ 2024-01-08 - [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-12-26 ✅ 2023-12-26 @@ -86,7 +87,8 @@ style: number - [ ] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2024-01-31 - [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-12-31 ✅ 2023-12-25 -- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2024-01-22 +- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2024-01-29 +- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2024-01-22 ✅ 2024-01-21 - [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2024-01-15 ✅ 2024-01-12 - [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2024-01-08 ✅ 2024-01-06 - [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2024-01-01 ✅ 2023-12-25 diff --git a/01.03 Family/Joséphine Bédier.md b/01.03 Family/Joséphine Bédier.md index 7fd3ffd5..b0f61dc7 100644 --- a/01.03 Family/Joséphine Bédier.md +++ b/01.03 Family/Joséphine Bédier.md @@ -103,7 +103,8 @@ style: number   -- [w] :birthday: **[[Joséphine Bédier|Joséphine]]** %%done_del%% 🔁 every year 📅 2024-01-21 +- [ ] :birthday: **[[Joséphine Bédier|Joséphine]]** %%done_del%% 🔁 every year 📅 2025-01-21 +- [x] :birthday: **[[Joséphine Bédier|Joséphine]]** %%done_del%% 🔁 every year 📅 2024-01-21 ✅ 2024-01-21 - [x] :birthday: **[[Joséphine Bédier|Joséphine]]** %%done_del%% 🔁 every year 📅 2023-01-21 ✅ 2023-01-21 - [x] :birthday: **[[Joséphine Bédier|Joséphine]]** 🔁 every year 📅 2022-01-21 ✅ 2022-01-21 diff --git a/02.03 Zürich/Barfussbar.md b/02.03 Zürich/Barfussbar.md new file mode 100644 index 00000000..8c3582dc --- /dev/null +++ b/02.03 Zürich/Barfussbar.md @@ -0,0 +1,114 @@ +--- + +Alias: [""] +Tag: ["🍸"] +Date: 2024-01-25 +DocType: "Place" +Hierarchy: "NonRoot" +TimeStamp: +location: [47.3683852,8.54202963182996] +Place: + Type: Bar + SubType: Pool + Style: Swiss + Location: Altstadt + Country: CH + Status: Recommended +CollapseMetaTable: true +Phone: "+41 44 251 33 31" +Email: "info@barfussbar.ch" +Website: "[Die Bar an der Limmat | Barfussbar in der Frauenbadi Zürich](https://barfussbar.ch/de/)" + +--- + +Parent:: [[@@Zürich|Zürich]], [[@Bars Zürich|Bars in Zürich]] + +  + +```dataviewjs +let tempPhone = dv.current().Phone ? dv.current().Phone.replaceAll(" ", "") : '+000' +let tempMail = dv.current().Email ? dv.current().Email : "" +let tempCoorSet = dv.current().location ? dv.current().location : [0,0] +dv.el('center', '[📲](tel:' + tempPhone + ')     [📧](mailto:' + tempMail + ')     [🗺️](' + "https://waze.com/ul?ll=" + tempCoorSet[0] + "%2C" + tempCoorSet[1] + "&navigate=yes" + ')') +``` + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-BarfussbarSave + +  + +# Barfussbar + +  + +> [!summary]+ +> Note Description + +  + +```toc +style: number +``` + +  + +--- + +  + +### 📇 Contact + +  + +> [!address] 🗺 +> Stadthausquai 12 +> 8001 Zürich +> Switzerland + +  + +☎️ `= this.Phone` + +📧 `= this.Email` + +🌐 `= this.Website` + +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### 🔗 Other activity + +  + +```dataview +Table DocType as "Doc type" from [[Barfussbar]] +where !contains(file.name, "@@Travel") +sort DocType asc +``` + +  +  \ No newline at end of file diff --git a/02.03 Zürich/Old Crow.md b/02.03 Zürich/Old Crow.md new file mode 100644 index 00000000..6ab2bff7 --- /dev/null +++ b/02.03 Zürich/Old Crow.md @@ -0,0 +1,114 @@ +--- + +Alias: [""] +Tag: ["🍸"] +Date: 2024-01-25 +DocType: "Place" +Hierarchy: "NonRoot" +TimeStamp: +location: [47.37214125,8.541222271172717] +Place: + Type: Bar + SubType: Cocktail + Style: Swiss + Location: Altstadt + Country: CH + Status: Test +CollapseMetaTable: true +Phone: "+41 43 233 53 35" +Email: "info@oldcrow.ch" +Website: "[Old Crow Zurich – rare spirits & cocktails](https://www.oldcrow.ch/)" + +--- + +Parent:: [[@@Zürich|Zürich]], [[@Bars Zürich|Bars in Zürich]] + +  + +```dataviewjs +let tempPhone = dv.current().Phone ? dv.current().Phone.replaceAll(" ", "") : '+000' +let tempMail = dv.current().Email ? dv.current().Email : "" +let tempCoorSet = dv.current().location ? dv.current().location : [0,0] +dv.el('center', '[📲](tel:' + tempPhone + ')     [📧](mailto:' + tempMail + ')     [🗺️](' + "https://waze.com/ul?ll=" + tempCoorSet[0] + "%2C" + tempCoorSet[1] + "&navigate=yes" + ')') +``` + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-OldCrowSave + +  + +# Old Crow + +  + +> [!summary]+ +> Note Description + +  + +```toc +style: number +``` + +  + +--- + +  + +### 📇 Contact + +  + +> [!address] 🗺 +> Schwanengasse 4 +> 8001 Zürich +> Switzerland + +  + +☎️ `= this.Phone` + +📧 `= this.Email` + +🌐 `= this.Website` + +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### 🔗 Other activity + +  + +```dataview +Table DocType as "Doc type" from [[The Old Crow]] +where !contains(file.name, "@@Travel") +sort DocType asc +``` + +  +  \ No newline at end of file diff --git a/03.02 Travels/Hoch Ybrig.md b/03.02 Travels/Hoch Ybrig.md new file mode 100644 index 00000000..42423820 --- /dev/null +++ b/03.02 Travels/Hoch Ybrig.md @@ -0,0 +1,124 @@ +--- + +Alias: [""] +Tag: ["🏔️", "🎿", "🇨🇭"] +Date: 2024-01-20 +DocType: "Place" +Hierarchy: "NonRoot" +TimeStamp: +location: [47.0385782,8.7994732] +Place: + Type: Sport + SubType: Skiing + Style: Swiss + Location: Zug + Country: CH + Status: Tested +CollapseMetaTable: true +Phone: "+41 55 414 60 60" +Email: "info@hoch-ybrig.ch" +Website: "[Hoch-Ybrig - Das Ski- und Snowboard-Paradies](https://www.hoch-ybrig.ch/winter/)" + +--- + +Parent:: [[@Switzerland|Switzerland]], [[Skiing in Switzerland]] + +  + +```dataviewjs +let tempPhone = dv.current().Phone ? dv.current().Phone.replaceAll(" ", "") : '+000' +let tempMail = dv.current().Email ? dv.current().Email : "" +let tempCoorSet = dv.current().location ? dv.current().location : [0,0] +dv.el('center', '[📲](tel:' + tempPhone + ')     [📧](mailto:' + tempMail + ')     [🗺️](' + "https://waze.com/ul?ll=" + tempCoorSet[0] + "%2C" + tempCoorSet[1] + "&navigate=yes" + ')') +``` + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-HochYbrigSave + +  + +# Hoch Ybrig + +  + +> [!summary]+ +> Note Description + +  + +```toc +style: number +``` + +  + +--- + +  + +### 📇 Contact + +  + +> [!address] 🗺 +> Talstation Weglosen +> Waagtalstrasse 127 +> Unteriberg +> Switzerland + +  + +☎️ `= this.Phone` + +📧 `= this.Email` + +🌐 `= this.Website` + +  + +--- + +  + +### 🗒 Notes + +  + + +|   |   | +| --------------------- |:--------------------------:| +| **Day pass** | *CHF 57* | +| **Size of domain** | *Medium* | +| **Restaurants** | *10* | +| **Time to ZH** | Car: *1h* | +| **Easy car park** | *Yes* | +| **Parking for 1 day** | *free* | + + +  + +--- + +  + +### 🔗 Other activity + +  + +```dataview +Table DocType as "Doc type" from [[Hoch Ybrig]] +where !contains(file.name, "@@Travel") +sort DocType asc +``` + +  +  \ No newline at end of file diff --git a/03.02 Travels/Klewenalp.md b/03.02 Travels/Klewenalp.md new file mode 100644 index 00000000..111c4083 --- /dev/null +++ b/03.02 Travels/Klewenalp.md @@ -0,0 +1,114 @@ +--- + +Alias: [""] +Tag: ["🏔️", "🎿", "🇨🇭"] +Date: 2024-01-21 +DocType: "Place" +Hierarchy: "NonRoot" +TimeStamp: +location: [46.9663843,8.4730327] +Place: + Type: Sport + SubType: Skiing + Style: Swiss + Location: Luzern + Country: CH + Status: Tested +CollapseMetaTable: true +Phone: "+41 41 624 66 00" +Email: "willkommen@klewenalp.ch" +Website: "[Klewenalp-Stockhütte - Ihr Ausflugsparadies im Herzen der Zentralschweiz](https://www.klewenalp.ch/)" + +--- + +Parent:: [[@Switzerland|Switzerland]], [[Skiing in Switzerland]] + +  + +```dataviewjs +let tempPhone = dv.current().Phone ? dv.current().Phone.replaceAll(" ", "") : '+000' +let tempMail = dv.current().Email ? dv.current().Email : "" +let tempCoorSet = dv.current().location ? dv.current().location : [0,0] +dv.el('center', '[📲](tel:' + tempPhone + ')     [📧](mailto:' + tempMail + ')     [🗺️](' + "https://waze.com/ul?ll=" + tempCoorSet[0] + "%2C" + tempCoorSet[1] + "&navigate=yes" + ')') +``` + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-KlewenalpSave + +  + +# Klewenalp + +  + +> [!summary]+ +> Note Description + +  + +```toc +style: number +``` + +  + +--- + +  + +### 📇 Contact + +  + +> [!address] 🗺 +> Kirchweg 27 +> 6375 Beckenried +> Switzerland + +  + +☎️ `= this.Phone` + +📧 `= this.Email` + +🌐 `= this.Website` + +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### 🔗 Other activity + +  + +```dataview +Table DocType as "Doc type" from [[Klewenalp]] +where !contains(file.name, "@@Travel") +sort DocType asc +``` + +  +  \ No newline at end of file diff --git a/03.04 Cinematheque/Dexter (2006–2013).md b/03.04 Cinematheque/Dexter (2006–2013).md index f07c7a01..4e33e36d 100644 --- a/03.04 Cinematheque/Dexter (2006–2013).md +++ b/03.04 Cinematheque/Dexter (2006–2013).md @@ -22,7 +22,7 @@ airedFrom: "01/10/2006" airedTo: "unknown" watched: true lastWatched: "2014" -personalRating: 8.5 +personalRating: 8 CollapseMetaTable: true --- diff --git a/03.04 Cinematheque/Interview with the Vampire - The Vampire Chronicles (1994).md b/03.04 Cinematheque/Interview with the Vampire - The Vampire Chronicles (1994).md new file mode 100644 index 00000000..a4befb3c --- /dev/null +++ b/03.04 Cinematheque/Interview with the Vampire - The Vampire Chronicles (1994).md @@ -0,0 +1,103 @@ +--- +type: "movie" +subType: null +title: "Interview with the Vampire: The Vampire Chronicles" +englishTitle: "Interview with the Vampire: The Vampire Chronicles" +year: "1994" +dataSource: "OMDbAPI" +url: "https://www.imdb.com/title/tt0110148/" +id: "tt0110148" +plot: "A vampire tells his epic life story: love, betrayal, loneliness, and hunger." +genres: + - "Drama" + - "Fantasy" + - "Horror" +director: + - "Neil Jordan" +writer: + - "Anne Rice" +studio: + - "N/A" +duration: "123 min" +onlineRating: 7.5 +actors: + - "Brad Pitt" + - "Tom Cruise" + - "Antonio Banderas" +image: "https://m.media-amazon.com/images/M/MV5BYThmYjJhMGItNjlmOC00ZDRiLWEzNjUtZjU4MjA3MzY0MzFmXkEyXkFqcGdeQXVyNTI4MjkwNjA@._V1_SX300.jpg" +released: true +streamingServices: +premiere: "11/11/1994" +watched: true +lastWatched: "[[2024-01-24]]" +personalRating: 0 + +--- + +Parent:: [[@Cinematheque]] + +--- + +```dataviewjs +dv.paragraph(`> [!${dv.current().watched ? 'SUCCESS' : 'WARNING'}] ${dv.current().watched ? 'last watched on ' + dv.current().lastWatched : 'not yet watched'}`) +``` + +  + +# `$= dv.current().title` + +  + +`$= dv.current().watched ? '**Rating**: ' + dv.current().personalRating + ' out of 10' : ''` + +```toc +``` + +  + +### Details + +  + +**Genres**: +`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)` + +`$= !dv.current().released ? '**Not released** The movie is not yet released.' : ''` + +  + +```dataview +list without id + "" + + + "" ++ + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "
Type" + this.type + "
Online Rating" + this.onlineRating + "
Duration" + this.duration + "
Premiered" + this.premiere + "
Producer" + this.producer + "
" +FROM "03.04 Cinematheque/Interview with the Vampire - The Vampire Chronicles (1994)" +``` + +  + +--- + +  + +### Poster + +  + +`$= '![Image|360](' + dv.current().image + ')'` \ No newline at end of file diff --git a/03.04 Cinematheque/Rain Man (1988).md b/03.04 Cinematheque/Rain Man (1988).md new file mode 100644 index 00000000..38affc58 --- /dev/null +++ b/03.04 Cinematheque/Rain Man (1988).md @@ -0,0 +1,102 @@ +--- +type: "movie" +subType: null +title: "Rain Man" +englishTitle: "Rain Man" +year: "1988" +dataSource: "OMDbAPI" +url: "https://www.imdb.com/title/tt0095953/" +id: "tt0095953" +plot: "After a selfish L.A. yuppie learns his estranged father left a fortune to an autistic-savant brother in Ohio that he didn't know existed, he absconds with his brother and sets out across the country, hoping to gain a larger inheri..." +genres: + - "Drama" +director: + - "Barry Levinson" +writer: + - "Barry Morrow" + - "Ron Bass" +studio: + - "N/A" +duration: "133 min" +onlineRating: 8 +actors: + - "Dustin Hoffman" + - "Tom Cruise" + - "Valeria Golino" +image: "https://m.media-amazon.com/images/M/MV5BMzVjNzI4NzYtMjE4NS00M2IzLWFkOWMtOTYwMWUzN2ZlNGVjL2ltYWdlL2ltYWdlXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg" +released: true +streamingServices: +premiere: "16/12/1988" +watched: true +lastWatched: "[[2024-01-23]]" +personalRating: 8 + +--- + +Parent:: [[@Cinematheque]] + +--- + +```dataviewjs +dv.paragraph(`> [!${dv.current().watched ? 'SUCCESS' : 'WARNING'}] ${dv.current().watched ? 'last watched on ' + dv.current().lastWatched : 'not yet watched'}`) +``` + +  + +# `$= dv.current().title` + +  + +`$= dv.current().watched ? '**Rating**: ' + dv.current().personalRating + ' out of 10' : ''` + +```toc +``` + +  + +### Details + +  + +**Genres**: +`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)` + +`$= !dv.current().released ? '**Not released** The movie is not yet released.' : ''` + +  + +```dataview +list without id + "" + + + "" ++ + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "
Type" + this.type + "
Online Rating" + this.onlineRating + "
Duration" + this.duration + "
Premiered" + this.premiere + "
Producer" + this.producer + "
" +FROM "03.04 Cinematheque/Rain Man (1988)" +``` + +  + +--- + +  + +### Poster + +  + +`$= '![Image|360](' + dv.current().image + ')'` \ No newline at end of file diff --git a/03.05 Vinyls/@Vinyls.md b/03.05 Vinyls/@Vinyls.md index 1fae5bbb..30aca9b9 100644 --- a/03.05 Vinyls/@Vinyls.md +++ b/03.05 Vinyls/@Vinyls.md @@ -182,6 +182,7 @@ dv.view("00.01 Admin/dv-views/query_vinyl", {genres: "variete"}) - [x] Fugees - The Score ✅ 2023-11-08 - [ ] Lauryn Hill - The Miseducation of Lauryn Hill - [x] NTM - Paris Sous Les Bombes ✅ 2023-11-08 +- [x] Wu Tang - Enter the Wu Tang (36 Chambers) ✅ 2024-01-26 - [ ] Wu Tang - [ ] Cypress Hill - [ ] Notorious B.I.G. @@ -199,6 +200,7 @@ dv.view("00.01 Admin/dv-views/query_vinyl", {genres: "variete"}) - [x] Queen - Greatest Hits ✅ 2023-11-08 - [x] Prince ✅ 2023-11-08 - [ ] Prince - When doves cry +- [x] Michael Jackson - Thriller ✅ 2024-01-26 - [x] David Bowie ✅ 2023-12-30 - [ ] The Rolling Stones - [ ] The Doors @@ -208,6 +210,7 @@ dv.view("00.01 Admin/dv-views/query_vinyl", {genres: "variete"}) - [x] Rage Against the Machine ✅ 2023-11-01 - [ ] Metallica - [ ] Nirvana +- [x] AC/DC - Highway to Hell ✅ 2024-01-26 - [ ] Noir Désir - [ ] The Clash - London Calling diff --git a/03.05 Vinyls/Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993).md b/03.05 Vinyls/Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993).md new file mode 100644 index 00000000..57b5fe51 --- /dev/null +++ b/03.05 Vinyls/Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993).md @@ -0,0 +1,80 @@ +--- +DocType: "Vinyl" +type: "musicRelease" +subType: "Album" +title: "Enter the Wu‐Tang (36 Chambers)" +englishTitle: "Enter the Wu‐Tang (36 Chambers)" +year: "1993" +dataSource: "MusicBrainz API" +url: "https://musicbrainz.org/release-group/610fb60f-900a-3c42-ac7d-f6b6aa8035f9" +id: "610fb60f-900a-3c42-ac7d-f6b6aa8035f9" +genres: + - "boom bap" + - "east coast hip hop" + - "gangsta rap" + - "hardcore hip hop" + - "hip hop" +artists: + - "Wu‐Tang Clan" +image: "https://coverartarchive.org/release-group/610fb60f-900a-3c42-ac7d-f6b6aa8035f9/front" +rating: 9.4 +personalRating: 0 +--- + + +Parent:: [[@Vinyls|Vinyls]] + +--- + +  + +# `$= dv.current().title` + +  + +```toc +``` + +  + +### Details + +  + +**Genres**: +`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)` + +  + +```dataview +list without id + "" + + + "" ++ + "" + + + "" + + + "" + + + "" + + + "" + + + "
Type" + this.subType + "
Online Rating" + this.rating + "
Artists" + this.artists + "
Premiered" + this.year + "
" +FROM "03.05 Vinyls/Enter the Wu‐Tang (36 Chambers) (by Wu‐Tang Clan - 1993)" +``` + +  + +--- + +  + +### Poster + +  + +`$= '![Image|360](' + dv.current().image + ')'` + diff --git a/03.05 Vinyls/Highway to Hell (by ACDC - 1979).md b/03.05 Vinyls/Highway to Hell (by ACDC - 1979).md new file mode 100644 index 00000000..7ab8dacd --- /dev/null +++ b/03.05 Vinyls/Highway to Hell (by ACDC - 1979).md @@ -0,0 +1,79 @@ +--- +DocType: "Vinyl" +type: "musicRelease" +subType: "Album" +title: "Highway to Hell" +englishTitle: "Highway to Hell" +year: "1979" +dataSource: "MusicBrainz API" +url: "https://musicbrainz.org/release-group/f85647ec-a69b-3b0a-ad04-bb6076c4dcf1" +id: "f85647ec-a69b-3b0a-ad04-bb6076c4dcf1" +genres: + - "arena rock" + - "classic rock" + - "hard rock" + - "rock" +artists: + - "AC/DC" +image: "https://coverartarchive.org/release-group/f85647ec-a69b-3b0a-ad04-bb6076c4dcf1/front" +rating: 9 +personalRating: 0 +--- + + +Parent:: [[@Vinyls|Vinyls]] + +--- + +  + +# `$= dv.current().title` + +  + +```toc +``` + +  + +### Details + +  + +**Genres**: +`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)` + +  + +```dataview +list without id + "" + + + "" ++ + "" + + + "" + + + "" + + + "" + + + "" + + + "
Type" + this.subType + "
Online Rating" + this.rating + "
Artists" + this.artists + "
Premiered" + this.year + "
" +FROM "03.05 Vinyls/Highway to Hell (by ACDC - 1979)" +``` + +  + +--- + +  + +### Poster + +  + +`$= '![Image|360](' + dv.current().image + ')'` + diff --git a/03.05 Vinyls/Première Consultation (by Doc Gynéco - 1996).md b/03.05 Vinyls/Première Consultation (by Doc Gynéco - 1996).md index b32ffbe5..63a83b04 100644 --- a/03.05 Vinyls/Première Consultation (by Doc Gynéco - 1996).md +++ b/03.05 Vinyls/Première Consultation (by Doc Gynéco - 1996).md @@ -8,8 +8,7 @@ year: "1996" dataSource: "MusicBrainz API" url: "https://musicbrainz.org/release-group/854d43f7-a8d3-3ead-9d45-1e72a92577f1" id: "854d43f7-a8d3-3ead-9d45-1e72a92577f1" -genres: - - "g-funk" +genres: - "hip hop" - "pop rap" artists: diff --git a/03.05 Vinyls/Thriller (by Michael Jackson - 1982).md b/03.05 Vinyls/Thriller (by Michael Jackson - 1982).md new file mode 100644 index 00000000..171b42ad --- /dev/null +++ b/03.05 Vinyls/Thriller (by Michael Jackson - 1982).md @@ -0,0 +1,83 @@ +--- +DocType: "Vinyl" +type: "musicRelease" +subType: "Album" +title: "Thriller" +englishTitle: "Thriller" +year: "1982" +dataSource: "MusicBrainz API" +url: "https://musicbrainz.org/release-group/f32fab67-77dd-3937-addc-9062e28e4c37" +id: "f32fab67-77dd-3937-addc-9062e28e4c37" +genres: + - "contemporary r&b" + - "dance" + - "dance-pop" + - "disco" + - "pop" + - "pop rock" + - "r&b" + - "rock" +artists: + - "Michael Jackson" +image: "https://coverartarchive.org/release-group/f32fab67-77dd-3937-addc-9062e28e4c37/front" +rating: 8.8 +personalRating: 0 +--- + + +Parent:: [[@Vinyls|Vinyls]] + +--- + +  + +# `$= dv.current().title` + +  + +```toc +``` + +  + +### Details + +  + +**Genres**: +`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)` + +  + +```dataview +list without id + "" + + + "" ++ + "" + + + "" + + + "" + + + "" + + + "" + + + "
Type" + this.subType + "
Online Rating" + this.rating + "
Artists" + this.artists + "
Premiered" + this.year + "
" +FROM "03.05 Vinyls/Thriller (by Michael Jackson - 1982)" +``` + +  + +--- + +  + +### Poster + +  + +`$= '![Image|360](' + dv.current().image + ')'` + diff --git a/05.02 Networks/Configuring UFW.md b/05.02 Networks/Configuring UFW.md index f25b5e6e..66c361f3 100644 --- a/05.02 Networks/Configuring UFW.md +++ b/05.02 Networks/Configuring UFW.md @@ -237,7 +237,9 @@ sudo bash /etc/addip4ban/addip4ban.sh #### Ban List Tasks -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-01-20 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-02-03 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-01-27 ✅ 2024-01-27 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-01-20 ✅ 2024-01-20 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-01-13 ✅ 2024-01-12 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-01-06 ✅ 2024-01-06 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-12-30 ✅ 2023-12-31 @@ -290,7 +292,9 @@ sudo bash /etc/addip4ban/addip4ban.sh - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-08-12 ✅ 2023-08-07 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-08-05 ✅ 2023-08-05 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-07-29 ✅ 2023-08-04 -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-01-20 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-02-03 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-01-27 ✅ 2024-01-27 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-01-20 ✅ 2024-01-20 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-01-13 ✅ 2024-01-12 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-01-06 ✅ 2024-01-06 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-12-30 ✅ 2023-12-31 diff --git a/06.01 Finances/2024.ledger b/06.01 Finances/2024.ledger index 5dc1610c..7a9241d1 100644 --- a/06.01 Finances/2024.ledger +++ b/06.01 Finances/2024.ledger @@ -227,4 +227,140 @@ alias i=income 2024/01/19 Manor expenses:Food:CHF CHF17.70 + liability:CreditCard:CHF + +2024/01/19 Fnac + expenses:Electronics:CHF CHF58.95 + liability:CreditCard:CHF + +2024/01/20 Petrol + expenses:Car:CHF CHF23.30 + liability:CreditCard:CHF + +2024/01/18 Drinks + expenses:Social:CHF CHF57.00 + liability:CreditCard:CHF + +2024/01/20 Ski Pass: Hoch Ybrig + expenses:Sport:CHF CHF57.00 + liability:CreditCard:CHF + +2024/01/20 Lunch + expenses:Food:CHF CHF31.00 + liability:CreditCard:CHF + +2024/01/20 Migros + expenses:Food:CHF CHF48.75 + liability:CreditCard:CHF + +2024/01/21 Petrol + expenses:Car:CHF CHF40.00 + liability:CreditCard:CHF + +2024/01/21 Klewenalp day pass + expenses:Sport:CHF CHF54.00 + liability:CreditCard:CHF + +2024/01/21 Lunch + expenses:Food:CHF CHF24.5 + liability:CreditCard:CHF + +2024/01/21 Parking + expenses:Car:CHF CHF4.25 + liability:CreditCard:CHF + +2024/01/22 Migros + expenses:Food:CHF CHF10.25 + liability:CreditCard:CHF + +2024/01/19 Uber Eats + expenses:Food:CHF CHF41.84 + liability:CreditCard:CHF + +2024/01/23 Migros + expenses:Food:CHF CHF26.95 + liability:CreditCard:CHF + +2024/01/23 Migros + expenses:Food:CHF CHF6.45 + liability:CreditCard:CHF + +2024/01/24 Vicafé + expenses:Food:CHF CHF5.80 + liability:CreditCard:CHF + +2024/01/24 Lunch + expenses:Food:CHF CHF17.80 + liability:CreditCard:CHF + +2024/01/24 Bakery + expenses:Food:CHF CHF5.50 + liability:CreditCard:CHF + +2024/01/24 Coffee & dessert + expenses:Food:CHF CHF18.00 + liability:CreditCard:CHF + +2024/01/26 Petrol + expenses:Car:CHF CHF68.25 + liability:CreditCard:CHF + +2024/01/26 Peages + expenses:Car:CHF €20.40 + liability:CreditCard:CHF + +2024/01/26 Dej + expenses:Food:CHF €16.20 + liability:CreditCard:CHF + +2024/01/26 Hotel + expenses:Travel:CHF €2.40 + liability:CreditCard:CHF + +2024/01/26 Peages + expenses:Car:CHF €3.20 + liability:CreditCard:CHF + +2024/01/26 Fnac + expenses:Entertainment:CHF €107.90 + liability:CreditCard:CHF + +2024/01/26 Carrefour + expenses:Food:CHF €4.10 + liability:CreditCard:CHF + +2024/01/26 Drinks + expenses:Social:CHF €7.00 + liability:CreditCard:CHF + +2024/01/26 Dinner + expenses:Food:CHF €24.50 + liability:CreditCard:CHF + +2024/01/27 Petrol + expenses:Car:CHF €77.80 + liability:CreditCard:CHF + +2024/01/27 Petit dej + expenses:Food:CHF €8.80 + liability:CreditCard:CHF + +2024/01/27 Coffee + expenses:Food:CHF €3.40 + liability:CreditCard:CHF + +2024/01/27 Parking + expenses:Car:CHF €2.40 + liability:CreditCard:CHF + +2024/01/27 Peages + expenses:Car:CHF €18.00 + liability:CreditCard:CHF + +2024/01/27 Lunch Laure + expenses:Social:CHF CHF103.30 + liability:CreditCard:CHF + +2024/01/28 Lunch + expenses:Social:CHF CHF95.80 liability:CreditCard:CHF \ No newline at end of file