From 652761fb7b19ff4605568fb289e8e8f18b572bbd Mon Sep 17 00:00:00 2001 From: Nicolay Sukhanovskii Date: Sun, 16 Aug 2026 17:15:36 +0300 Subject: [PATCH] initial vault --- main/.obsidian/app.json | 3 + main/.obsidian/appearance.json | 1 + main/.obsidian/community-plugins.json | 5 + main/.obsidian/core-plugins.json | 33 + main/.obsidian/daily-notes.json | 3 + main/.obsidian/graph.json | 22 + main/.obsidian/plugins/calendar-hub/data.json | 25 + main/.obsidian/plugins/calendar-hub/main.js | 7919 +++++++++++++++++ .../plugins/calendar-hub/manifest.json | 11 + .../.obsidian/plugins/calendar-hub/styles.css | 428 + main/.obsidian/plugins/calendar/data.json | 10 + main/.obsidian/plugins/calendar/main.js | 4459 ++++++++++ main/.obsidian/plugins/calendar/manifest.json | 10 + main/.obsidian/plugins/obsidian-git/data.json | 68 + main/.obsidian/plugins/obsidian-git/main.js | 427 + .../plugins/obsidian-git/manifest.json | 10 + .../plugins/obsidian-git/obsidian_askpass.sh | 23 + .../.obsidian/plugins/obsidian-git/styles.css | 705 ++ .../plugins/obsidian-icon-folder/main.js | 7158 +++++++++++++++ .../obsidian-icon-folder/manifest.json | 10 + .../plugins/obsidian-icon-folder/styles.css | 120 + main/.obsidian/workspace.json | 239 + main/Untitled.md | 0 .../Pasted image 20260719155922.png | Bin 0 -> 28302 bytes .../Pasted image 20260719155956.png | Bin 0 -> 28271 bytes .../Pasted image 20260719174012.png | Bin 0 -> 244942 bytes main/Дейли журнал/2026-07-19.md | 0 main/общее заметки/100 ml вопросов.md | 11 + main/общее заметки/Gibbs sampling.md | 7 + main/общее заметки/IELTS.md | 2 + main/общее заметки/Lemmatization.md | 7 + main/общее заметки/Marcov chain.md | 0 main/общее заметки/Method Monte-Carlo.md | 0 main/общее заметки/New words dict.md | 6 + .../SVD (singular value decomposition).md | 1 + main/общее заметки/Stemming.md | 13 + main/общее заметки/TF-IDF.md | 17 + main/общее заметки/Topic modeling.md | 17 + main/общее заметки/МФТИ учебники.md | 3 + main/общее заметки/ответы на 100/ответ 2.md | 1 + main/общее заметки/ответы на 100/ответ 3.md | 3 + 41 files changed, 21777 insertions(+) create mode 100644 main/.obsidian/app.json create mode 100644 main/.obsidian/appearance.json create mode 100644 main/.obsidian/community-plugins.json create mode 100644 main/.obsidian/core-plugins.json create mode 100644 main/.obsidian/daily-notes.json create mode 100644 main/.obsidian/graph.json create mode 100644 main/.obsidian/plugins/calendar-hub/data.json create mode 100644 main/.obsidian/plugins/calendar-hub/main.js create mode 100644 main/.obsidian/plugins/calendar-hub/manifest.json create mode 100644 main/.obsidian/plugins/calendar-hub/styles.css create mode 100644 main/.obsidian/plugins/calendar/data.json create mode 100644 main/.obsidian/plugins/calendar/main.js create mode 100644 main/.obsidian/plugins/calendar/manifest.json create mode 100644 main/.obsidian/plugins/obsidian-git/data.json create mode 100644 main/.obsidian/plugins/obsidian-git/main.js create mode 100644 main/.obsidian/plugins/obsidian-git/manifest.json create mode 100644 main/.obsidian/plugins/obsidian-git/obsidian_askpass.sh create mode 100644 main/.obsidian/plugins/obsidian-git/styles.css create mode 100644 main/.obsidian/plugins/obsidian-icon-folder/main.js create mode 100644 main/.obsidian/plugins/obsidian-icon-folder/manifest.json create mode 100644 main/.obsidian/plugins/obsidian-icon-folder/styles.css create mode 100644 main/.obsidian/workspace.json create mode 100644 main/Untitled.md create mode 100644 main/attachment/Pasted image 20260719155922.png create mode 100644 main/attachment/Pasted image 20260719155956.png create mode 100644 main/attachment/Pasted image 20260719174012.png create mode 100644 main/Дейли журнал/2026-07-19.md create mode 100644 main/общее заметки/100 ml вопросов.md create mode 100644 main/общее заметки/Gibbs sampling.md create mode 100644 main/общее заметки/IELTS.md create mode 100644 main/общее заметки/Lemmatization.md create mode 100644 main/общее заметки/Marcov chain.md create mode 100644 main/общее заметки/Method Monte-Carlo.md create mode 100644 main/общее заметки/New words dict.md create mode 100644 main/общее заметки/SVD (singular value decomposition).md create mode 100644 main/общее заметки/Stemming.md create mode 100644 main/общее заметки/TF-IDF.md create mode 100644 main/общее заметки/Topic modeling.md create mode 100644 main/общее заметки/МФТИ учебники.md create mode 100644 main/общее заметки/ответы на 100/ответ 2.md create mode 100644 main/общее заметки/ответы на 100/ответ 3.md diff --git a/main/.obsidian/app.json b/main/.obsidian/app.json new file mode 100644 index 0000000..e609a07 --- /dev/null +++ b/main/.obsidian/app.json @@ -0,0 +1,3 @@ +{ + "promptDelete": false +} \ No newline at end of file diff --git a/main/.obsidian/appearance.json b/main/.obsidian/appearance.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/main/.obsidian/appearance.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/main/.obsidian/community-plugins.json b/main/.obsidian/community-plugins.json new file mode 100644 index 0000000..dd76209 --- /dev/null +++ b/main/.obsidian/community-plugins.json @@ -0,0 +1,5 @@ +[ + "calendar", + "calendar-hub", + "obsidian-git" +] \ No newline at end of file diff --git a/main/.obsidian/core-plugins.json b/main/.obsidian/core-plugins.json new file mode 100644 index 0000000..13327de --- /dev/null +++ b/main/.obsidian/core-plugins.json @@ -0,0 +1,33 @@ +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "footnotes": false, + "properties": true, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": true, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": true, + "bases": true, + "webviewer": false +} \ No newline at end of file diff --git a/main/.obsidian/daily-notes.json b/main/.obsidian/daily-notes.json new file mode 100644 index 0000000..cb2e909 --- /dev/null +++ b/main/.obsidian/daily-notes.json @@ -0,0 +1,3 @@ +{ + "folder": "Дейли журнал" +} \ No newline at end of file diff --git a/main/.obsidian/graph.json b/main/.obsidian/graph.json new file mode 100644 index 0000000..42a46ec --- /dev/null +++ b/main/.obsidian/graph.json @@ -0,0 +1,22 @@ +{ + "collapse-filter": true, + "search": "", + "showTags": false, + "showAttachments": false, + "hideUnresolved": false, + "showOrphans": true, + "collapse-color-groups": true, + "colorGroups": [], + "collapse-display": true, + "showArrow": false, + "textFadeMultiplier": 0, + "nodeSizeMultiplier": 1, + "lineSizeMultiplier": 1, + "collapse-forces": true, + "centerStrength": 0.518713248970312, + "repelStrength": 10, + "linkStrength": 1, + "linkDistance": 250, + "scale": 1, + "close": true +} \ No newline at end of file diff --git a/main/.obsidian/plugins/calendar-hub/data.json b/main/.obsidian/plugins/calendar-hub/data.json new file mode 100644 index 0000000..8dba47f --- /dev/null +++ b/main/.obsidian/plugins/calendar-hub/data.json @@ -0,0 +1,25 @@ +{ + "shouldConfirmBeforeCreate": true, + "shouldIndexDailyNotesInAllFolders": true, + "dailyNoteFilenameDateFormat": "", + "shouldIndexDailyNotesFromFrontmatter": false, + "dailyNoteFrontmatterDateFields": "date, daily_date, calendar_date", + "shouldIndexDailyNotesFromCreationDate": false, + "dailyNoteIncludedFolders": "", + "sidebarViewMode": "calendar", + "listGrouping": "month", + "listSortOrder": "desc", + "listFolderFilter": "", + "weekStart": "locale", + "wordsPerDot": 250, + "showWeeklyNote": false, + "weeklyNoteFormat": "", + "weeklyNoteTemplate": "", + "weeklyNoteFolder": "", + "shouldIndexWeeklyNotesInAllFolders": true, + "weeklyNoteFilenameDateFormat": "", + "shouldIndexWeeklyNotesFromFrontmatter": false, + "weeklyNoteFrontmatterDateFields": "week, weekly_date", + "weeklyNoteIncludedFolders": "", + "localeOverride": "system-default" +} \ No newline at end of file diff --git a/main/.obsidian/plugins/calendar-hub/main.js b/main/.obsidian/plugins/calendar-hub/main.js new file mode 100644 index 0000000..e3efbbc --- /dev/null +++ b/main/.obsidian/plugins/calendar-hub/main.js @@ -0,0 +1,7919 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// vendor/obsidian-daily-notes-interface/index.js +var require_obsidian_daily_notes_interface = __commonJS({ + "vendor/obsidian-daily-notes-interface/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var obsidian = require("obsidian"); + var DEFAULT_DAILY_NOTE_FORMAT2 = "YYYY-MM-DD"; + var DEFAULT_WEEKLY_NOTE_FORMAT = "gggg-[W]ww"; + var DEFAULT_MONTHLY_NOTE_FORMAT = "YYYY-MM"; + function shouldUsePeriodicNotesSettings(periodicity) { + var _a, _b; + const periodicNotes = window.app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a[periodicity]) == null ? void 0 : _b.enabled); + } + function getDailyNoteSettings4() { + var _a, _b, _c, _d; + try { + const { internalPlugins, plugins } = window.app; + if (shouldUsePeriodicNotesSettings("daily")) { + const { format: format2, folder: folder2, template: template2 } = ((_b = (_a = plugins.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.daily) || {}; + return { + format: format2 || DEFAULT_DAILY_NOTE_FORMAT2, + folder: (folder2 == null ? void 0 : folder2.trim()) || "", + template: (template2 == null ? void 0 : template2.trim()) || "" + }; + } + const { folder, format, template } = ((_d = (_c = internalPlugins.getPluginById("daily-notes")) == null ? void 0 : _c.instance) == null ? void 0 : _d.options) || {}; + return { + format: format || DEFAULT_DAILY_NOTE_FORMAT2, + folder: (folder == null ? void 0 : folder.trim()) || "", + template: (template == null ? void 0 : template.trim()) || "" + }; + } catch (err) { + console.info("No custom daily note settings found!", err); + } + } + function getWeeklyNoteSettings2() { + var _a, _b, _c, _d, _e, _f, _g; + try { + const pluginManager = window.app.plugins; + const calendarSettings = (_a = pluginManager.getPlugin("calendar")) == null ? void 0 : _a.options; + const periodicNotesSettings = (_c = (_b = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _b.settings) == null ? void 0 : _c.weekly; + if (shouldUsePeriodicNotesSettings("weekly")) { + return { + format: periodicNotesSettings.format || DEFAULT_WEEKLY_NOTE_FORMAT, + folder: ((_d = periodicNotesSettings.folder) == null ? void 0 : _d.trim()) || "", + template: ((_e = periodicNotesSettings.template) == null ? void 0 : _e.trim()) || "" + }; + } + const settings2 = calendarSettings || {}; + return { + format: settings2.weeklyNoteFormat || DEFAULT_WEEKLY_NOTE_FORMAT, + folder: ((_f = settings2.weeklyNoteFolder) == null ? void 0 : _f.trim()) || "", + template: ((_g = settings2.weeklyNoteTemplate) == null ? void 0 : _g.trim()) || "" + }; + } catch (err) { + console.info("No custom weekly note settings found!", err); + } + } + function getMonthlyNoteSettings() { + var _a, _b, _c, _d; + const pluginManager = window.app.plugins; + try { + const settings2 = shouldUsePeriodicNotesSettings("monthly") && ((_b = (_a = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.monthly) || {}; + return { + format: settings2.format || DEFAULT_MONTHLY_NOTE_FORMAT, + folder: ((_c = settings2.folder) == null ? void 0 : _c.trim()) || "", + template: ((_d = settings2.template) == null ? void 0 : _d.trim()) || "" + }; + } catch (err) { + console.info("No custom monthly note settings found!", err); + } + } + function getDateUID6(date, granularity = "day") { + const ts = date.clone().startOf(granularity).format(); + return `${granularity}-${ts}`; + } + function removeEscapedCharacters3(format) { + return format.replace(/\[[^\]]*\]/g, ""); + } + function isFormatAmbiguous(format, granularity) { + if (granularity === "week") { + const cleanFormat = removeEscapedCharacters3(format); + return /w{1,2}/i.test(cleanFormat) && (/M{1,4}/.test(cleanFormat) || /D{1,4}/.test(cleanFormat)); + } + return false; + } + function getDateFromFile(file, granularity) { + const getSettings = { + day: getDailyNoteSettings4, + week: getWeeklyNoteSettings2, + month: getMonthlyNoteSettings + }; + const format = getSettings[granularity]().format.split("/").pop(); + const noteDate = window.moment(file.basename, format, true); + if (!noteDate.isValid()) { + return null; + } + if (isFormatAmbiguous(format, granularity)) { + if (granularity === "week") { + const cleanFormat = removeEscapedCharacters3(format); + if (/w{1,2}/i.test(cleanFormat)) { + return window.moment( + file.basename, + // If format contains week, remove day & month formatting + format.replace(/M{1,4}/g, "").replace(/D{1,4}/g, ""), + false + ); + } + } + } + return noteDate; + } + function join(...partSegments) { + let parts = []; + for (let i = 0, l = partSegments.length; i < l; i++) { + parts = parts.concat(partSegments[i].split("/")); + } + const newParts = []; + for (let i = 0, l = parts.length; i < l; i++) { + const part = parts[i]; + if (!part || part === ".") + continue; + else + newParts.push(part); + } + if (parts[0] === "") + newParts.unshift(""); + return newParts.join("/"); + } + async function ensureFolderExists2(path) { + const dirs = path.replace(/\\/g, "/").split("/"); + dirs.pop(); + if (dirs.length) { + const dir = join(...dirs); + if (!window.app.vault.getAbstractFileByPath(dir)) { + await window.app.vault.createFolder(dir); + } + } + } + async function getNotePath2(directory, filename) { + if (!filename.endsWith(".md")) { + filename += ".md"; + } + const path = obsidian.normalizePath(join(directory, filename)); + await ensureFolderExists2(path); + return path; + } + async function getTemplateInfo(template) { + const { metadataCache, vault } = window.app; + const templatePath = obsidian.normalizePath(template); + if (templatePath === "/") { + return Promise.resolve(["", null]); + } + try { + const templateFile = metadataCache.getFirstLinkpathDest(templatePath, ""); + const contents = await vault.cachedRead(templateFile); + const IFoldInfo = window.app.foldManager.load(templateFile); + return [contents, IFoldInfo]; + } catch (err) { + console.error(`Failed to read the daily note template '${templatePath}'`, err); + new obsidian.Notice("Failed to read the daily note template"); + return ["", null]; + } + } + var DailyNotesFolderMissingError = class extends Error { + }; + async function createDailyNote2(date) { + const app = window.app; + const { vault } = app; + const moment = window.moment; + const { template, format, folder } = getDailyNoteSettings4(); + const [templateContents, IFoldInfo] = await getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = await getNotePath2(folder, filename); + try { + const createdFile = await vault.create(normalizedPath, templateContents.replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now = moment(); + const currentDate = date.clone().set({ + hour: now.get("hour"), + minute: now.get("minute"), + second: now.get("second") + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); + } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }).replace(/{{\s*yesterday\s*}}/gi, date.clone().subtract(1, "day").format(format)).replace(/{{\s*tomorrow\s*}}/gi, date.clone().add(1, "d").format(format))); + app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); + } + } + function getDailyNote5(date, dailyNotes2) { + var _a; + return (_a = dailyNotes2[getDateUID6(date, "day")]) != null ? _a : null; + } + function getAllDailyNotes2() { + const { vault } = window.app; + const { folder } = getDailyNoteSettings4(); + const dailyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!dailyNotesFolder) { + throw new DailyNotesFolderMissingError("Failed to find daily notes folder"); + } + const dailyNotes2 = {}; + obsidian.Vault.recurseChildren(dailyNotesFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile(note, "day"); + if (date) { + const dateString = getDateUID6(date, "day"); + dailyNotes2[dateString] = note; + } + } + }); + return dailyNotes2; + } + var WeeklyNotesFolderMissingError = class extends Error { + }; + function getDaysOfWeek2() { + const { moment } = window; + let weekStart = moment.localeData()._week.dow; + const daysOfWeek = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ]; + while (weekStart) { + daysOfWeek.push(daysOfWeek.shift()); + weekStart--; + } + return daysOfWeek; + } + function getDayOfWeekNumericalValue(dayOfWeekName) { + return getDaysOfWeek2().indexOf(dayOfWeekName.toLowerCase()); + } + async function createWeeklyNote2(date) { + const { vault } = window.app; + const { template, format, folder } = getWeeklyNoteSettings2(); + const [templateContents, IFoldInfo] = await getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = await getNotePath2(folder, filename); + try { + const createdFile = await vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now = window.moment(); + const currentDate = date.clone().set({ + hour: now.get("hour"), + minute: now.get("minute"), + second: now.get("second") + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); + } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }).replace(/{{\s*title\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi, (_, dayOfWeek, momentFormat) => { + const day = getDayOfWeekNumericalValue(dayOfWeek); + return date.weekday(day).format(momentFormat.trim()); + })); + window.app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); + } + } + function getWeeklyNote2(date, weeklyNotes2) { + var _a; + return (_a = weeklyNotes2[getDateUID6(date, "week")]) != null ? _a : null; + } + function getAllWeeklyNotes2() { + const { vault } = window.app; + const { folder } = getWeeklyNoteSettings2(); + const weeklyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!weeklyNotesFolder) { + throw new WeeklyNotesFolderMissingError("Failed to find weekly notes folder"); + } + const weeklyNotes2 = {}; + obsidian.Vault.recurseChildren(weeklyNotesFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile(note, "week"); + if (date) { + const dateString = getDateUID6(date, "week"); + weeklyNotes2[dateString] = note; + } + } + }); + return weeklyNotes2; + } + var MonthlyNotesFolderMissingError = class extends Error { + }; + async function createMonthlyNote(date) { + const { vault } = window.app; + const { template, format, folder } = getMonthlyNoteSettings(); + const [templateContents, IFoldInfo] = await getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = await getNotePath2(folder, filename); + try { + const createdFile = await vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*:(.*?)}}/gi, (_, _timeOrDate, momentFormat) => { + const now = window.moment(); + return date.set({ + hour: now.get("hour"), + minute: now.get("minute"), + second: now.get("second") + }).format(momentFormat.trim()); + }).replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename)); + window.app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); + } + } + function getMonthlyNote(date, monthlyNotes) { + var _a; + return (_a = monthlyNotes[getDateUID6(date, "month")]) != null ? _a : null; + } + function getAllMonthlyNotes() { + const { vault } = window.app; + const { folder } = getMonthlyNoteSettings(); + const monthlyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!monthlyNotesFolder) { + throw new MonthlyNotesFolderMissingError("Failed to find monthly notes folder"); + } + const monthlyNotes = {}; + obsidian.Vault.recurseChildren(monthlyNotesFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile(note, "month"); + if (date) { + const dateString = getDateUID6(date, "month"); + monthlyNotes[dateString] = note; + } + } + }); + return monthlyNotes; + } + function appHasDailyNotesPluginLoaded2() { + var _a, _b; + const { app } = window; + const dailyNotesPlugin = app.internalPlugins.plugins["daily-notes"]; + if (dailyNotesPlugin && dailyNotesPlugin.enabled) { + return true; + } + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.daily) == null ? void 0 : _b.enabled); + } + function appHasWeeklyNotesPluginLoaded() { + var _a, _b; + const { app } = window; + if (app.plugins.getPlugin("calendar")) { + return true; + } + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.weekly) == null ? void 0 : _b.enabled); + } + function appHasMonthlyNotesPluginLoaded() { + var _a, _b; + const { app } = window; + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.monthly) == null ? void 0 : _b.enabled); + } + exports.DEFAULT_DAILY_NOTE_FORMAT = DEFAULT_DAILY_NOTE_FORMAT2; + exports.DEFAULT_MONTHLY_NOTE_FORMAT = DEFAULT_MONTHLY_NOTE_FORMAT; + exports.DEFAULT_WEEKLY_NOTE_FORMAT = DEFAULT_WEEKLY_NOTE_FORMAT; + exports.appHasDailyNotesPluginLoaded = appHasDailyNotesPluginLoaded2; + exports.appHasMonthlyNotesPluginLoaded = appHasMonthlyNotesPluginLoaded; + exports.appHasWeeklyNotesPluginLoaded = appHasWeeklyNotesPluginLoaded; + exports.createDailyNote = createDailyNote2; + exports.createMonthlyNote = createMonthlyNote; + exports.createWeeklyNote = createWeeklyNote2; + exports.getAllDailyNotes = getAllDailyNotes2; + exports.getAllMonthlyNotes = getAllMonthlyNotes; + exports.getAllWeeklyNotes = getAllWeeklyNotes2; + exports.getDailyNote = getDailyNote5; + exports.getDailyNoteSettings = getDailyNoteSettings4; + exports.getDateFromFile = getDateFromFile; + exports.getDateUID = getDateUID6; + exports.getMonthlyNote = getMonthlyNote; + exports.getMonthlyNoteSettings = getMonthlyNoteSettings; + exports.getTemplateInfo = getTemplateInfo; + exports.getWeeklyNote = getWeeklyNote2; + exports.getWeeklyNoteSettings = getWeeklyNoteSettings2; + } +}); + +// src/main.ts +var main_exports = {}; +__export(main_exports, { + default: () => CalendarPlugin +}); +module.exports = __toCommonJS(main_exports); +var import_obsidian11 = require("obsidian"); + +// src/constants.ts +var DEFAULT_WEEK_FORMAT = "gggg-[W]ww"; +var DEFAULT_WORDS_PER_DOT = 250; +var VIEW_TYPE_CALENDAR = "calendar-hub"; +var VIEW_TYPE_LIST = "calendar-hub-list"; +var PLUGIN_ID = "calendar-hub"; +var TRIGGER_ON_OPEN = "calendar-hub:open"; + +// node_modules/svelte/internal/index.mjs +function noop() { +} +function run(fn) { + return fn(); +} +function blank_object() { + return /* @__PURE__ */ Object.create(null); +} +function run_all(fns) { + fns.forEach(run); +} +function is_function(thing) { + return typeof thing === "function"; +} +function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function"); +} +function not_equal(a, b) { + return a != a ? b == b : a !== b; +} +function is_empty(obj) { + return Object.keys(obj).length === 0; +} +function subscribe(store, ...callbacks) { + if (store == null) { + return noop; + } + const unsub = store.subscribe(...callbacks); + return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; +} +function get_store_value(store) { + let value; + subscribe(store, (_) => value = _)(); + return value; +} +function component_subscribe(component, store, callback) { + component.$$.on_destroy.push(subscribe(store, callback)); +} +var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : global; +var ResizeObserverSingleton = class _ResizeObserverSingleton { + constructor(options) { + this.options = options; + this._listeners = "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0; + } + observe(element3, listener) { + this._listeners.set(element3, listener); + this._getObserver().observe(element3, this.options); + return () => { + this._listeners.delete(element3); + this._observer.unobserve(element3); + }; + } + _getObserver() { + var _a; + return (_a = this._observer) !== null && _a !== void 0 ? _a : this._observer = new ResizeObserver((entries) => { + var _a2; + for (const entry of entries) { + _ResizeObserverSingleton.entries.set(entry.target, entry); + (_a2 = this._listeners.get(entry.target)) === null || _a2 === void 0 ? void 0 : _a2(entry); + } + }); + } +}; +ResizeObserverSingleton.entries = "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0; +var is_hydrating = false; +function start_hydrating() { + is_hydrating = true; +} +function end_hydrating() { + is_hydrating = false; +} +function append(target, node) { + target.appendChild(node); +} +function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); +} +function detach(node) { + if (node.parentNode) { + node.parentNode.removeChild(node); + } +} +function element(name) { + return document.createElement(name); +} +function text(data) { + return document.createTextNode(data); +} +function space() { + return text(" "); +} +function empty() { + return text(""); +} +function listen(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); +} +function attr(node, attribute, value) { + if (value == null) + node.removeAttribute(attribute); + else if (node.getAttribute(attribute) !== value) + node.setAttribute(attribute, value); +} +function children(element3) { + return Array.from(element3.childNodes); +} +function set_data(text3, data) { + data = "" + data; + if (text3.data === data) + return; + text3.data = data; +} +function set_style(node, key, value, important) { + if (value == null) { + node.style.removeProperty(key); + } else { + node.style.setProperty(key, value, important ? "important" : ""); + } +} +function select_option(select, value, mounting) { + for (let i = 0; i < select.options.length; i += 1) { + const option = select.options[i]; + if (option.__value === value) { + option.selected = true; + return; + } + } + if (!mounting || value !== void 0) { + select.selectedIndex = -1; + } +} +function toggle_class(element3, name, toggle) { + element3.classList[toggle ? "add" : "remove"](name); +} +var current_component; +function set_current_component(component) { + current_component = component; +} +function get_current_component() { + if (!current_component) + throw new Error("Function called outside component initialization"); + return current_component; +} +function onMount(fn) { + get_current_component().$$.on_mount.push(fn); +} +function onDestroy(fn) { + get_current_component().$$.on_destroy.push(fn); +} +var dirty_components = []; +var binding_callbacks = []; +var render_callbacks = []; +var flush_callbacks = []; +var resolved_promise = /* @__PURE__ */ Promise.resolve(); +var update_scheduled = false; +function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } +} +function add_render_callback(fn) { + render_callbacks.push(fn); +} +function add_flush_callback(fn) { + flush_callbacks.push(fn); +} +var seen_callbacks = /* @__PURE__ */ new Set(); +var flushidx = 0; +function flush() { + if (flushidx !== 0) { + return; + } + const saved_component = current_component; + do { + try { + while (flushidx < dirty_components.length) { + const component = dirty_components[flushidx]; + flushidx++; + set_current_component(component); + update(component.$$); + } + } catch (e) { + dirty_components.length = 0; + flushidx = 0; + throw e; + } + set_current_component(null); + dirty_components.length = 0; + flushidx = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + seen_callbacks.clear(); + set_current_component(saved_component); +} +function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } +} +function flush_render_callbacks(fns) { + const filtered = []; + const targets = []; + render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)); + targets.forEach((c) => c()); + render_callbacks = filtered; +} +var outroing = /* @__PURE__ */ new Set(); +var outros; +function group_outros() { + outros = { + r: 0, + c: [], + p: outros + // parent group + }; +} +function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; +} +function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } +} +function transition_out(block, local, detach3, callback) { + if (block && block.o) { + if (outroing.has(block)) + return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach3) + block.d(1); + callback(); + } + }); + block.o(local); + } else if (callback) { + callback(); + } +} +function destroy_block(block, lookup) { + block.d(1); + lookup.delete(block.key); +} +function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block5, next, get_context) { + let o = old_blocks.length; + let n = list.length; + let i = o; + const old_indexes = {}; + while (i--) + old_indexes[old_blocks[i].key] = i; + const new_blocks = []; + const new_lookup = /* @__PURE__ */ new Map(); + const deltas = /* @__PURE__ */ new Map(); + const updates = []; + i = n; + while (i--) { + const child_ctx = get_context(ctx, list, i); + const key = get_key(child_ctx); + let block = lookup.get(key); + if (!block) { + block = create_each_block5(key, child_ctx); + block.c(); + } else if (dynamic) { + updates.push(() => block.p(child_ctx, dirty)); + } + new_lookup.set(key, new_blocks[i] = block); + if (key in old_indexes) + deltas.set(key, Math.abs(i - old_indexes[key])); + } + const will_move = /* @__PURE__ */ new Set(); + const did_move = /* @__PURE__ */ new Set(); + function insert3(block) { + transition_in(block, 1); + block.m(node, next); + lookup.set(block.key, block); + next = block.first; + n--; + } + while (o && n) { + const new_block = new_blocks[n - 1]; + const old_block = old_blocks[o - 1]; + const new_key = new_block.key; + const old_key = old_block.key; + if (new_block === old_block) { + next = new_block.first; + o--; + n--; + } else if (!new_lookup.has(old_key)) { + destroy(old_block, lookup); + o--; + } else if (!lookup.has(new_key) || will_move.has(new_key)) { + insert3(new_block); + } else if (did_move.has(old_key)) { + o--; + } else if (deltas.get(new_key) > deltas.get(old_key)) { + did_move.add(new_key); + insert3(new_block); + } else { + will_move.add(old_key); + o--; + } + } + while (o--) { + const old_block = old_blocks[o]; + if (!new_lookup.has(old_block.key)) + destroy(old_block, lookup); + } + while (n) + insert3(new_blocks[n - 1]); + run_all(updates); + return new_blocks; +} +var _boolean_attributes = [ + "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" +]; +var boolean_attributes = /* @__PURE__ */ new Set([..._boolean_attributes]); +function bind(component, name, callback) { + const index = component.$$.props[name]; + if (index !== void 0) { + component.$$.bound[index] = callback; + callback(component.$$.ctx[index]); + } +} +function create_component(block) { + block && block.c(); +} +function mount_component(component, target, anchor, customElement) { + const { fragment, after_update } = component.$$; + fragment && fragment.m(target, anchor); + if (!customElement) { + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } else { + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + } + after_update.forEach(add_render_callback); +} +function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + flush_render_callbacks($$.after_update); + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } +} +function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[i / 31 | 0] |= 1 << i % 31; +} +function init(component, options, instance5, create_fragment5, not_equal3, props, append_styles, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const $$ = component.$$ = { + fragment: null, + ctx: [], + // state + props, + update: noop, + not_equal: not_equal3, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false, + root: options.target || parent_component.$$.root + }; + append_styles && append_styles($$.root); + let ready = false; + $$.ctx = instance5 ? instance5(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal3($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) : []; + $$.update(); + ready = true; + run_all($$.before_update); + $$.fragment = create_fragment5 ? create_fragment5($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + start_hydrating(); + const nodes = children(options.target); + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } else { + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor, options.customElement); + end_hydrating(); + flush(); + } + set_current_component(parent_component); +} +var SvelteElement; +if (typeof HTMLElement === "function") { + SvelteElement = class extends HTMLElement { + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + connectedCallback() { + const { on_mount } = this.$$; + this.$$.on_disconnect = on_mount.map(run).filter(is_function); + for (const key in this.$$.slotted) { + this.appendChild(this.$$.slotted[key]); + } + } + attributeChangedCallback(attr3, _oldValue, newValue) { + this[attr3] = newValue; + } + disconnectedCallback() { + run_all(this.$$.on_disconnect); + } + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + $on(type, callback) { + if (!is_function(callback)) { + return noop; + } + const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } + }; +} +var SvelteComponent = class { + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + $on(type, callback) { + if (!is_function(callback)) { + return noop; + } + const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } +}; + +// node_modules/svelte/store/index.mjs +var subscriber_queue = []; +function writable(value, start = noop) { + let stop; + const subscribers = /* @__PURE__ */ new Set(); + function set(new_value) { + if (safe_not_equal(value, new_value)) { + value = new_value; + if (stop) { + const run_queue = !subscriber_queue.length; + for (const subscriber of subscribers) { + subscriber[1](); + subscriber_queue.push(subscriber, value); + } + if (run_queue) { + for (let i = 0; i < subscriber_queue.length; i += 2) { + subscriber_queue[i][0](subscriber_queue[i + 1]); + } + subscriber_queue.length = 0; + } + } + } + } + function update3(fn) { + set(fn(value)); + } + function subscribe2(run3, invalidate = noop) { + const subscriber = [run3, invalidate]; + subscribers.add(subscriber); + if (subscribers.size === 1) { + stop = start(set) || noop; + } + run3(value); + return () => { + subscribers.delete(subscriber); + if (subscribers.size === 0 && stop) { + stop(); + stop = null; + } + }; + } + return { set, update: update3, subscribe: subscribe2 }; +} + +// src/settings.ts +var import_obsidian2 = require("obsidian"); + +// src/io/folderRules.ts +function parseFolderRules(value) { + return value.split(/[,\n]/).map((entry) => entry.trim()).filter(Boolean).map((entry) => { + const excluded = entry.startsWith("-"); + const raw = excluded ? entry.slice(1).trim() : entry; + const path = normalizeFolderPath(raw); + return { path, excluded }; + }); +} +function serializeFolderRules(rules) { + return rules.map((rule) => rule.excluded ? `-${rule.path}` : rule.path).join(", "); +} +function normalizeFolderPath(path) { + const stripped = path.replace(/^\/+|\/+$/g, ""); + return stripped === "." ? "" : stripped; +} +function ruleDepth(rule) { + return rule.path === "" ? 0 : rule.path.split("/").length; +} +function folderMatchesRule(folderPath, rule) { + if (rule.path === "") { + return true; + } + return folderPath === rule.path || folderPath.startsWith(`${rule.path}/`); +} +function fileMatchesRule(filePath, rule) { + if (rule.path === "") { + return true; + } + return filePath === `${rule.path}.md` || filePath.startsWith(`${rule.path}/`); +} +function decide(rules, matches) { + let decision = null; + let decisionDepth = -1; + for (const rule of rules) { + if (!matches(rule)) { + continue; + } + const depth = ruleDepth(rule); + if (depth > decisionDepth || depth === decisionDepth && rule.excluded) { + decision = !rule.excluded; + decisionDepth = depth; + } + } + if (decision !== null) { + return decision; + } + return rules.every((rule) => rule.excluded); +} +function isFolderIncluded(folderPath, rules) { + return decide(rules, (rule) => folderMatchesRule(folderPath, rule)); +} +function shouldIncludeFilePath(filePath, rules) { + return decide(rules, (rule) => fileMatchesRule(filePath, rule)); +} +function getFolderCheckState(folderPath, rules) { + const included = isFolderIncluded(folderPath, rules); + const prefix = `${folderPath}/`; + const mixed = rules.some( + (rule) => rule.path.startsWith(prefix) && rule.excluded === included + ); + if (mixed) { + return "partial"; + } + return included ? "checked" : "none"; +} +function toggleFolderRule(folderPath, rules) { + const state = getFolderCheckState(folderPath, rules); + const prefix = `${folderPath}/`; + const withoutSubtree = rules.filter( + (rule) => rule.path !== folderPath && !rule.path.startsWith(prefix) + ); + if (state === "checked") { + if (isFolderIncluded(folderPath, withoutSubtree)) { + return [...withoutSubtree, { path: folderPath, excluded: true }]; + } + return withoutSubtree; + } + const hadIncludes = rules.some((rule) => !rule.excluded); + const stillHasIncludes = withoutSubtree.some((rule) => !rule.excluded); + if (hadIncludes && !stillHasIncludes) { + return [...withoutSubtree, { path: folderPath, excluded: false }]; + } + if (isFolderIncluded(folderPath, withoutSubtree)) { + return withoutSubtree; + } + return [...withoutSubtree, { path: folderPath, excluded: false }]; +} + +// src/io/folderTree.ts +function flattenFolderTree(nodes, expanded) { + const rows = []; + const visit = (node, depth) => { + const isExpanded = expanded.has(node.path); + rows.push({ + path: node.path, + name: node.name, + depth, + hasChildren: node.children.length > 0, + expanded: isExpanded + }); + if (isExpanded) { + node.children.forEach((child) => visit(child, depth + 1)); + } + }; + nodes.forEach((node) => visit(node, 0)); + return rows; +} +function getAncestorPaths(path) { + const segments = path.split("/"); + const ancestors = []; + for (let end = 1; end < segments.length; end++) { + ancestors.push(segments.slice(0, end).join("/")); + } + return ancestors; +} +function getExpansionForSelection(selectedFolders) { + return new Set( + selectedFolders.flatMap((folder) => getAncestorPaths(folder)) + ); +} + +// src/io/vaultFolders.ts +var import_obsidian = require("obsidian"); +function getVaultFolderTree() { + const toNode = (folder) => ({ + path: folder.path, + name: folder.name, + children: folder.children.filter((child) => child instanceof import_obsidian.TFolder).map(toNode).sort((a, b) => a.name.localeCompare(b.name)) + }); + return window.app.vault.getRoot().children.filter((child) => child instanceof import_obsidian.TFolder).map(toNode).sort((a, b) => a.name.localeCompare(b.name)); +} + +// src/ui/FolderRuleTree.svelte +function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[8] = list[i]; + const constants_0 = getFolderCheckState( + /*row*/ + child_ctx[8].path, + /*rules*/ + child_ctx[0] + ); + child_ctx[9] = constants_0; + return child_ctx; +} +function create_if_block(ctx) { + let div; + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let each_value = ( + /*visibleFolderRows*/ + ctx[2] + ); + const get_key = (ctx2) => ( + /*row*/ + ctx2[8].path + ); + for (let i = 0; i < each_value.length; i += 1) { + let child_ctx = get_each_context(ctx, each_value, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx)); + } + return { + c() { + div = element("div"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr(div, "class", "calendar-folder-list"); + }, + m(target, anchor) { + insert(target, div, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(div, null); + } + } + }, + p(ctx2, dirty) { + if (dirty & /*visibleFolderRows, getFolderCheckState, rules, onToggleFolder, handleToggleFolderExpansion*/ + 15) { + each_value = /*visibleFolderRows*/ + ctx2[2]; + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div, destroy_block, create_each_block, null, get_each_context); + } + }, + d(detaching) { + if (detaching) detach(div); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} +function create_else_block(ctx) { + let span; + return { + c() { + span = element("span"); + attr(span, "class", "calendar-folder-expand-spacer"); + }, + m(target, anchor) { + insert(target, span, anchor); + }, + p: noop, + d(detaching) { + if (detaching) detach(span); + } + }; +} +function create_if_block_1(ctx) { + let button; + let t_value = ( + /*row*/ + ctx[8].expanded ? "\u25BE" : "\u25B8" + ); + let t; + let button_aria_expanded_value; + let button_aria_label_value; + let mounted; + let dispose; + function click_handler() { + return ( + /*click_handler*/ + ctx[6]( + /*row*/ + ctx[8] + ) + ); + } + return { + c() { + button = element("button"); + t = text(t_value); + attr(button, "class", "calendar-folder-expand"); + attr(button, "type", "button"); + attr(button, "aria-expanded", button_aria_expanded_value = /*row*/ + ctx[8].expanded); + attr(button, "aria-label", button_aria_label_value = /*row*/ + ctx[8].expanded ? "Collapse folder" : "Expand folder"); + }, + m(target, anchor) { + insert(target, button, anchor); + append(button, t); + if (!mounted) { + dispose = listen(button, "click", click_handler); + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (dirty & /*visibleFolderRows*/ + 4 && t_value !== (t_value = /*row*/ + ctx[8].expanded ? "\u25BE" : "\u25B8")) set_data(t, t_value); + if (dirty & /*visibleFolderRows*/ + 4 && button_aria_expanded_value !== (button_aria_expanded_value = /*row*/ + ctx[8].expanded)) { + attr(button, "aria-expanded", button_aria_expanded_value); + } + if (dirty & /*visibleFolderRows*/ + 4 && button_aria_label_value !== (button_aria_label_value = /*row*/ + ctx[8].expanded ? "Collapse folder" : "Expand folder")) { + attr(button, "aria-label", button_aria_label_value); + } + }, + d(detaching) { + if (detaching) detach(button); + mounted = false; + dispose(); + } + }; +} +function create_each_block(key_1, ctx) { + let div; + let t0; + let label; + let input; + let input_checked_value; + let input_indeterminate_value; + let t1; + let span; + let t2_value = ( + /*row*/ + ctx[8].name + "" + ); + let t2; + let label_title_value; + let t3; + let mounted; + let dispose; + function select_block_type(ctx2, dirty) { + if ( + /*row*/ + ctx2[8].hasChildren + ) return create_if_block_1; + return create_else_block; + } + let current_block_type = select_block_type(ctx, -1); + let if_block = current_block_type(ctx); + function change_handler() { + return ( + /*change_handler*/ + ctx[7]( + /*row*/ + ctx[8] + ) + ); + } + return { + key: key_1, + first: null, + c() { + div = element("div"); + if_block.c(); + t0 = space(); + label = element("label"); + input = element("input"); + t1 = space(); + span = element("span"); + t2 = text(t2_value); + t3 = space(); + attr(input, "type", "checkbox"); + input.checked = input_checked_value = /*state*/ + ctx[9] === "checked"; + input.indeterminate = input_indeterminate_value = /*state*/ + ctx[9] === "partial"; + attr(span, "class", "calendar-folder-path"); + attr(label, "class", "calendar-folder-option"); + attr(label, "title", label_title_value = /*row*/ + ctx[8].path); + attr(div, "class", "calendar-folder-row"); + set_style( + div, + "padding-left", + /*row*/ + ctx[8].depth * 14 + "px" + ); + this.first = div; + }, + m(target, anchor) { + insert(target, div, anchor); + if_block.m(div, null); + append(div, t0); + append(div, label); + append(label, input); + append(label, t1); + append(label, span); + append(span, t2); + append(div, t3); + if (!mounted) { + dispose = listen(input, "change", change_handler); + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + if (if_block) { + if_block.c(); + if_block.m(div, t0); + } + } + if (dirty & /*visibleFolderRows, rules*/ + 5 && input_checked_value !== (input_checked_value = /*state*/ + ctx[9] === "checked")) { + input.checked = input_checked_value; + } + if (dirty & /*visibleFolderRows, rules*/ + 5 && input_indeterminate_value !== (input_indeterminate_value = /*state*/ + ctx[9] === "partial")) { + input.indeterminate = input_indeterminate_value; + } + if (dirty & /*visibleFolderRows*/ + 4 && t2_value !== (t2_value = /*row*/ + ctx[8].name + "")) set_data(t2, t2_value); + if (dirty & /*visibleFolderRows*/ + 4 && label_title_value !== (label_title_value = /*row*/ + ctx[8].path)) { + attr(label, "title", label_title_value); + } + if (dirty & /*visibleFolderRows*/ + 4) { + set_style( + div, + "padding-left", + /*row*/ + ctx[8].depth * 14 + "px" + ); + } + }, + d(detaching) { + if (detaching) detach(div); + if_block.d(); + mounted = false; + dispose(); + } + }; +} +function create_fragment(ctx) { + let if_block_anchor; + let if_block = ( + /*visibleFolderRows*/ + ctx[2].length && create_if_block(ctx) + ); + return { + c() { + if (if_block) if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx2, [dirty]) { + if ( + /*visibleFolderRows*/ + ctx2[2].length + ) { + if (if_block) { + if_block.p(ctx2, dirty); + } else { + if_block = create_if_block(ctx2); + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + i: noop, + o: noop, + d(detaching) { + if (if_block) if_block.d(detaching); + if (detaching) detach(if_block_anchor); + } + }; +} +function instance($$self, $$props, $$invalidate) { + let visibleFolderRows; + let { rules } = $$props; + let { onToggleFolder } = $$props; + let folderTree = []; + let expandedFolders = /* @__PURE__ */ new Set(); + onMount(() => { + $$invalidate(4, folderTree = getVaultFolderTree()); + $$invalidate(5, expandedFolders = getExpansionForSelection(rules.map((rule) => rule.path))); + }); + function handleToggleFolderExpansion(folder) { + const next = new Set(expandedFolders); + if (next.has(folder)) { + next.delete(folder); + } else { + next.add(folder); + } + $$invalidate(5, expandedFolders = next); + } + const click_handler = (row) => handleToggleFolderExpansion(row.path); + const change_handler = (row) => onToggleFolder(row.path); + $$self.$$set = ($$props2) => { + if ("rules" in $$props2) $$invalidate(0, rules = $$props2.rules); + if ("onToggleFolder" in $$props2) $$invalidate(1, onToggleFolder = $$props2.onToggleFolder); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*folderTree, expandedFolders*/ + 48) { + $: $$invalidate(2, visibleFolderRows = flattenFolderTree(folderTree, expandedFolders)); + } + }; + return [ + rules, + onToggleFolder, + visibleFolderRows, + handleToggleFolderExpansion, + folderTree, + expandedFolders, + click_handler, + change_handler + ]; +} +var FolderRuleTree = class extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance, create_fragment, not_equal, { rules: 0, onToggleFolder: 1 }); + } +}; +var FolderRuleTree_default = FolderRuleTree; + +// src/settings.ts +var import_obsidian_daily_notes_interface = __toESM(require_obsidian_daily_notes_interface()); +var weekdays = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" +]; +var defaultSettings = Object.freeze({ + shouldConfirmBeforeCreate: true, + shouldIndexDailyNotesInAllFolders: true, + dailyNoteFilenameDateFormat: "", + shouldIndexDailyNotesFromFrontmatter: false, + dailyNoteFrontmatterDateFields: "date, daily_date, calendar_date", + shouldIndexDailyNotesFromCreationDate: false, + dailyNoteIncludedFolders: "", + sidebarViewMode: "calendar", + listGrouping: "month", + listSortOrder: "desc", + listFolderFilter: "", + weekStart: "locale", + wordsPerDot: DEFAULT_WORDS_PER_DOT, + showWeeklyNote: false, + weeklyNoteFormat: "", + weeklyNoteTemplate: "", + weeklyNoteFolder: "", + shouldIndexWeeklyNotesInAllFolders: true, + weeklyNoteFilenameDateFormat: "", + shouldIndexWeeklyNotesFromFrontmatter: false, + weeklyNoteFrontmatterDateFields: "week, weekly_date", + weeklyNoteIncludedFolders: "", + localeOverride: "system-default" +}); +function appHasPeriodicNotesPluginLoaded() { + var _a, _b; + const periodicNotes = window.app.plugins.getPlugin("periodic-notes"); + return !!((_b = (_a = periodicNotes == null ? void 0 : periodicNotes.settings) == null ? void 0 : _a.weekly) == null ? void 0 : _b.enabled); +} +var CalendarSettingsTab = class extends import_obsidian2.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.folderTreeComponent = null; + this.plugin = plugin; + } + hide() { + this.destroyFolderTree(); + } + destroyFolderTree() { + var _a; + (_a = this.folderTreeComponent) == null ? void 0 : _a.$destroy(); + this.folderTreeComponent = null; + } + display() { + this.destroyFolderTree(); + this.containerEl.empty(); + if (!(0, import_obsidian_daily_notes_interface.appHasDailyNotesPluginLoaded)()) { + this.containerEl.createDiv("settings-banner", (banner) => { + banner.createEl("div", { + cls: "settings-banner-title", + text: "Daily Notes plugin not enabled" + }); + banner.createEl("p", { + cls: "setting-item-description", + text: "Calendar Hub works best with either the Daily Notes plugin or the Periodic Notes plugin." + }); + }); + } + this.addWeekStartSetting(); + this.addConfirmCreateSetting(); + new import_obsidian2.Setting(this.containerEl).setName("Date matching").setHeading(); + this.addIndexDailyNotesInAllFoldersSetting(); + this.addDailyNoteIncludedFoldersSetting(); + this.addIndexDailyNotesFromFrontmatterSetting(); + this.addDailyNoteFrontmatterDateFieldsSetting(); + this.addDailyNoteFilenameDateFormatSetting(); + this.addIndexDailyNotesFromCreationDateSetting(); + new import_obsidian2.Setting(this.containerEl).setName("Weekly notes").setHeading(); + this.addShowWeeklyNoteSetting(); + if (this.plugin.options.showWeeklyNote && !appHasPeriodicNotesPluginLoaded()) { + this.containerEl.createEl("p", { + cls: "setting-item-description", + text: "Weekly note support is kept for compatibility. For richer periodic notes, consider using the Periodic Notes plugin." + }); + this.addWeeklyNoteFormatSetting(); + this.addWeeklyNoteTemplateSetting(); + this.addWeeklyNoteFolderSetting(); + this.addIndexWeeklyNotesInAllFoldersSetting(); + this.addWeeklyNoteIncludedFoldersSetting(); + this.addWeeklyNoteFilenameDateFormatSetting(); + this.addIndexWeeklyNotesFromFrontmatterSetting(); + this.addWeeklyNoteFrontmatterDateFieldsSetting(); + } + new import_obsidian2.Setting(this.containerEl).setName("Advanced").setHeading(); + this.addLocaleOverrideSetting(); + } + addWeekStartSetting() { + const { moment } = window; + const localizedWeekdays = moment.weekdays(); + const localeWeekStartNum = window._bundledLocaleWeekSpec.dow; + const localeWeekStart = moment.weekdays()[localeWeekStartNum]; + new import_obsidian2.Setting(this.containerEl).setName("Start week on:").setDesc( + "Choose what day of the week to start. Select 'Locale default' to use the default specified by moment.js" + ).addDropdown((dropdown) => { + dropdown.addOption("locale", `Locale default (${localeWeekStart})`); + localizedWeekdays.forEach((day, i) => { + dropdown.addOption(weekdays[i], day); + }); + dropdown.setValue(this.plugin.options.weekStart); + dropdown.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + weekStart: value + })); + }); + }); + } + addConfirmCreateSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Confirm before creating new note").setDesc("Show a confirmation modal before creating a new note").addToggle((toggle) => { + toggle.setValue(this.plugin.options.shouldConfirmBeforeCreate); + toggle.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + shouldConfirmBeforeCreate: value + })); + }); + }); + } + addIndexDailyNotesInAllFoldersSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Detect daily notes in all folders").setDesc( + "Find every Markdown file whose file name matches the daily note format, even outside the configured daily notes folder. Matching notes for the selected date appear below the calendar." + ).addToggle((toggle) => { + toggle.setValue(this.plugin.options.shouldIndexDailyNotesInAllFolders); + toggle.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + shouldIndexDailyNotesInAllFolders: value + })); + }); + }); + } + addDailyNoteFilenameDateFormatSetting() { + const presetFormats = [ + "YYYYMMDD", + "YYYY-MM-DD", + "YYYY_MM_DD", + "YYYY.MM.DD", + "DD-MM-YYYY", + "MM-DD-YYYY", + "YYYYMMDDTHHmmss", + "YYYYMMDDTHHmmssZZ" + ]; + let formatField = null; + new import_obsidian2.Setting(this.containerEl).setName("Date format inside daily note filenames").setDesc( + "Optional. Calendar Hub already looks for the Daily Notes date format anywhere in the file name. Pick common formats from the dropdown (each pick appends to the list) or type your own comma-separated moment.js formats, such as YYYYMMDD for files like 'meeting 20260529.md', or YYYYMMDDTHHmmssZZ for timestamps like 'sync 20260529T143025Z.md'." + ).addDropdown((dropdown) => { + dropdown.addOption("", "Add a common format\u2026"); + presetFormats.forEach((format) => { + dropdown.addOption(format, format); + }); + dropdown.setValue(""); + dropdown.onChange((value) => { + if (!value) { + return; + } + const current = this.plugin.options.dailyNoteFilenameDateFormat.split(/[,\n]/).map((entry) => entry.trim()).filter(Boolean); + if (!current.includes(value)) { + const next = [...current, value].join(", "); + void this.plugin.writeOptions(() => ({ + dailyNoteFilenameDateFormat: next + })); + formatField == null ? void 0 : formatField.setValue(next); + } + dropdown.setValue(""); + }); + }).addText((textfield) => { + formatField = textfield; + textfield.setPlaceholder("YYYYMMDD"); + textfield.setValue(this.plugin.options.dailyNoteFilenameDateFormat); + textfield.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + dailyNoteFilenameDateFormat: value + })); + }); + }); + } + addIndexDailyNotesFromFrontmatterSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Use frontmatter dates").setDesc( + "Read the configured frontmatter fields for a date and prefer it over any date in the file name. Notes without a frontmatter date fall back to file name matching." + ).addToggle((toggle) => { + toggle.setValue( + this.plugin.options.shouldIndexDailyNotesFromFrontmatter + ); + toggle.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + shouldIndexDailyNotesFromFrontmatter: value + })); + }); + }); + } + addDailyNoteFrontmatterDateFieldsSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Frontmatter date fields").setDesc( + "Comma-separated field names to read when frontmatter dates are enabled. Fields are tried in this order and the first one with a valid date wins, so put the field you trust most first. Nested fields can use dot notation, such as calendar.date." + ).addText((textfield) => { + textfield.setPlaceholder("date, daily_date, calendar_date"); + textfield.setValue(this.plugin.options.dailyNoteFrontmatterDateFields); + textfield.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + dailyNoteFrontmatterDateFields: value + })); + }); + }); + } + addIndexDailyNotesFromCreationDateSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Use file creation date fallback").setDesc( + "When neither the file name nor frontmatter yields a date, map the note to the day the file was created. Creation times are set by your device and can change when files are copied or re-synced, so file name and frontmatter dates always take priority." + ).addToggle((toggle) => { + toggle.setValue( + this.plugin.options.shouldIndexDailyNotesFromCreationDate + ); + toggle.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + shouldIndexDailyNotesFromCreationDate: value + })); + }); + }); + } + addDailyNoteIncludedFoldersSetting() { + let foldersField = null; + new import_obsidian2.Setting(this.containerEl).setName("Folders to scan for daily notes").setDesc( + "Optional. Leave blank to scan the whole vault. Tick folders in the tree below or add comma-separated folder paths to limit filename and frontmatter matching. Prefix a path with '-' to exclude its subtree, e.g. '30 Macro, -30 Macro/Archive'; deeper rules win." + ).addTextArea((textarea) => { + foldersField = textarea; + textarea.setPlaceholder( + "Journal, Work/Daily, Projects/Research" + ); + textarea.setValue(this.plugin.options.dailyNoteIncludedFolders); + textarea.onChange(async (value) => { + var _a; + await this.plugin.writeOptions(() => ({ + dailyNoteIncludedFolders: value + })); + (_a = this.folderTreeComponent) == null ? void 0 : _a.$set({ + rules: parseFolderRules(value) + }); + }); + }); + const treeEl = this.containerEl.createDiv("calendar-settings-folder-tree"); + this.folderTreeComponent = new FolderRuleTree_default({ + target: treeEl, + props: { + rules: parseFolderRules(this.plugin.options.dailyNoteIncludedFolders), + onToggleFolder: (folder) => { + var _a; + const next = toggleFolderRule( + folder, + parseFolderRules(this.plugin.options.dailyNoteIncludedFolders) + ); + const value = serializeFolderRules(next); + void this.plugin.writeOptions(() => ({ + dailyNoteIncludedFolders: value + })); + (_a = this.folderTreeComponent) == null ? void 0 : _a.$set({ rules: next }); + foldersField == null ? void 0 : foldersField.setValue(value); + } + } + }); + } + addShowWeeklyNoteSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Show week number").setDesc("Enable this to add a column with the week number").addToggle((toggle) => { + toggle.setValue(this.plugin.options.showWeeklyNote); + toggle.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ showWeeklyNote: value })); + this.display(); + }); + }); + } + addWeeklyNoteFormatSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Weekly note format").setDesc("For more syntax help, refer to format reference").addText((textfield) => { + textfield.setValue(this.plugin.options.weeklyNoteFormat); + textfield.setPlaceholder(DEFAULT_WEEK_FORMAT); + textfield.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ weeklyNoteFormat: value })); + }); + }); + } + addWeeklyNoteTemplateSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Weekly note template").setDesc( + "Choose the file you want to use as the template for your weekly notes" + ).addText((textfield) => { + textfield.setValue(this.plugin.options.weeklyNoteTemplate); + textfield.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ weeklyNoteTemplate: value })); + }); + }); + } + addWeeklyNoteFolderSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Weekly note folder").setDesc("New weekly notes will be placed here").addText((textfield) => { + textfield.setValue(this.plugin.options.weeklyNoteFolder); + textfield.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ weeklyNoteFolder: value })); + }); + }); + } + addIndexWeeklyNotesInAllFoldersSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Detect weekly notes in all folders").setDesc( + "Find every Markdown file that resolves to a week, even outside the weekly notes folder. Matching notes for the selected week appear below the calendar." + ).addToggle((toggle) => { + toggle.setValue(this.plugin.options.shouldIndexWeeklyNotesInAllFolders); + toggle.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + shouldIndexWeeklyNotesInAllFolders: value + })); + }); + }); + } + addWeeklyNoteIncludedFoldersSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Folders to scan for weekly notes").setDesc( + "Optional. Leave blank to scan the whole vault. Add comma-separated folder paths to limit weekly filename and frontmatter matching. Prefix a path with '-' to exclude its subtree; deeper rules win." + ).addTextArea((textarea) => { + textarea.setPlaceholder("Journal, Work/Weekly, Reviews"); + textarea.setValue(this.plugin.options.weeklyNoteIncludedFolders); + textarea.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + weeklyNoteIncludedFolders: value + })); + }); + }); + } + addWeeklyNoteFilenameDateFormatSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Week format inside weekly note filenames").setDesc( + "Optional. Calendar Hub already looks for the weekly note format anywhere in the file name. Add extra comma-separated formats here, such as GGGG-[W]WW for files like 'review 2026-W23.md'." + ).addText((textfield) => { + textfield.setPlaceholder("GGGG-[W]WW"); + textfield.setValue(this.plugin.options.weeklyNoteFilenameDateFormat); + textfield.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + weeklyNoteFilenameDateFormat: value + })); + }); + }); + } + addIndexWeeklyNotesFromFrontmatterSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Use frontmatter dates for weekly notes").setDesc( + "Read the configured frontmatter fields for a week and prefer them over the file name (a week string or a date both work). Notes without a frontmatter value fall back to file name matching." + ).addToggle((toggle) => { + toggle.setValue( + this.plugin.options.shouldIndexWeeklyNotesFromFrontmatter + ); + toggle.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + shouldIndexWeeklyNotesFromFrontmatter: value + })); + }); + }); + } + addWeeklyNoteFrontmatterDateFieldsSetting() { + new import_obsidian2.Setting(this.containerEl).setName("Weekly frontmatter fields").setDesc( + "Comma-separated field names to read when weekly frontmatter dates are enabled. Fields are tried in this order and the first one with a valid value wins. Nested fields can use dot notation, such as calendar.week." + ).addText((textfield) => { + textfield.setPlaceholder("week, weekly_date"); + textfield.setValue(this.plugin.options.weeklyNoteFrontmatterDateFields); + textfield.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + weeklyNoteFrontmatterDateFields: value + })); + }); + }); + } + addLocaleOverrideSetting() { + var _a; + const { moment } = window; + const sysLocale = (_a = navigator.language) == null ? void 0 : _a.toLowerCase(); + new import_obsidian2.Setting(this.containerEl).setName("Override locale:").setDesc( + "Set this if you want to use a locale different from the default" + ).addDropdown((dropdown) => { + dropdown.addOption("system-default", `Same as system (${sysLocale})`); + moment.locales().forEach((locale) => { + dropdown.addOption(locale, locale); + }); + dropdown.setValue(this.plugin.options.localeOverride); + dropdown.onChange(async (value) => { + await this.plugin.writeOptions(() => ({ + localeOverride: value + })); + }); + }); + } +}; + +// src/io/dailyNoteIndex.ts +var import_obsidian_daily_notes_interface2 = __toESM(require_obsidian_daily_notes_interface()); +function buildNotesByDate(files, options) { + var _a, _b, _c; + const notesByDate = {}; + const { format, granularity } = options; + const folderRules = parseFolderRules((_a = options.includedFolders) != null ? _a : ""); + const frontmatterDateFields = getListValues( + (_b = options.frontmatterDateFields) != null ? _b : "" + ); + const extractionFormats = getExtractionFormats( + format, + (_c = options.filenameDateFormat) != null ? _c : "" + ); + files.forEach((file) => { + var _a2; + if (!shouldIncludeFilePath(file.path, folderRules)) { + return; + } + let noteDate = getDateFromFrontmatter( + file, + frontmatterDateFields, + extractionFormats + ); + if (!noteDate.isValid()) { + noteDate = getDateFromFilename( + file.basename, + format, + options.filenameDateFormat + ); + } + if (!noteDate.isValid() && options.useCreationDateFallback) { + noteDate = getDateFromCreationTime(file); + } + if (!noteDate.isValid()) { + return; + } + const id = (0, import_obsidian_daily_notes_interface2.getDateUID)(noteDate, granularity); + const notes = (_a2 = notesByDate[id]) != null ? _a2 : []; + notes.push(file); + notesByDate[id] = notes; + }); + Object.values(notesByDate).forEach( + (notes) => notes.sort((a, b) => a.path.localeCompare(b.path)) + ); + return notesByDate; +} +function buildDailyNotesByDate(files, options = "") { + const indexOptions = normalizeIndexOptions(options); + const { format = import_obsidian_daily_notes_interface2.DEFAULT_DAILY_NOTE_FORMAT } = (0, import_obsidian_daily_notes_interface2.getDailyNoteSettings)(); + return buildNotesByDate(files, { + format, + granularity: "day", + filenameDateFormat: indexOptions.filenameDateFormat, + frontmatterDateFields: indexOptions.frontmatterDateFields, + useCreationDateFallback: indexOptions.useCreationDateFallback, + includedFolders: indexOptions.includedFolders + }); +} +function normalizeIndexOptions(options) { + if (typeof options === "string") { + return { filenameDateFormat: options }; + } + return options; +} +function getDateFromFilename(basename, dailyNoteFormat, filenameDateFormat = "") { + const exactDate = parseNoteDate(basename, dailyNoteFormat); + if (exactDate.isValid()) { + return exactDate; + } + for (const extractionFormat of getExtractionFormats( + dailyNoteFormat, + filenameDateFormat + )) { + const candidateLengths = getCandidateLengths(extractionFormat); + for (const length of candidateLengths) { + for (let start = 0; start <= basename.length - length; start++) { + const candidate = basename.substring(start, start + length); + const embeddedDate = parseNoteDate(candidate, extractionFormat); + if (embeddedDate.isValid()) { + return embeddedDate; + } + } + } + } + return exactDate; +} +function getDateFromFrontmatter(file, frontmatterDateFields, formats) { + var _a; + if (!frontmatterDateFields.length) { + return window.moment.invalid(); + } + const frontmatter = (_a = window.app.metadataCache.getFileCache(file)) == null ? void 0 : _a.frontmatter; + if (!frontmatter) { + return window.moment.invalid(); + } + for (const field of frontmatterDateFields) { + const date = getDateFromFrontmatterValue( + getFrontmatterValue(frontmatter, field), + formats + ); + if (date.isValid()) { + return date; + } + } + return window.moment.invalid(); +} +function getExtractionFormats(dailyNoteFormat, filenameDateFormat) { + return Array.from( + /* @__PURE__ */ new Set([ + dailyNoteFormat, + ...filenameDateFormat.split(",").map((format) => format.trim()).filter(Boolean) + ]) + ); +} +function getDateFromFrontmatterValue(value, formats) { + if (Array.isArray(value)) { + for (const item of value) { + const date = getDateFromFrontmatterValue(item, formats); + if (date.isValid()) { + return date; + } + } + return window.moment.invalid(); + } + if (value instanceof Date) { + return window.moment(value); + } + if (typeof value !== "string" && typeof value !== "number") { + return window.moment.invalid(); + } + const valueText = String(value).trim(); + for (const format of getFrontmatterFormats(formats)) { + const date = parseNoteDate(valueText, format); + if (date.isValid()) { + return date; + } + } + const isoDate = parseNoteDate(valueText, window.moment.ISO_8601); + return isoDate.isValid() ? isoDate : window.moment.invalid(); +} +function getFrontmatterFormats(formats) { + return Array.from( + /* @__PURE__ */ new Set([ + ...formats, + "YYYY-MM-DD", + "YYYYMMDD" + ]) + ); +} +function getFrontmatterValue(frontmatter, field) { + return field.split(".").reduce((value, key) => { + if (!value || typeof value !== "object") { + return void 0; + } + return value[key]; + }, frontmatter); +} +function getDateFromCreationTime(file) { + var _a; + const ctime = (_a = file.stat) == null ? void 0 : _a.ctime; + return ctime ? window.moment(ctime) : window.moment.invalid(); +} +function getListValues(value) { + return value.split(/[,\n]/).map((entry) => entry.trim()).filter(Boolean); +} +function parseNoteDate(text3, format) { + const parsed = window.moment(text3, format, true); + if (!parsed.isValid() || !hasExplicitUtcOffset(text3, format)) { + return parsed; + } + const literal = window.moment.parseZone(text3, format, true); + return window.moment({ + year: literal.year(), + month: literal.month(), + date: literal.date() + }); +} +function hasExplicitUtcOffset(text3, format) { + if (typeof format === "string") { + return /Z/.test(removeEscapedCharacters(format)); + } + return /(Z|[+-]\d{2}:\d{2}|[+-]\d{4})$/.test(text3); +} +function removeEscapedCharacters(format) { + return format.replace(/\[[^\]]*\]/g, ""); +} +function getCandidateLengths(format) { + var _a; + const sampleDates = [ + window.moment("2000-01-02", "YYYY-MM-DD"), + window.moment("2000-11-22", "YYYY-MM-DD") + ]; + const offsetTokens = (_a = removeEscapedCharacters(format).match(/ZZ|Z/g)) != null ? _a : []; + let literalUtcShrink = 0; + for (const token of offsetTokens) { + literalUtcShrink += token === "ZZ" ? 4 : 5; + } + const lengths = /* @__PURE__ */ new Set(); + sampleDates.forEach((date) => { + const length = date.format(format).length; + lengths.add(length); + if (literalUtcShrink > 0) { + lengths.add(length - literalUtcShrink); + } + }); + return Array.from(lengths).sort((a, b) => b - a); +} +function dailyNotesByDateToSingleNotes(notesByDate) { + return Object.entries(notesByDate).reduce( + (notes, [dateUID, files]) => { + const firstFile = files[0]; + if (firstFile) { + notes[dateUID] = firstFile; + } + return notes; + }, + {} + ); +} +function singleDailyNotesToDailyNotesByDate(dailyNotes2) { + return Object.entries(dailyNotes2).reduce( + (notes, [dateUID, file]) => { + notes[dateUID] = [file]; + return notes; + }, + {} + ); +} +function getDailyNotesForDate(date, notesByDate, fallbackDailyNotes) { + const dateUID = (0, import_obsidian_daily_notes_interface2.getDateUID)(date, "day"); + const matchingNotes = notesByDate == null ? void 0 : notesByDate[dateUID]; + if (matchingNotes == null ? void 0 : matchingNotes.length) { + return matchingNotes; + } + const dailyNote = (0, import_obsidian_daily_notes_interface2.getDailyNote)(date, fallbackDailyNotes != null ? fallbackDailyNotes : {}); + return dailyNote ? [dailyNote] : []; +} + +// src/io/dailyNotes.ts +var import_obsidian4 = require("obsidian"); +var import_obsidian_daily_notes_interface3 = __toESM(require_obsidian_daily_notes_interface()); + +// src/ui/modal.ts +var import_obsidian3 = require("obsidian"); +var ConfirmationModal = class extends import_obsidian3.Modal { + constructor(app, config) { + super(app); + const { cta, onAccept, text: text3, title } = config; + this.contentEl.createEl("h2", { text: title }); + this.contentEl.createEl("p", { text: text3 }); + this.contentEl.createDiv("modal-button-container", (buttonsEl) => { + buttonsEl.createEl("button", { text: "Never mind" }).addEventListener("click", () => this.close()); + buttonsEl.createEl("button", { + cls: "mod-cta", + text: cta + }).addEventListener("click", (e) => { + void onAccept(e).then(() => this.close()); + }); + }); + } +}; +function createConfirmationDialog({ + cta, + onAccept, + text: text3, + title +}) { + new ConfirmationModal(window.app, { cta, onAccept, text: text3, title }).open(); +} + +// src/io/dailyNotes.ts +function getDayDateFromFile(file) { + var _a; + const format = (_a = (0, import_obsidian_daily_notes_interface3.getDailyNoteSettings)().format.split("/").pop()) != null ? _a : ""; + const noteDate = window.moment(file.basename, format, true); + return noteDate.isValid() ? noteDate : null; +} +function getAllDailyNotes() { + const { vault } = window.app; + const { folder } = (0, import_obsidian_daily_notes_interface3.getDailyNoteSettings)(); + const dailyNotesFolder = folder ? vault.getAbstractFileByPath((0, import_obsidian4.normalizePath)(folder)) : vault.getRoot(); + if (!(dailyNotesFolder instanceof import_obsidian4.TFolder)) { + throw new Error("Failed to find daily notes folder"); + } + const dailyNotes2 = {}; + import_obsidian4.Vault.recurseChildren(dailyNotesFolder, (note) => { + if (note instanceof import_obsidian4.TFile) { + const date = getDayDateFromFile(note); + if (date) { + dailyNotes2[(0, import_obsidian_daily_notes_interface3.getDateUID)(date, "day")] = note; + } + } + }); + return dailyNotes2; +} +async function tryToCreateDailyNote(date, inNewSplit, settings2, cb) { + const { workspace } = window.app; + const { format } = (0, import_obsidian_daily_notes_interface3.getDailyNoteSettings)(); + const filename = date.format(format); + const createFile = async () => { + const dailyNote = await (0, import_obsidian_daily_notes_interface3.createDailyNote)(date); + const leaf = workspace.getLeaf(inNewSplit ? "split" : false); + await leaf.openFile(dailyNote, { active: true }); + cb == null ? void 0 : cb(dailyNote); + }; + if (settings2.shouldConfirmBeforeCreate) { + createConfirmationDialog({ + cta: "Create", + onAccept: createFile, + text: `File ${filename} does not exist. Would you like to create it?`, + title: "New Daily Note" + }); + } else { + await createFile(); + } +} + +// src/io/weeklyNotes.ts +var import_obsidian5 = require("obsidian"); +var import_obsidian_daily_notes_interface4 = __toESM(require_obsidian_daily_notes_interface()); +function getWeeklyNoteSettings() { + var _a, _b, _c, _d, _e, _f, _g; + const { plugins } = window.app; + const periodicNotes = plugins.getPlugin("periodic-notes"); + if (periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.weekly) == null ? void 0 : _b.enabled)) { + const weekly = periodicNotes.settings.weekly; + return { + format: weekly.format || DEFAULT_WEEK_FORMAT, + folder: ((_c = weekly.folder) == null ? void 0 : _c.trim()) || "", + template: ((_d = weekly.template) == null ? void 0 : _d.trim()) || "" + }; + } + const options = ((_e = plugins.getPlugin(PLUGIN_ID)) == null ? void 0 : _e.options) || {}; + return { + format: options.weeklyNoteFormat || DEFAULT_WEEK_FORMAT, + folder: ((_f = options.weeklyNoteFolder) == null ? void 0 : _f.trim()) || "", + template: ((_g = options.weeklyNoteTemplate) == null ? void 0 : _g.trim()) || "" + }; +} +function removeEscapedCharacters2(format) { + return format.replace(/\[[^\]]*\]/g, ""); +} +function getWeekDateFromFile(file) { + var _a; + const format = (_a = getWeeklyNoteSettings().format.split("/").pop()) != null ? _a : ""; + const noteDate = window.moment(file.basename, format, true); + if (!noteDate.isValid()) { + return null; + } + const cleanFormat = removeEscapedCharacters2(format); + const isAmbiguous = /w{1,2}/i.test(cleanFormat) && (/M{1,4}/.test(cleanFormat) || /D{1,4}/.test(cleanFormat)); + if (isAmbiguous) { + return window.moment( + file.basename, + format.replace(/M{1,4}/g, "").replace(/D{1,4}/g, ""), + false + ); + } + return noteDate; +} +function getWeeklyNote(date, weeklyNotes2) { + var _a; + return (_a = weeklyNotes2[(0, import_obsidian_daily_notes_interface4.getDateUID)(date, "week")]) != null ? _a : null; +} +function buildWeeklyNotesByDate(files, options = {}) { + return buildNotesByDate(files, { + format: getWeeklyNoteSettings().format, + granularity: "week", + filenameDateFormat: options.filenameDateFormat, + frontmatterDateFields: options.frontmatterDateFields, + includedFolders: options.includedFolders + }); +} +function getWeeklyNotesForDate(date, notesByDate, fallback) { + const id = (0, import_obsidian_daily_notes_interface4.getDateUID)(date, "week"); + const matching = notesByDate == null ? void 0 : notesByDate[id]; + if (matching == null ? void 0 : matching.length) { + return matching; + } + const note = getWeeklyNote(date, fallback != null ? fallback : {}); + return note ? [note] : []; +} +function getAllWeeklyNotes() { + const { vault } = window.app; + const { folder } = getWeeklyNoteSettings(); + const weeklyNotesFolder = folder ? vault.getAbstractFileByPath((0, import_obsidian5.normalizePath)(folder)) : vault.getRoot(); + if (!(weeklyNotesFolder instanceof import_obsidian5.TFolder)) { + throw new Error("Failed to find weekly notes folder"); + } + const weeklyNotes2 = {}; + import_obsidian5.Vault.recurseChildren(weeklyNotesFolder, (note) => { + if (note instanceof import_obsidian5.TFile) { + const date = getWeekDateFromFile(note); + if (date) { + weeklyNotes2[(0, import_obsidian_daily_notes_interface4.getDateUID)(date, "week")] = note; + } + } + }); + return weeklyNotes2; +} +async function ensureFolderExists(path) { + const dirs = path.split("/").slice(0, -1).filter(Boolean); + if (!dirs.length) { + return; + } + const dir = dirs.join("/"); + if (!window.app.vault.getAbstractFileByPath(dir)) { + await window.app.vault.createFolder(dir); + } +} +async function getNotePath(folder, filename) { + const name = filename.endsWith(".md") ? filename : `${filename}.md`; + const path = (0, import_obsidian5.normalizePath)([folder, name].filter(Boolean).join("/")); + await ensureFolderExists(path); + return path; +} +async function getTemplateContents(template) { + const { metadataCache, vault } = window.app; + const templatePath = (0, import_obsidian5.normalizePath)(template); + if (templatePath === "/") { + return ""; + } + try { + const templateFile = metadataCache.getFirstLinkpathDest(templatePath, ""); + return templateFile ? await vault.cachedRead(templateFile) : ""; + } catch (err) { + console.error( + `[Calendar Hub] Failed to read the weekly note template '${templatePath}'`, + err + ); + new import_obsidian5.Notice("Failed to read the weekly note template"); + return ""; + } +} +var DAYS_OF_WEEK = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" +]; +async function createWeeklyNote(date) { + const { vault } = window.app; + const { template, format, folder } = getWeeklyNoteSettings(); + const templateContents = await getTemplateContents(template); + const filename = date.format(format); + const normalizedPath = await getNotePath(folder, filename); + try { + return await vault.create( + normalizedPath, + templateContents.replace( + /{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, + (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now = window.moment(); + const currentDate = date.clone().set({ + hour: now.get("hour"), + minute: now.get("minute"), + second: now.get("second") + }); + if (calc) { + currentDate.add( + parseInt(timeDelta, 10), + unit + ); + } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + } + ).replace(/{{\s*title\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace( + /{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi, + (_, dayOfWeek, momentFormat) => { + const day = DAYS_OF_WEEK.indexOf(dayOfWeek.toLowerCase()); + return date.clone().weekday(day).format(momentFormat.trim()); + } + ) + ); + } catch (err) { + console.error( + `[Calendar Hub] Failed to create file: '${normalizedPath}'`, + err + ); + new import_obsidian5.Notice("Unable to create new file."); + throw err; + } +} +async function tryToCreateWeeklyNote(date, inNewSplit, settings2, cb) { + const { workspace } = window.app; + const { format } = getWeeklyNoteSettings(); + const filename = date.format(format); + const createFile = async () => { + const weeklyNote = await createWeeklyNote(date); + const leaf = workspace.getLeaf(inNewSplit ? "split" : false); + await leaf.openFile(weeklyNote, { active: true }); + cb == null ? void 0 : cb(weeklyNote); + }; + if (settings2.shouldConfirmBeforeCreate) { + createConfirmationDialog({ + cta: "Create", + onAccept: createFile, + text: `File ${filename} does not exist. Would you like to create it?`, + title: "New Weekly Note" + }); + } else { + await createFile(); + } +} + +// src/ui/utils.ts +var import_obsidian_daily_notes_interface5 = __toESM(require_obsidian_daily_notes_interface()); +var classList = (obj) => { + return Object.entries(obj).filter(([, v]) => !!v).map(([k]) => k); +}; +function partition(arr, predicate) { + const pass = []; + const fail = []; + arr.forEach((elem) => { + if (predicate(elem)) { + pass.push(elem); + } else { + fail.push(elem); + } + }); + return [pass, fail]; +} +function getDateUIDFromFile(file) { + if (!file) { + return null; + } + const dayDate = getDayDateFromFile(file); + if (dayDate) { + return (0, import_obsidian_daily_notes_interface5.getDateUID)(dayDate, "day"); + } + const weekDate = getWeekDateFromFile(file); + if (weekDate) { + return (0, import_obsidian_daily_notes_interface5.getDateUID)(weekDate, "week"); + } + return null; +} + +// src/ui/stores.ts +var settings = writable(defaultSettings); +var dailyNotesByDate = writable({}); +var weeklyNotesByDate = writable({}); +function createDailyNotesStore() { + let hasError = false; + const store = writable(null); + return { + reindex: () => { + try { + const shouldIndexAllFolders = get_store_value( + settings + ).shouldIndexDailyNotesInAllFolders; + const notesByDate = shouldIndexAllFolders ? buildDailyNotesByDate( + window.app.vault.getMarkdownFiles(), + { + filenameDateFormat: get_store_value(settings).dailyNoteFilenameDateFormat, + frontmatterDateFields: get_store_value(settings).shouldIndexDailyNotesFromFrontmatter ? get_store_value(settings).dailyNoteFrontmatterDateFields : "", + useCreationDateFallback: get_store_value(settings).shouldIndexDailyNotesFromCreationDate, + includedFolders: get_store_value(settings).dailyNoteIncludedFolders + } + ) : singleDailyNotesToDailyNotesByDate(getAllDailyNotes()); + const dailyNotes2 = dailyNotesByDateToSingleNotes(notesByDate); + store.set(dailyNotes2); + dailyNotesByDate.set(notesByDate); + hasError = false; + } catch (err) { + if (!hasError) { + console.warn( + "[Calendar Hub] Failed to find daily notes folder", + err + ); + } + store.set({}); + dailyNotesByDate.set({}); + hasError = true; + } + }, + ...store + }; +} +function createWeeklyNotesStore() { + let hasError = false; + const store = writable(null); + return { + reindex: () => { + try { + const currentSettings = get_store_value(settings); + const notesByDate = currentSettings.shouldIndexWeeklyNotesInAllFolders ? buildWeeklyNotesByDate(window.app.vault.getMarkdownFiles(), { + filenameDateFormat: currentSettings.weeklyNoteFilenameDateFormat, + frontmatterDateFields: currentSettings.shouldIndexWeeklyNotesFromFrontmatter ? currentSettings.weeklyNoteFrontmatterDateFields : "", + includedFolders: currentSettings.weeklyNoteIncludedFolders + }) : singleDailyNotesToDailyNotesByDate(getAllWeeklyNotes()); + const weeklyNotes2 = dailyNotesByDateToSingleNotes(notesByDate); + store.set(weeklyNotes2); + weeklyNotesByDate.set(notesByDate); + hasError = false; + } catch (err) { + if (!hasError) { + console.warn( + "[Calendar Hub] Failed to find weekly notes folder", + err + ); + } + store.set({}); + weeklyNotesByDate.set({}); + hasError = true; + } + }, + ...store + }; +} +var dailyNotes = createDailyNotesStore(); +var weeklyNotes = createWeeklyNotesStore(); +function createSelectedFileStore() { + const store = writable(null); + return { + setFile: (file) => { + const id = getDateUIDFromFile(file); + store.set(id); + }, + ...store + }; +} +var activeFile = createSelectedFileStore(); + +// src/listView.ts +var import_obsidian6 = require("obsidian"); + +// src/ui/listViewModel.ts +function parseDayUID(uid) { + return window.moment( + uid.replace(/^day-/, ""), + window.moment.ISO_8601, + true + ); +} +function yearKeyOf(date, grouping) { + return grouping === "week" ? date.format("GGGG") : date.format("YYYY"); +} +function subgroupOf(date, grouping) { + switch (grouping) { + case "quarter": + return { + key: `${date.format("YYYY")}-Q${date.quarter()}`, + label: `Q${date.quarter()}` + }; + case "month": + return { key: date.format("YYYY-MM"), label: date.format("MMMM") }; + case "week": + return { + key: date.format("GGGG-[W]WW"), + label: date.format("[W]WW") + }; + default: + return { key: `${date.format("YYYY")}-all`, label: null }; + } +} +function getListKeysForDate(date, grouping) { + return { + yearKey: yearKeyOf(date, grouping), + subgroupKey: subgroupOf(date, grouping).key + }; +} +function buildListModel(notesByDate, grouping, order, filterRules = []) { + var _a, _b, _c; + const years = /* @__PURE__ */ new Map(); + for (const [uid, files] of Object.entries(notesByDate)) { + const scoped = filterRules.length && (files == null ? void 0 : files.length) ? files.filter((file) => shouldIncludeFilePath(file.path, filterRules)) : files; + if (!(scoped == null ? void 0 : scoped.length)) { + continue; + } + const date = parseDayUID(uid); + if (!date.isValid()) { + continue; + } + const yearKey = yearKeyOf(date, grouping); + const subgroup = subgroupOf(date, grouping); + const dateStr = date.format("YYYY-MM-DD"); + const subgroups = (_a = years.get(yearKey)) != null ? _a : /* @__PURE__ */ new Map(); + years.set(yearKey, subgroups); + const bucket = (_b = subgroups.get(subgroup.key)) != null ? _b : { + label: subgroup.label, + days: /* @__PURE__ */ new Map() + }; + subgroups.set(subgroup.key, bucket); + const day = (_c = bucket.days.get(dateStr)) != null ? _c : { + dateStr, + label: date.format("MMM D, ddd"), + files: [] + }; + day.files = [...day.files, ...scoped]; + bucket.days.set(dateStr, day); + } + const direction = order === "asc" ? 1 : -1; + const byKey = (a, b) => direction * a.key.localeCompare(b.key); + return Array.from(years.entries()).map(([yearKey, subgroups]) => { + const shapedSubgroups = Array.from(subgroups.entries()).map(([key, bucket]) => { + const days = Array.from(bucket.days.values()).sort( + (a, b) => direction * a.dateStr.localeCompare(b.dateStr) + ); + return { + key, + label: bucket.label, + noteCount: days.reduce((count, day) => count + day.files.length, 0), + days + }; + }).sort(byKey); + return { + key: yearKey, + label: yearKey, + noteCount: shapedSubgroups.reduce( + (count, subgroup) => count + subgroup.noteCount, + 0 + ), + subgroups: shapedSubgroups + }; + }).sort(byKey); +} + +// src/ui/ListPanel.svelte +function get_each_context2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[22] = list[i]; + return child_ctx; +} +function get_each_context_1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[25] = list[i]; + return child_ctx; +} +function get_each_context_2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[28] = list[i]; + return child_ctx; +} +function get_each_context_3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[31] = list[i]; + return child_ctx; +} +function create_if_block_4(ctx) { + let div1; + let folderruletree; + let t0; + let div0; + let button; + let t1; + let button_disabled_value; + let current; + let mounted; + let dispose; + folderruletree = new FolderRuleTree_default({ + props: { + rules: ( + /*listFilterRules*/ + ctx[0] + ), + onToggleFolder: ( + /*handleToggleListFilterFolder*/ + ctx[10] + ) + } + }); + return { + c() { + div1 = element("div"); + create_component(folderruletree.$$.fragment); + t0 = space(); + div0 = element("div"); + button = element("button"); + t1 = text("All notes"); + attr(button, "class", "calendar-filter-action"); + attr(button, "type", "button"); + button.disabled = button_disabled_value = !/*$settings*/ + ctx[3].listFolderFilter; + attr(div0, "class", "calendar-filter-actions"); + attr(div1, "class", "calendar-list-filter-body"); + }, + m(target, anchor) { + insert(target, div1, anchor); + mount_component(folderruletree, div1, null); + append(div1, t0); + append(div1, div0); + append(div0, button); + append(button, t1); + current = true; + if (!mounted) { + dispose = listen( + button, + "click", + /*handleClearListFilter*/ + ctx[11] + ); + mounted = true; + } + }, + p(ctx2, dirty) { + const folderruletree_changes = {}; + if (dirty[0] & /*listFilterRules*/ + 1) folderruletree_changes.rules = /*listFilterRules*/ + ctx2[0]; + folderruletree.$set(folderruletree_changes); + if (!current || dirty[0] & /*$settings*/ + 8 && button_disabled_value !== (button_disabled_value = !/*$settings*/ + ctx2[3].listFolderFilter)) { + button.disabled = button_disabled_value; + } + }, + i(local) { + if (current) return; + transition_in(folderruletree.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(folderruletree.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(div1); + destroy_component(folderruletree); + mounted = false; + dispose(); + } + }; +} +function create_else_block2(ctx) { + let div; + return { + c() { + div = element("div"); + div.textContent = "No dated notes"; + attr(div, "class", "calendar-note-empty"); + }, + m(target, anchor) { + insert(target, div, anchor); + }, + p: noop, + d(detaching) { + if (detaching) detach(div); + } + }; +} +function create_if_block2(ctx) { + let div; + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let each_value = ( + /*listModel*/ + ctx[2] + ); + const get_key = (ctx2) => ( + /*yearGroup*/ + ctx2[22].key + ); + for (let i = 0; i < each_value.length; i += 1) { + let child_ctx = get_each_context2(ctx, each_value, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block2(key, child_ctx)); + } + return { + c() { + div = element("div"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr(div, "class", "calendar-list-tree"); + }, + m(target, anchor) { + insert(target, div, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(div, null); + } + } + }, + p(ctx2, dirty) { + if (dirty[0] & /*listModel, handleOpenNote, expandedListGroups, handleToggleListGroup*/ + 4614) { + each_value = /*listModel*/ + ctx2[2]; + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div, destroy_block, create_each_block2, null, get_each_context2); + } + }, + d(detaching) { + if (detaching) detach(div); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} +function create_if_block_12(ctx) { + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let each_1_anchor; + let each_value_1 = ( + /*yearGroup*/ + ctx[22].subgroups + ); + const get_key = (ctx2) => ( + /*subgroup*/ + ctx2[25].key + ); + for (let i = 0; i < each_value_1.length; i += 1) { + let child_ctx = get_each_context_1(ctx, each_value_1, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block_1(key, child_ctx)); + } + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert(target, each_1_anchor, anchor); + }, + p(ctx2, dirty) { + if (dirty[0] & /*listModel, handleOpenNote, expandedListGroups, handleToggleListGroup*/ + 4614) { + each_value_1 = /*yearGroup*/ + ctx2[22].subgroups; + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value_1, each_1_lookup, each_1_anchor.parentNode, destroy_block, create_each_block_1, each_1_anchor, get_each_context_1); + } + }, + d(detaching) { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(detaching); + } + if (detaching) detach(each_1_anchor); + } + }; +} +function create_if_block_3(ctx) { + var _a; + let button; + let span0; + let t0_value = ( + /*expandedListGroups*/ + ((_a = ctx[1]) == null ? void 0 : _a.has( + /*subgroup*/ + ctx[25].key + )) ? "\u25BE" : "\u25B8" + ); + let t0; + let t1; + let span1; + let t2_value = ( + /*subgroup*/ + ctx[25].label + "" + ); + let t2; + let t3; + let span2; + let t4_value = ( + /*subgroup*/ + ctx[25].noteCount + "" + ); + let t4; + let button_aria_expanded_value; + let mounted; + let dispose; + function click_handler_2() { + return ( + /*click_handler_2*/ + ctx[18]( + /*subgroup*/ + ctx[25] + ) + ); + } + return { + c() { + var _a2, _b; + button = element("button"); + span0 = element("span"); + t0 = text(t0_value); + t1 = space(); + span1 = element("span"); + t2 = text(t2_value); + t3 = space(); + span2 = element("span"); + t4 = text(t4_value); + attr(span0, "class", "calendar-list-caret"); + attr(span1, "class", "calendar-list-label"); + attr(span2, "class", "calendar-list-count"); + attr(button, "class", "calendar-list-group calendar-list-subgroup"); + attr(button, "type", "button"); + attr(button, "aria-expanded", button_aria_expanded_value = /*expandedListGroups*/ + (_b = (_a2 = ctx[1]) == null ? void 0 : _a2.has( + /*subgroup*/ + ctx[25].key + )) != null ? _b : false); + }, + m(target, anchor) { + insert(target, button, anchor); + append(button, span0); + append(span0, t0); + append(button, t1); + append(button, span1); + append(span1, t2); + append(button, t3); + append(button, span2); + append(span2, t4); + if (!mounted) { + dispose = listen(button, "click", click_handler_2); + mounted = true; + } + }, + p(new_ctx, dirty) { + var _a2, _b, _c; + ctx = new_ctx; + if (dirty[0] & /*expandedListGroups, listModel*/ + 6 && t0_value !== (t0_value = /*expandedListGroups*/ + ((_a2 = ctx[1]) == null ? void 0 : _a2.has( + /*subgroup*/ + ctx[25].key + )) ? "\u25BE" : "\u25B8")) set_data(t0, t0_value); + if (dirty[0] & /*listModel*/ + 4 && t2_value !== (t2_value = /*subgroup*/ + ctx[25].label + "")) set_data(t2, t2_value); + if (dirty[0] & /*listModel*/ + 4 && t4_value !== (t4_value = /*subgroup*/ + ctx[25].noteCount + "")) set_data(t4, t4_value); + if (dirty[0] & /*expandedListGroups, listModel*/ + 6 && button_aria_expanded_value !== (button_aria_expanded_value = /*expandedListGroups*/ + (_c = (_b = ctx[1]) == null ? void 0 : _b.has( + /*subgroup*/ + ctx[25].key + )) != null ? _c : false)) { + attr(button, "aria-expanded", button_aria_expanded_value); + } + }, + d(detaching) { + if (detaching) detach(button); + mounted = false; + dispose(); + } + }; +} +function create_if_block_2(ctx) { + let div; + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let t; + let each_value_2 = ( + /*subgroup*/ + ctx[25].days + ); + const get_key = (ctx2) => ( + /*day*/ + ctx2[28].dateStr + ); + for (let i = 0; i < each_value_2.length; i += 1) { + let child_ctx = get_each_context_2(ctx, each_value_2, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block_2(key, child_ctx)); + } + return { + c() { + div = element("div"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + t = space(); + attr(div, "class", "calendar-list-days"); + toggle_class( + div, + "calendar-list-days-nested", + /*subgroup*/ + ctx[25].label !== null + ); + }, + m(target, anchor) { + insert(target, div, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(div, null); + } + } + append(div, t); + }, + p(ctx2, dirty) { + if (dirty[0] & /*listModel, handleOpenNote*/ + 4100) { + each_value_2 = /*subgroup*/ + ctx2[25].days; + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value_2, each_1_lookup, div, destroy_block, create_each_block_2, t, get_each_context_2); + } + if (dirty[0] & /*listModel*/ + 4) { + toggle_class( + div, + "calendar-list-days-nested", + /*subgroup*/ + ctx2[25].label !== null + ); + } + }, + d(detaching) { + if (detaching) detach(div); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} +function create_each_block_3(key_1, ctx) { + let button; + let t_value = ( + /*note*/ + ctx[31].basename + "" + ); + let t; + let button_title_value; + let mounted; + let dispose; + function click_handler_3(...args) { + return ( + /*click_handler_3*/ + ctx[19]( + /*note*/ + ctx[31], + ...args + ) + ); + } + return { + key: key_1, + first: null, + c() { + button = element("button"); + t = text(t_value); + attr(button, "class", "calendar-list-note"); + attr(button, "type", "button"); + attr(button, "title", button_title_value = /*note*/ + ctx[31].path); + this.first = button; + }, + m(target, anchor) { + insert(target, button, anchor); + append(button, t); + if (!mounted) { + dispose = listen(button, "click", click_handler_3); + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (dirty[0] & /*listModel*/ + 4 && t_value !== (t_value = /*note*/ + ctx[31].basename + "")) set_data(t, t_value); + if (dirty[0] & /*listModel*/ + 4 && button_title_value !== (button_title_value = /*note*/ + ctx[31].path)) { + attr(button, "title", button_title_value); + } + }, + d(detaching) { + if (detaching) detach(button); + mounted = false; + dispose(); + } + }; +} +function create_each_block_2(key_1, ctx) { + let div; + let t0_value = ( + /*day*/ + ctx[28].label + "" + ); + let t0; + let t1; + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let each_1_anchor; + let each_value_3 = ( + /*day*/ + ctx[28].files + ); + const get_key = (ctx2) => ( + /*note*/ + ctx2[31].path + ); + for (let i = 0; i < each_value_3.length; i += 1) { + let child_ctx = get_each_context_3(ctx, each_value_3, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block_3(key, child_ctx)); + } + return { + key: key_1, + first: null, + c() { + div = element("div"); + t0 = text(t0_value); + t1 = space(); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + attr(div, "class", "calendar-list-day"); + this.first = div; + }, + m(target, anchor) { + insert(target, div, anchor); + append(div, t0); + insert(target, t1, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert(target, each_1_anchor, anchor); + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (dirty[0] & /*listModel*/ + 4 && t0_value !== (t0_value = /*day*/ + ctx[28].label + "")) set_data(t0, t0_value); + if (dirty[0] & /*listModel, handleOpenNote*/ + 4100) { + each_value_3 = /*day*/ + ctx[28].files; + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value_3, each_1_lookup, each_1_anchor.parentNode, destroy_block, create_each_block_3, each_1_anchor, get_each_context_3); + } + }, + d(detaching) { + if (detaching) detach(div); + if (detaching) detach(t1); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(detaching); + } + if (detaching) detach(each_1_anchor); + } + }; +} +function create_each_block_1(key_1, ctx) { + var _a; + let first; + let t; + let show_if = ( + /*subgroup*/ + ctx[25].label === null || /*expandedListGroups*/ + ((_a = ctx[1]) == null ? void 0 : _a.has( + /*subgroup*/ + ctx[25].key + )) + ); + let if_block1_anchor; + let if_block0 = ( + /*subgroup*/ + ctx[25].label !== null && create_if_block_3(ctx) + ); + let if_block1 = show_if && create_if_block_2(ctx); + return { + key: key_1, + first: null, + c() { + first = empty(); + if (if_block0) if_block0.c(); + t = space(); + if (if_block1) if_block1.c(); + if_block1_anchor = empty(); + this.first = first; + }, + m(target, anchor) { + insert(target, first, anchor); + if (if_block0) if_block0.m(target, anchor); + insert(target, t, anchor); + if (if_block1) if_block1.m(target, anchor); + insert(target, if_block1_anchor, anchor); + }, + p(new_ctx, dirty) { + var _a2; + ctx = new_ctx; + if ( + /*subgroup*/ + ctx[25].label !== null + ) { + if (if_block0) { + if_block0.p(ctx, dirty); + } else { + if_block0 = create_if_block_3(ctx); + if_block0.c(); + if_block0.m(t.parentNode, t); + } + } else if (if_block0) { + if_block0.d(1); + if_block0 = null; + } + if (dirty[0] & /*listModel, expandedListGroups*/ + 6) show_if = /*subgroup*/ + ctx[25].label === null || /*expandedListGroups*/ + ((_a2 = ctx[1]) == null ? void 0 : _a2.has( + /*subgroup*/ + ctx[25].key + )); + if (show_if) { + if (if_block1) { + if_block1.p(ctx, dirty); + } else { + if_block1 = create_if_block_2(ctx); + if_block1.c(); + if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); + } + } else if (if_block1) { + if_block1.d(1); + if_block1 = null; + } + }, + d(detaching) { + if (detaching) detach(first); + if (if_block0) if_block0.d(detaching); + if (detaching) detach(t); + if (if_block1) if_block1.d(detaching); + if (detaching) detach(if_block1_anchor); + } + }; +} +function create_each_block2(key_1, ctx) { + var _a, _b; + let button; + let span0; + let t0_value = ( + /*expandedListGroups*/ + ((_a = ctx[1]) == null ? void 0 : _a.has( + /*yearGroup*/ + ctx[22].key + )) ? "\u25BE" : "\u25B8" + ); + let t0; + let t1; + let span1; + let t2_value = ( + /*yearGroup*/ + ctx[22].label + "" + ); + let t2; + let t3; + let span2; + let t4_value = ( + /*yearGroup*/ + ctx[22].noteCount + "" + ); + let t4; + let button_aria_expanded_value; + let t5; + let show_if = ( + /*expandedListGroups*/ + (_b = ctx[1]) == null ? void 0 : _b.has( + /*yearGroup*/ + ctx[22].key + ) + ); + let if_block_anchor; + let mounted; + let dispose; + function click_handler_1() { + return ( + /*click_handler_1*/ + ctx[17]( + /*yearGroup*/ + ctx[22] + ) + ); + } + let if_block = show_if && create_if_block_12(ctx); + return { + key: key_1, + first: null, + c() { + var _a2, _b2; + button = element("button"); + span0 = element("span"); + t0 = text(t0_value); + t1 = space(); + span1 = element("span"); + t2 = text(t2_value); + t3 = space(); + span2 = element("span"); + t4 = text(t4_value); + t5 = space(); + if (if_block) if_block.c(); + if_block_anchor = empty(); + attr(span0, "class", "calendar-list-caret"); + attr(span1, "class", "calendar-list-label"); + attr(span2, "class", "calendar-list-count"); + attr(button, "class", "calendar-list-group"); + attr(button, "type", "button"); + attr(button, "aria-expanded", button_aria_expanded_value = /*expandedListGroups*/ + (_b2 = (_a2 = ctx[1]) == null ? void 0 : _a2.has( + /*yearGroup*/ + ctx[22].key + )) != null ? _b2 : false); + this.first = button; + }, + m(target, anchor) { + insert(target, button, anchor); + append(button, span0); + append(span0, t0); + append(button, t1); + append(button, span1); + append(span1, t2); + append(button, t3); + append(button, span2); + append(span2, t4); + insert(target, t5, anchor); + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + if (!mounted) { + dispose = listen(button, "click", click_handler_1); + mounted = true; + } + }, + p(new_ctx, dirty) { + var _a2, _b2, _c, _d; + ctx = new_ctx; + if (dirty[0] & /*expandedListGroups, listModel*/ + 6 && t0_value !== (t0_value = /*expandedListGroups*/ + ((_a2 = ctx[1]) == null ? void 0 : _a2.has( + /*yearGroup*/ + ctx[22].key + )) ? "\u25BE" : "\u25B8")) set_data(t0, t0_value); + if (dirty[0] & /*listModel*/ + 4 && t2_value !== (t2_value = /*yearGroup*/ + ctx[22].label + "")) set_data(t2, t2_value); + if (dirty[0] & /*listModel*/ + 4 && t4_value !== (t4_value = /*yearGroup*/ + ctx[22].noteCount + "")) set_data(t4, t4_value); + if (dirty[0] & /*expandedListGroups, listModel*/ + 6 && button_aria_expanded_value !== (button_aria_expanded_value = /*expandedListGroups*/ + (_c = (_b2 = ctx[1]) == null ? void 0 : _b2.has( + /*yearGroup*/ + ctx[22].key + )) != null ? _c : false)) { + attr(button, "aria-expanded", button_aria_expanded_value); + } + if (dirty[0] & /*expandedListGroups, listModel*/ + 6) show_if = /*expandedListGroups*/ + (_d = ctx[1]) == null ? void 0 : _d.has( + /*yearGroup*/ + ctx[22].key + ); + if (show_if) { + if (if_block) { + if_block.p(ctx, dirty); + } else { + if_block = create_if_block_12(ctx); + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + d(detaching) { + if (detaching) detach(button); + if (detaching) detach(t5); + if (if_block) if_block.d(detaching); + if (detaching) detach(if_block_anchor); + mounted = false; + dispose(); + } + }; +} +function create_fragment2(ctx) { + let div1; + let div0; + let select0; + let option0; + let option1; + let option2; + let option3; + let select0_value_value; + let t4; + let select1; + let option4; + let option5; + let select1_value_value; + let t7; + let span0; + let t8_value = formatNoteCount( + /*listTotalNotes*/ + ctx[5] + ) + ""; + let t8; + let t9; + let button; + let span1; + let t11; + let span2; + let t12; + let t13; + let t14; + let current; + let mounted; + let dispose; + let if_block0 = ( + /*isListFilterOpen*/ + ctx[4] && create_if_block_4(ctx) + ); + function select_block_type(ctx2, dirty) { + if ( + /*listModel*/ + ctx2[2].length + ) return create_if_block2; + return create_else_block2; + } + let current_block_type = select_block_type(ctx, [-1, -1]); + let if_block1 = current_block_type(ctx); + return { + c() { + div1 = element("div"); + div0 = element("div"); + select0 = element("select"); + option0 = element("option"); + option0.textContent = "Year"; + option1 = element("option"); + option1.textContent = "Year \u203A Quarter"; + option2 = element("option"); + option2.textContent = "Year \u203A Month"; + option3 = element("option"); + option3.textContent = "Year \u203A Week"; + t4 = space(); + select1 = element("select"); + option4 = element("option"); + option4.textContent = "Newest first"; + option5 = element("option"); + option5.textContent = "Oldest first"; + t7 = space(); + span0 = element("span"); + t8 = text(t8_value); + t9 = space(); + button = element("button"); + span1 = element("span"); + span1.textContent = "Filter folders"; + t11 = space(); + span2 = element("span"); + t12 = text( + /*listFilterSummary*/ + ctx[6] + ); + t13 = space(); + if (if_block0) if_block0.c(); + t14 = space(); + if_block1.c(); + option0.__value = "year"; + option0.value = option0.__value; + option1.__value = "quarter"; + option1.value = option1.__value; + option2.__value = "month"; + option2.value = option2.__value; + option3.__value = "week"; + option3.value = option3.__value; + attr(select0, "class", "dropdown calendar-list-select"); + option4.__value = "desc"; + option4.value = option4.__value; + option5.__value = "asc"; + option5.value = option5.__value; + attr(select1, "class", "dropdown calendar-list-select"); + attr(span0, "class", "calendar-list-total"); + attr(div0, "class", "calendar-list-controls"); + attr(span2, "class", "calendar-filter-summary"); + attr(button, "class", "calendar-filter-toggle calendar-list-filter-toggle"); + attr(button, "type", "button"); + attr( + button, + "aria-expanded", + /*isListFilterOpen*/ + ctx[4] + ); + attr(div1, "class", "calendar-hub-list-panel"); + }, + m(target, anchor) { + insert(target, div1, anchor); + append(div1, div0); + append(div0, select0); + append(select0, option0); + append(select0, option1); + append(select0, option2); + append(select0, option3); + select_option( + select0, + /*$settings*/ + ctx[3].listGrouping + ); + append(div0, t4); + append(div0, select1); + append(select1, option4); + append(select1, option5); + select_option( + select1, + /*$settings*/ + ctx[3].listSortOrder + ); + append(div0, t7); + append(div0, span0); + append(span0, t8); + append(div1, t9); + append(div1, button); + append(button, span1); + append(button, t11); + append(button, span2); + append(span2, t12); + append(div1, t13); + if (if_block0) if_block0.m(div1, null); + append(div1, t14); + if_block1.m(div1, null); + current = true; + if (!mounted) { + dispose = [ + listen( + select0, + "change", + /*handleChangeListGrouping*/ + ctx[7] + ), + listen( + select1, + "change", + /*handleChangeListSort*/ + ctx[8] + ), + listen( + button, + "click", + /*click_handler*/ + ctx[16] + ) + ]; + mounted = true; + } + }, + p(ctx2, dirty) { + if (!current || dirty[0] & /*$settings*/ + 8 && select0_value_value !== (select0_value_value = /*$settings*/ + ctx2[3].listGrouping)) { + select_option( + select0, + /*$settings*/ + ctx2[3].listGrouping + ); + } + if (!current || dirty[0] & /*$settings*/ + 8 && select1_value_value !== (select1_value_value = /*$settings*/ + ctx2[3].listSortOrder)) { + select_option( + select1, + /*$settings*/ + ctx2[3].listSortOrder + ); + } + if ((!current || dirty[0] & /*listTotalNotes*/ + 32) && t8_value !== (t8_value = formatNoteCount( + /*listTotalNotes*/ + ctx2[5] + ) + "")) set_data(t8, t8_value); + if (!current || dirty[0] & /*listFilterSummary*/ + 64) set_data( + t12, + /*listFilterSummary*/ + ctx2[6] + ); + if (!current || dirty[0] & /*isListFilterOpen*/ + 16) { + attr( + button, + "aria-expanded", + /*isListFilterOpen*/ + ctx2[4] + ); + } + if ( + /*isListFilterOpen*/ + ctx2[4] + ) { + if (if_block0) { + if_block0.p(ctx2, dirty); + if (dirty[0] & /*isListFilterOpen*/ + 16) { + transition_in(if_block0, 1); + } + } else { + if_block0 = create_if_block_4(ctx2); + if_block0.c(); + transition_in(if_block0, 1); + if_block0.m(div1, t14); + } + } else if (if_block0) { + group_outros(); + transition_out(if_block0, 1, 1, () => { + if_block0 = null; + }); + check_outros(); + } + if (current_block_type === (current_block_type = select_block_type(ctx2, dirty)) && if_block1) { + if_block1.p(ctx2, dirty); + } else { + if_block1.d(1); + if_block1 = current_block_type(ctx2); + if (if_block1) { + if_block1.c(); + if_block1.m(div1, null); + } + } + }, + i(local) { + if (current) return; + transition_in(if_block0); + current = true; + }, + o(local) { + transition_out(if_block0); + current = false; + }, + d(detaching) { + if (detaching) detach(div1); + if (if_block0) if_block0.d(); + if_block1.d(); + mounted = false; + run_all(dispose); + } + }; +} +function formatNoteCount(count) { + return `${count} note${count === 1 ? "" : "s"}`; +} +function instance2($$self, $$props, $$invalidate) { + let listFilterSummary; + let $settings; + let $dailyNotesByDate; + component_subscribe($$self, settings, ($$value) => $$invalidate(3, $settings = $$value)); + component_subscribe($$self, dailyNotesByDate, ($$value) => $$invalidate(15, $dailyNotesByDate = $$value)); + let { onOpenNote } = $$props; + let { onUpdateSettings } = $$props; + let isListFilterOpen = false; + let listFilterRules = []; + let expandedListGroups = null; + let listModel = []; + let listTotalNotes = 0; + function getTodayListExpansion(grouping) { + const keys = getListKeysForDate(window.moment(), grouping); + return /* @__PURE__ */ new Set([keys.yearKey, keys.subgroupKey]); + } + function handleChangeListGrouping(event) { + const value = event.currentTarget.value; + $$invalidate(1, expandedListGroups = getTodayListExpansion(value)); + void onUpdateSettings(() => ({ listGrouping: value })); + } + function handleChangeListSort(event) { + const value = event.currentTarget.value; + void onUpdateSettings(() => ({ listSortOrder: value })); + } + function handleToggleListGroup(key) { + const next = new Set(expandedListGroups !== null && expandedListGroups !== void 0 ? expandedListGroups : []); + if (next.has(key)) { + next.delete(key); + } else { + next.add(key); + } + $$invalidate(1, expandedListGroups = next); + } + function handleToggleListFilterFolder(folder) { + void onUpdateSettings(() => ({ + listFolderFilter: serializeFolderRules(toggleFolderRule(folder, listFilterRules)) + })); + } + function handleClearListFilter() { + void onUpdateSettings(() => ({ listFolderFilter: "" })); + } + function handleOpenNote(event, file) { + event.preventDefault(); + void onOpenNote(file, event.metaKey || event.ctrlKey); + } + function getFilterSummary(value) { + const rules = parseFolderRules(value); + const includes = rules.filter((rule) => !rule.excluded).length; + const excludes = rules.length - includes; + if (!includes && !excludes) { + return "All notes"; + } + if (!includes) { + return `All notes \u2212 ${excludes}`; + } + const base = `${includes} folder${includes === 1 ? "" : "s"}`; + return excludes ? `${base} \u2212 ${excludes}` : base; + } + const click_handler = () => $$invalidate(4, isListFilterOpen = !isListFilterOpen); + const click_handler_1 = (yearGroup) => handleToggleListGroup(yearGroup.key); + const click_handler_2 = (subgroup) => handleToggleListGroup(subgroup.key); + const click_handler_3 = (note, event) => handleOpenNote(event, note); + $$self.$$set = ($$props2) => { + if ("onOpenNote" in $$props2) $$invalidate(13, onOpenNote = $$props2.onOpenNote); + if ("onUpdateSettings" in $$props2) $$invalidate(14, onUpdateSettings = $$props2.onUpdateSettings); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty[0] & /*$settings*/ + 8) { + $: $$invalidate(0, listFilterRules = parseFolderRules($settings.listFolderFilter)); + } + if ($$self.$$.dirty[0] & /*$settings*/ + 8) { + $: $$invalidate(6, listFilterSummary = getFilterSummary($settings.listFolderFilter)); + } + if ($$self.$$.dirty[0] & /*$dailyNotesByDate, $settings, listFilterRules*/ + 32777) { + $: $$invalidate(2, listModel = buildListModel($dailyNotesByDate, $settings.listGrouping, $settings.listSortOrder, listFilterRules)); + } + if ($$self.$$.dirty[0] & /*listModel*/ + 4) { + $: $$invalidate(5, listTotalNotes = listModel.reduce((count, year) => count + year.noteCount, 0)); + } + if ($$self.$$.dirty[0] & /*expandedListGroups, $settings*/ + 10) { + $: if (expandedListGroups === null) { + $$invalidate(1, expandedListGroups = getTodayListExpansion($settings.listGrouping)); + } + } + }; + return [ + listFilterRules, + expandedListGroups, + listModel, + $settings, + isListFilterOpen, + listTotalNotes, + listFilterSummary, + handleChangeListGrouping, + handleChangeListSort, + handleToggleListGroup, + handleToggleListFilterFolder, + handleClearListFilter, + handleOpenNote, + onOpenNote, + onUpdateSettings, + $dailyNotesByDate, + click_handler, + click_handler_1, + click_handler_2, + click_handler_3 + ]; +} +var ListPanel = class extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance2, create_fragment2, not_equal, { onOpenNote: 13, onUpdateSettings: 14 }, null, [-1, -1]); + } +}; +var ListPanel_default = ListPanel; + +// src/listView.ts +var ListView = class extends import_obsidian6.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.panel = null; + this.openNote = async (file, inNewSplit) => { + const leaf = this.app.workspace.getLeaf(inNewSplit ? "split" : false); + await leaf.openFile(file, { active: true }); + activeFile.setFile(file); + }; + this.plugin = plugin; + } + getViewType() { + return VIEW_TYPE_LIST; + } + getDisplayText() { + return "Calendar Hub list"; + } + getIcon() { + return "list"; + } + onOpen() { + const openCalendar = () => { + const leaves = this.app.workspace.getLeavesOfType(VIEW_TYPE_CALENDAR); + if (leaves.length) { + void this.app.workspace.revealLeaf(leaves[0]); + return; + } + this.plugin.initLeaf(); + }; + this.contentEl.addClass("calendar-hub-view-content"); + this.addAction("calendar", "Open calendar view", openCalendar); + const navButton = this.contentEl.createDiv("nav-header calendar-hub-nav").createDiv("nav-buttons-container").createDiv({ + cls: "clickable-icon nav-action-button", + attr: { "aria-label": "Open calendar view" } + }); + (0, import_obsidian6.setIcon)(navButton, "calendar"); + navButton.addEventListener("click", openCalendar); + dailyNotes.reindex(); + this.panel = new ListPanel_default({ + target: this.contentEl, + props: { + onOpenNote: this.openNote, + onUpdateSettings: (changeOpts) => this.plugin.writeOptions(changeOpts) + } + }); + return Promise.resolve(); + } + onClose() { + var _a; + (_a = this.panel) == null ? void 0 : _a.$destroy(); + this.panel = null; + return Promise.resolve(); + } +}; + +// src/view.ts +var import_obsidian_daily_notes_interface9 = __toESM(require_obsidian_daily_notes_interface()); +var import_obsidian10 = require("obsidian"); + +// vendor/obsidian-calendar-ui/index.js +var import_obsidian7 = require("obsidian"); +function noop2() { +} +function assign(tar, src) { + for (const k in src) + tar[k] = src[k]; + return tar; +} +function is_promise(value) { + return value && typeof value === "object" && typeof value.then === "function"; +} +function run2(fn) { + return fn(); +} +function blank_object2() { + return /* @__PURE__ */ Object.create(null); +} +function run_all2(fns) { + fns.forEach(run2); +} +function is_function2(thing) { + return typeof thing === "function"; +} +function safe_not_equal2(a, b) { + return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function"); +} +function not_equal2(a, b) { + return a != a ? b == b : a !== b; +} +function is_empty2(obj) { + return Object.keys(obj).length === 0; +} +function create_slot(definition, ctx, $$scope, fn) { + if (definition) { + const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); + return definition[0](slot_ctx); + } +} +function get_slot_context(definition, ctx, $$scope, fn) { + return definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx; +} +function get_slot_changes(definition, $$scope, dirty, fn) { + if (definition[2] && fn) { + const lets = definition[2](fn(dirty)); + if ($$scope.dirty === void 0) { + return lets; + } + if (typeof lets === "object") { + const merged = []; + const len = Math.max($$scope.dirty.length, lets.length); + for (let i = 0; i < len; i += 1) { + merged[i] = $$scope.dirty[i] | lets[i]; + } + return merged; + } + return $$scope.dirty | lets; + } + return $$scope.dirty; +} +function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) { + const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn); + if (slot_changes) { + const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); + slot.p(slot_context, slot_changes); + } +} +function null_to_empty(value) { + return value == null ? "" : value; +} +function append2(target, node) { + target.appendChild(node); +} +function insert2(target, node, anchor) { + target.insertBefore(node, anchor || null); +} +function detach2(node) { + node.parentNode.removeChild(node); +} +function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) + iterations[i].d(detaching); + } +} +function element2(name) { + return document.createElement(name); +} +function svg_element(name) { + return document.createElementNS("http://www.w3.org/2000/svg", name); +} +function text2(data) { + return document.createTextNode(data); +} +function space2() { + return text2(" "); +} +function empty2() { + return text2(""); +} +function listen2(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); +} +function attr2(node, attribute, value) { + if (value == null) + node.removeAttribute(attribute); + else if (node.getAttribute(attribute) !== value) + node.setAttribute(attribute, value); +} +function set_attributes(node, attributes) { + const descriptors = Object.getOwnPropertyDescriptors(node.__proto__); + for (const key in attributes) { + if (attributes[key] == null) { + node.removeAttribute(key); + } else if (key === "style") { + node.style.cssText = attributes[key]; + } else if (key === "__value") { + node.value = node[key] = attributes[key]; + } else if (descriptors[key] && descriptors[key].set) { + node[key] = attributes[key]; + } else { + attr2(node, key, attributes[key]); + } + } +} +function children2(element3) { + return Array.from(element3.childNodes); +} +function set_data2(text3, data) { + data = "" + data; + if (text3.wholeText !== data) + text3.data = data; +} +function toggle_class2(element3, name, toggle) { + element3.classList[toggle ? "add" : "remove"](name); +} +var current_component2; +function set_current_component2(component) { + current_component2 = component; +} +function get_current_component2() { + if (!current_component2) + throw new Error("Function called outside component initialization"); + return current_component2; +} +var dirty_components2 = []; +var binding_callbacks2 = []; +var render_callbacks2 = []; +var flush_callbacks2 = []; +var resolved_promise2 = Promise.resolve(); +var update_scheduled2 = false; +function schedule_update2() { + if (!update_scheduled2) { + update_scheduled2 = true; + resolved_promise2.then(flush2); + } +} +function add_render_callback2(fn) { + render_callbacks2.push(fn); +} +var flushing = false; +var seen_callbacks2 = /* @__PURE__ */ new Set(); +function flush2() { + if (flushing) + return; + flushing = true; + do { + for (let i = 0; i < dirty_components2.length; i += 1) { + const component = dirty_components2[i]; + set_current_component2(component); + update2(component.$$); + } + set_current_component2(null); + dirty_components2.length = 0; + while (binding_callbacks2.length) + binding_callbacks2.pop()(); + for (let i = 0; i < render_callbacks2.length; i += 1) { + const callback = render_callbacks2[i]; + if (!seen_callbacks2.has(callback)) { + seen_callbacks2.add(callback); + callback(); + } + } + render_callbacks2.length = 0; + } while (dirty_components2.length); + while (flush_callbacks2.length) { + flush_callbacks2.pop()(); + } + update_scheduled2 = false; + flushing = false; + seen_callbacks2.clear(); +} +function update2($$) { + if ($$.fragment !== null) { + $$.update(); + run_all2($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback2); + } +} +var outroing2 = /* @__PURE__ */ new Set(); +var outros2; +function group_outros2() { + outros2 = { + r: 0, + c: [], + p: outros2 + // parent group + }; +} +function check_outros2() { + if (!outros2.r) { + run_all2(outros2.c); + } + outros2 = outros2.p; +} +function transition_in2(block, local) { + if (block && block.i) { + outroing2.delete(block); + block.i(local); + } +} +function transition_out2(block, local, detach3, callback) { + if (block && block.o) { + if (outroing2.has(block)) + return; + outroing2.add(block); + outros2.c.push(() => { + outroing2.delete(block); + if (callback) { + if (detach3) + block.d(1); + callback(); + } + }); + block.o(local); + } +} +function handle_promise(promise, info) { + const token = info.token = {}; + function update3(type, index, key, value) { + if (info.token !== token) + return; + info.resolved = value; + let child_ctx = info.ctx; + if (key !== void 0) { + child_ctx = child_ctx.slice(); + child_ctx[key] = value; + } + const block = type && (info.current = type)(child_ctx); + let needs_flush = false; + if (info.block) { + if (info.blocks) { + info.blocks.forEach((block2, i) => { + if (i !== index && block2) { + group_outros2(); + transition_out2(block2, 1, 1, () => { + if (info.blocks[i] === block2) { + info.blocks[i] = null; + } + }); + check_outros2(); + } + }); + } else { + info.block.d(1); + } + block.c(); + transition_in2(block, 1); + block.m(info.mount(), info.anchor); + needs_flush = true; + } + info.block = block; + if (info.blocks) + info.blocks[index] = block; + if (needs_flush) { + flush2(); + } + } + if (is_promise(promise)) { + const current_component3 = get_current_component2(); + promise.then((value) => { + set_current_component2(current_component3); + update3(info.then, 1, info.value, value); + set_current_component2(null); + }, (error) => { + set_current_component2(current_component3); + update3(info.catch, 2, info.error, error); + set_current_component2(null); + if (!info.hasCatch) { + throw error; + } + }); + if (info.current !== info.pending) { + update3(info.pending, 0); + return true; + } + } else { + if (info.current !== info.then) { + update3(info.then, 1, info.value, promise); + return true; + } + info.resolved = promise; + } +} +function outro_and_destroy_block(block, lookup) { + transition_out2(block, 1, 1, () => { + lookup.delete(block.key); + }); +} +function update_keyed_each2(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block5, next, get_context) { + let o = old_blocks.length; + let n = list.length; + let i = o; + const old_indexes = {}; + while (i--) + old_indexes[old_blocks[i].key] = i; + const new_blocks = []; + const new_lookup = /* @__PURE__ */ new Map(); + const deltas = /* @__PURE__ */ new Map(); + i = n; + while (i--) { + const child_ctx = get_context(ctx, list, i); + const key = get_key(child_ctx); + let block = lookup.get(key); + if (!block) { + block = create_each_block5(key, child_ctx); + block.c(); + } else if (dynamic) { + block.p(child_ctx, dirty); + } + new_lookup.set(key, new_blocks[i] = block); + if (key in old_indexes) + deltas.set(key, Math.abs(i - old_indexes[key])); + } + const will_move = /* @__PURE__ */ new Set(); + const did_move = /* @__PURE__ */ new Set(); + function insert3(block) { + transition_in2(block, 1); + block.m(node, next); + lookup.set(block.key, block); + next = block.first; + n--; + } + while (o && n) { + const new_block = new_blocks[n - 1]; + const old_block = old_blocks[o - 1]; + const new_key = new_block.key; + const old_key = old_block.key; + if (new_block === old_block) { + next = new_block.first; + o--; + n--; + } else if (!new_lookup.has(old_key)) { + destroy(old_block, lookup); + o--; + } else if (!lookup.has(new_key) || will_move.has(new_key)) { + insert3(new_block); + } else if (did_move.has(old_key)) { + o--; + } else if (deltas.get(new_key) > deltas.get(old_key)) { + did_move.add(new_key); + insert3(new_block); + } else { + will_move.add(old_key); + o--; + } + } + while (o--) { + const old_block = old_blocks[o]; + if (!new_lookup.has(old_block.key)) + destroy(old_block, lookup); + } + while (n) + insert3(new_blocks[n - 1]); + return new_blocks; +} +function get_spread_update(levels, updates) { + const update3 = {}; + const to_null_out = {}; + const accounted_for = { $$scope: 1 }; + let i = levels.length; + while (i--) { + const o = levels[i]; + const n = updates[i]; + if (n) { + for (const key in o) { + if (!(key in n)) + to_null_out[key] = 1; + } + for (const key in n) { + if (!accounted_for[key]) { + update3[key] = n[key]; + accounted_for[key] = 1; + } + } + levels[i] = n; + } else { + for (const key in o) { + accounted_for[key] = 1; + } + } + } + for (const key in to_null_out) { + if (!(key in update3)) + update3[key] = void 0; + } + return update3; +} +function get_spread_object(spread_props) { + return typeof spread_props === "object" && spread_props !== null ? spread_props : {}; +} +function create_component2(block) { + block && block.c(); +} +function mount_component2(component, target, anchor, customElement) { + const { fragment, on_mount, on_destroy, after_update } = component.$$; + fragment && fragment.m(target, anchor); + if (!customElement) { + add_render_callback2(() => { + const new_on_destroy = on_mount.map(run2).filter(is_function2); + if (on_destroy) { + on_destroy.push(...new_on_destroy); + } else { + run_all2(new_on_destroy); + } + component.$$.on_mount = []; + }); + } + after_update.forEach(add_render_callback2); +} +function destroy_component2(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + run_all2($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } +} +function make_dirty2(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components2.push(component); + schedule_update2(); + component.$$.dirty.fill(0); + } + component.$$.dirty[i / 31 | 0] |= 1 << i % 31; +} +function init2(component, options, instance5, create_fragment5, not_equal3, props, dirty = [-1]) { + const parent_component = current_component2; + set_current_component2(component); + const $$ = component.$$ = { + fragment: null, + ctx: null, + // state + props, + update: noop2, + not_equal: not_equal3, + bound: blank_object2(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(parent_component ? parent_component.$$.context : []), + // everything else + callbacks: blank_object2(), + dirty, + skip_bound: false + }; + let ready = false; + $$.ctx = instance5 ? instance5(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal3($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty2(component, i); + } + return ret; + }) : []; + $$.update(); + ready = true; + run_all2($$.before_update); + $$.fragment = create_fragment5 ? create_fragment5($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + const nodes = children2(options.target); + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach2); + } else { + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in2(component.$$.fragment); + mount_component2(component, options.target, options.anchor, options.customElement); + flush2(); + } + set_current_component2(parent_component); +} +var SvelteComponent2 = class { + $destroy() { + destroy_component2(this, 1); + this.$destroy = noop2; + } + $on(type, callback) { + const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty2($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } +}; +function getDateUID5(date, granularity = "day") { + const ts = date.clone().startOf(granularity).format(); + return `${granularity}-${ts}`; +} +var getDateUID_1 = getDateUID5; +function add_css$5() { + var style = element2("style"); + style.id = "svelte-1widvzq-style"; + style.textContent = ".dot.svelte-1widvzq,.hollow.svelte-1widvzq{display:inline-block;height:6px;width:6px;margin:0 1px}.filled.svelte-1widvzq{fill:var(--color-dot)}.active.filled.svelte-1widvzq{fill:var(--text-on-accent)}.hollow.svelte-1widvzq{fill:none;stroke:var(--color-dot)}.active.hollow.svelte-1widvzq{fill:none;stroke:var(--text-on-accent)}"; + append2(document.head, style); +} +function create_else_block$1(ctx) { + let svg; + let circle; + let svg_class_value; + return { + c() { + svg = svg_element("svg"); + circle = svg_element("circle"); + attr2(circle, "cx", "3"); + attr2(circle, "cy", "3"); + attr2(circle, "r", "2"); + attr2(svg, "class", svg_class_value = null_to_empty(`hollow ${/*className*/ + ctx[0]}`) + " svelte-1widvzq"); + attr2(svg, "viewBox", "0 0 6 6"); + attr2(svg, "xmlns", "http://www.w3.org/2000/svg"); + toggle_class2( + svg, + "active", + /*isActive*/ + ctx[2] + ); + }, + m(target, anchor) { + insert2(target, svg, anchor); + append2(svg, circle); + }, + p(ctx2, dirty) { + if (dirty & /*className*/ + 1 && svg_class_value !== (svg_class_value = null_to_empty(`hollow ${/*className*/ + ctx2[0]}`) + " svelte-1widvzq")) { + attr2(svg, "class", svg_class_value); + } + if (dirty & /*className, isActive*/ + 5) { + toggle_class2( + svg, + "active", + /*isActive*/ + ctx2[2] + ); + } + }, + d(detaching) { + if (detaching) detach2(svg); + } + }; +} +function create_if_block$2(ctx) { + let svg; + let circle; + let svg_class_value; + return { + c() { + svg = svg_element("svg"); + circle = svg_element("circle"); + attr2(circle, "cx", "3"); + attr2(circle, "cy", "3"); + attr2(circle, "r", "2"); + attr2(svg, "class", svg_class_value = null_to_empty(`dot filled ${/*className*/ + ctx[0]}`) + " svelte-1widvzq"); + attr2(svg, "viewBox", "0 0 6 6"); + attr2(svg, "xmlns", "http://www.w3.org/2000/svg"); + toggle_class2( + svg, + "active", + /*isActive*/ + ctx[2] + ); + }, + m(target, anchor) { + insert2(target, svg, anchor); + append2(svg, circle); + }, + p(ctx2, dirty) { + if (dirty & /*className*/ + 1 && svg_class_value !== (svg_class_value = null_to_empty(`dot filled ${/*className*/ + ctx2[0]}`) + " svelte-1widvzq")) { + attr2(svg, "class", svg_class_value); + } + if (dirty & /*className, isActive*/ + 5) { + toggle_class2( + svg, + "active", + /*isActive*/ + ctx2[2] + ); + } + }, + d(detaching) { + if (detaching) detach2(svg); + } + }; +} +function create_fragment$6(ctx) { + let if_block_anchor; + function select_block_type(ctx2, dirty) { + if ( + /*isFilled*/ + ctx2[1] + ) return create_if_block$2; + return create_else_block$1; + } + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + return { + c() { + if_block.c(); + if_block_anchor = empty2(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert2(target, if_block_anchor, anchor); + }, + p(ctx2, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) { + if_block.p(ctx2, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx2); + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop2, + o: noop2, + d(detaching) { + if_block.d(detaching); + if (detaching) detach2(if_block_anchor); + } + }; +} +function instance$6($$self, $$props, $$invalidate) { + let { className = "" } = $$props; + let { isFilled } = $$props; + let { isActive } = $$props; + $$self.$$set = ($$props2) => { + if ("className" in $$props2) $$invalidate(0, className = $$props2.className); + if ("isFilled" in $$props2) $$invalidate(1, isFilled = $$props2.isFilled); + if ("isActive" in $$props2) $$invalidate(2, isActive = $$props2.isActive); + }; + return [className, isFilled, isActive]; +} +var Dot = class extends SvelteComponent2 { + constructor(options) { + super(); + if (!document.getElementById("svelte-1widvzq-style")) add_css$5(); + init2(this, options, instance$6, create_fragment$6, safe_not_equal2, { className: 0, isFilled: 1, isActive: 2 }); + } +}; +var get_default_slot_changes_1 = (dirty) => ({}); +var get_default_slot_context_1 = (ctx) => ({ metadata: null }); +var get_default_slot_changes = (dirty) => ({ metadata: dirty & /*metadata*/ +1 }); +var get_default_slot_context = (ctx) => ({ metadata: ( + /*resolvedMeta*/ + ctx[3] +) }); +function create_else_block3(ctx) { + let current; + const default_slot_template = ( + /*#slots*/ + ctx[2].default + ); + const default_slot = create_slot( + default_slot_template, + ctx, + /*$$scope*/ + ctx[1], + get_default_slot_context_1 + ); + return { + c() { + if (default_slot) default_slot.c(); + }, + m(target, anchor) { + if (default_slot) { + default_slot.m(target, anchor); + } + current = true; + }, + p(ctx2, dirty) { + if (default_slot) { + if (default_slot.p && dirty & /*$$scope*/ + 2) { + update_slot( + default_slot, + default_slot_template, + ctx2, + /*$$scope*/ + ctx2[1], + dirty, + get_default_slot_changes_1, + get_default_slot_context_1 + ); + } + } + }, + i(local) { + if (current) return; + transition_in2(default_slot, local); + current = true; + }, + o(local) { + transition_out2(default_slot, local); + current = false; + }, + d(detaching) { + if (default_slot) default_slot.d(detaching); + } + }; +} +function create_if_block$1(ctx) { + let await_block_anchor; + let promise; + let current; + let info = { + ctx, + current: null, + token: null, + hasCatch: false, + pending: create_pending_block, + then: create_then_block, + catch: create_catch_block, + value: 3, + blocks: [, , ,] + }; + handle_promise(promise = /*metadata*/ + ctx[0], info); + return { + c() { + await_block_anchor = empty2(); + info.block.c(); + }, + m(target, anchor) { + insert2(target, await_block_anchor, anchor); + info.block.m(target, info.anchor = anchor); + info.mount = () => await_block_anchor.parentNode; + info.anchor = await_block_anchor; + current = true; + }, + p(new_ctx, dirty) { + ctx = new_ctx; + info.ctx = ctx; + if (dirty & /*metadata*/ + 1 && promise !== (promise = /*metadata*/ + ctx[0]) && handle_promise(promise, info)) ; + else { + const child_ctx = ctx.slice(); + child_ctx[3] = info.resolved; + info.block.p(child_ctx, dirty); + } + }, + i(local) { + if (current) return; + transition_in2(info.block); + current = true; + }, + o(local) { + for (let i = 0; i < 3; i += 1) { + const block = info.blocks[i]; + transition_out2(block); + } + current = false; + }, + d(detaching) { + if (detaching) detach2(await_block_anchor); + info.block.d(detaching); + info.token = null; + info = null; + } + }; +} +function create_catch_block(ctx) { + return { + c: noop2, + m: noop2, + p: noop2, + i: noop2, + o: noop2, + d: noop2 + }; +} +function create_then_block(ctx) { + let current; + const default_slot_template = ( + /*#slots*/ + ctx[2].default + ); + const default_slot = create_slot( + default_slot_template, + ctx, + /*$$scope*/ + ctx[1], + get_default_slot_context + ); + return { + c() { + if (default_slot) default_slot.c(); + }, + m(target, anchor) { + if (default_slot) { + default_slot.m(target, anchor); + } + current = true; + }, + p(ctx2, dirty) { + if (default_slot) { + if (default_slot.p && dirty & /*$$scope, metadata*/ + 3) { + update_slot( + default_slot, + default_slot_template, + ctx2, + /*$$scope*/ + ctx2[1], + dirty, + get_default_slot_changes, + get_default_slot_context + ); + } + } + }, + i(local) { + if (current) return; + transition_in2(default_slot, local); + current = true; + }, + o(local) { + transition_out2(default_slot, local); + current = false; + }, + d(detaching) { + if (default_slot) default_slot.d(detaching); + } + }; +} +function create_pending_block(ctx) { + return { + c: noop2, + m: noop2, + p: noop2, + i: noop2, + o: noop2, + d: noop2 + }; +} +function create_fragment$5(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$1, create_else_block3]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if ( + /*metadata*/ + ctx2[0] + ) return 0; + return 1; + } + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + return { + c() { + if_block.c(); + if_block_anchor = empty2(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert2(target, if_block_anchor, anchor); + current = true; + }, + p(ctx2, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros2(); + transition_out2(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros2(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in2(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in2(if_block); + current = true; + }, + o(local) { + transition_out2(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach2(if_block_anchor); + } + }; +} +function instance$5($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + let { metadata } = $$props; + $$self.$$set = ($$props2) => { + if ("metadata" in $$props2) $$invalidate(0, metadata = $$props2.metadata); + if ("$$scope" in $$props2) $$invalidate(1, $$scope = $$props2.$$scope); + }; + return [metadata, $$scope, slots]; +} +var MetadataResolver = class extends SvelteComponent2 { + constructor(options) { + super(); + init2(this, options, instance$5, create_fragment$5, not_equal2, { metadata: 0 }); + } +}; +function isMacOS() { + return navigator.appVersion.indexOf("Mac") !== -1; +} +function isMetaPressed(e) { + return isMacOS() ? e.metaKey : e.ctrlKey; +} +function getDaysOfWeek(..._args) { + return window.moment.weekdaysShort(true); +} +function isWeekend(date) { + return date.isoWeekday() === 6 || date.isoWeekday() === 7; +} +function getStartOfWeek(days) { + return days[0].weekday(0); +} +function getMonth(displayedMonth, ..._args) { + const locale = window.moment().locale(); + const month = []; + let week; + const startOfMonth = displayedMonth.clone().locale(locale).date(1); + const startOffset = startOfMonth.weekday(); + let date = startOfMonth.clone().subtract(startOffset, "days"); + for (let _day = 0; _day < 42; _day++) { + if (_day % 7 === 0) { + week = { + days: [], + weekNum: date.week() + }; + month.push(week); + } + week.days.push(date); + date = date.clone().add(1, "days"); + } + return month; +} +function add_css$4() { + var style = element2("style"); + style.id = "svelte-q3wqg9-style"; + style.textContent = ".day.svelte-q3wqg9{background-color:var(--color-background-day);border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:4px;position:relative;text-align:center;transition:background-color 0.1s ease-in, color 0.1s ease-in;vertical-align:baseline}.day.svelte-q3wqg9:hover{background-color:var(--interactive-hover)}.day.active.svelte-q3wqg9:hover{background-color:var(--interactive-accent-hover)}.adjacent-month.svelte-q3wqg9{opacity:0.25}.today.svelte-q3wqg9{color:var(--color-text-today)}.day.svelte-q3wqg9:active,.active.svelte-q3wqg9,.active.today.svelte-q3wqg9{color:var(--text-on-accent);background-color:var(--interactive-accent)}.dot-container.svelte-q3wqg9{display:flex;flex-wrap:wrap;justify-content:center;line-height:6px;min-height:6px}"; + append2(document.head, style); +} +function get_each_context$2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[11] = list[i]; + return child_ctx; +} +function create_each_block$2(ctx) { + let dot; + let current; + const dot_spread_levels = [ + /*dot*/ + ctx[11] + ]; + let dot_props = {}; + for (let i = 0; i < dot_spread_levels.length; i += 1) { + dot_props = assign(dot_props, dot_spread_levels[i]); + } + dot = new Dot({ props: dot_props }); + return { + c() { + create_component2(dot.$$.fragment); + }, + m(target, anchor) { + mount_component2(dot, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const dot_changes = dirty & /*metadata*/ + 128 ? get_spread_update(dot_spread_levels, [get_spread_object( + /*dot*/ + ctx2[11] + )]) : {}; + dot.$set(dot_changes); + }, + i(local) { + if (current) return; + transition_in2(dot.$$.fragment, local); + current = true; + }, + o(local) { + transition_out2(dot.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component2(dot, detaching); + } + }; +} +function create_default_slot$1(ctx) { + let div1; + let t0_value = ( + /*date*/ + ctx[0].format("D") + "" + ); + let t0; + let t1; + let div0; + let div1_class_value; + let current; + let mounted; + let dispose; + let each_value = ( + /*metadata*/ + ctx[7].dots + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i)); + } + const out = (i) => transition_out2(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + let div1_levels = [ + { + class: div1_class_value = `day ${/*metadata*/ + ctx[7].classes.join(" ")}` + }, + /*metadata*/ + ctx[7].dataAttributes || {} + ]; + let div1_data = {}; + for (let i = 0; i < div1_levels.length; i += 1) { + div1_data = assign(div1_data, div1_levels[i]); + } + return { + c() { + div1 = element2("div"); + t0 = text2(t0_value); + t1 = space2(); + div0 = element2("div"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr2(div0, "class", "dot-container svelte-q3wqg9"); + set_attributes(div1, div1_data); + toggle_class2( + div1, + "active", + /*selectedId*/ + ctx[6] === getDateUID_1( + /*date*/ + ctx[0], + "day" + ) + ); + toggle_class2(div1, "adjacent-month", !/*date*/ + ctx[0].isSame( + /*displayedMonth*/ + ctx[5], + "month" + )); + toggle_class2( + div1, + "today", + /*date*/ + ctx[0].isSame( + /*today*/ + ctx[4], + "day" + ) + ); + toggle_class2(div1, "svelte-q3wqg9", true); + }, + m(target, anchor) { + insert2(target, div1, anchor); + append2(div1, t0); + append2(div1, t1); + append2(div1, div0); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div0, null); + } + current = true; + if (!mounted) { + dispose = [ + listen2(div1, "click", function() { + if (is_function2( + /*onClick*/ + ctx[2] && /*click_handler*/ + ctx[8] + )) /*onClick*/ + (ctx[2] && /*click_handler*/ + ctx[8]).apply(this, arguments); + }), + listen2(div1, "contextmenu", function() { + if (is_function2( + /*onContextMenu*/ + ctx[3] && /*contextmenu_handler*/ + ctx[9] + )) /*onContextMenu*/ + (ctx[3] && /*contextmenu_handler*/ + ctx[9]).apply(this, arguments); + }), + listen2(div1, "pointerover", function() { + if (is_function2( + /*onHover*/ + ctx[1] && /*pointerover_handler*/ + ctx[10] + )) /*onHover*/ + (ctx[1] && /*pointerover_handler*/ + ctx[10]).apply(this, arguments); + }) + ]; + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if ((!current || dirty & /*date*/ + 1) && t0_value !== (t0_value = /*date*/ + ctx[0].format("D") + "")) set_data2(t0, t0_value); + if (dirty & /*metadata*/ + 128) { + each_value = /*metadata*/ + ctx[7].dots; + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$2(ctx, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in2(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$2(child_ctx); + each_blocks[i].c(); + transition_in2(each_blocks[i], 1); + each_blocks[i].m(div0, null); + } + } + group_outros2(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros2(); + } + set_attributes(div1, div1_data = get_spread_update(div1_levels, [ + (!current || dirty & /*metadata*/ + 128 && div1_class_value !== (div1_class_value = `day ${/*metadata*/ + ctx[7].classes.join(" ")}`)) && { class: div1_class_value }, + dirty & /*metadata*/ + 128 && /*metadata*/ + (ctx[7].dataAttributes || {}) + ])); + toggle_class2( + div1, + "active", + /*selectedId*/ + ctx[6] === getDateUID_1( + /*date*/ + ctx[0], + "day" + ) + ); + toggle_class2(div1, "adjacent-month", !/*date*/ + ctx[0].isSame( + /*displayedMonth*/ + ctx[5], + "month" + )); + toggle_class2( + div1, + "today", + /*date*/ + ctx[0].isSame( + /*today*/ + ctx[4], + "day" + ) + ); + toggle_class2(div1, "svelte-q3wqg9", true); + }, + i(local) { + if (current) return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in2(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out2(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) detach2(div1); + destroy_each(each_blocks, detaching); + mounted = false; + run_all2(dispose); + } + }; +} +function create_fragment$4(ctx) { + let td; + let metadataresolver; + let current; + metadataresolver = new MetadataResolver({ + props: { + metadata: ( + /*metadata*/ + ctx[7] + ), + $$slots: { + default: [ + create_default_slot$1, + ({ metadata }) => ({ 7: metadata }), + ({ metadata }) => metadata ? 128 : 0 + ] + }, + $$scope: { ctx } + } + }); + return { + c() { + td = element2("td"); + create_component2(metadataresolver.$$.fragment); + }, + m(target, anchor) { + insert2(target, td, anchor); + mount_component2(metadataresolver, td, null); + current = true; + }, + p(ctx2, [dirty]) { + const metadataresolver_changes = {}; + if (dirty & /*metadata*/ + 128) metadataresolver_changes.metadata = /*metadata*/ + ctx2[7]; + if (dirty & /*$$scope, metadata, selectedId, date, displayedMonth, today, onClick, onContextMenu, onHover*/ + 16639) { + metadataresolver_changes.$$scope = { dirty, ctx: ctx2 }; + } + metadataresolver.$set(metadataresolver_changes); + }, + i(local) { + if (current) return; + transition_in2(metadataresolver.$$.fragment, local); + current = true; + }, + o(local) { + transition_out2(metadataresolver.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach2(td); + destroy_component2(metadataresolver); + } + }; +} +function instance$4($$self, $$props, $$invalidate) { + let { date } = $$props; + let { metadata } = $$props; + let { onHover } = $$props; + let { onClick } = $$props; + let { onContextMenu } = $$props; + let { today } = $$props; + let { displayedMonth = null } = $$props; + let { selectedId = null } = $$props; + const click_handler = (e) => onClick(date, isMetaPressed(e)); + const contextmenu_handler = (e) => onContextMenu(date, e); + const pointerover_handler = (e) => onHover(date, e.target, isMetaPressed(e)); + $$self.$$set = ($$props2) => { + if ("date" in $$props2) $$invalidate(0, date = $$props2.date); + if ("metadata" in $$props2) $$invalidate(7, metadata = $$props2.metadata); + if ("onHover" in $$props2) $$invalidate(1, onHover = $$props2.onHover); + if ("onClick" in $$props2) $$invalidate(2, onClick = $$props2.onClick); + if ("onContextMenu" in $$props2) $$invalidate(3, onContextMenu = $$props2.onContextMenu); + if ("today" in $$props2) $$invalidate(4, today = $$props2.today); + if ("displayedMonth" in $$props2) $$invalidate(5, displayedMonth = $$props2.displayedMonth); + if ("selectedId" in $$props2) $$invalidate(6, selectedId = $$props2.selectedId); + }; + return [ + date, + onHover, + onClick, + onContextMenu, + today, + displayedMonth, + selectedId, + metadata, + click_handler, + contextmenu_handler, + pointerover_handler + ]; +} +var Day = class extends SvelteComponent2 { + constructor(options) { + super(); + if (!document.getElementById("svelte-q3wqg9-style")) add_css$4(); + init2(this, options, instance$4, create_fragment$4, not_equal2, { + date: 0, + metadata: 7, + onHover: 1, + onClick: 2, + onContextMenu: 3, + today: 4, + displayedMonth: 5, + selectedId: 6 + }); + } +}; +function add_css$3() { + var style = element2("style"); + style.id = "svelte-156w7na-style"; + style.textContent = ".arrow.svelte-156w7na.svelte-156w7na{align-items:center;cursor:pointer;display:flex;justify-content:center;width:24px}.arrow.is-mobile.svelte-156w7na.svelte-156w7na{width:32px}.right.svelte-156w7na.svelte-156w7na{transform:rotate(180deg)}.arrow.svelte-156w7na svg.svelte-156w7na{color:var(--color-arrow);height:16px;width:16px}"; + append2(document.head, style); +} +function create_fragment$3(ctx) { + let div; + let svg; + let path; + let mounted; + let dispose; + return { + c() { + div = element2("div"); + svg = svg_element("svg"); + path = svg_element("path"); + attr2(path, "fill", "currentColor"); + attr2(path, "d", "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"); + attr2(svg, "focusable", "false"); + attr2(svg, "role", "img"); + attr2(svg, "xmlns", "http://www.w3.org/2000/svg"); + attr2(svg, "viewBox", "0 0 320 512"); + attr2(svg, "class", "svelte-156w7na"); + attr2(div, "class", "arrow svelte-156w7na"); + attr2( + div, + "aria-label", + /*tooltip*/ + ctx[1] + ); + toggle_class2( + div, + "is-mobile", + /*isMobile*/ + ctx[3] + ); + toggle_class2( + div, + "right", + /*direction*/ + ctx[2] === "right" + ); + }, + m(target, anchor) { + insert2(target, div, anchor); + append2(div, svg); + append2(svg, path); + if (!mounted) { + dispose = listen2(div, "click", function() { + if (is_function2( + /*onClick*/ + ctx[0] + )) ctx[0].apply(this, arguments); + }); + mounted = true; + } + }, + p(new_ctx, [dirty]) { + ctx = new_ctx; + if (dirty & /*tooltip*/ + 2) { + attr2( + div, + "aria-label", + /*tooltip*/ + ctx[1] + ); + } + if (dirty & /*direction*/ + 4) { + toggle_class2( + div, + "right", + /*direction*/ + ctx[2] === "right" + ); + } + }, + i: noop2, + o: noop2, + d(detaching) { + if (detaching) detach2(div); + mounted = false; + dispose(); + } + }; +} +function instance$3($$self, $$props, $$invalidate) { + let { onClick } = $$props; + let { tooltip } = $$props; + let { direction } = $$props; + let isMobile = window.app.isMobile; + $$self.$$set = ($$props2) => { + if ("onClick" in $$props2) $$invalidate(0, onClick = $$props2.onClick); + if ("tooltip" in $$props2) $$invalidate(1, tooltip = $$props2.tooltip); + if ("direction" in $$props2) $$invalidate(2, direction = $$props2.direction); + }; + return [onClick, tooltip, direction, isMobile]; +} +var Arrow = class extends SvelteComponent2 { + constructor(options) { + super(); + if (!document.getElementById("svelte-156w7na-style")) add_css$3(); + init2(this, options, instance$3, create_fragment$3, safe_not_equal2, { onClick: 0, tooltip: 1, direction: 2 }); + } +}; +function add_css$2() { + var style = element2("style"); + style.id = "svelte-1vwr9dd-style"; + style.textContent = ".nav.svelte-1vwr9dd.svelte-1vwr9dd{align-items:center;display:flex;margin:0.6em 0 1em;padding:0 8px;width:100%}.nav.is-mobile.svelte-1vwr9dd.svelte-1vwr9dd{padding:0}.title.svelte-1vwr9dd.svelte-1vwr9dd{color:var(--color-text-title);font-size:1.5em;margin:0}.is-mobile.svelte-1vwr9dd .title.svelte-1vwr9dd{font-size:1.3em}.month.svelte-1vwr9dd.svelte-1vwr9dd{font-weight:500;text-transform:capitalize}.year.svelte-1vwr9dd.svelte-1vwr9dd{color:var(--interactive-accent)}.right-nav.svelte-1vwr9dd.svelte-1vwr9dd{display:flex;justify-content:center;margin-left:auto}.reset-button.svelte-1vwr9dd.svelte-1vwr9dd{cursor:pointer;border-radius:4px;color:var(--text-muted);font-size:0.7em;font-weight:600;letter-spacing:1px;margin:0 4px;padding:0px 4px;text-transform:uppercase}.is-mobile.svelte-1vwr9dd .reset-button.svelte-1vwr9dd{display:none}"; + append2(document.head, style); +} +function create_fragment$2(ctx) { + let div2; + let h3; + let span0; + let t0_value = ( + /*displayedMonth*/ + ctx[0].format("MMM") + "" + ); + let t0; + let t1; + let span1; + let t2_value = ( + /*displayedMonth*/ + ctx[0].format("YYYY") + "" + ); + let t2; + let t3; + let div1; + let arrow0; + let t4; + let div0; + let t6; + let arrow1; + let current; + let mounted; + let dispose; + arrow0 = new Arrow({ + props: { + direction: "left", + onClick: ( + /*decrementDisplayedMonth*/ + ctx[3] + ), + tooltip: "Previous Month" + } + }); + arrow1 = new Arrow({ + props: { + direction: "right", + onClick: ( + /*incrementDisplayedMonth*/ + ctx[2] + ), + tooltip: "Next Month" + } + }); + return { + c() { + div2 = element2("div"); + h3 = element2("h3"); + span0 = element2("span"); + t0 = text2(t0_value); + t1 = space2(); + span1 = element2("span"); + t2 = text2(t2_value); + t3 = space2(); + div1 = element2("div"); + create_component2(arrow0.$$.fragment); + t4 = space2(); + div0 = element2("div"); + div0.textContent = `${/*todayDisplayStr*/ + ctx[4]}`; + t6 = space2(); + create_component2(arrow1.$$.fragment); + attr2(span0, "class", "month svelte-1vwr9dd"); + attr2(span1, "class", "year svelte-1vwr9dd"); + attr2(h3, "class", "title svelte-1vwr9dd"); + attr2(div0, "class", "reset-button svelte-1vwr9dd"); + attr2(div1, "class", "right-nav svelte-1vwr9dd"); + attr2(div2, "class", "nav svelte-1vwr9dd"); + toggle_class2( + div2, + "is-mobile", + /*isMobile*/ + ctx[5] + ); + }, + m(target, anchor) { + insert2(target, div2, anchor); + append2(div2, h3); + append2(h3, span0); + append2(span0, t0); + append2(h3, t1); + append2(h3, span1); + append2(span1, t2); + append2(div2, t3); + append2(div2, div1); + mount_component2(arrow0, div1, null); + append2(div1, t4); + append2(div1, div0); + append2(div1, t6); + mount_component2(arrow1, div1, null); + current = true; + if (!mounted) { + dispose = [ + listen2(h3, "click", function() { + if (is_function2( + /*resetDisplayedMonth*/ + ctx[1] + )) ctx[1].apply(this, arguments); + }), + listen2(div0, "click", function() { + if (is_function2( + /*resetDisplayedMonth*/ + ctx[1] + )) ctx[1].apply(this, arguments); + }) + ]; + mounted = true; + } + }, + p(new_ctx, [dirty]) { + ctx = new_ctx; + if ((!current || dirty & /*displayedMonth*/ + 1) && t0_value !== (t0_value = /*displayedMonth*/ + ctx[0].format("MMM") + "")) set_data2(t0, t0_value); + if ((!current || dirty & /*displayedMonth*/ + 1) && t2_value !== (t2_value = /*displayedMonth*/ + ctx[0].format("YYYY") + "")) set_data2(t2, t2_value); + const arrow0_changes = {}; + if (dirty & /*decrementDisplayedMonth*/ + 8) arrow0_changes.onClick = /*decrementDisplayedMonth*/ + ctx[3]; + arrow0.$set(arrow0_changes); + const arrow1_changes = {}; + if (dirty & /*incrementDisplayedMonth*/ + 4) arrow1_changes.onClick = /*incrementDisplayedMonth*/ + ctx[2]; + arrow1.$set(arrow1_changes); + }, + i(local) { + if (current) return; + transition_in2(arrow0.$$.fragment, local); + transition_in2(arrow1.$$.fragment, local); + current = true; + }, + o(local) { + transition_out2(arrow0.$$.fragment, local); + transition_out2(arrow1.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach2(div2); + destroy_component2(arrow0); + destroy_component2(arrow1); + mounted = false; + run_all2(dispose); + } + }; +} +function instance$2($$self, $$props, $$invalidate) { + let { displayedMonth } = $$props; + let { today } = $$props; + let { resetDisplayedMonth } = $$props; + let { incrementDisplayedMonth } = $$props; + let { decrementDisplayedMonth } = $$props; + const todayDisplayStr = today.calendar().split(/\d|\s/)[0]; + let isMobile = window.app.isMobile; + $$self.$$set = ($$props2) => { + if ("displayedMonth" in $$props2) $$invalidate(0, displayedMonth = $$props2.displayedMonth); + if ("today" in $$props2) $$invalidate(6, today = $$props2.today); + if ("resetDisplayedMonth" in $$props2) $$invalidate(1, resetDisplayedMonth = $$props2.resetDisplayedMonth); + if ("incrementDisplayedMonth" in $$props2) $$invalidate(2, incrementDisplayedMonth = $$props2.incrementDisplayedMonth); + if ("decrementDisplayedMonth" in $$props2) $$invalidate(3, decrementDisplayedMonth = $$props2.decrementDisplayedMonth); + }; + return [ + displayedMonth, + resetDisplayedMonth, + incrementDisplayedMonth, + decrementDisplayedMonth, + todayDisplayStr, + isMobile, + today + ]; +} +var Nav = class extends SvelteComponent2 { + constructor(options) { + super(); + if (!document.getElementById("svelte-1vwr9dd-style")) add_css$2(); + init2(this, options, instance$2, create_fragment$2, safe_not_equal2, { + displayedMonth: 0, + today: 6, + resetDisplayedMonth: 1, + incrementDisplayedMonth: 2, + decrementDisplayedMonth: 3 + }); + } +}; +function add_css$1() { + var style = element2("style"); + style.id = "svelte-egt0yd-style"; + style.textContent = "td.svelte-egt0yd{border-right:1px solid var(--background-modifier-border)}.week-num.svelte-egt0yd{background-color:var(--color-background-weeknum);border-radius:4px;color:var(--color-text-weeknum);cursor:pointer;font-size:0.65em;height:100%;padding:4px;text-align:center;transition:background-color 0.1s ease-in, color 0.1s ease-in;vertical-align:baseline}.week-num.svelte-egt0yd:hover{background-color:var(--interactive-hover)}.week-num.active.svelte-egt0yd:hover{background-color:var(--interactive-accent-hover)}.active.svelte-egt0yd{color:var(--text-on-accent);background-color:var(--interactive-accent)}.dot-container.svelte-egt0yd{display:flex;flex-wrap:wrap;justify-content:center;line-height:6px;min-height:6px}"; + append2(document.head, style); +} +function get_each_context$1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[11] = list[i]; + return child_ctx; +} +function create_each_block$1(ctx) { + let dot; + let current; + const dot_spread_levels = [ + /*dot*/ + ctx[11] + ]; + let dot_props = {}; + for (let i = 0; i < dot_spread_levels.length; i += 1) { + dot_props = assign(dot_props, dot_spread_levels[i]); + } + dot = new Dot({ props: dot_props }); + return { + c() { + create_component2(dot.$$.fragment); + }, + m(target, anchor) { + mount_component2(dot, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const dot_changes = dirty & /*metadata*/ + 64 ? get_spread_update(dot_spread_levels, [get_spread_object( + /*dot*/ + ctx2[11] + )]) : {}; + dot.$set(dot_changes); + }, + i(local) { + if (current) return; + transition_in2(dot.$$.fragment, local); + current = true; + }, + o(local) { + transition_out2(dot.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component2(dot, detaching); + } + }; +} +function create_default_slot(ctx) { + let div1; + let t0; + let t1; + let div0; + let div1_class_value; + let current; + let mounted; + let dispose; + let each_value = ( + /*metadata*/ + ctx[6].dots + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); + } + const out = (i) => transition_out2(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + div1 = element2("div"); + t0 = text2( + /*weekNum*/ + ctx[0] + ); + t1 = space2(); + div0 = element2("div"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr2(div0, "class", "dot-container svelte-egt0yd"); + attr2(div1, "class", div1_class_value = null_to_empty(`week-num ${/*metadata*/ + ctx[6].classes.join(" ")}`) + " svelte-egt0yd"); + toggle_class2( + div1, + "active", + /*selectedId*/ + ctx[5] === getDateUID_1( + /*days*/ + ctx[1][0], + "week" + ) + ); + }, + m(target, anchor) { + insert2(target, div1, anchor); + append2(div1, t0); + append2(div1, t1); + append2(div1, div0); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div0, null); + } + current = true; + if (!mounted) { + dispose = [ + listen2(div1, "click", function() { + if (is_function2( + /*onClick*/ + ctx[3] && /*click_handler*/ + ctx[8] + )) /*onClick*/ + (ctx[3] && /*click_handler*/ + ctx[8]).apply(this, arguments); + }), + listen2(div1, "contextmenu", function() { + if (is_function2( + /*onContextMenu*/ + ctx[4] && /*contextmenu_handler*/ + ctx[9] + )) /*onContextMenu*/ + (ctx[4] && /*contextmenu_handler*/ + ctx[9]).apply(this, arguments); + }), + listen2(div1, "pointerover", function() { + if (is_function2( + /*onHover*/ + ctx[2] && /*pointerover_handler*/ + ctx[10] + )) /*onHover*/ + (ctx[2] && /*pointerover_handler*/ + ctx[10]).apply(this, arguments); + }) + ]; + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (!current || dirty & /*weekNum*/ + 1) set_data2( + t0, + /*weekNum*/ + ctx[0] + ); + if (dirty & /*metadata*/ + 64) { + each_value = /*metadata*/ + ctx[6].dots; + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$1(ctx, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in2(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$1(child_ctx); + each_blocks[i].c(); + transition_in2(each_blocks[i], 1); + each_blocks[i].m(div0, null); + } + } + group_outros2(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros2(); + } + if (!current || dirty & /*metadata*/ + 64 && div1_class_value !== (div1_class_value = null_to_empty(`week-num ${/*metadata*/ + ctx[6].classes.join(" ")}`) + " svelte-egt0yd")) { + attr2(div1, "class", div1_class_value); + } + if (dirty & /*metadata, selectedId, getDateUID, days*/ + 98) { + toggle_class2( + div1, + "active", + /*selectedId*/ + ctx[5] === getDateUID_1( + /*days*/ + ctx[1][0], + "week" + ) + ); + } + }, + i(local) { + if (current) return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in2(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out2(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) detach2(div1); + destroy_each(each_blocks, detaching); + mounted = false; + run_all2(dispose); + } + }; +} +function create_fragment$1(ctx) { + let td; + let metadataresolver; + let current; + metadataresolver = new MetadataResolver({ + props: { + metadata: ( + /*metadata*/ + ctx[6] + ), + $$slots: { + default: [ + create_default_slot, + ({ metadata }) => ({ 6: metadata }), + ({ metadata }) => metadata ? 64 : 0 + ] + }, + $$scope: { ctx } + } + }); + return { + c() { + td = element2("td"); + create_component2(metadataresolver.$$.fragment); + attr2(td, "class", "svelte-egt0yd"); + }, + m(target, anchor) { + insert2(target, td, anchor); + mount_component2(metadataresolver, td, null); + current = true; + }, + p(ctx2, [dirty]) { + const metadataresolver_changes = {}; + if (dirty & /*metadata*/ + 64) metadataresolver_changes.metadata = /*metadata*/ + ctx2[6]; + if (dirty & /*$$scope, metadata, selectedId, days, onClick, startOfWeek, onContextMenu, onHover, weekNum*/ + 16639) { + metadataresolver_changes.$$scope = { dirty, ctx: ctx2 }; + } + metadataresolver.$set(metadataresolver_changes); + }, + i(local) { + if (current) return; + transition_in2(metadataresolver.$$.fragment, local); + current = true; + }, + o(local) { + transition_out2(metadataresolver.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach2(td); + destroy_component2(metadataresolver); + } + }; +} +function instance$1($$self, $$props, $$invalidate) { + let { weekNum } = $$props; + let { days } = $$props; + let { metadata } = $$props; + let { onHover } = $$props; + let { onClick } = $$props; + let { onContextMenu } = $$props; + let { selectedId = null } = $$props; + let startOfWeek; + const click_handler = (e) => onClick(startOfWeek, isMetaPressed(e)); + const contextmenu_handler = (e) => onContextMenu(days[0], e); + const pointerover_handler = (e) => onHover(startOfWeek, e.target, isMetaPressed(e)); + $$self.$$set = ($$props2) => { + if ("weekNum" in $$props2) $$invalidate(0, weekNum = $$props2.weekNum); + if ("days" in $$props2) $$invalidate(1, days = $$props2.days); + if ("metadata" in $$props2) $$invalidate(6, metadata = $$props2.metadata); + if ("onHover" in $$props2) $$invalidate(2, onHover = $$props2.onHover); + if ("onClick" in $$props2) $$invalidate(3, onClick = $$props2.onClick); + if ("onContextMenu" in $$props2) $$invalidate(4, onContextMenu = $$props2.onContextMenu); + if ("selectedId" in $$props2) $$invalidate(5, selectedId = $$props2.selectedId); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*days*/ + 2) { + $$invalidate(7, startOfWeek = getStartOfWeek(days)); + } + }; + return [ + weekNum, + days, + onHover, + onClick, + onContextMenu, + selectedId, + metadata, + startOfWeek, + click_handler, + contextmenu_handler, + pointerover_handler + ]; +} +var WeekNum = class extends SvelteComponent2 { + constructor(options) { + super(); + if (!document.getElementById("svelte-egt0yd-style")) add_css$1(); + init2(this, options, instance$1, create_fragment$1, not_equal2, { + weekNum: 0, + days: 1, + metadata: 6, + onHover: 2, + onClick: 3, + onContextMenu: 4, + selectedId: 5 + }); + } +}; +async function metadataReducer(promisedMetadata) { + const meta = { + dots: [], + classes: [], + dataAttributes: {} + }; + const metas = await Promise.all(promisedMetadata); + return metas.reduce((acc, meta2) => ({ + classes: [...acc.classes, ...meta2.classes || []], + dataAttributes: Object.assign(acc.dataAttributes, meta2.dataAttributes), + dots: [...acc.dots, ...meta2.dots || []] + }), meta); +} +function getDailyMetadata(sources, date, ..._args) { + return metadataReducer(sources.map((source) => source.getDailyMetadata(date))); +} +function getWeeklyMetadata(sources, date, ..._args) { + return metadataReducer(sources.map((source) => source.getWeeklyMetadata(date))); +} +function add_css() { + var style = element2("style"); + style.id = "svelte-pcimu8-style"; + style.textContent = ".container.svelte-pcimu8{--color-background-heading:transparent;--color-background-day:transparent;--color-background-weeknum:transparent;--color-background-weekend:transparent;--color-dot:var(--text-muted);--color-arrow:var(--text-muted);--color-button:var(--text-muted);--color-text-title:var(--text-normal);--color-text-heading:var(--text-muted);--color-text-day:var(--text-normal);--color-text-today:var(--interactive-accent);--color-text-weeknum:var(--text-muted)}.container.svelte-pcimu8{padding:0 8px}.container.is-mobile.svelte-pcimu8{padding:0}th.svelte-pcimu8{text-align:center}.weekend.svelte-pcimu8{background-color:var(--color-background-weekend)}.calendar.svelte-pcimu8{border-collapse:collapse;width:100%}th.svelte-pcimu8{background-color:var(--color-background-heading);color:var(--color-text-heading);font-size:0.6em;letter-spacing:1px;padding:4px;text-transform:uppercase}"; + append2(document.head, style); +} +function get_each_context3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[18] = list[i]; + return child_ctx; +} +function get_each_context_12(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[21] = list[i]; + return child_ctx; +} +function get_each_context_22(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[24] = list[i]; + return child_ctx; +} +function get_each_context_32(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[27] = list[i]; + return child_ctx; +} +function create_if_block_22(ctx) { + let col; + return { + c() { + col = element2("col"); + }, + m(target, anchor) { + insert2(target, col, anchor); + }, + d(detaching) { + if (detaching) detach2(col); + } + }; +} +function create_each_block_32(ctx) { + let col; + return { + c() { + col = element2("col"); + attr2(col, "class", "svelte-pcimu8"); + toggle_class2(col, "weekend", isWeekend( + /*date*/ + ctx[27] + )); + }, + m(target, anchor) { + insert2(target, col, anchor); + }, + p(ctx2, dirty) { + if (dirty & /*isWeekend, month*/ + 16384) { + toggle_class2(col, "weekend", isWeekend( + /*date*/ + ctx2[27] + )); + } + }, + d(detaching) { + if (detaching) detach2(col); + } + }; +} +function create_if_block_13(ctx) { + let th; + return { + c() { + th = element2("th"); + th.textContent = "W"; + attr2(th, "class", "svelte-pcimu8"); + }, + m(target, anchor) { + insert2(target, th, anchor); + }, + d(detaching) { + if (detaching) detach2(th); + } + }; +} +function create_each_block_22(ctx) { + let th; + let t_value = ( + /*dayOfWeek*/ + ctx[24] + "" + ); + let t; + return { + c() { + th = element2("th"); + t = text2(t_value); + attr2(th, "class", "svelte-pcimu8"); + }, + m(target, anchor) { + insert2(target, th, anchor); + append2(th, t); + }, + p(ctx2, dirty) { + if (dirty & /*daysOfWeek*/ + 32768 && t_value !== (t_value = /*dayOfWeek*/ + ctx2[24] + "")) set_data2(t, t_value); + }, + d(detaching) { + if (detaching) detach2(th); + } + }; +} +function create_if_block3(ctx) { + let weeknum; + let current; + const weeknum_spread_levels = [ + /*week*/ + ctx[18], + { + metadata: getWeeklyMetadata( + /*sources*/ + ctx[8], + /*week*/ + ctx[18].days[0], + /*today*/ + ctx[10] + ) + }, + { onClick: ( + /*onClickWeek*/ + ctx[7] + ) }, + { + onContextMenu: ( + /*onContextMenuWeek*/ + ctx[5] + ) + }, + { onHover: ( + /*onHoverWeek*/ + ctx[3] + ) }, + { selectedId: ( + /*selectedId*/ + ctx[9] + ) } + ]; + let weeknum_props = {}; + for (let i = 0; i < weeknum_spread_levels.length; i += 1) { + weeknum_props = assign(weeknum_props, weeknum_spread_levels[i]); + } + weeknum = new WeekNum({ props: weeknum_props }); + return { + c() { + create_component2(weeknum.$$.fragment); + }, + m(target, anchor) { + mount_component2(weeknum, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const weeknum_changes = dirty & /*month, getWeeklyMetadata, sources, today, onClickWeek, onContextMenuWeek, onHoverWeek, selectedId*/ + 18344 ? get_spread_update(weeknum_spread_levels, [ + dirty & /*month*/ + 16384 && get_spread_object( + /*week*/ + ctx2[18] + ), + dirty & /*getWeeklyMetadata, sources, month, today*/ + 17664 && { + metadata: getWeeklyMetadata( + /*sources*/ + ctx2[8], + /*week*/ + ctx2[18].days[0], + /*today*/ + ctx2[10] + ) + }, + dirty & /*onClickWeek*/ + 128 && { onClick: ( + /*onClickWeek*/ + ctx2[7] + ) }, + dirty & /*onContextMenuWeek*/ + 32 && { + onContextMenu: ( + /*onContextMenuWeek*/ + ctx2[5] + ) + }, + dirty & /*onHoverWeek*/ + 8 && { onHover: ( + /*onHoverWeek*/ + ctx2[3] + ) }, + dirty & /*selectedId*/ + 512 && { selectedId: ( + /*selectedId*/ + ctx2[9] + ) } + ]) : {}; + weeknum.$set(weeknum_changes); + }, + i(local) { + if (current) return; + transition_in2(weeknum.$$.fragment, local); + current = true; + }, + o(local) { + transition_out2(weeknum.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component2(weeknum, detaching); + } + }; +} +function create_each_block_12(key_1, ctx) { + let first; + let day; + let current; + day = new Day({ + props: { + date: ( + /*day*/ + ctx[21] + ), + today: ( + /*today*/ + ctx[10] + ), + displayedMonth: ( + /*displayedMonth*/ + ctx[0] + ), + onClick: ( + /*onClickDay*/ + ctx[6] + ), + onContextMenu: ( + /*onContextMenuDay*/ + ctx[4] + ), + onHover: ( + /*onHoverDay*/ + ctx[2] + ), + metadata: getDailyMetadata( + /*sources*/ + ctx[8], + /*day*/ + ctx[21], + /*today*/ + ctx[10] + ), + selectedId: ( + /*selectedId*/ + ctx[9] + ) + } + }); + return { + key: key_1, + first: null, + c() { + first = empty2(); + create_component2(day.$$.fragment); + this.first = first; + }, + m(target, anchor) { + insert2(target, first, anchor); + mount_component2(day, target, anchor); + current = true; + }, + p(new_ctx, dirty) { + ctx = new_ctx; + const day_changes = {}; + if (dirty & /*month*/ + 16384) day_changes.date = /*day*/ + ctx[21]; + if (dirty & /*today*/ + 1024) day_changes.today = /*today*/ + ctx[10]; + if (dirty & /*displayedMonth*/ + 1) day_changes.displayedMonth = /*displayedMonth*/ + ctx[0]; + if (dirty & /*onClickDay*/ + 64) day_changes.onClick = /*onClickDay*/ + ctx[6]; + if (dirty & /*onContextMenuDay*/ + 16) day_changes.onContextMenu = /*onContextMenuDay*/ + ctx[4]; + if (dirty & /*onHoverDay*/ + 4) day_changes.onHover = /*onHoverDay*/ + ctx[2]; + if (dirty & /*sources, month, today*/ + 17664) day_changes.metadata = getDailyMetadata( + /*sources*/ + ctx[8], + /*day*/ + ctx[21], + /*today*/ + ctx[10] + ); + if (dirty & /*selectedId*/ + 512) day_changes.selectedId = /*selectedId*/ + ctx[9]; + day.$set(day_changes); + }, + i(local) { + if (current) return; + transition_in2(day.$$.fragment, local); + current = true; + }, + o(local) { + transition_out2(day.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach2(first); + destroy_component2(day, detaching); + } + }; +} +function create_each_block3(key_1, ctx) { + let tr; + let t0; + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let t1; + let current; + let if_block = ( + /*showWeekNums*/ + ctx[1] && create_if_block3(ctx) + ); + let each_value_1 = ( + /*week*/ + ctx[18].days + ); + const get_key = (ctx2) => ( + /*day*/ + ctx2[21].format() + ); + for (let i = 0; i < each_value_1.length; i += 1) { + let child_ctx = get_each_context_12(ctx, each_value_1, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block_12(key, child_ctx)); + } + return { + key: key_1, + first: null, + c() { + tr = element2("tr"); + if (if_block) if_block.c(); + t0 = space2(); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + t1 = space2(); + this.first = tr; + }, + m(target, anchor) { + insert2(target, tr, anchor); + if (if_block) if_block.m(tr, null); + append2(tr, t0); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(tr, null); + } + append2(tr, t1); + current = true; + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if ( + /*showWeekNums*/ + ctx[1] + ) { + if (if_block) { + if_block.p(ctx, dirty); + if (dirty & /*showWeekNums*/ + 2) { + transition_in2(if_block, 1); + } + } else { + if_block = create_if_block3(ctx); + if_block.c(); + transition_in2(if_block, 1); + if_block.m(tr, t0); + } + } else if (if_block) { + group_outros2(); + transition_out2(if_block, 1, 1, () => { + if_block = null; + }); + check_outros2(); + } + if (dirty & /*month, today, displayedMonth, onClickDay, onContextMenuDay, onHoverDay, getDailyMetadata, sources, selectedId*/ + 18261) { + each_value_1 = /*week*/ + ctx[18].days; + group_outros2(); + each_blocks = update_keyed_each2(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, tr, outro_and_destroy_block, create_each_block_12, t1, get_each_context_12); + check_outros2(); + } + }, + i(local) { + if (current) return; + transition_in2(if_block); + for (let i = 0; i < each_value_1.length; i += 1) { + transition_in2(each_blocks[i]); + } + current = true; + }, + o(local) { + transition_out2(if_block); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out2(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) detach2(tr); + if (if_block) if_block.d(); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} +function create_fragment3(ctx) { + let div; + let nav; + let t0; + let table; + let colgroup; + let t1; + let t2; + let thead; + let tr; + let t3; + let t4; + let tbody; + let each_blocks = []; + let each2_lookup = /* @__PURE__ */ new Map(); + let current; + nav = new Nav({ + props: { + today: ( + /*today*/ + ctx[10] + ), + displayedMonth: ( + /*displayedMonth*/ + ctx[0] + ), + incrementDisplayedMonth: ( + /*incrementDisplayedMonth*/ + ctx[11] + ), + decrementDisplayedMonth: ( + /*decrementDisplayedMonth*/ + ctx[12] + ), + resetDisplayedMonth: ( + /*resetDisplayedMonth*/ + ctx[13] + ) + } + }); + let if_block0 = ( + /*showWeekNums*/ + ctx[1] && create_if_block_22() + ); + let each_value_3 = ( + /*month*/ + ctx[14][1].days + ); + let each_blocks_2 = []; + for (let i = 0; i < each_value_3.length; i += 1) { + each_blocks_2[i] = create_each_block_32(get_each_context_32(ctx, each_value_3, i)); + } + let if_block1 = ( + /*showWeekNums*/ + ctx[1] && create_if_block_13() + ); + let each_value_2 = ( + /*daysOfWeek*/ + ctx[15] + ); + let each_blocks_1 = []; + for (let i = 0; i < each_value_2.length; i += 1) { + each_blocks_1[i] = create_each_block_22(get_each_context_22(ctx, each_value_2, i)); + } + let each_value = ( + /*month*/ + ctx[14] + ); + const get_key = (ctx2) => ( + /*week*/ + ctx2[18].weekNum + ); + for (let i = 0; i < each_value.length; i += 1) { + let child_ctx = get_each_context3(ctx, each_value, i); + let key = get_key(child_ctx); + each2_lookup.set(key, each_blocks[i] = create_each_block3(key, child_ctx)); + } + return { + c() { + div = element2("div"); + create_component2(nav.$$.fragment); + t0 = space2(); + table = element2("table"); + colgroup = element2("colgroup"); + if (if_block0) if_block0.c(); + t1 = space2(); + for (let i = 0; i < each_blocks_2.length; i += 1) { + each_blocks_2[i].c(); + } + t2 = space2(); + thead = element2("thead"); + tr = element2("tr"); + if (if_block1) if_block1.c(); + t3 = space2(); + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].c(); + } + t4 = space2(); + tbody = element2("tbody"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr2(table, "class", "calendar svelte-pcimu8"); + attr2(div, "id", "calendar-container"); + attr2(div, "class", "container svelte-pcimu8"); + toggle_class2( + div, + "is-mobile", + /*isMobile*/ + ctx[16] + ); + }, + m(target, anchor) { + insert2(target, div, anchor); + mount_component2(nav, div, null); + append2(div, t0); + append2(div, table); + append2(table, colgroup); + if (if_block0) if_block0.m(colgroup, null); + append2(colgroup, t1); + for (let i = 0; i < each_blocks_2.length; i += 1) { + each_blocks_2[i].m(colgroup, null); + } + append2(table, t2); + append2(table, thead); + append2(thead, tr); + if (if_block1) if_block1.m(tr, null); + append2(tr, t3); + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].m(tr, null); + } + append2(table, t4); + append2(table, tbody); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(tbody, null); + } + current = true; + }, + p(ctx2, [dirty]) { + const nav_changes = {}; + if (dirty & /*today*/ + 1024) nav_changes.today = /*today*/ + ctx2[10]; + if (dirty & /*displayedMonth*/ + 1) nav_changes.displayedMonth = /*displayedMonth*/ + ctx2[0]; + nav.$set(nav_changes); + if ( + /*showWeekNums*/ + ctx2[1] + ) { + if (if_block0) ; + else { + if_block0 = create_if_block_22(); + if_block0.c(); + if_block0.m(colgroup, t1); + } + } else if (if_block0) { + if_block0.d(1); + if_block0 = null; + } + if (dirty & /*isWeekend, month*/ + 16384) { + each_value_3 = /*month*/ + ctx2[14][1].days; + let i; + for (i = 0; i < each_value_3.length; i += 1) { + const child_ctx = get_each_context_32(ctx2, each_value_3, i); + if (each_blocks_2[i]) { + each_blocks_2[i].p(child_ctx, dirty); + } else { + each_blocks_2[i] = create_each_block_32(child_ctx); + each_blocks_2[i].c(); + each_blocks_2[i].m(colgroup, null); + } + } + for (; i < each_blocks_2.length; i += 1) { + each_blocks_2[i].d(1); + } + each_blocks_2.length = each_value_3.length; + } + if ( + /*showWeekNums*/ + ctx2[1] + ) { + if (if_block1) ; + else { + if_block1 = create_if_block_13(); + if_block1.c(); + if_block1.m(tr, t3); + } + } else if (if_block1) { + if_block1.d(1); + if_block1 = null; + } + if (dirty & /*daysOfWeek*/ + 32768) { + each_value_2 = /*daysOfWeek*/ + ctx2[15]; + let i; + for (i = 0; i < each_value_2.length; i += 1) { + const child_ctx = get_each_context_22(ctx2, each_value_2, i); + if (each_blocks_1[i]) { + each_blocks_1[i].p(child_ctx, dirty); + } else { + each_blocks_1[i] = create_each_block_22(child_ctx); + each_blocks_1[i].c(); + each_blocks_1[i].m(tr, null); + } + } + for (; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].d(1); + } + each_blocks_1.length = each_value_2.length; + } + if (dirty & /*month, today, displayedMonth, onClickDay, onContextMenuDay, onHoverDay, getDailyMetadata, sources, selectedId, getWeeklyMetadata, onClickWeek, onContextMenuWeek, onHoverWeek, showWeekNums*/ + 18431) { + each_value = /*month*/ + ctx2[14]; + group_outros2(); + each_blocks = update_keyed_each2(each_blocks, dirty, get_key, 1, ctx2, each_value, each2_lookup, tbody, outro_and_destroy_block, create_each_block3, null, get_each_context3); + check_outros2(); + } + }, + i(local) { + if (current) return; + transition_in2(nav.$$.fragment, local); + for (let i = 0; i < each_value.length; i += 1) { + transition_in2(each_blocks[i]); + } + current = true; + }, + o(local) { + transition_out2(nav.$$.fragment, local); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out2(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) detach2(div); + destroy_component2(nav); + if (if_block0) if_block0.d(); + destroy_each(each_blocks_2, detaching); + if (if_block1) if_block1.d(); + destroy_each(each_blocks_1, detaching); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} +function instance3($$self, $$props, $$invalidate) { + let { localeData } = $$props; + let { showWeekNums = false } = $$props; + let { onHoverDay } = $$props; + let { onHoverWeek } = $$props; + let { onContextMenuDay } = $$props; + let { onContextMenuWeek } = $$props; + let { onClickDay } = $$props; + let { onClickWeek } = $$props; + let { sources = [] } = $$props; + let { selectedId } = $$props; + let { today = window.moment() } = $$props; + let { displayedMonth = today } = $$props; + let { onResetDisplayedMonth } = $$props; + let month; + let daysOfWeek; + let isMobile = window.app.isMobile; + function incrementDisplayedMonth() { + $$invalidate(0, displayedMonth = displayedMonth.clone().add(1, "month")); + } + function decrementDisplayedMonth() { + $$invalidate(0, displayedMonth = displayedMonth.clone().subtract(1, "month")); + } + function resetDisplayedMonth() { + const currentToday = window.moment(); + $$invalidate(10, today = currentToday); + $$invalidate(0, displayedMonth = currentToday.clone()); + if (is_function2(onResetDisplayedMonth)) onResetDisplayedMonth(currentToday.clone()); + } + $$self.$$set = ($$props2) => { + if ("localeData" in $$props2) $$invalidate(17, localeData = $$props2.localeData); + if ("showWeekNums" in $$props2) $$invalidate(1, showWeekNums = $$props2.showWeekNums); + if ("onHoverDay" in $$props2) $$invalidate(2, onHoverDay = $$props2.onHoverDay); + if ("onHoverWeek" in $$props2) $$invalidate(3, onHoverWeek = $$props2.onHoverWeek); + if ("onContextMenuDay" in $$props2) $$invalidate(4, onContextMenuDay = $$props2.onContextMenuDay); + if ("onContextMenuWeek" in $$props2) $$invalidate(5, onContextMenuWeek = $$props2.onContextMenuWeek); + if ("onClickDay" in $$props2) $$invalidate(6, onClickDay = $$props2.onClickDay); + if ("onClickWeek" in $$props2) $$invalidate(7, onClickWeek = $$props2.onClickWeek); + if ("sources" in $$props2) $$invalidate(8, sources = $$props2.sources); + if ("selectedId" in $$props2) $$invalidate(9, selectedId = $$props2.selectedId); + if ("today" in $$props2) $$invalidate(10, today = $$props2.today); + if ("displayedMonth" in $$props2) $$invalidate(0, displayedMonth = $$props2.displayedMonth); + if ("onResetDisplayedMonth" in $$props2) $$invalidate(18, onResetDisplayedMonth = $$props2.onResetDisplayedMonth); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*displayedMonth, localeData*/ + 131073) { + $$invalidate(14, month = getMonth(displayedMonth, localeData)); + } + if ($$self.$$.dirty & /*today, localeData*/ + 132096) { + $$invalidate(15, daysOfWeek = getDaysOfWeek(today, localeData)); + } + }; + return [ + displayedMonth, + showWeekNums, + onHoverDay, + onHoverWeek, + onContextMenuDay, + onContextMenuWeek, + onClickDay, + onClickWeek, + sources, + selectedId, + today, + incrementDisplayedMonth, + decrementDisplayedMonth, + resetDisplayedMonth, + month, + daysOfWeek, + isMobile, + localeData, + onResetDisplayedMonth + ]; +} +var Calendar = class extends SvelteComponent2 { + constructor(options) { + super(); + if (!document.getElementById("svelte-pcimu8-style")) add_css(); + init2(this, options, instance3, create_fragment3, not_equal2, { + localeData: 17, + showWeekNums: 1, + onHoverDay: 2, + onHoverWeek: 3, + onContextMenuDay: 4, + onContextMenuWeek: 5, + onClickDay: 6, + onClickWeek: 7, + sources: 8, + selectedId: 9, + today: 10, + displayedMonth: 0, + onResetDisplayedMonth: 18, + incrementDisplayedMonth: 11, + decrementDisplayedMonth: 12, + resetDisplayedMonth: 13 + }); + } + get incrementDisplayedMonth() { + return this.$$.ctx[11]; + } + get decrementDisplayedMonth() { + return this.$$.ctx[12]; + } + get resetDisplayedMonth() { + return this.$$.ctx[13]; + } +}; +var langToMomentLocale = { + en: "en-gb", + zh: "zh-cn", + "zh-TW": "zh-tw", + ru: "ru", + ko: "ko", + it: "it", + id: "id", + ro: "ro", + "pt-BR": "pt-br", + cz: "cs", + da: "da", + de: "de", + es: "es", + fr: "fr", + no: "nn", + pl: "pl", + pt: "pt", + tr: "tr", + hi: "hi", + nl: "nl", + ar: "ar", + ja: "ja" +}; +var weekdays2 = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" +]; +function overrideGlobalMomentWeekStart(weekStart) { + const { moment } = window; + const currentLocale = moment.locale(); + if (!window._bundledLocaleWeekSpec) { + window._bundledLocaleWeekSpec = moment.localeData()._week; + } + if (weekStart === "locale") { + moment.updateLocale(currentLocale, { + week: window._bundledLocaleWeekSpec + }); + } else { + moment.updateLocale(currentLocale, { + week: { + dow: weekdays2.indexOf(weekStart) || 0 + } + }); + } +} +function configureGlobalMomentLocale(localeOverride = "system-default", weekStart = "locale") { + var _a; + const obsidianLang = localStorage.getItem("language") || "en"; + const systemLang = (_a = navigator.language) === null || _a === void 0 ? void 0 : _a.toLowerCase(); + let momentLocale = langToMomentLocale[obsidianLang]; + if (localeOverride !== "system-default") { + momentLocale = localeOverride; + } else if (systemLang.startsWith(obsidianLang)) { + momentLocale = systemLang; + } + const currentLocale = window.moment.locale(momentLocale); + console.debug(`[Calendar] Trying to switch Moment.js global locale to ${momentLocale}, got ${currentLocale}`); + overrideGlobalMomentWeekStart(weekStart); + return currentLocale; +} + +// src/ui/Calendar.svelte +function get_each_context4(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[35] = list[i]; + return child_ctx; +} +function create_if_block4(ctx) { + let section; + let div; + let span0; + let t0; + let t1; + let span1; + let t2_value = formatNoteCount2( + /*selectedNotes*/ + ctx[4].length + ) + ""; + let t2; + let t3; + function select_block_type(ctx2, dirty) { + if ( + /*selectedNotes*/ + ctx2[4].length + ) return create_if_block_14; + return create_else_block4; + } + let current_block_type = select_block_type(ctx, [-1, -1]); + let if_block = current_block_type(ctx); + return { + c() { + section = element("section"); + div = element("div"); + span0 = element("span"); + t0 = text( + /*panelLabel*/ + ctx[5] + ); + t1 = space(); + span1 = element("span"); + t2 = text(t2_value); + t3 = space(); + if_block.c(); + attr(span1, "class", "calendar-note-count"); + attr(div, "class", "calendar-note-panel-header"); + attr(section, "class", "calendar-note-panel"); + }, + m(target, anchor) { + insert(target, section, anchor); + append(section, div); + append(div, span0); + append(span0, t0); + append(div, t1); + append(div, span1); + append(span1, t2); + append(section, t3); + if_block.m(section, null); + }, + p(ctx2, dirty) { + if (dirty[0] & /*panelLabel*/ + 32) set_data( + t0, + /*panelLabel*/ + ctx2[5] + ); + if (dirty[0] & /*selectedNotes*/ + 16 && t2_value !== (t2_value = formatNoteCount2( + /*selectedNotes*/ + ctx2[4].length + ) + "")) set_data(t2, t2_value); + if (current_block_type === (current_block_type = select_block_type(ctx2, dirty)) && if_block) { + if_block.p(ctx2, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx2); + if (if_block) { + if_block.c(); + if_block.m(section, null); + } + } + }, + d(detaching) { + if (detaching) detach(section); + if_block.d(); + } + }; +} +function create_else_block4(ctx) { + let div; + return { + c() { + div = element("div"); + div.textContent = "No notes"; + attr(div, "class", "calendar-note-empty"); + }, + m(target, anchor) { + insert(target, div, anchor); + }, + p: noop, + d(detaching) { + if (detaching) detach(div); + } + }; +} +function create_if_block_14(ctx) { + let ul; + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let each_value = ( + /*selectedNotes*/ + ctx[4] + ); + const get_key = (ctx2) => ( + /*note*/ + ctx2[35].path + ); + for (let i = 0; i < each_value.length; i += 1) { + let child_ctx = get_each_context4(ctx, each_value, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block4(key, child_ctx)); + } + return { + c() { + ul = element("ul"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr(ul, "class", "calendar-note-list"); + }, + m(target, anchor) { + insert(target, ul, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(ul, null); + } + } + }, + p(ctx2, dirty) { + if (dirty[0] & /*selectedNotes, handleOpenDayNote*/ + 32784) { + each_value = /*selectedNotes*/ + ctx2[4]; + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, ul, destroy_block, create_each_block4, null, get_each_context4); + } + }, + d(detaching) { + if (detaching) detach(ul); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} +function create_each_block4(key_1, ctx) { + let li; + let button; + let span0; + let t0_value = ( + /*note*/ + ctx[35].basename + "" + ); + let t0; + let t1; + let span1; + let t2_value = ( + /*note*/ + ctx[35].path + "" + ); + let t2; + let button_title_value; + let t3; + let mounted; + let dispose; + function click_handler(...args) { + return ( + /*click_handler*/ + ctx[32]( + /*note*/ + ctx[35], + ...args + ) + ); + } + return { + key: key_1, + first: null, + c() { + li = element("li"); + button = element("button"); + span0 = element("span"); + t0 = text(t0_value); + t1 = space(); + span1 = element("span"); + t2 = text(t2_value); + t3 = space(); + attr(span0, "class", "calendar-note-title"); + attr(span1, "class", "calendar-note-path"); + attr(button, "class", "calendar-note-list-item"); + attr(button, "type", "button"); + attr(button, "title", button_title_value = /*note*/ + ctx[35].path); + this.first = li; + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, button); + append(button, span0); + append(span0, t0); + append(button, t1); + append(button, span1); + append(span1, t2); + append(li, t3); + if (!mounted) { + dispose = listen(button, "click", click_handler); + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (dirty[0] & /*selectedNotes*/ + 16 && t0_value !== (t0_value = /*note*/ + ctx[35].basename + "")) set_data(t0, t0_value); + if (dirty[0] & /*selectedNotes*/ + 16 && t2_value !== (t2_value = /*note*/ + ctx[35].path + "")) set_data(t2, t2_value); + if (dirty[0] & /*selectedNotes*/ + 16 && button_title_value !== (button_title_value = /*note*/ + ctx[35].path)) { + attr(button, "title", button_title_value); + } + }, + d(detaching) { + if (detaching) detach(li); + mounted = false; + dispose(); + } + }; +} +function create_fragment4(ctx) { + let calendarbase; + let updating_displayedMonth; + let t; + let if_block_anchor; + let current; + function calendarbase_displayedMonth_binding(value) { + ctx[31](value); + } + let calendarbase_props = { + sources: ( + /*sources*/ + ctx[1] + ), + today: ( + /*today*/ + ctx[2] + ), + onHoverDay: ( + /*handleHoverDay*/ + ctx[11] + ), + onHoverWeek: ( + /*handleHoverWeek*/ + ctx[12] + ), + onContextMenuDay: ( + /*handleContextMenuDay*/ + ctx[13] + ), + onContextMenuWeek: ( + /*handleContextMenuWeek*/ + ctx[14] + ), + onClickDay: ( + /*handleClickDay*/ + ctx[8] + ), + onClickWeek: ( + /*handleClickWeek*/ + ctx[9] + ), + onResetDisplayedMonth: ( + /*handleResetDisplayedMonth*/ + ctx[10] + ), + localeData: ( + /*today*/ + ctx[2].localeData() + ), + selectedId: ( + /*$activeFile*/ + ctx[7] + ), + showWeekNums: ( + /*$settings*/ + ctx[3].showWeeklyNote + ) + }; + if ( + /*displayedMonth*/ + ctx[0] !== void 0 + ) { + calendarbase_props.displayedMonth = /*displayedMonth*/ + ctx[0]; + } + calendarbase = new Calendar({ props: calendarbase_props }); + binding_callbacks.push(() => bind(calendarbase, "displayedMonth", calendarbase_displayedMonth_binding)); + let if_block = ( + /*hasSelection*/ + ctx[6] && create_if_block4(ctx) + ); + return { + c() { + create_component(calendarbase.$$.fragment); + t = space(); + if (if_block) if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + mount_component(calendarbase, target, anchor); + insert(target, t, anchor); + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx2, dirty) { + const calendarbase_changes = {}; + if (dirty[0] & /*sources*/ + 2) calendarbase_changes.sources = /*sources*/ + ctx2[1]; + if (dirty[0] & /*today*/ + 4) calendarbase_changes.today = /*today*/ + ctx2[2]; + if (dirty[0] & /*today*/ + 4) calendarbase_changes.localeData = /*today*/ + ctx2[2].localeData(); + if (dirty[0] & /*$activeFile*/ + 128) calendarbase_changes.selectedId = /*$activeFile*/ + ctx2[7]; + if (dirty[0] & /*$settings*/ + 8) calendarbase_changes.showWeekNums = /*$settings*/ + ctx2[3].showWeeklyNote; + if (!updating_displayedMonth && dirty[0] & /*displayedMonth*/ + 1) { + updating_displayedMonth = true; + calendarbase_changes.displayedMonth = /*displayedMonth*/ + ctx2[0]; + add_flush_callback(() => updating_displayedMonth = false); + } + calendarbase.$set(calendarbase_changes); + if ( + /*hasSelection*/ + ctx2[6] + ) { + if (if_block) { + if_block.p(ctx2, dirty); + } else { + if_block = create_if_block4(ctx2); + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + i(local) { + if (current) return; + transition_in(calendarbase.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(calendarbase.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(calendarbase, detaching); + if (detaching) detach(t); + if (if_block) if_block.d(detaching); + if (detaching) detach(if_block_anchor); + } + }; +} +function formatNoteCount2(count) { + return `${count} note${count === 1 ? "" : "s"}`; +} +function instance4($$self, $$props, $$invalidate) { + let $dailyNotes; + let $dailyNotesByDate; + let $weeklyNotes; + let $weeklyNotesByDate; + let $settings; + let $activeFile; + component_subscribe($$self, dailyNotes, ($$value) => $$invalidate(27, $dailyNotes = $$value)); + component_subscribe($$self, dailyNotesByDate, ($$value) => $$invalidate(28, $dailyNotesByDate = $$value)); + component_subscribe($$self, weeklyNotes, ($$value) => $$invalidate(29, $weeklyNotes = $$value)); + component_subscribe($$self, weeklyNotesByDate, ($$value) => $$invalidate(30, $weeklyNotesByDate = $$value)); + component_subscribe($$self, settings, ($$value) => $$invalidate(3, $settings = $$value)); + component_subscribe($$self, activeFile, ($$value) => $$invalidate(7, $activeFile = $$value)); + let today = null; + let selectedDate = null; + let selectedWeek = null; + let selectionMode = "day"; + let selectedNotes = []; + let panelLabel = ""; + let hasSelection = false; + let { displayedMonth = null } = $$props; + let { sources } = $$props; + let { onHoverDay } = $$props; + let { onHoverWeek } = $$props; + let { onClickDay } = $$props; + let { onClickWeek } = $$props; + let { onContextMenuDay } = $$props; + let { onContextMenuWeek } = $$props; + let { onOpenDayNote } = $$props; + function tick2() { + $$invalidate(2, today = window.moment()); + } + function getToday(settings2) { + configureGlobalMomentLocale(settings2.localeOverride, settings2.weekStart); + dailyNotes.reindex(); + weeklyNotes.reindex(); + return window.moment(); + } + let heartbeat = setInterval( + () => { + tick2(); + const isViewingCurrentMonth = displayedMonth.isSame(today, "day"); + if (isViewingCurrentMonth) { + $$invalidate(0, displayedMonth = today); + } + }, + 1e3 * 60 + ); + onDestroy(() => { + clearInterval(heartbeat); + }); + function handleClickDay(date, isMetaPressed2) { + $$invalidate(26, selectionMode = "day"); + $$invalidate(24, selectedDate = date.clone()); + void onClickDay(date, isMetaPressed2); + } + function handleClickWeek(date, isMetaPressed2) { + $$invalidate(26, selectionMode = "week"); + $$invalidate(25, selectedWeek = date.clone()); + void onClickWeek(date, isMetaPressed2); + } + function handleResetDisplayedMonth(date) { + $$invalidate(2, today = date.clone()); + $$invalidate(0, displayedMonth = date.clone()); + $$invalidate(26, selectionMode = "day"); + $$invalidate(25, selectedWeek = null); + $$invalidate(24, selectedDate = date.clone()); + const todaysNotes = getDailyNotesForDate(date, $dailyNotesByDate, $dailyNotes); + if (todaysNotes.length === 1) { + void onOpenDayNote(todaysNotes[0], false); + } + } + function handleHoverDay(date, targetEl, isMetaPressed2) { + onHoverDay(date, targetEl, isMetaPressed2 !== null && isMetaPressed2 !== void 0 ? isMetaPressed2 : false); + } + function handleHoverWeek(date, targetEl, isMetaPressed2) { + onHoverWeek(date, targetEl, isMetaPressed2 !== null && isMetaPressed2 !== void 0 ? isMetaPressed2 : false); + } + function handleContextMenuDay(date, event) { + onContextMenuDay(date, event); + return true; + } + function handleContextMenuWeek(date, event) { + onContextMenuWeek(date, event); + return true; + } + function handleOpenDayNote(event, file) { + event.preventDefault(); + void onOpenDayNote(file, event.metaKey || event.ctrlKey); + } + function calendarbase_displayedMonth_binding(value) { + displayedMonth = value; + $$invalidate(0, displayedMonth), $$invalidate(2, today), $$invalidate(3, $settings); + } + const click_handler = (note, event) => handleOpenDayNote(event, note); + $$self.$$set = ($$props2) => { + if ("displayedMonth" in $$props2) $$invalidate(0, displayedMonth = $$props2.displayedMonth); + if ("sources" in $$props2) $$invalidate(1, sources = $$props2.sources); + if ("onHoverDay" in $$props2) $$invalidate(16, onHoverDay = $$props2.onHoverDay); + if ("onHoverWeek" in $$props2) $$invalidate(17, onHoverWeek = $$props2.onHoverWeek); + if ("onClickDay" in $$props2) $$invalidate(18, onClickDay = $$props2.onClickDay); + if ("onClickWeek" in $$props2) $$invalidate(19, onClickWeek = $$props2.onClickWeek); + if ("onContextMenuDay" in $$props2) $$invalidate(20, onContextMenuDay = $$props2.onContextMenuDay); + if ("onContextMenuWeek" in $$props2) $$invalidate(21, onContextMenuWeek = $$props2.onContextMenuWeek); + if ("onOpenDayNote" in $$props2) $$invalidate(22, onOpenDayNote = $$props2.onOpenDayNote); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty[0] & /*$settings*/ + 8) { + $: $$invalidate(2, today = getToday($settings)); + } + if ($$self.$$.dirty[0] & /*displayedMonth, today*/ + 5) { + $: if (!displayedMonth && today) { + $$invalidate(0, displayedMonth = today.clone()); + } + } + if ($$self.$$.dirty[0] & /*selectedDate, today*/ + 16777220) { + $: if (!selectedDate && today) { + $$invalidate(24, selectedDate = today.clone()); + } + } + if ($$self.$$.dirty[0] & /*selectionMode, selectedWeek, $weeklyNotesByDate, $weeklyNotes, selectedDate, $dailyNotesByDate, $dailyNotes*/ + 2130706432) { + $: $$invalidate(4, selectedNotes = selectionMode === "week" && selectedWeek ? getWeeklyNotesForDate(selectedWeek, $weeklyNotesByDate, $weeklyNotes) : selectedDate ? getDailyNotesForDate(selectedDate, $dailyNotesByDate, $dailyNotes) : []); + } + if ($$self.$$.dirty[0] & /*selectionMode, selectedWeek, selectedDate*/ + 117440512) { + $: $$invalidate(6, hasSelection = selectionMode === "week" ? !!selectedWeek : !!selectedDate); + } + if ($$self.$$.dirty[0] & /*selectionMode, selectedWeek, selectedDate*/ + 117440512) { + $: $$invalidate(5, panelLabel = selectionMode === "week" && selectedWeek ? `${selectedWeek.format("GGGG")} \xB7 ${selectedWeek.format("[W]WW")}` : selectedDate ? selectedDate.format("LL") : ""); + } + }; + return [ + displayedMonth, + sources, + today, + $settings, + selectedNotes, + panelLabel, + hasSelection, + $activeFile, + handleClickDay, + handleClickWeek, + handleResetDisplayedMonth, + handleHoverDay, + handleHoverWeek, + handleContextMenuDay, + handleContextMenuWeek, + handleOpenDayNote, + onHoverDay, + onHoverWeek, + onClickDay, + onClickWeek, + onContextMenuDay, + onContextMenuWeek, + onOpenDayNote, + tick2, + selectedDate, + selectedWeek, + selectionMode, + $dailyNotes, + $dailyNotesByDate, + $weeklyNotes, + $weeklyNotesByDate, + calendarbase_displayedMonth_binding, + click_handler + ]; +} +var Calendar2 = class extends SvelteComponent { + constructor(options) { + super(); + init( + this, + options, + instance4, + create_fragment4, + not_equal, + { + displayedMonth: 0, + sources: 1, + onHoverDay: 16, + onHoverWeek: 17, + onClickDay: 18, + onClickWeek: 19, + onContextMenuDay: 20, + onContextMenuWeek: 21, + onOpenDayNote: 22, + tick: 23 + }, + null, + [-1, -1] + ); + } + get tick() { + return this.$$.ctx[23]; + } +}; +var Calendar_default = Calendar2; + +// src/ui/fileMenu.ts +var import_obsidian8 = require("obsidian"); +function showFileMenu(app, file, position) { + const fileMenu = new import_obsidian8.Menu(); + fileMenu.addItem( + (item) => item.setTitle("Delete").setIcon("trash").onClick(() => { + app.fileManager.promptForFileDeletion(file); + }) + ); + app.workspace.trigger( + "file-menu", + fileMenu, + file, + "calendar-context-menu", + null + ); + fileMenu.showAtPosition(position); +} + +// src/ui/sources/streak.ts +var import_obsidian_daily_notes_interface6 = __toESM(require_obsidian_daily_notes_interface()); +var getStreakClasses = (file) => { + return classList({ + "has-note": !!file + }); +}; +var streakSource = { + getDailyMetadata: (date) => { + const file = (0, import_obsidian_daily_notes_interface6.getDailyNote)(date, get_store_value(dailyNotes)); + return Promise.resolve({ + classes: getStreakClasses(file), + dots: [] + }); + }, + getWeeklyMetadata: (date) => { + const file = getWeeklyNote(date, get_store_value(weeklyNotes)); + return Promise.resolve({ + classes: getStreakClasses(file), + dots: [] + }); + } +}; + +// src/ui/sources/tags.ts +var import_obsidian9 = require("obsidian"); +var import_obsidian_daily_notes_interface7 = __toESM(require_obsidian_daily_notes_interface()); +function getNoteTags(note) { + var _a; + if (!note) { + return []; + } + const { metadataCache } = window.app; + const frontmatter = (_a = metadataCache.getFileCache(note)) == null ? void 0 : _a.frontmatter; + const tags = []; + if (frontmatter) { + const frontmatterTags = (0, import_obsidian9.parseFrontMatterTags)(frontmatter) || []; + tags.push(...frontmatterTags); + } + return tags.map((tag) => tag.substring(1)); +} +function getFormattedTagAttributes(note) { + const attrs = {}; + const tags = getNoteTags(note); + const [emojiTags, nonEmojiTags] = partition( + tags, + (tag) => /(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/.test( + tag + ) + ); + if (nonEmojiTags) { + attrs["data-tags"] = nonEmojiTags.join(" "); + } + if (emojiTags) { + attrs["data-emoji-tag"] = emojiTags[0]; + } + return attrs; +} +var customTagsSource = { + getDailyMetadata: (date) => { + const file = (0, import_obsidian_daily_notes_interface7.getDailyNote)(date, get_store_value(dailyNotes)); + return Promise.resolve({ + dataAttributes: getFormattedTagAttributes(file), + dots: [] + }); + }, + getWeeklyMetadata: (date) => { + const file = getWeeklyNote(date, get_store_value(weeklyNotes)); + return Promise.resolve({ + dataAttributes: getFormattedTagAttributes(file), + dots: [] + }); + } +}; + +// src/ui/sources/tasks.ts +var import_obsidian_daily_notes_interface8 = __toESM(require_obsidian_daily_notes_interface()); +async function getNumberOfRemainingTasks(note) { + if (!note) { + return 0; + } + const { vault } = window.app; + const fileContents = await vault.cachedRead(note); + return (fileContents.match(/(-|\*) \[ \]/g) || []).length; +} +async function getDotsForDailyNote(dailyNote) { + if (!dailyNote) { + return []; + } + const numTasks = await getNumberOfRemainingTasks(dailyNote); + const dots = []; + if (numTasks) { + dots.push({ + className: "task", + color: "default", + isFilled: false + }); + } + return dots; +} +var tasksSource = { + getDailyMetadata: async (date) => { + const file = (0, import_obsidian_daily_notes_interface8.getDailyNote)(date, get_store_value(dailyNotes)); + const dots = await getDotsForDailyNote(file); + return { + dots + }; + }, + getWeeklyMetadata: async (date) => { + const file = getWeeklyNote(date, get_store_value(weeklyNotes)); + const dots = await getDotsForDailyNote(file); + return { + dots + }; + } +}; + +// src/ui/sources/noteCount.ts +var NUM_MAX_DOTS = 5; +function getNoteCountAsDots(noteCount) { + const numSolidDots = Math.min(Math.max(noteCount, 0), NUM_MAX_DOTS); + const dots = []; + for (let i = 0; i < numSolidDots; i++) { + dots.push({ + color: "default", + isFilled: true + }); + } + return dots; +} +var noteCountSource = { + getDailyMetadata: (date) => { + const notes = getDailyNotesForDate( + date, + get_store_value(dailyNotesByDate), + get_store_value(dailyNotes) + ); + return Promise.resolve({ + dots: getNoteCountAsDots(notes.length) + }); + }, + getWeeklyMetadata: (date) => { + const notes = getWeeklyNotesForDate( + date, + get_store_value(weeklyNotesByDate), + get_store_value(weeklyNotes) + ); + return Promise.resolve({ + dots: getNoteCountAsDots(notes.length) + }); + } +}; + +// src/view.ts +var CalendarView = class extends import_obsidian10.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.calendar = null; + this.listPanel = null; + this.modeAction = null; + this.sources = []; + this.toggleMode = () => { + const next = this.getMode() === "calendar" ? "list" : "calendar"; + void this.plugin.writeOptions(() => ({ sidebarViewMode: next })); + this.renderMode(next); + }; + this.onHoverDay = (date, targetEl, isMetaPressed2) => { + if (!isMetaPressed2) { + return; + } + const { format } = (0, import_obsidian_daily_notes_interface9.getDailyNoteSettings)(); + const note = this.getDailyNotes(date)[0]; + this.app.workspace.trigger( + "link-hover", + this, + targetEl, + date.format(format), + note == null ? void 0 : note.path + ); + }; + this.onHoverWeek = (date, targetEl, isMetaPressed2) => { + if (!isMetaPressed2) { + return; + } + const note = getWeeklyNote(date, get_store_value(weeklyNotes)); + const { format } = getWeeklyNoteSettings(); + this.app.workspace.trigger( + "link-hover", + this, + targetEl, + date.format(format), + note == null ? void 0 : note.path + ); + }; + this.onContextMenuDay = (date, event) => { + const note = this.getDailyNotes(date)[0]; + if (!note) { + return; + } + showFileMenu(this.app, note, { + x: event.pageX, + y: event.pageY + }); + }; + this.onContextMenuWeek = (date, event) => { + const note = getWeeklyNote(date, get_store_value(weeklyNotes)); + if (!note) { + return; + } + showFileMenu(this.app, note, { + x: event.pageX, + y: event.pageY + }); + }; + this.onNoteSettingsUpdate = () => { + dailyNotes.reindex(); + weeklyNotes.reindex(); + this.updateActiveFile(); + }; + this.onFileDeleted = (file) => { + var _a; + const refreshedDaily = this.refreshCustomDailyNoteIndex(file); + if (!(file instanceof import_obsidian10.TFile)) { + return; + } + if (!refreshedDaily && getDayDateFromFile(file)) { + dailyNotes.reindex(); + this.updateActiveFile(); + } + if (((_a = this.settings) == null ? void 0 : _a.shouldIndexWeeklyNotesInAllFolders) || getWeekDateFromFile(file)) { + weeklyNotes.reindex(); + this.updateActiveFile(); + } + }; + this.onFileModified = (file) => { + var _a; + const refreshedDaily = this.refreshCustomDailyNoteIndex(file); + if (!(file instanceof import_obsidian10.TFile)) { + return; + } + if ((_a = this.settings) == null ? void 0 : _a.shouldIndexWeeklyNotesInAllFolders) { + weeklyNotes.reindex(); + if (this.calendar) { + this.calendar.tick(); + } + return; + } + if (refreshedDaily) { + return; + } + const date = getDayDateFromFile(file) || getWeekDateFromFile(file); + if (date && this.calendar) { + this.calendar.tick(); + } + }; + this.onMetadataChanged = (file) => { + var _a, _b, _c; + if ((_a = this.settings) == null ? void 0 : _a.shouldIndexDailyNotesFromFrontmatter) { + this.refreshCustomDailyNoteIndex(file); + } + if (((_b = this.settings) == null ? void 0 : _b.shouldIndexWeeklyNotesInAllFolders) && ((_c = this.settings) == null ? void 0 : _c.shouldIndexWeeklyNotesFromFrontmatter)) { + weeklyNotes.reindex(); + if (this.calendar) { + this.calendar.tick(); + } + } + }; + this.onFileCreated = (file) => { + var _a; + if (!this.app.workspace.layoutReady || !(this.calendar || this.listPanel)) { + return; + } + const refreshedDaily = this.refreshCustomDailyNoteIndex(file); + if (!(file instanceof import_obsidian10.TFile)) { + return; + } + if (!refreshedDaily && getDayDateFromFile(file)) { + dailyNotes.reindex(); + if (this.calendar) { + this.calendar.tick(); + } + } + if (((_a = this.settings) == null ? void 0 : _a.shouldIndexWeeklyNotesInAllFolders) || getWeekDateFromFile(file)) { + weeklyNotes.reindex(); + if (this.calendar) { + this.calendar.tick(); + } + } + }; + this.onFileRenamed = (file, oldPath) => { + if (this.app.workspace.layoutReady && (this.calendar || this.listPanel) && (this.isMarkdownFile(file) || oldPath.endsWith(".md"))) { + dailyNotes.reindex(); + weeklyNotes.reindex(); + this.updateActiveFile(); + if (this.calendar) { + this.calendar.tick(); + } + } + }; + this.onFileOpen = () => { + if (this.app.workspace.layoutReady) { + this.updateActiveFile(); + } + }; + this.openOrCreateWeeklyNote = async (date, inNewSplit) => { + const existingFiles = this.getWeeklyNotes(date); + if (!existingFiles.length) { + const startOfWeek = date.clone().startOf("week"); + void tryToCreateWeeklyNote( + startOfWeek, + inNewSplit, + this.settings, + (file) => { + activeFile.setFile(file); + } + ); + return; + } + if (existingFiles.length > 1) { + return; + } + await this.openDailyNoteFile(existingFiles[0], inNewSplit); + }; + this.openOrCreateDailyNote = async (date, inNewSplit) => { + const existingFiles = this.getDailyNotes(date); + if (!existingFiles.length) { + void tryToCreateDailyNote( + date, + inNewSplit, + this.settings, + (dailyNote) => { + activeFile.setFile(dailyNote); + } + ); + return; + } + if (existingFiles.length > 1) { + return; + } + await this.openDailyNoteFile(existingFiles[0], inNewSplit); + }; + this.openDailyNoteFile = async (existingFile, inNewSplit) => { + const { workspace } = this.app; + const leaf = workspace.getLeaf(inNewSplit ? "split" : false); + await leaf.openFile(existingFile, { active: true }); + activeFile.setFile(existingFile); + }; + this.plugin = plugin; + this.registerEvent( + this.app.workspace.on( + "periodic-notes:settings-updated", + this.onNoteSettingsUpdate + ) + ); + this.registerEvent(this.app.vault.on("create", this.onFileCreated)); + this.registerEvent(this.app.vault.on("delete", this.onFileDeleted)); + this.registerEvent(this.app.vault.on("modify", this.onFileModified)); + this.registerEvent(this.app.vault.on("rename", this.onFileRenamed)); + this.registerEvent( + this.app.metadataCache.on("changed", this.onMetadataChanged) + ); + this.registerEvent(this.app.workspace.on("file-open", this.onFileOpen)); + this.settings = null; + settings.subscribe((val) => { + this.settings = val; + if (this.calendar) { + this.calendar.tick(); + } + }); + } + getViewType() { + return VIEW_TYPE_CALENDAR; + } + getDisplayText() { + return "Calendar Hub"; + } + getIcon() { + return "calendar-with-checkmark"; + } + onClose() { + this.destroyModeComponents(); + return Promise.resolve(); + } + onOpen() { + this.contentEl.addClass("calendar-hub-view-content"); + this.modeAction = this.addAction( + "list", + "Switch to list view", + this.toggleMode + ); + this.sources = [ + customTagsSource, + streakSource, + noteCountSource, + tasksSource + ]; + this.app.workspace.trigger(TRIGGER_ON_OPEN, this.sources); + this.renderMode(this.getMode()); + return Promise.resolve(); + } + getMode() { + var _a; + return ((_a = this.settings) == null ? void 0 : _a.sidebarViewMode) === "list" ? "list" : "calendar"; + } + destroyModeComponents() { + var _a, _b; + (_a = this.calendar) == null ? void 0 : _a.$destroy(); + this.calendar = null; + (_b = this.listPanel) == null ? void 0 : _b.$destroy(); + this.listPanel = null; + } + /** Renders the pane in place: the same leaf flips between the calendar and + * the list, so browsing does not require a second pane. */ + renderMode(mode) { + this.destroyModeComponents(); + this.contentEl.empty(); + const navButton = this.contentEl.createDiv("nav-header calendar-hub-nav").createDiv("nav-buttons-container").createDiv({ + cls: "clickable-icon nav-action-button", + attr: { + "aria-label": mode === "calendar" ? "Switch to list view" : "Switch to calendar view" + } + }); + (0, import_obsidian10.setIcon)(navButton, mode === "calendar" ? "list" : "calendar"); + navButton.addEventListener("click", this.toggleMode); + if (mode === "list") { + this.listPanel = new ListPanel_default({ + target: this.contentEl, + props: { + onOpenNote: this.openDailyNoteFile, + onUpdateSettings: (changeOpts) => this.plugin.writeOptions(changeOpts) + } + }); + } else { + this.calendar = new Calendar_default({ + target: this.contentEl, + props: { + onClickDay: this.openOrCreateDailyNote, + onClickWeek: this.openOrCreateWeeklyNote, + onHoverDay: this.onHoverDay, + onHoverWeek: this.onHoverWeek, + onContextMenuDay: this.onContextMenuDay, + onContextMenuWeek: this.onContextMenuWeek, + onOpenDayNote: this.openDailyNoteFile, + sources: this.sources + } + }); + } + if (this.modeAction) { + const title = mode === "calendar" ? "Switch to list view" : "Switch to calendar view"; + (0, import_obsidian10.setIcon)(this.modeAction, mode === "calendar" ? "list" : "calendar"); + this.modeAction.setAttribute("aria-label", title); + } + } + updateActiveFile() { + var _a; + const view = this.app.workspace.getActiveViewOfType(import_obsidian10.FileView); + activeFile.setFile((_a = view == null ? void 0 : view.file) != null ? _a : null); + if (this.calendar) { + this.calendar.tick(); + } + } + revealActiveNote() { + const { moment } = window; + const view = this.app.workspace.getActiveViewOfType(import_obsidian10.FileView); + if (!(view == null ? void 0 : view.file)) { + return; + } + if (!this.calendar) { + void this.plugin.writeOptions(() => ({ sidebarViewMode: "calendar" })); + this.renderMode("calendar"); + } + if (!this.calendar) { + return; + } + let date = getDayDateFromFile(view.file); + if (date) { + this.calendar.$set({ displayedMonth: date }); + return; + } + const { format } = getWeeklyNoteSettings(); + date = moment(view.file.basename, format, true); + if (date.isValid()) { + this.calendar.$set({ displayedMonth: date }); + } + } + getWeeklyNotes(date) { + return getWeeklyNotesForDate(date, get_store_value(weeklyNotesByDate), get_store_value(weeklyNotes)); + } + getDailyNotes(date) { + return getDailyNotesForDate(date, get_store_value(dailyNotesByDate), get_store_value(dailyNotes)); + } + refreshCustomDailyNoteIndex(file) { + var _a; + if (!this.app.workspace.layoutReady || !(this.calendar || this.listPanel) || !((_a = this.settings) == null ? void 0 : _a.shouldIndexDailyNotesInAllFolders) || !this.isMarkdownFile(file)) { + return false; + } + dailyNotes.reindex(); + this.updateActiveFile(); + if (this.calendar) { + this.calendar.tick(); + } + return true; + } + isMarkdownFile(file) { + return file instanceof import_obsidian10.TFile && file.extension === "md"; + } +}; + +// src/main.ts +var CalendarPlugin = class extends import_obsidian11.Plugin { + async onload() { + this.register( + settings.subscribe((value) => { + this.options = value; + }) + ); + this.registerView(VIEW_TYPE_CALENDAR, (leaf) => { + return new CalendarView(leaf, this); + }); + this.registerView(VIEW_TYPE_LIST, (leaf) => { + return new ListView(leaf, this); + }); + this.addCommand({ + id: "show-list-view", + name: "Open list view", + callback: () => this.initListLeaf() + }); + this.addCommand({ + id: "show-calendar-view", + name: "Open calendar view", + checkCallback: (checking) => { + if (checking) { + return this.app.workspace.getLeavesOfType(VIEW_TYPE_CALENDAR).length === 0; + } + this.initLeaf(); + } + }); + this.addCommand({ + id: "open-weekly-note", + name: "Open weekly note", + checkCallback: (checking) => { + if (checking) { + return !appHasPeriodicNotesPluginLoaded(); + } + const view = this.getCalendarView(); + if (view) { + void view.openOrCreateWeeklyNote(window.moment(), false); + } + } + }); + this.addCommand({ + id: "reveal-active-note", + name: "Reveal active note in calendar", + callback: () => { + var _a; + return (_a = this.getCalendarView()) == null ? void 0 : _a.revealActiveNote(); + } + }); + await this.loadOptions(); + this.addSettingTab(new CalendarSettingsTab(this.app, this)); + this.app.workspace.onLayoutReady(() => this.initLeaf()); + } + initListLeaf() { + var _a; + const existing = this.app.workspace.getLeavesOfType(VIEW_TYPE_LIST); + if (existing.length) { + void this.app.workspace.revealLeaf(existing[0]); + return; + } + void ((_a = this.app.workspace.getRightLeaf(false)) == null ? void 0 : _a.setViewState({ + type: VIEW_TYPE_LIST, + active: true + })); + } + initLeaf() { + if (this.app.workspace.getLeavesOfType(VIEW_TYPE_CALENDAR).length) { + return; + } + const leaf = this.app.workspace.getRightLeaf(false); + if (!leaf) { + return; + } + void leaf.setViewState({ + type: VIEW_TYPE_CALENDAR + }); + } + getCalendarView() { + const leaf = this.app.workspace.getLeavesOfType(VIEW_TYPE_CALENDAR)[0]; + return (leaf == null ? void 0 : leaf.view) instanceof CalendarView ? leaf.view : null; + } + async loadOptions() { + const options = await this.loadData(); + settings.update((old) => { + return { + ...old, + ...options || {} + }; + }); + await this.saveData(this.options); + } + async writeOptions(changeOpts) { + settings.update((old) => ({ ...old, ...changeOpts(old) })); + await this.saveData(this.options); + dailyNotes.reindex(); + weeklyNotes.reindex(); + } +}; + +/* nosourcemap */ \ No newline at end of file diff --git a/main/.obsidian/plugins/calendar-hub/manifest.json b/main/.obsidian/plugins/calendar-hub/manifest.json new file mode 100644 index 0000000..16be74f --- /dev/null +++ b/main/.obsidian/plugins/calendar-hub/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "calendar-hub", + "name": "Calendar Hub", + "description": "See every note from a given day in one calendar view — daily notes, meeting notes, logs — no matter which folder they live in.", + "version": "0.2.2", + "author": "HWY1dot0", + "authorUrl": "https://github.com/HWY1dot0", + "fundingUrl": "https://www.buymeacoffee.com/hwy1dot0", + "isDesktopOnly": false, + "minAppVersion": "1.7.2" +} diff --git a/main/.obsidian/plugins/calendar-hub/styles.css b/main/.obsidian/plugins/calendar-hub/styles.css new file mode 100644 index 0000000..195ceb3 --- /dev/null +++ b/main/.obsidian/plugins/calendar-hub/styles.css @@ -0,0 +1,428 @@ +.settings-banner { + background-color: var(--background-secondary-alt); + border-radius: 4px; + margin-bottom: 2em; + padding: 1.5em; + text-align: left; +} + +.settings-banner-title { + font-weight: var(--font-bold); + margin: 0 0 0.5em; +} + +.calendar-note-panel { + border-top: 1px solid var(--background-modifier-border); + display: flex; + flex: 1; + flex-direction: column; + margin-top: 12px; + min-height: 0; + padding-top: 10px; +} + +.calendar-note-panel-header { + align-items: center; + color: var(--text-muted); + display: flex; + font-size: 12px; + gap: 8px; + justify-content: space-between; + line-height: 1.4; + margin-bottom: 8px; +} + +.calendar-note-count { + flex: 0 0 auto; +} + +.calendar-note-list { + display: flex; + flex: 1; + flex-direction: column; + gap: 6px; + list-style: none; + margin: 0; + min-height: 0; + overflow-y: auto; + padding: 0; + padding-right: 2px; +} + +.calendar-note-list li { + margin: 0; + padding: 0; +} + +.calendar-note-list-item { + align-items: flex-start; + background: var(--background-secondary); + border: 1px solid var(--background-modifier-border); + border-radius: 4px; + box-shadow: none; + color: var(--text-normal); + cursor: pointer; + display: flex; + flex-direction: column; + font: inherit; + height: auto; + line-height: 1.35; + min-height: 0; + padding: 8px; + text-align: left; + transition: background-color 120ms ease, border-color 120ms ease; + white-space: normal; + width: 100%; +} + +.calendar-note-list-item:hover { + background: var(--background-modifier-hover); + border-color: var( + --background-modifier-border-hover, + var(--background-modifier-border) + ); +} + +.calendar-note-list-item:focus-visible { + outline: 2px solid var(--interactive-accent); + outline-offset: 2px; +} + +.calendar-note-title, +.calendar-note-path { + overflow-wrap: anywhere; +} + +.calendar-note-title { + color: var(--text-normal); + font-size: 13px; + font-weight: 500; +} + +.calendar-note-path, +.calendar-note-empty { + color: var(--text-muted); + font-size: 11px; +} + +.calendar-note-path { + margin-top: 2px; +} + +.calendar-note-empty { + padding: 4px 0; +} + +.calendar-filter-panel { + border-top: 1px solid var(--background-modifier-border); + margin-top: 10px; + padding-top: 8px; +} + +.calendar-filter-toggle { + align-items: center; + background: transparent; + border: 0; + border-radius: 4px; + box-shadow: none; + color: var(--text-muted); + cursor: pointer; + display: flex; + font: inherit; + font-size: 12px; + justify-content: space-between; + line-height: 1.4; + padding: 4px; + text-align: left; + width: 100%; +} + +.calendar-filter-toggle:hover { + background: var(--background-modifier-hover); + color: var(--text-normal); +} + +.calendar-filter-toggle:focus-visible, +.calendar-filter-action:focus-visible, +.calendar-filter-textarea:focus-visible { + outline: 2px solid var(--interactive-accent); + outline-offset: 2px; +} + +.calendar-filter-summary { + color: var(--text-faint); + flex: 0 0 auto; + margin-left: 8px; +} + +.calendar-filter-body { + margin-top: 6px; +} + +.calendar-filter-textarea { + background: var(--background-secondary); + border: 1px solid var(--background-modifier-border); + border-radius: 4px; + color: var(--text-normal); + font: inherit; + font-size: 12px; + line-height: 1.35; + min-height: 64px; + padding: 6px; + resize: vertical; + width: 100%; +} + +.calendar-filter-textarea::placeholder { + color: var(--text-faint); +} + +.calendar-folder-list { + border: 1px solid var(--background-modifier-border); + border-radius: 4px; + display: flex; + flex-direction: column; + gap: 2px; + margin-bottom: 6px; + max-height: 180px; + overflow-y: auto; + padding: 4px; +} + +.calendar-folder-row { + align-items: center; + border-radius: 4px; + display: flex; + gap: 2px; +} + +.calendar-folder-row:hover { + background: var(--background-modifier-hover); +} + +.calendar-folder-expand { + background: none; + border: none; + box-shadow: none; + color: var(--text-muted); + cursor: pointer; + flex-shrink: 0; + font-size: 10px; + height: 18px; + line-height: 18px; + padding: 0; + width: 16px; +} + +.calendar-folder-expand-spacer { + flex-shrink: 0; + width: 16px; +} + +.calendar-folder-option { + align-items: center; + cursor: pointer; + display: flex; + flex: 1; + font-size: 12px; + gap: 6px; + min-width: 0; + padding: 2px 4px 2px 0; +} + +.calendar-folder-option input[type="checkbox"] { + flex-shrink: 0; + margin: 0; +} + +.calendar-folder-path { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.calendar-list-controls { + display: flex; + gap: 6px; + margin-bottom: 6px; +} + +.calendar-hub-view-content { + display: flex; + flex-direction: column; + height: 100%; + min-height: 0; +} + +.calendar-hub-nav { + flex-shrink: 0; +} + +.calendar-hub-list-panel { + display: flex; + flex: 1; + flex-direction: column; + min-height: 0; +} + +.calendar-hub-list-panel .calendar-list-tree { + flex: 1; + max-height: none; +} + +.calendar-list-total { + align-self: center; + color: var(--text-faint); + flex-shrink: 0; + font-size: 11px; +} + +.calendar-list-filter-toggle { + margin-bottom: 6px; +} + +.calendar-settings-folder-tree { + margin: 0 0 18px; +} + +.calendar-settings-folder-tree .calendar-folder-list { + max-width: 480px; +} + +.calendar-list-filter-body { + margin-bottom: 6px; +} + +.calendar-list-select { + flex: 1; + font-size: 12px; + min-width: 0; +} + +.calendar-list-tree { + border: 1px solid var(--background-modifier-border); + border-radius: 4px; + display: flex; + flex-direction: column; + max-height: 320px; + overflow-y: auto; + padding: 4px; +} + +.calendar-list-group { + align-items: center; + background: none; + border: none; + border-radius: 4px; + box-shadow: none; + color: var(--text-normal); + cursor: pointer; + display: flex; + font: inherit; + font-size: 12px; + gap: 4px; + height: auto; + padding: 3px 4px; + text-align: left; + width: 100%; +} + +.calendar-list-group:hover { + background: var(--background-modifier-hover); +} + +.calendar-list-subgroup { + padding-left: 18px; +} + +.calendar-list-caret { + color: var(--text-muted); + flex-shrink: 0; + font-size: 10px; + width: 12px; +} + +.calendar-list-label { + flex: 1; + font-weight: 500; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.calendar-list-count { + color: var(--text-faint); + font-size: 11px; +} + +.calendar-list-days { + display: flex; + flex-direction: column; + gap: 1px; + padding-left: 18px; +} + +.calendar-list-days-nested { + padding-left: 32px; +} + +.calendar-list-day { + color: var(--text-muted); + font-size: 11px; + margin-top: 4px; + padding: 0 4px; +} + +.calendar-list-note { + background: none; + border: none; + border-radius: 4px; + box-shadow: none; + color: var(--text-normal); + cursor: pointer; + display: block; + font: inherit; + font-size: 12px; + height: auto; + overflow: hidden; + padding: 2px 4px; + text-align: left; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; +} + +.calendar-list-note:hover { + background: var(--background-modifier-hover); +} + +.calendar-filter-actions { + display: flex; + gap: 6px; + justify-content: flex-end; + margin-top: 6px; +} + +.calendar-filter-action { + background: var(--interactive-normal); + border: 1px solid var(--background-modifier-border); + border-radius: 4px; + box-shadow: none; + color: var(--text-normal); + cursor: pointer; + font: inherit; + font-size: 12px; + height: auto; + line-height: 1.4; + padding: 4px 8px; +} + +.calendar-filter-action:hover:not(:disabled) { + background: var(--interactive-hover); +} + +.calendar-filter-action:disabled { + cursor: default; + opacity: 0.55; +} diff --git a/main/.obsidian/plugins/calendar/data.json b/main/.obsidian/plugins/calendar/data.json new file mode 100644 index 0000000..4a8fff7 --- /dev/null +++ b/main/.obsidian/plugins/calendar/data.json @@ -0,0 +1,10 @@ +{ + "shouldConfirmBeforeCreate": true, + "weekStart": "monday", + "wordsPerDot": 250, + "showWeeklyNote": false, + "weeklyNoteFormat": "", + "weeklyNoteTemplate": "", + "weeklyNoteFolder": "", + "localeOverride": "system-default" +} \ No newline at end of file diff --git a/main/.obsidian/plugins/calendar/main.js b/main/.obsidian/plugins/calendar/main.js new file mode 100644 index 0000000..ed6cea3 --- /dev/null +++ b/main/.obsidian/plugins/calendar/main.js @@ -0,0 +1,4459 @@ +'use strict'; + +var obsidian = require('obsidian'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var obsidian__default = /*#__PURE__*/_interopDefaultLegacy(obsidian); + +const DEFAULT_WEEK_FORMAT = "gggg-[W]ww"; +const DEFAULT_WORDS_PER_DOT = 250; +const VIEW_TYPE_CALENDAR = "calendar"; +const TRIGGER_ON_OPEN = "calendar:open"; + +const DEFAULT_DAILY_NOTE_FORMAT = "YYYY-MM-DD"; +const DEFAULT_WEEKLY_NOTE_FORMAT = "gggg-[W]ww"; +const DEFAULT_MONTHLY_NOTE_FORMAT = "YYYY-MM"; + +function shouldUsePeriodicNotesSettings(periodicity) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const periodicNotes = window.app.plugins.getPlugin("periodic-notes"); + return periodicNotes && periodicNotes.settings?.[periodicity]?.enabled; +} +/** + * Read the user settings for the `daily-notes` plugin + * to keep behavior of creating a new note in-sync. + */ +function getDailyNoteSettings() { + try { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const { internalPlugins, plugins } = window.app; + if (shouldUsePeriodicNotesSettings("daily")) { + const { format, folder, template } = plugins.getPlugin("periodic-notes")?.settings?.daily || {}; + return { + format: format || DEFAULT_DAILY_NOTE_FORMAT, + folder: folder?.trim() || "", + template: template?.trim() || "", + }; + } + const { folder, format, template } = internalPlugins.getPluginById("daily-notes")?.instance?.options || {}; + return { + format: format || DEFAULT_DAILY_NOTE_FORMAT, + folder: folder?.trim() || "", + template: template?.trim() || "", + }; + } + catch (err) { + console.info("No custom daily note settings found!", err); + } +} +/** + * Read the user settings for the `weekly-notes` plugin + * to keep behavior of creating a new note in-sync. + */ +function getWeeklyNoteSettings() { + try { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const pluginManager = window.app.plugins; + const calendarSettings = pluginManager.getPlugin("calendar")?.options; + const periodicNotesSettings = pluginManager.getPlugin("periodic-notes") + ?.settings?.weekly; + if (shouldUsePeriodicNotesSettings("weekly")) { + return { + format: periodicNotesSettings.format || DEFAULT_WEEKLY_NOTE_FORMAT, + folder: periodicNotesSettings.folder?.trim() || "", + template: periodicNotesSettings.template?.trim() || "", + }; + } + const settings = calendarSettings || {}; + return { + format: settings.weeklyNoteFormat || DEFAULT_WEEKLY_NOTE_FORMAT, + folder: settings.weeklyNoteFolder?.trim() || "", + template: settings.weeklyNoteTemplate?.trim() || "", + }; + } + catch (err) { + console.info("No custom weekly note settings found!", err); + } +} +/** + * Read the user settings for the `periodic-notes` plugin + * to keep behavior of creating a new note in-sync. + */ +function getMonthlyNoteSettings() { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const pluginManager = window.app.plugins; + try { + const settings = (shouldUsePeriodicNotesSettings("monthly") && + pluginManager.getPlugin("periodic-notes")?.settings?.monthly) || + {}; + return { + format: settings.format || DEFAULT_MONTHLY_NOTE_FORMAT, + folder: settings.folder?.trim() || "", + template: settings.template?.trim() || "", + }; + } + catch (err) { + console.info("No custom monthly note settings found!", err); + } +} + +/** + * dateUID is a way of weekly identifying daily/weekly/monthly notes. + * They are prefixed with the granularity to avoid ambiguity. + */ +function getDateUID$1(date, granularity = "day") { + const ts = date.clone().startOf(granularity).format(); + return `${granularity}-${ts}`; +} +function removeEscapedCharacters(format) { + return format.replace(/\[[^\]]*\]/g, ""); // remove everything within brackets +} +/** + * XXX: When parsing dates that contain both week numbers and months, + * Moment choses to ignore the week numbers. For the week dateUID, we + * want the opposite behavior. Strip the MMM from the format to patch. + */ +function isFormatAmbiguous(format, granularity) { + if (granularity === "week") { + const cleanFormat = removeEscapedCharacters(format); + return (/w{1,2}/i.test(cleanFormat) && + (/M{1,4}/.test(cleanFormat) || /D{1,4}/.test(cleanFormat))); + } + return false; +} +function getDateFromFile(file, granularity) { + const getSettings = { + day: getDailyNoteSettings, + week: getWeeklyNoteSettings, + month: getMonthlyNoteSettings, + }; + const format = getSettings[granularity]().format.split("/").pop(); + const noteDate = window.moment(file.basename, format, true); + if (!noteDate.isValid()) { + return null; + } + if (isFormatAmbiguous(format, granularity)) { + if (granularity === "week") { + const cleanFormat = removeEscapedCharacters(format); + if (/w{1,2}/i.test(cleanFormat)) { + return window.moment(file.basename, + // If format contains week, remove day & month formatting + format.replace(/M{1,4}/g, "").replace(/D{1,4}/g, ""), false); + } + } + } + return noteDate; +} + +// Credit: @creationix/path.js +function join(...partSegments) { + // Split the inputs into a list of path commands. + let parts = []; + for (let i = 0, l = partSegments.length; i < l; i++) { + parts = parts.concat(partSegments[i].split("/")); + } + // Interpret the path commands to get the new resolved path. + const newParts = []; + for (let i = 0, l = parts.length; i < l; i++) { + const part = parts[i]; + // Remove leading and trailing slashes + // Also remove "." segments + if (!part || part === ".") + continue; + // Push new path segments. + else + newParts.push(part); + } + // Preserve the initial slash if there was one. + if (parts[0] === "") + newParts.unshift(""); + // Turn back into a single string path. + return newParts.join("/"); +} +async function ensureFolderExists(path) { + const dirs = path.replace(/\\/g, "/").split("/"); + dirs.pop(); // remove basename + if (dirs.length) { + const dir = join(...dirs); + if (!window.app.vault.getAbstractFileByPath(dir)) { + await window.app.vault.createFolder(dir); + } + } +} +async function getNotePath(directory, filename) { + if (!filename.endsWith(".md")) { + filename += ".md"; + } + const path = obsidian__default['default'].normalizePath(join(directory, filename)); + await ensureFolderExists(path); + return path; +} +async function getTemplateInfo(template) { + const { metadataCache, vault } = window.app; + const templatePath = obsidian__default['default'].normalizePath(template); + if (templatePath === "/") { + return Promise.resolve(["", null]); + } + try { + const templateFile = metadataCache.getFirstLinkpathDest(templatePath, ""); + const contents = await vault.cachedRead(templateFile); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const IFoldInfo = window.app.foldManager.load(templateFile); + return [contents, IFoldInfo]; + } + catch (err) { + console.error(`Failed to read the daily note template '${templatePath}'`, err); + new obsidian__default['default'].Notice("Failed to read the daily note template"); + return ["", null]; + } +} + +class DailyNotesFolderMissingError extends Error { +} +/** + * This function mimics the behavior of the daily-notes plugin + * so it will replace {{date}}, {{title}}, and {{time}} with the + * formatted timestamp. + * + * Note: it has an added bonus that it's not 'today' specific. + */ +async function createDailyNote(date) { + const app = window.app; + const { vault } = app; + const moment = window.moment; + const { template, format, folder } = getDailyNoteSettings(); + const [templateContents, IFoldInfo] = await getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = await getNotePath(folder, filename); + try { + const createdFile = await vault.create(normalizedPath, templateContents + .replace(/{{\s*date\s*}}/gi, filename) + .replace(/{{\s*time\s*}}/gi, moment().format("HH:mm")) + .replace(/{{\s*title\s*}}/gi, filename) + .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now = moment(); + const currentDate = date.clone().set({ + hour: now.get("hour"), + minute: now.get("minute"), + second: now.get("second"), + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); + } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }) + .replace(/{{\s*yesterday\s*}}/gi, date.clone().subtract(1, "day").format(format)) + .replace(/{{\s*tomorrow\s*}}/gi, date.clone().add(1, "d").format(format))); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } + catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian__default['default'].Notice("Unable to create new file."); + } +} +function getDailyNote(date, dailyNotes) { + return dailyNotes[getDateUID$1(date, "day")] ?? null; +} +function getAllDailyNotes() { + /** + * Find all daily notes in the daily note folder + */ + const { vault } = window.app; + const { folder } = getDailyNoteSettings(); + const dailyNotesFolder = vault.getAbstractFileByPath(obsidian__default['default'].normalizePath(folder)); + if (!dailyNotesFolder) { + throw new DailyNotesFolderMissingError("Failed to find daily notes folder"); + } + const dailyNotes = {}; + obsidian__default['default'].Vault.recurseChildren(dailyNotesFolder, (note) => { + if (note instanceof obsidian__default['default'].TFile) { + const date = getDateFromFile(note, "day"); + if (date) { + const dateString = getDateUID$1(date, "day"); + dailyNotes[dateString] = note; + } + } + }); + return dailyNotes; +} + +class WeeklyNotesFolderMissingError extends Error { +} +function getDaysOfWeek$1() { + const { moment } = window; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let weekStart = moment.localeData()._week.dow; + const daysOfWeek = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + ]; + while (weekStart) { + daysOfWeek.push(daysOfWeek.shift()); + weekStart--; + } + return daysOfWeek; +} +function getDayOfWeekNumericalValue(dayOfWeekName) { + return getDaysOfWeek$1().indexOf(dayOfWeekName.toLowerCase()); +} +async function createWeeklyNote(date) { + const { vault } = window.app; + const { template, format, folder } = getWeeklyNoteSettings(); + const [templateContents, IFoldInfo] = await getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = await getNotePath(folder, filename); + try { + const createdFile = await vault.create(normalizedPath, templateContents + .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now = window.moment(); + const currentDate = date.clone().set({ + hour: now.get("hour"), + minute: now.get("minute"), + second: now.get("second"), + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); + } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }) + .replace(/{{\s*title\s*}}/gi, filename) + .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")) + .replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi, (_, dayOfWeek, momentFormat) => { + const day = getDayOfWeekNumericalValue(dayOfWeek); + return date.weekday(day).format(momentFormat.trim()); + })); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + window.app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } + catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian__default['default'].Notice("Unable to create new file."); + } +} +function getWeeklyNote(date, weeklyNotes) { + return weeklyNotes[getDateUID$1(date, "week")] ?? null; +} +function getAllWeeklyNotes() { + const { vault } = window.app; + const { folder } = getWeeklyNoteSettings(); + const weeklyNotesFolder = vault.getAbstractFileByPath(obsidian__default['default'].normalizePath(folder)); + if (!weeklyNotesFolder) { + throw new WeeklyNotesFolderMissingError("Failed to find weekly notes folder"); + } + const weeklyNotes = {}; + obsidian__default['default'].Vault.recurseChildren(weeklyNotesFolder, (note) => { + if (note instanceof obsidian__default['default'].TFile) { + const date = getDateFromFile(note, "week"); + if (date) { + const dateString = getDateUID$1(date, "week"); + weeklyNotes[dateString] = note; + } + } + }); + return weeklyNotes; +} + +function appHasDailyNotesPluginLoaded() { + const { app } = window; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const dailyNotesPlugin = app.internalPlugins.plugins["daily-notes"]; + if (dailyNotesPlugin && dailyNotesPlugin.enabled) { + return true; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && periodicNotes.settings?.daily?.enabled; +} +var appHasDailyNotesPluginLoaded_1 = appHasDailyNotesPluginLoaded; +var createDailyNote_1 = createDailyNote; +var createWeeklyNote_1 = createWeeklyNote; +var getAllDailyNotes_1 = getAllDailyNotes; +var getAllWeeklyNotes_1 = getAllWeeklyNotes; +var getDailyNote_1 = getDailyNote; +var getDailyNoteSettings_1 = getDailyNoteSettings; +var getDateFromFile_1 = getDateFromFile; +var getDateUID_1$1 = getDateUID$1; +var getWeeklyNote_1 = getWeeklyNote; +var getWeeklyNoteSettings_1 = getWeeklyNoteSettings; + +function noop$1() { } +function run$1(fn) { + return fn(); +} +function blank_object$1() { + return Object.create(null); +} +function run_all$1(fns) { + fns.forEach(run$1); +} +function is_function$1(thing) { + return typeof thing === 'function'; +} +function safe_not_equal$1(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); +} +function not_equal$1(a, b) { + return a != a ? b == b : a !== b; +} +function is_empty$1(obj) { + return Object.keys(obj).length === 0; +} +function subscribe(store, ...callbacks) { + if (store == null) { + return noop$1; + } + const unsub = store.subscribe(...callbacks); + return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; +} +function get_store_value(store) { + let value; + subscribe(store, _ => value = _)(); + return value; +} +function component_subscribe(component, store, callback) { + component.$$.on_destroy.push(subscribe(store, callback)); +} +function detach$1(node) { + node.parentNode.removeChild(node); +} +function children$1(element) { + return Array.from(element.childNodes); +} + +let current_component$1; +function set_current_component$1(component) { + current_component$1 = component; +} +function get_current_component$1() { + if (!current_component$1) + throw new Error('Function called outside component initialization'); + return current_component$1; +} +function onDestroy(fn) { + get_current_component$1().$$.on_destroy.push(fn); +} + +const dirty_components$1 = []; +const binding_callbacks$1 = []; +const render_callbacks$1 = []; +const flush_callbacks$1 = []; +const resolved_promise$1 = Promise.resolve(); +let update_scheduled$1 = false; +function schedule_update$1() { + if (!update_scheduled$1) { + update_scheduled$1 = true; + resolved_promise$1.then(flush$1); + } +} +function add_render_callback$1(fn) { + render_callbacks$1.push(fn); +} +function add_flush_callback(fn) { + flush_callbacks$1.push(fn); +} +let flushing$1 = false; +const seen_callbacks$1 = new Set(); +function flush$1() { + if (flushing$1) + return; + flushing$1 = true; + do { + // first, call beforeUpdate functions + // and update components + for (let i = 0; i < dirty_components$1.length; i += 1) { + const component = dirty_components$1[i]; + set_current_component$1(component); + update$1(component.$$); + } + set_current_component$1(null); + dirty_components$1.length = 0; + while (binding_callbacks$1.length) + binding_callbacks$1.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks$1.length; i += 1) { + const callback = render_callbacks$1[i]; + if (!seen_callbacks$1.has(callback)) { + // ...so guard against infinite loops + seen_callbacks$1.add(callback); + callback(); + } + } + render_callbacks$1.length = 0; + } while (dirty_components$1.length); + while (flush_callbacks$1.length) { + flush_callbacks$1.pop()(); + } + update_scheduled$1 = false; + flushing$1 = false; + seen_callbacks$1.clear(); +} +function update$1($$) { + if ($$.fragment !== null) { + $$.update(); + run_all$1($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback$1); + } +} +const outroing$1 = new Set(); +let outros$1; +function transition_in$1(block, local) { + if (block && block.i) { + outroing$1.delete(block); + block.i(local); + } +} +function transition_out$1(block, local, detach, callback) { + if (block && block.o) { + if (outroing$1.has(block)) + return; + outroing$1.add(block); + outros$1.c.push(() => { + outroing$1.delete(block); + if (callback) { + if (detach) + block.d(1); + callback(); + } + }); + block.o(local); + } +} + +function bind(component, name, callback) { + const index = component.$$.props[name]; + if (index !== undefined) { + component.$$.bound[index] = callback; + callback(component.$$.ctx[index]); + } +} +function create_component$1(block) { + block && block.c(); +} +function mount_component$1(component, target, anchor, customElement) { + const { fragment, on_mount, on_destroy, after_update } = component.$$; + fragment && fragment.m(target, anchor); + if (!customElement) { + // onMount happens before the initial afterUpdate + add_render_callback$1(() => { + const new_on_destroy = on_mount.map(run$1).filter(is_function$1); + if (on_destroy) { + on_destroy.push(...new_on_destroy); + } + else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all$1(new_on_destroy); + } + component.$$.on_mount = []; + }); + } + after_update.forEach(add_render_callback$1); +} +function destroy_component$1(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + run_all$1($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } +} +function make_dirty$1(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components$1.push(component); + schedule_update$1(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); +} +function init$1(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { + const parent_component = current_component$1; + set_current_component$1(component); + const $$ = component.$$ = { + fragment: null, + ctx: null, + // state + props, + update: noop$1, + not_equal, + bound: blank_object$1(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(parent_component ? parent_component.$$.context : []), + // everything else + callbacks: blank_object$1(), + dirty, + skip_bound: false + }; + let ready = false; + $$.ctx = instance + ? instance(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty$1(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all$1($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + const nodes = children$1(options.target); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach$1); + } + else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in$1(component.$$.fragment); + mount_component$1(component, options.target, options.anchor, options.customElement); + flush$1(); + } + set_current_component$1(parent_component); +} +/** + * Base class for Svelte components. Used when dev=false. + */ +class SvelteComponent$1 { + $destroy() { + destroy_component$1(this, 1); + this.$destroy = noop$1; + } + $on(type, callback) { + const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty$1($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } +} + +const subscriber_queue = []; +/** + * Create a `Writable` store that allows both updating and reading by subscription. + * @param {*=}value initial value + * @param {StartStopNotifier=}start start and stop notifications for subscriptions + */ +function writable(value, start = noop$1) { + let stop; + const subscribers = []; + function set(new_value) { + if (safe_not_equal$1(value, new_value)) { + value = new_value; + if (stop) { // store is ready + const run_queue = !subscriber_queue.length; + for (let i = 0; i < subscribers.length; i += 1) { + const s = subscribers[i]; + s[1](); + subscriber_queue.push(s, value); + } + if (run_queue) { + for (let i = 0; i < subscriber_queue.length; i += 2) { + subscriber_queue[i][0](subscriber_queue[i + 1]); + } + subscriber_queue.length = 0; + } + } + } + } + function update(fn) { + set(fn(value)); + } + function subscribe(run, invalidate = noop$1) { + const subscriber = [run, invalidate]; + subscribers.push(subscriber); + if (subscribers.length === 1) { + stop = start(set) || noop$1; + } + run(value); + return () => { + const index = subscribers.indexOf(subscriber); + if (index !== -1) { + subscribers.splice(index, 1); + } + if (subscribers.length === 0) { + stop(); + stop = null; + } + }; + } + return { set, update, subscribe }; +} + +const weekdays$1 = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", +]; +const defaultSettings = Object.freeze({ + shouldConfirmBeforeCreate: true, + weekStart: "locale", + wordsPerDot: DEFAULT_WORDS_PER_DOT, + showWeeklyNote: false, + weeklyNoteFormat: "", + weeklyNoteTemplate: "", + weeklyNoteFolder: "", + localeOverride: "system-default", +}); +function appHasPeriodicNotesPluginLoaded() { + var _a, _b; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const periodicNotes = window.app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) === null || _a === void 0 ? void 0 : _a.weekly) === null || _b === void 0 ? void 0 : _b.enabled); +} +class CalendarSettingsTab extends obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + this.containerEl.empty(); + if (!appHasDailyNotesPluginLoaded_1()) { + this.containerEl.createDiv("settings-banner", (banner) => { + banner.createEl("h3", { + text: "⚠️ Daily Notes plugin not enabled", + }); + banner.createEl("p", { + cls: "setting-item-description", + text: "The calendar is best used in conjunction with either the Daily Notes plugin or the Periodic Notes plugin (available in the Community Plugins catalog).", + }); + }); + } + this.containerEl.createEl("h3", { + text: "General Settings", + }); + this.addDotThresholdSetting(); + this.addWeekStartSetting(); + this.addConfirmCreateSetting(); + this.addShowWeeklyNoteSetting(); + if (this.plugin.options.showWeeklyNote && + !appHasPeriodicNotesPluginLoaded()) { + this.containerEl.createEl("h3", { + text: "Weekly Note Settings", + }); + this.containerEl.createEl("p", { + cls: "setting-item-description", + text: "Note: Weekly Note settings are moving. You are encouraged to install the 'Periodic Notes' plugin to keep the functionality in the future.", + }); + this.addWeeklyNoteFormatSetting(); + this.addWeeklyNoteTemplateSetting(); + this.addWeeklyNoteFolderSetting(); + } + this.containerEl.createEl("h3", { + text: "Advanced Settings", + }); + this.addLocaleOverrideSetting(); + } + addDotThresholdSetting() { + new obsidian.Setting(this.containerEl) + .setName("Words per dot") + .setDesc("How many words should be represented by a single dot?") + .addText((textfield) => { + textfield.setPlaceholder(String(DEFAULT_WORDS_PER_DOT)); + textfield.inputEl.type = "number"; + textfield.setValue(String(this.plugin.options.wordsPerDot)); + textfield.onChange(async (value) => { + this.plugin.writeOptions(() => ({ + wordsPerDot: value !== "" ? Number(value) : undefined, + })); + }); + }); + } + addWeekStartSetting() { + const { moment } = window; + const localizedWeekdays = moment.weekdays(); + const localeWeekStartNum = window._bundledLocaleWeekSpec.dow; + const localeWeekStart = moment.weekdays()[localeWeekStartNum]; + new obsidian.Setting(this.containerEl) + .setName("Start week on:") + .setDesc("Choose what day of the week to start. Select 'Locale default' to use the default specified by moment.js") + .addDropdown((dropdown) => { + dropdown.addOption("locale", `Locale default (${localeWeekStart})`); + localizedWeekdays.forEach((day, i) => { + dropdown.addOption(weekdays$1[i], day); + }); + dropdown.setValue(this.plugin.options.weekStart); + dropdown.onChange(async (value) => { + this.plugin.writeOptions(() => ({ + weekStart: value, + })); + }); + }); + } + addConfirmCreateSetting() { + new obsidian.Setting(this.containerEl) + .setName("Confirm before creating new note") + .setDesc("Show a confirmation modal before creating a new note") + .addToggle((toggle) => { + toggle.setValue(this.plugin.options.shouldConfirmBeforeCreate); + toggle.onChange(async (value) => { + this.plugin.writeOptions(() => ({ + shouldConfirmBeforeCreate: value, + })); + }); + }); + } + addShowWeeklyNoteSetting() { + new obsidian.Setting(this.containerEl) + .setName("Show week number") + .setDesc("Enable this to add a column with the week number") + .addToggle((toggle) => { + toggle.setValue(this.plugin.options.showWeeklyNote); + toggle.onChange(async (value) => { + this.plugin.writeOptions(() => ({ showWeeklyNote: value })); + this.display(); // show/hide weekly settings + }); + }); + } + addWeeklyNoteFormatSetting() { + new obsidian.Setting(this.containerEl) + .setName("Weekly note format") + .setDesc("For more syntax help, refer to format reference") + .addText((textfield) => { + textfield.setValue(this.plugin.options.weeklyNoteFormat); + textfield.setPlaceholder(DEFAULT_WEEK_FORMAT); + textfield.onChange(async (value) => { + this.plugin.writeOptions(() => ({ weeklyNoteFormat: value })); + }); + }); + } + addWeeklyNoteTemplateSetting() { + new obsidian.Setting(this.containerEl) + .setName("Weekly note template") + .setDesc("Choose the file you want to use as the template for your weekly notes") + .addText((textfield) => { + textfield.setValue(this.plugin.options.weeklyNoteTemplate); + textfield.onChange(async (value) => { + this.plugin.writeOptions(() => ({ weeklyNoteTemplate: value })); + }); + }); + } + addWeeklyNoteFolderSetting() { + new obsidian.Setting(this.containerEl) + .setName("Weekly note folder") + .setDesc("New weekly notes will be placed here") + .addText((textfield) => { + textfield.setValue(this.plugin.options.weeklyNoteFolder); + textfield.onChange(async (value) => { + this.plugin.writeOptions(() => ({ weeklyNoteFolder: value })); + }); + }); + } + addLocaleOverrideSetting() { + var _a; + const { moment } = window; + const sysLocale = (_a = navigator.language) === null || _a === void 0 ? void 0 : _a.toLowerCase(); + new obsidian.Setting(this.containerEl) + .setName("Override locale:") + .setDesc("Set this if you want to use a locale different from the default") + .addDropdown((dropdown) => { + dropdown.addOption("system-default", `Same as system (${sysLocale})`); + moment.locales().forEach((locale) => { + dropdown.addOption(locale, locale); + }); + dropdown.setValue(this.plugin.options.localeOverride); + dropdown.onChange(async (value) => { + this.plugin.writeOptions(() => ({ + localeOverride: value, + })); + }); + }); + } +} + +const classList = (obj) => { + return Object.entries(obj) + .filter(([_k, v]) => !!v) + .map(([k, _k]) => k); +}; +function clamp(num, lowerBound, upperBound) { + return Math.min(Math.max(lowerBound, num), upperBound); +} +function partition(arr, predicate) { + const pass = []; + const fail = []; + arr.forEach((elem) => { + if (predicate(elem)) { + pass.push(elem); + } + else { + fail.push(elem); + } + }); + return [pass, fail]; +} +/** + * Lookup the dateUID for a given file. It compares the filename + * to the daily and weekly note formats to find a match. + * + * @param file + */ +function getDateUIDFromFile(file) { + if (!file) { + return null; + } + // TODO: I'm not checking the path! + let date = getDateFromFile_1(file, "day"); + if (date) { + return getDateUID_1$1(date, "day"); + } + date = getDateFromFile_1(file, "week"); + if (date) { + return getDateUID_1$1(date, "week"); + } + return null; +} +function getWordCount(text) { + const spaceDelimitedChars = /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; + const nonSpaceDelimitedWords = /\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5/ + .source; + const pattern = new RegExp([ + `(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-${spaceDelimitedChars}])+`, + nonSpaceDelimitedWords, + ].join("|"), "g"); + return (text.match(pattern) || []).length; +} + +function createDailyNotesStore() { + let hasError = false; + const store = writable(null); + return Object.assign({ reindex: () => { + try { + const dailyNotes = getAllDailyNotes_1(); + store.set(dailyNotes); + hasError = false; + } + catch (err) { + if (!hasError) { + // Avoid error being shown multiple times + console.log("[Calendar] Failed to find daily notes folder", err); + } + store.set({}); + hasError = true; + } + } }, store); +} +function createWeeklyNotesStore() { + let hasError = false; + const store = writable(null); + return Object.assign({ reindex: () => { + try { + const weeklyNotes = getAllWeeklyNotes_1(); + store.set(weeklyNotes); + hasError = false; + } + catch (err) { + if (!hasError) { + // Avoid error being shown multiple times + console.log("[Calendar] Failed to find weekly notes folder", err); + } + store.set({}); + hasError = true; + } + } }, store); +} +const settings = writable(defaultSettings); +const dailyNotes = createDailyNotesStore(); +const weeklyNotes = createWeeklyNotesStore(); +function createSelectedFileStore() { + const store = writable(null); + return Object.assign({ setFile: (file) => { + const id = getDateUIDFromFile(file); + store.set(id); + } }, store); +} +const activeFile = createSelectedFileStore(); + +class ConfirmationModal extends obsidian.Modal { + constructor(app, config) { + super(app); + const { cta, onAccept, text, title } = config; + this.contentEl.createEl("h2", { text: title }); + this.contentEl.createEl("p", { text }); + this.contentEl.createDiv("modal-button-container", (buttonsEl) => { + buttonsEl + .createEl("button", { text: "Never mind" }) + .addEventListener("click", () => this.close()); + buttonsEl + .createEl("button", { + cls: "mod-cta", + text: cta, + }) + .addEventListener("click", async (e) => { + await onAccept(e); + this.close(); + }); + }); + } +} +function createConfirmationDialog({ cta, onAccept, text, title, }) { + new ConfirmationModal(window.app, { cta, onAccept, text, title }).open(); +} + +/** + * Create a Daily Note for a given date. + */ +async function tryToCreateDailyNote(date, inNewSplit, settings, cb) { + const { workspace } = window.app; + const { format } = getDailyNoteSettings_1(); + const filename = date.format(format); + const createFile = async () => { + const dailyNote = await createDailyNote_1(date); + const leaf = inNewSplit + ? workspace.splitActiveLeaf() + : workspace.getUnpinnedLeaf(); + await leaf.openFile(dailyNote); + cb === null || cb === void 0 ? void 0 : cb(dailyNote); + }; + if (settings.shouldConfirmBeforeCreate) { + createConfirmationDialog({ + cta: "Create", + onAccept: createFile, + text: `File ${filename} does not exist. Would you like to create it?`, + title: "New Daily Note", + }); + } + else { + await createFile(); + } +} + +/** + * Create a Weekly Note for a given date. + */ +async function tryToCreateWeeklyNote(date, inNewSplit, settings, cb) { + const { workspace } = window.app; + const { format } = getWeeklyNoteSettings_1(); + const filename = date.format(format); + const createFile = async () => { + const dailyNote = await createWeeklyNote_1(date); + const leaf = inNewSplit + ? workspace.splitActiveLeaf() + : workspace.getUnpinnedLeaf(); + await leaf.openFile(dailyNote); + cb === null || cb === void 0 ? void 0 : cb(dailyNote); + }; + if (settings.shouldConfirmBeforeCreate) { + createConfirmationDialog({ + cta: "Create", + onAccept: createFile, + text: `File ${filename} does not exist. Would you like to create it?`, + title: "New Weekly Note", + }); + } + else { + await createFile(); + } +} + +function noop() { } +function assign(tar, src) { + // @ts-ignore + for (const k in src) + tar[k] = src[k]; + return tar; +} +function is_promise(value) { + return value && typeof value === 'object' && typeof value.then === 'function'; +} +function run(fn) { + return fn(); +} +function blank_object() { + return Object.create(null); +} +function run_all(fns) { + fns.forEach(run); +} +function is_function(thing) { + return typeof thing === 'function'; +} +function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); +} +function not_equal(a, b) { + return a != a ? b == b : a !== b; +} +function is_empty(obj) { + return Object.keys(obj).length === 0; +} +function create_slot(definition, ctx, $$scope, fn) { + if (definition) { + const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); + return definition[0](slot_ctx); + } +} +function get_slot_context(definition, ctx, $$scope, fn) { + return definition[1] && fn + ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) + : $$scope.ctx; +} +function get_slot_changes(definition, $$scope, dirty, fn) { + if (definition[2] && fn) { + const lets = definition[2](fn(dirty)); + if ($$scope.dirty === undefined) { + return lets; + } + if (typeof lets === 'object') { + const merged = []; + const len = Math.max($$scope.dirty.length, lets.length); + for (let i = 0; i < len; i += 1) { + merged[i] = $$scope.dirty[i] | lets[i]; + } + return merged; + } + return $$scope.dirty | lets; + } + return $$scope.dirty; +} +function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) { + const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn); + if (slot_changes) { + const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); + slot.p(slot_context, slot_changes); + } +} +function null_to_empty(value) { + return value == null ? '' : value; +} + +function append(target, node) { + target.appendChild(node); +} +function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); +} +function detach(node) { + node.parentNode.removeChild(node); +} +function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) + iterations[i].d(detaching); + } +} +function element(name) { + return document.createElement(name); +} +function svg_element(name) { + return document.createElementNS('http://www.w3.org/2000/svg', name); +} +function text(data) { + return document.createTextNode(data); +} +function space() { + return text(' '); +} +function empty() { + return text(''); +} +function listen(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); +} +function attr(node, attribute, value) { + if (value == null) + node.removeAttribute(attribute); + else if (node.getAttribute(attribute) !== value) + node.setAttribute(attribute, value); +} +function set_attributes(node, attributes) { + // @ts-ignore + const descriptors = Object.getOwnPropertyDescriptors(node.__proto__); + for (const key in attributes) { + if (attributes[key] == null) { + node.removeAttribute(key); + } + else if (key === 'style') { + node.style.cssText = attributes[key]; + } + else if (key === '__value') { + node.value = node[key] = attributes[key]; + } + else if (descriptors[key] && descriptors[key].set) { + node[key] = attributes[key]; + } + else { + attr(node, key, attributes[key]); + } + } +} +function children(element) { + return Array.from(element.childNodes); +} +function set_data(text, data) { + data = '' + data; + if (text.wholeText !== data) + text.data = data; +} +function toggle_class(element, name, toggle) { + element.classList[toggle ? 'add' : 'remove'](name); +} + +let current_component; +function set_current_component(component) { + current_component = component; +} +function get_current_component() { + if (!current_component) + throw new Error('Function called outside component initialization'); + return current_component; +} + +const dirty_components = []; +const binding_callbacks = []; +const render_callbacks = []; +const flush_callbacks = []; +const resolved_promise = Promise.resolve(); +let update_scheduled = false; +function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } +} +function add_render_callback(fn) { + render_callbacks.push(fn); +} +let flushing = false; +const seen_callbacks = new Set(); +function flush() { + if (flushing) + return; + flushing = true; + do { + // first, call beforeUpdate functions + // and update components + for (let i = 0; i < dirty_components.length; i += 1) { + const component = dirty_components[i]; + set_current_component(component); + update(component.$$); + } + set_current_component(null); + dirty_components.length = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + // ...so guard against infinite loops + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + flushing = false; + seen_callbacks.clear(); +} +function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } +} +const outroing = new Set(); +let outros; +function group_outros() { + outros = { + r: 0, + c: [], + p: outros // parent group + }; +} +function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; +} +function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } +} +function transition_out(block, local, detach, callback) { + if (block && block.o) { + if (outroing.has(block)) + return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach) + block.d(1); + callback(); + } + }); + block.o(local); + } +} + +function handle_promise(promise, info) { + const token = info.token = {}; + function update(type, index, key, value) { + if (info.token !== token) + return; + info.resolved = value; + let child_ctx = info.ctx; + if (key !== undefined) { + child_ctx = child_ctx.slice(); + child_ctx[key] = value; + } + const block = type && (info.current = type)(child_ctx); + let needs_flush = false; + if (info.block) { + if (info.blocks) { + info.blocks.forEach((block, i) => { + if (i !== index && block) { + group_outros(); + transition_out(block, 1, 1, () => { + if (info.blocks[i] === block) { + info.blocks[i] = null; + } + }); + check_outros(); + } + }); + } + else { + info.block.d(1); + } + block.c(); + transition_in(block, 1); + block.m(info.mount(), info.anchor); + needs_flush = true; + } + info.block = block; + if (info.blocks) + info.blocks[index] = block; + if (needs_flush) { + flush(); + } + } + if (is_promise(promise)) { + const current_component = get_current_component(); + promise.then(value => { + set_current_component(current_component); + update(info.then, 1, info.value, value); + set_current_component(null); + }, error => { + set_current_component(current_component); + update(info.catch, 2, info.error, error); + set_current_component(null); + if (!info.hasCatch) { + throw error; + } + }); + // if we previously had a then/catch block, destroy it + if (info.current !== info.pending) { + update(info.pending, 0); + return true; + } + } + else { + if (info.current !== info.then) { + update(info.then, 1, info.value, promise); + return true; + } + info.resolved = promise; + } +} +function outro_and_destroy_block(block, lookup) { + transition_out(block, 1, 1, () => { + lookup.delete(block.key); + }); +} +function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { + let o = old_blocks.length; + let n = list.length; + let i = o; + const old_indexes = {}; + while (i--) + old_indexes[old_blocks[i].key] = i; + const new_blocks = []; + const new_lookup = new Map(); + const deltas = new Map(); + i = n; + while (i--) { + const child_ctx = get_context(ctx, list, i); + const key = get_key(child_ctx); + let block = lookup.get(key); + if (!block) { + block = create_each_block(key, child_ctx); + block.c(); + } + else if (dynamic) { + block.p(child_ctx, dirty); + } + new_lookup.set(key, new_blocks[i] = block); + if (key in old_indexes) + deltas.set(key, Math.abs(i - old_indexes[key])); + } + const will_move = new Set(); + const did_move = new Set(); + function insert(block) { + transition_in(block, 1); + block.m(node, next); + lookup.set(block.key, block); + next = block.first; + n--; + } + while (o && n) { + const new_block = new_blocks[n - 1]; + const old_block = old_blocks[o - 1]; + const new_key = new_block.key; + const old_key = old_block.key; + if (new_block === old_block) { + // do nothing + next = new_block.first; + o--; + n--; + } + else if (!new_lookup.has(old_key)) { + // remove old block + destroy(old_block, lookup); + o--; + } + else if (!lookup.has(new_key) || will_move.has(new_key)) { + insert(new_block); + } + else if (did_move.has(old_key)) { + o--; + } + else if (deltas.get(new_key) > deltas.get(old_key)) { + did_move.add(new_key); + insert(new_block); + } + else { + will_move.add(old_key); + o--; + } + } + while (o--) { + const old_block = old_blocks[o]; + if (!new_lookup.has(old_block.key)) + destroy(old_block, lookup); + } + while (n) + insert(new_blocks[n - 1]); + return new_blocks; +} + +function get_spread_update(levels, updates) { + const update = {}; + const to_null_out = {}; + const accounted_for = { $$scope: 1 }; + let i = levels.length; + while (i--) { + const o = levels[i]; + const n = updates[i]; + if (n) { + for (const key in o) { + if (!(key in n)) + to_null_out[key] = 1; + } + for (const key in n) { + if (!accounted_for[key]) { + update[key] = n[key]; + accounted_for[key] = 1; + } + } + levels[i] = n; + } + else { + for (const key in o) { + accounted_for[key] = 1; + } + } + } + for (const key in to_null_out) { + if (!(key in update)) + update[key] = undefined; + } + return update; +} +function get_spread_object(spread_props) { + return typeof spread_props === 'object' && spread_props !== null ? spread_props : {}; +} +function create_component(block) { + block && block.c(); +} +function mount_component(component, target, anchor, customElement) { + const { fragment, on_mount, on_destroy, after_update } = component.$$; + fragment && fragment.m(target, anchor); + if (!customElement) { + // onMount happens before the initial afterUpdate + add_render_callback(() => { + const new_on_destroy = on_mount.map(run).filter(is_function); + if (on_destroy) { + on_destroy.push(...new_on_destroy); + } + else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + } + after_update.forEach(add_render_callback); +} +function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } +} +function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); +} +function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const $$ = component.$$ = { + fragment: null, + ctx: null, + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(parent_component ? parent_component.$$.context : []), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false + }; + let ready = false; + $$.ctx = instance + ? instance(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + const nodes = children(options.target); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } + else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor, options.customElement); + flush(); + } + set_current_component(parent_component); +} +/** + * Base class for Svelte components. Used when dev=false. + */ +class SvelteComponent { + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + $on(type, callback) { + const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } +} + +/** + * dateUID is a way of weekly identifying daily/weekly/monthly notes. + * They are prefixed with the granularity to avoid ambiguity. + */ +function getDateUID(date, granularity = "day") { + const ts = date.clone().startOf(granularity).format(); + return `${granularity}-${ts}`; +} +var getDateUID_1 = getDateUID; + +/* src/components/Dot.svelte generated by Svelte v3.35.0 */ + +function add_css$5() { + var style = element("style"); + style.id = "svelte-1widvzq-style"; + style.textContent = ".dot.svelte-1widvzq,.hollow.svelte-1widvzq{display:inline-block;height:6px;width:6px;margin:0 1px}.filled.svelte-1widvzq{fill:var(--color-dot)}.active.filled.svelte-1widvzq{fill:var(--text-on-accent)}.hollow.svelte-1widvzq{fill:none;stroke:var(--color-dot)}.active.hollow.svelte-1widvzq{fill:none;stroke:var(--text-on-accent)}"; + append(document.head, style); +} + +// (14:0) {:else} +function create_else_block$1(ctx) { + let svg; + let circle; + let svg_class_value; + + return { + c() { + svg = svg_element("svg"); + circle = svg_element("circle"); + attr(circle, "cx", "3"); + attr(circle, "cy", "3"); + attr(circle, "r", "2"); + attr(svg, "class", svg_class_value = "" + (null_to_empty(`hollow ${/*className*/ ctx[0]}`) + " svelte-1widvzq")); + attr(svg, "viewBox", "0 0 6 6"); + attr(svg, "xmlns", "http://www.w3.org/2000/svg"); + toggle_class(svg, "active", /*isActive*/ ctx[2]); + }, + m(target, anchor) { + insert(target, svg, anchor); + append(svg, circle); + }, + p(ctx, dirty) { + if (dirty & /*className*/ 1 && svg_class_value !== (svg_class_value = "" + (null_to_empty(`hollow ${/*className*/ ctx[0]}`) + " svelte-1widvzq"))) { + attr(svg, "class", svg_class_value); + } + + if (dirty & /*className, isActive*/ 5) { + toggle_class(svg, "active", /*isActive*/ ctx[2]); + } + }, + d(detaching) { + if (detaching) detach(svg); + } + }; +} + +// (6:0) {#if isFilled} +function create_if_block$2(ctx) { + let svg; + let circle; + let svg_class_value; + + return { + c() { + svg = svg_element("svg"); + circle = svg_element("circle"); + attr(circle, "cx", "3"); + attr(circle, "cy", "3"); + attr(circle, "r", "2"); + attr(svg, "class", svg_class_value = "" + (null_to_empty(`dot filled ${/*className*/ ctx[0]}`) + " svelte-1widvzq")); + attr(svg, "viewBox", "0 0 6 6"); + attr(svg, "xmlns", "http://www.w3.org/2000/svg"); + toggle_class(svg, "active", /*isActive*/ ctx[2]); + }, + m(target, anchor) { + insert(target, svg, anchor); + append(svg, circle); + }, + p(ctx, dirty) { + if (dirty & /*className*/ 1 && svg_class_value !== (svg_class_value = "" + (null_to_empty(`dot filled ${/*className*/ ctx[0]}`) + " svelte-1widvzq"))) { + attr(svg, "class", svg_class_value); + } + + if (dirty & /*className, isActive*/ 5) { + toggle_class(svg, "active", /*isActive*/ ctx[2]); + } + }, + d(detaching) { + if (detaching) detach(svg); + } + }; +} + +function create_fragment$6(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (/*isFilled*/ ctx[1]) return create_if_block$2; + return create_else_block$1; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if_block.d(detaching); + if (detaching) detach(if_block_anchor); + } + }; +} + +function instance$6($$self, $$props, $$invalidate) { + let { className = "" } = $$props; + let { isFilled } = $$props; + let { isActive } = $$props; + + $$self.$$set = $$props => { + if ("className" in $$props) $$invalidate(0, className = $$props.className); + if ("isFilled" in $$props) $$invalidate(1, isFilled = $$props.isFilled); + if ("isActive" in $$props) $$invalidate(2, isActive = $$props.isActive); + }; + + return [className, isFilled, isActive]; +} + +class Dot extends SvelteComponent { + constructor(options) { + super(); + if (!document.getElementById("svelte-1widvzq-style")) add_css$5(); + init(this, options, instance$6, create_fragment$6, safe_not_equal, { className: 0, isFilled: 1, isActive: 2 }); + } +} + +/* src/components/MetadataResolver.svelte generated by Svelte v3.35.0 */ + +const get_default_slot_changes_1 = dirty => ({}); +const get_default_slot_context_1 = ctx => ({ metadata: null }); +const get_default_slot_changes = dirty => ({ metadata: dirty & /*metadata*/ 1 }); +const get_default_slot_context = ctx => ({ metadata: /*resolvedMeta*/ ctx[3] }); + +// (11:0) {:else} +function create_else_block(ctx) { + let current; + const default_slot_template = /*#slots*/ ctx[2].default; + const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[1], get_default_slot_context_1); + + return { + c() { + if (default_slot) default_slot.c(); + }, + m(target, anchor) { + if (default_slot) { + default_slot.m(target, anchor); + } + + current = true; + }, + p(ctx, dirty) { + if (default_slot) { + if (default_slot.p && dirty & /*$$scope*/ 2) { + update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[1], dirty, get_default_slot_changes_1, get_default_slot_context_1); + } + } + }, + i(local) { + if (current) return; + transition_in(default_slot, local); + current = true; + }, + o(local) { + transition_out(default_slot, local); + current = false; + }, + d(detaching) { + if (default_slot) default_slot.d(detaching); + } + }; +} + +// (7:0) {#if metadata} +function create_if_block$1(ctx) { + let await_block_anchor; + let promise; + let current; + + let info = { + ctx, + current: null, + token: null, + hasCatch: false, + pending: create_pending_block, + then: create_then_block, + catch: create_catch_block, + value: 3, + blocks: [,,,] + }; + + handle_promise(promise = /*metadata*/ ctx[0], info); + + return { + c() { + await_block_anchor = empty(); + info.block.c(); + }, + m(target, anchor) { + insert(target, await_block_anchor, anchor); + info.block.m(target, info.anchor = anchor); + info.mount = () => await_block_anchor.parentNode; + info.anchor = await_block_anchor; + current = true; + }, + p(new_ctx, dirty) { + ctx = new_ctx; + info.ctx = ctx; + + if (dirty & /*metadata*/ 1 && promise !== (promise = /*metadata*/ ctx[0]) && handle_promise(promise, info)) ; else { + const child_ctx = ctx.slice(); + child_ctx[3] = info.resolved; + info.block.p(child_ctx, dirty); + } + }, + i(local) { + if (current) return; + transition_in(info.block); + current = true; + }, + o(local) { + for (let i = 0; i < 3; i += 1) { + const block = info.blocks[i]; + transition_out(block); + } + + current = false; + }, + d(detaching) { + if (detaching) detach(await_block_anchor); + info.block.d(detaching); + info.token = null; + info = null; + } + }; +} + +// (1:0) {#if metadata} +function create_catch_block(ctx) { + return { + c: noop, + m: noop, + p: noop, + i: noop, + o: noop, + d: noop + }; +} + +// (8:37) ; export let metadata; {#if metadata} +function create_pending_block(ctx) { + return { + c: noop, + m: noop, + p: noop, + i: noop, + o: noop, + d: noop + }; +} + +function create_fragment$5(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$1, create_else_block]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (/*metadata*/ ctx[0]) return 0; + return 1; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; +} + +function instance$5($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + + let { metadata } = $$props; + + $$self.$$set = $$props => { + if ("metadata" in $$props) $$invalidate(0, metadata = $$props.metadata); + if ("$$scope" in $$props) $$invalidate(1, $$scope = $$props.$$scope); + }; + + return [metadata, $$scope, slots]; +} + +class MetadataResolver extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$5, create_fragment$5, not_equal, { metadata: 0 }); + } +} + +function isMacOS() { + return navigator.appVersion.indexOf("Mac") !== -1; +} +function isMetaPressed(e) { + return isMacOS() ? e.metaKey : e.ctrlKey; +} +function getDaysOfWeek(..._args) { + return window.moment.weekdaysShort(true); +} +function isWeekend(date) { + return date.isoWeekday() === 6 || date.isoWeekday() === 7; +} +function getStartOfWeek(days) { + return days[0].weekday(0); +} +/** + * Generate a 2D array of daily information to power + * the calendar view. + */ +function getMonth(displayedMonth, ..._args) { + const locale = window.moment().locale(); + const month = []; + let week; + const startOfMonth = displayedMonth.clone().locale(locale).date(1); + const startOffset = startOfMonth.weekday(); + let date = startOfMonth.clone().subtract(startOffset, "days"); + for (let _day = 0; _day < 42; _day++) { + if (_day % 7 === 0) { + week = { + days: [], + weekNum: date.week(), + }; + month.push(week); + } + week.days.push(date); + date = date.clone().add(1, "days"); + } + return month; +} + +/* src/components/Day.svelte generated by Svelte v3.35.0 */ + +function add_css$4() { + var style = element("style"); + style.id = "svelte-q3wqg9-style"; + style.textContent = ".day.svelte-q3wqg9{background-color:var(--color-background-day);border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:4px;position:relative;text-align:center;transition:background-color 0.1s ease-in, color 0.1s ease-in;vertical-align:baseline}.day.svelte-q3wqg9:hover{background-color:var(--interactive-hover)}.day.active.svelte-q3wqg9:hover{background-color:var(--interactive-accent-hover)}.adjacent-month.svelte-q3wqg9{opacity:0.25}.today.svelte-q3wqg9{color:var(--color-text-today)}.day.svelte-q3wqg9:active,.active.svelte-q3wqg9,.active.today.svelte-q3wqg9{color:var(--text-on-accent);background-color:var(--interactive-accent)}.dot-container.svelte-q3wqg9{display:flex;flex-wrap:wrap;justify-content:center;line-height:6px;min-height:6px}"; + append(document.head, style); +} + +function get_each_context$2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[11] = list[i]; + return child_ctx; +} + +// (36:8) {#each metadata.dots as dot} +function create_each_block$2(ctx) { + let dot; + let current; + const dot_spread_levels = [/*dot*/ ctx[11]]; + let dot_props = {}; + + for (let i = 0; i < dot_spread_levels.length; i += 1) { + dot_props = assign(dot_props, dot_spread_levels[i]); + } + + dot = new Dot({ props: dot_props }); + + return { + c() { + create_component(dot.$$.fragment); + }, + m(target, anchor) { + mount_component(dot, target, anchor); + current = true; + }, + p(ctx, dirty) { + const dot_changes = (dirty & /*metadata*/ 128) + ? get_spread_update(dot_spread_levels, [get_spread_object(/*dot*/ ctx[11])]) + : {}; + + dot.$set(dot_changes); + }, + i(local) { + if (current) return; + transition_in(dot.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(dot.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(dot, detaching); + } + }; +} + +// (22:2) +function create_default_slot$1(ctx) { + let div1; + let t0_value = /*date*/ ctx[0].format("D") + ""; + let t0; + let t1; + let div0; + let div1_class_value; + let current; + let mounted; + let dispose; + let each_value = /*metadata*/ ctx[7].dots; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + let div1_levels = [ + { + class: div1_class_value = `day ${/*metadata*/ ctx[7].classes.join(" ")}` + }, + /*metadata*/ ctx[7].dataAttributes || {} + ]; + + let div1_data = {}; + + for (let i = 0; i < div1_levels.length; i += 1) { + div1_data = assign(div1_data, div1_levels[i]); + } + + return { + c() { + div1 = element("div"); + t0 = text(t0_value); + t1 = space(); + div0 = element("div"); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + attr(div0, "class", "dot-container svelte-q3wqg9"); + set_attributes(div1, div1_data); + toggle_class(div1, "active", /*selectedId*/ ctx[6] === getDateUID_1(/*date*/ ctx[0], "day")); + toggle_class(div1, "adjacent-month", !/*date*/ ctx[0].isSame(/*displayedMonth*/ ctx[5], "month")); + toggle_class(div1, "today", /*date*/ ctx[0].isSame(/*today*/ ctx[4], "day")); + toggle_class(div1, "svelte-q3wqg9", true); + }, + m(target, anchor) { + insert(target, div1, anchor); + append(div1, t0); + append(div1, t1); + append(div1, div0); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div0, null); + } + + current = true; + + if (!mounted) { + dispose = [ + listen(div1, "click", function () { + if (is_function(/*onClick*/ ctx[2] && /*click_handler*/ ctx[8])) (/*onClick*/ ctx[2] && /*click_handler*/ ctx[8]).apply(this, arguments); + }), + listen(div1, "contextmenu", function () { + if (is_function(/*onContextMenu*/ ctx[3] && /*contextmenu_handler*/ ctx[9])) (/*onContextMenu*/ ctx[3] && /*contextmenu_handler*/ ctx[9]).apply(this, arguments); + }), + listen(div1, "pointerover", function () { + if (is_function(/*onHover*/ ctx[1] && /*pointerover_handler*/ ctx[10])) (/*onHover*/ ctx[1] && /*pointerover_handler*/ ctx[10]).apply(this, arguments); + }) + ]; + + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if ((!current || dirty & /*date*/ 1) && t0_value !== (t0_value = /*date*/ ctx[0].format("D") + "")) set_data(t0, t0_value); + + if (dirty & /*metadata*/ 128) { + each_value = /*metadata*/ ctx[7].dots; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$2(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$2(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(div0, null); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + + set_attributes(div1, div1_data = get_spread_update(div1_levels, [ + (!current || dirty & /*metadata*/ 128 && div1_class_value !== (div1_class_value = `day ${/*metadata*/ ctx[7].classes.join(" ")}`)) && { class: div1_class_value }, + dirty & /*metadata*/ 128 && (/*metadata*/ ctx[7].dataAttributes || {}) + ])); + + toggle_class(div1, "active", /*selectedId*/ ctx[6] === getDateUID_1(/*date*/ ctx[0], "day")); + toggle_class(div1, "adjacent-month", !/*date*/ ctx[0].isSame(/*displayedMonth*/ ctx[5], "month")); + toggle_class(div1, "today", /*date*/ ctx[0].isSame(/*today*/ ctx[4], "day")); + toggle_class(div1, "svelte-q3wqg9", true); + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) detach(div1); + destroy_each(each_blocks, detaching); + mounted = false; + run_all(dispose); + } + }; +} + +function create_fragment$4(ctx) { + let td; + let metadataresolver; + let current; + + metadataresolver = new MetadataResolver({ + props: { + metadata: /*metadata*/ ctx[7], + $$slots: { + default: [ + create_default_slot$1, + ({ metadata }) => ({ 7: metadata }), + ({ metadata }) => metadata ? 128 : 0 + ] + }, + $$scope: { ctx } + } + }); + + return { + c() { + td = element("td"); + create_component(metadataresolver.$$.fragment); + }, + m(target, anchor) { + insert(target, td, anchor); + mount_component(metadataresolver, td, null); + current = true; + }, + p(ctx, [dirty]) { + const metadataresolver_changes = {}; + if (dirty & /*metadata*/ 128) metadataresolver_changes.metadata = /*metadata*/ ctx[7]; + + if (dirty & /*$$scope, metadata, selectedId, date, displayedMonth, today, onClick, onContextMenu, onHover*/ 16639) { + metadataresolver_changes.$$scope = { dirty, ctx }; + } + + metadataresolver.$set(metadataresolver_changes); + }, + i(local) { + if (current) return; + transition_in(metadataresolver.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(metadataresolver.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(td); + destroy_component(metadataresolver); + } + }; +} + +function instance$4($$self, $$props, $$invalidate) { + + + let { date } = $$props; + let { metadata } = $$props; + let { onHover } = $$props; + let { onClick } = $$props; + let { onContextMenu } = $$props; + let { today } = $$props; + let { displayedMonth = null } = $$props; + let { selectedId = null } = $$props; + const click_handler = e => onClick(date, isMetaPressed(e)); + const contextmenu_handler = e => onContextMenu(date, e); + const pointerover_handler = e => onHover(date, e.target, isMetaPressed(e)); + + $$self.$$set = $$props => { + if ("date" in $$props) $$invalidate(0, date = $$props.date); + if ("metadata" in $$props) $$invalidate(7, metadata = $$props.metadata); + if ("onHover" in $$props) $$invalidate(1, onHover = $$props.onHover); + if ("onClick" in $$props) $$invalidate(2, onClick = $$props.onClick); + if ("onContextMenu" in $$props) $$invalidate(3, onContextMenu = $$props.onContextMenu); + if ("today" in $$props) $$invalidate(4, today = $$props.today); + if ("displayedMonth" in $$props) $$invalidate(5, displayedMonth = $$props.displayedMonth); + if ("selectedId" in $$props) $$invalidate(6, selectedId = $$props.selectedId); + }; + + return [ + date, + onHover, + onClick, + onContextMenu, + today, + displayedMonth, + selectedId, + metadata, + click_handler, + contextmenu_handler, + pointerover_handler + ]; +} + +class Day extends SvelteComponent { + constructor(options) { + super(); + if (!document.getElementById("svelte-q3wqg9-style")) add_css$4(); + + init(this, options, instance$4, create_fragment$4, not_equal, { + date: 0, + metadata: 7, + onHover: 1, + onClick: 2, + onContextMenu: 3, + today: 4, + displayedMonth: 5, + selectedId: 6 + }); + } +} + +/* src/components/Arrow.svelte generated by Svelte v3.35.0 */ + +function add_css$3() { + var style = element("style"); + style.id = "svelte-156w7na-style"; + style.textContent = ".arrow.svelte-156w7na.svelte-156w7na{align-items:center;cursor:pointer;display:flex;justify-content:center;width:24px}.arrow.is-mobile.svelte-156w7na.svelte-156w7na{width:32px}.right.svelte-156w7na.svelte-156w7na{transform:rotate(180deg)}.arrow.svelte-156w7na svg.svelte-156w7na{color:var(--color-arrow);height:16px;width:16px}"; + append(document.head, style); +} + +function create_fragment$3(ctx) { + let div; + let svg; + let path; + let mounted; + let dispose; + + return { + c() { + div = element("div"); + svg = svg_element("svg"); + path = svg_element("path"); + attr(path, "fill", "currentColor"); + attr(path, "d", "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"); + attr(svg, "focusable", "false"); + attr(svg, "role", "img"); + attr(svg, "xmlns", "http://www.w3.org/2000/svg"); + attr(svg, "viewBox", "0 0 320 512"); + attr(svg, "class", "svelte-156w7na"); + attr(div, "class", "arrow svelte-156w7na"); + attr(div, "aria-label", /*tooltip*/ ctx[1]); + toggle_class(div, "is-mobile", /*isMobile*/ ctx[3]); + toggle_class(div, "right", /*direction*/ ctx[2] === "right"); + }, + m(target, anchor) { + insert(target, div, anchor); + append(div, svg); + append(svg, path); + + if (!mounted) { + dispose = listen(div, "click", function () { + if (is_function(/*onClick*/ ctx[0])) /*onClick*/ ctx[0].apply(this, arguments); + }); + + mounted = true; + } + }, + p(new_ctx, [dirty]) { + ctx = new_ctx; + + if (dirty & /*tooltip*/ 2) { + attr(div, "aria-label", /*tooltip*/ ctx[1]); + } + + if (dirty & /*direction*/ 4) { + toggle_class(div, "right", /*direction*/ ctx[2] === "right"); + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(div); + mounted = false; + dispose(); + } + }; +} + +function instance$3($$self, $$props, $$invalidate) { + let { onClick } = $$props; + let { tooltip } = $$props; + let { direction } = $$props; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let isMobile = window.app.isMobile; + + $$self.$$set = $$props => { + if ("onClick" in $$props) $$invalidate(0, onClick = $$props.onClick); + if ("tooltip" in $$props) $$invalidate(1, tooltip = $$props.tooltip); + if ("direction" in $$props) $$invalidate(2, direction = $$props.direction); + }; + + return [onClick, tooltip, direction, isMobile]; +} + +class Arrow extends SvelteComponent { + constructor(options) { + super(); + if (!document.getElementById("svelte-156w7na-style")) add_css$3(); + init(this, options, instance$3, create_fragment$3, safe_not_equal, { onClick: 0, tooltip: 1, direction: 2 }); + } +} + +/* src/components/Nav.svelte generated by Svelte v3.35.0 */ + +function add_css$2() { + var style = element("style"); + style.id = "svelte-1vwr9dd-style"; + style.textContent = ".nav.svelte-1vwr9dd.svelte-1vwr9dd{align-items:center;display:flex;margin:0.6em 0 1em;padding:0 8px;width:100%}.nav.is-mobile.svelte-1vwr9dd.svelte-1vwr9dd{padding:0}.title.svelte-1vwr9dd.svelte-1vwr9dd{color:var(--color-text-title);font-size:1.5em;margin:0}.is-mobile.svelte-1vwr9dd .title.svelte-1vwr9dd{font-size:1.3em}.month.svelte-1vwr9dd.svelte-1vwr9dd{font-weight:500;text-transform:capitalize}.year.svelte-1vwr9dd.svelte-1vwr9dd{color:var(--interactive-accent)}.right-nav.svelte-1vwr9dd.svelte-1vwr9dd{display:flex;justify-content:center;margin-left:auto}.reset-button.svelte-1vwr9dd.svelte-1vwr9dd{cursor:pointer;border-radius:4px;color:var(--text-muted);font-size:0.7em;font-weight:600;letter-spacing:1px;margin:0 4px;padding:0px 4px;text-transform:uppercase}.is-mobile.svelte-1vwr9dd .reset-button.svelte-1vwr9dd{display:none}"; + append(document.head, style); +} + +function create_fragment$2(ctx) { + let div2; + let h3; + let span0; + let t0_value = /*displayedMonth*/ ctx[0].format("MMM") + ""; + let t0; + let t1; + let span1; + let t2_value = /*displayedMonth*/ ctx[0].format("YYYY") + ""; + let t2; + let t3; + let div1; + let arrow0; + let t4; + let div0; + let t6; + let arrow1; + let current; + let mounted; + let dispose; + + arrow0 = new Arrow({ + props: { + direction: "left", + onClick: /*decrementDisplayedMonth*/ ctx[3], + tooltip: "Previous Month" + } + }); + + arrow1 = new Arrow({ + props: { + direction: "right", + onClick: /*incrementDisplayedMonth*/ ctx[2], + tooltip: "Next Month" + } + }); + + return { + c() { + div2 = element("div"); + h3 = element("h3"); + span0 = element("span"); + t0 = text(t0_value); + t1 = space(); + span1 = element("span"); + t2 = text(t2_value); + t3 = space(); + div1 = element("div"); + create_component(arrow0.$$.fragment); + t4 = space(); + div0 = element("div"); + div0.textContent = `${/*todayDisplayStr*/ ctx[4]}`; + t6 = space(); + create_component(arrow1.$$.fragment); + attr(span0, "class", "month svelte-1vwr9dd"); + attr(span1, "class", "year svelte-1vwr9dd"); + attr(h3, "class", "title svelte-1vwr9dd"); + attr(div0, "class", "reset-button svelte-1vwr9dd"); + attr(div1, "class", "right-nav svelte-1vwr9dd"); + attr(div2, "class", "nav svelte-1vwr9dd"); + toggle_class(div2, "is-mobile", /*isMobile*/ ctx[5]); + }, + m(target, anchor) { + insert(target, div2, anchor); + append(div2, h3); + append(h3, span0); + append(span0, t0); + append(h3, t1); + append(h3, span1); + append(span1, t2); + append(div2, t3); + append(div2, div1); + mount_component(arrow0, div1, null); + append(div1, t4); + append(div1, div0); + append(div1, t6); + mount_component(arrow1, div1, null); + current = true; + + if (!mounted) { + dispose = [ + listen(h3, "click", function () { + if (is_function(/*resetDisplayedMonth*/ ctx[1])) /*resetDisplayedMonth*/ ctx[1].apply(this, arguments); + }), + listen(div0, "click", function () { + if (is_function(/*resetDisplayedMonth*/ ctx[1])) /*resetDisplayedMonth*/ ctx[1].apply(this, arguments); + }) + ]; + + mounted = true; + } + }, + p(new_ctx, [dirty]) { + ctx = new_ctx; + if ((!current || dirty & /*displayedMonth*/ 1) && t0_value !== (t0_value = /*displayedMonth*/ ctx[0].format("MMM") + "")) set_data(t0, t0_value); + if ((!current || dirty & /*displayedMonth*/ 1) && t2_value !== (t2_value = /*displayedMonth*/ ctx[0].format("YYYY") + "")) set_data(t2, t2_value); + const arrow0_changes = {}; + if (dirty & /*decrementDisplayedMonth*/ 8) arrow0_changes.onClick = /*decrementDisplayedMonth*/ ctx[3]; + arrow0.$set(arrow0_changes); + const arrow1_changes = {}; + if (dirty & /*incrementDisplayedMonth*/ 4) arrow1_changes.onClick = /*incrementDisplayedMonth*/ ctx[2]; + arrow1.$set(arrow1_changes); + }, + i(local) { + if (current) return; + transition_in(arrow0.$$.fragment, local); + transition_in(arrow1.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(arrow0.$$.fragment, local); + transition_out(arrow1.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(div2); + destroy_component(arrow0); + destroy_component(arrow1); + mounted = false; + run_all(dispose); + } + }; +} + +function instance$2($$self, $$props, $$invalidate) { + + let { displayedMonth } = $$props; + let { today } = $$props; + let { resetDisplayedMonth } = $$props; + let { incrementDisplayedMonth } = $$props; + let { decrementDisplayedMonth } = $$props; + + // Get the word 'Today' but localized to the current language + const todayDisplayStr = today.calendar().split(/\d|\s/)[0]; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let isMobile = window.app.isMobile; + + $$self.$$set = $$props => { + if ("displayedMonth" in $$props) $$invalidate(0, displayedMonth = $$props.displayedMonth); + if ("today" in $$props) $$invalidate(6, today = $$props.today); + if ("resetDisplayedMonth" in $$props) $$invalidate(1, resetDisplayedMonth = $$props.resetDisplayedMonth); + if ("incrementDisplayedMonth" in $$props) $$invalidate(2, incrementDisplayedMonth = $$props.incrementDisplayedMonth); + if ("decrementDisplayedMonth" in $$props) $$invalidate(3, decrementDisplayedMonth = $$props.decrementDisplayedMonth); + }; + + return [ + displayedMonth, + resetDisplayedMonth, + incrementDisplayedMonth, + decrementDisplayedMonth, + todayDisplayStr, + isMobile, + today + ]; +} + +class Nav extends SvelteComponent { + constructor(options) { + super(); + if (!document.getElementById("svelte-1vwr9dd-style")) add_css$2(); + + init(this, options, instance$2, create_fragment$2, safe_not_equal, { + displayedMonth: 0, + today: 6, + resetDisplayedMonth: 1, + incrementDisplayedMonth: 2, + decrementDisplayedMonth: 3 + }); + } +} + +/* src/components/WeekNum.svelte generated by Svelte v3.35.0 */ + +function add_css$1() { + var style = element("style"); + style.id = "svelte-egt0yd-style"; + style.textContent = "td.svelte-egt0yd{border-right:1px solid var(--background-modifier-border)}.week-num.svelte-egt0yd{background-color:var(--color-background-weeknum);border-radius:4px;color:var(--color-text-weeknum);cursor:pointer;font-size:0.65em;height:100%;padding:4px;text-align:center;transition:background-color 0.1s ease-in, color 0.1s ease-in;vertical-align:baseline}.week-num.svelte-egt0yd:hover{background-color:var(--interactive-hover)}.week-num.active.svelte-egt0yd:hover{background-color:var(--interactive-accent-hover)}.active.svelte-egt0yd{color:var(--text-on-accent);background-color:var(--interactive-accent)}.dot-container.svelte-egt0yd{display:flex;flex-wrap:wrap;justify-content:center;line-height:6px;min-height:6px}"; + append(document.head, style); +} + +function get_each_context$1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[11] = list[i]; + return child_ctx; +} + +// (35:8) {#each metadata.dots as dot} +function create_each_block$1(ctx) { + let dot; + let current; + const dot_spread_levels = [/*dot*/ ctx[11]]; + let dot_props = {}; + + for (let i = 0; i < dot_spread_levels.length; i += 1) { + dot_props = assign(dot_props, dot_spread_levels[i]); + } + + dot = new Dot({ props: dot_props }); + + return { + c() { + create_component(dot.$$.fragment); + }, + m(target, anchor) { + mount_component(dot, target, anchor); + current = true; + }, + p(ctx, dirty) { + const dot_changes = (dirty & /*metadata*/ 64) + ? get_spread_update(dot_spread_levels, [get_spread_object(/*dot*/ ctx[11])]) + : {}; + + dot.$set(dot_changes); + }, + i(local) { + if (current) return; + transition_in(dot.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(dot.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(dot, detaching); + } + }; +} + +// (24:2) +function create_default_slot(ctx) { + let div1; + let t0; + let t1; + let div0; + let div1_class_value; + let current; + let mounted; + let dispose; + let each_value = /*metadata*/ ctx[6].dots; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + div1 = element("div"); + t0 = text(/*weekNum*/ ctx[0]); + t1 = space(); + div0 = element("div"); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + attr(div0, "class", "dot-container svelte-egt0yd"); + attr(div1, "class", div1_class_value = "" + (null_to_empty(`week-num ${/*metadata*/ ctx[6].classes.join(" ")}`) + " svelte-egt0yd")); + toggle_class(div1, "active", /*selectedId*/ ctx[5] === getDateUID_1(/*days*/ ctx[1][0], "week")); + }, + m(target, anchor) { + insert(target, div1, anchor); + append(div1, t0); + append(div1, t1); + append(div1, div0); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div0, null); + } + + current = true; + + if (!mounted) { + dispose = [ + listen(div1, "click", function () { + if (is_function(/*onClick*/ ctx[3] && /*click_handler*/ ctx[8])) (/*onClick*/ ctx[3] && /*click_handler*/ ctx[8]).apply(this, arguments); + }), + listen(div1, "contextmenu", function () { + if (is_function(/*onContextMenu*/ ctx[4] && /*contextmenu_handler*/ ctx[9])) (/*onContextMenu*/ ctx[4] && /*contextmenu_handler*/ ctx[9]).apply(this, arguments); + }), + listen(div1, "pointerover", function () { + if (is_function(/*onHover*/ ctx[2] && /*pointerover_handler*/ ctx[10])) (/*onHover*/ ctx[2] && /*pointerover_handler*/ ctx[10]).apply(this, arguments); + }) + ]; + + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (!current || dirty & /*weekNum*/ 1) set_data(t0, /*weekNum*/ ctx[0]); + + if (dirty & /*metadata*/ 64) { + each_value = /*metadata*/ ctx[6].dots; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$1(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$1(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(div0, null); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + + if (!current || dirty & /*metadata*/ 64 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`week-num ${/*metadata*/ ctx[6].classes.join(" ")}`) + " svelte-egt0yd"))) { + attr(div1, "class", div1_class_value); + } + + if (dirty & /*metadata, selectedId, getDateUID, days*/ 98) { + toggle_class(div1, "active", /*selectedId*/ ctx[5] === getDateUID_1(/*days*/ ctx[1][0], "week")); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) detach(div1); + destroy_each(each_blocks, detaching); + mounted = false; + run_all(dispose); + } + }; +} + +function create_fragment$1(ctx) { + let td; + let metadataresolver; + let current; + + metadataresolver = new MetadataResolver({ + props: { + metadata: /*metadata*/ ctx[6], + $$slots: { + default: [ + create_default_slot, + ({ metadata }) => ({ 6: metadata }), + ({ metadata }) => metadata ? 64 : 0 + ] + }, + $$scope: { ctx } + } + }); + + return { + c() { + td = element("td"); + create_component(metadataresolver.$$.fragment); + attr(td, "class", "svelte-egt0yd"); + }, + m(target, anchor) { + insert(target, td, anchor); + mount_component(metadataresolver, td, null); + current = true; + }, + p(ctx, [dirty]) { + const metadataresolver_changes = {}; + if (dirty & /*metadata*/ 64) metadataresolver_changes.metadata = /*metadata*/ ctx[6]; + + if (dirty & /*$$scope, metadata, selectedId, days, onClick, startOfWeek, onContextMenu, onHover, weekNum*/ 16639) { + metadataresolver_changes.$$scope = { dirty, ctx }; + } + + metadataresolver.$set(metadataresolver_changes); + }, + i(local) { + if (current) return; + transition_in(metadataresolver.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(metadataresolver.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(td); + destroy_component(metadataresolver); + } + }; +} + +function instance$1($$self, $$props, $$invalidate) { + + + let { weekNum } = $$props; + let { days } = $$props; + let { metadata } = $$props; + let { onHover } = $$props; + let { onClick } = $$props; + let { onContextMenu } = $$props; + let { selectedId = null } = $$props; + let startOfWeek; + const click_handler = e => onClick(startOfWeek, isMetaPressed(e)); + const contextmenu_handler = e => onContextMenu(days[0], e); + const pointerover_handler = e => onHover(startOfWeek, e.target, isMetaPressed(e)); + + $$self.$$set = $$props => { + if ("weekNum" in $$props) $$invalidate(0, weekNum = $$props.weekNum); + if ("days" in $$props) $$invalidate(1, days = $$props.days); + if ("metadata" in $$props) $$invalidate(6, metadata = $$props.metadata); + if ("onHover" in $$props) $$invalidate(2, onHover = $$props.onHover); + if ("onClick" in $$props) $$invalidate(3, onClick = $$props.onClick); + if ("onContextMenu" in $$props) $$invalidate(4, onContextMenu = $$props.onContextMenu); + if ("selectedId" in $$props) $$invalidate(5, selectedId = $$props.selectedId); + }; + + $$self.$$.update = () => { + if ($$self.$$.dirty & /*days*/ 2) { + $$invalidate(7, startOfWeek = getStartOfWeek(days)); + } + }; + + return [ + weekNum, + days, + onHover, + onClick, + onContextMenu, + selectedId, + metadata, + startOfWeek, + click_handler, + contextmenu_handler, + pointerover_handler + ]; +} + +class WeekNum extends SvelteComponent { + constructor(options) { + super(); + if (!document.getElementById("svelte-egt0yd-style")) add_css$1(); + + init(this, options, instance$1, create_fragment$1, not_equal, { + weekNum: 0, + days: 1, + metadata: 6, + onHover: 2, + onClick: 3, + onContextMenu: 4, + selectedId: 5 + }); + } +} + +async function metadataReducer(promisedMetadata) { + const meta = { + dots: [], + classes: [], + dataAttributes: {}, + }; + const metas = await Promise.all(promisedMetadata); + return metas.reduce((acc, meta) => ({ + classes: [...acc.classes, ...(meta.classes || [])], + dataAttributes: Object.assign(acc.dataAttributes, meta.dataAttributes), + dots: [...acc.dots, ...(meta.dots || [])], + }), meta); +} +function getDailyMetadata(sources, date, ..._args) { + return metadataReducer(sources.map((source) => source.getDailyMetadata(date))); +} +function getWeeklyMetadata(sources, date, ..._args) { + return metadataReducer(sources.map((source) => source.getWeeklyMetadata(date))); +} + +/* src/components/Calendar.svelte generated by Svelte v3.35.0 */ + +function add_css() { + var style = element("style"); + style.id = "svelte-pcimu8-style"; + style.textContent = ".container.svelte-pcimu8{--color-background-heading:transparent;--color-background-day:transparent;--color-background-weeknum:transparent;--color-background-weekend:transparent;--color-dot:var(--text-muted);--color-arrow:var(--text-muted);--color-button:var(--text-muted);--color-text-title:var(--text-normal);--color-text-heading:var(--text-muted);--color-text-day:var(--text-normal);--color-text-today:var(--interactive-accent);--color-text-weeknum:var(--text-muted)}.container.svelte-pcimu8{padding:0 8px}.container.is-mobile.svelte-pcimu8{padding:0}th.svelte-pcimu8{text-align:center}.weekend.svelte-pcimu8{background-color:var(--color-background-weekend)}.calendar.svelte-pcimu8{border-collapse:collapse;width:100%}th.svelte-pcimu8{background-color:var(--color-background-heading);color:var(--color-text-heading);font-size:0.6em;letter-spacing:1px;padding:4px;text-transform:uppercase}"; + append(document.head, style); +} + +function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[18] = list[i]; + return child_ctx; +} + +function get_each_context_1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[21] = list[i]; + return child_ctx; +} + +function get_each_context_2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[24] = list[i]; + return child_ctx; +} + +function get_each_context_3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[27] = list[i]; + return child_ctx; +} + +// (55:6) {#if showWeekNums} +function create_if_block_2(ctx) { + let col; + + return { + c() { + col = element("col"); + }, + m(target, anchor) { + insert(target, col, anchor); + }, + d(detaching) { + if (detaching) detach(col); + } + }; +} + +// (58:6) {#each month[1].days as date} +function create_each_block_3(ctx) { + let col; + + return { + c() { + col = element("col"); + attr(col, "class", "svelte-pcimu8"); + toggle_class(col, "weekend", isWeekend(/*date*/ ctx[27])); + }, + m(target, anchor) { + insert(target, col, anchor); + }, + p(ctx, dirty) { + if (dirty & /*isWeekend, month*/ 16384) { + toggle_class(col, "weekend", isWeekend(/*date*/ ctx[27])); + } + }, + d(detaching) { + if (detaching) detach(col); + } + }; +} + +// (64:8) {#if showWeekNums} +function create_if_block_1(ctx) { + let th; + + return { + c() { + th = element("th"); + th.textContent = "W"; + attr(th, "class", "svelte-pcimu8"); + }, + m(target, anchor) { + insert(target, th, anchor); + }, + d(detaching) { + if (detaching) detach(th); + } + }; +} + +// (67:8) {#each daysOfWeek as dayOfWeek} +function create_each_block_2(ctx) { + let th; + let t_value = /*dayOfWeek*/ ctx[24] + ""; + let t; + + return { + c() { + th = element("th"); + t = text(t_value); + attr(th, "class", "svelte-pcimu8"); + }, + m(target, anchor) { + insert(target, th, anchor); + append(th, t); + }, + p(ctx, dirty) { + if (dirty & /*daysOfWeek*/ 32768 && t_value !== (t_value = /*dayOfWeek*/ ctx[24] + "")) set_data(t, t_value); + }, + d(detaching) { + if (detaching) detach(th); + } + }; +} + +// (75:10) {#if showWeekNums} +function create_if_block(ctx) { + let weeknum; + let current; + + const weeknum_spread_levels = [ + /*week*/ ctx[18], + { + metadata: getWeeklyMetadata(/*sources*/ ctx[8], /*week*/ ctx[18].days[0], /*today*/ ctx[10]) + }, + { onClick: /*onClickWeek*/ ctx[7] }, + { + onContextMenu: /*onContextMenuWeek*/ ctx[5] + }, + { onHover: /*onHoverWeek*/ ctx[3] }, + { selectedId: /*selectedId*/ ctx[9] } + ]; + + let weeknum_props = {}; + + for (let i = 0; i < weeknum_spread_levels.length; i += 1) { + weeknum_props = assign(weeknum_props, weeknum_spread_levels[i]); + } + + weeknum = new WeekNum({ props: weeknum_props }); + + return { + c() { + create_component(weeknum.$$.fragment); + }, + m(target, anchor) { + mount_component(weeknum, target, anchor); + current = true; + }, + p(ctx, dirty) { + const weeknum_changes = (dirty & /*month, getWeeklyMetadata, sources, today, onClickWeek, onContextMenuWeek, onHoverWeek, selectedId*/ 18344) + ? get_spread_update(weeknum_spread_levels, [ + dirty & /*month*/ 16384 && get_spread_object(/*week*/ ctx[18]), + dirty & /*getWeeklyMetadata, sources, month, today*/ 17664 && { + metadata: getWeeklyMetadata(/*sources*/ ctx[8], /*week*/ ctx[18].days[0], /*today*/ ctx[10]) + }, + dirty & /*onClickWeek*/ 128 && { onClick: /*onClickWeek*/ ctx[7] }, + dirty & /*onContextMenuWeek*/ 32 && { + onContextMenu: /*onContextMenuWeek*/ ctx[5] + }, + dirty & /*onHoverWeek*/ 8 && { onHover: /*onHoverWeek*/ ctx[3] }, + dirty & /*selectedId*/ 512 && { selectedId: /*selectedId*/ ctx[9] } + ]) + : {}; + + weeknum.$set(weeknum_changes); + }, + i(local) { + if (current) return; + transition_in(weeknum.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(weeknum.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(weeknum, detaching); + } + }; +} + +// (85:10) {#each week.days as day (day.format())} +function create_each_block_1(key_1, ctx) { + let first; + let day; + let current; + + day = new Day({ + props: { + date: /*day*/ ctx[21], + today: /*today*/ ctx[10], + displayedMonth: /*displayedMonth*/ ctx[0], + onClick: /*onClickDay*/ ctx[6], + onContextMenu: /*onContextMenuDay*/ ctx[4], + onHover: /*onHoverDay*/ ctx[2], + metadata: getDailyMetadata(/*sources*/ ctx[8], /*day*/ ctx[21], /*today*/ ctx[10]), + selectedId: /*selectedId*/ ctx[9] + } + }); + + return { + key: key_1, + first: null, + c() { + first = empty(); + create_component(day.$$.fragment); + this.first = first; + }, + m(target, anchor) { + insert(target, first, anchor); + mount_component(day, target, anchor); + current = true; + }, + p(new_ctx, dirty) { + ctx = new_ctx; + const day_changes = {}; + if (dirty & /*month*/ 16384) day_changes.date = /*day*/ ctx[21]; + if (dirty & /*today*/ 1024) day_changes.today = /*today*/ ctx[10]; + if (dirty & /*displayedMonth*/ 1) day_changes.displayedMonth = /*displayedMonth*/ ctx[0]; + if (dirty & /*onClickDay*/ 64) day_changes.onClick = /*onClickDay*/ ctx[6]; + if (dirty & /*onContextMenuDay*/ 16) day_changes.onContextMenu = /*onContextMenuDay*/ ctx[4]; + if (dirty & /*onHoverDay*/ 4) day_changes.onHover = /*onHoverDay*/ ctx[2]; + if (dirty & /*sources, month, today*/ 17664) day_changes.metadata = getDailyMetadata(/*sources*/ ctx[8], /*day*/ ctx[21], /*today*/ ctx[10]); + if (dirty & /*selectedId*/ 512) day_changes.selectedId = /*selectedId*/ ctx[9]; + day.$set(day_changes); + }, + i(local) { + if (current) return; + transition_in(day.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(day.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(first); + destroy_component(day, detaching); + } + }; +} + +// (73:6) {#each month as week (week.weekNum)} +function create_each_block(key_1, ctx) { + let tr; + let t0; + let each_blocks = []; + let each_1_lookup = new Map(); + let t1; + let current; + let if_block = /*showWeekNums*/ ctx[1] && create_if_block(ctx); + let each_value_1 = /*week*/ ctx[18].days; + const get_key = ctx => /*day*/ ctx[21].format(); + + for (let i = 0; i < each_value_1.length; i += 1) { + let child_ctx = get_each_context_1(ctx, each_value_1, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block_1(key, child_ctx)); + } + + return { + key: key_1, + first: null, + c() { + tr = element("tr"); + if (if_block) if_block.c(); + t0 = space(); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + t1 = space(); + this.first = tr; + }, + m(target, anchor) { + insert(target, tr, anchor); + if (if_block) if_block.m(tr, null); + append(tr, t0); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(tr, null); + } + + append(tr, t1); + current = true; + }, + p(new_ctx, dirty) { + ctx = new_ctx; + + if (/*showWeekNums*/ ctx[1]) { + if (if_block) { + if_block.p(ctx, dirty); + + if (dirty & /*showWeekNums*/ 2) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block(ctx); + if_block.c(); + transition_in(if_block, 1); + if_block.m(tr, t0); + } + } else if (if_block) { + group_outros(); + + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + + check_outros(); + } + + if (dirty & /*month, today, displayedMonth, onClickDay, onContextMenuDay, onHoverDay, getDailyMetadata, sources, selectedId*/ 18261) { + each_value_1 = /*week*/ ctx[18].days; + group_outros(); + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, tr, outro_and_destroy_block, create_each_block_1, t1, get_each_context_1); + check_outros(); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + + for (let i = 0; i < each_value_1.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + transition_out(if_block); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) detach(tr); + if (if_block) if_block.d(); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} + +function create_fragment$7(ctx) { + let div; + let nav; + let t0; + let table; + let colgroup; + let t1; + let t2; + let thead; + let tr; + let t3; + let t4; + let tbody; + let each_blocks = []; + let each2_lookup = new Map(); + let current; + + nav = new Nav({ + props: { + today: /*today*/ ctx[10], + displayedMonth: /*displayedMonth*/ ctx[0], + incrementDisplayedMonth: /*incrementDisplayedMonth*/ ctx[11], + decrementDisplayedMonth: /*decrementDisplayedMonth*/ ctx[12], + resetDisplayedMonth: /*resetDisplayedMonth*/ ctx[13] + } + }); + + let if_block0 = /*showWeekNums*/ ctx[1] && create_if_block_2(); + let each_value_3 = /*month*/ ctx[14][1].days; + let each_blocks_2 = []; + + for (let i = 0; i < each_value_3.length; i += 1) { + each_blocks_2[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); + } + + let if_block1 = /*showWeekNums*/ ctx[1] && create_if_block_1(); + let each_value_2 = /*daysOfWeek*/ ctx[15]; + let each_blocks_1 = []; + + for (let i = 0; i < each_value_2.length; i += 1) { + each_blocks_1[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); + } + + let each_value = /*month*/ ctx[14]; + const get_key = ctx => /*week*/ ctx[18].weekNum; + + for (let i = 0; i < each_value.length; i += 1) { + let child_ctx = get_each_context(ctx, each_value, i); + let key = get_key(child_ctx); + each2_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx)); + } + + return { + c() { + div = element("div"); + create_component(nav.$$.fragment); + t0 = space(); + table = element("table"); + colgroup = element("colgroup"); + if (if_block0) if_block0.c(); + t1 = space(); + + for (let i = 0; i < each_blocks_2.length; i += 1) { + each_blocks_2[i].c(); + } + + t2 = space(); + thead = element("thead"); + tr = element("tr"); + if (if_block1) if_block1.c(); + t3 = space(); + + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].c(); + } + + t4 = space(); + tbody = element("tbody"); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + attr(table, "class", "calendar svelte-pcimu8"); + attr(div, "id", "calendar-container"); + attr(div, "class", "container svelte-pcimu8"); + toggle_class(div, "is-mobile", /*isMobile*/ ctx[16]); + }, + m(target, anchor) { + insert(target, div, anchor); + mount_component(nav, div, null); + append(div, t0); + append(div, table); + append(table, colgroup); + if (if_block0) if_block0.m(colgroup, null); + append(colgroup, t1); + + for (let i = 0; i < each_blocks_2.length; i += 1) { + each_blocks_2[i].m(colgroup, null); + } + + append(table, t2); + append(table, thead); + append(thead, tr); + if (if_block1) if_block1.m(tr, null); + append(tr, t3); + + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].m(tr, null); + } + + append(table, t4); + append(table, tbody); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(tbody, null); + } + + current = true; + }, + p(ctx, [dirty]) { + const nav_changes = {}; + if (dirty & /*today*/ 1024) nav_changes.today = /*today*/ ctx[10]; + if (dirty & /*displayedMonth*/ 1) nav_changes.displayedMonth = /*displayedMonth*/ ctx[0]; + nav.$set(nav_changes); + + if (/*showWeekNums*/ ctx[1]) { + if (if_block0) ; else { + if_block0 = create_if_block_2(); + if_block0.c(); + if_block0.m(colgroup, t1); + } + } else if (if_block0) { + if_block0.d(1); + if_block0 = null; + } + + if (dirty & /*isWeekend, month*/ 16384) { + each_value_3 = /*month*/ ctx[14][1].days; + let i; + + for (i = 0; i < each_value_3.length; i += 1) { + const child_ctx = get_each_context_3(ctx, each_value_3, i); + + if (each_blocks_2[i]) { + each_blocks_2[i].p(child_ctx, dirty); + } else { + each_blocks_2[i] = create_each_block_3(child_ctx); + each_blocks_2[i].c(); + each_blocks_2[i].m(colgroup, null); + } + } + + for (; i < each_blocks_2.length; i += 1) { + each_blocks_2[i].d(1); + } + + each_blocks_2.length = each_value_3.length; + } + + if (/*showWeekNums*/ ctx[1]) { + if (if_block1) ; else { + if_block1 = create_if_block_1(); + if_block1.c(); + if_block1.m(tr, t3); + } + } else if (if_block1) { + if_block1.d(1); + if_block1 = null; + } + + if (dirty & /*daysOfWeek*/ 32768) { + each_value_2 = /*daysOfWeek*/ ctx[15]; + let i; + + for (i = 0; i < each_value_2.length; i += 1) { + const child_ctx = get_each_context_2(ctx, each_value_2, i); + + if (each_blocks_1[i]) { + each_blocks_1[i].p(child_ctx, dirty); + } else { + each_blocks_1[i] = create_each_block_2(child_ctx); + each_blocks_1[i].c(); + each_blocks_1[i].m(tr, null); + } + } + + for (; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].d(1); + } + + each_blocks_1.length = each_value_2.length; + } + + if (dirty & /*month, today, displayedMonth, onClickDay, onContextMenuDay, onHoverDay, getDailyMetadata, sources, selectedId, getWeeklyMetadata, onClickWeek, onContextMenuWeek, onHoverWeek, showWeekNums*/ 18431) { + each_value = /*month*/ ctx[14]; + group_outros(); + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each2_lookup, tbody, outro_and_destroy_block, create_each_block, null, get_each_context); + check_outros(); + } + }, + i(local) { + if (current) return; + transition_in(nav.$$.fragment, local); + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + transition_out(nav.$$.fragment, local); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) detach(div); + destroy_component(nav); + if (if_block0) if_block0.d(); + destroy_each(each_blocks_2, detaching); + if (if_block1) if_block1.d(); + destroy_each(each_blocks_1, detaching); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(); + } + } + }; +} + +function instance$7($$self, $$props, $$invalidate) { + + + let { localeData } = $$props; + let { showWeekNums = false } = $$props; + let { onHoverDay } = $$props; + let { onHoverWeek } = $$props; + let { onContextMenuDay } = $$props; + let { onContextMenuWeek } = $$props; + let { onClickDay } = $$props; + let { onClickWeek } = $$props; + let { sources = [] } = $$props; + let { selectedId } = $$props; + let { today = window.moment() } = $$props; + let { displayedMonth = today } = $$props; + let month; + let daysOfWeek; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let isMobile = window.app.isMobile; + + function incrementDisplayedMonth() { + $$invalidate(0, displayedMonth = displayedMonth.clone().add(1, "month")); + } + + function decrementDisplayedMonth() { + $$invalidate(0, displayedMonth = displayedMonth.clone().subtract(1, "month")); + } + + function resetDisplayedMonth() { + $$invalidate(0, displayedMonth = today.clone()); + } + + $$self.$$set = $$props => { + if ("localeData" in $$props) $$invalidate(17, localeData = $$props.localeData); + if ("showWeekNums" in $$props) $$invalidate(1, showWeekNums = $$props.showWeekNums); + if ("onHoverDay" in $$props) $$invalidate(2, onHoverDay = $$props.onHoverDay); + if ("onHoverWeek" in $$props) $$invalidate(3, onHoverWeek = $$props.onHoverWeek); + if ("onContextMenuDay" in $$props) $$invalidate(4, onContextMenuDay = $$props.onContextMenuDay); + if ("onContextMenuWeek" in $$props) $$invalidate(5, onContextMenuWeek = $$props.onContextMenuWeek); + if ("onClickDay" in $$props) $$invalidate(6, onClickDay = $$props.onClickDay); + if ("onClickWeek" in $$props) $$invalidate(7, onClickWeek = $$props.onClickWeek); + if ("sources" in $$props) $$invalidate(8, sources = $$props.sources); + if ("selectedId" in $$props) $$invalidate(9, selectedId = $$props.selectedId); + if ("today" in $$props) $$invalidate(10, today = $$props.today); + if ("displayedMonth" in $$props) $$invalidate(0, displayedMonth = $$props.displayedMonth); + }; + + $$self.$$.update = () => { + if ($$self.$$.dirty & /*displayedMonth, localeData*/ 131073) { + $$invalidate(14, month = getMonth(displayedMonth, localeData)); + } + + if ($$self.$$.dirty & /*today, localeData*/ 132096) { + $$invalidate(15, daysOfWeek = getDaysOfWeek(today, localeData)); + } + }; + + return [ + displayedMonth, + showWeekNums, + onHoverDay, + onHoverWeek, + onContextMenuDay, + onContextMenuWeek, + onClickDay, + onClickWeek, + sources, + selectedId, + today, + incrementDisplayedMonth, + decrementDisplayedMonth, + resetDisplayedMonth, + month, + daysOfWeek, + isMobile, + localeData + ]; +} + +class Calendar$1 extends SvelteComponent { + constructor(options) { + super(); + if (!document.getElementById("svelte-pcimu8-style")) add_css(); + + init(this, options, instance$7, create_fragment$7, not_equal, { + localeData: 17, + showWeekNums: 1, + onHoverDay: 2, + onHoverWeek: 3, + onContextMenuDay: 4, + onContextMenuWeek: 5, + onClickDay: 6, + onClickWeek: 7, + sources: 8, + selectedId: 9, + today: 10, + displayedMonth: 0, + incrementDisplayedMonth: 11, + decrementDisplayedMonth: 12, + resetDisplayedMonth: 13 + }); + } + + get incrementDisplayedMonth() { + return this.$$.ctx[11]; + } + + get decrementDisplayedMonth() { + return this.$$.ctx[12]; + } + + get resetDisplayedMonth() { + return this.$$.ctx[13]; + } +} + +const langToMomentLocale = { + en: "en-gb", + zh: "zh-cn", + "zh-TW": "zh-tw", + ru: "ru", + ko: "ko", + it: "it", + id: "id", + ro: "ro", + "pt-BR": "pt-br", + cz: "cs", + da: "da", + de: "de", + es: "es", + fr: "fr", + no: "nn", + pl: "pl", + pt: "pt", + tr: "tr", + hi: "hi", + nl: "nl", + ar: "ar", + ja: "ja", +}; +const weekdays = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", +]; +function overrideGlobalMomentWeekStart(weekStart) { + const { moment } = window; + const currentLocale = moment.locale(); + // Save the initial locale weekspec so that we can restore + // it when toggling between the different options in settings. + if (!window._bundledLocaleWeekSpec) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + window._bundledLocaleWeekSpec = moment.localeData()._week; + } + if (weekStart === "locale") { + moment.updateLocale(currentLocale, { + week: window._bundledLocaleWeekSpec, + }); + } + else { + moment.updateLocale(currentLocale, { + week: { + dow: weekdays.indexOf(weekStart) || 0, + }, + }); + } +} +/** + * Sets the locale used by the calendar. This allows the calendar to + * default to the user's locale (e.g. Start Week on Sunday/Monday/Friday) + * + * @param localeOverride locale string (e.g. "en-US") + */ +function configureGlobalMomentLocale(localeOverride = "system-default", weekStart = "locale") { + var _a; + const obsidianLang = localStorage.getItem("language") || "en"; + const systemLang = (_a = navigator.language) === null || _a === void 0 ? void 0 : _a.toLowerCase(); + let momentLocale = langToMomentLocale[obsidianLang]; + if (localeOverride !== "system-default") { + momentLocale = localeOverride; + } + else if (systemLang.startsWith(obsidianLang)) { + // If the system locale is more specific (en-gb vs en), use the system locale. + momentLocale = systemLang; + } + const currentLocale = window.moment.locale(momentLocale); + console.debug(`[Calendar] Trying to switch Moment.js global locale to ${momentLocale}, got ${currentLocale}`); + overrideGlobalMomentWeekStart(weekStart); + return currentLocale; +} + +/* src/ui/Calendar.svelte generated by Svelte v3.35.0 */ + +function create_fragment(ctx) { + let calendarbase; + let updating_displayedMonth; + let current; + + function calendarbase_displayedMonth_binding(value) { + /*calendarbase_displayedMonth_binding*/ ctx[12](value); + } + + let calendarbase_props = { + sources: /*sources*/ ctx[1], + today: /*today*/ ctx[9], + onHoverDay: /*onHoverDay*/ ctx[2], + onHoverWeek: /*onHoverWeek*/ ctx[3], + onContextMenuDay: /*onContextMenuDay*/ ctx[6], + onContextMenuWeek: /*onContextMenuWeek*/ ctx[7], + onClickDay: /*onClickDay*/ ctx[4], + onClickWeek: /*onClickWeek*/ ctx[5], + localeData: /*today*/ ctx[9].localeData(), + selectedId: /*$activeFile*/ ctx[10], + showWeekNums: /*$settings*/ ctx[8].showWeeklyNote + }; + + if (/*displayedMonth*/ ctx[0] !== void 0) { + calendarbase_props.displayedMonth = /*displayedMonth*/ ctx[0]; + } + + calendarbase = new Calendar$1({ props: calendarbase_props }); + binding_callbacks$1.push(() => bind(calendarbase, "displayedMonth", calendarbase_displayedMonth_binding)); + + return { + c() { + create_component$1(calendarbase.$$.fragment); + }, + m(target, anchor) { + mount_component$1(calendarbase, target, anchor); + current = true; + }, + p(ctx, [dirty]) { + const calendarbase_changes = {}; + if (dirty & /*sources*/ 2) calendarbase_changes.sources = /*sources*/ ctx[1]; + if (dirty & /*today*/ 512) calendarbase_changes.today = /*today*/ ctx[9]; + if (dirty & /*onHoverDay*/ 4) calendarbase_changes.onHoverDay = /*onHoverDay*/ ctx[2]; + if (dirty & /*onHoverWeek*/ 8) calendarbase_changes.onHoverWeek = /*onHoverWeek*/ ctx[3]; + if (dirty & /*onContextMenuDay*/ 64) calendarbase_changes.onContextMenuDay = /*onContextMenuDay*/ ctx[6]; + if (dirty & /*onContextMenuWeek*/ 128) calendarbase_changes.onContextMenuWeek = /*onContextMenuWeek*/ ctx[7]; + if (dirty & /*onClickDay*/ 16) calendarbase_changes.onClickDay = /*onClickDay*/ ctx[4]; + if (dirty & /*onClickWeek*/ 32) calendarbase_changes.onClickWeek = /*onClickWeek*/ ctx[5]; + if (dirty & /*today*/ 512) calendarbase_changes.localeData = /*today*/ ctx[9].localeData(); + if (dirty & /*$activeFile*/ 1024) calendarbase_changes.selectedId = /*$activeFile*/ ctx[10]; + if (dirty & /*$settings*/ 256) calendarbase_changes.showWeekNums = /*$settings*/ ctx[8].showWeeklyNote; + + if (!updating_displayedMonth && dirty & /*displayedMonth*/ 1) { + updating_displayedMonth = true; + calendarbase_changes.displayedMonth = /*displayedMonth*/ ctx[0]; + add_flush_callback(() => updating_displayedMonth = false); + } + + calendarbase.$set(calendarbase_changes); + }, + i(local) { + if (current) return; + transition_in$1(calendarbase.$$.fragment, local); + current = true; + }, + o(local) { + transition_out$1(calendarbase.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component$1(calendarbase, detaching); + } + }; +} + +function instance($$self, $$props, $$invalidate) { + let $settings; + let $activeFile; + component_subscribe($$self, settings, $$value => $$invalidate(8, $settings = $$value)); + component_subscribe($$self, activeFile, $$value => $$invalidate(10, $activeFile = $$value)); + + + let today; + let { displayedMonth = today } = $$props; + let { sources } = $$props; + let { onHoverDay } = $$props; + let { onHoverWeek } = $$props; + let { onClickDay } = $$props; + let { onClickWeek } = $$props; + let { onContextMenuDay } = $$props; + let { onContextMenuWeek } = $$props; + + function tick() { + $$invalidate(9, today = window.moment()); + } + + function getToday(settings) { + configureGlobalMomentLocale(settings.localeOverride, settings.weekStart); + dailyNotes.reindex(); + weeklyNotes.reindex(); + return window.moment(); + } + + // 1 minute heartbeat to keep `today` reflecting the current day + let heartbeat = setInterval( + () => { + tick(); + const isViewingCurrentMonth = displayedMonth.isSame(today, "day"); + + if (isViewingCurrentMonth) { + // if it's midnight on the last day of the month, this will + // update the display to show the new month. + $$invalidate(0, displayedMonth = today); + } + }, + 1000 * 60 + ); + + onDestroy(() => { + clearInterval(heartbeat); + }); + + function calendarbase_displayedMonth_binding(value) { + displayedMonth = value; + $$invalidate(0, displayedMonth); + } + + $$self.$$set = $$props => { + if ("displayedMonth" in $$props) $$invalidate(0, displayedMonth = $$props.displayedMonth); + if ("sources" in $$props) $$invalidate(1, sources = $$props.sources); + if ("onHoverDay" in $$props) $$invalidate(2, onHoverDay = $$props.onHoverDay); + if ("onHoverWeek" in $$props) $$invalidate(3, onHoverWeek = $$props.onHoverWeek); + if ("onClickDay" in $$props) $$invalidate(4, onClickDay = $$props.onClickDay); + if ("onClickWeek" in $$props) $$invalidate(5, onClickWeek = $$props.onClickWeek); + if ("onContextMenuDay" in $$props) $$invalidate(6, onContextMenuDay = $$props.onContextMenuDay); + if ("onContextMenuWeek" in $$props) $$invalidate(7, onContextMenuWeek = $$props.onContextMenuWeek); + }; + + $$self.$$.update = () => { + if ($$self.$$.dirty & /*$settings*/ 256) { + $$invalidate(9, today = getToday($settings)); + } + }; + + return [ + displayedMonth, + sources, + onHoverDay, + onHoverWeek, + onClickDay, + onClickWeek, + onContextMenuDay, + onContextMenuWeek, + $settings, + today, + $activeFile, + tick, + calendarbase_displayedMonth_binding + ]; +} + +class Calendar extends SvelteComponent$1 { + constructor(options) { + super(); + + init$1(this, options, instance, create_fragment, not_equal$1, { + displayedMonth: 0, + sources: 1, + onHoverDay: 2, + onHoverWeek: 3, + onClickDay: 4, + onClickWeek: 5, + onContextMenuDay: 6, + onContextMenuWeek: 7, + tick: 11 + }); + } + + get tick() { + return this.$$.ctx[11]; + } +} + +function showFileMenu(app, file, position) { + const fileMenu = new obsidian.Menu(app); + fileMenu.addItem((item) => item + .setTitle("Delete") + .setIcon("trash") + .onClick(() => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + app.fileManager.promptForFileDeletion(file); + })); + app.workspace.trigger("file-menu", fileMenu, file, "calendar-context-menu", null); + fileMenu.showAtPosition(position); +} + +const getStreakClasses = (file) => { + return classList({ + "has-note": !!file, + }); +}; +const streakSource = { + getDailyMetadata: async (date) => { + const file = getDailyNote_1(date, get_store_value(dailyNotes)); + return { + classes: getStreakClasses(file), + dots: [], + }; + }, + getWeeklyMetadata: async (date) => { + const file = getWeeklyNote_1(date, get_store_value(weeklyNotes)); + return { + classes: getStreakClasses(file), + dots: [], + }; + }, +}; + +function getNoteTags(note) { + var _a; + if (!note) { + return []; + } + const { metadataCache } = window.app; + const frontmatter = (_a = metadataCache.getFileCache(note)) === null || _a === void 0 ? void 0 : _a.frontmatter; + const tags = []; + if (frontmatter) { + const frontmatterTags = obsidian.parseFrontMatterTags(frontmatter) || []; + tags.push(...frontmatterTags); + } + // strip the '#' at the beginning + return tags.map((tag) => tag.substring(1)); +} +function getFormattedTagAttributes(note) { + const attrs = {}; + const tags = getNoteTags(note); + const [emojiTags, nonEmojiTags] = partition(tags, (tag) => /(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/.test(tag)); + if (nonEmojiTags) { + attrs["data-tags"] = nonEmojiTags.join(" "); + } + if (emojiTags) { + attrs["data-emoji-tag"] = emojiTags[0]; + } + return attrs; +} +const customTagsSource = { + getDailyMetadata: async (date) => { + const file = getDailyNote_1(date, get_store_value(dailyNotes)); + return { + dataAttributes: getFormattedTagAttributes(file), + dots: [], + }; + }, + getWeeklyMetadata: async (date) => { + const file = getWeeklyNote_1(date, get_store_value(weeklyNotes)); + return { + dataAttributes: getFormattedTagAttributes(file), + dots: [], + }; + }, +}; + +async function getNumberOfRemainingTasks(note) { + if (!note) { + return 0; + } + const { vault } = window.app; + const fileContents = await vault.cachedRead(note); + return (fileContents.match(/(-|\*) \[ \]/g) || []).length; +} +async function getDotsForDailyNote$1(dailyNote) { + if (!dailyNote) { + return []; + } + const numTasks = await getNumberOfRemainingTasks(dailyNote); + const dots = []; + if (numTasks) { + dots.push({ + className: "task", + color: "default", + isFilled: false, + }); + } + return dots; +} +const tasksSource = { + getDailyMetadata: async (date) => { + const file = getDailyNote_1(date, get_store_value(dailyNotes)); + const dots = await getDotsForDailyNote$1(file); + return { + dots, + }; + }, + getWeeklyMetadata: async (date) => { + const file = getWeeklyNote_1(date, get_store_value(weeklyNotes)); + const dots = await getDotsForDailyNote$1(file); + return { + dots, + }; + }, +}; + +const NUM_MAX_DOTS = 5; +async function getWordLengthAsDots(note) { + const { wordsPerDot = DEFAULT_WORDS_PER_DOT } = get_store_value(settings); + if (!note || wordsPerDot <= 0) { + return 0; + } + const fileContents = await window.app.vault.cachedRead(note); + const wordCount = getWordCount(fileContents); + const numDots = wordCount / wordsPerDot; + return clamp(Math.floor(numDots), 1, NUM_MAX_DOTS); +} +async function getDotsForDailyNote(dailyNote) { + if (!dailyNote) { + return []; + } + const numSolidDots = await getWordLengthAsDots(dailyNote); + const dots = []; + for (let i = 0; i < numSolidDots; i++) { + dots.push({ + color: "default", + isFilled: true, + }); + } + return dots; +} +const wordCountSource = { + getDailyMetadata: async (date) => { + const file = getDailyNote_1(date, get_store_value(dailyNotes)); + const dots = await getDotsForDailyNote(file); + return { + dots, + }; + }, + getWeeklyMetadata: async (date) => { + const file = getWeeklyNote_1(date, get_store_value(weeklyNotes)); + const dots = await getDotsForDailyNote(file); + return { + dots, + }; + }, +}; + +class CalendarView extends obsidian.ItemView { + constructor(leaf) { + super(leaf); + this.openOrCreateDailyNote = this.openOrCreateDailyNote.bind(this); + this.openOrCreateWeeklyNote = this.openOrCreateWeeklyNote.bind(this); + this.onNoteSettingsUpdate = this.onNoteSettingsUpdate.bind(this); + this.onFileCreated = this.onFileCreated.bind(this); + this.onFileDeleted = this.onFileDeleted.bind(this); + this.onFileModified = this.onFileModified.bind(this); + this.onFileOpen = this.onFileOpen.bind(this); + this.onHoverDay = this.onHoverDay.bind(this); + this.onHoverWeek = this.onHoverWeek.bind(this); + this.onContextMenuDay = this.onContextMenuDay.bind(this); + this.onContextMenuWeek = this.onContextMenuWeek.bind(this); + this.registerEvent( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this.app.workspace.on("periodic-notes:settings-updated", this.onNoteSettingsUpdate)); + this.registerEvent(this.app.vault.on("create", this.onFileCreated)); + this.registerEvent(this.app.vault.on("delete", this.onFileDeleted)); + this.registerEvent(this.app.vault.on("modify", this.onFileModified)); + this.registerEvent(this.app.workspace.on("file-open", this.onFileOpen)); + this.settings = null; + settings.subscribe((val) => { + this.settings = val; + // Refresh the calendar if settings change + if (this.calendar) { + this.calendar.tick(); + } + }); + } + getViewType() { + return VIEW_TYPE_CALENDAR; + } + getDisplayText() { + return "Calendar"; + } + getIcon() { + return "calendar-with-checkmark"; + } + onClose() { + if (this.calendar) { + this.calendar.$destroy(); + } + return Promise.resolve(); + } + async onOpen() { + // Integration point: external plugins can listen for `calendar:open` + // to feed in additional sources. + const sources = [ + customTagsSource, + streakSource, + wordCountSource, + tasksSource, + ]; + this.app.workspace.trigger(TRIGGER_ON_OPEN, sources); + this.calendar = new Calendar({ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + target: this.contentEl, + props: { + onClickDay: this.openOrCreateDailyNote, + onClickWeek: this.openOrCreateWeeklyNote, + onHoverDay: this.onHoverDay, + onHoverWeek: this.onHoverWeek, + onContextMenuDay: this.onContextMenuDay, + onContextMenuWeek: this.onContextMenuWeek, + sources, + }, + }); + } + onHoverDay(date, targetEl, isMetaPressed) { + if (!isMetaPressed) { + return; + } + const { format } = getDailyNoteSettings_1(); + const note = getDailyNote_1(date, get_store_value(dailyNotes)); + this.app.workspace.trigger("link-hover", this, targetEl, date.format(format), note === null || note === void 0 ? void 0 : note.path); + } + onHoverWeek(date, targetEl, isMetaPressed) { + if (!isMetaPressed) { + return; + } + const note = getWeeklyNote_1(date, get_store_value(weeklyNotes)); + const { format } = getWeeklyNoteSettings_1(); + this.app.workspace.trigger("link-hover", this, targetEl, date.format(format), note === null || note === void 0 ? void 0 : note.path); + } + onContextMenuDay(date, event) { + const note = getDailyNote_1(date, get_store_value(dailyNotes)); + if (!note) { + // If no file exists for a given day, show nothing. + return; + } + showFileMenu(this.app, note, { + x: event.pageX, + y: event.pageY, + }); + } + onContextMenuWeek(date, event) { + const note = getWeeklyNote_1(date, get_store_value(weeklyNotes)); + if (!note) { + // If no file exists for a given day, show nothing. + return; + } + showFileMenu(this.app, note, { + x: event.pageX, + y: event.pageY, + }); + } + onNoteSettingsUpdate() { + dailyNotes.reindex(); + weeklyNotes.reindex(); + this.updateActiveFile(); + } + async onFileDeleted(file) { + if (getDateFromFile_1(file, "day")) { + dailyNotes.reindex(); + this.updateActiveFile(); + } + if (getDateFromFile_1(file, "week")) { + weeklyNotes.reindex(); + this.updateActiveFile(); + } + } + async onFileModified(file) { + const date = getDateFromFile_1(file, "day") || getDateFromFile_1(file, "week"); + if (date && this.calendar) { + this.calendar.tick(); + } + } + onFileCreated(file) { + if (this.app.workspace.layoutReady && this.calendar) { + if (getDateFromFile_1(file, "day")) { + dailyNotes.reindex(); + this.calendar.tick(); + } + if (getDateFromFile_1(file, "week")) { + weeklyNotes.reindex(); + this.calendar.tick(); + } + } + } + onFileOpen(_file) { + if (this.app.workspace.layoutReady) { + this.updateActiveFile(); + } + } + updateActiveFile() { + const { view } = this.app.workspace.activeLeaf; + let file = null; + if (view instanceof obsidian.FileView) { + file = view.file; + } + activeFile.setFile(file); + if (this.calendar) { + this.calendar.tick(); + } + } + revealActiveNote() { + const { moment } = window; + const { activeLeaf } = this.app.workspace; + if (activeLeaf.view instanceof obsidian.FileView) { + // Check to see if the active note is a daily-note + let date = getDateFromFile_1(activeLeaf.view.file, "day"); + if (date) { + this.calendar.$set({ displayedMonth: date }); + return; + } + // Check to see if the active note is a weekly-note + const { format } = getWeeklyNoteSettings_1(); + date = moment(activeLeaf.view.file.basename, format, true); + if (date.isValid()) { + this.calendar.$set({ displayedMonth: date }); + return; + } + } + } + async openOrCreateWeeklyNote(date, inNewSplit) { + const { workspace } = this.app; + const startOfWeek = date.clone().startOf("week"); + const existingFile = getWeeklyNote_1(date, get_store_value(weeklyNotes)); + if (!existingFile) { + // File doesn't exist + tryToCreateWeeklyNote(startOfWeek, inNewSplit, this.settings, (file) => { + activeFile.setFile(file); + }); + return; + } + const leaf = inNewSplit + ? workspace.splitActiveLeaf() + : workspace.getUnpinnedLeaf(); + await leaf.openFile(existingFile); + activeFile.setFile(existingFile); + } + async openOrCreateDailyNote(date, inNewSplit) { + const { workspace } = this.app; + const existingFile = getDailyNote_1(date, get_store_value(dailyNotes)); + if (!existingFile) { + // File doesn't exist + tryToCreateDailyNote(date, inNewSplit, this.settings, (dailyNote) => { + activeFile.setFile(dailyNote); + }); + return; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const mode = this.app.vault.getConfig("defaultViewMode"); + const leaf = inNewSplit + ? workspace.splitActiveLeaf() + : workspace.getUnpinnedLeaf(); + await leaf.openFile(existingFile, { mode }); + activeFile.setFile(existingFile); + } +} + +class CalendarPlugin extends obsidian.Plugin { + onunload() { + this.app.workspace + .getLeavesOfType(VIEW_TYPE_CALENDAR) + .forEach((leaf) => leaf.detach()); + } + async onload() { + this.register(settings.subscribe((value) => { + this.options = value; + })); + this.registerView(VIEW_TYPE_CALENDAR, (leaf) => (this.view = new CalendarView(leaf))); + this.addCommand({ + id: "show-calendar-view", + name: "Open view", + checkCallback: (checking) => { + if (checking) { + return (this.app.workspace.getLeavesOfType(VIEW_TYPE_CALENDAR).length === 0); + } + this.initLeaf(); + }, + }); + this.addCommand({ + id: "open-weekly-note", + name: "Open Weekly Note", + checkCallback: (checking) => { + if (checking) { + return !appHasPeriodicNotesPluginLoaded(); + } + this.view.openOrCreateWeeklyNote(window.moment(), false); + }, + }); + this.addCommand({ + id: "reveal-active-note", + name: "Reveal active note", + callback: () => this.view.revealActiveNote(), + }); + await this.loadOptions(); + this.addSettingTab(new CalendarSettingsTab(this.app, this)); + if (this.app.workspace.layoutReady) { + this.initLeaf(); + } + else { + this.registerEvent(this.app.workspace.on("layout-ready", this.initLeaf.bind(this))); + } + } + initLeaf() { + if (this.app.workspace.getLeavesOfType(VIEW_TYPE_CALENDAR).length) { + return; + } + this.app.workspace.getRightLeaf(false).setViewState({ + type: VIEW_TYPE_CALENDAR, + }); + } + async loadOptions() { + const options = await this.loadData(); + settings.update((old) => { + return Object.assign(Object.assign({}, old), (options || {})); + }); + await this.saveData(this.options); + } + async writeOptions(changeOpts) { + settings.update((old) => (Object.assign(Object.assign({}, old), changeOpts(old)))); + await this.saveData(this.options); + } +} + +module.exports = CalendarPlugin; + +/* nosourcemap */ \ No newline at end of file diff --git a/main/.obsidian/plugins/calendar/manifest.json b/main/.obsidian/plugins/calendar/manifest.json new file mode 100644 index 0000000..028bfa5 --- /dev/null +++ b/main/.obsidian/plugins/calendar/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "calendar", + "name": "Calendar", + "description": "Calendar view of your daily notes", + "version": "1.5.10", + "author": "Liam Cain", + "authorUrl": "https://github.com/liamcain/", + "isDesktopOnly": false, + "minAppVersion": "0.9.11" +} diff --git a/main/.obsidian/plugins/obsidian-git/data.json b/main/.obsidian/plugins/obsidian-git/data.json new file mode 100644 index 0000000..ad6cbbe --- /dev/null +++ b/main/.obsidian/plugins/obsidian-git/data.json @@ -0,0 +1,68 @@ +{ + "commitMessage": "vault backup: {{date}}", + "autoCommitMessage": "vault backup: {{date}}", + "commitMessageScript": "", + "commitDateFormat": "YYYY-MM-DD HH:mm:ss", + "autoSaveInterval": 0, + "autoPushInterval": 0, + "autoPullInterval": 0, + "autoPullOnBoot": false, + "autoCommitOnlyStaged": false, + "disablePush": false, + "pullBeforePush": true, + "squashCommitsBeforePush": false, + "disablePopups": false, + "showErrorNotices": true, + "disablePopupsForNoChanges": false, + "listChangedFilesInMessageBody": false, + "showStatusBar": true, + "updateSubmodules": false, + "syncMethod": "merge", + "mergeStrategy": "none", + "customMessageOnAutoBackup": false, + "autoBackupAfterFileChange": false, + "treeStructure": false, + "refreshSourceControl": true, + "basePath": "", + "differentIntervalCommitAndPush": false, + "changedFilesInStatusBar": false, + "showedMobileNotice": true, + "refreshSourceControlTimer": 7000, + "showBranchStatusBar": true, + "setLastSaveToLastCommit": false, + "submoduleRecurseCheckout": false, + "gitDir": "", + "showFileMenu": true, + "authorInHistoryView": "full", + "dateInHistoryView": true, + "diffStyle": "split", + "hunks": { + "showSigns": false, + "hunkCommands": false, + "statusBar": "disabled" + }, + "lineAuthor": { + "show": false, + "followMovement": "inactive", + "authorDisplay": "initials", + "showCommitHash": false, + "dateTimeFormatOptions": "date", + "dateTimeFormatCustomString": "YYYY-MM-DD HH:mm", + "dateTimeTimezone": "viewer-local", + "coloringMaxAge": "1y", + "colorNew": { + "r": 255, + "g": 150, + "b": 150 + }, + "colorOld": { + "r": 120, + "g": 160, + "b": 255 + }, + "textColorCss": "var(--text-muted)", + "ignoreWhitespace": false, + "lastShownAuthorDisplay": "initials", + "lastShownDateTimeFormatOptions": "date" + } +} \ No newline at end of file diff --git a/main/.obsidian/plugins/obsidian-git/main.js b/main/.obsidian/plugins/obsidian-git/main.js new file mode 100644 index 0000000..e2227bd --- /dev/null +++ b/main/.obsidian/plugins/obsidian-git/main.js @@ -0,0 +1,427 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git) +*/ + +"use strict";var E$=Object.create;var gc=Object.defineProperty;var S$=Object.getOwnPropertyDescriptor;var k$=Object.getOwnPropertyNames;var C$=Object.getPrototypeOf,A$=Object.prototype.hasOwnProperty;var Eb=t=>{throw TypeError(t)};var T$=(t,e,r)=>e in t?gc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var P$=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var U=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},R$=(t,e)=>{for(var r in e)gc(t,r,{get:e[r],enumerable:!0})},Sb=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of k$(e))!A$.call(t,n)&&n!==r&&gc(t,n,{get:()=>e[n],enumerable:!(i=S$(e,n))||i.enumerable});return t};var ft=(t,e,r)=>(r=t!=null?E$(C$(t)):{},Sb(e||!t||!t.__esModule?gc(r,"default",{value:t,enumerable:!0}):r,t)),$$=t=>Sb(gc({},"__esModule",{value:!0}),t);var He=(t,e,r)=>T$(t,typeof e!="symbol"?e+"":e,r),tm=(t,e,r)=>e.has(t)||Eb("Cannot "+r);var $=(t,e,r)=>(tm(t,e,"read from private field"),r?r.call(t):e.get(t)),me=(t,e,r)=>e.has(t)?Eb("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),fe=(t,e,r,i)=>(tm(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),Ee=(t,e,r)=>(tm(t,e,"access private method"),r);var Ab=U(Rf=>{"use strict";m();Rf.byteLength=I$;Rf.toByteArray=D$;Rf.fromByteArray=N$;var ln=[],pi=[],F$=typeof Uint8Array!="undefined"?Uint8Array:Array,rm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ia=0,kb=rm.length;ia0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function I$(t){var e=Cb(t),r=e[0],i=e[1];return(r+i)*3/4-i}function M$(t,e,r){return(e+r)*3/4-r}function D$(t){var e,r=Cb(t),i=r[0],n=r[1],s=new F$(M$(t,i,n)),a=0,o=n>0?i-4:i,l;for(l=0;l>16&255,s[a++]=e>>8&255,s[a++]=e&255;return n===2&&(e=pi[t.charCodeAt(l)]<<2|pi[t.charCodeAt(l+1)]>>4,s[a++]=e&255),n===1&&(e=pi[t.charCodeAt(l)]<<10|pi[t.charCodeAt(l+1)]<<4|pi[t.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function O$(t){return ln[t>>18&63]+ln[t>>12&63]+ln[t>>6&63]+ln[t&63]}function L$(t,e,r){for(var i,n=[],s=e;so?o:a+s));return i===1?(e=t[r-1],n.push(ln[e>>2]+ln[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(ln[e>>10]+ln[e>>4&63]+ln[e<<2&63]+"=")),n.join("")}});var Tb=U(im=>{m();im.read=function(t,e,r,i,n){var s,a,o=n*8-i-1,l=(1<>1,u=-7,f=r?n-1:0,d=r?-1:1,h=t[e+f];for(f+=d,s=h&(1<<-u)-1,h>>=-u,u+=o;u>0;s=s*256+t[e+f],f+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=i;u>0;a=a*256+t[e+f],f+=d,u-=8);if(s===0)s=1-c;else{if(s===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-c}return(h?-1:1)*a*Math.pow(2,s-i)};im.write=function(t,e,r,i,n,s){var a,o,l,c=s*8-n-1,u=(1<>1,d=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:s-1,p=i?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+f>=1?e+=d/l:e+=d*Math.pow(2,1-f),e*l>=2&&(a++,l/=2),a+f>=u?(o=0,a=u):a+f>=1?(o=(e*l-1)*Math.pow(2,n),a=a+f):(o=e*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;t[r+h]=o&255,h+=p,o/=256,n-=8);for(a=a<0;t[r+h]=a&255,h+=p,a/=256,c-=8);t[r+h-p]|=g*128}});var dm=U(Eo=>{"use strict";m();var nm=Ab(),yo=Tb(),Pb=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Eo.Buffer=M;Eo.SlowBuffer=V$;Eo.INSPECT_MAX_BYTES=50;var $f=2147483647;Eo.kMaxLength=$f;M.TYPED_ARRAY_SUPPORT=B$();!M.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function B$(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(t){return!1}}Object.defineProperty(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}});Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}});function Gn(t){if(t>$f)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,M.prototype),e}function M(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return lm(t)}return Ib(t,e,r)}M.poolSize=8192;function Ib(t,e,r){if(typeof t=="string")return U$(t,e);if(ArrayBuffer.isView(t))return G$(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(cn(t,ArrayBuffer)||t&&cn(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(cn(t,SharedArrayBuffer)||t&&cn(t.buffer,SharedArrayBuffer)))return am(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return M.from(i,e,r);let n=j$(t);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return M.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}M.from=function(t,e,r){return Ib(t,e,r)};Object.setPrototypeOf(M.prototype,Uint8Array.prototype);Object.setPrototypeOf(M,Uint8Array);function Mb(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function H$(t,e,r){return Mb(t),t<=0?Gn(t):e!==void 0?typeof r=="string"?Gn(t).fill(e,r):Gn(t).fill(e):Gn(t)}M.alloc=function(t,e,r){return H$(t,e,r)};function lm(t){return Mb(t),Gn(t<0?0:cm(t)|0)}M.allocUnsafe=function(t){return lm(t)};M.allocUnsafeSlow=function(t){return lm(t)};function U$(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!M.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Db(t,e)|0,i=Gn(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function sm(t){let e=t.length<0?0:cm(t.length)|0,r=Gn(e);for(let i=0;i=$f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$f.toString(16)+" bytes");return t|0}function V$(t){return+t!=t&&(t=0),M.alloc(+t)}M.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==M.prototype};M.compare=function(e,r){if(cn(e,Uint8Array)&&(e=M.from(e,e.offset,e.byteLength)),cn(r,Uint8Array)&&(r=M.from(r,r.offset,r.byteLength)),!M.isBuffer(e)||!M.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let i=e.length,n=r.length;for(let s=0,a=Math.min(i,n);sn.length?(M.isBuffer(a)||(a=M.from(a)),a.copy(n,s)):Uint8Array.prototype.set.call(n,a,s);else if(M.isBuffer(a))a.copy(n,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=a.length}return n};function Db(t,e){if(M.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||cn(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return om(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Vb(t).length;default:if(n)return i?-1:om(t).length;e=(""+e).toLowerCase(),n=!0}}M.byteLength=Db;function z$(t,e,r){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return tF(this,e,r);case"utf8":case"utf-8":return Lb(this,e,r);case"ascii":return J$(this,e,r);case"latin1":case"binary":return eF(this,e,r);case"base64":return X$(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rF(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}M.prototype._isBuffer=!0;function na(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}M.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(e+=" ... "),""};Pb&&(M.prototype[Pb]=M.prototype.inspect);M.prototype.compare=function(e,r,i,n,s){if(cn(e,Uint8Array)&&(e=M.from(e,e.offset,e.byteLength)),!M.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),s===void 0&&(s=this.length),r<0||i>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&r>=i)return 0;if(n>=s)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,s>>>=0,this===e)return 0;let a=s-n,o=i-r,l=Math.min(a,o),c=this.slice(n,s),u=e.slice(r,i);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,fm(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=M.from(e,i)),M.isBuffer(e))return e.length===0?-1:Rb(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Rb(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Rb(t,e,r,i,n){let s=1,a=t.length,o=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;s=2,a/=2,o/=2,r/=2}function l(u,f){return s===1?u[f]:u.readUInt16BE(f*s)}let c;if(n){let u=-1;for(c=r;ca&&(r=a-o),c=r;c>=0;c--){let u=!0;for(let f=0;fn&&(i=n)):i=n;let s=e.length;i>s/2&&(i=s/2);let a;for(a=0;a>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-r;if((i===void 0||i>s)&&(i=s),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return W$(this,e,r,i);case"utf8":case"utf-8":return q$(this,e,r,i);case"ascii":case"latin1":case"binary":return Y$(this,e,r,i);case"base64":return Z$(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K$(this,e,r,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}};M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X$(t,e,r){return e===0&&r===t.length?nm.fromByteArray(t):nm.fromByteArray(t.slice(e,r))}function Lb(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n239?4:s>223?3:s>191?2:1;if(n+o<=r){let l,c,u,f;switch(o){case 1:s<128&&(a=s);break;case 2:l=t[n+1],(l&192)===128&&(f=(s&31)<<6|l&63,f>127&&(a=f));break;case 3:l=t[n+1],c=t[n+2],(l&192)===128&&(c&192)===128&&(f=(s&15)<<12|(l&63)<<6|c&63,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:l=t[n+1],c=t[n+2],u=t[n+3],(l&192)===128&&(c&192)===128&&(u&192)===128&&(f=(s&15)<<18|(l&63)<<12|(c&63)<<6|u&63,f>65535&&f<1114112&&(a=f))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|a&1023),i.push(a),n+=o}return Q$(i)}var $b=4096;function Q$(t){let e=t.length;if(e<=$b)return String.fromCharCode.apply(String,t);let r="",i=0;for(;ii)&&(r=i);let n="";for(let s=e;si&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),rr)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUintLE=M.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||jt(e,r,this.length);let n=this[e],s=1,a=0;for(;++a>>0,r=r>>>0,i||jt(e,r,this.length);let n=this[e+--r],s=1;for(;r>0&&(s*=256);)n+=this[e+--r]*s;return n};M.prototype.readUint8=M.prototype.readUInt8=function(e,r){return e=e>>>0,r||jt(e,1,this.length),this[e]};M.prototype.readUint16LE=M.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||jt(e,2,this.length),this[e]|this[e+1]<<8};M.prototype.readUint16BE=M.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||jt(e,2,this.length),this[e]<<8|this[e+1]};M.prototype.readUint32LE=M.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||jt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};M.prototype.readUint32BE=M.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||jt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};M.prototype.readBigUInt64LE=ys(function(e){e=e>>>0,xo(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&vc(e,this.length-8);let n=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,s=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(n)+(BigInt(s)<>>0,xo(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&vc(e,this.length-8);let n=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],s=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(n)<>>0,r=r>>>0,i||jt(e,r,this.length);let n=this[e],s=1,a=0;for(;++a=s&&(n-=Math.pow(2,8*r)),n};M.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||jt(e,r,this.length);let n=r,s=1,a=this[e+--n];for(;n>0&&(s*=256);)a+=this[e+--n]*s;return s*=128,a>=s&&(a-=Math.pow(2,8*r)),a};M.prototype.readInt8=function(e,r){return e=e>>>0,r||jt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};M.prototype.readInt16LE=function(e,r){e=e>>>0,r||jt(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};M.prototype.readInt16BE=function(e,r){e=e>>>0,r||jt(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};M.prototype.readInt32LE=function(e,r){return e=e>>>0,r||jt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};M.prototype.readInt32BE=function(e,r){return e=e>>>0,r||jt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};M.prototype.readBigInt64LE=ys(function(e){e=e>>>0,xo(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&vc(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(n)<>>0,xo(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&vc(e,this.length-8);let n=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,r||jt(e,4,this.length),yo.read(this,e,!0,23,4)};M.prototype.readFloatBE=function(e,r){return e=e>>>0,r||jt(e,4,this.length),yo.read(this,e,!1,23,4)};M.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||jt(e,8,this.length),yo.read(this,e,!0,52,8)};M.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||jt(e,8,this.length),yo.read(this,e,!1,52,8)};function Rr(t,e,r,i,n,s){if(!M.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}M.prototype.writeUintLE=M.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let o=Math.pow(2,8*i)-1;Rr(this,e,r,i,o,0)}let s=1,a=0;for(this[r]=e&255;++a>>0,i=i>>>0,!n){let o=Math.pow(2,8*i)-1;Rr(this,e,r,i,o,0)}let s=i-1,a=1;for(this[r+s]=e&255;--s>=0&&(a*=256);)this[r+s]=e/a&255;return r+i};M.prototype.writeUint8=M.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,1,255,0),this[r]=e&255,r+1};M.prototype.writeUint16LE=M.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};M.prototype.writeUint16BE=M.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};M.prototype.writeUint32LE=M.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};M.prototype.writeUint32BE=M.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Nb(t,e,r,i,n){jb(e,i,n,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,r}function Bb(t,e,r,i,n){jb(e,i,n,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s=s>>8,t[r+6]=s,s=s>>8,t[r+5]=s,s=s>>8,t[r+4]=s;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a=a>>8,t[r+2]=a,a=a>>8,t[r+1]=a,a=a>>8,t[r]=a,r+8}M.prototype.writeBigUInt64LE=ys(function(e,r=0){return Nb(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeBigUInt64BE=ys(function(e,r=0){return Bb(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Rr(this,e,r,i,l-1,-l)}let s=0,a=1,o=0;for(this[r]=e&255;++s>0)-o&255;return r+i};M.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Rr(this,e,r,i,l-1,-l)}let s=i-1,a=1,o=0;for(this[r+s]=e&255;--s>=0&&(a*=256);)e<0&&o===0&&this[r+s+1]!==0&&(o=1),this[r+s]=(e/a>>0)-o&255;return r+i};M.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};M.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};M.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};M.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};M.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Rr(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};M.prototype.writeBigInt64LE=ys(function(e,r=0){return Nb(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});M.prototype.writeBigInt64BE=ys(function(e,r=0){return Bb(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Hb(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ub(t,e,r,i,n){return e=+e,r=r>>>0,n||Hb(t,e,r,4,34028234663852886e22,-34028234663852886e22),yo.write(t,e,r,i,23,4),r+4}M.prototype.writeFloatLE=function(e,r,i){return Ub(this,e,r,!0,i)};M.prototype.writeFloatBE=function(e,r,i){return Ub(this,e,r,!1,i)};function Gb(t,e,r,i,n){return e=+e,r=r>>>0,n||Hb(t,e,r,8,17976931348623157e292,-17976931348623157e292),yo.write(t,e,r,i,52,8),r+8}M.prototype.writeDoubleLE=function(e,r,i){return Gb(this,e,r,!0,i)};M.prototype.writeDoubleBE=function(e,r,i){return Gb(this,e,r,!1,i)};M.prototype.copy=function(e,r,i,n){if(!M.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let s;if(typeof e=="number")for(s=r;s2**32?n=Fb(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=Fb(n)),n+="n"),i+=` It must be ${e}. Received ${n}`,i},RangeError);function Fb(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function iF(t,e,r){xo(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&vc(e,t.length-(r+1))}function jb(t,e,r,i,n,s){if(t>r||t3?e===0||e===BigInt(0)?o=`>= 0${a} and < 2${a} ** ${(s+1)*8}${a}`:o=`>= -(2${a} ** ${(s+1)*8-1}${a}) and < 2 ** ${(s+1)*8-1}${a}`:o=`>= ${e}${a} and <= ${r}${a}`,new _o.ERR_OUT_OF_RANGE("value",o,t)}iF(i,n,s)}function xo(t,e){if(typeof t!="number")throw new _o.ERR_INVALID_ARG_TYPE(e,"number",t)}function vc(t,e,r){throw Math.floor(t)!==t?(xo(t,r),new _o.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new _o.ERR_BUFFER_OUT_OF_BOUNDS:new _o.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var nF=/[^+/0-9A-Za-z-_]/g;function sF(t){if(t=t.split("=")[0],t=t.trim().replace(nF,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function om(t,e){e=e||1/0;let r,i=t.length,n=null,s=[];for(let a=0;a55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(a+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function aF(t){let e=[];for(let r=0;r>8,n=r%256,s.push(n),s.push(i);return s}function Vb(t){return nm.toByteArray(sF(t))}function Ff(t,e,r,i){let n;for(n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function cn(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function fm(t){return t!==t}var lF=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e})();function ys(t){return typeof BigInt=="undefined"?cF:t}function cF(){throw new Error("BigInt not supported")}});var zb,hm,k,m=P$(()=>{"use strict";zb=require("obsidian");zb.Platform.isMobileApp?hm=dm().Buffer:hm=global.Buffer;k=hm});var qb=U((OG,Wb)=>{"use strict";m();var Xr=function(t){if(t=t||{},this.Promise=t.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=t.domainReentrant||!1,this.domainReentrant){if(typeof process=="undefined"||typeof process.domain=="undefined")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=t.timeout||Xr.DEFAULT_TIMEOUT,this.maxOccupationTime=t.maxOccupationTime||Xr.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=t.maxExecutionTime||Xr.DEFAULT_MAX_EXECUTION_TIME,t.maxPending===1/0||Number.isInteger(t.maxPending)&&t.maxPending>=0?this.maxPending=t.maxPending:this.maxPending=Xr.DEFAULT_MAX_PENDING};Xr.DEFAULT_TIMEOUT=0;Xr.DEFAULT_MAX_OCCUPATION_TIME=0;Xr.DEFAULT_MAX_EXECUTION_TIME=0;Xr.DEFAULT_MAX_PENDING=1e3;Xr.prototype.acquire=function(t,e,r,i){if(Array.isArray(t))return this._acquireBatch(t,e,r,i);if(typeof e!="function")throw new Error("You must pass a function to execute");var n=null,s=null,a=null;typeof r!="function"&&(i=r,r=null,a=new this.Promise(function(_,C){n=_,s=C})),i=i||{};var o=!1,l=null,c=null,u=null,f=this,d=function(_,C,x){c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),_&&(f.queues[t]&&f.queues[t].length===0&&delete f.queues[t],f.domainReentrant&&delete f.domains[t]),o||(a?C?s(C):n(x):typeof r=="function"&&r(C,x),o=!0),_&&f.queues[t]&&f.queues[t].length>0&&f.queues[t].shift()()},h=function(_){if(o)return d(_);l&&(clearTimeout(l),l=null),f.domainReentrant&&_&&(f.domains[t]=process.domain);var C=i.maxExecutionTime||f.maxExecutionTime;if(C&&(u=setTimeout(function(){f.queues[t]&&d(_,new Error("Maximum execution time is exceeded "+t))},C)),e.length===1){var x=!1;try{e(function(S,A){x||(x=!0,d(_,S,A))})}catch(S){x||(x=!0,d(_,S))}}else f._promiseTry(function(){return e()}).then(function(S){d(_,void 0,S)},function(S){d(_,S)})};f.domainReentrant&&process.domain&&(h=process.domain.bind(h));var p=i.maxPending||f.maxPending;if(!f.queues[t])f.queues[t]=[],h(!0);else if(f.domainReentrant&&process.domain&&process.domain===f.domains[t])h(!1);else if(f.queues[t].length>=p)d(!1,new Error("Too many pending tasks in queue "+t));else{var g=function(){h(!0)};i.skipQueue?f.queues[t].unshift(g):f.queues[t].push(g);var v=i.timeout||f.timeout;v&&(l=setTimeout(function(){l=null,d(!1,new Error("async-lock timed out in queue "+t))},v))}var b=i.maxOccupationTime||f.maxOccupationTime;if(b&&(c=setTimeout(function(){f.queues[t]&&d(!1,new Error("Maximum occupation time is exceeded in queue "+t))},b)),a)return a};Xr.prototype._acquireBatch=function(t,e,r,i){typeof r!="function"&&(i=r,r=null);var n=this,s=function(o,l){return function(c){n.acquire(o,l,c,i)}},a=t.reduceRight(function(o,l){return s(l,o)},e);if(typeof r=="function")a(r);else return new this.Promise(function(o,l){a.length===1?a(function(c,u){c?l(c):o(u)}):o(a())})};Xr.prototype.isBusy=function(t){return t?!!this.queues[t]:Object.keys(this.queues).length>0};Xr.prototype._promiseTry=function(t){try{return this.Promise.resolve(t())}catch(e){return this.Promise.reject(e)}};Wb.exports=Xr});var Zb=U((NG,Yb)=>{"use strict";m();Yb.exports=qb()});var Kb=U((HG,pm)=>{m();typeof Object.create=="function"?pm.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:pm.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Mf=U((mm,Qb)=>{m();var If=dm(),un=If.Buffer;function Xb(t,e){for(var r in t)e[r]=t[r]}un.from&&un.alloc&&un.allocUnsafe&&un.allocUnsafeSlow?Qb.exports=If:(Xb(If,mm),mm.Buffer=sa);function sa(t,e,r){return un(t,e,r)}sa.prototype=Object.create(un.prototype);Xb(un,sa);sa.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return un(t,e,r)};sa.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=un(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};sa.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return un(t)};sa.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return If.SlowBuffer(t)}});var e_=U((jG,Jb)=>{m();var uF={}.toString;Jb.exports=Array.isArray||function(t){return uF.call(t)=="[object Array]"}});var So=U((zG,t_)=>{"use strict";m();t_.exports=TypeError});var gm=U((qG,r_)=>{"use strict";m();r_.exports=Object});var n_=U((ZG,i_)=>{"use strict";m();i_.exports=Error});var a_=U((XG,s_)=>{"use strict";m();s_.exports=EvalError});var l_=U((JG,o_)=>{"use strict";m();o_.exports=RangeError});var u_=U((tj,c_)=>{"use strict";m();c_.exports=ReferenceError});var vm=U((ij,f_)=>{"use strict";m();f_.exports=SyntaxError});var h_=U((sj,d_)=>{"use strict";m();d_.exports=URIError});var m_=U((oj,p_)=>{"use strict";m();p_.exports=Math.abs});var v_=U((cj,g_)=>{"use strict";m();g_.exports=Math.floor});var b_=U((fj,w_)=>{"use strict";m();w_.exports=Math.max});var y_=U((hj,__)=>{"use strict";m();__.exports=Math.min});var E_=U((mj,x_)=>{"use strict";m();x_.exports=Math.pow});var k_=U((vj,S_)=>{"use strict";m();S_.exports=Math.round});var A_=U((bj,C_)=>{"use strict";m();C_.exports=Number.isNaN||function(e){return e!==e}});var P_=U((yj,T_)=>{"use strict";m();var fF=A_();T_.exports=function(e){return fF(e)||e===0?e:e<0?-1:1}});var $_=U((Ej,R_)=>{"use strict";m();R_.exports=Object.getOwnPropertyDescriptor});var ko=U((kj,F_)=>{"use strict";m();var Df=$_();if(Df)try{Df([],"length")}catch(t){Df=null}F_.exports=Df});var wc=U((Aj,I_)=>{"use strict";m();var Of=Object.defineProperty||!1;if(Of)try{Of({},"a",{value:1})}catch(t){Of=!1}I_.exports=Of});var wm=U((Pj,M_)=>{"use strict";m();M_.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[r]=n;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==n||o.enumerable!==!0)return!1}return!0}});var L_=U(($j,O_)=>{"use strict";m();var D_=typeof Symbol!="undefined"&&Symbol,dF=wm();O_.exports=function(){return typeof D_!="function"||typeof Symbol!="function"||typeof D_("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:dF()}});var bm=U((Ij,N_)=>{"use strict";m();N_.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var _m=U((Dj,B_)=>{"use strict";m();var hF=gm();B_.exports=hF.getPrototypeOf||null});var G_=U((Lj,U_)=>{"use strict";m();var pF="Function.prototype.bind called on incompatible ",mF=Object.prototype.toString,gF=Math.max,vF="[object Function]",H_=function(e,r){for(var i=[],n=0;n{"use strict";m();var _F=G_();j_.exports=Function.prototype.bind||_F});var Lf=U((Uj,V_)=>{"use strict";m();V_.exports=Function.prototype.call});var Nf=U((jj,z_)=>{"use strict";m();z_.exports=Function.prototype.apply});var q_=U((zj,W_)=>{"use strict";m();W_.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var ym=U((qj,Y_)=>{"use strict";m();var yF=Co(),xF=Nf(),EF=Lf(),SF=q_();Y_.exports=SF||yF.call(EF,xF)});var Bf=U((Zj,Z_)=>{"use strict";m();var kF=Co(),CF=So(),AF=Lf(),TF=ym();Z_.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new CF("a function is required");return TF(kF,AF,e)}});var ty=U((Xj,ey)=>{"use strict";m();var PF=Bf(),K_=ko(),Q_;try{Q_=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var xm=!!Q_&&K_&&K_(Object.prototype,"__proto__"),J_=Object,X_=J_.getPrototypeOf;ey.exports=xm&&typeof xm.get=="function"?PF([xm.get]):typeof X_=="function"?function(e){return X_(e==null?e:J_(e))}:!1});var Em=U((Jj,sy)=>{"use strict";m();var ry=bm(),iy=_m(),ny=ty();sy.exports=ry?function(e){return ry(e)}:iy?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return iy(e)}:ny?function(e){return ny(e)}:null});var oy=U((tV,ay)=>{"use strict";m();var RF=Function.prototype.call,$F=Object.prototype.hasOwnProperty,FF=Co();ay.exports=FF.call(RF,$F)});var Cm=U((iV,hy)=>{"use strict";m();var Ae,IF=gm(),MF=n_(),DF=a_(),OF=l_(),LF=u_(),Ro=vm(),Po=So(),NF=h_(),BF=m_(),HF=v_(),UF=b_(),GF=y_(),jF=E_(),VF=k_(),zF=P_(),fy=Function,Sm=function(t){try{return fy('"use strict"; return ('+t+").constructor;")()}catch(e){}},bc=ko(),WF=wc(),km=function(){throw new Po},qF=bc?(function(){try{return arguments.callee,km}catch(t){try{return bc(arguments,"callee").get}catch(e){return km}}})():km,Ao=L_()(),Vt=Em(),YF=_m(),ZF=bm(),dy=Nf(),_c=Lf(),To={},KF=typeof Uint8Array=="undefined"||!Vt?Ae:Vt(Uint8Array),aa={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Ae:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Ae:ArrayBuffer,"%ArrayIteratorPrototype%":Ao&&Vt?Vt([][Symbol.iterator]()):Ae,"%AsyncFromSyncIteratorPrototype%":Ae,"%AsyncFunction%":To,"%AsyncGenerator%":To,"%AsyncGeneratorFunction%":To,"%AsyncIteratorPrototype%":To,"%Atomics%":typeof Atomics=="undefined"?Ae:Atomics,"%BigInt%":typeof BigInt=="undefined"?Ae:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Ae:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Ae:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Ae:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":MF,"%eval%":eval,"%EvalError%":DF,"%Float16Array%":typeof Float16Array=="undefined"?Ae:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Ae:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Ae:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Ae:FinalizationRegistry,"%Function%":fy,"%GeneratorFunction%":To,"%Int8Array%":typeof Int8Array=="undefined"?Ae:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Ae:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Ae:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ao&&Vt?Vt(Vt([][Symbol.iterator]())):Ae,"%JSON%":typeof JSON=="object"?JSON:Ae,"%Map%":typeof Map=="undefined"?Ae:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ao||!Vt?Ae:Vt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":IF,"%Object.getOwnPropertyDescriptor%":bc,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Ae:Promise,"%Proxy%":typeof Proxy=="undefined"?Ae:Proxy,"%RangeError%":OF,"%ReferenceError%":LF,"%Reflect%":typeof Reflect=="undefined"?Ae:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Ae:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ao||!Vt?Ae:Vt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Ae:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ao&&Vt?Vt(""[Symbol.iterator]()):Ae,"%Symbol%":Ao?Symbol:Ae,"%SyntaxError%":Ro,"%ThrowTypeError%":qF,"%TypedArray%":KF,"%TypeError%":Po,"%Uint8Array%":typeof Uint8Array=="undefined"?Ae:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Ae:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Ae:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Ae:Uint32Array,"%URIError%":NF,"%WeakMap%":typeof WeakMap=="undefined"?Ae:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Ae:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Ae:WeakSet,"%Function.prototype.call%":_c,"%Function.prototype.apply%":dy,"%Object.defineProperty%":WF,"%Object.getPrototypeOf%":YF,"%Math.abs%":BF,"%Math.floor%":HF,"%Math.max%":UF,"%Math.min%":GF,"%Math.pow%":jF,"%Math.round%":VF,"%Math.sign%":zF,"%Reflect.getPrototypeOf%":ZF};if(Vt)try{null.error}catch(t){ly=Vt(Vt(t)),aa["%Error.prototype%"]=ly}var ly,XF=function t(e){var r;if(e==="%AsyncFunction%")r=Sm("async function () {}");else if(e==="%GeneratorFunction%")r=Sm("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Sm("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&Vt&&(r=Vt(n.prototype))}return aa[e]=r,r},cy={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},yc=Co(),Hf=oy(),QF=yc.call(_c,Array.prototype.concat),JF=yc.call(dy,Array.prototype.splice),uy=yc.call(_c,String.prototype.replace),Uf=yc.call(_c,String.prototype.slice),eI=yc.call(_c,RegExp.prototype.exec),tI=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,rI=/\\(\\)?/g,iI=function(e){var r=Uf(e,0,1),i=Uf(e,-1);if(r==="%"&&i!=="%")throw new Ro("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Ro("invalid intrinsic syntax, expected opening `%`");var n=[];return uy(e,tI,function(s,a,o,l){n[n.length]=o?uy(l,rI,"$1"):a||s}),n},nI=function(e,r){var i=e,n;if(Hf(cy,i)&&(n=cy[i],i="%"+n[0]+"%"),Hf(aa,i)){var s=aa[i];if(s===To&&(s=XF(i)),typeof s=="undefined"&&!r)throw new Po("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new Ro("intrinsic "+e+" does not exist!")};hy.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Po("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Po('"allowMissing" argument must be a boolean');if(eI(/^%?[^%]*%?$/,e)===null)throw new Ro("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=iI(e),n=i.length>0?i[0]:"",s=nI("%"+n+"%",r),a=s.name,o=s.value,l=!1,c=s.alias;c&&(n=c[0],JF(i,QF([0,1],c)));for(var u=1,f=!0;u=i.length){var g=bc(o,d);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?o=g.get:o=o[d]}else f=Hf(o,d),o=o[d];f&&!l&&(aa[a]=o)}}return o}});var Am=U((sV,gy)=>{"use strict";m();var py=Cm(),my=Bf(),sI=my([py("%String.prototype.indexOf%")]);gy.exports=function(e,r){var i=py(e,!!r);return typeof i=="function"&&sI(e,".prototype.")>-1?my([i]):i}});var _y=U((oV,by)=>{"use strict";m();var wy=Function.prototype.toString,$o=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Pm,Gf;if(typeof $o=="function"&&typeof Object.defineProperty=="function")try{Pm=Object.defineProperty({},"length",{get:function(){throw Gf}}),Gf={},$o(function(){throw 42},null,Pm)}catch(t){t!==Gf&&($o=null)}else $o=null;var aI=/^\s*class\b/,Rm=function(e){try{var r=wy.call(e);return aI.test(r)}catch(i){return!1}},Tm=function(e){try{return Rm(e)?!1:(wy.call(e),!0)}catch(r){return!1}},jf=Object.prototype.toString,oI="[object Object]",lI="[object Function]",cI="[object GeneratorFunction]",uI="[object HTMLAllCollection]",fI="[object HTML document.all class]",dI="[object HTMLCollection]",hI=typeof Symbol=="function"&&!!Symbol.toStringTag,pI=!(0 in[,]),$m=function(){return!1};typeof document=="object"&&(vy=document.all,jf.call(vy)===jf.call(document.all)&&($m=function(e){if((pI||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=jf.call(e);return(r===uI||r===fI||r===dI||r===oI)&&e("")==null}catch(i){}return!1}));var vy;by.exports=$o?function(e){if($m(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{$o(e,null,Pm)}catch(r){if(r!==Gf)return!1}return!Rm(e)&&Tm(e)}:function(e){if($m(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(hI)return Tm(e);if(Rm(e))return!1;var r=jf.call(e);return r!==lI&&r!==cI&&!/^\[object HTML/.test(r)?!1:Tm(e)}});var Ey=U((cV,xy)=>{"use strict";m();var mI=_y(),gI=Object.prototype.toString,yy=Object.prototype.hasOwnProperty,vI=function(e,r,i){for(var n=0,s=e.length;n=3&&(n=i),_I(e)?vI(e,r,n):typeof e=="string"?wI(e,r,n):bI(e,r,n)}});var ky=U((fV,Sy)=>{"use strict";m();Sy.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var Ay=U((hV,Cy)=>{"use strict";m();var Fm=ky(),yI=typeof globalThis=="undefined"?global:globalThis;Cy.exports=function(){for(var e=[],r=0;r{"use strict";m();var Ty=wc(),xI=vm(),Fo=So(),Py=ko();Ry.exports=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Fo("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Fo("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Fo("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Fo("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Fo("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Fo("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!Py&&Py(e,r);if(Ty)Ty(e,r,{configurable:a===null&&l?l.configurable:!a,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:s===null&&l?l.writable:!s});else if(o||!n&&!s&&!a)e[r]=i;else throw new xI("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var My=U((vV,Iy)=>{"use strict";m();var Im=wc(),Fy=function(){return!!Im};Fy.hasArrayLengthDefineBug=function(){if(!Im)return null;try{return Im([],"length",{value:1}).length!==1}catch(e){return!0}};Iy.exports=Fy});var By=U((bV,Ny)=>{"use strict";m();var EI=Cm(),Dy=$y(),SI=My()(),Oy=ko(),Ly=So(),kI=EI("%Math.floor%");Ny.exports=function(e,r){if(typeof e!="function")throw new Ly("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||kI(r)!==r)throw new Ly("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in e&&Oy){var a=Oy(e,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(s=!1)}return(n||s||!i)&&(SI?Dy(e,"length",r,!0,!0):Dy(e,"length",r)),e}});var Uy=U((yV,Hy)=>{"use strict";m();var CI=Co(),AI=Nf(),TI=ym();Hy.exports=function(){return TI(CI,AI,arguments)}});var Vy=U((EV,Vf)=>{"use strict";m();var PI=By(),Gy=wc(),RI=Bf(),jy=Uy();Vf.exports=function(e){var r=RI(arguments),i=1+e.length-(arguments.length-1);return PI(r,i>0?i:0,!0)};Gy?Gy(Vf.exports,"apply",{value:jy}):Vf.exports.apply=jy});var Wy=U((kV,zy)=>{"use strict";m();var $I=wm();zy.exports=function(){return $I()&&!!Symbol.toStringTag}});var Xy=U((AV,Ky)=>{"use strict";m();var qf=Ey(),FI=Ay(),qy=Vy(),Dm=Am(),Wf=ko(),zf=Em(),II=Dm("Object.prototype.toString"),Zy=Wy()(),Yy=typeof globalThis=="undefined"?global:globalThis,Mm=FI(),Om=Dm("String.prototype.slice"),MI=Dm("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i-1}Ky.exports=function(e){if(!e||typeof e!="object")return!1;if(!Zy){var r=Om(II(e),8,-1);return LI(r)?r:r!=="Object"?!1:OI(e)}return Wf?DI(e):null}});var Jy=U((PV,Qy)=>{"use strict";m();var NI=Xy();Qy.exports=function(e){return!!NI(e)}});var tx=U(($V,ex)=>{"use strict";m();var BI=So(),HI=Am(),UI=HI("TypedArray.prototype.buffer",!0),GI=Jy();ex.exports=UI||function(e){if(!GI(e))throw new BI("Not a Typed Array");return e.buffer}});var nx=U((IV,ix)=>{"use strict";m();var Ni=Mf().Buffer,jI=e_(),VI=tx(),zI=ArrayBuffer.isView||function(e){try{return VI(e),!0}catch(r){return!1}},WI=typeof Uint8Array!="undefined",rx=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",qI=rx&&(Ni.prototype instanceof Uint8Array||Ni.TYPED_ARRAY_SUPPORT);ix.exports=function(e,r){if(Ni.isBuffer(e))return e.constructor&&!("isBuffer"in e)?Ni.from(e):e;if(typeof e=="string")return Ni.from(e,r);if(rx&&zI(e)){if(e.byteLength===0)return Ni.alloc(0);if(qI){var i=Ni.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var n=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),s=Ni.from(n);if(s.length===e.byteLength)return s}if(WI&&e instanceof Uint8Array)return Ni.from(e);var a=jI(e);if(a)for(var o=0;o255||~~l!==l)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||Ni.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return Ni.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var ax=U((DV,sx)=>{"use strict";m();var YI=Mf().Buffer,ZI=nx();function Zf(t,e){this._block=YI.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Zf.prototype.update=function(t,e){t=ZI(t,e||"utf8");for(var r=this._block,i=this._blockSize,n=t.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s};Zf.prototype._update=function(){throw new Error("_update must be implemented by subclass")};sx.exports=Zf});var cx=U((LV,lx)=>{"use strict";m();var KI=Kb(),ox=ax(),XI=Mf().Buffer,QI=[1518500249,1859775393,-1894007588,-899497514],JI=new Array(80);function xc(){this.init(),this._w=JI,ox.call(this,64,56)}KI(xc,ox);xc.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function eM(t){return t<<1|t>>>31}function tM(t){return t<<5|t>>>27}function rM(t){return t<<30|t>>>2}function iM(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}xc.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,s=this._d|0,a=this._e|0,o=0;o<16;++o)e[o]=t.readInt32BE(o*4);for(;o<80;++o)e[o]=eM(e[o-3]^e[o-8]^e[o-14]^e[o-16]);for(var l=0;l<80;++l){var c=~~(l/20),u=tM(r)+iM(c,i,n,s)+a+e[l]+QI[c]|0;a=s,s=n,n=rM(i),i=r,r=u}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0};xc.prototype._hash=function(){var t=XI.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};lx.exports=xc});var fx=U(Lm=>{m();var ux;(function(t){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof Lm=="object"?t(Lm):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(ux={}):t(ux={})})(function(t){t.version="1.2.2";function e(){for(var w=0,E=new Array(256),y=0;y!=256;++y)w=y,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,E[y]=w;return typeof Int32Array!="undefined"?new Int32Array(E):E}var r=e();function i(w){var E=0,y=0,P=0,T=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(P=0;P!=256;++P)T[P]=w[P];for(P=0;P!=256;++P)for(y=w[P],E=256+P;E<4096;E+=256)y=T[E]=y>>>8^w[y&255];var I=[];for(P=1;P!=16;++P)I[P-1]=typeof Int32Array!="undefined"?T.subarray(P*256,P*256+256):T.slice(P*256,P*256+256);return I}var n=i(r),s=n[0],a=n[1],o=n[2],l=n[3],c=n[4],u=n[5],f=n[6],d=n[7],h=n[8],p=n[9],g=n[10],v=n[11],b=n[12],_=n[13],C=n[14];function x(w,E){for(var y=E^-1,P=0,T=w.length;P>>8^r[(y^w.charCodeAt(P++))&255];return~y}function S(w,E){for(var y=E^-1,P=w.length-15,T=0;T>8&255]^b[w[T++]^y>>16&255]^v[w[T++]^y>>>24]^g[w[T++]]^p[w[T++]]^h[w[T++]]^d[w[T++]]^f[w[T++]]^u[w[T++]]^c[w[T++]]^l[w[T++]]^o[w[T++]]^a[w[T++]]^s[w[T++]]^r[w[T++]];for(P+=15;T>>8^r[(y^w[T++])&255];return~y}function A(w,E){for(var y=E^-1,P=0,T=w.length,I=0,L=0;P>>8^r[(y^I)&255]:I<2048?(y=y>>>8^r[(y^(192|I>>6&31))&255],y=y>>>8^r[(y^(128|I&63))&255]):I>=55296&&I<57344?(I=(I&1023)+64,L=w.charCodeAt(P++)&1023,y=y>>>8^r[(y^(240|I>>8&7))&255],y=y>>>8^r[(y^(128|I>>2&63))&255],y=y>>>8^r[(y^(128|L>>6&15|(I&3)<<4))&255],y=y>>>8^r[(y^(128|L&63))&255]):(y=y>>>8^r[(y^(224|I>>12&15))&255],y=y>>>8^r[(y^(128|I>>6&63))&255],y=y>>>8^r[(y^(128|I&63))&255]);return~y}t.table=r,t.bstr=x,t.buf=S,t.str=A})});var jn=U(vr=>{"use strict";m();var nM=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function sM(t,e){return Object.prototype.hasOwnProperty.call(t,e)}vr.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)sM(r,i)&&(t[i]=r[i])}}return t};vr.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var aM={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray){t.set(e.subarray(r,r+i),n);return}for(var s=0;s{"use strict";m();var lM=jn(),cM=4,dx=0,hx=1,uM=2;function Mo(t){for(var e=t.length;--e>=0;)t[e]=0}var fM=0,bx=1,dM=2,hM=3,pM=258,Vm=29,Tc=256,Sc=Tc+1+Vm,Io=30,zm=19,_x=2*Sc+1,oa=15,Nm=16,mM=7,Wm=256,yx=16,xx=17,Ex=18,Gm=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Kf=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],gM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Sx=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],vM=512,Vn=new Array((Sc+2)*2);Mo(Vn);var Ec=new Array(Io*2);Mo(Ec);var kc=new Array(vM);Mo(kc);var Cc=new Array(pM-hM+1);Mo(Cc);var qm=new Array(Vm);Mo(qm);var Xf=new Array(Io);Mo(Xf);function Bm(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}var kx,Cx,Ax;function Hm(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Tx(t){return t<256?kc[t]:kc[256+(t>>>7)]}function Ac(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function $r(t,e,r){t.bi_valid>Nm-r?(t.bi_buf|=e<>Nm-t.bi_valid,t.bi_valid+=r-Nm):(t.bi_buf|=e<>>=1,r<<=1;while(--e>0);return r>>>1}function wM(t){t.bi_valid===16?(Ac(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function bM(t,e){var r=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length,c,u,f,d,h,p,g=0;for(d=0;d<=oa;d++)t.bl_count[d]=0;for(r[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;c<_x;c++)u=t.heap[c],d=r[r[u*2+1]*2+1]+1,d>l&&(d=l,g++),r[u*2+1]=d,!(u>i)&&(t.bl_count[d]++,h=0,u>=o&&(h=a[u-o]),p=r[u*2],t.opt_len+=p*(d+h),s&&(t.static_len+=p*(n[u*2+1]+h)));if(g!==0){do{for(d=l-1;t.bl_count[d]===0;)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[l]--,g-=2}while(g>0);for(d=l;d!==0;d--)for(u=t.bl_count[d];u!==0;)f=t.heap[--c],!(f>i)&&(r[f*2+1]!==d&&(t.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),u--)}}function Rx(t,e,r){var i=new Array(oa+1),n=0,s,a;for(s=1;s<=oa;s++)i[s]=n=n+r[s-1]<<1;for(a=0;a<=e;a++){var o=t[a*2+1];o!==0&&(t[a*2]=Px(i[o]++,o))}}function _M(){var t,e,r,i,n,s=new Array(oa+1);for(r=0,i=0;i>=7;i8?Ac(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function yM(t,e,r,i){Fx(t),i&&(Ac(t,r),Ac(t,~r)),lM.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function px(t,e,r,i){var n=e*2,s=r*2;return t[n]>1;a>=1;a--)Um(t,r,a);c=s;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Um(t,r,1),o=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=o,r[c*2]=r[a*2]+r[o*2],t.depth[c]=(t.depth[a]>=t.depth[o]?t.depth[a]:t.depth[o])+1,r[a*2+1]=r[o*2+1]=c,t.heap[1]=c++,Um(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],bM(t,e),Rx(r,l,t.bl_count)}function gx(t,e,r){var i,n=-1,s,a=e[1],o=0,l=7,c=4;for(a===0&&(l=138,c=3),e[(r+1)*2+1]=65535,i=0;i<=r;i++)s=a,a=e[(i+1)*2+1],!(++o=3&&t.bl_tree[Sx[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function EM(t,e,r,i){var n;for($r(t,e-257,5),$r(t,r-1,5),$r(t,i-4,4),n=0;n>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return dx;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return hx;for(r=32;r0?(t.strm.data_type===uM&&(t.strm.data_type=SM(t)),jm(t,t.l_desc),jm(t,t.d_desc),a=xM(t),n=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=n&&(n=s)):n=s=r+5,r+4<=n&&e!==-1?Ix(t,e,r,i):t.strategy===cM||s===n?($r(t,(bx<<1)+(i?1:0),3),mx(t,Vn,Ec)):($r(t,(dM<<1)+(i?1:0),3),EM(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),mx(t,t.dyn_ltree,t.dyn_dtree)),$x(t),i&&Fx(t)}function TM(t,e,r){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=r&255,t.last_lit++,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(Cc[r]+Tc+1)*2]++,t.dyn_dtree[Tx(e)*2]++),t.last_lit===t.lit_bufsize-1}Do._tr_init=kM;Do._tr_stored_block=Ix;Do._tr_flush_block=AM;Do._tr_tally=TM;Do._tr_align=CM});var Ym=U((zV,Dx)=>{"use strict";m();function PM(t,e,r,i){for(var n=t&65535|0,s=t>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do n=n+e[i++]|0,s=s+n|0;while(--a);n%=65521,s%=65521}return n|s<<16|0}Dx.exports=PM});var Zm=U((qV,Ox)=>{"use strict";m();function RM(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var $M=RM();function FM(t,e,r,i){var n=$M,s=i+r;t^=-1;for(var a=i;a>>8^n[(t^e[a])&255];return t^-1}Ox.exports=FM});var Qf=U((ZV,Lx)=>{"use strict";m();Lx.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Wx=U(pn=>{"use strict";m();var wr=jn(),mi=Mx(),Ux=Ym(),xs=Zm(),IM=Qf(),fa=0,MM=1,DM=3,As=4,Nx=5,hn=0,Bx=1,gi=-2,OM=-3,Km=-5,LM=-1,NM=1,Jf=2,BM=3,HM=4,UM=0,GM=2,nd=8,jM=9,VM=15,zM=8,WM=29,qM=256,Qm=qM+1+WM,YM=30,ZM=19,KM=2*Qm+1,XM=15,Pe=3,ks=258,Bi=ks+Pe+1,QM=32,sd=42,Jm=69,td=73,rd=91,id=103,la=113,Rc=666,Ft=1,$c=2,ca=3,No=4,JM=3;function Cs(t,e){return t.msg=IM[e],e}function Hx(t){return(t<<1)-(t>4?9:0)}function Ss(t){for(var e=t.length;--e>=0;)t[e]=0}function Es(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(wr.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function Zt(t,e){mi._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Es(t.strm)}function Me(t,e){t.pending_buf[t.pending++]=e}function Pc(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function eD(t,e,r,i){var n=t.avail_in;return n>i&&(n=i),n===0?0:(t.avail_in-=n,wr.arraySet(e,t.input,t.next_in,n,r),t.state.wrap===1?t.adler=Ux(t.adler,e,n,r):t.state.wrap===2&&(t.adler=xs(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)}function Gx(t,e){var r=t.max_chain_length,i=t.strstart,n,s,a=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-Bi?t.strstart-(t.w_size-Bi):0,c=t.window,u=t.w_mask,f=t.prev,d=t.strstart+ks,h=c[i+a-1],p=c[i+a];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do if(n=e,!(c[n+a]!==p||c[n+a-1]!==h||c[n]!==c[i]||c[++n]!==c[i+1])){i+=2,n++;do;while(c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&ia){if(t.match_start=e,a=s,s>=o)break;h=c[i+a-1],p=c[i+a]}}while((e=f[e&u])>l&&--r!==0);return a<=t.lookahead?a:t.lookahead}function ua(t){var e=t.w_size,r,i,n,s,a;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-Bi)){wr.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,r=i;do n=t.head[--r],t.head[r]=n>=e?n-e:0;while(--i);i=e,r=i;do n=t.prev[--r],t.prev[r]=n>=e?n-e:0;while(--i);s+=e}if(t.strm.avail_in===0)break;if(i=eD(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=i,t.lookahead+t.insert>=Pe)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ua(t),t.lookahead===0&&e===fa)return Ft;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((t.strstart===0||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,Zt(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-Bi&&(Zt(t,!1),t.strm.avail_out===0))return Ft}return t.insert=0,e===As?(Zt(t,!0),t.strm.avail_out===0?ca:No):(t.strstart>t.block_start&&(Zt(t,!1),t.strm.avail_out===0),Ft)}function Xm(t,e){for(var r,i;;){if(t.lookahead=Pe&&(t.ins_h=(t.ins_h<=Pe)if(i=mi._tr_tally(t,t.strstart-t.match_start,t.match_length-Pe),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=Pe){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=Pe&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=Pe-1)),t.prev_length>=Pe&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-Pe,i=mi._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-Pe),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<=Pe&&t.strstart>0&&(n=t.strstart-1,i=a[n],i===a[++n]&&i===a[++n]&&i===a[++n])){s=t.strstart+ks;do;while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=Pe?(r=mi._tr_tally(t,1,t.match_length-Pe),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=mi._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Zt(t,!1),t.strm.avail_out===0))return Ft}return t.insert=0,e===As?(Zt(t,!0),t.strm.avail_out===0?ca:No):t.last_lit&&(Zt(t,!1),t.strm.avail_out===0)?Ft:$c}function iD(t,e){for(var r;;){if(t.lookahead===0&&(ua(t),t.lookahead===0)){if(e===fa)return Ft;break}if(t.match_length=0,r=mi._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Zt(t,!1),t.strm.avail_out===0))return Ft}return t.insert=0,e===As?(Zt(t,!0),t.strm.avail_out===0?ca:No):t.last_lit&&(Zt(t,!1),t.strm.avail_out===0)?Ft:$c}function dn(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}var Lo;Lo=[new dn(0,0,0,0,tD),new dn(4,4,8,4,Xm),new dn(4,5,16,8,Xm),new dn(4,6,32,32,Xm),new dn(4,4,16,16,Oo),new dn(8,16,32,32,Oo),new dn(8,16,128,128,Oo),new dn(8,32,128,256,Oo),new dn(32,128,258,1024,Oo),new dn(32,258,258,4096,Oo)];function nD(t){t.window_size=2*t.w_size,Ss(t.head),t.max_lazy_match=Lo[t.level].max_lazy,t.good_match=Lo[t.level].good_length,t.nice_match=Lo[t.level].nice_length,t.max_chain_length=Lo[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Pe-1,t.match_available=0,t.ins_h=0}function sD(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=nd,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new wr.Buf16(KM*2),this.dyn_dtree=new wr.Buf16((2*YM+1)*2),this.bl_tree=new wr.Buf16((2*ZM+1)*2),Ss(this.dyn_ltree),Ss(this.dyn_dtree),Ss(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new wr.Buf16(XM+1),this.heap=new wr.Buf16(2*Qm+1),Ss(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new wr.Buf16(2*Qm+1),Ss(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function jx(t){var e;return!t||!t.state?Cs(t,gi):(t.total_in=t.total_out=0,t.data_type=GM,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?sd:la,t.adler=e.wrap===2?0:1,e.last_flush=fa,mi._tr_init(e),hn)}function Vx(t){var e=jx(t);return e===hn&&nD(t.state),e}function aD(t,e){return!t||!t.state||t.state.wrap!==2?gi:(t.state.gzhead=e,hn)}function zx(t,e,r,i,n,s){if(!t)return gi;var a=1;if(e===LM&&(e=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),n<1||n>jM||r!==nd||i<8||i>15||e<0||e>9||s<0||s>HM)return Cs(t,gi);i===8&&(i=9);var o=new sD;return t.state=o,o.strm=t,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<Nx||e<0)return t?Cs(t,gi):gi;if(i=t.state,!t.output||!t.input&&t.avail_in!==0||i.status===Rc&&e!==As)return Cs(t,t.avail_out===0?Km:gi);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===sd)if(i.wrap===2)t.adler=0,Me(i,31),Me(i,139),Me(i,8),i.gzhead?(Me(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Me(i,i.gzhead.time&255),Me(i,i.gzhead.time>>8&255),Me(i,i.gzhead.time>>16&255),Me(i,i.gzhead.time>>24&255),Me(i,i.level===9?2:i.strategy>=Jf||i.level<2?4:0),Me(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Me(i,i.gzhead.extra.length&255),Me(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=xs(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Jm):(Me(i,0),Me(i,0),Me(i,0),Me(i,0),Me(i,0),Me(i,i.level===9?2:i.strategy>=Jf||i.level<2?4:0),Me(i,JM),i.status=la);else{var a=nd+(i.w_bits-8<<4)<<8,o=-1;i.strategy>=Jf||i.level<2?o=0:i.level<6?o=1:i.level===6?o=2:o=3,a|=o<<6,i.strstart!==0&&(a|=QM),a+=31-a%31,i.status=la,Pc(i,a),i.strstart!==0&&(Pc(i,t.adler>>>16),Pc(i,t.adler&65535)),t.adler=1}if(i.status===Jm)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=xs(t.adler,i.pending_buf,i.pending-n,n)),Es(t),n=i.pending,i.pending===i.pending_buf_size));)Me(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=xs(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=td)}else i.status=td;if(i.status===td)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=xs(t.adler,i.pending_buf,i.pending-n,n)),Es(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}i.gzindexn&&(t.adler=xs(t.adler,i.pending_buf,i.pending-n,n)),s===0&&(i.gzindex=0,i.status=rd)}else i.status=rd;if(i.status===rd)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=xs(t.adler,i.pending_buf,i.pending-n,n)),Es(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}i.gzindexn&&(t.adler=xs(t.adler,i.pending_buf,i.pending-n,n)),s===0&&(i.status=id)}else i.status=id;if(i.status===id&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Es(t),i.pending+2<=i.pending_buf_size&&(Me(i,t.adler&255),Me(i,t.adler>>8&255),t.adler=0,i.status=la)):i.status=la),i.pending!==0){if(Es(t),t.avail_out===0)return i.last_flush=-1,hn}else if(t.avail_in===0&&Hx(e)<=Hx(r)&&e!==As)return Cs(t,Km);if(i.status===Rc&&t.avail_in!==0)return Cs(t,Km);if(t.avail_in!==0||i.lookahead!==0||e!==fa&&i.status!==Rc){var l=i.strategy===Jf?iD(i,e):i.strategy===BM?rD(i,e):Lo[i.level].func(i,e);if((l===ca||l===No)&&(i.status=Rc),l===Ft||l===ca)return t.avail_out===0&&(i.last_flush=-1),hn;if(l===$c&&(e===MM?mi._tr_align(i):e!==Nx&&(mi._tr_stored_block(i,0,0,!1),e===DM&&(Ss(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Es(t),t.avail_out===0))return i.last_flush=-1,hn}return e!==As?hn:i.wrap<=0?Bx:(i.wrap===2?(Me(i,t.adler&255),Me(i,t.adler>>8&255),Me(i,t.adler>>16&255),Me(i,t.adler>>24&255),Me(i,t.total_in&255),Me(i,t.total_in>>8&255),Me(i,t.total_in>>16&255),Me(i,t.total_in>>24&255)):(Pc(i,t.adler>>>16),Pc(i,t.adler&65535)),Es(t),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?hn:Bx)}function cD(t){var e;return!t||!t.state?gi:(e=t.state.status,e!==sd&&e!==Jm&&e!==td&&e!==rd&&e!==id&&e!==la&&e!==Rc?Cs(t,gi):(t.state=null,e===la?Cs(t,OM):hn))}function uD(t,e){var r=e.length,i,n,s,a,o,l,c,u;if(!t||!t.state||(i=t.state,a=i.wrap,a===2||a===1&&i.status!==sd||i.lookahead))return gi;for(a===1&&(t.adler=Ux(t.adler,e,r,0)),i.wrap=0,r>=i.w_size&&(a===0&&(Ss(i.head),i.strstart=0,i.block_start=0,i.insert=0),u=new wr.Buf8(i.w_size),wr.arraySet(u,e,r-i.w_size,i.w_size,0),e=u,r=i.w_size),o=t.avail_in,l=t.next_in,c=t.input,t.avail_in=r,t.next_in=0,t.input=e,ua(i);i.lookahead>=Pe;){n=i.strstart,s=i.lookahead-(Pe-1);do i.ins_h=(i.ins_h<{"use strict";m();var ad=jn(),qx=!0,Yx=!0;try{String.fromCharCode.apply(null,[0])}catch(t){qx=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Yx=!1}var Fc=new ad.Buf8(256);for(zn=0;zn<256;zn++)Fc[zn]=zn>=252?6:zn>=248?5:zn>=240?4:zn>=224?3:zn>=192?2:1;var zn;Fc[254]=Fc[254]=1;Bo.string2buf=function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n>>6,e[s++]=128|r&63):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|r&63):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|r&63);return e};function Zx(t,e){if(e<65534&&(t.subarray&&Yx||!t.subarray&&qx))return String.fromCharCode.apply(null,ad.shrinkBuf(t,e));for(var r="",i=0;i4){o[i++]=65533,r+=s-1;continue}for(n&=s===2?31:s===3?15:7;s>1&&r1){o[i++]=65533;continue}n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|n&1023)}return Zx(o,i)};Bo.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+Fc[t[r]]>e?r:e}});var tg=U((tz,Kx)=>{"use strict";m();function fD(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Kx.exports=fD});var e1=U(Dc=>{"use strict";m();var Ic=Wx(),Mc=jn(),ig=eg(),ng=Qf(),dD=tg(),Jx=Object.prototype.toString,hD=0,rg=4,Ho=0,Xx=1,Qx=2,pD=-1,mD=0,gD=8;function da(t){if(!(this instanceof da))return new da(t);this.options=Mc.assign({level:pD,method:gD,chunkSize:16384,windowBits:15,memLevel:8,strategy:mD,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new dD,this.strm.avail_out=0;var r=Ic.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Ho)throw new Error(ng[r]);if(e.header&&Ic.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(typeof e.dictionary=="string"?i=ig.string2buf(e.dictionary):Jx.call(e.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(e.dictionary):i=e.dictionary,r=Ic.deflateSetDictionary(this.strm,i),r!==Ho)throw new Error(ng[r]);this._dict_set=!0}}da.prototype.push=function(t,e){var r=this.strm,i=this.options.chunkSize,n,s;if(this.ended)return!1;s=e===~~e?e:e===!0?rg:hD,typeof t=="string"?r.input=ig.string2buf(t):Jx.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Mc.Buf8(i),r.next_out=0,r.avail_out=i),n=Ic.deflate(r,s),n!==Xx&&n!==Ho)return this.onEnd(n),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(s===rg||s===Qx))&&(this.options.to==="string"?this.onData(ig.buf2binstring(Mc.shrinkBuf(r.output,r.next_out))):this.onData(Mc.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&n!==Xx);return s===rg?(n=Ic.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Ho):(s===Qx&&(this.onEnd(Ho),r.avail_out=0),!0)};da.prototype.onData=function(t){this.chunks.push(t)};da.prototype.onEnd=function(t){t===Ho&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Mc.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function sg(t,e){var r=new da(e);if(r.push(t,!0),r.err)throw r.msg||ng[r.err];return r.result}function vD(t,e){return e=e||{},e.raw=!0,sg(t,e)}function wD(t,e){return e=e||{},e.gzip=!0,sg(t,e)}Dc.Deflate=da;Dc.deflate=sg;Dc.deflateRaw=vD;Dc.gzip=wD});var r1=U((sz,t1)=>{"use strict";m();var od=30,bD=12;t1.exports=function(e,r){var i,n,s,a,o,l,c,u,f,d,h,p,g,v,b,_,C,x,S,A,w,E,y,P,T;i=e.state,n=e.next_in,P=e.input,s=n+(e.avail_in-5),a=e.next_out,T=e.output,o=a-(r-e.avail_out),l=a+(e.avail_out-257),c=i.dmax,u=i.wsize,f=i.whave,d=i.wnext,h=i.window,p=i.hold,g=i.bits,v=i.lencode,b=i.distcode,_=(1<>>24,p>>>=S,g-=S,S=x>>>16&255,S===0)T[a++]=x&65535;else if(S&16){A=x&65535,S&=15,S&&(g>>=S,g-=S),g<15&&(p+=P[n++]<>>24,p>>>=S,g-=S,S=x>>>16&255,S&16){if(w=x&65535,S&=15,gc){e.msg="invalid distance too far back",i.mode=od;break e}if(p>>>=S,g-=S,S=a-o,w>S){if(S=w-S,S>f&&i.sane){e.msg="invalid distance too far back",i.mode=od;break e}if(E=0,y=h,d===0){if(E+=u-S,S2;)T[a++]=y[E++],T[a++]=y[E++],T[a++]=y[E++],A-=3;A&&(T[a++]=y[E++],A>1&&(T[a++]=y[E++]))}else{E=a-w;do T[a++]=T[E++],T[a++]=T[E++],T[a++]=T[E++],A-=3;while(A>2);A&&(T[a++]=T[E++],A>1&&(T[a++]=T[E++]))}}else if((S&64)===0){x=b[(x&65535)+(p&(1<>3,n-=A,g-=A<<3,p&=(1<{"use strict";m();var i1=jn(),Uo=15,n1=852,s1=592,a1=0,ag=1,o1=2,_D=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],yD=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],xD=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ED=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];l1.exports=function(e,r,i,n,s,a,o,l){var c=l.bits,u=0,f=0,d=0,h=0,p=0,g=0,v=0,b=0,_=0,C=0,x,S,A,w,E,y=null,P=0,T,I=new i1.Buf16(Uo+1),L=new i1.Buf16(Uo+1),H=null,te=0,xe,Z,K;for(u=0;u<=Uo;u++)I[u]=0;for(f=0;f=1&&I[h]===0;h--);if(p>h&&(p=h),h===0)return s[a++]=1<<24|64<<16|0,s[a++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d0&&(e===a1||h!==1))return-1;for(L[1]=0,u=1;un1||e===o1&&_>s1)return 1;for(;;){xe=u-v,o[f]T?(Z=H[te+o[f]],K=y[P+o[f]]):(Z=96,K=0),x=1<>v)+S]=xe<<24|Z<<16|K|0;while(S!==0);for(x=1<>=1;if(x!==0?(C&=x-1,C+=x):C=0,f++,--I[u]===0){if(u===h)break;u=r[i+o[f]]}if(u>p&&(C&w)!==A){for(v===0&&(v=p),E+=d,g=u-v,b=1<n1||e===o1&&_>s1)return 1;A=C&w,s[A]=p<<24|g<<16|E-a|0}}return C!==0&&(s[E+C]=u-v<<24|64<<16|0),l.bits=p,0}});var V1=U(Hi=>{"use strict";m();var Qr=jn(),dg=Ym(),mn=Zm(),SD=r1(),Oc=c1(),kD=0,D1=1,O1=2,u1=4,CD=5,ld=6,ha=0,AD=1,TD=2,vi=-2,L1=-3,hg=-4,PD=-5,f1=8,N1=1,d1=2,h1=3,p1=4,m1=5,g1=6,v1=7,w1=8,b1=9,_1=10,fd=11,Wn=12,og=13,y1=14,lg=15,x1=16,E1=17,S1=18,k1=19,cd=20,ud=21,C1=22,A1=23,T1=24,P1=25,R1=26,cg=27,$1=28,F1=29,it=30,pg=31,RD=32,$D=852,FD=592,ID=15,MD=ID;function I1(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function DD(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Qr.Buf16(320),this.work=new Qr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function B1(t){var e;return!t||!t.state?vi:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=N1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Qr.Buf32($D),e.distcode=e.distdyn=new Qr.Buf32(FD),e.sane=1,e.back=-1,ha)}function H1(t){var e;return!t||!t.state?vi:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,B1(t))}function U1(t,e){var r,i;return!t||!t.state||(i=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?vi:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,H1(t))}function G1(t,e){var r,i;return t?(i=new DD,t.state=i,i.window=null,r=U1(t,e),r!==ha&&(t.state=null),r):vi}function OD(t){return G1(t,MD)}var M1=!0,ug,fg;function LD(t){if(M1){var e;for(ug=new Qr.Buf32(512),fg=new Qr.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Oc(D1,t.lens,0,288,ug,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Oc(O1,t.lens,0,32,fg,0,t.work,{bits:5}),M1=!1}t.lencode=ug,t.lenbits=9,t.distcode=fg,t.distbits=5}function j1(t,e,r,i){var n,s=t.state;return s.window===null&&(s.wsize=1<=s.wsize?(Qr.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),Qr.arraySet(s.window,e,r-i,n,s.wnext),i-=n,i?(Qr.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=mn(r.check,y,2,0),c=0,u=0,r.mode=d1;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=it;break}if((c&15)!==f1){t.msg="unknown compression method",r.mode=it;break}if(c>>>=4,u-=4,w=(c&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){t.msg="invalid window size",r.mode=it;break}r.dmax=1<>8&1),r.flags&512&&(y[0]=c&255,y[1]=c>>>8&255,r.check=mn(r.check,y,2,0)),c=0,u=0,r.mode=h1;case h1:for(;u<32;){if(o===0)break e;o--,c+=i[s++]<>>8&255,y[2]=c>>>16&255,y[3]=c>>>24&255,r.check=mn(r.check,y,4,0)),c=0,u=0,r.mode=p1;case p1:for(;u<16;){if(o===0)break e;o--,c+=i[s++]<>8),r.flags&512&&(y[0]=c&255,y[1]=c>>>8&255,r.check=mn(r.check,y,2,0)),c=0,u=0,r.mode=m1;case m1:if(r.flags&1024){for(;u<16;){if(o===0)break e;o--,c+=i[s++]<>>8&255,r.check=mn(r.check,y,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=g1;case g1:if(r.flags&1024&&(h=r.length,h>o&&(h=o),h&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Qr.arraySet(r.head.extra,i,s,h,w)),r.flags&512&&(r.check=mn(r.check,i,h,s)),o-=h,s+=h,r.length-=h),r.length))break e;r.length=0,r.mode=v1;case v1:if(r.flags&2048){if(o===0)break e;h=0;do w=i[s+h++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&h>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Wn;break;case _1:for(;u<32;){if(o===0)break e;o--,c+=i[s++]<>>=u&7,u-=u&7,r.mode=cg;break}for(;u<3;){if(o===0)break e;o--,c+=i[s++]<>>=1,u-=1,c&3){case 0:r.mode=y1;break;case 1:if(LD(r),r.mode=cd,e===ld){c>>>=2,u-=2;break e}break;case 2:r.mode=E1;break;case 3:t.msg="invalid block type",r.mode=it}c>>>=2,u-=2;break;case y1:for(c>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,c+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=it;break}if(r.length=c&65535,c=0,u=0,r.mode=lg,e===ld)break e;case lg:r.mode=x1;case x1:if(h=r.length,h){if(h>o&&(h=o),h>l&&(h=l),h===0)break e;Qr.arraySet(n,i,s,h,a),o-=h,s+=h,l-=h,a+=h,r.length-=h;break}r.mode=Wn;break;case E1:for(;u<14;){if(o===0)break e;o--,c+=i[s++]<>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=it;break}r.have=0,r.mode=S1;case S1:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[I[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},E=Oc(kD,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,E){t.msg="invalid code lengths set",r.mode=it;break}r.have=0,r.mode=k1;case k1:for(;r.have>>24,_=v>>>16&255,C=v&65535,!(b<=u);){if(o===0)break e;o--,c+=i[s++]<>>=b,u-=b,r.lens[r.have++]=C;else{if(C===16){for(T=b+2;u>>=b,u-=b,r.have===0){t.msg="invalid bit length repeat",r.mode=it;break}w=r.lens[r.have-1],h=3+(c&3),c>>>=2,u-=2}else if(C===17){for(T=b+3;u>>=b,u-=b,w=0,h=3+(c&7),c>>>=3,u-=3}else{for(T=b+7;u>>=b,u-=b,w=0,h=11+(c&127),c>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=it;break}for(;h--;)r.lens[r.have++]=w}}if(r.mode===it)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=it;break}if(r.lenbits=9,P={bits:r.lenbits},E=Oc(D1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,E){t.msg="invalid literal/lengths set",r.mode=it;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},E=Oc(O1,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,E){t.msg="invalid distances set",r.mode=it;break}if(r.mode=cd,e===ld)break e;case cd:r.mode=ud;case ud:if(o>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=s,t.avail_in=o,r.hold=c,r.bits=u,SD(t,d),a=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,c=r.hold,u=r.bits,r.mode===Wn&&(r.back=-1);break}for(r.back=0;v=r.lencode[c&(1<>>24,_=v>>>16&255,C=v&65535,!(b<=u);){if(o===0)break e;o--,c+=i[s++]<>x)],b=v>>>24,_=v>>>16&255,C=v&65535,!(x+b<=u);){if(o===0)break e;o--,c+=i[s++]<>>=x,u-=x,r.back+=x}if(c>>>=b,u-=b,r.back+=b,r.length=C,_===0){r.mode=R1;break}if(_&32){r.back=-1,r.mode=Wn;break}if(_&64){t.msg="invalid literal/length code",r.mode=it;break}r.extra=_&15,r.mode=C1;case C1:if(r.extra){for(T=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=A1;case A1:for(;v=r.distcode[c&(1<>>24,_=v>>>16&255,C=v&65535,!(b<=u);){if(o===0)break e;o--,c+=i[s++]<>x)],b=v>>>24,_=v>>>16&255,C=v&65535,!(x+b<=u);){if(o===0)break e;o--,c+=i[s++]<>>=x,u-=x,r.back+=x}if(c>>>=b,u-=b,r.back+=b,_&64){t.msg="invalid distance code",r.mode=it;break}r.offset=C,r.extra=_&15,r.mode=T1;case T1:if(r.extra){for(T=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=it;break}r.mode=P1;case P1:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=it;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),g=r.window}else g=n,p=a-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do n[a++]=g[p++];while(--h);r.length===0&&(r.mode=ud);break;case R1:if(l===0)break e;n[a++]=r.length,l--,r.mode=ud;break;case cg:if(r.wrap){for(;u<32;){if(o===0)break e;o--,c|=i[s++]<{"use strict";m();z1.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var q1=U((hz,W1)=>{"use strict";m();function GD(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}W1.exports=GD});var Z1=U(Nc=>{"use strict";m();var Go=V1(),Lc=jn(),dd=eg(),bt=mg(),gg=Qf(),jD=tg(),VD=q1(),Y1=Object.prototype.toString;function pa(t){if(!(this instanceof pa))return new pa(t);this.options=Lc.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new jD,this.strm.avail_out=0;var r=Go.inflateInit2(this.strm,e.windowBits);if(r!==bt.Z_OK)throw new Error(gg[r]);if(this.header=new VD,Go.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=dd.string2buf(e.dictionary):Y1.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Go.inflateSetDictionary(this.strm,e.dictionary),r!==bt.Z_OK)))throw new Error(gg[r])}pa.prototype.push=function(t,e){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,s,a,o,l,c,u=!1;if(this.ended)return!1;a=e===~~e?e:e===!0?bt.Z_FINISH:bt.Z_NO_FLUSH,typeof t=="string"?r.input=dd.binstring2buf(t):Y1.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Lc.Buf8(i),r.next_out=0,r.avail_out=i),s=Go.inflate(r,bt.Z_NO_FLUSH),s===bt.Z_NEED_DICT&&n&&(s=Go.inflateSetDictionary(this.strm,n)),s===bt.Z_BUF_ERROR&&u===!0&&(s=bt.Z_OK,u=!1),s!==bt.Z_STREAM_END&&s!==bt.Z_OK)return this.onEnd(s),this.ended=!0,!1;r.next_out&&(r.avail_out===0||s===bt.Z_STREAM_END||r.avail_in===0&&(a===bt.Z_FINISH||a===bt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=dd.utf8border(r.output,r.next_out),l=r.next_out-o,c=dd.buf2string(r.output,o),r.next_out=l,r.avail_out=i-l,l&&Lc.arraySet(r.output,r.output,o,l,0),this.onData(c)):this.onData(Lc.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&s!==bt.Z_STREAM_END);return s===bt.Z_STREAM_END&&(a=bt.Z_FINISH),a===bt.Z_FINISH?(s=Go.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===bt.Z_OK):(a===bt.Z_SYNC_FLUSH&&(this.onEnd(bt.Z_OK),r.avail_out=0),!0)};pa.prototype.onData=function(t){this.chunks.push(t)};pa.prototype.onEnd=function(t){t===bt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Lc.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function vg(t,e){var r=new pa(e);if(r.push(t,!0),r.err)throw r.msg||gg[r.err];return r.result}function zD(t,e){return e=e||{},e.raw=!0,vg(t,e)}Nc.Inflate=pa;Nc.inflate=vg;Nc.inflateRaw=zD;Nc.ungzip=vg});var Q1=U((vz,X1)=>{"use strict";m();var WD=jn().assign,qD=e1(),YD=Z1(),ZD=mg(),K1={};WD(K1,qD,YD,ZD);X1.exports=K1});var tE=U((bz,eE)=>{"use strict";m();var J1=(t,e)=>function(...r){let i=e.promiseModule;return new i((n,s)=>{e.multiArgs?r.push((...a)=>{e.errorFirst?a[0]?s(a):(a.shift(),n(a)):n(a)}):e.errorFirst?r.push((a,o)=>{a?s(a):n(o)}):r.push(n),t.apply(this,r)})};eE.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);let r=typeof t;if(!(t!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${t===null?"null":r}\``);let i=s=>{let a=o=>typeof o=="string"?s===o:o.test(s);return e.include?e.include.some(a):!e.exclude.some(a)},n;r==="function"?n=function(...s){return e.excludeMain?t(...s):J1(t,e).apply(this,s)}:n=Object.create(Object.getPrototypeOf(t));for(let s in t){let a=t[s];n[s]=typeof a=="function"&&i(s)?J1(a,e):a}return n}});var uE=U((yz,cE)=>{m();function rE(t){return Array.isArray(t)?t:[t]}var _g="",iE=" ",wg="\\",KD=/^\s+$/,XD=/(?:[^\\]|^)\\$/,QD=/^\\!/,JD=/^\\#/,eO=/\r?\n/g,tO=/^\.*\/|^\.+$/,bg="/",aE="node-ignore";typeof Symbol!="undefined"&&(aE=Symbol.for("node-ignore"));var nE=aE,rO=(t,e,r)=>Object.defineProperty(t,e,{value:r}),iO=/([0-z])-([0-z])/g,oE=()=>!1,nO=t=>t.replace(iO,(e,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?e:_g),sO=t=>{let{length:e}=t;return t.slice(0,e-e%2)},aO=[[/^\uFEFF/,()=>_g],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,r)=>e+(r.indexOf("\\")===0?iE:_g)],[/(\\+?)\s/g,(t,e)=>{let{length:r}=e;return e.slice(0,r-r%2)+iE}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6{let i=r.replace(/\\\*/g,"[^\\/]*");return e+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>wg],[/\\\\/g,()=>wg],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,r,i,n)=>e===wg?`\\[${r}${sO(i)}${n}`:n==="]"&&i.length%2===0?`[${nO(r)}${i}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],sE=Object.create(null),oO=(t,e)=>{let r=sE[t];return r||(r=aO.reduce((i,[n,s])=>i.replace(n,s.bind(t)),t),sE[t]=r),e?new RegExp(r,"i"):new RegExp(r)},Eg=t=>typeof t=="string",lO=t=>t&&Eg(t)&&!KD.test(t)&&!XD.test(t)&&t.indexOf("#")!==0,cO=t=>t.split(eO),yg=class{constructor(e,r,i,n){this.origin=e,this.pattern=r,this.negative=i,this.regex=n}},uO=(t,e)=>{let r=t,i=!1;t.indexOf("!")===0&&(i=!0,t=t.substr(1)),t=t.replace(QD,"!").replace(JD,"#");let n=oO(t,e);return new yg(r,t,i,n)},fO=(t,e)=>{throw new e(t)},qn=(t,e,r)=>Eg(t)?t?qn.isNotRelative(t)?r(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${e}\``,TypeError),lE=t=>tO.test(t);qn.isNotRelative=lE;qn.convert=t=>t;var xg=class{constructor({ignorecase:e=!0,ignoreCase:r=e,allowRelativePaths:i=!1}={}){rO(this,nE,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[nE]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(lO(e)){let r=uO(e,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(e){return this._added=!1,rE(Eg(e)?cO(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,r){let i=!1,n=!1;return this._rules.forEach(s=>{let{negative:a}=s;if(n===a&&i!==n||a&&!i&&!n&&!r)return;s.regex.test(e)&&(i=!a,n=a)}),{ignored:i,unignored:n}}_test(e,r,i,n){let s=e&&qn.convert(e);return qn(s,e,this._allowRelativePaths?oE:fO),this._t(s,r,i,n)}_t(e,r,i,n){if(e in r)return r[e];if(n||(n=e.split(bg)),n.pop(),!n.length)return r[e]=this._testOne(e,i);let s=this._t(n.join(bg)+bg,r,i,n);return r[e]=s.ignored?s:this._testOne(e,i)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return rE(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},hd=t=>new xg(t),dO=t=>qn(t&&qn.convert(t),t,oE);hd.isPathValid=dO;hd.default=hd;cE.exports=hd;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let t=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");qn.convert=t;let e=/^[a-z]:\//i;qn.isNotRelative=r=>e.test(r)||lE(r)}});var dE=U((Ez,fE)=>{"use strict";m();function hO(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gn(t,e,r){return e=e instanceof RegExp?e:new RegExp(hO(e),"g"),t.replace(e,r)}var pO={clean:function(e){if(typeof e!="string")throw new Error("Expected a string, received: "+e);return e=gn(e,"./","/"),e=gn(e,"..","."),e=gn(e," ","-"),e=gn(e,/^[~^:?*\\\-]/g,""),e=gn(e,/[~^:?*\\]/g,"-"),e=gn(e,/[~^:?*\\\-]$/g,""),e=gn(e,"@{","-"),e=gn(e,/\.$/g,""),e=gn(e,/\/$/g,""),e=gn(e,/\.lock$/g,""),e}};fE.exports=pO});var pE=U((kz,hE)=>{m();hE.exports=function(t,e){var r=t,i=e,n=r.length,s=i.length,a=!1,o=null,l=n+1,c=[],u=[],f=[],d="",h=-1,p=0,g=1,v,b,_=function(){n>=s&&(v=r,b=n,r=i,i=v,n=s,s=b,a=!0,l=n+1)},C=function(w,E,y){return{x:w,y:E,k:y}},x=function(w,E){return{elem:w,t:E}},S=function(w,E,y){var P,T,I;for(E>y?P=c[w-1+l]:P=c[w+1+l],I=Math.max(E,y),T=I-w;T=0;--I)for(;PT-P?(a?f[f.length]=new x(i[T],h):f[f.length]=new x(i[T],g),++y,++T):w[I].y-w[I].x=w+1;--H)y[H+l]=S(H,y[H-1+l]+1,y[H+1+l]);y[w+l]=S(w,y[w-1+l]+1,y[w+1+l])}while(y[w+l]!==s);for(o=w+2*P,T=c[w+l],I=[];T!==-1;)I[I.length]=new C(u[T].x,u[T].y,null),T=u[T].k;A(I)}}}});var vE=U((Az,gE)=>{m();var mO=pE();function gO(t,e){var r=new mO(t,e);r.compose();for(var i=r.getses(),n,s,a=t.length-1,o=e.length-1,l=i.length-1;l>=0;--l)i[l].t===r.SES_COMMON?(s?(s.chain={file1index:a,file2index:o,chain:null},s=s.chain):(n={file1index:a,file2index:o,chain:null},s=n),a--,o--):i[l].t===r.SES_DELETE?a--:i[l].t===r.SES_ADD&&o--;var c={file1index:-1,file2index:-1,chain:null};return s?(s.chain=c,n):c}function mE(t,e){for(var r=[],i=t.length,n=e.length,s=gO(t,e);s!==null;s=s.chain){var a=i-s.file1index-1,o=n-s.file2index-1;i=s.file1index,n=s.file2index,(a||o)&&r.push({file1:[i+1,a],file2:[n+1,o]})}return r.reverse(),r}function vO(t,e,r){var i,n=mE(e,t),s=mE(e,r),a=[];function o(L,H){a.push([L.file1[0],H,L.file1[1],L.file2[0],L.file2[1]])}for(i=0;ic&&(l.push([1,c,L-c]),c=L)}for(var f=0;fg)break;g=Math.max(g,b+v[2]),f++}if(u(p),d==f)h[4]>0&&l.push([h[1],h[3],h[4]]);else{var _={0:[t.length,-1,e.length,-1],2:[r.length,-1,e.length,-1]};for(i=d;i<=f;i++){h=a[i];var C=h[1],x=_[C],S=h[0],A=S+h[2],w=h[3],E=w+h[4];x[0]=Math.min(w,x[0]),x[1]=Math.max(E,x[1]),x[2]=Math.min(S,x[2]),x[3]=Math.max(A,x[3])}var y=_[0][0]+(p-_[0][2]),P=_[0][1]+(g-_[0][3]),T=_[2][0]+(p-_[2][2]),I=_[2][1]+(g-_[2][3]);l.push([-1,y,P-y,p,g-p,T,I-T])}c=g}return u(e.length),l}function wO(t,e,r){var i=[],n=[t,e,r],s=vO(t,e,r),a=[];function o(){a.length&&i.push({ok:a}),a=[]}function l(h){for(var p=0;p{"use strict";m();LS.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var HS=U((s9,BS)=>{m();var sv={px:{px:1,cm:37.79527559055118,mm:3.7795275590551185,in:96,pt:1.3333333333333333,pc:16},cm:{px:.026458333333333334,cm:1,mm:.1,in:2.54,pt:.035277777777777776,pc:.42333333333333334},mm:{px:.26458333333333334,cm:10,mm:1,in:25.4,pt:.35277777777777775,pc:4.233333333333333},in:{px:.010416666666666666,cm:.39370078740157477,mm:.03937007874015748,in:1,pt:.013888888888888888,pc:.16666666666666666},pt:{px:.75,cm:28.346456692913385,mm:2.834645669291339,in:72,pt:1,pc:12},pc:{px:.0625,cm:2.3622047244094486,mm:.2362204724409449,in:6,pt:.08333333333333333,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:1.1111111111111112,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:.002777777777777778,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:.39370078740157477,dppx:.010416666666666666},dpcm:{dpi:2.54,dpcm:1,dppx:.026458333333333334},dppx:{dpi:96,dpcm:37.79527559055118,dppx:1}};BS.exports=function(t,e,r,i){if(!sv.hasOwnProperty(r))throw new Error("Cannot convert to "+r);if(!sv[r].hasOwnProperty(e))throw new Error("Cannot convert from "+e+" to "+r);var n=sv[r][e]*t;return i!==!1?(i=Math.pow(10,parseInt(i)||5),Math.round(n*i)/i):n}});var ek=U(Kn=>{"use strict";m();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.fromRgba=sl;Kn.fromRgb=av;Kn.fromHsla=Ld;Kn.fromHsl=QS;Kn.fromString=JS;Kn.default=void 0;var US=VS(NS()),HB=VS(HS());function VS(t){return t&&t.__esModule?t:{default:t}}function UB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function GS(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=new Array(e);r-1}function qB(t,e,r){var i=t/255,n=e/255,s=r/255,a=Math.max(i,n,s),o=Math.min(i,n,s),l=a-o,c=(a+o)/2;if(l===0)return[0,0,c*100];var u=l/(1-Math.abs(2*c-1)),f=(function(){switch(a){case i:return(n-s)/l%6;case n:return(s-i)/l+2;default:return(i-n)/l+4}})();return[f*60,u*100,c*100]}function YB(t,e,r){var i=t/60,n=e/100,s=r/100,a=(1-Math.abs(2*s-1))*n,o=a*(1-Math.abs(i%2-1)),l=s-a/2,c=(function(){return i<1?[a,o,0]:i<2?[o,a,0]:i<3?[0,a,o]:i<4?[0,o,a]:i<5?[o,0,a]:[a,0,o]})(),u=_r(c,3),f=u[0],d=u[1],h=u[2];return[(f+l)*255,(d+l)*255,(h+l)*255]}var ZB=(function(){function t(e){var r=_r(e,4),i=r[0],n=r[1],s=r[2],a=r[3];UB(this,t),this.values=[Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(s,10),255),0),a==null?1:Math.max(Math.min(parseFloat(a),255),0)]}return GB(t,[{key:"toRgbString",value:function(){var r=_r(this.values,4),i=r[0],n=r[1],s=r[2],a=r[3];return a===1?"rgb(".concat(i,", ").concat(n,", ").concat(s,")"):"rgba(".concat(i,", ").concat(n,", ").concat(s,", ").concat(a,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),i=_r(r,4),n=i[0],s=i[1],a=i[2],o=i[3];return o===1?"hsl(".concat(n,", ").concat(s,"%, ").concat(a,"%)"):"hsla(".concat(n,", ").concat(s,"%, ").concat(a,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=_r(this.values,4),i=r[0],n=r[1],s=r[2],a=r[3];return i=Number(i).toString(16).padStart(2,"0"),n=Number(n).toString(16).padStart(2,"0"),s=Number(s).toString(16).padStart(2,"0"),a=a<1?parseInt(a*255,10).toString(16).padStart(2,"0"):"","#".concat(i).concat(n).concat(s).concat(a)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=_r(this.values,4),i=r[0],n=r[1],s=r[2],a=r[3],o=qB(i,n,s),l=_r(o,3),c=l[0],u=l[1],f=l[2];return[c,u,f,a]}}]),t})();function sl(t){var e=_r(t,4),r=e[0],i=e[1],n=e[2],s=e[3];return new ZB([r,i,n,s])}function av(t){var e=_r(t,3),r=e[0],i=e[1],n=e[2];return sl([r,i,n,1])}function Ld(t){var e=_r(t,4),r=e[0],i=e[1],n=e[2],s=e[3],a=YB(r,i,n),o=_r(a,3),l=o[0],c=o[1],u=o[2];return sl([l,c,u,s])}function QS(t){var e=_r(t,3),r=e[0],i=e[1],n=e[2];return Ld([r,i,n,1])}function KB(t){var e=zS.exec(t)||WS.exec(t),r=_r(e,5),i=r[1],n=r[2],s=r[3],a=r[4];return i=parseInt(i.length<2?i.repeat(2):i,16),n=parseInt(n.length<2?n.repeat(2):n,16),s=parseInt(s.length<2?s.repeat(2):s,16),a=a&&(parseInt(a.length<2?a.repeat(2):a,16)/255).toPrecision(1)||1,sl([i,n,s,a])}function XB(t){var e=qS.exec(t)||ZS.exec(t)||YS.exec(t)||KS.exec(t),r=_r(e,5),i=r[1],n=r[2],s=r[3],a=r[4];return i=vu(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),n=vu(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),s=vu(s,"%")>0?parseInt(s,10)*255/100:parseInt(s,10),a=a===void 0?1:parseFloat(a)/(vu(a,"%")?100:1),sl([i,n,s,a])}function QB(t){var e=XS.exec(t),r=_r(e,6),i=r[1],n=r[2],s=r[3],a=r[4],o=r[5];return n=n||"deg",i=(0,HB.default)(parseFloat(i),n,"deg"),s=parseFloat(s),a=parseFloat(a),o=o===void 0?1:parseFloat(o)/(vu(o,"%")?100:1),Ld([i,s,a,o])}function JS(t){return US.default[t]?av(US.default[t]):zS.test(t)||WS.test(t)?KB(t):qS.test(t)||ZS.test(t)||YS.test(t)||KS.test(t)?XB(t):XS.test(t)?QB(t):null}var JB={fromString:JS,fromRgb:av,fromRgba:sl,fromHsl:QS,fromHsla:Ld};Kn.default=JB});var dk=U((v9,fk)=>{m();fk.exports=function(t,e){var r=t,i=e,n=r.length,s=i.length,a=!1,o=n+1,l=[],c=[],u,f,d=function(){n>=s&&(u=r,f=n,r=i,i=u,n=s,s=f,a=!0,o=n+1)},h=function(g,v,b,_,C){return{startX:g,startY:v,endX:b,endY:_,r:C}},p=function(g,v,b){var _,C,x,S,A;for(v>b?_=l[g-1+o]:_=l[g+1+o],A=x=Math.max(v,b),S=C=x-g;C=g+1;--S)b[S+o]=p(S,b[S-1+o]+1,b[S+1+o]);b[g+o]=p(g,b[g-1+o]+1,b[g+1+o])}while(b[g+o]!==s);for(ed=g+2*_,C=l[g+o],A=n,w=s,E=[];C!==-1;){let y=c[C];(n!=y.endX||s!=y.endY)&&E.push({file1:[a?y.endY:y.endX,a?w-y.endY:A-y.endX],file2:[a?y.endX:y.endY,a?A-y.endX:w-y.endY]}),A=y.startX,w=y.startY,C=c[C].r}return(A!=0||w!=0)&&E.push({file1:[0,a?w:A],file2:[0,a?A:w]}),E.reverse(),E}}}});var mk=U((b9,pk)=>{m();var hk=dk();function r3(t,e,r){var i,n=new hk(e,t).compose(),s=new hk(e,r).compose(),a=[];function o(L,H){a.push([L.file1[0],H,L.file1[1],L.file2[0],L.file2[1]])}for(i=0;ic&&(l.push([1,c,L-c]),c=L)}for(var f=0;fg)break;g=Math.max(g,b+v[2]),f++}if(u(p),d==f)h[4]>0&&l.push([h[1],h[3],h[4]]);else{var _={0:[t.length,-1,e.length,-1],2:[r.length,-1,e.length,-1]};for(i=d;i<=f;i++){h=a[i];var C=h[1],x=_[C],S=h[0],A=S+h[2],w=h[3],E=w+h[4];x[0]=Math.min(w,x[0]),x[1]=Math.max(E,x[1]),x[2]=Math.min(S,x[2]),x[3]=Math.max(A,x[3])}var y=_[0][0]+(p-_[0][2]),P=_[0][1]+(g-_[0][3]),T=_[2][0]+(p-_[2][2]),I=_[2][1]+(g-_[2][3]);l.push([-1,y,P-y,p,g-p,T,I-T])}c=g}return u(e.length),l}function i3(t,e,r){var i=[],n=[t,e,r],s=r3(t,e,r),a=[];function o(){a.length&&i.push({ok:a}),a=[]}function l(h){for(var p=0;p{m();var ul=1e3,fl=ul*60,dl=fl*60,Ca=dl*24,o3=Ca*7,l3=Ca*365.25;vk.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return c3(t);if(r==="number"&&isFinite(t))return e.long?f3(t):u3(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function c3(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*l3;case"weeks":case"week":case"w":return r*o3;case"days":case"day":case"d":return r*Ca;case"hours":case"hour":case"hrs":case"hr":case"h":return r*dl;case"minutes":case"minute":case"mins":case"min":case"m":return r*fl;case"seconds":case"second":case"secs":case"sec":case"s":return r*ul;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function u3(t){var e=Math.abs(t);return e>=Ca?Math.round(t/Ca)+"d":e>=dl?Math.round(t/dl)+"h":e>=fl?Math.round(t/fl)+"m":e>=ul?Math.round(t/ul)+"s":t+"ms"}function f3(t){var e=Math.abs(t);return e>=Ca?Gd(t,e,Ca,"day"):e>=dl?Gd(t,e,dl,"hour"):e>=fl?Gd(t,e,fl,"minute"):e>=ul?Gd(t,e,ul,"second"):t+" ms"}function Gd(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var _k=U((F9,bk)=>{m();function d3(t){r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=n,r.enabled=o,r.humanize=wk(),r.destroy=c,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let f=0;for(let d=0;d{if(A==="%%")return"%";x++;let E=r.formatters[w];if(typeof E=="function"){let y=v[x];A=E.call(b,y),v.splice(x,1),x--}return A}),r.formatArgs.call(b,v),(b.log||r.log).apply(b,v)}return g.namespace=u,g.useColors=r.useColors(),g.color=r.selectColor(u),g.extend=i,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,p=r.enabled(u)),p),set:v=>{d=v}}),typeof r.init=="function"&&r.init(g),g}function i(u,f){let d=r(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function n(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let f=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(u,f){let d=0,h=0,p=-1,g=0;for(;d"-"+f)].join(",");return r.enable(""),u}function o(u){for(let f of r.skips)if(s(u,f))return!1;for(let f of r.names)if(s(u,f))return!0;return!1}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}bk.exports=d3});var Vd=U((Lr,jd)=>{m();Lr.formatArgs=p3;Lr.save=m3;Lr.load=g3;Lr.useColors=h3;Lr.storage=v3();Lr.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Lr.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function h3(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function p3(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+jd.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),t.splice(i,0,e)}Lr.log=console.debug||console.log||(()=>{});function m3(t){try{t?Lr.storage.setItem("debug",t):Lr.storage.removeItem("debug")}catch(e){}}function g3(){let t;try{t=Lr.storage.getItem("debug")||Lr.storage.getItem("DEBUG")}catch(e){}return!t&&typeof process!="undefined"&&"env"in process&&(t=process.env.DEBUG),t}function v3(){try{return localStorage}catch(t){}}jd.exports=_k()(Lr);var{formatters:w3}=jd.exports;w3.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var yk=U(ei=>{"use strict";m();var b3=ei&&ei.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ei,"__esModule",{value:!0});var _3=require("fs"),y3=b3(Vd()),hl=y3.default("@kwsites/file-exists");function x3(t,e,r){hl("checking %s",t);try{let i=_3.statSync(t);return i.isFile()&&e?(hl("[OK] path represents a file"),!0):i.isDirectory()&&r?(hl("[OK] path represents a directory"),!0):(hl("[FAIL] path represents something other than a file or directory"),!1)}catch(i){if(i.code==="ENOENT")return hl("[FAIL] path is not accessible: %o",i),!1;throw hl("[FATAL] %o",i),i}}function E3(t,e=ei.READABLE){return x3(t,(e&ei.FILE)>0,(e&ei.FOLDER)>0)}ei.exists=E3;ei.FILE=1;ei.FOLDER=2;ei.READABLE=ei.FILE+ei.FOLDER});var xk=U(zd=>{"use strict";m();function S3(t){for(var e in t)zd.hasOwnProperty(e)||(zd[e]=t[e])}Object.defineProperty(zd,"__esModule",{value:!0});S3(yk())});var hv=U(Aa=>{"use strict";m();Object.defineProperty(Aa,"__esModule",{value:!0});Aa.createDeferred=Aa.deferred=void 0;function dv(){let t,e,r="pending";return{promise:new Promise((n,s)=>{t=n,e=s}),done(n){r==="pending"&&(r="resolved",t(n))},fail(n){r==="pending"&&(r="rejected",e(n))},get fulfilled(){return r!=="pending"},get status(){return r}}}Aa.deferred=dv;Aa.createDeferred=dv;Aa.default=dv});var Y2=U(Vw=>{m();(function(t){var e=/\S/,r=/\"/g,i=/\n/g,n=/\r/g,s=/\\/g,a=/\u2028/,o=/\u2029/;t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(E,y){var P=E.length,T=0,I=1,L=2,H=T,te=null,xe=null,Z="",K=[],ce=!1,pe=0,W=0,X="{{",G="}}";function Be(){Z.length>0&&(K.push({tag:"_t",text:new String(Z)}),Z="")}function pr(){for(var Rt=!0,$t=W;$t"&&(ee.indent=K[Xe].text.toString()),K.splice(Xe,1));else $t||K.push({tag:` +`});ce=!1,W=K.length}function Ie(Rt,$t){var Xe="="+G,ee=Rt.indexOf(Xe,$t),N=c(Rt.substring(Rt.indexOf("=",$t)+1,ee)).split(" ");return X=N[0],G=N[N.length-1],ee+Xe.length-1}for(y&&(y=y.split(" "),X=y[0],G=y[1]),pe=0;pe0;){if(H=w.shift(),L&&L.tag=="<"&&!(H.tag in f))throw new Error("Illegal content in < super tag.");if(t.tags[H.tag]<=t.tags.$||h(H,P))y.push(H),H.nodes=d(w,H.tag,y,P);else if(H.tag=="/"){if(y.length===0)throw new Error("Closing tag without opener: /"+H.n);if(I=y.pop(),H.n!=I.n&&!p(H.n,I.n,P))throw new Error("Nesting error: "+I.n+" vs. "+H.n);return I.end=H.i,T}else H.tag==` +`&&(H.last=w.length==0||w[0].tag==` +`);T.push(H)}if(y.length>0)throw new Error("missing closing tag: "+y.pop().n);return T}function h(w,E){for(var y=0,P=E.length;y":x,"<":function(w,E){var y={partials:{},code:"",subs:{},inPartial:!0};t.walk(w.nodes,y);var P=E.partials[x(w,E)];P.subs=y.subs,P.partials=y.partials},$:function(w,E){var y={subs:{},code:"",partials:E.partials,prefix:w.n};t.walk(w.nodes,y),E.subs[w.n]=y.code,E.inPartial||(E.code+='t.sub("'+_(w.n)+'",c,p,i);')},"\n":function(w,E){E.code+=A('"\\n"'+(w.last?"":" + i"))},_v:function(w,E){E.code+="t.b(t.v(t."+C(w.n)+'("'+_(w.n)+'",c,p,0)));'},_t:function(w,E){E.code+=A('"'+_(w.text)+'"')},"{":S,"&":S};function S(w,E){E.code+="t.b(t.t(t."+C(w.n)+'("'+_(w.n)+'",c,p,0)));'}function A(w){return"t.b("+w+");"}t.walk=function(w,E){for(var y,P=0,T=w.length;P{m();var b5={};(function(t){t.Template=function(d,h,p,g){d=d||{},this.r=d.code||this.r,this.c=p,this.options=g||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},t.Template.prototype={r:function(d,h,p){return""},v:u,t:c,render:function(h,p,g){return this.ri([h],p||{},g)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],g=h[p.name];if(p.instance&&p.base==g)return p.instance;if(typeof g=="string"){if(!this.c)throw new Error("No compiler available.");g=this.c.compile(g,this.options)}if(!g)return null;if(this.partials[d].base=g,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);g=r(g,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=g,g},rp:function(d,h,p,g){var v=this.ep(d,p);return v?v.ri(h,p,g):""},rs:function(d,h,p){var g=d[d.length-1];if(!f(g)){p(d,h,this);return}for(var v=0;v=0;x--)if(b=h[x],v=e(d,b,C),v!==void 0){_=!0;break}return _?(!g&&typeof v=="function"&&(v=this.mv(v,h,p)),v):g?!1:""},ls:function(d,h,p,g,v,b){var _=this.options.delimiters;return this.options.delimiters=b,this.b(this.ct(c(d.call(h,v,p)),h,g)),this.options.delimiters=_,!1},ct:function(d,h,p){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(d,this.options).render(h,p)},b:function(d){this.buf+=d},fl:function(){var d=this.buf;return this.buf="",d},ms:function(d,h,p,g,v,b,_){var C,x=h[h.length-1],S=d.call(x);return typeof S=="function"?g?!0:(C=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(S,x,h,p,C.substring(v,b),_)):S},mv:function(d,h,p){var g=h[h.length-1],v=d.call(g);return typeof v=="function"?this.ct(c(v.call(g)),g,p):v},sub:function(d,h,p,g){var v=this.subs[d];v&&(this.activeSub=d,v(h,p,this,g),this.activeSub=!1)}};function e(d,h,p){var g;return h&&typeof h=="object"&&(h[d]!==void 0?g=h[d]:p&&h.get&&typeof h.get=="function"&&(g=h.get(d))),g}function r(d,h,p,g,v,b){function _(){}_.prototype=d;function C(){}C.prototype=d.subs;var x,S=new _;S.subs=new C,S.subsText={},S.buf="",g=g||{},S.stackSubs=g,S.subsText=b;for(x in h)g[x]||(g[x]=h[x]);for(x in g)S.subs[x]=g[x];v=v||{},S.stackPartials=v;for(x in p)v[x]||(v[x]=p[x]);for(x in v)S.partials[x]=v[x];return S}var i=/&/g,n=//g,a=/\'/g,o=/\"/g,l=/[&<>\"\']/;function c(d){return String(d==null?"":d)}function u(d){return d=c(d),l.test(d)?d.replace(i,"&").replace(n,"<").replace(s,">").replace(a,"'").replace(o,"""):d}var f=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}})(typeof zw!="undefined"?zw:b5)});var Ww=U((xY,K2)=>{m();var Vh=Y2();Vh.Template=Z2().Template;Vh.template=Vh.Template;K2.exports=Vh});var J2=U(Ai=>{"use strict";m();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.ColorSchemeType=Ai.DiffStyleType=Ai.LineMatchingType=Ai.OutputFormatType=Ai.LineType=void 0;var X2;(function(t){t.INSERT="insert",t.DELETE="delete",t.CONTEXT="context"})(X2||(Ai.LineType=X2={}));Ai.OutputFormatType={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"};Ai.LineMatchingType={LINES:"lines",WORDS:"words",NONE:"none"};Ai.DiffStyleType={WORD:"word",CHAR:"char"};var Q2;(function(t){t.AUTO="auto",t.DARK="dark",t.LIGHT="light"})(Q2||(Ai.ColorSchemeType=Q2={}))});var CG={};R$(CG,{default:()=>Xp});module.exports=$$(CG);m();m();var Vo=ft(Zb(),1),Yg=ft(cx(),1),UE=ft(fx(),1),Ad=ft(Q1(),1),Hc=ft(tE(),1),GE=ft(uE(),1),zo=ft(dE(),1),jE=ft(vE(),1),Te=class t extends Error{constructor(e){super(e),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(e){let r=new t(e.message);return r.code=e.code,r.data=e.data,r.caller=e.caller,r.stack=e.stack,r}get isIsomorphicGitError(){return!0}},Uc=class t extends Te{constructor(e){super(`Modifying the index is not possible because you have unmerged files: ${e.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=t.code,this.data={filepaths:e}}};Uc.code="UnmergedPathsError";var he=class t extends Te{constructor(e){super(`An internal error caused this command to fail. + +If you're using an application that depends on isomorphic-git, please report this error to that application's developers. + +If you're a developer and you believe this is a bug in isomorphic-git, please file an issue at https://github.com/isomorphic-git/isomorphic-git/issues with a minimal reproduction, version and environment details, and this error message: ${e}`),this.code=this.name=t.code,this.data={message:e}}};he.code="InternalError";var va=class t extends Te{constructor(e){super(`The filepath "${e}" contains unsafe character sequences`),this.code=this.name=t.code,this.data={filepath:e}}};va.code="UnsafeFilepathError";var Ui=class{constructor(e){this.buffer=e,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(e){this._start=e}slice(e){let r=this.buffer.slice(this._start,this._start+e);return this._start+=e,r}toString(e,r){let i=this.buffer.toString(e,this._start,this._start+r);return this._start+=r,i}write(e,r,i){let n=this.buffer.write(e,this._start,r,i);return this._start+=r,n}copy(e,r,i){let n=e.copy(this.buffer,this._start,r,i);return this._start+=n,n}readUInt8(){let e=this.buffer.readUInt8(this._start);return this._start+=1,e}writeUInt8(e){let r=this.buffer.writeUInt8(e,this._start);return this._start+=1,r}readUInt16BE(){let e=this.buffer.readUInt16BE(this._start);return this._start+=2,e}writeUInt16BE(e){let r=this.buffer.writeUInt16BE(e,this._start);return this._start+=2,r}readUInt32BE(){let e=this.buffer.readUInt32BE(this._start);return this._start+=4,e}writeUInt32BE(e){let r=this.buffer.writeUInt32BE(e,this._start);return this._start+=4,r}};function Td(t,e){return-(te)}function VE(t,e){return Td(t.path,e.path)}function zE(t){let e=t>0?t>>12:0;e!==4&&e!==8&&e!==10&&e!==14&&(e=8);let r=t&511;return r&73?r=493:r=420,e!==8&&(r=0),(e<<12)+r}var vn=2**32;function wE(t,e,r,i){if(t!==void 0&&e!==void 0)return[t,e];r===void 0&&(r=i.valueOf());let n=Math.floor(r/1e3),s=(r-n*1e3)*1e6;return[n,s]}function Wo(t){let[e,r]=wE(t.ctimeSeconds,t.ctimeNanoseconds,t.ctimeMs,t.ctime),[i,n]=wE(t.mtimeSeconds,t.mtimeNanoseconds,t.mtimeMs,t.mtime);return{ctimeSeconds:e%vn,ctimeNanoseconds:r%vn,mtimeSeconds:i%vn,mtimeNanoseconds:n%vn,dev:t.dev%vn,ino:t.ino%vn,mode:zE(t.mode%vn),uid:t.uid%vn,gid:t.gid%vn,size:t.size>-1?t.size%vn:0}}function bO(t){let e="";for(let r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}var Sg=null;async function bn(t){return Sg===null&&(Sg=await yO()),Sg?WE(t):_O(t)}function _O(t){return new Yg.default().update(t).digest("hex")}async function WE(t){let e=await crypto.subtle.digest("SHA-1",t);return bO(e)}async function yO(){try{return await WE(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709"}catch(t){}return!1}function xO(t){return{assumeValid:!!(t&32768),extended:!!(t&16384),stage:(t&12288)>>12,nameLength:t&4095}}function EO(t){let e=t.flags;return e.extended=!1,e.nameLength=Math.min(k.from(t.path).length,4095),(e.assumeValid?32768:0)+(e.extended?16384:0)+((e.stage&3)<<12)+(e.nameLength&4095)}var Og=class t{constructor(e,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=e||new Map}_addEntry(e){if(e.flags.stage===0)e.stages=[e],this._entries.set(e.path,e),this._unmergedPaths.delete(e.path);else{let r=this._entries.get(e.path);r||(this._entries.set(e.path,e),r=e),r.stages[e.flags.stage]=e,this._unmergedPaths.add(e.path)}}static async from(e){if(k.isBuffer(e))return t.fromBuffer(e);if(e===null)return new t(null);throw new he("invalid type passed to GitIndex.from")}static async fromBuffer(e){if(e.length===0)throw new he("Index file is empty (.git/index)");let r=new t,i=new Ui(e),n=i.toString("utf8",4);if(n!=="DIRC")throw new he(`Invalid dircache magic file number: ${n}`);let s=await bn(e.slice(0,-20)),a=e.slice(-20).toString("hex");if(a!==s)throw new he(`Invalid checksum in GitIndex buffer: expected ${a} but saw ${s}`);let o=i.readUInt32BE();if(o!==2)throw new he(`Unsupported dircache version: ${o}`);let l=i.readUInt32BE(),c=0;for(;!i.eof()&&ce.stages.length>1?e.stages.filter(r=>r):e)}*[Symbol.iterator](){for(let e of this.entries)yield e}insert({filepath:e,stats:r,oid:i,stage:n=0}){r||(r={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),r=Wo(r);let s=k.from(e),a={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:e,oid:i,flags:{assumeValid:!1,extended:!1,stage:n,nameLength:s.length<4095?s.length:4095},stages:[]};this._addEntry(a),this._dirty=!0}delete({filepath:e}){if(this._entries.has(e))this._entries.delete(e);else for(let r of this._entries.keys())r.startsWith(e+"/")&&this._entries.delete(r);this._unmergedPaths.has(e)&&this._unmergedPaths.delete(e),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:e}){return this._entries.has(e)}render(){return this.entries.map(e=>`${e.mode.toString(8)} ${e.oid} ${e.path}`).join(` +`)}static async _entryToBuffer(e){let r=k.from(e.path),i=Math.ceil((62+r.length+1)/8)*8,n=k.alloc(i),s=new Ui(n),a=Wo(e);return s.writeUInt32BE(a.ctimeSeconds),s.writeUInt32BE(a.ctimeNanoseconds),s.writeUInt32BE(a.mtimeSeconds),s.writeUInt32BE(a.mtimeNanoseconds),s.writeUInt32BE(a.dev),s.writeUInt32BE(a.ino),s.writeUInt32BE(a.mode),s.writeUInt32BE(a.uid),s.writeUInt32BE(a.gid),s.writeUInt32BE(a.size),s.write(e.oid,20,"hex"),s.writeUInt16BE(EO(e)),s.write(e.path,r.length,"utf8"),n}async toObject(){let e=k.alloc(12),r=new Ui(e);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let i=[];for(let o of this.entries)if(i.push(t._entryToBuffer(o)),o.stages.length>1)for(let l of o.stages)l&&l!==o&&i.push(t._entryToBuffer(l));i=await Promise.all(i);let n=k.concat(i),s=k.concat([e,n]),a=await bn(s);return k.concat([s,k.from(a,"hex")])}};function gd(t,e,r=!0,i=!0){let n=Wo(t),s=Wo(e);return r&&n.mode!==s.mode||n.mtimeSeconds!==s.mtimeSeconds||n.ctimeSeconds!==s.ctimeSeconds||n.uid!==s.uid||n.gid!==s.gid||i&&n.ino!==s.ino||n.size!==s.size}var kg=null,Cg=Symbol("IndexCache");function SO(){return{map:new Map,stats:new Map}}async function kO(t,e,r){let[i,n]=await Promise.all([t.lstat(e),t.read(e)]),s=await Og.from(n);r.map.set(e,s),r.stats.set(e,i)}async function CO(t,e,r){let i=r.stats.get(e);if(i===void 0)return!0;if(i===null)return!1;let n=await t.lstat(e);return n===null?!1:gd(i,n)}var dt=class{static async acquire({fs:e,gitdir:r,cache:i,allowUnmerged:n=!0},s){i[Cg]||(i[Cg]=SO());let a=`${r}/index`;kg===null&&(kg=new Vo.default({maxPending:1/0}));let o,l=[];return await kg.acquire(a,async()=>{let c=i[Cg];await CO(e,a,c)&&await kO(e,a,c);let u=c.map.get(a);if(l=u.unmergedPaths,l.length&&!n)throw new Uc(l);if(o=await s(u),u._dirty){let f=await u.toObject();await e.write(a,f),c.stats.set(a,await e.lstat(a)),u._dirty=!1}}),o}};function vd(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e>-1&&(t=t.slice(e+1)),t}function wa(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e===-1?".":e===0?"/":t.slice(0,e)}function qE(t){let e=new Map,r=function(n){if(!e.has(n)){let s={type:"tree",fullpath:n,basename:vd(n),metadata:{},children:[]};e.set(n,s),s.parent=r(wa(n)),s.parent&&s.parent!==s&&s.parent.children.push(s)}return e.get(n)},i=function(n,s){if(!e.has(n)){let a={type:"blob",fullpath:n,basename:vd(n),metadata:s,parent:r(wa(n)),children:[]};a.parent&&a.parent.children.push(a),e.set(n,a)}return e.get(n)};r(".");for(let n of t)i(n.path,n);return e}function AO(t){switch(t){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new he(`Unexpected GitTree entry mode: ${t.toString(8)}`)}var Lg=class{constructor({fs:e,gitdir:r,cache:i}){this.treePromise=dt.acquire({fs:e,gitdir:r,cache:i},async function(s){return qE(s.entries)});let n=this;this.ConstructEntry=class{constructor(a){this._fullpath=a,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return n.type(this)}async mode(){return n.mode(this)}async stat(){return n.stat(this)}async content(){return n.content(this)}async oid(){return n.oid(this)}}}async readdir(e){let r=e._fullpath,n=(await this.treePromise).get(r);if(!n||n.type==="blob")return null;if(n.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let s=n.children.map(a=>a.fullpath);return s.sort(Td),s}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let i=(await this.treePromise).get(e._fullpath);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let n=i.type==="tree"?{}:Wo(i.metadata);e._type=i.type==="tree"?"tree":AO(n.mode),e._mode=n.mode,i.type==="tree"?e._stat=void 0:e._stat=n}return e._stat}async content(e){}async oid(e){if(e._oid===!1){let i=(await this.treePromise).get(e._fullpath);e._oid=i.metadata.oid}return e._oid}},Pd=Symbol("GitWalkSymbol");function tl(){let t=Object.create(null);return Object.defineProperty(t,Pd,{value:function({fs:e,gitdir:r,cache:i}){return new Lg({fs:e,gitdir:r,cache:i})}}),Object.freeze(t),t}var Ve=class t extends Te{constructor(e){super(`Could not find ${e}.`),this.code=this.name=t.code,this.data={what:e}}};Ve.code="NotFoundError";var br=class t extends Te{constructor(e,r,i,n){super(`Object ${e} ${n?`at ${n}`:""}was anticipated to be a ${i} but it is a ${r}.`),this.code=this.name=t.code,this.data={oid:e,actual:r,expected:i,filepath:n}}};br.code="ObjectTypeError";var Rs=class t extends Te{constructor(e){super(`Expected a 40-char hex object id but saw "${e}".`),this.code=this.name=t.code,this.data={value:e}}};Rs.code="InvalidOidError";var Gc=class t extends Te{constructor(e){super(`Could not find a fetch refspec for remote "${e}". Make sure the config file has an entry like the following: +[remote "${e}"] + fetch = +refs/heads/*:refs/remotes/origin/* +`),this.code=this.name=t.code,this.data={remote:e}}};Gc.code="NoRefspecError";var wd=class t{constructor(e){if(this.refs=new Map,this.parsedConfig=[],e){let r=null;this.parsedConfig=e.trim().split(` +`).map(i=>{if(/^\s*#/.test(i))return{line:i,comment:!0};let n=i.indexOf(" ");if(i.startsWith("^")){let s=i.slice(1);return this.refs.set(r+"^{}",s),{line:i,ref:r,peeled:s}}else{let s=i.slice(0,n);return r=i.slice(n+1),this.refs.set(r,s),{line:i,ref:r,oid:s}}})}return this}static from(e){return new t(e)}delete(e){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==e),this.refs.delete(e)}toString(){return this.parsedConfig.map(({line:e})=>e).join(` +`)+` +`}},bd=class t{constructor({remotePath:e,localPath:r,force:i,matchPrefix:n}){Object.assign(this,{remotePath:e,localPath:r,force:i,matchPrefix:n})}static from(e){let[r,i,n,s,a]=e.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",l=n==="*";if(l!==(a==="*"))throw new he("Invalid refspec");return new t({remotePath:i,localPath:s,force:o,matchPrefix:l})}translate(e){if(this.matchPrefix){if(e.startsWith(this.remotePath))return this.localPath+e.replace(this.remotePath,"")}else if(e===this.remotePath)return this.localPath;return null}reverseTranslate(e){if(this.matchPrefix){if(e.startsWith(this.localPath))return this.remotePath+e.replace(this.localPath,"")}else if(e===this.localPath)return this.remotePath;return null}},Ng=class t{constructor(e=[]){this.rules=e}static from(e){let r=[];for(let i of e)r.push(bd.from(i));return new t(r)}add(e){let r=bd.from(e);this.rules.push(r)}translate(e){let r=[];for(let i of this.rules)for(let n of e){let s=i.translate(n);s&&r.push([n,s])}return r}translateOne(e){let r=null;for(let i of this.rules){let n=i.translate(e);n&&(r=n)}return r}localNamespaces(){return this.rules.filter(e=>e.matchPrefix).map(e=>e.localPath.replace(/\/$/,""))}};function TO(t,e){let r=t.replace(/\^\{\}$/,""),i=e.replace(/\^\{\}$/,""),n=-(ri);return n===0?t.endsWith("^{}")?1:-1:n}function PO(t,e){let r="",i=0,n=-1,s=0,a="\0";for(let o=0;o<=t.length;++o){if(o2){let l=r.lastIndexOf("/");l===-1?(r="",i=0):(r=r.slice(0,l),i=r.length-1-r.lastIndexOf("/")),n=o,s=0;continue}else if(r.length!==0){r="",i=0,n=o,s=0;continue}}e&&(r+=r.length>0?"/..":"..",i=2)}else r.length>0?r+="/"+t.slice(n+1,o):r=t.slice(n+1,o),i=o-n-1;n=o,s=0}else a==="."&&s!==-1?++s:s=-1}return r}function RO(t){return t.length>=2&&/^[a-zA-Z]:/.test(t)?t.slice(0,2):null}function $O(t){if(!t.length)return".";t=t.replace(/\\/g,"/");let e=RO(t),r=t[0]==="/"||e!==null&&t[2]==="/",i=t.at(-1)==="/",n=e?t.slice(2):t,s=PO(n,!r);if(!s.length){let a=e?r?e+"/":e:r?"/":".";return i&&!r?a+"/":a}return i&&(s+="/"),e?r?`${e}/${s}`:`${e}${s}`:r?`/${s}`:s}function B(...t){if(t.length===0)return".";let e;for(let r=0;r{if(typeof t=="number")return t;t=t.toLowerCase();let e=parseInt(t);return t.endsWith("k")&&(e*=1024),t.endsWith("m")&&(e*=1024*1024),t.endsWith("g")&&(e*=1024*1024*1024),e},Bc=t=>{if(typeof t=="boolean")return t;if(t=t.trim().toLowerCase(),t==="true"||t==="yes"||t==="on")return!0;if(t==="false"||t==="no"||t==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${t}`)},bE={core:{filemode:Bc,bare:Bc,logallrefupdates:Bc,symlinks:Bc,ignorecase:Bc,bigFileThreshold:FO}},IO=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,MO=/^[A-Za-z0-9-.]+$/,DO=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,OO=/^[A-Za-z][A-Za-z-]*$/,LO=/^(.*?)( *[#;].*)$/,NO=t=>{let e=IO.exec(t);if(e!=null){let[r,i]=e.slice(1);return[r,i]}return null},BO=t=>{let e=DO.exec(t);if(e!=null){let[r,i="true"]=e.slice(1),n=HO(i),s=UO(n);return[r,s]}return null},HO=t=>{let e=LO.exec(t);if(e==null)return t;let[r,i]=e.slice(1);return _E(r)&&_E(i)?`${r}${i}`:r},_E=t=>(t.match(/(?:^|[^\\])"/g)||[]).length%2!==0,UO=t=>t.split("").reduce((e,r,i,n)=>{let s=r==='"'&&n[i-1]!=="\\",a=r==="\\"&&n[i+1]==='"';return s||a?e:e+r},""),yE=t=>t!=null?t.toLowerCase():null,Bg=(t,e,r)=>[yE(t),e,yE(r)].filter(i=>i!=null).join("."),xE=t=>{let e=t.split("."),r=e.shift(),i=e.pop(),n=e.length?e.join("."):void 0;return{section:r,subsection:n,name:i,path:Bg(r,n,i),sectionPath:Bg(r,n,null),isSection:!!r}},GO=(t,e)=>t.reduce((r,i,n)=>e(i)?n:r,-1),Hg=class t{constructor(e){let r=null,i=null;this.parsedConfig=e?e.split(` +`).map(n=>{let s=null,a=null,o=n.trim(),l=NO(o),c=l!=null;if(c)[r,i]=l;else{let f=BO(o);f!=null&&([s,a]=f)}let u=Bg(r,i,s);return{line:n,isSection:c,section:r,subsection:i,name:s,value:a,path:u}}):[]}static from(e){return new t(e)}async get(e,r=!1){let i=xE(e).path,n=this.parsedConfig.filter(s=>s.path===i).map(({section:s,name:a,value:o})=>{let l=bE[s]&&bE[s][a];return l?l(o):o});return r?n:n.pop()}async getall(e){return this.get(e,!0)}async getSubsections(e){return this.parsedConfig.filter(r=>r.isSection&&r.section===e).map(r=>r.subsection)}async deleteSection(e,r){this.parsedConfig=this.parsedConfig.filter(i=>!(i.section===e&&i.subsection===r))}async append(e,r){return this.set(e,r,!0)}async set(e,r,i=!1){let{section:n,subsection:s,name:a,path:o,sectionPath:l,isSection:c}=xE(e),u=GO(this.parsedConfig,f=>f.path===o);if(r==null)u!==-1&&this.parsedConfig.splice(u,1);else if(u!==-1){let f=this.parsedConfig[u],d=Object.assign({},f,{name:a,value:r,modified:!0});i?this.parsedConfig.splice(u+1,0,d):this.parsedConfig[u]=d}else{let f=this.parsedConfig.findIndex(h=>h.path===l),d={section:n,subsection:s,name:a,value:r,modified:!0,path:o};if(MO.test(n)&&OO.test(a))if(f>=0)this.parsedConfig.splice(f+1,0,d);else{let h={isSection:c,section:n,subsection:s,modified:!0,path:l};this.parsedConfig.push(h,d)}}}toString(){return this.parsedConfig.map(({line:e,section:r,subsection:i,name:n,value:s,modified:a=!1})=>a?n!=null&&s!=null?typeof s=="string"&&/[#;]/.test(s)?` ${n} = "${s}"`:` ${n} = ${s}`:i!=null?`[${r} "${i}"]`:`[${r}]`:e).join(` +`)}},ht=class{static async get({fs:e,gitdir:r}){let i=await e.read(`${r}/config`,{encoding:"utf8"});return Hg.from(i)}static async save({fs:e,gitdir:r,config:i}){await e.write(`${r}/config`,i.toString(),{encoding:"utf8"})}},pd=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],jO=["config","description","index","shallow","commondir"],Ag;async function Ts(t,e){return Ag===void 0&&(Ag=new Vo.default),Ag.acquire(t,e)}var q=class t{static async updateRemoteRefs({fs:e,gitdir:r,remote:i,refs:n,symrefs:s,tags:a,refspecs:o=void 0,prune:l=!1,pruneTags:c=!1}){for(let v of n.values())if(!v.match(/[0-9a-f]{40}/))throw new Rs(v);let u=await ht.get({fs:e,gitdir:r});if(!o){if(o=await u.getall(`remote.${i}.fetch`),o.length===0)throw new Gc(i);o.unshift(`+HEAD:refs/remotes/${i}/HEAD`)}let f=Ng.from(o),d=new Map;if(c){let v=await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"});await t.deleteRefs({fs:e,gitdir:r,refs:v.map(b=>`refs/tags/${b}`)})}if(a){for(let v of n.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await t.exists({fs:e,gitdir:r,ref:v})){let b=n.get(v);d.set(v,b)}}let h=f.translate([...n.keys()]);for(let[v,b]of h){let _=n.get(v);d.set(b,_)}let p=f.translate([...s.keys()]);for(let[v,b]of p){let _=s.get(v),C=f.translateOne(_);C&&d.set(b,`ref: ${C}`)}let g=[];if(l){for(let v of f.localNamespaces()){let b=(await t.listRefs({fs:e,gitdir:r,filepath:v})).map(_=>`${v}/${_}`);for(let _ of b)d.has(_)||g.push(_)}g.length>0&&await t.deleteRefs({fs:e,gitdir:r,refs:g})}for(let[v,b]of d)await Ts(v,async()=>e.write(B(r,v),`${b.trim()} +`,"utf8"));return{pruned:g}}static async writeRef({fs:e,gitdir:r,ref:i,value:n}){if(!n.match(/[0-9a-f]{40}/))throw new Rs(n);await Ts(i,async()=>e.write(B(r,i),`${n.trim()} +`,"utf8"))}static async writeSymbolicRef({fs:e,gitdir:r,ref:i,value:n}){await Ts(i,async()=>e.write(B(r,i),`ref: ${n.trim()} +`,"utf8"))}static async deleteRef({fs:e,gitdir:r,ref:i}){return t.deleteRefs({fs:e,gitdir:r,refs:[i]})}static async deleteRefs({fs:e,gitdir:r,refs:i}){await Promise.all(i.map(o=>e.rm(B(r,o))));let n=await Ts("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"})),s=wd.from(n),a=s.refs.size;for(let o of i)s.refs.has(o)&&s.delete(o);s.refs.sizee.write(`${r}/packed-refs`,n,{encoding:"utf8"})))}static async resolve({fs:e,gitdir:r,ref:i,depth:n=void 0,visited:s=new Set}){if(n!==void 0&&(n--,n===-1))return i;if(i.startsWith("ref: "))return i=i.slice(5),t.resolve({fs:e,gitdir:r,ref:i,depth:n,visited:s});if(i.length===40&&/[0-9a-f]{40}/.test(i))return i;let a=await t.packedRefs({fs:e,gitdir:r}),o=pd(i).filter(l=>!jO.includes(l));for(let l of o){let c=await Ts(l,async()=>await e.read(`${r}/${l}`,{encoding:"utf8"})||a.get(l));if(c){if(s.has(l))throw new he(`Circular reference detected while resolving ref "${l}"`);return s.add(l),t.resolve({fs:e,gitdir:r,ref:c.trim(),depth:n,visited:s})}}throw new Ve(i)}static async exists({fs:e,gitdir:r,ref:i}){try{return await t.expand({fs:e,gitdir:r,ref:i}),!0}catch(n){return!1}}static async expand({fs:e,gitdir:r,ref:i}){if(i.length===40&&/[0-9a-f]{40}/.test(i))return i;let n=await t.packedRefs({fs:e,gitdir:r}),s=pd(i);for(let a of s)if(await Ts(a,async()=>e.exists(`${r}/${a}`))||n.has(a))return a;throw new Ve(i)}static async expandAgainstMap({ref:e,map:r}){let i=pd(e);for(let n of i)if(await r.has(n))return n;throw new Ve(e)}static resolveAgainstMap({ref:e,fullref:r=e,depth:i=void 0,map:n}){if(i!==void 0&&(i--,i===-1))return{fullref:r,oid:e};if(e.startsWith("ref: "))return e=e.slice(5),t.resolveAgainstMap({ref:e,fullref:r,depth:i,map:n});if(e.length===40&&/[0-9a-f]{40}/.test(e))return{fullref:r,oid:e};let s=pd(e);for(let a of s){let o=n.get(a);if(o)return t.resolveAgainstMap({ref:o.trim(),fullref:a,depth:i,map:n})}throw new Ve(e)}static async packedRefs({fs:e,gitdir:r}){let i=await Ts("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"}));return wd.from(i).refs}static async listRefs({fs:e,gitdir:r,filepath:i}){let n=t.packedRefs({fs:e,gitdir:r}),s=null;try{s=await e.readdirDeep(`${r}/${i}`),s=s.map(a=>a.replace(`${r}/${i}/`,""))}catch(a){s=[]}for(let a of(await n).keys())a.startsWith(i)&&(a=a.replace(i+"/",""),s.includes(a)||s.push(a));return s.sort(TO),s}static async listBranches({fs:e,gitdir:r,remote:i}){return i?t.listRefs({fs:e,gitdir:r,filepath:`refs/remotes/${i}`}):t.listRefs({fs:e,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:e,gitdir:r}){return(await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"})).filter(n=>!n.endsWith("^{}"))}};function VO(t,e){return Td(EE(t),EE(e))}function EE(t){return t.mode==="040000"?t.path+"/":t.path}function YE(t){switch(t){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new he(`Unexpected GitTree entry mode: ${t}`)}function zO(t){let e=[],r=0;for(;r`${e.mode} ${e.type} ${e.oid} ${e.path}`).join(` +`)}toObject(){let e=[...this._entries];return e.sort(VO),k.concat(e.map(r=>{let i=k.from(r.mode.replace(/^0/,"")),n=k.from(" "),s=k.from(r.path,"utf8"),a=k.from([0]),o=k.from(r.oid,"hex");return k.concat([i,n,s,a,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let e of this._entries)yield e}},$s=class{static wrap({type:e,object:r}){let i=`${e} ${r.length}\0`,n=i.length,s=n+r.length,a=new Uint8Array(s);for(let o=0;o>=1,n+=8;return i}function CE(t,e){let r=t.readUInt8(),i=128,n=15,s=112;if(r&i){let a=kE(t,r&n,4),o=kE(t,(r&s)>>4,3);return o===0&&(o=65536),e.slice(a,a+o)}else return t.slice(r)}function ZO(t){let e=[t];return{next(){return Promise.resolve({done:e.length===0,value:e.pop()})},return(){return e=[],{}},[Symbol.asyncIterator](){return this}}}function KE(t){return t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]?t[Symbol.iterator]():t.next?t:ZO(t)}var _d=class{constructor(e){if(typeof k=="undefined")throw new Error("Missing Buffer dependency");this.stream=KE(e),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(e){if(!this.eof())return this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e),this.buffer.slice(this.undoCursor,this.cursor)}async skip(e){this.eof()||(this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:e,value:r}=await this.stream.next();return e&&(this._ended=!0,!r)?k.alloc(0):(r&&(r=k.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(e){this.undoCursor=this.cursor,this.cursor+=e,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(e){if(this._ended)return;let r=[this.buffer];for(;this.cursor+e>KO(r);){let i=await this._next();if(this._ended)break;r.push(i)}this.buffer=k.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function KO(t){return t.reduce((e,r)=>e+r.length,0)}async function XO(t,e){let r=new _d(t),i=await r.read(4);if(i=i.toString("utf8"),i!=="PACK")throw new he(`Invalid PACK header '${i}'`);let n=await r.read(4);if(n=n.readUInt32BE(0),n!==2)throw new he(`Invalid packfile version: ${n}`);let s=await r.read(4);if(s=s.readUInt32BE(0),!(s<1))for(;!r.eof()&&s--;){let a=r.tell(),{type:o,length:l,ofs:c,reference:u}=await QO(r),f=new Ad.default.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new he(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==l)throw new he("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await e({data:f.result,type:o,num:s,offset:a,end:h,reference:u,ofs:c})}}}}async function QO(t){let e=await t.byte(),r=e>>4&7,i=e&15;if(e&128){let a=4;do e=await t.byte(),i|=(e&127)<n+1<<7|s,-1)}function rL(t,e){let r=e,i=4,n=null;do n=t.readUInt8(),r|=(n&127)<2048*1024*1024)throw new he("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");i.seek(i.tell()+1020);let a=i.readUInt32BE(),o=[];for(let u=0;u{u===null&&(u=x);let S=Math.floor((u-x)*100/u);S!==f&&i&&await i({phase:"Receiving objects",loaded:u-x,total:u}),f=S,b=n[b],["commit","tree","blob","tag"].includes(b)?s[C]={type:b,offset:C}:b==="ofs-delta"?s[C]={type:b,offset:C}:b==="ref-delta"&&(s[C]={type:b,offset:C})});let d=Object.keys(s).map(Number);for(let[v,b]of d.entries()){let _=v+1===d.length?e.byteLength-20:d[v+1],C=s[b],x=UE.default.buf(e.slice(b,_))>>>0;C.end=_,C.crc=x}let h=new t({pack:Promise.resolve(e),packfileSha:a,crcs:l,hashes:o,offsets:c,getExternalRefDelta:r});f=null;let p=0,g=[0,0,0,0,0,0,0,0,0,0,0,0];for(let v in s){v=Number(v);let b=Math.floor(p*100/u);b!==f&&i&&await i({phase:"Resolving deltas",loaded:p,total:u}),p++,f=b;let _=s[v];if(!_.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:C,object:x}=await h.readSlice({start:v});g[h.readDepth]+=1;let S=await bn($s.wrap({type:C,object:x}));_.oid=S,o.push(S),c.set(S,v),l[S]=_.crc}catch(C){continue}}return o.sort(),h}async toBuffer(){let e=[],r=(c,u)=>{e.push(k.from(c,u))};r("ff744f63","hex"),r("00000002","hex");let i=new Ui(k.alloc(256*4));for(let c=0;c<256;c++){let u=0;for(let f of this.hashes)parseInt(f.slice(0,2),16)<=c&&u++;i.writeUInt32BE(u)}e.push(i.buffer);for(let c of this.hashes)r(c,"hex");let n=new Ui(k.alloc(this.hashes.length*4));for(let c of this.hashes)n.writeUInt32BE(this.crcs[c]);e.push(n.buffer);let s=new Ui(k.alloc(this.hashes.length*4));for(let c of this.hashes)s.writeUInt32BE(this.offsets.get(c));e.push(s.buffer),r(this.packfileSha,"hex");let a=k.concat(e),o=await bn(a),l=k.alloc(20);return l.write(o,"hex"),k.concat([a,l])}async load({pack:e}){this.pack=e}async unload(){this.pack=null}async read({oid:e}){if(!this.offsets.get(e)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(e);throw new he(`Could not read object ${e} from packfile`)}let r=this.offsets.get(e);return this.readSlice({start:r})}async readSlice({start:e}){if(this.offsetCache[e])return Object.assign({},this.offsetCache[e]);this.readDepth++;let r={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"},i=await this.pack;if(!i)throw new he("Could not read packfile data. The packfile may be missing, corrupted, or too large to read into memory.");let n=i.slice(e),s=new Ui(n),a=s.readUInt8(),o=a&112,l=r[o];if(l===void 0)throw new he("Unrecognized type: 0b"+o.toString(2));let c=a&15,u=c;a&128&&(u=rL(s,c));let d=null,h=null;if(l==="ofs_delta"){let g=tL(s),v=e-g;({object:d,type:l}=await this.readSlice({start:v}))}if(l==="ref_delta"){let g=s.slice(20).toString("hex");({object:d,type:l}=await this.read({oid:g}))}let p=n.slice(s.tell());if(h=k.from(await XE(p)),h.byteLength!==u)throw new he(`Packfile told us object would have length ${u} but it had length ${h.byteLength}`);return d&&(h=k.from(YO(h,d))),this.readDepth>3&&(this.offsetCache[e]={type:l,object:h}),{type:l,format:"content",object:h}}},md=Symbol("PackfileCache");async function iL({fs:t,filename:e,getExternalRefDelta:r,emitter:i,emitterPrefix:n}){let s=await t.read(e);return jc.fromIdx({idx:s,getExternalRefDelta:r})}function Zg({fs:t,cache:e,filename:r,getExternalRefDelta:i,emitter:n,emitterPrefix:s}){e[md]||(e[md]=new Map);let a=e[md].get(r);return a||(a=iL({fs:t,filename:r,getExternalRefDelta:i,emitter:n,emitterPrefix:s}),e[md].set(r,a)),a}async function nL(t,{start:e=0,end:r=t.length}={}){return bn(t.subarray(e,r))}async function sL({fs:t,cache:e,gitdir:r,oid:i,format:n="content",getExternalRefDelta:s}){let a=await t.readdir(B(r,"objects/pack"));a=a.filter(o=>o.endsWith(".idx"));for(let o of a){let l=`${r}/objects/pack/${o}`,c=await Zg({fs:t,cache:e,filename:l,getExternalRefDelta:s});if(c.error)throw new he(c.error);if(c.offsets.has(i)){let u=l.replace(/idx$/,"pack");c.pack||(c.pack=t.read(u));let f=await c.pack;if(!f)throw c.pack=null,new he(`Could not read packfile at ${u}. The file may be missing, corrupted, or too large to read into memory.`);if(!c._checksumVerified){let h=c.packfileSha,p=f.subarray(-20),g=Array.from(p).map(b=>b.toString(16).padStart(2,"0")).join("");if(g!==h)throw new he(`Packfile trailer mismatch: expected ${h}, got ${g}. The packfile may be corrupted.`);let v=await nL(f,{start:0,end:f.length-20});if(v!==h)throw new he(`Packfile payload corrupted: calculated ${v} but expected ${h}. The packfile may have been tampered with.`);c._checksumVerified=!0}let d=await c.read({oid:i,getExternalRefDelta:s});return d.format="content",d.source=`objects/pack/${o.replace(/idx$/,"pack")}`,d}}return null}async function tt({fs:t,cache:e,gitdir:r,oid:i,format:n="content"}){let s=u=>tt({fs:t,cache:e,gitdir:r,oid:u}),a;if(i==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(a={format:"wrapped",object:k.from("tree 0\0")}),a||(a=await ZE({fs:t,gitdir:r,oid:i})),!a){if(a=await sL({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:s}),!a)throw new Ve(i);return a}if(n==="deflated"||(a.format==="deflated"&&(a.object=k.from(await XE(a.object)),a.format="wrapped"),n==="wrapped"))return a;let o=await bn(a.object);if(o!==i)throw new he(`SHA check failed! Expected ${i}, computed ${o}`);let{object:l,type:c}=$s.unwrap(a.object);if(a.type=c,a.object=l,a.format="content",n==="content")return a;throw new he(`invalid requested format "${n}"`)}var Gi=class t extends Te{constructor(e,r,i=!0){super(`Failed to create ${e} at ${r} because it already exists.${i?` (Hint: use 'force: true' parameter to overwrite existing ${e}.)`:""}`),this.code=this.name=t.code,this.data={noun:e,where:r,canForce:i}}};Gi.code="AlreadyExistsError";var Vc=class t extends Te{constructor(e,r,i){super(`Found multiple ${e} matching "${r}" (${i.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=t.code,this.data={nouns:e,short:r,matches:i}}};Vc.code="AmbiguousError";var zc=class t extends Te{constructor(e){super(`Your local changes to the following files would be overwritten by checkout: ${e.join(", ")}`),this.code=this.name=t.code,this.data={filepaths:e}}};zc.code="CheckoutConflictError";var Wc=class t extends Te{constructor(e,r){super(`Cannot cherry-pick merge commit ${e}. Merge commits have ${r} parents and require specifying which parent to use as the base.`),this.code=this.name=t.code,this.data={oid:e,parentCount:r}}};Wc.code="CherryPickMergeCommitError";var qc=class t extends Te{constructor(e){super(`Cannot cherry-pick root commit ${e}. Root commits have no parents.`),this.code=this.name=t.code,this.data={oid:e}}};qc.code="CherryPickRootCommitError";var Yc=class t extends Te{constructor(e,r){super(`Failed to checkout "${e}" because commit ${r} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=t.code,this.data={ref:e,oid:r}}};Yc.code="CommitNotFetchedError";var Zc=class t extends Te{constructor(){super("Cannot create an empty commit when disallowEmpty is true."),this.code=this.name=t.code,this.data={}}};Zc.code="EmptyCommitError";var Kc=class t extends Te{constructor(){super("Empty response from git server."),this.code=this.name=t.code,this.data={}}};Kc.code="EmptyServerResponseError";var Xc=class t extends Te{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=t.code,this.data={}}};Xc.code="FastForwardError";var Qc=class t extends Te{constructor(e,r){super(`One or more branches were not updated: ${e}`),this.code=this.name=t.code,this.data={prettyDetails:e,result:r}}};Qc.code="GitPushError";var qo=class t extends Te{constructor(e,r,i){super(`HTTP Error: ${e} ${r}`),this.code=this.name=t.code,this.data={statusCode:e,statusMessage:r,response:i}}};qo.code="HttpError";var Fs=class t extends Te{constructor(e){let r="invalid filepath";e==="leading-slash"||e==="trailing-slash"?r='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':e==="directory"&&(r='"filepath" should not be a directory.'),super(r),this.code=this.name=t.code,this.data={reason:e}}};Fs.code="InvalidFilepathError";var ji=class t extends Te{constructor(e,r){super(`"${e}" would be an invalid git reference. (Hint: a valid alternative would be "${r}".)`),this.code=this.name=t.code,this.data={ref:e,suggestion:r}}};ji.code="InvalidRefNameError";var Jc=class t extends Te{constructor(e){super(`Maximum search depth of ${e} exceeded.`),this.code=this.name=t.code,this.data={depth:e}}};Jc.code="MaxDepthError";var Yo=class t extends Te{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=t.code,this.data={}}};Yo.code="MergeNotSupportedError";var ba=class t extends Te{constructor(e,r,i,n){super(`Automatic merge failed with one or more merge conflicts in the following files: ${e.toString()}. Fix conflicts then commit the result.`),this.code=this.name=t.code,this.data={filepaths:e,bothModified:r,deleteByUs:i,deleteByTheirs:n}}};ba.code="MergeConflictError";var Kt=class t extends Te{constructor(e){super(`No name was provided for ${e} in the argument or in the .git/config file.`),this.code=this.name=t.code,this.data={role:e}}};Kt.code="MissingNameError";var Ir=class t extends Te{constructor(e){super(`The function requires a "${e}" parameter but none was provided.`),this.code=this.name=t.code,this.data={parameter:e}}};Ir.code="MissingParameterError";var _a=class t extends Te{constructor(e){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=t.code,this.data={errors:e},this.errors=e}};_a.code="MultipleGitError";var ya=class t extends Te{constructor(e,r){super(`Expected "${e}" but received "${r}".`),this.code=this.name=t.code,this.data={expected:e,actual:r}}};ya.code="ParseError";var Zo=class t extends Te{constructor(e){let r="";e==="not-fast-forward"?r=" because it was not a simple fast-forward":e==="tag-exists"&&(r=" because tag already exists"),super(`Push rejected${r}. Use "force: true" to override.`),this.code=this.name=t.code,this.data={reason:e}}};Zo.code="PushRejectedError";var Ps=class t extends Te{constructor(e,r){super(`Remote does not support the "${e}" so the "${r}" parameter cannot be used.`),this.code=this.name=t.code,this.data={capability:e,parameter:r}}};Ps.code="RemoteCapabilityError";var eu=class t extends Te{constructor(e,r){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${e}`),this.code=this.name=t.code,this.data={preview:e,response:r}}};eu.code="SmartHttpError";var tu=class t extends Te{constructor(e,r,i){super(`Git remote "${e}" uses an unrecognized transport protocol: "${r}"`),this.code=this.name=t.code,this.data={url:e,transport:r,suggestion:i}}};tu.code="UnknownTransportError";var ru=class t extends Te{constructor(e){super(`Cannot parse remote URL: "${e}"`),this.code=this.name=t.code,this.data={url:e}}};ru.code="UrlParseError";var Ko=class t extends Te{constructor(){super("The operation was canceled."),this.code=this.name=t.code,this.data={}}};Ko.code="UserCanceledError";var iu=class t extends Te{constructor(e){super(`Could not merge index: Entry for '${e}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=t.code,this.data={filepath:e}}};iu.code="IndexResetError";var nu=class t extends Te{constructor(e){super(`"${e}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=t.code,this.data={ref:e}}};nu.code="NoCommitError";var lu=Object.freeze({__proto__:null,AlreadyExistsError:Gi,AmbiguousError:Vc,CheckoutConflictError:zc,CherryPickMergeCommitError:Wc,CherryPickRootCommitError:qc,CommitNotFetchedError:Yc,EmptyCommitError:Zc,EmptyServerResponseError:Kc,FastForwardError:Xc,GitPushError:Qc,HttpError:qo,InternalError:he,InvalidFilepathError:Fs,InvalidOidError:Rs,InvalidRefNameError:ji,MaxDepthError:Jc,MergeNotSupportedError:Yo,MergeConflictError:ba,MissingNameError:Kt,MissingParameterError:Ir,MultipleGitError:_a,NoRefspecError:Gc,NotFoundError:Ve,ObjectTypeError:br,ParseError:ya,PushRejectedError:Zo,RemoteCapabilityError:Ps,SmartHttpError:eu,UnknownTransportError:tu,UnsafeFilepathError:va,UrlParseError:ru,UserCanceledError:Ko,UnmergedPathsError:Uc,IndexResetError:iu,NoCommitError:nu});function Ug({name:t,email:e,timestamp:r,timezoneOffset:i}){return i=aL(i),`${t} <${e}> ${r} ${i}`}function aL(t){let e=oL(lL(t));t=Math.abs(t);let r=Math.floor(t/60);t-=r*60;let i=String(r),n=String(t);return i.length<2&&(i="0"+i),n.length<2&&(n="0"+n),(e===-1?"-":"+")+i+n}function oL(t){return Math.sign(t)||(Object.is(t,-0)?-1:1)}function lL(t){return t===0?t:-t}function Yn(t){return t=t.replace(/\r/g,""),t=t.replace(/^\n+/,""),t=t.replace(/\n+$/,"")+` +`,t}function yd(t){let[,e,r,i,n]=t.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:e,email:r,timestamp:Number(i),timezoneOffset:cL(n)}}function cL(t){let[,e,r,i]=t.match(/(\+|-)(\d\d)(\d\d)/);return i=(e==="+"?1:-1)*(Number(r)*60+Number(i)),uL(i)}function uL(t){return t===0?t:-t}var Jr=class t{constructor(e){if(typeof e=="string")this._tag=e;else if(k.isBuffer(e))this._tag=e.toString("utf8");else if(typeof e=="object")this._tag=t.render(e);else throw new he("invalid type passed to GitAnnotatedTag constructor")}static from(e){return new t(e)}static render(e){return`object ${e.object} +type ${e.type} +tag ${e.tag} +tagger ${Ug(e.tagger)} + +${e.message} +${e.gpgsig?e.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(` + +`))}message(){let e=this.withoutSignature();return e.slice(e.indexOf(` + +`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let e=this.justHeaders().split(` +`),r=[];for(let n of e)n[0]===" "?r[r.length-1]+=` +`+n.slice(1):r.push(n);let i={};for(let n of r){let s=n.slice(0,n.indexOf(" ")),a=n.slice(n.indexOf(" ")+1);Array.isArray(i[s])?i[s].push(a):i[s]=a}return i.tagger&&(i.tagger=yd(i.tagger)),i.committer&&(i.committer=yd(i.committer)),i}withoutSignature(){let e=Yn(this._tag);return e.indexOf(` +-----BEGIN PGP SIGNATURE-----`)===-1?e:e.slice(0,e.lastIndexOf(` +-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(` +-----BEGIN PGP SIGNATURE-----`)===-1)return;let e=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return Yn(e)}payload(){return this.withoutSignature()+` +`}toObject(){return k.from(this._tag,"utf8")}static async sign(e,r,i){let n=e.payload(),{signature:s}=await r({payload:n,secretKey:i});s=Yn(s);let a=n+s;return t.from(a)}};function Pg(t){return t.trim().split(` +`).map(e=>" "+e).join(` +`)+` +`}function fL(t){return t.split(` +`).map(e=>e.replace(/^ /,"")).join(` +`)}var Dr=class t{constructor(e){if(typeof e=="string")this._commit=e;else if(k.isBuffer(e))this._commit=e.toString("utf8");else if(typeof e=="object")this._commit=t.render(e);else throw new he("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:e,signature:r}){let i=t.justHeaders(e),n=t.justMessage(e),s=Yn(i+` +gpgsig`+Pg(r)+` +`+n);return new t(s)}static from(e){return new t(e)}toObject(){return k.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return t.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(e){return Yn(e.slice(e.indexOf(` + +`)+2))}static justHeaders(e){return e.slice(0,e.indexOf(` + +`))}parseHeaders(){let e=t.justHeaders(this._commit).split(` +`),r=[];for(let n of e)n[0]===" "?r[r.length-1]+=` +`+n.slice(1):r.push(n);let i={parent:[]};for(let n of r){let s=n.slice(0,n.indexOf(" ")),a=n.slice(n.indexOf(" ")+1);Array.isArray(i[s])?i[s].push(a):i[s]=a}return i.author&&(i.author=yd(i.author)),i.committer&&(i.committer=yd(i.committer)),i}static renderHeaders(e){let r="";if(e.tree?r+=`tree ${e.tree} +`:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 +`,e.parent){if(e.parent.length===void 0)throw new he("commit 'parent' property should be an array");for(let s of e.parent)r+=`parent ${s} +`}let i=e.author;r+=`author ${Ug(i)} +`;let n=e.committer||e.author;return r+=`committer ${Ug(n)} +`,e.gpgsig&&(r+="gpgsig"+Pg(e.gpgsig)),r}static render(e){return t.renderHeaders(e)+` +`+Yn(e.message)}render(){return this._commit}withoutSignature(){let e=Yn(this._commit);if(e.indexOf(` +gpgsig`)===-1)return e;let r=e.slice(0,e.indexOf(` +gpgsig`)),i=e.slice(e.indexOf(`-----END PGP SIGNATURE----- +`)+28);return Yn(r+` +`+i)}isolateSignature(){let e=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return fL(e)}static async sign(e,r,i){let n=e.withoutSignature(),s=t.justMessage(e._commit),{signature:a}=await r({payload:n,secretKey:i});a=Yn(a);let l=t.justHeaders(e._commit)+` +gpgsig`+Pg(a)+` +`+s;return t.from(l)}};async function Xo({fs:t,cache:e,gitdir:r,oid:i}){if(i==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:Mr.from([]),oid:i};let{type:n,object:s}=await tt({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=Jr.from(s).parse().object,Xo({fs:t,cache:e,gitdir:r,oid:i});if(n==="commit")return i=Dr.from(s).parse().tree,Xo({fs:t,cache:e,gitdir:r,oid:i});if(n!=="tree")throw new br(i,n,"tree");return{tree:Mr.from(s),oid:i}}var Gg=class{constructor({fs:e,gitdir:r,ref:i,cache:n}){this.fs=e,this.cache=n,this.gitdir=r,this.mapPromise=(async()=>{let a=new Map,o;try{o=await q.resolve({fs:e,gitdir:r,ref:i})}catch(c){c instanceof Ve&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await Xo({fs:e,cache:this.cache,gitdir:r,oid:o});return l.type="tree",l.mode="40000",a.set(".",l),a})();let s=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return s.type(this)}async mode(){return s.mode(this)}async stat(){return s.stat(this)}async content(){return s.content(this)}async oid(){return s.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:i,cache:n,gitdir:s}=this,a=await this.mapPromise,o=a.get(r);if(!o)throw new Error(`No obj for ${r}`);let l=o.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:c,object:u}=await tt({fs:i,cache:n,gitdir:s,oid:l});if(c!==o.type)throw new br(l,c,o.type);let f=Mr.from(u);for(let d of f)a.set(B(r,d.path),d);return f.entries().map(d=>B(r,d.path))}async type(e){if(e._type===!1){let r=await this.mapPromise,{type:i}=r.get(e._fullpath);e._type=i}return e._type}async mode(e){if(e._mode===!1){let r=await this.mapPromise,{mode:i}=r.get(e._fullpath);e._mode=zE(parseInt(i,8))}return e._mode}async stat(e){}async content(e){if(e._content===!1){let r=await this.mapPromise,{fs:i,cache:n,gitdir:s}=this,o=r.get(e._fullpath).oid,{type:l,object:c}=await tt({fs:i,cache:n,gitdir:s,oid:o});l!=="blob"?e._content=void 0:e._content=new Uint8Array(c)}return e._content}async oid(e){if(e._oid===!1){let i=(await this.mapPromise).get(e._fullpath);e._oid=i.oid}return e._oid}};function Fr({ref:t="HEAD"}={}){let e=Object.create(null);return Object.defineProperty(e,Pd,{value:function({fs:r,gitdir:i,cache:n}){return new Gg({fs:r,gitdir:i,ref:t,cache:n})}}),Object.freeze(e),e}var jg=class{constructor({fs:e,dir:r,gitdir:i,cache:n,refresh:s=!0}){this.fs=e,this.cache=n,this.dir=r,this.gitdir=i,this.refresh=s,this.config=null;let a=this;this.ConstructEntry=class{constructor(l){this._fullpath=l,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(e){if(await e.type()!=="tree")return null;let r=e._fullpath,{fs:i,dir:n}=this,s=await i.readdir(B(n,r));return s===null?null:s.map(a=>B(r,a))}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let{fs:r,dir:i}=this,n=await r.lstat(`${i}/${e._fullpath}`);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let s=n.isDirectory()?"tree":"blob";s==="blob"&&!n.isFile()&&!n.isSymbolicLink()&&(s="special"),e._type=s,n=Wo(n),e._mode=n.mode,n.size===-1&&e._actualSize&&(n.size=e._actualSize),e._stat=n}return e._stat}async content(e){if(e._content===!1){let{fs:r,dir:i,gitdir:n}=this;if(await e.type()==="tree")e._content=void 0;else{let s;if(await e.mode()>>12===10)s=await r.readlink(`${i}/${e._fullpath}`);else{let o=await(await this._getGitConfig(r,n)).get("core.autocrlf");s=await r.read(`${i}/${e._fullpath}`,{autocrlf:o})}e._actualSize=s.length,e._stat&&e._stat.size===-1&&(e._stat.size=e._actualSize),e._content=new Uint8Array(s)}}return e._content}async oid(e){if(e._oid===!1){let r=this,{fs:i,gitdir:n,cache:s}=this,a;await dt.acquire({fs:i,gitdir:n,cache:s},async function(o){let l=o.entriesMap.get(e._fullpath),c=await e.stat(),f=await(await r._getGitConfig(i,n)).get("core.filemode"),d=typeof process!="undefined"?process.platform!=="win32":!0;if(!l||gd(c,l,f,d)){let h=await e.content();h===void 0?a=void 0:(a=await bn($s.wrap({type:"blob",object:h})),r.refresh&&l&&a===l.oid&&(!f||c.mode===l.mode)&&gd(c,l,f,d)&&o.insert({filepath:e._fullpath,stats:c,oid:a}))}else a=l.oid}),e._oid=a}return e._oid}async _getGitConfig(e,r){return this.config?this.config:(this.config=await ht.get({fs:e,gitdir:r}),this.config)}};function cu({refresh:t=!0}={}){let e=Object.create(null);return Object.defineProperty(e,Pd,{value:function({fs:r,dir:i,gitdir:n,cache:s}){return new jg({fs:r,dir:i,gitdir:n,cache:s,refresh:t})}}),Object.freeze(e),e}function dL(t,e){let r=e-t;return Array.from({length:r},(i,n)=>t+n)}var QE=typeof Array.prototype.flat=="undefined"?t=>t.reduce((e,r)=>e.concat(r),[]):t=>t.flat(),Vg=class{constructor(){this.value=null}consider(e){e!=null&&(this.value===null?this.value=e:ec,reduce:a=async(l,c)=>{let u=QE(c);return l!==void 0&&u.unshift(l),u},iterate:o=(l,c)=>Promise.all([...c].map(l))}){let l=n.map(h=>h[Pd]({fs:t,dir:r,gitdir:i,cache:e})),c=new Array(l.length).fill("."),u=dL(0,l.length),f=async h=>{u.forEach(v=>{let b=h[v];h[v]=b&&new l[v].ConstructEntry(b)});let g=(await Promise.all(u.map(v=>{let b=h[v];return b?l[v].readdir(b):[]}))).map(v=>(v===null?[]:v)[Symbol.iterator]());return{entries:h,children:hL(g)}},d=async h=>{let{entries:p,children:g}=await f(h),v=p.find(_=>_&&_._fullpath)._fullpath,b=await s(v,p);if(b!==null){let _=await o(d,g);return _=_.filter(C=>C!==void 0),a(b,_)}};return d(c)}async function zg(t,e){let r=await t.readdir(e);r==null?await t.rm(e):r.length?await Promise.all(r.map(i=>{let n=B(e,i);return t.lstat(n).then(s=>{if(s)return s.isDirectory()?zg(t,n):t.rm(n)})})).then(()=>t.rmdir(e)):await t.rmdir(e)}function pL(t){return mL(t)&&AE(t.then)&&AE(t.catch)}function mL(t){return t&&typeof t=="object"}function AE(t){return typeof t=="function"}function TE(t){return pL((r=>{try{return r.readFile().catch(i=>i)}catch(i){return i}})(t))}var PE=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function RE(t,e){if(TE(e))for(let r of PE)t[`_${r}`]=e[r].bind(e);else for(let r of PE)t[`_${r}`]=(0,Hc.default)(e[r].bind(e));TE(e)?(e.cp&&(t._cp=e.cp.bind(e)),e.rm?t._rm=e.rm.bind(e):e.rmdir.length>1?t._rm=e.rmdir.bind(e):t._rm=zg.bind(null,t)):(e.cp&&(t._cp=(0,Hc.default)(e.cp.bind(e))),e.rm?t._rm=(0,Hc.default)(e.rm.bind(e)):e.rmdir.length>2?t._rm=(0,Hc.default)(e.rmdir.bind(e)):t._rm=zg.bind(null,t))}var J=class{constructor(e){if(typeof e._original_unwrapped_fs!="undefined")return e;let r=Object.getOwnPropertyDescriptor(e,"promises");r&&r.enumerable?RE(this,e.promises):RE(this,e),this._original_unwrapped_fs=e}async exists(e,r={}){try{return await this._stat(e),!0}catch(i){if(i.code==="ENOENT"||i.code==="ENOTDIR"||(i.code||"").includes("ENS"))return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',i),i}}async read(e,r={}){try{let i=await this._readFile(e,r);if(r.autocrlf==="true")try{i=new TextDecoder("utf8",{fatal:!0}).decode(i),i=i.replace(/\r\n/g,` +`),i=new TextEncoder().encode(i)}catch(n){}return typeof i!="string"&&(i=k.from(i)),i}catch(i){return null}}async write(e,r,i={}){try{await this._writeFile(e,r,i)}catch(n){await this.mkdir(wa(e)),await this._writeFile(e,r,i)}}async mkdir(e,r=!1){try{await this._mkdir(e)}catch(i){if(i===null||i.code==="EEXIST")return;if(r)throw i;if(i.code==="ENOENT"){let n=wa(e);if(n==="."||n==="/"||n===e)throw i;await this.mkdir(n),await this.mkdir(e,!0)}}}async rm(e){try{await this._unlink(e)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(e,r){try{r&&r.recursive?await this._rm(e,r):await this._rmdir(e)}catch(i){if(i.code!=="ENOENT")throw i}}async readdir(e){try{let r=await this._readdir(e);return r.sort(Td),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(e){let r=await this._readdir(e);return(await Promise.all(r.map(async n=>{let s=e+"/"+n;return(await this._stat(s)).isDirectory()?this.readdirDeep(s):s}))).reduce((n,s)=>n.concat(s),[])}async lstat(e){try{return await this._lstat(e)}catch(r){if(r.code==="ENOENT"||(r.code||"").includes("ENS"))return null;throw r}}async readlink(e,r={encoding:"buffer"}){try{let i=await this._readlink(e,r);return k.isBuffer(i)?i:k.from(i)}catch(i){if(i.code==="ENOENT"||(i.code||"").includes("ENS"))return null;throw i}}async writelink(e,r){return this._symlink(r.toString("utf8"),e)}};function R(t,e){if(e===void 0)throw new Ir(t)}function gL(t){return t.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(t)}async function re({fsp:t,dotgit:e}){R("fsp",t),R("dotgit",e);let r=await t._stat(e).catch(()=>({isFile:()=>!1,isDirectory:()=>!1}));return r.isDirectory()?e:r.isFile()?t._readFile(e,"utf8").then(i=>i.trimRight().substr(8)).then(i=>gL(i)?i:B(wa(e),i)):e}async function xd(t,e){return!t&&!e?!1:t&&!e||!t&&e?!0:!(await t.type()==="tree"&&await e.type()==="tree"||await t.type()===await e.type()&&await t.mode()===await e.mode()&&await t.oid()===await e.oid())}async function vL({fs:t,dir:e,gitdir:r=B(e,".git"),commit:i="HEAD",cache:n={}}){try{R("fs",t),R("dir",e),R("gitdir",r);let s=new J(t),a=[Fr({ref:i}),cu(),tl()],o=[],l=await re({fsp:s,dotgit:r});await dt.acquire({fs:s,gitdir:l,cache:n},async function(u){o=u.unmergedPaths});let c=await Zn({fs:s,cache:n,dir:e,gitdir:l,trees:a,map:async function(u,[f,d,h]){let p=!await xd(d,h),g=o.includes(u),v=!await xd(h,f);if(p||g)return f?{path:u,mode:await f.mode(),oid:await f.oid(),type:await f.type(),content:await f.content()}:void 0;if(v)return!1;throw new iu(u)}});await dt.acquire({fs:s,gitdir:l,cache:n},async function(u){for(let f of c)if(f!==!1){if(!f){await s.rmdir(`${e}/${f.path}`,{recursive:!0}),u.delete({filepath:f.path});continue}if(f.type==="blob"){let d=new TextDecoder().decode(f.content);await s.write(`${e}/${f.path}`,d,{mode:f.mode}),u.insert({filepath:f.path,oid:f.oid,stage:0})}}})}catch(s){throw s.caller="git.abortMerge",s}}var Is=class{static async isIgnored({fs:e,dir:r,gitdir:i=B(r,".git"),filepath:n}){if(vd(n)===".git")return!0;if(n===".")return!1;let s="",a=B(i,"info","exclude");await e.exists(a)&&(s=await e.read(a,"utf8"));let o=[{gitignore:B(r,".gitignore"),filepath:n}],l=n.split("/").filter(Boolean);for(let u=1;u{let f=await(await ht.get({fs:o,gitdir:l})).get("core.autocrlf");return Wg({dir:e,gitdir:l,fs:o,filepath:i,index:c,force:s,parallel:a,autocrlf:f})})}catch(o){throw o.caller="git.add",o}}async function Wg({dir:t,gitdir:e,fs:r,filepath:i,index:n,force:s,parallel:a,autocrlf:o}){i=Array.isArray(i)?i:[i];let l=i.map(async d=>{if(!s&&await Is.isIgnored({fs:r,dir:t,gitdir:e,filepath:d}))return;let h=await r.lstat(B(t,d));if(!h)throw new Ve(d);if(h.isDirectory()){let p=await r.readdir(B(t,d));if(a){let g=p.map(v=>Wg({dir:t,gitdir:e,fs:r,filepath:[B(d,v)],index:n,force:s,parallel:a,autocrlf:o}));await Promise.all(g)}else for(let g of p)await Wg({dir:t,gitdir:e,fs:r,filepath:[B(d,g)],index:n,force:s,parallel:a,autocrlf:o})}else{let p=h.isSymbolicLink()?await r.readlink(B(t,d)).then(eS):await r.read(B(t,d),{autocrlf:o});if(p===null)throw new Ve(d);let g=await Or({fs:r,gitdir:e,type:"blob",object:p});n.insert({filepath:d,stats:h,oid:g})}}),c=await Promise.allSettled(l),u=c.filter(d=>d.status==="rejected").map(d=>d.reason);if(u.length>1)throw new _a(u);if(u.length===1)throw u[0];return c.filter(d=>d.status==="fulfilled"&&d.value).map(d=>d.value)}async function su({fs:t,gitdir:e,path:r}){return(await ht.get({fs:t,gitdir:e})).get(r)}function tS(t,...e){for(let r of e)if(r)for(let i of Object.keys(r)){let n=r[i];n!==void 0&&(t[i]=n)}return t}async function Ms({fs:t,gitdir:e,author:r,commit:i}){let n=Math.floor(Date.now()/1e3),s={name:await su({fs:t,gitdir:e,path:"user.name"}),email:await su({fs:t,gitdir:e,path:"user.email"})||"",timestamp:n,timezoneOffset:new Date(n*1e3).getTimezoneOffset()},a=tS({},s,i?i.author:void 0,r);if(a.name!==void 0)return a}async function xa({fs:t,gitdir:e,author:r,committer:i,commit:n}){let s=Math.floor(Date.now()/1e3),a={name:await su({fs:t,gitdir:e,path:"user.name"}),email:await su({fs:t,gitdir:e,path:"user.email"})||"",timestamp:s,timezoneOffset:new Date(s*1e3).getTimezoneOffset()},o=tS({},a,n?n.committer:void 0,r,i);if(o.name!==void 0)return o}async function rS({fs:t,cache:e,gitdir:r,oid:i}){let{type:n,object:s}=await tt({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=Jr.from(s).parse().object,rS({fs:t,cache:e,gitdir:r,oid:i});if(n!=="commit")throw new br(i,n,"commit");return{commit:Dr.from(s),oid:i}}async function wn({fs:t,cache:e,gitdir:r,oid:i}){let{commit:n,oid:s}=await rS({fs:t,cache:e,gitdir:r,oid:i});return{oid:s,commit:n.parse(),payload:n.withoutSignature()}}var xL="4b825dc642cb6eb9a060e54bf8d69288fbee4904";async function uu({fs:t,cache:e,onSign:r,gitdir:i,message:n,author:s,committer:a,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,disallowEmpty:f=!1,ref:d,parent:h,tree:p}){let g=!1,v=!1;d||(v=!(await t.read(`${i}/HEAD`,{encoding:"utf8"})).startsWith("ref:"),d=await q.resolve({fs:t,gitdir:i,ref:"HEAD",depth:2}));let b,_;try{b=await q.resolve({fs:t,gitdir:i,ref:d}),_=await wn({fs:t,gitdir:i,oid:b,cache:{}})}catch(S){g=!0}if(l&&g)throw new nu(d);let C=l?await Ms({fs:t,gitdir:i,author:s,commit:_.commit}):await Ms({fs:t,gitdir:i,author:s});if(!C)throw new Kt("author");let x=l?await xa({fs:t,gitdir:i,author:C,committer:a,commit:_.commit}):await xa({fs:t,gitdir:i,author:C,committer:a});if(!x)throw new Kt("committer");return dt.acquire({fs:t,gitdir:i,cache:e,allowUnmerged:!1},async function(S){let w=qE(S.entries).get(".");if(p||(p=await iS({fs:t,gitdir:i,inode:w,dryRun:c})),h?h=await Promise.all(h.map(P=>q.resolve({fs:t,gitdir:i,ref:P}))):l?h=_.commit.parent:h=b?[b]:[],f&&!l&&(g&&p===xL||!g&&p===_.commit.tree))throw new Zc;if(!n)if(l)n=_.commit.message;else throw new Ir("message");let E=Dr.from({tree:p,parent:h,author:C,committer:x,message:n});o&&(E=await Dr.sign(E,r,o));let y=await Or({fs:t,gitdir:i,type:"commit",object:E.toObject(),dryRun:c});return!u&&!c&&await q.writeRef({fs:t,gitdir:i,ref:v?"HEAD":d,value:y}),y})}async function iS({fs:t,gitdir:e,inode:r,dryRun:i}){let n=r.children;for(let l of n)l.type==="tree"&&(l.metadata.mode="040000",l.metadata.oid=await iS({fs:t,gitdir:e,inode:l,dryRun:i}));let s=n.map(l=>({mode:l.metadata.mode,path:l.basename,oid:l.metadata.oid,type:l.type})),a=Mr.from(s);return await Or({fs:t,gitdir:e,type:"tree",object:a.toObject(),dryRun:i})}async function fu({fs:t,cache:e,gitdir:r,oid:i,filepath:n}){if(n.startsWith("/"))throw new Fs("leading-slash");if(n.endsWith("/"))throw new Fs("trailing-slash");let s=i,a=await Xo({fs:t,cache:e,gitdir:r,oid:i}),o=a.tree;if(n==="")i=a.oid;else{let l=n.split("/");i=await nS({fs:t,cache:e,gitdir:r,tree:o,pathArray:l,oid:s,filepath:n})}return i}async function nS({fs:t,cache:e,gitdir:r,tree:i,pathArray:n,oid:s,filepath:a}){let o=n.shift();for(let l of i)if(l.path===o){if(n.length===0)return l.oid;{let{type:c,object:u}=await tt({fs:t,cache:e,gitdir:r,oid:l.oid});if(c!=="tree")throw new br(s,c,"tree",a);return i=Mr.from(u),nS({fs:t,cache:e,gitdir:r,tree:i,pathArray:n,oid:s,filepath:a})}}throw new Ve(`file or directory found at "${s}:${a}"`)}async function rl({fs:t,cache:e,gitdir:r,oid:i,filepath:n=void 0}){n!==void 0&&(i=await fu({fs:t,cache:e,gitdir:r,oid:i,filepath:n}));let{tree:s,oid:a}=await Xo({fs:t,cache:e,gitdir:r,oid:i});return{oid:a,tree:s.entries()}}async function du({fs:t,gitdir:e,tree:r}){let i=Mr.from(r).toObject();return await Or({fs:t,gitdir:e,type:"tree",object:i,format:"content"})}async function EL({fs:t,cache:e,onSign:r,gitdir:i,ref:n,oid:s,note:a,force:o,author:l,committer:c,signingKey:u}){let f;try{f=await q.resolve({gitdir:i,fs:t,ref:n})}catch(b){if(!(b instanceof Ve))throw b}let h=(await rl({fs:t,cache:e,gitdir:i,oid:f||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(o)h=h.filter(b=>b.path!==s);else for(let b of h)if(b.path===s)throw new Gi("note",s);typeof a=="string"&&(a=k.from(a,"utf8"));let p=await Or({fs:t,gitdir:i,type:"blob",object:a,format:"content"});h.push({mode:"100644",path:s,oid:p,type:"blob"});let g=await du({fs:t,gitdir:i,tree:h});return await uu({fs:t,cache:e,onSign:r,gitdir:i,ref:n,tree:g,parent:f&&[f],message:`Note added by 'isomorphic-git addNote' +`,author:l,committer:c,signingKey:u})}async function SL({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ref:n="refs/notes/commits",oid:s,note:a,force:o,author:l,committer:c,signingKey:u,cache:f={}}){try{R("fs",t),R("gitdir",i),R("oid",s),R("note",a),u&&R("onSign",e);let d=new J(t),h=await Ms({fs:d,gitdir:i,author:l});if(!h)throw new Kt("author");let p=await xa({fs:d,gitdir:i,author:h,committer:c});if(!p)throw new Kt("committer");let g=await re({fsp:d,dotgit:i});return await EL({fs:d,cache:f,onSign:e,gitdir:g,ref:n,oid:s,note:a,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}var kL=/(^|[/.])([/.]|$)|^@$|@{|[\x00-\x20\x7f~^:?*[\\]|\.lock(\/|$)/;function au(t,e){if(typeof t!="string")throw new TypeError("Reference name must be a string");return!kL.test(t)&&(!!e||t.includes("/"))}async function sS({fs:t,gitdir:e,remote:r,url:i,force:n}){if(!au(r,!0))throw new ji(r,zo.default.clean(r));let s=await ht.get({fs:t,gitdir:e});if(!n&&(await s.getSubsections("remote")).includes(r)&&i!==await s.get(`remote.${r}.url`))throw new Gi("remote",r);await s.set(`remote.${r}.url`,i),await s.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await ht.save({fs:t,gitdir:e,config:s})}async function CL({fs:t,dir:e,gitdir:r=B(e,".git"),remote:i,url:n,force:s=!1}){try{R("fs",t),R("gitdir",r),R("remote",i),R("url",n);let a=new J(t),o=await re({fsp:a,dotgit:r});return await sS({fs:a,gitdir:o,remote:i,url:n,force:s})}catch(a){throw a.caller="git.addRemote",a}}async function AL({fs:t,cache:e,onSign:r,gitdir:i,ref:n,tagger:s,message:a=n,gpgsig:o,object:l,signingKey:c,force:u=!1}){if(n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`,!u&&await q.exists({fs:t,gitdir:i,ref:n}))throw new Gi("tag",n);let f=await q.resolve({fs:t,gitdir:i,ref:l||"HEAD"}),{type:d}=await tt({fs:t,cache:e,gitdir:i,oid:f}),h=Jr.from({object:f,type:d,tag:n.replace("refs/tags/",""),tagger:s,message:a,gpgsig:o});c&&(h=await Jr.sign(h,r,c));let p=await Or({fs:t,gitdir:i,type:"tag",object:h.toObject()});await q.writeRef({fs:t,gitdir:i,ref:n,value:p})}async function TL({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ref:n,tagger:s,message:a=n,gpgsig:o,object:l,signingKey:c,force:u=!1,cache:f={}}){try{R("fs",t),R("gitdir",i),R("ref",n),c&&R("onSign",e);let d=new J(t),h=await re({fsp:d,dotgit:i}),p=await Ms({fs:d,gitdir:h,author:s});if(!p)throw new Kt("tagger");return await AL({fs:d,cache:f,onSign:e,gitdir:h,ref:n,tagger:p,message:a,gpgsig:o,object:l,signingKey:c,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function PL({fs:t,gitdir:e,ref:r,object:i,checkout:n=!1,force:s=!1}){if(!au(r,!0))throw new ji(r,zo.default.clean(r));let a=`refs/heads/${r}`;if(!s&&await q.exists({fs:t,gitdir:e,ref:a}))throw new Gi("branch",r,!1);let o;try{o=await q.resolve({fs:t,gitdir:e,ref:i||"HEAD"})}catch(l){}o&&await q.writeRef({fs:t,gitdir:e,ref:a,value:o}),n&&await q.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:a})}async function RL({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,object:n,checkout:s=!1,force:a=!1}){try{R("fs",t),R("gitdir",r),R("ref",i);let o=new J(t),l=await re({fsp:o,dotgit:r});return await PL({fs:o,gitdir:l,ref:i,object:n,checkout:s,force:a})}catch(o){throw o.caller="git.branch",o}}async function ou(t,e,r){let i=r.split("/");i.pop();let n=e;for(let s of i){if(s===""||s===".")continue;n=`${n}/${s}`;let a=await t.lstat(n);if(a&&a.isSymbolicLink())throw new va(r)}}var aS=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);async function Kg({fs:t,cache:e,onProgress:r,onPostCheckout:i,dir:n,gitdir:s,remote:a,ref:o,filepaths:l,noCheckout:c,noUpdateHead:u,dryRun:f,force:d,track:h=!0,nonBlocking:p=!1,batchSize:g=100}){let v;if(i)try{v=await q.resolve({fs:t,gitdir:s,ref:"HEAD"})}catch(_){v="0000000000000000000000000000000000000000"}let b;try{b=await q.resolve({fs:t,gitdir:s,ref:o})}catch(_){if(o==="HEAD")throw _;let C=`${a}/${o}`;if(b=await q.resolve({fs:t,gitdir:s,ref:C}),h){let x=await ht.get({fs:t,gitdir:s});await x.set(`branch.${o}.remote`,a),await x.set(`branch.${o}.merge`,`refs/heads/${o}`),await ht.save({fs:t,gitdir:s,config:x})}await q.writeRef({fs:t,gitdir:s,ref:`refs/heads/${o}`,value:b})}if(!c){let _;try{_=await $L({fs:t,cache:e,onProgress:r,dir:n,gitdir:s,ref:o,force:d,filepaths:l})}catch(w){throw w instanceof Ve&&w.data.what===b?new Yc(o,b):w}let C=_.filter(([w])=>w==="conflict").map(([w,E])=>E);if(C.length>0)throw new zc(C);let x=_.filter(([w])=>w==="error").map(([w,E])=>E);if(x.length>0)throw new he(x.join(", "));if(f){i&&await i({previousHead:v,newHead:b,type:l!=null&&l.length>0?"file":"branch"});return}let S=0,A=_.length;if(await dt.acquire({fs:t,gitdir:s,cache:e},async function(w){await Promise.all(_.filter(([E])=>E==="delete"||E==="delete-index").map(async function([E,y]){let P=`${n}/${y}`;E==="delete"&&await t.rm(P),w.delete({filepath:y}),r&&await r({phase:"Updating workdir",loaded:++S,total:A})}))}),await dt.acquire({fs:t,gitdir:s,cache:e},async function(w){for(let[E,y]of _)if(E==="rmdir"||E==="rmdir-index"){let P=`${n}/${y}`;try{E==="rmdir"&&await t.rmdir(P),w.delete({filepath:y}),r&&await r({phase:"Updating workdir",loaded:++S,total:A})}catch(T){if(T.code==="ENOTEMPTY")console.log(`Did not delete ${y} because directory is not empty`);else throw T}}}),await Promise.all(_.filter(([w])=>w==="mkdir"||w==="mkdir-index").map(async function([w,E]){let y=`${n}/${E}`;await ou(t,n,E),await t.mkdir(y),r&&await r({phase:"Updating workdir",loaded:++S,total:A})})),p){let w=_.filter(([y])=>y==="create"||y==="create-index"||y==="update"||y==="mkdir-index"),E=await $E("Update Working Dir",w.map(([y,P,T,I,L])=>()=>IL({fs:t,cache:e,gitdir:s,dir:n},[y,P,T,I,L])),r,g);await dt.acquire({fs:t,gitdir:s,cache:e,allowUnmerged:!0},async function(y){await $E("Update Index",E.map(([P,T,I])=>()=>FL({index:y,fullpath:P,oid:T,stats:I})),r,g)})}else await dt.acquire({fs:t,gitdir:s,cache:e,allowUnmerged:!0},async function(w){var P,T;let E=await Promise.allSettled(_.filter(([I])=>I==="create"||I==="create-index"||I==="update"||I==="mkdir-index").map(async function([I,L,H,te,xe]){let Z=`${n}/${L}`;if(I!=="create-index"&&I!=="mkdir-index"){await ou(t,n,L);let{object:ce}=await tt({fs:t,cache:e,gitdir:s,oid:H});if(xe&&await t.rm(Z),te===33188)await t.write(Z,ce);else if(te===33261)await t.write(Z,ce,{mode:511});else if(te===40960)await t.writelink(Z,ce);else throw new he(`Invalid mode 0o${te.toString(8)} detected in blob ${H}`)}let K=await t.lstat(Z);te===33261&&(K.mode=493),I==="mkdir-index"&&(K.mode=57344),w.insert({filepath:L,stats:K,oid:H}),r&&await r({phase:"Updating workdir",loaded:++S,total:A})})),y=[];for(let I of E)I.status==="rejected"&&(y.push(I.reason),console.error("[isomorphic-git checkout] task rejected:",(T=(P=I.reason)==null?void 0:P.stack)!=null?T:I.reason));if(y.length>0)throw new _a(y)});i&&await i({previousHead:v,newHead:b,type:l!=null&&l.length>0?"file":"branch"})}if(!u){let _=await q.expand({fs:t,gitdir:s,ref:o});_.startsWith("refs/heads")?await q.writeSymbolicRef({fs:t,gitdir:s,ref:"HEAD",value:_}):await q.writeRef({fs:t,gitdir:s,ref:"HEAD",value:b})}}async function $L({fs:t,cache:e,onProgress:r,dir:i,gitdir:n,ref:s,force:a,filepaths:o}){let l=0;return Zn({fs:t,cache:e,dir:i,gitdir:n,trees:[Fr({ref:s}),cu(),tl()],map:async function(c,[u,f,d]){if(c===".")return;if(o&&!o.some(p=>aS(c,p)))return null;switch(r&&await r({phase:"Analyzing workdir",loaded:++l}),[!!d,!!u,!!f].map(Number).join("")){case"000":return;case"001":return a&&o&&o.includes(c)?["delete",c]:void 0;case"010":switch(await u.type()){case"tree":return["mkdir",c];case"blob":return["create",c,await u.oid(),await u.mode()];case"commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`new entry Unhandled type ${await u.type()}`]}case"011":switch(`${await u.type()}-${await f.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",c];case"blob-blob":return await u.oid()!==await f.oid()?a?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]:await u.mode()!==await f.mode()?a?["update",c,await u.oid(),await u.mode(),!0]:["conflict",c]:["create-index",c,await u.oid(),await u.mode()];case"commit-tree":return;case"commit-blob":return["conflict",c];default:return["error",`new entry Unhandled type ${u.type}`]}case"100":return["delete-index",c];case"101":switch(await d.type()){case"tree":return["rmdir-index",c];case"blob":return await d.oid()!==await f.oid()?a?["delete",c]:["conflict",c]:["delete",c];case"commit":return["rmdir-index",c];default:return["error",`delete entry Unhandled type ${await d.type()}`]}case"110":case"111":switch(`${await d.type()}-${await u.type()}`){case"tree-tree":return;case"blob-blob":{if(await d.oid()===await u.oid()&&await d.mode()===await u.mode()&&!a)return;if(f){if(await f.oid()!==await d.oid()&&await f.oid()!==await u.oid())return a?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]}else if(a)return["update",c,await u.oid(),await u.mode(),await u.mode()!==await d.mode()];return await u.mode()!==await d.mode()?["update",c,await u.oid(),await u.mode(),!0]:await u.oid()!==await d.oid()?["update",c,await u.oid(),await u.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",c,await u.oid()];case"blob-tree":return["update-blob-to-tree",c];case"commit-commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`update entry Unhandled type ${await d.type()}-${await u.type()}`]}}},reduce:async function(c,u){return u=QE(u),c?c&&c[0]==="rmdir"?(u.push(c),u):(u.unshift(c),u):u}})}async function FL({index:t,fullpath:e,stats:r,oid:i}){try{t.insert({filepath:e,stats:r,oid:i})}catch(n){console.warn(`Error inserting ${e} into index:`,n)}}async function IL({fs:t,cache:e,gitdir:r,dir:i},[n,s,a,o,l]){let c=`${i}/${s}`;if(n!=="create-index"&&n!=="mkdir-index"){await ou(t,i,s);let{object:f}=await tt({fs:t,cache:e,gitdir:r,oid:a});if(l&&await t.rm(c),o===33188)await t.write(c,f);else if(o===33261)await t.write(c,f,{mode:511});else if(o===40960)await t.writelink(c,f);else throw new he(`Invalid mode 0o${o.toString(8)} detected in blob ${a}`)}let u=await t.lstat(c);return o===33261&&(u.mode=493),n==="mkdir-index"&&(u.mode=57344),[s,a,u]}async function $E(t,e,r,i){let n=[],s=[];for(let a=0;ac());(await Promise.allSettled(o)).forEach(c=>{var u,f;c.status==="fulfilled"?n.push(c.value):(s.push(c.reason),console.error(`[isomorphic-git ${t}] task rejected:`,(f=(u=c.reason)==null?void 0:u.stack)!=null?f:c.reason))}),r&&await r({phase:"Updating workdir",loaded:a+o.length,total:e.length})}if(s.length>0)throw new _a(s);return n}async function oS({fs:t,onProgress:e,onPostCheckout:r,dir:i,gitdir:n=B(i,".git"),remote:s="origin",ref:a,filepaths:o,noCheckout:l=!1,noUpdateHead:c=a===void 0,dryRun:u=!1,force:f=!1,track:d=!0,cache:h={},nonBlocking:p=!1,batchSize:g=100}){try{R("fs",t),R("dir",i),R("gitdir",n);let v=a||"HEAD",b=new J(t),_=await re({fsp:b,dotgit:n});return await Kg({fs:b,cache:h,onProgress:e,onPostCheckout:r,dir:i,gitdir:_,remote:s,ref:v,filepaths:o,noCheckout:l,noUpdateHead:c,dryRun:u,force:f,track:d,nonBlocking:p,batchSize:g})}catch(v){throw v.caller="git.checkout",v}}var $g=/^.*(\r?\n|$)/gm;function ML({branches:t,contents:e}){let r=t[1],i=t[2],n=e[0],s=e[1],a=e[2],o=s.match($g),l=n.match($g),c=a.match($g),u=(0,jE.default)(o,l,c),f=7,d="",h=!0;for(let p of u)p.ok&&(d+=p.ok.join("")),p.conflict&&(h=!1,d+=`${"<".repeat(f)} ${r} +`,d+=p.conflict.a.join(""),d+=`${"=".repeat(f)} +`,d+=p.conflict.b.join(""),d+=`${">".repeat(f)} ${i} +`);return{cleanMerge:h,mergedText:d}}async function lS({fs:t,cache:e,dir:r,gitdir:i=B(r,".git"),index:n,ourOid:s,baseOid:a,theirOid:o,ourName:l="ours",baseName:c="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=Fr({ref:s}),g=Fr({ref:a}),v=Fr({ref:o}),b=[],_=[],C=[],x=[],S=await Zn({fs:t,cache:e,dir:r,gitdir:i,trees:[p,g,v],map:async function(A,[w,E,y]){let P=vd(A),T=await xd(w,E),I=await xd(y,E);switch(`${T}-${I}`){case"false-false":return{mode:await E.mode(),path:P,oid:await E.oid(),type:await E.type()};case"false-true":return!y&&await w.type()==="tree"?{mode:await w.mode(),path:P,oid:await w.oid(),type:await w.type()}:y?{mode:await y.mode(),path:P,oid:await y.oid(),type:await y.type()}:void 0;case"true-false":return!w&&await y.type()==="tree"?{mode:await y.mode(),path:P,oid:await y.oid(),type:await y.type()}:w?{mode:await w.mode(),path:P,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&y&&await w.type()==="tree"&&await y.type()==="tree")return{mode:await w.mode(),path:P,oid:await w.oid(),type:"tree"};if(w&&y&&await w.type()==="blob"&&await y.type()==="blob")return DL({fs:t,gitdir:i,path:P,ours:w,base:E,theirs:y,ourName:l,baseName:c,theirName:u,mergeDriver:h}).then(async L=>{if(L.cleanMerge)d||n.insert({filepath:A,oid:L.mergeResult.oid,stage:0});else if(b.push(A),_.push(A),!d){let H="";E&&await E.type()==="blob"&&(H=await E.oid());let te=await w.oid(),xe=await y.oid();n.delete({filepath:A}),H&&n.insert({filepath:A,oid:H,stage:1}),n.insert({filepath:A,oid:te,stage:2}),n.insert({filepath:A,oid:xe,stage:3})}return L.mergeResult});if(E&&!w&&y&&await E.type()==="blob"&&await y.type()==="blob"){if(b.push(A),C.push(A),!d){let L=await E.oid(),H=await y.oid();n.delete({filepath:A}),n.insert({filepath:A,oid:L,stage:1}),n.insert({filepath:A,oid:H,stage:3})}return{mode:await y.mode(),oid:await y.oid(),type:"blob",path:P}}if(E&&w&&!y&&await E.type()==="blob"&&await w.type()==="blob"){if(b.push(A),x.push(A),!d){let L=await E.oid(),H=await w.oid();n.delete({filepath:A}),n.insert({filepath:A,oid:L,stage:1}),n.insert({filepath:A,oid:H,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:P}}if(E&&!w&&!y&&(await E.type()==="blob"||await E.type()==="tree"))return;throw new Yo}}},reduce:b.length!==0&&(!r||d)?void 0:async(A,w)=>{let E=w.filter(Boolean);if(A&&!(A&&A.type==="tree"&&E.length===0&&A.path!==".")){if(E.length>0||A.path==="."&&E.length===0){let P=new Mr(E).toObject(),T=await Or({fs:t,gitdir:i,type:"tree",object:P,dryRun:f});A.oid=T}return A}}});return b.length!==0?(r&&!d&&await Zn({fs:t,cache:e,dir:r,gitdir:i,trees:[Fr({ref:S.oid})],map:async function(A,[w]){let E=`${r}/${A}`;if(await w.type()==="blob"){let y=await w.mode(),P=await w.content();await t.write(E,P,{mode:y})}return!0}}),new ba(b,_,C,x)):S.oid}async function DL({fs:t,gitdir:e,path:r,ours:i,base:n,theirs:s,ourName:a,theirName:o,baseName:l,dryRun:c,mergeDriver:u=ML}){let f="blob",d="100755",h="",p="";n&&await n.type()==="blob"&&(d=await n.mode(),h=await n.oid(),p=k.from(await n.content()).toString("utf8"));let g=d===await i.mode()?await s.mode():await i.mode();if(await i.oid()===await s.oid())return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await i.oid(),type:f}};if(await i.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await s.oid(),type:f}};if(await s.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await i.oid(),type:f}};let v=k.from(await i.content()).toString("utf8"),b=k.from(await s.content()).toString("utf8"),{mergedText:_,cleanMerge:C}=await u({branches:[l,a,o],contents:[p,v,b],path:r}),x=await Or({fs:t,gitdir:e,type:"blob",object:k.from(_,"utf8"),dryRun:c});return{cleanMerge:C,mergeResult:{mode:g,path:r,oid:x,type:f}}}var OL={stage:tl,workdir:cu},Fg;async function Qo(t,e){return Fg===void 0&&(Fg=new Vo.default),Fg.acquire(t,e)}async function LL(t,e,r,i,n=null){let s=B(r,i),a=await t.lstat(s);if(!a)throw new Ve(s);if(a.isDirectory())throw new he(`${s}: file expected, but found directory`);let o=n?await ZE({fs:t,gitdir:e,oid:n}):void 0,l=o?n:void 0;return o||await Qo({fs:t,gitdir:e,currentFilepath:s},async()=>{let c=a.isSymbolicLink()?await t.readlink(s).then(eS):await t.read(s);if(c===null)throw new Ve(s);l=await Or({fs:t,gitdir:e,type:"blob",object:c})}),l}async function NL({fs:t,dir:e,gitdir:r,entries:i}){async function n(s){if(s.type==="tree"){if(!s.oid){let a=await Promise.all(s.children.map(n));s.oid=await du({fs:t,gitdir:r,tree:a}),s.mode=16384}}else s.type==="blob"&&(s.oid=await LL(t,r,e,s.path,s.oid),s.mode=33188);return s.path=s.path.split("/").pop(),s}return Promise.all(i.map(n))}async function FE({fs:t,dir:e,gitdir:r,treePair:i}){let n=i[1]==="stage",s=i.map(h=>typeof h=="string"?OL[h]():h),a=[],u=await Zn({fs:t,cache:{},dir:e,gitdir:r,trees:s,map:async(h,[p,g])=>{if(!(h==="."||await Is.isIgnored({fs:t,dir:e,gitdir:r,filepath:h}))&&g)return(!p||await p.oid()!==await g.oid()&&await g.oid()!==void 0)&&a.push([p,g]),{mode:await g.mode(),path:h,oid:await g.oid(),type:await g.type()}},reduce:async(h,p)=>(p=p.filter(Boolean),h?(h.children=p,h):p.length>0?p:void 0),iterate:async(h,p)=>{let g=[];for(let v of p){let[b,_]=v;n?_&&(await t.exists(`${e}/${_.toString()}`)?g.push(v):a.push([null,_])):b&&(_?g.push(v):a.push([b,null]))}return g.length?Promise.all(g.map(h)):[]}});if(a.length===0||u.length===0)return null;let d=(await NL({fs:t,dir:e,gitdir:r,entries:u})).filter(Boolean).map(h=>({mode:h.mode,path:h.path,oid:h.oid,type:h.type}));return du({fs:t,gitdir:r,tree:d})}async function cS({fs:t,dir:e,gitdir:r,stashCommit:i,parentCommit:n,wasStaged:s}){let a=[],o=[],l=await Zn({fs:t,cache:{},dir:e,gitdir:r,trees:[Fr({ref:n}),Fr({ref:i})],map:async(c,[u,f])=>{if(c==="."||await Is.isIgnored({fs:t,dir:e,gitdir:r,filepath:c}))return;let d=f?await f.type():await u.type();if(d!=="tree"&&d!=="blob")return;if(!f&&u){let p=d==="tree"?"rmdir":"rm";return d==="tree"&&a.push(c),d==="blob"&&s&&o.push({filepath:c,oid:await u.oid()}),{method:p,filepath:c}}let h=await f.oid();if(!u||await u.oid()!==h)return d==="tree"?{method:"mkdir",filepath:c}:(s&&o.push({filepath:c,oid:h,stats:await t.lstat(B(e,c))}),{method:"write",filepath:c,oid:h})}});await Qo({fs:t,gitdir:r,dirRemoved:a,ops:l},async()=>{for(let c of l){let u=B(e,c.filepath);switch(c.method){case"rmdir":await t.rmdir(u);break;case"mkdir":await ou(t,e,c.filepath),await t.mkdir(u);break;case"rm":await t.rm(u);break;case"write":if(!a.some(f=>u.startsWith(f))){await ou(t,e,c.filepath);let{object:f}=await tt({fs:t,cache:{},gitdir:r,oid:c.oid});await t.exists(u)&&await t.rm(u),await t.write(u,f)}break}}}),await dt.acquire({fs:t,gitdir:r,cache:{}},async c=>{o.forEach(({filepath:u,stats:f,oid:d})=>{c.insert({filepath:u,stats:f,oid:d})})})}async function IE({fs:t,cache:e,dir:r,gitdir:i,oid:n,dryRun:s=!1,noUpdateBranch:a=!1,abortOnConflict:o=!0,committer:l,mergeDriver:c}){let{commit:u,oid:f}=await wn({fs:t,cache:e,gitdir:i,oid:n});if(u.parent.length>1)throw new Wc(f,u.parent.length);if(u.parent.length===0)throw new qc(f);let d=await q.resolve({fs:t,gitdir:i,ref:"HEAD"}),{commit:h}=await wn({fs:t,cache:e,gitdir:i,oid:d}),p=u.parent[0],{commit:g}=await wn({fs:t,cache:e,gitdir:i,oid:p}),v=await dt.acquire({fs:t,gitdir:i,cache:e,allowUnmerged:!1},async _=>lS({fs:t,cache:e,dir:r,gitdir:i,index:_,ourOid:h.tree,baseOid:g.tree,theirOid:u.tree,ourName:"HEAD",baseName:`parent of ${f.slice(0,7)}`,theirName:f.slice(0,7),dryRun:s,abortOnConflict:o,mergeDriver:c}));if(v instanceof ba)throw v;let b=await uu({fs:t,cache:e,gitdir:i,message:u.message,tree:v,parent:[d],author:u.author,committer:l,dryRun:s,noUpdateBranch:a});return r&&!s&&!a&&await cS({fs:t,dir:r,gitdir:i,stashCommit:b,parentCommit:d,wasStaged:!0}),b}async function BL({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,cache:n={},committer:s,dryRun:a=!1,noUpdateBranch:o=!1,abortOnConflict:l=!0,mergeDriver:c}){try{R("fs",t),R("gitdir",r),R("oid",i);let u=new J(t),f=await re({fsp:u,dotgit:r}),{commit:d}=await wn({fs:u,cache:n,gitdir:f,oid:i});if(d.parent&&d.parent.length>1)return await IE({fs:u,cache:n,dir:e,gitdir:f,oid:i,dryRun:a,noUpdateBranch:o,abortOnConflict:l,committer:void 0,mergeDriver:c});let h=await xa({fs:u,gitdir:f,committer:s});if(!h)throw new Kt("committer");return await IE({fs:u,cache:n,dir:e,gitdir:f,oid:i,dryRun:a,noUpdateBranch:o,abortOnConflict:l,committer:h,mergeDriver:c})}catch(u){throw u.caller="git.cherryPick",u}}var HL=/^refs\/(heads\/|tags\/|remotes\/)?(.*)/;function ga(t){let e=HL.exec(t);return e?e[1]==="remotes/"&&t.endsWith("/HEAD")?e[2].slice(0,-5):e[2]:t}async function Ds({fs:t,gitdir:e,fullname:r=!1,test:i=!1}){let n=await q.resolve({fs:t,gitdir:e,ref:"HEAD",depth:2});if(i)try{await q.resolve({fs:t,gitdir:e,ref:n})}catch(s){return}if(n.startsWith("refs/"))return r?n:ga(n)}function UL(t){return t=t.replace(/^git@([^:]+):/,"https://$1/"),t=t.replace(/^ssh:\/\//,"https://"),t}function uS({username:t="",password:e=""}){return`Basic ${k.from(`${t}:${e}`).toString("base64")}`}async function hu(t,e){let r=KE(t);for(;;){let{value:i,done:n}=await r.next();if(i&&await e(i),n)break}r.return&&r.return()}async function Ed(t){let e=0,r=[];await hu(t,s=>{r.push(s),e+=s.byteLength});let i=new Uint8Array(e),n=0;for(let s of r)i.set(s,n),n+=s.byteLength;return i}function ME(t){let e=t.match(/^https?:\/\/([^/]+)@/);if(e==null)return{url:t,auth:{}};e=e[1];let[r,i]=e.split(":");return t=t.replace(`${e}@`,""),{url:t,auth:{username:r,password:i}}}function qg(t,e){let r=e.toString(16);return"0".repeat(t-r.length)+r}var ot=class{static flush(){return k.from("0000","utf8")}static delim(){return k.from("0001","utf8")}static encode(e){typeof e=="string"&&(e=k.from(e));let r=e.length+4,i=qg(4,r);return k.concat([k.from(i,"utf8"),e])}static streamReader(e){let r=new _d(e);return async function(){try{let n=await r.read(4);if(n==null)return!0;if(n=parseInt(n.toString("utf8"),16),n===0||n===1)return null;let s=await r.read(n-4);return s==null?!0:s}catch(n){return e.error=n,!0}}}};async function DE(t){let e={},r;for(;r=await t(),r!==!0;){if(r===null)continue;r=r.toString("utf8").replace(/\n$/,"");let i=r.indexOf("=");if(i>-1){let n=r.slice(0,i),s=r.slice(i+1);e[n]=s}else e[r]=!0}return{protocolVersion:2,capabilities2:e}}async function OE(t,{service:e}){let r=new Set,i=new Map,n=new Map,s=ot.streamReader(t),a=await s();for(;a===null;)a=await s();if(a===!0)throw new Kc;if(a.includes("version 2"))return DE(s);if(a.toString("utf8").replace(/\n$/,"")!==`# service=${e}`)throw new ya(`# service=${e}\\n`,a.toString("utf8"));let o=await s();for(;o===null;)o=await s();if(o===!0)return{capabilities:r,refs:i,symrefs:n};if(o=o.toString("utf8"),o.includes("version 2"))return DE(s);let[l,c]=Ig(o,"\0","\\x00");if(c.split(" ").map(u=>r.add(u)),l!=="0000000000000000000000000000000000000000 capabilities^{}"){let[u,f]=Ig(l," "," ");for(i.set(f,u);;){let d=await s();if(d===!0)break;if(d!==null){let[h,p]=Ig(d.toString("utf8")," "," ");i.set(p,h)}}}for(let u of r)if(u.startsWith("symref=")){let f=u.match(/symref=([^:]+):(.*)/);f.length===3&&n.set(f[1],f[2])}return{protocolVersion:1,capabilities:r,refs:i,symrefs:n}}function Ig(t,e,r){let i=t.trim().split(e);if(i.length!==2)throw new ya(`Two strings separated by '${r}'`,t.toString("utf8"));return i}var LE=(t,e)=>t.endsWith("?")?`${t}${e}`:`${t}/${e.replace(/^https?:\/\//,"")}`,NE=(t,e)=>{(e.username||e.password)&&(t.Authorization=uS(e)),e.headers&&Object.assign(t,e.headers)},Mg=async t=>{try{let e=k.from(await Ed(t.body)),r=e.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:e}}catch(e){return{}}},Jo=class{static async capabilities(){return["discover","connect"]}static async discover({http:e,onProgress:r,onAuth:i,onAuthSuccess:n,onAuthFailure:s,corsProxy:a,service:o,url:l,headers:c,protocolVersion:u}){let{url:f,auth:d}=ME(l),h=a?LE(a,f):f;(d.username||d.password)&&(c.Authorization=uS(d)),u===2&&(c["Git-Protocol"]="version=2");let p,g,v=!1;do if(p=await e.request({onProgress:r,method:"GET",url:`${h}/info/refs?service=${o}`,headers:c}),g=!1,p.statusCode===401||p.statusCode===203){let b=v?s:i;if(b){if(d=await b(f,{...d,headers:{...c}}),d&&d.cancel)throw new Ko;d&&(NE(c,d),v=!0,g=!0)}}else p.statusCode===200&&v&&n&&await n(f,d);while(g);if(p.statusCode!==200){let{response:b}=await Mg(p);throw new qo(p.statusCode,p.statusMessage,b)}if(p.headers["content-type"]===`application/x-${o}-advertisement`){let b=await OE(p.body,{service:o});return b.auth=d,b}else{let{preview:b,response:_,data:C}=await Mg(p);try{let x=await OE([C],{service:o});return x.auth=d,x}catch(x){throw new eu(b,_)}}}static async connect({http:e,onProgress:r,corsProxy:i,service:n,url:s,auth:a,body:o,headers:l}){let c=ME(s);c&&(s=c.url),i&&(s=LE(i,s)),l["content-type"]=`application/x-${n}-request`,l.accept=`application/x-${n}-result`,NE(l,a);let u=await e.request({onProgress:r,method:"POST",url:`${s}/${n}`,body:o,headers:l});if(u.statusCode!==200){let{response:f}=Mg(u);throw new qo(u.statusCode,u.statusMessage,f)}return u}},el=class{static getRemoteHelperFor({url:e}){let r=new Map;r.set("http",Jo),r.set("https",Jo);let i=GL({url:e});if(!i)throw new ru(e);if(r.has(i.transport))return r.get(i.transport);throw new tu(e,i.transport,i.transport==="ssh"?UL(e):void 0)}};function GL({url:t}){if(t.startsWith("git@"))return{transport:"ssh",address:t};let e=t.match(/(\w+)(:\/\/|::)(.*)/);if(e!==null){if(e[2]==="://")return{transport:e[1],address:e[0]};if(e[2]==="::")return{transport:e[1],address:e[3]}}}var ma=null,Ea=class{static async read({fs:e,gitdir:r}){ma===null&&(ma=new Vo.default);let i=B(r,"shallow"),n=new Set;return await ma.acquire(i,async function(){let s=await e.read(i,{encoding:"utf8"});if(s===null||s.trim()==="")return n;s.trim().split(` +`).map(a=>n.add(a))}),n}static async write({fs:e,gitdir:r,oids:i}){ma===null&&(ma=new Vo.default);let n=B(r,"shallow");if(i.size>0){let s=[...i].join(` +`)+` +`;await ma.acquire(n,async function(){await e.write(n,s,{encoding:"utf8"})})}else await ma.acquire(n,async function(){await e.rm(n)})}};async function jL({fs:t,gitdir:e,oid:r}){let i=`objects/${r.slice(0,2)}/${r.slice(2)}`;return t.exists(`${e}/${i}`)}async function VL({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:n}){let s=await t.readdir(B(r,"objects/pack"));s=s.filter(a=>a.endsWith(".idx"));for(let a of s){let o=`${r}/objects/pack/${a}`,l=await Zg({fs:t,cache:e,filename:o,getExternalRefDelta:n});if(l.error)throw new he(l.error);if(l.offsets.has(i))return!0}return!1}async function BE({fs:t,cache:e,gitdir:r,oid:i,format:n="content"}){let s=o=>tt({fs:t,cache:e,gitdir:r,oid:o}),a=await jL({fs:t,gitdir:r,oid:i});return a||(a=await VL({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:s})),a}function Sd({config:t,onAuth:e}){return e&&(async(r,i)=>{let n=i.username||await t.get(`credential.${r}.username`);return e(r,n?{...i,username:n}:i)})}function zL(t){let n="5041434b"+"00000002"+"00000000";return t.slice(0,12).toString("hex")===n}function fS(t,e){let r=t.map(i=>i.split("=",1)[0]);return e.filter(i=>{let n=i.split("=",1)[0];return r.includes(n)})}var Rd={name:"isomorphic-git",version:"1.40.0",agent:"git/isomorphic-git@1.40.0"},jo=class{constructor(){this._queue=[]}write(e){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:e})}else this._queue.push(e)}end(){if(this._ended=!0,this._waiting){let e=this._waiting;this._waiting=null,e({done:!0})}}destroy(e){this.error=e,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(e=>{this._waiting=e})}};function WL(t){let e=t.indexOf("\r"),r=t.indexOf(` +`);return e===-1&&r===-1?-1:e===-1?r+1:r===-1?e+1:r===e+1?r+1:Math.min(e,r)+1}function dS(t){let e=new jo,r="";return(async()=>(await hu(t,i=>{for(i=i.toString("utf8"),r+=i;;){let n=WL(r);if(n===-1)break;e.write(r.slice(0,n)),r=r.slice(n)}}),r.length>0&&e.write(r),e.end()))(),e}var kd=class{static demux(e){let r=ot.streamReader(e),i=new jo,n=new jo,s=new jo,a=async function(){let o=await r();if(o===null)return a();if(o===!0){i.end(),s.end(),e.error?n.destroy(e.error):n.end();return}switch(o[0]){case 1:{n.write(o.slice(1));break}case 2:{s.write(o.slice(1));break}case 3:{let l=o.slice(1);s.write(l),i.end(),s.end(),n.destroy(new Error(l.toString("utf8")));return}default:i.write(o)}a()};return a(),{packetlines:i,packfile:n,progress:s}}};async function qL(t){let{packetlines:e,packfile:r,progress:i}=kd.demux(t),n=[],s=[],a=[],o=!1,l=!1;return new Promise((c,u)=>{hu(e,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new Rs(h)),n.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new Rs(h)),s.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");a.push({oid:h,status:p}),p||(l=!0)}else d.startsWith("NAK")?(o=!0,l=!0):(l=!0,o=!0);l&&(t.error?u(t.error):c({shallows:n,unshallows:s,acks:a,nak:o,packfile:r,progress:i}))}).finally(()=>{l||(t.error?u(t.error):c({shallows:n,unshallows:s,acks:a,nak:o,packfile:r,progress:i}))})})}function YL({capabilities:t=[],wants:e=[],haves:r=[],shallows:i=[],depth:n=null,since:s=null,exclude:a=[]}){let o=[];e=[...new Set(e)];let l=` ${t.join(" ")}`;for(let c of e)o.push(ot.encode(`want ${c}${l} +`)),l="";for(let c of i)o.push(ot.encode(`shallow ${c} +`));n!==null&&o.push(ot.encode(`deepen ${n} +`)),s!==null&&o.push(ot.encode(`deepen-since ${Math.floor(s.valueOf()/1e3)} +`));for(let c of a)o.push(ot.encode(`deepen-not ${c} +`));o.push(ot.flush());for(let c of r)o.push(ot.encode(`have ${c} +`));return o.push(ot.encode(`done +`)),o}async function Xg({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,gitdir:l,ref:c,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:g=null,exclude:v=[],relative:b=!1,tags:_=!1,singleBranch:C=!1,headers:x={},prune:S=!1,pruneTags:A=!1}){let w=c||await Ds({fs:t,gitdir:l,test:!0}),E=await ht.get({fs:t,gitdir:l}),y=f||w&&await E.get(`branch.${w}.remote`)||"origin",P=d||await E.get(`remote.${y}.url`);if(typeof P=="undefined")throw new Ir("remote OR url");let T=u||w&&await E.get(`branch.${w}.merge`)||c||"HEAD";h===void 0&&(h=await E.get("http.corsProxy"));let I=el.getRemoteHelperFor({url:P}),L=await I.discover({http:r,onAuth:Sd({config:E,onAuth:s}),onAuthSuccess:a,onAuthFailure:Sd({config:E,onAuth:o}),corsProxy:h,service:"git-upload-pack",url:P,headers:x,protocolVersion:1}),H=L.auth,te=L.refs;if(te.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!L.capabilities.has("shallow"))throw new Ps("shallow","depth");if(g!==null&&!L.capabilities.has("deepen-since"))throw new Ps("deepen-since","since");if(v.length>0&&!L.capabilities.has("deepen-not"))throw new Ps("deepen-not","exclude");if(b===!0&&!L.capabilities.has("deepen-relative"))throw new Ps("deepen-relative","relative");let{oid:xe,fullref:Z}=q.resolveAgainstMap({ref:T,map:te});for(let N of te.keys())N===Z||N==="HEAD"||N.startsWith("refs/heads/")||_&&N.startsWith("refs/tags/")||te.delete(N);let K=fS([...L.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${Rd.agent}`]);b&&K.push("deepen-relative");let ce=C?[xe]:te.values(),pe=C?[w]:await q.listRefs({fs:t,gitdir:l,filepath:"refs"}),W=[];for(let N of pe)try{N=await q.expand({fs:t,gitdir:l,ref:N});let O=await q.resolve({fs:t,gitdir:l,ref:N});await BE({fs:t,cache:e,gitdir:l,oid:O})&&W.push(O)}catch(O){}W=[...new Set(W)];let X=await Ea.read({fs:t,gitdir:l}),G=L.capabilities.has("shallow")?[...X]:[],Be=YL({capabilities:K,wants:ce,haves:W,shallows:G,depth:p,since:g,exclude:v}),pr=k.from(await Ed(Be)),Ut=await I.connect({http:r,onProgress:i,corsProxy:h,service:"git-upload-pack",url:P,auth:H,body:[pr],headers:x}),Ie=await qL(Ut.body);Ut.headers&&(Ie.headers=Ut.headers);for(let N of Ie.shallows)if(!X.has(N))try{let{object:O}=await tt({fs:t,cache:e,gitdir:l,oid:N}),ue=new Dr(O),$e=await Promise.all(ue.headers().parent.map(Tr=>BE({fs:t,cache:e,gitdir:l,oid:Tr})));$e.length===0||$e.every(Tr=>Tr)||X.add(N)}catch(O){X.add(N)}for(let N of Ie.unshallows)X.delete(N);if(await Ea.write({fs:t,gitdir:l,oids:X}),C){let N=new Map([[Z,xe]]),O=new Map,ue=10,$e=Z;for(;ue--;){let go=L.symrefs.get($e);if(go===void 0)break;O.set($e,go),$e=go}let Gt=te.get($e);Gt&&N.set($e,Gt);let{pruned:Tr}=await q.updateRemoteRefs({fs:t,gitdir:l,remote:y,refs:N,symrefs:O,tags:_,prune:S});S&&(Ie.pruned=Tr)}else{let{pruned:N}=await q.updateRemoteRefs({fs:t,gitdir:l,remote:y,refs:te,symrefs:L.symrefs,tags:_,prune:S,pruneTags:A});S&&(Ie.pruned=N)}if(Ie.HEAD=L.symrefs.get("HEAD"),Ie.HEAD===void 0){let{oid:N}=q.resolveAgainstMap({ref:"HEAD",map:te});for(let[O,ue]of te.entries())if(O!=="HEAD"&&ue===N){Ie.HEAD=O;break}}let Rt=Z.startsWith("refs/tags")?"tag":"branch";if(Ie.FETCH_HEAD={oid:xe,description:`${Rt} '${ga(Z)}' of ${P}`},i||n){let N=dS(Ie.progress);hu(N,async O=>{if(n&&await n(O),i){let ue=O.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);ue&&await i({phase:ue[1].trim(),loaded:parseInt(ue[2],10),total:parseInt(ue[3],10)})}})}let $t=k.from(await Ed(Ie.packfile));if(Ut.body.error)throw Ut.body.error;let Xe=$t.slice(-20).toString("hex"),ee={defaultBranch:Ie.HEAD,fetchHead:Ie.FETCH_HEAD.oid,fetchHeadDescription:Ie.FETCH_HEAD.description};if(Ie.headers&&(ee.headers=Ie.headers),S&&(ee.pruned=Ie.pruned),Xe!==""&&!zL($t)){ee.packfile=`objects/pack/pack-${Xe}.pack`;let N=B(l,ee.packfile);await t.write(N,$t);let O=$e=>tt({fs:t,cache:e,gitdir:l,oid:$e}),ue=await jc.fromPack({pack:$t,getExternalRefDelta:O,onProgress:i});await t.write(N.replace(/\.pack$/,".idx"),await ue.toBuffer())}return ee}async function hS({fs:t,bare:e=!1,dir:r,gitdir:i=e?r:B(r,".git"),defaultBranch:n="master"}){if(await t.exists(i+"/config"))return;let s=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];s=s.map(a=>i+"/"+a);for(let a of s)await t.mkdir(a);await t.write(i+"/config",`[core] + repositoryformatversion = 0 + filemode = false + bare = ${e} +`+(e?"":` logallrefupdates = true +`)+` symlinks = false + ignorecase = true +`),await t.write(i+"/HEAD",`ref: refs/heads/${n} +`)}async function ZL({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,onPostCheckout:l,dir:c,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:g,since:v,exclude:b,relative:_,singleBranch:C,noCheckout:x,noTags:S,headers:A,nonBlocking:w,batchSize:E=100}){try{if(await hS({fs:t,gitdir:u}),await sS({fs:t,gitdir:u,remote:p,url:f,force:!1}),d){let T=await ht.get({fs:t,gitdir:u});await T.set("http.corsProxy",d),await ht.save({fs:t,gitdir:u,config:T})}let{defaultBranch:y,fetchHead:P}=await Xg({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:g,since:v,exclude:b,relative:_,singleBranch:C,headers:A,tags:!S});if(P===null)return;h=h||y,h=h.replace("refs/heads/",""),await Kg({fs:t,cache:e,onProgress:i,onPostCheckout:l,dir:c,gitdir:u,ref:h,remote:p,noCheckout:x,nonBlocking:w,batchSize:E})}catch(y){throw await t.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),y}}async function KL({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPostCheckout:o,dir:l,gitdir:c=B(l,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:g=void 0,exclude:v=[],relative:b=!1,singleBranch:_=!1,noCheckout:C=!1,noTags:x=!1,headers:S={},cache:A={},nonBlocking:w=!1,batchSize:E=100}){try{R("fs",t),R("http",e),R("gitdir",c),C||R("dir",l),R("url",u);let y=new J(t),P=await re({fsp:y,dotgit:c});return await ZL({fs:y,cache:A,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPostCheckout:o,dir:l,gitdir:P,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:g,exclude:v,relative:b,singleBranch:_,noCheckout:C,noTags:x,headers:S,nonBlocking:w,batchSize:E})}catch(y){throw y.caller="git.clone",y}}async function XL({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),message:n,author:s,committer:a,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,disallowEmpty:f=!1,ref:d,parent:h,tree:p,cache:g={}}){try{R("fs",t),l||R("message",n),o&&R("onSign",e);let v=new J(t),b=await re({fsp:v,dotgit:i});return await uu({fs:v,cache:g,onSign:e,gitdir:b,message:n,author:s,committer:a,signingKey:o,amend:l,dryRun:c,noUpdateBranch:u,disallowEmpty:f,ref:d,parent:h,tree:p})}catch(v){throw v.caller="git.commit",v}}async function QL({fs:t,dir:e,gitdir:r=B(e,".git"),fullname:i=!1,test:n=!1}){try{R("fs",t),R("gitdir",r);let s=new J(t),a=await re({fsp:s,dotgit:r});return await Ds({fs:s,gitdir:a,fullname:i,test:n})}catch(s){throw s.caller="git.currentBranch",s}}async function JL({fs:t,gitdir:e,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await q.exists({fs:t,gitdir:e,ref:r}))throw new Ve(r);let n=await q.expand({fs:t,gitdir:e,ref:r}),s=await Ds({fs:t,gitdir:e,fullname:!0});if(n===s){let l=await q.resolve({fs:t,gitdir:e,ref:n});await q.writeRef({fs:t,gitdir:e,ref:"HEAD",value:l})}await q.deleteRef({fs:t,gitdir:e,ref:n});let a=ga(r),o=await ht.get({fs:t,gitdir:e});await o.deleteSection("branch",a),await ht.save({fs:t,gitdir:e,config:o})}async function eN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i}){try{R("fs",t),R("ref",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await JL({fs:n,gitdir:s,ref:i})}catch(n){throw n.caller="git.deleteBranch",n}}async function tN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i}){try{R("fs",t),R("ref",i);let n=new J(t),s=await re({fsp:n,dotgit:r});await q.deleteRef({fs:n,gitdir:s,ref:i})}catch(n){throw n.caller="git.deleteRef",n}}async function rN({fs:t,gitdir:e,remote:r}){let i=await ht.get({fs:t,gitdir:e});await i.deleteSection("remote",r),await ht.save({fs:t,gitdir:e,config:i})}async function iN({fs:t,dir:e,gitdir:r=B(e,".git"),remote:i}){try{R("fs",t),R("remote",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await rN({fs:n,gitdir:s,remote:i})}catch(n){throw n.caller="git.deleteRemote",n}}async function nN({fs:t,gitdir:e,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await q.deleteRef({fs:t,gitdir:e,ref:r})}async function sN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i}){try{R("fs",t),R("ref",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await nN({fs:n,gitdir:s,ref:i})}catch(n){throw n.caller="git.deleteTag",n}}async function aN({fs:t,gitdir:e,oid:r}){let i=r.slice(0,2);return(await t.readdir(`${e}/objects/${i}`)).map(s=>`${i}${s}`).filter(s=>s.startsWith(r))}async function oN({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:n}){let s=[],a=await t.readdir(B(r,"objects/pack"));a=a.filter(o=>o.endsWith(".idx"));for(let o of a){let l=`${r}/objects/pack/${o}`,c=await Zg({fs:t,cache:e,filename:l,getExternalRefDelta:n});if(c.error)throw new he(c.error);for(let u of c.offsets.keys())u.startsWith(i)&&s.push(u)}return s}async function lN({fs:t,cache:e,gitdir:r,oid:i}){let n=o=>tt({fs:t,cache:e,gitdir:r,oid:o}),s=await aN({fs:t,gitdir:r,oid:i}),a=await oN({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:n});for(let o of a)s.indexOf(o)===-1&&s.push(o);if(s.length===1)return s[0];throw s.length>1?new Vc("oids",i,s):new Ve(`an object matching "${i}"`)}async function cN({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await lN({fs:s,cache:n,gitdir:a,oid:i})}catch(s){throw s.caller="git.expandOid",s}}async function uN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i}){try{R("fs",t),R("gitdir",r),R("ref",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await q.expand({fs:n,gitdir:s,ref:i})}catch(n){throw n.caller="git.expandRef",n}}async function Qg({fs:t,cache:e,gitdir:r,oids:i}){let n={},s=i.length,a=i.map((o,l)=>({index:l,oid:o}));for(;a.length;){let o=new Set;for(let{oid:c,index:u}of a)n[c]||(n[c]=new Set),n[c].add(u),n[c].size===s&&o.add(c);if(o.size>0)return[...o];let l=new Map;for(let{oid:c,index:u}of a)try{let{object:f}=await tt({fs:t,cache:e,gitdir:r,oid:c}),d=Dr.from(f),{parent:h}=d.parseHeaders();for(let p of h)(!n[p]||!n[p].has(u))&&l.set(p+":"+u,{oid:p,index:u})}catch(f){}a=Array.from(l.values())}return[]}async function pS({fs:t,cache:e,dir:r,gitdir:i,ours:n,theirs:s,fastForward:a=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,onSign:g,mergeDriver:v,allowUnrelatedHistories:b=!1}){n===void 0&&(n=await Ds({fs:t,gitdir:i,fullname:!0})),n=await q.expand({fs:t,gitdir:i,ref:n}),s=await q.expand({fs:t,gitdir:i,ref:s});let _=await q.resolve({fs:t,gitdir:i,ref:n}),C=await q.resolve({fs:t,gitdir:i,ref:s}),x=await Qg({fs:t,cache:e,gitdir:i,oids:[_,C]});if(x.length!==1)if(x.length===0&&b)x.push("4b825dc642cb6eb9a060e54bf8d69288fbee4904");else throw new Yo;let S=x[0];if(S===C)return{oid:_,alreadyMerged:!0};if(a&&S===_)return!l&&!c&&await q.writeRef({fs:t,gitdir:i,ref:n,value:C}),{oid:C,fastForward:!0};{if(o)throw new Xc;let A=await dt.acquire({fs:t,gitdir:i,cache:e,allowUnmerged:!1},async E=>lS({fs:t,cache:e,dir:r,gitdir:i,index:E,ourOid:_,theirOid:C,baseOid:S,ourName:ga(n),baseName:"base",theirName:ga(s),dryRun:l,abortOnConflict:u,mergeDriver:v}));if(A instanceof ba)throw A;return f||(f=`Merge branch '${ga(s)}' into ${ga(n)}`),{oid:await uu({fs:t,cache:e,gitdir:i,message:f,ref:n,tree:A,parent:[_,C],author:d,committer:h,signingKey:p,onSign:g,dryRun:l,noUpdateBranch:c}),tree:A,mergeCommit:!0}}}async function mS({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,dir:l,gitdir:c,ref:u,url:f,remote:d,remoteRef:h,prune:p,pruneTags:g,fastForward:v,fastForwardOnly:b,corsProxy:_,singleBranch:C,headers:x,author:S,committer:A,signingKey:w}){try{if(!u){let P=await Ds({fs:t,gitdir:c});if(!P)throw new Ir("ref");u=P}let{fetchHead:E,fetchHeadDescription:y}=await Xg({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,gitdir:c,corsProxy:_,ref:u,url:f,remote:d,remoteRef:h,singleBranch:C,headers:x,prune:p,pruneTags:g});await pS({fs:t,cache:e,gitdir:c,ours:u,theirs:E,fastForward:v,fastForwardOnly:b,message:`Merge ${y}`,author:S,committer:A,signingKey:w,dryRun:!1,noUpdateBranch:!1}),await Kg({fs:t,cache:e,onProgress:i,dir:l,gitdir:c,ref:u,remote:d,noCheckout:!1})}catch(E){throw E.caller="git.pull",E}}async function fN({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,dir:o,gitdir:l=B(o,".git"),ref:c,url:u,remote:f,remoteRef:d,corsProxy:h,singleBranch:p,headers:g={},cache:v={}}){try{R("fs",t),R("http",e),R("gitdir",l);let b={name:"",email:"",timestamp:Date.now(),timezoneOffset:0},_=new J(t),C=await re({fsp:_,dotgit:l});return await mS({fs:_,cache:v,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,dir:o,gitdir:C,ref:c,url:u,remote:f,remoteRef:d,fastForwardOnly:!0,corsProxy:h,singleBranch:p,headers:g,author:b,committer:b})}catch(b){throw b.caller="git.fastForward",b}}async function dN({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,dir:o,gitdir:l=B(o,".git"),ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p=null,since:g=null,exclude:v=[],relative:b=!1,tags:_=!1,singleBranch:C=!1,headers:x={},prune:S=!1,pruneTags:A=!1,cache:w={}}){try{R("fs",t),R("http",e),R("gitdir",l);let E=new J(t),y=await re({fsp:E,dotgit:l});return await Xg({fs:E,cache:w,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,gitdir:y,ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p,since:g,exclude:v,relative:b,tags:_,singleBranch:C,headers:x,prune:S,pruneTags:A})}catch(E){throw E.caller="git.fetch",E}}async function hN({fs:t,dir:e,gitdir:r=B(e,".git"),oids:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("oids",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await Qg({fs:s,cache:n,gitdir:a,oids:i})}catch(s){throw s.caller="git.findMergeBase",s}}async function gS({fs:t,filepath:e}){if(await t.exists(B(e,".git")))return e;{let r=wa(e);if(r===e)throw new Ve(`git root for ${e}`);return gS({fs:t,filepath:r})}}async function pN({fs:t,filepath:e}){try{return R("fs",t),R("filepath",e),await gS({fs:new J(t),filepath:e})}catch(r){throw r.caller="git.findRoot",r}}async function mN({fs:t,dir:e,gitdir:r=B(e,".git"),path:i}){try{R("fs",t),R("gitdir",r),R("path",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await su({fs:n,gitdir:s,path:i})}catch(n){throw n.caller="git.getConfig",n}}async function gN({fs:t,gitdir:e,path:r}){return(await ht.get({fs:t,gitdir:e})).getall(r)}async function vN({fs:t,dir:e,gitdir:r=B(e,".git"),path:i}){try{R("fs",t),R("gitdir",r),R("path",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await gN({fs:n,gitdir:s,path:i})}catch(n){throw n.caller="git.getConfigAll",n}}async function wN({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,url:s,headers:a={},forPush:o=!1}){try{R("http",t),R("url",s);let c=await el.getRemoteHelperFor({url:s}).discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,service:o?"git-receive-pack":"git-upload-pack",url:s,headers:a,protocolVersion:1}),u={capabilities:[...c.capabilities]};for(let[f,d]of c.refs){let h=f.split("/"),p=h.pop(),g=u;for(let v of h)g[v]=g[v]||{},g=g[v];g[p]=d}for(let[f,d]of c.symrefs){let h=f.split("/"),p=h.pop(),g=u;for(let v of h)g[v]=g[v]||{},g=g[v];g[p]=d}return u}catch(l){throw l.caller="git.getRemoteInfo",l}}function vS(t,e,r,i){let n=[];for(let[s,a]of t.refs){if(e&&!s.startsWith(e))continue;if(s.endsWith("^{}")){if(i){let l=s.replace("^{}",""),c=n[n.length-1],u=c.ref===l?c:n.find(f=>f.ref===l);if(u===void 0)throw new Error("I did not expect this to happen");u.peeled=a}continue}let o={ref:s,oid:a};r&&t.symrefs.has(s)&&(o.target=t.symrefs.get(s)),n.push(o)}return n}async function bN({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,url:s,headers:a={},forPush:o=!1,protocolVersion:l=2}){try{R("http",t),R("url",s);let u=await el.getRemoteHelperFor({url:s}).discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,service:o?"git-receive-pack":"git-upload-pack",url:s,headers:a,protocolVersion:l});if(u.protocolVersion===2)return{protocolVersion:u.protocolVersion,capabilities:u.capabilities2};let f={};for(let d of u.capabilities){let[h,p]=d.split("=");p?f[h]=p:f[h]=!0}return{protocolVersion:1,capabilities:f,refs:vS(u,void 0,!0,!0)}}catch(c){throw c.caller="git.getRemoteInfo2",c}}async function _N({type:t,object:e,format:r="content",oid:i=void 0}){return r!=="deflated"&&(r!=="wrapped"&&(e=$s.wrap({type:t,object:e})),i=await bn(e)),{oid:i,object:e}}async function yN({object:t}){try{R("object",t),typeof t=="string"?t=k.from(t,"utf8"):t instanceof Uint8Array||(t=new Uint8Array(t));let e="blob",{oid:r,object:i}=await _N({type:e,format:"content",object:t});return{oid:r,type:e,object:i,format:"wrapped"}}catch(e){throw e.caller="git.hashBlob",e}}async function xN({fs:t,cache:e,onProgress:r,dir:i,gitdir:n,filepath:s}){try{s=B(i,s);let a=await t.read(s),o=c=>tt({fs:t,cache:e,gitdir:n,oid:c}),l=await jc.fromPack({pack:a,getExternalRefDelta:o,onProgress:r});return await t.write(s.replace(/\.pack$/,".idx"),await l.toBuffer()),{oids:[...l.hashes]}}catch(a){throw a.caller="git.indexPack",a}}async function EN({fs:t,onProgress:e,dir:r,gitdir:i=B(r,".git"),filepath:n,cache:s={}}){try{R("fs",t),R("dir",r),R("gitdir",r),R("filepath",n);let a=new J(t),o=await re({fsp:a,dotgit:i});return await xN({fs:a,cache:s,onProgress:e,dir:r,gitdir:o,filepath:n})}catch(a){throw a.caller="git.indexPack",a}}async function SN({fs:t,bare:e=!1,dir:r,gitdir:i=e?r:B(r,".git"),defaultBranch:n="master"}){try{R("fs",t),R("gitdir",i),e||R("dir",r);let s=new J(t),a=await re({fsp:s,dotgit:i});return await hS({fs:s,bare:e,dir:r,gitdir:a,defaultBranch:n})}catch(s){throw s.caller="git.init",s}}async function wS({fs:t,cache:e,gitdir:r,oid:i,ancestor:n,depth:s}){let a=await Ea.read({fs:t,gitdir:r});if(!i)throw new Ir("oid");if(!n)throw new Ir("ancestor");if(i===n)return!1;let o=[i],l=new Set,c=0;for(;o.length;){if(c++===s)throw new Jc(s);let u=o.shift(),{type:f,object:d}=await tt({fs:t,cache:e,gitdir:r,oid:u});if(f!=="commit")throw new br(u,f,"commit");let h=Dr.from(d).parse();for(let p of h.parent)if(p===n)return!0;if(!a.has(u))for(let p of h.parent)l.has(p)||(o.push(p),l.add(p))}return!1}async function kN({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,ancestor:n,depth:s=-1,cache:a={}}){try{R("fs",t),R("gitdir",r),R("oid",i),R("ancestor",n);let o=new J(t),l=await re({fsp:o,dotgit:r});return await wS({fs:o,cache:a,gitdir:l,oid:i,ancestor:n,depth:s})}catch(o){throw o.caller="git.isDescendent",o}}async function CN({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i}){try{R("fs",t),R("dir",e),R("gitdir",r),R("filepath",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return Is.isIgnored({fs:n,dir:e,gitdir:s,filepath:i})}catch(n){throw n.caller="git.isIgnored",n}}async function AN({fs:t,dir:e,gitdir:r=B(e,".git"),remote:i}){try{R("fs",t),R("gitdir",r);let n=new J(t),s=await re({fsp:n,dotgit:r});return q.listBranches({fs:n,gitdir:s,remote:i})}catch(n){throw n.caller="git.listBranches",n}}async function TN({fs:t,gitdir:e,ref:r,cache:i}){if(r){let n=await q.resolve({gitdir:e,fs:t,ref:r}),s=[];return await bS({fs:t,cache:i,gitdir:e,oid:n,filenames:s,prefix:""}),s}else return dt.acquire({fs:t,gitdir:e,cache:i},async function(n){return n.entries.map(s=>s.path)})}async function bS({fs:t,cache:e,gitdir:r,oid:i,filenames:n,prefix:s}){let{tree:a}=await rl({fs:t,cache:e,gitdir:r,oid:i});for(let o of a)o.type==="tree"?await bS({fs:t,cache:e,gitdir:r,oid:o.oid,filenames:n,prefix:B(s,o.path)}):n.push(B(s,o.path))}async function PN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,cache:n={}}){try{R("fs",t),R("gitdir",r);let s=new J(t),a=await re({fsp:s,dotgit:r});return await TN({fs:s,cache:n,gitdir:a,ref:i})}catch(s){throw s.caller="git.listFiles",s}}async function RN({fs:t,cache:e,gitdir:r,ref:i}){let n;try{n=await q.resolve({gitdir:r,fs:t,ref:i})}catch(o){if(o instanceof Ve)return[]}return(await rl({fs:t,cache:e,gitdir:r,oid:n})).tree.map(o=>({target:o.path,note:o.oid}))}async function $N({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i="refs/notes/commits",cache:n={}}){try{R("fs",t),R("gitdir",r),R("ref",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await RN({fs:s,cache:n,gitdir:a,ref:i})}catch(s){throw s.caller="git.listNotes",s}}async function FN({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i}){try{R("fs",t),R("gitdir",r);let n=new J(t),s=await re({fsp:n,dotgit:r});return q.listRefs({fs:n,gitdir:s,filepath:i})}catch(n){throw n.caller="git.listRefs",n}}async function IN({fs:t,gitdir:e}){let r=await ht.get({fs:t,gitdir:e}),i=await r.getSubsections("remote");return Promise.all(i.map(async s=>{let a=await r.get(`remote.${s}.url`);return{remote:s,url:a}}))}async function MN({fs:t,dir:e,gitdir:r=B(e,".git")}){try{R("fs",t),R("gitdir",r);let i=new J(t),n=await re({fsp:i,dotgit:r});return await IN({fs:i,gitdir:n})}catch(i){throw i.caller="git.listRemotes",i}}async function DN(t){let e=ot.streamReader(t),r=[],i;for(;i=await e(),i!==!0;){if(i===null)continue;i=i.toString("utf8").replace(/\n$/,"");let[n,s,...a]=i.split(" "),o={ref:s,oid:n};for(let l of a){let[c,u]=l.split(":");c==="symref-target"?o.target=u:c==="peeled"&&(o.peeled=u)}r.push(o)}return r}async function ON({prefix:t,symrefs:e,peelTags:r}){let i=[];return i.push(ot.encode(`command=ls-refs +`)),i.push(ot.encode(`agent=${Rd.agent} +`)),(r||e||t)&&i.push(ot.delim()),r&&i.push(ot.encode("peel")),e&&i.push(ot.encode("symrefs")),t&&i.push(ot.encode(`ref-prefix ${t}`)),i.push(ot.flush()),i}async function LN({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,url:s,headers:a={},forPush:o=!1,protocolVersion:l=2,prefix:c,symrefs:u,peelTags:f}){try{R("http",t),R("url",s);let d=await Jo.discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,service:o?"git-receive-pack":"git-upload-pack",url:s,headers:a,protocolVersion:l});if(d.protocolVersion===1)return vS(d,c,u,f);let h=await ON({prefix:c,symrefs:u,peelTags:f}),p=await Jo.connect({http:t,auth:d.auth,headers:a,corsProxy:n,service:o?"git-receive-pack":"git-upload-pack",url:s,body:h});return DN(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function NN({fs:t,dir:e,gitdir:r=B(e,".git")}){try{R("fs",t),R("gitdir",r);let i=new J(t),n=await re({fsp:i,dotgit:r});return q.listTags({fs:i,gitdir:n})}catch(i){throw i.caller="git.listTags",i}}function BN(t,e){return t.committer.timestamp-e.committer.timestamp}var HN="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function HE({fs:t,cache:e,gitdir:r,oid:i,fileId:n}){if(n===HN)return;let s=i,a,o=await Xo({fs:t,cache:e,gitdir:r,oid:i}),l=o.tree;return n===o.oid?a=o.path:(a=await _S({fs:t,cache:e,gitdir:r,tree:l,fileId:n,oid:s}),Array.isArray(a)&&(a.length===0?a=void 0:a.length===1&&(a=a[0]))),a}async function _S({fs:t,cache:e,gitdir:r,tree:i,fileId:n,oid:s,filepaths:a=[],parentPath:o=""}){let l=i.entries().map(function(c){let u;return c.oid===n?(u=B(o,c.path),a.push(u)):c.type==="tree"&&(u=tt({fs:t,cache:e,gitdir:r,oid:c.oid}).then(function({object:f}){return _S({fs:t,cache:e,gitdir:r,tree:Mr.from(f),fileId:n,oid:s,filepaths:a,parentPath:B(o,c.path)})})),u});return await Promise.all(l),a}async function UN({fs:t,cache:e,gitdir:r,filepath:i,ref:n,depth:s,since:a,force:o,follow:l,includeChanges:c}){let u=typeof a=="undefined"?void 0:Math.floor(a.valueOf()/1e3),f=[],d=await Ea.read({fs:t,gitdir:r}),h=await q.resolve({fs:t,gitdir:r,ref:n}),p=[await wn({fs:t,cache:e,gitdir:r,oid:h})],g,v,b;function _(C){b&&i&&f.push(C)}for(;p.length>0;){let C=p.pop();if(u!==void 0&&C.commit.committer.timestamp<=u)break;if(i){let x;try{x=await fu({fs:t,cache:e,gitdir:r,oid:C.commit.tree,filepath:i}),v&&g!==x&&f.push(v),g=x,v=C,b=!0}catch(S){if(S instanceof Ve){let A=l&&g;if(A&&(A=await HE({fs:t,cache:e,gitdir:r,oid:C.commit.tree,fileId:g}),A))if(Array.isArray(A)){if(v){let w=await HE({fs:t,cache:e,gitdir:r,oid:v.commit.tree,fileId:g});if(Array.isArray(w))if(A=A.filter(E=>w.indexOf(E)===-1),A.length===1)A=A[0],i=A,v&&f.push(v);else{A=!1,v&&f.push(v);break}}}else i=A,v&&f.push(v);if(!A){if(b&&g&&(f.push(v),!o))break;if(!o&&!l)throw S}v=C,b=!1}else throw S}}else f.push(C);if(s!==void 0&&f.length===s){_(C);break}if(!d.has(C.oid))for(let x of C.commit.parent){let S=await wn({fs:t,cache:e,gitdir:r,oid:x});p.map(A=>A.oid).includes(S.oid)||p.push(S)}p.length===0&&_(C),p.sort((x,S)=>BN(x.commit,S.commit))}if(c)for(let C of f)C.commit.changes=await GN({fs:t,cache:e,gitdir:r,commit:C,shallow:d.has(C.oid)});return f}async function GN({fs:t,cache:e,gitdir:r,commit:i,shallow:n}){let s=n||!i.commit.parent[0]?"4b825dc642cb6eb9a060e54bf8d69288fbee4904":i.commit.parent[0];return Zn({fs:t,cache:e,gitdir:r,trees:[Fr({ref:i.oid}),Fr({ref:s})],map:async(a,[o,l])=>{let[c,u]=await Promise.all([o&&o.type(),l&&l.type()]);if(c==="tree")return u&&u!=="tree"?[null,await l.oid(),a]:void 0;if(u==="tree")return c?[await o.oid(),null,a]:void 0;let[f,d]=await Promise.all([o?o.oid():null,l?l.oid():null]);if(f!==d)return[f,d,a]}})}async function jN({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,ref:n="HEAD",depth:s,since:a,force:o,follow:l,includeChanges:c=!1,cache:u={}}){try{R("fs",t),R("gitdir",r),R("ref",n);let f=new J(t),d=await re({fsp:f,dotgit:r});return await UN({fs:f,cache:u,gitdir:d,filepath:i,ref:n,depth:s,since:a,force:o,follow:l,includeChanges:c})}catch(f){throw f.caller="git.log",f}}async function VN({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ours:n,theirs:s,fastForward:a=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:g={},mergeDriver:v,allowUnrelatedHistories:b=!1}){try{R("fs",t),p&&R("onSign",e);let _=new J(t),C=await re({fsp:_,dotgit:i}),x=await Ms({fs:_,gitdir:C,author:d});if(!x&&(!o||!a))throw new Kt("author");let S=await xa({fs:_,gitdir:C,author:x,committer:h});if(!S&&(!o||!a))throw new Kt("committer");return await pS({fs:_,cache:g,dir:r,gitdir:C,ours:n,theirs:s,fastForward:a,fastForwardOnly:o,dryRun:l,noUpdateBranch:c,abortOnConflict:u,message:f,author:x,committer:S,signingKey:p,onSign:e,mergeDriver:v,allowUnrelatedHistories:b})}catch(_){throw _.caller="git.merge",_}}var zN={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function yS({fs:t,cache:e,dir:r,gitdir:i=B(r,".git"),oids:n}){let s=new Yg.default,a=[];function o(u,f){let d=k.from(u,f);a.push(d),s.update(d)}async function l({stype:u,object:f}){let d=zN[u],h=f.length,p=h>15?128:0,g=h&15;h=h>>>4;let v=(p|d|g).toString(16);for(o(v,"hex");p;)p=h>127?128:0,v=p|h&127,o(qg(2,v),"hex"),h=h>>>7;o(k.from(await JE(f)))}o("PACK"),o("00000002","hex"),o(qg(8,n.length),"hex");for(let u of n){let{type:f,object:d}=await tt({fs:t,cache:e,gitdir:i,oid:u});await l({write:o,object:d,stype:f})}let c=s.digest();return a.push(c),a}async function WN({fs:t,cache:e,gitdir:r,oids:i,write:n}){let s=await yS({fs:t,cache:e,gitdir:r,oids:i}),a=k.from(await Ed(s)),l=`pack-${a.slice(-20).toString("hex")}.pack`;return n?(await t.write(B(r,`objects/pack/${l}`),a),{filename:l}):{filename:l,packfile:new Uint8Array(a)}}async function qN({fs:t,dir:e,gitdir:r=B(e,".git"),oids:i,write:n=!1,cache:s={}}){try{R("fs",t),R("gitdir",r),R("oids",i);let a=new J(t),o=await re({fsp:a,dotgit:r});return await WN({fs:a,cache:s,gitdir:o,oids:i,write:n})}catch(a){throw a.caller="git.packObjects",a}}async function YN({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,dir:o,gitdir:l=B(o,".git"),ref:c,url:u,remote:f,remoteRef:d,prune:h=!1,pruneTags:p=!1,fastForward:g=!0,fastForwardOnly:v=!1,corsProxy:b,singleBranch:_,headers:C={},author:x,committer:S,signingKey:A,cache:w={}}){try{R("fs",t),R("gitdir",l);let E=new J(t),y=await re({fsp:E,dotgit:l}),P=await Ms({fs:E,gitdir:y,author:x});if(!P)throw new Kt("author");let T=await xa({fs:E,gitdir:y,author:P,committer:S});if(!T)throw new Kt("committer");return await mS({fs:E,cache:w,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,dir:o,gitdir:y,ref:c,url:u,remote:f,remoteRef:d,fastForward:g,fastForwardOnly:v,corsProxy:b,singleBranch:_,headers:C,author:P,committer:T,signingKey:A,prune:h,pruneTags:p})}catch(E){throw E.caller="git.pull",E}}async function ZN({fs:t,cache:e,dir:r,gitdir:i=B(r,".git"),start:n,finish:s}){let a=await Ea.read({fs:t,gitdir:i}),o=new Set,l=new Set;for(let f of n)o.add(await q.resolve({fs:t,gitdir:i,ref:f}));for(let f of s)try{let d=await q.resolve({fs:t,gitdir:i,ref:f});l.add(d)}catch(d){}let c=new Set;async function u(f){c.add(f);let{type:d,object:h}=await tt({fs:t,cache:e,gitdir:i,oid:f});if(d==="tag"){let g=Jr.from(h).headers().object;return u(g)}if(d!=="commit")throw new br(f,d,"commit");if(!a.has(f)){let g=Dr.from(h).headers().parent;for(f of g)!l.has(f)&&!c.has(f)&&await u(f)}}for(let f of o)await u(f);return c}async function Dg({fs:t,cache:e,dir:r,gitdir:i=B(r,".git"),oids:n}){let s=new Set;async function a(o){if(s.has(o))return;s.add(o);let{type:l,object:c}=await tt({fs:t,cache:e,gitdir:i,oid:o});if(l==="tag"){let f=Jr.from(c).headers().object;await a(f)}else if(l==="commit"){let f=Dr.from(c).headers().tree;await a(f)}else if(l==="tree"){let u=Mr.from(c);for(let f of u)f.type==="blob"&&s.add(f.oid),f.type==="tree"&&await a(f.oid)}}for(let o of n)await a(o);return s}async function KN(t){let e={},r="",i=ot.streamReader(t),n=await i();for(;n!==!0;)n!==null&&(r+=n.toString("utf8")+` +`),n=await i();let s=r.toString("utf8").split(` +`);if(n=s.shift(),!n.startsWith("unpack "))throw new ya('unpack ok" or "unpack [error message]',n);e.ok=n==="unpack ok",e.ok||(e.error=n.slice(7)),e.refs={};for(let a of s){if(a.trim()==="")continue;let o=a.slice(0,2),l=a.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let u=l.slice(0,c),f=l.slice(c+1);e.refs[u]={ok:o==="ok",error:f}}return e}async function XN({capabilities:t=[],triplets:e=[]}){let r=[],i=`\0 ${t.join(" ")}`;for(let n of e)r.push(ot.encode(`${n.oldoid} ${n.oid} ${n.fullRef}${i} +`)),i="";return r.push(ot.flush()),r}async function QN({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,onPrePush:l,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:g=!1,corsProxy:v,headers:b={}}){let _=u||await Ds({fs:t,gitdir:c});if(typeof _=="undefined")throw new Ir("ref");let C=await ht.get({fs:t,gitdir:c});d=d||await C.get(`branch.${_}.pushRemote`)||await C.get("remote.pushDefault")||await C.get(`branch.${_}.remote`)||"origin";let x=h||await C.get(`remote.${d}.pushurl`)||await C.get(`remote.${d}.url`);if(typeof x=="undefined")throw new Ir("remote OR url");let S=f||await C.get(`branch.${_}.merge`);if(typeof x=="undefined")throw new Ir("remoteRef");v===void 0&&(v=await C.get("http.corsProxy"));let A=await q.expand({fs:t,gitdir:c,ref:_}),w=g?"0000000000000000000000000000000000000000":await q.resolve({fs:t,gitdir:c,ref:A}),E=el.getRemoteHelperFor({url:x}),y=await E.discover({http:r,onAuth:Sd({config:C,onAuth:s}),onAuthSuccess:a,onAuthFailure:Sd({config:C,onAuth:o}),corsProxy:v,service:"git-receive-pack",url:x,headers:b,protocolVersion:1}),P=y.auth,T;if(!S)T=A;else try{T=await q.expandAgainstMap({ref:S,map:y.refs})}catch(X){if(X instanceof Ve)T=S.startsWith("refs/")?S:`refs/heads/${S}`;else throw X}let I=y.refs.get(T)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:d,url:x,localRef:{ref:g?"(delete)":A,oid:w},remoteRef:{ref:T,oid:I}}))throw new Ko;let L=!y.capabilities.has("no-thin"),H=new Set;if(!g){let X=[...y.refs.values()],G=new Set;if(I!=="0000000000000000000000000000000000000000"){let Be=await Qg({fs:t,cache:e,gitdir:c,oids:[w,I]});for(let pr of Be)X.push(pr);L&&(G=await Dg({fs:t,cache:e,gitdir:c,oids:Be}))}if(!X.includes(w)){let Be=await ZN({fs:t,cache:e,gitdir:c,start:[w],finish:X});H=await Dg({fs:t,cache:e,gitdir:c,oids:Be})}if(L){try{let Be=await q.resolve({fs:t,gitdir:c,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:pr}=await q.resolveAgainstMap({ref:Be.replace(`refs/remotes/${d}/`,""),fullref:Be,map:y.refs}),Ut=[pr];for(let Ie of await Dg({fs:t,cache:e,gitdir:c,oids:Ut}))G.add(Ie)}catch(Be){}for(let Be of G)H.delete(Be)}if(w===I&&(p=!0),!p){if(A.startsWith("refs/tags")&&I!=="0000000000000000000000000000000000000000")throw new Zo("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&I!=="0000000000000000000000000000000000000000"&&!await wS({fs:t,cache:e,gitdir:c,oid:w,ancestor:I,depth:-1}))throw new Zo("not-fast-forward")}}let te=fS([...y.capabilities],["report-status","side-band-64k",`agent=${Rd.agent}`]),xe=await XN({capabilities:te,triplets:[{oldoid:I,oid:w,fullRef:T}]}),Z=g?[]:await yS({fs:t,cache:e,gitdir:c,oids:[...H]}),K=await E.connect({http:r,onProgress:i,corsProxy:v,service:"git-receive-pack",url:x,auth:P,headers:b,body:[...xe,...Z]}),{packfile:ce,progress:pe}=await kd.demux(K.body);if(n){let X=dS(pe);hu(X,async G=>{await n(G)})}let W=await KN(ce);if(K.headers&&(W.headers=K.headers),d&&W.ok&&W.refs[T].ok&&!A.startsWith("refs/tags")){let X=`refs/remotes/${d}/${T.replace("refs/heads","")}`;g?await q.deleteRef({fs:t,gitdir:c,ref:X}):await q.writeRef({fs:t,gitdir:c,ref:X,value:w})}if(W.ok&&Object.values(W.refs).every(X=>X.ok))return W;{let X=Object.entries(W.refs).filter(([G,Be])=>!Be.ok).map(([G,Be])=>` + - ${G}: ${Be.error}`).join("");throw new Qc(X,W)}}async function JN({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPrePush:o,dir:l,gitdir:c=B(l,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:g=!1,corsProxy:v,headers:b={},cache:_={}}){try{R("fs",t),R("http",e),R("gitdir",c);let C=new J(t),x=await re({fsp:C,dotgit:c});return await QN({fs:C,cache:_,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPrePush:o,gitdir:x,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:g,corsProxy:v,headers:b})}catch(C){throw C.caller="git.push",C}}async function xS({fs:t,cache:e,gitdir:r,oid:i}){let{type:n,object:s}=await tt({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=Jr.from(s).parse().object,xS({fs:t,cache:e,gitdir:r,oid:i});if(n!=="blob")throw new br(i,n,"blob");return{oid:i,blob:new Uint8Array(s)}}async function ES({fs:t,cache:e,gitdir:r,oid:i,filepath:n=void 0}){return n!==void 0&&(i=await fu({fs:t,cache:e,gitdir:r,oid:i,filepath:n})),await xS({fs:t,cache:e,gitdir:r,oid:i})}async function pu({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,filepath:n,cache:s={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let a=new J(t),o=await re({fsp:a,dotgit:r});return await ES({fs:a,cache:s,gitdir:o,oid:i,filepath:n})}catch(a){throw a.caller="git.readBlob",a}}async function SS({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await wn({fs:s,cache:n,gitdir:a,oid:i})}catch(s){throw s.caller="git.readCommit",s}}async function eB({fs:t,cache:e,gitdir:r,ref:i="refs/notes/commits",oid:n}){let s=await q.resolve({gitdir:r,fs:t,ref:i}),{blob:a}=await ES({fs:t,cache:e,gitdir:r,oid:s,filepath:n});return a}async function tB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i="refs/notes/commits",oid:n,cache:s={}}){try{R("fs",t),R("gitdir",r),R("ref",i),R("oid",n);let a=new J(t),o=await re({fsp:a,dotgit:r});return await eB({fs:a,cache:s,gitdir:o,ref:i,oid:n})}catch(a){throw a.caller="git.readNote",a}}async function rB({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,format:n="parsed",filepath:s=void 0,encoding:a=void 0,cache:o={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let l=new J(t),c=await re({fsp:l,dotgit:r});s!==void 0&&(i=await fu({fs:l,cache:o,gitdir:c,oid:i,filepath:s}));let f=await tt({fs:l,cache:o,gitdir:c,oid:i,format:n==="parsed"?"content":n});if(f.oid=i,n==="parsed")switch(f.format="parsed",f.type){case"commit":f.object=Dr.from(f.object).parse();break;case"tree":f.object=Mr.from(f.object).entries();break;case"blob":a?f.object=f.object.toString(a):(f.object=new Uint8Array(f.object),f.format="content");break;case"tag":f.object=Jr.from(f.object).parse();break;default:throw new br(f.oid,f.type,"blob|commit|tag|tree")}else(f.format==="deflated"||f.format==="wrapped")&&(f.type=f.format);return f}catch(l){throw l.caller="git.readObject",l}}async function iB({fs:t,cache:e,gitdir:r,oid:i}){let{type:n,object:s}=await tt({fs:t,cache:e,gitdir:r,oid:i,format:"content"});if(n!=="tag")throw new br(i,n,"tag");let a=Jr.from(s);return{oid:i,tag:a.parse(),payload:a.payload()}}async function nB({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await iB({fs:s,cache:n,gitdir:a,oid:i})}catch(s){throw s.caller="git.readTag",s}}async function sB({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,filepath:n=void 0,cache:s={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let a=new J(t),o=await re({fsp:a,dotgit:r});return await rl({fs:a,cache:s,gitdir:o,oid:i,filepath:n})}catch(a){throw a.caller="git.readTree",a}}async function aB({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("filepath",i);let s=new J(t),a=await re({fsp:s,dotgit:r});await dt.acquire({fs:s,gitdir:a,cache:n},async function(o){o.delete({filepath:i})})}catch(s){throw s.caller="git.remove",s}}async function oB({fs:t,cache:e,onSign:r,gitdir:i,ref:n="refs/notes/commits",oid:s,author:a,committer:o,signingKey:l}){let c;try{c=await q.resolve({gitdir:i,fs:t,ref:n})}catch(p){if(!(p instanceof Ve))throw p}let f=(await rl({fs:t,cache:e,gitdir:i,oid:c||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==s);let d=await du({fs:t,gitdir:i,tree:f});return await uu({fs:t,cache:e,onSign:r,gitdir:i,ref:n,tree:d,parent:c&&[c],message:`Note removed by 'isomorphic-git removeNote' +`,author:a,committer:o,signingKey:l})}async function lB({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ref:n="refs/notes/commits",oid:s,author:a,committer:o,signingKey:l,cache:c={}}){try{R("fs",t),R("gitdir",i),R("oid",s);let u=new J(t),f=await re({fsp:u,dotgit:i}),d=await Ms({fs:u,gitdir:f,author:a});if(!d)throw new Kt("author");let h=await xa({fs:u,gitdir:f,author:d,committer:o});if(!h)throw new Kt("committer");return await oB({fs:u,cache:c,onSign:e,gitdir:f,ref:n,oid:s,author:d,committer:h,signingKey:l})}catch(u){throw u.caller="git.removeNote",u}}async function cB({fs:t,gitdir:e,oldref:r,ref:i,checkout:n=!1}){if(!au(i,!0))throw new ji(i,zo.default.clean(i));if(!au(r,!0))throw new ji(r,zo.default.clean(r));let s=`refs/heads/${r}`,a=`refs/heads/${i}`;if(await q.exists({fs:t,gitdir:e,ref:a}))throw new Gi("branch",i,!1);let l=await q.resolve({fs:t,gitdir:e,ref:s,depth:1});await q.writeRef({fs:t,gitdir:e,ref:a,value:l}),await q.deleteRef({fs:t,gitdir:e,ref:s});let u=await Ds({fs:t,gitdir:e,fullname:!0})===s;(n||u)&&await q.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:a})}async function uB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,oldref:n,checkout:s=!1}){try{R("fs",t),R("gitdir",r),R("ref",i),R("oldref",n);let a=new J(t),o=await re({fsp:a,dotgit:r});return await cB({fs:a,gitdir:o,ref:i,oldref:n,checkout:s})}catch(a){throw a.caller="git.renameBranch",a}}async function kS({gitdir:t,type:e,object:r}){return bn($s.wrap({type:e,object:r}))}async function fB({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,ref:n,cache:s={}}){try{R("fs",t),R("gitdir",r),R("filepath",i);let a=new J(t),o=await re({fsp:a,dotgit:r}),l,c;try{l=await q.resolve({fs:a,gitdir:o,ref:n||"HEAD"})}catch(d){if(n)throw d}if(l)try{l=await fu({fs:a,cache:s,gitdir:o,oid:l,filepath:i})}catch(d){l=null}let u={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},f=e&&await a.read(B(e,i));f&&(c=await kS({gitdir:o,type:"blob",object:f}),l===c&&(u=await a.lstat(B(e,i)))),await dt.acquire({fs:a,gitdir:o,cache:s},async function(d){d.delete({filepath:i}),l&&d.insert({filepath:i,stats:u,oid:l})})}catch(a){throw a.caller="git.reset",a}}async function dB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,depth:n}){try{R("fs",t),R("gitdir",r),R("ref",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await q.resolve({fs:s,gitdir:a,ref:i,depth:n})}catch(s){throw s.caller="git.resolveRef",s}}async function hB({fs:t,dir:e,gitdir:r=B(e,".git"),path:i,value:n,append:s=!1}){try{R("fs",t),R("gitdir",r),R("path",i);let a=new J(t),o=await re({fsp:a,dotgit:r}),l=await ht.get({fs:a,gitdir:o});s?await l.append(i,n):await l.set(i,n),await ht.save({fs:a,gitdir:o,config:l})}catch(a){throw a.caller="git.setConfig",a}}async function CS({fs:t,gitdir:e,commit:r}){let i=Dr.from(r).toObject();return await Or({fs:t,gitdir:e,type:"commit",object:i,format:"content"})}var Cd=class t{static get timezoneOffsetForRefLogEntry(){let e=new Date().getTimezoneOffset(),r=Math.abs(Math.floor(e/60)),i=Math.abs(e%60).toString().padStart(2,"0");return`${e>0?"-":"+"}${r.toString().padStart(2,"0")}${i}`}static createStashReflogEntry(e,r,i){let n=e.name.replace(/\s/g,""),s="0000000000000000000000000000000000000000",a=Math.floor(Date.now()/1e3),o=t.timezoneOffsetForRefLogEntry;return`${s} ${r} ${n} ${e.email} ${a} ${o} ${i} +`}static getStashReflogEntry(e,r=!1){return e.split(` +`).filter(s=>s).reverse().map((s,a)=>r?`stash@{${a}}: ${s.split(" ")[1]}`:s)}},Sa=class t{constructor({fs:e,dir:r,gitdir:i=B(r,".git")}){Object.assign(this,{fs:e,dir:r,gitdir:i,_author:null})}static get refStash(){return"refs/stash"}static get refLogsStash(){return"logs/refs/stash"}get refStashPath(){return B(this.gitdir,t.refStash)}get refLogsStashPath(){return B(this.gitdir,t.refLogsStash)}async getAuthor(){if(!this._author&&(this._author=await Ms({fs:this.fs,gitdir:this.gitdir,author:{}}),!this._author))throw new Kt("author");return this._author}async getStashSHA(e,r){return await this.fs.exists(this.refStashPath)?(r||await this.readStashReflogs({parsed:!1}))[e].split(" ")[1]:null}async writeStashCommit({message:e,tree:r,parent:i}){return CS({fs:this.fs,gitdir:this.gitdir,commit:{message:e,tree:r,parent:i,author:await this.getAuthor(),committer:await this.getAuthor()}})}async readStashCommit(e){let r=await this.readStashReflogs({parsed:!1});if(e!==0&&(e<0||e>r.length-1))throw new ji(`stash@${e}`,"number that is in range of [0, num of stash pushed]");let i=await this.getStashSHA(e,r);return i?wn({fs:this.fs,cache:{},gitdir:this.gitdir,oid:i}):{}}async writeStashRef(e){return q.writeRef({fs:this.fs,gitdir:this.gitdir,ref:t.refStash,value:e})}async writeStashReflogEntry({stashCommit:e,message:r}){let i=await this.getAuthor(),n=Cd.createStashReflogEntry(i,e,r),s=this.refLogsStashPath;await Qo({filepath:s,entry:n},async()=>{let a=await this.fs.exists(s)?await this.fs.read(s,"utf8"):"";await this.fs.write(s,a+n,"utf8")})}async readStashReflogs({parsed:e=!1}){if(!await this.fs.exists(this.refLogsStashPath))return[];let r=await this.fs.read(this.refLogsStashPath,"utf8");return Cd.getStashReflogEntry(r,e)}};async function AS({fs:t,dir:e,gitdir:r,message:i=""}){let n=new Sa({fs:t,dir:e,gitdir:r});await n.getAuthor();let s=await Ds({fs:t,gitdir:r,fullname:!1}),a=await q.resolve({fs:t,gitdir:r,ref:"HEAD"}),l=(await SS({fs:t,dir:e,gitdir:r,oid:a})).commit.message,c=[a],u=null,f=Fr({ref:"HEAD"}),d=await FE({fs:t,dir:e,gitdir:r,treePair:[Fr({ref:"HEAD"}),"stage"]});if(d){let v=await n.writeStashCommit({message:`stash-Index: WIP on ${s} - ${new Date().toISOString()}`,tree:d,parent:c});c.push(v),u=d,f=tl()}let h=await FE({fs:t,dir:e,gitdir:r,treePair:[f,"workdir"]});if(h){let v=await n.writeStashCommit({message:`stash-WorkDir: WIP on ${s} - ${new Date().toISOString()}`,tree:h,parent:[c[c.length-1]]});c.push(v),u=h}if(!u||!d&&!h)throw new Ve("changes, nothing to stash");let p=(i.trim()||`WIP on ${s}`)+`: ${a.substring(0,7)} ${l}`;return{stashCommit:await n.writeStashCommit({message:p,tree:u,parent:c}),stashMsg:p,branch:s,stashMgr:n}}async function pB({fs:t,dir:e,gitdir:r,message:i=""}){let{stashCommit:n,stashMsg:s,branch:a,stashMgr:o}=await AS({fs:t,dir:e,gitdir:r,message:i});return await o.writeStashRef(n),await o.writeStashReflogEntry({stashCommit:n,message:s}),await oS({fs:t,dir:e,gitdir:r,ref:a,track:!1,force:!0}),n}async function mB({fs:t,dir:e,gitdir:r,message:i=""}){let{stashCommit:n}=await AS({fs:t,dir:e,gitdir:r,message:i});return n}async function TS({fs:t,dir:e,gitdir:r,refIdx:i=0}){let s=await new Sa({fs:t,dir:e,gitdir:r}).readStashCommit(i),{parent:a=null}=s.commit?s.commit:{};if(!(!a||!Array.isArray(a)))for(let o=0;o{await t.exists(a)&&await t.rm(a)});let o=await n.readStashReflogs({parsed:!1});if(!o.length)return;o.splice(i,1);let l=n.refLogsStashPath;await Qo({reflogEntries:o,stashReflogPath:l,stashMgr:n},async()=>{if(o.length){await t.write(l,o.reverse().join(` +`)+` +`,"utf8");let c=o[o.length-1].split(" ")[1];await n.writeStashRef(c)}else await t.rm(l)})}async function gB({fs:t,dir:e,gitdir:r}){return new Sa({fs:t,dir:e,gitdir:r}).readStashReflogs({parsed:!0})}async function vB({fs:t,dir:e,gitdir:r}){let i=new Sa({fs:t,dir:e,gitdir:r}),n=[i.refStashPath,i.refLogsStashPath];await Qo(n,async()=>{await Promise.all(n.map(async s=>{if(await t.exists(s))return t.rm(s)}))})}async function wB({fs:t,dir:e,gitdir:r,refIdx:i=0}){await TS({fs:t,dir:e,gitdir:r,refIdx:i}),await PS({fs:t,dir:e,gitdir:r,refIdx:i})}async function bB({fs:t,dir:e,gitdir:r=B(e,".git"),op:i="push",message:n="",refIdx:s=0}){R("fs",t),R("dir",e),R("gitdir",r),R("op",i);let a={push:pB,apply:TS,drop:PS,list:gB,clear:vB,pop:wB,create:mB},o=["apply","drop","pop"];try{let l=new J(t),c=await re({fsp:l,dotgit:r});["refs","logs","logs/refs"].map(d=>B(c,d)).forEach(async d=>{await l.exists(d)||await l.mkdir(d)});let f=a[i];if(f){if(o.includes(i)&&s<0)throw new ji(`stash@${s}`,"number that is in range of [0, num of stash pushed]");return await f({fs:l,dir:e,gitdir:c,message:n,refIdx:s})}throw new Error(`To be implemented: ${i}`)}catch(l){throw l.caller="git.stash",l}}async function _B({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,cache:n={},refresh:s=!0}){try{R("fs",t),R("gitdir",r),R("filepath",i);let a=new J(t),o=await re({fsp:a,dotgit:r});if(await Is.isIgnored({fs:a,gitdir:o,dir:e,filepath:i}))return"ignored";let c=await yB({fs:a,cache:n,gitdir:o}),u=await RS({fs:a,cache:n,gitdir:o,tree:c,path:i}),f=await dt.acquire({fs:a,gitdir:o,cache:n},async function(b){for(let _ of b)if(_.path===i)return _;return null}),d=await a.lstat(B(e,i)),h=u!==null,p=f!==null,g=d!==null,v=async()=>{if(p&&!gd(f,d))return f.oid;{let b=await a.read(B(e,i)),_=await kS({gitdir:o,type:"blob",object:b});return s&&p&&f.oid===_&&d.size!==-1&&dt.acquire({fs:a,gitdir:o,cache:n},async function(C){C.insert({filepath:i,stats:d,oid:_})}),_}};if(!h&&!g&&!p)return"absent";if(!h&&!g&&p)return"*absent";if(!h&&g&&!p)return"*added";if(!h&&g&&p)return await v()===f.oid?"added":"*added";if(h&&!g&&!p)return"deleted";if(h&&!g&&p)return u===f.oid,"*deleted";if(h&&g&&!p)return await v()===u?"*undeleted":"*undeletemodified";if(h&&g&&p){let b=await v();return b===u?b===f.oid?"unmodified":"*unmodified":b===f.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function RS({fs:t,cache:e,gitdir:r,tree:i,path:n}){typeof n=="string"&&(n=n.split("/"));let s=n.shift();for(let a of i)if(a.path===s){if(n.length===0)return a.oid;let{type:o,object:l}=await tt({fs:t,cache:e,gitdir:r,oid:a.oid});if(o==="tree"){let c=Mr.from(l);return RS({fs:t,cache:e,gitdir:r,tree:c,path:n})}if(o==="blob")throw new br(a.oid,o,"blob",n.join("/"))}return null}async function yB({fs:t,cache:e,gitdir:r}){let i;try{i=await q.resolve({fs:t,gitdir:r,ref:"HEAD"})}catch(s){if(s instanceof Ve)return[]}let{tree:n}=await rl({fs:t,cache:e,gitdir:r,oid:i});return n}async function xB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i="HEAD",filepaths:n=["."],filter:s,cache:a={},ignored:o=!1,refresh:l=!0}){try{R("fs",t),R("gitdir",r),R("ref",i);let c=new J(t),u=await re({fsp:c,dotgit:r});return await Zn({fs:c,cache:a,dir:e,gitdir:u,trees:[Fr({ref:i}),cu({refresh:l}),tl()],map:async function(f,[d,h,p]){if(!d&&!p&&h&&!o&&await Is.isIgnored({fs:c,dir:e,filepath:f})||!n.some(E=>aS(f,E)))return null;if(s&&!s(f))return;let[g,v,b]=await Promise.all([d&&d.type(),h&&h.type(),p&&p.type()]),_=[g,v,b].includes("blob");if((g==="tree"||g==="special")&&!_)return;if(g==="commit")return null;if((v==="tree"||v==="special")&&!_)return;if(b==="commit")return null;if((b==="tree"||b==="special")&&!_)return;let C=g==="blob"?await d.oid():void 0,x=b==="blob"?await p.oid():void 0,S;g!=="blob"&&v==="blob"&&b!=="blob"?S="42":v==="blob"&&(S=await h.oid());let A=[void 0,C,S,x],w=A.map(E=>A.indexOf(E));return w.shift(),[f,...w]}})}catch(c){throw c.caller="git.statusMatrix",c}}async function EB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,object:n,force:s=!1}){try{R("fs",t),R("gitdir",r),R("ref",i);let a=new J(t);if(i===void 0)throw new Ir("ref");i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`;let o=await re({fsp:a,dotgit:r}),l=await q.resolve({fs:a,gitdir:o,ref:n||"HEAD"});if(!s&&await q.exists({fs:a,gitdir:o,ref:i}))throw new Gi("tag",i);await q.writeRef({fs:a,gitdir:o,ref:i,value:l})}catch(a){throw a.caller="git.tag",a}}async function SB({fs:t,dir:e,gitdir:r=B(e,".git"),cache:i={},filepath:n,oid:s,mode:a,add:o,remove:l,force:c}){try{R("fs",t),R("gitdir",r),R("filepath",n);let u=new J(t),f=await re({fsp:u,dotgit:r});if(l)return await dt.acquire({fs:u,gitdir:f,cache:i},async function(h){if(!c){let p=await u.lstat(B(e,n));if(p){if(p.isDirectory())throw new Fs("directory");return}}h.has({filepath:n})&&h.delete({filepath:n})});let d;if(!s){if(d=await u.lstat(B(e,n)),!d)throw new Ve(`file at "${n}" on disk and "remove" not set`);if(d.isDirectory())throw new Fs("directory")}return await dt.acquire({fs:u,gitdir:f,cache:i},async function(h){if(!o&&!h.has({filepath:n}))throw new Ve(`file at "${n}" in index and "add" not set`);let p;if(s)p={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:a,uid:0,gid:0,size:0};else{p=d;let g=p.isSymbolicLink()?await u.readlink(B(e,n)):await u.read(B(e,n));s=await Or({fs:u,gitdir:f,type:"blob",format:"content",object:g})}return h.insert({filepath:n,oid:s,stats:p}),s})}catch(u){throw u.caller="git.updateIndex",u}}function kB(){try{return Rd.version}catch(t){throw t.caller="git.version",t}}async function CB({fs:t,dir:e,gitdir:r=B(e,".git"),trees:i,map:n,reduce:s,iterate:a,cache:o={}}){try{R("fs",t),R("gitdir",r),R("trees",i);let l=new J(t),c=await re({fsp:l,dotgit:r});return await Zn({fs:l,cache:o,dir:e,gitdir:c,trees:i,map:n,reduce:s,iterate:a})}catch(l){throw l.caller="git.walk",l}}async function AB({fs:t,dir:e,gitdir:r=B(e,".git"),blob:i}){try{R("fs",t),R("gitdir",r),R("blob",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await Or({fs:n,gitdir:s,type:"blob",object:i,format:"content"})}catch(n){throw n.caller="git.writeBlob",n}}async function TB({fs:t,dir:e,gitdir:r=B(e,".git"),commit:i}){try{R("fs",t),R("gitdir",r),R("commit",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await CS({fs:n,gitdir:s,commit:i})}catch(n){throw n.caller="git.writeCommit",n}}async function PB({fs:t,dir:e,gitdir:r=B(e,".git"),type:i,object:n,format:s="parsed",oid:a,encoding:o=void 0}){try{let l=new J(t),c=await re({fsp:l,dotgit:r});if(s==="parsed"){switch(i){case"commit":n=Dr.from(n).toObject();break;case"tree":n=Mr.from(n).toObject();break;case"blob":n=k.from(n,o);break;case"tag":n=Jr.from(n).toObject();break;default:throw new br(a||"",i,"blob|commit|tag|tree")}s="content"}return a=await Or({fs:l,gitdir:c,type:i,object:n,oid:a,format:s}),a}catch(l){throw l.caller="git.writeObject",l}}async function RB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,value:n,force:s=!1,symbolic:a=!1}){try{R("fs",t),R("gitdir",r),R("ref",i),R("value",n);let o=new J(t);if(!au(i,!0))throw new ji(i,zo.default.clean(i));let l=await re({fsp:o,dotgit:r});if(!s&&await q.exists({fs:o,gitdir:l,ref:i}))throw new Gi("ref",i);a?await q.writeSymbolicRef({fs:o,gitdir:l,ref:i,value:n}):(n=await q.resolve({fs:o,gitdir:l,ref:n}),await q.writeRef({fs:o,gitdir:l,ref:i,value:n}))}catch(o){throw o.caller="git.writeRef",o}}async function $B({fs:t,gitdir:e,tag:r}){let i=Jr.from(r).toObject();return await Or({fs:t,gitdir:e,type:"tag",object:i,format:"content"})}async function FB({fs:t,dir:e,gitdir:r=B(e,".git"),tag:i}){try{R("fs",t),R("gitdir",r),R("tag",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await $B({fs:n,gitdir:s,tag:i})}catch(n){throw n.caller="git.writeTag",n}}async function IB({fs:t,dir:e,gitdir:r=B(e,".git"),tree:i}){try{R("fs",t),R("gitdir",r),R("tree",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await du({fs:n,gitdir:s,tree:i})}catch(n){throw n.caller="git.writeTree",n}}var MB={Errors:lu,STAGE:tl,TREE:Fr,WORKDIR:cu,add:yL,abortMerge:vL,addNote:SL,addRemote:CL,annotatedTag:TL,branch:RL,cherryPick:BL,checkout:oS,clone:KL,commit:XL,getConfig:mN,getConfigAll:vN,setConfig:hB,currentBranch:QL,deleteBranch:eN,deleteRef:tN,deleteRemote:iN,deleteTag:sN,expandOid:cN,expandRef:uN,fastForward:fN,fetch:dN,findMergeBase:hN,findRoot:pN,getRemoteInfo:wN,getRemoteInfo2:bN,hashBlob:yN,indexPack:EN,init:SN,isDescendent:kN,isIgnored:CN,listBranches:AN,listFiles:PN,listNotes:$N,listRefs:FN,listRemotes:MN,listServerRefs:LN,listTags:NN,log:jN,merge:VN,packObjects:qN,pull:YN,push:JN,readBlob:pu,readCommit:SS,readNote:tB,readObject:rB,readTag:nB,readTree:sB,remove:aB,removeNote:lB,renameBranch:uB,resetIndex:fB,updateIndex:SB,resolveRef:dB,status:_B,statusMatrix:xB,tag:EB,version:kB,walk:CB,writeBlob:AB,writeCommit:TB,writeObject:PB,writeRef:RB,writeTag:FB,writeTree:IB,stash:bB},de=MB;var ke=require("obsidian"),c$=ft(require("path"),1),Qp=ft(require("fs/promises"),1);m();var It={};m();var $d=class{constructor(e){this.plugin=e;this.tasks=[];this.currentTask=null}addTask(e,r){this.tasks.push({task:e,onFinished:i=>{r&&r(i)}}),this.kickstart()}kickstart(){if(this.currentTask!==null||this.tasks.length===0)return;let e=this.tasks.shift();this.currentTask=Promise.resolve().then(()=>e.task()).then(r=>{try{e.onFinished(r)}catch(i){console.error(i)}},r=>{this.plugin.displayError(r);try{e.onFinished(void 0)}catch(i){console.error(i)}}).finally(()=>{this.currentTask=null,this.kickstart()})}clear(){this.tasks=[]}};m();var j=require("obsidian");m();var $S=require("obsidian"),Fd="YYYY-MM-DD",Jg=`${Fd} HH:mm`,ev=`${Fd} HH:mm:ss`,Id=40,il="conflict-files-obsidian-git.md",pt={commitMessage:"vault backup: {{date}}",autoCommitMessage:"vault backup: {{date}}",commitMessageScript:"",commitDateFormat:ev,autoSaveInterval:0,autoPushInterval:0,autoPullInterval:0,autoPullOnBoot:!1,autoCommitOnlyStaged:!1,disablePush:!1,pullBeforePush:!0,squashCommitsBeforePush:!1,disablePopups:!1,showErrorNotices:!0,disablePopupsForNoChanges:!1,listChangedFilesInMessageBody:!1,showStatusBar:!0,updateSubmodules:!1,syncMethod:"merge",mergeStrategy:"none",customMessageOnAutoBackup:!1,autoBackupAfterFileChange:!1,treeStructure:!1,refreshSourceControl:$S.Platform.isDesktopApp,basePath:"",differentIntervalCommitAndPush:!1,changedFilesInStatusBar:!1,showedMobileNotice:!1,refreshSourceControlTimer:7e3,showBranchStatusBar:!0,setLastSaveToLastCommit:!1,submoduleRecurseCheckout:!1,gitDir:"",showFileMenu:!0,authorInHistoryView:"hide",dateInHistoryView:!1,diffStyle:"split",hunks:{showSigns:!1,hunkCommands:!1,statusBar:"disabled"},lineAuthor:{show:!1,followMovement:"inactive",authorDisplay:"initials",showCommitHash:!1,dateTimeFormatOptions:"date",dateTimeFormatCustomString:Jg,dateTimeTimezone:"viewer-local",coloringMaxAge:"1y",colorNew:{r:255,g:150,b:150},colorOld:{r:120,g:160,b:255},textColorCss:"var(--text-muted)",ignoreWhitespace:!1}},Xt={type:"git-view",name:"Source Control",icon:"git-pull-request"},wi={type:"git-history-view",name:"History",icon:"history"},Os={type:"split-diff-view",name:"Diff view",icon:"diff"},Ls={type:"diff-view",name:"Diff View",icon:"git-pull-request"},Md="C:\\Program Files\\Git\\cmd\\git.exe",Dd=".git_credentials_input",ka="obsidian_askpass.sh",FS=`#!/bin/sh + +PROMPT="$1" +TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT" + +cleanup() { + rm -f "$TEMP_FILE" "$TEMP_FILE.response" +} +trap cleanup EXIT + +echo "$PROMPT" > "$TEMP_FILE" + +while [ ! -e "$TEMP_FILE.response" ]; do + if [ ! -e "$TEMP_FILE" ]; then + echo "Trigger file got removed: Abort" >&2 + exit 1 + fi + sleep 0.1 +done + +RESPONSE=$(cat "$TEMP_FILE.response") + +echo "$RESPONSE" +`,IS=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];m();m();m();var mu=class{diff(e,r,i={}){let n;typeof i=="function"?(n=i,i={}):"callback"in i&&(n=i.callback);let s=this.castInput(e,i),a=this.castInput(r,i),o=this.removeEmpty(this.tokenize(s,i)),l=this.removeEmpty(this.tokenize(a,i));return this.diffWithOptionsObj(o,l,i,n)}diffWithOptionsObj(e,r,i,n){var s;let a=_=>{if(_=this.postProcess(_,i),n){setTimeout(function(){n(_)},0);return}else return _},o=r.length,l=e.length,c=1,u=o+l;i.maxEditLength!=null&&(u=Math.min(u,i.maxEditLength));let f=(s=i.timeout)!==null&&s!==void 0?s:1/0,d=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],r,e,0,i);if(h[0].oldPos+1>=l&&p+1>=o)return a(this.buildValues(h[0].lastComponent,r,e));let g=-1/0,v=1/0,b=()=>{for(let _=Math.max(g,-c);_<=Math.min(v,c);_+=2){let C,x=h[_-1],S=h[_+1];x&&(h[_-1]=void 0);let A=!1;if(S){let E=S.oldPos-_;A=S&&0<=E&&E=l&&p+1>=o)return a(this.buildValues(C.lastComponent,r,e))||!0;h[_]=C,C.oldPos+1>=l&&(v=Math.min(v,_-1)),p+1>=o&&(g=Math.max(g,_+1))}c++};if(n)(function _(){setTimeout(function(){if(c>u||Date.now()>d)return n(void 0);b()||_()},0)})();else for(;c<=u&&Date.now()<=d;){let _=b();if(_)return _}}addToPath(e,r,i,n,s){let a=e.lastComponent;return a&&!s.oneChangePerToken&&a.added===r&&a.removed===i?{oldPos:e.oldPos+n,lastComponent:{count:a.count+1,added:r,removed:i,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:r,removed:i,previousComponent:a}}}extractCommon(e,r,i,n,s){let a=r.length,o=i.length,l=e.oldPos,c=l-n,u=0;for(;c+1d.length?p:d}),u.value=this.join(f)}else u.value=this.join(r.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return n}};m();var tv=class extends mu{constructor(){super(...arguments),this.tokenize=OB}equals(e,r,i){return i.ignoreWhitespace?((!i.newlineIsToken||!e.includes(` +`))&&(e=e.trim()),(!i.newlineIsToken||!r.includes(` +`))&&(r=r.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(e.endsWith(` +`)&&(e=e.slice(0,-1)),r.endsWith(` +`)&&(r=r.slice(0,-1))),super.equals(e,r,i)}},DB=new tv;function rv(t,e,r){return DB.diff(t,e,r)}function OB(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,` +`));let r=[],i=t.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let n=0;n"~"||t[e]==='"'||t[e]==="\\")return!0;return!1}function Ns(t){if(!LB(t))return t;let e='"',r=new TextEncoder().encode(t),i=0;for(;i=32&&n<=126?e+=String.fromCharCode(n):e+="\\"+n.toString(8).padStart(3,"0"),i++}return e+='"',e}var iv={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function nv(t,e,r,i,n,s,a){let o;a?typeof a=="function"?o={callback:a}:o=a:o={},typeof o.context=="undefined"&&(o.context=4);let l=o.context;if(o.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(o.callback){let{callback:u}=o;rv(r,i,Object.assign(Object.assign({},o),{callback:f=>{let d=c(f);u(d)}}))}else return c(rv(r,i,o));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(_){return _.map(function(C){return" "+C})}let d=[],h=0,p=0,g=[],v=1,b=1;for(let _=0;_0?f(S.lines.slice(-l)):[],h-=g.length,p-=g.length)}for(let S of x)g.push((C.added?"+":"-")+S);C.added?b+=x.length:v+=x.length}else{if(h)if(x.length<=l*2&&_1&&!e.includeFileHeaders&&!t.every(u=>u.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return t.map(u=>Od(u,e)).join(` +`)}let l=[];if(t.isGit){if(e=iv,!t.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!t.newFileName)throw new Error("newFileName must be specified for Git patches");let u=t.oldFileName,f=t.newFileName;t.isCreate&&u==="/dev/null"?u=f.replace(/^b\//,"a/"):t.isDelete&&f==="/dev/null"&&(f=u.replace(/^a\//,"b/")),l.push("diff --git "+Ns(u)+" "+Ns(f)),t.isDelete&&l.push("deleted file mode "+((r=t.oldMode)!==null&&r!==void 0?r:"100644")),t.isCreate&&l.push("new file mode "+((i=t.newMode)!==null&&i!==void 0?i:"100644")),t.oldMode&&t.newMode&&!t.isDelete&&!t.isCreate&&(l.push("old mode "+t.oldMode),l.push("new mode "+t.newMode)),t.isRename&&(l.push("rename from "+Ns(((n=t.oldFileName)!==null&&n!==void 0?n:"").replace(/^a\//,""))),l.push("rename to "+Ns(((s=t.newFileName)!==null&&s!==void 0?s:"").replace(/^b\//,"")))),t.isCopy&&(l.push("copy from "+Ns(((a=t.oldFileName)!==null&&a!==void 0?a:"").replace(/^a\//,""))),l.push("copy to "+Ns(((o=t.newFileName)!==null&&o!==void 0?o:"").replace(/^b\//,""))))}else e.includeIndex&&t.oldFileName==t.newFileName&&t.oldFileName!==void 0&&l.push("Index: "+t.oldFileName),e.includeUnderline&&l.push("===================================================================");let c=t.hunks.length>0;e.includeFileHeaders&&t.oldFileName!==void 0&&t.newFileName!==void 0&&(!t.isGit||c)&&(l.push("--- "+Ns(t.oldFileName)+(t.oldHeader?" "+t.oldHeader:"")),l.push("+++ "+Ns(t.newFileName)+(t.newHeader?" "+t.newHeader:"")));for(let u=0;u{o(l?Od(l,a.headerOptions):void 0)}}))}else{let o=nv(t,e,r,i,n,s,a);return o?Od(o,a==null?void 0:a.headerOptions):void 0}}function gu(t,e,r,i,n,s){return MS(t,t,e,r,i,n,s)}function NB(t){let e=t.endsWith(` +`),r=t.split(` +`).map(i=>i+` +`);return e?r.pop():r.push(r.pop().slice(0,-1)),r}var En=require("obsidian");m();function DS(t,e){let r=Object.assign({},t.lineAuthor,e.lineAuthor);return Object.assign({},t,e,{lineAuthor:r})}var nl=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};m();var OS=require("obsidian"),BB={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0,obscure:!1},rt=class extends OS.SuggestModal{constructor(e,r){if(super(e.app),this.config={...BB,...r},this.setPlaceholder(this.config.placeholder),this.config.obscure){this.inputEl.type="password";let i=this.containerEl.querySelector(".prompt-input-container");i.addClass("git-obscure-prompt"),i.setAttr("git-is-obscured","true");let n=i==null?void 0:i.createDiv({cls:"search-input-clear-button"});n.style.marginRight="32px",n.id="git-show-password",n.addEventListener("click",()=>{i.getAttr("git-is-obscured")==="true"?(this.inputEl.type="text",i.setAttr("git-is-obscured","false")):(this.inputEl.type="password",i.setAttr("git-is-obscured","true"))})}}openAndGetResult(){return new Promise(e=>{this.resolve=e,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(e=>window.setTimeout(e,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(e){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[e.length>0?e:" ",...this.config.options]:[e.length>0?e:"...",...this.config.options]}renderSuggestion(e,r){this.config.obscure?r.hide():r.setText(e)}onChooseSuggestion(e,r){if(this.resolve){let i;this.config.allowEmpty&&e===" "?i="":e==="..."?i=void 0:i=e,this.resolve(i)}}};m();var tk=ft(ek(),1),rk=require("child_process"),Xn=require("obsidian");function Nd(t){throw new Error(`Unexpected object: ${t}`)}function wu(t,e,r){return t===1?`${t} ${e}`:`${t} ${r!=null?r:e+"s"}`}var ov=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);function Vi(t,e){let r;if(e){if(e.button===0||e.button===1){let i=Xn.Keymap.isModEvent(e);r=t.workspace.getLeaf(i)}}else r=t.workspace.getLeaf(!1);return r}function _n(t,e,r,i,n){if(e.button==2){let s=t.vault.getAbstractFileByPath(r);if(s!=null){let a=new Xn.Menu;t.workspace.trigger("file-menu",a,s,n,i),a.showAtPosition({x:e.pageX,y:e.pageY})}else{let a=new Xn.Menu;t.workspace.trigger("obsidian-git:menu",a,r,n,i),a.showAtPosition({x:e.pageX,y:e.pageY})}}}function Bs(t){throw new Error("Impossible branch: "+t)}function lv(t){return`rgb(${t.r},${t.g},${t.b})`}function ik(t){var s;let e=(s=tk.fromString(t))==null?void 0:s.toRgbaArray();if(e===void 0)return;let[r,i,n]=e;return{r,g:i,b:n}}function nk(t){return t.diff(Xn.moment.unix(0),"seconds")}function sk(t){if(t.length!==0)return t.slice().sort()[Math.floor(t.length/2)]}function bu(t,e){return new Proxy(t,{get(r,i){return i==="length"?Math.min(e,r.length):r[i]}})}function ak(t,e,r){return t.length<=e?new Array(e-t.length).fill(r).join("")+t:t.substring(t.length-e)}function ok(t,e){if(e<=0)return t;let r=new Array(e).fill(" ").join(""),i=t.substring(e,t.length);return r+i}function cv(t,e,r){return t<=e&&e<=r}function yn(t){let[e,...r]=t.split("/");return[e!=null?e:"",r.length===0?void 0:r.join("/")]}function xn(t){return t.endsWith("/")?t:t.split("/").last().replace(/\.md$/,"")}function lk(t){return t===1?"1 minute":`${t} minutes`}function e3(t){let e=t.lastIndexOf(".");return t.substring(e+1)}function al(t){if(t.endsWith(".md"))return!1;let e=e3(t);return IS.includes(e)}function uv(t){return(t.startsWith("https://github.com/")||t.startsWith("https://gitlab.com/"))&&(t.endsWith(".git")||(t=t+".git")),t}function ol(t,e){let r=e.vault.getAbstractFileByPath(t);if(!(r instanceof Xn.TFile))return!1;try{return!!e.viewRegistry.getTypeByExtension(r.extension)}catch(i){return!0}}function ck({isFolder:t,gitRelativePath:e}){let r="/";return r+=e,t&&(r+="/"),r.replace(/([\\!#*?[\]])/g,String.raw`\$1`).replace(/\s(?=\s*$)/g,String.raw`\ `)}function ll(t,e,r,i){let n=e.target;t.workspace.trigger("hover-link",{event:e,source:r.getViewType(),hoverParent:r,targetEl:n,linktext:i})}function _u(t,e,r={}){return new Promise((i,n)=>{let s=(0,rk.spawn)(t,e,r),a="",o="";s.stdout.on("data",l=>{a+=l.toString()}),s.stderr.on("data",l=>{o+=l.toString()}),s.on("error",l=>{i({error:new Error(l.message),stdout:a,stderr:o,code:1})}),s.on("close",l=>{i({stdout:a,stderr:o,code:l!=null?l:1,error:void 0})})})}m();var uk=require("os"),Hd=require("obsidian");var cl=class{constructor(e){this.plugin=e,this.app=e.app}async withGitOperation(e,r){var i;this.plugin.setPluginState({operation:e});try{return await r()}finally{(i=this.plugin.statusBar)==null||i.clearProgress(!1),this.plugin.setPluginState({operation:0})}}getRelativeVaultPath(e){return this.plugin.settings.basePath?e===""||e==="."?this.plugin.settings.basePath:this.plugin.settings.basePath+"/"+e:e}getRelativeRepoPath(e,r=!0){if(r){let i=this.plugin.settings.basePath;if(i&&i.length>0){if(e.startsWith(i+"/"))return e.substring(i.length+1);if(e===i)return""}}return e}unload(){}simplify(e){var r,i,n,s;for(let a of e){for(;;){let o=((r=a.children)==null?void 0:r.length)==1,l=((n=(i=a.children)==null?void 0:i.first())==null?void 0:n.data)==null;if(!(a.children!=null&&o&&l))break;let c=a.children.first();a.title+="/"+c.title,a.data=c.data,a.path=c.path,a.vaultPath=c.vaultPath,a.children=c.children}a.children!=null&&this.simplify(a.children),(s=a.children)==null||s.sort((o,l)=>{let c=(l.data==null?1:0)-(o.data==null?1:0);return c!=0?c:o.title.localeCompare(l.title)})}return e.sort((a,o)=>{let l=(o.data==null?1:0)-(a.data==null?1:0);return l!=0?l:a.title.localeCompare(o.title)})}getTreeStructure(e){let r=new Map;for(let a of e){let o=a.path.split("/"),l=r,c="";for(let u=0;u{let o=[];for(let l of a.values())l.children.size>0?o.push({title:l.title,path:l.path,vaultPath:this.getRelativeVaultPath(l.path),children:i(l.children)}):o.push({title:l.title,data:l.data,path:l.path,vaultPath:this.getRelativeVaultPath(l.path)});return o},n=i(r);return this.simplify(n)}async formatCommitMessage(e){let r;if(e.includes("{{numFiles}}")){r=await this.status();let i=r.staged.length;e=e.replace("{{numFiles}}",String(i))}if(e.includes("{{hostname}}")){let i=this.plugin.localStorage.getHostname()||"";!i&&Hd.Platform.isDesktopApp&&(i=(0,uk.hostname)()),e=e.replace("{{hostname}}",i)}if(e.includes("{{files}}")){r=r!=null?r:await this.status();let i={},n="";if(r.staged.length<100){r.staged.forEach(a=>{a.index in i?i[a.index].push(a.path):i[a.index]=[a.path]});let s=[];for(let[a,o]of Object.entries(i))s.push(a+" "+o.join(" "));n=s.join(", ")}else n="Too many files to list";e=e.replace("{{files}}",n)}if(e=e.replace("{{date}}",(0,Hd.moment)().format(this.plugin.settings.commitDateFormat)),this.plugin.settings.listChangedFilesInMessageBody){let i=r!=null?r:await this.status(),n="";i.staged.length<100?n=i.staged.map(s=>s.path).join(` +`):n="Too many files to list",e=e+` + +Affected files: +`+n}return e}};m();var bi=require("obsidian"),Ud=class{constructor(e,r){this.plugin=r;this.promises={};this.adapter=e.adapter,this.vault=e,this.lastBasePath=this.plugin.settings.basePath,this.promises.readFile=this.readFile.bind(this),this.promises.writeFile=this.writeFile.bind(this),this.promises.readdir=this.readdir.bind(this),this.promises.mkdir=this.mkdir.bind(this),this.promises.rmdir=this.rmdir.bind(this),this.promises.stat=this.stat.bind(this),this.promises.unlink=this.unlink.bind(this),this.promises.lstat=this.lstat.bind(this),this.promises.readlink=this.readlink.bind(this),this.promises.symlink=this.symlink.bind(this)}async readFile(e,r){var n;if(this.maybeLog("Read: "+e+JSON.stringify(r)),(typeof r=="string"?r:r==null?void 0:r.encoding)==="utf8"){let s=this.vault.getAbstractFileByPath(e);return s instanceof bi.TFile?(this.maybeLog("Reuse"),this.vault.read(s)):this.adapter.read(e)}else{if(this.isIndexPath(e))return this.plugin.settings.basePath!=this.lastBasePath?(this.clearIndex(),this.lastBasePath=this.plugin.settings.basePath,this.adapter.readBinary(e)):(n=this.index)!=null?n:this.adapter.readBinary(e);let s=this.vault.getAbstractFileByPath(e);return s instanceof bi.TFile?(this.maybeLog("Reuse"),this.vault.readBinary(s)):this.adapter.readBinary(e)}}async writeFile(e,r){var i;if(this.maybeLog("Write: "+e),typeof r=="string"){let n=this.vault.getAbstractFileByPath(e);if(n instanceof bi.TFile)return this.vault.modify(n,r);if(!this.isHiddenPath(e))await this.vault.create(e,r);else return this.adapter.write(e,r)}else{let n=t3(r);if(this.isIndexPath(e)){this.index=n;let s=Date.now();(i=this.indexctime)!=null||(this.indexctime=s),this.indexmtime=s}else{let s=this.vault.getAbstractFileByPath(e);if(s instanceof bi.TFile)return this.vault.modifyBinary(s,n);if(!this.isHiddenPath(e))await this.vault.createBinary(e,n);else return this.adapter.writeBinary(e,n)}}}async readdir(e){e==="."&&(e="/");let r=await this.adapter.list(e),i=[...r.files,...r.folders],n;return e!=="/"?n=i.map(s=>(0,bi.normalizePath)(s.substring(e.length))):n=i,n}async mkdir(e){if(!(e==="."||e==="/")){if(!this.isHiddenPath(e)){if(this.vault.getFolderByPath(e))return;await this.vault.createFolder(e);return}return this.adapter.mkdir(e)}}async rmdir(e,r){var i,n;if(!this.isHiddenPath(e)){let s=this.vault.getAbstractFileByPath(e);if(s instanceof bi.TFolder){await this.vault.delete(s,(r==null?void 0:r.recursive)===!0||((i=r==null?void 0:r.options)==null?void 0:i.recursive)===!0);return}}return this.adapter.rmdir(e,(r==null?void 0:r.recursive)===!0||((n=r==null?void 0:r.options)==null?void 0:n.recursive)===!0)}async stat(e){if(this.isIndexPath(e)){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.byteLength,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let i=await this.adapter.stat(e);if(i==null)throw{code:"ENOENT"};return this.indexctime=i.ctime,this.indexmtime=i.mtime,{ctimeMs:i.ctime,mtimeMs:i.mtime,size:i.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}e==="."&&(e="/");let r=this.vault.getAbstractFileByPath(e);if(this.maybeLog("Stat: "+e),r instanceof bi.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let i=await this.adapter.stat(e);if(i)return{ctimeMs:i.ctime,mtimeMs:i.mtime,size:i.size,type:i.type==="folder"?"directory":i.type,isFile:()=>i.type==="file",isDirectory:()=>i.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(e){if(!this.isHiddenPath(e)){let r=this.vault.getAbstractFileByPath(e);if(r instanceof bi.TFile)return this.vault.delete(r)}return this.adapter.remove(e)}async lstat(e){return this.stat(e)}async readlink(e){throw new Error(`readlink of (${e}) is not implemented.`)}async symlink(e){throw new Error(`symlink of (${e}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.getIndexPath(),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}getIndexPath(){return this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index")}isIndexPath(e){return e===this.getIndexPath()}isHiddenPath(e){return e.startsWith(this.gitDir)?!0:(0,bi.normalizePath)(e).split("/").some(r=>r.startsWith(".")&&r!==".")}maybeLog(e){}};function t3(t){return t instanceof ArrayBuffer?t:t.buffer instanceof ArrayBuffer&&t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer}var gk=ft(mk(),1),zi=class extends cl{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new Ud(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir?this.getGitDirPath():void 0,onAuth:()=>{var r,i;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(i=this.plugin.localStorage.getPassword())!=null?i:void 0}},onAuthFailure:async()=>{new En.Notice("Authentication failed. Please try with different credentials");let r=await new rt(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let i=await new rt(this.plugin,{placeholder:"Specify your password/personal access token",obscure:!0}).openAndGetResult();if(i)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(i),{username:r,password:i}}return{cancel:!0}},http:{async request({url:r,method:i,headers:n,body:s}){let a;s&&(a=await s3(s));let o=await(0,En.requestUrl)({url:r,method:i,headers:{"Accept-Encoding":"identity",...n},body:a,throw:!1}),l=await a3(o.arrayBuffer);return{url:r,method:i,headers:o.headers,body:n3(l),statusCode:o.status,statusMessage:o.status.toString()}}}}}async wrapFS(r){try{let i=await r;return await this.fs.saveAndClear(),i}catch(i){throw await this.fs.saveAndClear(),i}}async status(r){let i,n=window.setTimeout(()=>{i=new En.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let s={...this.getRepo()};(r==null?void 0:r.path)!=null&&(s.filepaths=[`${r.path}/`]);let a=(await this.wrapFS(de.statusMatrix(s))).map(f=>this.getFileStatusResult(f)),o=[],l=[],c=[];for(let f of a)f.workingDir!==" "&&o.push(f),f.index!==" "&&f.index!=="U"&&l.push(f),(f.index!=" "||f.workingDir!=" ")&&c.push(f);let u=[];return window.clearTimeout(n),i==null||i.hide(),{all:c,changed:o,staged:l,conflicted:u}}catch(s){throw window.clearTimeout(n),i==null||i.hide(),this.plugin.displayError(s),s}}async commitAll({message:r,status:i,unstagedFiles:n}){try{return await this.checkAuthorInfo(),await this.stageAll({status:i,unstagedFiles:n}),this.commit({message:r})}catch(s){throw this.plugin.displayError(s),s}}async commit({message:r}){return this.withGitOperation(2,async()=>{try{await this.checkAuthorInfo();let i=await this.formatCommitMessage(r),n=this.plugin.localStorage.getConflict(),s;if(n){let a=await this.branchInfo();s=[a.current,a.tracking]}await this.wrapFS(de.commit({...this.getRepo(),message:i,parent:s})),this.plugin.localStorage.setConflict(!1);return}catch(i){throw this.plugin.displayError(i),i}})}async stage(r,i){let n=this.getRelativeRepoPath(r,i),s;i?s=r:s=this.getRelativeVaultPath(r);try{await this.app.vault.adapter.exists(s)?await this.wrapFS(de.add({...this.getRepo(),filepath:n})):await this.wrapFS(de.remove({...this.getRepo(),filepath:n}))}catch(a){throw this.plugin.displayError(a),a}}async stageAll({dir:r,status:i,unstagedFiles:n}){try{if(i)await this.stageFiles(i.changed.map(s=>({path:s.path,deleted:s.workingDir==="D"})));else{let s=n!=null?n:await this.getUnstagedFiles(r!=null?r:".");await this.stageFiles(s.map(({path:a,type:o})=>({path:a,deleted:o==="D"})))}}catch(s){throw this.plugin.displayError(s),s}}async stageFiles(r){let n=(await this.wrapFS(Promise.allSettled(r.map(s=>s.deleted?de.remove({...this.getRepo(),filepath:s.path}):de.add({...this.getRepo(),filepath:s.path}))))).find(s=>s.status==="rejected");if((n==null?void 0:n.status)==="rejected")throw n.reason}async unstage(r,i){try{r=this.getRelativeRepoPath(r,i),await this.wrapFS(de.resetIndex({...this.getRepo(),filepath:r}))}catch(n){throw this.plugin.displayError(n),n}}async unstageAll({dir:r,status:i}){try{let n;i?n=i.staged.map(s=>s.path):n=(await this.getStagedFiles(r!=null?r:".")).map(({path:a})=>a),await this.wrapFS(Promise.all(n.map(s=>de.resetIndex({...this.getRepo(),filepath:s}))))}catch(n){throw this.plugin.displayError(n),n}}async discard(r){try{await this.wrapFS(de.checkout({...this.getRepo(),filepaths:[r],force:!0}))}catch(i){throw this.plugin.displayError(i),i}}async discardAll({dir:r,status:i}){let n=[];i?r!=null?n=i.changed.filter(s=>s.workingDir!="U"&&s.path.startsWith(r)).map(s=>s.path):n=i.changed.filter(s=>s.workingDir!="U").map(s=>s.path):n=(await this.getUnstagedFiles(r)).filter(s=>s.type!="A").map(({path:s})=>s);try{await this.wrapFS(de.checkout({...this.getRepo(),filepaths:n,force:!0}))}catch(s){throw this.plugin.displayError(s),s}}async getUntrackedPaths(r){let i=[];if(r.status)for(let n of r.status.changed)n.index=="U"&&n.workingDir==="U"&&n.path.startsWith(r.path!=null?`${r.path}/`:"")&&i.push(n.path);else{let n=await this.status({path:r==null?void 0:r.path});for(let s of n.changed)s.index==="U"&&s.workingDir==="U"&&i.push(s.path)}return i}getProgressText(r,i){let n=`${r} progress:`;return i.phase&&(n=`${n} ${i.phase}:`),i.loaded&&(n=`${n} ${i.loaded}`,i.total&&(n=`${n} of ${i.total}`)),n}resolveRef(r){return this.wrapFS(de.resolveRef({...this.getRepo(),ref:r}))}async pull(){let r=this.showNotice("Initializing pull");return this.withGitOperation(1,async()=>{try{let i=await this.resolveRef("HEAD");await this.fetch();let n=await this.branchInfo();await this.checkAuthorInfo(),(await this.wrapFS(de.merge({...this.getRepo(),ours:n.current,theirs:n.tracking,abortOnConflict:!1,mergeDriver:this.plugin.settings.mergeStrategy!=="none"?({contents:l})=>{var _,C,x;let c=l[0],u=l[1],f=l[2],d=/^.*(\r?\n|$)/gm,h=(_=u.match(d))!=null?_:[],p=(C=c.match(d))!=null?C:[],g=(x=f.match(d))!=null?x:[],v=(0,gk.default)(h,p,g),b="";for(let S of v)S.ok&&(b+=S.ok.join("")),S.conflict&&(b+=this.plugin.settings.mergeStrategy==="ours"?S.conflict.a.join(""):S.conflict.b.join(""));return{cleanMerge:!0,mergedText:b}}:void 0}))).alreadyMerged||await this.wrapFS(de.checkout({...this.getRepo(),ref:n.current,onProgress:l=>{r!==void 0&&r.setMessage(this.getProgressText("Checkout",l))},remote:n.remote})),r==null||r.hide();let a=await this.resolveRef("HEAD"),o=await this.getFileChangesCount(i,a);return this.showNotice("Finished pull",!1),o.map(l=>({path:l.path,workingDir:"P",index:"P",vaultPath:this.getRelativeVaultPath(l.path)}))}catch(i){throw r==null||r.hide(),i instanceof lu.MergeConflictError&&await this.plugin.handleConflict(i.data.filepaths.map(n=>this.getRelativeVaultPath(n))),this.plugin.displayError(i),i}})}async push(){if(!await this.canPush())return 0;let r=this.showNotice("Initializing push");return this.withGitOperation(3,async()=>{try{let i=await this.branchInfo(),n=i.tracking,s=i.current,a=(await this.getFileChangesCount(s,n)).length,o=await this.getCurrentRemote();return await this.wrapFS(de.push({...this.getRepo(),remote:o,onProgress:l=>{r!==void 0&&r.setMessage(this.getProgressText("Pushing",l))}})),r==null||r.hide(),a}catch(i){throw r==null||r.hide(),this.plugin.displayError(i),i}})}async getUnpushedCommits(){let r=await this.branchInfo(),i=r.tracking,n=r.current;if(i==null||n==null)return 0;let s=await this.resolveRef(n),a=await this.resolveRef(i);return(await this.getFileChangesCount(s,a)).length}async canPush(){let r=await this.branchInfo(),i=r.tracking,n=r.current,s=await this.resolveRef(n),a=await this.resolveRef(i);return s!=a}async checkRequirements(){return await this.plugin.app.vault.adapter.exists((0,En.normalizePath)(`${this.getGitDirPath()}/HEAD`))?"valid":"missing-repo"}async branchInfo(){var r,i;try{let n=await de.currentBranch(this.getRepo())||"",s=await de.listBranches(this.getRepo()),a=(r=await this.getConfig(`branch.${n}.remote`))!=null?r:"origin",o=(i=await this.getConfig(`branch.${n}.merge`))==null?void 0:i.split("refs/heads")[1],l=o?a+o:void 0;return{current:n,tracking:l,branches:s,remote:a}}catch(n){throw this.plugin.displayError(n),n}}async getCurrentRemote(){var n;let r=await de.currentBranch(this.getRepo())||"";return(n=await this.getConfig(`branch.${r}.remote`))!=null?n:"origin"}async checkout(r,i){try{return this.wrapFS(de.checkout({...this.getRepo(),ref:r,force:!!i,remote:i}))}catch(n){throw this.plugin.displayError(n),n}}async createBranch(r){try{await this.wrapFS(de.branch({...this.getRepo(),ref:r,checkout:!0}))}catch(i){throw this.plugin.displayError(i),i}}async deleteBranch(r){try{await this.wrapFS(de.deleteBranch({...this.getRepo(),ref:r}))}catch(i){throw this.plugin.displayError(i),i}}branchIsMerged(r){return Promise.resolve(!0)}async init(){try{await this.wrapFS(de.init(this.getRepo()))}catch(r){throw this.plugin.displayError(r),r}}async clone(r,i,n){let s=this.showNotice("Initializing clone");try{await this.wrapFS(de.clone({...this.getRepo(),dir:i,url:r,depth:n,onProgress:a=>{s!==void 0&&s.setMessage(this.getProgressText("Cloning",a))}})),s==null||s.hide()}catch(a){throw s==null||s.hide(),this.plugin.displayError(a),a}}async setConfig(r,i){try{return this.wrapFS(de.setConfig({...this.getRepo(),path:r,value:i}))}catch(n){throw this.plugin.displayError(n),n}}async getConfig(r){try{return this.wrapFS(de.getConfig({...this.getRepo(),path:r}))}catch(i){throw this.plugin.displayError(i),i}}async fetch(r){let i=this.showNotice("Initializing fetch");try{let n={...this.getRepo(),onProgress:s=>{i!==void 0&&i.setMessage(this.getProgressText("Fetching",s))},remote:r!=null?r:await this.getCurrentRemote()};await this.wrapFS(de.fetch(n)),i==null||i.hide()}catch(n){throw this.plugin.displayError(n),i==null||i.hide(),n}}async setRemote(r,i){try{await this.wrapFS(de.addRemote({...this.getRepo(),remote:r,url:i,force:!0}))}catch(n){throw this.plugin.displayError(n),n}}async getRemoteBranches(r){let i=[];return i.push(...await this.wrapFS(de.listBranches({...this.getRepo(),remote:r}))),i.remove("HEAD"),i=i.map(n=>`${r}/${n}`),i}async getRemotes(){return(await this.wrapFS(de.listRemotes({...this.getRepo()}))).map(r=>r.remote)}async removeRemote(r){await this.wrapFS(de.deleteRemote({...this.getRepo(),remote:r}))}async getRemoteUrl(r){var i;return(i=(await this.wrapFS(de.listRemotes({...this.getRepo()}))).filter(n=>n.remote==r)[0])==null?void 0:i.url}async log(r,i=!0,n,s){let a=await this.wrapFS(de.log({...this.getRepo(),depth:n,ref:s}));return Promise.all(a.map(async o=>{var c;let l=o.commit.message.split(` + +`);return{message:(c=l[0])!=null?c:"",author:{name:o.commit.author.name,email:o.commit.author.email},body:l.slice(1).join(` + +`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(u=>({path:u.path,status:u.type,vaultPath:this.getRelativeVaultPath(u.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}getGitDirPath(){return(0,En.normalizePath)(this.getRelativeVaultPath(this.plugin.settings.gitDir||".git"))}async updateUpstreamBranch(r){let[i,n]=yn(r),s=await this.branchInfo();await this.wrapFS(de.push({...this.getRepo(),remote:i,remoteRef:n})),await this.setConfig(`branch.${s.current}.merge`,`refs/heads/${n}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,i){return this.walkDifference({walkers:[de.TREE({ref:r}),de.TREE({ref:i})]})}async walkDifference({walkers:r,dir:i}){return await this.wrapFS(de.walk({...this.getRepo(),trees:r,map:async function(s,[a,o]){if(!ov(s,i))return null;if(await(a==null?void 0:a.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let l=await(a==null?void 0:a.oid()),c=await(o==null?void 0:o.oid()),u="equal";if(l!==c&&(u="M"),l===void 0&&(u="A"),c===void 0&&(u="D"),l===void 0&&c===void 0&&(console.log("Something weird happened:"),console.log(a),console.log(o)),u!=="equal")return{path:s,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[de.TREE({ref:"HEAD"}),de.STAGE()],dir:r})).map(n=>({vaultPath:this.getRelativeVaultPath(n.path),path:n.path}))}async getUnstagedFiles(r="."){let i,n=window.setTimeout(()=>{i=new En.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let s=this.getRepo(),a=await this.wrapFS(de.walk({...s,trees:[de.WORKDIR(),de.STAGE()],map:async function(o,[l,c]){if(!c&&l&&await de.isIgnored({...s,filepath:o})||!ov(o,r))return null;let[u,f]=await Promise.all([l&&l.type(),c&&c.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await c.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await l.oid()),p?h?p!==h?{path:o,type:"M"}:null:{path:o,type:"A"}:{path:o,type:"D"}}}));return window.clearTimeout(n),i==null||i.hide(),a}catch(s){throw window.clearTimeout(n),i==null||i.hide(),this.plugin.displayError(s),s}}async getDiffString(r,i=!1,n){let s=this.getRelativeVaultPath(r),a=async(c,[u])=>{if(r==c){let f=await u.oid();return(await de.readBlob({...this.getRepo(),oid:f})).blob}};if(n){let c=await pu({...this.getRepo(),filepath:r,oid:n}).then(p=>new TextDecoder().decode(p.blob)).catch(p=>{if(!(p instanceof de.Errors.NotFoundError))throw p}),f=(await de.readCommit({...this.getRepo(),oid:n})).commit.parent.first(),d;return f&&(d=await pu({...this.getRepo(),filepath:r,oid:f}).then(p=>new TextDecoder().decode(p.blob)).catch(p=>{if(!(p instanceof de.Errors.NotFoundError))throw p})),gu(s,d!=null?d:"",c!=null?c:"")}let o=(await de.walk({...this.getRepo(),trees:[de.STAGE()],map:a})).first(),l=new TextDecoder().decode(o);if(i){let c=await this.resolveRef("HEAD").then(f=>pu({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof de.Errors.NotFoundError))throw f});return gu(s,c!=null?c:"",l)}else{let c;return await this.app.vault.adapter.exists(s)?c=await this.app.vault.adapter.read(s):c="",gu(s,l,c)}}async getLastCommitTime(){let r=this.getRepo(),i=await this.resolveRef("HEAD"),s=(await de.readCommit({...r,oid:i})).commit.committer.timestamp;return new Date(s*1e3)}getFileStatusResult(r){var n,s;let i=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:i[0]=="?"?"U":(n=i[0])!=null?n:" ",workingDir:i[1]=="?"?"U":(s=i[1])!=null?s:" ",path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),i=await this.getConfig("user.email");if(!r||!i)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,i=!0){if(!this.plugin.settings.disablePopups)return new En.Notice(r,i?this.noticeLength:void 0)}};async function*n3(t){yield new Uint8Array(t)}async function s3(t){let e=new ReadableStream({async start(i){for await(let n of t)i.enqueue(n);i.close()}});return await new Response(e).arrayBuffer()}async function a3(t){let e=new Uint8Array(t);if(e.length<2||e[0]!==31||e[1]!==139)return t;try{let r=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));return await new Response(r).arrayBuffer()}catch(r){return t}}m();var hT=ft(Vd(),1),ri=ft(require("fs/promises"),1),Qn=require("obsidian"),Le=ft(require("path"),1),Ru=require("path");m();var eh=ft(xk(),1);m();var fv=new WeakMap;function pl(...t){let e=new String(t);return fv.set(e,t),e}function _i(t){return t instanceof String&&fv.has(t)}function ml(t){var e;return(e=fv.get(t))!=null?e:[]}var Qd=ft(Vd(),1),QC=require("child_process");var OA=ft(hv(),1),qA=require("node:path");m();function*Ek(t,e){let r=e==="global";for(let i of t)i.isGlobal===r&&(yield i)}var k3=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),C3=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),A3=new Set(["edit","remove-section","rename-section","set","unset"]),T3=new Set(["get","get-color","get-colorbool","list"]);function P3(t,e){var i;for(let{name:n}of Ek(t,"task")){if(k3.has(n))return gl(!0,e);if(C3.has(n))return gl(!1,e)}let r=(i=e.at(0))==null?void 0:i.toLowerCase();return r===void 0?null:A3.has(r)?gl(!0,e.slice(1)):T3.has(r)?gl(!1,e.slice(1)):e.length===1?gl(!1,e):gl(!0,e)}function gl(t=!1,e=[]){var i;let r=(i=e.at(0))==null?void 0:i.toLowerCase();return r===void 0?null:{isWrite:t,isRead:!t,key:r,value:e.at(1)}}function R3(t,e){return e.isWrite&&e.value!==void 0?{key:e.key,value:e.value,scope:t}:{key:e.key,scope:t}}function $3(t){let e=(t==null?void 0:t.indexOf("="))||-1;return!t||e<0?null:{key:t.slice(0,e).trim().toLowerCase(),value:t.slice(e+1)}}function F3(t){for(let{name:e}of Ek(t,"task"))switch(e){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}function I3({name:t}){if(t==="-c"||t==="--config")return"inline";if(t==="--config-env")return"env"}function*M3(t){for(let e of t){let r=I3(e),i=r&&$3(e.value);i&&(yield{...i,scope:r})}}function D3(t,e,r){let i={read:[],write:[...M3(e)]};return t==="config"&&O3(i,F3(e),P3(e,r)),i}function O3(t,e,r){if(r===null)return;let i=R3(e,r);r.isWrite?t.write.push(i):t.read.push(i)}var Sk={short:new Map([["c",!0]])},L3={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...Sk.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},N3={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])}},B3={short:new Map,long:new Set};function H3(t){var r;let e=(r=N3[t!=null?t:""])!=null?r:B3;return{short:new Map([...Sk.short.entries(),...e.short.entries()]),long:e.long}}function kk(t,e=L3){if(t.startsWith("--")){let r=t.indexOf("=");if(r>2)return[{name:t.slice(0,r),value:t.slice(r+1),needsNext:!1}];let i=t.slice(2);return[{name:t,needsNext:e.long.has(i)}]}if(t.length===2){let r=t.charAt(1),i=e.short.get(r);return[{name:t,needsNext:i===!0}]}return U3(t,e.short)}function U3(t,e){let r=t.slice(1).split(""),i=[];for(let n=0;ne.has(l)))return i.push({name:`-${s}`,value:o,needsNext:!1}),i}i.push({name:`-${s}`,needsNext:a})}return i}function G3(t,e=[]){let r=0;for(;rfunction(){return t&&(e=(0,t[Dv(t)[0]])(t=0)),e},i8=(t,e)=>function(){return e||(0,t[Dv(t)[0]])((e={exports:{}}).exports,e),e.exports},St=(t,e)=>{for(var r in e)Mv(t,r,{get:e[r],enumerable:!0})},n8=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Dv(e))!r8.call(t,n)&&n!==r&&Mv(t,n,{get:()=>e[n],enumerable:!(i=t8(e,n))||i.enumerable});return t},_t=t=>n8(Mv({},"__esModule",{value:!0}),t),Br,Us=Y({"src/lib/errors/git-error.ts"(){"use strict";Br=class extends Error{constructor(t,e){super(e),this.task=t,Object.setPrototypeOf(this,new.target.prototype)}}}}),ku,_l=Y({"src/lib/errors/git-response-error.ts"(){"use strict";Us(),ku=class extends Br{constructor(t,e){super(void 0,e||String(t)),this.git=t}}}}),oC,lC=Y({"src/lib/errors/task-configuration-error.ts"(){"use strict";Us(),oC=class extends Br{constructor(t){super(void 0,t)}}}});function cC(t){return typeof t!="function"?$a:t}function uC(t){return typeof t=="function"&&t!==$a}function fC(t,e){let r=t.indexOf(e);return r<=0?[t,""]:[t.substr(0,r),t.substr(r+1)]}function dC(t,e=0){return hC(t)&&t.length>e?t[e]:void 0}function Ra(t,e=0){if(hC(t)&&t.length>e)return t[t.length-1-e]}function hC(t){return nh(t)}function Cu(t="",e=!0,r=` +`){return t.split(r).reduce((i,n)=>{let s=e?n.trim():n;return s&&i.push(s),i},[])}function Ov(t,e){return Cu(t,!0).map(r=>e(r))}function Lv(t){return(0,eh.exists)(t,eh.FOLDER)}function Ei(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}function pC(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}function th(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}function Sn(t){return Array.isArray(t)?t:[t]}function mC(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}function yl(t){return Sn(t).map(e=>e instanceof String?e:String(e))}function Qe(t,e=0){if(t==null)return e;let r=parseInt(t,10);return Number.isNaN(r)?e:r}function Eu(t,e){let r=[];for(let i=0,n=t.length;i{t[i]!==void 0&&(r[i]=t[i])}),r}function _v(t=0){return new Promise(e=>setTimeout(e,t))}function yv(t){if(t!==!1)return t}var wl,$a,Au,rh=Y({"src/lib/utils/util.ts"(){"use strict";Nv(),wl="\0",$a=()=>{},Au=Object.prototype.toString.call.bind(Object.prototype.toString)}});function ar(t,e,r){return e(t)?t:arguments.length>2?r:void 0}function xv(t,e){let r=_i(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}function ih(t){return!!t&&Au(t)==="[object Object]"}function vC(t){return typeof t=="function"}var Tu,wC,mt,Kd,nh,Nv=Y({"src/lib/utils/argument-filters.ts"(){"use strict";rh(),Tu=t=>Array.isArray(t),wC=t=>typeof t=="number",mt=t=>typeof t=="string"||_i(t),Kd=t=>mt(t)||Array.isArray(t)&&t.every(mt),nh=t=>t==null||"number|boolean|function".includes(typeof t)?!1:typeof t.length=="number"}}),Ev,s8=Y({"src/lib/utils/exit-codes.ts"(){"use strict";Ev=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))(Ev||{})}}),Xd,a8=Y({"src/lib/utils/git-output-streams.ts"(){"use strict";Xd=class bC{constructor(e,r){this.stdOut=e,this.stdErr=r}asStrings(){return new bC(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function o8(){throw new Error("LineParser:useMatches not implemented")}var be,Hs,l8=Y({"src/lib/utils/line-parser.ts"(){"use strict";be=class{constructor(t,e){this.matches=[],this.useMatches=o8,this.parse=(r,i)=>(this.resetMatches(),this._regExp.every((n,s)=>this.addMatch(n,s,r(s)))?this.useMatches(i,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let i=r&&t.exec(r);return i&&this.pushMatch(e,i),!!i}pushMatch(t,e){this.matches.push(...e.slice(1))}},Hs=class extends be{addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function _C(...t){let e=process.cwd(),r=Object.assign({baseDir:e,...yC},...t.filter(i=>typeof i=="object"&&i));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}var yC,c8=Y({"src/lib/utils/simple-git-options.ts"(){"use strict";yC={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Bv(t,e=[]){return ih(t)?Object.keys(t).reduce((r,i)=>{let n=t[i];if(_i(n))r.push(n);else if(xv(n,["boolean"]))r.push(i+"="+n);else if(Array.isArray(n))for(let s of n)xv(s,["string","number"])||r.push(i+"="+s);else r.push(i);return r},e):e}function yr(t,e=0,r=!1){let i=[];for(let n=0,s=e<0?t.length:e;n{for(let s=Cu(n,i),a=0,o=s.length;a{if(!(a+c>=o))return s[a+c]};e.some(({parse:c})=>c(l,t))}}),t}var d8=Y({"src/lib/utils/task-parser.ts"(){"use strict";rh()}}),xC={};St(xC,{ExitCodes:()=>Ev,GitOutputStreams:()=>Xd,LineParser:()=>be,NOOP:()=>$a,NULL:()=>wl,RemoteLineParser:()=>Hs,append:()=>Ei,appendTaskOptions:()=>Bv,asArray:()=>Sn,asCamelCase:()=>mC,asFunction:()=>cC,asNumber:()=>Qe,asStringArray:()=>yl,bufferToString:()=>Su,callTaskParser:()=>Sv,createInstanceConfig:()=>_C,delay:()=>_v,filterArray:()=>Tu,filterFunction:()=>vC,filterHasLength:()=>nh,filterNumber:()=>wC,filterPlainObject:()=>ih,filterPrimitives:()=>xv,filterString:()=>mt,filterStringOrStringArray:()=>Kd,filterType:()=>ar,first:()=>dC,folderExists:()=>Lv,forEachLineWithContent:()=>Ov,getTrailingOptions:()=>yr,including:()=>pC,isUserFunction:()=>uC,last:()=>Ra,objectToString:()=>Au,orVoid:()=>yv,parseStringResponse:()=>Hr,pick:()=>gC,prefixedArray:()=>Eu,remove:()=>th,splitOn:()=>fC,toLinesWithContent:()=>Cu,trailingFunctionArgument:()=>nt,trailingOptionsArgument:()=>Hv});var ge=Y({"src/lib/utils/index.ts"(){"use strict";Nv(),s8(),a8(),l8(),c8(),f8(),d8(),rh()}}),EC={};St(EC,{CheckRepoActions:()=>kv,checkIsBareRepoTask:()=>kC,checkIsRepoRootTask:()=>SC,checkIsRepoTask:()=>h8});function h8(t){switch(t){case"bare":return kC();case"root":return SC()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:sh,parser:Uv}}function SC(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:sh,parser(e){return/^\.(git)?$/.test(e.trim())}}}function kC(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:sh,parser:Uv}}function p8(t){return/(Not a git repository|Kein Git-Repository)/i.test(String(t))}var kv,sh,Uv,CC=Y({"src/lib/tasks/check-is-repo.ts"(){"use strict";ge(),kv=(t=>(t.BARE="bare",t.IN_TREE="tree",t.IS_REPO_ROOT="root",t))(kv||{}),sh=({exitCode:t},e,r,i)=>{if(t===128&&p8(e))return r(k.from("false"));i(e)},Uv=t=>t.trim()==="true"}});function m8(t,e){let r=new AC(t),i=t?PC:TC;return Cu(e).forEach(n=>{let s=n.replace(i,"");r.paths.push(s),(RC.test(s)?r.folders:r.files).push(s)}),r}var AC,TC,PC,RC,g8=Y({"src/lib/responses/CleanSummary.ts"(){"use strict";ge(),AC=class{constructor(t){this.dryRun=t,this.paths=[],this.files=[],this.folders=[]}},TC=/^[a-z]+\s*/i,PC=/^[a-z]+\s+[a-z]+\s*/i,RC=/\/$/}}),Cv={};St(Cv,{EMPTY_COMMANDS:()=>ah,adhocExecTask:()=>$C,configurationErrorTask:()=>Nr,isBufferTask:()=>IC,isEmptyTask:()=>MC,straightThroughBufferTask:()=>FC,straightThroughStringTask:()=>xr});function $C(t){return{commands:ah,format:"empty",parser:t}}function Nr(t){return{commands:ah,format:"empty",parser(){throw typeof t=="string"?new oC(t):t}}}function xr(t,e=!1){return{commands:t,format:"utf-8",parser(r){return e?String(r).trim():r}}}function FC(t){return{commands:t,format:"buffer",parser(e){return e}}}function IC(t){return t.format==="buffer"}function MC(t){return t.format==="empty"||!t.commands.length}var ah,yt=Y({"src/lib/tasks/task.ts"(){"use strict";lC(),ah=[]}}),DC={};St(DC,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Gv,CONFIG_ERROR_MODE_REQUIRED:()=>jv,CONFIG_ERROR_UNKNOWN_OPTION:()=>Vv,CleanOptions:()=>Pa,cleanTask:()=>OC,cleanWithOptionsTask:()=>v8,isCleanOptionsArray:()=>w8});function v8(t,e){let{cleanMode:r,options:i,valid:n}=b8(t);return r?n.options?(i.push(...e),i.some(x8)?Nr(Gv):OC(r,i)):Nr(Vv+JSON.stringify(t)):Nr(jv)}function OC(t,e){return{commands:["clean",`-${t}`,...e],format:"utf-8",parser(i){return m8(t==="n",i)}}}function w8(t){return Array.isArray(t)&&t.every(e=>zv.has(e))}function b8(t){let e,r=[],i={cleanMode:!1,options:!0};return t.replace(/[^a-z]i/g,"").split("").forEach(n=>{_8(n)?(e=n,i.cleanMode=!0):i.options=i.options&&y8(r[r.length]=`-${n}`)}),{cleanMode:e,options:r,valid:i}}function _8(t){return t==="f"||t==="n"}function y8(t){return/^-[a-z]$/i.test(t)&&zv.has(t.charAt(1))}function x8(t){return/^-[^\-]/.test(t)?t.indexOf("i")>0:t==="--interactive"}var Gv,jv,Vv,Pa,zv,LC=Y({"src/lib/tasks/clean.ts"(){"use strict";g8(),ge(),yt(),Gv="Git clean interactive mode is not supported",jv='Git clean mode parameter ("n" or "f") is required',Vv="Git clean unknown option found in: ",Pa=(t=>(t.DRY_RUN="n",t.FORCE="f",t.IGNORED_INCLUDED="x",t.IGNORED_ONLY="X",t.EXCLUDING="e",t.QUIET="q",t.RECURSIVE="d",t))(Pa||{}),zv=new Set(["i",...yl(Object.values(Pa))])}});function E8(t){let e=new BC;for(let r of NC(t))e.addValue(r.file,String(r.key),r.value);return e}function S8(t,e){let r=null,i=[],n=new Map;for(let s of NC(t,e))s.key===e&&(i.push(r=s.value),n.has(s.file)||n.set(s.file,[]),n.get(s.file).push(r));return{key:e,paths:Array.from(n.keys()),scopes:n,value:r,values:i}}function k8(t){return t.replace(/^(file):/,"")}function*NC(t,e=null){let r=t.split("\0");for(let i=0,n=r.length-1;iObject.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=Ra(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let i=this.addFile(t);Object.hasOwn(i,e)?Array.isArray(i[e])?i[e].push(r):i[e]=[i[e],r]:i[e]=r,this._all=void 0}}}});function pv(t,e){return typeof t=="string"&&Object.hasOwn(Av,t)?t:e}function A8(t,e,r,i){let n=["config",`--${i}`];return r&&n.push("--add"),n.push(t,e),{commands:n,format:"utf-8",parser(s){return s}}}function T8(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(i){return S8(i,t)}}}function P8(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return E8(r)}}}function R8(){return{addConfig(t,e,...r){return this._runTask(A8(t,e,r[0]===!0,pv(r[1],"local")),nt(arguments))},getConfig(t,e){return this._runTask(T8(t,pv(e,void 0)),nt(arguments))},listConfig(...t){return this._runTask(P8(pv(t[0],void 0)),nt(arguments))}}}var Av,HC=Y({"src/lib/tasks/config.ts"(){"use strict";C8(),ge(),Av=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(Av||{})}});function $8(t){return UC.has(t)}var mv,UC,GC=Y({"src/lib/tasks/diff-name-status.ts"(){"use strict";mv=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(mv||{}),UC=new Set(Object.values(mv))}});function F8(...t){return new VC().param(...t)}function I8(t){let e=new Set,r={};return Ov(t,i=>{let[n,s,a]=i.split(wl);e.add(n),(r[n]=r[n]||[]).push({line:Qe(s),path:n,preview:a})}),{paths:e,results:r}}function M8(){return{grep(t){let e=nt(arguments),r=yr(arguments);for(let n of jC)if(r.includes(n))return this._runTask(Nr(`git.grep: use of "${n}" is not supported.`),e);typeof t=="string"&&(t=F8().param(t));let i=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:i,format:"utf-8",parser(n){return I8(n)}},e)}}}var jC,xu,Rk,VC,zC=Y({"src/lib/tasks/grep.ts"(){"use strict";ge(),yt(),jC=["-h"],xu=Symbol("grepQuery"),VC=class{constructor(){this[Rk]=[]}*[(Rk=xu,Symbol.iterator)](){for(let t of this[xu])yield t}and(...t){return t.length&&this[xu].push("--and","(",...Eu(t,"-e"),")"),this}param(...t){return this[xu].push(...Eu(t,"-e")),this}}}}),WC={};St(WC,{ResetMode:()=>qd,getResetMode:()=>O8,resetTask:()=>D8});function D8(t,e){let r=["reset"];return qC(t)&&r.push(`--${t}`),r.push(...e),xr(r)}function O8(t){if(qC(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}function qC(t){return typeof t=="string"&&YC.includes(t)}var qd,YC,ZC=Y({"src/lib/tasks/reset.ts"(){"use strict";ge(),yt(),qd=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(qd||{}),YC=yl(Object.values(qd))}});function L8(){return(0,Qd.default)("simple-git")}function $k(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(i,...n)=>{t(i,...n),r(i,...n)}:t:(i,...n)=>{t(`%s ${i}`,e,...n),r&&r(i,...n)}}function N8(t,e,{namespace:r}){if(typeof t=="string")return t;let i=e&&e.namespace||"";return i.startsWith(r)?i.substr(r.length+1):i||r}function Wv(t,e,r,i=L8()){let n=t&&`[${t}]`||"",s=[],a=typeof e=="string"?i.extend(e):e,o=N8(ar(e,mt),a,i);return c(r);function l(u,f){return Ei(s,Wv(t,o.replace(/^[^:]+/,u),f,i))}function c(u){let f=u&&`[${u}]`||"",d=a&&$k(a,f)||$a,h=$k(i,`${n} ${f}`,d);return Object.assign(a?d:h,{label:t,sibling:l,info:h,step:c})}}var KC=Y({"src/lib/git-logger.ts"(){"use strict";ge(),Qd.default.formatters.L=t=>String(nh(t)?t.length:"-"),Qd.default.formatters.B=t=>k.isBuffer(t)?t.toString("utf8"):Au(t)}}),XC,B8=Y({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";var t;Us(),KC(),XC=(t=class{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let i=t.getName(r.commands[0]),n=Wv(this.logLabel,i);return{task:r,logger:n,name:i}}push(r){let i=this.createProgress(r);return i.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,i),i}fatal(r){for(let[i,{logger:n}]of Array.from(this._queue.entries()))i===r.task?(n.info("Failed %o",r),n("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):n.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(i);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let i=this.withProgress(r);if(!i)throw new Br(void 0,"TasksPendingQueue: attempt called for an unknown task");return i.logger("Starting task"),i}static getName(r="empty"){return`task:${r}:${++t.counter}`}},t.counter=0,t)}});function Ta(t,e){return{method:dC(t.commands)||"",commands:e}}function H8(t,e){return r=>{e("[ERROR] child process exception %o",r),t.push(k.from(String(r.stack),"ascii"))}}function Fk(t,e,r,i){return n=>{r("%s received %L bytes",e,n),i("%B",n),t.push(n)}}var Tv,U8=Y({"src/lib/runners/git-executor-chain.ts"(){"use strict";Us(),yt(),ge(),B8(),Tv=class{constructor(t,e,r){this._executor=t,this._scheduler=e,this._plugins=r,this._chain=Promise.resolve(),this._queue=new XC}get cwd(){return this._cwd||this._executor.cwd}set cwd(t){this._cwd=t}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(t){return this._queue.push(t),this._chain=this._chain.then(()=>this.attemptTask(t))}async attemptTask(t){let e=await this._scheduler.next(),r=()=>this._queue.complete(t);try{let{logger:i}=this._queue.attempt(t);return await(MC(t)?this.attemptEmptyTask(t,i):this.attemptRemoteTask(t,i))}catch(i){throw this.onFatalException(t,i)}finally{r(),e()}}onFatalException(t,e){let r=e instanceof Br?Object.assign(e,{task:t}):new Br(t,e&&String(e));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(t,e){let r=this._plugins.exec("spawn.binary","",Ta(t,t.commands)),i=this._plugins.exec("spawn.args",[...t.commands],{...Ta(t,t.commands),env:{...this.env}}),n=await this.gitResponse(t,r,i,this.outputHandler,e.step("SPAWN")),s=await this.handleTaskData(t,i,n,e.step("HANDLE"));return e("passing response to task's parser as a %s",t.format),IC(t)?Sv(t.parser,s):Sv(t.parser,s.asStrings())}async attemptEmptyTask(t,e){return e("empty task bypassing child process to call to task's parser"),t.parser(this)}handleTaskData(t,e,r,i){let{exitCode:n,rejection:s,stdOut:a,stdErr:o}=r;return new Promise((l,c)=>{i("Preparing to handle process response exitCode=%d stdOut=",n);let{error:u}=this._plugins.exec("task.error",{error:s},{...Ta(t,e),...r});if(u&&t.onError)return i.info("exitCode=%s handling with custom error handler"),t.onError(r,u,f=>{i.info("custom error handler treated as success"),i("custom error returned a %s",Au(f)),l(new Xd(Array.isArray(f)?k.concat(f):f,k.concat(o)))},c);if(u)return i.info("handling as error: exitCode=%s stdErr=%s rejection=%o",n,o.length,s),c(u);i.info("retrieving task output complete"),l(new Xd(k.concat(a),k.concat(o)))})}async gitResponse(t,e,r,i,n){let s=n.sibling("output"),a=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Ta(t,t.commands));return new Promise(o=>{let l=[],c=[];n.info("%s %o",e,r),n("%O",a);let u=this._beforeSpawn(t,r);if(u)return o({stdOut:l,stdErr:c,exitCode:9901,rejection:u});this._plugins.exec("spawn.before",void 0,{...Ta(t,r),kill(d){u=d||u}});let f=(0,QC.spawn)(e,r,a);f.stdout.on("data",Fk(l,"stdOut",n,s.step("stdOut"))),f.stderr.on("data",Fk(c,"stdErr",n,s.step("stdErr"))),f.on("error",H8(c,n)),i&&(n("Passing child process stdOut/stdErr to custom outputHandler"),i(e,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...Ta(t,r),spawned:f,close(d,h){o({stdOut:l,stdErr:c,exitCode:d,rejection:u||h})},kill(d){f.killed||(u=d,f.kill("SIGINT"))}})})}_beforeSpawn(t,e){let r;return this._plugins.exec("spawn.before",void 0,{...Ta(t,e),kill(i){r=i||r}}),r}}}}),JC={};St(JC,{GitExecutor:()=>eA});var eA,G8=Y({"src/lib/runners/git-executor.ts"(){"use strict";U8(),eA=class{constructor(t,e,r){this.cwd=t,this._scheduler=e,this._plugins=r,this._chain=new Tv(this,this._scheduler,this._plugins)}chain(){return new Tv(this,this._scheduler,this._plugins)}push(t){return this._chain.push(t)}}}});function j8(t,e,r=$a){let i=s=>{r(null,s)},n=s=>{(s==null?void 0:s.task)===t&&r(s instanceof ku?V8(s):s,void 0)};e.then(i,n)}function V8(t){let e=i=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${i} should be GitResponseError.git.${i}, this will no longer be available in version 3`),e=$a};return Object.create(t,Object.getOwnPropertyNames(t.git).reduce(r,{}));function r(i,n){return n in t||(i[n]={enumerable:!1,configurable:!1,get(){return e(n),t.git[n]}}),i}}var z8=Y({"src/lib/task-callback.ts"(){"use strict";_l(),ge()}});function Ik(t,e){return $C(r=>{if(!Lv(t))throw new Error(`Git.cwd: cannot change to non-directory "${t}"`);return(e||r).cwd=t})}var W8=Y({"src/lib/tasks/change-working-directory.ts"(){"use strict";ge(),yt()}});function gv(t){let e=["checkout",...t];return e[1]==="-b"&&e.includes("-B")&&(e[1]=th(e,"-B")),xr(e)}function q8(){return{checkout(){return this._runTask(gv(yr(arguments,1)),nt(arguments))},checkoutBranch(t,e){return this._runTask(gv(["-b",t,e,...yr(arguments)]),nt(arguments))},checkoutLocalBranch(t){return this._runTask(gv(["-b",t,...yr(arguments)]),nt(arguments))}}}var Y8=Y({"src/lib/tasks/checkout.ts"(){"use strict";ge(),yt()}});function Z8(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function K8(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(t){return Hr(Z8(),[tA],t)}})}}}var tA,X8=Y({"src/lib/tasks/count-objects.ts"(){"use strict";ge(),tA=new be(/([a-z-]+): (\d+)$/,(t,[e,r])=>{let i=mC(e);Object.hasOwn(t,i)&&(t[i]=Qe(r))})}});function Q8(t){return Hr({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},rA,t)}var rA,J8=Y({"src/lib/parsers/parse-commit.ts"(){"use strict";ge(),rA=[new be(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(t,[e,r,i])=>{t.branch=e,t.commit=i,t.root=!!r}),new be(/\s*Author:\s(.+)/i,(t,[e])=>{let r=e.split("<"),i=r.pop();!i||!i.includes("@")||(t.author={email:i.substr(0,i.length-1),name:r.join("<").trim()})}),new be(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(t,[e,r,i])=>{t.summary.changes=parseInt(e,10)||0,t.summary.insertions=parseInt(r,10)||0,t.summary.deletions=parseInt(i,10)||0}),new be(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(t,[e,r,i])=>{t.summary.changes=parseInt(e,10)||0;let n=parseInt(r,10)||0;i==="-"?t.summary.deletions=n:i==="+"&&(t.summary.insertions=n)})]}});function eH(t,e,r){return{commands:["-c","core.abbrev=40","commit",...Eu(t,"-m"),...e,...r],format:"utf-8",parser:Q8}}function tH(){return{commit(e,...r){let i=nt(arguments),n=t(e)||eH(Sn(e),Sn(ar(r[0],Kd,[])),[...yl(ar(r[1],Tu,[])),...yr(arguments,0,!0)]);return this._runTask(n,i)}};function t(e){return!Kd(e)&&Nr("git.commit: requires the commit message to be supplied as a string/string[]")}}var rH=Y({"src/lib/tasks/commit.ts"(){"use strict";J8(),ge(),yt()}});function iH(){return{firstCommit(){return this._runTask(xr(["rev-list","--max-parents=0","HEAD"],!0),nt(arguments))}}}var nH=Y({"src/lib/tasks/first-commit.ts"(){"use strict";ge(),yt()}});function sH(t,e){let r=["hash-object",t];return e&&r.push("-w"),xr(r,!0)}var aH=Y({"src/lib/tasks/hash-object.ts"(){"use strict";yt()}});function oH(t,e,r){let i=String(r).trim(),n;if(n=iA.exec(i))return new Yd(t,e,!1,n[1]);if(n=nA.exec(i))return new Yd(t,e,!0,n[1]);let s="",a=i.split(" ");for(;a.length;)if(a.shift()==="in"){s=a.join(" ");break}return new Yd(t,e,/^re/i.test(i),s)}var Yd,iA,nA,lH=Y({"src/lib/responses/InitSummary.ts"(){"use strict";Yd=class{constructor(t,e,r,i){this.bare=t,this.path=e,this.existing=r,this.gitDir=i}},iA=/^Init.+ repository in (.+)$/,nA=/^Rein.+ in (.+)$/}});function cH(t){return t.includes(qv)}function uH(t=!1,e,r){let i=["init",...r];return t&&!cH(i)&&i.splice(1,0,qv),{commands:i,format:"utf-8",parser(n){return oH(i.includes("--bare"),e,n)}}}var qv,fH=Y({"src/lib/tasks/init.ts"(){"use strict";lH(),qv="--bare"}});function Yv(t){for(let e=0;eHr(new sA,e,r,!1)}var vv,Mk,Dk,Ok,oA,lA=Y({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";Pu(),hH(),GC(),ge(),vv=[new be(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(t,[e,r,i=""])=>{t.files.push({file:e.trim(),changes:Qe(r),insertions:i.replace(/[^+]/g,"").length,deletions:i.replace(/[^-]/g,"").length,binary:!1})}),new be(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(t,[e,r,i])=>{t.files.push({file:e.trim(),before:Qe(r),after:Qe(i),binary:!0})}),new be(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(t,[e,r])=>{let i=/(\d+) i/.exec(r),n=/(\d+) d/.exec(r);t.changed=Qe(e),t.insertions=Qe(i==null?void 0:i[1]),t.deletions=Qe(n==null?void 0:n[1])})],Mk=[new be(/(\d+)\t(\d+)\t(.+)$/,(t,[e,r,i])=>{let n=Qe(e),s=Qe(r);t.changed++,t.insertions+=n,t.deletions+=s,t.files.push({file:i,changes:n+s,insertions:n,deletions:s,binary:!1})}),new be(/-\t-\t(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,after:0,before:0,binary:!0})})],Dk=[new be(/(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,changes:0,insertions:0,deletions:0,binary:!1})})],Ok=[new be(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(t,[e,r,i,n,s])=>{t.changed++,t.files.push({file:s!=null?s:i,changes:0,insertions:0,deletions:0,binary:!1,status:yv($8(e)&&e),from:yv(!!s&&i!==s&&i),similarity:Qe(r)})})],oA={"":vv,"--stat":vv,"--numstat":Mk,"--name-status":Ok,"--name-only":Dk}}});function pH(t,e){return e.reduce((r,i,n)=>(r[i]=t[n]||"",r),Object.create({diff:null}))}function cA(t=Qv,e=uA,r=""){let i=aA(r);return function(n){let s=Cu(n.trim(),!1,Kv).map(function(a){let o=a.split(Xv),l=pH(o[0].split(t),e);return o.length>1&&o[1].trim()&&(l.diff=i(o[1])),l});return{all:s,latest:s.length&&s[0]||null,total:s.length}}}var Kv,Xv,Qv,uA,fA=Y({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";ge(),lA(),Pu(),Kv="\xF2\xF2\xF2\xF2\xF2\xF2 ",Xv=" \xF2\xF2",Qv=" \xF2 ",uA=["hash","date","message","refs","author_name","author_email"]}}),dA={};St(dA,{diffSummaryTask:()=>mH,validateLogFormatConfig:()=>oh});function mH(t){let e=Yv(t),r=["diff"];return e===""&&(e="--stat",r.push("--stat=4096")),r.push(...t),oh(r)||{commands:r,format:"utf-8",parser:aA(e)}}function oh(t){let e=t.filter(dH);if(e.length>1)return Nr(`Summary flags are mutually exclusive - pick one of ${e.join(",")}`);if(e.length&&t.includes("-z"))return Nr(`Summary flag ${e} parsing is not compatible with null termination option '-z'`)}var Jv=Y({"src/lib/tasks/diff.ts"(){"use strict";Pu(),lA(),yt()}});function gH(t,e){let r=[],i=[];return Object.keys(t).forEach(n=>{r.push(n),i.push(String(t[n]))}),[r,i.join(e)]}function vH(t){return Object.keys(t).reduce((e,r)=>(r in Pv||(e[r]=t[r]),e),{})}function hA(t={},e=[]){let r=ar(t.splitter,mt,Qv),i=ih(t.format)?t.format:{hash:"%H",date:t.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:t.multiLine?"%B":"%b",author_name:t.mailMap!==!1?"%aN":"%an",author_email:t.mailMap!==!1?"%aE":"%ae"},[n,s]=gH(i,r),a=[],o=[`--pretty=format:${Kv}${s}${Xv}`,...e],l=t.n||t["max-count"]||t.maxCount;if(l&&o.push(`--max-count=${l}`),t.from||t.to){let c=t.symmetric!==!1?"...":"..";a.push(`${t.from||""}${c}${t.to||""}`)}return mt(t.file)&&o.push("--follow",pl(t.file)),Bv(vH(t),o),{fields:n,splitter:r,commands:[...o,...a]}}function wH(t,e,r){let i=cA(t,e,Yv(r));return{commands:["log",...r],format:"utf-8",parser:i}}function bH(){return{log(...r){let i=nt(arguments),n=hA(Hv(arguments),yl(ar(arguments[0],Tu,[]))),s=e(...r)||oh(n.commands)||t(n);return this._runTask(s,i)}};function t(r){return wH(r.splitter,r.fields,r.commands)}function e(r,i){return mt(r)&&mt(i)&&Nr("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Pv,pA=Y({"src/lib/tasks/log.ts"(){"use strict";Pu(),fA(),ge(),yt(),Jv(),Pv=(t=>(t[t["--pretty"]=0]="--pretty",t[t["max-count"]=1]="max-count",t[t.maxCount=2]="maxCount",t[t.n=3]="n",t[t.file=4]="file",t[t.format=5]="format",t[t.from=6]="from",t[t.to=7]="to",t[t.splitter=8]="splitter",t[t.symmetric=9]="symmetric",t[t.mailMap=10]="mailMap",t[t.multiLine=11]="multiLine",t[t.strictDate=12]="strictDate",t))(Pv||{})}}),Zd,mA,_H=Y({"src/lib/responses/MergeSummary.ts"(){"use strict";Zd=class{constructor(t,e=null,r){this.reason=t,this.file=e,this.meta=r}toString(){return`${this.file}:${this.reason}`}},mA=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Rv,gA,yH=Y({"src/lib/responses/PullSummary.ts"(){"use strict";Rv=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},gA=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function wv(t){return t.objects=t.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Lk(t){let e=/^\s*(\d+)/.exec(t),r=/delta (\d+)/i.exec(t);return{count:Qe(e&&e[1]||"0"),delta:Qe(r&&r[1]||"0")}}var vA,xH=Y({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";ge(),vA=[new Hs(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(t,[e,r])=>{let i=e.toLowerCase(),n=wv(t.remoteMessages);Object.assign(n,{[i]:Qe(r)})}),new Hs(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(t,[e,r])=>{let i=e.toLowerCase(),n=wv(t.remoteMessages);Object.assign(n,{[i]:Qe(r)})}),new Hs(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(t,[e,r,i])=>{let n=wv(t.remoteMessages);n.total=Lk(e),n.reused=Lk(r),n.packReused=Qe(i)})]}});function wA(t,e){return Hr({remoteMessages:new _A},bA,e)}var bA,_A,yA=Y({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";ge(),xH(),bA=[new Hs(/^remote:\s*(.+)$/,(t,[e])=>(t.remoteMessages.all.push(e.trim()),!1)),...vA,new Hs([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(t,[e])=>{t.remoteMessages.pullRequestUrl=e}),new Hs([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(t,[e,r,i])=>{t.remoteMessages.vulnerabilities={count:Qe(e),summary:r,url:i}})],_A=class{constructor(){this.all=[]}}}});function EH(t,e){let r=Hr(new gA,xA,[t,e]);return r.message&&r}var Nk,Bk,Hk,Uk,xA,Gk,ew,EA=Y({"src/lib/parsers/parse-pull.ts"(){"use strict";yH(),ge(),yA(),Nk=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Bk=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,Hk=/^(create|delete) mode \d+ (.+)/,Uk=[new be(Nk,(t,[e,r,i])=>{t.files.push(e),r&&(t.insertions[e]=r.length),i&&(t.deletions[e]=i.length)}),new be(Bk,(t,[e,,r,,i])=>r!==void 0||i!==void 0?(t.summary.changes=+e||0,t.summary.insertions=+r||0,t.summary.deletions=+i||0,!0):!1),new be(Hk,(t,[e,r])=>{Ei(t.files,r),Ei(e==="create"?t.created:t.deleted,r)})],xA=[new be(/^from\s(.+)$/i,(t,[e])=>{t.remote=e}),new be(/^fatal:\s(.+)$/,(t,[e])=>{t.message=e}),new be(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(t,[e,r,i,n])=>{t.branch.local=i,t.hash.local=e,t.branch.remote=n,t.hash.remote=r})],Gk=(t,e)=>Hr(new Rv,Uk,[t,e]),ew=(t,e)=>Object.assign(new Rv,Gk(t,e),wA(t,e))}}),jk,SA,Vk,SH=Y({"src/lib/parsers/parse-merge.ts"(){"use strict";_H(),ge(),EA(),jk=[new be(/^Auto-merging\s+(.+)$/,(t,[e])=>{t.merges.push(e)}),new be(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(t,[e,r])=>{t.conflicts.push(new Zd(e,r))}),new be(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(t,[e,r,i])=>{t.conflicts.push(new Zd(e,r,{deleteRef:i}))}),new be(/^CONFLICT\s+\((.+)\):/,(t,[e])=>{t.conflicts.push(new Zd(e,null))}),new be(/^Automatic merge failed;\s+(.+)$/,(t,[e])=>{t.result=e})],SA=(t,e)=>Object.assign(Vk(t,e),ew(t,e)),Vk=t=>Hr(new mA,jk,t)}});function zk(t){return t.length?{commands:["merge",...t],format:"utf-8",parser(e,r){let i=SA(e,r);if(i.failed)throw new ku(i);return i}}:Nr("Git.merge requires at least one option")}var kH=Y({"src/lib/tasks/merge.ts"(){"use strict";_l(),SH(),yt()}});function CH(t,e,r){let i=r.includes("deleted"),n=r.includes("tag")||/^refs\/tags/.test(t),s=!r.includes("new");return{deleted:i,tag:n,branch:!n,new:!s,alreadyUpdated:s,local:t,remote:e}}var Wk,kA,qk,AH=Y({"src/lib/parsers/parse-push.ts"(){"use strict";ge(),yA(),Wk=[new be(/^Pushing to (.+)$/,(t,[e])=>{t.repo=e}),new be(/^updating local tracking ref '(.+)'/,(t,[e])=>{t.ref={...t.ref||{},local:e}}),new be(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(t,[e,r,i])=>{t.pushed.push(CH(e,r,i))}),new be(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(t,[e,r,i])=>{t.branch={...t.branch||{},local:e,remote:r,remoteName:i}}),new be(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(t,[e,r,i,n])=>{t.update={head:{local:e,remote:r},hash:{from:i,to:n}}})],kA=(t,e)=>{let r=qk(t,e),i=wA(t,e);return{...r,...i}},qk=(t,e)=>Hr({pushed:[]},Wk,[t,e])}}),CA={};St(CA,{pushTagsTask:()=>TH,pushTask:()=>tw});function TH(t={},e){return Ei(e,"--tags"),tw(t,e)}function tw(t={},e){let r=["push",...e];return t.branch&&r.splice(1,0,t.branch),t.remote&&r.splice(1,0,t.remote),th(r,"-v"),Ei(r,"--verbose"),Ei(r,"--porcelain"),{commands:r,format:"utf-8",parser:kA}}var AA=Y({"src/lib/tasks/push.ts"(){"use strict";AH(),ge()}});function PH(){return{showBuffer(){let t=["show",...yr(arguments,1)];return t.includes("--binary")||t.splice(1,0,"--binary"),this._runTask(FC(t),nt(arguments))},show(){let t=["show",...yr(arguments,1)];return this._runTask(xr(t),nt(arguments))}}}var RH=Y({"src/lib/tasks/show.ts"(){"use strict";ge(),yt()}}),Yk,TA,$H=Y({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Yk=/^(.+)\0(.+)$/,TA=class{constructor(t,e,r){if(this.path=t,this.index=e,this.working_dir=r,e==="R"||r==="R"){let i=Yk.exec(t)||[null,t,t];this.from=i[2]||"",this.path=i[1]||""}}}}});function Zk(t){let[e,r]=t.split(wl);return{from:r||e,to:e}}function ti(t,e,r){return[`${t}${e}`,r]}function bv(t,...e){return e.map(r=>ti(t,r,(i,n)=>i.conflicted.push(n)))}function FH(t,e){let r=e.trim();switch(" "){case r.charAt(2):return i(r.charAt(0),r.charAt(1),r.slice(3));case r.charAt(1):return i(" ",r.charAt(0),r.slice(2));default:return}function i(n,s,a){let o=`${n}${s}`,l=PA.get(o);l&&l(t,a),o!=="##"&&o!=="!!"&&t.files.push(new TA(a,n,s))}}var Kk,PA,RA,IH=Y({"src/lib/responses/StatusSummary.ts"(){"use strict";ge(),$H(),Kk=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},PA=new Map([ti(" ","A",(t,e)=>t.created.push(e)),ti(" ","D",(t,e)=>t.deleted.push(e)),ti(" ","M",(t,e)=>t.modified.push(e)),ti("A"," ",(t,e)=>{t.created.push(e),t.staged.push(e)}),ti("A","M",(t,e)=>{t.created.push(e),t.staged.push(e),t.modified.push(e)}),ti("D"," ",(t,e)=>{t.deleted.push(e),t.staged.push(e)}),ti("M"," ",(t,e)=>{t.modified.push(e),t.staged.push(e)}),ti("M","M",(t,e)=>{t.modified.push(e),t.staged.push(e)}),ti("R"," ",(t,e)=>{t.renamed.push(Zk(e))}),ti("R","M",(t,e)=>{let r=Zk(e);t.renamed.push(r),t.modified.push(r.to)}),ti("!","!",(t,e)=>{(t.ignored=t.ignored||[]).push(e)}),ti("?","?",(t,e)=>t.not_added.push(e)),...bv("A","A","U"),...bv("D","D","U"),...bv("U","A","D","U"),["##",(t,e)=>{let r=/ahead (\d+)/,i=/behind (\d+)/,n=/^(.+?(?=(?:\.{3}|\s|$)))/,s=/\.{3}(\S*)/,a=/\son\s(\S+?)(?=\.{3}|$)/,o=r.exec(e);t.ahead=o&&+o[1]||0,o=i.exec(e),t.behind=o&&+o[1]||0,o=n.exec(e),t.current=ar(o==null?void 0:o[1],mt,null),o=s.exec(e),t.tracking=ar(o==null?void 0:o[1],mt,null),o=a.exec(e),o&&(t.current=ar(o==null?void 0:o[1],mt,t.current)),t.detached=/\(no branch\)/.test(e)}]]),RA=function(t){let e=t.split(wl),r=new Kk;for(let i=0,n=e.length;i!$A.includes(r))],parser(r){return RA(r)}}}var $A,DH=Y({"src/lib/tasks/status.ts"(){"use strict";IH(),$A=["--null","-z"]}});function Jd(t=0,e=0,r=0,i="",n=!0){return Object.defineProperty({major:t,minor:e,patch:r,agent:i,installed:n},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function OH(){return Jd(0,0,0,"",!1)}function LH(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:NH,onError(t,e,r,i){if(t.exitCode===-2)return r(k.from(rw));i(e)}})}}}function NH(t){return t===rw?OH():Hr(Jd(0,0,0,t),FA,t)}var rw,FA,BH=Y({"src/lib/tasks/version.ts"(){"use strict";ge(),rw="installed=false",FA=[new be(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(t,[e,r,i,n=""])=>{Object.assign(t,Jd(Qe(e),Qe(r),Qe(i),n))}),new be(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(t,[e,r,i,n=""])=>{Object.assign(t,Jd(Qe(e),Qe(r),i,n))})]}});function Xk(t,e,r,...i){return mt(r)?e(r,ar(i[0],mt),yr(arguments)):Nr(`git.${t}() requires a string 'repoPath'`)}function HH(){return{clone(t,...e){return this._runTask(Xk("clone",$v,ar(t,mt),...e),nt(arguments))},mirror(t,...e){return this._runTask(Xk("mirror",IA,ar(t,mt),...e),nt(arguments))}}}var $v,IA,UH=Y({"src/lib/tasks/clone.ts"(){"use strict";yt(),ge(),$v=(t,e,r)=>{let i=["clone",...r];return mt(t)&&i.push(pl(t)),mt(e)&&i.push(pl(e)),xr(i)},IA=(t,e,r)=>(Ei(r,"--mirror"),$v(t,e,r))}}),MA={};St(MA,{SimpleGitApi:()=>Fv});var Fv,GH=Y({"src/lib/simple-git-api.ts"(){"use strict";z8(),W8(),Y8(),X8(),rH(),HC(),nH(),zC(),aH(),fH(),pA(),kH(),AA(),RH(),DH(),yt(),BH(),ge(),UH(),Fv=class{constructor(t){this._executor=t}_runTask(t,e){let r=this._executor.chain(),i=r.push(t);return e&&j8(t,i,e),Object.create(this,{then:{value:i.then.bind(i)},catch:{value:i.catch.bind(i)},_executor:{value:r}})}add(t){return this._runTask(xr(["add",...Sn(t)]),nt(arguments))}cwd(t){let e=nt(arguments);return typeof t=="string"?this._runTask(Ik(t,this._executor),e):typeof(t==null?void 0:t.path)=="string"?this._runTask(Ik(t.path,t.root&&this._executor||void 0),e):this._runTask(Nr("Git.cwd: workingDirectory must be supplied as a string"),e)}hashObject(t,e){return this._runTask(sH(t,e===!0),nt(arguments))}init(t){return this._runTask(uH(t===!0,this._executor.cwd,yr(arguments)),nt(arguments))}merge(){return this._runTask(zk(yr(arguments)),nt(arguments))}mergeFromTo(t,e){return mt(t)&&mt(e)?this._runTask(zk([t,e,...yr(arguments)]),nt(arguments,!1)):this._runTask(Nr("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(t){return this._executor.outputHandler=t,this}push(){let t=tw({remote:ar(arguments[0],mt),branch:ar(arguments[1],mt)},yr(arguments));return this._runTask(t,nt(arguments))}stash(){return this._runTask(xr(["stash",...yr(arguments)]),nt(arguments))}status(){return this._runTask(MH(yr(arguments)),nt(arguments))}},Object.assign(Fv.prototype,q8(),HH(),tH(),R8(),K8(),iH(),M8(),bH(),PH(),LH())}}),DA={};St(DA,{Scheduler:()=>LA});var Qk,LA,jH=Y({"src/lib/runners/scheduler.ts"(){"use strict";ge(),KC(),Qk=(()=>{let t=0;return()=>{t++;let{promise:e,done:r}=(0,OA.createDeferred)();return{promise:e,done:r,id:t}}})(),LA=class{constructor(t=2){this.concurrency=t,this.logger=Wv("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",t)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let t=Ei(this.running,this.pending.shift());this.logger("Attempting id=%s",t.id),t.done(()=>{this.logger("Completing id=",t.id),th(this.running,t),this.schedule()})}next(){let{promise:t,id:e}=Ei(this.pending,Qk());return this.logger("Scheduling id=%s",e),this.schedule(),t}}}}),NA={};St(NA,{applyPatchTask:()=>VH});function VH(t,e){return xr(["apply",...e,...t])}var zH=Y({"src/lib/tasks/apply-patch.ts"(){"use strict";yt()}});function WH(t,e){return{branch:t,hash:e,success:!0}}function qH(t){return{branch:t,hash:null,success:!1}}var BA,YH=Y({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";BA=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function HA(t,e){return e===1&&Iv.test(t)}var Jk,Iv,eC,lh,ZH=Y({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";YH(),ge(),Jk=/(\S+)\s+\(\S+\s([^)]+)\)/,Iv=/^error[^']+'([^']+)'/m,eC=[new be(Jk,(t,[e,r])=>{let i=WH(e,r);t.all.push(i),t.branches[e]=i}),new be(Iv,(t,[e])=>{let r=qH(e);t.errors.push(r),t.all.push(r),t.branches[e]=r})],lh=(t,e)=>Hr(new BA,eC,[t,e])}}),UA,KH=Y({"src/lib/responses/BranchSummary.ts"(){"use strict";UA=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(t,e,r,i,n){t==="*"&&(this.detached=e,this.current=r),this.all.push(r),this.branches[r]={current:t==="*",linkedWorkTree:t==="+",name:r,commit:i,label:n}}}}});function tC(t){return t?t.charAt(0):""}function GA(t,e=!1){return Hr(new UA,e?[VA]:jA,t)}var jA,VA,XH=Y({"src/lib/parsers/parse-branch.ts"(){"use strict";KH(),ge(),jA=[new be(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(t,[e,r,i,n])=>{t.push(tC(e),!0,r,i,n)}),new be(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(t,[e,r,i,n])=>{t.push(tC(e),!1,r,i,n)})],VA=new be(/^(\S+)$/s,(t,[e])=>{t.push("*",!1,e,"","")})}}),zA={};St(zA,{branchLocalTask:()=>JH,branchTask:()=>QH,containsDeleteBranchCommand:()=>WA,deleteBranchTask:()=>t6,deleteBranchesTask:()=>e6});function WA(t){let e=["-d","-D","--delete"];return t.some(r=>e.includes(r))}function QH(t){let e=WA(t),r=t.includes("--show-current"),i=["branch",...t];return i.length===1&&i.push("-a"),i.includes("-v")||i.splice(1,0,"-v"),{format:"utf-8",commands:i,parser(n,s){return e?lh(n,s).all[0]:GA(n,r)}}}function JH(){return{format:"utf-8",commands:["branch","-v"],parser(t){return GA(t)}}}function e6(t,e=!1){return{format:"utf-8",commands:["branch","-v",e?"-D":"-d",...t],parser(r,i){return lh(r,i)},onError({exitCode:r,stdOut:i},n,s,a){if(!HA(String(n),r))return a(n);s(i)}}}function t6(t,e=!1){let r={format:"utf-8",commands:["branch","-v",e?"-D":"-d",t],parser(i,n){return lh(i,n).branches[t]},onError({exitCode:i,stdErr:n,stdOut:s},a,o,l){if(!HA(String(a),i))return l(a);throw new ku(r.parser(Su(s),Su(n)),String(a))}};return r}var r6=Y({"src/lib/tasks/branch.ts"(){"use strict";_l(),ZH(),XH(),ge()}});function i6(t){let e=t.trim().replace(/^["']|["']$/g,"");return e&&(0,qA.normalize)(e)}var YA,n6=Y({"src/lib/responses/CheckIgnore.ts"(){"use strict";YA=t=>t.split(/\n/g).map(i6).filter(Boolean)}}),ZA={};St(ZA,{checkIgnoreTask:()=>s6});function s6(t){return{commands:["check-ignore",...t],format:"utf-8",parser:YA}}var a6=Y({"src/lib/tasks/check-ignore.ts"(){"use strict";n6()}});function o6(t,e){return Hr({raw:t,remote:null,branches:[],tags:[],updated:[],deleted:[]},KA,[t,e])}var KA,l6=Y({"src/lib/parsers/parse-fetch.ts"(){"use strict";ge(),KA=[new be(/From (.+)$/,(t,[e])=>{t.remote=e}),new be(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.branches.push({name:e,tracking:r})}),new be(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.tags.push({name:e,tracking:r})}),new be(/- \[deleted]\s+\S+\s*-> (.+)$/,(t,[e])=>{t.deleted.push({tracking:e})}),new be(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(t,[e,r,i,n])=>{t.updated.push({name:i,tracking:n,to:r,from:e})})]}}),XA={};St(XA,{fetchTask:()=>u6});function c6(t){return/^--upload-pack(=|$)/.test(t)}function u6(t,e,r){let i=["fetch",...r];return t&&e&&i.push(t,e),i.find(c6)?Nr("git.fetch: potential exploit argument blocked."):{commands:i,format:"utf-8",parser:o6}}var f6=Y({"src/lib/tasks/fetch.ts"(){"use strict";l6(),yt()}});function d6(t){return Hr({moves:[]},QA,t)}var QA,h6=Y({"src/lib/parsers/parse-move.ts"(){"use strict";ge(),QA=[new be(/^Renaming (.+) to (.+)$/,(t,[e,r])=>{t.moves.push({from:e,to:r})})]}}),JA={};St(JA,{moveTask:()=>p6});function p6(t,e){return{commands:["mv","-v",...Sn(t),e],format:"utf-8",parser:d6}}var m6=Y({"src/lib/tasks/move.ts"(){"use strict";h6(),ge()}}),eT={};St(eT,{pullTask:()=>g6});function g6(t,e,r){let i=["pull",...r];return t&&e&&i.splice(1,0,t,e),{commands:i,format:"utf-8",parser(n,s){return ew(n,s)},onError(n,s,a,o){let l=EH(Su(n.stdOut),Su(n.stdErr));if(l)return o(new ku(l));o(s)}}}var v6=Y({"src/lib/tasks/pull.ts"(){"use strict";_l(),EA(),ge()}});function w6(t){let e={};return tT(t,([r])=>e[r]={name:r}),Object.values(e)}function b6(t){let e={};return tT(t,([r,i,n])=>{Object.hasOwn(e,r)||(e[r]={name:r,refs:{fetch:"",push:""}}),n&&i&&(e[r].refs[n.replace(/[^a-z]/g,"")]=i)}),Object.values(e)}function tT(t,e){Ov(t,r=>e(r.split(/\s+/)))}var _6=Y({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";ge()}}),rT={};St(rT,{addRemoteTask:()=>y6,getRemotesTask:()=>x6,listRemotesTask:()=>E6,remoteTask:()=>S6,removeRemoteTask:()=>k6});function y6(t,e,r){return xr(["remote","add",...r,t,e])}function x6(t){let e=["remote"];return t&&e.push("-v"),{commands:e,format:"utf-8",parser:t?b6:w6}}function E6(t){let e=[...t];return e[0]!=="ls-remote"&&e.unshift("ls-remote"),xr(e)}function S6(t){let e=[...t];return e[0]!=="remote"&&e.unshift("remote"),xr(e)}function k6(t){return xr(["remote","remove",t])}var C6=Y({"src/lib/tasks/remote.ts"(){"use strict";_6(),yt()}}),iT={};St(iT,{stashListTask:()=>A6});function A6(t={},e){let r=hA(t),i=["stash","list",...r.commands,...e],n=cA(r.splitter,r.fields,Yv(i));return oh(i)||{commands:i,format:"utf-8",parser:n}}var T6=Y({"src/lib/tasks/stash-list.ts"(){"use strict";Pu(),fA(),Jv(),pA()}}),nT={};St(nT,{addSubModuleTask:()=>P6,initSubModuleTask:()=>R6,subModuleTask:()=>ch,updateSubModuleTask:()=>$6});function P6(t,e){return ch(["add",t,e])}function R6(t){return ch(["init",...t])}function ch(t){let e=[...t];return e[0]!=="submodule"&&e.unshift("submodule"),xr(e)}function $6(t){return ch(["update",...t])}var F6=Y({"src/lib/tasks/sub-module.ts"(){"use strict";yt()}});function I6(t,e){let r=Number.isNaN(t),i=Number.isNaN(e);return r!==i?r?1:-1:r?sT(t,e):0}function sT(t,e){return t===e?0:t>e?1:-1}function M6(t){return t.trim()}function Wd(t){return typeof t=="string"&&parseInt(t.replace(/^\D+/g,""),10)||0}var rC,aT,D6=Y({"src/lib/responses/TagList.ts"(){"use strict";rC=class{constructor(t,e){this.all=t,this.latest=e}},aT=function(t,e=!1){let r=t.split(` +`).map(M6).filter(Boolean);e||r.sort(function(n,s){let a=n.split("."),o=s.split(".");if(a.length===1||o.length===1)return I6(Wd(a[0]),Wd(o[0]));for(let l=0,c=Math.max(a.length,o.length);ln.indexOf(".")>=0);return new rC(r,i)}}}),oT={};St(oT,{addAnnotatedTagTask:()=>N6,addTagTask:()=>L6,tagListTask:()=>O6});function O6(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return aT(r,e)}}}function L6(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}function N6(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}var B6=Y({"src/lib/tasks/tag.ts"(){"use strict";D6()}}),H6=i8({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(G8(),_t(JC)),{SimpleGitApi:i}=(GH(),_t(MA)),{Scheduler:n}=(jH(),_t(DA)),{adhocExecTask:s,configurationErrorTask:a}=(yt(),_t(Cv)),{asArray:o,filterArray:l,filterPrimitives:c,filterString:u,filterStringOrStringArray:f,filterType:d,getTrailingOptions:h,trailingFunctionArgument:p,trailingOptionsArgument:g}=(ge(),_t(xC)),{applyPatchTask:v}=(zH(),_t(NA)),{branchTask:b,branchLocalTask:_,deleteBranchesTask:C,deleteBranchTask:x}=(r6(),_t(zA)),{checkIgnoreTask:S}=(a6(),_t(ZA)),{checkIsRepoTask:A}=(CC(),_t(EC)),{cleanWithOptionsTask:w,isCleanOptionsArray:E}=(LC(),_t(DC)),{diffSummaryTask:y}=(Jv(),_t(dA)),{fetchTask:P}=(f6(),_t(XA)),{moveTask:T}=(m6(),_t(JA)),{pullTask:I}=(v6(),_t(eT)),{pushTagsTask:L}=(AA(),_t(CA)),{addRemoteTask:H,getRemotesTask:te,listRemotesTask:xe,remoteTask:Z,removeRemoteTask:K}=(C6(),_t(rT)),{getResetMode:ce,resetTask:pe}=(ZC(),_t(WC)),{stashListTask:W}=(T6(),_t(iT)),{addSubModuleTask:X,initSubModuleTask:G,subModuleTask:Be,updateSubModuleTask:pr}=(F6(),_t(nT)),{addAnnotatedTagTask:Ut,addTagTask:Ie,tagListTask:Rt}=(B6(),_t(oT)),{straightThroughBufferTask:$t,straightThroughStringTask:Xe}=(yt(),_t(Cv));function ee(N,O){this._plugins=O,this._executor=new r(N.baseDir,new n(N.maxConcurrentProcesses),O),this._trimmed=N.trimmed}(ee.prototype=Object.create(i.prototype)).constructor=ee,ee.prototype.customBinary=function(N){return this._plugins.reconfigure("binary",N),this},ee.prototype.env=function(N,O){return arguments.length===1&&typeof N=="object"?this._executor.env=N:(this._executor.env=this._executor.env||{})[N]=O,this},ee.prototype.stashList=function(N){return this._runTask(W(g(arguments)||{},l(N)&&N||[]),p(arguments))},ee.prototype.mv=function(N,O){return this._runTask(T(N,O),p(arguments))},ee.prototype.checkoutLatestTag=function(N){var O=this;return this.pull(function(){O.tags(function(ue,$e){O.checkout($e.latest,N)})})},ee.prototype.pull=function(N,O,ue,$e){return this._runTask(I(d(N,u),d(O,u),h(arguments)),p(arguments))},ee.prototype.fetch=function(N,O){return this._runTask(P(d(N,u),d(O,u),h(arguments)),p(arguments))},ee.prototype.silent=function(N){return this._runTask(s(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},ee.prototype.tags=function(N,O){return this._runTask(Rt(h(arguments)),p(arguments))},ee.prototype.rebase=function(){return this._runTask(Xe(["rebase",...h(arguments)]),p(arguments))},ee.prototype.reset=function(N){return this._runTask(pe(ce(N),h(arguments)),p(arguments))},ee.prototype.revert=function(N){let O=p(arguments);return typeof N!="string"?this._runTask(a("Commit must be a string"),O):this._runTask(Xe(["revert",...h(arguments,0,!0),N]),O)},ee.prototype.addTag=function(N){let O=typeof N=="string"?Ie(N):a("Git.addTag requires a tag name");return this._runTask(O,p(arguments))},ee.prototype.addAnnotatedTag=function(N,O){return this._runTask(Ut(N,O),p(arguments))},ee.prototype.deleteLocalBranch=function(N,O,ue){return this._runTask(x(N,typeof O=="boolean"?O:!1),p(arguments))},ee.prototype.deleteLocalBranches=function(N,O,ue){return this._runTask(C(N,typeof O=="boolean"?O:!1),p(arguments))},ee.prototype.branch=function(N,O){return this._runTask(b(h(arguments)),p(arguments))},ee.prototype.branchLocal=function(N){return this._runTask(_(),p(arguments))},ee.prototype.raw=function(N){let O=!Array.isArray(N),ue=[].slice.call(O?arguments:N,0);for(let Gt=0;Gtconsole.warn("simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.")))},ee.prototype.checkIgnore=function(N,O){return this._runTask(S(o(d(N,f,[]))),p(arguments))},ee.prototype.checkIsRepo=function(N,O){return this._runTask(A(d(N,u)),p(arguments))},e.exports=ee}});Us();var U6=class extends Br{constructor(t,e){super(void 0,e),this.config=t}};Us();Us();var bl=class extends Br{constructor(t,e,r){super(t,r),this.task=t,this.plugin=e,Object.setPrototypeOf(this,new.target.prototype)}};_l();lC();CC();LC();HC();GC();zC();ZC();function G6(t){return t?[{type:"spawn.before",action(i,n){t.aborted&&n.kill(new bl(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(i,n){function s(){n.kill(new bl(void 0,"abort","Abort signal received"))}t.addEventListener("abort",s),n.spawned.on("close",()=>t.removeEventListener("abort",s))}}]:void 0}function j6(t={}){return{type:"spawn.args",action(e,{env:r}){for(let i of Pk(e,r))if(t[i.category]!==!0)throw new bl(void 0,"unsafe",i.message);return e}}}ge();function V6(t){let e=Eu(t,"-c");return{type:"spawn.args",action(r){return[...e,...r]}}}ge();var iC=(0,vl.deferred)().promise;function z6({onClose:t=!0,onExit:e=50}={}){function r(){let n=-1,s={close:(0,vl.deferred)(),closeTimeout:(0,vl.deferred)(),exit:(0,vl.deferred)(),exitTimeout:(0,vl.deferred)()},a=Promise.race([t===!1?iC:s.closeTimeout.promise,e===!1?iC:s.exitTimeout.promise]);return i(t,s.close,s.closeTimeout),i(e,s.exit,s.exitTimeout),{close(o){n=o,s.close.done()},exit(o){n=o,s.exit.done()},get exitCode(){return n},result:a}}function i(n,s,a){n!==!1&&(n===!0?s.promise:s.promise.then(()=>_v(n))).then(a.done)}return{type:"spawn.after",async action(n,{spawned:s,close:a}){var u,f;let o=r(),l=!0,c=()=>{l=!1};(u=s.stdout)==null||u.on("data",c),(f=s.stderr)==null||f.on("data",c),s.on("error",c),s.on("close",d=>o.close(d)),s.on("exit",d=>o.exit(d));try{await o.result,l&&await _v(50),a(o.exitCode)}catch(d){a(o.exitCode,d)}}}}ge();var W6="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",nC="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function q6(t){return!t||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(t)}function sC(t,e){if(t.length<1||t.length>2)throw new bl(void 0,"binary",W6);if(t.some(q6))if(e)console.warn(nC);else throw new bl(void 0,"binary",nC);let[i,n]=t;return{binary:i,prefix:n}}function Y6(t,e=["git"],r=!1){let i=sC(Sn(e),r);t.on("binary",n=>{i=sC(Sn(n),r)}),t.append("spawn.binary",()=>i.binary),t.append("spawn.args",n=>i.prefix?[i.prefix,...n]:n)}Us();function Z6(t){return!!(t.exitCode&&t.stdErr.length)}function K6(t){return k.concat([...t.stdOut,...t.stdErr])}function X6(t=!1,e=Z6,r=K6){return(i,n)=>!t&&i||!e(n)?i:r(n)}function aC(t){return{type:"task.error",action(e,r){let i=t(e.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return k.isBuffer(i)?{error:new Br(void 0,i.toString("utf-8"))}:{error:i}}}}ge();var Q6=class{constructor(){this.plugins=new Set,this.events=new lT.EventEmitter}on(t,e){this.events.on(t,e)}reconfigure(t,e){this.events.emit(t,e)}append(t,e){let r=Ei(this.plugins,{type:t,action:e});return()=>this.plugins.delete(r)}add(t){let e=[];return Sn(t).forEach(r=>r&&this.plugins.add(Ei(e,r))),()=>{e.forEach(r=>this.plugins.delete(r))}}exec(t,e,r){let i=e,n=Object.freeze(Object.create(r));for(let s of this.plugins)s.type===t&&(i=s.action(i,n));return i}};ge();function J6(t){let e="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(s,a){return r.includes(a.method)?pC(s,e):s}},{type:"spawn.after",action(s,a){var o;a.commands.includes(e)&&((o=a.spawned.stderr)==null||o.on("data",l=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(l.toString("utf8"));c&&t({method:a.method,stage:e4(c[1]),progress:Qe(c[2]),processed:Qe(c[3]),total:Qe(c[4])})}))}}]}function e4(t){return String(t.toLowerCase().split(" ",1))||"unknown"}ge();function t4(t){let e=gC(t,["uid","gid"]);return{type:"spawn.options",action(r){return{...e,...r}}}}function r4({block:t,stdErr:e=!0,stdOut:r=!0}){if(t>0)return{type:"spawn.after",action(i,n){var c,u;let s;function a(){s&&clearTimeout(s),s=setTimeout(l,t)}function o(){var f,d;(f=n.spawned.stdout)==null||f.off("data",a),(d=n.spawned.stderr)==null||d.off("data",a),n.spawned.off("exit",o),n.spawned.off("close",o),s&&clearTimeout(s)}function l(){o(),n.kill(new bl(void 0,"timeout","block timeout reached"))}r&&((c=n.spawned.stdout)==null||c.on("data",a)),e&&((u=n.spawned.stderr)==null||u.on("data",a)),n.spawned.on("exit",o),n.spawned.on("close",o),a()}}}function i4(){return{type:"spawn.args",action(t){let e=[],r;function i(n){(r=r||[]).push(...n)}for(let n=0;n_i(a)&&ml(a)||a));break}e.push(s)}return r?[...e,"--",...r.map(String)]:e}}}ge();var n4=H6();function s4(t,e){var n;let r=new Q6,i=_C(t&&(typeof t=="string"?{baseDir:t}:t)||{},e);if(!Lv(i.baseDir))throw new U6(i,"Cannot use simple-git on a directory that does not exist");return Array.isArray(i.config)&&r.add(V6(i.config)),r.add(j6(i.unsafe)),r.add(z6(i.completion)),i.abort&&r.add(G6(i.abort)),i.progress&&r.add(J6(i.progress)),i.timeout&&r.add(r4(i.timeout)),i.spawnOptions&&r.add(t4(i.spawnOptions)),r.add(i4()),r.add(aC(X6(!0))),i.errors&&r.add(aC(i.errors)),Y6(r,i.binary,(n=i.unsafe)==null?void 0:n.allowUnsafeCustomBinary),new n4(i,r)}_l();var cT=s4;var Se=class extends cl{constructor(r){super(r);this.useDefaultWindowsGitPath=!1}async setGitInstance(r=!1){var i;if(await this.isGitInstalled()){let n=this.app.vault.adapter,s=n.getBasePath(),a=s;this.plugin.settings.basePath&&(await n.exists((0,Qn.normalizePath)(this.plugin.settings.basePath))?a=Le.join(s,this.plugin.settings.basePath):r||new Qn.Notice("ObsidianGit: Base path does not exist")),this.absoluteRepoPath=a,this.git=cT({baseDir:a,binary:this.plugin.localStorage.getGitPath()||(this.useDefaultWindowsGitPath?Md:void 0),config:["core.quotepath=off"],progress:b=>{var _;(_=this.plugin.statusBar)==null||_.displayProgress(this.toGitProgress(b))},unsafe:{allowUnsafeCustomBinary:!0,allowUnsafeEditor:!0,allowUnsafeAskPass:!0,allowUnsafeConfigEnvCount:!0,allowUnsafeConfigPaths:!0,allowUnsafeCredentialHelper:!0,allowUnsafeGitProxy:!0,allowUnsafeGpgProgram:!0,allowUnsafeHooksPath:!0,allowUnsafeMergeDriver:!0,allowUnsafeSshCommand:!0,allowUnsafePager:!0}});let o=this.plugin.localStorage.getPATHPaths(),l=this.plugin.localStorage.getEnvVars(),c=this.plugin.settings.gitDir,u={...process.env};if(o.length>0){let b=o.join(Le.delimiter)+Le.delimiter+u.PATH;u.PATH=b}c&&(u.GIT_DIR=c,u.GIT_WORK_TREE=a);for(let b of l){let[_,C]=b.split("=");_!==void 0&&(u[_]=C)}let f="simple-git",d=",",p=((i=localStorage.debug)!=null?i:"").split(d);if(!p.includes(f)&&!p.includes(`-${f}`)&&(p.push(f),hT.default.enable(p.join(d))),await this.git.env(u).checkIsRepo()){let b=await this.git.revparse("--show-cdup"),_=(0,Ru.resolve)(a+Ru.sep+b);this.absoluteRepoPath=_,await this.git.cwd(_)}let g=Le.join(s,this.app.vault.configDir,"plugins","obsidian-git"),v=Le.join(g,ka);u.SSH_ASKPASS==null&&(u.SSH_ASKPASS=v),u.SSH_ASKPASS_REQUIRE="force",u.OBSIDIAN_GIT_CREDENTIALS_INPUT=Le.join(g,Dd),u.SSH_ASKPASS==v&&this.askpass().catch(b=>this.plugin.displayError(b)),u.OBSIDIAN_GIT="1",this.git=this.git.env(u)}}toGitProgress(r){return{action:this.getProgressAction(r.method),stage:r.stage,progress:r.progress,processed:r.processed,total:r.total}}getProgressAction(r){switch(r){case"fetch":return"Fetching";case"push":return"Pushing";case"pull":return"Pulling";case"checkout":return"Checking out";default:return r?r.charAt(0).toUpperCase()+r.slice(1):"Working"}}getRelativeVaultPath(r){let n=this.app.vault.adapter.getBasePath(),s=Le.join(this.absoluteRepoPath,r),a=Le.relative(n,s);return Qn.Platform.isWin&&(a=a.replace(/\\/g,"/")),a}getRelativeRepoPath(r,i=!0){if(i){let s=this.plugin.app.vault.adapter.getBasePath(),a=this.absoluteRepoPath,o=Le.join(s,r),l=Le.relative(a,o);return Qn.Platform.isWin&&(l=l.replace(/\\/g,"/")),l}return r}get absPluginConfigPath(){let i=this.app.vault.adapter.getBasePath();return Le.join(i,this.app.vault.configDir,"plugins","obsidian-git")}get relPluginConfigPath(){return Le.join(this.app.vault.configDir,"plugins","obsidian-git")}async askpass(){let r=this.app.vault.adapter,i=this.app.vault.configDir+"/plugins/obsidian-git/";await this.addAskPassScriptToExclude(),await ri.writeFile(Le.join(this.absPluginConfigPath,ka),FS),await ri.chmod(Le.join(this.absPluginConfigPath,ka),493),this.watchAbortController=new AbortController;let{signal:n}=this.watchAbortController;try{let s=ri.watch(this.absPluginConfigPath,{signal:n});for await(let a of s){if(a.filename!=Dd)continue;let o=i+Dd;if(await new Promise(d=>window.setTimeout(d,200)),!await r.exists(o))continue;let l=await r.read(o),c;l.length>60&&(c=new Qn.Notice(l,999999));let u=!0;l.contains("Username for")&&(u=!1);let f=await new rt(this.plugin,{allowEmpty:!0,obscure:u,placeholder:l.length>60?"Enter a response to the message.":l}).openAndGetResult();c==null||c.hide(),await r.exists(o)&&await r.write(`${o}.response`,f!=null?f:"")}}catch(s){this.plugin.displayError(s),await ri.rm(Le.join(this.absPluginConfigPath,ka),{force:!0}),await ri.rm(Le.join(this.absPluginConfigPath,`${ka}.response`),{force:!0}),await new Promise(a=>window.setTimeout(a,5e3)),this.plugin.log("Retry watch for ask pass"),await this.askpass()}}async addAskPassScriptToExclude(){try{if(!await this.git.checkIsRepo())return;let r=await this.git.revparse(["--path-format=absolute","--git-path","info/exclude"]),i=Le.join(this.app.vault.configDir,"plugins","obsidian-git",ka),n=this.getRelativeRepoPath(i,!0);(await ri.readFile(r,"utf-8")).split(` +`).some(l=>l.contains(n))||await ri.appendFile(r,n+` +`)}catch(r){console.error("Error while adding askpass script to exclude file:",r)}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(r){let i=r==null?void 0:r.path,n=await this.git.status(i!=null?["--",i]:[]),s=n.files.map(a=>{let o=this.formatPath(a);return{path:o.path,from:o.from,index:a.index==="?"?"U":a.index,workingDir:a.working_dir==="?"?"U":a.working_dir,vaultPath:this.getRelativeVaultPath(o.path)}});return{all:s,changed:s.filter(a=>a.workingDir!==" "),staged:s.filter(a=>a.index!==" "&&a.index!="U"),conflicted:n.conflicted.map(a=>this.formatPath({path:a}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let i=this.getRelativeRepoPath(r),s=["-C",Le.dirname(i),"rev-parse","HEAD"],a=this.git.raw(s);return a.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),(await a).trim()}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((i,n,s,a)=>{if(!(a.contains("submodule")&&a.contains("foreach")))return;let o="",l=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");n.on("data",c=>{o+=c.toString("utf8")}),n.on("end",()=>{let u=o.split(` +`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return l+"/"+d[1]+Ru.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},i=>this.plugin.displayError(i))})}formatPath(r){function i(n){if(n!=null)return n.startsWith('"')&&n.endsWith('"')?n.substring(1,n.length-1):n}return r.from!=null?{from:i(r.from),path:i(r.path)}:{path:i(r.path)}}async blame(r,i,n){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let s=await this.getSubmoduleOfFile(r),a=s?["-C",s.submodule]:[],o=s?s.relativeFilepath:r;a.push("blame","--porcelain"),n&&a.push("-w");let l=`-C${Id}`;switch(i){case"inactive":break;case"same-commit":a.push("-C",l);break;case"all-commits":a.push("-C","-C",l);break;default:Bs(i)}a.push("--",o);let c=await this.git.raw(a);return a4(c)}async isTracked(r){let i=await this.getSubmoduleOfFile(r),n=i?["-C",i.submodule]:[],s=i?i.relativeFilepath:r;return n.push("ls-files","--",s),this.git.raw(n).then(a=>a.trim()!=="")}async commitAll({message:r}){return this.withGitOperation(2,async()=>{if(this.plugin.settings.updateSubmodules){let n=await this.getSubmodulePaths();for(let s of n)await this.git.cwd({path:s,root:!1}).add("-A"),await this.git.cwd({path:s,root:!1}).commit(await this.formatCommitMessage(r))}await this.git.add("-A");let i=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),i.summary.changes})}async commit({message:r,amend:i}){return this.withGitOperation(2,async()=>{let n=(await this.git.commit(await this.formatCommitMessage(r),i?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),n})}async stage(r,i){r=this.getRelativeRepoPath(r,i),await this.git.add(["--",r])}async stageAll({dir:r}){await this.git.add(r!=null?r:"-A")}async unstageAll({dir:r}){await this.git.reset(r!=null?["--",r]:[])}async unstage(r,i){r=this.getRelativeRepoPath(r,i),await this.git.reset(["--",r])}async discard(r){await this.isTracked(r)&&await this.git.checkout(["--progress","--",r])}async applyPatch(r){let i=Le.join(this.relPluginConfigPath,"patch");await this.app.vault.adapter.write(i,r),await this.git.applyPatch(i,{"--cached":null,"--unidiff-zero":null,"--whitespace":"nowarn"}),await this.app.vault.adapter.remove(i)}async getUntrackedPaths(r){let i=r==null?void 0:r.path,n=[];return i!=null&&n.push("--",i),(await this.git.clean(Pa.RECURSIVE+Pa.DRY_RUN,n)).paths}async hashObject(r){r=this.getRelativeRepoPath(r);let i=await this.getSubmoduleOfFile(r),n=i?["-C",i.submodule]:[],s=i?i.relativeFilepath:r;return n.push("hash-object","--",s),this.git.raw(n)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){return this.withGitOperation(1,async()=>{try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo();if(!r.current){this.plugin.displayError("No current branch found. Cannot pull.");return}let i=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let n=await this.git.revparse([r.tracking]);if(i!==n){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{let o=[r.tracking];switch(this.plugin.settings.mergeStrategy!=="none"&&o.push(`--strategy-option=${this.plugin.settings.mergeStrategy}`),this.plugin.settings.syncMethod){case"merge":await this.git.merge(o);break;case"rebase":await this.git.rebase(o)}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${dT(o)}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,n]),await this.git.reset([])}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${dT(o)}`)}this.app.workspace.trigger("obsidian-git:head-change");let s=await this.git.revparse([r.current]);return(await this.git.diff([`${i}..${s}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}})}async push(){return this.withGitOperation(3,async()=>{try{if(this.plugin.settings.updateSubmodules){let a=await this.git.subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(a)}let r=await this.git.status(),i=r.tracking,n=r.current;if(!n){this.plugin.displayError("No current branch found. Cannot push.");return}if(!i&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let s=null;return i&&(s=(await this.git.diffSummary([n,i,"--"])).changed),await this.git.push(),s}catch(r){this.convertErrors(r)}})}async squashAllUnpushedCommits(){let r=await this.git.status(),i=r.tracking;if(!i||!r.current)return;let[n]=yn(i);if(!(await this.getRemoteBranches(n)).includes(i)||(await this.git.raw(["diff","--cached","--name-only"])).trim().length>0)return;let o=`${i}..HEAD`;if(parseInt((await this.git.raw(["rev-list","--count",o])).trim(),10)<2||parseInt((await this.git.raw(["rev-list","--merges","--count",o])).trim(),10)>0)return;let u=(await this.git.raw(["rev-parse","HEAD"])).trim();await this.withGitOperation(2,async()=>{await this.git.reset(["--soft",i]),await this.git.raw(["commit","-C",u]),this.app.workspace.trigger("obsidian-git:head-change")})}async getUnpushedCommits(){let r=await this.git.status(),i=r.tracking,n=r.current;if(i==null||n==null)return 0;let[s]=yn(i);return(await this.getRemoteBranches(s)).includes(i)?(await this.git.diffSummary([n,i,"--"])).changed:(this.plugin.log(`Tracking branch ${i} does not exist on remote ${s}.`),0)}async canPush(){if(this.plugin.settings.updateSubmodules===!0)return!0;let r=await this.git.status(),i=r.tracking,n=r.current;return n?i?(await this.git.diffSummary([n,i,"--"])).changed!==0:!1:(this.plugin.log("During canPush check, no current branch found."),!1)}async checkRequirements(){return await this.isGitInstalled()?await this.git.checkIsRepo()?"valid":"missing-repo":"missing-git"}async branchInfo(){let r=await this.git.status(),i=await this.git.branch(["--no-color"]);return{current:r.current||void 0,tracking:r.tracking||void 0,branches:i.all}}async getRemoteUrl(r){try{return await this.git.remote(["get-url",r])||void 0}catch(i){if(String(i).contains(r))return;throw i}}async log(r,i=!0,n,s){let a;r&&(a=this.getRelativeRepoPath(r,i));let o={file:a,maxCount:n,"--diff-merges":"first-parent","--name-status":null};return s&&(o[s]=null),(await this.git.log(o)).all.map(c=>{var u,f,d,h;return{...c,author:{name:c.author_name,email:c.author_email},refs:c.refs.split(", ").filter(p=>p.length>0),diff:{...c.diff,files:(f=(u=c.diff)==null?void 0:u.files.map(p=>{let g="from"in p?p.from:void 0;return{...p,status:"status"in p?p.status:"M",path:p.file,hash:c.hash,vaultPath:this.getRelativeVaultPath(p.file),fromPath:g,fromVaultPath:g!=null?this.getRelativeVaultPath(g):void 0,binary:p.binary}}))!=null?f:[]},fileName:(h=(d=c.diff)==null?void 0:d.files.first())==null?void 0:h.file}})}async show(r,i,n=!0){let s=this.getRelativeRepoPath(i,n);return this.git.show([r+":"+s])}async getLocalBranchUpstream(r){try{let n=(await this.git.raw(["rev-parse","--abbrev-ref",`${r}@{upstream}`])).trim();return n.length>0?n:void 0}catch(i){return}}getAvailableLocalBranchName(r,i,n){let s=r;if(!n.includes(s))return s;let a=`${r}-${i}`,o=a,l=0;for(;n.includes(o);)l+=1,o=`${a}-${l}`;return o}async checkout(r,i){return this.withGitOperation(5,async()=>{if(i){let n=`${i}/${r}`,s=await this.branchInfo();if(s.branches.includes(r)&&await this.getLocalBranchUpstream(r)===n)await this.git.checkout(r);else{let l=this.getAvailableLocalBranchName(r,i,s.branches);await this.git.checkout(["-b",l,n])}}else await this.git.checkout(r);if(this.plugin.settings.submoduleRecurseCheckout){let n=await this.getSubmodulePaths();for(let s of n){let a=await this.git.cwd({path:s,root:!1}).branch();Object.keys(a.branches).includes(r)&&await this.git.cwd({path:s,root:!1}).checkout(r)}}})}async createBranch(r){await this.git.checkout(["-b",r])}async deleteBranch(r,i){await this.git.branch([i?"-D":"-d",r])}async branchIsMerged(r){return!(await this.git.branch(["--no-merged"])).all.contains(r)}async init(){await this.git.init(!1)}async clone(r,i,n){await this.git.clone(r,Le.join(this.app.vault.adapter.getBasePath(),i),n?["--depth",`${n}`]:[]),await this.setGitInstance()}async setConfig(r,i){i==null?await this.git.raw(["config","--local","--unset",r]):await this.git.addConfig(r,i)}async getConfig(r,i="local"){var s;return(s=(await this.git.getConfig(r.toLowerCase(),i=="all"?void 0:i)).value)!=null?s:void 0}async fetch(r){return this.withGitOperation(4,async()=>{await this.git.fetch(r!=null?[r]:[])})}async setRemote(r,i){(await this.getRemotes()).includes(r)?await this.git.remote(["set-url",r,i]):await this.git.remote(["add",r,i])}async getRemoteBranches(r){let i=await this.git.branch(["-r","--list",`${r}*`]),n=[];for(let s in i.branches)n.push(i.branches[s].name);return n}async getRemotes(){let r=await this.git.remote([]);return r?r.trim().split(` +`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(i){try{await this.git.branch(["--set-upstream",r])}catch(n){let[s,a]=yn(r),o=await this.branchInfo();await this.git.push(["--set-upstream",s,`${o.current}:${a}`])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,i=!1,n){return i?await this.git.diff(["--cached","--",r]):n?await this.git.show([`${n}`,"--",r]):await this.git.diff(["--",r])}async diff(r,i,n){return await this.git.diff([`${i}..${n}`,"--",r])}async rawCommand(r){let i=r.split(" "),n=i[0];return n===void 0?"":await this.git.raw(n,...i.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(Le.dirname(r)))return;let i=await this.git.raw(["-C",Le.dirname(r),"rev-parse","--show-toplevel"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message));if(i=i.trim(),(await this.git.raw(["-C",Le.dirname(r),"rev-parse","--show-superproject-working-tree"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message))).trim()==="")return;let a=this.app.vault.adapter.getFullPath(Le.normalize(r)),o=Le.relative(i,a);return{submodule:i,relativeFilepath:o}}async getLastCommitTime(){try{let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}catch(r){if(r instanceof Br){if(r.message.contains("does not have any commits yet"))return}else throw r}}async isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),i=await _u(r||"git",["--version"],{});if(i.error)if(Qn.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${Md}) of Git for Windows.`);let n=await _u(Md,["--version"]);if(n.error)return console.error(n.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(i.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof Br){let i=String(r.message);if(i.contains("Could not resolve host")||i.contains("Unable to resolve host")||i.contains("Unable to open connection")||i.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||i.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||i.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new nl(i)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(i){let n=i instanceof Error?i.message:String(i);return this.plugin.displayError(`Error checking LFS status: ${n}`),!1}}},pT={hash:"000000",isZeroCommit:!0,summary:""};function a4(t){let r=t.replace(`\r +`,` +`).split(` +`),i={commits:new Map,hashPerLine:[void 0],originalFileLineNrPerLine:[void 0],finalFileLineNrPerLine:[void 0],groupSizePerStartingLine:new Map},n=1;for(let s=0;s=4&&r.groupSizePerStartingLine.set(e,parseInt(t[3])),parseInt(s)!==e)throw Error(`git-blame output is out of order: ${e} vs ${s}`);return i}function l4(t,e,r){let i=t[0],n=t.slice(1).join(" "),s=e.hashPerLine[r];if(s===void 0)throw Error(`No commit hash found for git-blame line ${r}`);let a=e.commits.get(s)||{hash:s,author:{},committer:{},previous:{}};switch(i){case"summary":a.summary=n;break;case"author":a.author.name=n;break;case"author-mail":a.author.email=fT(n);break;case"author-time":a.author.epochSeconds=parseInt(n);break;case"author-tz":a.author.tz=n;break;case"committer":a.committer.name=n;break;case"committer-mail":a.committer.email=fT(n);break;case"committer-time":a.committer.epochSeconds=parseInt(n);break;case"committer-tz":a.committer.tz=n;break;case"previous":a.previous.commitHash=n;break;case"filename":a.previous.filename=n;break}e.commits.set(s,a)}function c4(t){if(t.summary===void 0)throw Error(`Summary not provided for commit: ${t.hash}`);iw(t.author)&&(t.author=void 0),iw(t.committer)&&(t.committer=void 0),iw(t.previous)&&(t.previous=void 0),t.isZeroCommit=!!t.hash.match(/^0*$/)}function iw(t){return!t||Object.keys(t).length===0}function uT(t){return t===void 0?!1:t.length>0&&t[0].trim()===t[0]}function fT(t){let e=t.startsWith("<")?t.substring(1):t;return e.endsWith(">")?e.substring(0,e.length-1):e}function dT(t){return t instanceof Error?t.message:String(t)}m();var BT=require("@codemirror/state");m();var nw=class{constructor(){this.eventsPerFilepath=new Map;this.init()}ifFilepathDefinedTransformSubscribers(e,r){if(e)return this.ensureInitialized(e),r(this.eventsPerFilepath.get(e))}forEachSubscriber(e){this.eventsPerFilepath.forEach(r=>r.forEach(e))}ensureInitialized(e){this.eventsPerFilepath.get(e)||this.eventsPerFilepath.set(e,new Set)}init(){this.removeStalesSubscribersTimer===void 0&&this.startRemoveStalesSubscribersInterval()}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(e=>e==null?void 0:e.removeIfStale()),6e4)}clear(){this.removeStalesSubscribersTimer!==void 0&&(window.clearInterval(this.removeStalesSubscribersTimer),this.removeStalesSubscribersTimer=void 0),this.eventsPerFilepath.clear()}},Si=new nw;m();var uh=require("@codemirror/state");m();function u4(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mT={exports:{}};(function(t){(function(){var e="input is invalid type",r=typeof window=="object",i=r?window:{};i.JS_SHA256_NO_WINDOW&&(r=!1);var n=!r&&typeof self=="object";n&&(i=self);var s=!i.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,a=!i.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",o="0123456789abcdef".split(""),l=[-2147483648,8388608,32768,128],c=[24,16,8,0],u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=["hex","array","digest","arrayBuffer"],d=[];(i.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"}),a&&(i.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(x){return typeof x=="object"&&x.buffer&&x.buffer.constructor===ArrayBuffer});var h=function(x,S){return function(A){return new b(S,!0).update(A)[x]()}},p=function(x){var S=h("hex",x);S.create=function(){return new b(x)},S.update=function(E){return S.create().update(E)};for(var A=0;A>>2]|=x[E]<>>2]|=w<>>2]|=(192|w>>>6)<>>2]|=(128|w&63)<=57344?(T[y>>>2]|=(224|w>>>12)<>>2]|=(128|w>>>6&63)<>>2]|=(128|w&63)<>>2]|=(240|w>>>18)<>>2]|=(128|w>>>12&63)<>>2]|=(128|w>>>6&63)<>>2]|=(128|w&63)<=64?(this.block=T[16],this.start=y-64,this.hash(),this.hashed=!0):this.start=y}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},b.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var x=this.blocks,S=this.lastByteIndex;x[16]=this.block,x[S>>>2]|=l[S&3],this.block=x[16],S>=56&&(this.hashed||this.hash(),x[0]=this.block,x[16]=x[1]=x[2]=x[3]=x[4]=x[5]=x[6]=x[7]=x[8]=x[9]=x[10]=x[11]=x[12]=x[13]=x[14]=x[15]=0),x[14]=this.hBytes<<3|this.bytes>>>29,x[15]=this.bytes<<3,this.hash()}},b.prototype.hash=function(){var x=this.h0,S=this.h1,A=this.h2,w=this.h3,E=this.h4,y=this.h5,P=this.h6,T=this.h7,I=this.blocks,L,H,te,xe,Z,K,ce,pe,W,X,G;for(L=16;L<64;++L)Z=I[L-15],H=(Z>>>7|Z<<25)^(Z>>>18|Z<<14)^Z>>>3,Z=I[L-2],te=(Z>>>17|Z<<15)^(Z>>>19|Z<<13)^Z>>>10,I[L]=I[L-16]+H+I[L-7]+te<<0;for(G=S&A,L=0;L<64;L+=4)this.first?(this.is224?(pe=300032,Z=I[0]-1413257819,T=Z-150054599<<0,w=Z+24177077<<0):(pe=704751109,Z=I[0]-210244248,T=Z-1521486534<<0,w=Z+143694565<<0),this.first=!1):(H=(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10),te=(E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7),pe=x&S,xe=pe^x&A^G,ce=E&y^~E&P,Z=T+te+ce+u[L]+I[L],K=H+xe,T=w+Z<<0,w=Z+K<<0),H=(w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10),te=(T>>>6|T<<26)^(T>>>11|T<<21)^(T>>>25|T<<7),W=w&x,xe=W^w&S^pe,ce=T&E^~T&y,Z=P+te+ce+u[L+1]+I[L+1],K=H+xe,P=A+Z<<0,A=Z+K<<0,H=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),te=(P>>>6|P<<26)^(P>>>11|P<<21)^(P>>>25|P<<7),X=A&w,xe=X^A&x^W,ce=P&T^~P&E,Z=y+te+ce+u[L+2]+I[L+2],K=H+xe,y=S+Z<<0,S=Z+K<<0,H=(S>>>2|S<<30)^(S>>>13|S<<19)^(S>>>22|S<<10),te=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),G=S&A,xe=G^S&w^X,ce=y&P^~y&T,Z=E+te+ce+u[L+3]+I[L+3],K=H+xe,E=x+Z<<0,x=Z+K<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+x<<0,this.h1=this.h1+S<<0,this.h2=this.h2+A<<0,this.h3=this.h3+w<<0,this.h4=this.h4+E<<0,this.h5=this.h5+y<<0,this.h6=this.h6+P<<0,this.h7=this.h7+T<<0},b.prototype.hex=function(){this.finalize();var x=this.h0,S=this.h1,A=this.h2,w=this.h3,E=this.h4,y=this.h5,P=this.h6,T=this.h7,I=o[x>>>28&15]+o[x>>>24&15]+o[x>>>20&15]+o[x>>>16&15]+o[x>>>12&15]+o[x>>>8&15]+o[x>>>4&15]+o[x&15]+o[S>>>28&15]+o[S>>>24&15]+o[S>>>20&15]+o[S>>>16&15]+o[S>>>12&15]+o[S>>>8&15]+o[S>>>4&15]+o[S&15]+o[A>>>28&15]+o[A>>>24&15]+o[A>>>20&15]+o[A>>>16&15]+o[A>>>12&15]+o[A>>>8&15]+o[A>>>4&15]+o[A&15]+o[w>>>28&15]+o[w>>>24&15]+o[w>>>20&15]+o[w>>>16&15]+o[w>>>12&15]+o[w>>>8&15]+o[w>>>4&15]+o[w&15]+o[E>>>28&15]+o[E>>>24&15]+o[E>>>20&15]+o[E>>>16&15]+o[E>>>12&15]+o[E>>>8&15]+o[E>>>4&15]+o[E&15]+o[y>>>28&15]+o[y>>>24&15]+o[y>>>20&15]+o[y>>>16&15]+o[y>>>12&15]+o[y>>>8&15]+o[y>>>4&15]+o[y&15]+o[P>>>28&15]+o[P>>>24&15]+o[P>>>20&15]+o[P>>>16&15]+o[P>>>12&15]+o[P>>>8&15]+o[P>>>4&15]+o[P&15];return this.is224||(I+=o[T>>>28&15]+o[T>>>24&15]+o[T>>>20&15]+o[T>>>16&15]+o[T>>>12&15]+o[T>>>8&15]+o[T>>>4&15]+o[T&15]),I},b.prototype.toString=b.prototype.hex,b.prototype.digest=function(){this.finalize();var x=this.h0,S=this.h1,A=this.h2,w=this.h3,E=this.h4,y=this.h5,P=this.h6,T=this.h7,I=[x>>>24&255,x>>>16&255,x>>>8&255,x&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255,A>>>24&255,A>>>16&255,A>>>8&255,A&255,w>>>24&255,w>>>16&255,w>>>8&255,w&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255];return this.is224||I.push(T>>>24&255,T>>>16&255,T>>>8&255,T&255),I},b.prototype.array=b.prototype.digest,b.prototype.arrayBuffer=function(){this.finalize();var x=new ArrayBuffer(this.is224?28:32),S=new DataView(x);return S.setUint32(0,this.h0),S.setUint32(4,this.h1),S.setUint32(8,this.h2),S.setUint32(12,this.h3),S.setUint32(16,this.h4),S.setUint32(20,this.h5),S.setUint32(24,this.h6),this.is224||S.setUint32(28,this.h7),x};function _(x,S,A){var w,E=typeof x;if(E==="string"){var y=[],P=x.length,T=0,I;for(w=0;w>>6,y[T++]=128|I&63):I<55296||I>=57344?(y[T++]=224|I>>>12,y[T++]=128|I>>>6&63,y[T++]=128|I&63):(I=65536+((I&1023)<<10|x.charCodeAt(++w)&1023),y[T++]=240|I>>>18,y[T++]=128|I>>>12&63,y[T++]=128|I>>>6&63,y[T++]=128|I&63);x=y}else if(E==="object"){if(x===null)throw new Error(e);if(a&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!a||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);x.length>64&&(x=new b(S,!0).update(x).array());var L=[],H=[];for(w=0;w<64;++w){var te=x[w]||0;L[w]=92^te,H[w]=54^te}b.call(this,S,A),this.update(H),this.oKeyPad=L,this.inner=!0,this.sharedMemory=A}_.prototype=new b,_.prototype.finalize=function(){if(b.prototype.finalize.call(this),this.inner){this.inner=!1;var x=this.array();b.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(x),b.prototype.finalize.call(this)}};var C=p();C.sha256=C,C.sha224=p(!0),C.sha256.hmac=v(),C.sha224.hmac=v(!0),s?t.exports=C:(i.sha256=C.sha256,i.sha224=C.sha224)})()})(mT);var f4=mT.exports,$u=u4(f4),{sha224:NW}=$u;function gT(t,e,r){if(!(t===void 0||e===void 0||r===void 0))return`head${t}-obj${e}-path${r}`}var vT=uh.StateEffect.define();function wT(t,e,r){return r.update({effects:vT.of({key:t,la:e,lineOffsetsFromUnsavedChanges:new Map})})}var xl=uh.StateField.define({create:t=>{},update:(t,e)=>{for(let r of e.effects)if(r.is(vT))return r.value;return d4(e,t)},compare:(t,e)=>(t==null?void 0:t.key)===(e==null?void 0:e.key)});function fh(t){var s;let e=$u.create();if(!t)return e;let{la:r,key:i,lineOffsetsFromUnsavedChanges:n}=t;e.update(r==="untracked"?"t":"f"),e.update(i);for(let[a,o]of(s=n.entries())!=null?s:[])e.update([a,o]);return e}var Fu={get:void 0,save:void 0};function bT(t,e){Fu.get=t,Fu.save=e}function dh(t){var e,r;return(r=(e=Iu(t.coloringMaxAge))==null?void 0:e.asDays())!=null?r:Iu(pt.lineAuthor.coloringMaxAge).asDays()}function d4(t,e){if(e)return t.changes.empty||t.changes.iterChanges((r,i,n,s)=>{var p;let a=t.startState.doc,{newDoc:o}=t,l=a.lineAt(r).number,c=a.lineAt(i).number,u=o.lineAt(n).number,f=o.lineAt(s).number,d=c-l+1,h=f-u+1;for(let g=u;g<=f;g++){let v=(p=e.lineOffsetsFromUnsavedChanges.get(g))!=null?p:0,b=f===g,_=h-d;b&&(v+=_),e.lineOffsetsFromUnsavedChanges.set(g,v)}}),e}m();function _T(){El=void 0,sw=[],hh=0,mh.clear(),gh.clear(),Sl.clear()}var El,ph=()=>El;function yT(t,e){var n;let r=e.length;if(r<((n=El==null?void 0:El.length)!=null?n:0))return;El={gutter:t,length:r,text:e};let i=It.plugin.localStorage.getGutterSpacingFallbackLength();r!==i&&It.plugin.localStorage.setGutterSpacingFallbackLength(r)}var sw=[],h4=15,hh=0;function xT(t){sw[hh]=t,hh=(hh+1)%h4}function ET(){return sk(sw)}var mh=new Map,gh=new Map,Sl=new Set;m();var OT=require("@codemirror/state"),LT=require("@codemirror/view");m();var cw=require("@codemirror/view");var kl=require("obsidian");m();m();var vh={x:-10,y:-10};function ST(){vh.x===-10&&window.addEventListener("mousedown",t=>{vh.x=t.clientX,vh.y=t.clientY})}function kT(){for(let t of Sl)if(p4(t,vh))return t}function p4(t,e){let{x:r,y:i,width:n,height:s}=t.getBoundingClientRect();return r<=e.x&&e.x<=r+n&&i<=e.y&&e.y<=i+s}var CT="data-commit";function AT(t,e,r){if(e.hasFocus())return;let i=kT();if(!i)return;let n=g4(i);n&&(!n.isZeroCommit&&!n.isWaitingGutter&&m4(n,t),aw("showCommitHash",t),aw("authorDisplay",t),aw("dateTimeFormatOptions",t))}function m4(t,e){e.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick(i=>navigator.clipboard.writeText(t.hash)))}function aw(t,e){var l,c;let r,i,n=It.plugin.settings.lineAuthor,s=n[t],a=typeof s=="boolean"?s:s!=="hide",o=pt.lineAuthor[t];if(t==="showCommitHash")r="Show commit hash",i=s;else if(t==="authorDisplay"){let u=(l=n.lastShownAuthorDisplay)!=null?l:o;r="Show author "+(a?s:u),i=a?"hide":u}else if(t==="dateTimeFormatOptions"){let u=(c=n.lastShownDateTimeFormatOptions)!=null?c:o;r="Show "+(a?s:u),r+=r.contains("date")?"":" date",i=a?"hide":u}else Bs(t);e.addItem(u=>u.setTitle(r).setSection("obs-git-line-author-configure").setChecked(a).onClick(f=>{var d,h;return(h=(d=It.plugin)==null?void 0:d.settingsTab)==null?void 0:h.lineAuthorSettingHandler(t,i)}))}function TT(t,e,r){r.setAttr(CT,JSON.stringify({hash:t.hash,isZeroCommit:t.isZeroCommit,isWaitingGutter:e}))}function g4(t){let e=t.getAttr(CT);return e?JSON.parse(e):void 0}m();function bh(t,e){return t==="oldest"?wh(0,!1,e).color:wh(void 0,!0,e).color}function wh(t,e,r){let i=dh(r),n=Date.now()/1e3,s=t!=null?t:0,o=(e?0:n-s)/60/60/24,l=Math.pow(Math.clamp(o/i,0,1),1/2.3),c=v4(),u=r.colorNew,f=r.colorOld,d=c?.4:1,h=ow(u.r,f.r,l)*d,p=ow(u.g,f.g,l)*d,g=ow(u.b,f.b,l)*d;return{color:`rgba(${h},${p},${g},${c?.75:.25})`,daysSinceCommit:o}}function ow(t,e,r){return t+(e-t)*r}function v4(){var t;return((t=window.app)==null?void 0:t.getTheme())==="obsidian"}function PT(t){activeDocument.body.style.setProperty("--obs-git-gutter-text",t.textColorCss)}m();function RT(t,e,r){let i;for(let n=e;n<=r;n++){let s=t.hashPerLine[n];if(s===void 0)continue;let a=t.commits.get(s);(!i||a.isZeroCommit||w4(a,i))&&(i=a)}return i}function w4(t,e){var n,s,a,o;let r=(s=(n=t.author)==null?void 0:n.epochSeconds)!=null?s:0,i=(o=(a=e.author)==null?void 0:a.epochSeconds)!=null?o:0;return r>i}var FT=require("node:util");var $T="-",b4="+",_4=3,y4="*",x4=/\S/g,E4="%",Cl=class t extends cw.GutterMarker{constructor(r){super();this.text=r}eq(r){return r instanceof t&&this.text===r.text}toDOM(){return activeDocument.createTextNode(this.text)}destroy(r){}},lw=class extends cw.GutterMarker{constructor(r,i,n,s,a,o){super();this.lineAuthoring=r;this.startLine=i;this.endLine=n;this.key=s;this.settings=a;this.options=o;this.point=!1;this.elementClass="obs-git-blame-gutter"}eq(r){return this.key===(r==null?void 0:r.key)&&this.startLine===(r==null?void 0:r.startLine)&&this.endLine===(r==null?void 0:r.endLine)&&(this==null?void 0:this.options)===(r==null?void 0:r.options)}toDOM(){var r;return this.precomputedDomProvider=(r=this.precomputedDomProvider)!=null?r:this.computeDom(),this.precomputedDomProvider()}destroy(r){r&&(activeDocument.body.contains(r)||Sl.delete(r))}computeDom(){let r=RT(this.lineAuthoring,this.startLine,this.endLine),i=r.isZeroCommit?"":this.renderNonZeroCommit(r);return!r.isZeroCommit&&this.options!=="waiting-for-result"?yT(this,i):i=this.adaptTextForFakeCommit(r,i,this.options),this.createHtmlNode(r,i,this.options==="waiting-for-result")}createHtmlNode(r,i,n){var c,u,f,d,h,p;let s=window.createDiv();s.setText(i);let{color:a,daysSinceCommit:o}=wh((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds,r==null?void 0:r.isZeroCommit,this.settings);s.style.backgroundColor=a,s.setAttribute("data-author",(f=(u=r==null?void 0:r.author)==null?void 0:u.name)!=null?f:""),s.setAttribute("data-author-email",(h=(d=r==null?void 0:r.author)==null?void 0:d.email)!=null?h:""),(0,kl.setTooltip)(s,(p=r==null?void 0:r.summary)!=null?p:""),TT(r,n,s);function l(){let g=s.cloneNode(!0);return Sl.add(g),n||xT(o),g}return l}renderNonZeroCommit(r){let i=this.settings.showCommitHash?this.renderHash(r):"",n=this.settings.authorDisplay==="hide"?"":`${this.renderAuthorName(r,this.settings.authorDisplay)}`,s=this.settings.dateTimeFormatOptions==="hide"?"":`${this.renderAuthoringDate(r,this.settings.dateTimeFormatOptions,this.settings.dateTimeFormatCustomString,this.settings.dateTimeTimezone)}`;return[i,n,s].filter(o=>o.length>=1).join(" ")}renderHash(r){return r.hash.substring(0,6)}renderAuthorName(r,i){var o,l,c,u;let n=(l=(o=r==null?void 0:r.author)==null?void 0:o.name)!=null?l:"",s=n.split(" ").filter(f=>f.length>=1),a;switch(i){case"initials":a=s.map(f=>f[0].toUpperCase()).join("");break;case"first name":a=(c=s.first())!=null?c:$T;break;case"last name":a=(u=s.last())!=null?u:$T;break;case"full":a=n;break;default:return Bs(i)}return(0,FT.isDeepStrictEqual)(r==null?void 0:r.author,r==null?void 0:r.committer)||(a=a+y4),a}renderAuthoringDate(r,i,n,s){var c;if(((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds)===void 0)return"?";let o;switch(i){case"date":o=Fd;break;case"datetime":o=Jg;break;case"custom":o=n;break;case"natural language":o=u=>{let f=u.diff((0,kl.moment)());return kl.moment.duration(f).humanize(!0)};break;default:return Bs(i)}let l=kl.moment.unix(r.author.epochSeconds);switch(s){case"viewer-local":break;case"author-local":l=l.utcOffset(r.author.tz),typeof o=="string"&&(o+=" Z");break;case"utc0000":l=l.utc(),typeof o=="string"&&(o+="[Z]");break;default:return Bs(s)}return typeof o=="string"?l.format(o):o(l)}adaptTextForFakeCommit(r,i,n){var l,c,u;let s=(c=(l=ph())==null?void 0:l.text)!=null?c:i,a=n!=="waiting-for-result"&&r.isZeroCommit?b4:E4;i=s.replace(x4,a);let o=(u=It.plugin.localStorage.getGutterSpacingFallbackLength())!=null?u:i.length;if(i=ak(i,o,a),n!=="waiting-for-result"&&r.isZeroCommit){let f=Math.min(o,_4);i=ok(i,o-f)}return i}};function Fa(t,e,r,i,n,s){let a=$u.create();a.update(JSON.stringify(n)),a.update(`s${e}-e${r}-k${i}-o${s}`);let o=a.hex(),l=mh.get(o);if(l)return l;let c=new lw(t,e,r,i,n,s);return mh.set(o,c),c}m();var IT=require("obsidian");function uw(){let t=It.plugin.localStorage.getGutterSpacingFallbackLength();return new Cl(Array(t).fill("-").join(""))}function fw(t){let{lineAuthoring:e,ageForInitialRender:r}=S4(t);return Fa(e,1,1,"initialGutter"+r,t,"waiting-for-result")}function S4(t){var s;let e=(s=ET())!=null?s:dh(t)*.25,r=(0,IT.moment)().add(-e,"days"),i={name:"",epochSeconds:nk(r),tz:"+0000"},n={hash:"waiting-for-result",author:i,committer:i,isZeroCommit:!1};return{lineAuthoring:{hashPerLine:[void 0,"waiting-for-result"],commits:new Map([["waiting-for-result",n]])},ageForInitialRender:e}}m();function MT(t,e){return Fa({hashPerLine:[void 0,"000000"],commits:new Map([["000000",pT]])},1,1,t,e)}var dw=new Cl(""),NT=(0,LT.gutter)({class:"line-author-gutter-container",markers(t){let e=t.state.field(xl,!1);return k4(t,e)},lineMarkerChange(t){let e=fh(t.state.field(xl));return fh(t.startState.field(xl))!==e},renderEmptyElements:!0,initialSpacer:t=>(DT(t),uw()),updateSpacer:(t,e)=>{var r,i;return DT(e.view),(i=(r=ph())==null?void 0:r.gutter)!=null?i:uw()}});function k4(t,e){let r=fh(e),i=t.state.doc,n=new Map;for(let u=1;u<=i.lines;u++){let f=i.line(u).from,d=t.lineBlockAt(f).to;n.set(u,[f,d]),r.update([f,d,0])}let s=Fu.get();r.update("s"+Object.values(Fu).join(","));let a=r.hex(),o=gh.get(a);if(o)return o;let{result:l,allowCache:c}=C4(i,n,s,e);return c&&gh.set(a,l),l}function C4(t,e,r,i){let n=!0,s=t.lines,a=[];function o(f,d,h){return a.push(h.range(f,d))}let l=A4(s,i),c=t.length===0,u=t.iterLines(s,s+1).next().value==="";for(let f=1;f<=s;f++){let[d,h]=e.get(f),p=t.lineAt(h).number;if(c){o(d,h,dw);continue}if(f===s&&u){o(d,h,dw);continue}if(i===void 0){o(d,h,fw(r)),n=!1;continue}let{key:g,la:v}=i;if(v==="untracked"){o(d,h,MT(v,r));continue}let b=v.hashPerLine.length-1,_=l[f],C=l[p];if(C&&C>b&&o(d,h,dw),_!==void 0&&cv(1,_,b)&&C!==void 0&&cv(1,C,b)){o(d,h,Fa(v,_,C,g,r));continue}if(b<1){o(d,h,fw(r)),n=!1;continue}let x=Math.clamp(_!=null?_:f,1,b),S=Math.clamp(C!=null?C:p,1,b);o(d,h,Fa(v,x,S,g+"computing",r,"waiting-for-result"))}return{result:OT.RangeSet.of(a,!0),allowCache:n}}function A4(t,e){if(!(e!=null&&e.lineOffsetsFromUnsavedChanges))return Array.from(new Array(t+1),n=>n);let r=[void 0],i=0;for(let n=1;n<=t;n++){let s=e.lineOffsetsFromUnsavedChanges.get(n);i+=s!=null?s:0,r[n]=s===void 0?n-i:void 0}return r}function DT(t){t.dom.querySelectorAll(".cm-gutters").forEach(r=>{r!=null&&r.style&&(r.style.marginLeft||(r.style.marginLeft="unset"))})}var _h=class{constructor(e){this.plugin=e;this.lineAuthorings=new Map}async trackChanged(e){return this.trackChangedHelper(e).catch(r=>(console.warn("Git: Error in trackChanged."+r),Promise.reject(r)))}async trackChangedHelper(e){if(e){if(e.path===void 0){console.warn("Git: Attempted to track change of undefined filepath. Unforeseen situation.");return}return this.computeLineAuthorInfo(e.path)}}destroy(){this.lineAuthorings.clear(),_T()}async computeLineAuthorInfo(e){let r=this.plugin.editorIntegration.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager,i=await r.submoduleAwareHeadRevisonInContainingDirectory(e),n=await r.hashObject(e),s=gT(i,n,e);if(s!==void 0){if(!this.lineAuthorings.has(s)){let a=await r.blame(e,this.plugin.settings.lineAuthor.followMovement,this.plugin.settings.lineAuthor.ignoreWhitespace);this.lineAuthorings.set(s,a)}this.notifyComputationResultToSubscribers(e,s)}}notifyComputationResultToSubscribers(e,r){Si.ifFilepathDefinedTransformSubscribers(e,i=>i.forEach(n=>n.notifyLineAuthoring(r,this.lineAuthorings.get(r))))}},HT=BT.Prec.high([xl,NT]);var UT="https://momentjs.com/docs/#/parsing/string-format/",T4="https://publish.obsidian.md/git-doc/Line+Authoring",yh=class extends j.PluginSettingTab{constructor(r,i){super(r,i);this.plugin=i;this.lineAuthorColorSettings=new Map;this.icon="git-pull-request"}get settings(){return this.plugin.settings}display(){let{containerEl:r}=this,i=this.plugin,n;i.settings.differentIntervalCommitAndPush?n="commit":n="commit-and-sync";let s=i.gitReady;r.empty(),s||(r.createEl("p",{text:"Git is not ready. When all settings are correct you can configure commit-sync, etc."}),r.createEl("br"));let a;if(s){new j.Setting(r).setName("Automatic").setHeading(),new j.Setting(r).setName("Split timers for automatic commit and sync").setDesc("Enable to use one interval for commit and another for sync.").addToggle(f=>f.setValue(i.settings.differentIntervalCommitAndPush).onChange(async d=>{i.settings.differentIntervalCommitAndPush=d,await i.saveSettings(),i.automaticsManager.reload("commit","push"),this.refreshDisplayWithDelay()})),new j.Setting(r).setName(`Auto ${n} interval (minutes)`).setDesc(`${i.settings.differentIntervalCommitAndPush?"Commit":"Commit and sync"} changes every X minutes. Set to 0 (default) to disable. (See below setting for further configuration!)`).addText(f=>{f.inputEl.type="number",this.setNonDefaultValue({text:f,settingsProperty:"autoSaveInterval"}),f.setPlaceholder(String(pt.autoSaveInterval)),f.onChange(async d=>{d!==""?i.settings.autoSaveInterval=Number(d):i.settings.autoSaveInterval=pt.autoSaveInterval,await i.saveSettings(),i.automaticsManager.reload("commit")})}),a=new j.Setting(r).setName(`Auto ${n} after stopping file edits`).setDesc(`Requires the ${n} interval not to be 0. + If turned on, do auto ${n} every ${lk(i.settings.autoSaveInterval)} after stopping file edits. + This also prevents auto ${n} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(f=>f.setValue(i.settings.autoBackupAfterFileChange).onChange(async d=>{i.settings.autoBackupAfterFileChange=d,this.refreshDisplayWithDelay(),await i.saveSettings(),i.automaticsManager.reload("commit")})),this.mayDisableSetting(a,i.settings.setLastSaveToLastCommit),a=new j.Setting(r).setName(`Auto ${n} after latest commit`).setDesc(`If turned on, sets last auto ${n} timestamp to the latest commit timestamp. This reduces the frequency of auto ${n} when doing manual commits.`).addToggle(f=>f.setValue(i.settings.setLastSaveToLastCommit).onChange(async d=>{i.settings.setLastSaveToLastCommit=d,await i.saveSettings(),i.automaticsManager.reload("commit"),this.refreshDisplayWithDelay()})),this.mayDisableSetting(a,i.settings.autoBackupAfterFileChange),a=new j.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(f=>{f.inputEl.type="number",this.setNonDefaultValue({text:f,settingsProperty:"autoPushInterval"}),f.setPlaceholder(String(pt.autoPushInterval)),f.onChange(async d=>{d!==""?i.settings.autoPushInterval=Number(d):i.settings.autoPushInterval=pt.autoPushInterval,await i.saveSettings(),i.automaticsManager.reload("push")})}),this.mayDisableSetting(a,!i.settings.differentIntervalCommitAndPush),new j.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(f=>{f.inputEl.type="number",this.setNonDefaultValue({text:f,settingsProperty:"autoPullInterval"}),f.setPlaceholder(String(pt.autoPullInterval)),f.onChange(async d=>{d!==""?i.settings.autoPullInterval=Number(d):i.settings.autoPullInterval=pt.autoPullInterval,await i.saveSettings(),i.automaticsManager.reload("pull")})}),new j.Setting(r).setName(`Auto ${n} only staged files`).setDesc(`If turned on, only staged files are committed on ${n}. If turned off, all changed files are committed.`).addToggle(f=>f.setValue(i.settings.autoCommitOnlyStaged).onChange(async d=>{i.settings.autoCommitOnlyStaged=d,await i.saveSettings()})),new j.Setting(r).setName(`Specify custom commit message on auto ${n}`).setDesc("You will get a pop up to specify your message.").addToggle(f=>f.setValue(i.settings.customMessageOnAutoBackup).onChange(async d=>{i.settings.customMessageOnAutoBackup=d,await i.saveSettings(),this.refreshDisplayWithDelay()})),a=new j.Setting(r).setName(`Commit message on auto ${n}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(f=>{f.setPlaceholder(pt.autoCommitMessage).onChange(async d=>{d===""?i.settings.autoCommitMessage=pt.autoCommitMessage:i.settings.autoCommitMessage=d,await i.saveSettings()}),this.setNonDefaultValue({text:f,settingsProperty:"autoCommitMessage"})}),this.mayDisableSetting(a,i.settings.customMessageOnAutoBackup),new j.Setting(r).setName("Commit message").setHeading();let c=new j.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message). Leave empty to require manual input on each commit.");c.addTextArea(f=>{c.addButton(d=>{d.setIcon("reset").setTooltip(`Set to default: "${pt.commitMessage}"`).onClick(()=>{f.setValue(pt.commitMessage),f.onChanged()})}),f.setValue(i.settings.commitMessage),f.onChange(async d=>{i.settings.commitMessage=d,await i.saveSettings()})}),j.Platform.isDesktopApp&&new j.Setting(r).setName("Commit message script").setDesc("A script that is run using 'sh -c' to generate the commit message. May be used to generate commit messages using AI tools. Available placeholders: {{hostname}}, {{date}}.").addText(f=>{f.onChange(async d=>{d===""?i.settings.commitMessageScript=pt.commitMessageScript:i.settings.commitMessageScript=d,await i.saveSettings()}),this.setNonDefaultValue({text:f,settingsProperty:"commitMessageScript"})});let u=new j.Setting(r).setName("{{date}} placeholder format").addMomentFormat(f=>f.setDefaultFormat(i.settings.commitDateFormat).setValue(i.settings.commitDateFormat).onChange(async d=>{i.settings.commitDateFormat=d,await i.saveSettings()}));u.descEl.createSpan({text:` Specify custom date format. E.g. "${ev}. See `}),u.descEl.createEl("a",{text:"Moment.js documentation",href:UT,attr:{target:"_blank"}}),u.descEl.createSpan({text:" for more formats."}),new j.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device. Defaults to the OS hostname if not set on desktop.").addText(f=>{var d;return f.setValue((d=i.localStorage.getHostname())!=null?d:"").onChange(h=>{i.localStorage.setHostname(h)})}),new j.Setting(r).setName("Preview commit message").addButton(f=>f.setButtonText("Preview").onClick(async()=>{let d=await i.gitManager.formatCommitMessage(i.settings.commitMessage);new j.Notice(`${d}`)})),new j.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(f=>f.setValue(i.settings.listChangedFilesInMessageBody).onChange(async d=>{i.settings.listChangedFilesInMessageBody=d,await i.saveSettings()})),new j.Setting(r).setName("Pull").setHeading(),i.gitManager instanceof Se&&new j.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(f=>{let d={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};f.addOptions(d),f.setValue(i.settings.syncMethod),f.onChange(async h=>{i.settings.syncMethod=h,await i.saveSettings()})}),new j.Setting(r).setName("Merge strategy on conflicts").setDesc("Decide how to solve conflicts when pulling remote changes. This can be used to favor your local changes or the remote changes automatically.").addDropdown(f=>{let d={none:"None (git default)",ours:"Our changes",theirs:"Their changes"};f.addOptions(d),f.setValue(i.settings.mergeStrategy),f.onChange(async h=>{i.settings.mergeStrategy=h,await i.saveSettings()})}),new j.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(f=>f.setValue(i.settings.autoPullOnBoot).onChange(async d=>{i.settings.autoPullOnBoot=d,await i.saveSettings()})),new j.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),a=new j.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${i.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(f=>f.setValue(!i.settings.disablePush).onChange(async d=>{i.settings.disablePush=!d,this.refreshDisplayWithDelay(),await i.saveSettings()})),new j.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${i.settings.disablePush?"":"and push "}only.`).addToggle(f=>f.setValue(i.settings.pullBeforePush).onChange(async d=>{i.settings.pullBeforePush=d,this.refreshDisplayWithDelay(),await i.saveSettings()})),i.gitManager instanceof Se&&new j.Setting(r).setName("Squash commits before push").setDesc("On commit-and-sync, squash all local unpushed commits into a single commit right before pushing. Keeps the remote history clean when committing often. Only unpushed commits are rewritten, so no force-push is needed.").addToggle(f=>f.setValue(i.settings.squashCommitsBeforePush).onChange(async d=>{i.settings.squashCommitsBeforePush=d,await i.saveSettings()})),i.gitManager instanceof Se&&(new j.Setting(r).setName("Hunk management").setDesc("Hunks are sections of grouped line changes right in your editor.").setHeading(),new j.Setting(r).setName("Signs").setDesc("This allows you to see your changes right in your editor via colored markers and stage/reset/preview individual hunks.").addToggle(f=>f.setValue(i.settings.hunks.showSigns).onChange(async d=>{i.settings.hunks.showSigns=d,await i.saveSettings(),i.editorIntegration.refreshSignsSettings()})),new j.Setting(r).setName("Hunk commands").setDesc("Adds commands to stage/reset individual Git diff hunks and navigate between them via 'Go to next/prev hunk' commands.").addToggle(f=>f.setValue(i.settings.hunks.hunkCommands).onChange(async d=>{i.settings.hunks.hunkCommands=d,await i.saveSettings(),i.editorIntegration.refreshSignsSettings()})),new j.Setting(r).setName("Status bar with summary of line changes").addDropdown(f=>f.addOptions({disabled:"Disabled",colored:"Colored",monochrome:"Monochrome"}).setValue(i.settings.hunks.statusBar).onChange(async d=>{i.settings.hunks.statusBar=d,await i.saveSettings(),i.editorIntegration.refreshSignsSettings()})),new j.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new j.Setting(r).setName("History view").setHeading(),new j.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(c=>{let u={hide:"Hide",full:"Full",initials:"Initials"};c.addOptions(u),c.setValue(i.settings.authorInHistoryView),c.onChange(async f=>{i.settings.authorInHistoryView=f,await i.saveSettings(),await i.refresh()})}),new j.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(c=>c.setValue(i.settings.dateInHistoryView).onChange(async u=>{i.settings.dateInHistoryView=u,await i.saveSettings(),await i.refresh()})),new j.Setting(r).setName("Source control view").setHeading(),new j.Setting(r).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(c=>c.setValue(i.settings.refreshSourceControl).onChange(async u=>{i.settings.refreshSourceControl=u,await i.saveSettings()})),new j.Setting(r).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(c=>{c.inputEl.type="number",this.setNonDefaultValue({text:c,settingsProperty:"refreshSourceControlTimer"}),c.setPlaceholder(String(pt.refreshSourceControlTimer)),c.onChange(async f=>{f!==""&&Number.isInteger(Number(f))?i.settings.refreshSourceControlTimer=Math.max(Number(f),500):i.settings.refreshSourceControlTimer=pt.refreshSourceControlTimer,await i.saveSettings(),i.setRefreshDebouncer()})}),new j.Setting(r).setName("Miscellaneous").setHeading(),i.gitManager instanceof Se&&new j.Setting(r).setName("Diff view style").setDesc('Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.').addDropdown(c=>{let u={split:"Split",git_unified:"Unified"};c.addOptions(u),c.setValue(i.settings.diffStyle),c.onChange(async f=>{i.settings.diffStyle=f,await i.saveSettings()})}),new j.Setting(r).setName("Disable informative notifications").setDesc("Disable informative notifications for git operations to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(i.settings.disablePopups).onChange(async u=>{i.settings.disablePopups=u,this.refreshDisplayWithDelay(),await i.saveSettings()})),new j.Setting(r).setName("Disable error notifications").setDesc("Disable error notifications of any kind to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(!i.settings.showErrorNotices).onChange(async u=>{i.settings.showErrorNotices=!u,await i.saveSettings()})),i.settings.disablePopups||new j.Setting(r).setName("Hide notifications for no changes").setDesc("Don't show notifications when there are no changes to commit or push.").addToggle(c=>c.setValue(i.settings.disablePopupsForNoChanges).onChange(async u=>{i.settings.disablePopupsForNoChanges=u,await i.saveSettings()})),new j.Setting(r).setName("Show status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(i.settings.showStatusBar).onChange(async u=>{i.settings.showStatusBar=u,await i.saveSettings()})),new j.Setting(r).setName("File menu integration").setDesc('Add "Stage", "Unstage" and "Add to .gitignore" actions to the file menu.').addToggle(c=>c.setValue(i.settings.showFileMenu).onChange(async u=>{i.settings.showFileMenu=u,await i.saveSettings()})),new j.Setting(r).setName("Show branch status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(i.settings.showBranchStatusBar).onChange(async u=>{i.settings.showBranchStatusBar=u,await i.saveSettings()})),new j.Setting(r).setName("Show the count of modified files in the status bar").addToggle(c=>c.setValue(i.settings.changedFilesInStatusBar).onChange(async u=>{i.settings.changedFilesInStatusBar=u,await i.saveSettings()})),i.gitManager instanceof zi?new j.Setting(r).setName("Authentication/commit author").setHeading():new j.Setting(r).setName("Commit author").setHeading(),i.gitManager instanceof zi&&new j.Setting(r).setName("Username on your git server. E.g. your username on GitHub").addText(c=>{var u;c.setValue((u=i.localStorage.getUsername())!=null?u:""),c.onChange(f=>{i.localStorage.setUsername(f)})}),i.gitManager instanceof zi&&new j.Setting(r).setName("Password/Personal access token").setDesc("Type in your password. You won't be able to see it again.").addText(c=>{c.inputEl.autocapitalize="off",c.inputEl.autocomplete="off",c.inputEl.spellcheck=!1,c.onChange(u=>{i.localStorage.setPassword(u)})}),i.gitReady&&new j.Setting(r).setName("Author name for commit").addText(async c=>{var u;c.setValue((u=await i.gitManager.getConfig("user.name"))!=null?u:""),c.onChange(async f=>{await i.gitManager.setConfig("user.name",f==""?void 0:f)})}),i.gitReady&&new j.Setting(r).setName("Author email for commit").addText(async c=>{var u;c.setValue((u=await i.gitManager.getConfig("user.email"))!=null?u:""),c.onChange(async f=>{await i.gitManager.setConfig("user.email",f==""?void 0:f)})}),new j.Setting(r).setName("Advanced").setDesc("These settings usually don't need to be changed, but may be required for special setups.").setHeading(),i.gitManager instanceof Se&&(new j.Setting(r).setName("Update submodules").setDesc('"Commit-and-sync" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule.').addToggle(c=>c.setValue(i.settings.updateSubmodules).onChange(async u=>{i.settings.updateSubmodules=u,await i.saveSettings()})),i.settings.updateSubmodules&&new j.Setting(r).setName("Submodule recurse checkout/switch").setDesc("Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist).").addToggle(c=>c.setValue(i.settings.submoduleRecurseCheckout).onChange(async u=>{i.settings.submoduleRecurseCheckout=u,await i.saveSettings()}))),i.gitManager instanceof Se&&new j.Setting(r).setName("Custom Git binary path").setDesc("Specify the path to the Git binary/executable. Git should already be in your PATH. Should only be necessary for a custom Git installation.").addText(c=>{var u;c.setValue((u=i.localStorage.getGitPath())!=null?u:""),c.setPlaceholder("git"),c.onChange(f=>{i.localStorage.setGitPath(f),i.gitManager.updateGitPath(f||"git").catch(d=>i.displayError(d))})}),i.gitManager instanceof Se&&new j.Setting(r).setName("Additional environment variables").setDesc("Use each line for a new environment variable in the format KEY=VALUE .").addTextArea(c=>{c.setPlaceholder("GIT_DIR=/path/to/git/dir"),c.setValue(i.localStorage.getEnvVars().join(` +`)),c.onChange(u=>{i.localStorage.setEnvVars(u.split(` +`))})}),i.gitManager instanceof Se&&new j.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(c=>{c.setValue(i.localStorage.getPATHPaths().join(` +`)),c.onChange(u=>{i.localStorage.setPATHPaths(u.split(` +`))})}),i.gitManager instanceof Se&&new j.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(c=>{c.setButtonText("Reload"),c.setCta(),c.onClick(async()=>{await i.gitManager.setGitInstance()})}),new j.Setting(r).setName("Custom base path (Git repository path)").setDesc(` + Sets the relative path to the vault from which the Git binary should be executed. + Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows. + `).addText(c=>{c.setValue(i.settings.basePath),c.setPlaceholder("directory/directory-with-git-repo"),c.onChange(async u=>{i.settings.basePath=u,await i.saveSettings(),i.gitManager.updateBasePath(u||"").catch(f=>i.displayError(f))})}),new j.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Corresponds to the GIT_DIR environment variable. Relative paths are resolved from the custom base path, or the vault root when no base path is configured. Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(c=>{c.setValue(i.settings.gitDir),c.setPlaceholder(".git"),c.onChange(async u=>{i.settings.gitDir=u,await i.saveSettings()})}),new j.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(c=>c.setValue(i.localStorage.getPluginDisabled()).onChange(u=>{i.localStorage.setPluginDisabled(u),u?i.unloadPlugin():i.init({fromReload:!0}).catch(f=>i.displayError(f)),new j.Notice("Obsidian must be restarted for the changes to take affect.")})),new j.Setting(r).setName("Support").setHeading(),new j.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(c=>{var f;let u=(f=c.buttonEl.parentElement)==null?void 0:f.createEl("a",{href:"https://ko-fi.com/F1F195IQ5",attr:{target:"_blank"}});u&&(u.createEl("img",{attr:{height:"36",style:"border:0px;height:36px;",src:"https://cdn.ko-fi.com/cdn/kofi3.png?v=3",border:"0",alt:"Buy Me a Coffee at ko-fi.com"}}),c.buttonEl.remove())});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new j.Notice("Debug information copied to clipboard. May contain sensitive information!")},j.Platform.isDesktopApp){let c=r.createDiv();c.setAttr("align","center"),c.setText(`Debugging and logging: +You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),j.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,i){i&&(r.setDisabled(i),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.editorIntegration.activateLineAuthoring():this.plugin.editorIntegration.deactiveLineAuthoring()}async lineAuthorSettingHandler(r,i){this.settings.lineAuthor[r]=i,await this.plugin.saveSettings(),this.plugin.editorIntegration.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new j.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.editorIntegration.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.createEl("a",{href:T4,text:"Feature guide and quick examples",attr:{target:"_blank"}}),r.descEl.createEl("br"),r.descEl.createSpan({text:" The commit hash, author name and authoring date can all be individually toggled."}),r.descEl.createEl("br"),r.descEl.createSpan({text:"Hide everything, to only show the age-colored sidebar."}),r.addToggle(i=>i.setValue(this.settings.lineAuthor.show).onChange(n=>{this.configureLineAuthorShowStatus(n),this.refreshDisplayWithDelay()})),this.settings.lineAuthor.show){let i=new j.Setting(this.containerEl).setName("Follow movement and copies across files and commits").addDropdown(l=>{l.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),l.setValue(this.settings.lineAuthor.followMovement),l.onChange(c=>this.lineAuthorSettingHandler("followMovement",c))});if(i.descEl.createSpan({text:"By default (deactivated), each line only shows the newest commit where it was changed."}),i.descEl.createEl("br"),i.descEl.createSpan({text:"With "}),i.descEl.createEl("i",{text:"same commit"}),i.descEl.createSpan({text:", cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown."}),i.descEl.createEl("br"),i.descEl.createSpan({text:"With "}),i.descEl.createEl("i",{text:"all commits"}),i.descEl.createSpan({text:", cut-copy-paste-ing text inbetween multiple commits will be detected."}),i.descEl.createEl("br"),i.descEl.createSpan({text:"It uses "}),i.descEl.createEl("a",{href:"https://git-scm.com/docs/git-blame",text:"git-blame",attr:{target:"_blank"}}),i.descEl.createSpan({text:` and for matches (at least ${Id} characters) within the same (or all) commit(s), `}),i.descEl.createEl("em",{text:"the originating"}),i.descEl.createSpan({text:" commit's information is shown."}),new j.Setting(this.containerEl).setName("Show commit hash").addToggle(l=>{l.setValue(this.settings.lineAuthor.showCommitHash),l.onChange(c=>this.lineAuthorSettingHandler("showCommitHash",c))}),new j.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(l=>{let c={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};l.addOptions(c),l.setValue(this.settings.lineAuthor.authorDisplay),l.onChange(async u=>this.lineAuthorSettingHandler("authorDisplay",u))}),new j.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(l=>{let c={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};l.addOptions(c),l.setValue(this.settings.lineAuthor.dateTimeFormatOptions),l.onChange(async u=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",u),this.refreshDisplayWithDelay()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let l=new j.Setting(this.containerEl);l.setName("Custom authoring date format").addText(c=>{c.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),c.setPlaceholder("YYYY-MM-DD HH:mm"),c.onChange(async u=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",u),this.setCustomDateTimeDescription(l.descEl,u)})}),this.setCustomDateTimeDescription(l.descEl,this.settings.lineAuthor.dateTimeFormatCustomString)}let n=new j.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(l=>{let c={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};l.addOptions(c),l.setValue(this.settings.lineAuthor.dateTimeTimezone),l.onChange(async u=>this.lineAuthorSettingHandler("dateTimeTimezone",u))});n.descEl.empty(),n.descEl.createSpan({text:`The time-zone in which the authoring date should be shown. +Either your local time-zone (default), +the author's time-zone during commit creation or +`}),n.descEl.createEl("a",{text:"UTC\xB100:00",href:"https://en.wikipedia.org/wiki/UTC%C2%B100:00"}),n.descEl.createSpan({text:"."});let s=new j.Setting(this.containerEl).setName("Oldest age in coloring");this.setOldestAgeDescription(s.descEl,this.settings.lineAuthor.coloringMaxAge),s.addText(l=>{l.setPlaceholder("1y"),l.setValue(this.settings.lineAuthor.coloringMaxAge),l.onChange(async c=>{let f=Iu(c)!==void 0;this.setOldestAgeDescription(s.descEl,c),f&&(await this.lineAuthorSettingHandler("coloringMaxAge",c),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest");let a=new j.Setting(this.containerEl).setName("Text color").addText(l=>{l.setValue(this.settings.lineAuthor.textColorCss),l.onChange(async c=>{await this.lineAuthorSettingHandler("textColorCss",c)})});a.descEl.empty(),a.descEl.createSpan({text:"The CSS color of the gutter text."}),a.descEl.createEl("br"),a.descEl.createEl("br"),a.descEl.createSpan({text:"It is highly recommended to use "}),a.descEl.createEl("a",{text:"CSS variables",href:"https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties"}),a.descEl.createSpan({text:" defined by themes (e.g. "}),a.descEl.createEl("pre",{text:"var(--text-muted)",attr:{style:"display:inline"}}),a.descEl.createSpan({text:" or "}),a.descEl.createEl("pre",{text:"var(--text-on-accent)",attr:{style:"display:inline"}}),a.descEl.createSpan({text:"), because they automatically adapt to theme changes."}),a.descEl.createEl("br"),a.descEl.createEl("br"),a.descEl.createSpan({text:"See: "}),a.descEl.createEl("a",{text:"List of available CSS variables in Obsidian",href:"https://github.com/obsidian-community/obsidian-theme-template/blob/main/obsidian.css"});let o=new j.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(l=>{l.setValue(this.settings.lineAuthor.ignoreWhitespace),l.onChange(c=>this.lineAuthorSettingHandler("ignoreWhitespace",c))});o.descEl.empty(),o.descEl.createSpan({text:"Whitespace and newlines are interpreted as part of the document and in changes by default (hence not ignored). This makes the last line being shown as 'changed' when a new subsequent line is added, even if the previously last line's text is the same."}),o.descEl.createEl("br"),o.descEl.createSpan({text:"If you don't care about purely-whitespace changes (e.g. list nesting / quote indentation changes), then activating this will provide more meaningful change detection."})}}createColorSetting(r){let i=new j.Setting(this.containerEl).setName("").addText(n=>{let s=hw(r,this.settings.lineAuthor),a=hw(r,pt.lineAuthor);n.setPlaceholder(lv(a)),n.setValue(lv(s)),n.onChange(async o=>{let l=ik(o);if(l!==void 0){let c=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(c,l)}this.refreshColorSettingsDesc(r,l)})});this.lineAuthorColorSettings.set(r,i),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,hw(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let i=this.lineAuthorColorSettings.get(r);if(i){let n=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";i.nameEl.setText(`Color for ${n} commits`)}}refreshColorSettingsDesc(r,i){let n=this.lineAuthorColorSettings.get(r);n&&this.colorSettingPreviewDesc(n.descEl,r,this.settings.lineAuthor,i!==void 0)}colorSettingPreviewDesc(r,i,n,s){r.empty(),r.createSpan({text:"Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and named colors (e.g. 'black', 'purple'). Color preview: "});let a=s?bh(i,n):"rgba(127,127,127,0.3)",o=j.moment.unix(j.moment.now()/1e3).format("YYYY-MM-DD"),l=s?`abcdef Author Name ${o}`:"invalid color";r.createEl("div",{text:l,attr:{class:"line-author-settings-preview",style:`background-color: ${a}; width: 30ch;`}})}setCustomDateTimeDescription(r,i){r.empty(),r.createEl("a",{text:"Format string",href:UT}),r.createSpan({text:" to display the authoring date."}),r.createEl("br");let n=(0,j.moment)().format(i);r.createSpan({text:`Currently: ${n}`})}setOldestAgeDescription(r,i){let n=Iu(i),s=n!==void 0?`${n.asDays()} days`:"invalid!";r.empty(),r.createSpan({text:`The oldest age in the line author coloring. Everything older will have the same color. +Smallest valid age is "1d". Currently: ${s}`})}setNonDefaultValue({settingsProperty:r,text:i}){let n=this.plugin.settings[r];pt[r]!==n&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean"?i.setValue(String(n)):i.setValue(JSON.stringify(n)))}refreshDisplayWithDelay(r=80){window.setTimeout(()=>this.display(),r)}};function hw(t,e){return t==="oldest"?e.colorOld:e.colorNew}function Iu(t){let e=j.moment.duration("P"+t.toUpperCase());return e.isValid()&&e.asDays()&&e.asDays()>=1?e:void 0}m();var Ur=require("obsidian");var xh=class{constructor(e,r){this.statusBarEl=e;this.plugin=r;this.messages=[];this.currentMessage=null;this.lastMessageTimestamp=null;this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(e,r){this.messages.push({message:`Git: ${e.slice(0,100)}`,timeout:r}),this.display()}displayProgress(e){this.progress=e,this.display()}clearProgress(e=!0){this.progress=void 0,e&&this.display()}display(){this.progress?this.displayState():this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){if((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.pausedEl=this.statusBarEl.createDiv(),this.pausedEl.setAttribute("data-tooltip-position","top"),this.pausedEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Ur.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.localStorage.getPausedAutomatics()?((0,Ur.setIcon)(this.pausedEl,"pause-circle"),this.pausedEl.ariaLabel="Automatic routines are currently paused.",this.pausedEl.style.marginRight="5px",this.pausedEl.addClass(this.base+"paused")):(this.pausedEl.empty(),this.pausedEl.style.marginRight=""),this.progress){this.statusBarEl.ariaLabel=this.getProgressTooltip("Git operation in progress..."),(0,Ur.setIcon)(this.iconEl,this.getProgressIcon()),this.displayProgressText(),this.statusBarEl.addClass(this.base+"progress");return}switch(this.plugin.state.operation){case 0:this.displayFromNow();break;case 2:this.statusBarEl.ariaLabel="Committing changes...",(0,Ur.setIcon)(this.iconEl,"git-commit"),this.textEl.empty(),this.statusBarEl.addClass(this.base+"commit");break;case 3:this.statusBarEl.ariaLabel=this.getProgressTooltip("Pushing changes..."),(0,Ur.setIcon)(this.iconEl,"upload"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"push");break;case 1:this.statusBarEl.ariaLabel=this.getProgressTooltip("Pulling changes..."),(0,Ur.setIcon)(this.iconEl,"download"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"pull");break;case 4:this.statusBarEl.ariaLabel=this.getProgressTooltip("Fetching from remote..."),(0,Ur.setIcon)(this.iconEl,"download"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"fetch");break;case 5:this.statusBarEl.ariaLabel=this.getProgressTooltip("Checking out branch..."),(0,Ur.setIcon)(this.iconEl,"git-branch"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"checkout");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Ur.setIcon)(this.iconEl,"alert-triangle"),this.textEl.empty(),this.statusBarEl.addClass(this.base+"failed-init");break}}displayProgressText(){this.progress?this.textEl.setText(this.getCompactProgressText()):this.textEl.empty()}getProgressTooltip(e){if(!this.progress)return e;let r=this.progress.stage?`${this.progress.stage}: `:"";if(this.progress.progress===void 0)return this.progress.stage?`${this.progress.action}: ${this.progress.stage}...`:`${this.progress.action}...`;let i=this.progress.processed!==void 0&&this.progress.total!==void 0?` (${this.progress.processed}/${this.progress.total})`:"";return`${this.progress.action}: ${r}${Math.round(this.progress.progress)}%${i}`}getCompactProgressText(){return this.progress?this.progress.progress===void 0?`${this.progress.action}...`:`${this.progress.action} ${Math.round(this.progress.progress)}%`:""}getProgressIcon(){var e;switch((e=this.progress)==null?void 0:e.action){case"Fetching":case"Pulling":return"download";case"Pushing":return"upload";case"Checking out":return"git-branch";default:return"git-pull-request"}}displayFromNow(){var i;let e=this.lastCommitTimestamp,r=this.plugin.state.offlineMode;if(e){let n=(0,Ur.moment)(e).fromNow();this.statusBarEl.ariaLabel=`${r?"Offline: ":""}Last Commit: ${n}`,((i=this.unPushedCommits)!=null?i:0)>0&&(this.statusBarEl.ariaLabel+=` +(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Ur.setIcon)(this.iconEl,"globe"):(0,Ur.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus?this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()):this.textEl.empty(),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};m();var Sh=require("obsidian"),Eh=class extends Sh.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>window.setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let i=(0,Sh.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${i}: ${r}`,`${r}: ${i}`]}renderSuggestion(r,i){i.innerText=r}onChooseSuggestion(r,i){this.resolve&&this.resolve(r)}};m();var GT=require("obsidian"),Mu=class{constructor(e){this.plugin=e}saveLastAuto(e,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(e.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(e.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(e.toString())}loadLastAuto(){var e,r,i;return{backup:new Date((e=this.plugin.localStorage.getLastAutoBackup())!=null?e:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((i=this.plugin.localStorage.getLastAutoPush())!=null?i:"")}}async init(){await this.setUpAutoCommitAndSync();let e=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,e.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,e.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...e){this.plugin.localStorage.getPausedAutomatics()||(e.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),e.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),e.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval)))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let e=await this.plugin.gitManager.getLastCommitTime();e&&this.saveLastAuto(e,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let e=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,e.backup);this.startAutoCommitAndSync(r)}}}get isAutomaticsDisabled(){return!this.plugin.gitReady||this.plugin.localStorage.getPausedAutomatics()}startAutoCommitAndSync(e){if(this.isAutomaticsDisabled)return;let r=(e!=null?e:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?e===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,GT.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let r=await this.plugin.gitManager.getLastCommitTime();if(r){this.saveLastAuto(r,"backup");let i=this.diff(this.plugin.settings.autoSaveInterval,r);if(i>0)return this.startAutoCommitAndSync(i),!1}}let e=this.plugin.settings.autoCommitOnlyStaged;return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0,onlyStaged:e}):await this.plugin.commitAndSync({fromAutoBackup:!0,onlyStaged:e}),!0},e=>{e!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(e){if(this.isAutomaticsDisabled)return;let r=(e!=null?e:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(e){if(this.isAutomaticsDisabled)return;let r=(e!=null?e:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastAuto(new Date,"push"),this.startAutoPush()})}clearAutoCommitAndSync(){var r;let e=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,e=!0),this.plugin.autoCommitDebouncer&&((r=this.plugin.autoCommitDebouncer)==null||r.cancel(),this.plugin.autoCommitDebouncer=void 0,e=!0),e}clearAutoPull(){return this.timeoutIDPull?(window.clearTimeout(this.timeoutIDPull),this.timeoutIDPull=void 0,!0):!1}clearAutoPush(){return this.timeoutIDPush?(window.clearTimeout(this.timeoutIDPush),this.timeoutIDPush=void 0,!0):!1}diff(e,r){if(isNaN(r.getTime()))return e;let n=e-Math.round((new Date().getTime()-r.getTime())/1e3/60);return Math.max(0,n)}};m();var qi=require("obsidian");m();var Du=require("obsidian");async function jT(t,e,r){let i=await zT(e,r);if(i.result==="failure"){new Du.Notice(i.reason);return}let{isGitHub:n,branch:s,repo:a,user:o,filePath:l}=i;if(n){let c=t.getCursor("from").line+1,u=t.getCursor("to").line+1;c===u?window.open(`https://github.com/${o}/${a}/blob/${s}/${l}?plain=1#L${c}`):window.open(`https://github.com/${o}/${a}/blob/${s}/${l}?plain=1#L${c}-L${u}`)}else new Du.Notice("It seems like you are not using GitHub")}async function VT(t,e){let r=await zT(t,e);if(r.result==="failure"){new Du.Notice(r.reason);return}let{isGitHub:i,branch:n,repo:s,user:a,filePath:o}=r;i?window.open(`https://github.com/${a}/${s}/commits/${n}/${o}`):new Du.Notice("It seems like you are not using GitHub")}async function zT(t,e){var l,c;let r=await e.branchInfo(),i=r.tracking,n=r.current,s,a=e.getRelativeRepoPath(t.path);if(e instanceof Se){let u=await e.getSubmoduleOfFile(e.getRelativeRepoPath(t.path));if(u){a=u.relativeFilepath;let f=await e.git.cwd({path:u.submodule,root:!1}).status();if(i=f.tracking||void 0,n=f.current||void 0,i){let d=i.substring(0,i.indexOf("/")),h=await e.git.cwd({path:u.submodule,root:!1}).getConfig(`remote.${d}.url`,"local");if(h.value!=null)s=h.value;else return{result:"failure",reason:"Failed to get remote url of submodule"}}}}if(i==null)return{result:"failure",reason:"Remote branch is not configured"};if(n==null)return{result:"failure",reason:"Failed to get current branch name"};if(s==null){let u=i.substring(0,i.indexOf("/"));if(s=await e.getConfig(`remote.${u}.url`),s==null)return{result:"failure",reason:"Failed to get remote url"}}let o=s.match(/(?:^https:\/\/github\.com\/(.+)\/(.+?)(?:\.git)?$)|(?:^[a-zA-Z]+@github\.com:(.+)\/(.+?)(?:\.git)?$)/);if(o==null)return{result:"failure",reason:"Could not parse remote url"};{let[u,f,d,h,p]=o;return{result:"success",isGitHub:!!u,repo:(l=d!=null?d:p)!=null?l:"",user:(c=f!=null?f:h)!=null?c:"",branch:n,filePath:a}}}m();var WT=require("obsidian"),kh=class extends WT.FuzzySuggestModal{constructor(e,r){super(e.app),this.plugin=e,this.changedFiles=r,this.setPlaceholder("Not supported files will be opened by default app!")}getItems(){return this.changedFiles}getItemText(e){if(e.index=="U"&&e.workingDir=="U")return`Untracked | ${e.vaultPath}`;let r="",i="";return e.workingDir!=" "&&(r=`Working Dir: ${e.workingDir} `),e.index!=" "&&(i=`Index: ${e.index}`),`${r}${i} | ${e.vaultPath}`}onChooseItem(e,r){this.plugin.app.metadataCache.getFirstLinkpathDest(e.vaultPath,"")==null?this.app.openWithDefaultApp(e.vaultPath):this.plugin.app.workspace.openLinkText(e.vaultPath,"/")}};m();var qT=require("obsidian"),Ch=class extends qT.Modal{constructor(r,i){super(r);this.content=i;this.resolve=null}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onOpen(){let{contentEl:r,titleEl:i}=this;i.setText("Edit .gitignore");let n=r.createDiv(),s=n.createEl("textarea",{text:this.content,cls:["obsidian-git-textarea"],attr:{rows:10,cols:30,wrap:"off"}});n.createEl("button",{cls:["mod-cta","obsidian-git-center-button"],text:"Save"}).addEventListener("click",()=>{this.resolve(s.value),this.close()})}onClose(){let{contentEl:r}=this;r.empty(),this.resolve&&this.resolve(void 0)}};m();var Wu=require("@codemirror/state"),Wh=require("@codemirror/view");m();var Pl=require("@codemirror/state");m();var zt=class t{static createHunk(e,r,i,n){return{removed:{start:e,count:r,lines:[]},added:{start:i,count:n,lines:[]},vend:i+Math.max(n-1,0),type:n===0?"delete":r===0?"add":"change"}}static getHunkHeader(e){return`@@ -${e.removed.start}${e.removed.count>0?`,${e.removed.count}`:""} +${e.added.start}${e.added.count>0?`,${e.added.count}`:""} @@`}static createPartialHunk(e,r,i){let n=r,s=i-r+1,a=0;for(let o of e){let l=o.added.count-o.removed.count,c=0;if(o.added.start>=r&&o.vend<=i)c=l;else{let u=Math.max(0,i+1-(o.added.start+o.removed.count)),f=Math.max(0,r-(o.added.start+o.removed.count));o.added.start>=r&&o.added.start<=i?c=u:o.vend>=r&&o.vend<=i?(c=l-f,n=n-f):o.added.start<=r&&o.vend>=i?(c=u-f,n=n-f):a++,r>o.vend&&(n=n-l)}s=s-c}if(a!==e.length)return s===0&&(n=n-1),this.createHunk(n,s,r,i-r+1)}static patchLines(e,r=!1){let i=[];for(let n of e.removed.lines)i.push("-"+n);for(let n of e.added.lines)i.push("+"+n);return r?i.map(n=>n.replace(/\r$/,"")):i}static parseDiffLine(e){var l,c,u;let i=(l=e.split("@@")[1])==null?void 0:l.trim();if(!i)throw Error(`Invalid diff line: ${e}`);let n=i.split(" "),s=(c=n[0])==null?void 0:c.substring(1).split(","),a=(u=n[1])==null?void 0:u.substring(1).split(",");if(!s||!a||s[0]===void 0||a[0]===void 0)throw Error(`Invalid diff hunk range: ${e}`);return this.createHunk(parseInt(s[0]),parseInt(s[1]||"1"),parseInt(a[0]),parseInt(a[1]||"1"))}static changeEnd(e){return e.added.count===0?e.added.start:e.removed.count===0?e.added.start+e.added.count-1:e.added.start+Math.min(e.added.count,e.removed.count)-1}static calcSigns(e,r,i,n=1,s=1/0,a){if(a&&r.type!=="add")return console.error(`Invalid hunk with untracked=${a} hunk="${t.getHunkHeader(r)}"`),[];n=Math.max(1,n);let{start:o,added:l,removed:c}={start:r.added.start,added:r.added.count,removed:r.removed.count},u=this.changeEnd(r),f=r.type==="delete"&&(o===0||e&&this.changeEnd(e)===o)&&(!i||i.added.start!==o+1);f&&n===1&&(n=0);let d=[];for(let h=Math.max(o,n);h<=Math.min(u,s);h++){let p=r.type==="change"&&(c>l&&h===u||e&&e.added.start===0);d.push({type:f?"topdelete":p?"changedelete":a?"untracked":r.type,count:h===o?r.type==="add"?l:c:void 0,lnum:h+(f?1:0)})}if(r.type==="change"&&l>c&&r.vend>=n&&u<=s)for(let h=Math.max(u,n);h<=Math.min(r.vend,s);h++)d.push({type:"add",count:h===r.vend?l-c:void 0,lnum:h});return d}static createPatch(e,r,i,n=!1){let s=[`diff --git a/${e} b/${e}`,`index 000000..000000 ${i}`,`--- a/${e}`,`+++ b/${e}`],a=0;r=structuredClone(r);for(let o of r){let l=o.removed.start,c=o.removed.count,u=o.added.count;o.type==="add"&&(l=l+1);let f=o.removed.lines,d=o.added.lines;n&&([c,u]=[u,c],[f,d]=[d,f]),s.push(`@@ -${l},${c} +${l+a},${u} @@`);for(let h of f)s.push("-"+h);(n?o.added:o.removed).no_nl_at_eof&&s.push("\\ No newline at end of file");for(let h of d)s.push("+"+h);(n?o.removed:o.added).no_nl_at_eof&&s.push("\\ No newline at end of file"),o.removed.start=l+a,a=a+(u-c)}return s}static getSummary(e){let r={added:0,changed:0,removed:0};for(let i of e)if(i.type==="add")r.added+=i.added.count;else if(i.type==="delete")r.removed+=i.removed.count;else if(i.type==="change"){let n=i.added.count,s=i.removed.count,a=Math.min(n,s);r.changed+=a,r.added+=n-a,r.removed+=s-a}return r}static findHunk(e,r){if(!r)return[void 0,void 0];for(let i=0;i=e)return[n,i]}return[void 0,void 0]}static findNearestHunk(e,r,i,n){if(r.length!==0){if(i==="first")return 0;if(i==="last")return r.length-1;if(i==="next"){if(r[0].added.start>e)return 0;for(let s=r.length-1;s>=0;s--)if(r[s].added.start<=e){if(s+1e)return s+1;if(n)return 0}}else if(i==="prev"){if(Math.max(r[r.length-1].vend)0&&Math.max(r[s-1].vend,1)l.added.start?n++:o.added.starta.map(v=>g.replace(/&/,v))).reduce((g,v)=>g.concat(v)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");s(n(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((i&&!f&&!c?a.map(i):a).join(", ")+" {"+u.join(" ")+"}")}for(let a in e)s(n(a),e[a],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=ZT[YT]||1;return ZT[YT]=e+1,"\u037C"+e.toString(36)}static mount(e,r,i){let n=e[pw],s=i&&i.nonce;n?s&&n.setNonce(s):n=new mw(e,s),n.mount(Array.isArray(r)?r:[r],e)}},KT=new Map,mw=class{constructor(e,r){let i=e.ownerDocument||e,n=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let s=KT.get(i);if(s)return e[pw]=s;this.sheet=new n.CSSStyleSheet,KT.set(i,this)}else this.styleTag=i.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],e[pw]=this}mount(e,r){let i=this.sheet,n=0,s=0;for(let a=0;a-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),i)for(let c=0;cc){let f=t.slice(e,r).indexOf(i.slice(n,s));if(f>-1)return[new kt(e,e+f,n,n),new kt(e+f+c,r,s,s)]}else if(c>l){let f=i.slice(n,s).indexOf(t.slice(e,r));if(f>-1)return[new kt(e,e,n,n+f),new kt(r,r,n+f+l,s)]}if(l==1||c==1)return[new kt(e,r,n,s)];let u=g2(t,e,r,i,n,s);if(u){let[f,d,h]=u;return Ma(t,e,f,i,n,d).concat(Ma(t,f+h,r,i,d+h,s))}return R4(t,e,r,i,n,s)}var Ou=1e9,Lu=0,xw=!1;function R4(t,e,r,i,n,s){let a=r-e,o=s-n;if(Ou<1e9&&Math.min(a,o)>Ou*16||Lu>0&&Date.now()>Lu)return Math.min(a,o)>Ou*64?[new kt(e,r,n,s)]:XT(t,e,r,i,n,s);let l=Math.ceil((a+o)/2);gw.reset(l),vw.reset(l);let c=(h,p)=>t.charCodeAt(e+h)==i.charCodeAt(n+p),u=(h,p)=>t.charCodeAt(r-h-1)==i.charCodeAt(s-p-1),f=(a-o)%2!=0?vw:null,d=f?null:gw;for(let h=0;hOu||Lu>0&&!(h&63)&&Date.now()>Lu)return XT(t,e,r,i,n,s);let p=gw.advance(h,a,o,l,f,!1,c)||vw.advance(h,a,o,l,d,!0,u);if(p)return $4(t,e,r,e+p[0],i,n,s,n+p[1])}return[new kt(e,r,n,s)]}var Fh=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let r=0;rr)this.end+=2;else if(f>i)this.start+=2;else if(s){let d=n+(r-i)-l;if(d>=0&&d=r-u)return[h,n+h-d]}else{let h=r-s.vec[d];if(u>=h)return[u,f]}}}return null}},gw=new Fh,vw=new Fh;function $4(t,e,r,i,n,s,a,o){let l=!1;return!Tl(t,i)&&++i==r&&(l=!0),!Tl(n,o)&&++o==a&&(l=!0),l?[new kt(e,r,s,a)]:Ma(t,e,i,n,s,o).concat(Ma(t,i,r,n,o,a))}function m2(t,e){let r=1,i=Math.min(t,e);for(;rr||u>s||t.slice(o,c)!=i.slice(l,u)){if(a==1)return o-e-(Tl(t,o)?0:1);a=a>>1}else{if(c==r||u==s)return c-e;o=c,l=u}}}function Sw(t,e,r,i,n,s){if(e==r||n==s||t.charCodeAt(r-1)!=i.charCodeAt(s-1))return 0;let a=m2(r-e,s-n);for(let o=r,l=s;;){let c=o-a,u=l-a;if(c>1}else{if(c==e||u==n)return r-c;o=c,l=u}}}function ww(t,e,r,i,n,s,a,o){let l=i.slice(n,s),c=null;for(;;){if(c||a=r)break;let d=t.slice(u,f),h=-1;for(;(h=l.indexOf(d,h+1))!=-1;){let p=Ew(t,f,r,i,n+h+d.length,s),g=Sw(t,e,u,i,n,n+h),v=d.length+p+g;(!c||c[2]>1}}function g2(t,e,r,i,n,s){let a=r-e,o=s-n;if(an.fromA-e&&i.toB>n.fromB-e&&(t[r-1]=new kt(i.fromA,n.toA,i.fromB,n.toB),t.splice(r--,1))}}function F4(t,e,r){for(;;){v2(r,1);let i=!1;for(let n=0;n3||o>3){let l=n==t.length-1?e.length:t[n+1].fromA,c=s.fromA-i,u=l-s.toA,f=JT(e,s.fromA,c),d=QT(e,s.toA,u),h=s.fromA-f,p=d-s.toA;if((!a||!o)&&h&&p){let g=Math.max(a,o),[v,b,_]=a?[e,s.fromA,s.toA]:[r,s.fromB,s.toB];g>h&&e.slice(f,s.fromA)==v.slice(_-h,_)?(s=t[n]=new kt(f,f+a,s.fromB-h,s.toB-h),f=s.fromA,d=QT(e,s.toA,l-s.toA)):g>p&&e.slice(s.toA,d)==v.slice(b,b+p)&&(s=t[n]=new kt(d-a,d,s.fromB+p,s.toB+p),d=s.toA,f=JT(e,s.fromA,s.fromA-i)),h=s.fromA-f,p=d-s.toA}if(h||p)s=t[n]=new kt(s.fromA-h,s.toA+p,s.fromB-h,s.toB+p);else if(a){if(!o){let g=t2(e,s.fromA,s.toA),v,b=g<0?-1:e2(e,s.toA,s.fromA);g>-1&&(v=g-s.fromA)<=u&&e.slice(s.fromA,g)==e.slice(s.toA,s.toA+v)?s=t[n]=s.offset(v):b>-1&&(v=s.toA-b)<=c&&e.slice(s.fromA-v,s.fromA)==e.slice(b,s.toA)&&(s=t[n]=s.offset(-v))}}else{let g=t2(r,s.fromB,s.toB),v,b=g<0?-1:e2(r,s.toB,s.fromB);g>-1&&(v=g-s.fromB)<=u&&r.slice(s.fromB,g)==r.slice(s.toB,s.toB+v)?s=t[n]=s.offset(v):b>-1&&(v=s.toB-b)<=c&&r.slice(s.fromB-v,s.fromB)==r.slice(b,s.toB)&&(s=t[n]=s.offset(-v))}}i=s.toA}return v2(t,3),t}var Ia;try{Ia=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch(t){}function w2(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function b2(t,e){if(e==t.length)return 0;let r=t.charCodeAt(e);return r<192?w2(r)?1:0:Ia?!x2(r)||e==t.length-1?Ia.test(String.fromCharCode(r))?1:0:Ia.test(t.slice(e,e+2))?2:0:0}function _2(t,e){if(!e)return 0;let r=t.charCodeAt(e-1);return r<192?w2(r)?1:0:Ia?!E2(r)||e==1?Ia.test(String.fromCharCode(r))?1:0:Ia.test(t.slice(e-2,e))?2:0:0}var y2=8;function QT(t,e,r){if(e==t.length||!_2(t,e))return e;for(let i=e,n=e+r,s=0;sn)return i;i+=a}return e}function JT(t,e,r){if(!e||!b2(t,e))return e;for(let i=e,n=e-r,s=0;st>=55296&&t<=56319,E2=t=>t>=56320&&t<=57343;function Tl(t,e){return!e||e==t.length||!x2(t.charCodeAt(e-1))||!E2(t.charCodeAt(e))}function M4(t,e,r){var i;let n=r==null?void 0:r.override;return n?n(t,e):(Ou=((i=r==null?void 0:r.scanLimit)!==null&&i!==void 0?i:1e9)>>1,Lu=r!=null&&r.timeout?Date.now()+r.timeout:0,xw=!1,F4(t,e,Ma(t,0,t.length,e,0,e.length)))}function S2(){return!xw}function k2(t,e,r){return I4(M4(t,e,r),t,e)}var ki=Fe.Facet.define({combine:t=>t[0]}),bw=Fe.StateEffect.define(),D4=Fe.Facet.define(),kn=Fe.StateField.define({create(t){return null},update(t,e){for(let r of e.effects)r.is(bw)&&(t=r.value);for(let r of e.state.facet(D4))t=r(t,e);return t}});function kw(t){let e=t.field(kn,!1);if(!e)return null;let r=t.facet(ki);return{chunks:e,side:r?r.side:null}}var Jn=class t{constructor(e,r,i,n,s,a=!0){this.changes=e,this.fromA=r,this.toA=i,this.fromB=n,this.toB=s,this.precise=a}offset(e,r){return e||r?new t(this.changes,this.fromA+e,this.toA+e,this.fromB+r,this.toB+r,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,r,i){let n=k2(e.toString(),r.toString(),i);return C2(n,e,r,0,0,S2())}static updateA(e,r,i,n,s){return a2(s2(e,n,!0,i.length),e,r,i,s)}static updateB(e,r,i,n,s){return a2(s2(e,n,!1,r.length),e,r,i,s)}};function r2(t,e,r,i){let n=r.lineAt(t),s=i.lineAt(e);return n.to==t&&s.to==e&&tf+1&&v>d+1)break;h.push(p.offset(-c+i,-u+n)),[f,d]=i2(p.toA+i,p.toB+n,e,r),o++}a.push(new Jn(h,c,Math.max(c,f),u,Math.max(u,d),s))}return a}var Th=1e3;function n2(t,e,r,i){let n=0,s=t.length;for(;;){if(n==s){let u=0,f=0;n&&({toA:u,toB:f}=t[n-1]);let d=e-(r?u:f);return[u+d,f+d]}let a=n+s>>1,o=t[a],[l,c]=r?[o.fromA,o.toA]:[o.fromB,o.toB];if(l>e)s=a;else if(c<=e)n=a+1;else return i?[o.fromA,o.fromB]:[o.toA,o.toB]}}function s2(t,e,r,i){let n=[];return e.iterChangedRanges((s,a,o,l)=>{let c=0,u=r?e.length:i,f=0,d=r?i:e.length;s>Th&&([c,f]=n2(t,s-Th,r,!0)),a=c?n[n.length-1]={fromA:p.fromA,fromB:p.fromB,toA:u,toB:d,diffA:p.diffA+g,diffB:p.diffB+v}:n.push({fromA:c,toA:u,fromB:f,toB:d,diffA:g,diffB:v})}),n}function a2(t,e,r,i,n){if(!t.length)return e;let s=[];for(let a=0,o=0,l=0,c=0;;a++){let u=a==t.length?null:t[a],f=u?u.fromA+o:r.length,d=u?u.fromB+l:i.length;for(;cf||v.toB+l>d))break;s.push(v.offset(o,l)),c++}if(!u)break;let h=u.toA+o+u.diffA,p=u.toB+l+u.diffB,g=k2(r.sliceString(f,h),i.sliceString(d,p),n);for(let v of C2(g,r,i,f,d,S2()))s.push(v);for(o+=u.diffA,l+=u.diffB;ch&&v.fromB+l>p)break;c++}}return s}var O4={scanLimit:500},A2=De.ViewPlugin.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=c2(t))}update(t){(t.docChanged||t.viewportChanged||L4(t.startState,t.state)||N4(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=c2(t.view))}},{decorations:t=>t.deco}),Ph=Fe.Prec.low((0,De.gutter)({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(A2))===null||e===void 0?void 0:e.gutter)||Fe.RangeSet.empty}}));function L4(t,e){return t.field(kn,!1)!=e.field(kn,!1)}function N4(t,e){return t.facet(ki)!=e.facet(ki)}var o2=De.Decoration.line({class:"cm-changedLine"}),B4=De.Decoration.mark({class:"cm-changedText"}),H4=De.Decoration.mark({tagName:"ins",class:"cm-insertedLine"}),U4=De.Decoration.mark({tagName:"del",class:"cm-deletedLine"}),l2=new class extends De.GutterMarker{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function G4(t,e,r,i,n,s){let a=r?t.fromA:t.fromB,o=r?t.toA:t.toB,l=0;if(a!=o){n.add(a,a,o2),n.add(a,o,r?U4:H4),s&&s.add(a,a,l2);for(let c=e.iterRange(a,o-1),u=a;!c.next().done;){if(c.lineBreak){u++,n.add(u,u,o2),s&&s.add(u,u,l2);continue}let f=u+c.value.length;if(i)for(;l=u)break;(a?f.toA:f.toB)>c&&(!s||!s(t.state,f,o,l))&&G4(f,t.state.doc,a,i,o,l)}return{deco:o.finish(),gutter:l&&l.finish()}}var Al=class extends De.WidgetType{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Ih=Fe.StateEffect.define({map:(t,e)=>t.map(e)}),Nu=Fe.StateField.define({create:()=>De.Decoration.none,update:(t,e)=>{for(let r of e.effects)if(r.is(Ih))return r.value;return t.map(e.changes)},provide:t=>De.EditorView.decorations.from(t)}),Rh=.01;function u2(t,e){if(t.size!=e.size)return!1;let r=t.iter(),i=e.iter();for(;r.value;){if(r.from!=i.from||Math.abs(r.value.spec.widget.height-i.value.spec.widget.height)>1)return!1;r.next(),i.next()}return!0}function j4(t,e,r){let i=new Fe.RangeSetBuilder,n=new Fe.RangeSetBuilder,s=t.state.field(Nu).iter(),a=e.state.field(Nu).iter(),o=0,l=0,c=0,u=0,f=t.viewport,d=e.viewport;for(let v=0;;v++){let b=vRh&&(u+=A,n.add(l,l,De.Decoration.widget({widget:new Al(A),block:!0,side:-1})))}if(_>o+1e3&&of.from&&ld.from){let x=Math.min(f.from-o,d.from-l);o+=x,l+=x,v--}else if(b)o=b.toA,l=b.toB;else break;for(;s.value&&s.fromRh&&n.add(e.state.doc.length,e.state.doc.length,De.Decoration.widget({widget:new Al(h),block:!0,side:1}));let p=i.finish(),g=n.finish();u2(p,t.state.field(Nu))||t.dispatch({effects:Ih.of(p)}),u2(g,e.state.field(Nu))||e.dispatch({effects:Ih.of(g)})}var _w=Fe.StateEffect.define({map:(t,e)=>e.mapPos(t)});var yw=class extends De.WidgetType{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let r=document.createElement("div");return r.className="cm-collapsedLines",r.textContent=e.state.phrase("$ unchanged lines",this.lines),r.addEventListener("click",i=>{let n=e.posAtDOM(i.target);e.dispatch({effects:_w.of(n)});let{side:s,sibling:a}=e.state.facet(ki);a&&a().dispatch({effects:_w.of(V4(n,e.state.field(kn),s=="a"))})}),r}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}};function V4(t,e,r){let i=0,n=0;for(let s=0;;s++){let a=s=t)return n+(t-i);[i,n]=r?[a.toA,a.toB]:[a.toB,a.toA]}}var z4=Fe.StateField.define({create(t){return De.Decoration.none},update(t,e){t=t.map(e.changes);for(let r of e.effects)r.is(_w)&&(t=t.update({filter:i=>i!=r.value}));if(t.size&&e.state.field(kn)!=e.startState.field(kn,!1)){let r=e.state.facet(ki).side=="a",i=[];for(let n of e.state.field(kn))t.between(r?n.fromA:n.fromB,r?n.toA:n.toB,s=>{i.push(s)});i.length&&(t=t.update({filter:n=>i.indexOf(n)<0}))}return t},provide:t=>De.EditorView.decorations.from(t)});function f2({margin:t=3,minSize:e=4}){return z4.init(r=>W4(r,t,e))}function W4(t,e,r){let i=new Fe.RangeSetBuilder,n=t.facet(ki).side=="a",s=t.field(kn),a=1;for(let o=0;;o++){let l=o=r&&i.add(t.doc.line(c).from,t.doc.line(u).to,De.Decoration.replace({widget:new yw(f),block:!0})),!l)break;a=t.doc.lineAt(Math.min(t.doc.length,n?l.toA:l.toB)).number}return i.finish()}var q4=De.EditorView.styleModule.of(new Ah({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),Y4=De.EditorView.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),d2=new Fe.Compartment,$h=new Fe.Compartment,Mh=class{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||O4;let r=[Fe.Prec.low(A2),Y4,q4,Nu,De.EditorView.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(d=>d.effects.some(h=>h.is(Ih)))&&this.measure()})],i=[ki.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(Ph);let n=Fe.EditorState.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],De.EditorView.editorAttributes.of({class:"cm-merge-a"}),$h.of(i),r]}),s=[ki.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&s.push(Ph);let a=Fe.EditorState.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],De.EditorView.editorAttributes.of({class:"cm-merge-b"}),$h.of(s),r]});this.chunks=Jn.build(n.doc,a.doc,this.diffConf);let o=[kn.init(()=>this.chunks),d2.of(e.collapseUnchanged?f2(e.collapseUnchanged):[])];n=n.update({effects:Fe.StateEffect.appendConfig.of(o)}).state,a=a.update({effects:Fe.StateEffect.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=e.orientation||"a-b",c=document.createElement("div");c.className="cm-mergeViewEditor";let u=document.createElement("div");u.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?c:u),this.editorDOM.appendChild(l=="a-b"?u:c),this.a=new De.EditorView({state:n,parent:c,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new De.EditorView({state:a,parent:u,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,r){if(e.some(i=>i.docChanged)){let i=e[e.length-1],n=e.reduce((a,o)=>a.compose(o.changes),Fe.ChangeSet.empty(e[0].startState.doc.length));this.chunks=r==this.a?Jn.updateA(this.chunks,i.newDoc,this.b.state.doc,n,this.diffConf):Jn.updateB(this.chunks,this.a.state.doc,i.newDoc,n,this.diffConf),r.update([...e,i.state.update({effects:bw.of(this.chunks)})]);let s=r==this.a?this.b:this.a;s.update([s.state.update({effects:bw.of(this.chunks)})]),this.scheduleMeasure()}else r.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let s=e.orientation!="b-a";if(s!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let a=this.a.dom.parentNode,o=this.b.dom.parentNode;a.remove(),o.remove(),this.editorDOM.insertBefore(s?a:o,this.editorDOM.firstChild),this.editorDOM.appendChild(s?o:a),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let s=!!this.revertDOM,a=this.revertToA,o=this.renderRevert;"revertControls"in e&&(s=!!e.revertControls,a=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(s,a,o)}let r="highlightChanges"in e,i="gutter"in e,n="collapseUnchanged"in e;if(r||i||n){let s=[],a=[];if(r||i){let o=this.a.state.facet(ki),l=i?e.gutter!==!1:o.markGutter,c=r?e.highlightChanges!==!1:o.highlightChanges;s.push($h.reconfigure([ki.of({side:"a",sibling:()=>this.b,highlightChanges:c,markGutter:l}),l?Ph:[]])),a.push($h.reconfigure([ki.of({side:"b",sibling:()=>this.a,highlightChanges:c,markGutter:l}),l?Ph:[]]))}if(n){let o=d2.reconfigure(e.collapseUnchanged?f2(e.collapseUnchanged):[]);s.push(o),a.push(o)}this.a.dispatch({effects:s}),this.b.dispatch({effects:a})}this.scheduleMeasure()}setupRevertControls(e,r,i){this.revertToA=r,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=i,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",n=>this.revertClicked(n)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){j4(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,r=e.firstChild,i=this.a.viewport,n=this.b.viewport;for(let s=0;si.to||a.fromB>n.to)break;if(a.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function h2(t){let e=t.nextSibling;return t.remove(),e}var Cw=require("@codemirror/state");function Dh(t,e){let r=t.lineAt(e);return!(r.text.length==0&&r.number==t.lines)?r.number:r.number-1}function Aw(t,e,r){let i=[],n=t.split(` +`),s=e.split(` +`);for(let a of r){let{oldStart:o,oldLines:l,newStart:c,newLines:u}=a,f=zt.createHunk(o,l,c,u);if(a.oldLines>0){for(let d=o;dn.length&&n.last()!=""&&(f.removed.no_nl_at_eof=!0)}if(a.newLines>0){for(let d=c;ds.length&&s.last()!=""&&(f.added.no_nl_at_eof=!0)}i.push(f)}return i}function Tw(t,e,r){let i=e.lineAt(t.fromA).number,n=t.fromA==t.toA?0:Dh(e,t.endA)-i+1,s=r.lineAt(t.fromB).number,a=t.fromB==t.toB?0:Dh(r,t.endB)-s+1,o={oldStart:i,oldLines:n,newStart:s,newLines:a};return o.oldLines==0&&(o.oldStart-=1),o.newLines==0&&(o.newStart-=1),o}var T2={scanLimit:1e3,timeout:200};function Z4(t,e,r,i){let n=Cw.Text.of(t.split(` +`)),s=Cw.Text.of(e.split(` +`)),a=r&&i?Jn.updateB(r,n,s,i,T2):Jn.build(n,s,T2),o=[];for(let l=0;lh.vend&&(f=f-(h.added.count-h.removed.count)),o>h.vend&&(d=d-(h.added.count-h.removed.count));c.added.lines=u.compareText.split(` +`).slice(f-1,d),u.compareTextHead?c.removed.lines=u.compareTextHead.split(` +`).slice(c.removed.start-1,c.removed.start-1+c.removed.count):c.removed.lines=[]}else c.added.lines=e.doc.toString().split(` +`).slice(a-1,o),o===e.doc.lines&&!e.doc.toString().endsWith(` +`)&&(c.added.no_nl_at_eof=!0),c.removed.lines=u.compareText.split(` +`).slice(c.removed.start-1,c.removed.start-1+c.removed.count),c.removed.start+c.removed.count-1===u.compareText.split(` +`).length&&!u.compareText.endsWith(` +`)&&(c.removed.no_nl_at_eof=!0);return c}},Gr=Pl.StateField.define({create:t=>{},update:(t,e)=>{var n,s,a;let r=t?{...t}:{maxDiffTimeMs:0,hunks:[],stagedHunks:[],chunks:void 0,isDirty:!1},i=!1;for(let o of e.effects)if(o.is(Rl)&&(r.compareText=o.value.compareText,r.compareTextHead=o.value.compareTextHead,i=(t==null?void 0:t.compareText)!==o.value.compareText,i&&(r.chunks=void 0,r.changeDesc=void 0)),o.is(Oh)){let l=(n=e.startState.field(Bu,!1))==null?void 0:n.revision;if(o.value.revision!==l)continue;R2(r,o.value.result,e.state),r.changeDesc=void 0}if(e.docChanged){let o=!r.changeDesc||r.changeDesc.newLength===e.changes.length;console.assert(o,"Git: Hunk changes belong to different document histories."),o||(r.chunks=void 0),r.changeDesc=K4(r.changeDesc,e.changes)}if(r.compareText!==void 0){if(i||e.docChanged){r.isDirty=!0;let o=X4(e,r.compareText,r.chunks,r.changeDesc,r.maxDiffTimeMs);o&&(R2(r,o,e.state),r.changeDesc=void 0)}}else{r.compareText=void 0,r.compareTextHead=void 0,r.chunks=void 0,r.hunks=[],r.stagedHunks=[],r.isDirty=!1;let o=e.state.field(es.editorInfoField).file;(a=(s=It.plugin)==null?void 0:s.editorIntegration.signsFeature.changeStatusBar)==null||a.display(r.hunks,o)}return r}});function R2(t,e,r){var n,s;t.hunks=e.hunks,t.chunks=e.chunks,t.isDirty=!1,t.maxDiffTimeMs=Math.max(.95*t.maxDiffTimeMs,e.diffDuration);let i=r.field(es.editorInfoField).file;(s=(n=It.plugin)==null?void 0:n.editorIntegration.signsFeature.changeStatusBar)==null||s.display(t.hunks,i)}var Bu=Pl.StateField.define({create:t=>{var e,r;return{debouncer:(0,es.debounce)(i=>{let{state:n,compareText:s,previousChunks:a,changeDesc:o,revision:l}=i,c=n.field(es.editorEditorField,!1);if(!c)return;let u=c.state.field(Bu,!1);if((u==null?void 0:u.revision)!==l)return;let f=$2(n,s,a,o);c.dispatch({effects:Oh.of({result:f,revision:l})})},1e3,!0),revision:{},filePath:(r=(e=t.field(es.editorInfoField,!1))==null?void 0:e.file)==null?void 0:r.path}},update:(t,e)=>{var i,n;let r=(n=(i=e.state.field(es.editorInfoField,!1))==null?void 0:i.file)==null?void 0:n.path;return e.docChanged||r!==t.filePath?{...t,revision:{},filePath:r}:t}});function K4(t,e){return!t||t.newLength!==e.length?e:t.composeDesc(e)}function $2(t,e,r,i){let n=t.doc.toString(),s=performance.now(),{hunks:a,chunks:o}=P2(e,n,r,i),l=performance.now()-s;return{hunks:a,chunks:o,diffDuration:l}}function X4(t,e,r,i,n){let s=t.state,a=Math.abs(t.changes.length-t.changes.newLength),o=s.field(Bu);if(a>1e3||n>16){o.debouncer({state:s,compareText:e,previousChunks:r,changeDesc:i,revision:o.revision});return}else return $2(s,e,r,i)}var Rl=Pl.StateEffect.define(),Oh=Pl.StateEffect.define();function F2(t,e){return e.update({effects:Rl.of(t)})}m();m();m();var st;(function(t){t.INSERT="insert",t.DELETE="delete",t.CONTEXT="context"})(st||(st={}));var I2={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},M2={LINES:"lines",WORDS:"words",NONE:"none"},D2={WORD:"word",CHAR:"char"},Da;(function(t){t.AUTO="auto",t.DARK="dark",t.LIGHT="light"})(Da||(Da={}));m();var Q4=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],J4=RegExp("["+Q4.join("\\")+"]","g");function O2(t){return t.replace(J4,"\\$&")}function Pw(t){return t&&t.replace(/\\/g,"/")}function L2(t){let e,r,i,n=0;for(e=0,i=t.length;e1?r[r.length-1]:e}function B2(t,e){return e.reduce((r,i)=>r||t.startsWith(i),!1)}var H2=["a/","b/","i/","w/","c/","o/"];function Gs(t,e,r){let i=r!==void 0?[...H2,r]:H2,n=e?new RegExp(`^${O2(e)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,s=""]=n.exec(t)||[],a=i.find(l=>s.indexOf(l)===0);return(a?s.slice(a.length):s).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function e5(t,e){return Gs(t,"---",e)}function t5(t,e){return Gs(t,"+++",e)}function U2(t,e={}){let r=[],i=null,n=null,s=null,a=null,o=null,l=null,c=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,g=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,b=/^copy from "?(.+)"?/,_=/^copy to "?(.+)"?/,C=/^rename from "?(.+)"?/,x=/^rename to "?(.+)"?/,S=/^similarity index (\d+)%/,A=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,E=/^Binary files (.*) and (.*) differ/,y=/^GIT binary patch/,P=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,T=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,I=/^new file mode (\d{6})/,L=/^deleted file mode (\d{6}),(\d{6})/,H=t.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,` +`).split(` +`);function te(){n!==null&&i!==null&&(i.blocks.push(n),n=null)}function xe(){i!==null&&(!i.oldName&&l!==null&&(i.oldName=l),!i.newName&&c!==null&&(i.newName=c),i.newName&&(r.push(i),i=null)),l=null,c=null}function Z(){te(),xe(),i={blocks:[],deletedLines:0,addedLines:0}}function K(W){te();let X;i!==null&&((X=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(W))?(i.isCombined=!1,s=parseInt(X[1],10),o=parseInt(X[2],10)):(X=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(W))?(i.isCombined=!0,s=parseInt(X[1],10),a=parseInt(X[2],10),o=parseInt(X[3],10)):(W.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),s=0,o=0,i.isCombined=!1)),n={lines:[],oldStartLine:s,oldStartLine2:a,newStartLine:o,header:W}}function ce(W){if(i===null||n===null||s===null||o===null)return;let X={content:W},G=i.isCombined?["+ "," +","++"]:["+"],Be=i.isCombined?["- "," -","--"]:["-"];B2(W,G)?(i.addedLines++,X.type=st.INSERT,X.oldNumber=void 0,X.newNumber=o++):B2(W,Be)?(i.deletedLines++,X.type=st.DELETE,X.oldNumber=s++,X.newNumber=void 0):(X.type=st.CONTEXT,X.oldNumber=s++,X.newNumber=o++),n.lines.push(X)}function pe(W,X){let G=X;for(;G{if(!W||W.startsWith("*"))return;let G,Be=H[X-1],pr=H[X+1],Ut=H[X+2];if(W.startsWith("diff --git")||W.startsWith("diff --combined")){if(Z(),(G=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(W))&&(l=Gs(G[1],void 0,e.dstPrefix),c=Gs(G[2],void 0,e.srcPrefix)),i===null)throw new Error("Where is my file !!!");i.isGitDiff=!0;return}if(W.startsWith("Binary files")&&!(i!=null&&i.isGitDiff)){if(Z(),(G=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(W))&&(l=Gs(G[1],void 0,e.dstPrefix),c=Gs(G[2],void 0,e.srcPrefix)),i===null)throw new Error("Where is my file !!!");i.isBinary=!0;return}if((!i||!i.isGitDiff&&i&&W.startsWith(u)&&pr.startsWith(f)&&Ut.startsWith(d))&&Z(),i!=null&&i.isTooBig)return;if(i&&(typeof e.diffMaxChanges=="number"&&i.addedLines+i.deletedLines>e.diffMaxChanges||typeof e.diffMaxLineLength=="number"&&W.length>e.diffMaxLineLength)){i.isTooBig=!0,i.addedLines=0,i.deletedLines=0,i.blocks=[],n=null;let Rt=typeof e.diffTooBigMessage=="function"?e.diffTooBigMessage(r.length):"Diff too big to be displayed";K(Rt);return}if(W.startsWith(u)&&pr.startsWith(f)||W.startsWith(f)&&Be.startsWith(u)){if(i&&!i.oldName&&W.startsWith("--- ")&&(G=e5(W,e.srcPrefix))){i.oldName=G,i.language=N2(i.oldName,i.language);return}if(i&&!i.newName&&W.startsWith("+++ ")&&(G=t5(W,e.dstPrefix))){i.newName=G,i.language=N2(i.newName,i.language);return}}if(i&&(W.startsWith(d)||i.isGitDiff&&i.oldName&&i.newName&&!n)){K(W);return}if(n&&(W.startsWith("+")||W.startsWith("-")||W.startsWith(" "))){ce(W);return}let Ie=!pe(W,X);if(i===null)throw new Error("Where is my file !!!");(G=h.exec(W))?i.oldMode=G[1]:(G=p.exec(W))?i.newMode=G[1]:(G=g.exec(W))?(i.deletedFileMode=G[1],i.isDeleted=!0):(G=v.exec(W))?(i.newFileMode=G[1],i.isNew=!0):(G=b.exec(W))?(Ie&&(i.oldName=G[1]),i.isCopy=!0):(G=_.exec(W))?(Ie&&(i.newName=G[1]),i.isCopy=!0):(G=C.exec(W))?(Ie&&(i.oldName=G[1]),i.isRename=!0):(G=x.exec(W))?(Ie&&(i.newName=G[1]),i.isRename=!0):(G=E.exec(W))?(i.isBinary=!0,i.oldName=Gs(G[1],void 0,e.srcPrefix),i.newName=Gs(G[2],void 0,e.dstPrefix),K("Binary file")):y.test(W)?(i.isBinary=!0,K(W)):(G=S.exec(W))?i.unchangedPercentage=parseInt(G[1],10):(G=A.exec(W))?i.changedPercentage=parseInt(G[1],10):(G=w.exec(W))?(i.checksumBefore=G[1],i.checksumAfter=G[2],G[3]&&(i.mode=G[3])):(G=P.exec(W))?(i.checksumBefore=[G[2],G[3]],i.checksumAfter=G[1]):(G=T.exec(W))?(i.oldMode=[G[2],G[3]],i.newMode=G[1]):(G=I.exec(W))?(i.newFileMode=G[1],i.isNew=!0):(G=L.exec(W))&&(i.deletedFileMode=G[1],i.isDeleted=!0)}),te(),xe(),r}m();m();m();m();var js=class{diff(e,r,i={}){let n;typeof i=="function"?(n=i,i={}):"callback"in i&&(n=i.callback);let s=this.castInput(e,i),a=this.castInput(r,i),o=this.removeEmpty(this.tokenize(s,i)),l=this.removeEmpty(this.tokenize(a,i));return this.diffWithOptionsObj(o,l,i,n)}diffWithOptionsObj(e,r,i,n){var s;let a=_=>{if(_=this.postProcess(_,i),n){setTimeout(function(){n(_)},0);return}else return _},o=r.length,l=e.length,c=1,u=o+l;i.maxEditLength!=null&&(u=Math.min(u,i.maxEditLength));let f=(s=i.timeout)!==null&&s!==void 0?s:1/0,d=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],r,e,0,i);if(h[0].oldPos+1>=l&&p+1>=o)return a(this.buildValues(h[0].lastComponent,r,e));let g=-1/0,v=1/0,b=()=>{for(let _=Math.max(g,-c);_<=Math.min(v,c);_+=2){let C,x=h[_-1],S=h[_+1];x&&(h[_-1]=void 0);let A=!1;if(S){let E=S.oldPos-_;A=S&&0<=E&&E=l&&p+1>=o)return a(this.buildValues(C.lastComponent,r,e))||!0;h[_]=C,C.oldPos+1>=l&&(v=Math.min(v,_-1)),p+1>=o&&(g=Math.max(g,_+1))}c++};if(n)(function _(){setTimeout(function(){if(c>u||Date.now()>d)return n(void 0);b()||_()},0)})();else for(;c<=u&&Date.now()<=d;){let _=b();if(_)return _}}addToPath(e,r,i,n,s){let a=e.lastComponent;return a&&!s.oneChangePerToken&&a.added===r&&a.removed===i?{oldPos:e.oldPos+n,lastComponent:{count:a.count+1,added:r,removed:i,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:r,removed:i,previousComponent:a}}}extractCommon(e,r,i,n,s){let a=r.length,o=i.length,l=e.oldPos,c=l-n,u=0;for(;c+1d.length?p:d}),u.value=this.join(f)}else u.value=this.join(r.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return n}};m();var Rw=class extends js{},G2=new Rw;function $w(t,e,r){return G2.diff(t,e,r)}m();m();function Fw(t,e){let r;for(r=0;re.length&&(r=t.length-e.length);let i=e.length;t.length0&&e[a]!=e[s];)s=n[s];e[a]==e[s]&&s++}s=0;for(let a=r;a0&&t[a]!=e[s];)s=n[s];t[a]==e[s]&&s++}return s}function Dw(t,e){let r=[];for(let i of Array.from(e.segment(t))){let n=i.segment;r.length&&/\s/.test(r[r.length-1])&&/\s/.test(n)?r[r.length-1]+=n:r.push(n)}return r}function Hh(t,e){if(e)return Fl(t,e)[1];let r;for(r=t.length-1;r>=0&&t[r].match(/\s/);r--);return t.substring(r+1)}function Oa(t,e){if(e)return Fl(t,e)[0];let r=t.match(/^\s*/);return r?r[0]:""}function Fl(t,e){if(!e)return[Oa(t),Hh(t)];if(e.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let r=Dw(t,e),i=r[0],n=r[r.length-1],s=/\s/.test(i)?i:"",a=/\s/.test(n)?n:"";return[s,a]}var Uh="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",n5=new RegExp(`[${Uh}]+|\\s+|[^${Uh}]`,"ug"),Ow=class extends js{equals(e,r,i){return i.ignoreCase&&(e=e.toLowerCase(),r=r.toLowerCase()),e.trim()===r.trim()}tokenize(e,r={}){let i;if(r.intlSegmenter){let a=r.intlSegmenter;if(a.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=Dw(e,a)}else i=e.match(n5)||[];let n=[],s=null;return i.forEach(a=>{/\s/.test(a)?s==null?n.push(a):n.push(n.pop()+a):s!=null&&/\s/.test(s)?n[n.length-1]==s?n.push(n.pop()+a):n.push(s+a):n.push(a),s=a}),n}join(e){return e.map((r,i)=>i==0?r:r.replace(/^\s+/,"")).join("")}postProcess(e,r){if(!e||r.oneChangePerToken)return e;let i=null,n=null,s=null;return e.forEach(a=>{a.added?n=a:a.removed?s=a:((n||s)&&j2(i,s,n,a,r.intlSegmenter),i=a,n=null,s=null)}),(n||s)&&j2(i,s,n,null,r.intlSegmenter),e}},s5=new Ow;function j2(t,e,r,i,n){if(e&&r){let[s,a]=Fl(e.value,n),[o,l]=Fl(r.value,n);if(t){let c=Fw(s,o);t.value=Bh(t.value,o,c),e.value=$l(e.value,c),r.value=$l(r.value,c)}if(i){let c=Iw(a,l);i.value=Nh(i.value,l,c),e.value=Hu(e.value,c),r.value=Hu(r.value,c)}}else if(r){if(t){let s=Oa(r.value,n);r.value=r.value.substring(s.length)}if(i){let s=Oa(i.value,n);i.value=i.value.substring(s.length)}}else if(t&&i){let s=Oa(i.value,n),[a,o]=Fl(e.value,n),l=Fw(s,a);e.value=$l(e.value,l);let c=Iw($l(s,l),o);e.value=Hu(e.value,c),i.value=Nh(i.value,s,c),t.value=Bh(t.value,s,s.slice(0,s.length-c.length))}else if(i){let s=Oa(i.value,n),a=Hh(e.value,n),o=Mw(a,s);e.value=Hu(e.value,o)}else if(t){let s=Hh(t.value,n),a=Oa(e.value,n),o=Mw(s,a);e.value=$l(e.value,o)}}var Lw=class extends js{tokenize(e){let r=new RegExp(`(\\r?\\n)|[${Uh}]+|[^\\S\\n\\r]+|[^${Uh}]`,"ug");return e.match(r)||[]}},V2=new Lw;function Nw(t,e,r){return V2.diff(t,e,r)}m();function o5(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],i;for(i=0;i<=e.length;i++)r[i]=[i];let n;for(n=0;n<=t.length;n++)r[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?r[i][n]=r[i-1][n-1]:r[i][n]=Math.min(r[i-1][n-1]+1,Math.min(r[i][n-1]+1,r[i-1][n]+1));return r[e.length][t.length]}function Il(t){return(e,r)=>{let i=t(e).trim(),n=t(r).trim();return o5(i,n)/(i.length+n.length)}}function Ml(t){function e(i,n,s=new Map){let a=1/0,o;for(let l=0;l0||o.indexB>0)&&(C=v.concat(C)),(i.length>d||n.length>h)&&(C=C.concat(_)),C}return r}var Qt={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},La={matching:M2.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:D2.WORD,colorScheme:Da.LIGHT},Cn="/",z2=Il(t=>t.value),l5=Ml(z2);function Hw(t){return t.indexOf("dev/null")!==-1}function c5(t){return t.replace(/(]*>((.|\n)*?)<\/ins>)/g,"")}function u5(t){return t.replace(/(]*>((.|\n)*?)<\/del>)/g,"")}function Dl(t){switch(t){case st.CONTEXT:return Qt.CONTEXT;case st.INSERT:return Qt.INSERTS;case st.DELETE:return Qt.DELETES}}function Ol(t){switch(t){case Da.DARK:return"d2h-dark-color-scheme";case Da.AUTO:return"d2h-auto-color-scheme";case Da.LIGHT:default:return"d2h-light-color-scheme"}}function f5(t){return t?2:1}function Vs(t){return t.slice(0).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function Ci(t,e,r=!0){let i=f5(e);return{prefix:t.substring(0,i),content:r?Vs(t.substring(i)):t.substring(i)}}function Na(t){let e=Pw(t.oldName),r=Pw(t.newName);if(e!==r&&!Hw(e)&&!Hw(r)){let i=[],n=[],s=e.split(Cn),a=r.split(Cn),o=s.length,l=a.length,c=0,u=o-1,f=l-1;for(;cc&&f>c&&s[u]===a[f];)n.unshift(a[f]),u-=1,f-=1;let d=i.join(Cn),h=n.join(Cn),p=s.slice(c,u+1).join(Cn),g=a.slice(c,f+1).join(Cn);return d.length&&h.length?d+Cn+"{"+p+" \u2192 "+g+"}"+Cn+h:d.length?d+Cn+"{"+p+" \u2192 "+g+"}":h.length?"{"+p+" \u2192 "+g+"}"+Cn+h:e+" \u2192 "+r}else return Hw(r)?e:r}function Ll(t){return`d2h-${L2(Na(t)).toString().slice(-6)}`}function Nl(t){let e="file-changed";return t.isRename||t.isCopy?e="file-renamed":t.isNew?e="file-added":t.isDeleted?e="file-deleted":t.newName!==t.oldName&&(e="file-renamed"),e}function Gh(t,e,r,i={}){let{matching:n,maxLineLengthHighlight:s,matchWordsThreshold:a,diffStyle:o}=Object.assign(Object.assign({},La),i),l=Ci(t,r,!1),c=Ci(e,r,!1);if(l.content.length>s||c.content.length>s)return{oldLine:{prefix:l.prefix,content:Vs(l.content)},newLine:{prefix:c.prefix,content:Vs(c.content)}};let u=o==="char"?$w(l.content,c.content):Nw(l.content,c.content),f=[];if(o==="word"&&n==="words"){let h=u.filter(v=>v.removed),p=u.filter(v=>v.added);l5(p,h).forEach(v=>{v[0].length===1&&v[1].length===1&&z2(v[0][0],v[1][0]){let g=p.added?"ins":p.removed?"del":null,v=f.indexOf(p)>-1?' class="d2h-change"':"",b=Vs(p.value);return g!==null?`${h}<${g}${v}>${b}`:`${h}${b}`},"");return{oldLine:{prefix:l.prefix,content:c5(d)},newLine:{prefix:c.prefix,content:u5(d)}}}var W2="file-summary",d5="icon",h5={colorScheme:La.colorScheme},jh=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},h5),r)}render(e){let r=e.map(i=>this.hoganUtils.render(W2,"line",{fileHtmlId:Ll(i),oldName:i.oldName,newName:i.newName,fileName:Na(i),deletedLines:"-"+i.deletedLines,addedLines:"+"+i.addedLines},{fileIcon:this.hoganUtils.template(d5,Nl(i))})).join(` +`);return this.hoganUtils.render(W2,"wrapper",{colorScheme:Ol(this.config.colorScheme),filesNumber:e.length,files:r})}};m();var Gw=Object.assign(Object.assign({},La),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Uu="generic",q2="line-by-line",p5="icon",m5="tag",Gu=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Gw),r)}render(e){let r=e.map(i=>{let n;return i.blocks.length?n=this.generateFileHtml(i):n=this.generateEmptyDiff(),this.makeFileDiffHtml(i,n)}).join(` +`);return this.hoganUtils.render(Uu,"wrapper",{colorScheme:Ol(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let i=this.hoganUtils.template(q2,"file-diff"),n=this.hoganUtils.template(Uu,"file-path"),s=this.hoganUtils.template(p5,"file"),a=this.hoganUtils.template(m5,Nl(e));return i.render({file:e,fileHtmlId:Ll(e),diffs:r,filePath:n.render({fileDiffName:Na(e)},{fileIcon:s,fileTag:a})})}generateEmptyDiff(){return this.hoganUtils.render(Uu,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Qt})}generateFileHtml(e){let r=Ml(Il(i=>Ci(i.content,e.isCombined).content));return e.blocks.map(i=>{let n=this.hoganUtils.render(Uu,"block-header",{CSSLineClass:Qt,blockHeader:e.isTooBig?i.header:Vs(i.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(i).forEach(([s,a,o])=>{if(a.length&&o.length&&!s.length)this.applyRematchMatching(a,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(e,e.isCombined,l,c);n+=u,n+=f});else if(s.length)s.forEach(l=>{let{prefix:c,content:u}=Ci(l.content,e.isCombined);n+=this.generateSingleLineHtml(e,{type:Qt.CONTEXT,prefix:c,content:u,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(a.length||o.length){let{left:l,right:c}=this.processChangedLines(e,e.isCombined,a,o);n+=l,n+=c}else console.error("Unknown state reached while processing groups of lines",s,a,o)}),n}).join(` +`)}applyLineGroupping(e){let r=[],i=[],n=[];for(let s=0;s0)&&(r.push([[],i,n]),i=[],n=[]),a.type===st.CONTEXT?r.push([[a],[],[]]):a.type===st.INSERT&&i.length===0?r.push([[],[],[a]]):a.type===st.INSERT&&i.length>0?n.push(a):a.type===st.DELETE&&i.push(a)}return(i.length||n.length)&&(r.push([[],i,n]),i=[],n=[]),r}applyRematchMatching(e,r,i){let n=e.length*r.length,s=Lh(e.concat(r).map(o=>o.content.length));return n{let n;return i.blocks.length?n=this.generateFileHtml(i):n=this.generateEmptyDiff(),this.makeFileDiffHtml(i,n)}).join(` +`);return this.hoganUtils.render(ju,"wrapper",{colorScheme:Ol(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let i=this.hoganUtils.template(g5,"file-diff"),n=this.hoganUtils.template(ju,"file-path"),s=this.hoganUtils.template(v5,"file"),a=this.hoganUtils.template(w5,Nl(e));return i.render({file:e,fileHtmlId:Ll(e),diffs:r,filePath:n.render({fileDiffName:Na(e)},{fileIcon:s,fileTag:a})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(ju,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Qt})}}generateFileHtml(e){let r=Ml(Il(i=>Ci(i.content,e.isCombined).content));return e.blocks.map(i=>{let n={left:this.makeHeaderHtml(i.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(i).forEach(([s,a,o])=>{if(a.length&&o.length&&!s.length)this.applyRematchMatching(a,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(e.isCombined,l,c);n.left+=u,n.right+=f});else if(s.length)s.forEach(l=>{let{prefix:c,content:u}=Ci(l.content,e.isCombined),{left:f,right:d}=this.generateLineHtml({type:Qt.CONTEXT,prefix:c,content:u,number:l.oldNumber},{type:Qt.CONTEXT,prefix:c,content:u,number:l.newNumber});n.left+=f,n.right+=d});else if(a.length||o.length){let{left:l,right:c}=this.processChangedLines(e.isCombined,a,o);n.left+=l,n.right+=c}else console.error("Unknown state reached while processing groups of lines",s,a,o)}),n}).reduce((i,n)=>({left:i.left+n.left,right:i.right+n.right}),{left:"",right:""})}applyLineGroupping(e){let r=[],i=[],n=[];for(let s=0;s0)&&(r.push([[],i,n]),i=[],n=[]),a.type===st.CONTEXT?r.push([[a],[],[]]):a.type===st.INSERT&&i.length===0?r.push([[],[],[a]]):a.type===st.INSERT&&i.length>0?n.push(a):a.type===st.DELETE&&i.push(a)}return(i.length||n.length)&&(r.push([[],i,n]),i=[],n=[]),r}applyRematchMatching(e,r,i){let n=e.length*r.length,s=Lh(e.concat(r).map(o=>o.content.length));return n'),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(i.rp("'),i.b(i.v(i.f("fileName",t,e,0))),i.b(""),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(' '),i.b(i.v(i.f("addedLines",t,e,0))),i.b(""),i.b(` +`+r),i.b(' '),i.b(i.v(i.f("deletedLines",t,e,0))),i.b(""),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b(""),i.fl()},partials:{"'),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b(' Files changed ('),i.b(i.v(i.f("filesNumber",t,e,0))),i.b(")"),i.b(` +`+r),i.b(' hide'),i.b(` +`+r),i.b(' show'),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b('
    '),i.b(` +`+r),i.b(" "),i.b(i.t(i.f("files",t,e,0))),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b(""),i.fl()},partials:{},subs:{}});xt["generic-block-header"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b(""),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b('
'),i.s(i.f("blockHeader",t,e,1),t,e,0,156,173,"{{ }}")&&(i.rs(t,e,function(n,s,a){a.b(a.t(a.f("blockHeader",n,s,0)))}),t.pop()),i.s(i.f("blockHeader",t,e,1),t,e,1,0,0,"")||i.b(" "),i.b("
"),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b(""),i.fl()},partials:{},subs:{}});xt["generic-empty-diff"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b(""),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b(" File without changes"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b(""),i.fl()},partials:{},subs:{}});xt["generic-file-path"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b(''),i.b(` +`+r),i.b(i.rp("'),i.b(i.v(i.f("fileDiffName",t,e,0))),i.b(""),i.b(` +`+r),i.b(i.rp(""),i.b(` +`+r),i.b('"),i.fl()},partials:{""),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(" "),i.b(i.t(i.f("lineNumber",t,e,0))),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.s(i.f("prefix",t,e,1),t,e,0,162,238,"{{ }}")&&(i.rs(t,e,function(n,s,a){a.b(' '),a.b(a.t(a.f("prefix",n,s,0))),a.b(""),a.b(` +`+r)}),t.pop()),i.s(i.f("prefix",t,e,1),t,e,1,0,0,"")||(i.b('  '),i.b(` +`+r)),i.s(i.f("content",t,e,1),t,e,0,371,445,"{{ }}")&&(i.rs(t,e,function(n,s,a){a.b(' '),a.b(a.t(a.f("content",n,s,0))),a.b(""),a.b(` +`+r)}),t.pop()),i.s(i.f("content",t,e,1),t,e,1,0,0,"")||(i.b('
'),i.b(` +`+r)),i.b("
"),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b(""),i.fl()},partials:{},subs:{}});xt["generic-wrapper"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('
'),i.b(` +`+r),i.b(" "),i.b(i.t(i.f("content",t,e,0))),i.b(` +`+r),i.b("
"),i.fl()},partials:{},subs:{}});xt["icon-file-added"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('"),i.fl()},partials:{},subs:{}});xt["icon-file-changed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('"),i.fl()},partials:{},subs:{}});xt["icon-file-deleted"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('"),i.fl()},partials:{},subs:{}});xt["icon-file-renamed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('"),i.fl()},partials:{},subs:{}});xt["icon-file"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('"),i.fl()},partials:{},subs:{}});xt["line-by-line-file-diff"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('
'),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b(" "),i.b(i.t(i.f("filePath",t,e,0))),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(" "),i.b(i.t(i.f("diffs",t,e,0))),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.fl()},partials:{},subs:{}});xt["line-by-line-numbers"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('
'),i.b(i.v(i.f("oldNumber",t,e,0))),i.b("
"),i.b(` +`+r),i.b('
'),i.b(i.v(i.f("newNumber",t,e,0))),i.b("
"),i.fl()},partials:{},subs:{}});xt["side-by-side-file-diff"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('
'),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b(" "),i.b(i.t(i.f("filePath",t,e,0))),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(" "),i.b(i.t(i.d("diffs.left",t,e,0))),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b('
'),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(' '),i.b(` +`+r),i.b(" "),i.b(i.t(i.d("diffs.right",t,e,0))),i.b(` +`+r),i.b(" "),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.b(` +`+r),i.b("
"),i.fl()},partials:{},subs:{}});xt["tag-file-added"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('ADDED'),i.fl()},partials:{},subs:{}});xt["tag-file-changed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('CHANGED'),i.fl()},partials:{},subs:{}});xt["tag-file-deleted"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('DELETED'),i.fl()},partials:{},subs:{}});xt["tag-file-renamed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('RENAMED'),i.fl()},partials:{},subs:{}});var zu=class{constructor({compiledTemplates:e={},rawTemplates:r={}}){let i=Object.entries(r).reduce((n,[s,a])=>{let o=qw.compile(a,{asString:!1});return Object.assign(Object.assign({},n),{[s]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},xt),e),i)}static compile(e){return qw.compile(e,{asString:!1})}render(e,r,i,n,s){let a=this.templateKey(e,r);try{return this.preCompiledTemplates[a].render(i,n,s)}catch(o){throw new Error(`Could not find template to render '${a}'`)}}template(e,r){return this.preCompiledTemplates[this.templateKey(e,r)]}templateKey(e,r){return`${e}-${r}`}};var _5=Object.assign(Object.assign(Object.assign({},Gw),jw),{outputFormat:I2.LINE_BY_LINE,drawFileList:!0});function zh(t,e={}){let r=Object.assign(Object.assign({},_5),e),i=typeof t=="string"?U2(t,r):t,n=new zu(r),{colorScheme:s}=r,a={colorScheme:s},o=r.drawFileList?new jh(n,a).render(i):"",l=r.outputFormat==="side-by-side"?new Vu(n,r).render(i):new Gu(n,r).render(i);return o+l}var tP=ft(J2(),1);var Ba=require("obsidian"),Yw=Wu.StateEffect.define();function zs(t,e){let r=t.state,i=r.field(qh),n=r.field(Gr),s=r.doc.lineAt(e!=null?e:r.selection.main.head).number,a=zt.findHunk(s,n==null?void 0:n.hunks)[0];if(!a)return;let o=r.doc.line(Math.max(1,a.added.start)).from,l=i.has(o);return r.field(Ba.editorEditorField).dispatch({effects:Yw.of({pos:o,add:!l})})}var qh=Wu.StateField.define({create:()=>new Set,update(t,e){let r=new Set;for(let i of e.effects)i.is(Yw)&&(i.value.add?t.add(i.value.pos):t.delete(i.value.pos));for(let i of t)r.add(e.changes.mapPos(i));return r}}),rP=Wu.StateField.define({create:t=>eP(t),update(t,e){return e.docChanged||e.effects.some(r=>r.is(Rl)||r.is(Yw))?eP(e.state):t},provide:t=>Wh.showTooltip.computeN([t],e=>e.field(t))}),iP=Wh.EditorView.baseTheme({".cm-tooltip.git-diff-tooltip":{"z-index":"var(--layer-popover)",backgroundColor:"var(--background-primary-alt)",border:"var(--border-width) solid var(--background-primary-alt)",borderRadius:"var(--radius-s)"},".cm-tooltip.git-diff-tooltip .tooltip-toolbar":{display:"flex",padding:"var(--size-2-1)"}});function eP(t){let e=t.field(Gr);return e?[...t.field(qh)].map(i=>{let n=t.doc.lineAt(i),s=zt.findHunk(n.number,e.hunks)[0];if(s)return{pos:i,above:!1,arrow:!1,strictSide:!0,clip:!1,create:()=>y5(s,t,i)}}).filter(i=>i!==void 0):[]}function y5(t,e,r){var g,v;let i=zt.createPatch("file",[t],"10064",!1).join(` +`)+` +`,n=zh(i,{colorScheme:tP.ColorSchemeType.AUTO,diffStyle:"word",drawFileList:!1}),s=new DOMParser().parseFromString(n,"text/html").querySelector(".d2h-file-diff"),a=createDiv();a.addClass("tooltip-toolbar");let o=(b,_)=>{let C=createDiv();return(0,Ba.setIcon)(C,b),C.setAttr("aria-label",_),C.addClass("clickable-icon"),C},l=o("x","Close hunk"),c=o("plus","Stage hunk"),u=o("undo","Reset hunk");a.appendChild(l),a.appendChild(c),a.appendChild(u);let f=createDiv();f.appendChild(a),f.appendChild(s),f.addClass("git-diff-tooltip","git-diff");let d=e.field(Ba.editorEditorField);l.onclick=()=>{zs(d,r)},c.onclick=()=>{let b=It.plugin;b&&(b.promiseQueue.addTask(()=>b.hunkActions.stageHunk(r)),zs(d,r))},u.onclick=()=>{let b=It.plugin;b&&(b.hunkActions.resetHunk(r),zs(d,r))};let h=(v=(g=It.plugin)==null?void 0:g.app.workspace.getActiveViewOfType(Ba.MarkdownView))==null?void 0:v.scope,p=h==null?void 0:h.register(null,"Escape",(b,_)=>{zs(d,r)});return{dom:f,destroy:()=>{p&&(h==null||h.unregister(p))},update:b=>{r=b.changes.mapPos(r)}}}function nP(t){let e=t.app;t.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=t.gitManager.getRelativeVaultPath(".gitignore");await e.vault.adapter.exists(r)||await e.vault.adapter.write(r,"");let i=await e.vault.adapter.read(r),s=await new Ch(e,i).openAndGetReslt();s!==void 0&&(await e.vault.adapter.write(r,s),await t.refresh())}}),t.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var n;let r=e.workspace.getLeavesOfType(Xt.type),i;r.length===0?(i=(n=e.workspace.getRightLeaf(!1))!=null?n:e.workspace.getLeaf(),await i.setViewState({type:Xt.type})):i=r.first(),await e.workspace.revealLeaf(i),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var n;let r=e.workspace.getLeavesOfType(wi.type),i;r.length===0?(i=(n=e.workspace.getRightLeaf(!1))!=null?n:e.workspace.getLeaf(),await i.setViewState({type:wi.type})):i=r.first(),await e.workspace.revealLeaf(i),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let i=e.workspace.getActiveFile();if(r)return i!==null;{let n=t.gitManager.getRelativeRepoPath(i.path,!0);return t.tools.openDiff({aFile:n,aRef:""}),!0}}}),t.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:i})=>{if(i)return jT(r,i,t.gitManager)}}),t.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:i})=>{if(i)return VT(i,t.gitManager)}}),t.addCommand({id:"pull",name:"Pull",callback:()=>t.promiseQueue.addTask(()=>t.pullChangesFromRemote())}),t.addCommand({id:"fetch",name:"Fetch",callback:()=>t.promiseQueue.addTask(()=>t.fetch())}),t.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>t.promiseQueue.addTask(()=>t.switchRemoteBranch())}),t.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let i=e.workspace.getActiveFile();return r?i!==null:(t.addFileToGitignore(i.path,i instanceof qi.TFolder).catch(n=>t.displayError(n)),!0)}}),t.addCommand({id:"push",name:"Commit-and-sync",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1}))}),t.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>t.promiseQueue.addTask(async()=>{await t.commitAndSync({fromAutoBackup:!1}),window.close()})}),t.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit",name:"Commit all changes",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1}))}),t.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit-smart",name:"Commit",callback:()=>t.promiseQueue.addTask(async()=>{let i=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:i})})}),t.addCommand({id:"commit-staged",name:"Commit staged",checkCallback:function(r){return r?!1:(t.promiseQueue.addTask(async()=>t.commit({fromAuto:!1,requestCustomMessage:!1})),!0)}}),qi.Platform.isDesktopApp&&t.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),t.addCommand({id:"commit-smart-specified-message",name:"Commit with specific message",callback:()=>t.promiseQueue.addTask(async()=>{let i=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:i})})}),t.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",checkCallback:function(r){return r?!1:t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0}))}}),t.addCommand({id:"push2",name:"Push",callback:()=>t.promiseQueue.addTask(()=>t.push())}),t.addCommand({id:"stage-current-file",name:"Stage current file",checkCallback:r=>{let i=e.workspace.getActiveFile();return r?i!==null:(t.promiseQueue.addTask(()=>t.stageFile(i)),!0)}}),t.addCommand({id:"unstage-current-file",name:"Unstage current file",checkCallback:r=>{let i=e.workspace.getActiveFile();return r?i!==null:(t.promiseQueue.addTask(()=>t.unstageFile(i)),!0)}}),t.addCommand({id:"edit-remotes",name:"Edit remotes",callback:()=>t.editRemotes().catch(r=>t.displayError(r))}),t.addCommand({id:"remove-remote",name:"Remove remote",callback:()=>t.removeRemote().catch(r=>t.displayError(r))}),t.addCommand({id:"set-upstream-branch",name:"Set upstream branch",callback:()=>t.setUpstreamBranch().catch(r=>t.displayError(r))}),t.addCommand({id:"delete-repo",name:"CAUTION: Delete repository",callback:async()=>{await e.vault.adapter.exists(`${t.settings.basePath}/.git`)?await new rt(t,{options:["NO","YES"],placeholder:"Do you really want to delete the repository (.git directory)? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&(await e.vault.adapter.rmdir(`${t.settings.basePath}/.git`,!0),new qi.Notice("Successfully deleted repository. Reloading plugin..."),t.unloadPlugin(),await t.init({fromReload:!0})):new qi.Notice("No repository found")}}),t.addCommand({id:"init-repo",name:"Initialize a new repo",callback:()=>t.createNewRepo().catch(r=>t.displayError(r))}),t.addCommand({id:"clone-repo",name:"Clone an existing remote repo",callback:()=>t.cloneNewRepo().catch(r=>t.displayError(r))}),t.addCommand({id:"list-changed-files",name:"List changed files",callback:async()=>{if(await t.isAllInitialized())try{let r=await t.updateCachedStatus();if(r.changed.length+r.staged.length>500){t.displayError("Too many changes to display");return}new kh(t,r.all).open()}catch(r){t.displayError(r)}}}),t.addCommand({id:"switch-branch",name:"Switch branch",callback:()=>{t.switchBranch().catch(r=>t.displayError(r))}}),t.addCommand({id:"create-branch",name:"Create new branch",callback:()=>{t.createBranch().catch(r=>t.displayError(r))}}),t.addCommand({id:"delete-branch",name:"Delete branch",callback:()=>{t.deleteBranch().catch(r=>t.displayError(r))}}),t.addCommand({id:"discard-all",name:"CAUTION: Discard all changes",callback:async()=>{let r=await t.discardAll();switch(r){case"discard":new qi.Notice("Discarded all changes in tracked files.");break;case"delete":new qi.Notice("Discarded all files.");break;case!1:break;default:Nd(r)}}}),t.addCommand({id:"pause-automatic-routines",name:"Pause/Resume automatic routines",callback:()=>{let r=!t.localStorage.getPausedAutomatics();t.localStorage.setPausedAutomatics(r),r?(t.automaticsManager.unload(),new qi.Notice("Paused automatic routines.")):(t.automaticsManager.reload("commit","push","pull"),new qi.Notice("Resumed automatic routines."))}}),t.addCommand({id:"raw-command",name:"Raw command",checkCallback:r=>{let i=t.gitManager;return r?i instanceof Se:(t.tools.runRawCommand().catch(n=>t.displayError(n)),!0)}}),t.addCommand({id:"toggle-line-author-info",name:"Toggle line author information",callback:()=>{var r;return(r=t.settingsTab)==null?void 0:r.configureLineAuthorShowStatus(!t.settings.lineAuthor.show)}}),t.addCommand({id:"reset-hunk",name:"Reset hunk",editorCheckCallback(r,i,n){return r?t.settings.hunks.hunkCommands&&t.hunkActions.editor!==void 0:(t.hunkActions.resetHunk(),!0)}}),t.addCommand({id:"stage-hunk",name:"Stage hunk",editorCheckCallback:(r,i,n)=>r?t.settings.hunks.hunkCommands&&t.hunkActions.editor!==void 0:(t.promiseQueue.addTask(()=>t.hunkActions.stageHunk()),!0)}),t.addCommand({id:"preview-hunk",name:"Preview hunk",editorCheckCallback:(r,i,n)=>{if(r)return t.settings.hunks.hunkCommands&&t.hunkActions.editor!==void 0;let s=t.hunkActions.editor.editor;return zs(s),!0}}),t.addCommand({id:"next-hunk",name:"Go to next hunk",editorCheckCallback:(r,i,n)=>r?t.settings.hunks.hunkCommands&&t.hunkActions.editor!==void 0:(t.hunkActions.goToHunk("next"),!0)}),t.addCommand({id:"prev-hunk",name:"Go to previous hunk",editorCheckCallback:(r,i,n)=>r?t.settings.hunks.hunkCommands&&t.hunkActions.editor!==void 0:(t.hunkActions.goToHunk("prev"),!0)})}m();var Yh=class{constructor(e){this.plugin=e;this.prefix=this.plugin.manifest.id+":",this.app=e.app}migrate(){let e=["password","hostname","conflict","lastAutoPull","lastAutoBackup","lastAutoPush","gitPath","pluginDisabled"];for(let r of e){let i=localStorage.getItem(this.prefix+r);this.app.loadLocalStorage(this.prefix+r)==null&&i!=null&&i!=null&&(this.app.saveLocalStorage(this.prefix+r,i),localStorage.removeItem(this.prefix+r))}}getPassword(){return this.app.loadLocalStorage(this.prefix+"password")}setPassword(e){return this.app.saveLocalStorage(this.prefix+"password",e)}getUsername(){return this.app.loadLocalStorage(this.prefix+"username")}setUsername(e){return this.app.saveLocalStorage(this.prefix+"username",e)}getHostname(){return this.app.loadLocalStorage(this.prefix+"hostname")}setHostname(e){return this.app.saveLocalStorage(this.prefix+"hostname",e)}getConflict(){return this.app.loadLocalStorage(this.prefix+"conflict")=="true"}setConflict(e){return this.app.saveLocalStorage(this.prefix+"conflict",`${e}`)}getLastAutoPull(){return this.app.loadLocalStorage(this.prefix+"lastAutoPull")}setLastAutoPull(e){return this.app.saveLocalStorage(this.prefix+"lastAutoPull",e)}getLastAutoBackup(){return this.app.loadLocalStorage(this.prefix+"lastAutoBackup")}setLastAutoBackup(e){return this.app.saveLocalStorage(this.prefix+"lastAutoBackup",e)}getLastAutoPush(){return this.app.loadLocalStorage(this.prefix+"lastAutoPush")}setLastAutoPush(e){return this.app.saveLocalStorage(this.prefix+"lastAutoPush",e)}getGitPath(){return this.app.loadLocalStorage(this.prefix+"gitPath")}setGitPath(e){return this.app.saveLocalStorage(this.prefix+"gitPath",e)}getPATHPaths(){var e,r;return(r=(e=this.app.loadLocalStorage(this.prefix+"PATHPaths"))==null?void 0:e.split(":"))!=null?r:[]}setPATHPaths(e){return this.app.saveLocalStorage(this.prefix+"PATHPaths",e.join(":"))}getEnvVars(){var e;return JSON.parse((e=this.app.loadLocalStorage(this.prefix+"envVars"))!=null?e:"[]")}setEnvVars(e){return this.app.saveLocalStorage(this.prefix+"envVars",JSON.stringify(e))}getPluginDisabled(){return this.app.loadLocalStorage(this.prefix+"pluginDisabled")=="true"}setPluginDisabled(e){return this.app.saveLocalStorage(this.prefix+"pluginDisabled",`${e}`)}getPausedAutomatics(){return this.app.loadLocalStorage(this.prefix+"pausedAutomatics")=="true"}setPausedAutomatics(e){return this.app.saveLocalStorage(this.prefix+"pausedAutomatics",`${e}`)}getGutterSpacingFallbackLength(){var e;return(e=this.app.loadLocalStorage(this.prefix+"gutterSpacingFallbackLength"))!=null?e:5}setGutterSpacingFallbackLength(e){return this.app.saveLocalStorage(this.prefix+"gutterSpacingFallbackLength",e)}};m();var Bl=require("obsidian");var qu=class{constructor(e){this.plugin=e}async hasTooBigFiles(e){let r=await this.plugin.gitManager.branchInfo(),i=r.tracking?yn(r.tracking)[0]:null;if(!i)return!1;let n=await this.plugin.gitManager.getRemoteUrl(i);if(n!=null&&n.includes("github.com")){let s=[],a=this.plugin.gitManager;for(let o of e){let l=this.plugin.app.vault.getAbstractFileByPath(o.vaultPath),c=!1;if(l instanceof Bl.TFile)l.stat.size>=1e8&&(c=!0);else{let u=await this.plugin.app.vault.adapter.stat(o.vaultPath);u&&u.size>=1e8&&(c=!0)}if(c){let u=!1;a instanceof Se&&(u=await a.isFileTrackedByLFS(o.path)),u||s.push(o)}}if(s.length>0)return this.plugin.displayError(`Aborted commit, because the following files are too big: +- ${s.map(o=>o.vaultPath).join(` +- `)} +Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(e){e!==void 0&&await this.plugin.app.vault.adapter.write(il,e);let r=!1;this.plugin.app.workspace.iterateAllLeaves(i=>{i.getDisplayText()!=""&&il.startsWith(i.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(il,"/",!0)}openDiff({aFile:e,bFile:r,aRef:i,bRef:n,event:s}){var l,c;let a=this.plugin.settings.diffStyle;Bl.Platform.isMobileApp&&(a="git_unified");let o={aFile:e,bFile:r!=null?r:e,aRef:i,bRef:n};a=="split"?(l=Vi(this.plugin.app,s))==null||l.setViewState({type:Os.type,active:!0,state:o}):a=="git_unified"&&((c=Vi(this.plugin.app,s))==null||c.setViewState({type:Ls.type,active:!0,state:o}))}async runRawCommand(){let e=this.plugin.gitManager;if(!(e instanceof Se))return;let i=await new rt(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();i!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let n=new Bl.Notice(`Running '${i}'...`,999999);try{let s=await e.rawCommand(i);s?(n.setMessage(s),window.setTimeout(()=>n.hide(),5e3)):n.hide()}catch(s){throw n.hide(),s}})}};m();var Zh=require("obsidian");var Ha=class extends Zh.ItemView{constructor(r,i){super(r);this.plugin=i;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.contentEl.addClass("git-diff"),this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return Ls.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let i=this.state.bFile.split("/").last();return i!=null&&i.endsWith(".md")&&(i=i.slice(0,-3)),`Diff: ${i}`}return Ls.name}getIcon(){return Ls.icon}async setState(r,i){this.state=r,Zh.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let i=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let n=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!i){if(this.plugin.gitManager instanceof Se&&await this.plugin.gitManager.isTracked(this.state.bFile))i=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(` +`);else if(await this.app.vault.adapter.exists(n)){let s=await this.app.vault.adapter.read(n);i=[...`--- /dev/null ++++ ${this.state.bFile} +@@ -0,0 +1,${s.split(` +`).length} @@`.split(` +`),...s.split(` +`).map(o=>`+${o}`)].join(` +`)}}if(i){let s=this.parser.parseFromString(zh(i),"text/html").querySelector(".d2h-file-diff");this.contentEl.append(s)}else{let s=this.contentEl.createDiv({cls:"obsidian-git-center"});s.createSpan({text:"\u26A0\uFE0F",attr:{style:"font-size: 2em"}}),s.createEl("br"),s.createSpan({text:"File not found: "+this.state.bFile})}}finally{this.gettingDiff=!1}}}};m();var ts=require("obsidian");var Ul=require("@codemirror/commands");var Xh=require("@codemirror/search"),Hl=require("@codemirror/state"),Yi=require("@codemirror/view");m();var Kh=require("obsidian"),Zw=require("@codemirror/view");function x5(t){return t.selection.ranges.filter(e=>!e.empty).map(e=>t.sliceDoc(e.from,e.to)).join(t.lineBreak)}function E5(t){t.dispatch({...t.state.replaceSelection(""),userEvent:"delete.cut"})}function sP(t,e){t.dispatch({...t.state.replaceSelection(e),scrollIntoView:!0,userEvent:"input.paste"})}async function aP(t){if(!t&&navigator.clipboard.read){let e=await navigator.clipboard.read();for(let r of e)if(r.types.includes("text/html")){let i=await(await r.getType("text/html")).text();return(0,Kh.htmlToMarkdown)(i)}}return navigator.clipboard.readText()}var oP=Zw.EditorView.domEventHandlers({contextmenu(t,e){t.preventDefault();let r=x5(e.state),i=!e.state.readOnly&&e.state.facet(Zw.EditorView.editable),n=Kh.Menu.forEvent(t);return n.addItem(s=>s.setTitle("Cut").setIcon("scissors").setDisabled(!i||r.length===0).onClick(async()=>{await navigator.clipboard.writeText(r),E5(e)})),n.addItem(s=>s.setTitle("Copy").setIcon("copy").setDisabled(r.length===0).onClick(()=>navigator.clipboard.writeText(r))),n.addItem(s=>s.setTitle("Paste").setIcon("clipboard-paste").setDisabled(!i).onClick(async()=>sP(e,await aP(!1)))),n.addItem(s=>s.setTitle("Paste as plain text").setIcon("clipboard-type").setDisabled(!i).onClick(async()=>sP(e,await aP(!0)))),n.addItem(s=>s.setTitle("Select all").setIcon("scan").onClick(()=>e.dispatch({selection:{anchor:0,head:e.state.doc.length}}))),n.showAtMouseEvent(t),!0}});var lP=Yi.EditorView.theme({"& .cm-content":{caretColor:"transparent !important"},"&.cm-focused .cm-cursor, & .cm-dropCursor":{display:"none !important"}}),Ua=class extends ts.ItemView{constructor(r,i){super(r);this.plugin=i;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",n=>{this.state.bRef==null&&n.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",n=>{this.state.bRef==null&&n.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",n=>{this.state.bRef==null&&n.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(n,s)=>{this.state.bRef==null&&(n.path===this.state.bFile||s===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,ts.debounce)(n=>{let s=this.state.bFile;s&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(this.plugin.gitManager.getRelativeVaultPath(s),n).catch(a=>this.plugin.displayError(a)))},1e3,!1)}getViewType(){return Os.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let i=this.state.bFile.split("/").last();i!=null&&i.endsWith(".md")&&(i=i.slice(0,-3));let n;return this.state.bRef==null?n=" (Working Tree)":this.state.bRef==""?n=" (Index)":n="("+this.state.bRef.substring(0,7)+")",`Diff: ${i} ${n}`}return Os.name}getIcon(){return Os.icon}async setState(r,i){this.state=r,ts.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,i),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,i){try{return await this.plugin.gitManager.show(r,i,!1)}catch(n){if(n instanceof Br&&(n.message.includes("does not exist")||n.message.includes("unknown revision or path")||n.message.includes("exists on disk, but not in")||n.message.includes("fatal: bad object")))return n.message.includes("fatal: bad object")&&this.plugin.displayError(n.message),"";throw n}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let i=await this.app.vault.adapter.read(this.state.bFile);if(i!=r.state.doc.toString()){let n=r.state.update({changes:{from:0,to:r.state.doc.length,insert:i},annotations:[Hl.Transaction.remote.of(!0)]});r.dispatch(n)}this.refreshing=!1}async updateRefEditors(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.a,i=this.mergeView.b;this.refreshing=!0;let n=await this.gitShow(this.state.aRef,this.state.aFile),s;if(this.state.bRef!=null&&(s=await this.gitShow(this.state.bRef,this.state.bFile)),n!=r.state.doc.toString()){let a=r.state.update({changes:{from:0,to:r.state.doc.length,insert:n}});r.dispatch(a)}if(s!=null&&s!=i.state.doc.toString()){let a=i.state.update({changes:{from:0,to:i.state.doc.length,insert:s}});i.dispatch(a)}this.refreshing=!1}renderButtons(r){let i=r.createDiv(),n=i.createDiv();if(n.addClass("clickable-icon"),n.setAttr("aria-label",this.state.bRef==null?"Stage hunk":"Unstage hunk"),(0,ts.setIcon)(n,this.state.bRef==null?"plus":"minus"),n.onmousedown=async s=>{var p;let a=this.mergeView.b,o=this.mergeView.a,l=kw(a.state),c=(p=i.parentElement)==null?void 0:p.indexOf(i),u=l.chunks[c],f=Tw(u,o.state.doc,a.state.doc),d=Aw(this.mergeView.a.state.doc.toString(),this.mergeView.b.state.doc.toString(),[f])[0],h=zt.createPatch(this.state.bFile,[d],"100644",this.state.bRef!=null).join(` +`)+` +`;await this.plugin.gitManager.applyPatch(h),this.plugin.app.workspace.trigger("obsidian-git:refresh")},this.state.bRef==null){let s=i.createDiv();s.addClass("clickable-icon"),s.setAttr("aria-label","Reset hunk"),(0,ts.setIcon)(s,"undo"),s.onmousedown=a=>{var d;let o=this.mergeView.a,l=this.mergeView.b,c=kw(l.state),u=(d=i.parentElement)==null?void 0:d.indexOf(i),f=c.chunks[u];if(f){let h=f.fromA,p=f.toA,g=f.fromB,v=f.toB,b=o.state.sliceDoc(h,Math.max(h,p-1));h!=p&&v<=l.state.doc.length&&(b+=o.state.lineBreak),l.dispatch({changes:{from:g,to:Math.min(l.state.doc.length,v),insert:b},userEvent:"revert"})}}}return i.onmousedown=s=>{s.preventDefault(),s.stopPropagation()},i}async createMergeView(){var r,i,n;if((r=this.state)!=null&&r.aFile&&((i=this.state)!=null&&i.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(n=this.mergeView)==null||n.destroy();let s=this.containerEl.children[1];s.empty(),this.contentEl.addClass("git-split-diff-view","git-diff"),this.bIsEditable=await this.bShouldBeEditable();let a=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let g=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(g)?o=await this.app.vault.adapter.read(g):o=""}let l=[(0,Yi.lineNumbers)(),(0,Xh.highlightSelectionMatches)(),(0,Yi.drawSelection)(),Yi.keymap.of([...Ul.standardKeymap,Ul.indentWithTab]),(0,Ul.history)(),(0,Xh.search)(),Yi.EditorView.lineWrapping,oP],c=this,u=Yi.ViewPlugin.define(g=>({update(v){if(v.docChanged&&!v.transactions.some(b=>b.annotation(Hl.Transaction.remote))){let b=g.state.doc.toString();c.fileSaveDebouncer(b)}}})),f={doc:a,extensions:[...l,Hl.EditorState.readOnly.of(!0),lP]},d=[...l];this.bIsEditable?d.push(u):d.push(Hl.EditorState.readOnly.of(!0),lP);let h={doc:o,extensions:d};s.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]);let p=this.plugin.gitManager instanceof Se&&(this.state.bRef===void 0||this.state.bRef==="");this.mergeView=new Mh({b:h,a:f,collapseUnchanged:{minSize:6,margin:4},renderRevertControl:p?()=>this.renderButtons(s):void 0,revertControls:p?"a-to-b":void 0,diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:s}),this.refreshing=!1}}};m();var QR=require("obsidian");m();m();m();var cP,uP,fP;typeof window!="undefined"&&((fP=(uP=(cP=window.__svelte)!=null?cP:window.__svelte={}).v)!=null?fP:uP.v=new Set).add("5");m();m();m();var rs={};var Ye=Symbol("uninitialized"),Ti=Symbol("filename");var Qh="http://www.w3.org/1999/xhtml";m();m();m();m();var Jh=!0;m();var D=!1;m();var is=Array.isArray,dP=Array.prototype.indexOf,Ws=Array.prototype.includes,Gl=Array.from,Kw=Object.keys,or=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Xw=Object.getOwnPropertyDescriptors,Qw=Object.prototype,hP=Array.prototype,jl=Object.getPrototypeOf,Jw=Object.isExtensible;function e0(t){return typeof t=="function"}var lr=()=>{};function ep(t){for(var e=0;e{t=i,e=n});return{promise:r,resolve:t,reject:e}}m();m();var Jt=Symbol("$state"),Yu=Symbol("legacy props"),mP=Symbol(""),rp=Symbol("proxy path"),ip=Symbol("attributes"),Zu=Symbol("class"),t0=Symbol("style"),Ku=Symbol("text"),Ga=Symbol("form reset"),r0=Symbol("hmr anchor"),ns=new class extends Error{constructor(){super(...arguments);He(this,"name","StaleReactionError");He(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},pP,i0=!!((pP=globalThis.document)!=null&&pP.contentType)&&globalThis.document.contentType.includes("xml");var Vl=3,Pi=8;m();m();function gP(t){if(D){let e=new Error(`invariant_violation +An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${t}" +https://svelte.dev/e/invariant_violation`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invariant_violation")}function np(t){if(D){let e=new Error(`lifecycle_outside_component +\`${t}(...)\` can only be used during component initialisation +https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function wP(){if(D){let t=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function n0(){if(D){let t=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function bP(){if(D){let t=new Error(`derived_references_self +A derived value cannot reference itself recursively +https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function s0(t,e,r){if(D){let i=new Error(`each_key_duplicate +${r?`Keyed each block has duplicate key \`${r}\` at indexes ${t} and ${e}`:`Keyed each block has duplicate key at indexes ${t} and ${e}`} +https://svelte.dev/e/each_key_duplicate`);throw i.name="Svelte error",i}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function _P(t,e,r){if(D){let i=new Error(`each_key_volatile +Keyed each block has key that is not idempotent \u2014 the key for item at index ${t} was \`${e}\` but is now \`${r}\`. Keys must be the same each time for a given item +https://svelte.dev/e/each_key_volatile`);throw i.name="Svelte error",i}else throw new Error("https://svelte.dev/e/each_key_volatile")}function yP(t){if(D){let e=new Error(`effect_in_teardown +\`${t}\` cannot be used inside an effect cleanup function +https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function xP(){if(D){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function EP(t){if(D){let e=new Error(`effect_orphan +\`${t}\` can only be used inside an effect (e.g. during component initialisation) +https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function SP(){if(D){let t=new Error(`effect_update_depth_exceeded +Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state +https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function kP(){if(D){let t=new Error(`hydration_failed +Failed to hydrate the application +https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function CP(t){if(D){let e=new Error(`props_invalid_value +Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value +https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function AP(t){if(D){let e=new Error(`rune_outside_svelte +The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files +https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function TP(){if(D){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function PP(){if(D){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function RP(){if(D){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $P(){if(D){let t=new Error("svelte_boundary_reset_onerror\nA `` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}m();m();m();var An="font-weight: bold",Tn="font-weight: normal";function FP(t){D?console.warn(`%c[svelte] await_reactivity_loss +%cDetected reactivity loss when reading \`${t}\`. This happens when state is read in an async function after an earlier \`await\` +https://svelte.dev/e/await_reactivity_loss`,An,Tn):console.warn("https://svelte.dev/e/await_reactivity_loss")}function IP(t,e){D?console.warn(`%c[svelte] await_waterfall +%cAn async derived, \`${t}\` (${e}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app +https://svelte.dev/e/await_waterfall`,An,Tn):console.warn("https://svelte.dev/e/await_waterfall")}function MP(){D?console.warn(`%c[svelte] derived_inert +%cReading a derived belonging to a now-destroyed effect may result in stale values +https://svelte.dev/e/derived_inert`,An,Tn):console.warn("https://svelte.dev/e/derived_inert")}function DP(t,e,r){D?console.warn(`%c[svelte] hydration_attribute_changed +%cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value +https://svelte.dev/e/hydration_attribute_changed`,An,Tn):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function ja(t){D?console.warn(`%c[svelte] hydration_mismatch +%c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"} +https://svelte.dev/e/hydration_mismatch`,An,Tn):console.warn("https://svelte.dev/e/hydration_mismatch")}function OP(){D?console.warn(`%c[svelte] lifecycle_double_unmount +%cTried to unmount a component that was not mounted +https://svelte.dev/e/lifecycle_double_unmount`,An,Tn):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function sp(t){D?console.warn(`%c[svelte] state_proxy_equality_mismatch +%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results +https://svelte.dev/e/state_proxy_equality_mismatch`,An,Tn):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function LP(){D?console.warn(`%c[svelte] state_proxy_unmount +%cTried to unmount a state proxy, rather than a component +https://svelte.dev/e/state_proxy_unmount`,An,Tn):console.warn("https://svelte.dev/e/state_proxy_unmount")}function NP(){D?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",An,Tn):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function BP(t){D?console.warn(`%c[svelte] transition_slide_display +%cThe \`slide\` transition does not work correctly for elements with \`display: ${t}\` +https://svelte.dev/e/transition_slide_display`,An,Tn):console.warn("https://svelte.dev/e/transition_slide_display")}var ne=!1;function Mt(t){ne=t}var we;function ze(t){if(t===null)throw ja(),rs;return we=t}function cr(){return ze(tr(we))}function V(t){if(ne){if(tr(we)!==null)throw ja(),rs;we=t}}function Va(t=1){if(ne){for(var e=t,r=we;e--;)r=tr(r);we=r}}function Pn(t=!0){for(var e=0,r=we;;){if(r.nodeType===Pi){var i=r.data;if(i==="]"){if(e===0)return r;e-=1}else(i==="["||i==="[!"||i[0]==="["&&!isNaN(Number(i.slice(1))))&&(e+=1)}var n=tr(r);t&&r.remove(),r=n}}function Qu(t){if(!t||t.nodeType!==Pi)throw ja(),rs;return t.data}m();m();m();m();function ap(t){return t===this.v}function a0(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function op(t){return!a0(t,this.v)}m();var At=!1,ss=!1,Zi=!1;m();m();m();var Ju=null;function ur(t,e){return t.label=e,cp(t.v,e),t}function cp(t,e){var r;return(r=t==null?void 0:t[rp])==null||r.call(t,e),t}m();function Ki(t){let e=new Error,r=k5();return r.length===0?null:(r.unshift(` +`),or(e,"stack",{value:r.join(` +`)}),or(e,"name",{value:t}),e)}function k5(){let t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let e=new Error().stack;if(Error.stackTraceLimit=t,!e)return[];let r=e.split(` +`),i=[];for(let n=0;n{e===za&&GP()})}za.push(t)}function jP(){for(;za.length>0;)GP()}m();var l0=new WeakMap;function fp(t){var e=Q;if(e===null)return ae.f|=8388608,t;if(D&&t instanceof Error&&!l0.has(t)&&l0.set(t,C5(t,e)),(e.f&32768)===0&&(e.f&4)===0)throw D&&!e.parent&&t instanceof Error&&VP(t),t;Ji(t,e)}function Ji(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw D&&t instanceof Error&&VP(t),t}}function C5(t,e){var a,o,l;let r=jr(t,"message");if(!(r&&!r.configurable)){for(var i=tf?" ":" ",n=` +${i}in ${((a=e.fn)==null?void 0:a.name)||""}`,s=e.ctx;s!==null;)n+=` +${i}in ${(o=s.function)==null?void 0:o[Ti].split("/").pop()}`,s=s.p;return{message:t.message+` +${n} +`,stack:(l=t.stack)==null?void 0:l.split(` +`).filter(c=>!c.includes("svelte/src/internal")).join(` +`)}}}function VP(t){let e=l0.get(t);e&&(or(t,"message",{value:e.message}),or(t,"stack",{value:e.stack}))}m();m();var A5=-7169;function Ue(t,e){t.f=t.f&A5|e}function Yl(t){(t.f&512)!==0||t.deps===null?Ue(t,1024):Ue(t,4096)}function zP(t){if(t!==null)for(let e of t)(e.f&2)===0||(e.f&65536)===0||(e.f^=65536,zP(e.deps))}function dp(t,e,r){(t.f&2048)!==0?e.add(t):(t.f&4096)!==0&&r.add(t),zP(t.deps),Ue(t,1024)}m();m();m();var WP=!1,hp=!1;function c0(t){var e=hp;try{return hp=!1,[t(),hp]}finally{hp=e}}m();m();m();m();function u0(t){ne&&nr(t)!==null&&Kl(t)}var qP=!1;function f0(){qP||(qP=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(let r of t.target.elements)(e=r[Ga])==null||e.call(r)})},{capture:!0}))}function zr(t){var e=ae,r=Q;Lt(null),Nt(null);try{return t()}finally{Lt(e),Nt(r)}}function d0(t,e,r,i=r){t.addEventListener(e,()=>zr(r));let n=t[Ga];n?t[Ga]=()=>{n(),i(!0)}:t[Ga]=()=>i(!0),f0()}m();m();m();function YP(t){let e=0,r=dr(0),i;return D&&ur(r,"createSubscriber version"),()=>{qs()&&(F(r),sr(()=>(e===0&&(i=Ze(()=>t(()=>Za(r)))),e+=1,()=>{Et(()=>{e-=1,e===0&&(i==null||i(),i=void 0,Za(r))})})))}}var P5=589824;function w0(t,e,r,i){new h0(t,e,r,i)}var ii,rf,Fi,Ka,Wr,Ii,Sr,ni,ls,Xa,Ys,Xl,nf,sf,Fn,gp,We,KP,XP,p0,QP,m0,pp,mp,g0,v0,h0=class{constructor(e,r,i,n){me(this,We);He(this,"parent");He(this,"is_pending",!1);He(this,"transform_error");me(this,ii);me(this,rf,ne?we:null);me(this,Fi);me(this,Ka);me(this,Wr);me(this,Ii,null);me(this,Sr,null);me(this,ni,null);me(this,ls,null);me(this,Xa,0);me(this,Ys,0);me(this,Xl,!1);me(this,nf,new Set);me(this,sf,new Set);me(this,Fn,null);me(this,gp,YP(()=>(fe(this,Fn,dr($(this,Xa))),D&&ur($(this,Fn),"$effect.pending()"),()=>{fe(this,Fn,null)})));var s,a;fe(this,ii,e),fe(this,Fi,r),fe(this,Ka,o=>{var l=Q;l.b=this,l.f|=128,i(o)}),this.parent=Q.b,this.transform_error=(a=n!=null?n:(s=this.parent)==null?void 0:s.transform_error)!=null?a:(o=>o),fe(this,Wr,ai(()=>{if(ne){let o=$(this,rf);cr();let l=o.data==="[!";if(o.data.startsWith("[?")){let u=JSON.parse(o.data.slice("[?".length));Ee(this,We,XP).call(this,u)}else l?Ee(this,We,QP).call(this):Ee(this,We,KP).call(this)}else Ee(this,We,m0).call(this)},P5)),ne&&fe(this,ii,we)}defer_effect(e){dp(e,$(this,nf),$(this,sf))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!$(this,Fi).pending}update_pending_count(e,r){Ee(this,We,g0).call(this,e,r),fe(this,Xa,$(this,Xa)+e),!(!$(this,Fn)||$(this,Xl))&&(fe(this,Xl,!0),Et(()=>{fe(this,Xl,!1),$(this,Fn)&&en($(this,Fn),$(this,Xa))}))}get_effect_pending(){return $(this,gp).call(this),F($(this,Fn))}error(e){var r;if(!$(this,Fi).onerror&&!$(this,Fi).failed)throw e;(r=oe)!=null&&r.is_fork?($(this,Ii)&&oe.skip_effect($(this,Ii)),$(this,Sr)&&oe.skip_effect($(this,Sr)),$(this,ni)&&oe.skip_effect($(this,ni)),oe.oncommit(()=>{Ee(this,We,v0).call(this,e)})):Ee(this,We,v0).call(this,e)}};ii=new WeakMap,rf=new WeakMap,Fi=new WeakMap,Ka=new WeakMap,Wr=new WeakMap,Ii=new WeakMap,Sr=new WeakMap,ni=new WeakMap,ls=new WeakMap,Xa=new WeakMap,Ys=new WeakMap,Xl=new WeakMap,nf=new WeakMap,sf=new WeakMap,Fn=new WeakMap,gp=new WeakMap,We=new WeakSet,KP=function(){try{fe(this,Ii,Bt(()=>$(this,Ka).call(this,$(this,ii))))}catch(e){this.error(e)}},XP=function(e){let r=$(this,Fi).failed,{reset:i,invoke_onerror:n}=Ee(this,We,p0).call(this,e);Et(n),r&&fe(this,ni,Bt(()=>{r($(this,ii),()=>e,()=>i)}))},p0=function(e){var r=!1,i=!1;let n=()=>{if(r){NP();return}r=!0,i&&$P(),$(this,ni)!==null&&In($(this,ni),()=>{fe(this,ni,null)}),Ee(this,We,mp).call(this,()=>{Ee(this,We,m0).call(this)})};return{reset:n,invoke_onerror:()=>{var a,o;try{i=!0,(o=(a=$(this,Fi)).onerror)==null||o.call(a,e,n),i=!1}catch(l){Ji(l,$(this,Wr)&&$(this,Wr).parent)}}}},QP=function(){let e=$(this,Fi).pending;e&&(this.is_pending=!0,fe(this,Sr,Bt(()=>e($(this,ii)))),Et(()=>{var r=fe(this,ls,document.createDocumentFragment()),i=Ht();r.append(i),fe(this,Ii,Ee(this,We,mp).call(this,()=>Bt(()=>$(this,Ka).call(this,i)))),$(this,Ys)===0&&($(this,ii).before(r),fe(this,ls,null),In($(this,Sr),()=>{fe(this,Sr,null)}),Ee(this,We,pp).call(this,oe))}))},m0=function(){try{if(this.is_pending=this.has_pending_snippet(),fe(this,Ys,0),fe(this,Xa,0),fe(this,Ii,Bt(()=>{$(this,Ka).call(this,$(this,ii))})),$(this,Ys)>0){var e=fe(this,ls,document.createDocumentFragment());Ql($(this,Ii),e);let r=$(this,Fi).pending;fe(this,Sr,Bt(()=>r($(this,ii))))}else Ee(this,We,pp).call(this,oe)}catch(r){this.error(r)}},pp=function(e){this.is_pending=!1,e.transfer_effects($(this,nf),$(this,sf))},mp=function(e){var r=Q,i=ae,n=ye;Nt($(this,Wr)),Lt($(this,Wr)),as($(this,Wr).ctx);try{return si.ensure(),e()}catch(s){return fp(s),null}finally{Nt(r),Lt(i),as(n)}},g0=function(e,r){var i;if(!this.has_pending_snippet()){this.parent&&Ee(i=this.parent,We,g0).call(i,e,r);return}fe(this,Ys,$(this,Ys)+e),$(this,Ys)===0&&(Ee(this,We,pp).call(this,r),$(this,Sr)&&In($(this,Sr),()=>{fe(this,Sr,null)}),$(this,ls)&&($(this,ii).before($(this,ls)),fe(this,ls,null)))},v0=function(e){$(this,Ii)&&(vt($(this,Ii)),fe(this,Ii,null)),$(this,Sr)&&(vt($(this,Sr)),fe(this,Sr,null)),$(this,ni)&&(vt($(this,ni)),fe(this,ni,null)),ne&&(ze($(this,rf)),Va(),ze(Pn()));let r=$(this,Fi).failed,i=n=>{let{reset:s,invoke_onerror:a}=Ee(this,We,p0).call(this,n);a(),r&&fe(this,ni,Ee(this,We,mp).call(this,()=>{try{return Bt(()=>{var o=Q;o.b=this,o.f|=128,r($(this,ii),()=>n,()=>s)})}catch(o){return Ji(o,$(this,Wr).parent),null}}))};Et(()=>{var n;try{n=this.transform_error(e)}catch(s){Ji(s,$(this,Wr)&&$(this,Wr).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(i,s=>Ji(s,$(this,Wr)&&$(this,Wr).parent)):i(n)})};function vp(t,e,r,i){let n=$n()?Zs:Qa;var s=t.filter(h=>!h.settled),a=e.map(n);if(D&&a.forEach((h,p)=>{h.label=e[p].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(g,v)=>v)}),r.length===0&&s.length===0){i(a);return}var o=Q,l=JP(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function u(h){if((o.f&16384)===0){l();try{i([...a,...h])}catch(p){Ji(p,o)}Jl()}}var f=b0();if(r.length===0){c.then(()=>u([])).finally(f);return}function d(){Promise.all(r.map(h=>y0(h))).then(u).catch(h=>Ji(h,o)).finally(f)}c?c.then(()=>{l(),d(),Jl()}):d()}function JP(){var t=Q,e=ae,r=ye,i=oe;if(D)var n=Rn;return function(a=!0){Nt(t),Lt(e),as(r),a&&(t.f&16384)===0&&(i==null||i.activate(),i==null||i.apply()),D&&(_0(null),ql(n))}}function Jl(t=!0){var e;Nt(null),Lt(null),as(null),t&&((e=oe)==null||e.deactivate()),D&&(_0(null),ql(null))}function b0(){var t=Q,e=t.b,r=oe,i=!!(e!=null&&e.is_rendered());return e==null||e.update_pending_count(1,r),r.increment(i,t),()=>{e==null||e.update_pending_count(-1,r),r.decrement(i,t)}}var Yr=null;function _0(t){Yr=t}var af=new Set;function Zs(t){var e=2050;Q!==null&&(Q.f|=524288);let r={ctx:ye,deps:null,effects:null,equals:ap,f:e,fn:t,reactions:null,rv:0,v:Ye,wv:0,parent:Q,ac:null};return D&&Zi&&(r.created=Ki("created at")),r}var ec=Symbol("obsolete");function y0(t,e,r){let i=Q;i===null&&wP();var n=void 0,s=dr(Ye);D&&(s.label=e!=null?e:t.toString());var a=!ae,o=new Set;return rR(()=>{var h,p;var l=Q;D&&(Yr={effect:l,effect_deps:new Set,warned:!1});var c=tp();n=c.promise;try{Promise.resolve(t()).then(c.resolve,g=>{g!==ns&&c.reject(g)}).finally(Jl)}catch(g){c.reject(g),Jl()}if(D){if(Yr){if(l.deps!==null)for(let g=0;g{D&&(Yr=null),f==null||f(),o.delete(c),v!==ec&&(u.activate(),v?(s.f|=8388608,en(s,v)):((s.f&8388608)!==0&&(s.f^=8388608),D&&r!==void 0&&!s.equals(g)&&(af.add(s),setTimeout(()=>{af.has(s)&&(l.f&16384)===0&&(IP(s.label,r),af.delete(s))})),en(s,g)),u.deactivate())};c.promise.then(d,g=>d(null,g||"unknown"))}),rr(()=>{for(let l of o)l.reject(ec)}),D&&(s.f|=4194304),new Promise(l=>{function c(u){function f(){u===n?l(s):c(n)}u.then(f,f)}c(n)})}function ut(t){let e=Zs(t);return At||_p(e),e}function Qa(t){let e=Zs(t);return e.equals=op,e}function eR(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r{r.ac.abort(ns),r.ac=null}),r.fn!==null&&(r.teardown=lr),eo(r,0),lf(r))}function S0(t){if(t.effects!==null)for(let e of t.effects)e.teardown&&e.fn!==null&&Mn(e)}var yp=null,rc=null,oe=null,us=null,Tt=null,A0=null,Wa=!1,k0=!1,to=null,ff=null,iR=0,C0=new Set,F5=1,nc,fs,ds,sc,ac,oc,hs,lc,Cr,df,ps,tn,Dn,cc,Ks,Ne,T0,cf,P0,sR,aR,ic,oR,uf,xp=class xp{constructor(){me(this,Ne);He(this,"id",F5++);me(this,nc,!1);He(this,"linked",!0);me(this,fs,null);me(this,ds,null);He(this,"async_deriveds",new Map);He(this,"current",new Map);He(this,"previous",new Map);me(this,sc,new Set);me(this,ac,new Set);me(this,oc,0);me(this,hs,new Map);me(this,lc,null);me(this,Cr,[]);me(this,df,[]);me(this,ps,new Set);me(this,tn,new Set);me(this,Dn,new Map);me(this,cc,new Set);He(this,"is_fork",!1);me(this,Ks,!1);rc===null?yp=rc=this:(fe(rc,ds,this),fe(this,fs,rc)),rc=this}skip_effect(e){$(this,Dn).has(e)||$(this,Dn).set(e,{d:[],m:[]}),$(this,cc).delete(e)}unskip_effect(e,r=i=>this.schedule(i)){var i=$(this,Dn).get(e);if(i){$(this,Dn).delete(e);for(var n of i.d)Ue(n,2048),r(n);for(n of i.m)Ue(n,4096),r(n)}$(this,cc).add(e)}capture(e,r,i=!1){e.v!==Ye&&!this.previous.has(e)&&this.previous.set(e,e.v),(e.f&8388608)===0&&(this.current.set(e,[r,i]),Tt==null||Tt.set(e,r)),this.is_fork||(e.v=r)}activate(){oe=this}deactivate(){oe=null,Tt=null}flush(){try{D&&C0.clear(),k0=!0,oe=this,Ee(this,Ne,cf).call(this)}finally{if(iR=0,A0=null,to=null,ff=null,k0=!1,oe=null,Tt=null,ms.clear(),D)for(let e of C0)e.updated=null}}discard(){var e;for(let r of $(this,ac))r(this);$(this,ac).clear();for(let r of this.async_deriveds.values())r.reject(ec);Ee(this,Ne,uf).call(this),(e=$(this,lc))==null||e.resolve()}register_created_effect(e){$(this,df).push(e)}increment(e,r){var i;if(fe(this,oc,$(this,oc)+1),e){let n=(i=$(this,hs).get(r))!=null?i:0;$(this,hs).set(r,n+1)}}decrement(e,r){var i;if(fe(this,oc,$(this,oc)-1),e){let n=(i=$(this,hs).get(r))!=null?i:0;n===1?$(this,hs).delete(r):$(this,hs).set(r,n-1)}$(this,Ks)||(fe(this,Ks,!0),Et(()=>{fe(this,Ks,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(let i of e)$(this,ps).add(i);for(let i of r)$(this,tn).add(i);e.clear(),r.clear()}oncommit(e){$(this,sc).add(e)}ondiscard(e){$(this,ac).add(e)}settled(){var e;return((e=$(this,lc))!=null?e:fe(this,lc,tp())).promise}static ensure(){if(oe===null){let e=oe=new xp;!k0&&!Wa&&Et(()=>{$(e,nc)||e.flush()})}return oe}apply(){if(!At||!this.is_fork&&$(this,fs)===null&&$(this,ds)===null){Tt=null;return}Tt=new Map;for(let[r,[i]]of this.current)Tt.set(r,i);for(let r=yp;r!==null;r=$(r,ds))if(!(r===this||r.is_fork)){var e=!1;if(r.id1e3&&(Ee(this,Ne,uf).call(this),I5()),D)for(let d of this.current.keys())C0.add(d);for(let d of $(this,ps))$(this,tn).delete(d),Ue(d,2048),this.schedule(d);for(let d of $(this,tn))Ue(d,4096),this.schedule(d);let e=$(this,Cr);fe(this,Cr,[]),this.apply();var r=to=[],i=[],n=ff=[];for(let d of e)try{Ee(this,Ne,P0).call(this,d,r,i)}catch(h){throw uR(d),Ee(this,Ne,T0).call(this)||this.discard(),h}if(oe=null,n.length>0){var s=xp.ensure();for(let d of n)s.schedule(d)}if(to=null,ff=null,Ee(this,Ne,T0).call(this)){Ee(this,Ne,ic).call(this,i),Ee(this,Ne,ic).call(this,r);for(let[d,h]of $(this,Dn))cR(d,h);n.length>0&&Ee(l=oe,Ne,cf).call(l);return}let a=Ee(this,Ne,sR).call(this);if(a){Ee(this,Ne,ic).call(this,i),Ee(this,Ne,ic).call(this,r),Ee(c=a,Ne,aR).call(c,this);return}$(this,ps).clear(),$(this,tn).clear();for(let d of $(this,sc))d(this);$(this,sc).clear(),us=this,nR(i),nR(r),us=null,(u=$(this,lc))==null||u.resolve();var o=oe;if($(this,oc)===0&&($(this,Cr).length===0||o!==null)&&(Ee(this,Ne,uf).call(this),At&&(Ee(this,Ne,oR).call(this),oe=o)),$(this,Cr).length>0)if(o!==null){let d=o;$(d,Cr).push(...$(this,Cr).filter(h=>!$(d,Cr).includes(h)))}else o=this;o!==null&&Ee(f=o,Ne,cf).call(f)},P0=function(e,r,i){e.f^=1024;for(var n=e.first;n!==null;){var s=n.f,a=(s&96)!==0,o=a&&(s&1024)!==0,l=o||(s&8192)!==0||$(this,Dn).has(n);if(!l&&n.fn!==null){a?n.f^=1024:(s&4)!==0?r.push(n):At&&(s&16777224)!==0?i.push(n):Xs(n)&&((s&16)!==0&&$(this,tn).add(n),Mn(n));var c=n.first;if(c!==null){n=c;continue}}for(;n!==null;){var u=n.next;if(u!==null){n=u;break}n=n.parent}}},sR=function(){for(var e=$(this,fs);e!==null;){if(!e.is_fork){for(let[r,[,i]]of this.current)if(e.current.has(r)&&!i)return e}e=$(e,fs)}return null},aR=function(e){var i;for(let[n,s]of e.current)!this.previous.has(n)&&e.previous.has(n)&&this.previous.set(n,e.previous.get(n)),this.current.set(n,s);for(let[n,s]of e.async_deriveds){let a=this.async_deriveds.get(n);a&&s.promise.then(a.resolve).catch(a.reject)}e.async_deriveds.clear(),this.transfer_effects($(e,ps),$(e,tn));let r=n=>{var s=n.reactions;if(s!==null&&!((n.f&2)!==0&&(n.f&6144)===0))for(let l of s){var a=l.f;if((a&2)!==0)r(l);else{var o=l;a&4194320&&!this.async_deriveds.has(o)&&($(this,tn).delete(o),Ue(o,2048),this.schedule(o))}}};for(let n of this.current.keys())r(n);this.oncommit(()=>e.discard()),Ee(i=e,Ne,uf).call(i),oe=this,Ee(this,Ne,cf).call(this)},ic=function(e){for(var r=0;r!d.current.get(h)[1]);if(!(!$(d,nc)||n.length===0)){var s=n.filter(h=>!this.current.has(h));if(s.length===0)e&&d.discard();else if(r.length>0){if(D&&!$(d,Ks)&&UP($(d,Cr).length===0,"Batch has scheduled roots"),e)for(let h of $(this,cc))d.unskip_effect(h,p=>{var g;(p.f&4194320)!==0?d.schedule(p):Ee(g=d,Ne,ic).call(g,[p])});d.activate();var a=new Set,o=new Map;for(var l of r)lR(l,s,a,o);o=new Map;var c=[...d.current].filter(([h,p])=>{let g=this.current.get(h);return g?g[0]!==p[0]||g[1]!==p[1]:!0}).map(([h])=>h);if(c.length>0)for(let h of $(this,df))(h.f&155648)===0&&R0(h,c,o)&&((h.f&4194320)!==0?(Ue(h,2048),d.schedule(h)):$(d,ps).add(h));if($(d,Cr).length>0&&!$(d,Ks)){d.apply();for(var u of $(d,Cr))Ee(f=d,Ne,P0).call(f,u,[],[]);fe(d,Cr,[])}d.deactivate()}}}},uf=function(){if(this.linked){var e=$(this,fs),r=$(this,ds);e===null?yp=r:fe(e,ds,r),r===null?rc=e:fe(r,fs,e),this.linked=!1}};var si=xp;function io(t){var e=Wa;Wa=!0;try{var r;for(t&&(oe!==null&&!oe.is_fork&&oe.flush(),r=t());;){if(jP(),oe===null)return r;oe.flush()}}finally{Wa=e}}function I5(){var r;if(D){var t=new Map;for(let i of oe.current.keys())for(let[n,s]of(r=i.updated)!=null?r:[]){var e=t.get(n);e||(e={error:s.error,count:0},t.set(n,e)),e.count+=s.count}for(let i of t.values())i.error&&console.error(i.error)}try{SP()}catch(i){D&&or(i,"stack",{value:""}),Ji(i,A0)}}var Zr=null;function nR(t){var e=t.length;if(e!==0){for(var r=0;r0)){ms.clear();for(let n of Zr){if((n.f&24576)!==0)continue;let s=[n],a=n.parent;for(;a!==null;)Zr.has(a)&&(Zr.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){let l=s[o];(l.f&24576)===0&&Mn(l)}}Zr.clear()}}Zr=null}}function lR(t,e,r,i){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(let n of t.reactions){let s=n.f;(s&2)!==0?lR(n,e,r,i):(s&4194320)!==0&&(s&2048)===0&&R0(n,e,i)&&(Ue(n,2048),pf(n))}}function R0(t,e,r){let i=r.get(t);if(i!==void 0)return i;if(t.deps!==null)for(let n of t.deps){if(Ws.call(e,n))return!0;if((n.f&2)!==0&&R0(n,e,r))return r.set(n,!0),!0}return r.set(t,!1),!1}function pf(t){oe.schedule(t)}function cR(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):(t.f&4096)!==0&&e.m.push(t),Ue(t,1024);for(var r=t.first;r!==null;)cR(r,e),r=r.next}}function uR(t){Ue(t,1024);for(var e=t.first;e!==null;)uR(e),e=e.next}var Ja=new Set,ms=new Map;function wp(t){Ja=t}var F0=!1;function dR(){F0=!0}function dr(t,e){var r={f:0,v:t,reactions:null,equals:ap,rv:0,wv:0};return D&&Zi&&(r.created=e!=null?e:Ki("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function Oe(t,e){let r=dr(t,e);return _p(r),r}function qa(t,e=!1,r=!0){var n,s;let i=dr(t);return e||(i.equals=op),ss&&r&&ye!==null&&ye.l!==null&&((s=(n=ye.l).s)!=null?s:n.s=[]).push(i),i}function se(t,e,r=!1){ae!==null&&(!Ar||(ae.f&131072)!==0)&&$n()&&(ae.f&4325394)!==0&&(li===null||!li.has(t))&&RP();let i=r?et(e):e;return D&&cp(i,t.label),en(t,i,ff)}function en(t,e,r=null){var n,s,a;if(!t.equals(e)){ms.set(t,oi?e:t.v);var i=si.ensure();if(i.capture(t,e),D){if(Zi||Q!==null){(n=t.updated)!=null||(t.updated=new Map);let o=((a=(s=t.updated.get(""))==null?void 0:s.count)!=null?a:0)+1;if(t.updated.set("",{error:null,count:o}),Zi||o>5){let l=Ki("updated at");if(l!==null){let c=t.updated.get(l.stack);c||(c={error:l,count:0},t.updated.set(l.stack,c)),c.count++}}}Q!==null&&(t.set_during_effect=!0)}if((t.f&2)!==0){let o=t;(t.f&2048)!==0&&of(o),Tt===null&&Yl(o)}t.wv=tc(),hR(t,2048,r),$n()&&Q!==null&&(Q.f&1024)!==0&&(Q.f&96)===0&&(ci===null?pR([t]):ci.push(t)),!i.is_fork&&Ja.size>0&&!F0&&Ep()}return e}function Ep(){F0=!1;for(let t of Ja){(t.f&1024)!==0&&Ue(t,4096);let e;try{e=Xs(t)}catch(r){e=!0}e&&Mn(t)}Ja.clear()}function Za(t){se(t,t.v+1)}function hR(t,e,r){var d;var i=t.reactions;if(i!==null)for(var n=$n(),s=i.length,a=0;a{if(Qs===a)return f();var d=ae,h=Qs;Lt(null),I0(a);var p=f();return Lt(d),I0(h),p};i&&(r.set("length",Oe(t.length,s)),D&&(t=L5(t)));var l="";let c=!1;function u(f){if(!c){c=!0,l=f,ur(n,`${l} version`);for(let[d,h]of r)ur(h,no(l,d));c=!1}}return new Proxy(t,{defineProperty(f,d,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&TP();var p=r.get(d);return p===void 0?o(()=>{var g=Oe(h.value,s);return r.set(d,g),D&&typeof d=="string"&&ur(g,no(l,d)),g}):se(p,h.value,!0),!0},deleteProperty(f,d){var h=r.get(d);if(h===void 0){if(d in f){let p=o(()=>Oe(Ye,s));r.set(d,p),Za(n),D&&ur(p,no(l,d))}}else se(h,Ye),Za(n);return!0},get(f,d,h){var b;if(d===Jt)return t;if(D&&d===rp)return u;var p=r.get(d),g=d in f;if(p===void 0&&(!g||(b=jr(f,d))!=null&&b.writable)&&(p=o(()=>{var _=et(g?f[d]:Ye),C=Oe(_,s);return D&&ur(C,no(l,d)),C}),r.set(d,p)),p!==void 0){var v=F(p);return v===Ye?void 0:v}return Reflect.get(f,d,h)},getOwnPropertyDescriptor(f,d){var h=Reflect.getOwnPropertyDescriptor(f,d);if(h&&"value"in h){var p=r.get(d);p&&(h.value=F(p))}else if(h===void 0){var g=r.get(d),v=g==null?void 0:g.v;if(g!==void 0&&v!==Ye)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(f,d){var v;if(d===Jt)return!0;var h=r.get(d),p=h!==void 0&&h.v!==Ye||Reflect.has(f,d);if(h!==void 0||Q!==null&&(!p||(v=jr(f,d))!=null&&v.writable)){h===void 0&&(h=o(()=>{var b=p?et(f[d]):Ye,_=Oe(b,s);return D&&ur(_,no(l,d)),_}),r.set(d,h));var g=F(h);if(g===Ye)return!1}return p},set(f,d,h,p){var w;var g=r.get(d),v=d in f;if(i&&d==="length")for(var b=h;bOe(Ye,s)),r.set(b+"",_),D&&ur(_,no(l,b)))}if(g===void 0)(!v||(w=jr(f,d))!=null&&w.writable)&&(g=o(()=>Oe(void 0,s)),D&&ur(g,no(l,d)),se(g,et(h)),r.set(d,g));else{v=g.v!==Ye;var C=o(()=>et(h));se(g,C)}var x=Reflect.getOwnPropertyDescriptor(f,d);if(x!=null&&x.set&&x.set.call(p,h),!v){if(i&&typeof d=="string"){var S=r.get("length"),A=Number(d);Number.isInteger(A)&&A>=S.v&&se(S,A+1)}Za(n)}return!0},ownKeys(f){F(n);var d=Reflect.ownKeys(f).filter(g=>{var v=r.get(g);return v===void 0||v.v!==Ye});for(var[h,p]of r)p.v!==Ye&&!(h in f)&&d.push(h);return d},setPrototypeOf(){PP()}})}function no(t,e){var r;return typeof e=="symbol"?`${t}[Symbol(${(r=e.description)!=null?r:""})]`:D5.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Sp(t){try{if(t!==null&&typeof t=="object"&&Jt in t)return t[Jt]}catch(e){}return t}var O5=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function L5(t){return new Proxy(t,{get(e,r,i){var n=Reflect.get(e,r,i);return O5.has(r)?function(...s){dR();var a=n.apply(this,s);return Ep(),a}:n}})}function mR(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:r,lastIndexOf:i,includes:n}=t;t.indexOf=function(s,a){let o=r.call(this,s,a);if(o===-1){for(let l=a!=null?a:0;l{t.indexOf=r,t.lastIndexOf=i,t.includes=n}}var M0,gR,tf,vR,wR;function kp(){if(M0===void 0){M0=window,gR=document,tf=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;vR=jr(e,"firstChild").get,wR=jr(e,"nextSibling").get,Jw(t)&&(t[Zu]=void 0,t[ip]=null,t[t0]=void 0,t.__e=void 0),Jw(r)&&(r[Ku]=void 0),D&&(t.__svelte_meta=null,mR())}}function Ht(t=""){return document.createTextNode(t)}function nr(t){return vR.call(t)}function tr(t){return wR.call(t)}function z(t,e){if(!ne)return nr(t);var r=nr(we);if(r===null)r=we.appendChild(Ht());else if(e&&r.nodeType!==Vl){var i=Ht();return r==null||r.before(i),ze(i),i}return e&&Ap(r),ze(r),r}function Mi(t,e=!1){var n,s;if(!ne){var r=nr(t);return r instanceof Comment&&r.data===""?tr(r):r}if(e){if(((n=we)==null?void 0:n.nodeType)!==Vl){var i=Ht();return(s=we)==null||s.before(i),ze(i),i}Ap(we)}return we}function ie(t,e=1,r=!1){let i=ne?we:t;for(var n;e--;)n=i,i=tr(i);if(!ne)return i;if(r){if((i==null?void 0:i.nodeType)!==Vl){var s=Ht();return i===null?n==null||n.after(s):i.before(s),ze(s),s}Ap(i)}return ze(i),i}function Kl(t){t.textContent=""}function Cp(){if(!At||Zr!==null)return!1;var t=Q.f;return(t&32768)!==0}function On(t,e,r){return e==null||e===Qh?r?document.createElement(t,{is:r}):document.createElement(t):r?document.createElementNS(e,t,{is:r}):document.createElementNS(e,t)}function Ap(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===Vl;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function _R(t){Q===null&&(ae===null&&EP(t),xP()),oi&&yP(t)}function B5(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Ln(t,e){var a,o;var r=Q;if(D)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(t|=8192);var i={ctx:ye,deps:null,nodes:null,f:t|2048|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};D&&(i.component_function=Xi),(a=oe)==null||a.register_created_effect(i);var n=i;if((t&4)!==0)to!==null?to.push(i):si.ensure().schedule(i);else if(e!==null){try{Mn(i)}catch(l){throw vt(i),l}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&524288)===0&&(n=n.first,(t&16)!==0&&(t&65536)!==0&&n!==null&&(n.f|=65536))}if(n!==null&&(n.parent=r,r!==null&&B5(n,r),ae!==null&&(ae.f&2)!==0&&(t&64)===0)){var s=ae;((o=s.effects)!=null?o:s.effects=[]).push(n)}return i}function qs(){return ae!==null&&!Ar}function rr(t){let e=Ln(8,null);return Ue(e,1024),e.teardown=t,e}function hr(t){var n;_R("$effect"),D&&or(t,"name",{value:"$effect"});var e=Q.f,r=!ae&&(e&32)!==0&&ye!==null&&!ye.i;if(r){var i=ye;((n=i.e)!=null?n:i.e=[]).push(t)}else return o0(t)}function o0(t){return Ln(1048580,t)}function O0(t){si.ensure();let e=Ln(524352,t);return()=>{vt(e)}}function yR(t){si.ensure();let e=Ln(524352,t);return(r={})=>new Promise(i=>{r.outro?In(e,()=>{vt(e),i(void 0)}):(vt(e),i(void 0))})}function Kr(t){return Ln(4,t)}function rR(t){return Ln(4718592,t)}function sr(t,e=0){return Ln(8|e,t)}function je(t,e=[],r=[],i=[]){vp(i,e,r,n=>{Ln(8,()=>{t(...n.map(F))})})}function ai(t,e=0){var r=Ln(16|e,t);return D&&(r.dev_stack=Rn),r}function Bt(t){return Ln(524320,t)}function L0(t){var e=t.teardown;if(e!==null){let r=oi,i=ae;D0(!0),Lt(null);try{e.call(null)}finally{D0(r),Lt(i)}}}function lf(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){let n=r.ac;n!==null&&zr(()=>{n.abort(ns)});var i=r.next;(r.f&64)!==0?r.parent=null:vt(r,e),r=i}}function xR(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&32)===0&&vt(e),e=r}}function vt(t,e=!0){var r=!1;(e||(t.f&262144)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(ER(t.nodes.start,t.nodes.end),r=!0),t.f|=33554432,lf(t,e&&!r),eo(t,0);var i=t.nodes&&t.nodes.t;if(i!==null)for(let s of i)s.stop();L0(t),t.f^=33554432,t.f|=16384;var n=t.parent;n!==null&&n.first!==null&&$0(t),D&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function ER(t,e){for(;t!==null;){var r=t===e?null:tr(t);t.remove(),t=r}}function $0(t){var e=t.parent,r=t.prev,i=t.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),e!==null&&(e.first===t&&(e.first=i),e.last===t&&(e.last=r))}function In(t,e,r=!0){var i=[];SR(t,i,!0);var n=()=>{r&&vt(t),e&&e()},s=i.length;if(s>0){var a=()=>--s||n();for(var o of i)o.out(a)}else n()}function SR(t,e,r){if((t.f&8192)===0){t.f^=8192;var i=t.nodes&&t.nodes.t;if(i!==null)for(let o of i)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var s=n.next;if((n.f&64)===0){var a=(n.f&65536)!==0||(n.f&32)!==0&&(t.f&16)!==0;SR(n,e,a?r:!1)}n=s}}}function fc(t){kR(t,!0)}function kR(t,e){if((t.f&8192)!==0){t.f^=8192,(t.f&1024)===0&&(Ue(t,2048),si.ensure().schedule(t));for(var r=t.first;r!==null;){var i=r.next,n=(r.f&65536)!==0||(r.f&32)!==0;kR(r,n?e:!1),r=i}var s=t.nodes&&t.nodes.t;if(s!==null)for(let a of s)(a.is_global||e)&&a.in()}}function Ql(t,e){if(t.nodes)for(var r=t.nodes.start,i=t.nodes.end;r!==null;){var n=r===i?null:tr(r);e.append(r),r=n}}m();var CR=null;var Tp=!1,oi=!1;function D0(t){oi=t}var ae=null,Ar=!1;function Lt(t){ae=t}var Q=null;function Nt(t){Q=t}var li=null;function _p(t){ae!==null&&(!At||(ae.f&2)!==0)&&(li!=null?li:li=new Set).add(t)}var Yt=null,kr=0,ci=null;function pR(t){ci=t}var AR=1,so=0,Qs=so;function I0(t){Qs=t}function tc(){return++AR}function Xs(t){var e=t.f;if((e&2048)!==0)return!0;if(e&2&&(t.f&=-65537),(e&4096)!==0){for(var r=t.deps,i=r.length,n=0;nt.wv)return!0}(e&512)!==0&&Tt===null&&Ue(t,1024)}return!1}function TR(t,e,r=!0){var i=t.reactions;if(i!==null&&!(!At&&li!==null&&li.has(t)))for(var n=0;n{t.ac.abort(ns)}),t.ac=null);try{t.f|=2097152;var u=t.fn,f=u();t.f|=32768;var d=t.deps,h=(g=oe)==null?void 0:g.is_fork;if(Yt!==null){var p;if(h||eo(t,kr),d!==null&&kr>0)for(d.length=kr+Yt.length,p=0;p{s.ac.abort(ns),s.ac=null,Ue(s,2048)}),tR(s),eo(s,0)}}function eo(t,e){var r=t.deps;if(r!==null)for(var i=e;i{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),io()}function F(t){var h,p,g;var e=t.f,r=(e&2)!==0;if((h=CR)==null||h.add(t),ae!==null&&!Ar){var i=Q!==null&&(Q.f&16384)!==0;if(!i&&(li===null||!li.has(t))){var n=ae.deps;if((ae.f&2097152)!==0)t.rvr==null?void 0:r.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Et(()=>{e.addEventListener(t,n,i)}):e.addEventListener(t,n,i),n}function ui(t,e,r,i,n){var s={capture:i,passive:n},a=FR(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&rr(()=>{e.removeEventListener(t,a,s)})}function ve(t,e,r){var i;((i=e[ao])!=null?i:e[ao]={})[t]=r}function Pt(t){for(var e=0;e{throw b});throw d}}finally{t[ao]=e,delete t.currentTarget,Lt(u),Nt(f)}}}m();m();var IR,B0=((IR=globalThis==null?void 0:globalThis.window)==null?void 0:IR.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function MR(t){var e;return(e=B0==null?void 0:B0.createHTML(t))!=null?e:t}function H0(t){var e=On("template");return e.innerHTML=MR(t.replaceAll("","")),e.content}function rn(t,e){var r=Q;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function _e(t,e){var r=(e&1)!==0,i=(e&2)!==0,n,s=!t.startsWith("");return()=>{if(ne)return rn(we,null),we;n===void 0&&(n=H0(s?t:""+t),r||(n=nr(n)));var a=i||tf?document.importNode(n,!0):n.cloneNode(!0);if(r){var o=nr(a),l=a.lastChild;rn(o,l)}else rn(a,a);return a}}function oo(){if(ne)return rn(we,null),we;var t=document.createDocumentFragment(),e=document.createComment(""),r=Ht();return t.append(e,r),rn(e,r),t}function le(t,e){if(ne){var r=Q;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=we),cr();return}t!==null&&t.before(e)}m();var W5=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var hte=[...W5,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var q5=["touchstart","touchmove"];function DR(t){return q5.includes(t)}var Y5=["$state","$state.raw","$derived","$derived.by"],pte=[...Y5,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];var Ip=!0;function qe(t,e){var i,n;var r=e==null?"":typeof e=="object"?`${e}`:e;r!==((n=t[i=Ku])!=null?n:t[i]=t.nodeValue)&&(t[Ku]=r,t.nodeValue=`${r}`)}function Js(t,e){return OR(t,e)}function j0(t,e){var a;kp(),e.intro=(a=e.intro)!=null?a:!1;let r=e.target,i=ne,n=we;try{for(var s=nr(r);s&&(s.nodeType!==Pi||s.data!=="[");)s=tr(s);if(!s)throw rs;Mt(!0),ze(s);let o=OR(t,{...e,anchor:s});return Mt(!1),o}catch(o){if(o instanceof Error&&o.message.split(` +`).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==rs&&console.warn("Failed to hydrate: ",o),e.recover===!1&&kP(),kp(),Kl(r),Mt(!1),Js(t,e)}finally{Mt(i),ze(n)}}var Fp=new Map;function OR(t,{target:e,anchor:r,props:i={},events:n,context:s,intro:a=!0,transformError:o}){kp();var l=void 0,c=yR(()=>{var u=r!=null?r:e.appendChild(Ht());w0(u,{pending:()=>{}},h=>{lt({});var p=ye;if(s&&(p.c=s),n&&(i.$$events=n),ne&&rn(h,null),Ip=a,l=t(h,i)||{},Ip=!0,ne&&(Q.nodes.end=we,we===null||we.nodeType!==Pi||we.data!=="]"))throw ja(),rs;ct()},o);var f=new Set,d=h=>{for(var p=0;p{var v;for(var h of f)for(let b of[e,document]){var p=Fp.get(b),g=p.get(h);--g==0?(b.removeEventListener(h,$p),p.delete(h),p.size===0&&Fp.delete(b)):p.set(h,g)}Rp.delete(d),u!==r&&((v=u.parentNode)==null||v.removeChild(u))}});return G0.set(l,c),l}var G0=new WeakMap;function gs(t,e){let r=G0.get(t);return r?(G0.delete(t),r(e)):(D&&(Jt in t?LP():OP()),Promise.resolve())}m();m();m();var nn,Nn,fi,lo,mf,gf,Mp,vs=class{constructor(e,r=!0){He(this,"anchor");me(this,nn,new Map);me(this,Nn,new Map);me(this,fi,new Map);me(this,lo,new Set);me(this,mf,!0);me(this,gf,e=>{if($(this,nn).has(e)){var r=$(this,nn).get(e),i=$(this,Nn).get(r);if(i)fc(i),$(this,lo).delete(r);else{var n=$(this,fi).get(r);n&&(fc(n.effect),$(this,Nn).set(r,n.effect),$(this,fi).delete(r),D&&(n.fragment.lastChild[r0]=this.anchor),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(let[s,a]of $(this,nn)){if($(this,nn).delete(s),s===e)break;let o=$(this,fi).get(a);o&&(vt(o.effect),$(this,fi).delete(a))}for(let[s,a]of $(this,Nn)){if(s===r||$(this,lo).has(s))continue;let o=()=>{if(Array.from($(this,nn).values()).includes(s)){var c=document.createDocumentFragment();Ql(a,c),c.append(Ht()),$(this,fi).set(s,{effect:a,fragment:c})}else vt(a);$(this,lo).delete(s),$(this,Nn).delete(s)};$(this,mf)||!i?($(this,lo).add(s),In(a,o,!1)):o()}}});me(this,Mp,e=>{$(this,nn).delete(e);let r=Array.from($(this,nn).values());for(let[i,n]of $(this,fi))r.includes(i)||(vt(n.effect),$(this,fi).delete(i))});this.anchor=e,fe(this,mf,r)}ensure(e,r){var i=oe,n=Cp();if(r&&!$(this,Nn).has(e)&&!$(this,fi).has(e))if(n){var s=document.createDocumentFragment(),a=Ht();s.append(a),$(this,fi).set(e,{effect:Bt(()=>r(a)),fragment:s})}else $(this,Nn).set(e,Bt(()=>r(this.anchor)));if($(this,nn).set(i,e),n){for(let[o,l]of $(this,Nn))o===e?i.unskip_effect(l):i.skip_effect(l);for(let[o,l]of $(this,fi))o===e?i.unskip_effect(l.effect):i.skip_effect(l.effect);i.oncommit($(this,gf)),i.ondiscard($(this,Mp))}else ne&&(this.anchor=we),$(this,gf).call(this,i)}};nn=new WeakMap,Nn=new WeakMap,fi=new WeakMap,lo=new WeakMap,mf=new WeakMap,gf=new WeakMap,Mp=new WeakMap;if(D){let t=function(e){if(!(e in globalThis)){let r;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(r!==void 0)return r;AP(e)},set:i=>{r=i}})}};t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}function co(t){ye===null&&np("onMount"),ss&&ye.l!==null?X5(ye).m.push(t):hr(()=>{let e=Ze(t);if(typeof e=="function")return e})}function X5(t){var r;var e=t.l;return(r=e.u)!=null?r:e.u={a:[],b:[],m:[]}}m();m();var BR=new Map;function HR(t,e){var r=BR.get(t);r||(r=new Set,BR.set(t,r)),r.add(e)}m();m();m();m();m();m();m();m();m();function Re(t,e,r=!1){var i;ne&&(i=we,cr());var n=new vs(t),s=r?65536:0;function a(o,l){if(ne){var c=Qu(i);if(o!==parseInt(c.substring(1))){var u=Pn();ze(u),n.anchor=u,Mt(!1),n.ensure(o,l),Mt(!0);return}}n.ensure(o,l)}ai(()=>{var o=!1;e((l,c=0)=>{o=!0,a(c,l)}),o||a(-1,null)},s)}m();m();m();function di(t,e){return e}function sU(t,e,r){var f;for(var i=[],n=e.length,s,a=e.length,o=0;o{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var h=t.outrogroups;V0(t,Gl(s.done)),h.delete(s),h.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=i.length===0&&r!==null;if(l){var c=r,u=c.parentNode;Kl(u),u.append(c),t.items.clear()}V0(t,e,!l)}else s={pending:new Set(e),done:new Set},((f=t.outrogroups)!=null?f:t.outrogroups=new Set).add(s)}function V0(t,e,r=!0){var i;if(t.pending.size>0){i=new Set;for(let a of t.pending.values())for(let o of a)i.add(t.items.get(o).e)}for(var n=0;n{var C=r();return is(C)?C:C==null?[]:Gl(C)});D&&ur(f,"{#each ...}");var d,h=new Map,p=!0;function g(C){(_.effect.f&16384)===0&&(_.pending.delete(C),_.fallback=u,aU(_,d,a,e,i),u!==null&&(d.length===0?(u.f&33554432)===0?fc(u):(u.f^=33554432,wf(u,null,a)):In(u,()=>{u=null})))}function v(C){_.pending.delete(C)}var b=ai(()=>{d=F(f);var C=d.length;let x=!1;if(ne){var S=Qu(a)==="[!";S!==(C===0)&&(a=Pn(),ze(a),Mt(!1),x=!0)}for(var A=new Set,w=oe,E=Cp(),y=0;ys(a)):(u=Bt(()=>s(dc!=null?dc:dc=Ht())),u.f|=33554432)),C>A.size&&(D?lU(d,i):s0("","","")),ne&&C>0&&ze(Pn()),!p)if(h.set(w,A),E){for(let[H,te]of o)A.has(H)||w.skip_effect(te.e);w.oncommit(g),w.ondiscard(v)}else g(w);x&&Mt(!0),F(f)}),_={effect:b,flags:e,items:o,pending:h,outrogroups:null,fallback:u};p=!1,ne&&(a=we)}function vf(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function aU(t,e,r,i,n){var P,T,I,L,H,te,xe,Z,K;var s=(i&8)!==0,a=e.length,o=t.items,l=vf(t.effect.first),c,u=null,f,d=[],h=[],p,g,v,b;if(s)for(b=0;b0){var y=(i&4)!==0&&a===0?r:null;if(s){for(b=0;b{var ce,pe;if(f!==void 0)for(v of f)(pe=(ce=v.nodes)==null?void 0:ce.a)==null||pe.apply()})}function oU(t,e,r,i,n,s,a,o){var l=(a&1)!==0?(a&16)===0?qa(r,!1,!1):dr(r):null,c=(a&2)!==0?dr(n):null;return D&&l&&(l.trace=()=>{var u;o()[(u=c==null?void 0:c.v)!=null?u:n]}),{v:l,i:c,e:Bt(()=>(s(e,l!=null?l:r,c!=null?c:n,o),()=>{t.delete(i)}))}}function wf(t,e,r){if(t.nodes)for(var i=t.nodes.start,n=t.nodes.end,s=e&&(e.f&33554432)===0?e.nodes.start:r;i!==null;){var a=tr(i);if(s.before(i),i===n)return;i=a}}function ea(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function lU(t,e){let r=new Map,i=t.length;for(let n=0;nperformance.now():()=>Date.now(),sn={tick:t=>(Jh?requestAnimationFrame:lr)(t),now:()=>cU(),tasks:new Set};function GR(){let t=sn.now();sn.tasks.forEach(e=>{e.c(t)||(sn.tasks.delete(e),e.f())}),sn.tasks.size!==0&&sn.tick(GR)}function jR(t){let e;return sn.tasks.size===0&&sn.tick(GR),{promise:new Promise(r=>{sn.tasks.add(e={c:t,f:r})}),abort(){sn.tasks.delete(e)}}}function Dp(t,e){zr(()=>{t.dispatchEvent(new CustomEvent(e))})}function hU(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function VR(t){let e={},r=t.split(";");for(let i of r){let[n,s]=i.split(":");if(!n||s===void 0)break;let a=hU(n.trim());e[a]=s.trim()}return e}var pU=t=>t;function an(t,e,r,i){var C,x;var n=(t&1)!==0,s=(t&2)!==0,a=n&&s,o=(t&4)!==0,l=a?"both":n?"in":"out",c,u=e.inert,f=e.style.overflow,d,h;function p(){return zr(()=>{var S;return c!=null?c:c=r()(e,(S=i==null?void 0:i())!=null?S:{},{direction:l})})}var g={is_global:o,in(){var S;if(e.inert=u,!n){h==null||h.abort(),(S=h==null?void 0:h.reset)==null||S.call(h);return}s||d==null||d.abort(),d=z0(e,p(),h,1,()=>{Dp(e,"introstart")},()=>{Dp(e,"introend"),d==null||d.abort(),d=c=void 0,e.style.overflow=f})},out(S){if(!s){S==null||S(),c=void 0;return}e.inert=!0,h=z0(e,p(),d,0,()=>{Dp(e,"outrostart")},()=>{Dp(e,"outroend"),S==null||S()})},stop:()=>{d==null||d.abort(),h==null||h.abort()}},v=Q;if(((x=(C=v.nodes).t)!=null?x:C.t=[]).push(g),n&&Ip){var b=o;if(!b){for(var _=v.parent;_&&(_.f&65536)!==0;)for(;(_=_.parent)&&(_.f&16)===0;);b=!_||(_.f&32768)!==0}b&&Kr(()=>{Ze(()=>g.in())})}}function z0(t,e,r,i,n,s){var a=i===1;if(e0(e)){var o,l=!1;return Et(()=>{if(!l){var b=e({direction:a?"in":"out"});o=z0(t,b,r,i,n,s)}}),{abort:()=>{l=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration)&&!(e!=null&&e.delay))return n(),s(),{abort:lr,deactivate:lr,reset:lr,t:()=>i};let{delay:c=0,css:u,tick:f,easing:d=pU}=e;var h=[];if(a&&r===void 0&&(f&&f(0,1),u)){var p=VR(u(0,1));h.push(p,p)}var g=()=>1-i,v=t.animate(h,{duration:c,fill:"forwards"});return v.onfinish=()=>{var P;v.cancel(),n();var b=(P=r==null?void 0:r.t())!=null?P:1-i;r==null||r.abort();var _=i-b,C=e.duration*Math.abs(_),x=[];if(C>0){var S=!1;if(u)for(var A=Math.ceil(C/16.666666666666668),w=0;w<=A;w+=1){var E=b+_*d(w/A),y=VR(u(E,1-E));x.push(y),S||(S=y.overflow==="hidden")}S&&(t.style.overflow="hidden"),g=()=>{var T=v.currentTime;return b+_*d(T/C)},f&&jR(()=>{if(v.playState!=="running")return!1;var T=g();return f(T,1-T),!0})}v=t.animate(x,{duration:C,fill:"forwards"}),v.onfinish=()=>{g=()=>i,f==null||f(i,1-i),s()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=lr)},deactivate:()=>{s=lr},reset:()=>{i===0&&(f==null||f(1,0))},t:()=>g()}}m();m();function on(t,e){Kr(()=>{var n;var r=t.getRootNode(),i=r.host?r:(n=r.head)!=null?n:r.ownerDocument.head;if(!i.querySelector("#"+e.hash)){let s=On("style");s.id=e.hash,s.textContent=e.code,i.appendChild(s),D&&HR(e.hash,s)}})}m();m();m();m();m();m();var WR=[...` +\r\f\xA0\v\uFEFF`];function qR(t,e,r){var i=t==null?"":""+t;if(e&&(i=i?i+" "+e:e),r){for(var n of Object.keys(r))if(r[n])i=i?i+" "+n:n;else if(i.length)for(var s=n.length,a=0;(a=i.indexOf(n,a))>=0;){var o=a+s;(a===0||WR.includes(i[a-1]))&&(o===i.length||WR.includes(i[o]))?i=(a===0?"":i.substring(0,a))+i.substring(o+1):a=o}}return i===""?null:i}m();function wt(t,e,r,i,n,s){var a=t[Zu];if(ne||a!==r||a===void 0){var o=qR(r,i,s);(!ne||o!==t.getAttribute("class"))&&(o==null?t.removeAttribute("class"):e?t.className=o:t.setAttribute("class",o)),t[Zu]=r}else if(s&&n!==s)for(var l in s){var c=!!s[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return s}m();m();var xU=Symbol("is custom element"),EU=Symbol("is html"),SU=i0?"link":"LINK";function Ce(t,e,r,i){var n=kU(t);if(ne&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===SU)){i||AU(t,e,r!=null?r:"");return}n[e]!==(n[e]=r)&&(e==="loading"&&(t[mP]=r),r==null?t.removeAttribute(e):typeof r!="string"&&CU(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function kU(t){var e,r;return(r=t[e=ip])!=null?r:t[e]={[xU]:t.nodeName.includes("-"),[EU]:t.namespaceURI===Qh}}var YR=new Map;function CU(t){var e=t.getAttribute("is")||t.nodeName,r=YR.get(e);if(r)return r;YR.set(e,r=[]);for(var i,n=t,s=Element.prototype;s!==n;){i=Xw(n);for(var a in i)i[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);n=jl(n)}return r}function AU(t,e,r){var i;D&&(e==="srcset"&&TU(t,r)||W0((i=t.getAttribute(e))!=null?i:"",r)||DP(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(r)))}function W0(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ZR(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function TU(t,e){var r=ZR(t.srcset),i=ZR(e);return i.length===r.length&&i.every(([n,s],a)=>s===r[a][1]&&(W0(r[a][0],n)||W0(n,r[a][0])))}m();m();m();function Z0(t,e,r=e){var i=new WeakSet;d0(t,"input",async n=>{D&&t.type==="checkbox"&&n0();var s=n?t.defaultValue:t.value;if(s=q0(t)?Y0(s):s,r(s),oe!==null&&i.add(oe),await Pp(),s!==(s=e())){var a=t.selectionStart,o=t.selectionEnd,l=t.value.length;if(t.value=s!=null?s:"",o!==null){var c=t.value.length;a===o&&o===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=a,t.selectionEnd=Math.min(o,c))}}}),(ne&&t.defaultValue!==t.value||Ze(e)==null&&t.value)&&(r(q0(t)?Y0(t.value):t.value),oe!==null&&i.add(oe)),sr(()=>{D&&t.type==="checkbox"&&n0();var n=e();if(t===document.activeElement){var s=At?us:oe;if(i.has(s))return}q0(t)&&n===Y0(t.value)||t.type==="date"&&!n&&!t.value||n!==t.value&&(t.value=n!=null?n:"")})}function q0(t){var e=t.type;return e==="number"||e==="range"}function Y0(t){return t===""?null:+t}m();m();m();m();m();function K0(t,e){return t===e||(t==null?void 0:t[Jt])===e}function at(t={},e,r,i){var n=ye.r,s=Q;return Kr(()=>{var a,o;return sr(()=>{a=o,o=(i==null?void 0:i())||[],Ze(()=>{K0(r(...o),t)||(e(t,...o),a&&K0(r(...a),t)&&e(null,...a))})}),()=>{let l=s;for(;l!==n&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;let c=()=>{o&&K0(r(...o),t)&&e(null,...o)},u=l.teardown;l.teardown=()=>{c(),u==null||u()}}}),t}m();m();m();m();m();m();function Di(t,e,r,i){var x,S;var n=!ss||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,o=i,l=!0,c=void 0,u=()=>a&&n?(c!=null||(c=Zs(i)),F(c)):(l&&(l=!1,o=a?Ze(i):i),o);let f;if(s){var d=Jt in t||Yu in t;f=(S=(x=jr(t,e))==null?void 0:x.set)!=null?S:d&&e in t?A=>t[e]=A:void 0}var h,p=!1;s?[h,p]=c0(()=>t[e]):h=t[e],h===void 0&&i!==void 0&&(h=u(),f&&(n&&CP(e),f(h)));var g;if(n?g=()=>{var A=t[e];return A===void 0?u():(l=!0,A)}:g=()=>{var A=t[e];return A!==void 0&&(o=void 0),A===void 0?o:A},n&&(r&4)===0)return g;if(f){var v=t.$$legacy;return(function(A,w){return arguments.length>0?((!n||!w||v||p)&&f(w?g():A),A):g()})}var b=!1,_=((r&1)!==0?Zs:Qa)(()=>(b=!1,g()));D&&(_.label=e),s&&F(_);var C=Q;return(function(A,w){if(arguments.length>0){let E=w?F(_):n&&s?et(A):A;return se(_,E),b=!0,o!==void 0&&(o=E),A}return oi&&b||(C.f&16384)!==0?_.v:F(_)})}m();m();m();function XR(t){return new Q0(t)}var ws,Oi,Q0=class{constructor(e){me(this,ws);me(this,Oi);var s,a;var r=new Map,i=(o,l)=>{var c=qa(l,!1,!1);return r.set(o,c),c};let n=new Proxy({...e.props||{},$$events:{}},{get(o,l){var c;return F((c=r.get(l))!=null?c:i(l,Reflect.get(o,l)))},has(o,l){var c;return l===Yu?!0:(F((c=r.get(l))!=null?c:i(l,Reflect.get(o,l))),Reflect.has(o,l))},set(o,l,c){var u;return se((u=r.get(l))!=null?u:i(l,c),c),Reflect.set(o,l,c)}});fe(this,Oi,(e.hydrate?j0:Js)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:(s=e.intro)!=null?s:!1,recover:e.recover,transformError:e.transformError})),!At&&(!((a=e==null?void 0:e.props)!=null&&a.$$host)||e.sync===!1)&&io(),fe(this,ws,n.$$events);for(let o of Object.keys($(this,Oi)))o==="$set"||o==="$destroy"||o==="$on"||or(this,o,{get(){return $(this,Oi)[o]},set(l){$(this,Oi)[o]=l},enumerable:!0});$(this,Oi).$set=o=>{Object.assign(n,o)},$(this,Oi).$destroy=()=>{gs($(this,Oi))}}$set(e){$(this,Oi).$set(e)}$on(e,r){$(this,ws)[e]=$(this,ws)[e]||[];let i=(...n)=>r.call(this,...n);return $(this,ws)[e].push(i),()=>{$(this,ws)[e]=$(this,ws)[e].filter(n=>n!==i)}}$destroy(){$(this,Oi).$destroy()}};ws=new WeakMap,Oi=new WeakMap;var UU;typeof HTMLElement=="function"&&(UU=class extends HTMLElement{constructor(e,r,i){super();He(this,"$$ctor");He(this,"$$s");He(this,"$$c");He(this,"$$cn",!1);He(this,"$$d",{});He(this,"$$r",!1);He(this,"$$p_d",{});He(this,"$$l",{});He(this,"$$l_u",new Map);He(this,"$$me");He(this,"$$shadowRoot",null);this.$$ctor=e,this.$$s=r,i&&(this.$$shadowRoot=this.attachShadow(i))}addEventListener(e,r,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){let n=this.$$c.$on(e,r);this.$$l_u.set(r,n)}super.addEventListener(e,r,i)}removeEventListener(e,r,i){if(super.removeEventListener(e,r,i),this.$$c){let n=this.$$l_u.get(r);n&&(n(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return s=>{let a=On("slot");n!=="default"&&(a.name=n),le(s,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},i=GU(this);for(let n of this.$$s)n in i&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),r.default=!0):r[n]=e(n));for(let n of this.attributes){let s=this.$$g_p(n.name);s in this.$$d||(this.$$d[s]=J0(s,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=XR({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=O0(()=>{sr(()=>{var n;this.$$r=!0;for(let s of Kw(this.$$c)){if(!((n=this.$$p_d[s])!=null&&n.reflect))continue;this.$$d[s]=this.$$c[s];let a=J0(s,this.$$d[s],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,a)}this.$$r=!1})});for(let n in this.$$l)for(let s of this.$$l[n]){let a=this.$$c.$on(n,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,r,i){var n;this.$$r||(e=this.$$g_p(e),this.$$d[e]=J0(e,i,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Kw(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function J0(t,e,r,i){var s;let n=(s=r[t])==null?void 0:s.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!i||!r[t])return e;if(i==="toAttribute")switch(n){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function GU(t){let e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}m();var ib=require("obsidian");m();var tb=require("obsidian");m();function jU(t){let e=t-1;return e*e*e+1}var eb=!1;function Un(t,{delay:e=0,duration:r=400,easing:i=jU,axis:n="y"}={}){let s=getComputedStyle(t);D&&!eb&&/(contents|inline|table)/.test(s.display)&&(eb=!0,Promise.resolve().then(()=>eb=!1),BP(s.display));let a=+s.opacity,o=n==="y"?"height":"width",l=parseFloat(s[o]),c=n==="y"?["top","bottom"]:["left","right"],u=c.map(b=>`${b[0].toUpperCase()}${b.slice(1)}`),f=parseFloat(s[`padding${u[0]}`]),d=parseFloat(s[`padding${u[1]}`]),h=parseFloat(s[`margin${u[0]}`]),p=parseFloat(s[`margin${u[1]}`]),g=parseFloat(s[`border${u[0]}Width`]),v=parseFloat(s[`border${u[1]}Width`]);return{delay:e,duration:r,easing:i,css:b=>`overflow: hidden;opacity: ${Math.min(b*20,1)*a};${o}: ${b*l}px;padding-${c[0]}: ${b*f}px;padding-${c[1]}: ${b*d}px;margin-${c[0]}: ${b*h}px;margin-${c[1]}: ${b*p}px;border-${c[0]}-width: ${b*g}px;border-${c[1]}-width: ${b*v}px;min-${o}: 0`}}m();var Lp=require("obsidian");var VU=_e('
'),zU=_e('
'),WU={hash:"svelte-1c0jiav",code:"main.svelte-1c0jiav .nav-file-title:where(.svelte-1c0jiav) {align-items:center;}"};function bf(t,e){lt(e,!0),on(t,WU);let r=et([]),i=ut(()=>e.view.leaf.getRoot().side=="left"?"right":"left");hr(()=>{for(let _ of r)_&&(0,Lp.setIcon)(_,_.getAttr("data-icon"))});function n(_){_.stopPropagation(),al(e.diff.path)?s(_):a(_)}function s(_){var x;_.stopPropagation();let C=e.view.app.vault.getAbstractFileByPath(e.diff.vaultPath);C instanceof Lp.TFile&&((x=Vi(e.view.app,_))==null||x.openFile(C).catch(S=>e.view.plugin.displayError(S)))}function a(_){var C;e.view.plugin.tools.openDiff({event:_,aFile:(C=e.diff.fromPath)!=null?C:e.diff.path,aRef:`${e.diff.hash}^`,bFile:e.diff.path,bRef:e.diff.hash})}var o=zU(),l=z(o),c=z(l),u=z(c,!0);V(c);var f=ie(c,2),d=z(f),h=z(d);{var p=_=>{var C=VU();at(C,x=>r[0]=x,()=>r==null?void 0:r[0]),ui("auxclick",C,s),ve("click",C,s),le(_,C)},g=ut(()=>ol(e.diff.vaultPath,e.view.app));Re(h,_=>{F(g)&&_(p)})}V(d);var v=ie(d,2),b=z(v,!0);V(v),V(f),V(l),V(o),je(_=>{Ce(l,"data-path",e.diff.vaultPath),Ce(l,"data-tooltip-position",F(i)),Ce(l,"aria-label",e.diff.vaultPath),qe(u,_),Ce(v,"data-type",e.diff.status),qe(b,e.diff.status)},[()=>xn(e.diff.vaultPath)]),ve("click",o,n),ui("auxclick",o,_=>{_.stopPropagation(),_.button==2?_n(e.view.app,_,e.diff.vaultPath,e.view.leaf,"git-history"):n(_)}),le(t,o),ct()}Pt(["click"]);m();var qU=_e("
"),YU=_e(''),ZU=_e('
'),KU=_e("
"),XU={hash:"svelte-d9h7mp",code:"main.svelte-d9h7mp .nav-folder-title-content:where(.svelte-d9h7mp) {display:flex;align-items:center;}"};function _f(t,e){lt(e,!0),on(t,XU);let r=Di(e,"topLevel",3,!1),i=Di(e,"closed",15),n=ut(()=>e.view.leaf.getRoot().side=="left"?"right":"left");function s(l,c){l.stopPropagation(),i(i()[c.path]=!i()[c.path],!0)}var a=KU();let o;hi(a,21,()=>e.hierarchy.children,di,(l,c)=>{var u=oo(),f=Mi(u);{var d=p=>{var g=qU(),v=z(g);bf(v,{get diff(){return F(c).data},get view(){return e.view}}),V(g),le(p,g)},h=p=>{var g=ZU();let v;var b=z(g),_=ie(z(b),2);let C;var x=ie(_,2),S=z(x,!0);V(x),V(b);var A=ie(b,2);{var w=E=>{var y=YU(),P=z(y);_f(P,{get hierarchy(){return F(c)},get plugin(){return e.plugin},get view(){return e.view},get closed(){return i()},set closed(T){i(T)}}),V(y),an(3,y,()=>Un,()=>({duration:150})),le(E,y)};Re(A,E=>{i()[F(c).path]||E(w)})}V(g),je(()=>{v=wt(g,1,"tree-item nav-folder",null,v,{"is-collapsed":i()[F(c).path]}),Ce(b,"data-tooltip-position",F(n)),Ce(b,"aria-label",F(c).vaultPath),C=wt(_,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,C,{"is-collapsed":i()[F(c).path]}),qe(S,F(c).title)}),ve("click",b,E=>s(E,F(c))),le(p,g)};Re(f,p=>{F(c).data?p(d):p(h,-1)})}le(l,u)}),V(a),je(()=>o=wt(a,1,"svelte-d9h7mp",null,o,{topLevel:r()})),le(t,a),ct()}Pt(["click"]);var QU=_e('
'),JU=_e('
'),eG=_e('
'),tG=_e(''),rG=_e('
'),iG={hash:"svelte-1edsiy5",code:""};function rb(t,e){lt(e,!0),on(t,iG);let r=ut(()=>({title:"",path:"",vaultPath:"",children:e.plugin.gitManager.getTreeStructure(e.log.diff.files)})),i=ut(()=>e.view.leaf.getRoot().side=="left"?"right":"left"),n=Oe(!0),s=Oe(et({}));function a(E){let y=E.author.name;return e.plugin.settings.authorInHistoryView=="full"?y:e.plugin.settings.authorInHistoryView=="initials"?y.split(" ").filter(T=>T.length>0).map(T=>T[0].toUpperCase()).join(""):""}var o=rG(),l=z(o);let c;var u=z(l),f=z(u);let d;var h=ie(f,2),p=z(h);{var g=E=>{var y=QU(),P=z(y,!0);V(y),je(T=>qe(P,T),[()=>e.log.refs.join(", ")]),le(E,y)};Re(p,E=>{e.log.refs.length>0&&E(g)})}var v=ie(p,2);{var b=E=>{var y=JU(),P=z(y,!0);V(y),je(T=>qe(P,T),[()=>a(e.log)]),le(E,y)};Re(v,E=>{var y;e.plugin.settings.authorInHistoryView!="hide"&&((y=e.log.author)!=null&&y.name)&&E(b)})}var _=ie(v,2);{var C=E=>{var y=eG(),P=z(y,!0);V(y),je(T=>qe(P,T),[()=>(0,tb.moment)(e.log.date).format(e.plugin.settings.commitDateFormat)]),le(E,y)};Re(_,E=>{e.plugin.settings.dateInHistoryView&&E(C)})}var x=ie(_,2),S=z(x,!0);V(x),V(h),V(u);var A=ie(u,2);{var w=E=>{var y=tG(),P=z(y);{var T=L=>{_f(L,{get hierarchy(){return F(r)},get plugin(){return e.plugin},get view(){return e.view},topLevel:!0,get closed(){return F(s)},set closed(H){se(s,H,!0)}})},I=L=>{var H=oo(),te=Mi(H);hi(te,17,()=>e.log.diff.files,di,(xe,Z)=>{bf(xe,{get view(){return e.view},get diff(){return F(Z)}})}),le(L,H)};Re(P,L=>{e.showTree?L(T):L(I,-1)})}V(y),an(3,y,()=>Un,()=>({duration:150})),le(E,y)};Re(A,E=>{F(n)||E(w)})}V(l),V(o),je(E=>{c=wt(l,1,"tree-item nav-folder",null,c,{"is-collapsed":F(n)}),Ce(u,"aria-label",E),Ce(u,"data-tooltip-position",F(i)),d=wt(f,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,d,{"is-collapsed":F(n)}),qe(S,e.log.message)},[()=>{var E;return`${e.log.refs.length>0?e.log.refs.join(", ")+` +`:""}${(E=e.log.author)==null?void 0:E.name} +${(0,tb.moment)(e.log.date).format(e.plugin.settings.commitDateFormat)} +${e.log.message}`}]),ve("click",u,()=>se(n,!F(n))),le(t,o),ct()}Pt(["click"]);var nG=_e(''),sG=_e('
'),aG={hash:"svelte-12n6twc",code:""};function nb(t,e){lt(e,!0),on(t,aG);let r=Di(e,"plugin",15),i=Oe(!1),n=et([]),s=Oe(void 0),a=Oe(et(r().settings.treeStructure)),o;hr(()=>{o&&o.empty()}),co(()=>{e.view.registerEvent(e.view.app.workspace.on("obsidian-git:head-change",()=>{c().catch(console.error)}))}),hr(()=>{n.forEach(x=>(0,ib.setIcon)(x,x.getAttr("data-icon")))}),co(()=>{let x=new IntersectionObserver(A=>{var w;(w=A[0])!=null&&w.isIntersecting&&!F(i)&&u().catch(console.error)}),S=activeDocument.querySelector("#sentinel");return S&&x.observe(S),()=>{x.disconnect()}}),c().catch(console.error);function l(){c().catch(console.error)}async function c(){var A,w;if(!r().gitReady){se(s,void 0);return}se(i,!0);let x=r().gitManager instanceof Se,S;((w=(A=F(s))==null?void 0:A.length)!=null?w:0)==0?S=x?50:10:S=F(s).length,se(s,await r().gitManager.log(void 0,!1,S),!0),se(i,!1)}async function u(){var w;if(!r().gitReady||F(s)===void 0)return;se(i,!0);let S=r().gitManager instanceof Se?50:10,A=await r().gitManager.log(void 0,!1,S,(w=F(s).last())==null?void 0:w.hash);F(s).push(...A.slice(1)),se(i,!1)}var f=sG(),d=z(f),h=z(d),p=z(h);at(p,x=>n[0]=x,()=>n==null?void 0:n[0]);var g=ie(p,2);let v;at(g,x=>n[1]=x,()=>n==null?void 0:n[1]),V(h),V(d);var b=ie(d,2),_=z(b);{var C=x=>{var S=nG();hi(S,21,()=>F(s),di,(A,w)=>{rb(A,{get view(){return e.view},get showTree(){return F(a)},get log(){return F(w)},get plugin(){return r()}})}),V(S),le(x,S)};Re(_,x=>{F(s)&&x(C)})}Va(4),V(b),V(f),je(()=>{Ce(p,"data-icon",F(a)?"list":"folder"),v=wt(g,1,"clickable-icon nav-action-button",null,v,{loading:F(i)})}),ve("click",p,()=>{se(a,!F(a)),(0,ib.setIcon)(n[0],F(a)?"list":"folder"),r(r().settings.treeStructure=F(a),!0),r().saveSettings()}),ve("click",g,l),le(t,f),ct()}Pt(["click"]);var yf=class extends QR.ItemView{constructor(e,r){super(e),this.plugin=r,this.hoverPopover=null}getViewType(){return wi.type}getDisplayText(){return wi.name}getIcon(){return wi.icon}onClose(){return this._view&&gs(this._view),super.onClose()}reload(){this._view&&gs(this._view),this._view=Js(nb,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};m();var JR=require("obsidian"),Np=class extends JR.FuzzySuggestModal{constructor(r,i){super(r.app);this.branches=i;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,i){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>window.setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};m();var r$=require("obsidian");m();var ho=require("obsidian");m();var xf=require("obsidian");m();var e$=require("obsidian");var hc=class extends e$.Modal{constructor({app:r,path:i,filesToDeleteCount:n,filesToDiscardCount:s}){super(r);this.resolve=null;this.path=i,this.deleteCount=n,this.discardCount=s}openAndGetResult(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let r=this.deleteCount+this.discardCount,{contentEl:i,titleEl:n}=this,s="";this.path!=""&&(r>1?s=`files in "${this.path}"`:s=`"${this.path}"`),n.setText(`${this.discardCount==0?"Delete":"Discard"} ${s}`),this.deleteCount>0&&i.createEl("p").setText(`Are you sure you want to DELETE the ${wu(this.deleteCount,"untracked file")}? They are deleted according to your Obsidian trash settting.`),this.discardCount>0&&i.createEl("p").setText(`Are you sure you want to discard ALL changes in ${wu(this.discardCount,"tracked file")}?`);let a=i.createDiv({cls:"modal-button-container"});if(this.deleteCount>0){let l=a.createEl("button",{cls:"mod-warning",text:`${this.discardCount>0?"Discard":"Delete"} all ${wu(r,"file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("delete"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("delete"),this.close()})}if(this.discardCount>0){let l=a.createEl("button",{cls:"mod-warning",text:`Discard all ${wu(this.discardCount,"tracked file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("discard"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("discard"),this.close()})}let o=a.createEl("button",{text:"Cancel"});o.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),o.addEventListener("keypress",()=>(this.resolve&&this.resolve(!1),this.close()))}onClose(){let{contentEl:r}=this;r.empty()}};var oG=_e('
'),lG=_e('
');function Ef(t,e){lt(e,!0);let r=et([]),i=ut(()=>e.view.leaf.getRoot().side=="left"?"right":"left");hr(()=>{for(let w of r)w&&(0,xf.setIcon)(w,w.getAttr("data-icon"))});function n(w){w.stopPropagation(),al(e.change.path)?a(w):l(w)}function s(w){e.view.app.vault.getAbstractFileByPath(e.change.vaultPath)&&ll(e.view.app,w,e.view,e.change.vaultPath)}function a(w){var y;w.stopPropagation();let E=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);E instanceof xf.TFile&&((y=Vi(e.view.app,w))==null||y.openFile(E).catch(P=>e.view.plugin.displayError(P)))}function o(w){w.stopPropagation(),e.manager.stage(e.change.path,!1).catch(E=>e.view.plugin.displayError(E)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}function l(w){w.stopPropagation(),e.view.plugin.tools.openDiff({aFile:e.change.path,aRef:"",event:w})}function c(w){w.stopPropagation();let E=e.change.workingDir=="U";new hc({app:e.view.app,filesToDeleteCount:E?1:0,filesToDiscardCount:E?0:1,path:e.change.vaultPath}).openAndGetResult().then(async y=>{if(y=="delete"){let P=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);P instanceof xf.TFile?await e.view.app.fileManager.trashFile(P):await e.view.app.vault.adapter.remove(e.change.vaultPath)}else y=="discard"&&await e.manager.discard(e.change.path).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")});e.view.app.workspace.trigger("obsidian-git:refresh")},y=>e.view.plugin.displayError(y))}var u=lG(),f=z(u),d=z(f),h=z(d,!0);V(d);var p=ie(d,2),g=z(p),v=z(g);{var b=w=>{var E=oG();at(E,y=>r[0]=y,()=>r==null?void 0:r[0]),ui("auxclick",E,a),ve("click",E,a),le(w,E)},_=ut(()=>ol(e.change.vaultPath,e.view.app));Re(v,w=>{F(_)&&w(b)})}var C=ie(v,2);at(C,w=>r[1]=w,()=>r==null?void 0:r[1]);var x=ie(C,2);at(x,w=>r[2]=w,()=>r==null?void 0:r[2]),V(g);var S=ie(g,2),A=z(S,!0);V(S),V(p),V(f),V(u),je(w=>{Ce(f,"data-path",e.change.vaultPath),Ce(f,"data-tooltip-position",F(i)),Ce(f,"aria-label",e.change.vaultPath),qe(h,w),Ce(S,"data-type",e.change.workingDir),qe(A,e.change.workingDir)},[()=>xn(e.change.vaultPath)]),ve("mouseover",u,s),ve("click",u,n),ui("auxclick",u,w=>{w.stopPropagation(),w.button==2?_n(e.view.app,w,e.change.vaultPath,e.view.leaf,"git-source-control"):n(w)}),ve("click",C,c),ve("click",x,o),le(t,u),ct()}Pt(["mouseover","click"]);m();var t$=require("obsidian");var cG=_e('
');function Sf(t,e){lt(e,!0);let r=ut(()=>e.view.leaf.getRoot().side=="left"?"right":"left");function i(d){e.view.app.vault.getAbstractFileByPath(e.change.vaultPath)&&ll(e.view.app,d,e.view,e.change.vaultPath)}function n(d){var p;d.stopPropagation();let h=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);h instanceof t$.TFile&&((p=Vi(e.view.app,d))==null||p.openFile(h).catch(g=>e.view.plugin.displayError(g)))}var s=cG(),a=z(s),o=z(a),l=z(o,!0);V(o);var c=ie(o,2),u=z(c),f=z(u,!0);V(u),V(c),V(a),V(s),je(d=>{Ce(a,"data-path",e.change.vaultPath),Ce(a,"data-tooltip-position",F(r)),Ce(a,"aria-label",e.change.vaultPath),qe(l,d),Ce(u,"data-type",e.change.workingDir),qe(f,e.change.workingDir)},[()=>xn(e.change.vaultPath)]),ve("mouseover",s,i),ve("click",s,n),ui("auxclick",s,d=>{d.stopPropagation(),d.button==2?_n(e.view.app,d,e.change.vaultPath,e.view.leaf,"git-source-control"):n(d)}),le(t,s),ct()}Pt(["mouseover","click"]);m();var Bp=require("obsidian");var uG=_e('
'),fG=_e('
');function kf(t,e){lt(e,!0);let r=et([]),i=ut(()=>e.view.leaf.getRoot().side=="left"?"right":"left");hr(()=>{for(let S of r)S&&(0,Bp.setIcon)(S,S.getAttr("data-icon"))});function n(S){S.stopPropagation(),al(e.change.path)?a(S):o(S)}function s(S){e.view.app.vault.getFileByPath(e.change.vaultPath)&&ll(e.view.app,S,e.view,e.change.vaultPath)}function a(S){var w;S.stopPropagation();let A=e.view.app.vault.getAbstractFileByPath(e.change.vaultPath);A instanceof Bp.TFile&&((w=Vi(e.view.app,S))==null||w.openFile(A).catch(E=>e.view.plugin.displayError(E)))}function o(S){var A;S.stopPropagation(),e.view.plugin.tools.openDiff({aFile:(A=e.change.from)!=null?A:e.change.path,bFile:e.change.path,aRef:"HEAD",bRef:"",event:S})}function l(S){S.stopPropagation(),e.manager.unstage(e.change.path,!1).catch(A=>e.view.plugin.displayError(A)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}var c=fG(),u=z(c),f=z(u),d=z(f,!0);V(f);var h=ie(f,2),p=z(h),g=z(p);{var v=S=>{var A=uG();at(A,w=>r[0]=w,()=>r==null?void 0:r[0]),ve("click",A,a),le(S,A)},b=ut(()=>ol(e.change.vaultPath,e.view.app));Re(g,S=>{F(b)&&S(v)})}var _=ie(g,2);at(_,S=>r[1]=S,()=>r==null?void 0:r[1]),V(p);var C=ie(p,2),x=z(C,!0);V(C),V(h),V(u),V(c),je(S=>{Ce(u,"data-path",e.change.vaultPath),Ce(u,"data-tooltip-position",F(i)),Ce(u,"aria-label",e.change.vaultPath),qe(d,S),Ce(C,"data-type",e.change.index),qe(x,e.change.index)},[()=>xn(e.change.vaultPath)]),ve("mouseover",c,s),ve("click",c,n),ui("auxclick",c,S=>{S.stopPropagation(),S.button==2?_n(e.view.app,S,e.change.vaultPath,e.view.leaf,"git-source-control"):n(S)}),ve("click",_,l),le(t,c),ct()}Pt(["mouseover","click"]);m();m();var dG=_e(''),hG=_e("
");function uo(t,e){lt(e,!0);var r=hG(),i=z(r);{var n=s=>{var a=dG(),o=z(a),l=z(o),c=z(l,!0);V(l),V(o),V(a),je(()=>{Ce(o,"aria-label","And "+(e.files.length-500)+" more files"),qe(c,"And "+(e.files.length-500)+" more files")}),le(s,a)};Re(i,s=>{e.files.length>500&&s(n)})}V(r),le(t,r),ct()}var mG=_e("
"),gG=_e('
'),vG=_e('
',1),wG=_e(''),bG=_e('
'),_G=_e("
");function fo(t,e){lt(e,!0);let r=Di(e,"topLevel",3,!1),i=Di(e,"closed",15);co(()=>{var h,p;for(let g of e.hierarchy.children)((p=(h=g.children)==null?void 0:h.length)!=null?p:0)>100&&i(i()[g.title]=!0,!0)});let n=ut(()=>e.view.leaf.getRoot().side=="left"?"right":"left");function s(h,p){h.stopPropagation(),e.plugin.gitManager.stageAll({dir:p}).catch(g=>e.plugin.displayError(g)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}function a(h,p){h.stopPropagation(),e.plugin.gitManager.unstageAll({dir:p}).catch(g=>e.plugin.displayError(g)).finally(()=>{e.view.app.workspace.trigger("obsidian-git:refresh")})}function o(h,p){h.stopPropagation(),e.plugin.discardAll(p.vaultPath)}function l(h,p){h.stopPropagation(),i(i()[p.path]=!i()[p.path],!0)}var c=_G();let u;var f=z(c);hi(f,17,()=>bu(e.hierarchy.children,500),di,(h,p)=>{var g=oo(),v=Mi(g);{var b=C=>{var x=mG(),S=z(x);{var A=y=>{kf(y,{get change(){return F(p).data},get manager(){return e.plugin.gitManager},get view(){return e.view}})},w=y=>{Ef(y,{get change(){return F(p).data},get manager(){return e.plugin.gitManager},get view(){return e.view}})},E=y=>{Sf(y,{get change(){return F(p).data},get view(){return e.view}})};Re(S,y=>{e.fileType==0?y(A):e.fileType==1?y(w,1):e.fileType==2&&y(E,2)})}V(x),le(C,x)},_=C=>{var x=bG();let S;var A=z(x),w=ie(z(A),2);let E;var y=ie(w,2),P=z(y,!0);V(y);var T=ie(y,2),I=z(T),L=z(I);{var H=K=>{var ce=gG();ve("click",ce,pe=>a(pe,F(p).path)),le(K,ce)},te=K=>{var ce=vG(),pe=Mi(ce),W=ie(pe,2);ve("click",pe,X=>o(X,F(p))),ve("click",W,X=>s(X,F(p).path)),le(K,ce)};Re(L,K=>{e.fileType==0?K(H):K(te,-1)})}Va(2),V(I),V(T),V(A);var xe=ie(A,2);{var Z=K=>{var ce=wG(),pe=z(ce);fo(pe,{get hierarchy(){return F(p)},get plugin(){return e.plugin},get view(){return e.view},get fileType(){return e.fileType},get closed(){return i()},set closed(W){i(W)}}),V(ce),an(3,ce,()=>Un,()=>({duration:150})),le(K,ce)};Re(xe,K=>{i()[F(p).path]||K(Z)})}V(x),je(()=>{S=wt(x,1,"tree-item nav-folder",null,S,{"is-collapsed":i()[F(p).path]}),Ce(A,"data-tooltip-position",F(n)),Ce(A,"aria-label",F(p).vaultPath),E=wt(w,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,E,{"is-collapsed":i()[F(p).path]}),qe(P,F(p).title)}),ui("auxclick",x,K=>_n(e.view.app,K,F(p).vaultPath,e.view.leaf,"git-source-control")),ve("click",A,K=>l(K,F(p))),le(C,x)};Re(v,C=>{F(p).data?C(b):C(_,-1)})}le(h,g)});var d=ie(f,2);uo(d,{get files(){return e.hierarchy.children}}),V(c),je(()=>u=wt(c,1,"",null,u,{topLevel:r()})),le(t,c),ct()}Pt(["click"]);var yG=_e('
'),sb=_e(" ",1),ab=_e(''),xG=_e('
'),EG=_e(''),SG=_e('
'),kG={hash:"svelte-5wq9p",code:`.commit-msg-input.svelte-5wq9p {width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field);}.git-commit-msg.svelte-5wq9p {position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto;}main.svelte-5wq9p .git-tools:where(.svelte-5wq9p) .files-count:where(.svelte-5wq9p) {padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center;}.nav-folder-title.svelte-5wq9p {align-items:center;}.git-commit-msg-clear-button.svelte-5wq9p {position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out;}.git-commit-msg-clear-button.svelte-5wq9p:after {content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,");mask-repeat:no-repeat;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat;}`};function ob(t,e){lt(e,!0),on(t,kG);let r=Di(e,"plugin",7),i=Di(e,"view",7),n=Oe(!1),s=Oe(void 0),a=Oe(et([])),o=ut(()=>r().settings.commitMessage),l=et([]),c=Oe(void 0),u=Oe(void 0),f=Oe(void 0),d=Oe(!0),h=Oe(!0),p=Oe(!0),g=Oe(0),v=Oe(et({})),b=Oe(et({})),_=Oe(et({})),C=ut(()=>r().settings.treeStructure);co(()=>{i().registerEvent(i().app.workspace.on("obsidian-git:loading-status",()=>se(n,!0))),i().registerEvent(i().app.workspace.on("obsidian-git:status-changed",()=>{A().catch(console.error)})),i().plugin.cachedStatus==null?i().plugin.refresh().catch(console.error):A().catch(console.error),i().scope=new ho.Scope(r().app.scope),i().scope.register(["Ctrl"],"Enter",O=>S())}),hr(()=>{l.forEach(O=>(0,ho.setIcon)(O,O.getAttr("data-icon")))}),hr(()=>{l.forEach(O=>{var ue,$e;!O||O.id!="push"||(ho.Platform.isMobile?(O.removeClass("button-border"),F(g)>0&&O.addClass("button-border")):((ue=O.firstElementChild)==null||ue.removeAttribute("color"),F(g)>0&&(($e=O.firstElementChild)==null||$e.setAttr("color","var(--text-accent)"))))})});function x(){if(se(n,!0),F(s)){let O=F(s).staged.length>0;r().promiseQueue.addTask(()=>r().commit({fromAuto:!1,commitMessage:F(o),onlyStaged:O}).then(()=>se(o,r().settings.commitMessage)).finally(w))}}function S(){if(se(n,!0),F(s)){let O=F(s).staged.length>0;r().promiseQueue.addTask(()=>r().commitAndSync({fromAutoBackup:!1,commitMessage:F(o),onlyStaged:O}).then(()=>{se(o,r().settings.commitMessage)}).finally(w))}}async function A(){if(!r().gitReady){se(s,void 0);return}if(se(g,await r().gitManager.getUnpushedCommits(),!0),se(s,r().cachedStatus,!0),se(n,!1),r().lastPulledFiles&&r().lastPulledFiles!=F(a)&&(se(a,r().lastPulledFiles,!0),se(f,{title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(F(a))},!0)),F(s)){let O=(ue,$e)=>ue.vaultPath.split("/").last().localeCompare(xn($e.vaultPath));F(s).changed.sort(O),F(s).staged.sort(O),se(c,{title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(F(s).changed)},!0),se(u,{title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(F(s).staged)},!0)}else se(c,void 0),se(u,void 0)}function w(){i().app.workspace.trigger("obsidian-git:refresh")}function E(O){O.stopPropagation(),se(n,!0),r().promiseQueue.addTask(()=>r().gitManager.stageAll({status:F(s)}).finally(w))}function y(O){O.stopPropagation(),se(n,!0),r().promiseQueue.addTask(()=>r().gitManager.unstageAll({status:F(s)}).finally(w))}function P(){se(n,!0),r().promiseQueue.addTask(()=>r().push().finally(w))}function T(){se(n,!0),r().promiseQueue.addTask(()=>r().pullChangesFromRemote().finally(w))}function I(O){O.stopPropagation(),r().discardAll()}let L=ut(()=>(F(o).match(/\n/g)||[]).length+1||1);var H=SG(),te=z(H),xe=z(te),Z=z(xe);at(Z,O=>l[0]=O,()=>l==null?void 0:l[0]);var K=ie(Z,2);at(K,O=>l[1]=O,()=>l==null?void 0:l[1]);var ce=ie(K,2);at(ce,O=>l[2]=O,()=>l==null?void 0:l[2]);var pe=ie(ce,2);at(pe,O=>l[3]=O,()=>l==null?void 0:l[3]);var W=ie(pe,2);at(W,O=>l[4]=O,()=>l==null?void 0:l[4]);var X=ie(W,2);at(X,O=>l[5]=O,()=>l==null?void 0:l[5]);var G=ie(X,2);at(G,O=>l[6]=O,()=>l==null?void 0:l[6]);var Be=ie(G,2);let pr;at(Be,O=>l[7]=O,()=>l==null?void 0:l[7]),V(xe),V(te);var Ut=ie(te,2),Ie=z(Ut);u0(Ie);var Rt=ie(Ie,2);{var $t=O=>{var ue=yG();Ce(ue,"aria-label","Clear"),ve("click",ue,()=>se(o,"")),le(O,ue)};Re(Rt,O=>{F(o)&&O($t)})}V(Ut);var Xe=ie(Ut,2),ee=z(Xe);{var N=O=>{var ue=EG(),$e=z(ue);let Gt;var Tr=z($e),go=z(Tr);let fb;var db=ie(go,4),Jp=z(db),hb=z(Jp);at(hb,mr=>l[8]=mr,()=>l==null?void 0:l[8]),V(Jp);var pb=ie(Jp,2),u$=z(pb,!0);V(pb),V(db),V(Tr);var f$=ie(Tr,2);{var d$=mr=>{var Pr=ab(),vo=z(Pr);{var bs=gr=>{fo(gr,{get hierarchy(){return F(u)},get plugin(){return r()},get view(){return i()},get fileType(){return 0},topLevel:!0,get closed(){return F(v)},set closed(Li){se(v,Li,!0)}})},wo=gr=>{var Li=sb(),ta=Mi(Li);hi(ta,17,()=>bu(F(s).staged,500),di,(_s,mc)=>{kf(_s,{get change(){return F(mc)},get view(){return i()},get manager(){return r().gitManager}})});var ra=ie(ta,2);uo(ra,{get files(){return F(s).staged}}),le(gr,Li)};Re(vo,gr=>{F(C)?gr(bs):gr(wo,-1)})}V(Pr),an(3,Pr,()=>Un,()=>({duration:150})),le(mr,Pr)};Re(f$,mr=>{F(h)&&mr(d$)})}V($e);var Af=ie($e,2);let mb;var Tf=z(Af),gb=z(Tf);let vb;var wb=ie(gb,4),em=z(wb),bb=z(em),_b=ie(bb,2);at(_b,mr=>l[9]=mr,()=>l==null?void 0:l[9]),V(em);var yb=ie(em,2),h$=z(yb,!0);V(yb),V(wb),V(Tf);var p$=ie(Tf,2);{var m$=mr=>{var Pr=ab(),vo=z(Pr);{var bs=gr=>{fo(gr,{get hierarchy(){return F(c)},get plugin(){return r()},get view(){return i()},get fileType(){return 1},topLevel:!0,get closed(){return F(b)},set closed(Li){se(b,Li,!0)}})},wo=gr=>{var Li=sb(),ta=Mi(Li);hi(ta,17,()=>bu(F(s).changed,500),di,(_s,mc)=>{Ef(_s,{get change(){return F(mc)},get view(){return i()},get manager(){return r().gitManager}})});var ra=ie(ta,2);uo(ra,{get files(){return F(s).changed}}),le(gr,Li)};Re(vo,gr=>{F(C)?gr(bs):gr(wo,-1)})}V(Pr),an(3,Pr,()=>Un,()=>({duration:150})),le(mr,Pr)};Re(p$,mr=>{F(d)&&mr(m$)})}V(Af);var g$=ie(Af,2);{var v$=mr=>{var Pr=xG();let vo;var bs=z(Pr),wo=ie(z(bs),4),gr=z(wo,!0);V(wo),V(bs);var Li=ie(bs,2);{var ta=ra=>{var _s=ab(),mc=z(_s);{var w$=bo=>{fo(bo,{get hierarchy(){return F(f)},get plugin(){return r()},get view(){return i()},get fileType(){return 2},topLevel:!0,get closed(){return F(_)},set closed(Pf){se(_,Pf,!0)}})},b$=bo=>{var Pf=sb(),xb=Mi(Pf);hi(xb,17,()=>F(a),di,(y$,x$)=>{Sf(y$,{get change(){return F(x$)},get view(){return i()}})});var _$=ie(xb,2);uo(_$,{get files(){return F(a)}}),le(bo,Pf)};Re(mc,bo=>{F(C)?bo(w$):bo(b$,-1)})}V(_s),an(3,_s,()=>Un,()=>({duration:150})),le(ra,_s)};Re(Li,ra=>{F(p)&&ra(ta)})}V(Pr),je(()=>{vo=wt(Pr,1,"pulled nav-folder",null,vo,{"is-collapsed":!F(p)}),qe(gr,F(a).length)}),ve("click",bs,()=>se(p,!F(p))),le(mr,Pr)};Re(g$,mr=>{F(a).length>0&&F(f)&&mr(v$)})}V(ue),je(()=>{Gt=wt($e,1,"staged tree-item nav-folder",null,Gt,{"is-collapsed":!F(h)}),fb=wt(go,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,fb,{"is-collapsed":!F(h)}),qe(u$,F(s).staged.length),mb=wt(Af,1,"changes tree-item nav-folder",null,mb,{"is-collapsed":!F(d)}),vb=wt(gb,1,"tree-item-icon nav-folder-collapse-indicator collapse-icon",null,vb,{"is-collapsed":!F(d)}),qe(h$,F(s).changed.length)}),ve("click",Tr,()=>se(h,!F(h))),ve("click",hb,y),ve("click",Tf,()=>se(d,!F(d))),ve("click",bb,I),ve("click",_b,E),le(O,ue)};Re(ee,O=>{F(s)&&F(u)&&F(c)&&O(N)})}V(Xe),V(H),je(()=>{Ce(H,"data-type",Xt.type),Ce(G,"data-icon",F(C)?"list":"folder"),pr=wt(Be,1,"clickable-icon nav-action-button",null,pr,{loading:F(n)}),Ce(Ie,"rows",F(L))}),ve("click",Z,S),ve("click",K,x),ve("click",ce,E),ve("click",pe,y),ve("click",W,P),ve("click",X,T),ve("click",G,()=>{se(C,!F(C)),(0,ho.setIcon)(l[6],F(C)?"list":"folder"),r().settings.treeStructure=F(C),r().saveSettings()}),ve("click",Be,w),Z0(Ie,()=>F(o),O=>se(o,O)),le(t,H),ct()}Pt(["click"]);var Cf=class extends r$.ItemView{constructor(e,r){super(e),this.plugin=r,this.hoverPopover=null}getViewType(){return Xt.type}getDisplayText(){return Xt.name}getIcon(){return Xt.icon}onClose(){return this._view&&gs(this._view),super.onClose()}reload(){this._view&&gs(this._view),this._view=Js(ob,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};m();var Hp=class{constructor(e,r){this.statusBarEl=e;this.plugin=r;this.statusBarEl.addClass("mod-clickable"),this.statusBarEl.onClickEvent(i=>{this.plugin.switchBranch().catch(n=>r.displayError(n))})}async display(){if(this.plugin.gitReady){let e=await this.plugin.gitManager.branchInfo();e.current!=null?this.statusBarEl.setText(e.current):this.statusBarEl.empty()}else this.statusBarEl.empty()}remove(){this.statusBarEl.remove()}};m();var i$=require("obsidian");var Up=class{constructor(e){this.plugin=e}get editor(){var i;let e=(i=this.plugin.app.workspace.activeEditor)==null?void 0:i.editor,r=e==null?void 0:e.cm;if(!(!e||!Wi.hasHunksData(r.state)))return{editor:r,obEditor:e}}get gitManager(){return this.plugin.gitManager}resetHunk(e){if(!this.editor)return;let{editor:r,obEditor:i}=this.editor,n=Wi.getHunk(r.state,!1,e);if(n){let s,a;n.type==="delete"?(s=n.added.start+1,a=n.added.start+1):(s=n.added.start-0,a=n.added.start-1+n.added.count);let o=r.state.doc.line(s).from,l=n.type==="delete"?r.state.doc.line(a).from:r.state.doc.line(a).to+1,c=n.removed.lines.join(` +`);n.removed.lines.length>0&&!n.removed.no_nl_at_eof&&(c+=` +`),i.replaceRange(c,i.offsetToPos(o),i.offsetToPos(l)),i.setSelection(i.offsetToPos(o))}}async stageHunk(e){if(!await this.plugin.isAllInitialized()||!this.editor)return;let{editor:r}=this.editor,i=Wi.getHunk(r.state,!1,e),n=!1;if(i||(i=Wi.getHunk(r.state,!0,e),n=!0),!i)return;let s=r.state.field(i$.editorInfoField).file.path,a=zt.createPatch(s,[i],"100644",n).join(` +`)+` +`;await this.gitManager.applyPatch(a),this.plugin.app.workspace.trigger("obsidian-git:refresh")}goToHunk(e){if(!this.editor)return;let{editor:r,obEditor:i}=this.editor,n=Wi.getHunks(r.state,!1),s=i.getCursor().line+1,a=zt.findNearestHunk(s,n,e,!0);if(a==null)return;let o=n[a];if(o){let l=o.added.start-1;i.setCursor(l,0),i.scrollIntoView({from:{line:l,ch:0},to:{line:l+1,ch:0}},!0)}}};m();m();var po=require("obsidian");var Gp=class{constructor(e){this.plg=e;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=e=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=e==null?void 0:e.view;!(r instanceof po.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),bT(()=>this.plg.settings.lineAuthor,e=>{this.plg.settings.lineAuthor=e,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;PT(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new _h(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(e){console.warn("Git: Error while loading line authoring feature.",e),this.deactivateFeature()}}deactivateFeature(){var e;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(e=this.lineAuthorInfoProvider)==null||e.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&po.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Se?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(HT),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let e of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(e);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.headChangeEvent=this.createHeadChangeEvent(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),ST(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.headChangeEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.gutterContextMenuEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.vault.offref(this.fileModificationEvent),this.plg.app.workspace.offref(this.headChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",e=>{var r;e&&((r=this.lineAuthorInfoProvider)==null||r.trackChanged(e).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(e,r)=>{var i;return e instanceof po.TFile&&((i=this.lineAuthorInfoProvider)==null?void 0:i.trackChanged(e))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",e=>{var r;return e instanceof po.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(e))})}createHeadChangeEvent(){return this.plg.app.workspace.on("obsidian-git:head-change",()=>{this.refreshLineAuthorViews()})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",AT)}};m();var pc=require("obsidian");m();m();var mo=require("@codemirror/state"),Vp=require("@codemirror/view");var jp=class extends Vp.GutterMarker{constructor(r,i){super();this.type=r;this.staged=i}toDOM(r){let i=createDiv();return i.className=`git-gutter-marker git-${this.type} ${this.staged?"staged":"unstaged"}`,this.type=="changedelete"&&i.setText("~"),i}},lb=mo.StateField.define({create:()=>mo.RangeSet.empty,update:(t,e)=>{let r=e.state.field(Gr,!1);if(!r)return mo.RangeSet.empty;let i=e.effects.some(s=>s.is(Oh)),n=e.effects.some(s=>s.is(Rl));if(i||n||(e.docChanged||t.size==0)&&r.isDirty==!1){let s=new Set,a=n$(e,r.hunks,!1,s),o=n$(e,r.stagedHunks,!0,s);return t=mo.RangeSet.of([...a,...o],!0),t}else e.docChanged&&(t=t.map(e.changes));return t}});function n$(t,e,r,i){let n=[];for(let a=0;a0?e[a-1]:void 0,l=a{var e;return(e=t.state.field(lb,!1))!=null?e:mo.RangeSet.empty},initialSpacer:t=>new jp("delete",!1),domEventHandlers:{click:(t,e,r)=>{var n;return((n=Wi.getHunkAtPos(t.state,e.from,!1))!=null?n:Wi.getHunkAtPos(t.state,e.from,!0))&&(zs(t,e.from),r.preventDefault()),!1}}});var zp=class{constructor(e){this.plugin=e}async trackChanged(e){return this.trackChangedHelper(e).catch(r=>(console.warn("Git: Error in trackChanged."+r),Promise.reject(r)))}async trackChangedHelper(e){if(e){if(e.path===void 0){console.warn("Git: Attempted to track change of undefined filepath. Unforeseen situation.");return}return this.computeSigns(e.path)}}destroy(){}async computeSigns(e){let i=await this.plugin.editorIntegration.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager.show("",e).catch(()=>{});this.notifySignComputationResultToSubscribers(e,{compareText:i,compareTextHead:void 0})}notifySignComputationResultToSubscribers(e,r){Si.ifFilepathDefinedTransformSubscribers(e,i=>i.forEach(n=>n.notifyGitCompare(r)))}},a$=[rP,iP,s$,lb,qh],o$=[Gr,Bu];m();var Wp=require("obsidian"),qp=class{constructor(e,r){this.statusBarEl=e;this.plugin=r;var i;e.addClass("git-changes-status-bar"),r.settings.hunks.statusBar==="colored"&&e.addClass("git-changes-status-bar-colored"),e.setAttr("aria-label","Git diff of the current editor"),this.statusBarEl.setAttribute("data-tooltip-position","top"),this.view=(i=r.app.workspace.getActiveViewOfType(Wp.MarkdownView))!=null?i:void 0,r.app.workspace.on("active-leaf-change",n=>{!n||n.getRoot()==r.app.workspace.rootSplit&&!(n.view instanceof Wp.MarkdownView)?this.statusBarEl.empty():n.view instanceof Wp.MarkdownView&&(this.view=n.view)})}display(e,r){var a;if(!this.view||((a=this.view.file)==null?void 0:a.path)!==(r==null?void 0:r.path))return;let i=0,n=0,s=0;for(let o of e)i+=Math.max(0,o.added.count-o.removed.count),n+=Math.min(o.added.count,o.removed.count),s+=Math.max(0,o.removed.count-o.added.count);this.statusBarEl.empty(),i>0&&this.statusBarEl.createSpan({text:`+${i} `,cls:"git-add"}),n>0&&this.statusBarEl.createSpan({text:`~${n} `,cls:"git-change"}),s>0&&this.statusBarEl.createSpan({text:`-${s}`,cls:"git-delete"})}remove(){this.statusBarEl.remove()}};var Yp=class{constructor(e){this.plg=e;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=e=>{if(!this.signsProvider){console.warn("Git: undefined signsProvider. Unexpected situation.");return}let r=e==null?void 0:e.view;!(r instanceof pc.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.signsProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions)}conditionallyActivateBySettings(){(this.plg.settings.hunks.showSigns||this.plg.settings.hunks.statusBar!="disabled"||this.plg.settings.hunks.hunkCommands)&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;if(this.signsProvider=new zp(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),this.plg.settings.hunks.statusBar!="disabled"){let e=this.plg.addStatusBarItem();this.changeStatusBar=new qp(e,this.plg)}}catch(e){console.warn("Git: Error while loading signs feature.",e),this.deactivateFeature()}}deactivateFeature(){var e,r;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(e=this.signsProvider)==null||e.destroy(),this.signsProvider=void 0,(r=this.changeStatusBar)==null||r.remove(),this.changeStatusBar=void 0}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&pc.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Se?this.plg.gitManager:void 0}}refresh(){this.signsProvider&&this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(o$),this.plg.settings.hunks.showSigns&&this.codeMirrorExtensions.push(...a$),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let e of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(e);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileRenameEvent=this.createFileRenameEvent(),this.pluginRefreshedEvent=this.createPluginRefreshedEvent(),this.intervalRefreshEvent=this.createIntervalRefreshEvent(),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileRenameEvent),this.plg.registerEvent(this.pluginRefreshedEvent),this.plg.registerInterval(this.intervalRefreshEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent),this.plg.app.workspace.offref(this.pluginRefreshedEvent),window.clearInterval(this.intervalRefreshEvent)}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(e,r)=>{var i;return Si.ifFilepathDefinedTransformSubscribers(r,n=>n.forEach(s=>{s.changeToNewFilepath(e.path)})),e instanceof pc.TFile&&((i=this.signsProvider)==null?void 0:i.trackChanged(e))})}createPluginRefreshedEvent(){return this.plg.app.workspace.on("obsidian-git:refreshed",()=>{this.refresh()})}createIntervalRefreshEvent(){return window.setInterval(()=>{var e,r;(e=this.plg.app.workspace.activeEditor)!=null&&e.file&&((r=this.signsProvider)==null||r.trackChanged(this.plg.app.workspace.activeEditor.file).catch(console.error))},10*1e3)}};m();var l$=require("@codemirror/state"),Zp=require("obsidian");var cb=class{constructor(e){this.state=e;this.subscribeMe()}notifyLineAuthoring(e,r){if(this.view===void 0){console.warn(`Git: View is not defined for editor cache key. Unforeseen situation. id: ${e}`);return}let i=this.view.state,n=wT(e,r,i);this.view.dispatch(n)}notifyGitCompare(e){if(this.view===void 0){console.warn("Git: View is not defined for editor cache key. Unforeseen situation. id: ");return}if(this.removeIfStale())return;let r=this.view.state,i=r.field(Gr);if(!i||i.compareText!=e.compareText||i.compareTextHead!=e.compareTextHead){let n=F2(e,r);this.view.dispatch(n)}}updateToNewState(e){return this.state=e,!this.lastSeenPath&&this.filepath&&this.subscribeMe(),this}removeIfStale(){var e;return((e=this.view)==null?void 0:e.state.field(ub,!1))!=this||this.view.destroyed?(this.unsubscribeMe(this.lastSeenPath),!0):!1}changeToNewFilepath(e){this.unsubscribeMe(this.lastSeenPath),this.subscribeMe(e)}subscribeMe(e){e!=null||(e=this.filepath),e!==void 0&&(Si.ifFilepathDefinedTransformSubscribers(e,r=>r.add(this)),this.lastSeenPath=e)}unsubscribeMe(e){Si.ifFilepathDefinedTransformSubscribers(e,r=>r.delete(this))}get filepath(){var e,r;return(r=(e=this.state.field(Zp.editorInfoField))==null?void 0:e.file)==null?void 0:r.path}get view(){return this.state.field(Zp.editorEditorField)}},ub=l$.StateField.define({create:t=>new cb(t),update:(t,e)=>t.updateToNewState(e.state),compare:(t,e)=>t===e});var Kp=class{constructor(e){this.plg=e;this.lineAuthoringFeature=new Gp(this.plg);this.signsFeature=new Yp(this.plg)}onUnloadPlugin(){this.lineAuthoringFeature.deactivateFeature(),this.signsFeature.deactivateFeature(),Si.clear()}onLoadPlugin(){Si.init(),this.plg.registerEditorExtension(ub),this.lineAuthoringFeature.onLoadPlugin(),this.signsFeature.onLoadPlugin()}onReady(){this.lineAuthoringFeature.conditionallyActivateBySettings(),this.signsFeature.conditionallyActivateBySettings()}activateLineAuthoring(){this.lineAuthoringFeature.activateFeature()}deactiveLineAuthoring(){this.lineAuthoringFeature.deactivateFeature()}refreshSignsSettings(){let e=this.plg.settings.hunks;e.showSigns||e.statusBar!="disabled"||e.hunkCommands?(this.signsFeature.deactivateFeature(),this.signsFeature.activateFeature()):this.signsFeature.deactivateFeature()}};var Xp=class extends ke.Plugin{constructor(){super(...arguments);this.automaticsManager=new Mu(this);this.tools=new qu(this);this.localStorage=new Yh(this);this.state={operation:0,offlineMode:!1};this.gitReady=!1;this.promiseQueue=new $d(this);this.intervalsToClear=[];this.editorIntegration=new Kp(this);this.hunkActions=new Up(this)}setPluginState(r){var i;this.state=Object.assign(this.state,r),(i=this.statusBar)==null||i.display()}async updateCachedStatus(){var r,i;return this.app.workspace.trigger("obsidian-git:loading-status"),this.cachedStatus=await this.gitManager.status(),this.cachedStatus.conflicted.length>0?(this.localStorage.setConflict(!0),await((r=this.branchBar)==null?void 0:r.display())):(this.localStorage.setConflict(!1),await((i=this.branchBar)==null?void 0:i.display())),this.app.workspace.trigger("obsidian-git:status-changed",this.cachedStatus),this.cachedStatus}async refresh(){if(!this.gitReady)return;let r=this.app.workspace.getLeavesOfType(Xt.type),i=this.app.workspace.getLeavesOfType(wi.type);(this.settings.changedFilesInStatusBar||r.some(n=>{var s;return!((s=n.isDeferred)!=null&&s)})||i.some(n=>{var s;return!((s=n.isDeferred)!=null&&s)}))&&await this.updateCachedStatus().catch(n=>this.displayError(n)),this.app.workspace.trigger("obsidian-git:refreshed")}refreshUpdatedHead(){}async onload(){console.log("loading "+this.manifest.name+" plugin: v"+this.manifest.version),It.plugin=this,this.localStorage.migrate(),await this.loadSettings(),await this.migrateSettings(),this.settingsTab=new yh(this.app,this),this.addSettingTab(this.settingsTab),this.localStorage.getPluginDisabled()||(this.registerStuff(),this.app.workspace.onLayoutReady(()=>this.init({fromReload:!1}).catch(r=>this.displayError(r))))}onExternalSettingsChange(){this.reloadSettings().catch(r=>this.displayError(r))}async reloadSettings(){let r=JSON.stringify(this.settings);await this.loadSettings();let i=JSON.stringify(this.settings);r!==i&&(this.log("Reloading settings"),this.unloadPlugin(),await this.init({fromReload:!0}),this.app.workspace.getLeavesOfType(Xt.type).forEach(n=>{var s;if(!((s=n.isDeferred)!=null&&s))return n.view.reload()}),this.app.workspace.getLeavesOfType(wi.type).forEach(n=>{var s;if(!((s=n.isDeferred)!=null&&s))return n.view.reload()}))}registerStuff(){this.registerEvent(this.app.workspace.on("obsidian-git:refresh",()=>{this.refresh().catch(r=>this.displayError(r))})),this.registerEvent(this.app.workspace.on("obsidian-git:head-change",()=>{this.refreshUpdatedHead()})),this.registerEvent(this.app.workspace.on("file-menu",(r,i,n)=>{this.handleFileMenu(r,i,n,"file-manu")})),this.registerEvent(this.app.workspace.on("obsidian-git:menu",(r,i,n)=>{this.handleFileMenu(r,i,n,"obsidian-git:menu")})),this.registerEvent(this.app.workspace.on("active-leaf-change",r=>{this.onActiveLeafChange(r)})),this.registerEvent(this.app.vault.on("modify",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("delete",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("create",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("rename",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerView(Xt.type,r=>new Cf(r,this)),this.registerView(wi.type,r=>new yf(r,this)),this.registerView(Ls.type,r=>new Ha(r,this)),this.registerView(Os.type,r=>new Ua(r,this)),this.addRibbonIcon("git-pull-request","Open Git source control",async()=>{var n;let r=this.app.workspace.getLeavesOfType(Xt.type),i;r.length===0?(i=(n=this.app.workspace.getRightLeaf(!1))!=null?n:this.app.workspace.getLeaf(),await i.setViewState({type:Xt.type})):i=r.first(),await this.app.workspace.revealLeaf(i)}),this.registerHoverLinkSource(Xt.type,{display:"Git View",defaultMod:!0}),this.editorIntegration.onLoadPlugin(),this.setRefreshDebouncer(),nP(this)}setRefreshDebouncer(){var r;(r=this.debRefresh)==null||r.cancel(),this.debRefresh=(0,ke.debounce)(()=>{this.settings.refreshSourceControl&&this.refresh().catch(console.error)},this.settings.refreshSourceControlTimer,!0)}async addFileToGitignore(r,i){let n=this.gitManager.getRelativeRepoPath(r,!0),s=ck({isFolder:i,gitRelativePath:n});await this.app.vault.adapter.append(this.gitManager.getRelativeVaultPath(".gitignore"),` +`+s),this.app.workspace.trigger("obsidian-git:refresh")}handleFileMenu(r,i,n,s){if(!this.gitReady||!this.settings.showFileMenu||!i)return;let a;if(typeof i=="string"?a=i:a=i.path,n=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{i instanceof ke.TFile?await this.stageFile(i):(await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(a,!0)}),this.app.workspace.trigger("obsidian-git:refresh"))})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{i instanceof ke.TFile?await this.unstageFile(i):(await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(a,!0)}),this.app.workspace.trigger("obsidian-git:refresh"))})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(a,i instanceof ke.TFolder).catch(c=>this.displayError(c))})})),n=="git-source-control"){r.addItem(l=>{l.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(c=>{this.addFileToGitignore(a,i instanceof ke.TFolder).catch(u=>this.displayError(u))})});let o=this.app.vault.adapter;s==="obsidian-git:menu"&&o instanceof ke.FileSystemAdapter&&(r.addItem(l=>{l.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(c=>{this.app.openWithDefaultApp(a)})}),r.addItem(l=>{l.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(c=>{window.electron.shell.showItemInFolder(c$.join(o.getBasePath(),a))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,i;this.gitReady=!1,this.editorIntegration.onUnloadPlugin(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(i=this.statusBar)==null||i.remove(),this.statusBar=void 0,this.branchBar=void 0,this.gitManager.unload(),this.promiseQueue.clear();for(let n of this.intervalsToClear)window.clearInterval(n);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=DS(pt,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return ke.Platform.isDesktopApp}async init({fromReload:r=!1}){var i;if(!this.localStorage.getPluginDisabled()){if(this.settings.showStatusBar&&!this.statusBar){let n=this.addStatusBarItem();this.statusBar=new xh(n,this),this.intervalsToClear.push(window.setInterval(()=>{var s;return(s=this.statusBar)==null?void 0:s.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Se(this),await this.gitManager.setGitInstance()):this.gitManager=new zi(this);let n=await this.gitManager.checkRequirements(),s=this.localStorage.getPausedAutomatics();switch(n){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new ke.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,ke.Platform.isDesktop&&this.settings.showBranchStatusBar&&!this.branchBar){let a=this.addStatusBarItem();this.branchBar=new Hp(a,this),this.intervalsToClear.push(window.setInterval(()=>{var o;(o=this.branchBar)==null?void 0:o.display().catch(console.error)},6e4))}await((i=this.branchBar)==null?void 0:i.display()),this.editorIntegration.onReady(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&!s&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),s||await this.automaticsManager.init(),s&&new ke.Notice("Automatic routines are currently paused.");break;default:this.log("Something weird happened. The 'checkRequirements' result is "+n)}}catch(n){this.displayError(n),console.error(n)}}}async createNewRepo(){try{await this.gitManager.init(),new ke.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let i=await new rt(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(i){let n="Vault Root",s=await new rt(this,{options:this.gitManager instanceof zi?[n]:[],placeholder:"Enter directory for clone. It needs to be empty or not existent.",allowEmpty:this.gitManager instanceof zi}).openAndGetResult();if(s==null)return;if(s===n&&(s="."),s=(0,ke.normalizePath)(s),s==="/"&&(s="."),s==="."){let f=await new rt(this,{options:["NO","YES"],placeholder:`Does your remote repo contain a ${this.app.vault.configDir} directory at the root?`,onlySelection:!0}).openAndGetResult();if(f===void 0){new ke.Notice("Aborted clone");return}else if(f==="YES"){let d="DELETE ALL YOUR LOCAL CONFIG AND PLUGINS";if(await new rt(this,{options:["Abort clone",d],placeholder:`To avoid conflicts, the local ${this.app.vault.configDir} directory needs to be deleted.`,onlySelection:!0}).openAndGetResult()===d)await this.app.vault.adapter.rmdir(this.app.vault.configDir,!0);else{new ke.Notice("Aborted clone");return}}}let a=await new rt(this,{placeholder:"Specify depth of clone. Leave empty for full clone.",allowEmpty:!0}).openAndGetResult(),o;if(a===void 0){new ke.Notice("Aborted clone");return}if(a!==""&&(o=parseInt(a),isNaN(o))){new ke.Notice("Invalid depth. Aborting clone.");return}new ke.Notice(`Cloning new repo into "${s}"`);let l=this.settings.basePath,c=s&&s!==".";c&&(this.settings.basePath=s);try{await this.gitManager.clone(uv(i),s,o),new ke.Notice("Cloned new repo."),new ke.Notice("Please restart Obsidian"),c&&await this.saveSettings()}catch(u){this.displayError(u),this.settings.basePath=l,await this.saveSettings()}}}async isAllInitialized(){return this.gitReady||await this.init({fromReload:!0}),this.gitReady}async pullChangesFromRemote(){if(!await this.isAllInitialized())return;let r=await this.pull();if(r!==!1){if(r||this.displayMessage("Pull: Everything is up-to-date"),this.gitManager instanceof Se){let i=await this.updateCachedStatus();i.conflicted.length>0&&(this.displayError(`You have conflicts in ${i.conflicted.length} ${i.conflicted.length==1?"file":"files"}`),await this.handleConflict(i.conflicted))}this.app.workspace.trigger("obsidian-git:refresh")}}async commitAndSync({fromAutoBackup:r,requestCustomMessage:i=!1,commitMessage:n,onlyStaged:s=!1}){!await this.isAllInitialized()||(this.settings.syncMethod=="reset"&&this.settings.pullBeforePush&&await this.pull(),!await this.commit({fromAuto:r,requestCustomMessage:i,commitMessage:n,onlyStaged:s}))||(this.settings.syncMethod!="reset"&&this.settings.pullBeforePush&&await this.pull(),this.settings.disablePush||(await this.remotesAreSet()&&await this.gitManager.canPush()?await this.push():this.displayMessage("No commits to push")))}async commit({fromAuto:r,requestCustomMessage:i=!1,onlyStaged:n=!1,commitMessage:s,amend:a=!1}){if(!await this.isAllInitialized())return!1;try{let o=this.localStorage.getConflict(),l,c=[],u=[];if(this.gitManager instanceof Se){if(await this.mayDeleteConflictFile(),l=await this.updateCachedStatus(),l.conflicted.length==0&&(o=!1),r&&l.conflicted.length>0)return this.displayError(`Did not commit, because you have conflicts in ${l.conflicted.length} ${l.conflicted.length==1?"file":"files"}. Please resolve them and commit per command.`),await this.handleConflict(l.conflicted),!1;c=l.staged,u=l.changed}else{if(r&&o)return this.displayError("Did not commit, because you have conflicts. Please resolve them and commit per command."),!1;{o&&await this.mayDeleteConflictFile();let f=this.gitManager;n?c=await f.getStagedFiles():u=(await f.getUnstagedFiles()).map(({path:h,type:p})=>({vaultPath:this.gitManager.getRelativeVaultPath(h),path:h,type:p}))}}if(await this.tools.hasTooBigFiles(n?c:[...c,...u]))return!1;if(u.length+c.length!==0||o){let f=s!=null?s:s=r?this.settings.autoCommitMessage:this.settings.commitMessage;if(r&&this.settings.customMessageOnAutoBackup||i){!this.settings.disablePopups&&r&&new ke.Notice("Auto backup: Please enter a custom commit message. Leave empty to abort");let p=await new Eh(this).openAndGetResult();if(p!=null&&p!=""&&p!="...")f=p;else return!1}else if(this.gitManager instanceof Se&&this.settings.commitMessageScript){let p=this.settings.commitMessageScript,g=this.localStorage.getHostname()||"",v=p.replace("{{hostname}}",g);v=v.replace("{{date}}",(0,ke.moment)().format(this.settings.commitDateFormat));let b="sh";if(ke.Platform.isWin){b=process.env.PROGRAMFILES+"\\Git\\bin\\sh.exe";let C=!1;try{await Qp.access(b,Qp.constants.X_OK),C=!0}catch(x){C=!1}if(!C)return this.displayError(`Cannot find sh.exe at ${b}. Please make sure Git is properly installed.`),!1}let _=await _u(b,["-c",v],{cwd:this.gitManager.absoluteRepoPath});_.code!=0?this.displayError(_.stderr):_.stdout.trim().length==0?this.displayMessage("Stdout from commit message script is empty. Using default message."):f=_.stdout}if(!f||f.trim()==="")return new ke.Notice("Commit aborted: No commit message provided"),!1;let d;n?d=await this.gitManager.commit({message:f,amend:a}):d=await this.gitManager.commitAll({message:f,status:l,unstagedFiles:u,amend:a}),this.gitManager instanceof Se&&await this.updateCachedStatus();let h=!1;d===void 0&&(h=!0,d=u.length+c.length||0),d===0?this.displayMessage("No changes to commit"):this.displayMessage(`Committed${h?" approx.":""} ${d} ${d==1?"file":"files"}`)}else this.displayMessage("No changes to commit");return this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(o){return this.displayError(o),!1}}async push(){if(!await this.isAllInitialized()||!await this.remotesAreSet())return!1;let r=this.localStorage.getConflict();try{this.gitManager instanceof Se&&await this.mayDeleteConflictFile();let i;if(this.gitManager instanceof Se&&(i=await this.updateCachedStatus()).conflicted.length>0)return this.displayError(`Cannot push. You have conflicts in ${i.conflicted.length} ${i.conflicted.length==1?"file":"files"}`),await this.handleConflict(i.conflicted),!1;if(this.gitManager instanceof zi&&r)return this.displayError("Cannot push. You have conflicts"),!1;this.settings.squashCommitsBeforePush&&this.gitManager instanceof Se&&await this.gitManager.squashAllUnpushedCommits(),this.log("Pushing....");let n=await this.gitManager.push();return n!==void 0&&(n===null?this.displayMessage("Pushed to remote"):n>0?this.displayMessage(`Pushed ${n} ${n==1?"file":"files"} to remote`):this.displayMessage("No commits to push")),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(i){return i instanceof nl?this.handleNoNetworkError(i):this.displayError(i),!1}}async pull(){if(!await this.remotesAreSet())return!1;try{this.log("Pulling....");let r=await this.gitManager.pull()||[];return this.setPluginState({offlineMode:!1}),r.length>0&&(this.displayMessage(`Pulled ${r.length} ${r.length==1?"file":"files"} from remote`),this.lastPulledFiles=r),r.length}catch(r){return this.displayError(r),!1}}async fetch(){if(await this.remotesAreSet())try{await this.gitManager.fetch(),this.displayMessage("Fetched from remote"),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh")}catch(r){this.displayError(r)}}async mayDeleteConflictFile(){let r=this.app.vault.getAbstractFileByPath(il);r&&(this.app.workspace.iterateAllLeaves(i=>{var n;i.view instanceof ke.MarkdownView&&((n=i.view.file)==null?void 0:n.path)==r.path&&i.detach()}),await this.app.vault.delete(r))}async stageFile(r){return await this.isAllInitialized()?(await this.gitManager.stage(r.path,!0),this.app.workspace.trigger("obsidian-git:refresh"),!0):!1}async unstageFile(r){return await this.isAllInitialized()?(await this.gitManager.unstage(r.path,!0),this.app.workspace.trigger("obsidian-git:refresh"),!0):!1}async switchBranch(){var n;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo(),i=await new Np(this,r.branches).openAndGetReslt();if(i!=null)return await this.gitManager.checkout(i),this.displayMessage(`Switched to ${i}`),this.app.workspace.trigger("obsidian-git:refresh"),await((n=this.branchBar)==null?void 0:n.display()),i}async switchRemoteBranch(){var s;if(!await this.isAllInitialized())return;let r=await this.selectRemoteBranch()||"",[i,n]=yn(r);if(n!=null&&i!=null)return await this.gitManager.checkout(n,i),this.displayMessage(`Switched to ${r}`),await((s=this.branchBar)==null?void 0:s.display()),r}async createBranch(){var i;if(!await this.isAllInitialized())return;let r=await new rt(this,{placeholder:"Create new branch"}).openAndGetResult();if(r!=null)return await this.gitManager.createBranch(r),this.displayMessage(`Created new branch ${r}`),await((i=this.branchBar)==null?void 0:i.display()),r}async deleteBranch(){var n;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo();r.current&&r.branches.remove(r.current);let i=await new rt(this,{options:r.branches,placeholder:"Delete branch",onlySelection:!0}).openAndGetResult();if(i!=null){let s=!1;if(!await this.gitManager.branchIsMerged(i)){let o=await new rt(this,{options:["YES","NO"],placeholder:"This branch isn't merged into HEAD. Force delete?",onlySelection:!0}).openAndGetResult();if(o!=="YES")return;s=o==="YES"}return await this.gitManager.deleteBranch(i,s),this.displayMessage(`Deleted branch ${i}`),await((n=this.branchBar)==null?void 0:n.display()),i}}async remotesAreSet(){return this.settings.updateSubmodules||this.gitManager instanceof Se&&await this.gitManager.getConfig("push.autoSetupRemote","all")=="true"||(await this.gitManager.branchInfo()).tracking?!0:(new ke.Notice("No upstream branch is set. Please select one."),await this.setUpstreamBranch())}async setUpstreamBranch(){let r=await this.selectRemoteBranch();return r==null?(this.displayError("Aborted. No upstream-branch is set!",1e4),!1):(await this.gitManager.updateUpstreamBranch(r),this.displayMessage(`Set upstream branch to ${r}`),!0)}async discardAll(r){if(!await this.isAllInitialized())return!1;let i=await this.gitManager.status({path:r}),n=0,s=0;for(let o of i.changed)o.workingDir=="U"?n++:s++;if(n+s==0)return!1;let a=await new hc({app:this.app,filesToDeleteCount:n,filesToDiscardCount:s,path:r!=null?r:""}).openAndGetResult();switch(a){case!1:return a;case"discard":await this.gitManager.discardAll({dir:r,status:this.cachedStatus});break;case"delete":{await this.gitManager.discardAll({dir:r,status:this.cachedStatus});let o=await this.gitManager.getUntrackedPaths({path:r,status:this.cachedStatus});for(let l of o){let c=this.gitManager.getRelativeVaultPath(l),u=this.app.vault.getAbstractFileByPath(c);u?await this.app.fileManager.trashFile(u):l.endsWith("/")?await this.app.vault.adapter.rmdir(c,!0):await this.app.vault.adapter.remove(c)}break}default:Nd(a)}return this.app.workspace.trigger("obsidian-git:refresh"),a}async handleConflict(r){this.localStorage.setConflict(!0);let i;r!==void 0&&(i=["# Conflicts","Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`","(This file will automatically be deleted before commit)","[[#Additional Instructions]] available below file list","",...r.map(n=>{let s=this.app.vault.getAbstractFileByPath(n);return s instanceof ke.TFile?`- [[${this.app.metadataCache.fileToLinktext(s,"/")}]]`:`- Not a file: ${n}`}),` +# Additional Instructions +I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text. + +\`\`\`diff +<<<<<<< HEAD + File changes in local repository +======= + File changes in remote repository +>>>>>>> origin/main +\`\`\``]),await this.tools.writeAndOpenFile(i==null?void 0:i.join(` +`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),n=await new rt(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(n){let s=await this.gitManager.getRemoteUrl(n),o=await new rt(this,{initialValue:s,placeholder:"Enter remote URL"}).openAndGetResult();if(o)return await this.gitManager.setRemote(n,uv(o)),n}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),i;r.length===0&&(i=await this.editRemotes(),i==null&&(r=await this.gitManager.getRemotes()));let n=new rt(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),s=i!=null?i:await n.openAndGetResult();if(s){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(s);let a=await this.gitManager.getRemoteBranches(s),l=await new rt(this,{options:a,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult();return l==null?void 0:l.startsWith(s+"/")?l:`${s}/${l}`}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),n=await new rt(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();n&&await this.gitManager.removeRemote(n)}onActiveLeafChange(r){var a,o;let i=r==null?void 0:r.view;if(!(i!=null&&i.getState().file)&&!(i instanceof Ha||i instanceof Ua))return;let n=this.app.workspace.getLeavesOfType(Xt.type).first(),s=this.app.workspace.getLeavesOfType(wi.type).first();if((a=n==null?void 0:n.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||a.removeClass("is-active"),(o=s==null?void 0:s.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof Ha||(r==null?void 0:r.view)instanceof Ua){let c=r.view.state.bFile.replace(/["\\]/g,"\\$&");this.lastDiffViewState=r.view.getState();let u;n&&r.view.state.aRef=="HEAD"?u=n.view.containerEl.querySelector(`div.staged div.tree-item-self[data-path="${c}"]`):n&&r.view.state.aRef==""?u=n.view.containerEl.querySelector(`div.changes div.tree-item-self[data-path="${c}"]`):s&&(u=s.view.containerEl.querySelector(`div.tree-item-self[data-path='${c}']`)),u==null||u.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({offlineMode:!0})}displayMessage(r,i=4*1e3){var n;(n=this.statusBar)==null||n.displayMessage(r.toLowerCase(),i),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new ke.Notice(r,5*1e3),this.log(r)}displayError(r,i=10*1e3){var s;if(r instanceof lu.UserCanceledError){new ke.Notice("Aborted");return}let n;r instanceof Error?n=r:n=new Error(String(r)),this.settings.showErrorNotices&&new ke.Notice(n.message,i),console.error(`${this.manifest.id}:`,n.stack),(s=this.statusBar)==null||s.displayMessage(n.message.toLowerCase(),i)}log(...r){console.log(`${this.manifest.id}:`,...r)}}; +/*! Bundled license information: + +ieee754/index.js: + (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) + +buffer/index.js: + (*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *) + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +crc-32/crc32.js: + (*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *) + +isomorphic-git/index.js: + (*! + * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements. + * SPDX-License-Identifier: LGPL-3.0-or-later + * Copyright (c) James Prevett and other ZenFS contributors. + * + * Windows support added: + * - Backslashes are normalised to forward slashes before processing. + * - Drive-letter prefixes (e.g. "C:") are detected and preserved through + * normalisation, so absolute Windows paths are handled correctly. + * - An absolute argument passed to join() resets the accumulated path, + * matching Node behaviour and handling worktree gitdir paths properly. + * + * Limitation: UNC paths (e.g. \\server\share) are not supported. The leading + * backslashes are normalised to forward slashes and then collapsed by + * normalizeString, losing the UNC root. Git on Windows works with + * drive-letter paths, so this is not expected to be a practical issue. + *) + +js-sha256/build/sha256.mjs: + (** + * [js-sha256]{@link https://github.com/emn178/js-sha256} + * + * @version 0.12.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2014-2026 + * @license MIT + *) +*/ + +/* nosourcemap */ \ No newline at end of file diff --git a/main/.obsidian/plugins/obsidian-git/manifest.json b/main/.obsidian/plugins/obsidian-git/manifest.json new file mode 100644 index 0000000..d4274a1 --- /dev/null +++ b/main/.obsidian/plugins/obsidian-git/manifest.json @@ -0,0 +1,10 @@ +{ + "author": "Vinzent", + "authorUrl": "https://github.com/Vinzent03", + "id": "obsidian-git", + "name": "Git", + "description": "Integrate Git version control with automatic backup and other advanced features.", + "isDesktopOnly": false, + "fundingUrl": "https://ko-fi.com/vinzent", + "version": "2.39.0" +} diff --git a/main/.obsidian/plugins/obsidian-git/obsidian_askpass.sh b/main/.obsidian/plugins/obsidian-git/obsidian_askpass.sh new file mode 100644 index 0000000..2e5eb5d --- /dev/null +++ b/main/.obsidian/plugins/obsidian-git/obsidian_askpass.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +PROMPT="$1" +TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT" + +cleanup() { + rm -f "$TEMP_FILE" "$TEMP_FILE.response" +} +trap cleanup EXIT + +echo "$PROMPT" > "$TEMP_FILE" + +while [ ! -e "$TEMP_FILE.response" ]; do + if [ ! -e "$TEMP_FILE" ]; then + echo "Trigger file got removed: Abort" >&2 + exit 1 + fi + sleep 0.1 +done + +RESPONSE=$(cat "$TEMP_FILE.response") + +echo "$RESPONSE" diff --git a/main/.obsidian/plugins/obsidian-git/styles.css b/main/.obsidian/plugins/obsidian-git/styles.css new file mode 100644 index 0000000..7dee885 --- /dev/null +++ b/main/.obsidian/plugins/obsidian-git/styles.css @@ -0,0 +1,705 @@ +@keyframes loading { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +.workspace-leaf-content[data-type="git-view"] .button-border { + border: 2px solid var(--interactive-accent); + border-radius: var(--radius-s); +} + +.workspace-leaf-content[data-type="git-view"] .view-content { + padding-left: 0; + padding-top: 0; + padding-right: 0; +} + +.workspace-leaf-content[data-type="git-history-view"] .view-content { + padding-left: 0; + padding-top: 0; + padding-right: 0; +} + +.loading { + overflow: hidden; +} + +.loading > svg { + animation: 2s linear infinite loading; + transform-origin: 50% 50%; + display: inline-block; +} + +.obsidian-git-center { + margin: auto; + text-align: center; + width: 50%; +} + +.obsidian-git-textarea { + display: block; + margin-left: auto; + margin-right: auto; +} + +.obsidian-git-disabled { + opacity: 0.5; +} + +.obsidian-git-center-button { + display: block; + margin: 20px auto; +} + +.tooltip.mod-left { + overflow-wrap: break-word; +} + +.tooltip.mod-right { + overflow-wrap: break-word; +} + +/* Limits the scrollbar to the view body */ +.git-view { + display: flex; + flex-direction: column; + position: relative; + height: 100%; +} + +/* Re-enable wrapping of nav buttns to prevent overflow on smaller screens #*/ +.workspace-drawer .git-view .nav-buttons-container { + flex-wrap: wrap; +} + +.git-tools { + display: flex; + margin-left: auto; +} +.git-tools .type { + padding-left: var(--size-2-1); + display: flex; + align-items: center; + justify-content: center; + width: 11px; +} + +.git-tools .type[data-type="M"] { + color: orange; +} +.git-tools .type[data-type="D"] { + color: red; +} +.git-tools .buttons { + display: flex; +} +.git-tools .buttons > * { + padding: 0; + height: auto; +} + +.workspace-leaf-content[data-type="git-view"] .tree-item-self, +.workspace-leaf-content[data-type="git-history-view"] .tree-item-self { + align-items: center; +} + +.workspace-leaf-content[data-type="git-view"] + .tree-item-self:hover + .clickable-icon, +.workspace-leaf-content[data-type="git-history-view"] + .tree-item-self:hover + .clickable-icon { + color: var(--icon-color-hover); +} + +/* Highlight an item as active if it's diff is currently opened */ +.is-active .git-tools .buttons > * { + color: var(--nav-item-color-active); +} + +.git-author { + color: var(--text-accent); +} + +.git-date { + color: var(--text-accent); +} + +.git-ref { + color: var(--text-accent); +} + +/* ====== diff2html ====== +The following styles are adapted from the obsidian-version-history plugin by +@kometenstaub https://github.com/kometenstaub/obsidian-version-history-diff/blob/main/src/styles.scss +which itself is adapted from the diff2html library with the following original license: + + https://github.com/rtfpessoa/diff2html/blob/master/LICENSE.md + + Copyright 2014-2016 Rodrigo Fernandes https://rtfpessoa.github.io/ + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit + persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +.theme-dark, +.theme-light { + --git-delete-bg: #ff475040; + --git-delete-hl: #96050a75; + --git-insert-bg: #68d36840; + --git-insert-hl: #23c02350; + --git-change-bg: #ffd55840; + --git-selected: #3572b0; + + --git-delete: #cc3333; + --git-insert: #399839; + --git-change: #d0b44c; + --git-move: #3572b0; +} + +.git-diff { + .d2h-d-none { + display: none; + } + .d2h-wrapper { + text-align: left; + border-radius: 0.25em; + overflow: auto; + } + .d2h-file-header.d2h-file-header { + background-color: var(--background-secondary); + border-bottom: 1px solid var(--background-modifier-border); + font-family: + Source Sans Pro, + Helvetica Neue, + Helvetica, + Arial, + sans-serif; + height: 35px; + padding: 5px 10px; + } + .d2h-file-header, + .d2h-file-stats { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + } + .d2h-file-header { + display: none; + } + .d2h-file-stats { + font-size: 14px; + margin-left: auto; + } + .d2h-lines-added { + border: 1px solid var(--color-green); + border-radius: 5px 0 0 5px; + color: var(--color-green); + padding: 2px; + text-align: right; + vertical-align: middle; + } + .d2h-lines-deleted { + border: 1px solid var(--color-red); + border-radius: 0 5px 5px 0; + color: var(--color-red); + margin-left: 1px; + padding: 2px; + text-align: left; + vertical-align: middle; + } + .d2h-file-name-wrapper { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-size: 15px; + width: 100%; + } + .d2h-file-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: var(--text-normal); + font-size: var(--h5-size); + } + .d2h-file-wrapper { + border: 1px solid var(--background-secondary-alt); + border-radius: 3px; + margin-bottom: 1em; + max-height: 100%; + } + .d2h-file-collapse { + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + border: 1px solid var(--background-secondary-alt); + border-radius: 3px; + cursor: pointer; + display: none; + font-size: 12px; + justify-content: flex-end; + padding: 4px 8px; + } + .d2h-file-collapse.d2h-selected { + background-color: var(--git-selected); + } + .d2h-file-collapse-input { + margin: 0 4px 0 0; + } + .d2h-diff-table { + border-collapse: collapse; + font-family: var(--font-monospace); + font-size: var(--code-size); + width: 100%; + } + .d2h-files-diff { + width: 100%; + } + .d2h-file-diff { + /* + overflow-y: scroll; + */ + border-radius: 5px; + font-size: var(--font-text-size); + line-height: var(--line-height-normal); + } + .d2h-file-side-diff { + display: inline-block; + margin-bottom: -8px; + margin-right: -4px; + overflow-x: scroll; + overflow-y: hidden; + width: 50%; + } + .d2h-code-line { + padding-left: 6em; + padding-right: 1.5em; + } + .d2h-code-line, + .d2h-code-side-line { + display: inline-block; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + white-space: nowrap; + width: 100%; + } + .d2h-code-side-line { + /* needed to be changed */ + padding-left: 0.5em; + padding-right: 0.5em; + } + .d2h-code-line-ctn { + word-wrap: normal; + background: none; + display: inline-block; + padding: 0; + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; + vertical-align: middle; + width: 100%; + /* only works for line-by-line */ + white-space: pre-wrap; + } + .d2h-code-line del, + .d2h-code-side-line del { + background-color: var(--git-delete-hl); + color: var(--text-normal); + } + .d2h-code-line del, + .d2h-code-line ins, + .d2h-code-side-line del, + .d2h-code-side-line ins { + border-radius: 0.2em; + display: inline-block; + margin-top: -1px; + text-decoration: none; + vertical-align: middle; + } + .d2h-code-line ins, + .d2h-code-side-line ins { + background-color: var(--git-insert-hl); + text-align: left; + } + .d2h-code-line-prefix { + word-wrap: normal; + background: none; + display: inline; + padding: 0; + white-space: pre; + } + .line-num1 { + float: left; + } + .line-num1, + .line-num2 { + -webkit-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + /* + padding: 0 0.5em; + */ + text-overflow: ellipsis; + width: 2.5em; + padding-left: 0; + } + .line-num2 { + float: right; + } + .d2h-code-linenumber { + background-color: var(--background-primary); + border: solid var(--background-modifier-border); + border-width: 0 1px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: var(--text-faint); + cursor: pointer; + display: inline-block; + position: absolute; + text-align: right; + width: 5.5em; + } + .d2h-code-linenumber:after { + content: "\200b"; + } + .d2h-code-side-linenumber { + background-color: var(--background-primary); + border: solid var(--background-modifier-border); + border-width: 0 1px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: var(--text-faint); + cursor: pointer; + overflow: hidden; + padding: 0 0.5em; + text-align: right; + text-overflow: ellipsis; + width: 4em; + /* needed to be changed */ + display: table-cell; + position: relative; + } + .d2h-code-side-linenumber:after { + content: "\200b"; + } + .d2h-code-side-emptyplaceholder, + .d2h-emptyplaceholder { + background-color: var(--background-primary); + border-color: var(--background-modifier-border); + } + .d2h-code-line-prefix, + .d2h-code-linenumber, + .d2h-code-side-linenumber, + .d2h-emptyplaceholder { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + .d2h-code-linenumber, + .d2h-code-side-linenumber { + direction: rtl; + } + .d2h-del { + background-color: var(--git-delete-bg); + border-color: var(--git-delete-hl); + } + .d2h-ins { + background-color: var(--git-insert-bg); + border-color: var(--git-insert-hl); + } + .d2h-info { + background-color: var(--background-primary); + border-color: var(--background-modifier-border); + color: var(--text-faint); + } + .d2h-del, + .d2h-ins, + .d2h-file-diff .d2h-change { + color: var(--text-normal); + } + .d2h-file-diff .d2h-del.d2h-change { + background-color: var(--git-change-bg); + } + .d2h-file-diff .d2h-ins.d2h-change { + background-color: var(--git-insert-bg); + } + .d2h-file-list-wrapper { + a { + text-decoration: none; + cursor: default; + -webkit-user-drag: none; + } + + svg { + display: none; + } + } + .d2h-file-list-header { + text-align: left; + } + .d2h-file-list-title { + display: none; + } + .d2h-file-list-line { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + text-align: left; + } + .d2h-file-list { + } + .d2h-file-list > li { + border-bottom: 1px solid var(--background-modifier-border); + margin: 0; + padding: 5px 10px; + } + .d2h-file-list > li:last-child { + border-bottom: none; + } + .d2h-file-switch { + cursor: pointer; + display: none; + font-size: 10px; + } + .d2h-icon { + fill: currentColor; + margin-right: 10px; + vertical-align: middle; + } + .d2h-deleted { + color: var(--git-delete); + } + .d2h-added { + color: var(--git-insert); + } + .d2h-changed { + color: var(--git-change); + } + .d2h-moved { + color: var(--git-move); + } + .d2h-tag { + background-color: var(--background-secondary); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-size: 10px; + margin-left: 5px; + padding: 0 2px; + } + .d2h-deleted-tag { + border: 1px solid var(--git-delete); + } + .d2h-added-tag { + border: 1px solid var(--git-insert); + } + .d2h-changed-tag { + border: 1px solid var(--git-change); + } + .d2h-moved-tag { + border: 1px solid var(--git-move); + } + + /* needed for line-by-line*/ + + .d2h-diff-tbody { + position: relative; + } + + /* My additions */ + .cm-merge-revert { + width: 4em; + } + /* Ensure that merge revert markers are positioned correctly */ + .cm-merge-revert > * { + position: absolute; + background-color: var(--background-secondary); + display: flex; + } +} + +/* ====================== Line Authoring Information ====================== */ + +.cm-gutterElement.obs-git-blame-gutter { + /* Add background color to spacing inbetween and around the gutter for better aesthetics */ + border-width: 0px 2px 0.2px; + border-style: solid; + border-color: var(--background-secondary); + background-color: var(--background-secondary); +} + +.cm-gutterElement.obs-git-blame-gutter > div, +.line-author-settings-preview { + /* delegate text color to settings */ + color: var(--obs-git-gutter-text); + font-family: monospace; + height: 100%; /* ensure, that age-based background color occupies entire parent */ + text-align: right; + padding: 0px 6px; + white-space: pre; /* Keep spaces and do not collapse them. */ +} + +@media (max-width: 800px) { + /* hide git blame gutter not to superpose text */ + .cm-gutterElement.obs-git-blame-gutter { + display: none; + } +} + +.git-unified-diff-view, +.git-split-diff-view .cm-deletedLine .cm-changedText { + background-color: #ee443330; +} + +.git-unified-diff-view, +.git-split-diff-view .cm-insertedLine .cm-changedText { + background-color: #22bb2230; +} + +.git-obscure-prompt[git-is-obscured="true"] #git-show-password:after { + -webkit-mask-image: url('data:image/svg+xml,'); +} + +.git-obscure-prompt[git-is-obscured="false"] #git-show-password:after { + -webkit-mask-image: url('data:image/svg+xml,'); +} + +/* Override styling of Codemirror merge view "collapsed lines" indicator */ +.git-split-diff-view .ͼ2 .cm-collapsedLines { + background: var(--interactive-normal); + border-radius: var(--radius-m); + color: var(--text-accent); + font-size: var(--font-small); + padding: var(--size-4-1) var(--size-4-1); +} +.git-split-diff-view .ͼ2 .cm-collapsedLines:hover { + background: var(--interactive-hover); + color: var(--text-accent-hover); +} + +.git-signs-gutter { + .cm-gutterElement { + display: grid; + + /* Needed to align the sign properly for different line heigts. Such as + * when having a heading or list item. + */ + padding-top: 0 !important; + } +} + +.git-gutter-marker:hover { + border-radius: 2px; +} + +.git-gutter-marker.git-add { + background-color: var(--color-green); + justify-self: center; + height: inherit; + width: 0.2rem; +} + +.git-gutter-marker.git-change { + background-color: var(--color-yellow); + justify-self: center; + height: inherit; + width: 0.2rem; +} + +.git-gutter-marker.git-changedelete { + color: var(--color-yellow); + font-weight: var(--font-bold); + font-size: 1rem; + justify-self: center; + height: inherit; +} + +.git-gutter-marker.git-delete { + background-color: var(--color-red); + height: 0.2rem; + width: 0.8rem; + align-self: end; +} + +.git-gutter-marker.git-topdelete { + background-color: var(--color-red); + height: 0.2rem; + width: 0.8rem; + align-self: start; +} + +div:hover > .git-gutter-marker.git-change { + width: 0.6rem; +} + +div:hover > .git-gutter-marker.git-add { + width: 0.6rem; +} + +div:hover > .git-gutter-marker.git-delete { + height: 0.6rem; +} + +div:hover > .git-gutter-marker.git-topdelete { + height: 0.6rem; +} + +div:hover > .git-gutter-marker.git-changedelete { + font-weight: var(--font-bold); +} + +.git-gutter-marker.staged { + opacity: 0.5; +} + +/* Prevent shifting of the editor when git signs gutter is the only gutter present */ +.cm-gutters.cm-gutters-before:has(> .git-signs-gutter:only-child) { + margin-inline-end: 0; + .git-signs-gutter { + margin-inline-start: -1rem; + } +} + +.git-changes-status-bar-colored { + .git-add { + color: var(--color-green); + } + .git-change { + color: var(--color-yellow); + } + .git-delete { + color: var(--color-red); + } +} + +.git-changes-status-bar .git-add { + margin-right: 0.3em; +} + +.git-changes-status-bar .git-change { + margin-right: 0.3em; +} diff --git a/main/.obsidian/plugins/obsidian-icon-folder/main.js b/main/.obsidian/plugins/obsidian-icon-folder/main.js new file mode 100644 index 0000000..271b2ff --- /dev/null +++ b/main/.obsidian/plugins/obsidian-icon-folder/main.js @@ -0,0 +1,7158 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ROLLUP +if you want to view the source visit the plugins github repository +*/ + +'use strict'; + +var obsidian = require('obsidian'); +var view = require('@codemirror/view'); +var state = require('@codemirror/state'); +var language = require('@codemirror/language'); + +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +const iconPacks$1 = { + faBrands: { + name: 'font-awesome-brands', + displayName: 'FontAwesome Brands', + path: 'fontawesome-free-6.5.1-web/svgs/brands/', + downloadLink: 'https://github.com/FortAwesome/Font-Awesome/releases/download/6.5.1/fontawesome-free-6.5.1-web.zip', + }, + faRegular: { + name: 'font-awesome-regular', + displayName: 'FontAwesome Regular', + path: 'fontawesome-free-6.5.1-web/svgs/regular/', + downloadLink: 'https://github.com/FortAwesome/Font-Awesome/releases/download/6.5.1/fontawesome-free-6.5.1-web.zip', + }, + faSolid: { + name: 'font-awesome-solid', + displayName: 'FontAwesome Solid', + path: 'fontawesome-free-6.5.1-web/svgs/solid/', + downloadLink: 'https://github.com/FortAwesome/Font-Awesome/releases/download/6.5.1/fontawesome-free-6.5.1-web.zip', + }, + remixIcons: { + name: 'remix-icons', + displayName: 'Remix Icons', + path: '', + downloadLink: 'https://github.com/Remix-Design/RemixIcon/releases/download/v4.2.0/RemixIcon_Svg_v4.2.0.zip', + }, + iconBrew: { + name: 'icon-brew', + displayName: 'Icon Brew', + path: '', + downloadLink: 'https://github.com/FlorianWoelki/obsidian-iconize/raw/main/iconPacks/icon-brew.zip', + }, + /** @source https://simpleicons.org/ */ + simpleIcons: { + name: 'simple-icons', + displayName: 'Simple Icons', + path: 'simple-icons-11.10.0/icons/', + downloadLink: 'https://github.com/simple-icons/simple-icons/archive/refs/tags/11.10.0.zip', + }, + lucide: { + name: 'lucide-icons', + displayName: 'Lucide', + path: '', + downloadLink: 'https://github.com/lucide-icons/lucide/releases/download/0.363.0/lucide-icons-0.363.0.zip', + }, + tablerIcons: { + name: 'tabler-icons', + displayName: 'Tabler Icons', + path: 'svg', + downloadLink: 'https://github.com/tabler/tabler-icons/releases/download/v3.1.0/tabler-icons-3.1.0.zip', + }, + /** @source https://boxicons.com/ */ + boxicons: { + name: 'boxicons', + displayName: 'Boxicons', + path: 'svg', + downloadLink: 'https://github.com/FlorianWoelki/obsidian-iconize/raw/main/iconPacks/boxicons.zip', + }, + /** @source http://nagoshiashumari.github.io/Rpg-Awesome/ */ + rpgAwesome: { + name: 'rpg-awesome', + displayName: 'RPG Awesome', + path: '', + downloadLink: 'https://github.com/FlorianWoelki/obsidian-iconize/raw/main/iconPacks/rpg-awesome.zip', + }, + /** @source https://coolicons.cool/ */ + coolicons: { + name: 'coolicons', + displayName: 'Coolicons', + path: 'cooliocns SVG', + downloadLink: 'https://github.com/krystonschwarze/coolicons/releases/download/v4.1/coolicons.v4.1.zip', + }, + /** @source https://feathericons.com/ */ + feathericons: { + name: 'feather-icons', + displayName: 'Feather Icons', + path: 'feather-4.29.1/icons/', + downloadLink: 'https://github.com/feathericons/feather/archive/refs/tags/v4.29.1.zip', + }, + /** @source https://github.com/primer/octicons */ + octicons: { + name: 'octicons', + displayName: 'Octicons', + path: 'octicons-19.8.0/icons/', + downloadLink: 'https://github.com/primer/octicons/archive/refs/tags/v19.8.0.zip', + }, +}; +/** + * Returns a possible path to the icon pack. + * @param name String of the icon pack name. + * @returns String of the path to the icon pack or undefined if the icon pack does not + * exist. + */ +const getExtraPath = (iconPackName) => { + var _a; + const path = (_a = Object.values(iconPacks$1).find((iconPack) => iconPack.name === iconPackName)) === null || _a === void 0 ? void 0 : _a.path; + return (path === null || path === void 0 ? void 0 : path.length) === 0 ? undefined : path; +}; + +// This library file does not include any other dependency and is a standalone file that +// only include utility functions for manipulating or extracting svg information. +/** + * Extracts an SVG string from a given input string and returns a cleaned up and + * formatted SVG string. + * @param svgString SVG string to extract from. + * @returns Cleaned up and formatted SVG string. + */ +const extract = (svgString) => { + var _a, _b; + // Removes unnecessary spaces and newlines. + svgString = svgString.replace(/(\r\n|\n|\r)/gm, ''); + svgString = svgString.replace(/>\s+<'); + // Create a parser for better parsing of HTML. + const parser = new DOMParser(); + const svg = parser + .parseFromString(svgString, 'text/html') + .querySelector('svg'); + // Removes `width` and `height` from the `style` attribute. + if (svg.hasAttribute('style')) { + svg.style.width = ''; + svg.style.height = ''; + } + // Add `viewbox`, if it is not already a attribute. + if (svg.viewBox.baseVal.width === 0 && svg.viewBox.baseVal.height === 0) { + const width = (_a = svg.width.baseVal.value) !== null && _a !== void 0 ? _a : 16; + const height = (_b = svg.height.baseVal.value) !== null && _b !== void 0 ? _b : 16; + svg.viewBox.baseVal.width = width; + svg.viewBox.baseVal.height = height; + } + if (!svg.hasAttribute('fill')) { + svg.setAttribute('fill', 'currentColor'); + } + const possibleTitle = svg.querySelector('title'); + if (possibleTitle) { + possibleTitle.remove(); + } + svg.setAttribute('width', '16px'); + svg.setAttribute('height', '16px'); + return svg.outerHTML; +}; +/** + * Sets the font size of an SVG string by modifying its width and/or height attributes. + * The font size will be always set in pixels. + * @param svgString SVG string to modify. + * @param fontSize Font size in pixels to set. + * @returns Modified SVG string. + */ +const setFontSize = (svgString, fontSize) => { + const widthRe = new RegExp(/width="[\d.]+(px)?"/); + const heightRe = new RegExp(/height="[\d.]+(px)?"/); + if (svgString.match(widthRe)) { + svgString = svgString.replace(widthRe, `width="${fontSize}px"`); + } + if (svgString.match(heightRe)) { + svgString = svgString.replace(heightRe, `height="${fontSize}px"`); + } + return svgString; +}; +/** + * Replaces the fill or stroke color of an SVG string with a given color. + * @param svgString SVG string to modify. + * @param color Color to set. Defaults to 'currentColor'. + * @returns The modified SVG string. + */ +const colorize = (svgString, color) => { + if (!color) { + color = 'currentColor'; + } + const parser = new DOMParser(); + // Tries to parse the string into a HTML node. + const parsedNode = parser.parseFromString(svgString, 'text/html'); + const svg = parsedNode.querySelector('svg'); + if (svg) { + if (svg.hasAttribute('fill') && svg.getAttribute('fill') !== 'none') { + svg.setAttribute('fill', color); + } + else if (svg.hasAttribute('stroke') && + svg.getAttribute('stroke') !== 'none') { + svg.setAttribute('stroke', color); + } + return svg.outerHTML; + } + return svgString; +}; +var svg = { + extract, + colorize, + setFontSize, +}; + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function commonjsRequire(path) { + throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} + +var jszip_min = {exports: {}}; + +/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/ + +var hasRequiredJszip_min; + +function requireJszip_min () { + if (hasRequiredJszip_min) return jszip_min.exports; + hasRequiredJszip_min = 1; + (function (module, exports) { + !function(e){module.exports=e();}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof commonjsRequire&&commonjsRequire;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h);}return o[r].exports}for(var l="function"==typeof commonjsRequire&&commonjsRequire,e=0;e>2,s=(3&t)<<4|r>>4,a=1>6:64,o=2>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l};},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i;}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o;},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate");},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e;}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return -1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t.charCodeAt(a))];return -1^e}(0|t,e,e.length,0):0};},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null;},{}],6:[function(e,t,r){var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n};},{lie:37}],7:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={};}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1);},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0);},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null;},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta});};},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})};},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function A(e,t){var r,n="";for(r=0;r>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}));},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=!0;},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i;},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)};},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b";},{}],24:[function(e,t,r){var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e;}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta});},t.exports=s;},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e);},t.exports=s;},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}i.prototype.processChunk.call(this,e);},t.exports=s;},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat();},function(e){t.error(e);});}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null;},s.prototype.resume=function(){return !!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0));},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return !1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t);}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s;},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null;}n.prototype={push:function(e){this.emit("data",e);},end:function(){if(this.isFinished)return !1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(e){this.emit("error",e);}return !0},error:function(e){return !this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},t.exports=n;},{}],29:[function(e,t,r){var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter");}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t);}).on("error",function(e){n=[],r(e);}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t>10&1023,a[r++]=56320|1023&n);}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length);}else t=this.leftOver.concat(t);this.leftOver=null;}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta});},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta});},s.Utf8EncodeWorker=l;},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r>10&1023,o[n++]=56320|1023&i);}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t};},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e;}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return -1^e};},{}],46:[function(e,t,r){var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return (e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0));}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm);}function U(e,t){e.pending_buf[e.pending++]=t;}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t;}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f;}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else {var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1;}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73);}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91);}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103);}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0e.lookahead&&(e.match_length=e.lookahead);}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else {if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0;}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30;}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3;}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else {if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2;}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3;}else {for(z=_+7;l>>=_)),u>>>=7,l-=7;}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k;}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window;}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]];}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255;}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o));}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8);}(e);};},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0;};},{}],54:[function(e,t,r){(function(e){!function(r,n){if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e);});}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1;},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*");}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data);},function(e){t.port2.postMessage(e);}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null;},s.appendChild(t);}):function(e){setTimeout(c,0,e);},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r __awaiter(void 0, void 0, void 0, function* () { + const fetched = yield obsidian.requestUrl({ url }); + const bytes = fetched.arrayBuffer; + return bytes; +}); +/** + * Transforms a JSZip file into a File object. + * @param file JSZip file to transform. + * @returns File object of the JSZip file. + */ +const getFileFromJSZipFile = (file) => __awaiter(void 0, void 0, void 0, function* () { + const fileData = yield file.async('blob'); + const filename = file.name.split('/').pop(); + return new File([fileData], filename); +}); +/** + * Read a zip file and return the files inside it. + * @param bytes ArrayBuffer of the zip file. + * @param extraPath String path to filter the files inside the zip file. This can be used + * to set an extra path (like a directory inside the zip file) to filter the files. + * @returns Array of loaded files inside the zip file. + */ +const readZipFile = (bytes_1, ...args_1) => __awaiter(void 0, [bytes_1, ...args_1], void 0, function* (bytes, extraPath = '') { + const unzippedFiles = yield jszip_minExports.loadAsync(bytes); + return Promise.resolve(unzippedFiles).then((unzipped) => { + if (!Object.keys(unzipped.files).length) { + return Promise.reject('No file was found'); + } + const files = []; + // Regex for retrieving the files inside the zip file or inside the directory of a + // zip file. + const regex = new RegExp(extraPath + '(.+)\\.svg', 'g'); + Object.entries(unzippedFiles.files).forEach(([_, v]) => { + const matched = v.name.match(regex); + if (!v.dir && matched && matched.length > 0) { + files.push(v); + } + }); + return files; + }); +}); + +const PLUGIN_NAME = 'iconize'; +const TITLE_ICON_CLASS = 'iconize-title-icon'; +const INLINE_TITLE_WRAPPER_CLASS = 'iconize-inline-title-wrapper'; +/** + * The name of the attribute that is used to store the icon name in the node. + * The value of this attributes contains the prefix and the name of the icon. + */ +const ICON_ATTRIBUTE_NAME = 'data-icon'; +var config = { + PLUGIN_NAME, + TITLE_ICON_CLASS, + INLINE_TITLE_WRAPPER_CLASS, + ICON_ATTRIBUTE_NAME, +}; + +var LoggerPrefix; +(function (LoggerPrefix) { + LoggerPrefix["Outline"] = "Outline"; +})(LoggerPrefix || (LoggerPrefix = {})); +class ConsoleLogger { + constructor(projectPrefix, enabled = false) { + this.logLevels = { + log: { label: 'LOG:' }, + info: { label: 'INFO:' }, + warn: { label: 'WARN:' }, + error: { label: 'ERROR:' }, + }; + this.projectPrefix = projectPrefix; + this.enabled = enabled; + } + formatMessage(level, message, prefix, optionalParams) { + const timestamp = new Date().toISOString(); + const { label } = this.logLevels[level]; + const prefixAsStr = !prefix ? '' : `/${prefix}`; + return [ + `${this.projectPrefix}${prefixAsStr}: [${timestamp}] ${label} ${message}`, + ...optionalParams, + ]; + } + log(message, prefix, ...optionalParams) { + if (this.enabled) { + console.log(...this.formatMessage('log', message, prefix, optionalParams)); + } + } + info(message, prefix, ...optionalParams) { + if (this.enabled) { + console.info(...this.formatMessage('info', message, prefix, optionalParams)); + } + } + warn(message, prefix, ...optionalParams) { + if (this.enabled) { + console.warn(...this.formatMessage('warn', message, prefix, optionalParams)); + } + } + error(message, prefix, ...optionalParams) { + if (this.enabled) { + console.error(...this.formatMessage('error', message, prefix, optionalParams)); + } + } + toggleLogging(enabled) { + this.enabled = enabled; + } +} +const logger = new ConsoleLogger(config.PLUGIN_NAME); + +const LUCIDE_ICON_PACK_NAME = 'lucide-icons'; +let path; +const getPath = () => { + return path; +}; +const setPath = (newPath) => { + if (newPath === 'plugins/obsidian-icon-folder/icons') { + newPath = '.obsidian/plugins/obsidian-icon-folder/icons'; + new obsidian.Notice(`[${config.PLUGIN_NAME}] Due to a change in version v1.2.2, the icon pack folder changed. Please change it in the settings to not be directly in /plugins.`, 8000); + } + path = newPath; +}; +let preloadedIcons = []; +const getPreloadedIcons = () => { + return preloadedIcons; +}; +const resetPreloadedIcons = () => { + preloadedIcons = []; +}; +let iconPacks = []; +const addLucideIconsPack = (plugin) => { + iconPacks.push({ + name: LUCIDE_ICON_PACK_NAME, + prefix: 'Li', + custom: false, + icons: plugin.doesUseNativeLucideIconPack() + ? obsidian.getIconIds() + .map((iconId) => iconId.replace(/^lucide-/, '')) + .map((iconId) => { + const iconEl = obsidian.getIcon(iconId); + iconEl.removeClass('svg-icon'); // Removes native `svg-icon` class. + return { + name: getNormalizedName(iconId), + filename: iconId, + prefix: 'Li', + svgElement: iconEl === null || iconEl === void 0 ? void 0 : iconEl.outerHTML, + svgContent: iconEl === null || iconEl === void 0 ? void 0 : iconEl.innerHTML, + svgViewbox: '', + iconPackName: LUCIDE_ICON_PACK_NAME, + }; + }) + : [], + }); +}; +const addCustomLucideIconPack = (plugin) => __awaiter(void 0, void 0, void 0, function* () { + const iconPackIndex = iconPacks.findIndex((iconPack) => iconPack.name === LUCIDE_ICON_PACK_NAME); + if (iconPackIndex > -1) { + iconPacks.splice(iconPackIndex); + } + const iconPack = iconPacks$1['lucide']; + const arrayBuffer = yield downloadZipFile(iconPack.downloadLink); + yield createZipFile(plugin, `${iconPack.name}.zip`, arrayBuffer); + yield registerIconPack(iconPack.name, arrayBuffer); +}); +const removeCustomLucideIconPack = (plugin) => __awaiter(void 0, void 0, void 0, function* () { + const iconPackIndex = iconPacks.findIndex((iconPack) => iconPack.name === LUCIDE_ICON_PACK_NAME); + if (iconPackIndex > -1) { + iconPacks.splice(iconPackIndex); + } + yield deleteIconPack(plugin, LUCIDE_ICON_PACK_NAME); +}); +const moveIconPackDirectories = (plugin, from, to) => __awaiter(void 0, void 0, void 0, function* () { + // Tries to move all icon packs to the new folder. + for (let i = 0; i < iconPacks.length; i++) { + const iconPack = iconPacks[i]; + if (yield plugin.app.vault.adapter.exists(`${from}/${iconPack.name}`)) { + // Tries to create a new directory in the new path. + const doesDirExist = yield createDirectory(plugin, iconPack.name); + if (doesDirExist) { + new obsidian.Notice(`Directory with name ${iconPack.name} already exists.`); + continue; + } + } + new obsidian.Notice(`Moving ${iconPack.name}...`); + // Move the zip file. + if (yield plugin.app.vault.adapter.exists(`${from}/${iconPack.name}.zip`)) { + yield plugin.app.vault.adapter.copy(`${from}/${iconPack.name}.zip`, `${to}/${iconPack.name}.zip`); + } + // Move all other files inside of the iconpack directory. + const filesInDirectory = yield getFilesInDirectory(plugin, `${from}/${iconPack.name}`); + for (const file of filesInDirectory) { + const fileName = file.split('/').pop(); + yield plugin.app.vault.adapter.copy(`${from}/${iconPack.name}/${fileName}`, `${to}/${iconPack.name}/${fileName}`); + } + new obsidian.Notice(`...moved ${iconPack.name}`); + } + // Removes all the existing icon packs in the `from` directory. + for (let i = 0; i < iconPacks.length; i++) { + const iconPack = iconPacks[i]; + if (yield plugin.app.vault.adapter.exists(`${from}/${iconPack.name}`)) { + yield plugin.app.vault.adapter.rmdir(`${from}/${iconPack.name}`, true); + } + } + // Remove root directory that contains all the icon packs. + if (!to.startsWith(from)) { + yield plugin.app.vault.adapter.rmdir(`${from}`, true); + } +}); +const createCustomIconPackDirectory = (plugin, dir) => __awaiter(void 0, void 0, void 0, function* () { + yield createDirectory(plugin, dir); + const prefix = createIconPackPrefix(dir); + iconPacks.push({ name: dir, icons: [], prefix, custom: true }); +}); +const deleteIconPack = (plugin, dir) => __awaiter(void 0, void 0, void 0, function* () { + iconPacks = iconPacks.filter((iconPack) => iconPack.name !== dir); + // Check for the icon pack directory and delete it. + if (yield plugin.app.vault.adapter.exists(`${path}/${dir}`)) { + yield plugin.app.vault.adapter.rmdir(`${path}/${dir}`, true); + } + // Check for the icon pack zip file and delete it. + if (yield plugin.app.vault.adapter.exists(`${path}/${dir}.zip`)) { + yield plugin.app.vault.adapter.remove(`${path}/${dir}.zip`); + } +}); +const doesIconPackExist = (plugin, iconPackName) => { + return plugin.app.vault.adapter.exists(`${path}/${iconPackName}`); +}; +const createDirectory = (plugin, dir) => __awaiter(void 0, void 0, void 0, function* () { + const doesDirExist = yield plugin.app.vault.adapter.exists(`${path}/${dir}`); + if (!doesDirExist) { + yield plugin.app.vault.adapter.mkdir(`${path}/${dir}`); + } + return doesDirExist; +}); +const getNormalizedName = (s) => { + return s + .split(/[ -]|[ _]/g) + .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) + .join(''); +}; +// export const normalizeFileName = async (plugin: Plugin, oldPath: string) => { +// const fileName = oldPath.split('/').pop(); +// const newPath = oldPath.substring(0, oldPath.indexOf(fileName)) + getNormalizedName(fileName); +// await plugin.app.vault.adapter.rename(oldPath, newPath); +// }; +const createZipFile = (plugin, filename, buffer) => __awaiter(void 0, void 0, void 0, function* () { + yield plugin.app.vault.adapter.writeBinary(`${path}/${filename}`, buffer); +}); +const createFile = (plugin, iconPackName, filename, content, absoluteFilename) => __awaiter(void 0, void 0, void 0, function* () { + const normalizedFilename = getNormalizedName(filename); + const exists = yield plugin.app.vault.adapter.exists(`${path}/${iconPackName}/${normalizedFilename}`); + if (exists) { + const folderSplit = absoluteFilename.split('/'); + if (folderSplit.length >= 2) { + const folderName = folderSplit[folderSplit.length - 2]; + const newFilename = folderName + normalizedFilename; + yield plugin.app.vault.adapter.write(`${path}/${iconPackName}/${newFilename}`, content); + logger.info(`Renamed old file ${normalizedFilename} to ${newFilename} due to duplication`); + new obsidian.Notice(`[${config.PLUGIN_NAME}] Renamed ${normalizedFilename} to ${newFilename} to avoid duplication.`, 8000); + } + else { + logger.warn(`Could not create icons with duplicated file names (file name: ${normalizedFilename})`); + new obsidian.Notice(`[${config.PLUGIN_NAME}] Could not create duplicated icon name (${normalizedFilename})`, 8000); + } + } + else { + yield plugin.app.vault.adapter.write(`${path}/${iconPackName}/${normalizedFilename}`, content); + } +}); +const createDefaultDirectory = (plugin) => __awaiter(void 0, void 0, void 0, function* () { + yield createDirectory(plugin, ''); +}); +const getAllIconPacks = () => { + return iconPacks; +}; +const getFilesInDirectory = (plugin, dir) => __awaiter(void 0, void 0, void 0, function* () { + if (!(yield plugin.app.vault.adapter.exists(dir))) { + return []; + } + return (yield plugin.app.vault.adapter.list(dir)).files; +}); +const validIconName = /^[(A-Z)|(0-9)]/; +const svgViewboxRegex = /viewBox="([^"]*)"/g; +const svgContentRegex = /(.*?)<\/svg>/g; +const generateIcon = (iconPackName, iconName, content) => { + if (content.length === 0) { + return; + } + content = content.replace(/(\r\n|\n|\r)/gm, ''); + content = content.replace(/>\s+<'); + const normalizedName = iconName.charAt(0).toUpperCase() + iconName.substring(1); + if (!validIconName.exec(normalizedName)) { + logger.info(`Skipping icon with invalid name: ${iconName}`); + return null; + } + const svgViewboxMatch = content.match(svgViewboxRegex); + let svgViewbox = ''; + if (svgViewboxMatch && svgViewboxMatch.length !== 0) { + svgViewbox = svgViewboxMatch[0]; + } + const svgContentMatch = content.match(svgContentRegex); + if (!svgContentMatch) { + logger.info(`Skipping icon with invalid svg content: ${iconName}`); + return null; + } + const svgContent = svgContentMatch.map((val) => val.replace(/<\/?svg>/g, '').replace(//g, ''))[0]; + const iconPackPrefix = createIconPackPrefix(iconPackName); + const icon = { + name: normalizedName.split('.svg')[0], + prefix: iconPackPrefix, + iconPackName, + filename: iconName, + svgContent, + svgViewbox, + svgElement: svg.extract(content), + }; + return icon; +}; +const createIconPackPrefix = (iconPackName) => { + if (iconPackName.includes('-')) { + const splitted = iconPackName.split('-'); + let result = splitted[0].charAt(0).toUpperCase(); + for (let i = 1; i < splitted.length; i++) { + result += splitted[i].charAt(0).toLowerCase(); + } + return result; + } + return (iconPackName.charAt(0).toUpperCase() + iconPackName.charAt(1).toLowerCase()); +}; +const loadUsedIcons = (plugin, icons) => __awaiter(void 0, void 0, void 0, function* () { + const iconPacks = (yield listPath(plugin)).folders.map((iconPack) => iconPack.split('/').pop()); + if (plugin.doesUseNativeLucideIconPack()) { + iconPacks.push(LUCIDE_ICON_PACK_NAME); + } + for (let i = 0; i < icons.length; i++) { + const entry = icons[i]; + if (!entry) { + continue; + } + yield loadIcon(plugin, iconPacks, entry); + } +}); +const listPath = (plugin, listPath) => { + return plugin.app.vault.adapter.list(path); +}; +const getIconPackNameByPrefix = (prefix) => { + var _a; + return (_a = iconPacks.find((iconPack) => iconPack.prefix === prefix)) === null || _a === void 0 ? void 0 : _a.name; +}; +const nextIdentifier = (iconName) => { + return iconName.substring(1).search(/[(A-Z)|(0-9)]/) + 1; +}; +const loadIcon = (plugin, iconPackNames, iconName) => __awaiter(void 0, void 0, void 0, function* () { + const nextLetter = nextIdentifier(iconName); + const prefix = iconName.substring(0, nextLetter); + const name = iconName.substring(nextLetter); + const iconPack = iconPackNames.find((folder) => { + const folderPrefix = createIconPackPrefix(folder); + return prefix === folderPrefix; + }); + if (!iconPack) { + // Ignore because background check automatically adds the icons and icon pack + // directories. + if (!plugin.getSettings().iconsBackgroundCheckEnabled) { + new obsidian.Notice(`Seems like you do not have an icon pack installed. (${iconName})`, 5000); + } + return; + } + if (iconPack === LUCIDE_ICON_PACK_NAME && + plugin.doesUseNativeLucideIconPack()) { + // Native lucide icons already exist for Obsidian. + const lucideIcons = iconPacks.find((iconPack) => iconPack.name === LUCIDE_ICON_PACK_NAME); + const icon = lucideIcons.icons.find((icon) => icon.name === name); + if (!icon) { + logger.warn(`Icon ${icon} does not exist in the native Lucide icon pack.`); + return; + } + preloadedIcons.push(icon); + return; + } + const fullPath = path + '/' + iconPack + '/' + name + '.svg'; + if (!(yield plugin.app.vault.adapter.exists(fullPath))) { + logger.info(`Icon with name '${name}' was not found (full path: ${fullPath})`); + return; + } + const content = yield plugin.app.vault.adapter.read(fullPath); + const icon = generateIcon(iconPack, name, content); + preloadedIcons.push(icon); +}); +const initIconPacks = (plugin) => __awaiter(void 0, void 0, void 0, function* () { + // Remove the beginning slash because paths which start with `/` are the same as without + // a slash. + if (path.startsWith('/')) { + path = path.slice(1); + } + const loadedIconPacks = yield plugin.app.vault.adapter.list(path); + // Extract all zip files which will be downloaded icon packs. + const zipFiles = {}; + for (let i = 0; i < loadedIconPacks.files.length; i++) { + const fileName = loadedIconPacks.files[i]; + if (fileName.endsWith('.zip')) { + const arrayBuffer = yield plugin.app.vault.adapter.readBinary(fileName); + const files = yield readZipFile(arrayBuffer); + const iconPackName = fileName.split('/').pop().split('.zip')[0]; + zipFiles[iconPackName] = files; + } + } + // Check for custom-made icon packs. + for (let i = 0; i < loadedIconPacks.folders.length; i++) { + const folderName = loadedIconPacks.folders[i].split('/').pop(); + // Continue if the icon pack does have a zip file. + if (zipFiles[folderName]) { + continue; + } + const files = yield getFilesInDirectory(plugin, `${path}/${folderName}`); + const loadedIcons = []; + // Convert files into loaded svgs. + for (let j = 0; j < files.length; j++) { + const iconNameRegex = files[j].match(new RegExp(path + '/' + folderName + '/(.*)')); + const iconName = getNormalizedName(iconNameRegex[1]); + const iconContent = yield plugin.app.vault.adapter.read(files[j]); + const icon = generateIcon(folderName, iconName, iconContent); + if (icon) { + loadedIcons.push(icon); + } + } + const prefix = createIconPackPrefix(folderName); + if (!iconPacks.some((iconPack) => iconPack.name === folderName)) { + iconPacks.push({ + name: folderName, + icons: loadedIcons, + prefix, + custom: true, + }); + logger.info(`Loaded icon pack '${folderName}' (amount of icons: ${loadedIcons.length})`); + } + } + // Extract all files from the zip files. + for (const zipFile in zipFiles) { + const files = zipFiles[zipFile]; + const loadedIcons = yield getLoadedIconsFromZipFile(zipFile, files); + const prefix = createIconPackPrefix(zipFile); + if (zipFile === LUCIDE_ICON_PACK_NAME && + !plugin.doesUseCustomLucideIconPack()) { + continue; + } + if (!iconPacks.some((iconPack) => iconPack.name === zipFile)) { + iconPacks.push({ + name: zipFile, + icons: loadedIcons, + prefix, + custom: false, + }); + logger.info(`Loaded icon pack '${zipFile}' (amount of icons: ${loadedIcons.length})`); + } + } +}); +const getLoadedIconsFromZipFile = (iconPackName, files) => __awaiter(void 0, void 0, void 0, function* () { + const loadedIcons = []; + const extraPath = getExtraPath(iconPackName); + for (let j = 0; j < files.length; j++) { + // Checks if the icon pack has an extra path. Also ignores files which do not start + // with the extra path. + if (extraPath && !files[j].name.startsWith(extraPath)) { + continue; + } + const file = yield getFileFromJSZipFile(files[j]); + const iconContent = yield file.text(); + const iconName = getNormalizedName(file.name); + const icon = generateIcon(iconPackName, iconName, iconContent); + if (icon) { + loadedIcons.push(icon); + } + } + return loadedIcons; +}); +const addIconToIconPack = (iconPackName, iconName, iconContent) => { + // Normalize the icon name to remove `-` or `_` in the name. + iconName = getNormalizedName(iconName); + const icon = generateIcon(iconPackName, iconName, iconContent); + if (!icon) { + logger.warn(`Icon could not be generated (icon: ${iconName}, content: ${iconContent})`); + return undefined; + } + const iconPack = iconPacks.find((iconPack) => iconPack.name === iconPackName); + if (!iconPack) { + logger.warn(`Iconpack with name '${iconPackName}' was not found`); + return undefined; + } + iconPack.icons.push(icon); + return icon; +}; +const removeIconFromIconPackDirectory = (plugin, iconPackName, iconName) => { + const iconPack = iconPacks.find((iconPack) => iconPack.name === iconPackName); + // Checks if icon pack is custom-made. + if (!iconPack.custom) { + return plugin.app.vault.adapter.rmdir(`${path}/${iconPackName}/${iconName}.svg`, true); + } +}; +const extractIconToIconPack = (plugin, icon, iconContent) => __awaiter(void 0, void 0, void 0, function* () { + const doesIconPackDirExist = yield plugin.app.vault.adapter.exists(`${path}/${icon.iconPackName}`); + if (!doesIconPackDirExist) { + yield plugin.app.vault.adapter.mkdir(`${path}/${icon.iconPackName}`); + } + const doesIconFileExists = yield plugin.app.vault.adapter.exists(`${path}/${icon.iconPackName}/${icon.name}.svg`); + if (!doesIconFileExists) { + yield createFile(plugin, icon.iconPackName, `${icon.name}.svg`, iconContent); + } +}); +const getAllLoadedIconNames = () => { + return iconPacks.reduce((total, iconPack) => { + total.push(...iconPack.icons); + return total; + }, []); +}; +const registerIconPack = (name, arrayBuffer) => __awaiter(void 0, void 0, void 0, function* () { + const files = yield readZipFile(arrayBuffer); + const loadedIcons = yield getLoadedIconsFromZipFile(name, files); + const prefix = createIconPackPrefix(name); + iconPacks.push({ name, icons: loadedIcons, prefix, custom: false }); + logger.info(`Loaded icon pack ${name} (amount of icons: ${loadedIcons.length})`); +}); +const doesIconExists = (iconName) => { + const icons = getAllLoadedIconNames(); + return (icons.find((icon) => icon.name === iconName || icon.prefix + icon.name === iconName) !== undefined); +}; +const getIconsFromIconPack = (iconPackName) => { + return iconPacks.find((iconPack) => iconPack.name === iconPackName); +}; +const getIconFromIconPack = (iconPackName, iconPrefix, iconName) => { + const foundIcon = preloadedIcons.find((icon) => icon.prefix.toLowerCase() === iconPrefix.toLowerCase() && + icon.name.toLowerCase() === iconName.toLowerCase()); + if (foundIcon) { + return foundIcon; + } + const iconPack = iconPacks.find((iconPack) => iconPack.name === iconPackName); + if (!iconPack) { + return undefined; + } + return iconPack.icons.find((icon) => getNormalizedName(icon.name) === iconName); +}; +const getSvgFromLoadedIcon = (iconPrefix, iconName) => { + let icon = ''; + let foundIcon = preloadedIcons.find((icon) => icon.prefix.toLowerCase() === iconPrefix.toLowerCase() && + icon.name.toLowerCase() === iconName.toLowerCase()); + if (!foundIcon) { + iconPacks.forEach((iconPack) => { + const icon = iconPack.icons.find((icon) => { + return (icon.prefix.toLowerCase() === iconPrefix.toLowerCase() && + getNormalizedName(icon.name).toLowerCase() === iconName.toLowerCase()); + }); + if (icon) { + foundIcon = icon; + } + }); + } + if (foundIcon) { + icon = foundIcon.svgElement; + } + return icon; +}; + +/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */ +var twemoji=function(){var twemoji={base:"https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){if(this.parentNode){this.parentNode.replaceChild(createText(this.alt,false),this);}},parse:parse,replace:replace,test:test},escaper={"&":"&","<":"<",">":">","'":"'",'"':"""},re=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u26d3\ufe0f\u200d\ud83d\udca5|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udf44\u200d\ud83d\udfeb|\ud83c\udf4b\u200d\ud83d\udfe9|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc26\u200d\ud83d\udd25|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83d\ude42\u200d\u2194\ufe0f|\ud83d\ude42\u200d\u2195\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b|\ud83d\udc26\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|\ud83e\udef0|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c\udfc3|\ud83d\udeb6|\ud83e\uddce)(?:\ud83c[\udffb-\udfff])?(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udf85\udfc2\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4\udeb5\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd\uddcf\uddd1-\udddd\udec3-\udec5\udef1-\udef8]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedc-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude7c\ude80-\ude88\ude90-\udebd\udebf-\udec2\udece-\udedb\udee0-\udee8]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,UFE0Fg=/\uFE0F/g,U200D=String.fromCharCode(8205),rescaper=/[&<>'"]/g,shouldntBeParsed=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,fromCharCode=String.fromCharCode;return twemoji;function createText(text,clean){return document.createTextNode(clean?text.replace(UFE0Fg,""):text)}function escapeHTML(s){return s.replace(rescaper,replacer)}function defaultImageSrcGenerator(icon,options){return "".concat(options.base,options.size,"/",icon,options.ext)}function grabAllTextNodes(node,allText){var childNodes=node.childNodes,length=childNodes.length,subnode,nodeType;while(length--){subnode=childNodes[length];nodeType=subnode.nodeType;if(nodeType===3){allText.push(subnode);}else if(nodeType===1&&!("ownerSVGElement"in subnode)&&!shouldntBeParsed.test(subnode.nodeName.toLowerCase())){grabAllTextNodes(subnode,allText);}}return allText}function grabTheRightIcon(rawText){return toCodePoint(rawText.indexOf(U200D)<0?rawText.replace(UFE0Fg,""):rawText)}function parseNode(node,options){var allText=grabAllTextNodes(node,[]),length=allText.length,attrib,attrname,modified,fragment,subnode,text,match,i,index,img,rawText,iconId,src;while(length--){modified=false;fragment=document.createDocumentFragment();subnode=allText[length];text=subnode.nodeValue;i=0;while(match=re.exec(text)){index=match.index;if(index!==i){fragment.appendChild(createText(text.slice(i,index),true));}rawText=match[0];iconId=grabTheRightIcon(rawText);i=index+rawText.length;src=options.callback(iconId,options);if(iconId&&src){img=new Image;img.onerror=options.onerror;img.setAttribute("draggable","false");attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf("on")!==0&&!img.hasAttribute(attrname)){img.setAttribute(attrname,attrib[attrname]);}}img.className=options.className;img.alt=rawText;img.src=src;modified=true;fragment.appendChild(img);}if(!img)fragment.appendChild(createText(rawText,false));img=null;}if(modified){if(i");}return ret})}function replacer(m){return escaper[m]}function returnNull(){return null}function toSizeSquaredAsset(value){return typeof value==="number"?value+"x"+value:value}function fromCodePoint(codepoint){var code=typeof codepoint==="string"?parseInt(codepoint,16):codepoint;if(code<65536){return fromCharCode(code)}code-=65536;return fromCharCode(55296+(code>>10),56320+(code&1023))}function parse(what,how){if(!how||typeof how==="function"){how={callback:how};}return (typeof what==="string"?parseString:parseNode)(what,{callback:how.callback||defaultImageSrcGenerator,attributes:typeof how.attributes==="function"?how.attributes:returnNull,base:typeof how.base==="string"?how.base:twemoji.base,ext:how.ext||twemoji.ext,size:how.folder||toSizeSquaredAsset(how.size||twemoji.size),className:how.className||twemoji.className,onerror:how.onerror||twemoji.onerror})}function replace(text,callback){return String(text).replace(re,callback)}function test(text){re.lastIndex=0;var result=re.test(text);re.lastIndex=0;return result}function toCodePoint(unicodeSurrogates,sep){var r=[],c=0,p=0,i=0;while(i { + return new RegExp(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\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0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/, 'g'); +}; +const shortNames = { + '😀': 'grinning face', + '😃': 'grinning face with big eyes', + '😄': 'grinning face with smiling eyes', + '😁': 'beaming face with smiling eyes', + '😆': 'grinning squinting face', + '😅': 'grinning face with sweat', + '🤣': 'rolling on the floor laughing', + '😂': 'face with tears of joy', + '🙂': 'slightly smiling face', + '🙃': 'upside-down face', + '🫠': '⊛ melting face', + '😉': 'winking face', + '😊': 'smiling face with smiling eyes', + '😇': 'smiling face with halo', + '🥰': 'smiling face with hearts', + '😍': 'smiling face with heart-eyes', + '🤩': 'star-struck', + '😘': 'face blowing a kiss', + '😗': 'kissing face', + '☺': 'smiling face', + '😚': 'kissing face with closed eyes', + '😙': 'kissing face with smiling eyes', + '🥲': 'smiling face with tear', + '😋': 'face savoring food', + '😛': 'face with tongue', + '😜': 'winking face with tongue', + '🤪': 'zany face', + '😝': 'squinting face with tongue', + '🤑': 'money-mouth face', + '🤗': 'smiling face with open hands', + '🤭': 'face with hand over mouth', + '🫢': '⊛ face with open eyes and hand over mouth', + '🫣': '⊛ face with peeking eye', + '🤫': 'shushing face', + '🤔': 'thinking face', + '🫡': '⊛ saluting face', + '🤐': 'zipper-mouth face', + '🤨': 'face with raised eyebrow', + '😐': 'neutral face', + '😑': 'expressionless face', + '😶': 'face without mouth', + '🫥': '⊛ dotted line face', + '😶‍🌫️': 'face in clouds', + '😏': 'smirking face', + '😒': 'unamused face', + '🙄': 'face with rolling eyes', + '😬': 'grimacing face', + '😮‍💨': 'face exhaling', + '🤥': 'lying face', + '😌': 'relieved face', + '😔': 'pensive face', + '😪': 'sleepy face', + '🤤': 'drooling face', + '😴': 'sleeping face', + '😷': 'face with medical mask', + '🤒': 'face with thermometer', + '🤕': 'face with head-bandage', + '🤢': 'nauseated face', + '🤮': 'face vomiting', + '🤧': 'sneezing face', + '🥵': 'hot face', + '🥶': 'cold face', + '🥴': 'woozy face', + '😵': 'face with crossed-out eyes', + '😵‍💫': 'face with spiral eyes', + '🤯': 'exploding head', + '🤠': 'cowboy hat face', + '🥳': 'partying face', + '🥸': 'disguised face', + '😎': 'smiling face with sunglasses', + '🤓': 'nerd face', + '🧐': 'face with monocle', + '😕': 'confused face', + '🫤': '⊛ face with diagonal mouth', + '😟': 'worried face', + '🙁': 'slightly frowning face', + '☹': 'frowning face', + '😮': 'face with open mouth', + '😯': 'hushed face', + '😲': 'astonished face', + '😳': 'flushed face', + '🥺': 'pleading face', + '🥹': '⊛ face holding back tears', + '😦': 'frowning face with open mouth', + '😧': 'anguished face', + '😨': 'fearful face', + '😰': 'anxious face with sweat', + '😥': 'sad but relieved face', + '😢': 'crying face', + '😭': 'loudly crying face', + '😱': 'face screaming in fear', + '😖': 'confounded face', + '😣': 'persevering face', + '😞': 'disappointed face', + '😓': 'downcast face with sweat', + '😩': 'weary face', + '😫': 'tired face', + '🥱': 'yawning face', + '😤': 'face with steam from nose', + '😡': 'pouting face', + '😠': 'angry face', + '🤬': 'face with symbols on mouth', + '😈': 'smiling face with horns', + '👿': 'angry face with horns', + '💀': 'skull', + '☠': 'skull and crossbones', + '💩': 'pile of poo', + '🤡': 'clown face', + '👹': 'ogre', + '👺': 'goblin', + '👻': 'ghost', + '👽': 'alien', + '👾': 'alien monster', + '🤖': 'robot', + '😺': 'grinning cat', + '😸': 'grinning cat with smiling eyes', + '😹': 'cat with tears of joy', + '😻': 'smiling cat with heart-eyes', + '😼': 'cat with wry smile', + '😽': 'kissing cat', + '🙀': 'weary cat', + '😿': 'crying cat', + '😾': 'pouting cat', + '🙈': 'see-no-evil monkey', + '🙉': 'hear-no-evil monkey', + '🙊': 'speak-no-evil monkey', + '💋': 'kiss mark', + '💌': 'love letter', + '💘': 'heart with arrow', + '💝': 'heart with ribbon', + '💖': 'sparkling heart', + '💗': 'growing heart', + '💓': 'beating heart', + '💞': 'revolving hearts', + '💕': 'two hearts', + '💟': 'heart decoration', + '❣': 'heart exclamation', + '💔': 'broken heart', + '❤️‍🔥': 'heart on fire', + '❤️‍🩹': 'mending heart', + '❤': 'red heart', + '🧡': 'orange heart', + '💛': 'yellow heart', + '💚': 'green heart', + '💙': 'blue heart', + '💜': 'purple heart', + '🤎': 'brown heart', + '🖤': 'black heart', + '🤍': 'white heart', + '💯': 'hundred points', + '💢': 'anger symbol', + '💥': 'collision', + '💫': 'dizzy', + '💦': 'sweat droplets', + '💨': 'dashing away', + '🕳': 'hole', + '💣': 'bomb', + '💬': 'speech balloon', + '👁️‍🗨️': 'eye in speech bubble', + '🗨': 'left speech bubble', + '🗯': 'right anger bubble', + '💭': 'thought balloon', + '💤': 'zzz', + '👋': 'waving hand', + '🤚': 'raised back of hand', + '🖐': 'hand with fingers splayed', + '✋': 'raised hand', + '🖖': 'vulcan salute', + '🫱': '⊛ rightwards hand', + '🫲': '⊛ leftwards hand', + '🫳': '⊛ palm down hand', + '🫴': '⊛ palm up hand', + '👌': 'OK hand', + '🤌': 'pinched fingers', + '🤏': 'pinching hand', + '✌': 'victory hand', + '🤞': 'crossed fingers', + '🫰': '⊛ hand with index finger and thumb crossed', + '🤟': 'love-you gesture', + '🤘': 'sign of the horns', + '🤙': 'call me hand', + '👈': 'backhand index pointing left', + '👉': 'backhand index pointing right', + '👆': 'backhand index pointing up', + '🖕': 'middle finger', + '👇': 'backhand index pointing down', + '☝': 'index pointing up', + '🫵': '⊛ index pointing at the viewer', + '👍': 'thumbs up', + '👎': 'thumbs down', + '✊': 'raised fist', + '👊': 'oncoming fist', + '🤛': 'left-facing fist', + '🤜': 'right-facing fist', + '👏': 'clapping hands', + '🙌': 'raising hands', + '🫶': '⊛ heart hands', + '👐': 'open hands', + '🤲': 'palms up together', + '🤝': 'handshake', + '🙏': 'folded hands', + '✍': 'writing hand', + '💅': 'nail polish', + '🤳': 'selfie', + '💪': 'flexed biceps', + '🦾': 'mechanical arm', + '🦿': 'mechanical leg', + '🦵': 'leg', + '🦶': 'foot', + '👂': 'ear', + '🦻': 'ear with hearing aid', + '👃': 'nose', + '🧠': 'brain', + '🫀': 'anatomical heart', + '🫁': 'lungs', + '🦷': 'tooth', + '🦴': 'bone', + '👀': 'eyes', + '👁': 'eye', + '👅': 'tongue', + '👄': 'mouth', + '🫦': '⊛ biting lip', + '👶': 'baby', + '🧒': 'child', + '👦': 'boy', + '👧': 'girl', + '🧑': 'person', + '👱': 'person: blond hair', + '👨': 'man', + '🧔': 'person: beard', + '🧔‍♂️': 'man: beard', + '🧔‍♀️': 'woman: beard', + '👨‍🦰': 'man: red hair', + '👨‍🦱': 'man: curly hair', + '👨‍🦳': 'man: white hair', + '👨‍🦲': 'man: bald', + '👩': 'woman', + '👩‍🦰': 'woman: red hair', + '🧑‍🦰': 'person: red hair', + '👩‍🦱': 'woman: curly hair', + '🧑‍🦱': 'person: curly hair', + '👩‍🦳': 'woman: white hair', + '🧑‍🦳': 'person: white hair', + '👩‍🦲': 'woman: bald', + '🧑‍🦲': 'person: bald', + '👱‍♀️': 'woman: blond hair', + '👱‍♂️': 'man: blond hair', + '🧓': 'older person', + '👴': 'old man', + '👵': 'old woman', + '🙍': 'person frowning', + '🙍‍♂️': 'man frowning', + '🙍‍♀️': 'woman frowning', + '🙎': 'person pouting', + '🙎‍♂️': 'man pouting', + '🙎‍♀️': 'woman pouting', + '🙅': 'person gesturing NO', + '🙅‍♂️': 'man gesturing NO', + '🙅‍♀️': 'woman gesturing NO', + '🙆': 'person gesturing OK', + '🙆‍♂️': 'man gesturing OK', + '🙆‍♀️': 'woman gesturing OK', + '💁': 'person tipping hand', + '💁‍♂️': 'man tipping hand', + '💁‍♀️': 'woman tipping hand', + '🙋': 'person raising hand', + '🙋‍♂️': 'man raising hand', + '🙋‍♀️': 'woman raising hand', + '🧏': 'deaf person', + '🧏‍♂️': 'deaf man', + '🧏‍♀️': 'deaf woman', + '🙇': 'person bowing', + '🙇‍♂️': 'man bowing', + '🙇‍♀️': 'woman bowing', + '🤦': 'person facepalming', + '🤦‍♂️': 'man facepalming', + '🤦‍♀️': 'woman facepalming', + '🤷': 'person shrugging', + '🤷‍♂️': 'man shrugging', + '🤷‍♀️': 'woman shrugging', + '🧑‍⚕️': 'health worker', + '👨‍⚕️': 'man health worker', + '👩‍⚕️': 'woman health worker', + '🧑‍🎓': 'student', + '👨‍🎓': 'man student', + '👩‍🎓': 'woman student', + '🧑‍🏫': 'teacher', + '👨‍🏫': 'man teacher', + '👩‍🏫': 'woman teacher', + '🧑‍⚖️': 'judge', + '👨‍⚖️': 'man judge', + '👩‍⚖️': 'woman judge', + '🧑‍🌾': 'farmer', + '👨‍🌾': 'man farmer', + '👩‍🌾': 'woman farmer', + '🧑‍🍳': 'cook', + '👨‍🍳': 'man cook', + '👩‍🍳': 'woman cook', + '🧑‍🔧': 'mechanic', + '👨‍🔧': 'man mechanic', + '👩‍🔧': 'woman mechanic', + '🧑‍🏭': 'factory worker', + '👨‍🏭': 'man factory worker', + '👩‍🏭': 'woman factory worker', + '🧑‍💼': 'office worker', + '👨‍💼': 'man office worker', + '👩‍💼': 'woman office worker', + '🧑‍🔬': 'scientist', + '👨‍🔬': 'man scientist', + '👩‍🔬': 'woman scientist', + '🧑‍💻': 'technologist', + '👨‍💻': 'man technologist', + '👩‍💻': 'woman technologist', + '🧑‍🎤': 'singer', + '👨‍🎤': 'man singer', + '👩‍🎤': 'woman singer', + '🧑‍🎨': 'artist', + '👨‍🎨': 'man artist', + '👩‍🎨': 'woman artist', + '🧑‍✈️': 'pilot', + '👨‍✈️': 'man pilot', + '👩‍✈️': 'woman pilot', + '🧑‍🚀': 'astronaut', + '👨‍🚀': 'man astronaut', + '👩‍🚀': 'woman astronaut', + '🧑‍🚒': 'firefighter', + '👨‍🚒': 'man firefighter', + '👩‍🚒': 'woman firefighter', + '👮': 'police officer', + '👮‍♂️': 'man police officer', + '👮‍♀️': 'woman police officer', + '🕵': 'detective', + '🕵️‍♂️': 'man detective', + '🕵️‍♀️': 'woman detective', + '💂': 'guard', + '💂‍♂️': 'man guard', + '💂‍♀️': 'woman guard', + '🥷': 'ninja', + '👷': 'construction worker', + '👷‍♂️': 'man construction worker', + '👷‍♀️': 'woman construction worker', + '🫅': '⊛ person with crown', + '🤴': 'prince', + '👸': 'princess', + '👳': 'person wearing turban', + '👳‍♂️': 'man wearing turban', + '👳‍♀️': 'woman wearing turban', + '👲': 'person with skullcap', + '🧕': 'woman with headscarf', + '🤵': 'person in tuxedo', + '🤵‍♂️': 'man in tuxedo', + '🤵‍♀️': 'woman in tuxedo', + '👰': 'person with veil', + '👰‍♂️': 'man with veil', + '👰‍♀️': 'woman with veil', + '🤰': 'pregnant woman', + '🫃': '⊛ pregnant man', + '🫄': '⊛ pregnant person', + '🤱': 'breast-feeding', + '👩‍🍼': 'woman feeding baby', + '👨‍🍼': 'man feeding baby', + '🧑‍🍼': 'person feeding baby', + '👼': 'baby angel', + '🎅': 'Santa Claus', + '🤶': 'Mrs. Claus', + '🧑‍🎄': 'mx claus', + '🦸': 'superhero', + '🦸‍♂️': 'man superhero', + '🦸‍♀️': 'woman superhero', + '🦹': 'supervillain', + '🦹‍♂️': 'man supervillain', + '🦹‍♀️': 'woman supervillain', + '🧙': 'mage', + '🧙‍♂️': 'man mage', + '🧙‍♀️': 'woman mage', + '🧚': 'fairy', + '🧚‍♂️': 'man fairy', + '🧚‍♀️': 'woman fairy', + '🧛': 'vampire', + '🧛‍♂️': 'man vampire', + '🧛‍♀️': 'woman vampire', + '🧜': 'merperson', + '🧜‍♂️': 'merman', + '🧜‍♀️': 'mermaid', + '🧝': 'elf', + '🧝‍♂️': 'man elf', + '🧝‍♀️': 'woman elf', + '🧞': 'genie', + '🧞‍♂️': 'man genie', + '🧞‍♀️': 'woman genie', + '🧟': 'zombie', + '🧟‍♂️': 'man zombie', + '🧟‍♀️': 'woman zombie', + '🧌': '⊛ troll', + '💆': 'person getting massage', + '💆‍♂️': 'man getting massage', + '💆‍♀️': 'woman getting massage', + '💇': 'person getting haircut', + '💇‍♂️': 'man getting haircut', + '💇‍♀️': 'woman getting haircut', + '🚶': 'person walking', + '🚶‍♂️': 'man walking', + '🚶‍♀️': 'woman walking', + '🧍': 'person standing', + '🧍‍♂️': 'man standing', + '🧍‍♀️': 'woman standing', + '🧎': 'person kneeling', + '🧎‍♂️': 'man kneeling', + '🧎‍♀️': 'woman kneeling', + '🧑‍🦯': 'person with white cane', + '👨‍🦯': 'man with white cane', + '👩‍🦯': 'woman with white cane', + '🧑‍🦼': 'person in motorized wheelchair', + '👨‍🦼': 'man in motorized wheelchair', + '👩‍🦼': 'woman in motorized wheelchair', + '🧑‍🦽': 'person in manual wheelchair', + '👨‍🦽': 'man in manual wheelchair', + '👩‍🦽': 'woman in manual wheelchair', + '🏃': 'person running', + '🏃‍♂️': 'man running', + '🏃‍♀️': 'woman running', + '💃': 'woman dancing', + '🕺': 'man dancing', + '🕴': 'person in suit levitating', + '👯': 'people with bunny ears', + '👯‍♂️': 'men with bunny ears', + '👯‍♀️': 'women with bunny ears', + '🧖': 'person in steamy room', + '🧖‍♂️': 'man in steamy room', + '🧖‍♀️': 'woman in steamy room', + '🧗': 'person climbing', + '🧗‍♂️': 'man climbing', + '🧗‍♀️': 'woman climbing', + '🤺': 'person fencing', + '🏇': 'horse racing', + '⛷': 'skier', + '🏂': 'snowboarder', + '🏌': 'person golfing', + '🏌️‍♂️': 'man golfing', + '🏌️‍♀️': 'woman golfing', + '🏄': 'person surfing', + '🏄‍♂️': 'man surfing', + '🏄‍♀️': 'woman surfing', + '🚣': 'person rowing boat', + '🚣‍♂️': 'man rowing boat', + '🚣‍♀️': 'woman rowing boat', + '🏊': 'person swimming', + '🏊‍♂️': 'man swimming', + '🏊‍♀️': 'woman swimming', + '⛹': 'person bouncing ball', + '⛹️‍♂️': 'man bouncing ball', + '⛹️‍♀️': 'woman bouncing ball', + '🏋': 'person lifting weights', + '🏋️‍♂️': 'man lifting weights', + '🏋️‍♀️': 'woman lifting weights', + '🚴': 'person biking', + '🚴‍♂️': 'man biking', + '🚴‍♀️': 'woman biking', + '🚵': 'person mountain biking', + '🚵‍♂️': 'man mountain biking', + '🚵‍♀️': 'woman mountain biking', + '🤸': 'person cartwheeling', + '🤸‍♂️': 'man cartwheeling', + '🤸‍♀️': 'woman cartwheeling', + '🤼': 'people wrestling', + '🤼‍♂️': 'men wrestling', + '🤼‍♀️': 'women wrestling', + '🤽': 'person playing water polo', + '🤽‍♂️': 'man playing water polo', + '🤽‍♀️': 'woman playing water polo', + '🤾': 'person playing handball', + '🤾‍♂️': 'man playing handball', + '🤾‍♀️': 'woman playing handball', + '🤹': 'person juggling', + '🤹‍♂️': 'man juggling', + '🤹‍♀️': 'woman juggling', + '🧘': 'person in lotus position', + '🧘‍♂️': 'man in lotus position', + '🧘‍♀️': 'woman in lotus position', + '🛀': 'person taking bath', + '🛌': 'person in bed', + '🧑‍🤝‍🧑': 'people holding hands', + '👭': 'women holding hands', + '👫': 'woman and man holding hands', + '👬': 'men holding hands', + '💏': 'kiss', + '👩‍❤️‍💋‍👨': 'kiss: woman, man', + '👨‍❤️‍💋‍👨': 'kiss: man, man', + '👩‍❤️‍💋‍👩': 'kiss: woman, woman', + '💑': 'couple with heart', + '👩‍❤️‍👨': 'couple with heart: woman, man', + '👨‍❤️‍👨': 'couple with heart: man, man', + '👩‍❤️‍👩': 'couple with heart: woman, woman', + '👪': 'family', + '👨‍👩‍👦': 'family: man, woman, boy', + '👨‍👩‍👧': 'family: man, woman, girl', + '👨‍👩‍👧‍👦': 'family: man, woman, girl, boy', + '👨‍👩‍👦‍👦': 'family: man, woman, boy, boy', + '👨‍👩‍👧‍👧': 'family: man, woman, girl, girl', + '👨‍👨‍👦': 'family: man, man, boy', + '👨‍👨‍👧': 'family: man, man, girl', + '👨‍👨‍👧‍👦': 'family: man, man, girl, boy', + '👨‍👨‍👦‍👦': 'family: man, man, boy, boy', + '👨‍👨‍👧‍👧': 'family: man, man, girl, girl', + '👩‍👩‍👦': 'family: woman, woman, boy', + '👩‍👩‍👧': 'family: woman, woman, girl', + '👩‍👩‍👧‍👦': 'family: woman, woman, girl, boy', + '👩‍👩‍👦‍👦': 'family: woman, woman, boy, boy', + '👩‍👩‍👧‍👧': 'family: woman, woman, girl, girl', + '👨‍👦': 'family: man, boy', + '👨‍👦‍👦': 'family: man, boy, boy', + '👨‍👧': 'family: man, girl', + '👨‍👧‍👦': 'family: man, girl, boy', + '👨‍👧‍👧': 'family: man, girl, girl', + '👩‍👦': 'family: woman, boy', + '👩‍👦‍👦': 'family: woman, boy, boy', + '👩‍👧': 'family: woman, girl', + '👩‍👧‍👦': 'family: woman, girl, boy', + '👩‍👧‍👧': 'family: woman, girl, girl', + '🗣': 'speaking head', + '👤': 'bust in silhouette', + '👥': 'busts in silhouette', + '🫂': 'people hugging', + '👣': 'footprints', + '🦰': 'red hair', + '🦱': 'curly hair', + '🦳': 'white hair', + '🦲': 'bald', + '🐵': 'monkey face', + '🐒': 'monkey', + '🦍': 'gorilla', + '🦧': 'orangutan', + '🐶': 'dog face', + '🐕': 'dog', + '🦮': 'guide dog', + '🐕‍🦺': 'service dog', + '🐩': 'poodle', + '🐺': 'wolf', + '🦊': 'fox', + '🦝': 'raccoon', + '🐱': 'cat face', + '🐈': 'cat', + '🐈‍⬛': 'black cat', + '🦁': 'lion', + '🐯': 'tiger face', + '🐅': 'tiger', + '🐆': 'leopard', + '🐴': 'horse face', + '🐎': 'horse', + '🦄': 'unicorn', + '🦓': 'zebra', + '🦌': 'deer', + '🦬': 'bison', + '🐮': 'cow face', + '🐂': 'ox', + '🐃': 'water buffalo', + '🐄': 'cow', + '🐷': 'pig face', + '🐖': 'pig', + '🐗': 'boar', + '🐽': 'pig nose', + '🐏': 'ram', + '🐑': 'ewe', + '🐐': 'goat', + '🐪': 'camel', + '🐫': 'two-hump camel', + '🦙': 'llama', + '🦒': 'giraffe', + '🐘': 'elephant', + '🦣': 'mammoth', + '🦏': 'rhinoceros', + '🦛': 'hippopotamus', + '🐭': 'mouse face', + '🐁': 'mouse', + '🐀': 'rat', + '🐹': 'hamster', + '🐰': 'rabbit face', + '🐇': 'rabbit', + '🐿': 'chipmunk', + '🦫': 'beaver', + '🦔': 'hedgehog', + '🦇': 'bat', + '🐻': 'bear', + '🐻‍❄️': 'polar bear', + '🐨': 'koala', + '🐼': 'panda', + '🦥': 'sloth', + '🦦': 'otter', + '🦨': 'skunk', + '🦘': 'kangaroo', + '🦡': 'badger', + '🐾': 'paw prints', + '🦃': 'turkey', + '🐔': 'chicken', + '🐓': 'rooster', + '🐣': 'hatching chick', + '🐤': 'baby chick', + '🐥': 'front-facing baby chick', + '🐦': 'bird', + '🐧': 'penguin', + '🕊': 'dove', + '🦅': 'eagle', + '🦆': 'duck', + '🦢': 'swan', + '🦉': 'owl', + '🦤': 'dodo', + '🪶': 'feather', + '🦩': 'flamingo', + '🦚': 'peacock', + '🦜': 'parrot', + '🐸': 'frog', + '🐊': 'crocodile', + '🐢': 'turtle', + '🦎': 'lizard', + '🐍': 'snake', + '🐲': 'dragon face', + '🐉': 'dragon', + '🦕': 'sauropod', + '🦖': 'T-Rex', + '🐳': 'spouting whale', + '🐋': 'whale', + '🐬': 'dolphin', + '🦭': 'seal', + '🐟': 'fish', + '🐠': 'tropical fish', + '🐡': 'blowfish', + '🦈': 'shark', + '🐙': 'octopus', + '🐚': 'spiral shell', + '🪸': '⊛ coral', + '🐌': 'snail', + '🦋': 'butterfly', + '🐛': 'bug', + '🐜': 'ant', + '🐝': 'honeybee', + '🪲': 'beetle', + '🐞': 'lady beetle', + '🦗': 'cricket', + '🪳': 'cockroach', + '🕷': 'spider', + '🕸': 'spider web', + '🦂': 'scorpion', + '🦟': 'mosquito', + '🪰': 'fly', + '🪱': 'worm', + '🦠': 'microbe', + '💐': 'bouquet', + '🌸': 'cherry blossom', + '💮': 'white flower', + '🪷': '⊛ lotus', + '🏵': 'rosette', + '🌹': 'rose', + '🥀': 'wilted flower', + '🌺': 'hibiscus', + '🌻': 'sunflower', + '🌼': 'blossom', + '🌷': 'tulip', + '🌱': 'seedling', + '🪴': 'potted plant', + '🌲': 'evergreen tree', + '🌳': 'deciduous tree', + '🌴': 'palm tree', + '🌵': 'cactus', + '🌾': 'sheaf of rice', + '🌿': 'herb', + '☘': 'shamrock', + '🍀': 'four leaf clover', + '🍁': 'maple leaf', + '🍂': 'fallen leaf', + '🍃': 'leaf fluttering in wind', + '🪹': '⊛ empty nest', + '🪺': '⊛ nest with eggs', + '🍇': 'grapes', + '🍈': 'melon', + '🍉': 'watermelon', + '🍊': 'tangerine', + '🍋': 'lemon', + '🍌': 'banana', + '🍍': 'pineapple', + '🥭': 'mango', + '🍎': 'red apple', + '🍏': 'green apple', + '🍐': 'pear', + '🍑': 'peach', + '🍒': 'cherries', + '🍓': 'strawberry', + '🫐': 'blueberries', + '🥝': 'kiwi fruit', + '🍅': 'tomato', + '🫒': 'olive', + '🥥': 'coconut', + '🥑': 'avocado', + '🍆': 'eggplant', + '🥔': 'potato', + '🥕': 'carrot', + '🌽': 'ear of corn', + '🌶': 'hot pepper', + '🫑': 'bell pepper', + '🥒': 'cucumber', + '🥬': 'leafy green', + '🥦': 'broccoli', + '🧄': 'garlic', + '🧅': 'onion', + '🍄': 'mushroom', + '🥜': 'peanuts', + '🫘': '⊛ beans', + '🌰': 'chestnut', + '🍞': 'bread', + '🥐': 'croissant', + '🥖': 'baguette bread', + '🫓': 'flatbread', + '🥨': 'pretzel', + '🥯': 'bagel', + '🥞': 'pancakes', + '🧇': 'waffle', + '🧀': 'cheese wedge', + '🍖': 'meat on bone', + '🍗': 'poultry leg', + '🥩': 'cut of meat', + '🥓': 'bacon', + '🍔': 'hamburger', + '🍟': 'french fries', + '🍕': 'pizza', + '🌭': 'hot dog', + '🥪': 'sandwich', + '🌮': 'taco', + '🌯': 'burrito', + '🫔': 'tamale', + '🥙': 'stuffed flatbread', + '🧆': 'falafel', + '🥚': 'egg', + '🍳': 'cooking', + '🥘': 'shallow pan of food', + '🍲': 'pot of food', + '🫕': 'fondue', + '🥣': 'bowl with spoon', + '🥗': 'green salad', + '🍿': 'popcorn', + '🧈': 'butter', + '🧂': 'salt', + '🥫': 'canned food', + '🍱': 'bento box', + '🍘': 'rice cracker', + '🍙': 'rice ball', + '🍚': 'cooked rice', + '🍛': 'curry rice', + '🍜': 'steaming bowl', + '🍝': 'spaghetti', + '🍠': 'roasted sweet potato', + '🍢': 'oden', + '🍣': 'sushi', + '🍤': 'fried shrimp', + '🍥': 'fish cake with swirl', + '🥮': 'moon cake', + '🍡': 'dango', + '🥟': 'dumpling', + '🥠': 'fortune cookie', + '🥡': 'takeout box', + '🦀': 'crab', + '🦞': 'lobster', + '🦐': 'shrimp', + '🦑': 'squid', + '🦪': 'oyster', + '🍦': 'soft ice cream', + '🍧': 'shaved ice', + '🍨': 'ice cream', + '🍩': 'doughnut', + '🍪': 'cookie', + '🎂': 'birthday cake', + '🍰': 'shortcake', + '🧁': 'cupcake', + '🥧': 'pie', + '🍫': 'chocolate bar', + '🍬': 'candy', + '🍭': 'lollipop', + '🍮': 'custard', + '🍯': 'honey pot', + '🍼': 'baby bottle', + '🥛': 'glass of milk', + '☕': 'hot beverage', + '🫖': 'teapot', + '🍵': 'teacup without handle', + '🍶': 'sake', + '🍾': 'bottle with popping cork', + '🍷': 'wine glass', + '🍸': 'cocktail glass', + '🍹': 'tropical drink', + '🍺': 'beer mug', + '🍻': 'clinking beer mugs', + '🥂': 'clinking glasses', + '🥃': 'tumbler glass', + '🫗': '⊛ pouring liquid', + '🥤': 'cup with straw', + '🧋': 'bubble tea', + '🧃': 'beverage box', + '🧉': 'mate', + '🧊': 'ice', + '🥢': 'chopsticks', + '🍽': 'fork and knife with plate', + '🍴': 'fork and knife', + '🥄': 'spoon', + '🔪': 'kitchen knife', + '🫙': '⊛ jar', + '🏺': 'amphora', + '🌍': 'globe showing Europe-Africa', + '🌎': 'globe showing Americas', + '🌏': 'globe showing Asia-Australia', + '🌐': 'globe with meridians', + '🗺': 'world map', + '🗾': 'map of Japan', + '🧭': 'compass', + '🏔': 'snow-capped mountain', + '⛰': 'mountain', + '🌋': 'volcano', + '🗻': 'mount fuji', + '🏕': 'camping', + '🏖': 'beach with umbrella', + '🏜': 'desert', + '🏝': 'desert island', + '🏞': 'national park', + '🏟': 'stadium', + '🏛': 'classical building', + '🏗': 'building construction', + '🧱': 'brick', + '🪨': 'rock', + '🪵': 'wood', + '🛖': 'hut', + '🏘': 'houses', + '🏚': 'derelict house', + '🏠': 'house', + '🏡': 'house with garden', + '🏢': 'office building', + '🏣': 'Japanese post office', + '🏤': 'post office', + '🏥': 'hospital', + '🏦': 'bank', + '🏨': 'hotel', + '🏩': 'love hotel', + '🏪': 'convenience store', + '🏫': 'school', + '🏬': 'department store', + '🏭': 'factory', + '🏯': 'Japanese castle', + '🏰': 'castle', + '💒': 'wedding', + '🗼': 'Tokyo tower', + '🗽': 'Statue of Liberty', + '⛪': 'church', + '🕌': 'mosque', + '🛕': 'hindu temple', + '🕍': 'synagogue', + '⛩': 'shinto shrine', + '🕋': 'kaaba', + '⛲': 'fountain', + '⛺': 'tent', + '🌁': 'foggy', + '🌃': 'night with stars', + '🏙': 'cityscape', + '🌄': 'sunrise over mountains', + '🌅': 'sunrise', + '🌆': 'cityscape at dusk', + '🌇': 'sunset', + '🌉': 'bridge at night', + '♨': 'hot springs', + '🎠': 'carousel horse', + '🛝': '⊛ playground slide', + '🎡': 'ferris wheel', + '🎢': 'roller coaster', + '💈': 'barber pole', + '🎪': 'circus tent', + '🚂': 'locomotive', + '🚃': 'railway car', + '🚄': 'high-speed train', + '🚅': 'bullet train', + '🚆': 'train', + '🚇': 'metro', + '🚈': 'light rail', + '🚉': 'station', + '🚊': 'tram', + '🚝': 'monorail', + '🚞': 'mountain railway', + '🚋': 'tram car', + '🚌': 'bus', + '🚍': 'oncoming bus', + '🚎': 'trolleybus', + '🚐': 'minibus', + '🚑': 'ambulance', + '🚒': 'fire engine', + '🚓': 'police car', + '🚔': 'oncoming police car', + '🚕': 'taxi', + '🚖': 'oncoming taxi', + '🚗': 'automobile', + '🚘': 'oncoming automobile', + '🚙': 'sport utility vehicle', + '🛻': 'pickup truck', + '🚚': 'delivery truck', + '🚛': 'articulated lorry', + '🚜': 'tractor', + '🏎': 'racing car', + '🏍': 'motorcycle', + '🛵': 'motor scooter', + '🦽': 'manual wheelchair', + '🦼': 'motorized wheelchair', + '🛺': 'auto rickshaw', + '🚲': 'bicycle', + '🛴': 'kick scooter', + '🛹': 'skateboard', + '🛼': 'roller skate', + '🚏': 'bus stop', + '🛣': 'motorway', + '🛤': 'railway track', + '🛢': 'oil drum', + '⛽': 'fuel pump', + '🛞': '⊛ wheel', + '🚨': 'police car light', + '🚥': 'horizontal traffic light', + '🚦': 'vertical traffic light', + '🛑': 'stop sign', + '🚧': 'construction', + '⚓': 'anchor', + '🛟': '⊛ ring buoy', + '⛵': 'sailboat', + '🛶': 'canoe', + '🚤': 'speedboat', + '🛳': 'passenger ship', + '⛴': 'ferry', + '🛥': 'motor boat', + '🚢': 'ship', + '✈': 'airplane', + '🛩': 'small airplane', + '🛫': 'airplane departure', + '🛬': 'airplane arrival', + '🪂': 'parachute', + '💺': 'seat', + '🚁': 'helicopter', + '🚟': 'suspension railway', + '🚠': 'mountain cableway', + '🚡': 'aerial tramway', + '🛰': 'satellite', + '🚀': 'rocket', + '🛸': 'flying saucer', + '🛎': 'bellhop bell', + '🧳': 'luggage', + '⌛': 'hourglass done', + '⏳': 'hourglass not done', + '⌚': 'watch', + '⏰': 'alarm clock', + '⏱': 'stopwatch', + '⏲': 'timer clock', + '🕰': 'mantelpiece clock', + '🕛': 'twelve o’clock', + '🕧': 'twelve-thirty', + '🕐': 'one o’clock', + '🕜': 'one-thirty', + '🕑': 'two o’clock', + '🕝': 'two-thirty', + '🕒': 'three o’clock', + '🕞': 'three-thirty', + '🕓': 'four o’clock', + '🕟': 'four-thirty', + '🕔': 'five o’clock', + '🕠': 'five-thirty', + '🕕': 'six o’clock', + '🕡': 'six-thirty', + '🕖': 'seven o’clock', + '🕢': 'seven-thirty', + '🕗': 'eight o’clock', + '🕣': 'eight-thirty', + '🕘': 'nine o’clock', + '🕤': 'nine-thirty', + '🕙': 'ten o’clock', + '🕥': 'ten-thirty', + '🕚': 'eleven o’clock', + '🕦': 'eleven-thirty', + '🌑': 'new moon', + '🌒': 'waxing crescent moon', + '🌓': 'first quarter moon', + '🌔': 'waxing gibbous moon', + '🌕': 'full moon', + '🌖': 'waning gibbous moon', + '🌗': 'last quarter moon', + '🌘': 'waning crescent moon', + '🌙': 'crescent moon', + '🌚': 'new moon face', + '🌛': 'first quarter moon face', + '🌜': 'last quarter moon face', + '🌡': 'thermometer', + '☀': 'sun', + '🌝': 'full moon face', + '🌞': 'sun with face', + '🪐': 'ringed planet', + '⭐': 'star', + '🌟': 'glowing star', + '🌠': 'shooting star', + '🌌': 'milky way', + '☁': 'cloud', + '⛅': 'sun behind cloud', + '⛈': 'cloud with lightning and rain', + '🌤': 'sun behind small cloud', + '🌥': 'sun behind large cloud', + '🌦': 'sun behind rain cloud', + '🌧': 'cloud with rain', + '🌨': 'cloud with snow', + '🌩': 'cloud with lightning', + '🌪': 'tornado', + '🌫': 'fog', + '🌬': 'wind face', + '🌀': 'cyclone', + '🌈': 'rainbow', + '🌂': 'closed umbrella', + '☂': 'umbrella', + '☔': 'umbrella with rain drops', + '⛱': 'umbrella on ground', + '⚡': 'high voltage', + '❄': 'snowflake', + '☃': 'snowman', + '⛄': 'snowman without snow', + '☄': 'comet', + '🔥': 'fire', + '💧': 'droplet', + '🌊': 'water wave', + '🎃': 'jack-o-lantern', + '🎄': 'Christmas tree', + '🎆': 'fireworks', + '🎇': 'sparkler', + '🧨': 'firecracker', + '✨': 'sparkles', + '🎈': 'balloon', + '🎉': 'party popper', + '🎊': 'confetti ball', + '🎋': 'tanabata tree', + '🎍': 'pine decoration', + '🎎': 'Japanese dolls', + '🎏': 'carp streamer', + '🎐': 'wind chime', + '🎑': 'moon viewing ceremony', + '🧧': 'red envelope', + '🎀': 'ribbon', + '🎁': 'wrapped gift', + '🎗': 'reminder ribbon', + '🎟': 'admission tickets', + '🎫': 'ticket', + '🎖': 'military medal', + '🏆': 'trophy', + '🏅': 'sports medal', + '🥇': '1st place medal', + '🥈': '2nd place medal', + '🥉': '3rd place medal', + '⚽': 'soccer ball', + '⚾': 'baseball', + '🥎': 'softball', + '🏀': 'basketball', + '🏐': 'volleyball', + '🏈': 'american football', + '🏉': 'rugby football', + '🎾': 'tennis', + '🥏': 'flying disc', + '🎳': 'bowling', + '🏏': 'cricket game', + '🏑': 'field hockey', + '🏒': 'ice hockey', + '🥍': 'lacrosse', + '🏓': 'ping pong', + '🏸': 'badminton', + '🥊': 'boxing glove', + '🥋': 'martial arts uniform', + '🥅': 'goal net', + '⛳': 'flag in hole', + '⛸': 'ice skate', + '🎣': 'fishing pole', + '🤿': 'diving mask', + '🎽': 'running shirt', + '🎿': 'skis', + '🛷': 'sled', + '🥌': 'curling stone', + '🎯': 'bullseye', + '🪀': 'yo-yo', + '🪁': 'kite', + '🎱': 'pool 8 ball', + '🔮': 'crystal ball', + '🪄': 'magic wand', + '🧿': 'nazar amulet', + '🪬': '⊛ hamsa', + '🎮': 'video game', + '🕹': 'joystick', + '🎰': 'slot machine', + '🎲': 'game die', + '🧩': 'puzzle piece', + '🧸': 'teddy bear', + '🪅': 'piñata', + '🪩': '⊛ mirror ball', + '🪆': 'nesting dolls', + '♠': 'spade suit', + '♥': 'heart suit', + '♦': 'diamond suit', + '♣': 'club suit', + '♟': 'chess pawn', + '🃏': 'joker', + '🀄': 'mahjong red dragon', + '🎴': 'flower playing cards', + '🎭': 'performing arts', + '🖼': 'framed picture', + '🎨': 'artist palette', + '🧵': 'thread', + '🪡': 'sewing needle', + '🧶': 'yarn', + '🪢': 'knot', + '👓': 'glasses', + '🕶': 'sunglasses', + '🥽': 'goggles', + '🥼': 'lab coat', + '🦺': 'safety vest', + '👔': 'necktie', + '👕': 't-shirt', + '👖': 'jeans', + '🧣': 'scarf', + '🧤': 'gloves', + '🧥': 'coat', + '🧦': 'socks', + '👗': 'dress', + '👘': 'kimono', + '🥻': 'sari', + '🩱': 'one-piece swimsuit', + '🩲': 'briefs', + '🩳': 'shorts', + '👙': 'bikini', + '👚': 'woman’s clothes', + '👛': 'purse', + '👜': 'handbag', + '👝': 'clutch bag', + '🛍': 'shopping bags', + '🎒': 'backpack', + '🩴': 'thong sandal', + '👞': 'man’s shoe', + '👟': 'running shoe', + '🥾': 'hiking boot', + '🥿': 'flat shoe', + '👠': 'high-heeled shoe', + '👡': 'woman’s sandal', + '🩰': 'ballet shoes', + '👢': 'woman’s boot', + '👑': 'crown', + '👒': 'woman’s hat', + '🎩': 'top hat', + '🎓': 'graduation cap', + '🧢': 'billed cap', + '🪖': 'military helmet', + '⛑': 'rescue worker’s helmet', + '📿': 'prayer beads', + '💄': 'lipstick', + '💍': 'ring', + '💎': 'gem stone', + '🔇': 'muted speaker', + '🔈': 'speaker low volume', + '🔉': 'speaker medium volume', + '🔊': 'speaker high volume', + '📢': 'loudspeaker', + '📣': 'megaphone', + '📯': 'postal horn', + '🔔': 'bell', + '🔕': 'bell with slash', + '🎼': 'musical score', + '🎵': 'musical note', + '🎶': 'musical notes', + '🎙': 'studio microphone', + '🎚': 'level slider', + '🎛': 'control knobs', + '🎤': 'microphone', + '🎧': 'headphone', + '📻': 'radio', + '🎷': 'saxophone', + '🪗': 'accordion', + '🎸': 'guitar', + '🎹': 'musical keyboard', + '🎺': 'trumpet', + '🎻': 'violin', + '🪕': 'banjo', + '🥁': 'drum', + '🪘': 'long drum', + '📱': 'mobile phone', + '📲': 'mobile phone with arrow', + '☎': 'telephone', + '📞': 'telephone receiver', + '📟': 'pager', + '📠': 'fax machine', + '🔋': 'battery', + '🪫': '⊛ low battery', + '🔌': 'electric plug', + '💻': 'laptop', + '🖥': 'desktop computer', + '🖨': 'printer', + '⌨': 'keyboard', + '🖱': 'computer mouse', + '🖲': 'trackball', + '💽': 'computer disk', + '💾': 'floppy disk', + '💿': 'optical disk', + '📀': 'dvd', + '🧮': 'abacus', + '🎥': 'movie camera', + '🎞': 'film frames', + '📽': 'film projector', + '🎬': 'clapper board', + '📺': 'television', + '📷': 'camera', + '📸': 'camera with flash', + '📹': 'video camera', + '📼': 'videocassette', + '🔍': 'magnifying glass tilted left', + '🔎': 'magnifying glass tilted right', + '🕯': 'candle', + '💡': 'light bulb', + '🔦': 'flashlight', + '🏮': 'red paper lantern', + '🪔': 'diya lamp', + '📔': 'notebook with decorative cover', + '📕': 'closed book', + '📖': 'open book', + '📗': 'green book', + '📘': 'blue book', + '📙': 'orange book', + '📚': 'books', + '📓': 'notebook', + '📒': 'ledger', + '📃': 'page with curl', + '📜': 'scroll', + '📄': 'page facing up', + '📰': 'newspaper', + '🗞': 'rolled-up newspaper', + '📑': 'bookmark tabs', + '🔖': 'bookmark', + '🏷': 'label', + '💰': 'money bag', + '🪙': 'coin', + '💴': 'yen banknote', + '💵': 'dollar banknote', + '💶': 'euro banknote', + '💷': 'pound banknote', + '💸': 'money with wings', + '💳': 'credit card', + '🧾': 'receipt', + '💹': 'chart increasing with yen', + '✉': 'envelope', + '📧': 'e-mail', + '📨': 'incoming envelope', + '📩': 'envelope with arrow', + '📤': 'outbox tray', + '📥': 'inbox tray', + '📦': 'package', + '📫': 'closed mailbox with raised flag', + '📪': 'closed mailbox with lowered flag', + '📬': 'open mailbox with raised flag', + '📭': 'open mailbox with lowered flag', + '📮': 'postbox', + '🗳': 'ballot box with ballot', + '✏': 'pencil', + '✒': 'black nib', + '🖋': 'fountain pen', + '🖊': 'pen', + '🖌': 'paintbrush', + '🖍': 'crayon', + '📝': 'memo', + '💼': 'briefcase', + '📁': 'file folder', + '📂': 'open file folder', + '🗂': 'card index dividers', + '📅': 'calendar', + '📆': 'tear-off calendar', + '🗒': 'spiral notepad', + '🗓': 'spiral calendar', + '📇': 'card index', + '📈': 'chart increasing', + '📉': 'chart decreasing', + '📊': 'bar chart', + '📋': 'clipboard', + '📌': 'pushpin', + '📍': 'round pushpin', + '📎': 'paperclip', + '🖇': 'linked paperclips', + '📏': 'straight ruler', + '📐': 'triangular ruler', + '✂': 'scissors', + '🗃': 'card file box', + '🗄': 'file cabinet', + '🗑': 'wastebasket', + '🔒': 'locked', + '🔓': 'unlocked', + '🔏': 'locked with pen', + '🔐': 'locked with key', + '🔑': 'key', + '🗝': 'old key', + '🔨': 'hammer', + '🪓': 'axe', + '⛏': 'pick', + '⚒': 'hammer and pick', + '🛠': 'hammer and wrench', + '🗡': 'dagger', + '⚔': 'crossed swords', + '🔫': 'water pistol', + '🪃': 'boomerang', + '🏹': 'bow and arrow', + '🛡': 'shield', + '🪚': 'carpentry saw', + '🔧': 'wrench', + '🪛': 'screwdriver', + '🔩': 'nut and bolt', + '⚙': 'gear', + '🗜': 'clamp', + '⚖': 'balance scale', + '🦯': 'white cane', + '🔗': 'link', + '⛓': 'chains', + '🪝': 'hook', + '🧰': 'toolbox', + '🧲': 'magnet', + '🪜': 'ladder', + '⚗': 'alembic', + '🧪': 'test tube', + '🧫': 'petri dish', + '🧬': 'dna', + '🔬': 'microscope', + '🔭': 'telescope', + '📡': 'satellite antenna', + '💉': 'syringe', + '🩸': 'drop of blood', + '💊': 'pill', + '🩹': 'adhesive bandage', + '🩼': '⊛ crutch', + '🩺': 'stethoscope', + '🩻': '⊛ x-ray', + '🚪': 'door', + '🛗': 'elevator', + '🪞': 'mirror', + '🪟': 'window', + '🛏': 'bed', + '🛋': 'couch and lamp', + '🪑': 'chair', + '🚽': 'toilet', + '🪠': 'plunger', + '🚿': 'shower', + '🛁': 'bathtub', + '🪤': 'mouse trap', + '🪒': 'razor', + '🧴': 'lotion bottle', + '🧷': 'safety pin', + '🧹': 'broom', + '🧺': 'basket', + '🧻': 'roll of paper', + '🪣': 'bucket', + '🧼': 'soap', + '🫧': '⊛ bubbles', + '🪥': 'toothbrush', + '🧽': 'sponge', + '🧯': 'fire extinguisher', + '🛒': 'shopping cart', + '🚬': 'cigarette', + '⚰': 'coffin', + '🪦': 'headstone', + '⚱': 'funeral urn', + '🗿': 'moai', + '🪧': 'placard', + '🪪': '⊛ identification card', + '🏧': 'ATM sign', + '🚮': 'litter in bin sign', + '🚰': 'potable water', + '♿': 'wheelchair symbol', + '🚹': 'men’s room', + '🚺': 'women’s room', + '🚻': 'restroom', + '🚼': 'baby symbol', + '🚾': 'water closet', + '🛂': 'passport control', + '🛃': 'customs', + '🛄': 'baggage claim', + '🛅': 'left luggage', + '⚠': 'warning', + '🚸': 'children crossing', + '⛔': 'no entry', + '🚫': 'prohibited', + '🚳': 'no bicycles', + '🚭': 'no smoking', + '🚯': 'no littering', + '🚱': 'non-potable water', + '🚷': 'no pedestrians', + '📵': 'no mobile phones', + '🔞': 'no one under eighteen', + '☢': 'radioactive', + '☣': 'biohazard', + '⬆': 'up arrow', + '↗': 'up-right arrow', + '➡': 'right arrow', + '↘': 'down-right arrow', + '⬇': 'down arrow', + '↙': 'down-left arrow', + '⬅': 'left arrow', + '↖': 'up-left arrow', + '↕': 'up-down arrow', + '↔': 'left-right arrow', + '↩': 'right arrow curving left', + '↪': 'left arrow curving right', + '⤴': 'right arrow curving up', + '⤵': 'right arrow curving down', + '🔃': 'clockwise vertical arrows', + '🔄': 'counterclockwise arrows button', + '🔙': 'BACK arrow', + '🔚': 'END arrow', + '🔛': 'ON! arrow', + '🔜': 'SOON arrow', + '🔝': 'TOP arrow', + '🛐': 'place of worship', + '⚛': 'atom symbol', + '🕉': 'om', + '✡': 'star of David', + '☸': 'wheel of dharma', + '☯': 'yin yang', + '✝': 'latin cross', + '☦': 'orthodox cross', + '☪': 'star and crescent', + '☮': 'peace symbol', + '🕎': 'menorah', + '🔯': 'dotted six-pointed star', + '♈': 'Aries', + '♉': 'Taurus', + '♊': 'Gemini', + '♋': 'Cancer', + '♌': 'Leo', + '♍': 'Virgo', + '♎': 'Libra', + '♏': 'Scorpio', + '♐': 'Sagittarius', + '♑': 'Capricorn', + '♒': 'Aquarius', + '♓': 'Pisces', + '⛎': 'Ophiuchus', + '🔀': 'shuffle tracks button', + '🔁': 'repeat button', + '🔂': 'repeat single button', + '▶': 'play button', + '⏩': 'fast-forward button', + '⏭': 'next track button', + '⏯': 'play or pause button', + '◀': 'reverse button', + '⏪': 'fast reverse button', + '⏮': 'last track button', + '🔼': 'upwards button', + '⏫': 'fast up button', + '🔽': 'downwards button', + '⏬': 'fast down button', + '⏸': 'pause button', + '⏹': 'stop button', + '⏺': 'record button', + '⏏': 'eject button', + '🎦': 'cinema', + '🔅': 'dim button', + '🔆': 'bright button', + '📶': 'antenna bars', + '📳': 'vibration mode', + '📴': 'mobile phone off', + '♀': 'female sign', + '♂': 'male sign', + '⚧': 'transgender symbol', + '✖': 'multiply', + '➕': 'plus', + '➖': 'minus', + '➗': 'divide', + '🟰': '⊛ heavy equals sign', + '♾': 'infinity', + '‼': 'double exclamation mark', + '⁉': 'exclamation question mark', + '❓': 'red question mark', + '❔': 'white question mark', + '❕': 'white exclamation mark', + '❗': 'red exclamation mark', + '〰': 'wavy dash', + '💱': 'currency exchange', + '💲': 'heavy dollar sign', + '⚕': 'medical symbol', + '♻': 'recycling symbol', + '⚜': 'fleur-de-lis', + '🔱': 'trident emblem', + '📛': 'name badge', + '🔰': 'Japanese symbol for beginner', + '⭕': 'hollow red circle', + '✅': 'check mark button', + '☑': 'check box with check', + '✔': 'check mark', + '❌': 'cross mark', + '❎': 'cross mark button', + '➰': 'curly loop', + '➿': 'double curly loop', + '〽': 'part alternation mark', + '✳': 'eight-spoked asterisk', + '✴': 'eight-pointed star', + '❇': 'sparkle', + '©': 'copyright', + '®': 'registered', + '™': 'trade mark', + '#️⃣': 'keycap: #', + '*️⃣': 'keycap: *', + '0️⃣': 'keycap: 0', + '1️⃣': 'keycap: 1', + '2️⃣': 'keycap: 2', + '3️⃣': 'keycap: 3', + '4️⃣': 'keycap: 4', + '5️⃣': 'keycap: 5', + '6️⃣': 'keycap: 6', + '7️⃣': 'keycap: 7', + '8️⃣': 'keycap: 8', + '9️⃣': 'keycap: 9', + '🔟': 'keycap: 10', + '🔠': 'input latin uppercase', + '🔡': 'input latin lowercase', + '🔢': 'input numbers', + '🔣': 'input symbols', + '🔤': 'input latin letters', + '🅰': 'A button (blood type)', + '🆎': 'AB button (blood type)', + '🅱': 'B button (blood type)', + '🆑': 'CL button', + '🆒': 'COOL button', + '🆓': 'FREE button', + ℹ: 'information', + '🆔': 'ID button', + 'Ⓜ': 'circled M', + '🆕': 'NEW button', + '🆖': 'NG button', + '🅾': 'O button (blood type)', + '🆗': 'OK button', + '🅿': 'P button', + '🆘': 'SOS button', + '🆙': 'UP! button', + '🆚': 'VS button', + '🈁': 'Japanese “here” button', + '🈂': 'Japanese “service charge” button', + '🈷': 'Japanese “monthly amount” button', + '🈶': 'Japanese “not free of charge” button', + '🈯': 'Japanese “reserved” button', + '🉐': 'Japanese “bargain” button', + '🈹': 'Japanese “discount” button', + '🈚': 'Japanese “free of charge” button', + '🈲': 'Japanese “prohibited” button', + '🉑': 'Japanese “acceptable” button', + '🈸': 'Japanese “application” button', + '🈴': 'Japanese “passing grade” button', + '🈳': 'Japanese “vacancy” button', + '㊗': 'Japanese “congratulations” button', + '㊙': 'Japanese “secret” button', + '🈺': 'Japanese “open for business” button', + '🈵': 'Japanese “no vacancy” button', + '🔴': 'red circle', + '🟠': 'orange circle', + '🟡': 'yellow circle', + '🟢': 'green circle', + '🔵': 'blue circle', + '🟣': 'purple circle', + '🟤': 'brown circle', + '⚫': 'black circle', + '⚪': 'white circle', + '🟥': 'red square', + '🟧': 'orange square', + '🟨': 'yellow square', + '🟩': 'green square', + '🟦': 'blue square', + '🟪': 'purple square', + '🟫': 'brown square', + '⬛': 'black large square', + '⬜': 'white large square', + '◼': 'black medium square', + '◻': 'white medium square', + '◾': 'black medium-small square', + '◽': 'white medium-small square', + '▪': 'black small square', + '▫': 'white small square', + '🔶': 'large orange diamond', + '🔷': 'large blue diamond', + '🔸': 'small orange diamond', + '🔹': 'small blue diamond', + '🔺': 'red triangle pointed up', + '🔻': 'red triangle pointed down', + '💠': 'diamond with a dot', + '🔘': 'radio button', + '🔳': 'white square button', + '🔲': 'black square button', + '🏁': 'chequered flag', + '🚩': 'triangular flag', + '🎌': 'crossed flags', + '🏴': 'black flag', + '🏳': 'white flag', + '🏳️‍🌈': 'rainbow flag', + '🏳️‍⚧️': 'transgender flag', + '🏴‍☠️': 'pirate flag', + '🇦🇨': 'flag: Ascension Island', + '🇦🇩': 'flag: Andorra', + '🇦🇪': 'flag: United Arab Emirates', + '🇦🇫': 'flag: Afghanistan', + '🇦🇬': 'flag: Antigua & Barbuda', + '🇦🇮': 'flag: Anguilla', + '🇦🇱': 'flag: Albania', + '🇦🇲': 'flag: Armenia', + '🇦🇴': 'flag: Angola', + '🇦🇶': 'flag: Antarctica', + '🇦🇷': 'flag: Argentina', + '🇦🇸': 'flag: American Samoa', + '🇦🇹': 'flag: Austria', + '🇦🇺': 'flag: Australia', + '🇦🇼': 'flag: Aruba', + '🇦🇽': 'flag: Åland Islands', + '🇦🇿': 'flag: Azerbaijan', + '🇧🇦': 'flag: Bosnia & Herzegovina', + '🇧🇧': 'flag: Barbados', + '🇧🇩': 'flag: Bangladesh', + '🇧🇪': 'flag: Belgium', + '🇧🇫': 'flag: Burkina Faso', + '🇧🇬': 'flag: Bulgaria', + '🇧🇭': 'flag: Bahrain', + '🇧🇮': 'flag: Burundi', + '🇧🇯': 'flag: Benin', + '🇧🇱': 'flag: St. Barthélemy', + '🇧🇲': 'flag: Bermuda', + '🇧🇳': 'flag: Brunei', + '🇧🇴': 'flag: Bolivia', + '🇧🇶': 'flag: Caribbean Netherlands', + '🇧🇷': 'flag: Brazil', + '🇧🇸': 'flag: Bahamas', + '🇧🇹': 'flag: Bhutan', + '🇧🇻': 'flag: Bouvet Island', + '🇧🇼': 'flag: Botswana', + '🇧🇾': 'flag: Belarus', + '🇧🇿': 'flag: Belize', + '🇨🇦': 'flag: Canada', + '🇨🇨': 'flag: Cocos (Keeling) Islands', + '🇨🇩': 'flag: Congo - Kinshasa', + '🇨🇫': 'flag: Central African Republic', + '🇨🇬': 'flag: Congo - Brazzaville', + '🇨🇭': 'flag: Switzerland', + '🇨🇮': 'flag: Côte d’Ivoire', + '🇨🇰': 'flag: Cook Islands', + '🇨🇱': 'flag: Chile', + '🇨🇲': 'flag: Cameroon', + '🇨🇳': 'flag: China', + '🇨🇴': 'flag: Colombia', + '🇨🇵': 'flag: Clipperton Island', + '🇨🇷': 'flag: Costa Rica', + '🇨🇺': 'flag: Cuba', + '🇨🇻': 'flag: Cape Verde', + '🇨🇼': 'flag: Curaçao', + '🇨🇽': 'flag: Christmas Island', + '🇨🇾': 'flag: Cyprus', + '🇨🇿': 'flag: Czechia', + '🇩🇪': 'flag: Germany', + '🇩🇬': 'flag: Diego Garcia', + '🇩🇯': 'flag: Djibouti', + '🇩🇰': 'flag: Denmark', + '🇩🇲': 'flag: Dominica', + '🇩🇴': 'flag: Dominican Republic', + '🇩🇿': 'flag: Algeria', + '🇪🇦': 'flag: Ceuta & Melilla', + '🇪🇨': 'flag: Ecuador', + '🇪🇪': 'flag: Estonia', + '🇪🇬': 'flag: Egypt', + '🇪🇭': 'flag: Western Sahara', + '🇪🇷': 'flag: Eritrea', + '🇪🇸': 'flag: Spain', + '🇪🇹': 'flag: Ethiopia', + '🇪🇺': 'flag: European Union', + '🇫🇮': 'flag: Finland', + '🇫🇯': 'flag: Fiji', + '🇫🇰': 'flag: Falkland Islands', + '🇫🇲': 'flag: Micronesia', + '🇫🇴': 'flag: Faroe Islands', + '🇫🇷': 'flag: France', + '🇬🇦': 'flag: Gabon', + '🇬🇧': 'flag: United Kingdom', + '🇬🇩': 'flag: Grenada', + '🇬🇪': 'flag: Georgia', + '🇬🇫': 'flag: French Guiana', + '🇬🇬': 'flag: Guernsey', + '🇬🇭': 'flag: Ghana', + '🇬🇮': 'flag: Gibraltar', + '🇬🇱': 'flag: Greenland', + '🇬🇲': 'flag: Gambia', + '🇬🇳': 'flag: Guinea', + '🇬🇵': 'flag: Guadeloupe', + '🇬🇶': 'flag: Equatorial Guinea', + '🇬🇷': 'flag: Greece', + '🇬🇸': 'flag: South Georgia & South Sandwich Islands', + '🇬🇹': 'flag: Guatemala', + '🇬🇺': 'flag: Guam', + '🇬🇼': 'flag: Guinea-Bissau', + '🇬🇾': 'flag: Guyana', + '🇭🇰': 'flag: Hong Kong SAR China', + '🇭🇲': 'flag: Heard & McDonald Islands', + '🇭🇳': 'flag: Honduras', + '🇭🇷': 'flag: Croatia', + '🇭🇹': 'flag: Haiti', + '🇭🇺': 'flag: Hungary', + '🇮🇨': 'flag: Canary Islands', + '🇮🇩': 'flag: Indonesia', + '🇮🇪': 'flag: Ireland', + '🇮🇱': 'flag: Israel', + '🇮🇲': 'flag: Isle of Man', + '🇮🇳': 'flag: India', + '🇮🇴': 'flag: British Indian Ocean Territory', + '🇮🇶': 'flag: Iraq', + '🇮🇷': 'flag: Iran', + '🇮🇸': 'flag: Iceland', + '🇮🇹': 'flag: Italy', + '🇯🇪': 'flag: Jersey', + '🇯🇲': 'flag: Jamaica', + '🇯🇴': 'flag: Jordan', + '🇯🇵': 'flag: Japan', + '🇰🇪': 'flag: Kenya', + '🇰🇬': 'flag: Kyrgyzstan', + '🇰🇭': 'flag: Cambodia', + '🇰🇮': 'flag: Kiribati', + '🇰🇲': 'flag: Comoros', + '🇰🇳': 'flag: St. Kitts & Nevis', + '🇰🇵': 'flag: North Korea', + '🇰🇷': 'flag: South Korea', + '🇰🇼': 'flag: Kuwait', + '🇰🇾': 'flag: Cayman Islands', + '🇰🇿': 'flag: Kazakhstan', + '🇱🇦': 'flag: Laos', + '🇱🇧': 'flag: Lebanon', + '🇱🇨': 'flag: St. Lucia', + '🇱🇮': 'flag: Liechtenstein', + '🇱🇰': 'flag: Sri Lanka', + '🇱🇷': 'flag: Liberia', + '🇱🇸': 'flag: Lesotho', + '🇱🇹': 'flag: Lithuania', + '🇱🇺': 'flag: Luxembourg', + '🇱🇻': 'flag: Latvia', + '🇱🇾': 'flag: Libya', + '🇲🇦': 'flag: Morocco', + '🇲🇨': 'flag: Monaco', + '🇲🇩': 'flag: Moldova', + '🇲🇪': 'flag: Montenegro', + '🇲🇫': 'flag: St. Martin', + '🇲🇬': 'flag: Madagascar', + '🇲🇭': 'flag: Marshall Islands', + '🇲🇰': 'flag: North Macedonia', + '🇲🇱': 'flag: Mali', + '🇲🇲': 'flag: Myanmar (Burma)', + '🇲🇳': 'flag: Mongolia', + '🇲🇴': 'flag: Macao SAR China', + '🇲🇵': 'flag: Northern Mariana Islands', + '🇲🇶': 'flag: Martinique', + '🇲🇷': 'flag: Mauritania', + '🇲🇸': 'flag: Montserrat', + '🇲🇹': 'flag: Malta', + '🇲🇺': 'flag: Mauritius', + '🇲🇻': 'flag: Maldives', + '🇲🇼': 'flag: Malawi', + '🇲🇽': 'flag: Mexico', + '🇲🇾': 'flag: Malaysia', + '🇲🇿': 'flag: Mozambique', + '🇳🇦': 'flag: Namibia', + '🇳🇨': 'flag: New Caledonia', + '🇳🇪': 'flag: Niger', + '🇳🇫': 'flag: Norfolk Island', + '🇳🇬': 'flag: Nigeria', + '🇳🇮': 'flag: Nicaragua', + '🇳🇱': 'flag: Netherlands', + '🇳🇴': 'flag: Norway', + '🇳🇵': 'flag: Nepal', + '🇳🇷': 'flag: Nauru', + '🇳🇺': 'flag: Niue', + '🇳🇿': 'flag: New Zealand', + '🇴🇲': 'flag: Oman', + '🇵🇦': 'flag: Panama', + '🇵🇪': 'flag: Peru', + '🇵🇫': 'flag: French Polynesia', + '🇵🇬': 'flag: Papua New Guinea', + '🇵🇭': 'flag: Philippines', + '🇵🇰': 'flag: Pakistan', + '🇵🇱': 'flag: Poland', + '🇵🇲': 'flag: St. Pierre & Miquelon', + '🇵🇳': 'flag: Pitcairn Islands', + '🇵🇷': 'flag: Puerto Rico', + '🇵🇸': 'flag: Palestinian Territories', + '🇵🇹': 'flag: Portugal', + '🇵🇼': 'flag: Palau', + '🇵🇾': 'flag: Paraguay', + '🇶🇦': 'flag: Qatar', + '🇷🇪': 'flag: Réunion', + '🇷🇴': 'flag: Romania', + '🇷🇸': 'flag: Serbia', + '🇷🇺': 'flag: Russia', + '🇷🇼': 'flag: Rwanda', + '🇸🇦': 'flag: Saudi Arabia', + '🇸🇧': 'flag: Solomon Islands', + '🇸🇨': 'flag: Seychelles', + '🇸🇩': 'flag: Sudan', + '🇸🇪': 'flag: Sweden', + '🇸🇬': 'flag: Singapore', + '🇸🇭': 'flag: St. Helena', + '🇸🇮': 'flag: Slovenia', + '🇸🇯': 'flag: Svalbard & Jan Mayen', + '🇸🇰': 'flag: Slovakia', + '🇸🇱': 'flag: Sierra Leone', + '🇸🇲': 'flag: San Marino', + '🇸🇳': 'flag: Senegal', + '🇸🇴': 'flag: Somalia', + '🇸🇷': 'flag: Suriname', + '🇸🇸': 'flag: South Sudan', + '🇸🇹': 'flag: São Tomé & Príncipe', + '🇸🇻': 'flag: El Salvador', + '🇸🇽': 'flag: Sint Maarten', + '🇸🇾': 'flag: Syria', + '🇸🇿': 'flag: Eswatini', + '🇹🇦': 'flag: Tristan da Cunha', + '🇹🇨': 'flag: Turks & Caicos Islands', + '🇹🇩': 'flag: Chad', + '🇹🇫': 'flag: French Southern Territories', + '🇹🇬': 'flag: Togo', + '🇹🇭': 'flag: Thailand', + '🇹🇯': 'flag: Tajikistan', + '🇹🇰': 'flag: Tokelau', + '🇹🇱': 'flag: Timor-Leste', + '🇹🇲': 'flag: Turkmenistan', + '🇹🇳': 'flag: Tunisia', + '🇹🇴': 'flag: Tonga', + '🇹🇷': 'flag: Turkey', + '🇹🇹': 'flag: Trinidad & Tobago', + '🇹🇻': 'flag: Tuvalu', + '🇹🇼': 'flag: Taiwan', + '🇹🇿': 'flag: Tanzania', + '🇺🇦': 'flag: Ukraine', + '🇺🇬': 'flag: Uganda', + '🇺🇲': 'flag: U.S. Outlying Islands', + '🇺🇳': 'flag: United Nations', + '🇺🇸': 'flag: United States', + '🇺🇾': 'flag: Uruguay', + '🇺🇿': 'flag: Uzbekistan', + '🇻🇦': 'flag: Vatican City', + '🇻🇨': 'flag: St. Vincent & Grenadines', + '🇻🇪': 'flag: Venezuela', + '🇻🇬': 'flag: British Virgin Islands', + '🇻🇮': 'flag: U.S. Virgin Islands', + '🇻🇳': 'flag: Vietnam', + '🇻🇺': 'flag: Vanuatu', + '🇼🇫': 'flag: Wallis & Futuna', + '🇼🇸': 'flag: Samoa', + '🇽🇰': 'flag: Kosovo', + '🇾🇪': 'flag: Yemen', + '🇾🇹': 'flag: Mayotte', + '🇿🇦': 'flag: South Africa', + '🇿🇲': 'flag: Zambia', + '🇿🇼': 'flag: Zimbabwe', + '🏴󠁧󠁢󠁥󠁮󠁧󠁿': 'flag: England', + '🏴󠁧󠁢󠁳󠁣󠁴󠁿': 'flag: Scotland', + '🏴󠁧󠁢󠁷󠁬󠁳󠁿': 'flag: Wales', +}; +const isEmoji = (str) => { + const regex = getRegex(); + const emojiMatches = str.match(regex); + const emojiString = emojiMatches ? emojiMatches.join('') : ''; + return !/\d/.test(str) && emojiString === str; +}; +const parseEmoji = (style, str, size = 16) => { + switch (style) { + case 'twemoji': + return twemoji.parse(str, { + folder: 'svg', + ext: '.svg', + attributes: () => ({ + width: `${size}px`, + height: `${size}px`, + }), + }); + case 'native': + return str; + default: + return null; + } +}; +/** + * Gets the shortcode for a given emoji by the name of the emoji. This function replaces + * spaces with underscores and removes colons. + * @param key String to replace with shortcode. + * @returns String with shortcode, or `undefined` if no shortcode exists. + */ +const getShortcode = (key) => { + var _a; + // Removable of colons is necessary for the flag shortcodes. + return (_a = shortNames[key]) === null || _a === void 0 ? void 0 : _a.replace(/\s/g, '_').replace(/:/g, '').toLowerCase(); +}; +var emoji = { + shortNames, + isEmoji, + getShortcode, + parseEmoji, + getRegex, +}; + +// Default obsidian file icon. +const DEFAULT_FILE_ICON = ''; +// Default obsidian folder icon. +const DEFAULT_FOLDER_ICON = ''; +/** + * Tries to read the file synchronously. + * @param file File that will be read. + * @returns A promise that will resolve to a string which is the content of the file. + */ +const readFileSync = (file) => __awaiter(void 0, void 0, void 0, function* () { + const content = yield new Promise((resolve) => { + const reader = new FileReader(); + reader.readAsText(file, 'UTF-8'); + reader.onload = (readerEvent) => resolve(readerEvent.target.result); + }); + return content; +}); +/** + * Gets all the currently opened files by getting the markdown leaves and then checking + * for the `file` property in the view. This also returns the leaf of the file. + * @param plugin Instance of the IconizePlugin. + * @returns An array of {@link FileWithLeaf} objects. + */ +const getAllOpenedFiles = (plugin) => { + return plugin.app.workspace + .getLeavesOfType('markdown') + .reduce((prev, curr) => { + const file = curr.view.file; + if (file) { + prev.push(Object.assign(Object.assign({}, file), { leaf: curr, pinned: false })); + } + return prev; + }, []); +}; +/** + * Gets the file item title element by either accessing `titleEl` or `selfEl`. + * @param fileItem FileItem which will be used to retrieve the title element from. + * @returns HTMLElement which is the title element. + */ +const getFileItemTitleEl = (fileItem) => { + var _a; + return (_a = fileItem.titleEl) !== null && _a !== void 0 ? _a : fileItem.selfEl; +}; +/** + * Gets the file item inner title element by either accessing `titleInnerEl` or `innerEl`. + * @param fileItem FileItem which will be used to retrieve the inner title element from. + * @returns HTMLElement which is the inner title element. + */ +const getFileItemInnerTitleEl = (fileItem) => { + var _a; + return (_a = fileItem.titleInnerEl) !== null && _a !== void 0 ? _a : fileItem.innerEl; +}; +/** + * A utility function which will add the icon to the icon pack and then extract the icon + * to the icon pack. + * @param plugin IconizePlugin that will be used for extracting the icon. + * @param iconNameWithPrefix String that will be used to add the icon to the icon pack. + */ +const saveIconToIconPack = (plugin, iconNameWithPrefix) => { + const iconNextIdentifier = nextIdentifier(iconNameWithPrefix); + const iconName = iconNameWithPrefix.substring(iconNextIdentifier); + const iconPrefix = iconNameWithPrefix.substring(0, iconNextIdentifier); + const possibleIcon = getSvgFromLoadedIcon(iconPrefix, iconName); + if (!possibleIcon) { + throw new Error(`Icon ${iconNameWithPrefix} could not be found.`); + } + const iconPackName = getIconPackNameByPrefix(iconPrefix); + if (iconPackName === LUCIDE_ICON_PACK_NAME && + !plugin.doesUseCustomLucideIconPack()) { + return; + } + const icon = getIconFromIconPack(iconPackName, iconPrefix, iconName); + extractIconToIconPack(plugin, icon, possibleIcon); +}; +/** + * A utility function which will remove the icon from the icon pack by removing the icon + * file from the icon pack directory. + * @param plugin IconizePlugin that will be used for removing the icon. + * @param iconNameWithPrefix String that will be used to remove the icon from the icon pack. + */ +const removeIconFromIconPack = (plugin, iconNameWithPrefix) => { + const identifier = nextIdentifier(iconNameWithPrefix); + const prefix = iconNameWithPrefix.substring(0, identifier); + const iconName = iconNameWithPrefix.substring(identifier); + const iconPackName = getIconPackNameByPrefix(prefix); + const duplicatedIcon = plugin.getDataPathByValue(iconNameWithPrefix); + if (!duplicatedIcon) { + removeIconFromIconPackDirectory(plugin, iconPackName, iconName); + } +}; +/** + * A utility function which will convert a string to a hexadecimal color. + * @param str String that will be converted to a hexadecimal color. + * @returns A string which is the hexadecimal color. + */ +const stringToHex = (str) => { + const validHex = str.replace(/[^0-9a-fA-F]/g, ''); + const hex = validHex.padStart(6, '0').substring(0, 6); + return `#${hex}`; +}; +/** + * A utility function which will check if a string is a hexadecimal color. + * @param str String that will be checked if it is a hexadecimal color. + * @param includeHash Boolean which will include the hash in the check. + * @returns A boolean which is true if the string is a hexadecimal color. + */ +const isHexadecimal = (str, includeHash = false) => { + const regex = new RegExp(`^${includeHash ? '#' : ''}[0-9A-Fa-f]{1,6}$`); + return regex.test(str); +}; + +// This library file does not include any other dependency and is a standalone file that +// only include utility functions for setting styles for nodes or icons. The only +// dependency is the `svg` library. +/** + * Sets the margin for a specific node. + * @param el Node where the margin will be set. + * @param margin Margin that will be applied to the node. + * @returns The modified node with the applied margin. + */ +const setMargin = (el, margin) => { + el.style.margin = `${margin.top}px ${margin.right}px ${margin.bottom}px ${margin.left}px`; + return el; +}; +/** + * Applies all stylings to the specified svg icon string and applies styling to the node + * (container). The styling to the specified element is only modified when it is an emoji + * or extra margin is defined in the settings. + * @param plugin Instance of the IconizePlugin. + * @param iconString SVG that will be used to apply the svg styles to. + * @param el Node for manipulating the style. + * @returns Icon svg string with the manipulate style attributes. + */ +const applyAll = (plugin, iconString, container) => { + iconString = svg.setFontSize(iconString, plugin.getSettings().fontSize); + container.style.color = plugin.getSettings().iconColor; + iconString = svg.colorize(iconString, plugin.getSettings().iconColor); + // Sets the margin of an element. + const margin = plugin.getSettings().extraMargin; + const normalizedMargin = { + top: margin.top !== undefined ? margin.top : 4, + right: margin.right !== undefined ? margin.right : 4, + left: margin.left !== undefined ? margin.left : 4, + bottom: margin.bottom !== undefined ? margin.bottom : 4, + }; + if (plugin.getSettings().extraMargin) { + setMargin(container, normalizedMargin); + } + if (emoji.isEmoji(iconString)) { + container.style.fontSize = `${plugin.getSettings().fontSize}px`; + container.style.lineHeight = `${plugin.getSettings().fontSize}px`; + } + return iconString; +}; +/** + * Refreshes all the styles of all the applied icons where a `.iconize-icon` + * class is defined. This function only modifies the styling of the node. + * @param plugin Instance of the IconizePlugin. + * @param applyStyles Function that is getting called when the icon node is found and + * typically applies all the styles to the icon. + */ +const refreshIconNodes = (plugin, applyStyles = applyAll) => { + const fileExplorers = plugin.app.workspace.getLeavesOfType('file-explorer'); + for (const fileExplorer of fileExplorers) { + Object.keys(plugin.getData()).forEach((path) => { + const fileItem = fileExplorer.view.fileItems[path]; + if (fileItem) { + const titleEl = getFileItemTitleEl(fileItem); + const iconNode = titleEl.querySelector('.iconize-icon'); + if (iconNode) { + const pathValue = plugin.getData()[path]; + const hasIndividualColor = typeof pathValue === 'object' && pathValue.iconColor; + iconNode.innerHTML = applyStyles(plugin, iconNode.innerHTML, iconNode); + if (hasIndividualColor) { + iconNode.style.color = pathValue.iconColor; + const colorizedInnerHtml = svg.colorize(iconNode.innerHTML, pathValue.iconColor); + iconNode.innerHTML = colorizedInnerHtml; + } + } + } + }); + } +}; +var style = { + applyAll, + setMargin, + refreshIconNodes, +}; + +/** + * Removes the `iconize-icon` icon node from the provided HTMLElement. + * @param el HTMLElement from which the icon node will be removed. + */ +const removeIconInNode = (el) => { + const iconNode = el.querySelector('.iconize-icon'); + if (!iconNode) { + return; + } + iconNode.remove(); +}; +/** + * Removes the 'iconize-icon' icon node from the HTMLElement corresponding + * to the specified file path. + * @param path File path for which the icon node will be removed. + */ +const removeIconInPath = (path, options) => { + var _a; + const node = (_a = options === null || options === void 0 ? void 0 : options.container) !== null && _a !== void 0 ? _a : document.querySelector(`[data-path="${path}"]`); + if (!node) { + logger.warn(`Element with data path not found (path: ${path})`); + return; + } + removeIconInNode(node); +}; +/** + * Sets an icon or emoji for an HTMLElement based on the specified icon name and color. + * The function manipulates the specified node inline. + * @param plugin Instance of the IconizePlugin. + * @param iconName Name of the icon or emoji to add. + * @param node HTMLElement to which the icon or emoji will be added. + * @param options Options for adjusting settings while the icon is being set. + */ +const setIconForNode = (plugin, iconName, node, options) => { + var _a, _b; + options !== null && options !== void 0 ? options : (options = {}); + (_a = options.shouldApplyAllStyles) !== null && _a !== void 0 ? _a : (options.shouldApplyAllStyles = true); + // Gets the possible icon based on the icon name. + const iconNextIdentifier = nextIdentifier(iconName); + const possibleIcon = getSvgFromLoadedIcon(iconName.substring(0, iconNextIdentifier), iconName.substring(iconNextIdentifier)); + if (possibleIcon) { + // The icon is possibly not an emoji. + let iconContent = (options === null || options === void 0 ? void 0 : options.shouldApplyAllStyles) + ? style.applyAll(plugin, possibleIcon, node) + : possibleIcon; + if (options === null || options === void 0 ? void 0 : options.color) { + node.style.color = options.color; + iconContent = svg.colorize(iconContent, options.color); + } + node.innerHTML = iconContent; + } + else { + const parsedEmoji = (_b = emoji.parseEmoji(plugin.getSettings().emojiStyle, iconName)) !== null && _b !== void 0 ? _b : iconName; + node.innerHTML = (options === null || options === void 0 ? void 0 : options.shouldApplyAllStyles) + ? style.applyAll(plugin, parsedEmoji, node) + : parsedEmoji; + } + node.setAttribute('title', iconName); +}; +/** + * Creates an icon node for the specified path and inserts it to the DOM. + * @param plugin Instance of the IconizePlugin. + * @param path Path for which the icon node will be created. + * @param iconName Name of the icon or emoji to add. + * @param color Optional color of the icon to add. + */ +const createIconNode = (plugin, path, iconName, options) => { + var _a; + // Get the container from the provided options or try to find the node that has the + // path from the document itself. + const node = (_a = options === null || options === void 0 ? void 0 : options.container) !== null && _a !== void 0 ? _a : document.querySelector(`[data-path="${path}"]`); + if (!node) { + logger.warn(`Element with data path not found (path: ${path})`); + return; + } + // Get the folder or file title node. + let titleNode = node.querySelector('.nav-folder-title-content'); + if (!titleNode) { + titleNode = node.querySelector('.nav-file-title-content'); + if (!titleNode) { + logger.warn(`Element with title node not found (path: ${path})`); + return; + } + } + let iconNode = node.querySelector('.iconize-icon'); + // If the icon is already set in the path, we do not need to create a new div element. + if (iconNode) { + setIconForNode(plugin, iconName, iconNode, { color: options === null || options === void 0 ? void 0 : options.color }); + } + else { + // Creates a new icon node and inserts it to the DOM. + iconNode = document.createElement('div'); + iconNode.setAttribute(config.ICON_ATTRIBUTE_NAME, iconName); + iconNode.classList.add('iconize-icon'); + setIconForNode(plugin, iconName, iconNode, { color: options === null || options === void 0 ? void 0 : options.color }); + node.insertBefore(iconNode, titleNode); + } +}; +/** + * Checks if the element has an icon node by checking if the element has a child with the + * class `iconize-icon`. + * @param element HTMLElement which will be checked if it has an icon. + * @returns Boolean whether the element has an icon node or not. + */ +const doesElementHasIconNode = (element) => { + return element.querySelector('.iconize-icon') !== null; +}; +/** + * Gets the icon name of the element if it has an icon node. + * @param element HTMLElement parent which includes a node with the icon. + * @returns String with the icon name if the element has an icon, `undefined` otherwise. + */ +const getIconFromElement = (element) => { + const iconNode = element.querySelector('.iconize-icon'); + const existingIcon = iconNode === null || iconNode === void 0 ? void 0 : iconNode.getAttribute(config.ICON_ATTRIBUTE_NAME); + return existingIcon; +}; +const getIconNodeFromPath = (path) => { + var _a; + return (_a = document + .querySelector(`[data-path="${path}"]`)) === null || _a === void 0 ? void 0 : _a.querySelector('[data-icon]'); +}; +var dom = { + setIconForNode, + createIconNode, + doesElementHasIconNode, + getIconFromElement, + getIconNodeFromPath, + removeIconInNode, + removeIconInPath, +}; + +class IconsPickerModal extends obsidian.FuzzySuggestModal { + constructor(app, plugin, path) { + super(app); + this.renderIndex = 0; + this.plugin = plugin; + this.path = path; + this.limit = 150; + const pluginRecentltyUsedItems = [ + ...plugin.getSettings().recentlyUsedIcons, + ]; + this.recentlyUsedItems = new Set(pluginRecentltyUsedItems.reverse().filter((iconName) => { + return doesIconExists(iconName) || emoji.isEmoji(iconName); + })); + this.resultContainerEl.classList.add('iconize-modal'); + } + onOpen() { + super.onOpen(); + } + onClose() { + const { contentEl } = this; + contentEl.empty(); + } + getItemText(item) { + return `${item.name} (${item.prefix})`; + } + getItems() { + const iconKeys = []; + if (this.inputEl.value.length === 0) { + this.renderIndex = 0; + this.recentlyUsedItems.forEach((iconName) => { + if (emoji.isEmoji(iconName)) { + iconKeys.push({ + name: emoji.shortNames[iconName], + prefix: 'Emoji', + displayName: iconName, + iconPackName: null, + }); + return; + } + const nextLetter = nextIdentifier(iconName); + const iconPrefix = iconName.substring(0, nextLetter); + const iconPackName = getIconPackNameByPrefix(iconPrefix); + iconKeys.push({ + name: iconName.substring(nextLetter), + prefix: iconPrefix, + displayName: iconName, + iconPackName: iconPackName, + }); + }); + } + for (const icon of getAllLoadedIconNames()) { + iconKeys.push({ + name: icon.name, + prefix: icon.prefix, + displayName: icon.prefix + icon.name, + iconPackName: icon.iconPackName, + }); + } + Object.entries(emoji.shortNames).forEach(([unicode, shortName]) => { + iconKeys.push({ + name: shortName, + prefix: 'Emoji', + displayName: unicode, + iconPackName: null, + }); + iconKeys.push({ + name: unicode, + prefix: 'Emoji', + displayName: unicode, + iconPackName: null, + }); + }); + return iconKeys; + } + onChooseItem(item) { + var _a; + const iconNameWithPrefix = typeof item === 'object' ? item.displayName : item; + dom.createIconNode(this.plugin, this.path, iconNameWithPrefix); + (_a = this.onSelect) === null || _a === void 0 ? void 0 : _a.call(this, iconNameWithPrefix); + this.plugin.addFolderIcon(this.path, item); + // Extracts the icon file to the icon pack. + if (typeof item === 'object' && !emoji.isEmoji(iconNameWithPrefix)) { + saveIconToIconPack(this.plugin, iconNameWithPrefix); + } + this.plugin.notifyPlugins(); + } + renderSuggestion(item, el) { + super.renderSuggestion(item, el); + // if (getAllIconPacks().length === 0) { + // this.resultContainerEl.style.display = 'block'; + // this.resultContainerEl.innerHTML = '
You need to create an icon pack.
'; + // return; + // } + // Render subheadlines for modal. + if (this.recentlyUsedItems.size !== 0 && this.inputEl.value.length === 0) { + if (this.renderIndex === 0) { + const subheadline = this.resultContainerEl.createDiv(); + subheadline.classList.add('iconize-subheadline'); + subheadline.innerText = 'Recently used Icons:'; + this.resultContainerEl.prepend(subheadline); + } + else if (this.renderIndex === this.recentlyUsedItems.size - 1) { + const subheadline = this.resultContainerEl.createDiv(); + subheadline.classList.add('iconize-subheadline'); + subheadline.innerText = 'All Icons:'; + this.resultContainerEl.append(subheadline); + } + } + if (item.item.name !== 'default') { + if (item.item.prefix === 'Emoji') { + const displayName = emoji.parseEmoji(this.plugin.getSettings().emojiStyle, item.item.displayName); + if (!displayName) { + return; + } + el.innerHTML = `
${el.innerHTML}
${displayName}
`; + } + else { + el.innerHTML = `
${el.innerHTML}
${getSvgFromLoadedIcon(item.item.prefix, item.item.name)}
`; + } + } + this.renderIndex++; + } +} + +var IconInTitlePosition; +(function (IconInTitlePosition) { + IconInTitlePosition["Above"] = "above"; + IconInTitlePosition["Inline"] = "inline"; +})(IconInTitlePosition || (IconInTitlePosition = {})); +const DEFAULT_SETTINGS = { + migrated: 2, + iconPacksPath: '.obsidian/icons', + fontSize: 16, + emojiStyle: 'native', + iconColor: null, + recentlyUsedIcons: [], + recentlyUsedIconsSize: 5, + rules: [], + extraMargin: { + top: 0, + right: 4, + bottom: 0, + left: 0, + }, + iconInTabsEnabled: false, + iconInTitleEnabled: false, + iconInTitlePosition: IconInTitlePosition.Above, + iconInFrontmatterEnabled: false, + iconInFrontmatterFieldName: 'icon', + iconColorInFrontmatterFieldName: 'iconColor', + iconsBackgroundCheckEnabled: false, + iconsInNotesEnabled: true, + iconsInLinksEnabled: true, + iconIdentifier: ':', + lucideIconPackType: 'native', + debugMode: false, + useInternalPlugins: false, +}; + +function migrate$5(plugin) { + return __awaiter(this, void 0, void 0, function* () { + // Migration for new syncing mechanism. + if (plugin.getSettings().migrated === 1) { + new obsidian.Notice('Please delete your old icon packs and redownload your icon packs to use the new syncing mechanism.', 20000); + plugin.getSettings().migrated++; + } + }); +} + +function migrate$4(plugin) { + return __awaiter(this, void 0, void 0, function* () { + // Migration for new order functionality of custom rules. + if (plugin.getSettings().migrated === 2) { + // Sorting alphabetically was the default behavior before. + plugin + .getSettings() + .rules.sort((a, b) => a.rule.localeCompare(b.rule)) + .forEach((rule, i) => { + rule.order = i; + }); + plugin.getSettings().migrated++; + } + }); +} + +class IconCache { + constructor() { + this.cache = new Map(); + this.set = (path, result) => { + this.cache.set(path, result); + }; + this.invalidate = (path) => { + this.cache.delete(path); + }; + this.clear = () => { + this.cache.clear(); + }; + this.get = (path) => { + var _a; + return (_a = this.cache.get(path)) !== null && _a !== void 0 ? _a : null; + }; + this.doesRecordExist = (path) => { + return this.get(path) !== null; + }; + if (IconCache.instance) { + throw new Error('Error: Instantiation failed: Use `IconCache.getInstance()` instead of new.'); + } + IconCache.instance = this; + } +} +IconCache.instance = new IconCache(); +IconCache.getInstance = () => { + return IconCache.instance; +}; + +/** + * Checks if the file type is equal to the `for` property of the custom rule. + * @param rule CustomRule that will be checked. + * @param fileType CustomRuleFileType that will be checked. Can be either `file` or `folder`. + * @returns Boolean whether the custom rule `for` matches the file type or not. + */ +const doesMatchFileType = (rule, fileType) => { + return (rule.for === 'everything' || + (rule.for === 'files' && fileType === 'file') || + (rule.for === 'folders' && fileType === 'folder')); +}; +/** + * Determines whether a given file or folder matches a specified custom rule. + * @param plugin Plugin instance. + * @param rule CustomRule to check against the file or folder. + * @param filePath String to check against the custom rule. + * @returns Promise that resolves to `true` if the file matches the rule, `false` otherwise. + */ +const isApplicable = (plugin, rule, filePath) => __awaiter(void 0, void 0, void 0, function* () { + const metadata = yield plugin.app.vault.adapter.stat(filePath); + if (!metadata) { + return false; + } + const fileType = metadata.type; + const doesMatch = doesMatchFileType(rule, fileType); + if (!doesMatch) { + return false; + } + return doesMatchPath(rule, filePath); +}); +/** + * Removes the icon from the custom rule from all the files and folders, if applicable. + * @param plugin IconizePlugin instance. + * @param rule CustomRule where the icons will be removed based on this rule. + */ +const removeFromAllFiles = (plugin, rule) => __awaiter(void 0, void 0, void 0, function* () { + const nodesWithIcon = document.querySelectorAll(`[${config.ICON_ATTRIBUTE_NAME}="${rule.icon}"]`); + for (let i = 0; i < nodesWithIcon.length; i++) { + const node = nodesWithIcon[i]; + // Parent element is the node which contains the data path. + const parent = node.parentElement; + if (!parent) { + continue; + } + const dataPath = parent.getAttribute('data-path'); + if (!dataPath) { + continue; + } + const fileType = (yield plugin.app.vault.adapter.stat(dataPath)).type; + if (doesMatchPath(rule, dataPath) && doesMatchFileType(rule, fileType)) { + dom.removeIconInNode(parent); + IconCache.getInstance().invalidate(dataPath); + } + } +}); +/** + * Gets all the custom rules sorted by their order property in ascending order. + * @param plugin IconizePlugin instance. + * @returns CustomRule array sorted by their order property in ascending order. + */ +const getSortedRules = (plugin) => { + return plugin.getSettings().rules.sort((a, b) => a.order - b.order); +}; +/** + * Tries to add all specific custom rule icons to all registered files and directories. + * It does that by calling the {@link add} function. Custom rules should have the lowest + * priority and will get ignored if an icon already exists in the file or directory. + * @param plugin IconizePlugin instance. + * @param rule CustomRule that will be applied, if applicable, to all files and folders. + */ +const addToAllFiles = (plugin, rule) => __awaiter(void 0, void 0, void 0, function* () { + const fileItems = yield getFileItems(plugin, rule); + for (const fileItem of fileItems) { + yield add$2(plugin, rule, fileItem.file, getFileItemTitleEl(fileItem)); + } +}); +/** + * Tries to add the icon of the custom rule to a file or folder. This function also checks + * if the file type matches the `for` property of the custom rule. + * @param plugin IconizePlugin instance. + * @param rule CustomRule that will be used to check if the rule is applicable to the file + * or directory. + * @param file TAbstractFile that will be used to possibly create the icon for. + * @param container HTMLElement where the icon will be added if the custom rules matches. + * @returns A promise that resolves to `true` if the icon was added, `false` otherwise. + */ +const add$2 = (plugin, rule, file, container) => __awaiter(void 0, void 0, void 0, function* () { + if (container && dom.doesElementHasIconNode(container)) { + return false; + } + // Checks if the file or directory already has an icon. + const hasIcon = plugin.getIconNameFromPath(file.path); + if (hasIcon) { + return false; + } + const doesMatch = yield isApplicable(plugin, rule, file.path); + if (doesMatch) { + IconCache.getInstance().set(file.path, { + iconNameWithPrefix: rule.icon, + inCustomRule: true, + }); + dom.createIconNode(plugin, file.path, rule.icon, { + color: rule.color, + container, + }); + return true; + } + return false; +}); +/** + * Determines whether a given rule exists in a given path. + * @param rule Rule to check for. + * @param path Path to check in. + * @returns True if the rule exists in the path, false otherwise. + */ +const doesMatchPath = (rule, path) => { + const toMatch = rule.useFilePath ? path : path.split('/').pop(); + try { + // Rule is in some sort of regex. + const regex = new RegExp(rule.rule); + if (toMatch.match(regex)) { + return true; + } + } + catch (_a) { + // Rule is not in some sort of regex, check for basic string match. + return toMatch.includes(rule.rule); + } + return false; +}; +/** + * Gets all the file items that can be applied to the specific custom rule. + * @param plugin Instance of IconizePlugin. + * @param rule Custom rule that will be checked for. + * @returns A promise that resolves to an array of file items that match the custom rule. + */ +const getFileItems = (plugin, rule) => __awaiter(void 0, void 0, void 0, function* () { + const result = []; + for (const fileExplorer of plugin.getRegisteredFileExplorers()) { + const files = Object.values(fileExplorer.fileItems || {}); + for (const fileItem of files) { + if (yield isApplicable(plugin, rule, fileItem.file.path)) { + result.push(fileItem); + } + } + } + return result; +}); +var customRule = { + getFileItems, + doesMatchPath, + doesMatchFileType, + getSortedRules, + removeFromAllFiles, + add: add$2, + addToAllFiles, + isApplicable, +}; + +function migrate$3(plugin) { + return __awaiter(this, void 0, void 0, function* () { + // Migration for inheritance to custom rule. + if (plugin.getSettings().migrated === 3) { + let hasRemovedInheritance = false; + for (const [key, value] of Object.entries(plugin.getData())) { + if (key === 'settings' || typeof value !== 'object') { + continue; + } + const folderData = value; + const inheritanceIcon = folderData.inheritanceIcon; + if (!inheritanceIcon) { + continue; + } + const folderIconName = folderData.iconName; + // Clean up old data. + if (folderData.iconColor && folderIconName) { + delete folderData.inheritanceIcon; + } + else if (folderIconName) { + delete plugin.getData()[key]; + plugin.getData()[key] = folderIconName; + } + else if (!folderIconName) { + delete plugin.getData()[key]; + } + const folderPath = key + '\\/[\\w\\d\\s]+'; + const newRule = { + icon: inheritanceIcon, + rule: `${folderPath}\\.(?:\\w+\\.)*\\w+`, + for: 'files', + order: 0, + useFilePath: true, + }; + // Reorder existing custom rules so that the new inheritance custom rule + // is at the top. + plugin.getSettings().rules.map((rule) => { + rule.order++; + }); + plugin.getSettings().rules.unshift(newRule); + // Apply the custom rule. + yield customRule.addToAllFiles(plugin, newRule); + hasRemovedInheritance = true; + } + if (hasRemovedInheritance) { + new obsidian.Notice(`[${config.PLUGIN_NAME}] Inheritance has been removed and replaced with custom rules.`); + } + plugin.getSettings().migrated++; + } + }); +} + +function migrate$2(plugin) { + return __awaiter(this, void 0, void 0, function* () { + if (plugin.getSettings().migrated === 4) { + if (plugin.getSettings().emojiStyle === 'none') { + plugin.getSettings().emojiStyle = 'native'; + } + plugin.getSettings().migrated++; + } + }); +} + +function migrate$1(plugin) { + return __awaiter(this, void 0, void 0, function* () { + if (plugin.getSettings().migrated === 5) { + yield deleteIconPack(plugin, LUCIDE_ICON_PACK_NAME); + plugin.getSettings().migrated++; + } + }); +} + +const migrate = (plugin) => __awaiter(void 0, void 0, void 0, function* () { + // eslint-disable-next-line + // @ts-ignore - Required because an older version of the plugin saved the `migrated` + // property as a boolean instead of a number. + if (plugin.getSettings().migrated === true) { + plugin.getSettings().migrated = 1; + } + yield migrate$5(plugin); + yield migrate$4(plugin); + yield migrate$3(plugin); + yield migrate$2(plugin); + yield migrate$1(plugin); + yield plugin.saveIconFolderData(); +}); + +class IconFolderSetting { + constructor(plugin, containerEl) { + this.plugin = plugin; + this.containerEl = containerEl; + } +} + +/** + * Gets the tab leaves of a specific file path by looping through all opened files and + * checking if the file path matches. + * @param plugin IconizePlugin instance. + * @param path String of the file path to get the tab leaf of. + * @returns TabHeaderLeaf array that includes all tab leaves of the file path. + */ +const getTabLeavesOfFilePath = (plugin, path) => { + const openedFiles = getAllOpenedFiles(plugin); + const openedFile = openedFiles.filter((openedFile) => openedFile.path === path); + const leaves = openedFile.map((openedFile) => openedFile.leaf); + return leaves; +}; +/** + * Adds an icon to the tab and its container. This function respects the + * custom rules and individually icon set. + * @param plugin IconizePlugin instance. + * @param filePath String file path to add the icon to. + * @param iconContainer HTMLElement where the icon will be added to. + * @param options AddOptions for the add function which can optionally be used. + */ +const add$1 = (plugin, filePath, iconContainer, options) => __awaiter(void 0, void 0, void 0, function* () { + var _a; + const iconColor = (_a = options === null || options === void 0 ? void 0 : options.iconColor) !== null && _a !== void 0 ? _a : plugin.getSettings().iconColor; + const data = Object.entries(plugin.getData()); + // Removes the `display: none` from the obsidian styling. + iconContainer.style.display = 'flex'; + // Only add the icon name manually when it is defined in the options. + if (options === null || options === void 0 ? void 0 : options.iconName) { + dom.setIconForNode(plugin, options.iconName, iconContainer, { + color: iconColor, + }); + // TODO: Refactor to include option to `insertIconToNode` function. + iconContainer.style.margin = null; + return; + } + // Add icons to tabs if a custom rule is applicable. + for (const rule of customRule.getSortedRules(plugin)) { + const isApplicable = yield customRule.isApplicable(plugin, rule, filePath); + if (isApplicable) { + dom.setIconForNode(plugin, rule.icon, iconContainer, { + color: rule.color, + }); + // TODO: Refactor to include option to `insertIconToNode` function. + iconContainer.style.margin = null; + break; + } + } + // Add icons to tabs if there is an icon set. + const iconData = data.find(([dataPath]) => dataPath === filePath); + if (!iconData) { + return; + } + const value = iconData[1]; + if (typeof value !== 'string' && typeof value !== 'object') { + return; + } + let iconName; + if (typeof value === 'object') { + const v = value; + if (v.iconName === null) { + return; + } + iconName = v.iconName; + } + else { + iconName = value; + } + dom.setIconForNode(plugin, iconName, iconContainer, { + color: iconColor, + shouldApplyAllStyles: true, + }); + // TODO: Refactor to include option to `insertIconToNode` function. + iconContainer.style.margin = null; +}); +/** + * Updates the icon in the tab and container by setting calling the `setIconForNode` + * function and removing the margin from the icon container. + * @param plugin IconizePlugin instance. + * @param iconName String of the icon name to update to. + * @param iconContainer HTMLElement where the icon is located and will be updated. + */ +const update = (plugin, iconName, iconContainer) => { + dom.setIconForNode(plugin, iconName, iconContainer); + // TODO: Refactor to include option to `insertIconToNode` function. + iconContainer.style.margin = null; +}; +/** + * Removes the icon from the tab and container by setting the `display` style property + * to `none`. Optionally, the icon can be replaced with the default obsidian icon. + * @param iconContainer HTMLElement where the icon is located and will be removed from. + * @param options RemoveOptions for the remove function which can optionally be used. + */ +const remove$1 = (iconContainer, options) => { + if (!(options === null || options === void 0 ? void 0 : options.replaceWithDefaultIcon)) { + // Removes the display of the icon container to remove the icons from the tabs. + iconContainer.style.display = 'none'; + } + else { + iconContainer.innerHTML = DEFAULT_FILE_ICON; + } +}; +var iconTabs = { + add: add$1, + update, + remove: remove$1, + getTabLeavesOfFilePath, +}; + +const checkMissingIcons = (plugin, data) => __awaiter(void 0, void 0, void 0, function* () { + const missingIcons = new Set(); + const allIcons = new Map(); + const getMissingIcon = (iconNameWithPrefix) => __awaiter(void 0, void 0, void 0, function* () { + const iconNextIdentifier = nextIdentifier(iconNameWithPrefix); + const iconName = iconNameWithPrefix.substring(iconNextIdentifier); + const iconPrefix = iconNameWithPrefix.substring(0, iconNextIdentifier); + const iconPackName = getIconPackNameByPrefix(iconPrefix); + if (iconPackName === LUCIDE_ICON_PACK_NAME && + !plugin.doesUseCustomLucideIconPack()) { + return; + } + const icon = getIconFromIconPack(iconPackName, iconPrefix, iconName); + if (!icon) { + logger.error(`Icon file with name ${iconNameWithPrefix} could not be found`); + return null; + } + const doesIconFileExists = yield plugin.app.vault.adapter.exists(`${getPath()}/${iconPackName}/${iconName}.svg`); + if (!doesIconFileExists) { + const possibleIcon = getSvgFromLoadedIcon(iconPrefix, iconName); + if (!possibleIcon) { + logger.error(`Icon SVG with name ${iconNameWithPrefix} could not be found`); + return null; + } + yield extractIconToIconPack(plugin, icon, possibleIcon); + return icon; + } + return null; + }); + for (const rule of plugin.getSettings().rules) { + if (!emoji.isEmoji(rule.icon)) { + allIcons.set(rule.icon, true); + const icon = yield getMissingIcon(rule.icon); + if (icon) { + missingIcons.add(icon); + } + } + } + for (const [_, value] of data) { + // Check for missing icon names. + let iconNameWithPrefix = value; + if (typeof value === 'object') { + iconNameWithPrefix = value.iconName; + } + if (iconNameWithPrefix && !emoji.isEmoji(iconNameWithPrefix)) { + allIcons.set(iconNameWithPrefix, true); + const icon = yield getMissingIcon(iconNameWithPrefix); + if (icon) { + missingIcons.add(icon); + } + } + } + // Show notice that background check is running. + if (missingIcons.size !== 0) { + new obsidian.Notice(`[${config.PLUGIN_NAME}] Background Check: found missing icons. Adding missing icons...`, 10000); + } + // Iterates over all the missing icons with its path and adds the icon to the node. + for (const icon of missingIcons) { + const normalizedName = getNormalizedName(icon.prefix + icon.name); + const nodesWithIcon = document.querySelectorAll(`[${config.ICON_ATTRIBUTE_NAME}="${normalizedName}"]`); + nodesWithIcon.forEach((node) => { + dom.setIconForNode(plugin, normalizedName, node); + }); + } + // Show notice that background check was finished. + if (missingIcons.size !== 0) { + new obsidian.Notice(`[${config.PLUGIN_NAME}] Background Check: added missing icons`, 10000); + } + // Remove all icon files that can not be found in the data. + for (const iconPack of getAllIconPacks()) { + // Checks if the icon pack exists. + const doesIconPackExist = yield plugin.app.vault.adapter.exists(`${getPath()}/${iconPack.name}`); + if (!doesIconPackExist) { + continue; + } + const iconFiles = yield plugin.app.vault.adapter.list(`${getPath()}/${iconPack.name}`); + for (const iconFilePath of iconFiles.files) { + const iconNameWithExtension = iconFilePath.split('/').pop(); + // Removes the file extension. + const iconName = iconNameWithExtension === null || iconNameWithExtension === void 0 ? void 0 : iconNameWithExtension.substring(0, iconNameWithExtension.length - 4); + const iconNameWithPrefix = iconPack.prefix + iconName; + const doesIconExist = allIcons.get(iconNameWithPrefix); + if (!doesIconExist) { + const path = `${getPath()}/${iconPack.name}/${iconName}.svg`; + const doesPathExist = yield plugin.app.vault.adapter.exists(path); + if (doesPathExist) { + logger.info(`Removing icon with path '${path}' because it is not used anymore`); + // Removes the icon file. + yield plugin.app.vault.adapter.remove(`${getPath()}/${iconPack.name}/${iconName}.svg`); + } + } + } + } +}); +/** + * This function adds all the possible icons to the corresponding nodes. It + * adds the icons, that are defined in the data as a basic string to the nodes + * and the custom rule icons. + * @param plugin Instance of IconizePlugin. + * @param data Data that will be used to add all the icons to the nodes. + * @param registeredFileExplorers A WeakSet of file explorers that are being used as a + * cache for already handled file explorers. + * @param callback Callback is being called whenever the icons are added to one file + * explorer. + */ +const addAll = (plugin, data, registeredFileExplorers, callback) => { + const fileExplorers = plugin.app.workspace.getLeavesOfType('file-explorer'); + for (const fileExplorer of fileExplorers) { + if (registeredFileExplorers.has(fileExplorer.view)) { + continue; + } + registeredFileExplorers.add(fileExplorer.view); + const setIcons = () => { + var _a, _b; + // Adds icons to already open file tabs. + if (plugin.getSettings().iconInTabsEnabled) { + for (const leaf of plugin.app.workspace.getLeavesOfType('markdown')) { + const filePath = (_b = (_a = leaf.view.file) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : leaf.view.getState().file; + if (typeof filePath === 'string') { + const tabHeaderLeaf = leaf; + const iconColor = plugin.getIconColor(filePath); + iconTabs.add(plugin, filePath, tabHeaderLeaf.tabHeaderInnerIconEl, { + iconColor, + }); + } + } + } + for (const [dataPath, value] of data) { + const fileItem = fileExplorer.view.fileItems[dataPath]; + if (fileItem) { + const titleEl = getFileItemTitleEl(fileItem); + const titleInnerEl = getFileItemInnerTitleEl(fileItem); + // Need to check this because refreshing the plugin will duplicate all the icons. + if (titleEl.children.length === 2 || titleEl.children.length === 1) { + const iconName = typeof value === 'string' ? value : value.iconName; + const iconColor = typeof value === 'string' ? undefined : value.iconColor; + if (iconName) { + // Removes a possible existing icon. + const existingIcon = titleEl.querySelector('.iconize-icon'); + if (existingIcon) { + existingIcon.remove(); + } + // Creates the new node with the icon inside. + const iconNode = titleEl.createDiv(); + iconNode.setAttribute(config.ICON_ATTRIBUTE_NAME, iconName); + iconNode.classList.add('iconize-icon'); + IconCache.getInstance().set(dataPath, { + iconNameWithPrefix: iconName, + }); + dom.setIconForNode(plugin, iconName, iconNode, { + color: iconColor, + }); + titleEl.insertBefore(iconNode, titleInnerEl); + } + } + } + } + // Callback function to register other events to this file explorer. + callback === null || callback === void 0 ? void 0 : callback(); + }; + if (obsidian.requireApiVersion('1.7.2')) { + // TODO: Remove loading deferred view to improve performance. + fileExplorer.loadIfDeferred().then(setIcons); + } + else { + setIcons(); + } + } + // Handles the custom rules. + for (const rule of customRule.getSortedRules(plugin)) { + customRule.addToAllFiles(plugin, rule); + } +}; +/** + * Gets the icon of a given path. This function returns the first occurrence of an icon. + * @param plugin Instance of the IconizePlugin. + * @param path Path to get the icon of. + * @returns The icon of the path if it exists, undefined otherwise. + */ +const getByPath = (plugin, path) => { + if (path === 'settings' || path === 'migrated') { + return undefined; + } + const value = plugin.getData()[path]; + if (typeof value === 'string') { + // If the value is a plain icon name, return it. + return value; + } + else if (typeof value === 'object') { + const v = value; + if (v.iconName !== null) { + return v.iconName; + } + } + // Tries to get the custom rule for the path and returns its icon if it exists. + const rule = customRule.getSortedRules(plugin).find((rule) => { + return customRule.doesMatchPath(rule, path); + }); + if (rule) { + return rule.icon; + } + return undefined; +}; +/** + * Gets all the icons with their paths as an object. + * @param plugin Instance of the IconizePlugin. + * @returns An object that consists of the path and the icon name for the data + * or custom rule. + */ +const getAllWithPath = (plugin) => { + const result = []; + Object.keys(plugin.getData()).forEach((path) => { + if (path === 'settings' || path === 'migrated') { + return; + } + const icon = getByPath(plugin, path); + if (icon && !emoji.isEmoji(icon)) { + result.push({ path, icon }); + } + }); + // Add all icons for the custom rules with the rule as the path. + for (const rule of plugin.getSettings().rules) { + if (!emoji.isEmoji(rule.icon)) { + result.push({ path: rule.rule, icon: rule.icon }); + } + } + return result; +}; +/** + * Returns the {@link Icon} for the given icon name. It is important, that the icon name + * contains the icon pack prefix. + * @param iconNameWithPrefix String that contains the icon pack prefix combined with the + * icon name. + * @returns Icon if it exists, `null` otherwise. + */ +const getIconByName = (iconNameWithPrefix) => { + const iconNextIdentifier = nextIdentifier(iconNameWithPrefix); + const iconName = iconNameWithPrefix.substring(iconNextIdentifier); + const iconPrefix = iconNameWithPrefix.substring(0, iconNextIdentifier); + const iconPackName = getIconPackNameByPrefix(iconPrefix); + const icon = getIconFromIconPack(iconPackName, iconPrefix, iconName); + if (!icon) { + return null; + } + return icon; +}; +/** + * Returns the {@link Icon} for the given path. + * @param plugin IconizePlugin instance. + * @param path String which is the path to get the icon of. + * @returns Icon or Emoji as string if it exists, `null` otherwise. + */ +const getIconByPath = (plugin, path) => { + const iconNameWithPrefix = getByPath(plugin, path); + if (!iconNameWithPrefix) { + return null; + } + if (emoji.isEmoji(iconNameWithPrefix)) { + return iconNameWithPrefix; + } + return getIconByName(iconNameWithPrefix); +}; +var icon = { + addAll, + getByPath, + getAllWithPath, + getIconByPath, + getIconByName, + checkMissingIcons, +}; + +class CustomIconPackSetting extends IconFolderSetting { + constructor(plugin, containerEl, refreshDisplay) { + super(plugin, containerEl); + this.refreshDisplay = refreshDisplay; + this.dragOverElement = document.createElement('div'); + this.dragOverElement.addClass('iconize-dragover-el'); + this.dragOverElement.style.display = 'hidden'; + this.dragOverElement.innerHTML = '

Drop to add icon.

'; + } + normalizeIconPackName(value) { + return value.toLowerCase().replace(/\s/g, '-'); + } + preventDefaults(event) { + event.preventDefault(); + event.stopPropagation(); + } + highlight(el) { + clearTimeout(this.closeTimer); + if (!this.dragTargetElement) { + el.appendChild(this.dragOverElement); + el.classList.add('iconize-dragover'); + this.dragTargetElement = el; + } + } + unhighlight(target, el) { + if (this.dragTargetElement && this.dragTargetElement !== target) { + this.dragTargetElement.removeChild(this.dragOverElement); + this.dragTargetElement.classList.remove('iconize-dragover'); + this.dragTargetElement = undefined; + } + clearTimeout(this.closeTimer); + this.closeTimer = setTimeout(() => { + if (this.dragTargetElement) { + el.removeChild(this.dragOverElement); + el.classList.remove('iconize-dragover'); + this.dragTargetElement = undefined; + } + }, 100); + } + display() { + new obsidian.Setting(this.containerEl) + .setName('Add custom icon pack') + .setDesc('Add a custom icon pack.') + .addText((text) => { + text.setPlaceholder('Your icon pack name'); + this.textComponent = text; + }) + .addButton((btn) => { + btn.setButtonText('Add icon pack'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + const name = this.textComponent.getValue(); + if (name.length === 0) { + return; + } + const normalizedName = this.normalizeIconPackName(this.textComponent.getValue()); + if (yield doesIconPackExist(this.plugin, normalizedName)) { + new obsidian.Notice('Icon pack already exists.'); + return; + } + yield createCustomIconPackDirectory(this.plugin, normalizedName); + this.textComponent.setValue(''); + this.refreshDisplay(); + new obsidian.Notice('Icon pack successfully created.'); + })); + }); + // Sorts lucide icon pack always to the top. + const iconPacks = [...getAllIconPacks()].sort((a, b) => { + if (a.name === LUCIDE_ICON_PACK_NAME) + return -1; + if (b.name === LUCIDE_ICON_PACK_NAME) + return 1; + return a.name.localeCompare(b.name); + }); + iconPacks.forEach((iconPack) => { + const isLucideIconPack = iconPack.name === LUCIDE_ICON_PACK_NAME; + const additionalLucideDescription = '(Native Pack has fewer icons but 100% Obsidian Sync support)'; + const iconPackSetting = new obsidian.Setting(this.containerEl) + .setName(`${iconPack.name} (${iconPack.prefix})`) + .setDesc(`Total icons: ${iconPack.icons.length}${isLucideIconPack ? ` ${additionalLucideDescription}` : ''}`); + // iconPackSetting.addButton((btn) => { + // btn.setIcon('broken-link'); + // btn.setTooltip('Try to fix icon pack'); + // btn.onClick(async () => { + // new Notice('Try to fix icon pack...'); + // getIconPack(iconPack.name).icons = []; + // const icons = await getFilesInDirectory(this.plugin, `${getPath()}/${iconPack.name}`); + // for (let i = 0; i < icons.length; i++) { + // const filePath = icons[i]; + // const fileName = filePath.split('/').pop(); + // const file = await this.plugin.app.vault.adapter.read(filePath); + // const iconContent = file + // .replace(/stroke="#fff"/g, 'stroke="currentColor"') + // .replace(/fill="#fff"/g, 'fill="currentColor"'); + // await this.plugin.app.vault.adapter.write(filePath, iconContent); + // await normalizeFileName(this.plugin, filePath); + // addIconToIconPack(iconPack.name, fileName, iconContent); + // } + // new Notice('...tried to fix icon pack'); + // // Refreshes the DOM. + // Object.entries(this.plugin.getData()).forEach(async ([k, v]) => { + // const doesPathExist = await this.plugin.app.vault.adapter.exists(k, true); + // if (doesPathExist && typeof v === 'string') { + // // dom.removeIconInPath(k); + // dom.createIconNode(this.plugin, k, v); + // } + // }); + // }); + // }); + if (isLucideIconPack) { + iconPackSetting.addDropdown((dropdown) => { + dropdown.addOptions({ + native: 'Native', + custom: 'Custom', + none: 'None', + }); + dropdown.setValue(this.plugin.getSettings().lucideIconPackType); + dropdown.onChange((value) => __awaiter(this, void 0, void 0, function* () { + dropdown.setDisabled(true); + new obsidian.Notice('Changing icon packs...'); + this.plugin.getSettings().lucideIconPackType = value; + yield this.plugin.saveIconFolderData(); + if (value === 'native' || value === 'none') { + yield removeCustomLucideIconPack(this.plugin); + addLucideIconsPack(this.plugin); + } + else { + yield addCustomLucideIconPack(this.plugin); + yield icon.checkMissingIcons(this.plugin, Object.entries(this.plugin.getData())); + } + dropdown.setDisabled(false); + new obsidian.Notice('Done. This change requires a restart of Obsidian'); + })); + }); + return; + } + iconPackSetting.addButton((btn) => { + btn.setIcon('plus'); + btn.setTooltip('Add an icon'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + const fileSelector = document.createElement('input'); + fileSelector.setAttribute('type', 'file'); + fileSelector.setAttribute('multiple', 'multiple'); + fileSelector.setAttribute('accept', '.svg'); + fileSelector.click(); + fileSelector.onchange = (e) => __awaiter(this, void 0, void 0, function* () { + const target = e.target; + for (let i = 0; i < target.files.length; i++) { + const file = target.files[i]; + const content = yield readFileSync(file); + yield createFile(this.plugin, iconPack.name, file.name, content); + addIconToIconPack(iconPack.name, file.name, content); + iconPackSetting.setDesc(`Total icons: ${iconPack.icons.length} (added: ${file.name})`); + } + new obsidian.Notice('Icons successfully added.'); + }); + })); + }); + iconPackSetting.addButton((btn) => { + btn.setIcon('trash'); + btn.setTooltip('Remove the icon pack'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + yield deleteIconPack(this.plugin, iconPack.name); + this.refreshDisplay(); + new obsidian.Notice('Icon pack successfully deleted.'); + })); + }); + ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((event) => { + iconPackSetting.settingEl.addEventListener(event, this.preventDefaults, false); + }); + ['dragenter', 'dragover'].forEach((event) => { + iconPackSetting.settingEl.addEventListener(event, () => this.highlight(iconPackSetting.settingEl), false); + }); + ['dragleave', 'drop'].forEach((event) => { + iconPackSetting.settingEl.addEventListener(event, (event) => this.unhighlight(event.currentTarget, iconPackSetting.settingEl), false); + }); + iconPackSetting.settingEl.addEventListener('drop', (event) => __awaiter(this, void 0, void 0, function* () { + const files = event.dataTransfer.files; + let successful = false; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + if (file.type !== 'image/svg+xml') { + new obsidian.Notice(`File ${file.name} is not a SVG file.`); + continue; + } + successful = true; + const content = yield readFileSync(file); + yield createFile(this.plugin, iconPack.name, file.name, content); + addIconToIconPack(iconPack.name, file.name, content); + iconPackSetting.setDesc(`Total icons: ${iconPack.icons.length} (added: ${file.name})`); + } + if (successful) { + new obsidian.Notice('Icons successfully added.'); + } + }), false); + }); + } +} + +class CustomIconRuleSetting extends IconFolderSetting { + constructor(plugin, containerEl, app, refreshDisplay) { + super(plugin, containerEl); + this.app = app; + this.refreshDisplay = refreshDisplay; + } + /** + * Updates all the open files based on the custom rule that was specified. + * @param rule Rule that will be used to update all the icons for all opened files. + * @param remove Whether to remove the icons that are applicable to the rule or not. + */ + updateIconTabs(rule_1, remove_1) { + return __awaiter(this, arguments, void 0, function* (rule, remove, cachedPaths = []) { + if (this.plugin.getSettings().iconInTabsEnabled) { + for (const openedFile of getAllOpenedFiles(this.plugin)) { + if (cachedPaths.includes(openedFile.path)) { + continue; + } + const applicable = yield customRule.isApplicable(this.plugin, rule, openedFile.path); + if (!applicable) { + continue; + } + const leaf = openedFile.leaf; + if (remove) { + iconTabs.remove(leaf.tabHeaderInnerIconEl, { + replaceWithDefaultIcon: true, + }); + } + else { + iconTabs.add(this.plugin, openedFile.path, leaf.tabHeaderInnerIconEl, { + iconName: rule.icon, + iconColor: rule.color, + }); + } + } + } + }); + } + createDescriptionEl(container, text) { + const description = container.createEl('p', { + text, + cls: 'setting-item-description', + }); + description.style.marginBottom = 'var(--size-2-2)'; + } + display() { + new obsidian.Setting(this.containerEl) + .setName('Add icon rule') + .setDesc('Will add the icon based on the defined rule (as a plain string or in regex format).') + .addText((text) => { + text.onChange((value) => { + this.chooseIconBtn.setDisabled(value.length === 0); + this.chooseIconBtn.buttonEl.style.cursor = + value.length === 0 ? 'not-allowed' : 'default'; + this.chooseIconBtn.buttonEl.style.opacity = + value.length === 0 ? '50%' : '100%'; + }); + text.setPlaceholder('regex or simple string'); + this.textComponent = text; + }) + .addButton((btn) => { + btn.setDisabled(true); + btn.setButtonText('Choose icon'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + if (this.textComponent.getValue().length === 0) { + return; + } + const modal = new IconsPickerModal(this.app, this.plugin, ''); + modal.onChooseItem = (item) => __awaiter(this, void 0, void 0, function* () { + const icon = getNormalizedName(typeof item === 'object' ? item.displayName : item); + const rule = { + rule: this.textComponent.getValue(), + icon, + for: 'everything', + order: this.plugin.getSettings().rules.length, + }; + this.plugin.getSettings().rules = [ + ...this.plugin.getSettings().rules, + rule, + ]; + yield this.plugin.saveIconFolderData(); + this.refreshDisplay(); + new obsidian.Notice('Icon rule added.'); + this.textComponent.setValue(''); + saveIconToIconPack(this.plugin, rule.icon); + yield customRule.addToAllFiles(this.plugin, rule); + this.updateIconTabs(rule, false); + }); + modal.open(); + })); + this.chooseIconBtn = btn; + }); + this.plugin.getSettings().rules.forEach((rule) => { + // Keeping track of the old rule so that we can get a reference to it for old values. + const oldRule = Object.assign({}, rule); + const settingRuleEl = new obsidian.Setting(this.containerEl) + .setName(rule.rule) + .setDesc(`Icon: ${rule.icon}`); + const currentOrder = rule.order; + /** + * Re-orders the custom rule based on the value that is passed in. + * @param valueForReorder Number that will be used to determine whether to swap the + * custom rule with the next rule or the previous rule. + */ + const orderCustomRules = (valueForReorder) => __awaiter(this, void 0, void 0, function* () { + const otherRule = this.plugin.getSettings().rules[currentOrder + valueForReorder]; + // Swap the current rule with the next rule. + otherRule.order = otherRule.order - valueForReorder; + rule.order = currentOrder + valueForReorder; + // Refreshes the DOM. + yield customRule.removeFromAllFiles(this.plugin, oldRule); + yield this.plugin.saveIconFolderData(); + const addedPaths = []; + for (const fileExplorer of this.plugin.getRegisteredFileExplorers()) { + const files = Object.values(fileExplorer.fileItems || {}); + for (const rule of customRule.getSortedRules(this.plugin)) { + // Removes the icon tabs from all opened files. + this.updateIconTabs(rule, true, addedPaths); + // Adds the icon tabs to all opened files. + this.updateIconTabs(rule, false, addedPaths); + for (const fileItem of files) { + if (addedPaths.includes(fileItem.file.path)) { + continue; + } + const added = yield customRule.add(this.plugin, rule, fileItem.file, getFileItemTitleEl(fileItem)); + if (added) { + addedPaths.push(fileItem.file.path); + } + } + } + } + this.refreshDisplay(); + }); + // Add the move down custom rule button to re-order the custom rule. + settingRuleEl.addExtraButton((btn) => { + const isFirstOrder = currentOrder === 0; + btn.setDisabled(isFirstOrder); + btn.extraSettingsEl.style.cursor = isFirstOrder + ? 'not-allowed' + : 'default'; + btn.extraSettingsEl.style.opacity = isFirstOrder ? '50%' : '100%'; + btn.setIcon('arrow-up'); + btn.setTooltip('Prioritize the custom rule'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + yield orderCustomRules(-1); + })); + }); + // Add the move up custom rule button to re-order the custom rule. + settingRuleEl.addExtraButton((btn) => { + const isLastOrder = currentOrder === this.plugin.getSettings().rules.length - 1; + btn.setDisabled(isLastOrder); + btn.extraSettingsEl.style.cursor = isLastOrder + ? 'not-allowed' + : 'default'; + btn.extraSettingsEl.style.opacity = isLastOrder ? '50%' : '100%'; + btn.setIcon('arrow-down'); + btn.setTooltip('Deprioritize the custom rule'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + yield orderCustomRules(1); + })); + }); + // Add the edit custom rule button. + settingRuleEl.addButton((btn) => { + btn.setIcon('pencil'); + btn.setTooltip('Edit the custom rule'); + btn.onClick(() => { + var _a, _b; + // Create modal and its children elements. + const modal = new obsidian.Modal(this.plugin.app); + modal.contentEl.style.display = 'block'; + modal.modalEl.classList.add('iconize-custom-modal'); + modal.titleEl.setText('Edit custom rule'); + // Create the input for the rule. + this.createDescriptionEl(modal.contentEl, 'Regex or simple string'); + const input = new obsidian.TextComponent(modal.contentEl); + input.setValue(rule.rule); + input.onChange((value) => __awaiter(this, void 0, void 0, function* () { + rule.rule = value; + })); + const useFilePathContainer = modal.contentEl.createDiv(); + useFilePathContainer.style.display = 'flex'; + useFilePathContainer.style.alignItems = 'center'; + useFilePathContainer.style.justifyContent = 'space-between'; + useFilePathContainer.style.marginTop = 'var(--size-4-5)'; + const useFilePathDescription = useFilePathContainer.createEl('p', { + text: 'Include folders and files that are part of the path.', + cls: 'setting-item-description', + }); + useFilePathDescription.style.margin = '0'; + useFilePathDescription.style.marginBottom = 'var(--size-2-2)'; + new obsidian.ToggleComponent(useFilePathContainer) + .setValue(rule.useFilePath === true) + .onChange((value) => { + rule.useFilePath = value; + }); + // Create the toggle for changing the rule type. + const ruleTypeContainer = modal.contentEl.createDiv(); + ruleTypeContainer.style.display = 'flex'; + ruleTypeContainer.style.alignItems = 'center'; + ruleTypeContainer.style.justifyContent = 'space-between'; + ruleTypeContainer.style.marginTop = 'var(--size-4-5)'; + const ruleTypeDescription = ruleTypeContainer.createEl('p', { + text: 'Where the custom rule gets applied to.', + cls: 'setting-item-description', + }); + ruleTypeDescription.style.margin = '0'; + ruleTypeDescription.style.marginBottom = 'var(--size-2-2)'; + const ruleTypeButton = new obsidian.ButtonComponent(ruleTypeContainer); + const setButtonContent = (isFor) => { + if (isFor === 'folders') { + ruleTypeButton.setIcon('folder'); + } + else if (isFor === 'files') { + ruleTypeButton.setIcon('document'); + } + else { + ruleTypeButton.setIcon('documents'); + } + ruleTypeButton.setTooltip(`Icon applicable to: ${isFor}`); + }; + setButtonContent((_a = rule.for) !== null && _a !== void 0 ? _a : 'everything'); + ruleTypeButton.onClick(() => __awaiter(this, void 0, void 0, function* () { + var _a; + const isFor = (_a = rule.for) !== null && _a !== void 0 ? _a : 'everything'; + this.updateIconTabs(rule, true); + yield customRule.removeFromAllFiles(this.plugin, Object.assign(Object.assign({}, rule), { for: isFor })); + if (isFor === 'folders') { + rule.for = 'everything'; + } + else if (isFor === 'files') { + rule.for = 'folders'; + } + else { + rule.for = 'files'; + } + setButtonContent(rule.for); + })); + // Create the change icon button with icon preview. + this.createDescriptionEl(modal.contentEl, 'Custom rule icon'); + const iconContainer = modal.contentEl.createDiv(); + iconContainer.style.display = 'flex'; + iconContainer.style.alignItems = 'center'; + iconContainer.style.justifyContent = 'space-between'; + const iconEl = iconContainer.createDiv(); + const iconPreviewEl = iconEl.createDiv(); + dom.setIconForNode(this.plugin, rule.icon, iconPreviewEl); + iconEl.style.display = 'flex'; + iconEl.style.alignItems = 'center'; + iconEl.style.justifyContent = 'space-between'; + iconEl.style.margin = null; + iconPreviewEl.innerHTML = svg.setFontSize(iconPreviewEl.innerHTML, 20); + const iconNameEl = iconEl.createEl('div', { + cls: 'setting-item-description', + }); + iconNameEl.style.paddingTop = '0'; + iconNameEl.style.marginLeft = 'var(--size-2-2)'; + iconNameEl.innerText = rule.icon; + const changeIconBtn = new obsidian.ButtonComponent(iconContainer); + changeIconBtn.setButtonText('Change icon'); + changeIconBtn.onClick(() => __awaiter(this, void 0, void 0, function* () { + const modal = new IconsPickerModal(this.app, this.plugin, rule.icon); + modal.onChooseItem = (item) => __awaiter(this, void 0, void 0, function* () { + const icon = typeof item === 'object' ? item.displayName : item; + rule.icon = icon; + dom.setIconForNode(this.plugin, rule.icon, iconPreviewEl); + iconPreviewEl.innerHTML = svg.setFontSize(iconPreviewEl.innerHTML, 20); + iconNameEl.innerText = getNormalizedName(rule.icon); + }); + modal.open(); + })); + // Create the color picker for the rule. + this.createDescriptionEl(modal.contentEl, 'Color of the icon'); + const colorContainer = modal.contentEl.createDiv(); + colorContainer.style.display = 'flex'; + colorContainer.style.alignItems = 'center'; + colorContainer.style.justifyContent = 'space-between'; + const colorPicker = new obsidian.ColorComponent(colorContainer) + .setValue((_b = rule.color) !== null && _b !== void 0 ? _b : '#000000') + .onChange((value) => { + rule.color = value; + }); + const defaultColorButton = new obsidian.ButtonComponent(colorContainer); + defaultColorButton.setTooltip('Set color to the default one'); + defaultColorButton.setButtonText('Default'); + defaultColorButton.onClick(() => { + colorPicker.setValue('#000000'); + rule.color = undefined; + }); + // Create the save button. + const button = new obsidian.ButtonComponent(modal.contentEl); + button.buttonEl.style.marginTop = 'var(--size-4-4)'; + button.buttonEl.style.float = 'right'; + button.setButtonText('Save Changes'); + button.onClick(() => __awaiter(this, void 0, void 0, function* () { + if (!emoji.isEmoji(oldRule.icon)) { + // Tries to remove the previously used icon from the icon pack. + removeIconFromIconPack(this.plugin, oldRule.icon); + } + if (!emoji.isEmoji(rule.icon)) { + // Tries to add the newly used icon to the icon pack. + saveIconToIconPack(this.plugin, rule.icon); + rule.icon = getNormalizedName(rule.icon); + } + this.refreshDisplay(); + new obsidian.Notice('Custom rule updated.'); + // Refresh the DOM. + yield customRule.removeFromAllFiles(this.plugin, oldRule); + this.updateIconTabs(rule, true); + this.plugin.getSettings().rules.forEach((rule) => __awaiter(this, void 0, void 0, function* () { + yield customRule.addToAllFiles(this.plugin, rule); + this.updateIconTabs(rule, false); + })); + yield this.plugin.saveIconFolderData(); + modal.close(); + })); + modal.open(); + }); + }); + // Add the delete custom rule button. + settingRuleEl.addButton((btn) => { + btn.setIcon('trash'); + btn.setTooltip('Remove the custom rule'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + const newRules = this.plugin + .getSettings() + .rules.filter((r) => rule.rule !== r.rule || + rule.color !== r.color || + rule.icon !== r.icon || + rule.for !== r.for); + this.plugin.getSettings().rules = newRules; + yield this.plugin.saveIconFolderData(); + this.refreshDisplay(); + new obsidian.Notice('Custom rule deleted.'); + yield customRule.removeFromAllFiles(this.plugin, rule); + removeIconFromIconPack(this.plugin, rule.icon); + this.updateIconTabs(rule, true); + const previousRules = this.plugin + .getSettings() + .rules.filter((r) => rule.for === r.for); + previousRules.forEach((previousRule) => __awaiter(this, void 0, void 0, function* () { + yield customRule.addToAllFiles(this.plugin, previousRule); + this.updateIconTabs(previousRule, false); + })); + })); + }); + }); + } +} + +const getTitleIcon = (leaf) => { + return leaf.querySelector(`.${config.TITLE_ICON_CLASS}`); +}; +const add = (plugin, inlineTitleEl, svgElement, options) => { + var _a; + if (!inlineTitleEl.parentElement) { + return; + } + if (options === null || options === void 0 ? void 0 : options.fontSize) { + svgElement = svg.setFontSize(svgElement, options.fontSize); + } + let titleIcon = getTitleIcon(inlineTitleEl.parentElement); + if (!titleIcon) { + titleIcon = document.createElement('div'); + } + const isInline = plugin.getSettings().iconInTitlePosition === IconInTitlePosition.Inline; + if (isInline) { + titleIcon.style.display = 'inline-block'; + titleIcon.style.removeProperty('margin-inline'); + titleIcon.style.removeProperty('width'); + } + else { + titleIcon.style.display = 'block'; + titleIcon.style.width = 'var(--line-width)'; + titleIcon.style.marginInline = '0'; + } + titleIcon.classList.add(config.TITLE_ICON_CLASS); + // Checks if the passed element is an emoji. + if (emoji.isEmoji(svgElement) && options.fontSize) { + svgElement = + (_a = emoji.parseEmoji(plugin.getSettings().emojiStyle, svgElement, options.fontSize)) !== null && _a !== void 0 ? _a : svgElement; + titleIcon.style.fontSize = `${options.fontSize}px`; + } + titleIcon.innerHTML = svgElement; + let wrapperElement = inlineTitleEl.parentElement; + // Checks the parent and selects the correct wrapper element. + // This should only happen in the beginning. + if (wrapperElement && + !wrapperElement.classList.contains(config.INLINE_TITLE_WRAPPER_CLASS)) { + wrapperElement = wrapperElement.querySelector(`.${config.INLINE_TITLE_WRAPPER_CLASS}`); + } + // Whenever there is no correct wrapper element, we create one. + if (!wrapperElement) { + wrapperElement = inlineTitleEl.parentElement.createDiv(); + wrapperElement.classList.add(config.INLINE_TITLE_WRAPPER_CLASS); + } + // Avoiding adding the same nodes together when changing the title. + if (wrapperElement !== inlineTitleEl.parentElement) { + inlineTitleEl.parentElement.prepend(wrapperElement); + } + if (isInline) { + wrapperElement.style.display = 'flex'; + wrapperElement.style.alignItems = 'flex-start'; + const inlineTitlePaddingTop = getComputedStyle(inlineTitleEl, null).getPropertyValue('padding-top'); + titleIcon.style.paddingTop = inlineTitlePaddingTop; + if (emoji.isEmoji(svgElement)) { + titleIcon.style.transform = 'translateY(-9%)'; + } + else { + titleIcon.style.transform = 'translateY(9%)'; + } + } + else { + wrapperElement.style.display = 'block'; + titleIcon.style.transform = 'translateY(9%)'; + } + wrapperElement.append(titleIcon); + wrapperElement.append(inlineTitleEl); +}; +const updateStyle = (inlineTitleEl, options) => { + if (!inlineTitleEl.parentElement) { + return; + } + const titleIcon = getTitleIcon(inlineTitleEl.parentElement); + if (!titleIcon) { + return; + } + if (options.fontSize) { + if (!emoji.isEmoji(titleIcon.innerHTML)) { + titleIcon.innerHTML = svg.setFontSize(titleIcon.innerHTML, options.fontSize); + } + else { + titleIcon.style.fontSize = `${options.fontSize}px`; + } + } +}; +/** + * Hides the title icon from the provided HTMLElement. + * @param contentEl HTMLElement to hide the title icon from. + */ +const hide = (inlineTitleEl) => { + if (!inlineTitleEl.parentElement) { + return; + } + const titleIconContainer = getTitleIcon(inlineTitleEl.parentElement); + if (!titleIconContainer) { + return; + } + titleIconContainer.style.display = 'none'; +}; +const remove = (inlineTitleEl) => { + if (!inlineTitleEl.parentElement) { + return; + } + const titleIconContainer = getTitleIcon(inlineTitleEl.parentElement); + if (!titleIconContainer) { + return; + } + titleIconContainer.remove(); +}; +var titleIcon = { + add, + updateStyle, + hide, + remove, +}; + +// Cache for font size +let cachedFontSize = null; +let fontSizeCacheTime = 0; +const calculateFontTextSize = () => { + var _a; + // get cached font size if available + const now = Date.now(); + if (cachedFontSize !== null && now - fontSizeCacheTime < 2000) { + return cachedFontSize; + } + let fontSize = parseFloat((_a = getComputedStyle(document.body).getPropertyValue('--font-text-size')) !== null && _a !== void 0 ? _a : '0'); + if (!fontSize) { + fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize); + } + // set font size cache + cachedFontSize = fontSize; + fontSizeCacheTime = now; + return fontSize; +}; +const calculateInlineTitleSize = () => { + const fontSize = calculateFontTextSize(); + const inlineTitleSizeValue = getComputedStyle(document.body).getPropertyValue('--inline-title-size'); + const unit = inlineTitleSizeValue.replace(/[\d.]/g, ''); + let inlineTitleSize = parseFloat(inlineTitleSizeValue); + if (unit === 'px') { + inlineTitleSize /= 16; + } + return fontSize * inlineTitleSize; +}; +const isHeader = (value) => { + return /^h[1-6]$/.test(value); +}; +const getHTMLHeaderByToken = (header) => { + for (let i = 1; i <= 6; i++) { + if (header === `header-${i}`) { + return `h${i}`; + } + } + return null; +}; +const calculateHeaderSize = (header) => { + var _a; + const fontSize = calculateFontTextSize(); + const htmlHeader = (_a = getHTMLHeaderByToken(header)) !== null && _a !== void 0 ? _a : header; + const headerComputedStyle = getComputedStyle(document.body).getPropertyValue(`--${htmlHeader}-size`); + let headerSize = parseFloat(headerComputedStyle); + if (isPx(headerComputedStyle)) { + headerSize = pxToRem(headerSize, fontSize); + } + // If there is some `calc` operation going on, it has to be evaluated. + if (headerComputedStyle.includes('calc')) { + const temp = document.createElement('div'); + temp.style.setProperty('font-size', `var(--${htmlHeader}-size)`); + document.body.appendChild(temp); + const computedStyle = window.getComputedStyle(temp); + const computedValue = computedStyle.getPropertyValue('font-size'); + headerSize = parseFloat(computedValue); + if (isPx(computedValue)) { + headerSize = pxToRem(headerSize, fontSize); + } + document.body.removeChild(temp); + } + return fontSize * headerSize; +}; +const pxToRem = (px, baseSize = 16) => { + return px / baseSize; +}; +const isPx = (value) => { + return /^-?\d+(\.\d+)?px$/.test(value); +}; + +class EmojiStyleSetting extends IconFolderSetting { + display() { + const emojiStyle = new obsidian.Setting(this.containerEl) + .setName('Emoji style') + .setDesc('Change the style of your emojis.'); + emojiStyle.addDropdown((dropdown) => { + dropdown.addOption('native', 'Native'); + dropdown.addOption('twemoji', 'Twemoji'); + dropdown.setValue(this.plugin.getSettings().emojiStyle); + dropdown.onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().emojiStyle = value; + this.updateDOM(); + yield this.plugin.saveIconFolderData(); + })); + }); + } + updateDOM() { + for (const fileExplorer of this.plugin.getRegisteredFileExplorers()) { + const fileItems = Object.entries(fileExplorer.fileItems || {}); + for (const [path, _] of fileItems) { + let iconName = this.plugin.getData()[path]; + if (!iconName) { + continue; + } + const data = this.plugin.getData()[path]; + if (typeof data === 'object') { + const data = this.plugin.getData()[path]; + if (data.iconName) { + iconName = data.iconName; + } + } + if (emoji.isEmoji(iconName)) { + dom.createIconNode(this.plugin, path, iconName); + if (this.plugin.getSettings().iconInTabsEnabled) { + const tabLeaves = iconTabs.getTabLeavesOfFilePath(this.plugin, path); + for (const tabLeaf of tabLeaves) { + iconTabs.update(this.plugin, iconName, tabLeaf.tabHeaderInnerIconEl); + } + } + if (this.plugin.getSettings().iconInTitleEnabled) { + for (const openedFile of getAllOpenedFiles(this.plugin)) { + const activeView = openedFile.leaf.view; + if (activeView instanceof obsidian.MarkdownView && + openedFile.path === path) { + titleIcon.add(this.plugin, activeView.inlineTitleEl, iconName, { + fontSize: calculateInlineTitleSize(), + }); + } + } + } + } + } + } + for (const rule of customRule.getSortedRules(this.plugin)) { + customRule.addToAllFiles(this.plugin, rule); + } + } +} + +/** + * Helper function that refreshes the style of all the icons that are defined + * or in a custom rule involved. + * @param plugin Instance of the IconizePlugin. + */ +const refreshStyleOfIcons = (plugin) => __awaiter(void 0, void 0, void 0, function* () { + // Refreshes the icon style for all normally added icons. + style.refreshIconNodes(plugin); + // Refreshes the icon style for all custom icon rules, when the color of the rule is + // not defined. + for (const rule of customRule.getSortedRules(plugin)) { + const fileItems = yield customRule.getFileItems(plugin, rule); + for (const fileItem of fileItems) { + const titleEl = getFileItemTitleEl(fileItem); + const iconNode = titleEl.querySelector('.iconize-icon'); + let iconContent = iconNode.innerHTML; + iconContent = style.applyAll(plugin, iconContent, iconNode); + if (rule.color) { + iconContent = svg.colorize(iconContent, rule.color); + iconNode.style.color = rule.color; + } + iconNode.innerHTML = iconContent; + } + } +}); +var helper = { + refreshStyleOfIcons, +}; + +class ExtraMarginSetting extends IconFolderSetting { + display() { + var _a, _b; + const extraMarginSetting = new obsidian.Setting(this.containerEl) + .setName('Extra margin (in pixels)') + .setDesc('Change the margin of the icons.') + .setClass('iconize-setting'); + const extraMarginDropdown = new obsidian.DropdownComponent(extraMarginSetting.controlEl).addOptions({ + top: 'Top', + right: 'Right', + bottom: 'Bottom', + left: 'Left', + }); + const extraMarginSlider = new obsidian.SliderComponent(extraMarginSetting.controlEl) + .setLimits(-24, 24, 1) + .setDynamicTooltip() + .setValue((_b = (_a = this.plugin.getSettings().extraMargin) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 2) + .onChange((val) => __awaiter(this, void 0, void 0, function* () { + const dropdownValue = extraMarginDropdown.getValue(); + if (this.plugin.getSettings().extraMargin) { + this.plugin.getSettings().extraMargin[dropdownValue] = val; + } + else { + this.plugin.getSettings().extraMargin = { + [dropdownValue]: val, + }; + } + yield this.plugin.saveIconFolderData(); + helper.refreshStyleOfIcons(this.plugin); + })); + extraMarginDropdown.onChange((val) => { + var _a; + if (this.plugin.getSettings().extraMargin) { + extraMarginSlider.setValue((_a = this.plugin.getSettings().extraMargin[val]) !== null && _a !== void 0 ? _a : 2); + } + else { + extraMarginSlider.setValue(2); + } + }); + extraMarginSetting.components.push(extraMarginDropdown, extraMarginSlider); + } +} + +class ResetButtonComponent extends obsidian.ButtonComponent { + constructor(contentEl) { + super(contentEl); + this.contentEl = contentEl; + this.setTooltip('Restore default'); + this.setIcon('rotate-ccw'); + this.render(); + } + render() { + this.buttonEl.classList.add('clickable-icon'); + this.buttonEl.classList.add('extra-setting-button'); + } +} + +const DEFAULT_VALUE = DEFAULT_SETTINGS.iconColor; +class IconColorSetting extends IconFolderSetting { + display() { + var _a; + const setting = new obsidian.Setting(this.containerEl) + .setName('Icon color') + .setDesc('Change the color of the displayed icons.'); + new ResetButtonComponent(setting.controlEl).onClick(() => __awaiter(this, void 0, void 0, function* () { + colorPicker.setValue(DEFAULT_VALUE); + this.plugin.getSettings().iconColor = null; + // Custom saving to not save the color black in the data. + yield this.plugin.saveIconFolderData(); + helper.refreshStyleOfIcons(this.plugin); + })); + const colorPicker = new obsidian.ColorComponent(setting.controlEl) + .setValue((_a = this.plugin.getSettings().iconColor) !== null && _a !== void 0 ? _a : DEFAULT_VALUE) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().iconColor = value; + yield this.plugin.saveIconFolderData(); + helper.refreshStyleOfIcons(this.plugin); + })); + } +} + +const values = { + min: 10, + max: 64, + default: DEFAULT_SETTINGS.fontSize, + step: 1, +}; +class IconFontSizeSetting extends IconFolderSetting { + display() { + const setting = new obsidian.Setting(this.containerEl) + .setName('Icon font size (in pixels)') + .setDesc('Change the font size of the displayed icons.'); + new ResetButtonComponent(setting.controlEl).onClick(() => { + this.slider.setValue(values.default); + }); + setting.addSlider((slider) => { + var _a; + this.slider = slider; + slider + .setLimits(values.min, values.max, values.step) + .setDynamicTooltip() + .setValue((_a = this.plugin.getSettings().fontSize) !== null && _a !== void 0 ? _a : DEFAULT_SETTINGS.fontSize) + .onChange((val) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().fontSize = val; + yield this.plugin.saveIconFolderData(); + helper.refreshStyleOfIcons(this.plugin); + })); + }); + } +} + +class IconPacksPathSetting extends IconFolderSetting { + display() { + const iconPacksPathSetting = new obsidian.Setting(this.containerEl) + .setName('Icon packs folder path') + .setDesc('Change the default icon packs folder path.'); + iconPacksPathSetting.addText((text) => { + this.iconPacksSettingTextComp = text; + text.setValue(this.plugin.getSettings().iconPacksPath); + }); + iconPacksPathSetting.addButton((btn) => { + btn.setButtonText('Save'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + const newPath = this.iconPacksSettingTextComp.getValue(); + const oldPath = this.plugin.getSettings().iconPacksPath; + if (oldPath === this.iconPacksSettingTextComp.getValue()) { + return; + } + new obsidian.Notice('Saving in progress...'); + setPath(newPath); + yield createDefaultDirectory(this.plugin); + yield moveIconPackDirectories(this.plugin, oldPath, newPath); + this.plugin.getSettings().iconPacksPath = newPath; + yield this.plugin.saveIconFolderData(); + new obsidian.Notice('...saved successfully'); + })); + }); + } +} + +class IconPacksBackgroundChecker extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('Icons background check') + .setDesc('Check in the background on every load of Obsidian, if icons are missing and it will try to add them to the specific icon pack.') + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().iconsBackgroundCheckEnabled) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().iconsBackgroundCheckEnabled = enabled; + yield this.plugin.saveIconFolderData(); + if (enabled) { + new obsidian.Notice('You need to reload Obsidian for this to take effect.', 10000); + } + })); + }); + } +} + +class IconPackBrowserModal extends obsidian.FuzzySuggestModal { + constructor(app, plugin) { + super(app); + this.plugin = plugin; + this.resultContainerEl.classList.add('iconize-browse-modal'); + this.inputEl.placeholder = 'Select to download icon pack'; + } + // eslint-disable-next-line + onAddedIconPack() { } + onOpen() { + super.onOpen(); + } + onClose() { + this.contentEl.empty(); + } + getItemText(item) { + const prefix = createIconPackPrefix(item.name); + return `${item.displayName} (${prefix})`; + } + getItems() { + const predefinedIconPacks = Object.values(iconPacks$1); + const allIconPacks = getAllIconPacks(); + return predefinedIconPacks.filter((iconPack) => allIconPacks.find((ip) => iconPack.name === ip.name) === undefined); + } + onChooseItem(item, _event) { + return __awaiter(this, void 0, void 0, function* () { + new obsidian.Notice(`Adding ${item.displayName}...`); + const arrayBuffer = yield downloadZipFile(item.downloadLink); + yield createZipFile(this.plugin, `${item.name}.zip`, arrayBuffer); + yield registerIconPack(item.name, arrayBuffer); + new obsidian.Notice(`...${item.displayName} added`); + this.onAddedIconPack(); + }); + } + renderSuggestion(item, el) { + super.renderSuggestion(item, el); + el.innerHTML = `
${el.innerHTML}
`; + } +} + +class PredefinedIconPacksSetting extends IconFolderSetting { + constructor(plugin, containerEl, app, refreshDisplay) { + super(plugin, containerEl); + this.app = app; + this.refreshDisplay = refreshDisplay; + } + display() { + new obsidian.Setting(this.containerEl) + .setName('Add predefined icon pack') + .setDesc('Add a predefined icon pack that is officially supported.') + .addButton((btn) => { + btn.setButtonText('Browse icon packs'); + btn.onClick(() => { + const modal = new IconPackBrowserModal(this.app, this.plugin); + modal.onAddedIconPack = () => { + this.refreshDisplay(); + }; + modal.open(); + }); + }); + } +} + +class RecentlyUsedIconsSetting extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('Recently used icons limit') + .setDesc('Change the limit for the recently used icons displayed in the icon selection modal.') + .addSlider((slider) => { + var _a; + slider + .setLimits(1, 25, 1) + .setDynamicTooltip() + .setValue((_a = this.plugin.getSettings().recentlyUsedIconsSize) !== null && _a !== void 0 ? _a : DEFAULT_SETTINGS.recentlyUsedIconsSize) + .onChange((val) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().recentlyUsedIconsSize = val; + yield this.plugin.checkRecentlyUsedIcons(); + yield this.plugin.saveIconFolderData(); + })); + }); + } +} + +class ToggleIconInTabs extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('Toggle icon in tabs') + .setDesc('Toggles the visibility of an icon for a file in the tab bar.') + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().iconInTabsEnabled) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().iconInTabsEnabled = enabled; + yield this.plugin.saveIconFolderData(); + // Updates the already opened files. + this.plugin.app.workspace + .getLeavesOfType('markdown') + .forEach((leaf) => { + const file = leaf.view.file; + if (file) { + const tabHeaderLeaf = leaf; + if (enabled) { + // Adds the icons to already opened files. + iconTabs.add(this.plugin, file.path, tabHeaderLeaf.tabHeaderInnerIconEl); + } + else { + // Removes the icons from already opened files. + iconTabs.remove(tabHeaderLeaf.tabHeaderInnerIconEl); + } + } + }); + })); + }); + } +} + +class ToggleIconInTitle extends IconFolderSetting { + updateLeaves(options) { + this.plugin.app.workspace.getLeavesOfType('markdown').forEach((leaf) => { + const view = leaf.view; + if (view instanceof obsidian.MarkdownView) { + const foundIcon = icon.getIconByPath(this.plugin, view.file.path); + if (foundIcon && options.enabled) { + if (options.removeBeforeReAdd) { + // Remove the icon before re-adding it. This is needed to update the DOM because + // the icon node will be inserted in the beginning inline title node. + titleIcon.remove(view.contentEl); + } + const content = typeof foundIcon === 'string' ? foundIcon : foundIcon.svgElement; + titleIcon.add(this.plugin, view.inlineTitleEl, content, { + fontSize: calculateInlineTitleSize(), + }); + } + else { + titleIcon.remove(view.contentEl); + } + } + }); + } + display() { + new obsidian.Setting(this.containerEl) + .setName('Toggle icon in title') + .setDesc('Toggles the visibility of an icon above the title of a file.') + .addDropdown((dropdown) => { + this.dropdown = dropdown; + dropdown.setDisabled(!this.plugin.getSettings().iconInTitleEnabled); + dropdown.addOptions({ + above: 'Above title', + inline: 'Next to title', + }); + dropdown.setValue(this.plugin.getSettings().iconInTitlePosition); + dropdown.onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().iconInTitlePosition = + value; + yield this.plugin.saveIconFolderData(); + this.updateLeaves({ enabled: true, removeBeforeReAdd: true }); + })); + }) + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().iconInTitleEnabled) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + if (this.dropdown) { + this.dropdown.setDisabled(!enabled); + } + this.plugin.getSettings().iconInTitleEnabled = enabled; + yield this.plugin.saveIconFolderData(); + this.updateLeaves({ enabled }); + })); + }); + } +} + +class FrontmatterOptions extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('Use icon in frontmatter') + .setDesc('Toggles whether to set the icon based on the frontmatter property `icon`.') + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().iconInFrontmatterEnabled) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().iconInFrontmatterEnabled = enabled; + yield this.plugin.saveIconFolderData(); + })); + }); + new obsidian.Setting(this.containerEl) + .setName('Frontmatter icon field name') + .setDesc('Sets the name of the frontmatter field which contains the icon.') + .addText((text) => { + this.iconFieldNameTextComp = text; + text.setValue(this.plugin.getSettings().iconInFrontmatterFieldName); + }) + .addButton((button) => { + button.setButtonText('Save'); + button.onClick(() => __awaiter(this, void 0, void 0, function* () { + const newValue = this.iconFieldNameTextComp.getValue(); + const oldValue = this.plugin.getSettings().iconInFrontmatterFieldName; + if (newValue === oldValue) { + return; + } + this.plugin.getSettings().iconInFrontmatterFieldName = newValue; + yield this.plugin.saveIconFolderData(); + new obsidian.Notice('...saved successfully'); + })); + }); + new obsidian.Setting(this.containerEl) + .setName('Frontmatter icon color field name') + .setDesc('Sets the name of the frontmatter field which contains the icon color.') + .addText((text) => { + this.iconColorFieldNameTextComp = text; + text.setValue(this.plugin.getSettings().iconColorInFrontmatterFieldName); + }) + .addButton((button) => { + button.setButtonText('Save'); + button.onClick(() => __awaiter(this, void 0, void 0, function* () { + const newValue = this.iconColorFieldNameTextComp.getValue(); + const oldValue = this.plugin.getSettings().iconColorInFrontmatterFieldName; + if (newValue === oldValue) { + return; + } + this.plugin.getSettings().iconColorInFrontmatterFieldName = newValue; + yield this.plugin.saveIconFolderData(); + new obsidian.Notice('...saved successfully'); + })); + }); + new obsidian.Setting(this.containerEl) + .setName('Refresh icons from frontmatter') + .setDesc('Sets the icon and color for each note in the vault based on the frontmatter properties. WARNING: This will change any manually set icons to the one defined in the frontmatter. IF A NOTE HAS NO FRONTMATTER, THE CURRENT ICON WILL BE REMOVED. Please restart Obsidian after this completes to see the changes.') + .addButton((btn) => { + btn.setButtonText('Refresh').onClick(() => __awaiter(this, void 0, void 0, function* () { + var _a, _b; + if (!this.plugin.getSettings().iconInFrontmatterEnabled) { + new obsidian.Notice(`[${config.PLUGIN_NAME}] Please enable "Use icon in frontmatter".`); + return; + } + new obsidian.Notice(`[${config.PLUGIN_NAME}] Refreshing icons from frontmatter, please wait...`); + const files = this.plugin.app.vault.getMarkdownFiles(); + for (const file of files) { + const fileCache = this.plugin.app.metadataCache.getFileCache(file); + const frontmatterIconKey = this.plugin.getSettings().iconInFrontmatterFieldName; + const frontmatterIconColorKey = this.plugin.getSettings().iconColorInFrontmatterFieldName; + const iconName = (_a = fileCache.frontmatter) === null || _a === void 0 ? void 0 : _a[frontmatterIconKey]; + let iconColor = (_b = fileCache.frontmatter) === null || _b === void 0 ? void 0 : _b[frontmatterIconColorKey]; + if (!iconName) { + yield this.plugin.removeFolderIcon(file.path); + continue; + } + if (typeof iconName !== 'string') { + const message = `${file.path}\nFrontmatter property type \`${frontmatterIconKey}\` has to be of type \`text\`.`; + logger.warn(message); + new obsidian.Notice(`[${config.PLUGIN_NAME}]\n${message}`); + continue; + } + this.plugin.addFolderIcon(file.path, iconName); + if (!iconColor) { + yield this.plugin.removeIconColor(file.path); + continue; + } + if (typeof iconColor !== 'string') { + const message = `${file.path}\nFrontmatter property type \`${frontmatterIconColorKey}\` has to be of type \`text\`.`; + logger.warn(message); + new obsidian.Notice(`[${config.PLUGIN_NAME}]\n${message}`); + continue; + } + iconColor = isHexadecimal(iconColor) + ? stringToHex(iconColor) + : iconColor; + this.plugin.addIconColor(file.path, iconColor); + } + new obsidian.Notice(`[${config.PLUGIN_NAME}] Refreshed icons from frontmatter. Please restart Obsidian to see the changes.`); + })); + }); + } +} + +class ToggleIconsInEditor extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('Toggle icons while editing notes') + .setDesc('Toggles whether you are able to add and see icons in your notes and editor (e.g., ability to have :LiSofa: as an icon in your notes).') + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().iconsInNotesEnabled) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().iconsInNotesEnabled = enabled; + yield this.plugin.saveIconFolderData(); + new obsidian.Notice(`[${config.PLUGIN_NAME}] Obsidian has to be restarted for this change to take effect.`); + })); + }); + } +} + +class ToggleIconsInLinks extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('Toggle icons in links') + .setDesc('Toggles whether you are able to see icons in the links to other notes') + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().iconsInLinksEnabled) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().iconsInLinksEnabled = enabled; + yield this.plugin.saveIconFolderData(); + new obsidian.Notice(`[${config.PLUGIN_NAME}] Obsidian has to be restarted for this change to take effect.`); + })); + }); + } +} + +class IconIdentifierSetting extends IconFolderSetting { + display() { + const setting = new obsidian.Setting(this.containerEl) + .setName('Icon identifier') + .setDesc('Change the icon identifier used in notes.') + .setClass('iconize-setting'); + setting.addText((text) => { + this.textComp = text; + text.setValue(this.plugin.getSettings().iconIdentifier); + }); + setting.addButton((btn) => { + btn.setButtonText('Save'); + btn.onClick(() => __awaiter(this, void 0, void 0, function* () { + const newIdentifier = this.textComp.getValue(); + const oldIdentifier = this.plugin.getSettings().iconIdentifier; + if (newIdentifier === oldIdentifier) { + return; + } + this.plugin.getSettings().iconIdentifier = newIdentifier; + yield this.plugin.saveIconFolderData(); + new obsidian.Notice('...saved successfully'); + })); + }); + } +} + +class DebugMode extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('Toggle Debug Mode') + .setDesc('Toggle debug mode to see more detailed logs in the console. Do not touch this unless you know what you are doing.') + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().debugMode) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().debugMode = enabled; + yield this.plugin.saveIconFolderData(); + })); + }); + } +} + +class UseInternalPlugins extends IconFolderSetting { + display() { + new obsidian.Setting(this.containerEl) + .setName('EXPERIMENTAL: Use internal plugins') + .setDesc('Toggles whether to try to add icons to the bookmark and outline internal plugins.') + .addToggle((toggle) => { + toggle + .setValue(this.plugin.getSettings().useInternalPlugins) + .onChange((enabled) => __awaiter(this, void 0, void 0, function* () { + this.plugin.getSettings().useInternalPlugins = enabled; + yield this.plugin.saveIconFolderData(); + new obsidian.Notice(`[${config.PLUGIN_NAME}] Obsidian has to be restarted for this change to take effect.`); + })); + }); + } +} + +class IconFolderSettings extends obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + const { plugin, containerEl, app } = this; + containerEl.empty(); + containerEl.createEl('h1', { text: 'General' }); + new RecentlyUsedIconsSetting(plugin, containerEl).display(); + new IconPacksPathSetting(plugin, containerEl).display(); + new IconPacksBackgroundChecker(plugin, containerEl).display(); + new EmojiStyleSetting(plugin, containerEl).display(); + new IconIdentifierSetting(plugin, containerEl).display(); + new UseInternalPlugins(plugin, containerEl).display(); + new DebugMode(plugin, containerEl).display(); + containerEl.createEl('h3', { text: 'Visibility of icons' }); + new ToggleIconInTabs(plugin, containerEl).display(); + new ToggleIconInTitle(plugin, containerEl).display(); + new FrontmatterOptions(plugin, containerEl).display(); + new ToggleIconsInEditor(plugin, containerEl).display(); + new ToggleIconsInLinks(plugin, containerEl).display(); + containerEl.createEl('h1', { + text: 'Icon customization for files/folders', + }); + new IconFontSizeSetting(plugin, containerEl).display(); + new IconColorSetting(plugin, containerEl).display(); + new ExtraMarginSetting(plugin, containerEl).display(); + containerEl.createEl('h1', { text: 'Custom icon rules' }); + new CustomIconRuleSetting(plugin, containerEl, app, () => this.display()).display(); + containerEl.createEl('h1', { text: 'Icon packs' }); + new PredefinedIconPacksSetting(plugin, containerEl, app, () => this.display()).display(); + new CustomIconPackSetting(plugin, containerEl, () => this.display()).display(); + } +} + +function around(obj, factories) { + const removers = Object.keys(factories).map(key => around1(obj, key, factories[key])); + return removers.length === 1 ? removers[0] : function () { removers.forEach(r => r()); }; +} +function around1(obj, method, createWrapper) { + const original = obj[method], hadOwn = obj.hasOwnProperty(method); + let current = createWrapper(original); + // Let our wrapper inherit static props from the wrapping method, + // and the wrapping method, props from the original method + if (original) + Object.setPrototypeOf(current, original); + Object.setPrototypeOf(wrapper, current); + obj[method] = wrapper; + // Return a callback to allow safe removal + return remove; + function wrapper(...args) { + // If we have been deactivated and are no longer wrapped, remove ourselves + if (current === original && obj[method] === wrapper) + remove(); + return current.apply(this, args); + } + function remove() { + // If no other patches, just do a direct removal + if (obj[method] === wrapper) { + if (hadOwn) + obj[method] = original; + else + delete obj[method]; + } + if (current === original) + return; + // Else pass future calls through, and remove wrapper from the prototype chain + current = original; + Object.setPrototypeOf(wrapper, original || Function); + } +} + +class InternalPluginInjector { + constructor(plugin) { + this.plugin = plugin; + } + get fileExplorers() { + return this.plugin.app.workspace.getLeavesOfType('file-explorer'); + } + onMount() { } +} + +/** + * @deprecated After obsidian 1.2.6 in favor of the bookmarks plugin. + */ +class StarredInternalPlugin extends InternalPluginInjector { + constructor(plugin) { + super(plugin); + } + get starred() { + return this.plugin.app.internalPlugins.getPluginById('starred'); + } + get enabled() { + return this.plugin.app.internalPlugins.getPluginById('starred').enabled; + } + get leaf() { + const leaf = this.plugin.app.workspace.getLeavesOfType('starred'); + if (!leaf) { + return undefined; + } + if (leaf.length === 1) { + return leaf[0].view; + } + return undefined; + } + setIcon(filePath, node) { + const iconName = icon.getByPath(this.plugin, filePath); + const iconNode = node.querySelector('.nav-file-icon'); + if (!iconNode || !iconName) { + return; + } + dom.setIconForNode(this.plugin, iconName, iconNode); + } + computeNodesWithPath(callback) { + const { itemLookup, containerEl } = this.leaf; + const navFileEls = containerEl.querySelectorAll('.nav-file'); + navFileEls.forEach((navFileEl) => { + const lookupFile = itemLookup.get(navFileEl); + if (!lookupFile) { + return; + } + callback(navFileEl, lookupFile.path); + }); + } + onMount() { + const nodesWithPath = {}; + this.computeNodesWithPath((node, filePath) => { + nodesWithPath[filePath] = node; + }); + Object.entries(nodesWithPath).forEach(([filePath, node]) => this.setIcon(filePath, node)); + } + register() { + if (!this.plugin.app.internalPlugins.getPluginById('file-explorer').enabled) { + console.info(`[${config.PLUGIN_NAME}/Starred] Skipping starred internal plugin registration because file-explorer is not enabled.`); + return; + } + if (!this.enabled) { + console.info(`[${config.PLUGIN_NAME}/Starred] Skipping starred internal plugin registration because it's not enabled.`); + return; + } + // eslint-disable-next-line + const self = this; + this.plugin.register(around(this.starred.instance, { + addItem: function (next) { + return function (file) { + next.call(this, file); + self.onMount(); + }; + }, + removeItem: function (next) { + return function (file) { + next.call(this, file); + self.onMount(); + }; + }, + })); + } +} + +class BookmarkInternalPlugin extends InternalPluginInjector { + constructor(plugin) { + super(plugin); + } + get bookmark() { + return this.plugin.app.internalPlugins.getPluginById('bookmarks'); + } + get enabled() { + return this.plugin.app.internalPlugins.getPluginById('bookmarks').enabled; + } + get leaf() { + const leaf = this.plugin.app.workspace.getLeavesOfType('bookmarks'); + if (!leaf) { + return undefined; + } + if (leaf.length === 1) { + return leaf[0]; + } + return undefined; + } + setIconOrRemove(filePath, node) { + var _a; + const iconName = icon.getByPath(this.plugin, filePath); + let iconNode = node.querySelector('.tree-item-icon'); + if (!iconName) { + if (iconNode) { + // Reset the icon to the default obsidian icon. + const items = this.bookmark.instance.items; + const item = items.find((item) => item.path === filePath); + if ((item === null || item === void 0 ? void 0 : item.type) === 'file') { + iconNode.innerHTML = DEFAULT_FILE_ICON; + } + else if ((item === null || item === void 0 ? void 0 : item.type) === 'folder') { + iconNode.innerHTML = DEFAULT_FOLDER_ICON; + } + } + return; + } + // If the icon node is not defined, then we need to recreate it. + if (!iconNode) { + // Get the tree-item-self element where the original icon is set. + const treeItemSelf = node.querySelector('.tree-item-self'); + if (!treeItemSelf) { + return; + } + iconNode = node.createDiv({ cls: 'tree-item-icon' }); + // Prepends the icon to the tree-item-self element as a first child. + treeItemSelf.prepend(iconNode); + } + const defaultMargin = iconNode.style.margin; + const iconColor = (_a = this.plugin.getIconColor(filePath)) !== null && _a !== void 0 ? _a : this.plugin.getSettings().iconColor; + dom.setIconForNode(this.plugin, iconName, iconNode, { color: iconColor }); + // Reset the margin to the default value to prevent overlapping with the text. + iconNode.style.margin = defaultMargin; + } + computeNodesWithPath(callback) { + if (!this.leaf || !this.leaf.view) { + return; + } + /** + * Retrieves the lookup item from the bookmark plugin and calls the callback with the + * element and the path of the item. + * @param item BookmarkItem object which can be a folder or a file. + * @param itemDoms WeakMap of the bookmark plugin which contains the lookup item. + */ + const retrieveLookupItem = (item, itemDoms) => { + const lookupItem = itemDoms.get(item); + if (!lookupItem) { + return; + } + if (item.items) { + // If the item is a folder, then we need to retrieve all the items inside it. + for (const subItem of item.items) { + retrieveLookupItem(subItem, itemDoms); + } + } + // If the item is a `file` or a `folder` (not of type `group`), then we can call the callback. + if (item.type === 'file' || item.type === 'folder') { + callback(lookupItem.el, item.path); + } + }; + const { itemDoms } = this.leaf.view; + // Retrieves all the items of the bookmark plugin which areo objects. + const items = this.bookmark.instance.items; + items.forEach((item) => { + retrieveLookupItem(item, itemDoms); + }); + } + onMount() { + var _a; + const setBookmarkIcon = () => { + const nodesWithPath = {}; + this.computeNodesWithPath((node, filePath) => { + nodesWithPath[filePath] = node; + }); + Object.entries(nodesWithPath).forEach(([filePath, node]) => this.setIconOrRemove(filePath, node)); + }; + if (obsidian.requireApiVersion('1.7.2')) { + // TODO: Might improve the performance here. + (_a = this.leaf) === null || _a === void 0 ? void 0 : _a.loadIfDeferred().then(setBookmarkIcon); + } + else { + setBookmarkIcon(); + } + } + register() { + if (!this.plugin.app.internalPlugins.getPluginById('file-explorer').enabled) { + console.info(`[${config.PLUGIN_NAME}/Bookmarks] Skipping bookmark internal plugin registration because file-explorer is not enabled.`); + return; + } + if (!this.enabled) { + console.info(`[${config.PLUGIN_NAME}/Bookmarks] Skipping bookmark internal plugin registration because it's not enabled.`); + return; + } + // eslint-disable-next-line + const self = this; + this.plugin.register(around(this.bookmark.instance, { + addItem: function (next) { + return function (...args) { + next.call(this, ...args); + // TODO: Remove in the future, I could not think of a better way to do this. + setTimeout(() => { + self.onMount(); + }, 1000); + }; + }, + removeItem: function (next) { + return function (...args) { + next.call(this, ...args); + self.onMount(); + }; + }, + })); + } +} + +// TODO: Optimize the code to reduce the number of iterations and improve the +// performance. +const createIconShortcodeRegex = (plugin) => { + return new RegExp(`(${plugin.getSettings().iconIdentifier})((\\w{1,64}:\\d{17,18})|(\\w{1,64}))(${plugin.getSettings().iconIdentifier})`, 'g'); +}; +const createTreeWalker = (plugin, root) => { + return document.createTreeWalker(root, NodeFilter.SHOW_ALL, { + acceptNode: function (node) { + if (node.nodeName === 'CODE') { + return NodeFilter.FILTER_REJECT; + } + else if (node.nodeName === '#text') { + if (node.nodeValue && + (emoji.getRegex().test(node.nodeValue) || + createIconShortcodeRegex(plugin).test(node.nodeValue))) { + return NodeFilter.FILTER_ACCEPT; + } + else { + return NodeFilter.FILTER_REJECT; + } + } + return NodeFilter.FILTER_SKIP; + }, + }); +}; +const checkForTextNodes = (treeWalker, match, cb) => { + let currentNode = treeWalker.currentNode; + while (currentNode) { + if (currentNode.nodeType === Node.TEXT_NODE) { + const text = currentNode; + const textNodes = [...Array.from(text.parentElement.childNodes)].filter((n) => n instanceof Text); + for (const text of textNodes) { + for (const code of [...text.wholeText.matchAll(match)] + .sort((a, b) => b.index - a.index) + .map((arr) => ({ text: arr[0], index: arr.index }))) { + if (!text.textContent) { + continue; + } + cb(text, code); + } + } + } + currentNode = treeWalker.nextNode(); + } +}; +const processIconInTextMarkdown = (plugin, element) => { + // Ignore if codeblock + const codeElement = element.querySelector('pre > code'); + const callOut = element.querySelector('.callout'); + if (codeElement && !callOut) { + return; + } + const iconTreeWalker = createTreeWalker(plugin, element); + const iconShortcodeRegex = createIconShortcodeRegex(plugin); + const iconIdentifierLength = plugin.getSettings().iconIdentifier.length; + checkForTextNodes(iconTreeWalker, iconShortcodeRegex, (text, code) => { + var _a, _b; + const shortcode = code.text; + const iconName = shortcode.slice(iconIdentifierLength, shortcode.length - iconIdentifierLength); + const iconObject = icon.getIconByName(iconName); + if (iconObject) { + const toReplace = text.splitText(code.index); + const rootSpan = createSpan({ + cls: 'cm-iconize-icon', + attr: { + 'aria-label': iconName, + 'data-icon': iconName, + 'aria-hidden': 'true', + }, + }); + rootSpan.style.display = 'inline-flex'; + rootSpan.style.transform = 'translateY(13%)'; + const parentElement = toReplace.parentElement; + const tagName = (_b = (_a = parentElement === null || parentElement === void 0 ? void 0 : parentElement.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : ''; + let fontSize = calculateFontTextSize(); + if (isHeader(tagName)) { + fontSize = calculateHeaderSize(tagName); + const svgElement = svg.setFontSize(iconObject.svgElement, fontSize); + rootSpan.innerHTML = svgElement; + } + else { + const svgElement = svg.setFontSize(iconObject.svgElement, fontSize); + rootSpan.innerHTML = svgElement; + } + parentElement === null || parentElement === void 0 ? void 0 : parentElement.insertBefore(rootSpan, toReplace); + toReplace.textContent = toReplace.wholeText.substring(code.text.length); + // Set the font size to its parent font size if defined. + // We do this after that to not freeze the insertion while iterating over the tree. + // We are also updating the size after the animation because the styling won't be set + // in the first place. + requestAnimationFrame(() => { + const parentFontSize = parseFloat(getComputedStyle(parentElement).fontSize); + if (!isNaN(parentFontSize)) { + rootSpan.innerHTML = svg.setFontSize(rootSpan.innerHTML, parentFontSize); + } + }); + } + }); + const emojiTreeWalker = createTreeWalker(plugin, element); + checkForTextNodes(emojiTreeWalker, emoji.getRegex(), (text, code) => { + var _a, _b, _c, _d; + if (!emoji.isEmoji(code.text)) { + return; + } + if (plugin.getSettings().emojiStyle === 'twemoji') { + const toReplace = text.splitText(code.index); + const tagName = (_c = (_b = (_a = toReplace.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) === null || _b === void 0 ? void 0 : _b.toLowerCase()) !== null && _c !== void 0 ? _c : ''; + let fontSize = calculateFontTextSize(); + if (isHeader(tagName)) { + fontSize = calculateHeaderSize(tagName); + } + const emojiValue = emoji.parseEmoji(plugin.getSettings().emojiStyle, code.text, fontSize); + if (!emojiValue) { + return; + } + const emojiNode = createSpan(); + emojiNode.innerHTML = emojiValue; + (_d = toReplace.parentElement) === null || _d === void 0 ? void 0 : _d.insertBefore(emojiNode, toReplace); + toReplace.textContent = toReplace.wholeText.substring(code.text.length); + } + }); +}; + +const processIconInLinkMarkdown = (plugin, element, ctx) => { + const linkElements = element.querySelectorAll('a'); + if (!linkElements || linkElements.length === 0) { + return; + } + linkElements.forEach((linkElement) => { + var _a, _b, _c, _d, _e; + // Skip if the link element e.g., is a tag. + if (!linkElement.hasAttribute('data-href')) { + return; + } + const linkHref = linkElement.getAttribute('href'); + if (!linkHref) { + logger.warn('Link element does not have an `href` attribute'); + return; + } + const file = plugin.app.metadataCache.getFirstLinkpathDest(linkHref, ctx.sourcePath); + if (!file) { + logger.warn('Link element does not have a linkpath to a file'); + return; + } + const path = file.path; + const iconValue = icon.getIconByPath(plugin, path); + if (!iconValue) { + return; + } + let fontSize = calculateFontTextSize(); + const tagName = (_c = (_b = (_a = linkElement.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) === null || _b === void 0 ? void 0 : _b.toLowerCase()) !== null && _c !== void 0 ? _c : ''; + if (isHeader(tagName)) { + fontSize = calculateHeaderSize(tagName); + } + const iconName = typeof iconValue === 'string' + ? iconValue + : iconValue.prefix + iconValue.name; + const rootSpan = createSpan({ + cls: 'iconize-icon-in-link', + attr: { + title: iconName, + 'aria-label': iconName, + 'data-icon': iconName, + 'aria-hidden': 'true', + }, + }); + rootSpan.style.color = + (_d = plugin.getIconColor(path)) !== null && _d !== void 0 ? _d : plugin.getSettings().iconColor; + if (emoji.isEmoji(iconName)) { + const parsedEmoji = (_e = emoji.parseEmoji(plugin.getSettings().emojiStyle, iconName, fontSize)) !== null && _e !== void 0 ? _e : iconName; + rootSpan.style.transform = 'translateY(0)'; + rootSpan.innerHTML = parsedEmoji; + } + else { + let svgEl = icon.getIconByName(iconName).svgElement; + svgEl = svg.setFontSize(svgEl, fontSize); + if (svgEl) { + rootSpan.style.transform = 'translateY(20%)'; + rootSpan.innerHTML = svgEl; + } + } + linkElement.prepend(rootSpan); + }); +}; + +const TREE_ITEM_CLASS = 'tree-item-self'; +const TREE_ITEM_INNER = 'tree-item-inner'; +class OutlineInternalPlugin extends InternalPluginInjector { + constructor(plugin) { + super(plugin); + } + onMount() { + // TODO: Might improve the performance here. + } + register() { + if (!this.enabled) { + logger.info('Skipping internal plugin registration because it is not enabled.', LoggerPrefix.Outline); + return; + } + const updateTreeItems = () => { + var _a, _b, _c; + if (!((_b = (_a = this.leaf) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.tree)) { + return; + } + const treeItems = Array.from(this.leaf.view.tree.containerEl.querySelectorAll(`.${TREE_ITEM_CLASS}`)); + for (const treeItem of treeItems) { + const treeItemInner = treeItem.querySelector(`.${TREE_ITEM_INNER}`); + let text = treeItemInner === null || treeItemInner === void 0 ? void 0 : treeItemInner.getText(); + if (!text) { + continue; + } + const iconShortcodeRegex = createIconShortcodeRegex(this.plugin); + const iconIdentifierLength = this.plugin.getSettings().iconIdentifier.length; + let trimmedLength = 0; + for (const code of [...text.matchAll(iconShortcodeRegex)] + .sort((a, b) => a.index - b.index) + .map((arr) => ({ text: arr[0], index: arr.index }))) { + const shortcode = code.text; + const iconName = shortcode.slice(iconIdentifierLength, shortcode.length - iconIdentifierLength); + const iconObject = icon.getIconByName(iconName); + if (iconObject) { + const startIndex = code.index - trimmedLength; + const endIndex = code.index + code.text.length - trimmedLength; + const str = text.substring(0, startIndex) + text.substring(endIndex); + const iconSpan = createSpan({ + cls: 'cm-iconize-icon', + attr: { + 'aria-label': iconName, + 'data-icon': iconName, + 'aria-hidden': 'true', + }, + }); + const fontSize = parseFloat((_c = getComputedStyle(document.body).getPropertyValue('--nav-item-size')) !== null && _c !== void 0 ? _c : '16'); + const svgElement = svg.setFontSize(iconObject.svgElement, fontSize); + iconSpan.style.display = 'inline-flex'; + iconSpan.style.transform = 'translateY(13%)'; + iconSpan.innerHTML = svgElement; + treeItemInner.innerHTML = treeItemInner.innerHTML.replace(shortcode, iconSpan.outerHTML); + text = str; + trimmedLength += code.text.length; + } + } + } + }; + const setOutlineIcons = () => { + this.plugin.getEventEmitter().once('allIconsLoaded', () => { + updateTreeItems(); + const callback = (mutations) => { + mutations.forEach((mutation) => { + if (mutation.type !== 'childList') { + return; + } + const addedNodes = mutation.addedNodes; + if (addedNodes.length === 0) { + return; + } + updateTreeItems(); + }); + if (!this.enabled) { + observer.disconnect(); + } + }; + const observer = new MutationObserver(callback); + observer.observe(this.leaf.view.tree.containerEl, { + childList: true, + subtree: true, + }); + }); + }; + if (obsidian.requireApiVersion('1.7.2')) { + // TODO: Might improve the performance here. + this.leaf.loadIfDeferred().then(setOutlineIcons); + } + else { + setOutlineIcons(); + } + } + get leaf() { + const leaf = this.plugin.app.workspace.getLeavesOfType('outline'); + if (!leaf) { + logger.log('`leaf` in outline is undefined', LoggerPrefix.Outline); + return undefined; + } + if (leaf.length === 0) { + logger.log('`leaf` length in outline is 0', LoggerPrefix.Outline); + return undefined; + } + return leaf[0]; + } + get outline() { + return this.plugin.app.internalPlugins.getPluginById('outline'); + } + get enabled() { + return this.plugin.app.internalPlugins.getPluginById('outline').enabled; + } +} + +class SuggestionIcon extends obsidian.EditorSuggest { + constructor(app, plugin) { + super(app); + this.plugin = plugin; + } + onTrigger(cursor, editor) { + // Isolate shortcode starting position closest to the cursor. + const shortcodeStart = editor + .getLine(cursor.line) + .substring(0, cursor.ch) + .lastIndexOf(this.plugin.getSettings().iconIdentifier); + // `onTrigger` needs to return `null` as soon as possible to save processing performance. + if (shortcodeStart === -1) { + return null; + } + // Regex for checking if the shortcode is not done yet. + const regex = new RegExp(`^(${this.plugin.getSettings().iconIdentifier})\\w+$`, 'g'); + const regexOngoingShortcode = editor + .getLine(cursor.line) + .substring(shortcodeStart, cursor.ch) + .match(regex); + if (regexOngoingShortcode === null) { + return null; + } + const startingIndex = editor + .getLine(cursor.line) + .indexOf(regexOngoingShortcode[0]); + return { + start: { + line: cursor.line, + ch: startingIndex, + }, + end: { + line: cursor.line, + ch: startingIndex + regexOngoingShortcode[0].length, + }, + query: regexOngoingShortcode[0], + }; + } + getSuggestions(context) { + const queryLowerCase = context.query + .substring(this.plugin.getSettings().iconIdentifier.length) + .toLowerCase(); + // Store all icons corresponding to the current query. + const iconsNameArray = getAllLoadedIconNames() + .filter((iconObject) => { + const name = iconObject.prefix.toLowerCase() + iconObject.name.toLowerCase(); + return name.toLowerCase().includes(queryLowerCase); + }) + .map((iconObject) => iconObject.prefix + iconObject.name); + // Store all emojis correspoding to the current query - parsing whitespaces and + // colons for shortcodes compatibility. + const emojisNameArray = Object.keys(emoji.shortNames).filter((e) => { var _a; return (_a = emoji.getShortcode(e)) === null || _a === void 0 ? void 0 : _a.includes(queryLowerCase); }); + return [...iconsNameArray, ...emojisNameArray]; + } + renderSuggestion(value, el) { + const iconObject = icon.getIconByName(value); + el.style.display = 'flex'; + el.style.alignItems = 'center'; + el.style.gap = '0.25rem'; + if (iconObject) { + // Suggest an icon. + el.innerHTML = `${iconObject.svgElement} ${value}`; + } + else { + // Suggest an emoji - display its shortcode version. + const shortcode = emoji.getShortcode(value); + if (shortcode) { + el.innerHTML = `${value} ${shortcode}`; + } + } + } + selectSuggestion(value) { + const isEmoji = emoji.isEmoji(value.replace(/_/g, ' ')); + if (!isEmoji) { + saveIconToIconPack(this.plugin, value); + } + // Replace query with iconNameWithPrefix or emoji unicode directly. + const updatedValue = isEmoji + ? value + : `${this.plugin.getSettings().iconIdentifier}${value}${this.plugin.getSettings().iconIdentifier}`; + this.context.editor.replaceRange(updatedValue, this.context.start, this.context.end); + } +} + +class IconInTextWidget extends view.WidgetType { + constructor(plugin, id) { + super(); + this.plugin = plugin; + this.id = id; + this.start = -1; + this.end = -1; + } + setPosition(start, end) { + this.start = start; + this.end = end; + } + eq(other) { + return other instanceof IconInTextWidget && other.id === this.id; + } + getSize(view) { + let fontSize = calculateFontTextSize(); + const line = view.state.doc.lineAt(this.end); + const headerMatch = line.text.match(/^#{1,6}\s/); + if (headerMatch && headerMatch[0].trim()) { + const mapping = { + '#': 'h1', + '##': 'h2', + '###': 'h3', + '####': 'h4', + '#####': 'h5', + '######': 'h6', + }; + const header = mapping[headerMatch[0].trim()]; + fontSize = calculateHeaderSize(header); + } + return fontSize; + } + toDOM(view) { + const wrap = createSpan({ + cls: 'cm-iconize-icon', + attr: { + 'aria-label': this.id, + 'data-icon': this.id, + 'aria-hidden': 'true', + }, + }); + const foundIcon = icon.getIconByName(this.id); + const fontSize = this.getSize(view); + if (foundIcon) { + const svgElement = svg.setFontSize(foundIcon.svgElement, fontSize); + wrap.style.display = 'inline-flex'; + wrap.style.transform = 'translateY(13%)'; + wrap.innerHTML = svgElement; + } + else if (emoji.isEmoji(this.id)) { + wrap.innerHTML = emoji.parseEmoji(this.plugin.getSettings().emojiStyle, this.id, fontSize); + } + else { + wrap.append(`${this.plugin.getSettings().iconIdentifier}${this.id}${this.plugin.getSettings().iconIdentifier}`); + } + return wrap; + } + ignoreEvent() { + return false; + } +} + +class IconInLinkWidget extends view.WidgetType { + constructor(plugin, iconData, path, headerType) { + super(); + this.plugin = plugin; + this.iconData = iconData; + this.path = path; + this.headerType = headerType; + } + toDOM() { + var _a; + const iconNode = document.createElement('span'); + const iconName = typeof this.iconData === 'string' + ? this.iconData + : this.iconData.prefix + this.iconData.name; + iconNode.style.color = + (_a = this.plugin.getIconColor(this.path)) !== null && _a !== void 0 ? _a : this.plugin.getSettings().iconColor; + iconNode.setAttribute('title', iconName); + iconNode.classList.add('iconize-icon-in-link'); + if (typeof this.iconData === 'string') { + iconNode.style.transform = 'translateY(0)'; + } + let innerHTML = typeof this.iconData === 'string' + ? this.iconData + : this.iconData.svgElement; + let fontSize = calculateFontTextSize(); + if (this.headerType) { + fontSize = calculateHeaderSize(this.headerType); + } + if (emoji.isEmoji(innerHTML)) { + innerHTML = emoji.parseEmoji(this.plugin.getSettings().emojiStyle, innerHTML, fontSize); + } + else { + innerHTML = svg.setFontSize(innerHTML, fontSize); + } + iconNode.innerHTML = innerHTML; + return iconNode; + } + ignoreEvent() { + return true; + } +} + +const buildLinkDecorations = (view$1, plugin) => { + const builder = new state.RangeSetBuilder(); + const mdView = view$1.state.field(obsidian.editorInfoField); + for (const { from, to } of view$1.visibleRanges) { + language.syntaxTree(view$1.state).iterate({ + from, + to, + enter: (node) => { + const tokenProps = node.type.prop(language.tokenClassNodeProp); + if (tokenProps) { + const props = new Set(tokenProps.split(' ')); + const isLink = props.has('hmd-internal-link'); + const headerType = [ + 'header-1', + 'header-2', + 'header-3', + 'header-4', + 'header-5', + 'header-6', + ].find((header) => props.has(header)); + if (isLink) { + let linkText = view$1.state.doc.sliceString(node.from, node.to); + linkText = linkText.split('#')[0]; + const file = plugin.app.metadataCache.getFirstLinkpathDest(linkText, mdView.file.basename); + if (file) { + const possibleIcon = icon.getIconByPath(plugin, file.path); + if (possibleIcon) { + const iconDecoration = view.Decoration.widget({ + widget: new IconInLinkWidget(plugin, possibleIcon, file.path, headerType), + }); + builder.add(node.from, node.from, iconDecoration); + } + } + } + } + }, + }); + } + return builder.finish(); +}; + +const buildTextDecorations = (view$1, plugin) => { + const ranges = []; + const iconInfo = view$1.state.field(plugin.positionField); + for (const { from, to } of view$1.visibleRanges) { + iconInfo.between(from - 1, to + 1, (from, to, { iconId }) => { + ranges.push([iconId, from, to]); + }); + } + return view.Decoration.set(ranges.map(([code, from, to]) => { + const widget = new IconInTextWidget(plugin, code); + widget.setPosition(from, to); + if (view$1.state.field(obsidian.editorLivePreviewField)) { + return view.Decoration.replace({ + widget, + side: -1, + }).range(from, to); + } + return view.Decoration.widget({ + widget, + side: -1, + }).range(to); + }), true); +}; + +const buildIconInTextPlugin = (plugin) => { + return view.ViewPlugin.fromClass(class IconPlugin { + constructor(view) { + this.plugin = plugin; + this.decorations = buildTextDecorations(view, plugin); + } + update(update) { + this.decorations = buildTextDecorations(update.view, this.plugin); + } + }, { + decorations: (v) => v.decorations, + provide: (plugin) => view.EditorView.atomicRanges.of((view$1) => { + const value = view$1.plugin(plugin); + return value ? value.decorations : view.Decoration.none; + }), + }); +}; + +const buildIconInLinksPlugin = (plugin) => { + return view.ViewPlugin.fromClass(class { + constructor(view) { + this.plugin = plugin; + this.decorations = buildLinkDecorations(view, plugin); + } + destroy() { } + update(update) { + if (update.docChanged || update.viewportChanged) { + this.decorations = buildLinkDecorations(update.view, this.plugin); + } + } + }, { + decorations: (v) => v.decorations, + }); +}; + +// TODO: Optimize the code to reduce the number of iterations and improve the +// performance. +function checkForSourceMode(plugin) { + let isSourceMode = false; + // Iterate over all leaves to check if any is in source mode + plugin.app.workspace.iterateAllLeaves((leaf) => { + var _a; + if (!isSourceMode && leaf.view.getViewType() === 'markdown') { + if ((_a = leaf.getViewState().state) === null || _a === void 0 ? void 0 : _a.source) { + isSourceMode = true; + } + } + }); + return isSourceMode; +} +class IconPosition extends state.RangeValue { + constructor(text) { + super(); + this.text = text; + } + get iconId() { + return this.text; + } + eq(other) { + return other instanceof IconPosition && other.text === this.text; + } +} +/** + * Builds a position field for the editor state. This field will track the + * positions of the icons in the document. + **/ +const buildPositionField = (plugin) => { + /** + * Checks the ranges of the icons in the document. If the range is not + * excluded, the range is added to the range set. If the range is excluded, + * the range is removed from the range set. + * @param state EditorState to get the ranges from. + * @param excludeFrom Number to exclude from the ranges. + * @param excludeTo Number to exclude to the ranges. + * @param updateRange Function callback to update the range. + */ + const checkRanges = (state, excludeFrom, excludeTo, updateRange) => { + const isSourceMode = checkForSourceMode(plugin); + const text = state.doc.sliceString(0, state.doc.length); + const identifier = plugin.getSettings().iconIdentifier; + const regex = new RegExp(`(${identifier})((\\w{1,64}:\\d{17,18})|(\\w{1,64}))(${identifier})`, 'g'); + for (const { 0: rawCode, index: offset } of text.matchAll(regex)) { + const iconName = rawCode.substring(identifier.length, rawCode.length - identifier.length); + if (!icon.getIconByName(iconName)) { + continue; + } + const from = offset; + const to = offset + rawCode.length; + if (!isNodeInRangeAccepted(state, from, to)) { + continue; + } + if (offset < excludeFrom || offset > excludeTo) { + updateRange(from, to, new IconPosition(iconName), isSourceMode); + continue; + } + updateRange(from, to, new IconPosition(iconName), true); + } + for (const { 0: emojiName, index: offset } of text.matchAll(emoji.getRegex())) { + if (!emoji.isEmoji(emojiName)) { + continue; + } + const from = offset; + const to = offset + emojiName.length; + if (!isNodeInRangeAccepted(state, from, to)) { + continue; + } + if (offset < excludeFrom || offset > excludeTo) { + updateRange(from, to, new IconPosition(emojiName), isSourceMode); + continue; + } + updateRange(from, to, new IconPosition(emojiName), true); + } + }; + const isNodeInRangeAccepted = (state, from, to) => { + let isRangeAccepted = true; + language.syntaxTree(state).iterate({ + from, + to, + enter: ({ type }) => { + var _a; + if (type.name === 'Document') { + return; + } + const allowedNodeTypes = [ + 'header', + 'strong', + 'em', + 'quote', + 'link', + 'list-1', + 'list-2', + 'list-3', + 'highlight', + 'footref', + 'comment', + 'link-alias', + ]; + const excludedNodeTypes = [ + 'formatting', + 'hmd-codeblock', + 'inline-code', + 'hr', + ]; + const nodeProps = (_a = type.prop(language.tokenClassNodeProp)) !== null && _a !== void 0 ? _a : ''; + const s = new Set(nodeProps.split(' ')); + if (excludedNodeTypes.some((t) => s.has(t)) && + allowedNodeTypes.every((t) => !s.has(t))) { + isRangeAccepted = false; + } + }, + }); + return isRangeAccepted; + }; + return state.StateField.define({ + create: (state$1) => { + const rangeSet = new state.RangeSetBuilder(); + const changedLines = []; + checkRanges(state$1, -1, -1, (from, to, iconPosition) => { + changedLines.push({ from, to, iconPosition }); + }); + changedLines.sort((a, b) => a.from - b.from); + for (const { from, to, iconPosition } of changedLines) { + rangeSet.add(from, to, iconPosition); + } + return rangeSet.finish(); + }, + update: (rangeSet, transaction) => { + const newRanges = []; + if (!transaction.docChanged) { + if (transaction.selection) { + const from = transaction.selection.ranges[0].from; + const to = transaction.selection.ranges[0].to; + const lineEnd = transaction.state.doc.lineAt(to).length; + const lineStart = transaction.state.doc.lineAt(from).from; + // Checks the ranges of the icons in the document except for the + // excluded line start and end. + checkRanges(transaction.state, lineStart, lineStart + lineEnd, (from, to, value, removed) => { + rangeSet = rangeSet.update({ + filterFrom: from, + filterTo: to, + filter: () => false, + }); + if (!removed) { + newRanges.push(value.range(from, to)); + } + }); + } + else { + checkRanges(transaction.state, -1, -1, (from, to, value, removed) => { + rangeSet = rangeSet.update({ + filterFrom: from, + filterTo: to, + filter: () => false, + }); + if (!removed) { + newRanges.push(value.range(from, to)); + } + }); + } + newRanges.sort((a, b) => a.from - b.from); + rangeSet = rangeSet.update({ add: newRanges }); + return rangeSet; + } + rangeSet = rangeSet.map(transaction.changes); + const changedLines = []; + transaction.changes.iterChangedRanges((_f, _t, from, to) => { + changedLines.push([ + transaction.state.doc.lineAt(from).number, + transaction.state.doc.lineAt(to).number, + ]); + }); + for (const [start, end] of changedLines) { + const from = transaction.state.doc.line(start).from; + const to = transaction.state.doc.line(end).to; + rangeSet = rangeSet.update({ + filterFrom: from, + filterTo: to, + filter: () => false, + }); + const lineEnd = transaction.state.doc.line(end).length; + const lineStart = transaction.state.doc.line(end).from; + // Checks the ranges of the icons in the document except for the excluded + // line start and end. + checkRanges(transaction.state, lineStart, lineStart + lineEnd, (from, to, value, removed) => { + if (!removed) { + newRanges.push(value.range(from, to)); + } + }); + } + newRanges.sort((a, b) => a.from - b.from); + rangeSet = rangeSet.update({ add: newRanges }); + return rangeSet; + }, + }); +}; + +class ChangeColorModal extends obsidian.Modal { + constructor(app, plugin, path) { + var _a; + super(app); + this.plugin = plugin; + this.path = path; + this.usedColor = this.plugin.getIconColor(this.path); + this.contentEl.style.display = 'block'; + this.modalEl.classList.add('iconize-custom-modal'); + this.titleEl.setText('Change color'); + const description = this.contentEl.createEl('p', { + text: 'Select a color for this icon', + cls: 'setting-item-description', + }); + description.style.marginBottom = 'var(--size-2-2)'; + const colorContainer = this.contentEl.createDiv(); + colorContainer.style.display = 'flex'; + colorContainer.style.alignItems = 'center'; + colorContainer.style.justifyContent = 'space-between'; + const colorPicker = new obsidian.ColorComponent(colorContainer) + .setValue((_a = this.usedColor) !== null && _a !== void 0 ? _a : '#000000') + .onChange((value) => { + this.usedColor = value; + }); + const defaultColorButton = new obsidian.ButtonComponent(colorContainer); + defaultColorButton.setTooltip('Set color to the default one'); + defaultColorButton.setButtonText('Reset'); + defaultColorButton.onClick(() => { + colorPicker.setValue('#000000'); + this.usedColor = undefined; + }); + // Save button. + const button = new obsidian.ButtonComponent(this.contentEl); + button.buttonEl.style.marginTop = 'var(--size-4-4)'; + button.buttonEl.style.float = 'right'; + button.setButtonText('Save Changes'); + button.onClick(() => __awaiter(this, void 0, void 0, function* () { + var _a; + new obsidian.Notice('Color of icon changed.'); + if (this.usedColor) { + this.plugin.addIconColor(this.path, this.usedColor); + } + else { + this.plugin.removeIconColor(this.path); + } + // Refresh the DOM. + const iconNode = dom.getIconNodeFromPath(this.path); + iconNode.style.color = (_a = this.usedColor) !== null && _a !== void 0 ? _a : null; + const colorizedInnerHtml = svg.colorize(iconNode.innerHTML, this.usedColor); + iconNode.innerHTML = colorizedInnerHtml; + this.close(); + })); + } + onOpen() { + super.onOpen(); + } + onClose() { + const { contentEl } = this; + contentEl.empty(); + } +} + +class EventEmitter { + constructor() { + this.listeners = {}; + } + on(type, listener, priority = 0) { + var _a, _b; + var _c; + (_a = (_c = this.listeners)[type]) !== null && _a !== void 0 ? _a : (_c[type] = []); + (_b = this.listeners[type]) === null || _b === void 0 ? void 0 : _b.push({ listener, once: false, priority }); + this.sortListeners(type); + } + once(type, listener, priority = 0) { + var _a, _b; + var _c; + (_a = (_c = this.listeners)[type]) !== null && _a !== void 0 ? _a : (_c[type] = []); + (_b = this.listeners[type]) === null || _b === void 0 ? void 0 : _b.push({ listener, once: true, priority }); + this.sortListeners(type); + } + off(type, listener) { + var _a; + if (!this.listeners[type]) { + return; + } + this.listeners[type] = (_a = this.listeners[type]) === null || _a === void 0 ? void 0 : _a.filter((entry) => entry.listener !== listener); + } + emit(type, payload) { + const listeners = this.listeners[type]; + if (!listeners) { + return; + } + const event = { payload }; + listeners.slice().forEach((entry) => { + entry.listener(event); + if (entry.once) { + this.off(type, entry.listener); + } + }); + } + sortListeners(type) { + var _a; + if (this.listeners[type]) { + (_a = this.listeners[type]) === null || _a === void 0 ? void 0 : _a.sort((a, b) => b.priority - a.priority); + } + } +} + +function getApi(plugin) { + return { + getEventEmitter: () => plugin.getEventEmitter(), + getIconByName: (iconNameWithPrefix) => icon.getIconByName(iconNameWithPrefix), + setIconForNode: (iconName, node, color) => dom.setIconForNode(plugin, iconName, node, { color }), + saveIconToIconPack: (iconNameWithPrefix) => saveIconToIconPack(plugin, iconNameWithPrefix), + removeIconFromIconPack: (iconNameWithPrefix) => removeIconFromIconPack(plugin, iconNameWithPrefix), + getIconsFromIconPack: getIconsFromIconPack, + getAllIconPacks: getAllIconPacks, + doesElementHasIconNode: dom.doesElementHasIconNode, + getIconFromElement: dom.getIconFromElement, + removeIconInNode: dom.removeIconInNode, + removeIconInPath: dom.removeIconInPath, + util: { + dom, + svg, + }, + version: { + get current() { + return plugin.manifest.version; + }, + }, + }; +} + +class IconizePlugin extends obsidian.Plugin { + constructor() { + super(...arguments); + this.registeredFileExplorers = new Set(); + this.modifiedInternalPlugins = []; + this.positionField = buildPositionField(this); + this.frontmatterCache = new Set(); + this.eventEmitter = new EventEmitter(); + this.api = getApi(this); + } + onload() { + return __awaiter(this, void 0, void 0, function* () { + console.log(`loading ${config.PLUGIN_NAME}`); + yield this.loadIconFolderData(); + logger.toggleLogging(this.getSettings().debugMode); + setPath(this.getSettings().iconPacksPath); + if (this.getSettings().useInternalPlugins) { + // Registers all modified internal plugins. + // Only adds star plugin for obsidian under v0.12.6. + if (!obsidian.requireApiVersion('0.12.6')) { + this.modifiedInternalPlugins.push(new StarredInternalPlugin(this)); + } + else if (obsidian.requireApiVersion('1.2.0')) { + this.modifiedInternalPlugins.push(new BookmarkInternalPlugin(this)); + } + this.modifiedInternalPlugins.push(new OutlineInternalPlugin(this)); + } + yield createDefaultDirectory(this); + yield this.checkRecentlyUsedIcons(); + yield migrate(this); + const usedIconNames = icon.getAllWithPath(this).map((value) => value.icon); + if (!this.doesUseCustomLucideIconPack()) { + addLucideIconsPack(this); + } + yield loadUsedIcons(this, usedIconNames); + this.app.workspace.onLayoutReady(() => this.handleChangeLayout()); + this.addCommand({ + id: 'iconize:set-icon-for-file', + name: 'Set icon for file', + hotkeys: [ + { + modifiers: ['Mod', 'Shift'], + key: 'j', + }, + ], + editorCallback: (editor) => __awaiter(this, void 0, void 0, function* () { + var _a; + const file = (_a = editor.editorComponent) === null || _a === void 0 ? void 0 : _a.file; + if (!file) { + logger.warn(`'editor.editorComponent?.file' is undefined for file: ${file}`); + return; + } + const modal = new IconsPickerModal(this.app, this, file.path); + modal.open(); + modal.onSelect = (iconName) => { + IconCache.getInstance().set(file.path, { + iconNameWithPrefix: iconName, + }); + // Update icon in tab when setting is enabled. + if (this.getSettings().iconInTabsEnabled) { + const tabLeaves = iconTabs.getTabLeavesOfFilePath(this, file.path); + for (const tabLeaf of tabLeaves) { + iconTabs.update(this, iconName, tabLeaf.tabHeaderInnerIconEl); + } + } + // Update icon in title when setting is enabled. + if (this.getSettings().iconInTitleEnabled) { + this.addIconInTitle(iconName); + } + }; + }), + }); + this.registerEvent( + // Registering file menu event for listening to file pinning and unpinning. + this.app.workspace.on('file-menu', (menu, file) => { + // I've researched other ways of doing this. However, there is no other way to listen to file pinning and unpinning. + menu.onHide(() => { + const path = file.path; + if (this.getSettings().iconInTabsEnabled) { + for (const openedFile of getAllOpenedFiles(this)) { + if (openedFile.path === path) { + const possibleIcon = IconCache.getInstance().get(path); + if (!possibleIcon) { + return; + } + const tabLeaves = iconTabs.getTabLeavesOfFilePath(this, file.path); + for (const tabLeaf of tabLeaves) { + // Add timeout to ensure that the default icon is already set. + setTimeout(() => { + iconTabs.add(this, file.path, tabLeaf.tabHeaderInnerIconEl); + }, 5); + } + } + } + } + }); + })); + this.registerEvent(this.app.workspace.on('layout-change', () => this.handleChangeLayout())); + this.registerEvent(this.app.workspace.on('file-menu', (menu, file) => { + const addIconMenuItem = (item) => { + item.setTitle('Change icon'); + item.setIcon('hashtag'); + item.onClick(() => { + const modal = new IconsPickerModal(this.app, this, file.path); + modal.open(); + modal.onSelect = (iconName) => { + IconCache.getInstance().set(file.path, { + iconNameWithPrefix: iconName, + }); + // Update icon in tab when setting is enabled. + if (this.getSettings().iconInTabsEnabled) { + const tabLeaves = iconTabs.getTabLeavesOfFilePath(this, file.path); + for (const tabLeaf of tabLeaves) { + iconTabs.update(this, iconName, tabLeaf.tabHeaderInnerIconEl); + } + } + // Update icon in title when setting is enabled. + if (this.getSettings().iconInTitleEnabled) { + this.addIconInTitle(iconName); + } + }; + }); + }; + const removeIconMenuItem = (item) => { + item.setTitle('Remove icon'); + item.setIcon('trash'); + item.onClick(() => __awaiter(this, void 0, void 0, function* () { + yield this.removeSingleIcon(file); + })); + }; + const changeColorOfIcon = (item) => { + item.setTitle('Change color of icon'); + item.setIcon('palette'); + item.onClick(() => { + const modal = new ChangeColorModal(this.app, this, file.path); + modal.open(); + }); + }; + menu.addItem(addIconMenuItem); + const filePathData = this.getData()[file.path]; + const hasNestedIcon = typeof filePathData === 'object' && + filePathData.iconName !== null; + // Only add remove icon menu item when the file path exists in the data. + // We do not want to show this menu item for e.g. custom rules. + if (filePathData && + (typeof filePathData === 'string' || hasNestedIcon)) { + const icon = typeof filePathData === 'string' + ? filePathData + : filePathData.iconName; + if (!emoji.isEmoji(icon)) { + menu.addItem(changeColorOfIcon); + } + menu.addItem(removeIconMenuItem); + } + })); + // deleting event + this.registerEvent(this.app.vault.on('delete', (file) => { + const path = file.path; + this.removeFolderIcon(path); + })); + // renaming event + this.registerEvent(this.app.vault.on('rename', (file, oldPath) => { + // Check if the file was moved and had an icon before. + const dataPoint = this.data[oldPath]; + if (dataPoint && oldPath !== 'settings') { + const iconNameWithPrefix = typeof dataPoint === 'object' + ? dataPoint.iconName + : dataPoint; + dom.createIconNode(this, file.path, iconNameWithPrefix); + } + this.renameFolder(file.path, oldPath); + })); + if (this.getSettings().iconsInNotesEnabled) { + this.registerMarkdownPostProcessor((el) => processIconInTextMarkdown(this, el)); + this.registerEditorSuggest(new SuggestionIcon(this.app, this)); + this.registerEditorExtension([ + this.positionField, + buildIconInTextPlugin(this), + ]); + } + if (this.getSettings().iconsInLinksEnabled) { + this.registerMarkdownPostProcessor((el, ctx) => processIconInLinkMarkdown(this, el, ctx)); + this.registerEditorExtension([ + this.positionField, + buildIconInLinksPlugin(this), + ]); + } + this.addSettingTab(new IconFolderSettings(this.app, this)); + }); + } + notifyPlugins() { + this.modifiedInternalPlugins.forEach((internalPlugin) => { + if (internalPlugin.enabled) { + internalPlugin.onMount(); + } + }); + } + removeSingleIcon(file) { + return __awaiter(this, void 0, void 0, function* () { + this.removeFolderIcon(file.path); + dom.removeIconInPath(file.path); + IconCache.getInstance().invalidate(file.path); + this.notifyPlugins(); + let didUpdate = false; + // Refreshes the icon tab and title icon for custom rules. + for (const rule of customRule.getSortedRules(this)) { + const applicable = yield customRule.isApplicable(this, rule, file.path); + if (applicable) { + customRule.add(this, rule, file); + this.addIconInTitle(rule.icon); + const tabLeaves = iconTabs.getTabLeavesOfFilePath(this, file.path); + for (const tabLeaf of tabLeaves) { + iconTabs.add(this, file.path, tabLeaf.tabHeaderInnerIconEl, { + iconName: rule.icon, + }); + } + didUpdate = true; + break; + } + } + // Only remove icon above titles and icon in tabs if no custom rule was found. + if (!didUpdate) { + // Refreshes icons above title and icons in tabs. + for (const openedFile of getAllOpenedFiles(this)) { + if (this.getSettings().iconInTitleEnabled) { + titleIcon.remove(openedFile.leaf.view.inlineTitleEl); + } + if (this.getSettings().iconInTabsEnabled) { + const leaf = openedFile.leaf; + iconTabs.remove(leaf.tabHeaderInnerIconEl, { + replaceWithDefaultIcon: true, + }); + } + } + } + }); + } + handleChangeLayout() { + // Transform data that are objects to single strings. + const data = Object.entries(this.data); + this.modifiedInternalPlugins.forEach((internalPlugin) => { + if (internalPlugin.enabled) { + internalPlugin.onMount(); + internalPlugin.register(); + } + }); + icon.addAll(this, data, this.registeredFileExplorers, () => { + // After initialization of the icon packs, checks the vault for missing icons and + // adds them. + initIconPacks(this).then(() => __awaiter(this, void 0, void 0, function* () { + if (this.getSettings().iconsBackgroundCheckEnabled) { + const data = Object.entries(this.data); + yield icon.checkMissingIcons(this, data); + resetPreloadedIcons(); + } + this.eventEmitter.emit('allIconsLoaded'); + })); + if (this.getSettings().iconInFrontmatterEnabled) { + const activeFile = this.app.workspace.getActiveFile(); + if (activeFile) { + this.frontmatterCache.add(activeFile.path); + } + } + // Adds the title icon to the active leaf view. + if (this.getSettings().iconInTitleEnabled) { + for (const openedFile of getAllOpenedFiles(this)) { + const iconName = icon.getByPath(this, openedFile.path); + const activeView = openedFile.leaf.view; + if (activeView instanceof obsidian.MarkdownView && iconName) { + let possibleIcon = iconName; + if (!emoji.isEmoji(iconName)) { + const iconNextIdentifier = nextIdentifier(iconName); + possibleIcon = getSvgFromLoadedIcon(iconName.substring(0, iconNextIdentifier), iconName.substring(iconNextIdentifier)); + } + if (possibleIcon) { + titleIcon.add(this, activeView.inlineTitleEl, possibleIcon, { + fontSize: calculateInlineTitleSize(), + }); + } + } + } + } + // Register rename event for adding icons with custom rules to the DOM + // when file was moved to another directory. + this.registerEvent(this.app.vault.on('rename', (file, oldPath) => __awaiter(this, void 0, void 0, function* () { + const sortedRules = customRule.getSortedRules(this); + // Removes possible icons from the renamed file. + sortedRules.forEach((rule) => { + if (customRule.doesMatchPath(rule, oldPath)) { + dom.removeIconInPath(file.path); + } + }); + // Adds possible icons to the renamed file. + sortedRules.forEach((rule) => { + if (customRule.doesMatchPath(rule, oldPath)) { + return; + } + customRule.add(this, rule, file, undefined); + }); + // Updates icon tabs for the renamed file. + for (const rule of customRule.getSortedRules(this)) { + const applicable = yield customRule.isApplicable(this, rule, file.path); + if (!applicable) { + continue; + } + const openedFiles = getAllOpenedFiles(this); + const openedFile = openedFiles.find((openedFile) => openedFile.path === file.path); + if (openedFile) { + const leaf = openedFile.leaf; + iconTabs.update(this, rule.icon, leaf.tabHeaderInnerIconEl); + } + break; + } + }))); + // Register `layout-change` event for adding icons to tabs when moving a pane or + // enabling reading mode. + this.registerEvent(this.app.workspace.on('layout-change', () => { + var _a, _b; + if (this.getSettings().iconInTitleEnabled) { + const activeView = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); + if (activeView) { + const file = activeView.file; + const view = activeView.leaf.view.currentMode + .view; + const iconNameWithPrefix = icon.getByPath(this, file.path); + if (!iconNameWithPrefix) { + titleIcon.hide(view.inlineTitleEl); + return; + } + let foundIcon = iconNameWithPrefix; + if (!emoji.isEmoji(foundIcon)) { + foundIcon = (_a = icon.getIconByName(iconNameWithPrefix)) === null || _a === void 0 ? void 0 : _a.svgElement; + // Check for preloaded icons if no icon was found when the start up was faster + // than the loading of the icons. + if (!foundIcon && getPreloadedIcons().length > 0) { + foundIcon = (_b = getPreloadedIcons().find((icon) => icon.prefix + icon.name === iconNameWithPrefix)) === null || _b === void 0 ? void 0 : _b.svgElement; + } + } + if (foundIcon) { + // Removes the node because the editor markdown content is being rerendered + // when the content mode changes back to editing. + titleIcon.remove(view.inlineTitleEl); + titleIcon.add(this, view.inlineTitleEl, foundIcon, { + fontSize: calculateInlineTitleSize(), + }); + } + } + } + if (!this.getSettings().iconInTabsEnabled) { + return; + } + for (const openedFile of getAllOpenedFiles(this)) { + const leaf = openedFile.leaf; + const iconColor = this.getIconColor(leaf.view.file.path); + iconTabs.add(this, openedFile.path, leaf.tabHeaderInnerIconEl, { + iconColor, + }); + } + })); + // Register `file-open` event for adding icon to title. + this.registerEvent(this.app.workspace.on('file-open', (file) => { + var _a, _b; + if (!this.getSettings().iconInTitleEnabled) { + return; + } + for (const openedFile of getAllOpenedFiles(this)) { + if (!file || !openedFile || openedFile.path !== file.path) { + continue; + } + const leaf = openedFile.leaf.view; + const iconNameWithPrefix = icon.getByPath(this, file.path); + if (!iconNameWithPrefix) { + titleIcon.hide(leaf.inlineTitleEl); + return; + } + let foundIcon = iconNameWithPrefix; + if (!emoji.isEmoji(foundIcon)) { + foundIcon = (_a = icon.getIconByName(iconNameWithPrefix)) === null || _a === void 0 ? void 0 : _a.svgElement; + // Check for preloaded icons if no icon was found when the start up was faster + // than the loading of the icons. + if (!foundIcon && getPreloadedIcons().length > 0) { + foundIcon = (_b = getPreloadedIcons().find((icon) => icon.prefix + icon.name === iconNameWithPrefix)) === null || _b === void 0 ? void 0 : _b.svgElement; + } + } + if (foundIcon) { + titleIcon.add(this, leaf.inlineTitleEl, foundIcon, { + fontSize: calculateInlineTitleSize(), + }); + } + else { + titleIcon.hide(leaf.inlineTitleEl); + } + } + })); + // Register event for frontmatter icon registration. + this.registerEvent(this.app.metadataCache.on('resolve', (file) => __awaiter(this, void 0, void 0, function* () { + if (!this.getSettings().iconInFrontmatterEnabled) { + return; + } + const fileCache = this.app.metadataCache.getFileCache(file); + const iconFrontmatterName = this.getSettings().iconInFrontmatterFieldName; + const iconColorFrontmatterName = this.getSettings().iconColorInFrontmatterFieldName; + if (fileCache === null || fileCache === void 0 ? void 0 : fileCache.frontmatter) { + const { [iconFrontmatterName]: newIconName, [iconColorFrontmatterName]: newIconColor, } = fileCache.frontmatter; + // If `icon` property is empty, we will remove it from the data and remove the icon. + if (!newIconName) { + if (this.frontmatterCache.has(file.path)) { + yield this.removeSingleIcon(file); + this.frontmatterCache.delete(file.path); + } + return; + } + if (typeof newIconName !== 'string') { + new obsidian.Notice(`[${config.PLUGIN_NAME}] Frontmatter property type \`icon\` has to be of type \`text\`.`); + return; + } + if (newIconColor && typeof newIconColor !== 'string') { + new obsidian.Notice(`[${config.PLUGIN_NAME}] Frontmatter property type \`iconColor\` has to be of type \`text\`.`); + return; + } + let iconColor = newIconColor; + if (isHexadecimal(iconColor)) { + iconColor = stringToHex(iconColor); + } + const cachedIcon = IconCache.getInstance().get(file.path); + if (newIconName === (cachedIcon === null || cachedIcon === void 0 ? void 0 : cachedIcon.iconNameWithPrefix) && + iconColor === (cachedIcon === null || cachedIcon === void 0 ? void 0 : cachedIcon.iconColor)) { + return; + } + this.frontmatterCache.add(file.path); + try { + if (!emoji.isEmoji(newIconName)) { + saveIconToIconPack(this, newIconName); + } + } + catch (e) { + logger.warn(`Something went wrong while saving icon to icon pack (error: ${e})`); + new obsidian.Notice(e.message); + return; + } + dom.createIconNode(this, file.path, newIconName, { + color: iconColor, + }); + this.addFolderIcon(file.path, newIconName); + this.addIconColor(file.path, iconColor); + IconCache.getInstance().set(file.path, { + iconNameWithPrefix: newIconName, + iconColor, + }); + // Update icon in tab when setting is enabled. + if (this.getSettings().iconInTabsEnabled) { + const tabLeaves = iconTabs.getTabLeavesOfFilePath(this, file.path); + for (const tabLeaf of tabLeaves) { + iconTabs.update(this, newIconName, tabLeaf.tabHeaderInnerIconEl); + } + } + // Update icon in title when setting is enabled. + if (this.getSettings().iconInTitleEnabled) { + this.addIconInTitle(newIconName); + } + } + }))); + // Register active leaf change event for adding icon of file to tab. + this.registerEvent(this.app.workspace.on('active-leaf-change', (leaf) => { + if (!this.getSettings().iconInTabsEnabled) { + return; + } + // TODO: Maybe change in the future to a more optimal solution. + // Fixes a problem when the file was clicked twice in the same tab. + // See https://github.com/FlorianWoelki/obsidian-iconize/issues/208. + if (leaf.view.getViewType() === 'file-explorer') { + for (const openedFile of getAllOpenedFiles(this)) { + const leaf = openedFile.leaf; + const iconColor = this.getIconColor(leaf.view.file.path); + iconTabs.add(this, openedFile.path, leaf.tabHeaderInnerIconEl, { + iconColor, + }); + } + return; + } + if (leaf.view.getViewType() !== 'markdown') { + return; + } + const tabHeaderLeaf = leaf; + if (tabHeaderLeaf.view.file) { + const iconColor = this.getIconColor(tabHeaderLeaf.view.file.path); + iconTabs.add(this, tabHeaderLeaf.view.file.path, tabHeaderLeaf.tabHeaderInnerIconEl, { + iconColor, + }); + } + })); + this.registerEvent(this.app.workspace.on('css-change', () => { + for (const openedFile of getAllOpenedFiles(this)) { + const activeView = openedFile.leaf.view; + if (activeView instanceof obsidian.MarkdownView) { + titleIcon.updateStyle(activeView.inlineTitleEl, { + fontSize: calculateInlineTitleSize(), + }); + } + } + })); + }); + } + addIconInTitle(iconName) { + var _a; + for (const openedFile of getAllOpenedFiles(this)) { + const activeView = openedFile.leaf.view; + if (activeView instanceof obsidian.MarkdownView) { + let possibleIcon = iconName; + if (!emoji.isEmoji(iconName)) { + possibleIcon = (_a = icon.getIconByName(iconName)) === null || _a === void 0 ? void 0 : _a.svgElement; + } + if (possibleIcon) { + titleIcon.add(this, activeView.inlineTitleEl, possibleIcon, { + fontSize: calculateInlineTitleSize(), + }); + } + } + } + } + onunload() { + console.log('unloading obsidian-icon-folder'); + } + renameFolder(newPath, oldPath) { + if (!this.data[oldPath] || newPath === oldPath) { + return; + } + Object.defineProperty(this.data, newPath, Object.getOwnPropertyDescriptor(this.data, oldPath)); + delete this.data[oldPath]; + this.saveIconFolderData(); + } + addIconColor(path, iconColor) { + const pathData = this.getData()[path]; + if (typeof pathData === 'string') { + this.getData()[path] = { + iconName: pathData, + iconColor, + }; + } + else { + pathData.iconColor = iconColor; + } + this.saveIconFolderData(); + } + getIconColor(path) { + const pathData = this.getData()[path]; + if (!pathData) { + return undefined; + } + if (typeof pathData === 'string') { + return undefined; + } + return pathData.iconColor; + } + removeIconColor(path) { + const pathData = this.getData()[path]; + if (typeof pathData === 'string') { + return; + } + const currentValue = pathData; + this.getData()[path] = currentValue.iconName; + this.saveIconFolderData(); + } + removeFolderIcon(path) { + if (!this.data[path]) { + return; + } + // Saves the icon name with prefix to remove it from the icon pack directory later. + const iconData = this.data[path]; + delete this.data[path]; + // Removes the icon from the icon pack directory if it is not used as an icon somewhere + // else. + if (iconData) { + let iconNameWithPrefix = iconData; + if (typeof iconData === 'object') { + iconNameWithPrefix = iconData.iconName; + } + else { + iconNameWithPrefix = iconData; + } + if (!emoji.isEmoji(iconNameWithPrefix)) { + removeIconFromIconPack(this, iconNameWithPrefix); + } + } + //this.addIconsToSearch(); + this.saveIconFolderData(); + } + addFolderIcon(path, icon) { + const iconName = getNormalizedName(typeof icon === 'object' ? icon.displayName : icon); + this.data[path] = iconName; + // Update recently used icons. + if (!this.getSettings().recentlyUsedIcons.includes(iconName)) { + if (this.getSettings().recentlyUsedIcons.length >= + this.getSettings().recentlyUsedIconsSize) { + this.getSettings().recentlyUsedIcons = + this.getSettings().recentlyUsedIcons.slice(0, this.getSettings().recentlyUsedIconsSize - 1); + } + this.getSettings().recentlyUsedIcons.unshift(iconName); + this.checkRecentlyUsedIcons(); + } + //this.addIconsToSearch(); + this.saveIconFolderData(); + } + getSettings() { + return this.data.settings; + } + loadIconFolderData() { + return __awaiter(this, void 0, void 0, function* () { + const data = yield this.loadData(); + if (data) { + Object.entries(DEFAULT_SETTINGS).forEach(([k, v]) => { + if (data.settings[k] === undefined) { + data.settings[k] = v; + } + }); + } + this.data = Object.assign({ settings: Object.assign({}, DEFAULT_SETTINGS) }, {}, data); + }); + } + saveIconFolderData() { + return __awaiter(this, void 0, void 0, function* () { + yield this.saveData(this.data); + }); + } + checkRecentlyUsedIcons() { + return __awaiter(this, void 0, void 0, function* () { + if (this.getSettings().recentlyUsedIcons.length > + this.getSettings().recentlyUsedIconsSize) { + this.getSettings().recentlyUsedIcons = + this.getSettings().recentlyUsedIcons.slice(0, this.getSettings().recentlyUsedIconsSize); + yield this.saveIconFolderData(); + } + }); + } + getEventEmitter() { + return this.eventEmitter; + } + getData() { + return this.data; + } + getIconNameFromPath(path) { + if (typeof this.getData()[path] === 'object') { + return this.getData()[path].iconName; + } + return this.getData()[path]; + } + getRegisteredFileExplorers() { + return this.registeredFileExplorers; + } + doesUseCustomLucideIconPack() { + return this.getSettings().lucideIconPackType === 'custom'; + } + doesUseNativeLucideIconPack() { + return this.getSettings().lucideIconPackType === 'native'; + } + /** + * Returns a possible data path by the given value. This function checks for + * direct icon and custom rules. + * @param value String that will be used to find the data path. + * @returns String that is the data path or `undefined` if no data path was found. + */ + getDataPathByValue(value) { + return Object.entries(this.data).find(([k, v]) => { + if (typeof v === 'string') { + if (value === v) { + return k; + } + } + else if (typeof v === 'object') { + // Check for custom rules. + if (k === 'settings') { + // `rules` are defined in the settings object. + const rules = v.rules; + return rules.find((rule) => rule.icon === value); + } + v = v; + if (value === v.iconName) { + return k; + } + } + }); + } +} + +module.exports = IconizePlugin; + + +/* nosourcemap */ \ No newline at end of file diff --git a/main/.obsidian/plugins/obsidian-icon-folder/manifest.json b/main/.obsidian/plugins/obsidian-icon-folder/manifest.json new file mode 100644 index 0000000..6e916c3 --- /dev/null +++ b/main/.obsidian/plugins/obsidian-icon-folder/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "obsidian-icon-folder", + "name": "Iconize", + "version": "2.14.7", + "minAppVersion": "0.9.12", + "description": "Add icons to anything you desire in Obsidian, including files, folders, and text.", + "author": "Florian Woelki", + "authorUrl": "https://florianwoelki.com/", + "isDesktopOnly": false +} diff --git a/main/.obsidian/plugins/obsidian-icon-folder/styles.css b/main/.obsidian/plugins/obsidian-icon-folder/styles.css new file mode 100644 index 0000000..a74fdd4 --- /dev/null +++ b/main/.obsidian/plugins/obsidian-icon-folder/styles.css @@ -0,0 +1,120 @@ +.iconize-inline-title-wrapper { + width: var(--line-width); + max-width: var(--max-width); + margin-inline: var(--content-margin); +} + +.iconize-title-icon { + max-width: var(--max-width); + margin-right: var(--size-4-2); +} + +.iconize-icon-in-link { + transform: translateY(20%); + margin-right: var(--size-2-2); + display: inline-flex; +} + +.iconize-icon { + border: 1px solid transparent; + margin: 0px 4px 0px 0px; + display: flex; + align-self: center; + margin: auto 0; +} + +.nav-folder-title, +.nav-file-title { + align-items: center; +} + +.iconize-setting input[type='color'] { + margin: 0 6px; +} + +.iconize-modal.prompt-results { + margin: 0; + overflow-y: auto; + display: grid; + grid-template-columns: repeat(5, minmax(0, 1fr)); +} + +.prompt .iconize-subheadline { + margin-top: 12px; + font-size: 12px; + color: gray; + grid-column-start: 1; + grid-column-end: 6; +} + +@media (max-width: 640px) { + .iconize-modal.prompt-results { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + .prompt .iconize-subheadline { + grid-column-end: 4; + } +} + +.iconize-modal.prompt-results .suggestion-item { + cursor: pointer; + white-space: pre-wrap; + display: flex; + justify-content: flex-end; + align-items: center; + flex-direction: column-reverse; + text-align: center; + font-size: 13px; + color: var(--text-muted); + padding: 16px 8px; + line-break: auto; + word-break: break-word; + line-height: 1.3; +} + +.iconize-modal.prompt-results .suggestion-item.suggestion-item__center { + justify-content: center; +} + +.iconize-icon-preview { + font-size: 22px; +} + +.iconize-icon-preview img { + width: 16px; + height: 16px; +} + +.iconize-icon-preview svg { + width: 24px; + height: 24px; + color: currentColor; + margin-bottom: 4px; +} + +.iconize-dragover { + position: relative; +} + +.iconize-dragover-el { + position: absolute; + width: 100%; + height: 100%; + color: var(--text-normal); + background-color: var(--background-secondary-alt); + display: flex; + align-items: center; + justify-content: center; +} + +/* Custom rule modal. */ +.iconize-custom-modal .modal-content { + display: flex; + align-items: center; + justify-content: center; +} + +.iconize-custom-modal .modal-content input { + width: 100%; + margin-right: 0.5rem; +} diff --git a/main/.obsidian/workspace.json b/main/.obsidian/workspace.json new file mode 100644 index 0000000..55c7669 --- /dev/null +++ b/main/.obsidian/workspace.json @@ -0,0 +1,239 @@ +{ + "main": { + "id": "e7bfd2f155c62902", + "type": "split", + "children": [ + { + "id": "67633a98841f1fed", + "type": "tabs", + "children": [ + { + "id": "25aae42aaab4abe7", + "type": "leaf", + "state": { + "type": "empty", + "state": {}, + "icon": "lucide-file", + "title": "New tab" + } + } + ] + } + ], + "direction": "vertical" + }, + "left": { + "id": "43d22bca040639d2", + "type": "split", + "children": [ + { + "id": "bdcc5924af362acd", + "type": "tabs", + "children": [ + { + "id": "473cb6021a1f878a", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": { + "sortOrder": "alphabetical", + "autoReveal": false + }, + "icon": "lucide-folder-closed", + "title": "Files" + } + }, + { + "id": "12d7d82748c819b0", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + }, + "icon": "lucide-search", + "title": "Search" + } + }, + { + "id": "c7e76435ebf4c70a", + "type": "leaf", + "state": { + "type": "bookmarks", + "state": {}, + "icon": "lucide-bookmark", + "title": "Bookmarks" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "6d9050dcb0be5248", + "type": "split", + "children": [ + { + "id": "ac3cdbca48621cde", + "type": "tabs", + "children": [ + { + "id": "f57ec243746ebec6", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "file": "общее заметки/Gibbs sampling.md", + "collapseAll": true, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": false + }, + "icon": "links-coming-in", + "title": "Backlinks for Gibbs sampling" + } + }, + { + "id": "670f87e106206330", + "type": "leaf", + "state": { + "type": "outgoing-link", + "state": { + "file": "my first note.md", + "linksCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-going-out", + "title": "Outgoing links from my first note" + } + }, + { + "id": "34c1eae0ff3610c1", + "type": "leaf", + "state": { + "type": "tag", + "state": { + "sortOrder": "frequency", + "useHierarchy": true, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-tags", + "title": "Tags" + } + }, + { + "id": "b35eabf1b976316c", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "file": "общее заметки/Gibbs sampling.md", + "followCursor": false, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-list", + "title": "Outline of Gibbs sampling" + } + }, + { + "id": "575e3955e92ea997", + "type": "leaf", + "state": { + "type": "calendar", + "state": {}, + "icon": "calendar-with-checkmark", + "title": "Calendar" + } + }, + { + "id": "d165aa1547c548e2", + "type": "leaf", + "state": { + "type": "calendar-hub", + "state": {}, + "icon": "calendar-with-checkmark", + "title": "Calendar Hub" + } + }, + { + "id": "9da02016571cb36e", + "type": "leaf", + "state": { + "type": "all-properties", + "state": { + "sortOrder": "frequency", + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-archive", + "title": "All properties" + } + } + ], + "currentTab": 5 + } + ], + "direction": "horizontal", + "width": 300 + }, + "left-ribbon": { + "hiddenItems": { + "switcher:Open quick switcher": false, + "graph:Open graph view": false, + "canvas:Create new canvas": false, + "daily-notes:Open today's daily note": false, + "templates:Insert template": false, + "command-palette:Open command palette": false, + "bases:Create new base": false, + "zk-prefixer:Create new unique note": false, + "obsidian-git:Open Git source control": false + } + }, + "active": "25aae42aaab4abe7", + "lastOpenFiles": [ + "общее заметки/100 ml вопросов.md", + "общее заметки/Gibbs sampling.md", + "общее заметки/Marcov chain.md", + "общее заметки/Method Monte-Carlo.md", + "общее заметки/Topic modeling.md", + "общее заметки/New words dict.md", + "общее заметки/Stemming.md", + "общее заметки/Lemmatization.md", + "общее заметки/TF-IDF.md", + "Untitled.md", + "attachment/Pasted image 20260719174012.png", + "общее заметки/IELTS.md", + "общее заметки/МФТИ учебники.md", + "общее заметки/SVD (singular value decomposition).md", + "Дейли журнал/2026-07-19.md", + "общее заметки/ответы на 100/ответ 3.md", + "общее заметки/ответы на 100/ответ 2.md", + "общее заметки/ответы на 100", + "Untitled 1", + "attachment/Pasted image 20260719155956.png", + "attachment", + "attachment/Pasted image 20260719155922.png", + "общее заметки", + "202607191500.md", + "Untitled.canvas", + "2026-07-19.md", + "Untitled", + "Дейли журнал", + "Welcome.md", + "my first note.md", + "Untitled.base", + "Cheat sheet md.md" + ] +} \ No newline at end of file diff --git a/main/Untitled.md b/main/Untitled.md new file mode 100644 index 0000000..e69de29 diff --git a/main/attachment/Pasted image 20260719155922.png b/main/attachment/Pasted image 20260719155922.png new file mode 100644 index 0000000000000000000000000000000000000000..678ac19c0b616c931a9b8a8fdb418c6ae6ec1acc GIT binary patch literal 28302 zcmY&gWmr|wwne%d4jqT??vU;-=?0Mo>5`5^cT0D-bayDyAthY`(ulmxt#|JqKEA^~ zYpUu)_#1c@3!XI$|4Kp%eppSHhC{}|?9d#)Cbn4%Y?9nUpc z`d@o8hNwgb>l(z98~D|c>z~JC3NJwsk%g6^^!j;bpw-QP27a9s&+E2iVNN{%@2+Gb z19P9&n#`rk{;!obivcs4gWh|*Nc`_zVIQP;-COGl*Zlt&1pQlBS1Ik+B~`kNfB&CX zy2}8gxQDZ1O#RQca7zIbT)=$C^OfOW2KBnGBgpIVF#TEa{{JHbM$2Ev9D~zouaS$R z`>%%y$p8zyh#(9=_x@kgoInop3(?k@Obq$=9)^lp1INt%ddxu}wusOFze+LhSJS*Q zOefL)U(*!)hiSt4dHmOwhz-7)=0c6b`Q-l`4g#-E2{C=Rl?dVTb-9rvKr{Ulp2x9$Ac!*aDAmjifjD1*a-h|f`Y z&Av%_avah0&;8}wzxO|z-Sibrnx;5WbfHz{fsX++S?7_5QgM`qjlXowGQiE=HNlkC_+nc%-Q+(&Bq} z{)}*)XAvg=8Dt1VDOS$rWtp%l-Ji~mClyK~MINp_n)&o}*5>l<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~a(O?DDM-p1tq>C|m@O-w;AiOUMKGe#6aMv~JV>+hEZURxq zlET{!bwB5I%aK~p97P@ayzJ(?yK@vY9ozhAv7WVi)lBb3QP)MJUatYu%72C zR)Tpq^nE3WnT)0R|5xcA8QCmpTCkI1Y*^i?7|Zec7y&2oz16N^wP#$v`nwlE8iEaB_OW~`8ipN3k6%h}TkdeRG3Lc`37KZh}>K9LZi_51N z_zcteXHn1O0(iO?ys_-sI82UO^cY|7C0br2t@}~J+MTS$v7{^p5h*A)S*l%nj8VN# zj5IT8_05_VJ>6*=%E!7TCsFLpd<=~0Eprf~9HZ{1Tf@+uEAbVq3?{`D230YnG6oNc zrAd^+$y7 zkImdt7#6Wi=KM(V5tp&nGj1^Z09~nt(eYOxVNPJ`hS6h9XY44HAR5=wb;zgk#ms|s zcP*E0hcFO%w6QeP+I+qZ|4cQ&X54>iM}LUAkb}INFBQR`t;dfwq0iH$JgK6RoB^X= z1Y~9L<9=|~5s9A)sSE`#J^SdEa>f-<`S-8Nt2!D$t4>|Dy&#)|G2W$f5ix)WO=rCw66le%P~?Y#TXB$>X=kkyv#u4nvwQY?_HD0e{KIMezAg(7AZ27jk}5yhj*?0?1*RS-m}$bm6OdH-mGVhKL3|I6OuMl6DF{SxE1 zKK*;F6}Hb1k2Iopw_jzx`hTN|oZY!io{}ug<$1LIYlM}$wsSr=_>w!9`~oxnGYN@` zC`u&>tA2p@3>YjE&rdMR zDtwtHg2*8G*W;b~3^DwA_LmC`ll%KO_NABz_y;Mz4J0Dq;v(piAteVSF#&;|ma*nj Iq%-FK0J@MP+W-In literal 0 HcmV?d00001 diff --git a/main/attachment/Pasted image 20260719155956.png b/main/attachment/Pasted image 20260719155956.png new file mode 100644 index 0000000000000000000000000000000000000000..7b82f956c33f306f556b59dfabfc0397d3e3e864 GIT binary patch literal 28271 zcmYhibzD_Zw>6A}G|~;y-O?c4-AIRobT@)XcXxM#(jXub0*7v;yE~-eTip9S?{oj* z@Y`pfy<*QbV~jDwRg|Pr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9u$%b*9=I2ZkuC8B{Q;@_?-{Ve z{}Q%ROkMxIU^Jvr@s<4;yeifPO?2b`E)EeMtr?~+GruFWMGme)ixT_advS@}#ejq_ zdl?P>^9dVbya4JU-^Lw2|Fgx}U+0{F`6xxT!29`^7YA0<9hR#rTr8}stFEeUHn43R d0jAHx#Y#R+yd&nuvk6|o(pEQ6Yf!O^{(qDHdgK5A literal 0 HcmV?d00001 diff --git a/main/attachment/Pasted image 20260719174012.png b/main/attachment/Pasted image 20260719174012.png new file mode 100644 index 0000000000000000000000000000000000000000..ad0878879258889f72484eb387a0b575655ab411 GIT binary patch literal 244942 zcmc$`1yEJr8#c;;BZ3mrDJb13CEeXAARJ0c5JZ%e5|EM-kOpax7HK$ugwoxOl)xdR z>)W6r=6MSm69UG1Y}Iu!TXwPdlPG+vHwox+>bk+EJaIohx6&?wTiLWvy!* z*ek+1*c%cy_@vyy|9+b8gVut7UH9>J#~`5)g1`8PO1Z0s!XbxT{y_Kc3L!Wh#aXU> zQ~iJTK(_jC?VLUk#QW z$PwmL$CY1y zOQ{Kvj13depPlr2^d%Ym{2j7_G4!zZ#GgV5XNYBHqjYJp}$CxJ>lY1TL=Q0-gC{^HN`# z%*C%4PkEFB%I&1AyR0yeLP^N2=X2Nh@n2EeNnPn2pYyC+RDNnIj}3A6O3L3IUN)bf zQ(9DTM|}2zjNxxPfi40|{o?@8*LMKx7mGt=@;p}`WCc+5rKSGXDPRKlf@gAU2ITnX z@!#ebND4njdww1Inv7)`by4_)3&PEJ=}ssaCVtL1;$i82;n$!;vP%)yL6hM%H@p7~lB^c^J}Iw9feXbOmbr1Q?8;uWYQe+3sMeC5hG z0KIDpsX7FtY)a>=9YM0G{?FAKy%OT8EGp-w+XTG1(R_yNvdDf~wgeL>FYvc;A;N$M zGQURoesP}!DJbvV@1HLe1QEl)-$wiaaSMMb7N4v95uYjIpL;GTQ3_%JMjUq^NH;PF zFyOr^2q+l_g!+noFA{lB)p8mi4w!eR08d%#5pwqF>dv`rl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Hk z+ikVqc)8DGYo{jbq$wktLpPGkk2#~hr_A)#-E&03|?bpv0 z+64xY-IdS(&>A>|Ng8rOBLy9%lMnjbj^4PrT7991pWA;cn(U>Pd%z#?1}U5Ou{lw< za9Be6^^PY#fp3#IWtdcSAmB4o~0z8g_#?O z$WRUc*&kYnSc-b-$@d()Fjjb1M8cT5-IFGYgHLZ3?M>&c4K^pAKfU|@{;=CGixi%d z1=F6Z&t6gD1f5r?SPmWSEyBdXVxFanjBTczc zi$vI|mJ_A7k(bxDjn`N&=&tz5RsHa5Y!QWVi@sd1cWw0#6f80Z#RMl=XQ!>U(<6MY zBddAig~QY7>(TEp|KS-y0aMY@b$S@Jx#8kTvyyOBdb8mUd{EuT160j|)2lKJ=DGUn zbf{q+s9>M;MdZswm7l#_v z#qu%_zFgv3z#^RDc=v0O6z rpB*q5?4N&hi!a^*58pzm+&3_rGP&s1+HZaW|A9H!;cTlgq;vldXI@q) literal 0 HcmV?d00001 diff --git a/main/Дейли журнал/2026-07-19.md b/main/Дейли журнал/2026-07-19.md new file mode 100644 index 0000000..e69de29 diff --git a/main/общее заметки/100 ml вопросов.md b/main/общее заметки/100 ml вопросов.md new file mode 100644 index 0000000..6ee8f61 --- /dev/null +++ b/main/общее заметки/100 ml вопросов.md @@ -0,0 +1,11 @@ +#ml #учеба #собес +https://dynamic-epoch-4bb.notion.site/100-questions-about-NLP-549ccde0d81a4689b5635888b9d0d7e6 + +## [[TF-IDF]] +1. Напишите TF-IDF с нуля? [[ответ 1]] +2. Что такое нормализация в TF-IDF? [[ответ 2]] +3. Зачем вы вообще знаете про TF-IDF в наше время и как можете использовать в сложных моделях? [[ответ 3]] + + + +2026-07-19 \ No newline at end of file diff --git a/main/общее заметки/Gibbs sampling.md b/main/общее заметки/Gibbs sampling.md new file mode 100644 index 0000000..fbc009c --- /dev/null +++ b/main/общее заметки/Gibbs sampling.md @@ -0,0 +1,7 @@ +#учеба #math +[[Method Monte-Carlo]] [[Marcov chain]] +Gibbs Sampling is a potent Markov Chain Monte Carlo (MCMC) + + +Sources: +https://www.geeksforgeeks.org/machine-learning/what-is-gibbs-sampling/ \ No newline at end of file diff --git a/main/общее заметки/IELTS.md b/main/общее заметки/IELTS.md new file mode 100644 index 0000000..bd9a5d9 --- /dev/null +++ b/main/общее заметки/IELTS.md @@ -0,0 +1,2 @@ +#учеба #англ +[сайт с мок тестами](https://ieltsonlinetests.com/ielts-exam-library?skill=listening) diff --git a/main/общее заметки/Lemmatization.md b/main/общее заметки/Lemmatization.md new file mode 100644 index 0000000..0060a80 --- /dev/null +++ b/main/общее заметки/Lemmatization.md @@ -0,0 +1,7 @@ +#ml #учеба Related to [[data mining]], [[Stemming]] + + Lemmatization - way of group morphologically related word +Result of lemmatization must be found in dictionary +WordNetLemmatizer in nltk + +Source: https://www.ibm.com/think/topics/stemming-lemmatization?regionCode=us&languageCode=en&cm-history=us-en \ No newline at end of file diff --git a/main/общее заметки/Marcov chain.md b/main/общее заметки/Marcov chain.md new file mode 100644 index 0000000..e69de29 diff --git a/main/общее заметки/Method Monte-Carlo.md b/main/общее заметки/Method Monte-Carlo.md new file mode 100644 index 0000000..e69de29 diff --git a/main/общее заметки/New words dict.md b/main/общее заметки/New words dict.md new file mode 100644 index 0000000..21c9f53 --- /dev/null +++ b/main/общее заметки/New words dict.md @@ -0,0 +1,6 @@ +#учеба #англ +albeit - "even though" or "although" (но все же) +factorization - mathematical process of breaking down a complex entity (like a number or algebraic expression) into a product of simpler entities (factors) that multiply together to yield the original (разложение на множители/факторы) +consonant - согласные (vowel - гласные) +erroneously - ошибочно (удивлен, что такое слово вообще есть) +eigenvectors - собственные вектора \ No newline at end of file diff --git a/main/общее заметки/SVD (singular value decomposition).md b/main/общее заметки/SVD (singular value decomposition).md new file mode 100644 index 0000000..7453428 --- /dev/null +++ b/main/общее заметки/SVD (singular value decomposition).md @@ -0,0 +1 @@ +#ml #учеба #math diff --git a/main/общее заметки/Stemming.md b/main/общее заметки/Stemming.md new file mode 100644 index 0000000..4aabdaa --- /dev/null +++ b/main/общее заметки/Stemming.md @@ -0,0 +1,13 @@ +#ml #учеба [[data mining]] +![[Pasted image 20260719174012.png]] + +Main function to reduce word to it's original (root) form - stem (lemma). +### Lovins stemmer +Rules only, remove suffixes, main problem is over removal of suffixes the, those, them - the, love - lov and so on. +### Porter stemmer +Classify characters as vowels and consonant. Group sequential v and c and remove them by some rules (have rules, so still have some errors) Implementation in nltk. +### Snowball stemmer +Updated porter with new rules, stop word and including other languages (including Russian) also have stop words list, such as  _the_, _a_, _being_, and the like. Also has implementation in nltk. + + +Source: https://www.ibm.com/think/topics/stemming?regionCode=us&languageCode=en&cm-history=us-en diff --git a/main/общее заметки/TF-IDF.md b/main/общее заметки/TF-IDF.md new file mode 100644 index 0000000..8e17f22 --- /dev/null +++ b/main/общее заметки/TF-IDF.md @@ -0,0 +1,17 @@ +TF - term frequency. IDF - inverse document frequency +![[Pasted image 20260719155922.png]] + +![[Pasted image 20260719155956.png]] + +```python +from sklearn.feature_extraction.text import TfidfVectorizer +``` +Usage +- keywords extraction +- text clustering (kmeans on tf-idf matrix) + +Initially - modification of bag of word, used to filter out useless (less important for meaning words) + +Sources: +https://habr.com/ru/companies/otus/articles/755772/ +https://www.geeksforgeeks.org/machine-learning/understanding-tf-idf-term-frequency-inverse-document-frequency/ \ No newline at end of file diff --git a/main/общее заметки/Topic modeling.md b/main/общее заметки/Topic modeling.md new file mode 100644 index 0000000..e9981fa --- /dev/null +++ b/main/общее заметки/Topic modeling.md @@ -0,0 +1,17 @@ +#ml #учеба + +Topic modeling - unsupervised, provides set of topics of docs. In some way modification of [[TF-IDF]] to deal with synonyms and polysemy. +Important to use [[Stemming]] and [[Lemmatization]] to reduce number of unique words in dictionary of documents. + +LSA (latent semantic analysis or latent semantic indexing) +Has to more matrixes Term x Term - number of documents, there terms co-ocur. Document x Document - number of terms each doc has in common +Document x term - number of terms in each doc +Use [[SVD (singular value decomposition)]] on term x doc Reduce dimensions and use cosine similarity of this resulting matrixes to measure resemblance of documents. + +LDA (Latent Dirichlet allocation) +probabilistic algorithm. Using doc x term matrixes (freq and co-ocurence) - generate table of probabilities for each keyword in each doc (topic distribution). +While assigning topic to words it uses [[Gibbs sampling]] + +sources: +https://maartengr.github.io/BERTopic/getting_started/ctfidf/ctfidf.html - bertopic lib +https://huggingface.co/blog/bobxwu/fastopic diff --git a/main/общее заметки/МФТИ учебники.md b/main/общее заметки/МФТИ учебники.md new file mode 100644 index 0000000..de9ccb9 --- /dev/null +++ b/main/общее заметки/МФТИ учебники.md @@ -0,0 +1,3 @@ +Вышмат +https://mipt.ru/institute-departments/kafedra-vysshey-matematiki/study_docs/books_lections - Иванов и тд +https://lib.mipt.ru/book/l/000248050008100a2db5dfecfa332c54/Beklemishev-DV-Kurs-analiticheskoi-geometrii-i-lineinoi-algebry.pdf - бек diff --git a/main/общее заметки/ответы на 100/ответ 2.md b/main/общее заметки/ответы на 100/ответ 2.md new file mode 100644 index 0000000..200133b --- /dev/null +++ b/main/общее заметки/ответы на 100/ответ 2.md @@ -0,0 +1 @@ +Нормализация нужна, чтобы мы не переоценивали tf в длинных документах. В итоге нормализация - деление tf на длину документа (кол-во term) diff --git a/main/общее заметки/ответы на 100/ответ 3.md b/main/общее заметки/ответы на 100/ответ 3.md new file mode 100644 index 0000000..0e571b3 --- /dev/null +++ b/main/общее заметки/ответы на 100/ответ 3.md @@ -0,0 +1,3 @@ +Зачем вы вообще знаете про TF-IDF в наше время и как можете использовать в сложных моделях? +TF-IDF - быстрый способ векторизации текста, который можно использовать для проверки гипотез +Выделение фичей (так как можем получать важность слова и можем добавлять его) \ No newline at end of file