From bd7c3513abb0627b3ec57b0d5e1ee82298d8da3d Mon Sep 17 00:00:00 2001 From: iOS Date: Sun, 1 May 2022 12:13:49 +0100 Subject: [PATCH] lisbon update --- .obsidian/community-plugins.json | 5 +- .obsidian/graph.json | 2 +- .obsidian/plugins/mrj-text-expand/main.js | 503 +- .../plugins/mrj-text-expand/manifest.json | 2 +- .../plugins/multi-column-markdown/main.js | 1302 - .../multi-column-markdown/manifest.json | 10 - .../plugins/multi-column-markdown/styles.css | 134 - .obsidian/plugins/notion-like-tables/main.js | 51010 ++++++++++++++++ .../plugins/notion-like-tables/manifest.json | 10 + .../plugins/notion-like-tables/styles.css | 241 + .../obsidian-activity-history/data.json | 20 +- .../plugins/obsidian-admonition/data.json | 2 +- .obsidian/plugins/obsidian-admonition/main.js | 2 +- .../plugins/obsidian-admonition/manifest.json | 2 +- .../obsidian-book-search-plugin/main.js | 27 +- .../obsidian-book-search-plugin/manifest.json | 4 +- .obsidian/plugins/obsidian-columns/main.js | 126 + .../plugins/obsidian-columns/manifest.json | 10 + .obsidian/plugins/obsidian-columns/styles.css | 10 + .obsidian/plugins/obsidian-commits/data.json | 230 +- .../obsidian-reminder-plugin/data.json | 19 +- .obsidian/workspace | 22 +- 00.01 Admin/Calendars/2022-01-22.md | 2 +- 00.01 Admin/Calendars/2022-03-02.md | 2 +- 00.01 Admin/Calendars/2022-04-10.md | 2 +- 00.01 Admin/Calendars/2022-04-26.md | 4 +- .../2022-04-27 Arrivée à Lisbonne.md | 9 + 00.01 Admin/Calendars/2022-04-27.md | 106 + 00.01 Admin/Calendars/2022-04-28.md | 104 + .../2022-04-29 Meggi-mo arrives in Lisbon.md | 7 + 00.01 Admin/Calendars/2022-04-29.md | 104 + 00.01 Admin/Calendars/2022-04-30.md | 104 + .../2022-05-01 Départ de Lisbonne.md | 9 + ...2-05-01 Meggi-mo's departure to Belfast.md | 7 + 00.01 Admin/Calendars/2022-05-01.md | 104 + ... Definite arrival of Meggi-mo to Züzü.md | 9 + .../2022-06-17 Gorillaz - arenes de Nimes.md | 9 + 00.02 Inbox/Vernon Subutex 1.md | 102 + ...s We Can Still Save From Climate Change.md | 2 +- ...re trying to reverse the ageing process.md | 2 +- ...n, a Rare Cello and an Enduring Mystery.md | 2 +- .../The death spiral of an American family.md | 2 +- 00.03 News/The real Mission Impossible.md | 4 +- ...nner's Guide to Tech's Latest Obsession.md | 2 +- ... How a progressive company lost its way.md | 2 +- ...amera observes elusive deep sea animals.md | 2 +- 03.01 Reading list/Comprendre l'islam.md | 1 + .../Lionel Asbo.md | 4 +- 06.02 Investments/Crypto Tasks.md | 3 +- 06.02 Investments/Equity Tasks.md | 3 +- 06.02 Investments/VC Tasks.md | 3 +- 51 files changed, 52661 insertions(+), 1748 deletions(-) delete mode 100644 .obsidian/plugins/multi-column-markdown/main.js delete mode 100644 .obsidian/plugins/multi-column-markdown/manifest.json delete mode 100644 .obsidian/plugins/multi-column-markdown/styles.css create mode 100644 .obsidian/plugins/notion-like-tables/main.js create mode 100644 .obsidian/plugins/notion-like-tables/manifest.json create mode 100644 .obsidian/plugins/notion-like-tables/styles.css create mode 100644 .obsidian/plugins/obsidian-columns/main.js create mode 100644 .obsidian/plugins/obsidian-columns/manifest.json create mode 100644 .obsidian/plugins/obsidian-columns/styles.css create mode 100644 00.01 Admin/Calendars/2022-04-27 Arrivée à Lisbonne.md create mode 100644 00.01 Admin/Calendars/2022-04-27.md create mode 100644 00.01 Admin/Calendars/2022-04-28.md create mode 100644 00.01 Admin/Calendars/2022-04-29 Meggi-mo arrives in Lisbon.md create mode 100644 00.01 Admin/Calendars/2022-04-29.md create mode 100644 00.01 Admin/Calendars/2022-04-30.md create mode 100644 00.01 Admin/Calendars/2022-05-01 Départ de Lisbonne.md create mode 100644 00.01 Admin/Calendars/2022-05-01 Meggi-mo's departure to Belfast.md create mode 100644 00.01 Admin/Calendars/2022-05-01.md create mode 100644 00.01 Admin/Calendars/2022-05-15 Definite arrival of Meggi-mo to Züzü.md create mode 100644 00.01 Admin/Calendars/2022-06-17 Gorillaz - arenes de Nimes.md create mode 100644 00.02 Inbox/Vernon Subutex 1.md rename {00.02 Inbox => 03.01 Reading list}/Lionel Asbo.md (95%) diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index d261ca6e..f59f9f50 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -35,7 +35,6 @@ "metaedit", "obsidian-metatable", "obsidian-minimal-settings", - "multi-column-markdown", "nldates-obsidian", "note-refactor-obsidian", "obsidian-memos", @@ -59,5 +58,7 @@ "obsidian-read-it-later", "obsidian-full-calendar", "markdown-table-editor", - "obsidian-book-search-plugin" + "obsidian-book-search-plugin", + "obsidian-columns", + "notion-like-tables" ] \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json index f66bb261..a3091215 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -95,6 +95,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 0.2146842347194271, + "scale": 0.2341704597667036, "close": true } \ No newline at end of file diff --git a/.obsidian/plugins/mrj-text-expand/main.js b/.obsidian/plugins/mrj-text-expand/main.js index 69fe8505..3b4feb78 100644 --- a/.obsidian/plugins/mrj-text-expand/main.js +++ b/.obsidian/plugins/mrj-text-expand/main.js @@ -2,7 +2,7 @@ var obsidian = require('obsidian'); -/*! ***************************************************************************** +/****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -82,6 +82,18 @@ function __generator(thisArg, body) { } } +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -106,7 +118,7 @@ function __spreadArray(to, from, pack) { ar[i] = from[i]; } } - return to.concat(ar || from); + return to.concat(ar || Array.prototype.slice.call(from)); } function formatContent(content) { @@ -178,6 +190,302 @@ function trimContent(s) { return removeFrontMatter(removeEmptyLines(s)); } +function highlight(lineStart, lineEnd, matchStart, matchEnd, lineContent) { + return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(lineContent.slice(0, matchStart - lineStart)), false), [ + '==' + ], false), __read(lineContent.slice(matchStart - lineStart, (matchStart - lineStart) + (matchEnd - matchStart))), false), [ + '==' + ], false), __read(lineContent.slice((matchStart - lineStart) + (matchEnd - matchStart))), false).join(''); +} +var sequences = [ + { + name: '\\$count', + loop: true, + format: function (_p, _s, _content, _file, _d, index) { return index ? String(index + 1) : String(1); }, + desc: 'add index number to each produced file' + }, + { + name: '\\$filename', + loop: true, + format: function (_p, _s, _content, file) { return file.basename; }, + desc: 'name of the founded file' + }, + { + name: '\\$link', + loop: true, + format: function (p, _s, _content, file) { return p.app.fileManager.generateMarkdownLink(file, file.path); }, + desc: 'link based on Obsidian settings' + }, + { + name: '\\$lines:\\d+', + loop: true, + readContent: true, + format: function (p, s, content, _file) { + var digits = Number(s.split(':')[1]); + return trimContent(content) + .split('\n') + .filter(function (_, i) { return i < digits; }) + .join('\n') + .replace(new RegExp(p.config.lineEnding, 'g'), ''); + }, + desc: 'specified count of lines from the found file' + }, + { + name: '\\$characters:\\d+', + loop: true, + readContent: true, + format: function (p, s, content, _file) { + var digits = Number(s.split(':')[1]); + return trimContent(content) + .split('') + .filter(function (_, i) { return i < digits; }) + .join('') + .replace(new RegExp(p.config.lineEnding, 'g'), ''); + }, + desc: 'specified count of lines from the found file' + }, + { + name: '\\$frontmatter:[\\p\{L\}_-]+', + loop: true, + format: function (p, s, _content, file) { return p.getFrontMatter(s, file); }, + desc: 'value from the frontmatter key in the found file' + }, + { + name: '\\$lines+', + loop: true, + readContent: true, + format: function (p, s, content, _file) { return content.replace(new RegExp(p.config.lineEnding, 'g'), ''); }, + desc: 'all content from the found file' + }, + { + name: '\\$ext', + loop: true, + format: function (_p, s, content, file) { return file.extension; }, + desc: 'return file extension' + }, + { + name: '\\$created:format:date', + loop: true, + format: function (_p, s, content, file) { return String(new Date(file.stat.ctime).toISOString()).split('T')[0]; }, + desc: 'created time formatted' + }, + { + name: '\\$created:format:time', + loop: true, + format: function (_p, s, content, file) { return String(new Date(file.stat.ctime).toISOString()).split(/([.T])/)[2]; }, + desc: 'created time formatted' + }, + { + name: '\\$created:format', + loop: true, + format: function (_p, s, content, file) { return String(new Date(file.stat.ctime).toISOString()); }, + desc: 'created time formatted' + }, + { + name: '\\$created', + loop: true, + format: function (_p, s, content, file) { return String(file.stat.ctime); }, + desc: 'created time' + }, + { + name: '\\$size', + loop: true, + format: function (_p, s, content, file) { return String(file.stat.size); }, + desc: 'size of the file' + }, + { + name: '\\$path', + loop: true, + format: function (_p, s, content, file) { return file.path; }, + desc: 'path to the found file' + }, + { + name: '\\$parent', + loop: true, + format: function (_p, s, content, file) { return file.parent.name; }, + desc: 'parent folder name' + }, + { + name: '^(.+|)\\$header:.+', + loop: true, + format: function (p, s, content, file) { + var _a; + var prefix = s.slice(0, s.indexOf('$')); + var header = s.slice(s.indexOf('$')).replace('$header:', '').replace(/"/g, ''); + var neededLevel = header.split("#").length - 1; + var neededTitle = header.replace(/^#+/g, '').trim(); + var metadata = p.app.metadataCache.getFileCache(file); + return ((_a = metadata.headings) === null || _a === void 0 ? void 0 : _a.filter(function (e) { + var tests = [ + [neededTitle, e.heading.includes(neededTitle)], + [neededLevel, e.level === neededLevel] + ].filter(function (e) { return e[0]; }); + if (tests.length) { + return tests.map(function (e) { return e[1]; }).every(function (e) { return e === true; }); + } + return true; + }).map(function (h) { return p.app.fileManager.generateMarkdownLink(file, file.basename, '#' + h.heading); }).map(function (link) { return prefix + link; }).join('\n')) || ''; + }, + desc: 'headings from founded files. $header:## - return all level 2 headings. $header:Title - return all heading which match the string. Can be prepended like: - !$header:## to transclude the headings.' + }, + { + name: '^(.+|)\\$blocks', + readContent: true, + loop: true, + format: function (p, s, content, file) { + var prefix = s.slice(0, s.indexOf('$')); + return content + .split('\n') + .filter(function (e) { return /\^\w+$/.test(e); }) + .map(function (e) { + return prefix + p.app.fileManager.generateMarkdownLink(file, file.basename, '#' + e.replace(/^.+?(\^\w+$)/, '$1')); + }) + .join('\n'); + }, + desc: 'block ids from the found files. Can be prepended.' + }, + { + name: '^(.+|)\\$match:header', loop: true, format: function (p, s, content, file, results) { + var _a; + var prefix = s.slice(0, s.indexOf('$')); + var metadata = p.app.metadataCache.getFileCache(file); + var headings = (_a = metadata.headings) === null || _a === void 0 ? void 0 : _a.filter(function (h) { return results.result.content.filter(function (c) { return h.position.end.offset < c[0]; }).some(function (e) { return e; }); }).slice(-1); + return headings + .map(function (h) { return p.app.fileManager.generateMarkdownLink(file, file.path, '#' + h.heading); }) + .map(function (link) { return prefix + link; }) + .join('\n') || ''; + }, desc: 'extract found selections' + }, + { + name: '^(.+|)\\$matchline:(\\+|-|)\\d+', + loop: true, + format: function (_p, s, content, file, results) { + s.slice(0, s.indexOf('$matchline')); + var value = s.slice(s.indexOf('$matchline')).split(':')[1]; + var isPlus = value.contains('+'); + var isMinus = value.contains('-'); + var isContext = !isPlus && !isMinus; + var offset = Number(value.replace(/[+-]/, '')); + var lines = results.content.split('\n'); + // Grab info about line content, index, text length and start/end character position + var lineInfos = []; + for (var i = 0; i < lines.length; i++) { + var text = lines[i]; + if (i === 0) { + lineInfos.push({ + num: 0, + start: 0, + end: text.length, + text: text + }); + continue; + } + var start = lineInfos[i - 1].end + 1; + lineInfos.push({ + num: i, + start: start, + text: text, + end: text.length + start + }); + } + return results.result.content.map(function (_a) { + var e_1, _b; + var _c = __read(_a, 2), from = _c[0], to = _c[1]; + var matchedLines = lineInfos + .filter(function (_a) { + var start = _a.start, end = _a.end; + return start <= from && end >= to; + }) + .map(function (line) { + return __assign(__assign({}, line), { text: highlight(line.start, line.end, from, to, line.text) }); + }); + var resultLines = []; + var _loop_1 = function (matchedLine) { + var prevLines = isMinus || isContext + ? lineInfos.filter(function (l) { return matchedLine.num - l.num > 0 && matchedLine.num - l.num < offset; }) + : []; + var nextLines = isPlus || isContext + ? lineInfos.filter(function (l) { return l.num - matchedLine.num > 0 && l.num - matchedLine.num < offset; }) + : []; + resultLines.push.apply(resultLines, __spreadArray(__spreadArray(__spreadArray([], __read(prevLines), false), [matchedLine], false), __read(nextLines), false)); + }; + try { + for (var matchedLines_1 = __values(matchedLines), matchedLines_1_1 = matchedLines_1.next(); !matchedLines_1_1.done; matchedLines_1_1 = matchedLines_1.next()) { + var matchedLine = matchedLines_1_1.value; + _loop_1(matchedLine); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (matchedLines_1_1 && !matchedLines_1_1.done && (_b = matchedLines_1.return)) _b.call(matchedLines_1); + } + finally { if (e_1) throw e_1.error; } + } + return resultLines.map(function (e) { return e.text; }).join('\n'); + }).join('\n'); + }, desc: 'extract line with matches' + }, + { + name: '^(.+|)\\$matchline', loop: true, format: function (_p, s, content, file, results) { + s.slice(0, s.indexOf('$')); + var lines = results.content.split('\n'); + // Grab info about line content, index, text length and start/end character position + var lineInfos = []; + for (var i = 0; i < lines.length; i++) { + var text = lines[i]; + if (i === 0) { + lineInfos.push({ + num: 0, + start: 0, + end: text.length, + text: text + }); + continue; + } + var start = lineInfos[i - 1].end + 1; + lineInfos.push({ + num: i, + start: start, + text: text, + end: text.length + start + }); + } + return results.result.content.map(function (_a) { + var _b = __read(_a, 2), from = _b[0], to = _b[1]; + return lineInfos + .filter(function (_a) { + var start = _a.start, end = _a.end; + return start <= from && end >= to; + }) + .map(function (_a) { + var start = _a.start, end = _a.end, text = _a.text; + return highlight(start, end, from, to, text); + }).join('\n'); + }).join('\n'); + }, desc: 'extract line with matches' + }, + { + name: '^(.+|)\\$match', loop: true, format: function (_p, s, content, file, results) { + if (!results.result.content) { + console.warn('There is no content in results'); + return ''; + } + function appendPrefix(prefix, line) { + return prefix + line; + } + var prefixContent = s.slice(0, s.indexOf('$')); + return results.result.content + .map(function (_a) { + var _b = __read(_a, 2), from = _b[0], to = _b[1]; + return results.content.slice(from, to); + }) + .map(function (line) { return appendPrefix(prefixContent, line); }) + .join('\n'); + }, desc: 'extract found selections' + }, +]; + var TextExpander = /** @class */ (function (_super) { __extends(TextExpander, _super); function TextExpander(app, plugin) { @@ -185,164 +493,11 @@ var TextExpander = /** @class */ (function (_super) { _this.config = { autoExpand: false, defaultTemplate: '- $link', - delay: 5000, + delay: 300, excludeCurrent: true, - lineEnding: '<--->' + lineEnding: '<-->' }; - _this.seqs = [ - { - name: '\\$count', - loop: true, - format: function (_s, _content, _file, _d, index) { return index ? String(index + 1) : String(1); }, - desc: 'add index number to each produced file' - }, - { - name: '\\$filename', - loop: true, - format: function (_s, _content, file) { return file.basename; }, - desc: 'name of the founded file' - }, - { - name: '\\$link', - loop: true, - format: function (_s, _content, file) { return _this.app.fileManager.generateMarkdownLink(file, file.path); }, - desc: 'link based on Obsidian settings' - }, - { - name: '\\$lines:\\d+', - loop: true, - readContent: true, - format: function (s, content, _file) { - var digits = Number(s.split(':')[1]); - return trimContent(content) - .split('\n') - .filter(function (_, i) { return i < digits; }) - .join('\n') - .replace(new RegExp(_this.config.lineEnding, 'g'), ''); - }, - desc: 'specified count of lines from the found file' - }, - { - name: '\\$frontmatter:[\\p\{L\}_-]+', - loop: true, - format: function (s, _content, file) { return _this.getFrontMatter(s, file); }, - desc: 'value from the frontmatter key in the found file' - }, - { - name: '\\$lines+', - loop: true, - readContent: true, - format: function (s, content, _file) { return content.replace(new RegExp(_this.config.lineEnding, 'g'), ''); }, - desc: 'all content from the found file' - }, - { - name: '\\$ext', - loop: true, - format: function (s, content, file) { return file.extension; }, - desc: 'return file extension' - }, - { - name: '\\$created:format:date', - loop: true, - format: function (s, content, file) { return String(new Date(file.stat.ctime).toISOString()).split('T')[0]; }, - desc: 'created time formatted' - }, - { - name: '\\$created:format:time', - loop: true, - format: function (s, content, file) { return String(new Date(file.stat.ctime).toISOString()).split(/([.T])/)[2]; }, - desc: 'created time formatted' - }, - { - name: '\\$created:format', - loop: true, - format: function (s, content, file) { return String(new Date(file.stat.ctime).toISOString()); }, - desc: 'created time formatted' - }, - { - name: '\\$created', - loop: true, - format: function (s, content, file) { return String(file.stat.ctime); }, - desc: 'created time' - }, - { - name: '\\$size', - loop: true, - format: function (s, content, file) { return String(file.stat.size); }, - desc: 'size of the file' - }, - { - name: '\\$path', - loop: true, - format: function (s, content, file) { return file.path; }, - desc: 'path to the found file' - }, - { - name: '\\$parent', - loop: true, - format: function (s, content, file) { return file.parent.name; }, - desc: 'parent folder name' - }, - { - name: '^(.+|)\\$header:.+', - loop: true, - format: function (s, content, file) { - var _a; - var prefix = s.slice(0, s.indexOf('$')); - var header = s.slice(s.indexOf('$')).replace('$header:', '').replace(/"/g, ''); - var neededLevel = header.split("#").length - 1; - var neededTitle = header.replace(/^#+/g, '').trim(); - var metadata = _this.app.metadataCache.getFileCache(file); - return ((_a = metadata.headings) === null || _a === void 0 ? void 0 : _a.filter(function (e) { - var tests = [ - [neededTitle, e.heading.includes(neededTitle)], - [neededLevel, e.level === neededLevel] - ].filter(function (e) { return e[0]; }); - if (tests.length) { - return tests.map(function (e) { return e[1]; }).every(function (e) { return e === true; }); - } - return true; - }).map(function (h) { return _this.app.fileManager.generateMarkdownLink(file, file.path, '#' + h.heading); }).map(function (link) { return prefix + link; }).join('\n')) || ''; - }, - desc: 'headings from founded files. $header:## - return all level 2 headings. $header:Title - return all heading which match the string. Can be prepended like: - !$header:## to transclude the headings.' - }, - { - name: '^(.+|)\\$blocks', - readContent: true, - loop: true, - format: function (s, content, file) { - return content - .split('\n') - .filter(function (e) { return /\^\w+$/.test(e); }) - .map(function (e) { return s - .replace('$blocks', "(" + encodeURIComponent(file.basename) + "#" + e.replace(/^.+?(\^\w+$)/, '$1') + ")"); }) - .join('\n'); - }, - desc: 'block ids from the found files. Can be prepended.' - }, - { - name: '^(.+|)\\$match:header', loop: true, format: function (s, content, file, results) { - var _a; - var prefix = s.slice(0, s.indexOf('$')); - var metadata = _this.app.metadataCache.getFileCache(file); - var headings = (_a = metadata.headings) === null || _a === void 0 ? void 0 : _a.filter(function (h) { return results.result.content.filter(function (c) { return h.position.end.offset < c[0]; }).some(function (e) { return e; }); }).slice(-1); - return headings - .map(function (h) { return _this.app.fileManager.generateMarkdownLink(file, file.path, '#' + h.heading); }) - .map(function (link) { return prefix + link; }) - .join('\n') || ''; - }, desc: 'extract found selections' - }, - { - name: '^(.+|)\\$match', loop: true, format: function (s, content, file, results) { - var _a; - var prefix = s.slice(0, s.indexOf('$')); - return (_a = results.result.content) === null || _a === void 0 ? void 0 : _a.map(function (t) { - var _a; - return (_a = results.content).slice.apply(_a, __spreadArray([], __read(t))); - }).map(function (t) { return prefix + t; }).join('\n'); - }, desc: 'extract found selections' - }, - ]; + _this.seqs = sequences; _this.search = _this.search.bind(_this); _this.initExpander = _this.initExpander.bind(_this); _this.reformatLinks = _this.reformatLinks.bind(_this); @@ -356,13 +511,13 @@ var TextExpander = /** @class */ (function (_super) { return ''; }; TextExpander.prototype.reformatLinks = function (links, mapFunc) { - var _a, _b, _c, _e; + var _a, _b, _c, _d; if (mapFunc === void 0) { mapFunc = function (s) { return '[[' + s + ']]'; }; } var currentView = this.app.workspace.activeLeaf.view; if (currentView instanceof obsidian.FileView) { return (_b = (_a = links === null || links === void 0 ? void 0 : links.map(function (e) { return e.basename; }).filter(function (e) { return currentView.file.basename !== e; })) === null || _a === void 0 ? void 0 : _a.map(mapFunc)) === null || _b === void 0 ? void 0 : _b.join('\n'); } - return (_e = (_c = links === null || links === void 0 ? void 0 : links.map(function (e) { return e.basename; })) === null || _c === void 0 ? void 0 : _c.map(mapFunc)) === null || _e === void 0 ? void 0 : _e.join('\n'); + return (_d = (_c = links === null || links === void 0 ? void 0 : links.map(function (e) { return e.basename; })) === null || _c === void 0 ? void 0 : _c.map(mapFunc)) === null || _d === void 0 ? void 0 : _d.join('\n'); }; TextExpander.prototype.search = function (s) { // @ts-ignore @@ -372,7 +527,7 @@ var TextExpander = /** @class */ (function (_super) { // @ts-ignore collapsed: this.app.workspace.leftSplit.collapsed, // @ts-ignore - tab: this.app.workspace.leftSplit.children[0].currentTab + tab: this.getSearchTabIndex() }; search(s); if (leftSplitState.collapsed) { @@ -385,6 +540,20 @@ var TextExpander = /** @class */ (function (_super) { this.app.workspace.leftSplit.children[0].selectTabIndex(leftSplitState.tab); } }; + TextExpander.prototype.getSearchTabIndex = function () { + var leftTabs = this.app.workspace.leftSplit.children[0].children; + var searchTabId; + this.app.workspace.iterateAllLeaves(function (leaf) { + if (leaf.getViewState().type == "search") { + searchTabId = leaf.id; + } + }); + return leftTabs.findIndex(function (item, index, array) { + if (item.id == searchTabId) { + return true; + } + }); + }; TextExpander.prototype.getFoundAfterDelay = function () { return __awaiter(this, void 0, void 0, function () { var searchLeaf, view; @@ -435,6 +604,7 @@ var TextExpander = /** @class */ (function (_super) { : files; format = function (r, template, index) { return __awaiter(_this, void 0, void 0, function () { var fileContent, _a; + var _this = this; return __generator(this, function (_b) { switch (_b.label) { case 0: @@ -449,7 +619,7 @@ var TextExpander = /** @class */ (function (_super) { case 3: fileContent = _a; return [2 /*return*/, this.seqs.reduce(function (acc, seq) { - return acc.replace(new RegExp(seq.name, 'gu'), function (replace) { return seq.format(replace, fileContent, r, searchResults.get(r), index); }); + return acc.replace(new RegExp(seq.name, 'gu'), function (replace) { return seq.format(_this, replace, fileContent, r, searchResults.get(r), index); }); }, template)]; } }); @@ -500,16 +670,17 @@ var TextExpander = /** @class */ (function (_super) { TextExpander.prototype.runQuery = function (query, content) { var _a; return __awaiter(this, void 0, void 0, function () { - var lastLine, newContent; + var lineEnding, lastLine, newContent; return __generator(this, function (_b) { switch (_b.label) { case 0: + lineEnding = this.config.lineEnding; if (!query) { new Notification('Expand query not found'); return [2 /*return*/, Promise.resolve()]; } lastLine = getLastLineToReplace(content, query, this.config.lineEnding); - this.cm.replaceRange(this.config.lineEnding, { line: query.end + 1, ch: 0 }, { line: lastLine, ch: ((_a = this.cm.getLine(lastLine)) === null || _a === void 0 ? void 0 : _a.length) || 0 }); + this.cm.replaceRange('\n' + lineEnding, { line: query.end + 1, ch: 0 }, { line: lastLine, ch: ((_a = this.cm.getLine(lastLine)) === null || _a === void 0 ? void 0 : _a.length) || 0 }); newContent = formatContent(this.cm.getValue()); this.search(query.query); return [4 /*yield*/, this.startTemplateMode(query, getLastLineToReplace(newContent, query, this.config.lineEnding))]; @@ -630,7 +801,7 @@ var SettingTab = /** @class */ (function (_super) { .setName('Delay') .setDesc('Text expander don\' wait until search completed. It waits for a delay and paste result after that.') .addSlider(function (slider) { - slider.setLimits(1000, 10000, 1000); + slider.setLimits(100, 10000, 100); slider.setValue(_this.plugin.config.delay); slider.onChange(function (value) { _this.plugin.config.delay = value; @@ -693,4 +864,4 @@ var SettingTab = /** @class */ (function (_super) { }(obsidian.PluginSettingTab)); module.exports = TextExpander; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsImhlbHBlcnMudHMiLCJtYWluLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueVxyXG5wdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuXHJcblxyXG5USEUgU09GVFdBUkUgSVMgUFJPVklERUQgXC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cmF0b3JdID0gZnVuY3Rpb24oKSB7IHJldHVybiB0aGlzOyB9KSwgZztcclxuICAgIGZ1bmN0aW9uIHZlcmIobikgeyByZXR1cm4gZnVuY3Rpb24gKHYpIHsgcmV0dXJuIHN0ZXAoW24sIHZdKTsgfTsgfVxyXG4gICAgZnVuY3Rpb24gc3RlcChvcCkge1xyXG4gICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKFwiR2VuZXJhdG9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgd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cGFuZGVyc1F1ZXJ5KGNvbnRlbnQ6IHN0cmluZ1tdKTogRXhwYW5kZXJRdWVyeVtdIHtcbiAgICBsZXQgYWNjdW06IEV4cGFuZGVyUXVlcnlbXSA9IFtdXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb250ZW50Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGNvbnN0IGxpbmUgPSBjb250ZW50W2ldXG5cbiAgICAgICAgaWYgKGxpbmUgPT09ICdgYGBleHBhbmRlcicpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGUgPSAwOyBlIDwgY29udGVudC5sZW5ndGggLSBpOyBlKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXh0bGluZSA9IGNvbnRlbnRbaSArIGVdIFxuICAgICAgICAgICAgICAgIGlmIChuZXh0bGluZSA9PT0gJ2BgYCcpIHtcbiAgICAgICAgICAgICAgICAgICAgYWNjdW0ucHVzaChcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydDogaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmQ6IGkgKyBlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJ5OiBjb250ZW50W2kgKyAxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZSA+IDIgPyBjb250ZW50LnNsaWNlKGkgKyAyLCBpICsgZSkuam9pbignXFxuJykgOiAnJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIGFjY3VtXG59XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRDbG9zZXN0UXVlcnkocXVlcmllczogRXhwYW5kZXJRdWVyeVtdLCBsaW5lTnVtYmVyOiBudW1iZXIpOiBFeHBhbmRlclF1ZXJ5IHwgdW5kZWZpbmVkIHtcbiAgICBpZiAocXVlcmllcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZFxuICAgIH1cblxuICAgIHJldHVybiBxdWVyaWVzLnJlZHVjZSgoYSwgYikgPT4ge1xuICAgICAgICByZXR1cm4gTWF0aC5hYnMoYi5zdGFydCAtIGxpbmVOdW1iZXIpIDwgTWF0aC5hYnMoYS5zdGFydCAtIGxpbmVOdW1iZXIpID8gYiA6IGE7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRMYXN0TGluZVRvUmVwbGFjZShjb250ZW50OiBzdHJpbmdbXSwgcXVlcnk6IEV4cGFuZGVyUXVlcnksIGVuZGxpbmU6IHN0cmluZykge1xuICAgIGNvbnN0IGxpbmVGcm9tID0gcXVlcnkuZW5kXG5cbiAgICBmb3IgKHZhciBpID0gbGluZUZyb20gKyAxOyBpIDwgY29udGVudC5sZW5ndGg7IGkrKykge1xuICAgICAgICBpZiAoY29udGVudFtpXSA9PT0gZW5kbGluZSkge1xuICAgICAgICAgICAgcmV0dXJuIGlcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBsaW5lRnJvbSArIDFcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHRyaW1Db250ZW50KHM6IHN0cmluZykge1xuICAgIGNvbnN0IHJlbW92ZUVtcHR5TGluZXMgPSAoczogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICAgICAgY29uc3QgbGluZXMgPSBzLnNwbGl0KCdcXG4nKS5tYXAoZSA9PiBlLnRyaW0oKSlcbiAgICAgICAgaWYgKGxpbmVzLmxlbmd0aCA8IDIpIHtcbiAgICAgICAgICAgIHJldHVybiBzXG4gICAgICAgIH1cblxuICAgICAgICBpZiAobGluZXMuaW5kZXhPZignJykgPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiByZW1vdmVFbXB0e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hbWUnLFxuICAgICAgICAgICAgbG9vcDogdHJ1ZSxcbiAgICAgICAgICAgIGZvcm1hdDogKF9zOiBzdHJpbmcsIF9jb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaWxlKSA9PiBmaWxlLmJhc2VuYW1lLFxuICAgICAgICAgICAgZGVzYzogJ25hbWUgb2YgdGhlIGZvdW5kZWQgZmlsZSdcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ1xcXFwkbGluaycsXG4gICAgICAgICAgICBsb29wOiB0cnVlLFxuICAgICAgICAgICAgZm9ybWF0OiAoX3M6IHN0cmluZywgX2NvbnRlbnQ6IHN0cmluZywgZmlsZTogVEZpbGUpID0+IHRoaXMuYXBwLmZpbGVNYW5hZ2VyLmdlbmVyYXRlTWFya2Rvd25MaW5rKGZpbGUsIGZpbGUucGF0aCksXG4gICAgICAgICAgICBkZXNjOiAnbGluayBiYXNlZCBvbiBPYnNpZGlhbiBzZXR0aW5ncydcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ1xcXFwkbGluZXM6XFxcXGQrJyxcbiAgICAgICAgICAgIGxvb3A6IHRydWUsXG4gICAgICAgICAgICByZWFkQ29udGVudDogdHJ1ZSxcbiAgICAgICAgICAgIGZvcm1hdDogKHM6IHN0cmluZywgY29udGVudDogc3RyaW5nLCBfZmlsZTogVEZpbGUpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBkaWdpdHMgPSBOdW1iZXIocy5zcGxpdCgnOicpWzFdKVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRyaW1Db250ZW50KGNvbnRlbnQpXG4gICAgICAgICAgICAgICAgICAgIC5zcGxpdCgnXFxuJylcbiAgICAgICAgICAgICAgICAgICAgLmZpbHRlcigoXzogc3RyaW5nLCBpOiBudW1iZXIpID0+IGkgPCBkaWdpdHMpXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKCdcXG4nKVxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZShuZXcgUmVnRXhwKHRoaXMuY29uZmlnLmxpbmVFbmRpbmcsICdnJyksICcnKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGRlc2M6ICdzcGVjaWZpZWQgY291bnQgb2YgbGluZXMgZnJvbSB0aGUgZm91bmQgZmlsZSdcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ1xcXFwkZnJvbnRtYXR0ZXI6W1xcXFxwXFx7TFxcfV8tXSsnLFxuICAgICAgICAgICAgbG9vcDogdHJ1ZSxcbiAgICAgICAgICAgIGZvcm1hdDogKHM6IHN0cmluZywgX2NvbnRlbnQ6IHN0cmluZywgZmlsZTogVEZpbGUpID0+IHRoaXMuZ2V0RnJvbnRNYXR0ZXIocywgZmlsZSksXG4gICAgICAgICAgICBkZXNjOiAndmFsdWUgZnJvbSB0aGUgZnJvbnRtYXR0ZXIga2V5IGluIHRoZSBmb3VuZCBmaWxlJ1xuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnXFxcXCRsaW5lcysnLFxuICAgICAgICAgICAgbG9vcDogdHJ1ZSxcbiAgICAgICAgICAgIHJlYWRDb250ZW50OiB0cnVlLFxuICAgICAgICAgICAgZm9ybWF0OiAoczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIF9maWxlOiBURmlsZSkgPT4gY29udGVudC5yZXBsYWNlKG5ldyBSZWdFeHAodGhpcy5jb25maWcubGluZUVuZGluZywgJ2cnKSwgJycpLFxuICAgICAgICAgICAgZGVzYzogJ2FsbCBjb250ZW50IGZyb20gdGhlIGZvdW5kIGZpbGUnXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdcXFxcJGV4dCcsXG4gICAgICAgICAgICBsb29wOiB0cnVlLFxuICAgICAgICAgICAgZm9ybWF0OiAoczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaW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djcmVhdGVkIHRpbWUgZm9ybWF0dGVkJ1xuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnXFxcXCRjcmVhdGVkJyxcbiAgICAgICAgICAgIGxvb3A6IHRydWUsXG4gICAgICAgICAgICBmb3JtYXQ6IChzOiBzdHJpbmcsIGNvbnRlbnQ6IHN0cmluZywgZmlsZTogVEZpbGUpID0+IFN0cmluZyhmaWxlLnN0YXQuY3RpbWUpLFxuICAgICAgICAgICAgZGVzYzogJ2NyZWF0ZWQgdGltZSdcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ1xcXFwkc2l6ZScsXG4gICAgICAgICAgICBsb29wOiB0cnVlLFxuICAgICAgICAgICAgZm9ybWF0OiAoczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaWxlKSA9PiBTdHJpbmcoZmlsZS5zdGF0LnNpemUpLFxuICAgICAgICAgICAgZGVzYzogJ3NpemUgb2YgdGhlIGZpbGUnXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdcXFxcJHBhdGgnLFxuICAgICAgICAgICAgbG9vcDogdHJ1ZSxcbiAgICAgICAgICAgIGZvcm1hdDogKHM6IHN0cmluZywgY29udGVudDogc3RyaW5nLCBmaWxlOiBURmlsZSkgPT4gZmlsZS5wYXRoLFxuICAgICAgICAgICAgZGVzYzogJ3BhdGggdG8gdGhlIGZvdW5kIGZpbGUnXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6ICdcXFxcJHBhcmVudCcsXG4gICAgICAgICAgICBsb29wOiB0cnVlLFxuICAgICAgICAgICAgZm9ybWF0OiAoczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaWxlKSA9PiBmaWxlLnBhcmVudC5uYW1lLFxuICAgICAgICAgICAgZGVzYzogJ3BhcmVudCBmb2xkZXIgbmFtZSdcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ14oLit8KVxcXFwkaGVhZGVyOi4rJyxcbiAgICAgICAgICAgIGxvb3A6IHRydWUsXG4gICAgICAgICAgICBmb3JtYXQ6IChzOiBzdHJpbmcsIGNvbnRlbnQ6IHN0cmluZywgZmlsZTogVEZpbGUpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwcmVmaXggPSBzLnNsaWNlKDAsIHMuaW5kZXhPZignJCcpKVxuICAgICAgICAgICAgICAgIGNvbnN0IGhlYWRlciA9IHMuc2xpY2Uocy5pbmRleE9mKCckJykpLnJlcGxhY2UoJyRoZWFkZXI6JywgJycpLnJlcGxhY2UoL1wiL2csICcnKVxuICAgICAgICAgICAgICAgIGNvbnN0IG5lZWRlZExldmVsID0gaGVhZGVyLnNwbGl0KFwiI1wiKS5sZW5ndGggLSAxXG4gICAgICAgICAgICAgICAgY29uc3QgbmVlZGVkVGl0bGUgPSBoZWFkZXIucmVwbGFjZSgvXiMrL2csICcnKS50cmltKClcblxuICAgICAgICAgICAgICAgIGNvbnN0IG1ldGFkYXRhID0gdGhpcy5hcHAubWV0YWRhdGFDYWNoZS5nZXRGaWxlQ2FjaGUoZmlsZSlcblxuICAgICAgICAgICAgICAgIHJldHVybiBtZXRhZGF0YS5oZWFkaW5ncz8uZmlsdGVyKGUgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0ZXN0cyA9IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIFtuZWVkZWRUaXRsZSwgZS5oZWFkaW5nLmluY2x1ZGVzKG5lZWRlZFRpdGxlKV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBbbmVlZGVkTGV2ZWwsIGUubGV2ZWwgPT09IG5lZWRlZExldmVsXVxuICAgICAgICAgICAgICAgICAgICBdLmZpbHRlcihlID0+IGVbMF0pXG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRlc3RzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRlc3RzLm1hcChlID0+IGVbMV0pLmV2ZXJ5KGUgPT4gZSA9PT0gdHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcChoID0+IHRoaXMuYXBwLmZpbGVNYW5hZ2VyLmdlbmVyYXRlTWFya2Rvd25MaW5rKGZpbGUsIGZpbGUucGF0aCwgJyMnICsgaC5oZWFkaW5nKSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcChsaW5rID0+IHByZWZpeCArIGxpbmspXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKCdcXG4nKSB8fCAnJ1xuXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZGVzYzogJ2hlYWRpbmdzIGZyb20gZm91bmRlZCBmaWxlcy4gJGhlYWRlcjojIyAtIHJldHVybiBhbGwgbGV2ZWwgMiBoZWFkaW5ncy4gJGhlYWRlcjpUaXRsZSAtIHJldHVybiBhbGwgaGVhZGluZyB3aGljaCBtYXRjaCB0aGUgc3RyaW5nLiBDYW4gYmUgcHJlcGVuZGVkIGxpa2U6IC0gISRoZWFkZXI6IyMgdG8gdHJhbnNjbHVkZSB0aGUgaGVhZGluZ3MuJ1xuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnXiguK3wpXFxcXCRibG9ja3MnLFxuICAgICAgICAgICAgcmVhZENvbnRlbnQ6IHRydWUsXG4gICAgICAgICAgICBsb29wOiB0cnVlLFxuICAgICAgICAgICAgZm9ybWF0OiAoczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaWxlKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgLnNwbGl0KCdcXG4nKVxuICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGUgPT4gL1xcXlxcdyskLy50ZXN0KGUpKVxuICAgICAgICAgICAgICAgICAgICAubWFwKGUgPT4gc1xuICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJyRibG9ja3MnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAoJHtlbmNvZGVVUklDb21wb25lbnQoZmlsZS5iYXNlbmFtZSl9IyR7ZS5yZXBsYWNlKC9eLis/KFxcXlxcdyskKS8sICckMScpfSlgXG4gICAgICAgICAgICAgICAgICAgICAgICApKVxuICAgICAgICAgICAgICAgICAgICAuam9pbignXFxuJylcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBkZXNjOiAnYmxvY2sgaWRzIGZyb20gdGhlIGZvdW5kIGZpbGVzLiBDYW4gYmUgcHJlcGVuZGVkLidcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogJ14oLit8KVxcXFwkbWF0Y2g6aGVhZGVyJywgbG9vcDogdHJ1ZSwgZm9ybWF0OiAoczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaWxlLCByZXN1bHRzKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgcHJlZml4ID0gcy5zbGljZSgwLCBzLmluZGV4T2YoJyQnKSlcbiAgICAgICAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IHRoaXMuYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0RmlsZUNhY2hlKGZpbGUpXG5cbiAgICAgICAgICAgICAgICBjb25zdCBoZWFkaW5ncyA9IG1ldGFkYXRhLmhlYWRpbmdzXG4gICAgICAgICAgICAgICAgICAgID8uZmlsdGVyKGggPT4gcmVzdWx0cy5yZXN1bHQuY29udGVudC5maWx0ZXIoYyA9PiBoLnBvc2l0aW9uLmVuZC5vZmZzZXQgPCBjWzBdKS5zb21lKGUgPT4gZSkpXG4gICAgICAgICAgICAgICAgICAgIC5zbGljZSgtMSlcblxuICAgICAgICAgICAgICAgIHJldHVybiBoZWFkaW5nc1xuICAgICAgICAgICAgICAgICAgICAubWFwKGggPT4gdGhpcy5hcHAuZmlsZU1hbmFnZXIuZ2VuZXJhdGVNYXJrZG93bkxpbmsoZmlsZSwgZmlsZS5wYXRoLCAnIycgKyBoLmhlYWRpbmcpKVxuICAgICAgICAgICAgICAgICAgICAubWFwKGxpbmsgPT4gcHJlZml4ICsgbGluaylcbiAgICAgICAgICAgICAgICAgICAgLmpvaW4oJ1xcbicpIHx8ICcnXG4gICAgICAgICAgICB9LCBkZXNjOiAnZXh0cmFjdCBmb3VuZCBzZWxlY3Rpb25zJ1xuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICBuYW1lOiAnXiguK3wpXFxcXCRtYXRjaCcsIGxvb3A6IHRydWUsIGZvcm1hdDogKHM6IHN0cmluZywgY29udGVudDogc3RyaW5nLCBmaWxlOiBURmlsZSwgcmVzdWx0cykgPT4ge1xuXG4gICAgICAgICAgICAgICAgY29uc3QgcHJlZml4ID0gcy5zbGljZSgwLCBzLmluZGV4T2YoJyQnKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0cy5yZXN1bHQuY29udGVudD8ubWFwKHQgPT4gcmVzdWx0cy5jb250ZW50LnNsaWNlKC4uLnQpKS5tYXAodCA9PiBwcmVmaXggKyB0KS5qb2luKCdcXG4nKVxuICAgICAgICAgICAgfSwgZGVzYzogJ2V4dHJhY3QgZm91bmQgc2VsZWN0aW9ucydcbiAgICAgICAgfSxcbiAgICBdXG5cbiAgICBjb25zdHJ1Y3RvcihhcHA6IEFwcCwgcGx1Z2luOiBQbHVnaW5NYW5pZmVzdCkge1xuICAgICAgICBzdXBlcihhcHAsIHBsdWdpbik7XG5cbiAgICAgICAgdGhpcy5zZWFyY2ggPSB0aGlzLnNlYXJjaC5iaW5kKHRoaXMpXG4gICAgICAgIHRoaXMuaW5pdEV4cGFuZGVyID0gdGhp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gICAgYXN5bmMgZ2V0Rm91bmRBZnRlckRlbGF5KCk6IFByb21pc2U8TWFwPFRGaWxlLCBTZWFyY2hEZXRhaWxzPj4ge1xuICAgICAgICBjb25zdCBzZWFyY2hMZWFmID0gdGhpcy5hcHAud29ya3NwYWNlLmdldExlYXZlc09mVHlwZSgnc2VhcmNoJylbMF1cbiAgICAgICAgY29uc3QgdmlldyA9IGF3YWl0IHNlYXJjaExlYWYub3BlbihzZWFyY2hMZWFmLnZpZXcpXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShyZXNvbHZlID0+IHtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHRzID0gdmlldy5kb20ucmVzdWx0RG9tTG9va3VwIGFzIE1hcDxURmlsZSwgU2VhcmNoRGV0YWlscz5cblxuICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHJlc3VsdHMpXG4gICAgICAgICAgICB9LCB0aGlzLmNvbmZpZy5kZWxheSlcbiAgICAgICAgfSlcbiAgICB9XG5cbiAgICBhc3luYyBzdGFydFRlbXBsYXRlTW9kZShxdWVyeTogRXhwYW5kZXJRdWVyeSwgbGFzdExpbmU6IG51bWJlcikge1xuICAgICAgICBjb25zdCBjdXJyZW50VmlldyA9IHRoaXMuYXBwLndvcmtzcGFjZS5hY3RpdmVMZWFmLnZpZXdcbiAgICAgICAgbGV0IGN1cnJlbnRGaWxlTmFtZSA9ICcnXG5cbiAgICAgICAgY29uc3QgdGVtcGxhdGVDb250ZW50ID0gcXVlcnkudGVtcGxhdGUuc3BsaXQoJ1xcbicpXG5cbiAgICAgICAgY29uc3QgaGVhZGluZyA9IHRlbXBsYXRlQ29udGVudC5maWx0ZXIoZSA9PiBlWzBdID09PSAnXicpLm1hcCgocykgPT4gcy5zbGljZSgxKSlcbiAgICAgICAgY29uc3QgZm9vdGVyID0gdGVtc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ID0gKG5ldyBSZWdFeHAodGhpcy5zZXFzLmZpbHRlcihlID0+IGUucmVhZENvbnRlbnQpLm1hcChlID0+IGUubmFtZSkuam9pbignfCcpKS50ZXN0KHRlbXBsYXRlKSlcbiAgICAgICAgICAgICAgICA/IGF3YWl0IHRoaXMuYXBwLnZhdWx0LmNhY2hlZFJlYWQocilcbiAgICAgICAgICAgICAgICA6ICcnXG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNlcXMucmVkdWNlKChhY2MsIHNlcSkgPT5cbiAgICAgICAgICAgICAgICBhY2MucmVwbGFjZShuZXcgUmVnRXhwKHNlcS5uYW1lLCAnZ3UnKSwgcmVwbGFjZSA9PiBzZXEuZm9ybWF0KHJlcGxhY2UsIGZpbGVDb250ZW50LCByLCBzZWFyY2hSZXN1bHRzLmdldChyKSwgaW5kZXgpKSwgdGVtcGxhdGUpXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBjaGFuZ2VkID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgICAgICBmaWx0ZXJGaWxlc1xuICAgICAgICAgICAgICAgIC5tYXAoYXN5bmMgKGZpbGUsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gYXdhaXQgUHJvbWlzZS5hbGwocmVwZWF0YWJsZUNvbnRlbnQubWFwKGFzeW5jIChzKSA9PiBhd2FpdCBmb3JtYXQoZmlsZSwgcywgaSkpKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0LmpvaW4oJ1xcbicpXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgKVxuXG4gICAgICAgIGNvbnN0IHJlc3VsdCA9IFtcbiAgICAgICAgICAgICcgJyxcbiAgICAgICAgICAgIGhlYWRpbmcuam9pbignXFxuJyksXG4gICAgICAgICAgICBjaGFuZ2VkLmpvaW4oJ1xcbicpLFxuICAgICAgICAgICAgZm9vdGVyLmpvaW4oJ1xcbicpLFxuICAgICAgICAgICA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0gZ2V0QWxsRXhwYW5kZXJzUXVlcnkoZm9ybWF0dGVkKVxuICAgICAgICBjb25zdCBjbG9zZXN0UXVlcnkgPSBnZXRDbG9zZXN0UXVlcnkoZmluZFF1ZXJpZXMsIGN1ck51bSlcblxuICAgICAgICBpZiAoYWxsKSB7XG4gICAgICAgICAgICBmaW5kUXVlcmllcy5yZWR1Y2UoKHByb21pc2UsIHF1ZXJ5LCBpKSA9PlxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld0NvbnRlbnQgPSBmb3JtYXRDb250ZW50KGNtRG9jLmdldFZhbHVlKCkpXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHVwZGF0ZWRRdWVyaWVzID0gZ2V0QWxsRXhwYW5kZXJzUXVlcnkobmV3Q29udGVudClcblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5ydW5RdWVyeSh1cGRhdGVkUXVlcmllc1tpXSwgbmV3Q29udGVudClcbiAgICAgICAgICAgICAgICB9KSwgUHJvbWlzZS5yZXNvbHZlKClcbiAgICAgICAgICAgIClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMucnVuUXVlcnkoY2xvc2VzdFF1ZXJ5LCBmb3JtYXR0ZWQpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhc3luYyBvbmxvYWQoKSB7XG4gICAgICAgIHRoaXMuYWRkU2V0dGluZ1RhYihuZXcgU2V0dGluZ1RhYih0aGlzLmFwcCwgdGhpcykpO1xuXG4gICAgICAgIHRoaXMuYWRkQ29tbWFuZCh7XG4gICAgICAgICAgICBpZDogJ2VkaXRvci1leHBhbmQnLFxuICAgICAgICAgICAgbmFtZTogJ2V4cGFuZCcsXG4gICAgICAgICAgICBjYWxsYmFjazogdGhpcy5pbml0RXhwYW5kZXIsXG4gICAgICAgICAgICBob3RrZXlzOiBbXVxuICAgICAgICB9KVxuXG4gICAgICAgIHRoaXMuYWRkQ29tbWFuZCh7XG4gICAgICAgICAgICBpZDogJ2VkaXRvci1leHBhbmQtYWxsJyxcbiAgICAgICAgICAgIG5hbWU6ICdleHBhbmQgYWxsJyxcbiAgICAgICAgICAgIGNhbGxiYWNrOiAoKSA9PiB0aGlzLmluaXRFeHBhbmRlcih0cnVlKSxcbiAgICAgICAgICAgIGhvdGtleXM6IFtdXG4gICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5hcHAud29ya3NwYWNlLm9uKCdmaWxlLW9wZW4nLCBhc3luYyAoKSA9PiB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuY29uZmlnLmF1dG9FeHBhbmQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgYWN0aXZlTGVhZiA9IHRoaXMuYXBwLndvcmtzcGFjZS5hY3RpdmVMZWFmXG4gICAgICAgICAgICBpZiAoIWFjdGl2ZUxlYWYpIHtcbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgYWN0aXZlVmlldyA9IGFjdGl2ZUxlYWYudmlld1xuICAgICAgICAgICAgY29uc3QgaXNBbGxvd2VkVmlldyA9IGFjdGl2ZVZpZXcgaW5zdGFuY2VvZiBNYXJrZG93blZpZXdcbiAgICAgICAgICAgIGlmICghaXNBbGxvd2VkVmlldykge1xuICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLmluaXRFeHBhbmRlcih0cnVlKVxuXG4gICAgICAgIH0pXG5cbiAgICAgICAgY29uc3QgZGF0YSA9IGF3YWl0IHRoaXMubG9hZERhdGEoKSBhcyBQbHVnaW5TZXR0aW5nc1xuICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgdGhpcy5jb25maWcgPSB7XG4gICAgICAgICAgICAgICAgLi4udGhpcy5jb25maWcsXG4gICAgICAg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KVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UodmFsdWUgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uY29uZmlnLmF1dG9FeHBhbmQgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKClcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZSgnRGVsYXknKVxuICAgICAgICAgICAgLnNldERlc2MoJ1RleHQgZXhwYW5kZXIgZG9uXFwnIHdhaXQgdW50aWwgc2VhcmNoIGNvbXBsZXRlZC4gSXQgd2FpdHMgZm9yIGEgZGVsYXkgYW5kIHBhc3RlIHJlc3VsdCBhZnRlciB0aGF0LicpXG4gICAgICAgICAgICAuYWRkU2xpZGVyKHNsaWRlciA9PiB7XG4gICAgICAgICAgICAgICAgc2xpZGVyLnNldExpbWl0cygxMDAwLCAxMDAwMCwgMTAwMClcbiAgICAgICAgICAgICAgICBzbGlkZXIuc2V0VmFsdWUodGhpcy5wbHVnaW4uY29uZmlnLmRlbGF5KVxuICAgICAgICAgICAgICAgIHNsaWRlci5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLmNvbmZpZy5kZWxheSA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBzbGlkZXIuc2V0RHluYW1pY1Rvb2x0aXAoKVxuICAgICAgICAgICAgfSlcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKCdMaW5lIGVuZGluZycpXG4gICAgICAgICAgICAuc2V0RGVzYygnWW91IGNhbiBzcGVjaWZ5IHRoZSB0ZXh0IHdoaWNoIHdpbGwgYXBwZWFyIGF0IHRoZSBib3R0b20gb2YgdGhlIGdlbmVyYXRlZCB0ZXh0LicpXG4gICAgICAgICAgICAuYWRkVGV4dCh0ZXh0ID0+IHtcbiAgICAgICAgICAgICAgICB0ZXh0LnNldFZhbHVlKHRoaXMucGx1Z2luLmNvbmZpZy5saW5lRW5kaW5nKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UodmFsID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLmNvbmZpZy5saW5lRW5kaW5nID0gdmFsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKCdEZWZhdWx0IHRlbXBsYXRlJylcbiAgICAgICAgICAgIC5zZXREZXNjKCdZb3UgY2FuIHNwZWNpZnkgZGVmYXVsdCB0ZW1wbGF0ZScpXG4gICAgICAgICAgICAuYWRkVGV4dCh0ZXh0ID0+IHtcbiAgICAgICAgICAgICAgICB0ZXh0LnNldFZhbHVlKHRoaXMucGx1Z2luLmNvbmZpZy5kZWZhdWx0VGVtcGxhdGUpXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSh2YWwgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uY29uZmlnLmRlZmF1bHRUZW1wbGF0ZSA9IHZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKClcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZSgnRXhjbHVkZSBjdXJyZW50IGZpbGUnKVxuICAgICAgICAgICAgLnNldERlc2MoJ1lvdSBjYW4gc3BlY2lmeSBzaG91bGQgdGV4dCBleHBhbmRlciBleGNsdWRlIHJlc3VsdHMgZnJvbSBjdXJyZW50IGZpbGUgb3Igbm90JylcbiAgICAgICAgICAgIC5hZGRUb2dnbGUodG9nZ2xlID0+IHtcbiAgICAgICAgICAgICAgICB0b2dnbGVcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLmNvbmZpZy5leGNsdWRlQ3VycmVudClcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKHZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLmNvbmZpZy5leGNsdWRlQ3VycmVudCA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKCdTZXF1ZW5jZXMnKVxuICAgICAgICAgICAgLnNldERlc2MoJ1JFR0VYUCAtIERFU0NSSVBUSU9OJylcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgICgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGZyYWdtZW50ID0gbmV3IERvY3VtZW50RnJhZ21lbnQoKVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBkaXYgPSBmcmFnbWVudC5jcmVhdGVFbCgnZGl2JylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2Vxc1xuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChlID0+IGUubmFtZSArICcgLSAnICsgKGUuZGVzYyB8fCAnJykpXG4gICAgICAgICAgICAgICAgICAgICAgICAubWFwKGUgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsID0gZnJhZ21lbnQuY3JlYXRlRWwoJ2RpdicpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWwuc2V0VGV4dChlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsLnNldEF0dHJpYnV0ZSgnc3R5bGUnLCBgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCByZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDAuNXJlbTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206IDAuNXJlbTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlbFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkuZm9yRWFjaChlbCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQoZWwpXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIGZyYWdtZW50LmFwcGVuZENoaWxkKGRpdilcblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnJhZ21lbnRcbiAgICAgICAgICAgICAgICB9KSgpXG4gICAgICAgICAgICApXG4gICAgfVxufVxuIl0sIm5hbWVzIjpbIkZpbGVWaWV3IiwiTWFya2Rvd25WaWV3IiwiUGx1Z2luIiwiU2V0dGluZyIsIlBsdWdpblNldHRpbmdUYWIiXSwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUksYUFBYSxHQ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KS5kb25lKSByZXR1cm4gdDtcclxuICAgICAgICAgICAgaWYgKHkgPSAwLCB0KSBvcCA9IFtvcFswXSAmIDIsIHQudmFsdWVdO1xyXG4gICAgICAgICAgICBzd2l0Y2ggKG9wWzBdKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDA6IGNhc2UgMTogdCA9IG9wOyBicmVhaztcclxuICAgICAgICAgICAgICAgIGNhc2UgNDogXy5sYWJlbCsrOyByZXR1cm4geyB2YWx1ZTogb3BbMV0sIGRvbmU6IGZhbHNlIH07XHJcbiAgICAgICAgICAgICAgICBjYXNlIDU6IF8ubGFiZWwrKzsgeSA9IG9wWzFdOyBvcCA9IFswXTsgY29udGludWU7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDc6IG9wID0gXy5vcHMucG9wKCk7IF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghKHQgPSBfLnRyeXMsIHQgPSB0Lmxlbmd0aCA+IDAgJiYgdFt0Lmxlbmd0aCAtIDFdKSAmJiAob3BbMF0gPT09IDYgfHwgb3BbMF0gPT09IDIpKSB7IF8gPSAwOyBjb250aW51ZTsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gMyAmJiAoIXQgfHwgKG9wWzFdID4gdFswXSAmJiBvcFsxXSA8IHRbM10pKSkgeyBfLmxhYmVsID0gb3BbMV07IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSA2ICYmIF8ubGFiZWwgPCB0WzFdKSB7IF8ubGFiZWwgPSB0WzFdOyB0ID0gb3A7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHQgJiYgXy5sYWJlbCA8IHRbMl0pIHsgXy5sYWJlbCA9IHRbMl07IF8ub3BzLnB1c2gob3ApOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAg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oaWxlICgobiA9PT0gdm9pZCAwIHx8IG4tLSA+IDApICYmICEociA9IGkubmV4dCgpKS5kb25lKSBhci5wdXNoKHIudmFsdWUpO1xyXG4gICAgfVxyXG4gICAgY2F0Y2ggKGVycm9yKSB7IGUgPSB7IGVycm9yOiBlcnJvciB9OyB9XHJcbiAgICBmaW5hbGx5IHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBpZiAociAmJiAhci5kb25lICYmIChtID0gaVtcInJldHVyblwiXSkpIG0uY2FsbChpKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZmluYWxseSB7IGlmIChlKSB0aHJvdyBlLmVycm9yOyB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gYXI7XHJcbn1cclxuXHJcbi8qKiBAZGVwcmVjYXRlZCAqL1xyXG5leHBvcnQgZnVuY3Rpb24gX19zcHJlYWQoKSB7XHJcbiAgICBmb3IgKHZhciBhciA9IFtdLCBpID0gMDsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKylcclxuICAgICAgICBhciA9IGFyLmNvbmNhdChfX3JlYWQoYXJndW1lbnRzW2ldKSk7XHJcbiAgICByZXR1cm4gYXI7XHJcbn1cclxuXHJcbi8qKiBAZGVwcmVjYXRlZCAqL1xyXG5leHBvcnQgZnVuY3Rpb24gX19zcHJlYWRBcnJheXMoKSB7XHJcbiAgICBmb3IgKHZhciBzID0gMCwgaSA9IDAsIGlsID0gYXJndW1lbnRzLmxlbmd0aDsgaSA8IGlsOyBpKyspIHMgKz0gYXJndW1lbnRzW2ldLmxlbmd0aDtcclxuICAgIGZvciAodmFyIHIgPSBBcnJheShzKSwgayA9IDAsIGkgPSAwOyBpIDwgaWw7IGkrKylcclxuICAgICAgICBmb3IgKHZhciBhID0gYXJndW1lbnRzW2ldLCBqID0gMCwgamwgPSBhLmxlbmd0aDsgaiA8IGpsOyBqKyssIGsrKylcclxuICAgICAgICAgICAgcltrXSA9IGFbal07XHJcbiAgICByZXR1cm4gcjtccl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5nXG59XG5cbmV4cG9ydCBmdW5jdGlvbiBmb3JtYXRDb250ZW50KGNvbnRlbnQ6IHN0cmluZyk6IHN0cmluZ1tdIHtcbiAgICByZXR1cm4gY29udGVudC5zcGxpdCgnXFxuJylcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldEFsbEV4cGFuZGVyc1F1ZXJ5KGNvbnRlbnQ6IHN0cmluZ1tdKTogRXhwYW5kZXJRdWVyeVtdIHtcbiAgICBsZXQgYWNjdW06IEV4cGFuZGVyUXVlcnlbXSA9IFtdXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb250ZW50Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGNvbnN0IGxpbmUgPSBjb250ZW50W2ldXG5cbiAgICAgICAgaWYgKGxpbmUgPT09ICdgYGBleHBhbmRlcicpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGUgPSAwOyBlIDwgY29udGVudC5sZW5ndGggLSBpOyBlKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXh0bGluZSA9IGNvbnRlbnRbaSArIGVdIFxuICAgICAgICAgICAgICAgIGlmIChuZXh0bGluZSA9PT0gJ2BgYCcpIHtcbiAgICAgICAgICAgICAgICAgICAgYWNjdW0ucHVzaChcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydDogaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmQ6IGkgKyBlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJ5OiBjb250ZW50W2kgKyAxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZSA+IDIgPyBjb250ZW50LnNsaWNlKGkgKyAyLCBpICsgZSkuam9pbignXFxuJykgOiAnJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAg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GQrJyxcbiAgICAgICAgbG9vcDogdHJ1ZSxcbiAgICAgICAgcmVhZENvbnRlbnQ6IHRydWUsXG4gICAgICAgIGZvcm1hdDogKHAsIHM6IHN0cmluZywgY29udGVudDogc3RyaW5nLCBfZmlsZTogVEZpbGUpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGRpZ2l0cyA9IE51bWJlcihzLnNwbGl0KCc6JylbMV0pXG5cbiAgICAgICAgICAgIHJldHVybiB0cmltQ29udGVudChjb250ZW50KVxuICAgICAgICAgICAgICAgIC5zcGxpdCgnXFxuJylcbiAgICAgICAgICAgICAgICAuZmlsdGVyKChfOiBzdHJpbmcsIGk6IG51bWJlcikgPT4gaSA8IGRpZ2l0cylcbiAgICAgICAgICAgICAgICAuam9pbignXFxuJylcbiAgICAgICAgICAgICAgICAucmVwbGFjZShuZXcgUmVnRXhwKHAuY29uZmlnLmxpbmVFbmRpbmcsICdnJyksICcnKVxuICAgICAgICB9LFxuICAgICAgICBkZXNjOiAnc3BlY2lmaWVkIGNvdW50IG9mIGxpbmVzIGZyb20gdGhlIGZvdW5kIGZpbGUnXG4gICAgfSxcbiAgICB7XG4gICAgICAgIG5hbWU6ICdcXFxcJGNoYXJhY3RlcnM6XFxcXGQrJyxcbiAgICAgICAgbG9vcDogdHJ1ZSxcbiAgICAgICAgcmVhZENvbnRlbnQ6IHRydWUsXG4gICAgICAgIGZvcm1hdDogKHAsIHM6IHN0cmluZywgY29udGVudDogc3RyaW5nLCBfZmlsZTogVEZpbGUpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGRpZ2l0cyA9IE51bWJlcihzLnNwbGl0KCc6JylbMV0pXG5cbiAgICAgICAgICAgIHJldHVybiB0cmltQ29udGVudChjb250ZW50KVxuICAgICAgICAgICAgICAgIC5zcGxpdCgnJylcbiAgICAgICAgICAgICAgICAuZmlsdGVyKChfOiBzdHJpbmcsIGk6IG51bWJlcikgPT4gaSA8IGRpZ2l0cylcbiAgICAgICAgICAgICAgICAuam9pb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KVxcXFwkbWF0Y2hsaW5lOihcXFxcK3wtfClcXFxcZCsnLFxuICAgICAgICBsb29wOiB0cnVlLFxuICAgICAgICBmb3JtYXQ6IChfcCwgczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaWxlLCByZXN1bHRzKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBwcmVmaXggPSBzLnNsaWNlKDAsIHMuaW5kZXhPZignJG1hdGNobGluZScpKTtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcy5zbGljZShzLmluZGV4T2YoJyRtYXRjaGxpbmUnKSkuc3BsaXQoJzonKVsxXTtcbiAgICAgICAgICAgIGNvbnN0IGlzUGx1cyA9IHZhbHVlLmNvbnRhaW5zKCcrJyk7XG4gICAgICAgICAgICBjb25zdCBpc01pbnVzID0gdmFsdWUuY29udGFpbnMoJy0nKTtcbiAgICAgICAgICAgIGNvbnN0IGlzQ29udGV4dCA9ICFpc1BsdXMgJiYgIWlzTWludXM7XG4gICAgICAgICAgICBjb25zdCBvZmZzZXQgPSBOdW1iZXIodmFsdWUucmVwbGFjZSgvWystXS8sICcnKSk7XG5cbiAgICAgICAgICAgIGNvbnN0IGxpbmVzID0gcmVzdWx0cy5jb250ZW50LnNwbGl0KCdcXG4nKTtcblxuICAgICAgICAgICAgLy8gR3JhYiBpbmZvIGFib3V0IGxpbmUgY29udGVudCwgaW5kZXgsIHRleHQgbGVuZ3RoIGFuZCBzdGFydC9lbmQgY2hhcmFjdGVyIHBvc2l0aW9uXG4gICAgICAgICAgICBjb25zdCBsaW5lSW5mb3M6IEFycmF5PExpbmVJbmZvPiA9IFtdXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgdGV4dCA9IGxpbmVzW2ldXG5cbiAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBsaW5lSW5mb3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBudW06IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGFydDogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVuZDogdGV4dC5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0XG4gICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgY29udGludWVcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzdGFydCA9IGxpbmVJbmZvc1tpLTFdLmVuZCArIDFcbiAgICAgICAgICAgICAgICBsaW5lSW5mb3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIG51bTogaSxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnQsXG4gICAgICAgICAgICAgICAgICAgIHRleHQsXG4gICAgICAgICAgICAgICAgICAgIGVuZDogdGV4dC5sZW5ndGggKyBzdGFydFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiByZXN1bHRzLnJlc3VsdC5jb250ZW50Lm1hcCgoW2Zyb20sIHRvXSkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoZWRMaW5lcyA9IGxpbmVJbmZvc1xuICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKCh7IHN0YXJ0LCBlbmQgfSkgPT4gc3RhcnQgPD0gZnJvbSAmJiBlbmQgPj0gdG8pXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoKGxpbmUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4ubGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiBoaWdobGlnaHQobGluZS5zdGFydCwgbGluZS5lbmQsIGZyb20sIHRvLCBsaW5lLnRleHQpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHRMaW5lczogTGluZUluZm9bXSA9IFtdXG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBtYXRjaGVkTGluZSBvZiBtYXRjaGVkTGluZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJldkxpbmVzID0gaXNNaW51cyB8fCBpc0NvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBsaW5lSW5mb3MuZmlsdGVyKGwgPT4gbWF0Y2hlZExpbmUubnVtIC0gbC5udW0gPiAwICYmIG1hdGNoZWRMaW5lLm51bSAtIGwubnVtIDwgb2Zmc2V0KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFtdXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5leHRMaW5lcyA9IGlzUGx1cyB8fCBpc0NvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBsaW5lSW5mb3MuZmlsdGVyKGwgPT4gbC5udW0gLSBtYXRjaGVkTGluZS5udW0gPiAwICYmIGwubnVtIC0gbWF0Y2hlZExpbmUubnVtIDwgb2Zmc2V0KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFtdXG5cbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0TGluZXMucHVzaCggLi4ucHJldkxpbmVzLCBtYXRjaGVkTGluZSwgLi4ubmV4dExpbmVzIClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0TGluZXMubWFwKGUgPT4gZS50ZXh0KS5qb2luKCdcXG4nKVxuICAgICAgICAgICAgfSkuam9pbignXFxuJylcbiAgICAgICAgfSwgZGVzYzogJ2V4dHJhY3QgbGluZSB3aXRoIG1hdGNoZXMnXG4gICAgfSxcbiAgICB7XG4gICAgICAgIG5hbWU6ICdeKC4rfClcXFxcJG1hdGNobGluZScsIGxvb3A6IHRydWUsIGZvcm1hdDogKF9wLCBzOiBzdHJpbmcsIGNvbnRlbnQ6IHN0cmluZywgZmlsZTogVEZpbGUsIHJlc3VsdHMpID0+IHtcblxuICAgICAgICAgICAgY29uc3QgcHJlZml4ID0gcy5zbGljZSgwLCBzLmluZGV4T2YoJyQnKSk7XG5cbiAgICAgICAgICAgIGNvbnN0IGxpbmVzID0gcmVzdWx0cy5jb250ZW50LnNwbGl0KCdcXG4nKTtcblxuICAgICAgICAgICAgLy8gR3JhYiBpbmZvIGFib3V0IGxpbmUgY29udGVudCwgaW5kZXgsIHRleHQgbGVuZ3RoIGFuZCBzdGFydC9lbmQgY2hhcmFjdGVyIHBvc2l0aW9uXG4gICAgICAgICAgICBjb25zdCBsaW5lSW5mb3M6IEFycmF5PExpbmVJbmZvPiA9IFtdXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgdGV4dCA9IGxpbmVzW2ldXG5cbiAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBsaW5lSW5mb3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBudW06IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGFydDogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVuZDogdGV4dC5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0XG4gICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgY29udGludWVcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzdGFydCA9IGxpbmVJbmZvc1tpLTFdLmVuZCArIDFcbiAgICAgICAgICAgICAgICBsaW5lSW5mb3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIG51bTogaSxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnQsXG4gICAgICAgICAgICAgICAgICAgIHRleHQsXG4gICAgICAgICAgICAgICAgICAgIGVuZDogdGV4dC5sZW5ndGggKyBzdGFydFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiByZXN1bHRzLnJlc3VsdC5jb250ZW50Lm1hcCgoW2Zyb20sIHRvXSkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBsaW5lSW5mb3NcbiAgICAgICAgICAgICAgICAgICAgLmZpbHRlcigoeyBzdGFydCwgZW5kIH0pID0+IHN0YXJ0IDw9IGZyb20gJiYgZW5kID49IHRvKVxuICAgICAgICAgICAgICAgICAgICAubWFwKCh7c3RhcnQsIGVuZCwgdGV4dH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBoaWdobGlnaHQoc3RhcnQsIGVuZCwgZnJvbSwgdG8sIHRleHQpXG4gICAgICAgICAgICAgICAgICAgIH0pLmpvaW4oJ1xcbicpXG4gICAgICAgICAgICB9KS5qb2luKCdcXG4nKVxuICAgICAgICB9LCBkZXNjOiAnZXh0cmFjdCBsaW5lIHdpdGggbWF0Y2hlcydcbiAgICB9LFxuICAgIHtcbiAgICAgICAgbmFtZTogJ14oLit8KVxcXFwkbWF0Y2gnLCBsb29wOiB0cnVlLCBmb3JtYXQ6IChfcCwgczogc3RyaW5nLCBjb250ZW50OiBzdHJpbmcsIGZpbGU6IFRGaWxlLCByZXN1bHRzKSA9PiB7XG5cbiAgICAgICAgICAgIGlmICghcmVzdWx0cy5yZXN1bHQuY29udGVudCkge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybignVGhlcmUgaXMgbm8gY29udGVudCBpbiByZXN1bHRzJylcbiAgICAgICAgICAgICAgICByZXR1cm4gJydcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gYXBwZW5kUHJlZml4KHByZWZpeDogc3RyaW5nLCBsaW5lOiBzdHJpbmcpIHtcbiAgICAg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bGF5OiBudW1iZXJcbiAgICBsaW5lRW5kaW5nOiBzdHJpbmdcbiAgICBkZWZhdWx0VGVtcGxhdGU6IHN0cmluZ1xuICAgIGV4Y2x1ZGVDdXJyZW50OiBib29sZWFuXG4gICAgYXV0b0V4cGFuZDogYm9vbGVhblxufVxuXG50eXBlIE51bWJlclR1cGxlID0gW251bWJlciwgbnVtYmVyXVxuXG5leHBvcnQgaW50ZXJmYWNlIFNlYXJjaERldGFpbHMge1xuICAgIGFwcDogQXBwXG4gICAgY2hpbGRyZW46IGFueVtdXG4gICAgY2hpbGRyZW5FbDogSFRNTEVsZW1lbnRcbiAgICBjb2xsYXBzZUVsOiBIVE1MRWxlbWVudFxuICAgIGNvbGxhcHNlZDogYm9vbGVhblxuICAgIGNvbGxhcHNpYmxlOiBib29sZWFuXG4gICAgY29udGFpbmVyRWw6IEhUTUxFbGVtZW50XG4gICAgY29udGVudDogc3RyaW5nXG4gICAgZG9tOiBhbnlcbiAgICBlbDogSFRNTEVsZW1lbnRcbiAgICBleHRyYUNvbnRleHQ6ICgpID0+IGJvb2xlYW5cbiAgICBmaWxlOiBURmlsZVxuICAgIGluZm86IGFueVxuICAgIG9uTWF0Y2hSZW5kZXI6IGFueVxuICAgIHB1c2hlckVsOiBIVE1MRWxlbWVudFxuICAgIHJlc3VsdDoge1xuICAgICAgICBmaWxlbmFtZT86IE51bWJlclR1cGxlW11cbiAgICAgICAgY29udGVudD86IE51bWJlclR1cGxlW11cbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFRleHRFeHBhbmRlciBleHRlbmRzIFBsdWdpbiB7XG4gICAgY206IENvZGVNaXJyb3IuRWRpdG9yXG5cbiAgICBjb25maWc6IFBsdWdpblNldHRpbmdzID0ge1xuICAgICAgICBhdXRvRXhwYW5kOiBmYWxzZSxcbiAgICAgICAgZGVmYXVsdFRlbXBsYXRlOiAnLSAkbGluaycsXG4gICAgICAgIGRlbGF5OiAzMDAsXG4gICAgICAgIGV4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ICAgICAgICAgPyBhd2FpdCB0aGlzLmFwcC52YXVsdC5jYWNoZWRSZWFkKHIpXG4gICAgICAgICAgICAgICAgOiAnJ1xuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5zZXFzLnJlZHVjZSgoYWNjLCBzZXEpID0+XG4gICAgICAgICAgICAgICAgYWNjLnJlcGxhY2UobmV3IFJlZ0V4cChzZXEubmFtZSwgJ2d1JyksIHJlcGxhY2UgPT4gc2VxLmZvcm1hdCh0aGlzLCByZXBsYWNlLCBmaWxlQ29udGVudCwgciwgc2VhcmNoUmVzdWx0cy5nZXQociksIGluZGV4KSksIHRlbXBsYXRlKVxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgY2hhbmdlZCA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICAgICAgZmlsdGVyRmlsZXNcbiAgICAgICAgICAgICAgICAubWFwKGFzeW5jIChmaWxlLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IFByb21pc2UuYWxsKHJlcGVhdGFibGVDb250ZW50Lm1hcChhc3luYyAocykgPT4gYXdhaXQgZm9ybWF0KGZpbGUsIHMsIGkpKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC5qb2luKCdcXG4nKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgIClcblxuICAgICAgICBjb25zdCByZXN1bHQgPSBbXG4gICAgICAgICAgICAnICcsXG4gICAgICAgICAgICBoZWFkaW5nLmpvaW4oJ1xcbicpLFxuICAgICAgICAgICAgY2hhbmdlZC5qb2luKCdcXG4nKSxcbiAgICAgICAgICAgIGZvb3Rlci5qb2luKCdcXG4nKSxcbiAgICAgICAgICAgICcgJyxcbiAgICAgICAgICAgIHRoaXMuY29uZmlnLmxpbmVFbmRpbmdcbiAgICAgICAgXS5maWx0ZXIoZSA9PiBlKS5qb2luKCdcXG4nKVxuXG4gICAgICAgIGNvbnN0IHZpZXdCZWZ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VlcnkgPSBnZXRDbG9zZXN0UXVlcnkoZmluZFF1ZXJpZXMsIGN1ck51bSlcblxuICAgICAgICBpZiAoYWxsKSB7XG4gICAgICAgICAgICBmaW5kUXVlcmllcy5yZWR1Y2UoKHByb21pc2UsIHF1ZXJ5LCBpKSA9PlxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld0NvbnRlbnQgPSBmb3JtYXRDb250ZW50KGNtRG9jLmdldFZhbHVlKCkpXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHVwZGF0ZWRRdWVyaWVzID0gZ2V0QWxsRXhwYW5kZXJzUXVlcnkobmV3Q29udGVudClcblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5ydW5RdWVyeSh1cGRhdGVkUXVlcmllc1tpXSwgbmV3Q29udGVudClcbiAgICAgICAgICAgICAgICB9KSwgUHJvbWlzZS5yZXNvbHZlKClcbiAgICAgICAgICAgIClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMucnVuUXVlcnkoY2xvc2VzdFF1ZXJ5LCBmb3JtYXR0ZWQpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhc3luYyBvbmxvYWQoKSB7XG4gICAgICAgIHRoaXMuYWRkU2V0dGluZ1RhYihuZXcgU2V0dGluZ1RhYih0aGlzLmFwcCwgdGhpcykpO1xuXG4gICAgICAgIHRoaXMuYWRkQ29tbWFuZCh7XG4gICAgICAgICAgICBpZDogJ2VkaXRvci1leHBhbmQnLFxuICAgICAgICAgICAgbmFtZTogJ2V4cGFuZCcsXG4gICAgICAgICAgICBjYWxsYmFjazogdGhpcy5pbml0RXhwYW5kZXIsXG4gICAgICAgICAgICBob3RrZXlzOiBbXVxuICAgICAgICB9KVxuXG4gICAgICAgIHRoaXMuYWRkQ29tbWFuZCh7XG4gICAgICAgICAgICBpZDogJ2VkaXRvci1leHBhbmQtYWxsJyxcbiAgICAgICAgICAgIG5hbWU6ICdleHBhbmQgYWxsJyxcbiAgICAgICAgICAgIGNhbGxiYWNrOiAoKSA9PiB0aGlzLmluaXRFeHBhbmRlcih0cnVlKSxcbiAgICAgICAgICAgIGhvdGtleXM6IFtdXG4gICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5hcHAud29ya3NwYWNlLm9uKCdmaWxlLW9wZW4nLCBhc3luYyAoKSA9PiB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuY29uZmlnLmF1dG9FeHBhbmQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgYWN0aXZlTGVhZiA9IHRoaXMuYXBwLndvcmtzcGFjZS5hY3RpdmVMZWFmXG4gICAgICAgICAgICBpZiAoIWFjdGl2ZUxlYWYpIHtcbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgYWN0aXZlVmlldyA9IGFjdGl2ZUxlYWYudmlld1xuICAgICAgICAgICAgY29uc3QgaXNBbGxvd2VkVmlldyA9IGFjdGl2ZVZpZXcgaW5zdGFuY2VvZiBNYXJrZG93blZpZXdcbiAgICAgICAgICAgIGlmICghaXNBbGxvd2VkVmlldykge1xuICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLmluaXRFeHBhbmRlcih0cnVlKVxuXG4gICAgICAgIH0pXG5cbiAgICAgICAgY29uc3QgZGF0YSA9IGF3YWl0IHRoaXMubG9hZERhdGEoKSBhcyBQbHVnaW5TZXR0aW5nc1xuICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgdGhpcy5jb25maWcgPSB7XG4gICAgICAgICAgICAgICAgLi4udGhpcy5jb25maWcsXG4gICAgICAgICAgICAgICAgLi4uZGF0YVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgb251bmxvYWQ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AgdGhpcy5wbHVnaW4uY29uZmlnLmF1dG9FeHBhbmQgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKClcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZSgnRGVsYXknKVxuICAgICAgICAgICAgLnNldERlc2MoJ1RleHQgZXhwYW5kZXIgZG9uXFwnIHdhaXQgdW50aWwgc2VhcmNoIGNvbXBsZXRlZC4gSXQgd2FpdHMgZm9yIGEgZGVsYXkgYW5kIHBhc3RlIHJlc3VsdCBhZnRlciB0aGF0LicpXG4gICAgICAgICAgICAuYWRkU2xpZGVyKHNsaWRlciA9PiB7XG4gICAgICAgICAgICAgICAgc2xpZGVyLnNldExpbWl0cygxMDAsIDEwMDAwLCAxMDApXG4gICAgICAgICAgICAgICAgc2xpZGVyLnNldFZhbHVlKHRoaXMucGx1Z2luLmNvbmZpZy5kZWxheSlcbiAgICAgICAgICAgICAgICBzbGlkZXIub25DaGFuZ2UodmFsdWUgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5jb25maWcuZGVsYXkgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgc2xpZGVyLnNldER5bmFtaWNUb29sdGlwKClcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZSgnTGluZSBlbmRpbmcnKVxuICAgICAgICAgICAgLnNldERlc2MoJ1lvdSBjYW4gc3BlY2lmeSB0aGUgdGV4dCB3aGljaCB3aWxsIGFwcGVhciBhdCB0aGUgYm90dG9tIG9mIHRoZSBnZW5lcmF0ZWQgdGV4dC4nKVxuICAgICAgICAgICAgLmFkZFRleHQodGV4dCA9PiB7XG4gICAgICAgICAgICAgICAgdGV4dC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5jb25maWcubGluZUVuZGluZylcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKHZhbCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5jb25maWcubGluZUVuZGluZyA9IHZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKClcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZSgnRGVmYXVsdCB0ZW1wbGF0ZScpXG4gICAgICAgICAgICAuc2V0RGVzYygnWW91IGNhbiBzcGVjaWZ5IGRlZmF1bHQgdGVtcGxhdGUnKVxuICAgICAgICAgICAgLmFkZFRleHQodGV4dCA9PiB7XG4gICAgICAgICAgICAgICAgdGV4dC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5jb25maWcuZGVmYXVsdFRlbXBsYXRlKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UodmFsID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLmNvbmZpZy5kZWZhdWx0VGVtcGxhdGUgPSB2YWxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9KVxuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoJ0V4Y2x1ZGUgY3VycmVudCBmaWxlJylcbiAgICAgICAgICAgIC5zZXREZXNjKCdZb3UgY2FuIHNwZWNpZnkgc2hvdWxkIHRleHQgZXhwYW5kZXIgZXhjbHVkZSByZXN1bHRzIGZyb20gY3VycmVudCBmaWxlIG9yIG5vdCcpXG4gICAgICAgICAgICAuYWRkVG9nZ2xlKHRvZ2dsZSA9PiB7XG4gICAgICAgICAgICAgICAgdG9nZ2xlXG4gICAgICAgICAgICAgICAgICAgIC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5jb25maWcuZXhjbHVkZUN1cnJlbnQpXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5jb25maWcuZXhjbHVkZUN1cnJlbnQgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKClcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZSgnU2VxdWVuY2VzJylcbiAgICAgICAgICAgIC5zZXREZXNjKCdSRUdFWFAgLSBERVNDUklQVElPTicpXG4gICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICAoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBmcmFnbWVudCA9IG5ldyBEb2N1bWVudEZyYWdtZW50KClcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGl2ID0gZnJhZ21lbnQuY3JlYXRlRWwoJ2RpdicpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNlcXNcbiAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZSA9PiBlLm5hbWUgKyAnIC0gJyArIChlLmRlc2MgfHwgJycpKVxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbCA9IGZyYWdtZW50LmNyZWF0ZUVsKCdkaXYnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsLnNldFRleHQoZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUoJ3N0eWxlJywgYFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgcmdiYSgyNTUsIDI1NSwgMjU1LCAwLjEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW4tYm90dG9tOiAwLjVyZW07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAwLjVyZW07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZWxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLmZvckVhY2goZWwgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGl2LmFwcGVuZENoaWxkKGVsKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICBmcmFnbWVudC5hcHBlbmRDaGlsZChkaXYpXG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZyYWdtZW50XG4gICAgICAgICAgICAgICAgfSkoKVxuICAgICAgICAgICAgKVxuICAgIH1cbn1cbiJdLCJuYW1lcyI6WyJGaWxlVmlldyIsIk1hcmtkb3duVmlldyIsIlBsdWdpbiIsIlNldHRpbmciLCJQbHVnaW5TZXR0aW5nVGFiIl0sIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJLGFBQWEsR0FBRyxTQUFTLENBQUMsRUFBRSxDQUFDLEVBQUU7QUFDbkMsSUFBSSxhQUFhLEdBQUcsTU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7QUFDYixnQkFBQSxFQUFFLENBQUMsWUFBWSxDQUFDLE9BQU8sRUFBRSxxT0FJeEIsQ0FBQyxDQUFBO0FBQ0YsZ0JBQUEsT0FBTyxFQUFFLENBQUE7QUFDYixhQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxFQUFFLEVBQUE7QUFDYixnQkFBQSxHQUFHLENBQUMsV0FBVyxDQUFDLEVBQUUsQ0FBQyxDQUFBO0FBQ3ZCLGFBQUMsQ0FBQyxDQUFBO0FBQ0YsWUFBQSxRQUFRLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0FBRXpCLFlBQUEsT0FBTyxRQUFRLENBQUE7U0FDbEIsR0FBRyxDQUNQLENBQUE7S0FDUixDQUFBO0lBQ0wsT0FBQyxVQUFBLENBQUE7QUFBRCxDQXZHQSxDQUF5QkMseUJBQWdCLENBdUd4QyxDQUFBOzs7OyJ9 diff --git a/.obsidian/plugins/mrj-text-expand/manifest.json b/.obsidian/plugins/mrj-text-expand/manifest.json index fec394e5..e23e86ac 100644 --- a/.obsidian/plugins/mrj-text-expand/manifest.json +++ b/.obsidian/plugins/mrj-text-expand/manifest.json @@ -1,7 +1,7 @@ { "id": "mrj-text-expand", "name": "Text expand", - "version": "0.9.2", + "version": "0.10.5", "description": "Search and paste/transclude links to located files.", "isDesktopOnly": false, "author": "MrJackphil", diff --git a/.obsidian/plugins/multi-column-markdown/main.js b/.obsidian/plugins/multi-column-markdown/main.js deleted file mode 100644 index 323f6e86..00000000 --- a/.obsidian/plugins/multi-column-markdown/main.js +++ /dev/null @@ -1,1302 +0,0 @@ -/* -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'); - -/*! ***************************************************************************** -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. -***************************************************************************** */ - -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()); - }); -} - -/* - * Filename: multi-column-markdown/src/regionSettings.ts - * Created Date: Tuesday, February 1st 2022, 12:23:53 pm - * Author: Cameron Robinson - * - * Copyright (c) 2022 Cameron Robinson - */ -var BorderOption; -(function (BorderOption) { - BorderOption[BorderOption["enabled"] = 0] = "enabled"; - BorderOption[BorderOption["on"] = 1] = "on"; - BorderOption[BorderOption["true"] = 2] = "true"; - BorderOption[BorderOption["disabled"] = 3] = "disabled"; - BorderOption[BorderOption["off"] = 4] = "off"; - BorderOption[BorderOption["false"] = 5] = "false"; -})(BorderOption || (BorderOption = {})); -var ShadowOption; -(function (ShadowOption) { - ShadowOption[ShadowOption["enabled"] = 0] = "enabled"; - ShadowOption[ShadowOption["on"] = 1] = "on"; - ShadowOption[ShadowOption["true"] = 2] = "true"; - ShadowOption[ShadowOption["disabled"] = 3] = "disabled"; - ShadowOption[ShadowOption["off"] = 4] = "off"; - ShadowOption[ShadowOption["false"] = 5] = "false"; -})(ShadowOption || (ShadowOption = {})); -var ColumnLayout; -(function (ColumnLayout) { - ColumnLayout[ColumnLayout["standard"] = 0] = "standard"; - ColumnLayout[ColumnLayout["left"] = 1] = "left"; - ColumnLayout[ColumnLayout["first"] = 2] = "first"; - ColumnLayout[ColumnLayout["center"] = 3] = "center"; - ColumnLayout[ColumnLayout["middle"] = 4] = "middle"; - ColumnLayout[ColumnLayout["second"] = 5] = "second"; - ColumnLayout[ColumnLayout["right"] = 6] = "right"; - ColumnLayout[ColumnLayout["third"] = 7] = "third"; - ColumnLayout[ColumnLayout["last"] = 8] = "last"; -})(ColumnLayout || (ColumnLayout = {})); - -/* - * File: multi-column-markdown/src/MultiColumnParser.ts - * Created Date: Saturday, January 22nd 2022, 6:02:46 pm - * Author: Cameron Robinson - * - * Copyright (c) 2022 Cameron Robinson - */ -const START_REGEX_STRS = ["=== *start-multi-column", - "=== *multi-column-start"]; -const START_REGEX_ARR = []; -for (let i = 0; i < START_REGEX_STRS.length; i++) { - START_REGEX_ARR.push(new RegExp(START_REGEX_STRS[i])); -} -function findStartTag(text) { - let found = false; - let startPosition = -1; - for (let i = 0; i < START_REGEX_ARR.length; i++) { - if (START_REGEX_ARR[i].test(text)) { - found = true; - startPosition = text.search(START_REGEX_STRS[i]); - break; - } - } - return { found, startPosition }; -} -function containsStartTag(text) { - return findStartTag(text).found; -} -function isStartTagWithID(text) { - let startTagData = findStartTag(text); - if (startTagData.found === true) { - let key = getStartTagKey(text); - if (key === null || key === "") { - return { isStartTag: true, hasKey: false }; - } - return { isStartTag: true, hasKey: true }; - } - return { isStartTag: false, hasKey: false }; -} -const END_REGEX_STRS = ["=== *end-multi-column", - "=== *multi-column-end"]; -const END_REGEX_ARR = []; -for (let i = 0; i < END_REGEX_STRS.length; i++) { - END_REGEX_ARR.push(new RegExp(END_REGEX_STRS[i])); -} -function findEndTag(text) { - let found = false; - let startPosition = -1; - for (let i = 0; i < END_REGEX_ARR.length; i++) { - if (END_REGEX_ARR[i].test(text)) { - found = true; - startPosition = text.search(END_REGEX_STRS[i]); - break; - } - } - return { found, startPosition }; -} -function containsEndTag(text) { - return findEndTag(text).found; -} -const COL_REGEX_STRS = ["=== *column-end *===", - "=== *end-column *===", - "=== *column-break *===", - "=== *break-column *==="]; -const COL_REGEX_ARR = []; -for (let i = 0; i < COL_REGEX_STRS.length; i++) { - COL_REGEX_ARR.push(new RegExp(COL_REGEX_STRS[i])); -} -function containsColEndTag(text) { - let found = false; - for (let i = 0; i < COL_REGEX_ARR.length; i++) { - if (COL_REGEX_ARR[i].test(text)) { - found = true; - break; - } - } - return found; -} -const COL_SETTINGS_REGEX_STRS = ["```settings", - "```column-settings", - "```multi-column-settings"]; -const COL_SETTINGS_REGEX_ARR = []; -for (let i = 0; i < COL_SETTINGS_REGEX_STRS.length; i++) { - COL_SETTINGS_REGEX_ARR.push(new RegExp(COL_SETTINGS_REGEX_STRS[i])); -} -function containsColSettingsTag(text) { - let found = false; - for (let i = 0; i < COL_SETTINGS_REGEX_ARR.length; i++) { - if (COL_SETTINGS_REGEX_ARR[i].test(text)) { - found = true; - break; - } - } - return found; -} -function parseColumnSettings(settingsStr) { - // Set the minimum number of columnds to 2. - let numberOfColumns = 2; - let columnLayout = ColumnLayout.standard; - let borderDrawn = true; - let shadowDrawn = true; - let settingsLines = settingsStr.split("\n"); - for (let i = 0; i < settingsLines.length; i++) { - if (settingsLines[i].toLowerCase().replace(/\s/g, "").contains("numberofcolumns:")) { - let userDefNumberOfCols = parseInt(settingsLines[i].split(":")[1]); - if (Number.isNaN(userDefNumberOfCols) === false) { - if (userDefNumberOfCols === 3) { - numberOfColumns = 3; - } - else if (userDefNumberOfCols === 2) { - numberOfColumns = 2; - } - } - break; - } - } - for (let i = 0; i < settingsLines.length; i++) { - if (settingsLines[i].toLowerCase().replace(/\s/g, "").contains("largestcolumn:")) { - let setting = settingsLines[i].split(":")[1].trimStart().trimEnd().toLowerCase(); - let userDefLayout = ColumnLayout[setting]; - if (userDefLayout !== undefined) { - columnLayout = userDefLayout; - } - } - } - for (let i = 0; i < settingsLines.length; i++) { - if (settingsLines[i].toLowerCase().replace(/\s/g, "").contains("border:")) { - let setting = settingsLines[i].split(":")[1].trimStart().trimEnd().toLowerCase(); - let isBorderDrawn = BorderOption[setting]; - if (isBorderDrawn !== undefined) { - switch (isBorderDrawn) { - case (BorderOption.disabled): - case (BorderOption.off): - case (BorderOption.false): - borderDrawn = false; - break; - } - } - } - } - for (let i = 0; i < settingsLines.length; i++) { - if (settingsLines[i].toLowerCase().replace(/\s/g, "").contains("shadow:")) { - let setting = settingsLines[i].split(":")[1].trimStart().trimEnd().toLowerCase(); - let isShadowDrawn = ShadowOption[setting]; - if (isShadowDrawn !== undefined) { - switch (isShadowDrawn) { - case (ShadowOption.disabled): - case (ShadowOption.off): - case (ShadowOption.false): - shadowDrawn = false; - break; - } - } - } - } - let settings = { numberOfColumns, columnLayout, drawBorder: borderDrawn, drawShadow: shadowDrawn }; - return settings; -} -function countStartTags(text) { - let keys = []; - let startTagData = findStartTag(text); - while (startTagData.found) { - // Slice off everything before the tag - text = text.slice(startTagData.startPosition); - /** - * Get just the start tag line and then set text to everything just - * after the start tag. - */ - let tag = text.split("\n")[0]; - text = text.slice(1); // This moves the text 1 character so we dont match the same tag. - // Parse out the key and append to the list. - let key = getStartTagKey(tag); - if (key === null) { - key = ""; - } - keys.push(key); - // Search again for another tag before looping. - startTagData = findStartTag(text); - } - return { numberOfTags: keys.length, keys }; -} -/** - * This function will filter a set of strings, returning all items starting - * from the closest open start tag through the last item in the set. - * - * The function filters out all end tags to make sure that the start tag we - * find is the proper start tag for the list sent. - * @param linesAboveArray - * @returns - */ -function getStartBlockAboveLine(linesAboveArray) { - // Reduce the array down into a single string so that we can - // easily RegEx over the string and find the indicies we're looking for. - let linesAboveStr = linesAboveArray.reduce((prev, current) => { - return prev + "\n" + current; - }, ""); - /* - * First thing we need to do is check if there are any end tags in the - * set of strings (which logically would close start tags and therefore - * the start tag it closes is not what we want). If there are we want to - * slowly narrow down our set of strings until the last end tag is - * removed. This makes it easier to find the closest open start tag - * in the data. - */ - let endTagSerachData = findEndTag(linesAboveStr); - while (endTagSerachData.found === true) { - // Get the index of where the first regex match in the - // string is. then we slice from 0 to index off of the string - // split it by newline, cut off the first line (which actually - // contains the regex) then reduce back down to a single string. - // - // TODO: This could be simplified if we just slice the text after - // the end tag instead of the begining. - let indexOfRegex = endTagSerachData.startPosition; - linesAboveArray = linesAboveStr.slice(indexOfRegex).split("\n").splice(1); - linesAboveStr = linesAboveArray.reduce((prev, current) => { - return prev + "\n" + current; - }, ""); - endTagSerachData = findEndTag(linesAboveStr); - } - /** - * Now we have the set of lines after all other end tags. We now - * need to check if there is still a start tag left in the data. If - * there is no start tag then we want to return an empty array and empty - * key. - */ - let startBlockKey = ""; - let startTagSearchData = findStartTag(linesAboveStr); - if (startTagSearchData.found === false) { - return null; - } - else { - /** - * Now we know there is at least 1 start key left, however there - * may be multiple start keys if the user is not closing their - * blocks. We currently dont allow recusive splitting so we - * want to get the last key in our remaining set. Same idea as - * above. - */ - while (startTagSearchData.found === true) { - // Get the index of where the first regex match in the - // string is. then we slice from 0 to index off of the string - // split it by newline, cut off the first line (which actually - // contains the regex) then reduce back down to a single string. - // - // TODO: This could be simplified if we just slice the text after - // the end tag instead of the begining. - let startIndex = startTagSearchData.startPosition; - linesAboveArray = linesAboveStr.slice(startIndex).split("\n"); - let startTag = linesAboveArray[0]; - let key = getStartTagKey(startTag); - if (key !== null) { - startBlockKey = key; - } - linesAboveArray = linesAboveArray.splice(1); - linesAboveStr = linesAboveArray.reduce((prev, current) => { - return prev + "\n" + current; - }, ""); - startTagSearchData = findStartTag(linesAboveStr); - } - } - return { startBlockKey, linesAboveArray }; -} -function getEndBlockBelow(linesBelow) { - // Reduce the array down into a single string so that we can - // easily RegEx over the string and find the indicies we're looking for. - let linesBelowStr = linesBelow.reduce((prev, current) => { - return prev + "\n" + current; - }, ""); - let endTagSerachData = findEndTag(linesBelowStr); - let startTagSearchData = findStartTag(linesBelowStr); - let sliceEndIndex = -1; // If neither start or end found we return the entire array. - if (endTagSerachData.found === true && startTagSearchData.found === false) { - sliceEndIndex = endTagSerachData.startPosition; - } - else if (endTagSerachData.found === false && startTagSearchData.found === true) { - sliceEndIndex = startTagSearchData.startPosition; - } - else if (endTagSerachData.found === true && startTagSearchData.found === true) { - sliceEndIndex = endTagSerachData.startPosition; - if (startTagSearchData.startPosition < endTagSerachData.startPosition) { - /** - * If we found a start tag before an end tag we want to use the start tag - * our current block is not properly ended and we use the next start tag - * as our limit - */ - sliceEndIndex = startTagSearchData.startPosition; - } - } - return linesBelow.slice(0, sliceEndIndex); -} -function getStartTagKey(startTag) { - let keySplit = startTag.split(":"); - if (keySplit.length > 1) { - return keySplit[1].replace(" ", ""); - } - return null; -} - -/* - * Filename: multi-column-markdown/src/utilities/utils.ts - * Created Date: Tuesday, January 30th 2022, 4:02:19 pm - * Author: Cameron Robinson - * - * Copyright (c) 2022 Cameron Robinson - */ -function getUID(length = 10) { - if (length > 10) { - length = 10; - } - let UID = Math.random().toString(36).substring(2); - UID = UID.slice(0, length); - return UID; -} - -var ElementRenderType; -(function (ElementRenderType) { - ElementRenderType[ElementRenderType["undefined"] = 0] = "undefined"; - ElementRenderType[ElementRenderType["normalRender"] = 1] = "normalRender"; - ElementRenderType[ElementRenderType["specialRender"] = 2] = "specialRender"; -})(ElementRenderType || (ElementRenderType = {})); -function getElementRenderType(element) { - /** - * Look for specific kinds of elements by their CSS class names here. These - * are going to be brittle links as they rely on other plugin definitions but - * as this is only adding in extra compatability to the plugins defined here - * it should be ok. - * - * These may be classes on one of the simple elements (such as a paragraph) - * that we search for below so need to look for these first. - */ - if (hasDiceRoller(element) === true) { - return ElementRenderType.specialRender; - } - if (hasAdmonition(element) === true) { - return ElementRenderType.normalRender; - } - /** - * If we didnt find a special element we want to check for simple elements - * such as paragraphs or lists. In the current implementation we only set up - * the special case for "specialRender" elements so this *should* be saving - * some rendering time by setting these tags properly. - */ - if (hasParagraph(element) || - hasHeader(element) || - hasList(element)) { - return ElementRenderType.normalRender; - } - // If still nothing found we return other as the default response if nothing else found. - return ElementRenderType.specialRender; -} -function hasParagraph(element) { - return element.innerHTML.startsWith("= 0; i--) { - if (domList[i].nodeKey === prevObj.innerText) { - addAtIndex = i + 1; - break; - } - } - } - let nextElIndex = addAtIndex; - if (nextObj !== undefined) { - for (let i = addAtIndex; i < domList.length; i++) { - if (domList[i].nodeKey === nextObj.innerText.trim()) { - nextElIndex = i; - break; - } - } - } - // console.log(" Prev: ", siblingsAbove.children[siblingsAbove.children.length - 1], "Adding: ", obj.element, " Next: ", siblingsBelow.children[0], "Overwriting:", domList.slice(addAtIndex, nextElIndex)); - domList.splice(addAtIndex, nextElIndex - addAtIndex, obj); - domObjectMap.set(obj.UID, obj); - // /** - // * Make a copy of the list to log, only because - // * console log updates its references with updates in memory. - // */ - // let x = domList.slice(0); - // console.log(x); - return addAtIndex; - } - function removeObject(objectUID) { - // /** - // * Make a copy of the list to log - // */ - // let x = domList.slice(0); - // console.log(x); - // Get the object by key, remove it from the map and then - // from the list. - let obj = domObjectMap.get(objectUID); - domObjectMap.delete(objectUID); - if (obj === undefined) { - return; - } - if (domList.contains(obj)) { - domList.remove(obj); - } - // If the object is a settings object we need to remove from the - // settings list. - if (obj.tag === DOMObjectTag.regionSettings) { - let settingsObj = obj; - if (regionSettings.contains(settingsObj)) { - regionSettings.remove(settingsObj); - } - } - if (domList.length === 0) { - fileManager.removeRegion(regionKey); - } - // x = domList.slice(0); - // console.log(x); - } - function updateElementTag(objectUID, newTag) { - let obj = domObjectMap.get(objectUID); - let index = domList.indexOf(obj); - if (index !== -1) { - domList[index].tag = newTag; - } - } - function setElementToSettingsBlock(objectUID, settingsText) { - let obj = domObjectMap.get(objectUID); - let index = domList.indexOf(obj); - if (index !== -1) { - let settings = parseColumnSettings(settingsText); - let regionSettingsObj = new DOMRegionSettingsObject(domList[index], settings); - domObjectMap.set(regionSettingsObj.UID, regionSettingsObj); - domList[index] = regionSettingsObj; - regionSettings.push(regionSettingsObj); - } - } - /** - * Creates an object containing all necessary information for the region - * to be rendered to the preview pane. - * - * @returns a MultiColumnRenderData object with the root DOM element, settings object, and - * all child objects in the order they should be rendered. - */ - function getRegionRenderData() { - // Set defaults before attempting to get settings. - let settings = { numberOfColumns: 2, columnLayout: ColumnLayout.standard, drawBorder: true, drawShadow: true }; - if (regionSettings.length > 0) { - /** - * Since we append settings onto the end of the array we want the last - * item in the array as that would be the most recent settings we parsed. - */ - settings = regionSettings[regionSettings.length - 1].regionSettings; - } - return { - parentRenderElement: regionParent, - parentRenderSettings: settings, - domObjects: domList - }; - } - /** - * This fuction is called when a start tag is removed from view meaning - * our parent element storing the multi-column region is removed. It - * removes the CSS class from all of the elements so they will be - * re-rendered in the preview window. - */ - function displayOriginalElements() { - for (let i = 0; i < domList.length; i++) { - if (domList[i].element) { - domList[i].element.removeClasses([MultiColumnStyleCSS.RegionEndTag, - MultiColumnStyleCSS.ColumnEndTag, - MultiColumnStyleCSS.RegionSettings, - MultiColumnStyleCSS.RegionContent]); - if (domList[i].element.parentElement) { - domList[i].element.parentElement.removeChild(domList[i].element); - } - } - } - for (let i = 0; i < regionSettings.length; i++) { - if (regionSettings[i].element) { - regionSettings[i].element.removeClasses([MultiColumnStyleCSS.RegionEndTag, - MultiColumnStyleCSS.ColumnEndTag, - MultiColumnStyleCSS.RegionSettings, - MultiColumnStyleCSS.RegionContent]); - if (regionSettings[i].element.parentElement) { - regionSettings[i].element.parentElement.removeChild(regionSettings[i].element); - } - } - } - } - function getRootRegionElement() { - return rootElement; - } - return { addObject: addObject, - removeObject: removeObject, - updateElementTag: updateElementTag, - setElementToSettingsBlock: setElementToSettingsBlock, - getRegionRenderData: getRegionRenderData, - displayOriginalElements: displayOriginalElements, - getRootRegionElement: getRootRegionElement - }; -} - -/* - * File: multi-column-markdown/src/main.ts - * Created Date: Tuesday, October 5th 2021, 1:09 pm - * Author: Cameron Robinson - * - * Copyright (c) 2022 Cameron Robinson - */ -class MultiColumnMarkdown extends obsidian.Plugin { - constructor() { - // settings: SplitColumnMarkdownSettings; - super(...arguments); - this.globalManager = new GlobalDOMManager(); - } - onload() { - return __awaiter(this, void 0, void 0, function* () { - console.log("Loading multi-column markdown"); - this.setupMarkdownPostProcessor(); - //TODO: Set up this as a modal to set settings automatically - this.addCommand({ - id: `insert-multi-column-region`, - name: `Insert Multi-Column Region`, - editorCallback: (editor, view) => { - try { - editor.getDoc().replaceSelection(` -=== multi-column-start: ID_${getUID(4)} -\`\`\`column-settings -Number of Columns: 2 -Largest Column: standard -\`\`\` - -=== end-column === - -=== multi-column-end - -${editor.getDoc().getSelection()}`); - } - catch (e) { - new obsidian.Notice("Encountered an error inserting a multi-column region. Please try again later."); - } - } - }); - this.addCommand({ - id: `add-IDs-To-multi-column-region`, - name: `Fix Missing IDs for Multi-Column Regions`, - editorCallback: (editor, view) => { - try { - /** - * Not sure if there is an easier way to do this. - * - * Get all of the lines of the document split by newlines. - */ - let lines = editor.getRange({ line: 0, ch: 0 }, { line: editor.getDoc().lineCount(), ch: 0 }).split("\n"); - /** - * Loop through all of the lines checking if the line is a - * start tag and if so is it missing an ID. - */ - let linesWithoutIDs = []; - let textWithoutIDs = []; - for (let i = 0; i < lines.length; i++) { - let data = isStartTagWithID(lines[i]); - if (data.isStartTag === true && data.hasKey === false) { - linesWithoutIDs.push(i); - textWithoutIDs.push(lines[i]); - } - } - if (linesWithoutIDs.length === 0) { - new obsidian.Notice("Found 0 missing IDs in the current document."); - return; - } - /** - * Now loop through each line that is missing an ID and - * generate a random ID and replace the original text. - */ - for (let i = 0; i < linesWithoutIDs.length; i++) { - let originalText = textWithoutIDs[i]; - let text = originalText; - text = text.trimEnd(); - if (text.charAt(text.length - 1) === ":") { - text = text.slice(0, text.length - 1); - } - text = `${text}: ID_${getUID(4)}`; - editor.replaceRange(text, { line: linesWithoutIDs[i], ch: 0 }, { line: linesWithoutIDs[i], ch: originalText.length }); - } - new obsidian.Notice(`Replaced ${linesWithoutIDs.length} missing ID(s) in the current document.`); - } - catch (e) { - new obsidian.Notice("Encountered an error addign IDs to multi-column regions. Please try again later."); - } - } - }); - this.registerInterval(window.setInterval(() => { - this.UpdateOpenFilePreviews(); - }, 2000)); - }); - } - UpdateOpenFilePreviews() { - let fileManagers = this.globalManager.getAllFileManagers(); - fileManagers.forEach(element => { - let regionalManagers = element.getAllRegionalManagers(); - regionalManagers.forEach(regionManager => { - let parentElementData = regionManager.getRegionRenderData(); - this.updateRenderedMarkdown(parentElementData.domObjects); - }); - }); - } - setupMarkdownPostProcessor() { - this.registerMarkdownPostProcessor((el, ctx) => __awaiter(this, void 0, void 0, function* () { - // Get the info for our current context and then check - // if the entire text contains a start tag. If there is - // no start tag in the document we can just return and - // ignore the rest of the parsing. - let info = ctx.getSectionInfo(el); - /** - * We need the context info to properly parse so returning here - * info is null. TODO: Set error in view if this occurs. - */ - if (!info) { - return; - } - const sourcePath = ctx.sourcePath; - let fileDOMManager = this.globalManager.getFileManager(sourcePath); - if (fileDOMManager === null) { - console.log("Found null DOM manager. Could not process multi-column markdown."); - return; - } - /** - * If we encounter a start tag on the document we set the flag to start - * parsing the rest of the document. - */ - if (containsStartTag(el.textContent)) { - fileDOMManager.setHasStartTag(); - } - /** - * If the document does not contain any start tags we ignore the - * rest of the parsing. This is only set to true once the first - * start tag element is parsed above. - */ - if (fileDOMManager.getHasStartTag() === false) { - return; - } - /** - * Take the info provided and generate the required variables from - * the line start and end values. - */ - let docLines = info.text.split("\n"); - let linesAboveArray = docLines.slice(0, info.lineStart); - let linesOfElement = docLines.slice(info.lineStart, info.lineEnd + 1); - let linesBelowArray = docLines.slice(info.lineEnd + 1); - /** - * If the current line is a start tag we want to set up the - * region manager. The regional manager takes care - * of all items between it's start and end tags while the - * file manager we got above above takes care of all regional - * managers in each file. - */ - let elementTextSpaced = linesOfElement.reduce((prev, curr) => { - return prev + "\n" + curr; - }); - if (containsStartTag(el.textContent)) { - /** - * Set up the current element to act as the parent for the - * multi-column region. - */ - el.children[0].detach(); - el.classList.add(MultiColumnLayoutCSS.RegionRootContainerDiv); - let renderErrorRegion = el.createDiv({ - cls: `${MultiColumnLayoutCSS.RegionErrorContainerDiv}, ${MultiColumnStyleCSS.RegionErrorMessage}`, - }); - let renderColumnRegion = el.createDiv({ - cls: MultiColumnLayoutCSS.RegionContentContainerDiv - }); - let startBlockData = getStartBlockAboveLine(linesOfElement); - let regionKey = startBlockData.startBlockKey; - if (fileDOMManager.checkKeyExists(regionKey) === true) { - let { numberOfTags, keys } = countStartTags(info.text); - let numMatches = 0; - for (let i = 0; i < numberOfTags; i++) { - // Because we checked if key exists one of these has to match. - if (keys[i] === regionKey) { - numMatches++; - } - } - // We only want to display an error if there are more than 2 of the same id across - // the whole document. This prevents erros when obsidian reloads the whole document - // and there are two of the same key in the map. - if (numMatches >= 2) { - if (regionKey === "") { - renderErrorRegion.innerText = "Found multiple regions with empty IDs. Please set a unique ID after each start tag.\nEG: '=== multi-column-start: randomID'\nOr use 'Fix Missing IDs' in the command palette and reload the document."; - } - else { - renderErrorRegion.innerText = "Region ID already exists in document, please set a unique ID.\nEG: '=== multi-column-start: randomID'"; - } - return; - } - } - el.id = `MultiColumnID:${regionKey}`; - let elementMarkdownRenderer = new obsidian.MarkdownRenderChild(el); - fileDOMManager.createRegionalManager(regionKey, el, renderErrorRegion, renderColumnRegion); - elementMarkdownRenderer.onunload = () => { - if (fileDOMManager) { - fileDOMManager.removeRegion(startBlockData.startBlockKey); - } - }; - ctx.addChild(elementMarkdownRenderer); - /** - * Now we have created our regional manager and defined what elements - * need to be rendered into. So we can return without any more processing. - */ - return; - } - /** - * Check if any of the lines above us contain a start block, and if - * so get the lines from our current element to the start block. - */ - let startBockAbove = getStartBlockAboveLine(linesAboveArray); - if (startBockAbove === null) { - return; - } - /** - * We now know we're within a multi-column region, so we update our - * list of lines above to just be the items within this region. - */ - linesAboveArray = startBockAbove.linesAboveArray; - /** - * We use the start block's key to get our regional manager. If this - * lookup fails we can not continue processing this element. - */ - let regionalManager = fileDOMManager.getRegionalManager(startBockAbove.startBlockKey); - if (regionalManager === null) { - return; - } - /** - * To make sure we're placing the item in the right location (and - * overwrite elements that are now gone) we now want all of the - * lines after this element up to the end tag. - */ - linesBelowArray = getEndBlockBelow(linesBelowArray); - /** - * Now we take the lines above our current element up until the - * start region tag and render that into an HTML element. We will - * use these elements to determine where to place our current element. - */ - let siblingsAbove = renderMarkdownFromLines(linesAboveArray, sourcePath); - let siblingsBelow = renderMarkdownFromLines(linesBelowArray, sourcePath); - /** - * Set up our dom object to be added to the manager. - */ - let currentObject = new DOMObject(el); - el.id = currentObject.UID; - /** - * Now we add the object to the manager and then setup the - * callback for when the object is removed from view that will remove - * the item from the manager. - */ - regionalManager.addObject(siblingsAbove, siblingsBelow, currentObject); - let elementMarkdownRenderer = new obsidian.MarkdownRenderChild(el); - elementMarkdownRenderer.onunload = () => { - if (regionalManager) { - // We can attempt to update the view here after the item is removed - // but need to get the item's parent element before removing object from manager. - let regionRenderData = regionalManager.getRegionRenderData(); - regionalManager.removeObject(currentObject.UID); - /** - * Need to check here if element is null as this closure will be called - * repeatedly on file change. - */ - if (regionRenderData.parentRenderElement === null) { - return; - } - this.renderColumnMarkdown(regionRenderData.parentRenderElement, regionRenderData.domObjects, regionRenderData.parentRenderSettings); - } - }; - ctx.addChild(elementMarkdownRenderer); - /** - * Now we check if our current element is a special flag so we can - * properly set the element tag within the regional manager. - */ - if (containsEndTag(el.textContent) === true) { - el.addClass(MultiColumnStyleCSS.RegionEndTag); - regionalManager.updateElementTag(currentObject.UID, DOMObjectTag.endRegion); - } - else if (containsColEndTag(elementTextSpaced) === true) { - el.addClass(MultiColumnStyleCSS.ColumnEndTag); - regionalManager.updateElementTag(currentObject.UID, DOMObjectTag.columnBreak); - } - else if (containsColSettingsTag(elementTextSpaced) === true) { - el.addClass(MultiColumnStyleCSS.RegionSettings); - regionalManager.setElementToSettingsBlock(currentObject.UID, elementTextSpaced); - } - else { - el.addClass(MultiColumnStyleCSS.RegionContent); - } - /** - * Use our regional manager to get everything needed to render the region. - */ - let parentElementData = regionalManager.getRegionRenderData(); - this.renderColumnMarkdown(parentElementData.parentRenderElement, parentElementData.domObjects, parentElementData.parentRenderSettings); - return; - })); - } - /** - * This function takes in the data for the multi-column region and sets up the - * user defined number of children with the proper css classes to be rendered properly. - * - * @param parentElement The element that the multi-column region will be rendered under. - * @param regionElements The list of DOM objects that will be coppied under the parent object - * @param settings The settings the user has defined for the region. - */ - renderColumnMarkdown(parentElement, regionElements, settings) { - let multiColumnParent = createDiv({ - cls: MultiColumnLayoutCSS.RegionColumnContainerDiv, - }); - if (settings.drawShadow === true) { - multiColumnParent.addClass(MultiColumnStyleCSS.RegionShadow); - } - /** - * Pass our parent div and settings to parser to create the required - * column divs as children of the parent. - */ - let columnContentDivs = getColumnContentDivs(settings, multiColumnParent); - for (let i = 0; i < columnContentDivs.length; i++) { - if (settings.drawBorder === true) { - columnContentDivs[i].addClass(MultiColumnStyleCSS.ColumnBorder); - } - if (settings.drawShadow === true) { - columnContentDivs[i].addClass(MultiColumnStyleCSS.ColumnShadow); - } - } - // Create markdown renderer to parse the passed markdown - // between the tags. - let markdownRenderChild = new obsidian.MarkdownRenderChild(multiColumnParent); - // Remove every other child from the parent so - // we dont end up with multiple sets of data. This should - // really only need to loop once for i = 0 but loop just - // in case. - for (let i = parentElement.children.length - 1; i >= 0; i--) { - parentElement.children[i].detach(); - } - parentElement.appendChild(markdownRenderChild.containerEl); - let columnIndex = 0; - for (let i = 0; i < regionElements.length; i++) { - if (regionElements[i].tag !== DOMObjectTag.startRegion || - regionElements[i].tag !== DOMObjectTag.regionSettings || - regionElements[i].tag !== DOMObjectTag.endRegion || - regionElements[i].tag !== DOMObjectTag.columnBreak) { - // We store the elements in a wrapper container until we determine - let element = createDiv({ - cls: MultiColumnLayoutCSS.ColumnDualElementContainer, - }); - regionElements[i].elementContainer = element; - // Otherwise we just make a copy of the original element to display. - element.appendChild(regionElements[i].element.cloneNode(true)); - if (element !== null) { - columnContentDivs[columnIndex].appendChild(element); - } - /** - * If the tag is a column break we update the column index after - * appending the item to the column div. This keeps the main DOM - * cleaner by removing other items and placing them all within - * a region container. - */ - if (regionElements[i].tag === DOMObjectTag.columnBreak && - (columnIndex + 1) < settings.numberOfColumns) { - columnIndex++; - } - } - } - } - setUpDualRender(domElement) { - /** - * If our element is of "specialRender" type it *may* need to be rendered - * using the original element rather than a copy. For example, an element - * may have an onClick event that would not get coppied to the clone. - * - * If we just moved these elements into the region it would get - * moved back out into the original location in the DOM by obsidian - * when scrolling or when the file is updated. On the next refresh it - * would be moved back but that can lead to a region jumping - * around as the item is moved in and out. - * - * Here we set up the div to contain the element and create - * a visual only clone of it. The clone will only be visible - * when the original is not in the multi-column region so it - * saves us from the visual noise of the region jumping around. - */ - // Remove the old elements before we set up the dual rendered elements. - let containerElement = domElement.elementContainer; - let renderElement = domElement.element; - for (let i = containerElement.children.length - 1; i >= 0; i--) { - containerElement.children[i].detach(); - } - containerElement.appendChild(renderElement); - renderElement.addClass(MultiColumnLayoutCSS.OriginalElementType); - let clonedNode = renderElement.cloneNode(true); - clonedNode.addClass(MultiColumnLayoutCSS.ClonedElementType); - clonedNode.removeClasses([MultiColumnStyleCSS.RegionContent, MultiColumnLayoutCSS.OriginalElementType]); - containerElement.appendChild(clonedNode); - } - updateRenderedMarkdown(regionElements) { - /** - * Go through every node of the region looking for the "specialRender" type - * which are the elements that may need to be rendered using the original - * element rather than a copy. - */ - for (let i = 0; i < regionElements.length; i++) { - /** - * Here we check every item again to see if they need to be updated. - * This could be made slightly more efficient if we can truly determine - * wether an item is a normal render item, however it seems like it - * may take a bit of extra time in order for the classes we check for - * to be added to the elements. - */ - let elementType = regionElements[i].elementType; - // If the element is not currently a special render element we check again - // as the original element may have been updated. - if (elementType !== ElementRenderType.specialRender) { - // If the new result returns as a special renderer we update so - // this wont run again for this item. - elementType = getElementRenderType(regionElements[i].element); - } - if (elementType === ElementRenderType.specialRender) { - regionElements[i].elementType = elementType; - this.setUpDualRender(regionElements[i]); - } - } - } -} -/** - * Sets up the CSS classes and the number of columns based on the passed settings. - * @param settings The user defined settings that determine what CSS is set here. - * @param multiColumnParent The parent object that the column divs will be created under. - * @returns The list of column divs created under the passed parent element. - */ -function getColumnContentDivs(settings, multiColumnParent) { - let columnContentDivs = []; - if (settings.numberOfColumns === 2) { - switch (settings.columnLayout) { - case (ColumnLayout.standard): - case (ColumnLayout.middle): - case (ColumnLayout.center): - case (ColumnLayout.third): - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent twoEqualColumns_Left` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent twoEqualColumns_Right` - })); - break; - case (ColumnLayout.left): - case (ColumnLayout.first): - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent twoColumnsHeavyLeft_Left` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent twoColumnsHeavyLeft_Right` - })); - break; - case (ColumnLayout.right): - case (ColumnLayout.second): - case (ColumnLayout.last): - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent twoColumnsHeavyRight_Left` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent twoColumnsHeavyRight_Right` - })); - break; - } - } - else if (settings.numberOfColumns === 3) { - switch (settings.columnLayout) { - case (ColumnLayout.standard): - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threeEqualColumns_Left` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threeEqualColumns_Middle` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threeEqualColumns_Right` - })); - break; - case (ColumnLayout.left): - case (ColumnLayout.first): - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyLeft_Left` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyLeft_Middle` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyLeft_Right` - })); - break; - case (ColumnLayout.middle): - case (ColumnLayout.center): - case (ColumnLayout.second): - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyMiddle_Left` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyMiddle_Middle` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyMiddle_Right` - })); - break; - case (ColumnLayout.right): - case (ColumnLayout.third): - case (ColumnLayout.last): - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyRight_Left` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyRight_Middle` - })); - columnContentDivs.push(multiColumnParent.createDiv({ - cls: `columnContent threColumnsHeavyRight_Right` - })); - break; - } - } - return columnContentDivs; -} -function renderMarkdownFromLines(mdLines, sourcePath) { - /** - * We re-render all of the items above our element, until the start tag, - * so we can determine where to place the new item in the manager. - * - * TODO: Can reduce the amount needing to be rendered by only rendering to - * the start tag or a column-break whichever is closer. - */ - let siblings = createDiv(); - let markdownRenderChild = new obsidian.MarkdownRenderChild(siblings); - obsidian.MarkdownRenderer.renderMarkdown(mdLines.reduce((prev, current) => { - return prev + "\n" + current; - }, ""), siblings, sourcePath, markdownRenderChild); - return siblings; -} - -module.exports = MultiColumnMarkdown; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9yZWdpb25TZXR0aW5ncy50cyIsInNyYy91dGlsaXRpZXMvdGV4dFBhcnNlci50cyIsInNyYy91dGlsaXRpZXMvdXRpbHMudHMiLCJzcmMvdXRpbGl0aWVzL2VsZW1lbnRSZW5kZXJUeXBlUGFyc2VyLnRzIiwic3JjL2RvbV9tYW5hZ2VyL2RvbU9iam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AsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8ub3BzLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIF8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NvbHVtbiAqPT09XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCI9PT0gKmNvbHVtbi1icmVhayAqPT09XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCI9PT0gKmJyZWFrLWNvbHVtbiAqPT09XCJdO1xuY29uc3QgQ09MX1JFR0VYX0FSUjogUmVnRXhwW10gPSBbXTtcbmZvcihsZXQgaSA9IDA7IGkgPCBDT0xfUkVHRVhfU1RSUy5sZW5ndGg7IGkrKykge1xuICAgIENPTF9SRUdFWF9BUlIucHVzaChuZXcgUmVnRXhwKENPTF9SRUdFWF9TVFJTW2ldKSk7XG59XG5leHBvcnQgZnVuY3Rpb24gY29udGFpbnNDb2xFbmRUYWcodGV4dDogc3RyaW5nKTogYm9vbGVhbiB7XG5cbiAgICBsZXQgZm91bmQgPSBmYWxzZTtcbiAgICBmb3IobGV0IGkgPSAwOyBpPCBDT0xfUkVHRVhfQVJSLmxlbmd0aDsgaSsrKSB7XG5cbiAgICAgICAgaWYoQ09MX1JFR0VYX0FSUltpXS50ZXN0KHRleHQpKSB7XG4gICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBmb3VuZDtcbn1cblxuY29uc3QgQ09MX1NFVFRJTkdTX1JFR0VYX1NUUlMgPSBbXCJgYGBzZXR0aW5nc1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJgYGBjb2x1bW4tc2V0dGluZ3NcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiYGBgbXVsdGktY29sdW1uLXNldHRpbmdzXCJdO1xuY29uc3QgQ09MX1NFVFRJTkdTX1JFR0VYX0FSUjogUmVnRXhwW10gPSBbXTtcbmZvcihsZXQgaSA9IDA7IGkgPCBDT0xfU0VUVElOR1NfUkVHRVhfU1RSUy5sZW5ndGg7IGkrKykge1xuICAgIENPT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BsYWNlKC9cXHMvZywgXCJcIikuY29udGFpbnMoXCJudW1iZXJvZmNvbHVtbnM6XCIpKSB7XG4gICAgICAgICAgICBsZXQgdXNlckRlZk51bWJlck9mQ29scyA9IHBhcnNlSW50KHNldHRpbmdzTGluZXNbaV0uc3BsaXQoXCI6XCIpWzFdKVxuXG4gICAgICAgICAgICBpZihOdW1iZXIuaXNOYU4odXNlckRlZk51bWJlck9mQ29scykgPT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgaWYodXNlckRlZk51bWJlck9mQ29scyA9PT0gMykge1xuICAgICAgICAgICAgICAgICAgICBudW1iZXJPZkNvbHVtbnMgPSAzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYodXNlckRlZk51bWJlck9mQ29scyA9PT0gMikge1xuICAgICAgICAgICAgICAgICAgICBudW1iZXJPZkNvbHVtbnMgPSAyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmb3IobGV0IGkgPSAwOyBpIDwgc2V0dGluZ3NMaW5lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICBpZihzZXR0aW5nc0xpbmVzW2ldLnRvTG93ZXJDYXNlKCkucmVwbGFjZSgvXFxzL2csIFwiXCIpLmNvbnRhaW5zKFwibGFyZ2VzdGNvbHVtbjpcIikpIHtcblxuICAgICAgICAgICAgbGV0IHNldHRpbmcgPSBzZXR0aW5nc0xpbmVzW2ldLnNwbGl0KFwiOlwiKVsxXS50cmltU3RhcnQoKS50cmltRW5kKCkudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgIGxldCB1c2VyRGVmTGF5b3V0OiBDb2x1bW5MYXlvdXQgPSAoPGFueT5Db2x1bW5MYXlvdXQpW3NldHRpbmddXG5cbiAgICAgICAgICAgIGlmKHVzZXJEZWZMYXlvdXQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGNvbHVtbkxheW91dCA9IHVzZXJEZWZMYXlvdXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmb3IobGV0IGkgPSAwOyBpIDwgc2V0dGluZ3NMaW5lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICBpZihzZXR0aW5nc0xpbmVzW2ldLnRvTG93ZXJDYXNlKCkucmVwbGFjZSgvXFxzL2csIFwiXCIpLmNvbnRhaW5zKFwiYm9yZGVyOlwiKSkge1xuXG4gICAgICAgICAgICBsZXQgc2V0dGluZyA9IHNldHRpbmdzTGluZXNbaV0uc3BsaXQoXCI6XCIpWzFdLnRyaW1TdGFydCgpLnRyaW1FbmQoKS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgbGV0IGlzQm9yZGVyRHJhd246IEJvcmRlck9wdGlvbiA9ICg8YW55PkJvcmRlck9wdGlvbilbc2V0dGluZ11cblxuICAgICAgICAgICAgaWYoaXNCb3JkZXJEcmF3biAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoKGlzQm9yZGVyRHJhd24pe1xuICAgICAgICAgICAgICAgICAgICBjYXNlKEJvcmRlck9wdGlvbi5kaXNhYmxlZCk6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UoQm9yZGVyT3B0aW9uLm9mZik6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UoQm9yZGVyT3B0aW9uLmZhbHNlKTpcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckRyYXduID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmb3IobGV0IGkgPSAwOyBpIDwgc2V0dGluZ3NMaW5lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICBpZihzZXR0aW5nc0xpbmVzW2ldLnRvTG93ZXJDYXNlKCkucmVwbGFjZSgvXFxzL2csIFwiXCIpLmNvbnRhaW5zKFwic2hhZG93OlwiKSkge1xuXG4gICAgICAgICAgICBsZXQgc2V0dGluZyA9IHNldHRpbmdzTGluZXNbaV0uc3BsaXQoXCI6XCIpWzFdLnRyaW1TdGFydCgpLnRyaW1FbmQoKS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgbGV0IGlzU2hhZG93RHJhd246IFNoYWRvd09wdGlvbiA9ICg8YW55PlNoYWRvd09wdGlvbilbc2V0dGluZ11cblxuICAgICAgICAgICAgaWYoaXNTaGFkb3dEcmF3biAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoKGlzU2hhZG93RHJhd24pe1xuICAgICAgICAgICAgICAgICAgICBjYXNlKFNoYWRvd09wdGlvbi5kaXNhYmxlZCk6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UoU2hhZG93T3B0aW9uLm9mZik6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UoU2hhZG93T3B0aW9uLmZhbHNlKTpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNoYWRvd0RyYXduID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBsZXQgc2V0dGluZ3MgPSB7IG51bWJlck9mQ29sdW1ucywgY29sdW1uTGF5b3V0LCBkcmF3Qm9yZGVyOiBib3JkZXJEcmF3biwgZHJhd1NoYWRvdzogc2hhZG93RHJhd24gfVxuXG4gICAgcmV0dXJuIHNldHRpbmdzO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gY291bnRTdGFydFRhZ3ModGV4dDogc3RyaW5nKTogeyBudW1iZXJPZlRhZ3M6IG51bWJlciwga2V5czogc3RyaW5nW10gfSB7XG5cbiAgICBsZXQga2V5czogc3RyaW5nW10gPSBbXTtcbiAgICBsZXQgc3RhcnRUYWdEYXR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tcblxuICAgICAgICBsZXQgYWRkQXRJbmRleCA9IHNpYmxpbmdzQWJvdmUuY2hpbGRyZW4ubGVuZ3RoO1xuXG4gICAgICAgIGxldCBwcmV2T2JqVGV4dCA9IFwiXCJcbiAgICAgICAgaWYocHJldk9iaiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHByZXZPYmpUZXh0ID0gcHJldk9iai5pbm5lclRleHQ7XG5cbiAgICAgICAgICAgIGZvcihsZXQgaSA9IGRvbUxpc3QubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICBpZihkb21MaXN0W2ldLm5vZGVLZXkgPT09IHByZXZPYmouaW5uZXJUZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgIGFkZEF0SW5kZXggPSBpICsgMTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGV0IG5leHRFbEluZGV4ID0gYWRkQXRJbmRleDtcbiAgICAgICAgbGV0IG5leHRPYmpUZXh0ID0gXCJcIlxuICAgICAgICBpZihuZXh0T2JqICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgbGV0IGZvdW5kTmV4dCA9IGZhbHNlO1xuICAgICAgICAgICAgbmV4dE9ialRleHQgPSBuZXh0T2JqLmlubmVyVGV4dDtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgZm9yKGxldCBpID0gYWRkQXRJbmRleDsgaSA8IGRvbUxpc3QubGVuZ3RoOyBpKyspIHtcblxuICAgICAgICAgICAgICAgIGlmKGRvbUxpc3RbaV0ubm9kZUtleSA9PT0gbmV4dE9iai5pbm5lclRleHQudHJpbSgpKSB7XG4gICAgXG4gICAgICAgICAgICAgICAgICAgIG5leHRFbEluZGV4ID0gaTtcbiAgICAgICAgICAgICAgICAgICAgZm91bmROZXh0ID0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tTGlzdC5zbGljZSgwKTtcbiAgICAgICAgLy8gY29uc29sZS5sb2coeCk7XG5cbiAgICAgICAgLy8gR2V0IHRoZSBvYmplY3QgYnkga2V5LCByZW1vdmUgaXQgZnJvbSB0aGUgbWFwIGFuZCB0aGVuXG4gICAgICAgIC8vIGZyb20gdGhlIGxpc3QuXG4gICAgICAgIGxldCBvYmogPSBkb21PYmplY3RNYXAuZ2V0KG9iamVjdFVJRCk7XG4gICAgICAgIGRvbU9iamVjdE1hcC5kZWxldGUob2JqZWN0VUlEKTtcbiAgICAgICAgXG4gICAgICAgIGlmKG9iaiA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZihkb21MaXN0LmNvbnRhaW5zKG9iaikpIHtcbiAgICAgICAgICAgIGRvbUxpc3QucmVtb3ZlKG9iaik7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBJZiB0aGUgb2JqZWN0IGlzIGEgc2V0dGluZ3Mgb2JqZWN0IHdlIG5lZWQgdG8gcmVtb3ZlIGZyb20gdGhlIFxuICAgICAgICAvLyBzZXR0aW5ncyBsaXN0LlxuICAgICAgICBpZihvYmoudGFnID09PSBET01PYmplY3RUYWcucmVnaW9uU2V0dGluZ3MpIHtcbiAgICAgICAgICAgIGxldCBzZXR0aW5nc09iaiA9IG9iaiBhcyBET01SZWdpb25TZXR0aW5nc09iamVjdDtcbiAgICAgICAgICAgIGlmKHJlZ2lvblNldHRpbmdzLmNvbnRhaW5zKHNldHRpbmdzT2JqKSkge1xuICAgICAgICAgICAgICAgIHJlZ2lvblNldHRpbmdzLnJlbW92ZShzZXR0aW5nc09iaik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZihkb21MaXN0Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgZmlsZU1hbmFnZXIucmVtb3ZlUmVnaW9uKHJlZ2lvbktleSk7XG4gICAgICAgIH1cblxuICAgICAgIC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gICBkb21MaXN0W2ldLmVsZW1lbnQucmVtb3ZlQ2xhc3NlcyhbTXVsdGlDb2x1bW5TdHlsZUNTUy5SZWdpb25FbmRUYWcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE11bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uRW5kVGFnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNdWx0aUNvbHVtblN0eWxlQ1NTLlJlZ2lvblNldHRpbmdzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNdWx0aUNvbHVtblN0eWxlQ1NTLlJlZ2lvbkNvbnRlbnRdKTtcbiAgICAgICAgICAgICAgICBpZihkb21MaXN0W2ldLmVsZW1lbnQucGFyZW50RWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICBkb21MaXN0W2ldLmVsZW1lbnQucGFyZW50RWxlbWVudC5yZW1vdmVDaGlsZChkb21MaXN0W2ldLmVsZW1lbnQpXG4gICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IHJlZ2lvblNldHRpbmdzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZihyZWdpb25TZXR0aW5nc1tpXS5lbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgcmVnaW9uU2V0dGluZ3NbaV0uZWxlbWVudC5yZW1vdmVDbGFzc2VzKFtNdWx0aUNvbHVtblN0eWxlQ1NTLlJlZ2lvbkVuZFRhZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE11bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uRW5kVGFnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTXVsdGlDb2x1bW5TdHlsZUNTUy5SZWdpb25TZXR0aW5ncyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE11bHRpQ29sdW1uU3R5bGVDU1MuUmVnaW9uQ29udGVudF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYocmVnaW9uU2V0dGluZ3NbaV0uZWxlbWVudC5wYXJlbnRFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvblNldHRpbmdzW2ldLmVsZW1lbnQucGFyZW50RWxlbWVudC5yZW1vdmVDaGlsZChyZWdpb25TZXR0aW5nc1tpXS5lbGVtZW50KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGdldFJvb3RSZWdpb25FbGVtZW50KCk6IEhUTUxFbGVtZW50IHtcbiAgICAgICAgcmV0dXJuIHJvb3RFbGVtZW50O1xuICAgIH1cblxuICAgIHJldHVybiB7IGFkZE9iamVjdDogYWRkT2JqZWN0LCBcbiAgICAgICAgICAgICByZW1vdmVPYmplY3Q6IHJlbW92ZU9iamVjdCwgXG4gICAgICAgICAgICAgdXBkYXRlRWxlbWVudFRhZzogdXBkYXRlRWxlbWVudFRhZywgXG4gICAgICAgICAgICAgc2V0RWxlbWVudFRvU2V0dGluZ3NCbG9jazogc2V0RWxlbWVudFRvU2V0dGluZ3NCbG9jayxcbiAgICAgICAgICAgICBnZXRSZWdpb25SZW5kZXJEYXRhOiBnZXRSZWdpb25SZW5kZXJEYXRhLFxuICAgICAgICAgICAgIGRpc3BsYXlPcmlnaW5hbEVsZW1lbnRzOiBkaXNwbGF5T3JpZ2luYWxFbGVtZW50cyxcbiAgICAgICAgICAgICBnZXRSb290Um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NldHRpbmdzXHJcbk51bWJlciBvZiBDb2x1bW5zOiAyXHJcbkxhcmdlc3QgQ29sdW1uOiBzdGFuZGFyZFxyXG5cXGBcXGBcXGBcclxuXHJcbj09PSBlbmQtY29sdW1uID09PVxyXG5cclxuPT09IG11bHRpLWNvbHVtbi1lbmRcclxuXHJcbiR7ZWRpdG9yLmdldERvYygpLmdldFNlbGVjdGlvbigpfWBcclxuICAgICAgICAgICAgICAgICAgICApO1xyXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIG5ldyBOb3RpY2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiRW5jb3VudGVyZWQgYW4gZXJyb3IgaW5zZXJ0aW5nIGEgbXVsdGktY29sdW1uIHJlZ2lvbi4gUGxlYXNlIHRyeSBhZ2FpbiBsYXRlci5cIlxyXG4gICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRDb21tYW5kKHsgICAgICAgICAgICBcclxuICAgICAgICAgICAgaWQ6IGBhZGQtSURzLVRvLW11bHRpLWNvbHVtbi1yZWdpb25gLFxyXG4gICAgICAgICAgICBuYW1lOiBgRml4IE1pc3NpbmcgSURzIGZvciBNdWx0aS1Db2x1bW4gUmVnaW9uc2AsXHJcbiAgICAgICAgICAgIGVkaXRvckNhbGxiYWNrOiAoZWRpdG9yLCB2aWV3KSA9PiB7XHJcblxyXG4gICAgICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICAgICAgICAgKiBOb3Qgc3VyZSBpZiB0aGVyZSBpcyBhbiBlYXNpZXIgd2F5IHRvIGRvIHRoaXMuXHJcbiAgICAgICAgICAgICAgICAgICAgICogXHJcbiAgICAgICAgICAgICAgICAgICAgICogR2V0IGFsbCBvZiB0aGUgbGluZXMgb2YgdGhlIGRvY3VtZW50IHNwbGl0IGJ5IG5ld2xpbmVzLlxyXG4gICAgICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaW5lcyA9IGVkaXRvci5nZXRSYW5nZSh7IGxpbmU6IDAsIGNoOiAwIH0sIHsgbGluZTogZWRpdG9yLmdldERvYygpLmxpbmVDb3VudCgpLCBjaDogMH0pLnNwbGl0KFwiXFxuXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICAgICAgICAgKiBMb29wIHRocm91Z2ggYWxsIG9mIHRoZSBsaW5lcyBjaGVja2luZyBpZiB0aGUgbGluZSBpcyBhIFxyXG4gICAgICAgICAgICAgICAgICAgICAqIHN0YXJ0IHRhZyBhbmQgaWYgc28gaXMgaXQgbWlzc2luZyBhbiBJRC5cclxuICAgICAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgICAgICBsZXQgbGluZXNXaXRob3V0SURzID0gW11cclxuICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dFdpdGhvdXRJRHMgPSBbXVxyXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBsaW5lcy5sZW5ndGg7IGkrKykge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBtdWx0aUNvbHVtblBhcnNlci5pc1N0YXJ0VGFnV2l0aElEKGxpbmVzW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5pc1N0YXJ0VGFnID09PSB0cnVlICYmIGRhdGEuaGFzS2V5ID09PSBmYWxzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZXNXaXRob3V0SURzLnB1c2goaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0V2l0aG91dElEcy5wdXNoKGxpbmVzW2ldKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmKGxpbmVzV2l0aG91dElEcy5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZSAoXCJGb3VuZCAwIG1pc3NpbmcgSURzIGluIHRoZSBjdXJyZW50IGRvY3VtZW50LlwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAgICAgICAgICogTm93IGxvb3AgdGhyb3VnaCBlYWNoIGxpbmUgdGhhdCBpcyBtaXNzaW5nIGFuIElEIGFuZFxyXG4gICAgICAgICAgICAgICAgICAgICAqIGdlbmVyYXRlIGEgcmFuZG9tIElEIGFuZCByZXBsYWNlIHRoZSBvcmlnaW5hbCB0ZXh0LlxyXG4gICAgICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBsaW5lc1dpdGhvdXRJRHMubGVuZ3RoOyBpKyspIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvcmlnaW5hbFRleHQgPSB0ZXh0V2l0aG91dElEc1tpXVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dCA9IG9yaWdpbmFsVGV4dDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IHRleHQudHJpbUVuZCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZih0ZXh0LmNoYXJBdCh0ZXh0Lmxlbmd0aCAtIDEpID09PSBcIjpcIikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IHRleHQuc2xpY2UoMCwgdGV4dC5sZW5ndGgtMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IGAke3RleHR9OiBJRF8ke2dldFVJRCg0KX1gO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnJlcGxhY2VSYW5nZSh0ZXh0LCB7IGxpbmU6IGxpbmVzV2l0aG91dElEc1tpXSwgY2g6IDAgfSwgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBsaW5lOiBsaW5lc1dpdGhvdXRJRHNbaV0sIGNoOiBvcmlnaW5hbFRleHQubGVuZ3RofSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIG5ldyBOb3RpY2UgKGBSZXBsYWNlZCAke2xpbmVzV2l0aG91dElEcy5sZW5ndGh9IG1pc3NpbmcgSUQocykgaW4gdGhlIGN1cnJlbnQgZG9jdW1lbnQuYCk7XHJcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgXCJFbmNvdW50ZXJlZCBhbiBlcnJvciBhZGRpZ24gSURzIHRvIG11bHRpLWNvbHVtbiByZWdpb25zLiBQbGVhc2UgdHJ5IGFnYWluIGxhdGVyLlwiXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLnJlZ2lzdGVySW50ZXJ2YWwod2luZG93LnNldEludGVydmFsKCgpID0+IHtcclxuICAgICAgICAgICAgXHJcbiAgICAgICAgICAgIHRoaXMuVXBkYXRlT3BlbkZpbGVQcmV2aWV3cygpO1xyXG4gICAgICAgIH0sIDIwMDApKTtcclxuICAgIH1cclxuXHJcbiAgICBVcGRhdGVPcGVuRmlsZVByZXZpZXdzKCkge1xyXG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UgY2FuIGp1c3QgcmV0dXJuIGFuZFxyXG4gICAgICAgICAgICAvLyBpZ25vcmUgdGhlIHJlc3Qgb2YgdGhlIHBhcnNpbmcuXHJcbiAgICAgICAgICAgIGxldCBpbmZvID0gY3R4LmdldFNlY3Rpb25JbmZvKGVsKTtcclxuXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBXZSBuZWVkIHRoZSBjb250ZXh0IGluZm8gdG8gcHJvcGVybHkgcGFyc2Ugc28gcmV0dXJuaW5nIGhlcmUgXHJcbiAgICAgICAgICAgICAqIGluZm8gaXMgbnVsbC4gVE9ETzogU2V0IGVycm9yIGluIHZpZXcgaWYgdGhpcyBvY2N1cnMuXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBpZighaW5mbykge1xyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgY29uc3Qgc291cmNlUGF0aCA9IGN0eC5zb3VyY2VQYXRoO1xyXG5cclxuICAgICAgICAgICAgbGV0IGZpbGVET01NYW5hZ2VyID0gdGhpcy5nbG9iYWxNYW5hZ2VyLmdldEZpbGVNYW5hZ2VyKHNvdXJjZVBhdGgpO1xyXG4gICAgICAgICAgICBpZihmaWxlRE9NTWFuYWdlciA9PT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJGb3VuZCBudWxsIERPTSBtYW5hZ2VyLiBDb3VsZCBub3QgcHJvY2VzcyBtdWx0aS1jb2x1bW4gbWFya2Rvd24uXCIpXHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBJZiB3ZSBlbmNvdW50ZXIgYSBzdGFydCB0YWcgb24gdGhlIGRvY3VtZW50IHdlIHNldCB0aGUgZmxhZyB0byBzdGFydFxyXG4gICAgICAgICAgICAgKiBwYXJzaW5nIHRoZSByZXN0IG9mIHRoZSBkb2N1bWVudC5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGlmKG11bHRpQ29sdW1uUGFyc2VyLmNvbnRhaW5zU3RhcnRUYWcoZWwudGV4dENvbnRlbnQpKSB7XHJcbiAgICAgICAgICAgICAgICBmaWxlRE9NTWFuYWdlci5zZXRIYXNTdGFydFRhZygpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvKiogXHJcbiAgICAgICAgICAgICAqIElmIHRoZSBkb2N1bWVudCBkb2VzIG5vdCBjb250YWluIGFueSBzdGFydCB0YWdzIHdlIGlnbm9yZSB0aGVcclxuICAgICAgICAgICAgICogcmVzdCBvZiB0aGUgcGFyc2luZy4gVGhpcyBpcyBvbmx5IHNldCB0byB0cnVlIG9uY2UgdGhlIGZpcnN0XHJcbiAgICAgICAgICAgICAqIHN0YXJ0IHRhZyBlbGVtZW50IGlzIHBhcnNlZCBhYm92ZS5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGlmKGZpbGVET01NYW5hZ2VyLmdldEhhc1N0YXJ0VGFnKCkgPT09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBUYWtlIHRoZSBpbmZvIHByb3ZpZGVkIGFuZCBnZW5lcmF0ZSB0aGUgcmVxdWlyZWQgdmFyaWFibGVzIGZyb20gXHJcbiAgICAgICAgICAgICAqIHRoZSBsaW5lIHN0YXJ0IGFuZCBlbmQgdmFsdWVzLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgbGV0IGRvY0xpbmVzID0gaW5mby50ZXh0LnNwbGl0KFwiXFxuXCIpO1xyXG4gICAgICAgICAgICBsZXQgbGluZXNBYm92ZUFycmF5ID0gZG9jTGluZXMuc2xpY2UoMCwgaW5mby5saW5lU3RhcnQpXHJcbiAgICAgICAgICAgIGxldCBsaW5lc09mRWxlbWVudCA9IGRvY0xpbmVzLnNsaWNlKGluZm8ubGluZVN0YXJ0LCBpbmZvLmxpbmVFbmQgKyAxKTtcclxuICAgICAgICAgICAgbGV0IGxpbmVzQmVsb3dBcnJheSA9IGRvY0xpbmVzLnNsaWNlKGluZm8ubGluZUVuZCArIDEpXHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogSWYgdGhlIGN1cnJlbnQgbGluZSBpcyBhIHN0YXJ0IHRhZyB3ZSB3YW50IHRvIHNldCB1cCB0aGVcclxuICAgICAgICAgICAgICogcmVnaW9uIG1hbmFnZXIuIFRoZSByZWdpb25hbCBtYW5hZ2VyIHRha2VzIGNhcmVcclxuICAgICAgICAgICAgICogb2YgYWxsIGl0ZW1zIGJldHdlZW4gaXQncyBzdGFydCBhbmQgZW5kIHRhZ3Mgd2hpbGUgdGhlXHJcbiAgICAgICAgICAgICAqIGZpbGUgbWFuYWdlciB3ZSBnb3QgYWJvdmUgYWJvdmUgdGFrZXMgY2FyZSBvZiBhbGwgcmVnaW9uYWwgXHJcbiAgICAgICAgICAgICAqIG1hbmFnZXJzIGluIGVhY2ggZmlsZS5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGxldCBlbGVtZW50VGV4dFNwYWNlZCA9IGxpbmVzT2ZFbGVtZW50LnJlZHVjZSgocHJldiwgY3VycikgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHByZXYgKyBcIlxcblwiICsgY3VycjtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGlmKG11bHRpQ29sdW1uUGFyc2VyLmNvbnRhaW5zU3RhcnRUYWcoZWwudGV4dENvbnRlbnQpKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgLyoqIFxyXG4gICAgICAgICAgICAgICAgICogU2V0IHVwIHRoZSBjdXJyZW50IGVsZW1lbnQgdG8gYWN0IGFzIHRoZSBwYXJlbnQgZm9yIHRoZSBcclxuICAgICAgICAgICAgICAgICAqIG11bHRpLWNvbHVtbiByZWdpb24uXHJcbiAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgIGVsLmNoaWxkcmVuWzBdLmRldGFjaCgpO1xyXG4gICAgICAgICAgICAgICAgZWwuY2xhc3NMaXN0LmFkZChNdWx0aUNvbHVtbkxheW91dENTUy5SZWdpb25Sb290Q29udGFpbmVyRGl2KVxyXG4gICAgICAgICAgICAgICAgbGV0IHJlbmRlckVycm9yUmVnaW9uID0gZWwuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvbkVycm9yQ29udGFpbmVyRGl2fSwgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLlJlZ2lvbkVycm9yTWVzc2FnZX1gLFxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgcmVuZGVyQ29sdW1uUmVnaW9uID0gZWwuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICBjbHM6IE11bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvbkNvbnRlbnRDb250YWluZXJEaXZcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHN0YXJ0QmxvY2tEYXRhID0gbXVsdGlDb2x1bW5QYXJzZXIuZ2V0U3RhcnRCbG9ja0Fib3ZlTGluZShsaW5lc09mRWxlbWVudClcclxuICAgICAgICAgICAgICAgIGxldCByZWdpb25LZXkgPSBzdGFydEJsb2NrRGF0YS5zdGFydEJsb2NrS2V5O1xyXG4gICAgICAgICAgICAgICAgaWYoZmlsZURPTU1hbmFnZXIuY2hlY2tLZXlFeGlzdHMocmVnaW9uS2V5KSA9PT0gdHJ1ZSkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgeyBudW1iZXJPZlRhZ3MsIGtleXMgfSA9IG11bHRpQ29sdW1uUGFyc2VyLmNvdW50U3RhcnRUYWdzKGluZm8udGV4dCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBudW1NYXRjaGVzID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgbnVtYmVyT2ZUYWdzOyBpKyspIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJlY2F1c2Ugd2UgY2hlY2tlZCBpZiBrZXkgZXhpc3RzIG9uZSBvZiB0aGVzZSBoYXMgdG8gbWF0Y2guXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGtleXNbaV0gPT09IHJlZ2lvbktleSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtTWF0Y2hlcysrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBXZSBvbmx5IHdhbnQgdG8gZGlzcGxheSBhbiBlcnJvciBpZiB0aGVyZSBhcmUgbW9yZSB0aGFuIDIgb2YgdGhlIHNhbWUgaWQgYWNyb3NzXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gdGhlIHdob2xlIGRvY3VtZW50LiBUaGlzIHByZXZlbnRzIGVycm9zIHdoZW4gb2JzaWRpYW4gcmVsb2FkcyB0aGUgd2hvbGUgZG9jdW1lbnRcclxuICAgICAgICAgICAgICAgICAgICAvLyBhbmQgdGhlcmUgYXJlIHR3byBvZiB0aGUgc2FtZSBrZXkgaW4gdGhlIG1hcC5cclxuICAgICAgICAgICAgICAgICAgICBpZihudW1NYXRjaGVzID49IDIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVnaW9uS2V5ID09PSBcIlwiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJFcnJvclJlZ2lvbi5pbm5lclRleHQgPSBcIkZvdW5kI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ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBpZihmaWxlRE9NTWFuYWdlcikge1xyXG4gICAgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVET01NYW5hZ2VyLnJlbW92ZVJlZ2lvbihzdGFydEJsb2NrRGF0YS5zdGFydEJsb2NrS2V5KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgY3R4LmFkZENoaWxkKGVsZW1lbnRNYXJrZG93blJlbmRlcmVyKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICAgICAqIE5vdyB3ZSBoYXZlIGNyZWF0ZWQgb3VyIHJlZ2lvbmFsIG1hbmFnZXIgYW5kIGRlZmluZWQgd2hhdCBlbGVtZW50cyBcclxuICAgICAgICAgICAgICAgICAqIG5lZWQgdG8gYmUgcmVuZGVyZWQgaW50by4gU28gd2UgY2FuIHJldHVybiB3aXRob3V0IGFueSBtb3JlIHByb2Nlc3NpbmcuXHJcbiAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgIHJldHVyblxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogQ2hlY2sgaWYgYW55IG9mIHRoZSBsaW5lcyBhYm92ZSB1cyBjb250YWluIGEgc3RhcnQgYmxvY2ssIGFuZCBpZlxyXG4gICAgICAgICAgICAgKiBzbyBnZXQgdGhlIGxpbmVzIGZyb20gb3VyIGN1cnJlbnQgZWxlbWVudCB0byB0aGUgc3RhcnQgYmxvY2suXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBsZXQgc3RhcnRCb2NrQWJvdmUgPSBtdWx0aUNvbHVtblBhcnNlci5nZXRTdGFydEJsb2NrQWJvdmVMaW5lKGxpbmVzQWJvdmVBcnJheSk7XHJcbiAgICAgICAgICAgIGlmKHN0YXJ0Qm9ja0Fib3ZlID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIFdlIG5vdyBrbm93IHdlJ3JlIHdpdGhpbiBhIG11bHRpLWNvbHVtbiByZWdpb24sIHNvIHdlIHVwZGF0ZSBvdXJcclxuICAgICAgICAgICAgICogbGlzdCBvZiBsaW5lcyBhYm92ZSB0byBqdXN0IGJlIHRoZSBpdGVtcyB3aXRoaW4gdGhpcyByZWdpb24uXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBsaW5lc0Fib3ZlQXJyYXkgPSBzdGFydEJvY2tBYm92ZS5saW5lc0Fib3ZlQXJyYXk7XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogV2UgdXNlIHRoZSBzdGFydCBibG9jaydzIGtleSB0byBnZXQgb3VyIHJlZ2lvbmFsIG1hbmFnZXIuIElmIHRoaXNcclxuICAgICAgICAgICAgICogbG9va3VwIGZhaWxzIHdlIGNhbiBub3QgY29udGludWUgcHJvY2Vzc2luZyB0aGlzIGVsZW1lbnQuXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBsZXQgcmVnaW9uYWxNYW5hZ2VyOiBSZWdpb25ET01NYW5hZ2VyID0gZmlsZURPTU1hbmFnZXIuZ2V0UmVnaW9uYWxNYW5hZ2VyKHN0YXJ0Qm9ja0Fib3ZlLnN0YXJ0QmxvY2tLZXkpO1xyXG4gICAgICAgICAgICBpZihyZWdpb25hbE1hbmFnZXIgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVyblxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogVG8gbWFrZSBzdXJlIHdlJ3JlIHBsYWNpbmcgdGhlIGl0ZW0gaW4gdGhlIHJpZ2h0IGxvY2F0aW9uIChhbmQgXHJcbiAgICAgICAgICAgICAq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xuICAgICAgICAgICAgICAgICAgICBsZXQgcmVnaW9uUmVuZGVyRGF0YTogTXVsdGlDb2x1bW5SZW5kZXJEYXRhID0gcmVnaW9uYWxNYW5hZ2VyLmdldFJlZ2lvblJlbmRlckRhdGEoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uYWxNYW5hZ2VyLnJlbW92ZU9iamVjdChjdXJyZW50T2JqZWN0LlVJRCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgICAgICAgICAqIE5lZWQgdG8gY2hlY2sgaGVyZSBpZiBlbGVtZW50IGlzIG51bGwgYXMgdGhpcyBjbG9zdXJlIHdpbGwgYmUgY2FsbGVkXHJcbiAgICAgICAgICAgICAgICAgICAgICogcmVwZWF0ZWRseSBvbiBmaWxlIGNoYW5nZS5cclxuICAgICAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgICAgICBpZihyZWdpb25SZW5kZXJEYXRhLnBhcmVudFJlbmRlckVsZW1lbnQgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlckNvbHVtbk1hcmtkb3duKHJlZ2lvblJlbmRlckRhdGEucGFyZW50UmVuZGVyRWxlbWVudCwgcmVnaW9uUmVuZGVyRGF0YS5kb21PYmplY3RzLCByZWdpb25SZW5kZXJEYXRhLnBhcmVudFJlbmRlclNldHRpbmdzKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgY3R4LmFkZENoaWxkKGVsZW1lbnRNYXJrZG93blJlbmRlcmVyKTtcclxuXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBOb3cgd2UgY2hlY2sgaWYgb3VyIGN1cnJlbnQgZWxlbWVudCBpcyBhIHNwZWNpYWwgZmx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ByZWFsbHkgb25seSBuZWVkIHRvIGxvb3Agb25jZSBmb3IgaSA9IDAgYnV0IGxvb3AganVzdFxyXG4gICAgICAgIC8vIGluIGNhc2UuXHJcbiAgICAgICAgZm9yKGxldCBpID0gcGFyZW50RWxlbWVudC5jaGlsZHJlbi5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xyXG4gICAgICAgICAgICBwYXJlbnRFbGVtZW50LmNoaWxkcmVuW2ldLmRldGFjaCgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwYXJlbnRFbGVtZW50LmFwcGVuZENoaWxkKG1hcmtkb3duUmVuZGVyQ2hpbGQuY29udGFpbmVyRWwpO1xyXG5cclxuICAgICAgICBsZXQgY29sdW1uSW5kZXggPSAwO1xyXG4gICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCByZWdpb25FbGVtZW50cy5sZW5ndGg7IGkrKykge1xyXG5cclxuICAgICAgICAgICAgaWYgKHJlZ2lvbkVsZW1lbnRzW2ldLnRhZyAhPT0gRE9NT2JqZWN0VGFnLnN0YXJ0UmVnaW9uICAgIHx8XHJcbiAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS50YWcgIT09IERPTU9iamVjdFRhZy5yZWdpb25TZXR0aW5ncyB8fFxyXG4gICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0udGFnICE9PSBET01PYmplY3RUYWcuZW5kUmVnaW9uICAgICAgfHxcclxuICAgICAgICAgICAgICAgIHJlZ2lvbkVsZW1lbnRzW2ldLnRhZyAhPT0gRE9NT2JqZWN0VGFnLmNvbHVtbkJyZWFrICkge1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIFdlIHN0b3JlIHRoZSBlbGVtZW50cyBpbiBhIHdyYXBwZXIgY29udGFpbmVyIHVudGlsIHdlIGRldGVybWluZVxyXG4gICAgICAgICAgICAgICAgbGV0IGVsZW1lbnQgPSBjcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogTXVsdGlDb2x1bW5MYXlvdXRDU1MuQ29sdW1uRHVhbEVsZW1lbnRDb250YWluZXIsXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHJlZ2lvbkVsZW1lbnRzW2ldLmVsZW1lbnRDb250YWluZXIgPSBlbGVtZW50O1xyXG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlIHdlIGp1c3QgbWFrZSBhIGNvcHkgb2YgdGhlIG9yaWdpbmFsIGVsZW1lbnQgdG8gZGlzcGxheS5cclxuICAgICAgICAgICAgICAgIGVsZW1lbnQuYXBwZW5kQ2hpbGQocmVnaW9uRWxlbWVudHNbaV0uZWxlbWVudC5jbG9uZU5vZGUodHJ1ZSkgYXMgSFRNTERpdkVsZW1lbnQpO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmKGVsZW1lbnQgIT09IG51bGwpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnNbY29sdW1uSW5kZXhdLmFwcGVuZENoaWxkKGVsZW1lbnQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgICAgICogSWYgdGhlIHRhZyBpcyBhIGNvbHVtbiBicmVhayB3ZSB1cGRhdGUgdGhlIGNvbHVtbiBpbmRleCBhZnRlclxyXG4gICAgICAgICAgICAgICAgICogYXBwZW5kaW5nIHRoZSBpdGVtIHRvIHRoZSBjb2x1bW4gZGl2LiBUaGlzIGtlZXBzIHRoZSBtYWluIERPTVxyXG4gICAgICAgICAgICAgICAgICogY2xlYW5lciBieSByZW1vdmluZyBvdGhlciBpdGVtcyBhbmQgcGxhY2luZyB0aGVtIGFsbCB3aXRoaW5cclxuICAgICAgICAgICAgICAgICAqIGEgcmVnaW9uIGNvbnRhaW5lci5cclxuICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgaWYocmVnaW9uRWxlbWVudHNbaV0udGFn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hzZXR0aW5nczogTXVsdGlDb2x1bW5TZXR0aW5ncywgbXVsdGlDb2x1bW5QYXJlbnQ6IEhUTUxEaXZFbGVtZW50KTogSFRNTERpdkVsZW1lbnRbXSB7XHJcblxyXG4gICAgbGV0IGNvbHVtbkNvbnRlbnREaXZzOiBIVE1MRGl2RWxlbWVudFtdID0gW11cclxuICAgIGlmKHNldHRpbmdzLm51bWJlck9mQ29sdW1ucyA9PT0gMikge1xyXG5cclxuICAgICAgICBzd2l0Y2goc2V0dGluZ3MuY29sdW1uTGF5b3V0KSB7XHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LnN0YW5kYXJkKTpcclxuICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQubWlkZGxlKTpcclxuICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuY2VudGVyKTpcclxuICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQudGhpcmQpOlxyXG4gICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYGNvbHVtbkNvbnRlbnQgdHdvRXF1YWxDb2x1bW5zX0xlZnRgXHJcbiAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgY29sdW1uQ29udGVudCB0d29FcXVhbENvbHVtbnNfUmlnaHRgXHJcbiAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmxlZnQpOlxyXG4gICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5maXJzdCk6XHJcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgY29sdW1uQ29udGVudCB0d29Db2x1bW5zSGVhdnlMZWZ0X0xlZnRgXHJcbiAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgY29sdW1uQ29udGVudCB0d29Db2x1bW5zSGVhdnlMZWZ0X1JpZ2h0YFxyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcblxyXG4gICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5yaWdodCk6XHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LnNlY29uZCk6XHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0Lmxhc3QpOlxyXG4gICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYGNvbHVtbkNvbnRlbnQgdHdvQ29sdW1uc0hlYXZ5UmlnaHRfTGVmdGBcclxuICAgICAgICAgICAgICAgIH0pKTtcclxuICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICBjbHM6IGBjb2x1bW5Db250ZW50IHR3b0NvbHVtbnNIZWF2eVJpZ2h0X1JpZ2h0YFxyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgZWxzZSBpZihzZXR0aW5ncy5udW1iZXJPZkNvbHVtbnMgPT09IDMpIHtcclxuXHJcbiAgICAgICAgc3dpdGNoKHNldHRpbmdzLmNvbHVtbkxheW91dCkge1xyXG4gICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5zdGFuZGFyZCk6XHJcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgY29sdW1uQ29udGVudCB0aHJlZUVxdWFsQ29sdW1uc19MZWZ0YFxyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYGNvbHVtbkNvbnRlbnQgdGhyZWVFcXVhbENvbHVtbnNfTWlkZGxlYFxyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYGNvbHVtbkNvbnRlbnQgdGhyZWVFcXVhbENvbHVtbnNfUmlnaHRgXHJcbiAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmxlZnQpOlxyXG4gICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5maXJzdCk6XHJcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgY29sdW1uQ29udGVudCB0aHJlQ29sdW1uc0hlYXZ5TGVmdF9MZWZ0YFxyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYGNvbHVtbkNvbnRlbnQgdGhyZUNvbHVtbnNIZWF2eUxlZnRfTWlkZGxlYFxyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYGNvbHVtbkNvbnRlbnQgdGhyZUNvbHVtbnNIZWF2eUxlZnRfUmlnaHRgXHJcbiAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0Lm1pZGRsZSk6XHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmNlbnRlcik6XHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LnNlY29uZCk6XHJcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgY29sdW1uQ29udGVudCB0aHJlQ29sdW1uc0hlYXZ5TWlkZGxlX0xlZnRgXHJcbiAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgY29sdW1uQ29udGVudCB0aHJlQ29sdW1uc0hlYXZ5TWlkZGxlX01pZGRsZWBcclxuICAgICAgICAgICAgICAgIH0pKTtcclxuICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICBjbHM6IGBjb2x1bW5Db250ZW50IHRocmVDb2x1bW5zSGVhdnlNaWRkbGVfUmlnaHRgXHJcbiAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LnJpZ2h0KTpcclxuICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQudGhpcmQpOlxyXG4gICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5sYXN0KTpcclxuICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICBjbHM6IGBjb2x1bW5Db250ZW50IHRocmVDb2x1bW5zSGVhdnlSaWdodF9MZWZ0YFxyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYGNvbHVtbkNvbnRlbnQgdGhyZUNvbHVtbnNIZWF2eVJpZ2h0X01pZGRsZWBcclxuICAgICAgICAgICAgICAgIH0pKTtcclxuICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICBjbHM6IGBjb2x1bW5Db250ZW50IHRocmVDb2x1bW5zSGVhdnlSaWdodF9SaWdodGBcclxuICAgICAgICAgICAgICAgIH0pKTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgIH1ccl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BWSxDQUFDLElBQUk7Z0JBQ2xCLGlCQUFpQixDQUFDLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxTQUFTLENBQUM7b0JBQy9DLEdBQUcsRUFBRSwwQ0FBMEM7aUJBQ2xELENBQUMsQ0FBQyxDQUFDO2dCQUNKLGlCQUFpQixDQUFDLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxTQUFTLENBQUM7b0JBQy9DLEdBQUcsRUFBRSw0Q0FBNEM7aUJBQ3BELENBQUMsQ0FBQyxDQUFDO2dCQUNKLGlCQUFpQixDQUFDLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxTQUFTLENBQUM7b0JBQy9DLEdBQUcsRUFBRSwyQ0FBMkM7aUJBQ25ELENBQUMsQ0FBQyxDQUFDO2dCQUNKLE1BQU07U0FDYjtLQUNKO0lBRUQsT0FBTyxpQkFBaUIsQ0FBQztBQUM3QixDQUFDO0FBT0QsU0FBUyx1QkFBdUIsQ0FBQyxPQUFpQixFQUFFLFVBQWtCOzs7Ozs7OztJQVNsRSxJQUFJLFFBQVEsR0FBRyxTQUFTLEVBQUUsQ0FBQztJQUMzQixJQUFJLG1CQUFtQixHQUFHLElBQUlBLDRCQUFtQixDQUM3QyxRQUFRLENBQ1gsQ0FBQztJQUNGSyx5QkFBZ0IsQ0FBQyxjQUFjLENBQzNCLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQyxJQUFJLEVBQUUsT0FBTztRQUN6QixPQUFPLElBQUksR0FBRyxJQUFJLEdBQUksT0FBTyxDQUFDO0tBQ2pDLEVBQUUsRUFBRSxDQUFDLEVBQ04sUUFBUSxFQUNSLFVBQVUsRUFDVixtQkFBbUIsQ0FDdEIsQ0FBQztJQUVGLE9BQU8sUUFBUSxDQUFDO0FBQ3BCOzs7OyJ9 diff --git a/.obsidian/plugins/multi-column-markdown/manifest.json b/.obsidian/plugins/multi-column-markdown/manifest.json deleted file mode 100644 index f53a5980..00000000 --- a/.obsidian/plugins/multi-column-markdown/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "multi-column-markdown", - "name": "Multi-Column Markdown", - "version": "0.4.3", - "minAppVersion": "0.13.23", - "description": "This plugin adds functionality to create markdown documents with multiple columns of content viewable within Obsidian's preview mode", - "author": "Cameron Robinson", - "authorUrl": "https://portfolio.ckrobinson.net", - "isDesktopOnly": false -} diff --git a/.obsidian/plugins/multi-column-markdown/styles.css b/.obsidian/plugins/multi-column-markdown/styles.css deleted file mode 100644 index 8c370cda..00000000 --- a/.obsidian/plugins/multi-column-markdown/styles.css +++ /dev/null @@ -1,134 +0,0 @@ -.twoEqualColumns_Left { - width: 49.75%; - margin-right: 0.25%; -} - -.twoEqualColumns_Right { - width: 49.75%; - margin-left: 0.25%; -} - -.twoColumnsHeavyLeft_Left { - width: 66.75%; - margin-right: 0.25%; -} -.twoColumnsHeavyLeft_Right { - width: 32.75%; - margin-left: 0.25%; -} - -.twoColumnsHeavyRight_Left { - width: 32.75%; - margin-right: 0.25%; -} -.twoColumnsHeavyRight_Right { - width: 66.75%; - margin-left: 0.25%; -} - -.threeEqualColumns_Left { - width: 32.75%; - margin-right: 0.25%; -} -.threeEqualColumns_Middle { - width: 32.5%; - margin-inline: 0.25%; -} -.threeEqualColumns_Right { - width: 33.75%; - margin-left: 0.25%; -} - -.threColumnsHeavyLeft_Left { - width: 49.75%; - margin-right: 0.25%; -} -.threColumnsHeavyLeft_Middle { - width: 24.5%; - margin-inline: 0.25%; -} -.threColumnsHeavyLeft_Right { - width: 24.75%; - margin-left: 0.25%; -} - -.threColumnsHeavyMiddle_Left { - width: 24.75%; - margin-right: 0.25%; -} -.threColumnsHeavyMiddle_Middle { - width: 49.5%; - margin-inline: 0.25%; -} -.threColumnsHeavyMiddle_Right { - width: 24.75%; - margin-left: 0.25%; -} - -.threColumnsHeavyRight_Left { - width: 24.75%; - margin-right: 0.25%; -} -.threColumnsHeavyRight_Middle { - width: 24.5%; - margin-inline: 0.25%; -} -.threColumnsHeavyRight_Right { - width: 49.75%; - margin-left: 0.25%; -} - -.columnContent { - padding-inline: 10px; -} - -.columnBorder { - border: grey; - border-style: solid; - border-width: 0.5px; -} - -.columnShadow { - box-shadow: 0 0.2rem 0.5rem var(--background-modifier-box-shadow); -} - -.multiColumnErrorMessage { - margin-bottom: 10px; - color: #dc3545; - text-align: center; -} - -.multiColumnContainer { - margin: 1.5625em 0; -} - -.multiColumnParent { - padding: 0; - overflow: hidden; - color: var(--text-normal); - page-break-inside: avoid; - - border-radius: 0.1rem; - - display:flex; - flex-direction:row; -} - -.multiColumnParentShadow { - box-shadow: 0 0.2rem 0.5rem var(--background-modifier-box-shadow); -} - -.multiColumnRegionEndTag, -.multiColumnBreak, -.multiColumnSettings, -.multiColumnContent { - display: none; -} - -.columnContent .multiColumnContent { - display: block; -} - -.MultiColumn_OriginalElement + .MultiColumn_ClonedElement { - display: none; -} \ No newline at end of file diff --git a/.obsidian/plugins/notion-like-tables/main.js b/.obsidian/plugins/notion-like-tables/main.js new file mode 100644 index 00000000..003a8723 --- /dev/null +++ b/.obsidian/plugins/notion-like-tables/main.js @@ -0,0 +1,51010 @@ +/* +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 __defProps = Object.defineProperties; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== "default") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; +var __async = (__this, __arguments, generator) => { + return new Promise((resolve, reject) => { + var fulfilled = (value) => { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + }; + var rejected = (value) => { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + }; + var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); + step((generator = generator.apply(__this, __arguments)).next()); + }); +}; + +// node_modules/object-assign/index.js +var require_object_assign = __commonJS({ + "node_modules/object-assign/index.js"(exports, module2) { + "use strict"; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === void 0) { + throw new TypeError("Object.assign cannot be called with null or undefined"); + } + return Object(val); + } + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + var test1 = new String("abc"); + test1[5] = "de"; + if (Object.getOwnPropertyNames(test1)[0] === "5") { + return false; + } + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2["_" + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if (order2.join("") !== "0123456789") { + return false; + } + var test3 = {}; + "abcdefghijklmnopqrst".split("").forEach(function(letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") { + return false; + } + return true; + } catch (err) { + return false; + } + } + module2.exports = shouldUseNative() ? Object.assign : function(target, source) { + var from; + var to = toObject(target); + var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + return to; + }; + } +}); + +// node_modules/react/cjs/react.development.js +var require_react_development = __commonJS({ + "node_modules/react/cjs/react.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var _assign = require_object_assign(); + var ReactVersion = "17.0.2"; + var REACT_ELEMENT_TYPE = 60103; + var REACT_PORTAL_TYPE = 60106; + exports.Fragment = 60107; + exports.StrictMode = 60108; + exports.Profiler = 60114; + var REACT_PROVIDER_TYPE = 60109; + var REACT_CONTEXT_TYPE = 60110; + var REACT_FORWARD_REF_TYPE = 60112; + exports.Suspense = 60113; + var REACT_SUSPENSE_LIST_TYPE = 60120; + var REACT_MEMO_TYPE = 60115; + var REACT_LAZY_TYPE = 60116; + var REACT_BLOCK_TYPE = 60121; + var REACT_SERVER_BLOCK_TYPE = 60122; + var REACT_FUNDAMENTAL_TYPE = 60117; + var REACT_SCOPE_TYPE = 60119; + var REACT_OPAQUE_ID_TYPE = 60128; + var REACT_DEBUG_TRACING_MODE_TYPE = 60129; + var REACT_OFFSCREEN_TYPE = 60130; + var REACT_LEGACY_HIDDEN_TYPE = 60131; + if (typeof Symbol === "function" && Symbol.for) { + var symbolFor = Symbol.for; + REACT_ELEMENT_TYPE = symbolFor("react.element"); + REACT_PORTAL_TYPE = symbolFor("react.portal"); + exports.Fragment = symbolFor("react.fragment"); + exports.StrictMode = symbolFor("react.strict_mode"); + exports.Profiler = symbolFor("react.profiler"); + REACT_PROVIDER_TYPE = symbolFor("react.provider"); + REACT_CONTEXT_TYPE = symbolFor("react.context"); + REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); + exports.Suspense = symbolFor("react.suspense"); + REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); + REACT_MEMO_TYPE = symbolFor("react.memo"); + REACT_LAZY_TYPE = symbolFor("react.lazy"); + REACT_BLOCK_TYPE = symbolFor("react.block"); + REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); + REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); + REACT_SCOPE_TYPE = symbolFor("react.scope"); + REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); + REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); + REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); + REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); + } + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var ReactCurrentDispatcher = { + current: null + }; + var ReactCurrentBatchConfig = { + transition: 0 + }; + var ReactCurrentOwner = { + current: null + }; + var ReactDebugCurrentFrame = {}; + var currentExtraStackFrame = null; + function setExtraStackFrame(stack) { + { + currentExtraStackFrame = stack; + } + } + { + ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { + { + currentExtraStackFrame = stack; + } + }; + ReactDebugCurrentFrame.getCurrentStack = null; + ReactDebugCurrentFrame.getStackAddendum = function() { + var stack = ""; + if (currentExtraStackFrame) { + stack += currentExtraStackFrame; + } + var impl = ReactDebugCurrentFrame.getCurrentStack; + if (impl) { + stack += impl() || ""; + } + return stack; + }; + } + var IsSomeRendererActing = { + current: false + }; + var ReactSharedInternals = { + ReactCurrentDispatcher, + ReactCurrentBatchConfig, + ReactCurrentOwner, + IsSomeRendererActing, + assign: _assign + }; + { + ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; + } + function warn(format) { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + function error(format) { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return "" + item; + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var didWarnStateUpdateForUnmountedComponent = {}; + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; + var warningKey = componentName + "." + callerName; + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + var ReactNoopUpdateQueue = { + isMounted: function(publicInstance) { + return false; + }, + enqueueForceUpdate: function(publicInstance, callback, callerName) { + warnNoop(publicInstance, "forceUpdate"); + }, + enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, "replaceState"); + }, + enqueueSetState: function(publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, "setState"); + } + }; + var emptyObject = {}; + { + Object.freeze(emptyObject); + } + function Component(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + Component.prototype.isReactComponent = {}; + Component.prototype.setState = function(partialState, callback) { + if (!(typeof partialState === "object" || typeof partialState === "function" || partialState == null)) { + { + throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + } + } + this.updater.enqueueSetState(this, partialState, callback, "setState"); + }; + Component.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + { + var deprecatedAPIs = { + isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], + replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] + }; + var defineDeprecationWarning = function(methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function() { + warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); + return void 0; + } + }); + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + function ComponentDummy() { + } + ComponentDummy.prototype = Component.prototype; + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); + pureComponentPrototype.constructor = PureComponent; + _assign(pureComponentPrototype, Component.prototype); + pureComponentPrototype.isPureReactComponent = true; + function createRef() { + var refObject = { + current: null + }; + { + Object.seal(refObject); + } + return refObject; + } + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentName(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case exports.Fragment: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case exports.Profiler: + return "Profiler"; + case exports.StrictMode: + return "StrictMode"; + case exports.Suspense: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_BLOCK_TYPE: + return getComponentName(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentName(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== void 0; + } + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== void 0; + } + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); + } + function warnIfStringRefCannotBeAutoConverted(config) { + { + if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { + var componentName = getComponentName(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); + didWarnAboutStringRefs[componentName] = true; + } + } + } + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + $$typeof: REACT_ELEMENT_TYPE, + type, + key, + ref, + props, + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }; + function createElement(type, config, children) { + var propName; + var props = {}; + var key = null; + var ref = null; + var self2 = null; + var source = null; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + { + warnIfStringRefCannotBeAutoConverted(config); + } + } + if (hasValidKey(config)) { + key = "" + config.key; + } + self2 = config.__self === void 0 ? null : config.__self; + source = config.__source === void 0 ? null : config.__source; + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } + { + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); + } + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + } + function cloneElement(element, config, children) { + if (!!(element === null || element === void 0)) { + { + throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); + } + } + var propName; + var props = _assign({}, element.props); + var key = element.key; + var ref = element.ref; + var self2 = element._self; + var source = element._source; + var owner = element._owner; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = "" + config.key; + } + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === void 0 && defaultProps !== void 0) { + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + return ReactElement(element.type, key, ref, self2, source, owner, props); + } + function isValidElement(object) { + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + var SEPARATOR = "."; + var SUBSEPARATOR = ":"; + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + "=": "=0", + ":": "=2" + }; + var escapedString = key.replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + return "$" + escapedString; + } + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return text.replace(userProvidedKeyEscapeRegex, "$&/"); + } + function getElementKey(element, index) { + if (typeof element === "object" && element !== null && element.key != null) { + return escape("" + element.key); + } + return index.toString(36); + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if (type === "undefined" || type === "boolean") { + children = null; + } + var invokeCallback = false; + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + if (invokeCallback) { + var _child = children; + var mappedChild = callback(_child); + var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; + if (Array.isArray(mappedChild)) { + var escapedChildKey = ""; + if (childKey != null) { + escapedChildKey = escapeUserProvidedKey(childKey) + "/"; + } + mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey); + } + array.push(mappedChild); + } + return 1; + } + var child; + var nextName; + var subtreeCount = 0; + var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getElementKey(child, i); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else { + var iteratorFn = getIteratorFn(children); + if (typeof iteratorFn === "function") { + var iterableChildren = children; + { + if (iteratorFn === iterableChildren.entries) { + if (!didWarnAboutMaps) { + warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); + } + didWarnAboutMaps = true; + } + } + var iterator = iteratorFn.call(iterableChildren); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getElementKey(child, ii++); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else if (type === "object") { + var childrenString = "" + children; + { + { + throw Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); + } + } + } + } + return subtreeCount; + } + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + var count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + function countChildren(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + } + function forEachChildren(children, forEachFunc, forEachContext) { + mapChildren(children, function() { + forEachFunc.apply(this, arguments); + }, forEachContext); + } + function toArray(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + } + function onlyChild(children) { + if (!isValidElement(children)) { + { + throw Error("React.Children.only expected to receive a single React element child."); + } + } + return children; + } + function createContext(defaultValue, calculateChangedBits) { + if (calculateChangedBits === void 0) { + calculateChangedBits = null; + } else { + { + if (calculateChangedBits !== null && typeof calculateChangedBits !== "function") { + error("createContext: Expected the optional second argument to be a function. Instead received: %s", calculateChangedBits); + } + } + } + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + _currentValue: defaultValue, + _currentValue2: defaultValue, + _threadCount: 0, + Provider: null, + Consumer: null + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + var hasWarnedAboutDisplayNameOnConsumer = false; + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits + }; + Object.defineProperties(Consumer, { + Provider: { + get: function() { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Provider; + }, + set: function(_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function() { + return context._currentValue; + }, + set: function(_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function() { + return context._currentValue2; + }, + set: function(_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function() { + return context._threadCount; + }, + set: function(_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function() { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Consumer; + } + }, + displayName: { + get: function() { + return context.displayName; + }, + set: function(displayName) { + if (!hasWarnedAboutDisplayNameOnConsumer) { + warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); + hasWarnedAboutDisplayNameOnConsumer = true; + } + } + } + }); + context.Consumer = Consumer; + } + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + return context; + } + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function lazyInitializer(payload) { + if (payload._status === Uninitialized) { + var ctor = payload._result; + var thenable = ctor(); + var pending = payload; + pending._status = Pending; + pending._result = thenable; + thenable.then(function(moduleObject) { + if (payload._status === Pending) { + var defaultExport = moduleObject.default; + { + if (defaultExport === void 0) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); + } + } + var resolved = payload; + resolved._status = Resolved; + resolved._result = defaultExport; + } + }, function(error2) { + if (payload._status === Pending) { + var rejected = payload; + rejected._status = Rejected; + rejected._result = error2; + } + }); + } + if (payload._status === Resolved) { + return payload._result; + } else { + throw payload._result; + } + } + function lazy(ctor) { + var payload = { + _status: -1, + _result: ctor + }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: payload, + _init: lazyInitializer + }; + { + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function() { + return defaultProps; + }, + set: function(newDefaultProps) { + error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + defaultProps = newDefaultProps; + Object.defineProperty(lazyType, "defaultProps", { + enumerable: true + }); + } + }, + propTypes: { + configurable: true, + get: function() { + return propTypes; + }, + set: function(newPropTypes) { + error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + propTypes = newPropTypes; + Object.defineProperty(lazyType, "propTypes", { + enumerable: true + }); + } + } + }); + } + return lazyType; + } + function forwardRef2(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); + } else if (typeof render !== "function") { + error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render); + } else { + if (render.length !== 0 && render.length !== 2) { + error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); + } + } + if (render != null) { + if (render.defaultProps != null || render.propTypes != null) { + error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); + } + } + } + var elementType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (render.displayName == null) { + render.displayName = name; + } + } + }); + } + return elementType; + } + var enableScopeAPI = false; + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; + } + if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) { + return true; + } + } + return false; + } + function memo(type, compare) { + { + if (!isValidElementType(type)) { + error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); + } + } + var elementType = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: compare === void 0 ? null : compare + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (type.displayName == null) { + type.displayName = name; + } + } + }); + } + return elementType; + } + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + if (!(dispatcher !== null)) { + { + throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); + } + } + return dispatcher; + } + function useContext(Context, unstable_observedBits) { + var dispatcher = resolveDispatcher(); + { + if (unstable_observedBits !== void 0) { + error("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s", unstable_observedBits, typeof unstable_observedBits === "number" && Array.isArray(arguments[2]) ? "\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks" : ""); + } + if (Context._context !== void 0) { + var realContext = Context._context; + if (realContext.Consumer === Context) { + error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); + } else if (realContext.Provider === Context) { + error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); + } + } + } + return dispatcher.useContext(Context, unstable_observedBits); + } + function useState7(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef6(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect6(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, deps); + } + function useLayoutEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, deps); + } + function useCallback4(callback, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, deps); + } + function useMemo(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, deps); + } + function useImperativeHandle(ref, create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, deps); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: _assign({}, props, { + value: prevLog + }), + info: _assign({}, props, { + value: prevInfo + }), + warn: _assign({}, props, { + value: prevWarn + }), + error: _assign({}, props, { + value: prevError + }), + group: _assign({}, props, { + value: prevGroup + }), + groupCollapsed: _assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: _assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher$1.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component2) { + var prototype = Component2.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case exports.Suspense: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_BLOCK_TYPE: + return describeFunctionComponentFrame(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } + } + } + function checkPropTypes(typeSpecs, values, location, componentName, element) { + { + var has = Function.call.bind(Object.prototype.hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); + } + } + } + } + } + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + setExtraStackFrame(stack); + } else { + setExtraStackFrame(null); + } + } + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; + } + function getSourceInfoErrorAddendum(source) { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + } + return ""; + } + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== void 0) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + return ""; + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; + } + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; + } + { + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node, parentType) { + if (typeof node !== "object") { + return; + } + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes; + if (typeof type === "function") { + propTypes = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + var name = getComponentName(type); + checkPropTypes(propTypes, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentName(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + } + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } + } + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (Array.isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentName(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + { + error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + } + var element = createElement.apply(this, arguments); + if (element == null) { + return element; + } + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + if (type === exports.Fragment) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; + } + var didWarnAboutDeprecatedCreateFactory = false; + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; + { + if (!didWarnAboutDeprecatedCreateFactory) { + didWarnAboutDeprecatedCreateFactory = true; + warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); + } + Object.defineProperty(validatedFactory, "type", { + enumerable: false, + get: function() { + warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); + Object.defineProperty(this, "type", { + value: type + }); + return type; + } + }); + } + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + { + try { + var frozenObject = Object.freeze({}); + new Map([[frozenObject, null]]); + new Set([frozenObject]); + } catch (e) { + } + } + var createElement$1 = createElementWithValidation; + var cloneElement$1 = cloneElementWithValidation; + var createFactory = createFactoryWithValidation; + var Children = { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray, + only: onlyChild + }; + exports.Children = Children; + exports.Component = Component; + exports.PureComponent = PureComponent; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; + exports.cloneElement = cloneElement$1; + exports.createContext = createContext; + exports.createElement = createElement$1; + exports.createFactory = createFactory; + exports.createRef = createRef; + exports.forwardRef = forwardRef2; + exports.isValidElement = isValidElement; + exports.lazy = lazy; + exports.memo = memo; + exports.useCallback = useCallback4; + exports.useContext = useContext; + exports.useDebugValue = useDebugValue; + exports.useEffect = useEffect6; + exports.useImperativeHandle = useImperativeHandle; + exports.useLayoutEffect = useLayoutEffect; + exports.useMemo = useMemo; + exports.useReducer = useReducer; + exports.useRef = useRef6; + exports.useState = useState7; + exports.version = ReactVersion; + })(); + } + } +}); + +// node_modules/react/index.js +var require_react = __commonJS({ + "node_modules/react/index.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_react_development(); + } + } +}); + +// node_modules/scheduler/cjs/scheduler.development.js +var require_scheduler_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var enableSchedulerDebugging = false; + var enableProfiling = false; + var requestHostCallback; + var requestHostTimeout; + var cancelHostTimeout; + var requestPaint; + var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function"; + if (hasPerformanceNow) { + var localPerformance = performance; + exports.unstable_now = function() { + return localPerformance.now(); + }; + } else { + var localDate = Date; + var initialTime = localDate.now(); + exports.unstable_now = function() { + return localDate.now() - initialTime; + }; + } + if (typeof window === "undefined" || typeof MessageChannel !== "function") { + var _callback = null; + var _timeoutID = null; + var _flushCallback = function() { + if (_callback !== null) { + try { + var currentTime = exports.unstable_now(); + var hasRemainingTime = true; + _callback(hasRemainingTime, currentTime); + _callback = null; + } catch (e) { + setTimeout(_flushCallback, 0); + throw e; + } + } + }; + requestHostCallback = function(cb) { + if (_callback !== null) { + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0); + } + }; + requestHostTimeout = function(cb, ms) { + _timeoutID = setTimeout(cb, ms); + }; + cancelHostTimeout = function() { + clearTimeout(_timeoutID); + }; + exports.unstable_shouldYield = function() { + return false; + }; + requestPaint = exports.unstable_forceFrameRate = function() { + }; + } else { + var _setTimeout = window.setTimeout; + var _clearTimeout = window.clearTimeout; + if (typeof console !== "undefined") { + var requestAnimationFrame = window.requestAnimationFrame; + var cancelAnimationFrame = window.cancelAnimationFrame; + if (typeof requestAnimationFrame !== "function") { + console["error"]("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); + } + if (typeof cancelAnimationFrame !== "function") { + console["error"]("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); + } + } + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; + var yieldInterval = 5; + var deadline = 0; + { + exports.unstable_shouldYield = function() { + return exports.unstable_now() >= deadline; + }; + requestPaint = function() { + }; + } + exports.unstable_forceFrameRate = function(fps) { + if (fps < 0 || fps > 125) { + console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"); + return; + } + if (fps > 0) { + yieldInterval = Math.floor(1e3 / fps); + } else { + yieldInterval = 5; + } + }; + var performWorkUntilDeadline = function() { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); + deadline = currentTime + yieldInterval; + var hasTimeRemaining = true; + try { + var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + if (!hasMoreWork) { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } else { + port.postMessage(null); + } + } catch (error) { + port.postMessage(null); + throw error; + } + } else { + isMessageLoopRunning = false; + } + }; + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + requestHostCallback = function(callback) { + scheduledHostCallback = callback; + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + port.postMessage(null); + } + }; + requestHostTimeout = function(callback, ms) { + taskTimeoutID = _setTimeout(function() { + callback(exports.unstable_now()); + }, ms); + }; + cancelHostTimeout = function() { + _clearTimeout(taskTimeoutID); + taskTimeoutID = -1; + }; + } + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + var first = heap[0]; + return first === void 0 ? null : first; + } + function pop(heap) { + var first = heap[0]; + if (first !== void 0) { + var last = heap.pop(); + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + return first; + } else { + return null; + } + } + function siftUp(heap, node, i) { + var index = i; + while (true) { + var parentIndex = index - 1 >>> 1; + var parent = heap[parentIndex]; + if (parent !== void 0 && compare(parent, node) > 0) { + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + return; + } + } + } + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + while (index < length) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; + if (left !== void 0 && compare(left, node) < 0) { + if (right !== void 0 && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (right !== void 0 && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + return; + } + } + } + function compare(a, b) { + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + function markTaskErrored(task, ms) { + } + var maxSigned31BitInt = 1073741823; + var IMMEDIATE_PRIORITY_TIMEOUT = -1; + var USER_BLOCKING_PRIORITY_TIMEOUT = 250; + var NORMAL_PRIORITY_TIMEOUT = 5e3; + var LOW_PRIORITY_TIMEOUT = 1e4; + var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; + var taskQueue = []; + var timerQueue = []; + var taskIdCounter = 1; + var currentTask = null; + var currentPriorityLevel = NormalPriority; + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + function advanceTimers(currentTime) { + var timer = peek(timerQueue); + while (timer !== null) { + if (timer.callback === null) { + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + } else { + return; + } + timer = peek(timerQueue); + } + } + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + function flushWork(hasTimeRemaining, initialTime2) { + isHostCallbackScheduled = false; + if (isHostTimeoutScheduled) { + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime2); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + throw error; + } + } else { + return workLoop(hasTimeRemaining, initialTime2); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + } + } + function workLoop(hasTimeRemaining, initialTime2) { + var currentTime = initialTime2; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + while (currentTask !== null && !enableSchedulerDebugging) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) { + break; + } + var callback = currentTask.callback; + if (typeof callback === "function") { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + if (typeof continuationCallback === "function") { + currentTask.callback = continuationCallback; + } else { + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + currentTask = peek(taskQueue); + } + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + return false; + } + } + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + default: + priorityLevel = NormalPriority; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_next(eventHandler) { + var priorityLevel; + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + priorityLevel = NormalPriority; + break; + default: + priorityLevel = currentPriorityLevel; + break; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function() { + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime; + if (typeof options === "object" && options !== null) { + var delay = options.delay; + if (typeof delay === "number" && delay > 0) { + startTime = currentTime + delay; + } else { + startTime = currentTime; + } + } else { + startTime = currentTime; + } + var timeout; + switch (priorityLevel) { + case ImmediatePriority: + timeout = IMMEDIATE_PRIORITY_TIMEOUT; + break; + case UserBlockingPriority: + timeout = USER_BLOCKING_PRIORITY_TIMEOUT; + break; + case IdlePriority: + timeout = IDLE_PRIORITY_TIMEOUT; + break; + case LowPriority: + timeout = LOW_PRIORITY_TIMEOUT; + break; + case NormalPriority: + default: + timeout = NORMAL_PRIORITY_TIMEOUT; + break; + } + var expirationTime = startTime + timeout; + var newTask = { + id: taskIdCounter++, + callback, + priorityLevel, + startTime, + expirationTime, + sortIndex: -1 + }; + if (startTime > currentTime) { + newTask.sortIndex = startTime; + push(timerQueue, newTask); + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + if (isHostTimeoutScheduled) { + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } + requestHostTimeout(handleTimeout, startTime - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + return newTask; + } + function unstable_pauseExecution() { + } + function unstable_continueExecution() { + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + function unstable_cancelCallback(task) { + task.callback = null; + } + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + var unstable_requestPaint = requestPaint; + var unstable_Profiling = null; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_Profiling = unstable_Profiling; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_next = unstable_next; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_wrapCallback = unstable_wrapCallback; + })(); + } + } +}); + +// node_modules/scheduler/index.js +var require_scheduler = __commonJS({ + "node_modules/scheduler/index.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_scheduler_development(); + } + } +}); + +// node_modules/scheduler/cjs/scheduler-tracing.development.js +var require_scheduler_tracing_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler-tracing.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var DEFAULT_THREAD_ID = 0; + var interactionIDCounter = 0; + var threadIDCounter = 0; + exports.__interactionsRef = null; + exports.__subscriberRef = null; + { + exports.__interactionsRef = { + current: new Set() + }; + exports.__subscriberRef = { + current: null + }; + } + function unstable_clear(callback) { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = new Set(); + try { + return callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + } + } + function unstable_getCurrent() { + { + return exports.__interactionsRef.current; + } + } + function unstable_getThreadID() { + return ++threadIDCounter; + } + function unstable_trace(name, timestamp, callback) { + var threadID = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : DEFAULT_THREAD_ID; + var interaction = { + __count: 1, + id: interactionIDCounter++, + name, + timestamp + }; + var prevInteractions = exports.__interactionsRef.current; + var interactions = new Set(prevInteractions); + interactions.add(interaction); + exports.__interactionsRef.current = interactions; + var subscriber = exports.__subscriberRef.current; + var returnValue; + try { + if (subscriber !== null) { + subscriber.onInteractionTraced(interaction); + } + } finally { + try { + if (subscriber !== null) { + subscriber.onWorkStarted(interactions, threadID); + } + } finally { + try { + returnValue = callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + try { + if (subscriber !== null) { + subscriber.onWorkStopped(interactions, threadID); + } + } finally { + interaction.__count--; + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + } + } + } + } + return returnValue; + } + function unstable_wrap(callback) { + var threadID = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_THREAD_ID; + var wrappedInteractions = exports.__interactionsRef.current; + var subscriber = exports.__subscriberRef.current; + if (subscriber !== null) { + subscriber.onWorkScheduled(wrappedInteractions, threadID); + } + wrappedInteractions.forEach(function(interaction) { + interaction.__count++; + }); + var hasRun = false; + function wrapped() { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = wrappedInteractions; + subscriber = exports.__subscriberRef.current; + try { + var returnValue; + try { + if (subscriber !== null) { + subscriber.onWorkStarted(wrappedInteractions, threadID); + } + } finally { + try { + returnValue = callback.apply(void 0, arguments); + } finally { + exports.__interactionsRef.current = prevInteractions; + if (subscriber !== null) { + subscriber.onWorkStopped(wrappedInteractions, threadID); + } + } + } + return returnValue; + } finally { + if (!hasRun) { + hasRun = true; + wrappedInteractions.forEach(function(interaction) { + interaction.__count--; + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + } + } + wrapped.cancel = function cancel() { + subscriber = exports.__subscriberRef.current; + try { + if (subscriber !== null) { + subscriber.onWorkCanceled(wrappedInteractions, threadID); + } + } finally { + wrappedInteractions.forEach(function(interaction) { + interaction.__count--; + if (subscriber && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + }; + return wrapped; + } + var subscribers = null; + { + subscribers = new Set(); + } + function unstable_subscribe(subscriber) { + { + subscribers.add(subscriber); + if (subscribers.size === 1) { + exports.__subscriberRef.current = { + onInteractionScheduledWorkCompleted, + onInteractionTraced, + onWorkCanceled, + onWorkScheduled, + onWorkStarted, + onWorkStopped + }; + } + } + } + function unstable_unsubscribe(subscriber) { + { + subscribers.delete(subscriber); + if (subscribers.size === 0) { + exports.__subscriberRef.current = null; + } + } + } + function onInteractionTraced(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onInteractionTraced(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onInteractionScheduledWorkCompleted(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkScheduled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkScheduled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkStarted(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkStopped(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkStopped(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + function onWorkCanceled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkCanceled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + exports.unstable_clear = unstable_clear; + exports.unstable_getCurrent = unstable_getCurrent; + exports.unstable_getThreadID = unstable_getThreadID; + exports.unstable_subscribe = unstable_subscribe; + exports.unstable_trace = unstable_trace; + exports.unstable_unsubscribe = unstable_unsubscribe; + exports.unstable_wrap = unstable_wrap; + })(); + } + } +}); + +// node_modules/scheduler/tracing.js +var require_tracing = __commonJS({ + "node_modules/scheduler/tracing.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_scheduler_tracing_development(); + } + } +}); + +// node_modules/react-dom/cjs/react-dom.development.js +var require_react_dom_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var React19 = require_react(); + var _assign = require_object_assign(); + var Scheduler = require_scheduler(); + var tracing = require_tracing(); + var ReactSharedInternals = React19.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function warn(format) { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + function error(format) { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return "" + item; + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + if (!React19) { + { + throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM."); + } + } + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; + var HostRoot = 3; + var HostPortal = 4; + var HostComponent = 5; + var HostText = 6; + var Fragment = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var FundamentalComponent = 20; + var ScopeComponent = 21; + var Block = 22; + var OffscreenComponent = 23; + var LegacyHiddenComponent = 24; + var enableProfilerTimer = true; + var enableFundamentalAPI = false; + var enableNewReconciler = false; + var warnAboutStringRefs = false; + var allNativeEvents = new Set(); + var registrationNameDependencies = {}; + var possibleRegistrationNames = {}; + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + { + if (registrationNameDependencies[registrationName]) { + error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); + } + } + registrationNameDependencies[registrationName] = dependencies; + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + if (registrationName === "onDoubleClick") { + possibleRegistrationNames.ondblclick = registrationName; + } + } + for (var i = 0; i < dependencies.length; i++) { + allNativeEvents.add(dependencies[i]); + } + } + var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); + var RESERVED = 0; + var STRING = 1; + var BOOLEANISH_STRING = 2; + var BOOLEAN = 3; + var OVERLOADED_BOOLEAN = 4; + var NUMERIC = 5; + var POSITIVE_NUMERIC = 6; + var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; + var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + var ROOT_ATTRIBUTE_NAME = "data-reactroot"; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + { + error("Invalid attribute name: `%s`", attributeName); + } + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + if (isCustomComponentTag) { + return false; + } + if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) { + return true; + } + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + switch (typeof value) { + case "function": + case "symbol": + return true; + case "boolean": { + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix2 = name.toLowerCase().slice(0, 5); + return prefix2 !== "data-" && prefix2 !== "aria-"; + } + } + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === "undefined") { + return true; + } + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + case OVERLOADED_BOOLEAN: + return value === false; + case NUMERIC: + return isNaN(value); + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { + this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL2; + this.removeEmptyString = removeEmptyString; + } + var properties = {}; + var reservedProps = [ + "children", + "dangerouslySetInnerHTML", + "defaultValue", + "defaultChecked", + "innerHTML", + "suppressContentEditableWarning", + "suppressHydrationWarning", + "style" + ]; + reservedProps.forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, RESERVED, false, name, null, false, false); + }); + [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) { + var name = _ref[0], attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); + }); + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name.toLowerCase(), null, false, false); + }); + ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name, null, false, false); + }); + [ + "allowFullScreen", + "async", + "autoFocus", + "autoPlay", + "controls", + "default", + "defer", + "disabled", + "disablePictureInPicture", + "disableRemotePlayback", + "formNoValidate", + "hidden", + "loop", + "noModule", + "noValidate", + "open", + "playsInline", + "readOnly", + "required", + "reversed", + "scoped", + "seamless", + "itemScope" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, name.toLowerCase(), null, false, false); + }); + [ + "checked", + "multiple", + "muted", + "selected" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, name, null, false, false); + }); + [ + "capture", + "download" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, name, null, false, false); + }); + [ + "cols", + "rows", + "size", + "span" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, name, null, false, false); + }); + ["rowSpan", "start"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, NUMERIC, false, name.toLowerCase(), null, false, false); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + var capitalize = function(token) { + return token[1].toUpperCase(); + }; + [ + "accent-height", + "alignment-baseline", + "arabic-form", + "baseline-shift", + "cap-height", + "clip-path", + "clip-rule", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "dominant-baseline", + "enable-background", + "fill-opacity", + "fill-rule", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-name", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "horiz-adv-x", + "horiz-origin-x", + "image-rendering", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "overline-position", + "overline-thickness", + "paint-order", + "panose-1", + "pointer-events", + "rendering-intent", + "shape-rendering", + "stop-color", + "stop-opacity", + "strikethrough-position", + "strikethrough-thickness", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "underline-position", + "underline-thickness", + "unicode-bidi", + "unicode-range", + "units-per-em", + "v-alphabetic", + "v-hanging", + "v-ideographic", + "v-mathematical", + "vector-effect", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "word-spacing", + "writing-mode", + "xmlns:xlink", + "x-height" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); + }); + [ + "xlink:actuate", + "xlink:arcrole", + "xlink:role", + "xlink:show", + "xlink:title", + "xlink:type" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/1999/xlink", false, false); + }); + [ + "xml:base", + "xml:lang", + "xml:space" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/XML/1998/namespace", false, false); + }); + ["tabIndex", "crossOrigin"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, false, false); + }); + var xlinkHref = "xlinkHref"; + properties[xlinkHref] = new PropertyInfoRecord("xlinkHref", STRING, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false); + ["src", "href", "action", "formAction"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, true, true); + }); + var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + function sanitizeURL(url) { + { + if (!didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); + } + } + } + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + if (propertyInfo.sanitizeURL) { + sanitizeURL("" + expected); + } + var attributeName = propertyInfo.attributeName; + var stringValue = null; + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + if (value === "") { + return true; + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + if (value === "" + expected) { + return expected; + } + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return node.getAttribute(attributeName); + } + if (propertyInfo.type === BOOLEAN) { + return expected; + } + stringValue = node.getAttribute(attributeName); + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === "" + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + function getValueForAttribute(node, name, expected) { + { + if (!isAttributeNameSafe(name)) { + return; + } + if (isOpaqueHydratingObject(expected)) { + return expected; + } + if (!node.hasAttribute(name)) { + return expected === void 0 ? void 0 : null; + } + var value = node.getAttribute(name); + if (value === "" + expected) { + return expected; + } + return value; + } + } + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + if (value === null) { + node.removeAttribute(_attributeName); + } else { + node.setAttribute(_attributeName, "" + value); + } + } + return; + } + var mustUseProperty = propertyInfo.mustUseProperty; + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ""; + } else { + node[propertyName] = value; + } + return; + } + var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { + attributeValue = ""; + } else { + { + attributeValue = "" + value; + } + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + if (attributeNamespace) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } else { + node.setAttribute(attributeName, attributeValue); + } + } + } + var REACT_ELEMENT_TYPE = 60103; + var REACT_PORTAL_TYPE = 60106; + var REACT_FRAGMENT_TYPE = 60107; + var REACT_STRICT_MODE_TYPE = 60108; + var REACT_PROFILER_TYPE = 60114; + var REACT_PROVIDER_TYPE = 60109; + var REACT_CONTEXT_TYPE = 60110; + var REACT_FORWARD_REF_TYPE = 60112; + var REACT_SUSPENSE_TYPE = 60113; + var REACT_SUSPENSE_LIST_TYPE = 60120; + var REACT_MEMO_TYPE = 60115; + var REACT_LAZY_TYPE = 60116; + var REACT_BLOCK_TYPE = 60121; + var REACT_SERVER_BLOCK_TYPE = 60122; + var REACT_FUNDAMENTAL_TYPE = 60117; + var REACT_SCOPE_TYPE = 60119; + var REACT_OPAQUE_ID_TYPE = 60128; + var REACT_DEBUG_TRACING_MODE_TYPE = 60129; + var REACT_OFFSCREEN_TYPE = 60130; + var REACT_LEGACY_HIDDEN_TYPE = 60131; + if (typeof Symbol === "function" && Symbol.for) { + var symbolFor = Symbol.for; + REACT_ELEMENT_TYPE = symbolFor("react.element"); + REACT_PORTAL_TYPE = symbolFor("react.portal"); + REACT_FRAGMENT_TYPE = symbolFor("react.fragment"); + REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode"); + REACT_PROFILER_TYPE = symbolFor("react.profiler"); + REACT_PROVIDER_TYPE = symbolFor("react.provider"); + REACT_CONTEXT_TYPE = symbolFor("react.context"); + REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); + REACT_SUSPENSE_TYPE = symbolFor("react.suspense"); + REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); + REACT_MEMO_TYPE = symbolFor("react.memo"); + REACT_LAZY_TYPE = symbolFor("react.lazy"); + REACT_BLOCK_TYPE = symbolFor("react.block"); + REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); + REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); + REACT_SCOPE_TYPE = symbolFor("react.scope"); + REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); + REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); + REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); + REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); + } + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: _assign({}, props, { + value: prevLog + }), + info: _assign({}, props, { + value: prevInfo + }), + warn: _assign({}, props, { + value: prevWarn + }), + error: _assign({}, props, { + value: prevError + }), + group: _assign({}, props, { + value: prevGroup + }), + groupCollapsed: _assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: _assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeClassComponentFrame(ctor, source, ownerFn) { + { + return describeNativeComponentFrame(ctor, true); + } + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_BLOCK_TYPE: + return describeFunctionComponentFrame(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + function describeFiber(fiber) { + var owner = fiber._debugOwner ? fiber._debugOwner.type : null; + var source = fiber._debugSource; + switch (fiber.tag) { + case HostComponent: + return describeBuiltInComponentFrame(fiber.type); + case LazyComponent: + return describeBuiltInComponentFrame("Lazy"); + case SuspenseComponent: + return describeBuiltInComponentFrame("Suspense"); + case SuspenseListComponent: + return describeBuiltInComponentFrame("SuspenseList"); + case FunctionComponent: + case IndeterminateComponent: + case SimpleMemoComponent: + return describeFunctionComponentFrame(fiber.type); + case ForwardRef: + return describeFunctionComponentFrame(fiber.type.render); + case Block: + return describeFunctionComponentFrame(fiber.type._render); + case ClassComponent: + return describeClassComponentFrame(fiber.type); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress2) { + try { + var info = ""; + var node = workInProgress2; + do { + info += describeFiber(node); + node = node.return; + } while (node); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentName(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_BLOCK_TYPE: + return getComponentName(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentName(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var current = null; + var isRendering = false; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + var owner = current._debugOwner; + if (owner !== null && typeof owner !== "undefined") { + return getComponentName(owner.type); + } + } + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ""; + } + return getStackByFiberInDevAndProd(current); + } + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + isRendering = false; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + isRendering = false; + } + } + function setIsRendering(rendering) { + { + isRendering = rendering; + } + } + function getIsRendering() { + { + return isRendering; + } + } + function toString(value) { + return "" + value; + } + function getToStringValue(value) { + switch (typeof value) { + case "boolean": + case "number": + case "object": + case "string": + case "undefined": + return value; + default: + return ""; + } + } + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true + }; + function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); + } + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); + } + } + } + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio"); + } + function getTracker(node) { + return node._valueTracker; + } + function detachTracker(node) { + node._valueTracker = null; + } + function getValueFromNode(node) { + var value = ""; + if (!node) { + return value; + } + if (isCheckable(node)) { + value = node.checked ? "true" : "false"; + } else { + value = node.value; + } + return value; + } + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? "checked" : "value"; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + var currentValue = "" + node[valueField]; + if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") { + return; + } + var get2 = descriptor.get, set2 = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function() { + return get2.call(this); + }, + set: function(value) { + currentValue = "" + value; + set2.call(this, value); + } + }); + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable + }); + var tracker = { + getValue: function() { + return currentValue; + }, + setValue: function(value) { + currentValue = "" + value; + }, + stopTracking: function() { + detachTracker(node); + delete node[valueField]; + } + }; + return tracker; + } + function track(node) { + if (getTracker(node)) { + return; + } + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + var tracker = getTracker(node); + if (!tracker) { + return true; + } + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + return false; + } + function getActiveElement(doc) { + doc = doc || (typeof document !== "undefined" ? document : void 0); + if (typeof doc === "undefined") { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + function isControlled(props) { + var usesChecked = props.type === "checkbox" || props.type === "radio"; + return usesChecked ? props.checked != null : props.value != null; + } + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + var hostProps = _assign({}, props, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: checked != null ? checked : node._wrapperState.initialChecked + }); + return hostProps; + } + function initWrapperState(element, props) { + { + checkControlledValueProps("input", props); + if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) { + error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnCheckedDefaultChecked = true; + } + if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) { + error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnValueDefaultValue = true; + } + } + var node = element; + var defaultValue = props.defaultValue == null ? "" : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props) + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + if (checked != null) { + setValueForProperty(node, "checked", checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + { + var controlled = isControlled(props); + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnUncontrolledToControlled = true; + } + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnControlledToUncontrolled = true; + } + } + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + if (value != null) { + if (type === "number") { + if (value === 0 && node.value === "" || node.value != value) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === "submit" || type === "reset") { + node.removeAttribute("value"); + return; + } + { + if (props.hasOwnProperty("value")) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty("defaultValue")) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + { + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating2) { + var node = element; + if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) { + var type = props.type; + var isButton = type === "submit" || type === "reset"; + if (isButton && (props.value === void 0 || props.value === null)) { + return; + } + var initialValue = toString(node._wrapperState.initialValue); + if (!isHydrating2) { + { + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + { + node.defaultValue = initialValue; + } + } + var name = node.name; + if (name !== "") { + node.name = ""; + } + { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + if (name !== "") { + node.name = name; + } + } + function restoreControlledState(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + function updateNamedCousins(rootNode, props) { + var name = props.name; + if (props.type === "radio" && name != null) { + var queryRoot = rootNode; + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'); + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + var otherProps = getFiberCurrentPropsFromNode(otherNode); + if (!otherProps) { + { + throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."); + } + } + updateValueIfChanged(otherNode); + updateWrapper(otherNode, otherProps); + } + } + } + function setDefaultValue(node, type, value) { + if (type !== "number" || getActiveElement(node.ownerDocument) !== node) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + function flattenChildren(children) { + var content = ""; + React19.Children.forEach(children, function(child) { + if (child == null) { + return; + } + content += child; + }); + return content; + } + function validateProps(element, props) { + { + if (typeof props.children === "object" && props.children !== null) { + React19.Children.forEach(props.children, function(child) { + if (child == null) { + return; + } + if (typeof child === "string" || typeof child === "number") { + return; + } + if (typeof child.type !== "string") { + return; + } + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + error("Only strings and numbers are supported as