'use strict'; var obsidian = require('obsidian'); var fs = require('fs'); var path = require('path'); var child_process = require('child_process'); var util = require('util'); function _interopNamespace(e) { if (e && e.__esModule) return e; var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== 'default') { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); } n['default'] = e; return Object.freeze(n); } var path__namespace = /*#__PURE__*/_interopNamespace(path); /*! ***************************************************************************** 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()); }); } class TemplaterError extends Error { constructor(msg, console_msg) { super(msg); this.console_msg = console_msg; this.name = this.constructor.name; Error.captureStackTrace(this, this.constructor); } } const DEFAULT_SETTINGS = { command_timeout: 5, template_folder: "", templates_pairs: [["", ""]], trigger_on_file_creation: false, enable_system_commands: false, shell_path: "", script_folder: undefined, empty_file_template: undefined, syntax_highlighting: true, }; class TemplaterSettingTab extends obsidian.PluginSettingTab { constructor(app, plugin) { super(app, plugin); this.app = app; this.plugin = plugin; } display() { const { containerEl } = this; let desc; containerEl.empty(); new obsidian.Setting(containerEl) .setName("Template folder location") .setDesc("Files in this folder will be available as templates.") .addText(text => { text.setPlaceholder("Example: folder 1/folder 2") .setValue(this.plugin.settings.template_folder) .onChange((new_folder) => { this.plugin.settings.template_folder = new_folder; this.plugin.saveSettings(); }); }); new obsidian.Setting(containerEl) .setName("Timeout") .setDesc("Maximum timeout in seconds for a system command.") .addText(text => { text.setPlaceholder("Timeout") .setValue(this.plugin.settings.command_timeout.toString()) .onChange((new_value) => { const new_timeout = Number(new_value); if (isNaN(new_timeout)) { this.plugin.log_error(new TemplaterError("Timeout must be a number")); return; } this.plugin.settings.command_timeout = new_timeout; this.plugin.saveSettings(); }); }); desc = document.createDocumentFragment(); desc.append("Templater provides multiples predefined variables / functions that you can use.", desc.createEl("br"), "Check the ", desc.createEl("a", { href: "https://silentvoid13.github.io/Templater/", text: "documentation" }), " to get a list of all the available internal variables / functions."); new obsidian.Setting(containerEl) .setName("Internal Variables and Functions") .setDesc(desc); desc = document.createDocumentFragment(); desc.append("Adds syntax highlighting for Templater commands in edit mode."); new obsidian.Setting(containerEl) .setName("Syntax Highlighting") .setDesc(desc) .addToggle(toggle => { toggle .setValue(this.plugin.settings.syntax_highlighting) .onChange(syntax_highlighting => { this.plugin.settings.syntax_highlighting = syntax_highlighting; this.plugin.saveSettings(); this.plugin.update_syntax_highlighting(); }); }); desc = document.createDocumentFragment(); desc.append("Templater will listen for the new file creation event, and replace every command it finds in the new file's content.", desc.createEl("br"), "This makes Templater compatible with other plugins like the Daily note core plugin, Calendar plugin, Review plugin, Note refactor plugin, ...", desc.createEl("br"), desc.createEl("b", { text: "Warning: ", }), "This can be dangerous if you create new files with unknown / unsafe content on creation. Make sure that every new file's content is safe on creation."); new obsidian.Setting(containerEl) .setName("Trigger Templater on new file creation") .setDesc(desc) .addToggle(toggle => { toggle .setValue(this.plugin.settings.trigger_on_file_creation) .onChange(trigger_on_file_creation => { this.plugin.settings.trigger_on_file_creation = trigger_on_file_creation; this.plugin.saveSettings(); this.plugin.update_trigger_file_on_creation(); // Force refresh this.display(); }); }); if (this.plugin.settings.trigger_on_file_creation) { desc = document.createDocumentFragment(); desc.append("Templater will automatically apply this template to new empty files when they are created.", desc.createEl("br"), "The .md extension for the file shouldn't be specified."); new obsidian.Setting(containerEl) .setName("Empty file template") .setDesc(desc) .addText(text => { text.setPlaceholder("folder 1/template_file") .setValue(this.plugin.settings.empty_file_template) .onChange((empty_file_template) => { this.plugin.settings.empty_file_template = empty_file_template; this.plugin.saveSettings(); }); }); } desc = document.createDocumentFragment(); desc.append("All JavaScript files in this folder will be loaded as CommonJS modules, to import custom user functions.", desc.createEl("br"), "The folder needs to be accessible from the vault.", desc.createEl("br"), "Check the ", desc.createEl("a", { href: "https://silentvoid13.github.io/Templater/", text: "documentation", }), " for more informations."); new obsidian.Setting(containerEl) .setName("Script files folder location") .setDesc(desc) .addText(text => { text.setPlaceholder("Example: folder 1/folder 2") .setValue(this.plugin.settings.script_folder) .onChange((new_folder) => { this.plugin.settings.script_folder = new_folder; this.plugin.saveSettings(); }); }); desc = document.createDocumentFragment(); desc.append("Allows you to create user functions linked to system commands.", desc.createEl("br"), desc.createEl("b", { text: "Warning: " }), "It can be dangerous to execute arbitrary system commands from untrusted sources. Only run system commands that you understand, from trusted sources."); new obsidian.Setting(containerEl) .setName("Enable System Commands") .setDesc(desc) .addToggle(toggle => { toggle .setValue(this.plugin.settings.enable_system_commands) .onChange(enable_system_commands => { this.plugin.settings.enable_system_commands = enable_system_commands; this.plugin.saveSettings(); // Force refresh this.display(); }); }); if (this.plugin.settings.enable_system_commands) { desc = document.createDocumentFragment(); desc.append("Full path to the shell binary to execute the command with.", desc.createEl("br"), "This setting is optional and will default to the system's default shell if not specified.", desc.createEl("br"), "You can use forward slashes ('/') as path separators on all platforms if in doubt."); new obsidian.Setting(containerEl) .setName("Shell binary location") .setDesc(desc) .addText(text => { text.setPlaceholder("Example: /bin/bash, ...") .setValue(this.plugin.settings.shell_path) .onChange((shell_path) => { this.plugin.settings.shell_path = shell_path; this.plugin.saveSettings(); }); }); let i = 1; this.plugin.settings.templates_pairs.forEach((template_pair) => { const div = containerEl.createEl('div'); div.addClass("templater_div"); const title = containerEl.createEl('h4', { text: 'User Function n°' + i, }); title.addClass("templater_title"); const setting = new obsidian.Setting(containerEl) .addExtraButton(extra => { extra.setIcon("cross") .setTooltip("Delete") .onClick(() => { const index = this.plugin.settings.templates_pairs.indexOf(template_pair); if (index > -1) { this.plugin.settings.templates_pairs.splice(index, 1); // Force refresh this.plugin.saveSettings(); this.display(); } }); }) .addText(text => { const t = text.setPlaceholder('Function name') .setValue(template_pair[0]) .onChange((new_value) => { const index = this.plugin.settings.templates_pairs.indexOf(template_pair); if (index > -1) { this.plugin.settings.templates_pairs[index][0] = new_value; this.plugin.saveSettings(); } }); t.inputEl.addClass("templater_template"); return t; }) .addTextArea(text => { const t = text.setPlaceholder('System Command') .setValue(template_pair[1]) .onChange((new_cmd) => { const index = this.plugin.settings.templates_pairs.indexOf(template_pair); if (index > -1) { this.plugin.settings.templates_pairs[index][1] = new_cmd; this.plugin.saveSettings(); } }); t.inputEl.setAttr("rows", 4); t.inputEl.addClass("templater_cmd"); return t; }); setting.infoEl.remove(); div.appendChild(title); div.appendChild(containerEl.lastChild); i += 1; }); const div = containerEl.createEl('div'); div.addClass("templater_div2"); const setting = new obsidian.Setting(containerEl) .addButton(button => { const b = button.setButtonText("Add New User Function").onClick(() => { this.plugin.settings.templates_pairs.push(["", ""]); // Force refresh this.display(); }); b.buttonEl.addClass("templater_button"); return b; }); setting.infoEl.remove(); div.appendChild(containerEl.lastChild); } } } const obsidian_module = require("obsidian"); function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } function escapeRegExp$1(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string } function resolveTFile(app, file_str) { file_str = obsidian.normalizePath(file_str); const file = app.vault.getAbstractFileByPath(file_str); if (!file) { throw new TemplaterError(`File "${file_str}" doesn't exist`); } if (!(file instanceof obsidian.TFile)) { throw new TemplaterError(`${file_str} is a folder, not a file`); } return file; } function getTFilesFromFolder(app, folder_str) { folder_str = obsidian.normalizePath(folder_str); const folder = app.vault.getAbstractFileByPath(folder_str); if (!folder) { throw new TemplaterError(`Folder "${folder_str}" doesn't exist`); } if (!(folder instanceof obsidian.TFolder)) { throw new TemplaterError(`${folder_str} is a file, not a folder`); } let files = []; obsidian.Vault.recurseChildren(folder, (file) => { if (file instanceof obsidian.TFile) { files.push(file); } }); files.sort((a, b) => { return a.basename.localeCompare(b.basename); }); return files; } var OpenMode; (function (OpenMode) { OpenMode[OpenMode["InsertTemplate"] = 0] = "InsertTemplate"; OpenMode[OpenMode["CreateNoteTemplate"] = 1] = "CreateNoteTemplate"; })(OpenMode || (OpenMode = {})); class TemplaterFuzzySuggestModal extends obsidian.FuzzySuggestModal { constructor(app, plugin) { super(app); this.app = app; this.plugin = plugin; } getItems() { if (this.plugin.settings.template_folder === "") { return this.app.vault.getMarkdownFiles(); } return getTFilesFromFolder(this.app, this.plugin.settings.template_folder); } getItemText(item) { return item.basename; } onChooseItem(item, _evt) { switch (this.open_mode) { case OpenMode.InsertTemplate: this.plugin.templater.append_template(item); break; case OpenMode.CreateNoteTemplate: this.plugin.templater.create_new_note_from_template(item, this.creation_folder); break; } } start() { try { this.open(); } catch (e) { this.plugin.log_error(e); } } insert_template() { this.open_mode = OpenMode.InsertTemplate; this.start(); } create_new_note_from_template(folder) { this.creation_folder = folder; this.open_mode = OpenMode.CreateNoteTemplate; this.start(); } } const UNSUPPORTED_MOBILE_TEMPLATE = "Error_MobileUnsupportedTemplate"; const ICON_DATA = ``; class CursorJumper { constructor(app) { this.app = app; this.cursor_regex = new RegExp("<%\\s*tp.file.cursor\\((?[0-9]{0,2})\\)\\s*%>", "g"); } jump_to_next_cursor_location() { return __awaiter(this, void 0, void 0, function* () { const active_view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!active_view) { return; } const active_file = active_view.file; yield active_view.save(); const content = yield this.app.vault.read(active_file); const { new_content, positions } = this.replace_and_get_cursor_positions(content); if (positions) { yield this.app.vault.modify(active_file, new_content); this.set_cursor_location(positions); } }); } get_editor_position_from_index(content, index) { const substr = content.substr(0, index); let l = 0; let offset = -1; let r = -1; for (; (r = substr.indexOf("\n", r + 1)) !== -1; l++, offset = r) ; offset += 1; const ch = content.substr(offset, index - offset).length; return { line: l, ch: ch }; } replace_and_get_cursor_positions(content) { let cursor_matches = []; let match; while ((match = this.cursor_regex.exec(content)) != null) { cursor_matches.push(match); } if (cursor_matches.length === 0) { return {}; } cursor_matches.sort((m1, m2) => { return Number(m1.groups["order"]) - Number(m2.groups["order"]); }); const match_str = cursor_matches[0][0]; cursor_matches = cursor_matches.filter(m => { return m[0] === match_str; }); const positions = []; let index_offset = 0; for (let match of cursor_matches) { const index = match.index - index_offset; positions.push(this.get_editor_position_from_index(content, index)); content = content.replace(new RegExp(escapeRegExp$1(match[0])), ""); index_offset += match[0].length; // For tp.file.cursor(), we keep the default top to bottom if (match[1] === "") { break; } } return { new_content: content, positions: positions }; } set_cursor_location(positions) { const active_view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!active_view) { return; } const editor = active_view.editor; editor.focus(); let selections = []; for (let pos of positions) { selections.push({ from: pos }); } let transaction = { selections: selections }; editor.transaction(transaction); } } function setPrototypeOf(obj, proto) { // eslint-disable-line @typescript-eslint/no-explicit-any if (Object.setPrototypeOf) { Object.setPrototypeOf(obj, proto); } else { obj.__proto__ = proto; } } // This is pretty much the only way to get nice, extended Errors // without using ES6 /** * This returns a new Error with a custom prototype. Note that it's _not_ a constructor * * @param message Error message * * **Example** * * ```js * throw EtaErr("template not found") * ``` */ function EtaErr(message) { var err = new Error(message); setPrototypeOf(err, EtaErr.prototype); return err; } EtaErr.prototype = Object.create(Error.prototype, { name: { value: 'Eta Error', enumerable: false } }); /** * Throws an EtaErr with a nicely formatted error and message showing where in the template the error occurred. */ function ParseErr(message, str, indx) { var whitespace = str.slice(0, indx).split(/\n/); var lineNo = whitespace.length; var colNo = whitespace[lineNo - 1].length + 1; message += ' at line ' + lineNo + ' col ' + colNo + ':\n\n' + ' ' + str.split(/\n/)[lineNo - 1] + '\n' + ' ' + Array(colNo).join(' ') + '^'; throw EtaErr(message); } /** * @returns The global Promise function */ var promiseImpl = new Function('return this')().Promise; /** * @returns A new AsyncFunction constuctor */ function getAsyncFunctionConstructor() { try { return new Function('return (async function(){}).constructor')(); } catch (e) { if (e instanceof SyntaxError) { throw EtaErr("This environment doesn't support async/await"); } else { throw e; } } } /** * str.trimLeft polyfill * * @param str - Input string * @returns The string with left whitespace removed * */ function trimLeft(str) { // eslint-disable-next-line no-extra-boolean-cast if (!!String.prototype.trimLeft) { return str.trimLeft(); } else { return str.replace(/^\s+/, ''); } } /** * str.trimRight polyfill * * @param str - Input string * @returns The string with right whitespace removed * */ function trimRight(str) { // eslint-disable-next-line no-extra-boolean-cast if (!!String.prototype.trimRight) { return str.trimRight(); } else { return str.replace(/\s+$/, ''); // TODO: do we really need to replace BOM's? } } // TODO: allow '-' to trim up until newline. Use [^\S\n\r] instead of \s /* END TYPES */ function hasOwnProp(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } function copyProps(toObj, fromObj) { for (var key in fromObj) { if (hasOwnProp(fromObj, key)) { toObj[key] = fromObj[key]; } } return toObj; } /** * Takes a string within a template and trims it, based on the preceding tag's whitespace control and `config.autoTrim` */ function trimWS(str, config, wsLeft, wsRight) { var leftTrim; var rightTrim; if (Array.isArray(config.autoTrim)) { // kinda confusing // but _}} will trim the left side of the following string leftTrim = config.autoTrim[1]; rightTrim = config.autoTrim[0]; } else { leftTrim = rightTrim = config.autoTrim; } if (wsLeft || wsLeft === false) { leftTrim = wsLeft; } if (wsRight || wsRight === false) { rightTrim = wsRight; } if (!rightTrim && !leftTrim) { return str; } if (leftTrim === 'slurp' && rightTrim === 'slurp') { return str.trim(); } if (leftTrim === '_' || leftTrim === 'slurp') { // console.log('trimming left' + leftTrim) // full slurp str = trimLeft(str); } else if (leftTrim === '-' || leftTrim === 'nl') { // nl trim str = str.replace(/^(?:\r\n|\n|\r)/, ''); } if (rightTrim === '_' || rightTrim === 'slurp') { // full slurp str = trimRight(str); } else if (rightTrim === '-' || rightTrim === 'nl') { // nl trim str = str.replace(/(?:\r\n|\n|\r)$/, ''); // TODO: make sure this gets \r\n } return str; } /** * A map of special HTML characters to their XML-escaped equivalents */ var escMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }; function replaceChar(s) { return escMap[s]; } /** * XML-escapes an input value after converting it to a string * * @param str - Input value (usually a string) * @returns XML-escaped string */ function XMLEscape(str) { // eslint-disable-line @typescript-eslint/no-explicit-any // To deal with XSS. Based on Escape implementations of Mustache.JS and Marko, then customized. var newStr = String(str); if (/[&<>"']/.test(newStr)) { return newStr.replace(/[&<>"']/g, replaceChar); } else { return newStr; } } /* END TYPES */ var templateLitReg = /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g; var singleQuoteReg = /'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g; var doubleQuoteReg = /"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g; /** Escape special regular expression characters inside a string */ function escapeRegExp(string) { // From MDN return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string } function parse(str, config) { var buffer = []; var trimLeftOfNextStr = false; var lastIndex = 0; var parseOptions = config.parse; if (config.plugins) { for (var i = 0; i < config.plugins.length; i++) { var plugin = config.plugins[i]; if (plugin.processTemplate) { str = plugin.processTemplate(str, config); } } } /* Adding for EJS compatibility */ if (config.rmWhitespace) { // Code taken directly from EJS // Have to use two separate replaces here as `^` and `$` operators don't // work well with `\r` and empty lines don't work well with the `m` flag. // Essentially, this replaces the whitespace at the beginning and end of // each line and removes multiple newlines. str = str.replace(/[\r\n]+/g, '\n').replace(/^\s+|\s+$/gm, ''); } /* End rmWhitespace option */ templateLitReg.lastIndex = 0; singleQuoteReg.lastIndex = 0; doubleQuoteReg.lastIndex = 0; function pushString(strng, shouldTrimRightOfString) { if (strng) { // if string is truthy it must be of type 'string' strng = trimWS(strng, config, trimLeftOfNextStr, // this will only be false on the first str, the next ones will be null or undefined shouldTrimRightOfString); if (strng) { // replace \ with \\, ' with \' // we're going to convert all CRLF to LF so it doesn't take more than one replace strng = strng.replace(/\\|'/g, '\\$&').replace(/\r\n|\n|\r/g, '\\n'); buffer.push(strng); } } } var prefixes = [parseOptions.exec, parseOptions.interpolate, parseOptions.raw].reduce(function (accumulator, prefix) { if (accumulator && prefix) { return accumulator + '|' + escapeRegExp(prefix); } else if (prefix) { // accumulator is falsy return escapeRegExp(prefix); } else { // prefix and accumulator are both falsy return accumulator; } }, ''); var parseOpenReg = new RegExp('([^]*?)' + escapeRegExp(config.tags[0]) + '(-|_)?\\s*(' + prefixes + ')?\\s*(?![\\s+\\-_' + prefixes + '])', 'g'); var parseCloseReg = new RegExp('\'|"|`|\\/\\*|(\\s*(-|_)?' + escapeRegExp(config.tags[1]) + ')', 'g'); // TODO: benchmark having the \s* on either side vs using str.trim() var m; while ((m = parseOpenReg.exec(str))) { lastIndex = m[0].length + m.index; var precedingString = m[1]; var wsLeft = m[2]; var prefix = m[3] || ''; // by default either ~, =, or empty pushString(precedingString, wsLeft); parseCloseReg.lastIndex = lastIndex; var closeTag = void 0; var currentObj = false; while ((closeTag = parseCloseReg.exec(str))) { if (closeTag[1]) { var content = str.slice(lastIndex, closeTag.index); parseOpenReg.lastIndex = lastIndex = parseCloseReg.lastIndex; trimLeftOfNextStr = closeTag[2]; var currentType = prefix === parseOptions.exec ? 'e' : prefix === parseOptions.raw ? 'r' : prefix === parseOptions.interpolate ? 'i' : ''; currentObj = { t: currentType, val: content }; break; } else { var char = closeTag[0]; if (char === '/*') { var commentCloseInd = str.indexOf('*/', parseCloseReg.lastIndex); if (commentCloseInd === -1) { ParseErr('unclosed comment', str, closeTag.index); } parseCloseReg.lastIndex = commentCloseInd; } else if (char === "'") { singleQuoteReg.lastIndex = closeTag.index; var singleQuoteMatch = singleQuoteReg.exec(str); if (singleQuoteMatch) { parseCloseReg.lastIndex = singleQuoteReg.lastIndex; } else { ParseErr('unclosed string', str, closeTag.index); } } else if (char === '"') { doubleQuoteReg.lastIndex = closeTag.index; var doubleQuoteMatch = doubleQuoteReg.exec(str); if (doubleQuoteMatch) { parseCloseReg.lastIndex = doubleQuoteReg.lastIndex; } else { ParseErr('unclosed string', str, closeTag.index); } } else if (char === '`') { templateLitReg.lastIndex = closeTag.index; var templateLitMatch = templateLitReg.exec(str); if (templateLitMatch) { parseCloseReg.lastIndex = templateLitReg.lastIndex; } else { ParseErr('unclosed string', str, closeTag.index); } } } } if (currentObj) { buffer.push(currentObj); } else { ParseErr('unclosed tag', str, m.index + precedingString.length); } } pushString(str.slice(lastIndex, str.length), false); if (config.plugins) { for (var i = 0; i < config.plugins.length; i++) { var plugin = config.plugins[i]; if (plugin.processAST) { buffer = plugin.processAST(buffer, config); } } } return buffer; } /* END TYPES */ /** * Compiles a template string to a function string. Most often users just use `compile()`, which calls `compileToString` and creates a new function using the result * * **Example** * * ```js * compileToString("Hi <%= it.user %>", eta.config) * // "var tR='',include=E.include.bind(E),includeFile=E.includeFile.bind(E);tR+='Hi ';tR+=E.e(it.user);if(cb){cb(null,tR)} return tR" * ``` */ function compileToString(str, config) { var buffer = parse(str, config); var res = "var tR='',__l,__lP" + (config.include ? ',include=E.include.bind(E)' : '') + (config.includeFile ? ',includeFile=E.includeFile.bind(E)' : '') + '\nfunction layout(p,d){__l=p;__lP=d}\n' + (config.globalAwait ? 'const _prs = [];\n' : '') + (config.useWith ? 'with(' + config.varName + '||{}){' : '') + compileScope(buffer, config) + (config.includeFile ? 'if(__l)tR=' + (config.async ? 'await ' : '') + ("includeFile(__l,Object.assign(" + config.varName + ",{body:tR},__lP))\n") : config.include ? 'if(__l)tR=' + (config.async ? 'await ' : '') + ("include(__l,Object.assign(" + config.varName + ",{body:tR},__lP))\n") : '') + 'if(cb){cb(null,tR)} return tR' + (config.useWith ? '}' : ''); if (config.plugins) { for (var i = 0; i < config.plugins.length; i++) { var plugin = config.plugins[i]; if (plugin.processFnString) { res = plugin.processFnString(res, config); } } } return res; } /** * Loops through the AST generated by `parse` and transform each item into JS calls * * **Example** * * ```js * // AST version of 'Hi <%= it.user %>' * let templateAST = ['Hi ', { val: 'it.user', t: 'i' }] * compileScope(templateAST, eta.config) * // "tR+='Hi ';tR+=E.e(it.user);" * ``` */ function compileScope(buff, config) { var i; var buffLength = buff.length; var returnStr = ''; var REPLACEMENT_STR = "rJ2KqXzxQg"; for (i = 0; i < buffLength; i++) { var currentBlock = buff[i]; if (typeof currentBlock === 'string') { var str = currentBlock; // we know string exists returnStr += "tR+='" + str + "'\n"; } else { var type = currentBlock.t; // ~, s, !, ?, r var content = currentBlock.val || ''; if (type === 'r') { // raw if (config.globalAwait) { returnStr += "_prs.push(" + content + ");\n"; returnStr += "tR+='" + REPLACEMENT_STR + "'\n"; } else { if (config.filter) { content = 'E.filter(' + content + ')'; } returnStr += 'tR+=' + content + '\n'; } } else if (type === 'i') { // interpolate if (config.globalAwait) { returnStr += "_prs.push(" + content + ");\n"; returnStr += "tR+='" + REPLACEMENT_STR + "'\n"; } else { if (config.filter) { content = 'E.filter(' + content + ')'; } returnStr += 'tR+=' + content + '\n'; if (config.autoEscape) { content = 'E.e(' + content + ')'; } returnStr += 'tR+=' + content + '\n'; } } else if (type === 'e') { // execute returnStr += content + '\n'; // you need a \n in case you have <% } %> } } } if (config.globalAwait) { returnStr += "const _rst = await Promise.all(_prs);\ntR = tR.replace(/" + REPLACEMENT_STR + "/g, () => _rst.shift());\n"; } return returnStr; } /** * Handles storage and accessing of values * * In this case, we use it to store compiled template functions * Indexed by their `name` or `filename` */ var Cacher = /** @class */ (function () { function Cacher(cache) { this.cache = cache; } Cacher.prototype.define = function (key, val) { this.cache[key] = val; }; Cacher.prototype.get = function (key) { // string | array. // TODO: allow array of keys to look down // TODO: create plugin to allow referencing helpers, filters with dot notation return this.cache[key]; }; Cacher.prototype.remove = function (key) { delete this.cache[key]; }; Cacher.prototype.reset = function () { this.cache = {}; }; Cacher.prototype.load = function (cacheObj) { copyProps(this.cache, cacheObj); }; return Cacher; }()); /* END TYPES */ /** * Eta's template storage * * Stores partials and cached templates */ var templates = new Cacher({}); /* END TYPES */ /** * Include a template based on its name (or filepath, if it's already been cached). * * Called like `include(templateNameOrPath, data)` */ function includeHelper(templateNameOrPath, data) { var template = this.templates.get(templateNameOrPath); if (!template) { throw EtaErr('Could not fetch template "' + templateNameOrPath + '"'); } return template(data, this); } /** Eta's base (global) configuration */ var config = { async: false, autoEscape: true, autoTrim: [false, 'nl'], cache: false, e: XMLEscape, include: includeHelper, parse: { exec: '', interpolate: '=', raw: '~' }, plugins: [], rmWhitespace: false, tags: ['<%', '%>'], templates: templates, useWith: false, varName: 'it' }; /** * Takes one or two partial (not necessarily complete) configuration objects, merges them 1 layer deep into eta.config, and returns the result * * @param override Partial configuration object * @param baseConfig Partial configuration object to merge before `override` * * **Example** * * ```js * let customConfig = getConfig({tags: ['!#', '#!']}) * ``` */ function getConfig(override, baseConfig) { // TODO: run more tests on this var res = {}; // Linked copyProps(res, config); // Creates deep clone of eta.config, 1 layer deep if (baseConfig) { copyProps(res, baseConfig); } if (override) { copyProps(res, override); } return res; } /* END TYPES */ /** * Takes a template string and returns a template function that can be called with (data, config, [cb]) * * @param str - The template string * @param config - A custom configuration object (optional) * * **Example** * * ```js * let compiledFn = eta.compile("Hi <%= it.user %>") * // function anonymous() * let compiledFnStr = compiledFn.toString() * // "function anonymous(it,E,cb\n) {\nvar tR='',include=E.include.bind(E),includeFile=E.includeFile.bind(E);tR+='Hi ';tR+=E.e(it.user);if(cb){cb(null,tR)} return tR\n}" * ``` */ function compile(str, config) { var options = getConfig(config || {}); /* ASYNC HANDLING */ // The below code is modified from mde/ejs. All credit should go to them. var ctor = options.async ? getAsyncFunctionConstructor() : Function; /* END ASYNC HANDLING */ try { return new ctor(options.varName, 'E', // EtaConfig 'cb', // optional callback compileToString(str, options)); // eslint-disable-line no-new-func } catch (e) { if (e instanceof SyntaxError) { throw EtaErr('Bad template syntax\n\n' + e.message + '\n' + Array(e.message.length + 1).join('=') + '\n' + compileToString(str, options) + '\n' // This will put an extra newline before the callstack for extra readability ); } else { throw e; } } } var _BOM = /^\uFEFF/; /* END TYPES */ /** * Get the path to the included file from the parent file path and the * specified path. * * If `name` does not have an extension, it will default to `.eta` * * @param name specified path * @param parentfile parent file path * @param isDirectory whether parentfile is a directory * @return absolute path to template */ function getWholeFilePath(name, parentfile, isDirectory) { var includePath = path__namespace.resolve(isDirectory ? parentfile : path__namespace.dirname(parentfile), // returns directory the parent file is in name // file ) + (path__namespace.extname(name) ? '' : '.eta'); return includePath; } /** * Get the absolute path to an included template * * If this is called with an absolute path (for example, starting with '/' or 'C:\') * then Eta will attempt to resolve the absolute path within options.views. If it cannot, * Eta will fallback to options.root or '/' * * If this is called with a relative path, Eta will: * - Look relative to the current template (if the current template has the `filename` property) * - Look inside each directory in options.views * * Note: if Eta is unable to find a template using path and options, it will throw an error. * * @param path specified path * @param options compilation options * @return absolute path to template */ function getPath(path, options) { var includePath = false; var views = options.views; var searchedPaths = []; // If these four values are the same, // getPath() will return the same result every time. // We can cache the result to avoid expensive // file operations. var pathOptions = JSON.stringify({ filename: options.filename, path: path, root: options.root, views: options.views }); if (options.cache && options.filepathCache && options.filepathCache[pathOptions]) { // Use the cached filepath return options.filepathCache[pathOptions]; } /** Add a filepath to the list of paths we've checked for a template */ function addPathToSearched(pathSearched) { if (!searchedPaths.includes(pathSearched)) { searchedPaths.push(pathSearched); } } /** * Take a filepath (like 'partials/mypartial.eta'). Attempt to find the template file inside `views`; * return the resulting template file path, or `false` to indicate that the template was not found. * * @param views the filepath that holds templates, or an array of filepaths that hold templates * @param path the path to the template */ function searchViews(views, path) { var filePath; // If views is an array, then loop through each directory // And attempt to find the template if (Array.isArray(views) && views.some(function (v) { filePath = getWholeFilePath(path, v, true); addPathToSearched(filePath); return fs.existsSync(filePath); })) { // If the above returned true, we know that the filePath was just set to a path // That exists (Array.some() returns as soon as it finds a valid element) return filePath; } else if (typeof views === 'string') { // Search for the file if views is a single directory filePath = getWholeFilePath(path, views, true); addPathToSearched(filePath); if (fs.existsSync(filePath)) { return filePath; } } // Unable to find a file return false; } // Path starts with '/', 'C:\', etc. var match = /^[A-Za-z]+:\\|^\//.exec(path); // Absolute path, like /partials/partial.eta if (match && match.length) { // We have to trim the beginning '/' off the path, or else // path.resolve(dir, path) will always resolve to just path var formattedPath = path.replace(/^\/*/, ''); // First, try to resolve the path within options.views includePath = searchViews(views, formattedPath); if (!includePath) { // If that fails, searchViews will return false. Try to find the path // inside options.root (by default '/', the base of the filesystem) var pathFromRoot = getWholeFilePath(formattedPath, options.root || '/', true); addPathToSearched(pathFromRoot); includePath = pathFromRoot; } } else { // Relative paths // Look relative to a passed filename first if (options.filename) { var filePath = getWholeFilePath(path, options.filename); addPathToSearched(filePath); if (fs.existsSync(filePath)) { includePath = filePath; } } // Then look for the template in options.views if (!includePath) { includePath = searchViews(views, path); } if (!includePath) { throw EtaErr('Could not find the template "' + path + '". Paths tried: ' + searchedPaths); } } // If caching and filepathCache are enabled, // cache the input & output of this function. if (options.cache && options.filepathCache) { options.filepathCache[pathOptions] = includePath; } return includePath; } /** * Reads a file synchronously */ function readFile(filePath) { try { return fs.readFileSync(filePath).toString().replace(_BOM, ''); // TODO: is replacing BOM's necessary? } catch (_a) { throw EtaErr("Failed to read template at '" + filePath + "'"); } } // express is set like: app.engine('html', require('eta').renderFile) /* END TYPES */ /** * Reads a template, compiles it into a function, caches it if caching isn't disabled, returns the function * * @param filePath Absolute path to template file * @param options Eta configuration overrides * @param noCache Optionally, make Eta not cache the template */ function loadFile(filePath, options, noCache) { var config = getConfig(options); var template = readFile(filePath); try { var compiledTemplate = compile(template, config); if (!noCache) { config.templates.define(config.filename, compiledTemplate); } return compiledTemplate; } catch (e) { throw EtaErr('Loading file: ' + filePath + ' failed:\n\n' + e.message); } } /** * Get the template from a string or a file, either compiled on-the-fly or * read from cache (if enabled), and cache the template if needed. * * If `options.cache` is true, this function reads the file from * `options.filename` so it must be set prior to calling this function. * * @param options compilation options * @return Eta template function */ function handleCache$1(options) { var filename = options.filename; if (options.cache) { var func = options.templates.get(filename); if (func) { return func; } return loadFile(filename, options); } // Caching is disabled, so pass noCache = true return loadFile(filename, options, true); } /** * Get the template function. * * If `options.cache` is `true`, then the template is cached. * * This returns a template function and the config object with which that template function should be called. * * @remarks * * It's important that this returns a config object with `filename` set. * Otherwise, the included file would not be able to use relative paths * * @param path path for the specified file (if relative, specify `views` on `options`) * @param options compilation options * @return [Eta template function, new config object] */ function includeFile(path, options) { // the below creates a new options object, using the parent filepath of the old options object and the path var newFileOptions = getConfig({ filename: getPath(path, options) }, options); // TODO: make sure properties are currectly copied over return [handleCache$1(newFileOptions), newFileOptions]; } /* END TYPES */ /** * Called with `includeFile(path, data)` */ function includeFileHelper(path, data) { var templateAndConfig = includeFile(path, this); return templateAndConfig[0](data, templateAndConfig[1]); } /* END TYPES */ function handleCache(template, options) { if (options.cache && options.name && options.templates.get(options.name)) { return options.templates.get(options.name); } var templateFunc = typeof template === 'function' ? template : compile(template, options); // Note that we don't have to check if it already exists in the cache; // it would have returned earlier if it had if (options.cache && options.name) { options.templates.define(options.name, templateFunc); } return templateFunc; } /** * Render a template * * If `template` is a string, Eta will compile it to a function and then call it with the provided data. * If `template` is a template function, Eta will call it with the provided data. * * If `config.async` is `false`, Eta will return the rendered template. * * If `config.async` is `true` and there's a callback function, Eta will call the callback with `(err, renderedTemplate)`. * If `config.async` is `true` and there's not a callback function, Eta will return a Promise that resolves to the rendered template. * * If `config.cache` is `true` and `config` has a `name` or `filename` property, Eta will cache the template on the first render and use the cached template for all subsequent renders. * * @param template Template string or template function * @param data Data to render the template with * @param config Optional config options * @param cb Callback function */ function render(template, data, config, cb) { var options = getConfig(config || {}); if (options.async) { if (cb) { // If user passes callback try { // Note: if there is an error while rendering the template, // It will bubble up and be caught here var templateFn = handleCache(template, options); templateFn(data, options, cb); } catch (err) { return cb(err); } } else { // No callback, try returning a promise if (typeof promiseImpl === 'function') { return new promiseImpl(function (resolve, reject) { try { resolve(handleCache(template, options)(data, options)); } catch (err) { reject(err); } }); } else { throw EtaErr("Please provide a callback function, this env doesn't support Promises"); } } } else { return handleCache(template, options)(data, options); } } /** * Render a template asynchronously * * If `template` is a string, Eta will compile it to a function and call it with the provided data. * If `template` is a function, Eta will call it with the provided data. * * If there is a callback function, Eta will call it with `(err, renderedTemplate)`. * If there is not a callback function, Eta will return a Promise that resolves to the rendered template * * @param template Template string or template function * @param data Data to render the template with * @param config Optional config options * @param cb Callback function */ function renderAsync(template, data, config, cb) { // Using Object.assign to lower bundle size, using spread operator makes it larger because of typescript injected polyfills return render(template, data, Object.assign({}, config, { async: true }), cb); } // @denoify-ignore config.includeFile = includeFileHelper; config.filepathCache = {}; class InternalModule { constructor(app, plugin) { this.app = app; this.plugin = plugin; this.static_templates = new Map(); this.dynamic_templates = new Map(); } getName() { return this.name; } init() { return __awaiter(this, void 0, void 0, function* () { yield this.createStaticTemplates(); this.static_context = Object.fromEntries(this.static_templates); }); } generateContext(config) { return __awaiter(this, void 0, void 0, function* () { this.config = config; yield this.updateTemplates(); return Object.assign(Object.assign({}, this.static_context), Object.fromEntries(this.dynamic_templates)); }); } } class InternalModuleDate extends InternalModule { constructor() { super(...arguments); this.name = "date"; } createStaticTemplates() { return __awaiter(this, void 0, void 0, function* () { this.static_templates.set("now", this.generate_now()); this.static_templates.set("tomorrow", this.generate_tomorrow()); this.static_templates.set("weekday", this.generate_weekday()); this.static_templates.set("yesterday", this.generate_yesterday()); }); } updateTemplates() { return __awaiter(this, void 0, void 0, function* () { }); } generate_now() { return (format = "YYYY-MM-DD", offset, reference, reference_format) => { if (reference && !window.moment(reference, reference_format).isValid()) { throw new TemplaterError("Invalid reference date format, try specifying one with the argument 'reference_format'"); } let duration; if (typeof offset === "string") { duration = window.moment.duration(offset); } else if (typeof offset === "number") { duration = window.moment.duration(offset, "days"); } return window.moment(reference, reference_format).add(duration).format(format); }; } generate_tomorrow() { return (format = "YYYY-MM-DD") => { return window.moment().add(1, 'days').format(format); }; } generate_weekday() { return (format = "YYYY-MM-DD", weekday, reference, reference_format) => { if (reference && !window.moment(reference, reference_format).isValid()) { throw new TemplaterError("Invalid reference date format, try specifying one with the argument 'reference_format'"); } return window.moment(reference, reference_format).weekday(weekday).format(format); }; } generate_yesterday() { return (format = "YYYY-MM-DD") => { return window.moment().add(-1, 'days').format(format); }; } } const DEPTH_LIMIT = 10; class InternalModuleFile extends InternalModule { constructor() { super(...arguments); this.name = "file"; this.include_depth = 0; this.create_new_depth = 0; this.linkpath_regex = new RegExp("^\\[\\[(.*)\\]\\]$"); } createStaticTemplates() { return __awaiter(this, void 0, void 0, function* () { this.static_templates.set("creation_date", this.generate_creation_date()); this.static_templates.set("create_new", this.generate_create_new()); this.static_templates.set("cursor", this.generate_cursor()); this.static_templates.set("cursor_append", this.generate_cursor_append()); this.static_templates.set("exists", this.generate_exists()); this.static_templates.set("find_tfile", this.generate_find_tfile()); this.static_templates.set("folder", this.generate_folder()); this.static_templates.set("include", this.generate_include()); this.static_templates.set("last_modified_date", this.generate_last_modified_date()); this.static_templates.set("move", this.generate_move()); this.static_templates.set("path", this.generate_path()); this.static_templates.set("rename", this.generate_rename()); this.static_templates.set("selection", this.generate_selection()); }); } updateTemplates() { return __awaiter(this, void 0, void 0, function* () { this.dynamic_templates.set("content", yield this.generate_content()); this.dynamic_templates.set("tags", this.generate_tags()); this.dynamic_templates.set("title", this.generate_title()); }); } generate_content() { return __awaiter(this, void 0, void 0, function* () { return yield this.app.vault.read(this.config.target_file); }); } generate_create_new() { return (template, filename, open_new = false, folder) => __awaiter(this, void 0, void 0, function* () { this.create_new_depth += 1; if (this.create_new_depth > DEPTH_LIMIT) { this.create_new_depth = 0; throw new TemplaterError("Reached create_new depth limit (max = 10)"); } const new_file = yield this.plugin.templater.create_new_note_from_template(template, folder, filename, open_new); this.create_new_depth -= 1; return new_file; }); } generate_creation_date() { return (format = "YYYY-MM-DD HH:mm") => { return window.moment(this.config.target_file.stat.ctime).format(format); }; } generate_cursor() { return (order) => { // Hack to prevent empty output return `<% tp.file.cursor(${order !== null && order !== void 0 ? order : ''}) %>`; }; } generate_cursor_append() { return (content) => { const active_view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (active_view === null) { this.plugin.log_error(new TemplaterError("No active view, can't append to cursor.")); return; } const editor = active_view.editor; const doc = editor.getDoc(); doc.replaceSelection(content); return ""; }; } generate_exists() { return (filename) => { // TODO: Remove this, only here to support the old way let match; if ((match = this.linkpath_regex.exec(filename)) !== null) { filename = match[1]; } const file = this.app.metadataCache.getFirstLinkpathDest(filename, ""); return file != null; }; } generate_find_tfile() { return (filename) => { const path = obsidian.normalizePath(filename); return this.app.metadataCache.getFirstLinkpathDest(path, ""); }; } generate_folder() { return (relative = false) => { let parent = this.config.target_file.parent; let folder; if (relative) { folder = parent.path; } else { folder = parent.name; } return folder; }; } generate_include() { return (include_link) => __awaiter(this, void 0, void 0, function* () { var _a; // TODO: Add mutex for this, this may currently lead to a race condition. // While not very impactful, that could still be annoying. this.include_depth += 1; if (this.include_depth > DEPTH_LIMIT) { this.include_depth = 0; throw new TemplaterError("Reached inclusion depth limit (max = 10)"); } let inc_file_content; if (include_link instanceof obsidian.TFile) { inc_file_content = yield this.app.vault.read(include_link); } else { let match; if ((match = this.linkpath_regex.exec(include_link)) === null) { throw new TemplaterError("Invalid file format, provide an obsidian link between quotes."); } const { path, subpath } = obsidian.parseLinktext(match[1]); const inc_file = this.app.metadataCache.getFirstLinkpathDest(path, ""); if (!inc_file) { throw new TemplaterError(`File ${include_link} doesn't exist`); } inc_file_content = yield this.app.vault.read(inc_file); if (subpath) { const cache = this.app.metadataCache.getFileCache(inc_file); if (cache) { const result = obsidian.resolveSubpath(cache, subpath); if (result) { inc_file_content = inc_file_content.slice(result.start.offset, (_a = result.end) === null || _a === void 0 ? void 0 : _a.offset); } } } } const parsed_content = yield this.plugin.templater.parser.parseTemplates(inc_file_content); this.include_depth -= 1; return parsed_content; }); } generate_last_modified_date() { return (format = "YYYY-MM-DD HH:mm") => { return window.moment(this.config.target_file.stat.mtime).format(format); }; } generate_move() { return (path) => __awaiter(this, void 0, void 0, function* () { const new_path = obsidian.normalizePath(`${path}.${this.config.target_file.extension}`); yield this.app.fileManager.renameFile(this.config.target_file, new_path); return ""; }); } generate_path() { return (relative = false) => { // TODO: Add mobile support if (obsidian.Platform.isMobileApp) { return UNSUPPORTED_MOBILE_TEMPLATE; } if (!(this.app.vault.adapter instanceof obsidian.FileSystemAdapter)) { throw new TemplaterError("app.vault is not a FileSystemAdapter instance"); } const vault_path = this.app.vault.adapter.getBasePath(); if (relative) { return this.config.target_file.path; } else { return `${vault_path}/${this.config.target_file.path}`; } }; } generate_rename() { return (new_title) => __awaiter(this, void 0, void 0, function* () { if (new_title.match(/[\\\/:]+/g)) { throw new TemplaterError("File name cannot contain any of these characters: \\ / :"); } const new_path = obsidian.normalizePath(`${this.config.target_file.parent.path}/${new_title}.${this.config.target_file.extension}`); yield this.app.fileManager.renameFile(this.config.target_file, new_path); return ""; }); } generate_selection() { return () => { const active_view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (active_view == null) { throw new TemplaterError("Active view is null, can't read selection."); } const editor = active_view.editor; return editor.getSelection(); }; } // TODO: Turn this into a function generate_tags() { const cache = this.app.metadataCache.getFileCache(this.config.target_file); return obsidian.getAllTags(cache); } // TODO: Turn this into a function generate_title() { return this.config.target_file.basename; } } class InternalModuleWeb extends InternalModule { constructor() { super(...arguments); this.name = "web"; } createStaticTemplates() { return __awaiter(this, void 0, void 0, function* () { this.static_templates.set("daily_quote", this.generate_daily_quote()); this.static_templates.set("random_picture", this.generate_random_picture()); //this.static_templates.set("get_request", this.generate_get_request()); }); } updateTemplates() { return __awaiter(this, void 0, void 0, function* () { }); } getRequest(url) { return __awaiter(this, void 0, void 0, function* () { let response = yield fetch(url); if (!response.ok) { throw new TemplaterError("Error performing GET request"); } return response; }); } generate_daily_quote() { return () => __awaiter(this, void 0, void 0, function* () { let response = yield this.getRequest("https://quotes.rest/qod"); let json = yield response.json(); let author = json.contents.quotes[0].author; let quote = json.contents.quotes[0].quote; let new_content = `> ${quote}\n> — ${author}`; return new_content; }); } generate_random_picture() { return (size, query) => __awaiter(this, void 0, void 0, function* () { let response = yield this.getRequest(`https://source.unsplash.com/random/${size !== null && size !== void 0 ? size : ''}?${query !== null && query !== void 0 ? query : ''}`); let url = response.url; return `![tp.web.random_picture](${url})`; }); } generate_get_request() { return (url) => __awaiter(this, void 0, void 0, function* () { let response = yield this.getRequest(url); let json = yield response.json(); return json; }); } } class InternalModuleFrontmatter extends InternalModule { constructor() { super(...arguments); this.name = "frontmatter"; } createStaticTemplates() { return __awaiter(this, void 0, void 0, function* () { }); } updateTemplates() { return __awaiter(this, void 0, void 0, function* () { const cache = this.app.metadataCache.getFileCache(this.config.target_file); this.dynamic_templates = new Map(Object.entries((cache === null || cache === void 0 ? void 0 : cache.frontmatter) || {})); }); } } class PromptModal extends obsidian.Modal { constructor(app, prompt_text, default_value) { super(app); this.prompt_text = prompt_text; this.default_value = default_value; this.submitted = false; } onOpen() { this.titleEl.setText(this.prompt_text); this.createForm(); } onClose() { this.contentEl.empty(); if (!this.submitted) { this.reject(new TemplaterError("Cancelled prompt")); } } createForm() { var _a; const div = this.contentEl.createDiv(); div.addClass("templater-prompt-div"); const form = div.createEl("form"); form.addClass("templater-prompt-form"); form.type = "submit"; form.onsubmit = (e) => { this.submitted = true; e.preventDefault(); this.resolve(this.promptEl.value); this.close(); }; this.promptEl = form.createEl("input"); this.promptEl.type = "text"; this.promptEl.placeholder = "Type text here..."; this.promptEl.value = (_a = this.default_value) !== null && _a !== void 0 ? _a : ""; this.promptEl.addClass("templater-prompt-input"); this.promptEl.select(); } openAndGetValue(resolve, reject) { return __awaiter(this, void 0, void 0, function* () { this.resolve = resolve; this.reject = reject; this.open(); }); } } class SuggesterModal extends obsidian.FuzzySuggestModal { constructor(app, text_items, items, placeholder) { super(app); this.text_items = text_items; this.items = items; this.submitted = false; this.setPlaceholder(placeholder); } getItems() { return this.items; } onClose() { if (!this.submitted) { this.reject(new TemplaterError("Cancelled prompt")); } } selectSuggestion(value, evt) { this.submitted = true; this.close(); this.onChooseSuggestion(value, evt); } getItemText(item) { if (this.text_items instanceof Function) { return this.text_items(item); } return this.text_items[this.items.indexOf(item)] || "Undefined Text Item"; } onChooseItem(item, _evt) { this.resolve(item); } openAndGetValue(resolve, reject) { return __awaiter(this, void 0, void 0, function* () { this.resolve = resolve; this.reject = reject; this.open(); }); } } class InternalModuleSystem extends InternalModule { constructor() { super(...arguments); this.name = "system"; } createStaticTemplates() { return __awaiter(this, void 0, void 0, function* () { this.static_templates.set("clipboard", this.generate_clipboard()); this.static_templates.set("prompt", this.generate_prompt()); this.static_templates.set("suggester", this.generate_suggester()); }); } updateTemplates() { return __awaiter(this, void 0, void 0, function* () { }); } generate_clipboard() { return () => __awaiter(this, void 0, void 0, function* () { // TODO: Add mobile support if (obsidian.Platform.isMobileApp) { return UNSUPPORTED_MOBILE_TEMPLATE; } return yield navigator.clipboard.readText(); }); } generate_prompt() { return (prompt_text, default_value, throw_on_cancel = false) => __awaiter(this, void 0, void 0, function* () { const prompt = new PromptModal(this.app, prompt_text, default_value); const promise = new Promise((resolve, reject) => prompt.openAndGetValue(resolve, reject)); try { return yield promise; } catch (error) { if (throw_on_cancel) { throw error; } return null; } }); } generate_suggester() { return (text_items, items, throw_on_cancel = false, placeholder = "") => __awaiter(this, void 0, void 0, function* () { const suggester = new SuggesterModal(this.app, text_items, items, placeholder); const promise = new Promise((resolve, reject) => suggester.openAndGetValue(resolve, reject)); try { return yield promise; } catch (error) { if (throw_on_cancel) { throw error; } return null; } }); } } class InternalModuleConfig extends InternalModule { constructor() { super(...arguments); this.name = "config"; } createStaticTemplates() { return __awaiter(this, void 0, void 0, function* () { }); } updateTemplates() { return __awaiter(this, void 0, void 0, function* () { }); } generateContext(config) { return __awaiter(this, void 0, void 0, function* () { return config; }); } } class InternalTemplateParser { constructor(app, plugin) { this.app = app; this.plugin = plugin; this.modules_array = new Array(); this.modules_array.push(new InternalModuleDate(this.app, this.plugin)); this.modules_array.push(new InternalModuleFile(this.app, this.plugin)); this.modules_array.push(new InternalModuleWeb(this.app, this.plugin)); this.modules_array.push(new InternalModuleFrontmatter(this.app, this.plugin)); this.modules_array.push(new InternalModuleSystem(this.app, this.plugin)); this.modules_array.push(new InternalModuleConfig(this.app, this.plugin)); } init() { return __awaiter(this, void 0, void 0, function* () { for (const mod of this.modules_array) { yield mod.init(); } }); } generateContext(config) { return __awaiter(this, void 0, void 0, function* () { const modules_context = {}; for (const mod of this.modules_array) { modules_context[mod.getName()] = yield mod.generateContext(config); } return modules_context; }); } } class UserTemplateParser { constructor(app, plugin) { this.app = app; this.plugin = plugin; this.user_system_command_functions = new Map(); this.user_script_functions = new Map(); this.setup(); } setup() { if (obsidian.Platform.isMobileApp || !(this.app.vault.adapter instanceof obsidian.FileSystemAdapter)) { this.cwd = ""; } else { this.cwd = this.app.vault.adapter.getBasePath(); this.exec_promise = util.promisify(child_process.exec); } } init() { return __awaiter(this, void 0, void 0, function* () { }); } generate_user_script_functions(config) { return __awaiter(this, void 0, void 0, function* () { let files = getTFilesFromFolder(this.app, this.plugin.settings.script_folder); for (let file of files) { if (file.extension.toLowerCase() === "js") { yield this.load_user_script_function(config, file); } } }); } load_user_script_function(config, file) { return __awaiter(this, void 0, void 0, function* () { if (!(this.app.vault.adapter instanceof obsidian.FileSystemAdapter)) { throw new TemplaterError("app.vault is not a FileSystemAdapter instance"); } let vault_path = this.app.vault.adapter.getBasePath(); let file_path = `${vault_path}/${file.path}`; // https://stackoverflow.com/questions/26633901/reload-module-at-runtime // https://stackoverflow.com/questions/1972242/how-to-auto-reload-files-in-node-js if (Object.keys(window.require.cache).contains(file_path)) { delete window.require.cache[window.require.resolve(file_path)]; } const user_function = yield Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(file_path)); }); if (!user_function.default) { throw new TemplaterError(`Failed to load user script ${file_path}. No exports detected.`); } if (!(user_function.default instanceof Function)) { throw new TemplaterError(`Failed to load user script ${file_path}. Default export is not a function.`); } this.user_script_functions.set(`${file.basename}`, user_function.default); }); } // TODO: Add mobile support generate_system_command_user_functions(config) { return __awaiter(this, void 0, void 0, function* () { const context = yield this.plugin.templater.parser.generateContext(config, ContextMode.INTERNAL); for (let [template, cmd] of this.plugin.settings.templates_pairs) { if (template === "" || cmd === "") { continue; } if (obsidian.Platform.isMobileApp) { this.user_system_command_functions.set(template, (user_args) => { return UNSUPPORTED_MOBILE_TEMPLATE; }); } else { cmd = yield this.plugin.templater.parser.parseTemplates(cmd, context); this.user_system_command_functions.set(template, (user_args) => __awaiter(this, void 0, void 0, function* () { const process_env = Object.assign(Object.assign({}, process.env), user_args); const cmd_options = Object.assign({ timeout: this.plugin.settings.command_timeout * 1000, cwd: this.cwd, env: process_env }, (this.plugin.settings.shell_path !== "" && { shell: this.plugin.settings.shell_path })); try { const { stdout } = yield this.exec_promise(cmd, cmd_options); return stdout.trimRight(); } catch (error) { throw new TemplaterError(`Error with User Template ${template}`, error); } })); } } }); } generateContext(config) { return __awaiter(this, void 0, void 0, function* () { this.user_system_command_functions.clear(); this.user_script_functions.clear(); if (this.plugin.settings.enable_system_commands) { yield this.generate_system_command_user_functions(config); } // TODO: Add mobile support if (obsidian.Platform.isDesktopApp && this.plugin.settings.script_folder) { yield this.generate_user_script_functions(config); } return Object.assign(Object.assign({}, Object.fromEntries(this.user_system_command_functions)), Object.fromEntries(this.user_script_functions)); }); } } var ContextMode; (function (ContextMode) { ContextMode[ContextMode["INTERNAL"] = 0] = "INTERNAL"; ContextMode[ContextMode["USER_INTERNAL"] = 1] = "USER_INTERNAL"; })(ContextMode || (ContextMode = {})); class TemplateParser { constructor(app, plugin) { this.app = app; this.plugin = plugin; this.internalTemplateParser = new InternalTemplateParser(this.app, this.plugin); this.userTemplateParser = new UserTemplateParser(this.app, this.plugin); } init() { return __awaiter(this, void 0, void 0, function* () { yield this.internalTemplateParser.init(); yield this.userTemplateParser.init(); }); } setCurrentContext(config, context_mode) { return __awaiter(this, void 0, void 0, function* () { this.current_context = yield this.generateContext(config, context_mode); }); } additionalContext() { return { obsidian: obsidian_module, }; } generateContext(config, context_mode = ContextMode.USER_INTERNAL) { return __awaiter(this, void 0, void 0, function* () { const context = {}; const additional_context = this.additionalContext(); const internal_context = yield this.internalTemplateParser.generateContext(config); let user_context = {}; if (!this.current_context) { // If a user system command is using tp.file.include, we need the context to be set. this.current_context = internal_context; } Object.assign(context, additional_context); switch (context_mode) { case ContextMode.INTERNAL: Object.assign(context, internal_context); break; case ContextMode.USER_INTERNAL: user_context = yield this.userTemplateParser.generateContext(config); Object.assign(context, Object.assign(Object.assign({}, internal_context), { user: user_context })); break; } return context; }); } parseTemplates(content, context) { return __awaiter(this, void 0, void 0, function* () { if (!context) { context = this.current_context; } content = (yield renderAsync(content, context, { varName: "tp", parse: { exec: "*", interpolate: "~", raw: "", }, autoTrim: false, globalAwait: true, })); return content; }); } } var RunMode; (function (RunMode) { RunMode[RunMode["CreateNewFromTemplate"] = 0] = "CreateNewFromTemplate"; RunMode[RunMode["AppendActiveFile"] = 1] = "AppendActiveFile"; RunMode[RunMode["OverwriteFile"] = 2] = "OverwriteFile"; RunMode[RunMode["OverwriteActiveFile"] = 3] = "OverwriteActiveFile"; RunMode[RunMode["DynamicProcessor"] = 4] = "DynamicProcessor"; })(RunMode || (RunMode = {})); class Templater { constructor(app, plugin) { this.app = app; this.plugin = plugin; this.cursor_jumper = new CursorJumper(this.app); this.parser = new TemplateParser(this.app, this.plugin); } setup() { return __awaiter(this, void 0, void 0, function* () { yield this.parser.init(); }); } create_running_config(template_file, target_file, run_mode) { return { template_file: template_file, target_file: target_file, run_mode: run_mode, }; } read_and_parse_template(config) { return __awaiter(this, void 0, void 0, function* () { const template_content = yield this.app.vault.read(config.template_file); return this.parse_template(config, template_content); }); } parse_template(config, template_content) { return __awaiter(this, void 0, void 0, function* () { yield this.parser.setCurrentContext(config, ContextMode.USER_INTERNAL); const content = yield this.parser.parseTemplates(template_content); return content; }); } create_new_note_from_template(template, folder, filename, open_new_note = true) { return __awaiter(this, void 0, void 0, function* () { if (!folder) { folder = this.app.fileManager.getNewFileParent(""); } // TODO: Change that, not stable atm // @ts-ignore const created_note = yield this.app.fileManager.createNewMarkdownFile(folder, filename !== null && filename !== void 0 ? filename : "Untitled"); let running_config; let output_content; if (template instanceof obsidian.TFile) { running_config = this.create_running_config(template, created_note, RunMode.CreateNewFromTemplate); output_content = yield this.plugin.errorWrapper(() => __awaiter(this, void 0, void 0, function* () { return this.read_and_parse_template(running_config); })); } else { running_config = this.create_running_config(undefined, created_note, RunMode.CreateNewFromTemplate); output_content = yield this.plugin.errorWrapper(() => __awaiter(this, void 0, void 0, function* () { return this.parse_template(running_config, template); })); } if (output_content == null) { yield this.app.vault.delete(created_note); return; } yield this.app.vault.modify(created_note, output_content); if (open_new_note) { const active_leaf = this.app.workspace.activeLeaf; if (!active_leaf) { this.plugin.log_error(new TemplaterError("No active leaf")); return; } yield active_leaf.openFile(created_note, { state: { mode: 'source' }, eState: { rename: 'all' } }); yield this.cursor_jumper.jump_to_next_cursor_location(); } return created_note; }); } append_template(template_file) { return __awaiter(this, void 0, void 0, function* () { const active_view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (active_view === null) { this.plugin.log_error(new TemplaterError("No active view, can't append templates.")); return; } const running_config = this.create_running_config(template_file, active_view.file, RunMode.AppendActiveFile); const output_content = yield this.plugin.errorWrapper(() => __awaiter(this, void 0, void 0, function* () { return this.read_and_parse_template(running_config); })); if (output_content == null) { return; } const editor = active_view.editor; const doc = editor.getDoc(); doc.replaceSelection(output_content); yield this.cursor_jumper.jump_to_next_cursor_location(); }); } overwrite_active_file_templates() { const active_view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (active_view === null) { this.plugin.log_error(new TemplaterError("Active view is null, can't overwrite content")); return; } this.overwrite_file_templates(active_view.file, true); } overwrite_file_templates(file, active_file = false) { return __awaiter(this, void 0, void 0, function* () { const running_config = this.create_running_config(file, file, active_file ? RunMode.OverwriteActiveFile : RunMode.OverwriteFile); const output_content = yield this.plugin.errorWrapper(() => __awaiter(this, void 0, void 0, function* () { return this.read_and_parse_template(running_config); })); if (output_content == null) { return; } yield this.app.vault.modify(file, output_content); if (this.app.workspace.getActiveFile() === file) { yield this.cursor_jumper.jump_to_next_cursor_location(); } }); } process_dynamic_templates(el, ctx) { return __awaiter(this, void 0, void 0, function* () { const dynamic_command_regex = /(<%(?:-|_)?\s*[*~]{0,1})\+((?:.|\s)*?%>)/g; const walker = document.createNodeIterator(el, NodeFilter.SHOW_TEXT); let node; let pass = false; while ((node = walker.nextNode())) { let content = node.nodeValue; let match; if ((match = dynamic_command_regex.exec(content)) != null) { const file = this.app.metadataCache.getFirstLinkpathDest("", ctx.sourcePath); if (!file || !(file instanceof obsidian.TFile)) { return; } if (!pass) { pass = true; const running_config = this.create_running_config(file, file, RunMode.DynamicProcessor); yield this.parser.setCurrentContext(running_config, ContextMode.USER_INTERNAL); } while (match != null) { // Not the most efficient way to exclude the '+' from the command but I couldn't find something better const complete_command = match[1] + match[2]; const command_output = yield this.plugin.errorWrapper(() => __awaiter(this, void 0, void 0, function* () { return yield this.parser.parseTemplates(complete_command); })); if (command_output == null) { return; } let start = dynamic_command_regex.lastIndex - match[0].length; let end = dynamic_command_regex.lastIndex; content = content.substring(0, start) + command_output + content.substring(end); dynamic_command_regex.lastIndex += (command_output.length - match[0].length); match = dynamic_command_regex.exec(content); } node.nodeValue = content; } } }); } } // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { mod(window.CodeMirror); })(function(CodeMirror) { CodeMirror.defineMode("javascript", function(config, parserConfig) { var indentUnit = config.indentUnit; var statementIndent = parserConfig.statementIndent; var jsonldMode = parserConfig.jsonld; var jsonMode = parserConfig.json || jsonldMode; var trackScope = parserConfig.trackScope !== false; var isTS = parserConfig.typescript; var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/; // Tokenizer var keywords = function(){ function kw(type) {return {type: type, style: "keyword"};} var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d"); var operator = kw("operator"), atom = {type: "atom", style: "atom"}; return { "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C, "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"), "function": kw("function"), "catch": kw("catch"), "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), "in": operator, "typeof": operator, "instanceof": operator, "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, "this": kw("this"), "class": kw("class"), "super": kw("atom"), "yield": C, "export": kw("export"), "import": kw("import"), "extends": C, "await": C }; }(); var isOperatorChar = /[+\-*&%=<>!?|~^@]/; var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; function readRegexp(stream) { var escaped = false, next, inSet = false; while ((next = stream.next()) != null) { if (!escaped) { if (next == "/" && !inSet) return; if (next == "[") inSet = true; else if (inSet && next == "]") inSet = false; } escaped = !escaped && next == "\\"; } } // Used as scratch variables to communicate multiple values without // consing up tons of objects. var type, content; function ret(tp, style, cont) { type = tp; content = cont; return style; } function tokenBase(stream, state) { var ch = stream.next(); if (ch == '"' || ch == "'") { state.tokenize = tokenString(ch); return state.tokenize(stream, state); } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) { return ret("number", "number"); } else if (ch == "." && stream.match("..")) { return ret("spread", "meta"); } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { return ret(ch); } else if (ch == "=" && stream.eat(">")) { return ret("=>", "operator"); } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) { return ret("number", "number"); } else if (/\d/.test(ch)) { stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/); return ret("number", "number"); } else if (ch == "/") { if (stream.eat("*")) { state.tokenize = tokenComment; return tokenComment(stream, state); } else if (stream.eat("/")) { stream.skipToEnd(); return ret("comment", "comment"); } else if (expressionAllowed(stream, state, 1)) { readRegexp(stream); stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/); return ret("regexp", "string-2"); } else { stream.eat("="); return ret("operator", "operator", stream.current()); } } else if (ch == "`") { state.tokenize = tokenQuasi; return tokenQuasi(stream, state); } else if (ch == "#" && stream.peek() == "!") { stream.skipToEnd(); return ret("meta", "meta"); } else if (ch == "#" && stream.eatWhile(wordRE)) { return ret("variable", "property") } else if (ch == "<" && stream.match("!--") || (ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) { stream.skipToEnd(); return ret("comment", "comment") } else if (isOperatorChar.test(ch)) { if (ch != ">" || !state.lexical || state.lexical.type != ">") { if (stream.eat("=")) { if (ch == "!" || ch == "=") stream.eat("="); } else if (/[<>*+\-|&?]/.test(ch)) { stream.eat(ch); if (ch == ">") stream.eat(ch); } } if (ch == "?" && stream.eat(".")) return ret(".") return ret("operator", "operator", stream.current()); } else if (wordRE.test(ch)) { stream.eatWhile(wordRE); var word = stream.current(); if (state.lastType != ".") { if (keywords.propertyIsEnumerable(word)) { var kw = keywords[word]; return ret(kw.type, kw.style, word) } if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false)) return ret("async", "keyword", word) } return ret("variable", "variable", word) } } function tokenString(quote) { return function(stream, state) { var escaped = false, next; if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){ state.tokenize = tokenBase; return ret("jsonld-keyword", "meta"); } while ((next = stream.next()) != null) { if (next == quote && !escaped) break; escaped = !escaped && next == "\\"; } if (!escaped) state.tokenize = tokenBase; return ret("string", "string"); }; } function tokenComment(stream, state) { var maybeEnd = false, ch; while (ch = stream.next()) { if (ch == "/" && maybeEnd) { state.tokenize = tokenBase; break; } maybeEnd = (ch == "*"); } return ret("comment", "comment"); } function tokenQuasi(stream, state) { var escaped = false, next; while ((next = stream.next()) != null) { if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { state.tokenize = tokenBase; break; } escaped = !escaped && next == "\\"; } return ret("quasi", "string-2", stream.current()); } var brackets = "([{}])"; // This is a crude lookahead trick to try and notice that we're // parsing the argument patterns for a fat-arrow function before we // actually hit the arrow token. It only works if the arrow is on // the same line as the arguments and there's no strange noise // (comments) in between. Fallback is to only notice when we hit the // arrow, and not declare the arguments as locals for the arrow // body. function findFatArrow(stream, state) { if (state.fatArrowAt) state.fatArrowAt = null; var arrow = stream.string.indexOf("=>", stream.start); if (arrow < 0) return; if (isTS) { // Try to skip TypeScript return type declarations after the arguments var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow)); if (m) arrow = m.index; } var depth = 0, sawSomething = false; for (var pos = arrow - 1; pos >= 0; --pos) { var ch = stream.string.charAt(pos); var bracket = brackets.indexOf(ch); if (bracket >= 0 && bracket < 3) { if (!depth) { ++pos; break; } if (--depth == 0) { if (ch == "(") sawSomething = true; break; } } else if (bracket >= 3 && bracket < 6) { ++depth; } else if (wordRE.test(ch)) { sawSomething = true; } else if (/["'\/`]/.test(ch)) { for (;; --pos) { if (pos == 0) return var next = stream.string.charAt(pos - 1); if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break } } } else if (sawSomething && !depth) { ++pos; break; } } if (sawSomething && !depth) state.fatArrowAt = pos; } // Parser var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "import": true, "jsonld-keyword": true}; function JSLexical(indented, column, type, align, prev, info) { this.indented = indented; this.column = column; this.type = type; this.prev = prev; this.info = info; if (align != null) this.align = align; } function inScope(state, varname) { if (!trackScope) return false for (var v = state.localVars; v; v = v.next) if (v.name == varname) return true; for (var cx = state.context; cx; cx = cx.prev) { for (var v = cx.vars; v; v = v.next) if (v.name == varname) return true; } } function parseJS(state, style, type, content, stream) { var cc = state.cc; // Communicate our context to the combinators. // (Less wasteful than consing up a hundred closures on every call.) cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style; if (!state.lexical.hasOwnProperty("align")) state.lexical.align = true; while(true) { var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; if (combinator(type, content)) { while(cc.length && cc[cc.length - 1].lex) cc.pop()(); if (cx.marked) return cx.marked; if (type == "variable" && inScope(state, content)) return "variable-2"; return style; } } } // Combinator utils var cx = {state: null, column: null, marked: null, cc: null}; function pass() { for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); } function cont() { pass.apply(null, arguments); return true; } function inList(name, list) { for (var v = list; v; v = v.next) if (v.name == name) return true return false; } function register(varname) { var state = cx.state; cx.marked = "def"; if (!trackScope) return if (state.context) { if (state.lexical.info == "var" && state.context && state.context.block) { // FIXME function decls are also not block scoped var newContext = registerVarScoped(varname, state.context); if (newContext != null) { state.context = newContext; return } } else if (!inList(varname, state.localVars)) { state.localVars = new Var(varname, state.localVars); return } } // Fall through means this is global if (parserConfig.globalVars && !inList(varname, state.globalVars)) state.globalVars = new Var(varname, state.globalVars); } function registerVarScoped(varname, context) { if (!context) { return null } else if (context.block) { var inner = registerVarScoped(varname, context.prev); if (!inner) return null if (inner == context.prev) return context return new Context(inner, context.vars, true) } else if (inList(varname, context.vars)) { return context } else { return new Context(context.prev, new Var(varname, context.vars), false) } } function isModifier(name) { return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly" } // Combinators function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block; } function Var(name, next) { this.name = name; this.next = next; } var defaultVars = new Var("this", new Var("arguments", null)); function pushcontext() { cx.state.context = new Context(cx.state.context, cx.state.localVars, false); cx.state.localVars = defaultVars; } function pushblockcontext() { cx.state.context = new Context(cx.state.context, cx.state.localVars, true); cx.state.localVars = null; } function popcontext() { cx.state.localVars = cx.state.context.vars; cx.state.context = cx.state.context.prev; } popcontext.lex = true; function pushlex(type, info) { var result = function() { var state = cx.state, indent = state.indented; if (state.lexical.type == "stat") indent = state.lexical.indented; else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) indent = outer.indented; state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); }; result.lex = true; return result; } function poplex() { var state = cx.state; if (state.lexical.prev) { if (state.lexical.type == ")") state.indented = state.lexical.indented; state.lexical = state.lexical.prev; } } poplex.lex = true; function expect(wanted) { function exp(type) { if (type == wanted) return cont(); else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass(); else return cont(exp); } return exp; } function statement(type, value) { if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex); if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex); if (type == "keyword b") return cont(pushlex("form"), statement, poplex); if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex); if (type == "debugger") return cont(expect(";")); if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext); if (type == ";") return cont(); if (type == "if") { if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) cx.state.cc.pop()(); return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse); } if (type == "function") return cont(functiondef); if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex); if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form", type == "class" ? type : value), className, poplex) } if (type == "variable") { if (isTS && value == "declare") { cx.marked = "keyword"; return cont(statement) } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) { cx.marked = "keyword"; if (value == "enum") return cont(enumdef); else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";")); else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex) } else if (isTS && value == "namespace") { cx.marked = "keyword"; return cont(pushlex("form"), expression, statement, poplex) } else if (isTS && value == "abstract") { cx.marked = "keyword"; return cont(statement) } else { return cont(pushlex("stat"), maybelabel); } } if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext, block, poplex, poplex, popcontext); if (type == "case") return cont(expression, expect(":")); if (type == "default") return cont(expect(":")); if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext); if (type == "export") return cont(pushlex("stat"), afterExport, poplex); if (type == "import") return cont(pushlex("stat"), afterImport, poplex); if (type == "async") return cont(statement) if (value == "@") return cont(expression, statement) return pass(pushlex("stat"), expression, expect(";"), poplex); } function maybeCatchBinding(type) { if (type == "(") return cont(funarg, expect(")")) } function expression(type, value) { return expressionInner(type, value, false); } function expressionNoComma(type, value) { return expressionInner(type, value, true); } function parenExpr(type) { if (type != "(") return pass() return cont(pushlex(")"), maybeexpression, expect(")"), poplex) } function expressionInner(type, value, noComma) { if (cx.state.fatArrowAt == cx.stream.start) { var body = noComma ? arrowBodyNoComma : arrowBody; if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext); else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext); } var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); if (type == "function") return cont(functiondef, maybeop); if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); } if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression); if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop); if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop); if (type == "{") return contCommasep(objprop, "}", null, maybeop); if (type == "quasi") return pass(quasi, maybeop); if (type == "new") return cont(maybeTarget(noComma)); return cont(); } function maybeexpression(type) { if (type.match(/[;\}\)\],]/)) return pass(); return pass(expression); } function maybeoperatorComma(type, value) { if (type == ",") return cont(maybeexpression); return maybeoperatorNoComma(type, value, false); } function maybeoperatorNoComma(type, value, noComma) { var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; var expr = noComma == false ? expression : expressionNoComma; if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); if (type == "operator") { if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me); if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false)) return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me); if (value == "?") return cont(expression, expect(":"), expr); return cont(expr); } if (type == "quasi") { return pass(quasi, me); } if (type == ";") return; if (type == "(") return contCommasep(expressionNoComma, ")", "call", me); if (type == ".") return cont(property, me); if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) } if (type == "regexp") { cx.state.lastType = cx.marked = "operator"; cx.stream.backUp(cx.stream.pos - cx.stream.start - 1); return cont(expr) } } function quasi(type, value) { if (type != "quasi") return pass(); if (value.slice(value.length - 2) != "${") return cont(quasi); return cont(maybeexpression, continueQuasi); } function continueQuasi(type) { if (type == "}") { cx.marked = "string-2"; cx.state.tokenize = tokenQuasi; return cont(quasi); } } function arrowBody(type) { findFatArrow(cx.stream, cx.state); return pass(type == "{" ? statement : expression); } function arrowBodyNoComma(type) { findFatArrow(cx.stream, cx.state); return pass(type == "{" ? statement : expressionNoComma); } function maybeTarget(noComma) { return function(type) { if (type == ".") return cont(noComma ? targetNoComma : target); else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma) else return pass(noComma ? expressionNoComma : expression); }; } function target(_, value) { if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); } } function targetNoComma(_, value) { if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); } } function maybelabel(type) { if (type == ":") return cont(poplex, statement); return pass(maybeoperatorComma, expect(";"), poplex); } function property(type) { if (type == "variable") {cx.marked = "property"; return cont();} } function objprop(type, value) { if (type == "async") { cx.marked = "property"; return cont(objprop); } else if (type == "variable" || cx.style == "keyword") { cx.marked = "property"; if (value == "get" || value == "set") return cont(getterSetter); var m; // Work around fat-arrow-detection complication for detecting typescript typed arrow params if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false))) cx.state.fatArrowAt = cx.stream.pos + m[0].length; return cont(afterprop); } else if (type == "number" || type == "string") { cx.marked = jsonldMode ? "property" : (cx.style + " property"); return cont(afterprop); } else if (type == "jsonld-keyword") { return cont(afterprop); } else if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(objprop) } else if (type == "[") { return cont(expression, maybetype, expect("]"), afterprop); } else if (type == "spread") { return cont(expressionNoComma, afterprop); } else if (value == "*") { cx.marked = "keyword"; return cont(objprop); } else if (type == ":") { return pass(afterprop) } } function getterSetter(type) { if (type != "variable") return pass(afterprop); cx.marked = "property"; return cont(functiondef); } function afterprop(type) { if (type == ":") return cont(expressionNoComma); if (type == "(") return pass(functiondef); } function commasep(what, end, sep) { function proceed(type, value) { if (sep ? sep.indexOf(type) > -1 : type == ",") { var lex = cx.state.lexical; if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; return cont(function(type, value) { if (type == end || value == end) return pass() return pass(what) }, proceed); } if (type == end || value == end) return cont(); if (sep && sep.indexOf(";") > -1) return pass(what) return cont(expect(end)); } return function(type, value) { if (type == end || value == end) return cont(); return pass(what, proceed); }; } function contCommasep(what, end, info) { for (var i = 3; i < arguments.length; i++) cx.cc.push(arguments[i]); return cont(pushlex(end, info), commasep(what, end), poplex); } function block(type) { if (type == "}") return cont(); return pass(statement, block); } function maybetype(type, value) { if (isTS) { if (type == ":") return cont(typeexpr); if (value == "?") return cont(maybetype); } } function maybetypeOrIn(type, value) { if (isTS && (type == ":" || value == "in")) return cont(typeexpr) } function mayberettype(type) { if (isTS && type == ":") { if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr) else return cont(typeexpr) } } function isKW(_, value) { if (value == "is") { cx.marked = "keyword"; return cont() } } function typeexpr(type, value) { if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") { cx.marked = "keyword"; return cont(value == "typeof" ? expressionNoComma : typeexpr) } if (type == "variable" || value == "void") { cx.marked = "type"; return cont(afterType) } if (value == "|" || value == "&") return cont(typeexpr) if (type == "string" || type == "number" || type == "atom") return cont(afterType); if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType) if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType) if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType) if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr) if (type == "quasi") { return pass(quasiType, afterType); } } function maybeReturnType(type) { if (type == "=>") return cont(typeexpr) } function typeprops(type) { if (type.match(/[\}\)\]]/)) return cont() if (type == "," || type == ";") return cont(typeprops) return pass(typeprop, typeprops) } function typeprop(type, value) { if (type == "variable" || cx.style == "keyword") { cx.marked = "property"; return cont(typeprop) } else if (value == "?" || type == "number" || type == "string") { return cont(typeprop) } else if (type == ":") { return cont(typeexpr) } else if (type == "[") { return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop) } else if (type == "(") { return pass(functiondecl, typeprop) } else if (!type.match(/[;\}\)\],]/)) { return cont() } } function quasiType(type, value) { if (type != "quasi") return pass(); if (value.slice(value.length - 2) != "${") return cont(quasiType); return cont(typeexpr, continueQuasiType); } function continueQuasiType(type) { if (type == "}") { cx.marked = "string-2"; cx.state.tokenize = tokenQuasi; return cont(quasiType); } } function typearg(type, value) { if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg) if (type == ":") return cont(typeexpr) if (type == "spread") return cont(typearg) return pass(typeexpr) } function afterType(type, value) { if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) if (value == "|" || type == "." || value == "&") return cont(typeexpr) if (type == "[") return cont(typeexpr, expect("]"), afterType) if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) } if (value == "?") return cont(typeexpr, expect(":"), typeexpr) } function maybeTypeArgs(_, value) { if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) } function typeparam() { return pass(typeexpr, maybeTypeDefault) } function maybeTypeDefault(_, value) { if (value == "=") return cont(typeexpr) } function vardef(_, value) { if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)} return pass(pattern, maybetype, maybeAssign, vardefCont); } function pattern(type, value) { if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) } if (type == "variable") { register(value); return cont(); } if (type == "spread") return cont(pattern); if (type == "[") return contCommasep(eltpattern, "]"); if (type == "{") return contCommasep(proppattern, "}"); } function proppattern(type, value) { if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { register(value); return cont(maybeAssign); } if (type == "variable") cx.marked = "property"; if (type == "spread") return cont(pattern); if (type == "}") return pass(); if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern); return cont(expect(":"), pattern, maybeAssign); } function eltpattern() { return pass(pattern, maybeAssign) } function maybeAssign(_type, value) { if (value == "=") return cont(expressionNoComma); } function vardefCont(type) { if (type == ",") return cont(vardef); } function maybeelse(type, value) { if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex); } function forspec(type, value) { if (value == "await") return cont(forspec); if (type == "(") return cont(pushlex(")"), forspec1, poplex); } function forspec1(type) { if (type == "var") return cont(vardef, forspec2); if (type == "variable") return cont(forspec2); return pass(forspec2) } function forspec2(type, value) { if (type == ")") return cont() if (type == ";") return cont(forspec2) if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) } return pass(expression, forspec2) } function functiondef(type, value) { if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} if (type == "variable") {register(value); return cont(functiondef);} if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext); if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef) } function functiondecl(type, value) { if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);} if (type == "variable") {register(value); return cont(functiondecl);} if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext); if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl) } function typename(type, value) { if (type == "keyword" || type == "variable") { cx.marked = "type"; return cont(typename) } else if (value == "<") { return cont(pushlex(">"), commasep(typeparam, ">"), poplex) } } function funarg(type, value) { if (value == "@") cont(expression, funarg); if (type == "spread") return cont(funarg); if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); } if (isTS && type == "this") return cont(maybetype, maybeAssign) return pass(pattern, maybetype, maybeAssign); } function classExpression(type, value) { // Class expressions may have an optional name. if (type == "variable") return className(type, value); return classNameAfter(type, value); } function className(type, value) { if (type == "variable") {register(value); return cont(classNameAfter);} } function classNameAfter(type, value) { if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter) if (value == "extends" || value == "implements" || (isTS && type == ",")) { if (value == "implements") cx.marked = "keyword"; return cont(isTS ? typeexpr : expression, classNameAfter); } if (type == "{") return cont(pushlex("}"), classBody, poplex); } function classBody(type, value) { if (type == "async" || (type == "variable" && (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) && cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) { cx.marked = "keyword"; return cont(classBody); } if (type == "variable" || cx.style == "keyword") { cx.marked = "property"; return cont(classfield, classBody); } if (type == "number" || type == "string") return cont(classfield, classBody); if (type == "[") return cont(expression, maybetype, expect("]"), classfield, classBody) if (value == "*") { cx.marked = "keyword"; return cont(classBody); } if (isTS && type == "(") return pass(functiondecl, classBody) if (type == ";" || type == ",") return cont(classBody); if (type == "}") return cont(); if (value == "@") return cont(expression, classBody) } function classfield(type, value) { if (value == "!") return cont(classfield) if (value == "?") return cont(classfield) if (type == ":") return cont(typeexpr, maybeAssign) if (value == "=") return cont(expressionNoComma) var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"; return pass(isInterface ? functiondecl : functiondef) } function afterExport(type, value) { if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";")); return pass(statement); } function exportField(type, value) { if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); } if (type == "variable") return pass(expressionNoComma, exportField); } function afterImport(type) { if (type == "string") return cont(); if (type == "(") return pass(expression); if (type == ".") return pass(maybeoperatorComma); return pass(importSpec, maybeMoreImports, maybeFrom); } function importSpec(type, value) { if (type == "{") return contCommasep(importSpec, "}"); if (type == "variable") register(value); if (value == "*") cx.marked = "keyword"; return cont(maybeAs); } function maybeMoreImports(type) { if (type == ",") return cont(importSpec, maybeMoreImports) } function maybeAs(_type, value) { if (value == "as") { cx.marked = "keyword"; return cont(importSpec); } } function maybeFrom(_type, value) { if (value == "from") { cx.marked = "keyword"; return cont(expression); } } function arrayLiteral(type) { if (type == "]") return cont(); return pass(commasep(expressionNoComma, "]")); } function enumdef() { return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex) } function enummember() { return pass(pattern, maybeAssign); } function isContinuedStatement(state, textAfter) { return state.lastType == "operator" || state.lastType == "," || isOperatorChar.test(textAfter.charAt(0)) || /[,.]/.test(textAfter.charAt(0)); } function expressionAllowed(stream, state, backUp) { return state.tokenize == tokenBase && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)))) } // Interface return { startState: function(basecolumn) { var state = { tokenize: tokenBase, lastType: "sof", cc: [], lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), localVars: parserConfig.localVars, context: parserConfig.localVars && new Context(null, null, false), indented: basecolumn || 0 }; if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") state.globalVars = parserConfig.globalVars; return state; }, token: function(stream, state) { if (stream.sol()) { if (!state.lexical.hasOwnProperty("align")) state.lexical.align = false; state.indented = stream.indentation(); findFatArrow(stream, state); } if (state.tokenize != tokenComment && stream.eatSpace()) return null; var style = state.tokenize(stream, state); if (type == "comment") return style; state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; return parseJS(state, style, type, content, stream); }, indent: function(state, textAfter) { if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass; if (state.tokenize != tokenBase) return 0; var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top; // Kludge to prevent 'maybelse' from blocking lexical scope pops if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) { var c = state.cc[i]; if (c == poplex) lexical = lexical.prev; else if (c != maybeelse && c != popcontext) break; } while ((lexical.type == "stat" || lexical.type == "form") && (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) && (top == maybeoperatorComma || top == maybeoperatorNoComma) && !/^[,\.=+\-*:?[\(]/.test(textAfter)))) lexical = lexical.prev; if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") lexical = lexical.prev; var type = lexical.type, closing = firstChar == type; if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0); else if (type == "form" && firstChar == "{") return lexical.indented; else if (type == "form") return lexical.indented + indentUnit; else if (type == "stat") return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0); else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); else if (lexical.align) return lexical.column + (closing ? 0 : 1); else return lexical.indented + (closing ? 0 : indentUnit); }, electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, blockCommentStart: jsonMode ? null : "/*", blockCommentEnd: jsonMode ? null : "*/", blockCommentContinue: jsonMode ? null : " * ", lineComment: jsonMode ? null : "//", fold: "brace", closeBrackets: "()[]{}''\"\"``", helperType: jsonMode ? "json" : "javascript", jsonldMode: jsonldMode, jsonMode: jsonMode, expressionAllowed: expressionAllowed, skipExpression: function(state) { parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null)); } }; }); CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/); CodeMirror.defineMIME("text/javascript", "javascript"); CodeMirror.defineMIME("text/ecmascript", "javascript"); CodeMirror.defineMIME("application/javascript", "javascript"); CodeMirror.defineMIME("application/x-javascript", "javascript"); CodeMirror.defineMIME("application/ecmascript", "javascript"); CodeMirror.defineMIME("application/json", { name: "javascript", json: true }); CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true }); CodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true }); CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true }); CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); }); // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE // Utility function that allows modes to be combined. The mode given // as the base argument takes care of most of the normal mode // functionality, but a second (typically simple) mode is used, which // can override the style of text. Both modes get to parse all of the // text, but when both assign a non-null style to a piece of code, the // overlay wins, unless the combine argument was true and not overridden, // or state.overlay.combineTokens was true, in which case the styles are // combined. (function(mod) { mod(window.CodeMirror); })(function(CodeMirror) { CodeMirror.customOverlayMode = function(base, overlay, combine) { return { startState: function() { return { base: CodeMirror.startState(base), overlay: CodeMirror.startState(overlay), basePos: 0, baseCur: null, overlayPos: 0, overlayCur: null, streamSeen: null }; }, copyState: function(state) { return { base: CodeMirror.copyState(base, state.base), overlay: CodeMirror.copyState(overlay, state.overlay), basePos: state.basePos, baseCur: null, overlayPos: state.overlayPos, overlayCur: null }; }, token: function(stream, state) { if (stream != state.streamSeen || Math.min(state.basePos, state.overlayPos) < stream.start) { state.streamSeen = stream; state.basePos = state.overlayPos = stream.start; } if (stream.start == state.basePos) { state.baseCur = base.token(stream, state.base); state.basePos = stream.pos; } if (stream.start == state.overlayPos) { stream.pos = stream.start; state.overlayCur = overlay.token(stream, state.overlay); state.overlayPos = stream.pos; } stream.pos = Math.min(state.basePos, state.overlayPos); // Edge case for codeblocks in templater mode if (state.baseCur && state.overlayCur && state.baseCur.contains("line-HyperMD-codeblock")) { state.overlayCur = state.overlayCur.replace("line-templater-inline", ""); state.overlayCur += ` line-background-HyperMD-codeblock-bg`; } // state.overlay.combineTokens always takes precedence over combine, // unless set to null if (state.overlayCur == null) return state.baseCur; else if (state.baseCur != null && state.overlay.combineTokens || combine && state.overlay.combineTokens == null) return state.baseCur + " " + state.overlayCur; else return state.overlayCur; }, indent: base.indent && function(state, textAfter, line) { return base.indent(state.base, textAfter, line); }, electricChars: base.electricChars, innerMode: function(state) { return {state: state.base, mode: base}; }, blankLine: function(state) { var baseToken, overlayToken; if (base.blankLine) baseToken = base.blankLine(state.base); if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay); return overlayToken == null ? baseToken : (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken); } }; }; }); const TP_CMD_TOKEN_CLASS = "templater-command"; const TP_INLINE_CLASS = "templater-inline"; const TP_OPENING_TAG_TOKEN_CLASS = "templater-opening-tag"; const TP_CLOSING_TAG_TOKEN_CLASS = "templater-closing-tag"; const TP_INTERPOLATION_TAG_TOKEN_CLASS = "templater-interpolation-tag"; const TP_RAW_TAG_TOKEN_CLASS = "templater-raw-tag"; const TP_EXEC_TAG_TOKEN_CLASS = "templater-execution-tag"; class TemplaterEditor { constructor(app, plugin) { this.app = app; this.plugin = plugin; } setup() { return __awaiter(this, void 0, void 0, function* () { yield this.registerCodeMirrorMode(); }); } registerCodeMirrorMode() { return __awaiter(this, void 0, void 0, function* () { // cm-editor-syntax-highlight-obsidian plugin // https://codemirror.net/doc/manual.html#modeapi // https://codemirror.net/mode/diff/diff.js // https://codemirror.net/demo/mustache.html // https://marijnhaverbeke.nl/blog/codemirror-mode-system.html if (!this.plugin.settings.syntax_highlighting) { return; } // TODO: Add mobile support if (obsidian.Platform.isMobileApp) { return; } const js_mode = window.CodeMirror.getMode({}, "javascript"); if (js_mode.name === "null") { this.plugin.log_error(new TemplaterError("Javascript syntax mode couldn't be found, can't enable syntax highlighting.")); return; } // Custom overlay mode used to handle edge cases // @ts-ignore const overlay_mode = window.CodeMirror.customOverlayMode; if (overlay_mode == null) { this.plugin.log_error(new TemplaterError("Couldn't find customOverlayMode, can't enable syntax highlighting.")); return; } window.CodeMirror.defineMode("templater", function (config, parserConfig) { const templaterOverlay = { startState: function () { const js_state = window.CodeMirror.startState(js_mode); return Object.assign(Object.assign({}, js_state), { inCommand: false, tag_class: "", freeLine: false }); }, copyState: function (state) { const js_state = window.CodeMirror.startState(js_mode); const new_state = Object.assign(Object.assign({}, js_state), { inCommand: state.inCommand, tag_class: state.tag_class, freeLine: state.freeLine }); return new_state; }, blankLine: function (state) { if (state.inCommand) { return `line-background-templater-command-bg`; } return null; }, token: function (stream, state) { if (stream.sol() && state.inCommand) { state.freeLine = true; } if (state.inCommand) { let keywords = ""; if (stream.match(/[\-_]{0,1}%>/, true)) { state.inCommand = false; state.freeLine = false; const tag_class = state.tag_class; state.tag_class = ""; return `line-${TP_INLINE_CLASS} ${TP_CMD_TOKEN_CLASS} ${TP_CLOSING_TAG_TOKEN_CLASS} ${tag_class}`; } const js_result = js_mode.token(stream, state); if (stream.peek() == null && state.freeLine) { keywords += ` line-background-templater-command-bg`; } if (!state.freeLine) { keywords += ` line-${TP_INLINE_CLASS}`; } return `${keywords} ${TP_CMD_TOKEN_CLASS} ${js_result}`; } const match = stream.match(/<%[\-_]{0,1}\s*([*~+]{0,1})/, true); if (match != null) { switch (match[1]) { case '*': state.tag_class = TP_EXEC_TAG_TOKEN_CLASS; break; case '~': state.tag_class = TP_RAW_TAG_TOKEN_CLASS; break; default: state.tag_class = TP_INTERPOLATION_TAG_TOKEN_CLASS; break; } state.inCommand = true; return `line-${TP_INLINE_CLASS} ${TP_CMD_TOKEN_CLASS} ${TP_OPENING_TAG_TOKEN_CLASS} ${state.tag_class}`; } while (stream.next() != null && !stream.match(/<%/, false)) ; return null; } }; return overlay_mode(window.CodeMirror.getMode(config, "hypermd"), templaterOverlay); }); }); } } class TemplaterPlugin extends obsidian.Plugin { onload() { return __awaiter(this, void 0, void 0, function* () { yield this.loadSettings(); this.templater = new Templater(this.app, this); yield this.templater.setup(); this.editor = new TemplaterEditor(this.app, this); yield this.editor.setup(); this.update_syntax_highlighting(); this.fuzzySuggest = new TemplaterFuzzySuggestModal(this.app, this); this.registerMarkdownPostProcessor((el, ctx) => this.templater.process_dynamic_templates(el, ctx)); obsidian.addIcon("templater-icon", ICON_DATA); this.addRibbonIcon('templater-icon', 'Templater', () => __awaiter(this, void 0, void 0, function* () { this.fuzzySuggest.insert_template(); })); this.addCommand({ id: "insert-templater", name: "Insert Template", hotkeys: [ { modifiers: ["Alt"], key: 'e', }, ], callback: () => { this.fuzzySuggest.insert_template(); }, }); this.addCommand({ id: "replace-in-file-templater", name: "Replace templates in the active file", hotkeys: [ { modifiers: ["Alt"], key: 'r', }, ], callback: () => { this.templater.overwrite_active_file_templates(); }, }); this.addCommand({ id: "jump-to-next-cursor-location", name: "Jump to next cursor location", hotkeys: [ { modifiers: ["Alt"], key: "Tab", }, ], callback: () => { this.templater.cursor_jumper.jump_to_next_cursor_location(); } }); this.addCommand({ id: "create-new-note-from-template", name: "Create new note from template", hotkeys: [ { modifiers: ["Alt"], key: "n", }, ], callback: () => { this.fuzzySuggest.create_new_note_from_template(); } }); this.app.workspace.onLayoutReady(() => { this.update_trigger_file_on_creation(); }); this.registerEvent(this.app.workspace.on("file-menu", (menu, file) => { if (file instanceof obsidian.TFolder) { menu.addItem((item) => { item.setTitle("Create new note from template") .setIcon("templater-icon") .onClick(evt => { this.fuzzySuggest.create_new_note_from_template(file); }); }); } })); this.addSettingTab(new TemplaterSettingTab(this.app, this)); }); } saveSettings() { return __awaiter(this, void 0, void 0, function* () { yield this.saveData(this.settings); }); } loadSettings() { return __awaiter(this, void 0, void 0, function* () { this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); }); } update_trigger_file_on_creation() { if (this.settings.trigger_on_file_creation) { this.trigger_on_file_creation_event = this.app.vault.on("create", (file) => __awaiter(this, void 0, void 0, function* () { if (!(file instanceof obsidian.TFile) || file.extension !== "md") { return; } /* Avoids template replacement when syncing files */ const template_folder = obsidian.normalizePath(this.settings.template_folder); if (template_folder !== "/") { let parent = file.parent; while (parent != null) { if (parent.path === template_folder) { return; } parent = parent.parent; } } // TODO: find a better way to do this // Currently, I have to wait for the daily note plugin to add the file content before replacing // Not a problem with Calendar however since it creates the file with the existing content yield delay(300); if (file.stat.size == 0 && this.settings.empty_file_template) { const template_file = yield this.errorWrapper(() => __awaiter(this, void 0, void 0, function* () { return resolveTFile(this.app, this.settings.empty_file_template + ".md"); })); if (!template_file) { return; } const content = yield this.app.vault.read(template_file); yield this.app.vault.modify(file, content); } this.templater.overwrite_file_templates(file); })); this.registerEvent(this.trigger_on_file_creation_event); } else { if (this.trigger_on_file_creation_event) { this.app.vault.offref(this.trigger_on_file_creation_event); this.trigger_on_file_creation_event = undefined; } } } update_syntax_highlighting() { if (this.settings.syntax_highlighting) { this.syntax_highlighting_event = this.app.workspace.on("codemirror", cm => { cm.setOption("mode", "templater"); }); this.app.workspace.iterateCodeMirrors(cm => { cm.setOption("mode", "templater"); }); this.registerEvent(this.syntax_highlighting_event); } else { if (this.syntax_highlighting_event) { this.app.vault.offref(this.syntax_highlighting_event); } this.app.workspace.iterateCodeMirrors(cm => { cm.setOption("mode", "hypermd"); }); } } errorWrapper(fn) { return __awaiter(this, void 0, void 0, function* () { try { return yield fn(); } catch (e) { if (!(e instanceof TemplaterError)) { this.log_error(new TemplaterError(`Template parsing error, aborting.`, e.message)); } else { this.log_error(e); } return null; } }); } log_update(msg) { const notice = new obsidian.Notice("", 15000); // TODO: Find better way for this // @ts-ignore notice.noticeEl.innerHTML = `Templater update:
${msg}`; } log_error(e) { const notice = new obsidian.Notice("", 8000); if (e instanceof TemplaterError && e.console_msg) { // TODO: Find a better way for this // @ts-ignore notice.noticeEl.innerHTML = `Templater Error:
${e.message}
Check console for more informations`; console.error(e.message, e.console_msg); } else { // @ts-ignore notice.noticeEl.innerHTML = `Templater Error:
${e.message}`; } } } module.exports = TemplaterPlugin; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9FcnJvci50cyIsInNyYy9TZXR0aW5ncy50cyIsInNyYy9VdGlscy50cyIsInNyYy9UZW1wbGF0ZXJGdXp6eVN1Z2dlc3QudHMiLCJzcmMvQ29uc3RhbnRzLnRzIiwic3JjL0N1cnNvckp1bXBlci50cyIsIm5vZGVfbW9kdWxlcy9ldGEvZGlzdC9ldGEuZXMuanMiLCJzcmMvSW50ZXJuYWxUZW1wbGF0ZXMvSW50ZXJuYWxNb2R1bGUudHMiLCJzcmMvSW50ZXJuYWxUZW1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gICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8ub3BzLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgb3AgPSBib2R5LmNhbGwodGhpc0FyZywgXyk7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0gZmluYWxseSB7IGYgPSB0ID0gMDsgfVxyXG4gICAgICAgIGlmIChvcFswXSAmIDUpIHRocm93IG9wWzFdOyByZXR1cm4geyB2YWx1ZTogb3BbMF0gPyBvcFsxXSA6IHZvaWQgMCwgZG9uZTogdHJ1ZSB9O1xyXG4gICAgfVxyXG59XH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mxlOiBmYWxzZSB9XHJcbn0pO1xyXG4vKipcclxuICogVGhyb3dzIGFuIEV0YUVyciB3aXRoIGEgbmljZWx5IGZvcm1hdHRlZCBlcnJvciBhbmQgbWVzc2FnZSBzaG93aW5nIHdoZXJlIGluIHRoZSB0ZW1wbGF0ZSB0aGUgZXJyb3Igb2NjdXJyZWQuXHJcbiAqL1xyXG5mdW5jdGlvbiBQYXJzZUVycihtZXNzYWdlLCBzdHIsIGluZHgpIHtcclxuICAgIHZhciB3aGl0ZXNwYWNlID0gc3RyLnNsaWNlKDAsIGluZHgpLnNwbGl0KC9cXG4vKTtcclxuICAgIHZhciBsaW5lTm8gPSB3aGl0ZXNwYWNlLmxlbmd0aDtcclxuICAgIHZhciBjb2xObyA9IHdoaXRlc3BhY2VbbGluZU5vIC0gMV0ubGVuZ3RoICsgMTtcclxuICAgIG1lc3NhZ2UgKz1cclxuICAgICAgICAnIGF0IGxpbmUgJyArXHJcbiAgICAgICAgICAgIGxpbmVObyArXHJcbiAgICAgICAgICAgICcgY29sICcgK1xyXG4gICAgICAgICAgICBjb2xObyArXHJcbiAgICAgICAgICAgICc6XFxuXFxuJyArXHJcbiAgICAgICAgICAgICcgICcgK1xyXG4gICAgICAgICAgICBzdHIuc3BsaXQoL1xcbi8pW2xpbmVObyAtIDFdICtcclxuICAgICAgICAgICAgJ1xcbicgK1xyXG4gICAgICAgICAgICAnICAnICtcclxuICAgICAgICAgICAgQXJyYXkoY29sTm8pLmpvaW4oJyAnKSArXHJcbiAgICAgICAgICAgICdeJztcclxuICAgIHRocm93IEV0YUVycihtZXNzYWdlKTtcclxufVxuXG4vKipcclxuICogQHJldHVybnMgVGhlIGdsb2JhbCBQcm9taXNlIGZ1bmN0aW9uXHJcbiAqL1xyXG52YXIgcHJvbWlzZUltcGwgPSBuZXcgRnVuY3Rpb24oJ3JldHVybiB0aGlzJykoKS5Qcm9taXNlO1xyXG4vKipcclxuICogQHJldHVybnMgQSBuZXcgQXN5bmNGdW5jdGlv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HIudHJpbSgpO1xyXG4gICAgfVxyXG4gICAgaWYgKGxlZnRUcmltID09PSAnXycgfHwgbGVmdFRyaW0gPT09ICdzbHVycCcpIHtcclxuICAgICAgICAvLyBjb25zb2xlLmxvZygndHJpbW1pbmcgbGVmdCcgKyBsZWZ0VHJpbSlcclxuICAgICAgICAvLyBmdWxsIHNsdXJwXHJcbiAgICAgICAgc3RyID0gdHJpbUxlZnQoc3RyKTtcclxuICAgIH1cclxuICAgIGVsc2UgaWYgKGxlZnRUcmltID09PSAnLScgfHwgbGVmdFRyaW0gPT09ICdubCcpIHtcclxuICAgICAgICAvLyBubCB0cmltXHJcbiAgICAgICAgc3RyID0gc3RyLnJlcGxhY2UoL14oPzpcXHJcXG58XFxufFxccikvLCAnJyk7XHJcbiAgICB9XHJcbiAgICBpZiAocmlnaHRUcmltID09PSAnXycgfHwgcmlnaHRUcmltID09PSAnc2x1cnAnKSB7XHJcbiAgICAgICAgLy8gZnVsbCBzbHVycFxyXG4gICAgICAgIHN0ciA9IHRyaW1SaWdodChzdHIpO1xyXG4gICAgfVxyXG4gICAgZWxzZSBpZiAocmlnaHRUcmltID09PSAnLScgfHwgcmlnaHRUcmltID09PSAnbmwnKSB7XHJcbiAgICAgICAgLy8gbmwgdHJpbVxyXG4gICAgICAgIHN0ciA9IHN0ci5yZXBsYWNlKC8oPzpcXHJcXG58XFxufFxccikkLywgJycpOyAvLyBUT0RPOiBtYWtlIHN1cmUgdGhpcyBnZXRzIFxcclxcblxyXG4gICAgfVxyXG4gICAgcmV0dXJuIHN0cjtcclxufVxyXG4vKipcclxuICogQSBtYXAgb2Ygc3BlY2lhbCBIVE1MIGNoYXJhY3RlcnMgdG8gdGhlaXIgWE1MLWVzY2FwZWQgZXF1aXZhbGVudHNcclxuICovXHJcbnZhciBlc2NNYXAgPSB7XHJcbiAgICAnJic6ICcmYW1wOycsXHJcbiAgICAnPCc6ICcmbHQ7JyxcclxuICAgICc+JzogJyZndDsnLFxyXG4gICAgJ1wiJz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JpbmcsIHdzTGVmdCk7XHJcbiAgICAgICAgcGFyc2VDbG9zZVJlZy5sYXN0SW5kZXggPSBsYXN0SW5kZXg7XHJcbiAgICAgICAgdmFyIGNsb3NlVGFnID0gdm9pZCAwO1xyXG4gICAgICAgIHZhciBjdXJyZW50T2JqID0gZmFsc2U7XHJcbiAgICAgICAgd2hpbGUgKChjbG9zZVRhZyA9IHBhcnNlQ2xvc2VSZWcuZXhlYyhzdHIpKSkge1xyXG4gICAgICAgICAgICBpZiAoY2xvc2VUYWdbMV0pIHtcclxuICAgICAgICAgICAgICAgIHZhciBjb250ZW50ID0gc3RyLnNsaWNlKGxhc3RJbmRleCwgY2xvc2VUYWcuaW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgcGFyc2VPcGVuUmVnLmxhc3RJbmRleCA9IGxhc3RJbmRleCA9IHBhcnNlQ2xvc2VSZWcubGFzdEluZGV4O1xyXG4gICAgICAgICAgICAgICAgdHJpbUxlZnRPZk5leHRTdHIgPSBjbG9zZVRhZ1syXTtcclxuICAgICAgICAgICAgICAgIHZhciBjdXJyZW50VHlwZSA9IHByZWZpeCA9PT0gcGFyc2VPcHRpb25zLmV4ZWNcclxuICAgICAgICAgICAgICAgICAgICA/ICdlJ1xyXG4gICAgICAgICAgICAgICAgICAgIDogcHJlZml4ID09PSBwYXJzZU9wdGlvbnMucmF3XHJcbiAgICAgICAgICAgICAgICAgICAgICAgID8gJ3InXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDogcHJlZml4ID09PSBwYXJzZU9wdGlvbnMuaW50ZXJwb2xhdGVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gJ2knXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICcnO1xyXG4gICAgICAgICAgICAgICAgY3VycmVudE9iaiA9IHsgdDogY3VycmVudFR5cGUsIHZhbDogY29udGVudCB9O1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgY2hhciA9IGNsb3NlVGFnWzBdO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNoYXIgPT09ICcvKicpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgY29tbWVudENsb3NlSW5kID0gc3RyLmluZGV4T2YoJyovJywgcGFyc2VDbG9zZVJlZy5sYXN0SW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50Q2xvc2VJbmQgPT09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFBhcnNlRXJyKCd1bmNsb3NlZCBjb21tZW50Jywgc3RyLCBjbG9zZVRhZy5pbmRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ2xvc2VSZWcubGFzdEluZGV4ID0gY29tbWVudENsb3NlSW5kO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoY2hhciA9PT0gXCInXCIpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaW5nbGVRdW90ZVJlZy5sYXN0SW5kZXggPSBjbG9zZVRhZy5pbmRleDtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgc2luZ2xlUXVvdGVNYXRjaCA9IHNpbmdsZVF1b3RlUmVnLmV4ZWMoc3RyKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2luZ2xlUXVvdGVNYXRjaCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNsb3NlUmVnLmxhc3RJbmRleCA9IHNpbmdsZVF1b3RlUmVnLmxhc3RJbmRleDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFBhcnNlRXJyKCd1bmNsb3NlZCBzdHJpbmcnLCBzdHIsIGNsb3NlVGFnLmluZGV4KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlIGlmIChjaGFyID09PSAnXCInKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZG91YmxlUXVvdGVSZWcubGFzdEluZGV4ID0gY2xvc2VUYWcuaW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRvdWJsZVF1b3RlTWF0Y2ggPSBkb3VibGVRdW90ZVJlZy5leGVjKHN0cik7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRvdWJsZVF1b3RlTWF0Y2gpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDbG9zZVJlZy5sYXN0SW5kZXggPSBkb3VibGVRdW90ZVJlZy5sYXN0SW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBQYXJzZUVycigndW5jbG9zZWQgc3RyaW5nJywgc3RyLCBjbG9zZVRhZy5pbmRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoY2hhciA9PT0gJ2AnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVMaXRSZWcubGFzdEluZGV4ID0gY2xvc2VUYWcuaW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRlbXBsYXRlTGl0TWF0Y2ggPSB0ZW1wbGF0ZUxpdFJlZy5leGVjKHN0cik7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRlbXBsYXRlTGl0TWF0Y2gpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDbG9zZVJlZy5sYXN0SW5kZXggPSB0ZW1wbGF0ZUxpdFJlZy5sYXN0SW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBQYXJzZUVycigndW5jbG9zZWQgc3RyaW5nJywgc3RyLCBjbG9zZVRhZy5pbmRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChjdXJyZW50T2JqKSB7XHJcbiAgICAgICAgICAgIGJ1ZmZlci5wdXNoKGN1cnJlbnRPYmopO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgUGFyc2VFcnIoJ3VuY2xvc2VkIHRhZycsIHN0ciwgbS5pbmRleCArIHByZWNlZGluZ1N0cmluZy5sZW5ndGgpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHB1c2hTdHJpbmcoc3RyLnNsaWNlKGxhc3RJbmRleCwgc3RyLmxlbmd0aCksIGZhbHNlKTtcclxuICAgIGlmIChjb25maWcucGx1Z2lucykge1xyXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY29uZmlnLnBsdWdpbnMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgdmFyIHBsdWdpbiA9IGNvbmZpZy5wbHVnaW5zW2ldO1xyXG4gICAgICAgICAgICBpZiAocGx1Z2luLnByb2Nlc3NBU1QpIHtcclxuICAgICAgICAgICAgICAgIGJ1ZmZlciA9IHBsdWdpbi5wcm9jZXNzQVNUKGJ1ZmZlciwgY29uZmlnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBidWZmZXI7XHJcbn1cblxuLyogRU5EIFRZUEVTICovXHJcbi8qKlxyXG4gKiBDb21waWxlcyBhIHRlbXBsYXRlIHN0cmluZyB0byBhIGZ1bmN0aW9uIHN0cmluZy4gTW9zdCBvZnRlbiB1c2VycyBqdXN0IH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IGNvbXBpbGVTY29wZShidWZmZXIsIGNvbmZpZykgK1xyXG4gICAgICAgIChjb25maWcuaW5jbHVkZUZpbGVcclxuICAgICAgICAgICAgPyAnaWYoX19sKXRSPScgK1xyXG4gICAgICAgICAgICAgICAgKGNvbmZpZy5hc3luYyA/ICdhd2FpdCAnIDogJycpICtcclxuICAgICAgICAgICAgICAgIChcImluY2x1ZGVGaWxlKF9fbCxPYmplY3QuYXNzaWduKFwiICsgY29uZmlnLnZhck5hbWUgKyBcIix7Ym9keTp0Un0sX19sUCkpXFxuXCIpXHJcbiAgICAgICAgICAgIDogY29uZmlnLmluY2x1ZGVcclxuICAgICAgICAgICAgICAgID8gJ2lmKF9fbCl0Uj0nICtcclxuICAgICAgICAgICAgICAgICAgICAoY29uZmlnLmFzeW5jID8gJ2F3YWl0ICcgOiAnJykgK1xyXG4gICAgICAgICAgICAgICAgICAgIChcImluY2x1ZGUoX19sLE9iamVjdC5hc3NpZ24oXCIgKyBjb25maWcudmFyTmFtZSArIFwiLHtib2R5OnRSfSxfX2xQKSlcXG5cIilcclxuICAgICAgICAgICAgICAgIDogJycpICtcclxuICAgICAgICAnaWYoY2Ipe2NiKG51bGwsdFIpfSByZXR1cm4gdFInICtcclxuICAgICAgICAoY29uZmlnLnVzZVdpdGggPyAnfScgOiAnJyk7XHJcbiAgICBpZiAoY29uZmlnLnBsdWdpbnMpIHtcclxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbmZpZy5wbHVnaW5zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHZhciBwbHVnaW4gPSBjb25maWcucGx1Z2luc1tpXTtcclxuICAgICAgICAgICAgaWYgKHBsdWdpbi5wcm9jZXNzRm5TdHJpbmcpIHtcclxuICAgICAgICAgICAgICAgIHJlcyA9IHBsdWdpbi5wcm9jZXNzRm5TdHJpbmcocmVzLCBjb25maWcpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4g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AgICAgICAgICB2YXIgdHlwZSA9IGN1cnJlbnRCbG9jay50OyAvLyB+LCBzLCAhLCA/LCByXHJcbiAgICAgICAgICAgIHZhciBjb250ZW50ID0gY3VycmVudEJsb2NrLnZhbCB8fCAnJztcclxuICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdyJykge1xyXG4gICAgICAgICAgICAgICAgLy8gcmF3XHJcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmdsb2JhbEF3YWl0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuU3RyICs9IFwiX3Bycy5wdXNoKFwiICsgY29udGVudCArIFwiKTtcXG5cIjtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5TdHIgKz0gXCJ0Uis9J1wiICsgUkVQTEFDRU1FTlRfU1RSICsgXCInXFxuXCI7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmZpbHRlcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gJ0UuZmlsdGVyKCcgKyBjb250ZW50ICsgJyknO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5TdHIgKz0gJ3RSKz0nICsgY29udGVudCArICdcXG4nO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT09ICdpJykge1xyXG4gICAgICAgICAgICAgICAgLy8gaW50ZXJwb2xhdGVcclxuICAgICAgICAgICAgICAgIGlmIChjb25maWcuZ2xvYmFsQXdhaXQpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5TdHIgKz0gXCJfcHJzLnB1c2goXCIgKyBjb250ZW50ICsgXCIpO1xcblwiO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblN0ciArPSBcInRSKz0nXCIgKyBSRVBMQUNFTUVOVF9TVFIgKyBcIidcXG5cIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZmlsdGVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSAnRS5maWx0ZXIoJyArIGNvbnRlbnQgKyAnKSc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblN0ciArPSAndFIrPScgKyBjb250ZW50ICsgJ1xcbic7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5hdXRvRXNjYXBlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSAnRS5lKCcgKyBjb250ZW50ICsgJyknO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5TdHIgKz0gJ3RSKz0nICsgY29udGVudCArICdcXG4nO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT09ICdlJykge1xyXG4gICAgICAgICAgICAgICAgLy8gZXhlY3V0ZVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuU3RyICs9IGNvbnRlbnQgKyAnXFxuJzsgLy8geW91IG5lZWQgYSBcXG4gaW4gY2FzZSB5b3UgaGF2ZSA8JSB9ICU+XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBpZiAoY29uZmlnLmdsb2JhbEF3YWl0KSB7XHJcbiAgICAgICAgcmV0dXJuU3RyICs9IFwiY29uc3QgX3JzdCA9IGF3YWl0IFByb21pc2UuYWxsKF9wcnMpO1xcbnRSID0gdFIucmVwbGFjZSgvXCIgKyBSRVBMQUNFTUVOVF9TVFIgKyBcIi9nLCAoKSA9PiBfcnN0LnNoaWZ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gICAgICByZXR1cm4gY2IoZXJyKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgLy8gTm8gY2FsbGJhY2ssIHRyeSByZXR1cm5pbmcgYSBwcm9taXNlXHJcbiAgICAgICAgICAgIGlmICh0eXBlb2YgcHJvbWlzZUltcGwgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgcHJvbWlzZUltcGwoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoaGFuZGxlQ2FjaGUodGVtcGxhdGUsIG9wdGlvbnMpKGRhdGEsIG9wdGlvbnMpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRocm93IEV0YUVycihcIlBsZWFzZSBwcm92aWRlIGEgY2FsbGJhY2sgZnVuY3Rpb24sIHRoaXMgZW52IGRvZXNuJ3Qgc3VwcG9ydCBQcm9taXNlc1wiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGVsc2Uge1xyXG4gICAgICAgIHJldHVybiBoYW5kbGVDYWNoZSh0ZW1wbGF0ZSwgb3B0aW9ucykoZGF0YSwgb3B0aW9ucyk7XHJcbiAgICB9XHJcbn1cclxuLyoqXHJcbiAqIFJlbmRlciBhIHRlbXBsYXRlIGFzeW5jaHJvbm91c2x5XHJcbiAqXHJcbiAqIElmIGB0ZW1wbGF0ZWAga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V0dXJuIChyZWxhdGl2ZTogYm9vbGVhbiA9IGZhbHNlKSA9PiB7XG4gICAgICAgICAgICBsZXQgcGFyZW50ID0gdGhpcy5jb25maWcudGFyZ2V0X2ZpbGUucGFyZW50O1xuICAgICAgICAgICAgbGV0IGZvbGRlcjtcblxuICAgICAgICAgICAgaWYgKHJlbGF0aXZlKSB7XG4gICAgICAgICAgICAgICAgZm9sZGVyID0gcGFyZW50LnBhdGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBmb2xkZXIgPSBwYXJlbnQubmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIGZvbGRlcjtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdlbmVyYXRlX2luY2x1ZGUoKTogRnVuY3Rpb24ge1xuICAgICAgICByZXR1cm4gYXN5bmMgKGluY2x1ZGVfbGluazogc3RyaW5nIHwgVEZpbGUpID0+IHtcbiAgICAgICAgICAgIC8vIFRPRE86IEFkZCBtdXRleCBmb3IgdGhpcywgdGhpcyBtYXkgY3VycmVudGx5IGxlYWQgdG8gYSByYWNlIGNvbmRpdGlvbi4gXG4gICAgICAgICAgICAvLyBXaGlsZSBub3QgdmVyeSBpbXBhY3RmdWwsIHRoYXQgY291bGQgc3RpbGwgYmUgYW5ub3lpbmcuXG4gICAgICAgICAgICB0aGlzLmluY2x1ZGVfZGVwdGggKz0gMTtcbiAgICAgICAgICAgIGlmICh0aGlzLmluY2x1ZGVfZGVwdGggPiBERVBUSF9MSU1JVCkge1xuICAgICAgICAgICAgICAgIHRoaXMuaW5jbHVkZV9kZXB0aCA9IDA7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFRlbXBsYXRlckVycm9yKFwiUmVhY2hlZCBpbmNsdXNpb24gZGVwdGggbGltaXQgKG1heCA9IDEwKVwiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IGluY19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ICAgY29uc3QgY2FjaGUgPSB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZShpbmNfZmlsZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjYWNoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gcmVzb2x2ZVN1YnBhdGgoY2FjaGUsIHN1YnBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluY19maWxlX2NvbnRlbnQgPSBpbmNfZmlsZV9jb250ZW50LnNsaWNlKHJlc3VsdC5zdGFydC5vZmZzZXQsIHJlc3VsdC5lbmQ/Lm9mZnNldCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IFxuXG4gICAgICAgICAgICBjb25zdCBwYXJzZWRfY29udGVudCA9IGF3YWl0IHRoaXMucGx1Z2luLnRlbXBsYXRlci5wYXJzZXIucGFyc2VUZW1wbGF0ZXMoaW5jX2ZpbGVfY29udGVudCk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHRoaXMuaW5jbHVkZV9kZXB0aCAtPSAxO1xuICAgICAgICBcbiAgICAgICAgICAgIHJldHVybiBwYXJzZWRfY29udGVudDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdlbmVyYXRlX2xhc3RfbW9kaWZpZWRfZGF0ZSgpOiBGdW5jdGlvbiB7XG4gICAgICAgIHJldHVybiAoZm9ybWF0OiBzdHJpbmcgPSBcIllZWVktTU0tREQgSEg6bW1cIik6IHN0cmluZyA9PiB7XG4gICAgICAgICAgICByZXR1cm4gd2luZG93Lm1vbWVudCh0aGlzLmNvbmZpZy50YXJnZXRfZmlsZS5zdGF0Lm10aW1lKS5mb3JtYXQoZm9ybWF0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG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gcmV0dXJuIGF3YWl0IHByb21pc2U7XG4gICAgICAgICAgICB9IGNhdGNoKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRocm93X29uX2NhbmNlbCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZW5lcmF0ZV9zdWdnZXN0ZXIoKTogRnVuY3Rpb24ge1xuICAgICAgICByZXR1cm4gYXN5bmMgPFQ+KHRleHRfaXRlbXM6IHN0cmluZ1tdIHwgKChpdGVtOiBUKSA9PiBzdHJpbmcpLCBpdGVtczogVFtdLCB0aHJvd19vbl9jYW5jZWw6IGJvb2xlYW4gPSBmYWxzZSwgcGxhY2Vob2xkZXI6IHN0cmluZyA9IFwiXCIpOiBQcm9taXNlPFQ+ID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHN1Z2dlc3RlciA9IG5ldyBTdWdnZXN0ZXJNb2RhbCh0aGlzLmFwcCwgdGV4dF9pdGVtcywgaXRlbXMsIHBsYWNlaG9sZGVyKTtcbiAgICAgICAgICAgIGNvbnN0IHByb21pc2UgPSBuZXcgUHJvbWlzZSgocmVzb2x2ZTogKHZhbHVlOiBUKSA9PiB2b2lkLCByZWplY3Q6IChyZWFzb24/OiBhbnkpID0+IHZvaWQpID0+IHN1Z2dlc3Rlci5vcGVuQW5kR2V0VmFsdWUocmVzb2x2ZSwgcmVqZWN0KSk7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiBhd2FpdCBwcm9taXNlXG4gICAgICAgICAgICB9IGNhdGNoKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRocm93X29uX2NhbmNlbCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAg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biAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY21kID0gYXdhaXQgdGhpcy5wbHVnaW4udGVtcGxhdGVyLnBhcnNlci5wYXJzZVRlbXBsYXRlcyhjbWQsIGNvbnRleHQpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy51c2VyX3N5c3RlbV9jb21tYW5kX2Z1bmN0aW9ucy5zZXQodGVtcGxhdGUsIGFzeW5jICh1c2VyX2FyZ3M/OiBhbnkpOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwcm9jZXNzX2VudiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLnByb2Nlc3MuZW52LFxuICAgICAgICAgICAgICAgICAgICAgICAgLi4udXNlcl9hcmdzLFxuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNtZF9vcHRpb25zID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGltZW91dDogdGhpcy5wbHVnaW4uc2V0dGluZ3MuY29tbWFuZF90aW1lb3V0ICogMTAwMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGN3ZDogdGhpcy5jd2QsXG4gICAgICAgICAgICAgICAgICAgICAgICBlbnY6IHByb2Nlc3NfZW52LFxuICAgICAgICAgICAgICAgICAgICAgICAgLi4uKHRoaXMucGx1Z2luLnNldHRpbmdzLnNoZWxsX3BhdGggIT09IFwiXCIgJiYge3NoZWxsOiB0aGlzLnBsdWdpbi5zZXR0aW5ncy5zaGVsbF9wYXRofSksXG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHtzdGRvdXR9ID0gYXdhaXQgdGhpcy5leGVjX3Byb21pc2UoY21kLCBjbWRfb3B0aW9ucyk7XG4gICAgICAgICA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uc3QgYWRkaXRpb25hbF9jb250ZXh0ID0gdGhpcy5hZGRpdGlvbmFsQ29udGV4dCgpO1xuICAgICAgICBjb25zdCBpbnRlcm5hbF9jb250ZXh0ID0gYXdhaXQgdGhpcy5pbnRlcm5hbFRlbXBsYXRlUGFyc2VyLmdlbmVyYXRlQ29udGV4dChjb25maWcpO1xuICAgICAgICBsZXQgdXNlcl9jb250ZXh0ID0ge307XG5cbiAgICAgICAgaWYgKCF0aGlzLmN1cnJlbnRfY29udGV4dCkge1xuICAgICAgICAgICAgLy8gSWYgYSB1c2VyIHN5c3RlbSBjb21tYW5kIGlzIHVzaW5nIHRwLmZpbGUuaW5jbHVkZSwgd2UgbmVlZCB0aGUgY29udGV4dCB0byBiZSBzZXQuXG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRfY29udGV4dCA9IGludGVybmFsX2NvbnRleHQ7XG4gICAgICAgIH1cblxuICAgICAgICBPYmplY3QuYXNzaWduKGNvbnRleHQsIGFkZGl0aW9uYWxfY29udGV4dCk7XG4gICAgICAgIHN3aXRjaCAoY29udGV4dF9tb2RlKSB7XG4gICAgICAgICAgICBjYXNlIENvbnRleHRNb2RlLklOVEVSTkFMOlxuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oY29udGV4dCwgaW50ZXJuYWxfY29udGV4dCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIENvbnRleHRNb2RlLlVTRVJfSU5URVJOQUw6XG4gICAgICAgICAgICAgICAgdXNlcl9jb250ZXh0ID0gYXdhaXQgdGhpcy51c2VyVGVtcGxhdGVQYXJzZXIuZ2VuZXJhdGVDb250ZXh0KGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihjb250ZXh0LCB7XG4gICAgICAgICAgICAgICAgICAgIC4uLmludGVybmFsX2NvbnRleHQsXG4gICAgICAgICAgICAgICAgICAgIHVzZXI6IHVzZXJfY29udGV4dCxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBjb250ZXh0O1xuICAgIH1cblxuICAgIGFzeW5jIHBhcnNlVGVtcGxhdGVzKGNvbnRlbnQ6IHN0cmluZywgY29udGV4dD86IGFueSk6IFByb21pc2U8c3RyaW5nPiB7XG4gICAgICAgIGlmICghY29udGV4dCkge1xuICAgICAgICAgICAgY29udGV4dCA9IHRoaXMuY3VycmVudF9jb250ZXh0O1xuICAgICAgICB9XG5cbiAgICAgICAgY29udGVudCA9IGF3YWl0IEV0YS5yZW5kZXJBc3luYyhjb250ZW50LCBjb250ZXh0LCB7XG4gICAgICAgICAgICB2YXJOYW1lOiBcInRwXCIsXG4gICAgICAgICAgICBwYXJzZToge1xuICAgICAgICAgICAgICAgIGV4ZWM6IFwiKlwiLFxuICAgICAgICAgICAgICAgIGludGVycG9sYXRlOiBcIn5cIixcbiAgICAgICAgICAgICAgICByYXc6IFwiXCIsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYXV0b1RyaW06IGZhbHNlLFxuICAgICAgICAgICAgZ2xvYmFsQXdhaXQ6IHRydWUsXG4gICAgICAgIH0pIGFzIHN0cmluZztcblxuICAgICAgICByZXR1cm4gY29udGVudDtcbiAgICB9XG59IiwiaW1wb3J0IHsgQXBwLCBNYXJrZG93blBvc3RQcm9jZXNzb3JDb250ZXh0LCBNYXJrZG93blZpZXcsIFRGaWxlLCBURm9sZGVyIH0gZnJvbSBcIm9ic2lkaWFuXCI7XG5cbmltcG9ydCB7IEN1cnNvckp1bXBlciB9IGZyb20gXCJDdXJzb3JKdW1wZXJcIjtcbmltcG9ydCBUZW1wbGF0ZXJQbHVnaW4gZnJvbSBcIm1haW5cIjtcbmltcG9ydCB7IENvbnRleHRNb2RlLCBUZW1wbGF0ZVBhcnNlciB9IGZyb20gXCJUZW1wbGF0ZVBhcnNlclwiO1xuaW1wb3J0IHsgVGVtcGxhdGVyRXJyb3I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ICAgICAgICAgICAgcGFzcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJ1bm5pbmdfY29uZmlnID0gdGhpcy5jcmVhdGVfcnVubmluZ19jb25maWcoZmlsZSwgZmlsZSwgUnVuTW9kZS5EeW5hbWljUHJvY2Vzc29yKTtcbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wYXJzZXIuc2V0Q3VycmVudENvbnRleHQocnVubmluZ19jb25maWcsIENvbnRleHRNb2RlLlVTRVJfSU5URVJOQUwpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHdoaWxlIChtYXRjaCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIE5vdCB0aGUgbW9zdCBlZmZpY2llbnQgd2F5IHRvIGV4Y2x1ZGUgdGhlICcrJyBmcm9tIHRoZSBjb21tYW5kIGJ1dCBJIGNvdWxkbid0IGZpbmQgc29tZXRoaW5nIGJldHRlclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21wbGV0ZV9jb21tYW5kID0gbWF0Y2hbMV0gKyBtYXRjaFsyXTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tbWFuZF9vdXRwdXQ6IHN0cmluZyA9IGF3YWl0IHRoaXMucGx1Z2luLmVycm9yV3JhcHBlcihhc3luYyAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXdhaXQgdGhpcy5wYXJzZXIucGFyc2VUZW1wbGF0ZXMoY29tcGxldGVfY29tbWFuZCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZF9vdXRwdXQgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGxldCBzdGFydCA9IGR5bmFtaWNfY29tbWFuZF9yZWdleC5sYXN0SW5kZX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XBlXCIpICYmIGN4LnN0cmVhbS5tYXRjaCgvXlxccypcXHcvLCBmYWxzZSkpIHtcbiAgICAgICAgY3gubWFya2VkID0gXCJrZXl3b3JkXCJcbiAgICAgICAgaWYgKHZhbHVlID09IFwiZW51bVwiKSByZXR1cm4gY29udChlbnVtZGVmKTtcbiAgICAgICAgZWxzZSBpZiAodmFsdWUgPT0gXCJ0eXBlXCIpIHJldHVybiBjb250KHR5cGVuYW1lLCBleHBlY3QoXCJvcGVyYXRvclwiKSwgdHlwZWV4cHIsIGV4cGVjdChcIjtcIikpO1xuICAgICAgICBlbHNlIHJldHVybiBjb250KHB1c2hsZXgoXCJmb3JtXCIpLCBwYXR0ZXJuLCBleHBlY3QoXCJ7XCIpLCBwdXNobGV4KFwifVwiKSwgYmxvY2ssIHBvcGxleCwgcG9wbGV4KVxuICAgICAgfSBlbHNlIGlmIChpc1RTICYmIHZhbHVlID09IFwibmFtZXNwYWNlXCIpIHtcbiAgICAgICAgY3gubWFya2VkID0gXCJrZXl3b3JkXCJcbiAgICAgICAgcmV0dXJuIGNvbnQocHVzaGxleChcImZvcm1cIiksIGV4cHJlc3Npb24sIHN0YXRlbWVudCwgcG9wbGV4KVxuICAgICAgfSBlbHNlIGlmIChpc1RTICYmIHZhbHVlID09IFwiYWJzdHJhY3RcIikge1xuICAgICAgICBjeC5tYXJrZWQgPSBcImtleXdvcmRcIlxuICAgICAgICByZXR1cm4gY29udChzdGF0ZW1lbnQpXG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gY29udChwdXNobGV4KFwic3RhdFwiKSwgbWF5YmVsYWJlbCk7XG4gICAgICB9XG4gICAgfVxuICAgIGlmICh0eXBlID09IFwic3dpdGNoXCIpIHJldHVybiBjb250KHB1c2hsZXgoXCJmb3JtXCIpLCBwYXJlbkV4cHIsIGV4cGVjdChcIntcIiksIHB1c2hsZXgoXCJ9XCIsIFwic3dpdGNoXCIpLCBwdXNoYmxvY2tjb250ZXh0LFxuICAgICAgICA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AgIGlmICh0eXBlID09IFwiZnVuY3Rpb25cIikgcmV0dXJuIGNvbnQoZnVuY3Rpb25kZWYsIG1heWJlb3ApO1xuICAgIGlmICh0eXBlID09IFwiY2xhc3NcIiB8fCAoaXNUUyAmJiB2YWx1ZSA9PSBcImludGVyZmFjZVwiKSkgeyBjeC5tYXJrZWQgPSBcImtleXdvcmRcIjsgcmV0dXJuIGNvbnQocHVzaGxleChcImZvcm1cIiksIGNsYXNzRXhwcmVzc2lvbiwgcG9wbGV4KTsgfVxuICAgIGlmICh0eXBlID09IFwia2V5d29yZCBjXCIgfHwgdHlwZSA9PSBcImFzeW5jXCIpIHJldHVybiBjb250KG5vQ29tbWEgPyBleHByZXNzaW9uTm9Db21tYSA6IGV4cHJlc3Npb24pO1xuICAgIGlmICh0eXBlID09IFwiKFwiKSByZXR1cm4gY29udChwdXNobGV4KFwiKVwiKSwgbWF5YmVleHByZXNzaW9uLCBleHBlY3QoXCIpXCIpLCBwb3BsZXgsIG1heWJlb3ApO1xuICAgIGlmICh0eXBlID09IFwib3BlcmF0b3JcIiB8fCB0eXBlID09IFwic3ByZWFkXCIpIHJldHVybiBjb250KG5vQ29tbWEgPyBleHByZXNzaW9uTm9Db21tYSA6IGV4cHJlc3Npb24pO1xuICAgIGlmICh0eXBlID09IFwiW1wiKSByZXR1cm4gY29udChwdXNobGV4KFwiXVwiKSwgYXJyYXlMaXRlcmFsLCBwb3BsZXgsIG1heWJlb3ApO1xuICAgIGlmICh0eXBlID09IFwie1wiKSByZXR1cm4gY29udENvbW1hc2VwKG9ianByb3AsIFwifVwiLCBudWxsLCBtYXliZW9wKTtcbiAgICBpZiAodHlwZSA9PSBcInF1YXNpXCIpIHJldHVybiBwYXNzKHF1YXNpLCBtYXliZW9wKTtcbiAgICBpZiAodHlwZSA9PSBcIm5ld1wiKSByZXR1cm4gY29udChtYXliZVRhcmdldChub0NvbW1hKSk7XG4gICAgcmV0dXJuIGNvbnQoKTtcbiAgfVxuICBmdW5jdGlvbi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Shqc19tb2RlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLmpzX3N0YXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5Db21tYW5kOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ19jbGFzczogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyZWVMaW5lOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGNvcHlTdGF0ZTogZnVuY3Rpb24oc3RhdGU6IGFueSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBqc19zdGF0ZSA9IHdpbmRvdy5Db2RlTWlycm9yLnN0YXJ0U3RhdGUoanNfbW9kZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld19zdGF0ZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLmpzX3N0YXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5Db21tYW5kOiBzdGF0ZS5pbkNvbW1hbmQsXG4gICAgICAgICAgICAgICAgICAgICAgICB0YWdfY2xhc3M6IHN0YXRlLnRhZ19jbGFzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyZWVMaW5lOiBzdGF0ZS5mcmVlTGluZSxcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ld19zdGF0ZTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGJsYW5rTGluZTogZnVuY3Rpb24oc3RhdGU6IGFueSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuaW5Db21tYW5kKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYGxpbmUtYmFja2dyb3VuZC10ZW1wbGF0ZXItY29tbWFuZC1iZ2A7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB0b2tlbjogZnVuY3Rpb24oc3RyZWFtOiBhbnksIHN0YXRlOiBhbnkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0cmVhbS5zb2woKSAmJiBzdGF0ZS5pbkNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlLmZyZWVMaW5lID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5pbkNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXl3b3JkcyA9IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RyZWFtLm1hdGNoKC9bXFwtX117MCwxfSU+LywgdHJ1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS5pbkNvbW1hbmQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS5mcmVlTGluZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhZ19jbGFzcyA9IHN0YXRlLnRhZ19jbGFzcztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS50YWdfY2xhc3MgPSBcIlwiO1xuIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBgbGluZS0ke1RQX0lOTElORV9DTEFTU30gJHtUUF9DTURfVE9LRU5fQ0xBU1N9ICR7VFBfQ0xPU0lOR19UQUdfVE9LRU5fQ0xBU1N9ICR7dGFnX2NsYXNzfWA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IFxuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBqc19yZXN1bHQgPSBqc19tb2RlLnRva2VuKHN0cmVhbSwgc3RhdGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0cmVhbS5wZWVrKCkgPT0gbnVsbCAmJiBzdGF0ZS5mcmVlTGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXdvcmRzICs9IGAgbGluZS1iYWNrZ3JvdW5kLXRlbXBsYXRlci1jb21tYW5kLWJnYDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc3RhdGUuZnJlZUxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXl3b3JkcyArPSBgIGxpbmUtJHtUUF9JTkxJTkVfQ0xBU1N9YDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGAke2tleXdvcmRzfSAke1RQX0NNRF9UT0tFTl9DTEFTU30gJHtqc19yZXN1bHR9YDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gc3RyZWFtLm1hdGNoKC88JVtcXC1fXXswLDF9XFxzKihbKn4rXXswLDF9KS8sIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2ggIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChtYXRjaFsxXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJyonOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS50YWdfY2xhc3MgPSBUUF9FWEVDX1RBR19UT0tFTl9DTEFTUztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnfic6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlLnRhZ19jbGFzcyA9IFRQX1JBV19UQUdfVE9LRU5fQ0xBU1M7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlLnRhZ19jbGFzcyA9IFRQX0lOVEVSUE9MQVRJT05fVEFHX1RPS0VOX0NMQVNTO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlLmluQ29tbWFuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYGxpbmUtJHtUUF9JTkxJTkVfQ0xBU1N9ICR7VFBfQ01EX1RPS0VOX0NMQVNTfSAke1RQX09QRU5JTkdfVEFHX1RPS0VOX0NMQVNTfSAke3N0YXRlLnRhZ19jbGFzc31gO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHN0cmVhbS5uZXh0KCkgIT0gbnVsbCAmJiAhc3RyZWFtLm1hdGNoKC88JS8sIGZhbHNlKSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgIH1cblx0XHRcdH07XG4gICAgICAgICAgICByZXR1cm4gb3ZlcmxheV9tb2RlKHdpbmRvdy5Db2RlTWlycm9yLmdldE1vZGUoY29uZmlnLCBcImh5cGVybWRcIiksIHRlbXBsYXRlck92ZXJsYXkpO1xuXHRcdH0pOyBcblx0fVxufSIsImltcG9ydCB7IGFkZEljb24sIEV2ZW50UmVmLCBNZW51LCBNZW51SXRlbSwgbm9ybWFsaXplUGF0aCwgTm90aWNlLCBQbGF0Zm9ybSwgUGx1Z2luLCBUQWJzdHJhY3RGaWxlLCBURmlsZSwgVEZvbGRlciB9IGZyb20gJ29ic2lkaWFuJztcclxuXHJcbmltcG9ydCB7IERFRkFVTFRfU0VUVElOR1MsIFRlbXB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