`):
- *
- * ```javascript
- * var hljs = require('highlight.js') // https://highlightjs.org/
- *
- * // Actual default values
- * var md = require('markdown-it')({
- * highlight: function (str, lang) {
- * if (lang && hljs.getLanguage(lang)) {
- * try {
- * return '' +
- * hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
- * '
';
- * } catch (__) {}
- * }
- *
- * return '' + md.utils.escapeHtml(str) + '
';
- * }
- * });
- * ```
- *
- **/ function MarkdownIt(presetName, options) {
- if (!(this instanceof MarkdownIt)) {
- return new MarkdownIt(presetName, options);
- }
- if (!options) {
- if (!utils.isString(presetName)) {
- options = presetName || {};
- presetName = "default";
- }
- }
- /**
- * MarkdownIt#inline -> ParserInline
- *
- * Instance of [[ParserInline]]. You may need it to add new rules when
- * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
- * [[MarkdownIt.enable]].
- **/ this.inline = new parser_inline;
- /**
- * MarkdownIt#block -> ParserBlock
- *
- * Instance of [[ParserBlock]]. You may need it to add new rules when
- * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
- * [[MarkdownIt.enable]].
- **/ this.block = new parser_block;
- /**
- * MarkdownIt#core -> Core
- *
- * Instance of [[Core]] chain executor. You may need it to add new rules when
- * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
- * [[MarkdownIt.enable]].
- **/ this.core = new parser_core;
- /**
- * MarkdownIt#renderer -> Renderer
- *
- * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
- * rules for new token types, generated by plugins.
- *
- * ##### Example
- *
- * ```javascript
- * var md = require('markdown-it')();
- *
- * function myToken(tokens, idx, options, env, self) {
- * //...
- * return result;
- * };
- *
- * md.renderer.rules['my_token'] = myToken
- * ```
- *
- * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
- **/ this.renderer = new renderer;
- /**
- * MarkdownIt#linkify -> LinkifyIt
- *
- * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
- * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
- * rule.
- **/ this.linkify = new linkifyIt;
- /**
- * MarkdownIt#validateLink(url) -> Boolean
- *
- * Link validation function. CommonMark allows too much in links. By default
- * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
- * except some embedded image types.
- *
- * You can change this behaviour:
- *
- * ```javascript
- * var md = require('markdown-it')();
- * // enable everything
- * md.validateLink = function () { return true; }
- * ```
- **/ this.validateLink = validateLink;
- /**
- * MarkdownIt#normalizeLink(url) -> String
- *
- * Function used to encode link url to a machine-readable format,
- * which includes url-encoding, punycode, etc.
- **/ this.normalizeLink = normalizeLink;
- /**
- * MarkdownIt#normalizeLinkText(url) -> String
- *
- * Function used to decode link url to a human-readable format`
- **/ this.normalizeLinkText = normalizeLinkText;
- // Expose utils & helpers for easy acces from plugins
- /**
- * MarkdownIt#utils -> utils
- *
- * Assorted utility functions, useful to write plugins. See details
- * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).
- **/ this.utils = utils;
- /**
- * MarkdownIt#helpers -> helpers
- *
- * Link components parser functions, useful to write plugins. See details
- * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
- **/ this.helpers = utils.assign({}, helpers);
- this.options = {};
- this.configure(presetName);
- if (options) {
- this.set(options);
- }
- }
- /** chainable
- * MarkdownIt.set(options)
- *
- * Set parser options (in the same format as in constructor). Probably, you
- * will never need it, but you can change options after constructor call.
- *
- * ##### Example
- *
- * ```javascript
- * var md = require('markdown-it')()
- * .set({ html: true, breaks: true })
- * .set({ typographer, true });
- * ```
- *
- * __Note:__ To achieve the best possible performance, don't modify a
- * `markdown-it` instance options on the fly. If you need multiple configurations
- * it's best to create multiple instances and initialize each with separate
- * config.
- **/ MarkdownIt.prototype.set = function(options) {
- utils.assign(this.options, options);
- return this;
- };
- /** chainable, internal
- * MarkdownIt.configure(presets)
- *
- * Batch load of all options and compenent settings. This is internal method,
- * and you probably will not need it. But if you will - see available presets
- * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
- *
- * We strongly recommend to use presets instead of direct config loads. That
- * will give better compatibility with next versions.
- **/ MarkdownIt.prototype.configure = function(presets) {
- var self = this, presetName;
- if (utils.isString(presets)) {
- presetName = presets;
- presets = config[presetName];
- if (!presets) {
- throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name');
- }
- }
- if (!presets) {
- throw new Error("Wrong `markdown-it` preset, can't be empty");
- }
- if (presets.options) {
- self.set(presets.options);
- }
- if (presets.components) {
- Object.keys(presets.components).forEach((function(name) {
- if (presets.components[name].rules) {
- self[name].ruler.enableOnly(presets.components[name].rules);
- }
- if (presets.components[name].rules2) {
- self[name].ruler2.enableOnly(presets.components[name].rules2);
- }
- }));
- }
- return this;
- };
- /** chainable
- * MarkdownIt.enable(list, ignoreInvalid)
- * - list (String|Array): rule name or list of rule names to enable
- * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
- *
- * Enable list or rules. It will automatically find appropriate components,
- * containing rules with given names. If rule not found, and `ignoreInvalid`
- * not set - throws exception.
- *
- * ##### Example
- *
- * ```javascript
- * var md = require('markdown-it')()
- * .enable(['sub', 'sup'])
- * .disable('smartquotes');
- * ```
- **/ MarkdownIt.prototype.enable = function(list, ignoreInvalid) {
- var result = [];
- if (!Array.isArray(list)) {
- list = [ list ];
- }
- [ "core", "block", "inline" ].forEach((function(chain) {
- result = result.concat(this[chain].ruler.enable(list, true));
- }), this);
- result = result.concat(this.inline.ruler2.enable(list, true));
- var missed = list.filter((function(name) {
- return result.indexOf(name) < 0;
- }));
- if (missed.length && !ignoreInvalid) {
- throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + missed);
- }
- return this;
- };
- /** chainable
- * MarkdownIt.disable(list, ignoreInvalid)
- * - list (String|Array): rule name or list of rule names to disable.
- * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
- *
- * The same as [[MarkdownIt.enable]], but turn specified rules off.
- **/ MarkdownIt.prototype.disable = function(list, ignoreInvalid) {
- var result = [];
- if (!Array.isArray(list)) {
- list = [ list ];
- }
- [ "core", "block", "inline" ].forEach((function(chain) {
- result = result.concat(this[chain].ruler.disable(list, true));
- }), this);
- result = result.concat(this.inline.ruler2.disable(list, true));
- var missed = list.filter((function(name) {
- return result.indexOf(name) < 0;
- }));
- if (missed.length && !ignoreInvalid) {
- throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + missed);
- }
- return this;
- };
- /** chainable
- * MarkdownIt.use(plugin, params)
- *
- * Load specified plugin with given params into current parser instance.
- * It's just a sugar to call `plugin(md, params)` with curring.
- *
- * ##### Example
- *
- * ```javascript
- * var iterator = require('markdown-it-for-inline');
- * var md = require('markdown-it')()
- * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
- * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
- * });
- * ```
- **/ MarkdownIt.prototype.use = function(plugin /*, params, ... */) {
- var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
- plugin.apply(plugin, args);
- return this;
- };
- /** internal
- * MarkdownIt.parse(src, env) -> Array
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * Parse input string and return list of block tokens (special token type
- * "inline" will contain list of inline tokens). You should not call this
- * method directly, until you write custom renderer (for example, to produce
- * AST).
- *
- * `env` is used to pass data between "distributed" rules and return additional
- * metadata like reference info, needed for the renderer. It also can be used to
- * inject data in specific cases. Usually, you will be ok to pass `{}`,
- * and then pass updated object to renderer.
- **/ MarkdownIt.prototype.parse = function(src, env) {
- if (typeof src !== "string") {
- throw new Error("Input data should be a String");
- }
- var state = new this.core.State(src, this, env);
- this.core.process(state);
- return state.tokens;
- };
- /**
- * MarkdownIt.render(src [, env]) -> String
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * Render markdown string into html. It does all magic for you :).
- *
- * `env` can be used to inject additional metadata (`{}` by default).
- * But you will not need it with high probability. See also comment
- * in [[MarkdownIt.parse]].
- **/ MarkdownIt.prototype.render = function(src, env) {
- env = env || {};
- return this.renderer.render(this.parse(src, env), this.options, env);
- };
- /** internal
- * MarkdownIt.parseInline(src, env) -> Array
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
- * block tokens list with the single `inline` element, containing parsed inline
- * tokens in `children` property. Also updates `env` object.
- **/ MarkdownIt.prototype.parseInline = function(src, env) {
- var state = new this.core.State(src, this, env);
- state.inlineMode = true;
- this.core.process(state);
- return state.tokens;
- };
- /**
- * MarkdownIt.renderInline(src [, env]) -> String
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * Similar to [[MarkdownIt.render]] but for single paragraph content. Result
- * will NOT be wrapped into `` tags.
- **/ MarkdownIt.prototype.renderInline = function(src, env) {
- env = env || {};
- return this.renderer.render(this.parseInline(src, env), this.options, env);
- };
- var lib = MarkdownIt;
- var markdownIt = lib;
- return markdownIt;
-}));
diff --git a/src/khoj/interface/web/assets/natural-cron.min.js b/src/khoj/interface/web/assets/natural-cron.min.js
deleted file mode 100644
index d974dc4f..00000000
--- a/src/khoj/interface/web/assets/natural-cron.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).getCronString=e()}(function(){return function r(a,o,s){function u(n,e){if(!o[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(i)return i(n,!0);throw(t=new Error("Cannot find module '"+n+"'")).code="MODULE_NOT_FOUND",t}t=o[n]={exports:{}},a[n][0].call(t.exports,function(e){return u(a[n][1][e]||e)},t,t.exports,r,a,o,s)}return o[n].exports}for(var i="function"==typeof require&&require,e=0;e level, m[2] => content
- Syntax.define("preformatted", /^(\s*):(?: (.*)$|$)/); // m[1] => indentation, m[2] => content
- Syntax.define("unorderedListElement", /^(\s*)(?:-|\+|\s+\*)\s+(.*)$/); // m[1] => indentation, m[2] => content
- Syntax.define("orderedListElement", /^(\s*)(\d+)(?:\.|\))\s+(.*)$/); // m[1] => indentation, m[2] => number, m[3] => content
- Syntax.define("tableSeparator", /^(\s*)\|((?:\+|-)*?)\|?$/); // m[1] => indentation, m[2] => content
- Syntax.define("tableRow", /^(\s*)\|(.*?)\|?$/); // m[1] => indentation, m[2] => content
- Syntax.define("blank", /^$/);
- Syntax.define("horizontalRule", /^(\s*)-{5,}$/); //
- Syntax.define("directive", /^(\s*)#\+(?:(begin|end)_)?(.*)$/i); // m[1] => indentation, m[2] => type, m[3] => content
- Syntax.define("comment", /^(\s*)#(.*)$/);
- Syntax.define("line", /^(\s*)(.*)$/);
-
- const propertyDrawer = /:PROPERTIES:(.*):END:/g;
-
- // ------------------------------------------------------------
- // Token
- // ------------------------------------------------------------
-
- function Token() {
- }
-
- Token.prototype = {
- isListElement: function () {
- return this.type === Lexer.tokens.orderedListElement ||
- this.type === Lexer.tokens.unorderedListElement;
- },
-
- isTableElement: function () {
- return this.type === Lexer.tokens.tableSeparator ||
- this.type === Lexer.tokens.tableRow;
- }
- };
-
- // ------------------------------------------------------------
- // Lexer
- // ------------------------------------------------------------
-
- function Lexer(stream) {
- this.stream = stream;
- this.tokenStack = [];
- }
-
- Lexer.prototype = {
- tokenize: function (line) {
- var token = new Token();
- token.fromLineNumber = this.stream.lineNumber;
-
- if (Syntax.isHeader(line)) {
- token.type = Lexer.tokens.header;
- token.indentation = 0;
- token.content = RegExp.$2;
- // specific
- token.level = 2;
- } else if (Syntax.isPreformatted(line)) {
- token.type = Lexer.tokens.preformatted;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$2;
- } else if (Syntax.isUnorderedListElement(line)) {
- token.type = Lexer.tokens.unorderedListElement;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$2;
- } else if (Syntax.isOrderedListElement(line)) {
- token.type = Lexer.tokens.orderedListElement;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$3;
- // specific
- token.number = RegExp.$2;
- } else if (Syntax.isTableSeparator(line)) {
- token.type = Lexer.tokens.tableSeparator;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$2;
- } else if (Syntax.isTableRow(line)) {
- token.type = Lexer.tokens.tableRow;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$2;
- } else if (Syntax.isBlank(line)) {
- token.type = Lexer.tokens.blank;
- token.indentation = 0;
- token.content = null;
- } else if (Syntax.isHorizontalRule(line)) {
- token.type = Lexer.tokens.horizontalRule;
- token.indentation = RegExp.$1.length;
- token.content = null;
- } else if (Syntax.isDirective(line)) {
- token.type = Lexer.tokens.directive;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$3;
- // decide directive type (begin, end or oneshot)
- var directiveTypeString = RegExp.$2;
- if (/^begin/i.test(directiveTypeString))
- token.beginDirective = true;
- else if (/^end/i.test(directiveTypeString))
- token.endDirective = true;
- else
- token.oneshotDirective = true;
- } else if (Syntax.isComment(line)) {
- token.type = Lexer.tokens.comment;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$2;
- } else if (Syntax.isLine(line)) {
- token.type = Lexer.tokens.line;
- token.indentation = RegExp.$1.length;
- token.content = RegExp.$2;
- } else {
- throw new Error("SyntaxError: Unknown line: " + line);
- }
-
- return token;
- },
-
- pushToken: function (token) {
- this.tokenStack.push(token);
- },
-
- pushDummyTokenByType: function (type) {
- var token = new Token();
- token.type = type;
- this.tokenStack.push(token);
- },
-
- peekStackedToken: function () {
- return this.tokenStack.length > 0 ?
- this.tokenStack[this.tokenStack.length - 1] : null;
- },
-
- getStackedToken: function () {
- return this.tokenStack.length > 0 ?
- this.tokenStack.pop() : null;
- },
-
- peekNextToken: function () {
- return this.peekStackedToken() ||
- this.tokenize(this.stream.peekNextLine());
- },
-
- getNextToken: function () {
- return this.getStackedToken() ||
- this.tokenize(this.stream.getNextLine());
- },
-
- hasNext: function () {
- return this.stream.hasNext();
- },
-
- getLineNumber: function () {
- return this.stream.lineNumber;
- }
- };
-
- Lexer.tokens = {};
- [
- "header",
- "orderedListElement",
- "unorderedListElement",
- "tableRow",
- "tableSeparator",
- "preformatted",
- "line",
- "horizontalRule",
- "blank",
- "directive",
- "comment"
- ].forEach(function (tokenName, i) {
- Lexer.tokens[tokenName] = i;
- });
-
- // ------------------------------------------------------------
- // Exports
- // ------------------------------------------------------------
-
- if (typeof exports !== "undefined")
- exports.Lexer = Lexer;
-
- function PrototypeNode(type, children) {
- this.type = type;
- this.children = [];
-
- if (children) {
- for (var i = 0, len = children.length; i < len; ++i) {
- this.appendChild(children[i]);
- }
- }
- }
- PrototypeNode.prototype = {
- previousSibling: null,
- parent: null,
- get firstChild() {
- return this.children.length < 1 ?
- null : this.children[0];
- },
- get lastChild() {
- return this.children.length < 1 ?
- null : this.children[this.children.length - 1];
- },
- appendChild: function (newChild) {
- var previousSibling = this.children.length < 1 ?
- null : this.lastChild;
- this.children.push(newChild);
- newChild.previousSibling = previousSibling;
- newChild.parent = this;
- },
- toString: function () {
- var string = "<" + this.type + ">";
-
- if (typeof this.value !== "undefined") {
- string += " " + this.value;
- } else if (this.children) {
- string += "\n" + this.children.map(function (child, idx) {
- return "#" + idx + " " + child.toString();
- }).join("\n").split("\n").map(function (line) {
- return " " + line;
- }).join("\n");
- }
-
- return string;
- }
- };
-
- var Node = {
- types: {},
-
- define: function (name, postProcess) {
- this.types[name] = name;
-
- var methodName = "create" + name.substring(0, 1).toUpperCase() + name.substring(1);
- var postProcessGiven = typeof postProcess === "function";
-
- this[methodName] = function (children, options) {
- var node = new PrototypeNode(name, children);
-
- if (postProcessGiven)
- postProcess(node, options || {});
-
- return node;
- };
- }
- };
-
- Node.define("text", function (node, options) {
- node.value = options.value;
- });
- Node.define("header", function (node, options) {
- node.level = options.level;
- });
- Node.define("orderedList");
- Node.define("unorderedList");
- Node.define("definitionList");
- Node.define("listElement");
- Node.define("paragraph");
- Node.define("preformatted");
- Node.define("table");
- Node.define("tableRow");
- Node.define("tableCell");
- Node.define("horizontalRule");
- Node.define("directive");
-
- // Inline
- Node.define("inlineContainer");
-
- Node.define("bold");
- Node.define("italic");
- Node.define("underline");
- Node.define("code");
- Node.define("verbatim");
- Node.define("dashed");
- Node.define("link", function (node, options) {
- node.src = options.src;
- });
-
- if (typeof exports !== "undefined")
- exports.Node = Node;
-
- function Stream(sequence) {
- this.sequences = sequence.split(/\r?\n/);
- this.totalLines = this.sequences.length;
- this.lineNumber = 0;
- }
-
- Stream.prototype.peekNextLine = function () {
- return this.hasNext() ? this.sequences[this.lineNumber] : null;
- };
-
- Stream.prototype.getNextLine = function () {
- return this.hasNext() ? this.sequences[this.lineNumber++] : null;
- };
-
- Stream.prototype.hasNext = function () {
- return this.lineNumber < this.totalLines;
- };
-
- if (typeof exports !== "undefined") {
- exports.Stream = Stream;
- }
-
- // var Stream = require("./stream.js").Stream;
- // var Lexer = require("./lexer.js").Lexer;
- // var Node = require("./node.js").Node;
-
- function Parser() {
- this.inlineParser = new InlineParser();
- }
-
- Parser.parseStream = function (stream, options) {
- var parser = new Parser();
- parser.initStatus(stream, options);
- parser.parseNodes();
- return parser.nodes;
- };
-
- Parser.prototype = {
- initStatus: function (stream, options) {
- if (typeof stream === "string")
- stream = new Stream(stream);
- this.lexer = new Lexer(stream);
- this.nodes = [];
- this.options = {
- toc: true,
- num: true,
- "^": "{}",
- multilineCell: false
- };
- // Override option values
- if (options && typeof options === "object") {
- for (var key in options) {
- this.options[key] = options[key];
- }
- }
- this.document = {
- options: this.options,
- directiveValues: {},
- convert: function (ConverterClass, exportOptions) {
- var converter = new ConverterClass(this, exportOptions);
- return converter.result;
- }
- };
- },
-
- parse: function (stream, options) {
- this.initStatus(stream, options);
- this.parseDocument();
- this.document.nodes = this.nodes;
- return this.document;
- },
-
- createErrorReport: function (message) {
- return new Error(message + " at line " + this.lexer.getLineNumber());
- },
-
- skipBlank: function () {
- var blankToken = null;
- while (this.lexer.peekNextToken().type === Lexer.tokens.blank)
- blankToken = this.lexer.getNextToken();
- return blankToken;
- },
-
- setNodeOriginFromToken: function (node, token) {
- node.fromLineNumber = token.fromLineNumber;
- return node;
- },
-
- appendNode: function (newNode) {
- var previousSibling = this.nodes.length > 0 ? this.nodes[this.nodes.length - 1] : null;
- this.nodes.push(newNode);
- newNode.previousSibling = previousSibling;
- },
-
- // ------------------------------------------------------------
- // ::= *
- // ------------------------------------------------------------
-
- parseDocument: function () {
- this.parseTitle();
- this.parseNodes();
- },
-
- parseNodes: function () {
- while (this.lexer.hasNext()) {
- var element = this.parseElement();
- if (element) this.appendNode(element);
- }
- },
-
- parseTitle: function () {
- this.skipBlank();
-
- if (this.lexer.hasNext() &&
- this.lexer.peekNextToken().type === Lexer.tokens.line)
- this.document.title = this.createTextNode(this.lexer.getNextToken().content);
- else
- this.document.title = null;
-
- this.lexer.pushDummyTokenByType(Lexer.tokens.blank);
- },
-
- // ------------------------------------------------------------
- // ::= ( |
- // | |
- // | )*
- // ------------------------------------------------------------
-
- parseElement: function () {
- var element = null;
-
- switch (this.lexer.peekNextToken().type) {
- case Lexer.tokens.header:
- element = this.parseHeader();
- break;
- case Lexer.tokens.preformatted:
- element = this.parsePreformatted();
- break;
- case Lexer.tokens.orderedListElement:
- case Lexer.tokens.unorderedListElement:
- element = this.parseList();
- break;
- case Lexer.tokens.line:
- element = this.parseText();
- break;
- case Lexer.tokens.tableRow:
- case Lexer.tokens.tableSeparator:
- element = this.parseTable();
- break;
- case Lexer.tokens.blank:
- this.skipBlank();
- if (this.lexer.hasNext()) {
- if (this.lexer.peekNextToken().type === Lexer.tokens.line)
- element = this.parseParagraph();
- else
- element = this.parseElement();
- }
- break;
- case Lexer.tokens.horizontalRule:
- this.lexer.getNextToken();
- element = Node.createHorizontalRule();
- break;
- case Lexer.tokens.directive:
- element = this.parseDirective();
- break;
- case Lexer.tokens.comment:
- // Skip
- this.lexer.getNextToken();
- break;
- default:
- throw this.createErrorReport("Unhandled token: " + this.lexer.peekNextToken().type);
- }
-
- return element;
- },
-
- parseElementBesidesDirectiveEnd: function () {
- try {
- // Temporary, override the definition of `parseElement`
- this.parseElement = this.parseElementBesidesDirectiveEndBody;
- return this.parseElement();
- } finally {
- this.parseElement = this.originalParseElement;
- }
- },
-
- parseElementBesidesDirectiveEndBody: function () {
- if (this.lexer.peekNextToken().type === Lexer.tokens.directive &&
- this.lexer.peekNextToken().endDirective) {
- return null;
- }
-
- return this.originalParseElement();
- },
-
- // ------------------------------------------------------------
- //
- //
- // : preformatted
- // : block
- // ------------------------------------------------------------
-
- parseHeader: function () {
- var headerToken = this.lexer.getNextToken();
- var header = Node.createHeader([
- this.createTextNode(headerToken.content) // TODO: Parse inline markups
- ], { level: headerToken.level });
- this.setNodeOriginFromToken(header, headerToken);
-
- return header;
- },
-
- // ------------------------------------------------------------
- //
- //
- // : preformatted
- // : block
- // ------------------------------------------------------------
-
- parsePreformatted: function () {
- var preformattedFirstToken = this.lexer.peekNextToken();
- var preformatted = Node.createPreformatted([]);
- this.setNodeOriginFromToken(preformatted, preformattedFirstToken);
-
- var textContents = [];
-
- while (this.lexer.hasNext()) {
- var token = this.lexer.peekNextToken();
- if (token.type !== Lexer.tokens.preformatted ||
- token.indentation < preformattedFirstToken.indentation)
- break;
- this.lexer.getNextToken();
- textContents.push(token.content);
- }
-
- preformatted.appendChild(this.createTextNode(textContents.join("\n"), true /* no emphasis */));
-
- return preformatted;
- },
-
- // ------------------------------------------------------------
- //
- //
- // - foo
- // 1. bar
- // 2. baz
- // ------------------------------------------------------------
-
- // XXX: not consider codes (e.g., =Foo::Bar=)
- definitionPattern: /^(.*?) :: *(.*)$/,
-
- parseList: function () {
- var rootToken = this.lexer.peekNextToken();
- var list;
- var isDefinitionList = false;
-
- if (this.definitionPattern.test(rootToken.content)) {
- list = Node.createDefinitionList([]);
- isDefinitionList = true;
- } else {
- list = rootToken.type === Lexer.tokens.unorderedListElement ?
- Node.createUnorderedList([]) : Node.createOrderedList([]);
- }
- this.setNodeOriginFromToken(list, rootToken);
-
- while (this.lexer.hasNext()) {
- var nextToken = this.lexer.peekNextToken();
- if (!nextToken.isListElement() || nextToken.indentation !== rootToken.indentation)
- break;
- list.appendChild(this.parseListElement(rootToken.indentation, isDefinitionList));
- }
-
- return list;
- },
-
- unknownDefinitionTerm: "???",
-
- parseListElement: function (rootIndentation, isDefinitionList) {
- var listElementToken = this.lexer.getNextToken();
- var listElement = Node.createListElement([]);
- this.setNodeOriginFromToken(listElement, listElementToken);
-
- listElement.isDefinitionList = isDefinitionList;
-
- if (isDefinitionList) {
- var match = this.definitionPattern.exec(listElementToken.content);
- listElement.term = [
- this.createTextNode(match && match[1] ? match[1] : this.unknownDefinitionTerm)
- ];
- listElement.appendChild(this.createTextNode(match ? match[2] : listElementToken.content));
- } else {
- listElement.appendChild(this.createTextNode(listElementToken.content));
- }
-
- while (this.lexer.hasNext()) {
- var blankToken = this.skipBlank();
- if (!this.lexer.hasNext())
- break;
-
- var notBlankNextToken = this.lexer.peekNextToken();
- if (blankToken && !notBlankNextToken.isListElement())
- this.lexer.pushToken(blankToken); // Recover blank token only when next line is not listElement.
- // End of the list if hit less indented line or end of directive
- if (notBlankNextToken.indentation <= rootIndentation ||
- (notBlankNextToken.type === Lexer.tokens.directive && notBlankNextToken.endDirective))
- break;
-
- var element = this.parseElement(); // recursive
- if (element)
- listElement.appendChild(element);
- }
-
- return listElement;
- },
-
- // ------------------------------------------------------------
- // ::= +
- // ------------------------------------------------------------
-
- parseTable: function () {
- var nextToken = this.lexer.peekNextToken();
- var table = Node.createTable([]);
- this.setNodeOriginFromToken(table, nextToken);
- var sawSeparator = false;
-
- var allowMultilineCell = nextToken.type === Lexer.tokens.tableSeparator && this.options.multilineCell;
-
- while (this.lexer.hasNext() &&
- (nextToken = this.lexer.peekNextToken()).isTableElement()) {
- if (nextToken.type === Lexer.tokens.tableRow) {
- var tableRow = this.parseTableRow(allowMultilineCell);
- table.appendChild(tableRow);
- } else {
- // Lexer.tokens.tableSeparator
- sawSeparator = true;
- this.lexer.getNextToken();
- }
- }
-
- if (sawSeparator && table.children.length) {
- table.children[0].children.forEach(function (cell) {
- cell.isHeader = true;
- });
- }
-
- return table;
- },
-
- // ------------------------------------------------------------
- // ::= +
- // ------------------------------------------------------------
-
- parseTableRow: function (allowMultilineCell) {
- var tableRowTokens = [];
-
- while (this.lexer.peekNextToken().type === Lexer.tokens.tableRow) {
- tableRowTokens.push(this.lexer.getNextToken());
- if (!allowMultilineCell) {
- break;
- }
- }
-
- if (!tableRowTokens.length) {
- throw this.createErrorReport("Expected table row");
- }
-
- var firstTableRowToken = tableRowTokens.shift();
- var tableCellTexts = firstTableRowToken.content.split("|");
-
- tableRowTokens.forEach(function (rowToken) {
- rowToken.content.split("|").forEach(function (cellText, cellIdx) {
- tableCellTexts[cellIdx] = (tableCellTexts[cellIdx] || "") + "\n" + cellText;
- });
- });
-
- // TODO: Prepare two pathes: (1)
- var tableCells = tableCellTexts.map(
- // TODO: consider '|' escape?
- function (text) {
- return Node.createTableCell(Parser.parseStream(text));
- }, this);
-
- return this.setNodeOriginFromToken(Node.createTableRow(tableCells), firstTableRowToken);
- },
-
- // ------------------------------------------------------------
- // ::= "#+.*"
- // ------------------------------------------------------------
-
- parseDirective: function () {
- var directiveToken = this.lexer.getNextToken();
- var directiveNode = this.createDirectiveNodeFromToken(directiveToken);
-
- if (directiveToken.endDirective)
- throw this.createErrorReport("Unmatched 'end' directive for " + directiveNode.directiveName);
-
- if (directiveToken.oneshotDirective) {
- this.interpretDirective(directiveNode);
- return directiveNode;
- }
-
- if (!directiveToken.beginDirective)
- throw this.createErrorReport("Invalid directive " + directiveNode.directiveName);
-
- // Parse begin ~ end
- directiveNode.children = [];
- if (this.isVerbatimDirective(directiveNode))
- return this.parseDirectiveBlockVerbatim(directiveNode);
- else
- return this.parseDirectiveBlock(directiveNode);
- },
-
- createDirectiveNodeFromToken: function (directiveToken) {
- var matched = /^[ ]*([^ ]*)[ ]*(.*)[ ]*$/.exec(directiveToken.content);
-
- var directiveNode = Node.createDirective(null);
- this.setNodeOriginFromToken(directiveNode, directiveToken);
- directiveNode.directiveName = matched[1].toLowerCase();
- directiveNode.directiveArguments = this.parseDirectiveArguments(matched[2]);
- directiveNode.directiveOptions = this.parseDirectiveOptions(matched[2]);
- directiveNode.directiveRawValue = matched[2];
-
- return directiveNode;
- },
-
- isVerbatimDirective: function (directiveNode) {
- var directiveName = directiveNode.directiveName;
- return directiveName === "src" || directiveName === "example" || directiveName === "html";
- },
-
- parseDirectiveBlock: function (directiveNode, verbatim) {
- this.lexer.pushDummyTokenByType(Lexer.tokens.blank);
-
- while (this.lexer.hasNext()) {
- var nextToken = this.lexer.peekNextToken();
- if (nextToken.type === Lexer.tokens.directive &&
- nextToken.endDirective &&
- this.createDirectiveNodeFromToken(nextToken).directiveName === directiveNode.directiveName) {
- // Close directive
- this.lexer.getNextToken();
- return directiveNode;
- }
- var element = this.parseElementBesidesDirectiveEnd();
- if (element)
- directiveNode.appendChild(element);
- }
-
- throw this.createErrorReport("Unclosed directive " + directiveNode.directiveName);
- },
-
- parseDirectiveBlockVerbatim: function (directiveNode) {
- var textContent = [];
-
- while (this.lexer.hasNext()) {
- var nextToken = this.lexer.peekNextToken();
- if (nextToken.type === Lexer.tokens.directive &&
- nextToken.endDirective &&
- this.createDirectiveNodeFromToken(nextToken).directiveName === directiveNode.directiveName) {
- this.lexer.getNextToken();
- directiveNode.appendChild(this.createTextNode(textContent.join("\n"), true));
- return directiveNode;
- }
- textContent.push(this.lexer.stream.getNextLine());
- }
-
- throw this.createErrorReport("Unclosed directive " + directiveNode.directiveName);
- },
-
- parseDirectiveArguments: function (parameters) {
- return parameters.split(/[ ]+/).filter(function (param) {
- return param.length && param[0] !== "-";
- });
- },
-
- parseDirectiveOptions: function (parameters) {
- return parameters.split(/[ ]+/).filter(function (param) {
- return param.length && param[0] === "-";
- });
- },
-
- interpretDirective: function (directiveNode) {
- // http://orgmode.org/manual/Export-options.html
- switch (directiveNode.directiveName) {
- case "options:":
- this.interpretOptionDirective(directiveNode);
- break;
- case "title:":
- this.document.title = directiveNode.directiveRawValue;
- break;
- case "author:":
- this.document.author = directiveNode.directiveRawValue;
- break;
- case "email:":
- this.document.email = directiveNode.directiveRawValue;
- break;
- default:
- this.document.directiveValues[directiveNode.directiveName] = directiveNode.directiveRawValue;
- break;
- }
- },
-
- interpretOptionDirective: function (optionDirectiveNode) {
- optionDirectiveNode.directiveArguments.forEach(function (pairString) {
- var pair = pairString.split(":");
- this.options[pair[0]] = this.convertLispyValue(pair[1]);
- }, this);
- },
-
- convertLispyValue: function (lispyValue) {
- switch (lispyValue) {
- case "t":
- return true;
- case "nil":
- return false;
- default:
- if (/^[0-9]+$/.test(lispyValue))
- return parseInt(lispyValue);
- return lispyValue;
- }
- },
-
- // ------------------------------------------------------------
- // ::= *
- // ------------------------------------------------------------
-
- parseParagraph: function () {
- var paragraphFisrtToken = this.lexer.peekNextToken();
- var paragraph = Node.createParagraph([]);
- this.setNodeOriginFromToken(paragraph, paragraphFisrtToken);
-
- var textContents = [];
-
- while (this.lexer.hasNext()) {
- var nextToken = this.lexer.peekNextToken();
- if (nextToken.type !== Lexer.tokens.line
- || nextToken.indentation < paragraphFisrtToken.indentation)
- break;
- this.lexer.getNextToken();
- textContents.push(nextToken.content);
- }
-
- paragraph.appendChild(this.createTextNode(textContents.join("\n")));
-
- return paragraph;
- },
-
- parseText: function (noEmphasis) {
- var lineToken = this.lexer.getNextToken();
- return this.createTextNode(lineToken.content, noEmphasis);
- },
-
- // ------------------------------------------------------------
- // (DOM Like)
- // ------------------------------------------------------------
-
- createTextNode: function (text, noEmphasis) {
- return noEmphasis ? Node.createText(null, { value: text })
- : this.inlineParser.parseEmphasis(text);
- }
- };
- Parser.prototype.originalParseElement = Parser.prototype.parseElement;
-
- // ------------------------------------------------------------
- // Parser for Inline Elements
- //
- // @refs org-emphasis-regexp-components
- // ------------------------------------------------------------
-
- function InlineParser() {
- this.preEmphasis = " \t\\('\"";
- this.postEmphasis = "- \t.,:!?;'\"\\)";
- this.borderForbidden = " \t\r\n,\"'";
- this.bodyRegexp = "[\\s\\S]*?";
- this.markers = "*/_=~+";
-
- this.emphasisPattern = this.buildEmphasisPattern();
- this.linkPattern = /\[\[([^\]]*)\](?:\[([^\]]*)\])?\]/g; // \1 => link, \2 => text
- }
-
- InlineParser.prototype = {
- parseEmphasis: function (text) {
- var emphasisPattern = this.emphasisPattern;
- emphasisPattern.lastIndex = 0;
-
- var result = [],
- match,
- previousLast = 0,
- savedLastIndex;
-
- while ((match = emphasisPattern.exec(text))) {
- var whole = match[0];
- var pre = match[1];
- var marker = match[2];
- var body = match[3];
- var post = match[4];
-
- {
- // parse links
- var matchBegin = emphasisPattern.lastIndex - whole.length;
- var beforeContent = text.substring(previousLast, matchBegin + pre.length);
- savedLastIndex = emphasisPattern.lastIndex;
- result.push(this.parseLink(beforeContent));
- emphasisPattern.lastIndex = savedLastIndex;
- }
-
- var bodyNode = [Node.createText(null, { value: body })];
- var bodyContainer = this.emphasizeElementByMarker(bodyNode, marker);
- result.push(bodyContainer);
-
- previousLast = emphasisPattern.lastIndex - post.length;
- }
-
- if (emphasisPattern.lastIndex === 0 ||
- emphasisPattern.lastIndex !== text.length - 1)
- result.push(this.parseLink(text.substring(previousLast)));
-
- if (result.length === 1) {
- // Avoid duplicated inline container wrapping
- return result[0];
- } else {
- return Node.createInlineContainer(result);
- }
- },
-
- depth: 0,
- parseLink: function (text) {
- var linkPattern = this.linkPattern;
- linkPattern.lastIndex = 0;
-
- var match,
- result = [],
- previousLast = 0,
- savedLastIndex;
-
- while ((match = linkPattern.exec(text))) {
- var whole = match[0];
- var src = match[1];
- var title = match[2];
-
- // parse before content
- var matchBegin = linkPattern.lastIndex - whole.length;
- var beforeContent = text.substring(previousLast, matchBegin);
- result.push(Node.createText(null, { value: beforeContent }));
-
- // parse link
- var link = Node.createLink([]);
- link.src = src;
- if (title) {
- savedLastIndex = linkPattern.lastIndex;
- link.appendChild(this.parseEmphasis(title));
- linkPattern.lastIndex = savedLastIndex;
- } else {
- link.appendChild(Node.createText(null, { value: src }));
- }
- result.push(link);
-
- previousLast = linkPattern.lastIndex;
- }
-
- if (linkPattern.lastIndex === 0 ||
- linkPattern.lastIndex !== text.length - 1)
- result.push(Node.createText(null, { value: text.substring(previousLast) }));
-
- return Node.createInlineContainer(result);
- },
-
- emphasizeElementByMarker: function (element, marker) {
- switch (marker) {
- case "*":
- return Node.createBold(element);
- case "/":
- return Node.createItalic(element);
- case "_":
- return Node.createUnderline(element);
- case "=":
- case "~":
- return Node.createCode(element);
- case "+":
- return Node.createDashed(element);
- }
- },
-
- buildEmphasisPattern: function () {
- return new RegExp(
- "([" + this.preEmphasis + "]|^|\r?\n)" + // \1 => pre
- "([" + this.markers + "])" + // \2 => marker
- "([^" + this.borderForbidden + "]|" + // \3 => body
- "[^" + this.borderForbidden + "]" +
- this.bodyRegexp +
- "[^" + this.borderForbidden + "])" +
- "\\2" +
- "([" + this.postEmphasis +"]|$|\r?\n)", // \4 => post
- // flags
- "g"
- );
- }
- };
-
- if (typeof exports !== "undefined") {
- exports.Parser = Parser;
- exports.InlineParser = InlineParser;
- }
-
- // var Node = require("../node.js").Node;
-
- function Converter() {
- }
-
- Converter.prototype = {
- exportOptions: {
- headerOffset: 1,
- exportFromLineNumber: false,
- suppressSubScriptHandling: false,
- suppressAutoLink: false,
- // HTML
- translateSymbolArrow: false,
- suppressCheckboxHandling: false,
- // { "directive:": function (node, childText, auxData) {} }
- customDirectiveHandler: null,
- // e.g., "org-js-"
- htmlClassPrefix: null,
- htmlIdPrefix: null
- },
-
- untitled: "Untitled",
- result: null,
-
- // TODO: Manage TODO lists
-
- initialize: function (orgDocument, exportOptions) {
- this.orgDocument = orgDocument;
- this.documentOptions = orgDocument.options || {};
- this.exportOptions = exportOptions || {};
-
- this.headers = [];
- this.headerOffset =
- typeof this.exportOptions.headerOffset === "number" ? this.exportOptions.headerOffset : 1;
- this.sectionNumbers = [0];
- },
-
- createTocItem: function (headerNode, parentTocs) {
- var childTocs = [];
- childTocs.parent = parentTocs;
- var tocItem = { headerNode: headerNode, childTocs: childTocs };
- return tocItem;
- },
-
- computeToc: function (exportTocLevel) {
- if (typeof exportTocLevel !== "number")
- exportTocLevel = Infinity;
-
- var toc = [];
- toc.parent = null;
-
- var previousLevel = 1;
- var currentTocs = toc; // first
-
- for (var i = 0; i < this.headers.length; ++i) {
- var headerNode = this.headers[i];
-
- if (headerNode.level > exportTocLevel)
- continue;
-
- var levelDiff = headerNode.level - previousLevel;
- if (levelDiff > 0) {
- for (var j = 0; j < levelDiff; ++j) {
- if (currentTocs.length === 0) {
- // Create a dummy tocItem
- var dummyHeader = Node.createHeader([], {
- level: previousLevel + j
- });
- dummyHeader.sectionNumberText = "";
- currentTocs.push(this.createTocItem(dummyHeader, currentTocs));
- }
- currentTocs = currentTocs[currentTocs.length - 1].childTocs;
- }
- } else if (levelDiff < 0) {
- levelDiff = -levelDiff;
- for (var k = 0; k < levelDiff; ++k) {
- currentTocs = currentTocs.parent;
- }
- }
-
- currentTocs.push(this.createTocItem(headerNode, currentTocs));
-
- previousLevel = headerNode.level;
- }
-
- return toc;
- },
-
- convertNode: function (node, recordHeader, insideCodeElement) {
- if (!insideCodeElement) {
- if (node.type === Node.types.directive) {
- if (node.directiveName === "example" ||
- node.directiveName === "src") {
- insideCodeElement = true;
- }
- } else if (node.type === Node.types.preformatted) {
- insideCodeElement = true;
- }
- }
-
- if (typeof node === "string") {
- node = Node.createText(null, { value: node });
- }
-
- var childText = node.children ? this.convertNodesInternal(node.children, recordHeader, insideCodeElement) : "";
- var text;
-
- var auxData = this.computeAuxDataForNode(node);
-
- switch (node.type) {
- case Node.types.header:
- // Compute section number
- var sectionNumberText = null;
- if (recordHeader) {
- var thisHeaderLevel = node.level;
- var previousHeaderLevel = this.sectionNumbers.length;
- if (thisHeaderLevel > previousHeaderLevel) {
- // Fill missing section number
- var levelDiff = thisHeaderLevel - previousHeaderLevel;
- for (var j = 0; j < levelDiff; ++j) {
- this.sectionNumbers[thisHeaderLevel - 1 - j] = 0; // Extend
- }
- } else if (thisHeaderLevel < previousHeaderLevel) {
- this.sectionNumbers.length = thisHeaderLevel; // Collapse
- }
- this.sectionNumbers[thisHeaderLevel - 1]++;
- sectionNumberText = this.sectionNumbers.join(".");
- node.sectionNumberText = sectionNumberText; // Can be used in ToC
- }
-
- text = this.convertHeader(node, childText, auxData, sectionNumberText);
-
- if (recordHeader)
- this.headers.push(node);
- break;
- case Node.types.orderedList:
- text = this.convertOrderedList(node, childText, auxData);
- break;
- case Node.types.unorderedList:
- text = this.convertUnorderedList(node, childText, auxData);
- break;
- case Node.types.definitionList:
- text = this.convertDefinitionList(node, childText, auxData);
- break;
- case Node.types.listElement:
- if (node.isDefinitionList) {
- var termText = this.convertNodesInternal(node.term, recordHeader, insideCodeElement);
- text = this.convertDefinitionItem(node, childText, auxData,
- termText, childText);
- } else {
- text = this.convertListItem(node, childText, auxData);
- }
- break;
- case Node.types.paragraph:
- text = this.convertParagraph(node, childText, auxData);
- break;
- case Node.types.preformatted:
- text = this.convertPreformatted(node, childText, auxData);
- break;
- case Node.types.table:
- text = this.convertTable(node, childText, auxData);
- break;
- case Node.types.tableRow:
- text = this.convertTableRow(node, childText, auxData);
- break;
- case Node.types.tableCell:
- if (node.isHeader)
- text = this.convertTableHeader(node, childText, auxData);
- else
- text = this.convertTableCell(node, childText, auxData);
- break;
- case Node.types.horizontalRule:
- text = this.convertHorizontalRule(node, childText, auxData);
- break;
- // ============================================================ //
- // Inline
- // ============================================================ //
- case Node.types.inlineContainer:
- text = this.convertInlineContainer(node, childText, auxData);
- break;
- case Node.types.bold:
- text = this.convertBold(node, childText, auxData);
- break;
- case Node.types.italic:
- text = this.convertItalic(node, childText, auxData);
- break;
- case Node.types.underline:
- text = this.convertUnderline(node, childText, auxData);
- break;
- case Node.types.code:
- text = this.convertCode(node, childText, auxData);
- break;
- case Node.types.dashed:
- text = this.convertDashed(node, childText, auxData);
- break;
- case Node.types.link:
- text = this.convertLink(node, childText, auxData);
- break;
- case Node.types.directive:
- switch (node.directiveName) {
- case "quote":
- text = this.convertQuote(node, childText, auxData);
- break;
- case "example":
- text = this.convertExample(node, childText, auxData);
- break;
- case "src":
- text = this.convertSrc(node, childText, auxData);
- break;
- case "html":
- case "html:":
- text = this.convertHTML(node, childText, auxData);
- break;
- default:
- if (this.exportOptions.customDirectiveHandler &&
- this.exportOptions.customDirectiveHandler[node.directiveName]) {
- text = this.exportOptions.customDirectiveHandler[node.directiveName](
- node, childText, auxData
- );
- } else {
- text = childText;
- }
- }
- break;
- case Node.types.text:
- text = this.convertText(node.value, insideCodeElement);
- break;
- default:
- throw Error("Unknown node type: " + node.type);
- }
-
- if (typeof this.postProcess === "function") {
- text = this.postProcess(node, text, insideCodeElement);
- }
-
- return text;
- },
-
- convertText: function (text, insideCodeElement) {
- var escapedText = this.escapeSpecialChars(text, insideCodeElement);
-
- if (!this.exportOptions.suppressSubScriptHandling && !insideCodeElement) {
- escapedText = this.makeSubscripts(escapedText, insideCodeElement);
- }
- if (!this.exportOptions.suppressAutoLink) {
- escapedText = this.linkURL(escapedText);
- }
-
- return escapedText;
- },
-
- // By default, ignore html
- convertHTML: function (node, childText, auxData) {
- return childText;
- },
-
- convertNodesInternal: function (nodes, recordHeader, insideCodeElement) {
- var nodesTexts = [];
- for (var i = 0; i < nodes.length; ++i) {
- var node = nodes[i];
- var nodeText = this.convertNode(node, recordHeader, insideCodeElement);
- nodesTexts.push(nodeText);
- }
-
- // Return entries without their property drawers
- return this.combineNodesTexts(nodesTexts).replace(propertyDrawer, '');
- },
-
- convertHeaderBlock: function (headerBlock, recordHeader) {
- throw Error("convertHeaderBlock is not implemented");
- },
-
- convertHeaderTree: function (headerTree, recordHeader) {
- return this.convertHeaderBlock(headerTree, recordHeader);
- },
-
- convertNodesToHeaderTree: function (nodes, nextBlockBegin, blockHeader) {
- var childBlocks = [];
- var childNodes = [];
-
- if (typeof nextBlockBegin === "undefined") {
- nextBlockBegin = 0;
- }
- if (typeof blockHeader === "undefined") {
- blockHeader = null;
- }
-
- for (var i = nextBlockBegin; i < nodes.length;) {
- var node = nodes[i];
-
- var isHeader = node.type === Node.types.header;
-
- if (!isHeader) {
- childNodes.push(node);
- i = i + 1;
- continue;
- }
-
- // Header
- if (blockHeader && node.level <= blockHeader.level) {
- // Finish Block
- break;
- } else {
- // blockHeader.level < node.level
- // Begin child block
- var childBlock = this.convertNodesToHeaderTree(nodes, i + 1, node);
- childBlocks.push(childBlock);
- i = childBlock.nextIndex;
- }
- }
-
- // Finish block
- return {
- header: blockHeader,
- childNodes: childNodes,
- nextIndex: i,
- childBlocks: childBlocks
- };
- },
-
- convertNodes: function (nodes, recordHeader, insideCodeElement) {
- return this.convertNodesInternal(nodes, recordHeader, insideCodeElement);
- },
-
- combineNodesTexts: function (nodesTexts) {
- return nodesTexts.join("");
- },
-
- getNodeTextContent: function (node) {
- if (node.type === Node.types.text)
- return this.escapeSpecialChars(node.value);
- else
- return node.children ? node.children.map(this.getNodeTextContent, this).join("") : "";
- },
-
- // @Override
- escapeSpecialChars: function (text) {
- throw Error("Implement escapeSpecialChars");
- },
-
- // http://daringfireball.net/2010/07/improved_regex_for_matching_urls
- urlPattern: /\b(?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])/ig,
-
- // @Override
- linkURL: function (text) {
- var self = this;
- return text.replace(this.urlPattern, function (matched) {
- if (matched.indexOf("://") < 0)
- matched = "http://" + matched;
- return self.makeLink(matched);
- });
- },
-
- makeLink: function (url) {
- throw Error("Implement makeLink");
- },
-
- makeSubscripts: function (text) {
- if (this.documentOptions["^"] === "{}")
- return text.replace(/\b([^_ \t]*)_{([^}]*)}/g,
- this.makeSubscript);
- else if (this.documentOptions["^"])
- return text.replace(/\b([^_ \t]*)_([^_]*)\b/g,
- this.makeSubscript);
- else
- return text;
- },
-
- makeSubscript: function (match, body, subscript) {
- throw Error("Implement makeSubscript");
- },
-
- stripParametersFromURL: function (url) {
- return url.replace(/\?.*$/, "");
- },
-
- imageExtensionPattern: new RegExp("(" + [
- "bmp", "png", "jpeg", "jpg", "gif", "tiff",
- "tif", "xbm", "xpm", "pbm", "pgm", "ppm", "svg"
- ].join("|") + ")$", "i")
- };
-
- if (typeof exports !== "undefined")
- exports.Converter = Converter;
-
- // var Converter = require("./converter.js").Converter;
- // var Node = require("../node.js").Node;
-
- function ConverterHTML(orgDocument, exportOptions) {
- this.initialize(orgDocument, exportOptions);
- this.result = this.convert();
- }
-
- ConverterHTML.prototype = {
- __proto__: Converter.prototype,
-
- convert: function () {
- var contentHTML = this.convertNodes(this.orgDocument.nodes, false /* record headers */);
-
- return {
- contentHTML: contentHTML,
- toString: function () {
- return contentHTML;
- }
- };
- },
-
- tocToHTML: function (toc) {
- function tocToHTMLFunction(tocList) {
- var html = "";
- for (var i = 0; i < tocList.length; ++i) {
- var tocItem = tocList[i];
- var sectionNumberText = tocItem.headerNode.sectionNumberText;
- var sectionNumber = this.documentOptions.num ?
- this.inlineTag("span", sectionNumberText, {
- "class": "section-number"
- }) : "";
- var header = this.getNodeTextContent(tocItem.headerNode);
- var headerLink = this.inlineTag("a", sectionNumber + header, {
- href: "#header-" + sectionNumberText.replace(/\./g, "-")
- });
- var subList = tocItem.childTocs.length ? tocToHTMLFunction.call(this, tocItem.childTocs) : "";
- html += this.tag("li", headerLink + subList);
- }
- return this.tag("ul", html);
- }
-
- return tocToHTMLFunction.call(this, toc);
- },
-
- computeAuxDataForNode: function (node) {
- while (node.parent &&
- node.parent.type === Node.types.inlineContainer) {
- node = node.parent;
- }
- var attributesNode = node.previousSibling;
- var attributesText = "";
- while (attributesNode &&
- attributesNode.type === Node.types.directive &&
- attributesNode.directiveName === "attr_html:") {
- attributesText += attributesNode.directiveRawValue + " ";
- attributesNode = attributesNode.previousSibling;
- }
- return attributesText;
- },
-
- // Method to construct org-js generated class
- orgClassName: function (className) {
- return this.exportOptions.htmlClassPrefix ?
- this.exportOptions.htmlClassPrefix + className
- : className;
- },
-
- // Method to construct org-js generated id
- orgId: function (id) {
- return this.exportOptions.htmlIdPrefix ?
- this.exportOptions.htmlIdPrefix + id
- : id;
- },
-
- // ----------------------------------------------------
- // Node conversion
- // ----------------------------------------------------
-
- convertHeader: function (node, childText, auxData, sectionNumberText) {
- var headerAttributes = {};
-
- // Parse task status
- taskStatusRegex = /^\s*([A-Z]+) /
- taskStatusMatch = childText.match(taskStatusRegex);
- taskStatus = taskStatusMatch && taskStatusMatch[1];
- childText = childText.replace(taskStatusRegex, "");
-
- if (taskStatus) {
- childText = this.inlineTag("span", taskStatus, {
- "class": "task-status " + taskStatus
- }) + childText;
- }
-
- // Parse task tags
- taskTagsRegex = /:([\w:]+):/g
- taskTagsMatch = childText.match(taskTagsRegex);
- taskTags = taskTagsMatch && taskTagsMatch[0].split(":").slice(1,-1);
- childText = childText.replace(taskTagsRegex, "");
-
- if (taskTags) {
- taskTags.forEach(tag => {
- childText += this.inlineTag("span", tag, { "class": "task-tag" })
- });
- }
-
- if (sectionNumberText) {
- childText = this.inlineTag("span", sectionNumberText, {
- "class": "section-number"
- }) + childText;
- headerAttributes["id"] = "header-" + sectionNumberText.replace(/\./g, "-");
- }
-
- if (taskStatus)
- headerAttributes["class"] = "task-status " + taskStatus;
-
- return this.tag("h" + (this.headerOffset + node.level),
- childText, headerAttributes, auxData);
- },
-
- convertOrderedList: function (node, childText, auxData) {
- return this.tag("ol", childText, null, auxData);
- },
-
- convertUnorderedList: function (node, childText, auxData) {
- return this.tag("ul", childText, null, auxData);
- },
-
- convertDefinitionList: function (node, childText, auxData) {
- return this.tag("dl", childText, null, auxData);
- },
-
- convertDefinitionItem: function (node, childText, auxData,
- term, definition) {
- return this.tag("dt", term) + this.tag("dd", definition);
- },
-
- convertListItem: function (node, childText, auxData) {
- if (this.exportOptions.suppressCheckboxHandling) {
- return this.tag("li", childText, null, auxData);
- } else {
- var listItemAttributes = {};
- var listItemText = childText;
- // Embed checkbox
- if (/^\s*\[(X| |-)\]([\s\S]*)/.exec(listItemText)) {
- listItemText = RegExp.$2 ;
- var checkboxIndicator = RegExp.$1;
-
- var checkboxAttributes = { type: "checkbox" };
- switch (checkboxIndicator) {
- case "X":
- checkboxAttributes["checked"] = "true";
- listItemAttributes["data-checkbox-status"] = "done";
- break;
- case "-":
- listItemAttributes["data-checkbox-status"] = "intermediate";
- break;
- default:
- listItemAttributes["data-checkbox-status"] = "undone";
- break;
- }
-
- listItemText = this.inlineTag("input", null, checkboxAttributes) + listItemText;
- }
-
- return this.tag("li", listItemText, listItemAttributes, auxData);
- }
- },
-
- convertParagraph: function (node, childText, auxData) {
- return this.tag("p", childText, null, auxData);
- },
-
- convertPreformatted: function (node, childText, auxData) {
- return this.tag("pre", childText, null, auxData);
- },
-
- convertTable: function (node, childText, auxData) {
- return this.tag("table", this.tag("tbody", childText), null, auxData);
- },
-
- convertTableRow: function (node, childText, auxData) {
- return this.tag("tr", childText);
- },
-
- convertTableHeader: function (node, childText, auxData) {
- return this.tag("th", childText);
- },
-
- convertTableCell: function (node, childText, auxData) {
- return this.tag("td", childText);
- },
-
- convertHorizontalRule: function (node, childText, auxData) {
- return this.tag("hr", null, null, auxData);
- },
-
- convertInlineContainer: function (node, childText, auxData) {
- return childText;
- },
-
- convertBold: function (node, childText, auxData) {
- return this.inlineTag("b", childText);
- },
-
- convertItalic: function (node, childText, auxData) {
- return this.inlineTag("i", childText);
- },
-
- convertUnderline: function (node, childText, auxData) {
- return this.inlineTag("span", childText, {
- style: "text-decoration:underline;"
- });
- },
-
- convertCode: function (node, childText, auxData) {
- return this.inlineTag("code", childText);
- },
-
- convertDashed: function (node, childText, auxData) {
- return this.inlineTag("del", childText);
- },
-
- convertLink: function (node, childText, auxData) {
- var srcParameterStripped = this.stripParametersFromURL(node.src);
- if (this.imageExtensionPattern.exec(srcParameterStripped)) {
- var imgText = this.getNodeTextContent(node);
- return this.inlineTag("img", null, {
- src: node.src,
- alt: imgText,
- title: imgText
- }, auxData);
- } else {
- return this.inlineTag("a", childText, { href: node.src });
- }
- },
-
- convertQuote: function (node, childText, auxData) {
- return this.tag("blockquote", childText, null, auxData);
- },
-
- convertExample: function (node, childText, auxData) {
- return this.tag("pre", childText, null, auxData);
- },
-
- convertSrc: function (node, childText, auxData) {
- var codeLanguage = node.directiveArguments.length
- ? node.directiveArguments[0]
- : "unknown";
- childText = this.tag("code", childText, {
- "class": "language-" + codeLanguage
- }, auxData);
- return this.tag("pre", childText, {
- "class": "prettyprint"
- });
- },
-
- // @override
- convertHTML: function (node, childText, auxData) {
- if (node.directiveName === "html:") {
- return node.directiveRawValue;
- } else if (node.directiveName === "html") {
- return node.children.map(function (textNode) {
- return textNode.value;
- }).join("\n");
- } else {
- return childText;
- }
- },
-
- // @implement
- convertHeaderBlock: function (headerBlock, level, index) {
- level = level || 0;
- index = index || 0;
-
- var contents = [];
-
- var headerNode = headerBlock.header;
- if (headerNode) {
- contents.push(this.convertNode(headerNode));
- }
-
- var blockContent = this.convertNodes(headerBlock.childNodes);
- contents.push(blockContent);
-
- var childBlockContent = headerBlock.childBlocks
- .map(function (block, idx) {
- return this.convertHeaderBlock(block, level + 1, idx);
- }, this)
- .join("\n");
- contents.push(childBlockContent);
-
- var contentsText = contents.join("\n");
-
- if (headerNode) {
- return this.tag("section", "\n" + contents.join("\n"), {
- "class": "block block-level-" + level
- });
- } else {
- return contentsText;
- }
- },
-
- // ----------------------------------------------------
- // Supplemental methods
- // ----------------------------------------------------
-
- replaceMap: {
- // [replacing pattern, predicate]
- "&": ["&", null],
- "<": ["<", null],
- ">": [">", null],
- '"': [""", null],
- "'": ["'", null],
- "->": ["➔", function (text, insideCodeElement) {
- return this.exportOptions.translateSymbolArrow && !insideCodeElement;
- }]
- },
-
- replaceRegexp: null,
-
- // @implement @override
- escapeSpecialChars: function (text, insideCodeElement) {
- if (!this.replaceRegexp) {
- this.replaceRegexp = new RegExp(Object.keys(this.replaceMap).join("|"), "g");
- }
-
- var replaceMap = this.replaceMap;
- var self = this;
- return text.replace(this.replaceRegexp, function (matched) {
- if (!replaceMap[matched]) {
- throw Error("escapeSpecialChars: Invalid match");
- }
-
- var predicate = replaceMap[matched][1];
- if (typeof predicate === "function" &&
- !predicate.call(self, text, insideCodeElement)) {
- // Not fullfill the predicate
- return matched;
- }
-
- return replaceMap[matched][0];
- });
- },
-
- // @implement
- postProcess: function (node, currentText, insideCodeElement) {
- if (this.exportOptions.exportFromLineNumber &&
- typeof node.fromLineNumber === "number") {
- // Wrap with line number information
- currentText = this.inlineTag("div", currentText, {
- "data-line-number": node.fromLineNumber
- });
- }
- return currentText;
- },
-
- // @implement
- makeLink: function (url) {
- return "" + decodeURIComponent(url) + " ";
- },
-
- // @implement
- makeSubscript: function (match, body, subscript) {
- return "" +
- body +
- " " +
- subscript +
- " ";
- },
-
- // ----------------------------------------------------
- // Specific methods
- // ----------------------------------------------------
-
- attributesObjectToString: function (attributesObject) {
- var attributesString = "";
- for (var attributeName in attributesObject) {
- if (attributesObject.hasOwnProperty(attributeName)) {
- var attributeValue = attributesObject[attributeName];
- // To avoid id/class name conflicts with other frameworks,
- // users can add arbitrary prefix to org-js generated
- // ids/classes via exportOptions.
- if (attributeName === "class") {
- attributeValue = this.orgClassName(attributeValue);
- } else if (attributeName === "id") {
- attributeValue = this.orgId(attributeValue);
- }
- attributesString += " " + attributeName + "=\"" + attributeValue + "\"";
- }
- }
- return attributesString;
- },
-
- inlineTag: function (name, innerText, attributesObject, auxAttributesText) {
- attributesObject = attributesObject || {};
-
- var htmlString = "<" + name;
- // TODO: check duplicated attributes
- if (auxAttributesText)
- htmlString += " " + auxAttributesText;
- htmlString += this.attributesObjectToString(attributesObject);
-
- if (innerText === null)
- return htmlString + "/>";
-
- htmlString += ">" + innerText + "" + name + ">";
-
- return htmlString;
- },
-
- tag: function (name, innerText, attributesObject, auxAttributesText) {
- return this.inlineTag(name, innerText, attributesObject, auxAttributesText) + "\n";
- }
- };
-
- if (typeof exports !== "undefined")
- exports.ConverterHTML = ConverterHTML;
-
- return exports;
-})();
diff --git a/src/khoj/interface/web/assets/pico.min.css b/src/khoj/interface/web/assets/pico.min.css
deleted file mode 100644
index 1fe468ce..00000000
--- a/src/khoj/interface/web/assets/pico.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-@charset "UTF-8";/*!
- * Pico CSS v1.5.10 (https://picocss.com)
- * Copyright 2019-2023 - Licensed under MIT
- */:root{--line-height:1.5;--font-weight:400;--font-size:16px;--border-radius:0.25rem;--border-width:1px;--outline-width:3px;--spacing:1rem;--typography-spacing-vertical:1.5rem;--block-spacing-vertical:calc(var(--spacing) * 2);--block-spacing-horizontal:var(--spacing);--grid-spacing-vertical:0;--grid-spacing-horizontal:var(--spacing);--form-element-spacing-vertical:0.75rem;--form-element-spacing-horizontal:1rem;--nav-element-spacing-vertical:1rem;--nav-element-spacing-horizontal:0.5rem;--nav-link-spacing-vertical:0.5rem;--nav-link-spacing-horizontal:0.5rem;--form-label-font-weight:var(--font-weight);--transition:0.2s ease-in-out;--modal-overlay-backdrop-filter:blur(0.25rem)}@media (min-width:576px){:root{--font-size:17px}}@media (min-width:768px){:root{--font-size:18px}}@media (min-width:992px){:root{--font-size:19px}}@media (min-width:1200px){:root{--font-size:20px}}@media (min-width:576px){body>footer,body>header,body>main,section{--block-spacing-vertical:calc(var(--spacing) * 2.5)}}@media (min-width:768px){body>footer,body>header,body>main,section{--block-spacing-vertical:calc(var(--spacing) * 3)}}@media (min-width:992px){body>footer,body>header,body>main,section{--block-spacing-vertical:calc(var(--spacing) * 3.5)}}@media (min-width:1200px){body>footer,body>header,body>main,section{--block-spacing-vertical:calc(var(--spacing) * 4)}}@media (min-width:576px){article{--block-spacing-horizontal:calc(var(--spacing) * 1.25)}}@media (min-width:768px){article{--block-spacing-horizontal:calc(var(--spacing) * 1.5)}}@media (min-width:992px){article{--block-spacing-horizontal:calc(var(--spacing) * 1.75)}}@media (min-width:1200px){article{--block-spacing-horizontal:calc(var(--spacing) * 2)}}dialog>article{--block-spacing-vertical:calc(var(--spacing) * 2);--block-spacing-horizontal:var(--spacing)}@media (min-width:576px){dialog>article{--block-spacing-vertical:calc(var(--spacing) * 2.5);--block-spacing-horizontal:calc(var(--spacing) * 1.25)}}@media (min-width:768px){dialog>article{--block-spacing-vertical:calc(var(--spacing) * 3);--block-spacing-horizontal:calc(var(--spacing) * 1.5)}}a{--text-decoration:none}a.contrast,a.secondary{--text-decoration:underline}small{--font-size:0.875em}h1,h2,h3,h4,h5,h6{--font-weight:700}h1{--font-size:2rem;--typography-spacing-vertical:3rem}h2{--font-size:1.75rem;--typography-spacing-vertical:2.625rem}h3{--font-size:1.5rem;--typography-spacing-vertical:2.25rem}h4{--font-size:1.25rem;--typography-spacing-vertical:1.874rem}h5{--font-size:1.125rem;--typography-spacing-vertical:1.6875rem}[type=checkbox],[type=radio]{--border-width:2px}[type=checkbox][role=switch]{--border-width:3px}tfoot td,tfoot th,thead td,thead th{--border-width:3px}:not(thead,tfoot)>*>td{--font-size:0.875em}code,kbd,pre,samp{--font-family:"Menlo","Consolas","Roboto Mono","Ubuntu Monospace","Noto Mono","Oxygen Mono","Liberation Mono",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}kbd{--font-weight:bolder}:root:not([data-theme=dark]),[data-theme=light]{--background-color:#fff;--color:hsl(205, 20%, 32%);--h1-color:hsl(205, 30%, 15%);--h2-color:#24333e;--h3-color:hsl(205, 25%, 23%);--h4-color:#374956;--h5-color:hsl(205, 20%, 32%);--h6-color:#4d606d;--muted-color:hsl(205, 10%, 50%);--muted-border-color:hsl(205, 20%, 94%);--primary:hsl(195, 85%, 41%);--primary-hover:hsl(195, 90%, 32%);--primary-focus:rgba(16, 149, 193, 0.125);--primary-inverse:#fff;--secondary:hsl(205, 15%, 41%);--secondary-hover:hsl(205, 20%, 32%);--secondary-focus:rgba(89, 107, 120, 0.125);--secondary-inverse:#fff;--contrast:hsl(205, 30%, 15%);--contrast-hover:#000;--contrast-focus:rgba(89, 107, 120, 0.125);--contrast-inverse:#fff;--mark-background-color:#fff2ca;--mark-color:#543a26;--ins-color:#388e3c;--del-color:#c62828;--blockquote-border-color:var(--muted-border-color);--blockquote-footer-color:var(--muted-color);--button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--form-element-background-color:transparent;--form-element-border-color:hsl(205, 14%, 68%);--form-element-color:var(--color);--form-element-placeholder-color:var(--muted-color);--form-element-active-background-color:transparent;--form-element-active-border-color:var(--primary);--form-element-focus-color:var(--primary-focus);--form-element-disabled-background-color:hsl(205, 18%, 86%);--form-element-disabled-border-color:hsl(205, 14%, 68%);--form-element-disabled-opacity:0.5;--form-element-invalid-border-color:#c62828;--form-element-invalid-active-border-color:#d32f2f;--form-element-invalid-focus-color:rgba(211, 47, 47, 0.125);--form-element-valid-border-color:#388e3c;--form-element-valid-active-border-color:#43a047;--form-element-valid-focus-color:rgba(67, 160, 71, 0.125);--switch-background-color:hsl(205, 16%, 77%);--switch-color:var(--primary-inverse);--switch-checked-background-color:var(--primary);--range-border-color:hsl(205, 18%, 86%);--range-active-border-color:hsl(205, 16%, 77%);--range-thumb-border-color:var(--background-color);--range-thumb-color:var(--secondary);--range-thumb-hover-color:var(--secondary-hover);--range-thumb-active-color:var(--primary);--table-border-color:var(--muted-border-color);--table-row-stripped-background-color:#f6f8f9;--code-background-color:hsl(205, 20%, 94%);--code-color:var(--muted-color);--code-kbd-background-color:var(--contrast);--code-kbd-color:var(--contrast-inverse);--code-tag-color:hsl(330, 40%, 50%);--code-property-color:hsl(185, 40%, 40%);--code-value-color:hsl(40, 20%, 50%);--code-comment-color:hsl(205, 14%, 68%);--accordion-border-color:var(--muted-border-color);--accordion-close-summary-color:var(--color);--accordion-open-summary-color:var(--muted-color);--card-background-color:var(--background-color);--card-border-color:var(--muted-border-color);--card-box-shadow:0.0145rem 0.029rem 0.174rem rgba(27, 40, 50, 0.01698),0.0335rem 0.067rem 0.402rem rgba(27, 40, 50, 0.024),0.0625rem 0.125rem 0.75rem rgba(27, 40, 50, 0.03),0.1125rem 0.225rem 1.35rem rgba(27, 40, 50, 0.036),0.2085rem 0.417rem 2.502rem rgba(27, 40, 50, 0.04302),0.5rem 1rem 6rem rgba(27, 40, 50, 0.06),0 0 0 0.0625rem rgba(27, 40, 50, 0.015);--card-sectionning-background-color:#fbfbfc;--dropdown-background-color:#fbfbfc;--dropdown-border-color:#e1e6eb;--dropdown-box-shadow:var(--card-box-shadow);--dropdown-color:var(--color);--dropdown-hover-background-color:hsl(205, 20%, 94%);--modal-overlay-background-color:rgba(213, 220, 226, 0.7);--progress-background-color:hsl(205, 18%, 86%);--progress-color:var(--primary);--loading-spinner-opacity:0.5;--tooltip-background-color:var(--contrast);--tooltip-color:var(--contrast-inverse);--icon-checkbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(65, 84, 98)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron-button:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron-button-inverse:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(115, 130, 140)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");--icon-date:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(65, 84, 98)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");--icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(198, 40, 40)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");--icon-minus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");--icon-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(65, 84, 98)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");--icon-time:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(65, 84, 98)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");--icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(56, 142, 60)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");color-scheme:light}@media only screen and (prefers-color-scheme:dark){:root:not([data-theme]){--background-color:#11191f;--color:hsl(205, 16%, 77%);--h1-color:hsl(205, 20%, 94%);--h2-color:#e1e6eb;--h3-color:hsl(205, 18%, 86%);--h4-color:#c8d1d8;--h5-color:hsl(205, 16%, 77%);--h6-color:#afbbc4;--muted-color:hsl(205, 10%, 50%);--muted-border-color:#1f2d38;--primary:hsl(195, 85%, 41%);--primary-hover:hsl(195, 80%, 50%);--primary-focus:rgba(16, 149, 193, 0.25);--primary-inverse:#fff;--secondary:hsl(205, 15%, 41%);--secondary-hover:hsl(205, 10%, 50%);--secondary-focus:rgba(115, 130, 140, 0.25);--secondary-inverse:#fff;--contrast:hsl(205, 20%, 94%);--contrast-hover:#fff;--contrast-focus:rgba(115, 130, 140, 0.25);--contrast-inverse:#000;--mark-background-color:#d1c284;--mark-color:#11191f;--ins-color:#388e3c;--del-color:#c62828;--blockquote-border-color:var(--muted-border-color);--blockquote-footer-color:var(--muted-color);--button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--form-element-background-color:#11191f;--form-element-border-color:#374956;--form-element-color:var(--color);--form-element-placeholder-color:var(--muted-color);--form-element-active-background-color:var(--form-element-background-color);--form-element-active-border-color:var(--primary);--form-element-focus-color:var(--primary-focus);--form-element-disabled-background-color:hsl(205, 25%, 23%);--form-element-disabled-border-color:hsl(205, 20%, 32%);--form-element-disabled-opacity:0.5;--form-element-invalid-border-color:#b71c1c;--form-element-invalid-active-border-color:#c62828;--form-element-invalid-focus-color:rgba(198, 40, 40, 0.25);--form-element-valid-border-color:#2e7d32;--form-element-valid-active-border-color:#388e3c;--form-element-valid-focus-color:rgba(56, 142, 60, 0.25);--switch-background-color:#374956;--switch-color:var(--primary-inverse);--switch-checked-background-color:var(--primary);--range-border-color:#24333e;--range-active-border-color:hsl(205, 25%, 23%);--range-thumb-border-color:var(--background-color);--range-thumb-color:var(--secondary);--range-thumb-hover-color:var(--secondary-hover);--range-thumb-active-color:var(--primary);--table-border-color:var(--muted-border-color);--table-row-stripped-background-color:rgba(115, 130, 140, 0.05);--code-background-color:#18232c;--code-color:var(--muted-color);--code-kbd-background-color:var(--contrast);--code-kbd-color:var(--contrast-inverse);--code-tag-color:hsl(330, 30%, 50%);--code-property-color:hsl(185, 30%, 50%);--code-value-color:hsl(40, 10%, 50%);--code-comment-color:#4d606d;--accordion-border-color:var(--muted-border-color);--accordion-active-summary-color:var(--primary);--accordion-close-summary-color:var(--color);--accordion-open-summary-color:var(--muted-color);--card-background-color:#141e26;--card-border-color:var(--card-background-color);--card-box-shadow:0.0145rem 0.029rem 0.174rem rgba(0, 0, 0, 0.01698),0.0335rem 0.067rem 0.402rem rgba(0, 0, 0, 0.024),0.0625rem 0.125rem 0.75rem rgba(0, 0, 0, 0.03),0.1125rem 0.225rem 1.35rem rgba(0, 0, 0, 0.036),0.2085rem 0.417rem 2.502rem rgba(0, 0, 0, 0.04302),0.5rem 1rem 6rem rgba(0, 0, 0, 0.06),0 0 0 0.0625rem rgba(0, 0, 0, 0.015);--card-sectionning-background-color:#18232c;--dropdown-background-color:hsl(205, 30%, 15%);--dropdown-border-color:#24333e;--dropdown-box-shadow:var(--card-box-shadow);--dropdown-color:var(--color);--dropdown-hover-background-color:rgba(36, 51, 62, 0.75);--modal-overlay-background-color:rgba(36, 51, 62, 0.8);--progress-background-color:#24333e;--progress-color:var(--primary);--loading-spinner-opacity:0.5;--tooltip-background-color:var(--contrast);--tooltip-color:var(--contrast-inverse);--icon-checkbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron-button:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron-button-inverse:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(0, 0, 0)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(115, 130, 140)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");--icon-date:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");--icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(183, 28, 28)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");--icon-minus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");--icon-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");--icon-time:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");--icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(46, 125, 50)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");color-scheme:dark}}[data-theme=dark]{--background-color:#11191f;--color:hsl(205, 16%, 77%);--h1-color:hsl(205, 20%, 94%);--h2-color:#e1e6eb;--h3-color:hsl(205, 18%, 86%);--h4-color:#c8d1d8;--h5-color:hsl(205, 16%, 77%);--h6-color:#afbbc4;--muted-color:hsl(205, 10%, 50%);--muted-border-color:#1f2d38;--primary:hsl(195, 85%, 41%);--primary-hover:hsl(195, 80%, 50%);--primary-focus:rgba(16, 149, 193, 0.25);--primary-inverse:#fff;--secondary:hsl(205, 15%, 41%);--secondary-hover:hsl(205, 10%, 50%);--secondary-focus:rgba(115, 130, 140, 0.25);--secondary-inverse:#fff;--contrast:hsl(205, 20%, 94%);--contrast-hover:#fff;--contrast-focus:rgba(115, 130, 140, 0.25);--contrast-inverse:#000;--mark-background-color:#d1c284;--mark-color:#11191f;--ins-color:#388e3c;--del-color:#c62828;--blockquote-border-color:var(--muted-border-color);--blockquote-footer-color:var(--muted-color);--button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--form-element-background-color:#11191f;--form-element-border-color:#374956;--form-element-color:var(--color);--form-element-placeholder-color:var(--muted-color);--form-element-active-background-color:var(--form-element-background-color);--form-element-active-border-color:var(--primary);--form-element-focus-color:var(--primary-focus);--form-element-disabled-background-color:hsl(205, 25%, 23%);--form-element-disabled-border-color:hsl(205, 20%, 32%);--form-element-disabled-opacity:0.5;--form-element-invalid-border-color:#b71c1c;--form-element-invalid-active-border-color:#c62828;--form-element-invalid-focus-color:rgba(198, 40, 40, 0.25);--form-element-valid-border-color:#2e7d32;--form-element-valid-active-border-color:#388e3c;--form-element-valid-focus-color:rgba(56, 142, 60, 0.25);--switch-background-color:#374956;--switch-color:var(--primary-inverse);--switch-checked-background-color:var(--primary);--range-border-color:#24333e;--range-active-border-color:hsl(205, 25%, 23%);--range-thumb-border-color:var(--background-color);--range-thumb-color:var(--secondary);--range-thumb-hover-color:var(--secondary-hover);--range-thumb-active-color:var(--primary);--table-border-color:var(--muted-border-color);--table-row-stripped-background-color:rgba(115, 130, 140, 0.05);--code-background-color:#18232c;--code-color:var(--muted-color);--code-kbd-background-color:var(--contrast);--code-kbd-color:var(--contrast-inverse);--code-tag-color:hsl(330, 30%, 50%);--code-property-color:hsl(185, 30%, 50%);--code-value-color:hsl(40, 10%, 50%);--code-comment-color:#4d606d;--accordion-border-color:var(--muted-border-color);--accordion-active-summary-color:var(--primary);--accordion-close-summary-color:var(--color);--accordion-open-summary-color:var(--muted-color);--card-background-color:#141e26;--card-border-color:var(--card-background-color);--card-box-shadow:0.0145rem 0.029rem 0.174rem rgba(0, 0, 0, 0.01698),0.0335rem 0.067rem 0.402rem rgba(0, 0, 0, 0.024),0.0625rem 0.125rem 0.75rem rgba(0, 0, 0, 0.03),0.1125rem 0.225rem 1.35rem rgba(0, 0, 0, 0.036),0.2085rem 0.417rem 2.502rem rgba(0, 0, 0, 0.04302),0.5rem 1rem 6rem rgba(0, 0, 0, 0.06),0 0 0 0.0625rem rgba(0, 0, 0, 0.015);--card-sectionning-background-color:#18232c;--dropdown-background-color:hsl(205, 30%, 15%);--dropdown-border-color:#24333e;--dropdown-box-shadow:var(--card-box-shadow);--dropdown-color:var(--color);--dropdown-hover-background-color:rgba(36, 51, 62, 0.75);--modal-overlay-background-color:rgba(36, 51, 62, 0.8);--progress-background-color:#24333e;--progress-color:var(--primary);--loading-spinner-opacity:0.5;--tooltip-background-color:var(--contrast);--tooltip-color:var(--contrast-inverse);--icon-checkbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron-button:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-chevron-button-inverse:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(0, 0, 0)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(115, 130, 140)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");--icon-date:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");--icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(183, 28, 28)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");--icon-minus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");--icon-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");--icon-time:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(162, 175, 185)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");--icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(46, 125, 50)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");color-scheme:dark}[type=checkbox],[type=radio],[type=range],progress{accent-color:var(--primary)}*,::after,::before{box-sizing:border-box;background-repeat:no-repeat}::after,::before{text-decoration:inherit;vertical-align:inherit}:where(:root){-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--background-color);color:var(--color);font-weight:var(--font-weight);font-size:var(--font-size);line-height:var(--line-height);font-family:var(--font-family);text-rendering:optimizeLegibility;overflow-wrap:break-word;cursor:default;-moz-tab-size:4;-o-tab-size:4;tab-size:4}main{display:block}body{width:100%;margin:0}body>footer,body>header,body>main{width:100%;margin-right:auto;margin-left:auto;padding:var(--block-spacing-vertical) 0}.container,.container-fluid{width:100%;margin-right:auto;margin-left:auto;padding-right:var(--spacing);padding-left:var(--spacing)}@media (min-width:576px){.container{max-width:510px;padding-right:0;padding-left:0}}@media (min-width:768px){.container{max-width:700px}}@media (min-width:992px){.container{max-width:920px}}@media (min-width:1200px){.container{max-width:1130px}}section{margin-bottom:var(--block-spacing-vertical)}.grid{grid-column-gap:var(--grid-spacing-horizontal);grid-row-gap:var(--grid-spacing-vertical);display:grid;grid-template-columns:1fr;margin:0}@media (min-width:992px){.grid{grid-template-columns:repeat(auto-fit,minmax(0%,1fr))}}.grid>*{min-width:0}figure{display:block;margin:0;padding:0;overflow-x:auto}figure figcaption{padding:calc(var(--spacing) * .5) 0;color:var(--muted-color)}b,strong{font-weight:bolder}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}address,blockquote,dl,figure,form,ol,p,pre,table,ul{margin-top:0;margin-bottom:var(--typography-spacing-vertical);color:var(--color);font-style:normal;font-weight:var(--font-weight);font-size:var(--font-size)}[role=link],a{--color:var(--primary);--background-color:transparent;outline:0;background-color:var(--background-color);color:var(--color);-webkit-text-decoration:var(--text-decoration);text-decoration:var(--text-decoration);transition:background-color var(--transition),color var(--transition),box-shadow var(--transition),-webkit-text-decoration var(--transition);transition:background-color var(--transition),color var(--transition),text-decoration var(--transition),box-shadow var(--transition);transition:background-color var(--transition),color var(--transition),text-decoration var(--transition),box-shadow var(--transition),-webkit-text-decoration var(--transition)}[role=link]:is([aria-current],:hover,:active,:focus),a:is([aria-current],:hover,:active,:focus){--color:var(--primary-hover);--text-decoration:underline}[role=link]:focus,a:focus{--background-color:var(--primary-focus)}[role=link].secondary,a.secondary{--color:var(--secondary)}[role=link].secondary:is([aria-current],:hover,:active,:focus),a.secondary:is([aria-current],:hover,:active,:focus){--color:var(--secondary-hover)}[role=link].secondary:focus,a.secondary:focus{--background-color:var(--secondary-focus)}[role=link].contrast,a.contrast{--color:var(--contrast)}[role=link].contrast:is([aria-current],:hover,:active,:focus),a.contrast:is([aria-current],:hover,:active,:focus){--color:var(--contrast-hover)}[role=link].contrast:focus,a.contrast:focus{--background-color:var(--contrast-focus)}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:var(--typography-spacing-vertical);color:var(--color);font-weight:var(--font-weight);font-size:var(--font-size);font-family:var(--font-family)}h1{--color:var(--h1-color)}h2{--color:var(--h2-color)}h3{--color:var(--h3-color)}h4{--color:var(--h4-color)}h5{--color:var(--h5-color)}h6{--color:var(--h6-color)}:where(address,blockquote,dl,figure,form,ol,p,pre,table,ul)~:is(h1,h2,h3,h4,h5,h6){margin-top:var(--typography-spacing-vertical)}.headings,hgroup{margin-bottom:var(--typography-spacing-vertical)}.headings>*,hgroup>*{margin-bottom:0}.headings>:last-child,hgroup>:last-child{--color:var(--muted-color);--font-weight:unset;font-size:1rem;font-family:unset}p{margin-bottom:var(--typography-spacing-vertical)}small{font-size:var(--font-size)}:where(dl,ol,ul){padding-right:0;padding-left:var(--spacing);-webkit-padding-start:var(--spacing);padding-inline-start:var(--spacing);-webkit-padding-end:0;padding-inline-end:0}:where(dl,ol,ul) li{margin-bottom:calc(var(--typography-spacing-vertical) * .25)}:where(dl,ol,ul) :is(dl,ol,ul){margin:0;margin-top:calc(var(--typography-spacing-vertical) * .25)}ul li{list-style:square}mark{padding:.125rem .25rem;background-color:var(--mark-background-color);color:var(--mark-color);vertical-align:baseline}blockquote{display:block;margin:var(--typography-spacing-vertical) 0;padding:var(--spacing);border-right:none;border-left:.25rem solid var(--blockquote-border-color);-webkit-border-start:0.25rem solid var(--blockquote-border-color);border-inline-start:0.25rem solid var(--blockquote-border-color);-webkit-border-end:none;border-inline-end:none}blockquote footer{margin-top:calc(var(--typography-spacing-vertical) * .5);color:var(--blockquote-footer-color)}abbr[title]{border-bottom:1px dotted;text-decoration:none;cursor:help}ins{color:var(--ins-color);text-decoration:none}del{color:var(--del-color)}::-moz-selection{background-color:var(--primary-focus)}::selection{background-color:var(--primary-focus)}:where(audio,canvas,iframe,img,svg,video){vertical-align:middle}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}:where(iframe){border-style:none}img{max-width:100%;height:auto;border-style:none}:where(svg:not([fill])){fill:currentColor}svg:not(:root){overflow:hidden}button{margin:0;overflow:visible;font-family:inherit;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}button{display:block;width:100%;margin-bottom:var(--spacing)}[role=button]{display:inline-block;text-decoration:none}[role=button],button,input[type=button],input[type=reset],input[type=submit]{--background-color:var(--primary);--border-color:var(--primary);--color:var(--primary-inverse);--box-shadow:var(--button-box-shadow, 0 0 0 rgba(0, 0, 0, 0));padding:var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal);border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius);outline:0;background-color:var(--background-color);box-shadow:var(--box-shadow);color:var(--color);font-weight:var(--font-weight);font-size:1rem;line-height:var(--line-height);text-align:center;cursor:pointer;transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition)}[role=button]:is([aria-current],:hover,:active,:focus),button:is([aria-current],:hover,:active,:focus),input[type=button]:is([aria-current],:hover,:active,:focus),input[type=reset]:is([aria-current],:hover,:active,:focus),input[type=submit]:is([aria-current],:hover,:active,:focus){--background-color:var(--primary-hover);--border-color:var(--primary-hover);--box-shadow:var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0));--color:var(--primary-inverse)}[role=button]:focus,button:focus,input[type=button]:focus,input[type=reset]:focus,input[type=submit]:focus{--box-shadow:var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--outline-width) var(--primary-focus)}:is(button,input[type=submit],input[type=button],[role=button]).secondary,input[type=reset]{--background-color:var(--secondary);--border-color:var(--secondary);--color:var(--secondary-inverse);cursor:pointer}:is(button,input[type=submit],input[type=button],[role=button]).secondary:is([aria-current],:hover,:active,:focus),input[type=reset]:is([aria-current],:hover,:active,:focus){--background-color:var(--secondary-hover);--border-color:var(--secondary-hover);--color:var(--secondary-inverse)}:is(button,input[type=submit],input[type=button],[role=button]).secondary:focus,input[type=reset]:focus{--box-shadow:var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--outline-width) var(--secondary-focus)}:is(button,input[type=submit],input[type=button],[role=button]).contrast{--background-color:var(--contrast);--border-color:var(--contrast);--color:var(--contrast-inverse)}:is(button,input[type=submit],input[type=button],[role=button]).contrast:is([aria-current],:hover,:active,:focus){--background-color:var(--contrast-hover);--border-color:var(--contrast-hover);--color:var(--contrast-inverse)}:is(button,input[type=submit],input[type=button],[role=button]).contrast:focus{--box-shadow:var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--outline-width) var(--contrast-focus)}:is(button,input[type=submit],input[type=button],[role=button]).outline,input[type=reset].outline{--background-color:transparent;--color:var(--primary)}:is(button,input[type=submit],input[type=button],[role=button]).outline:is([aria-current],:hover,:active,:focus),input[type=reset].outline:is([aria-current],:hover,:active,:focus){--background-color:transparent;--color:var(--primary-hover)}:is(button,input[type=submit],input[type=button],[role=button]).outline.secondary,input[type=reset].outline{--color:var(--secondary)}:is(button,input[type=submit],input[type=button],[role=button]).outline.secondary:is([aria-current],:hover,:active,:focus),input[type=reset].outline:is([aria-current],:hover,:active,:focus){--color:var(--secondary-hover)}:is(button,input[type=submit],input[type=button],[role=button]).outline.contrast{--color:var(--contrast)}:is(button,input[type=submit],input[type=button],[role=button]).outline.contrast:is([aria-current],:hover,:active,:focus){--color:var(--contrast-hover)}:where(button,[type=submit],[type=button],[type=reset],[role=button])[disabled],:where(fieldset[disabled]) :is(button,[type=submit],[type=button],[type=reset],[role=button]),a[role=button]:not([href]){opacity:.5;pointer-events:none}input,optgroup,select,textarea{margin:0;font-size:1rem;line-height:var(--line-height);font-family:inherit;letter-spacing:inherit}input{overflow:visible}select{text-transform:none}legend{max-width:100%;padding:0;color:inherit;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{padding:0}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{padding:0;border-style:none}:-moz-focusring{outline:0}:-moz-ui-invalid{box-shadow:none}::-ms-expand{display:none}[type=file],[type=range]{padding:0;border-width:0}input:not([type=checkbox],[type=radio],[type=range]){height:calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2)}fieldset{margin:0;margin-bottom:var(--spacing);padding:0;border:0}fieldset legend,label{display:block;margin-bottom:calc(var(--spacing) * .25);font-weight:var(--form-label-font-weight,var(--font-weight))}input:not([type=checkbox],[type=radio]),select,textarea{width:100%}input:not([type=checkbox],[type=radio],[type=range],[type=file]),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal)}input,select,textarea{--background-color:var(--form-element-background-color);--border-color:var(--form-element-border-color);--color:var(--form-element-color);--box-shadow:none;border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius);outline:0;background-color:var(--background-color);box-shadow:var(--box-shadow);color:var(--color);font-weight:var(--font-weight);transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition)}:where(select,textarea):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[readonly]):is(:active,:focus){--background-color:var(--form-element-active-background-color)}:where(select,textarea):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[role=switch],[readonly]):is(:active,:focus){--border-color:var(--form-element-active-border-color)}input:not([type=submit],[type=button],[type=reset],[type=range],[type=file],[readonly]):focus,select:focus,textarea:focus{--box-shadow:0 0 0 var(--outline-width) var(--form-element-focus-color)}:where(fieldset[disabled]) :is(input:not([type=submit],[type=button],[type=reset]),select,textarea),input:not([type=submit],[type=button],[type=reset])[disabled],select[disabled],textarea[disabled]{--background-color:var(--form-element-disabled-background-color);--border-color:var(--form-element-disabled-border-color);opacity:var(--form-element-disabled-opacity);pointer-events:none}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week])[aria-invalid]{padding-right:calc(var(--form-element-spacing-horizontal) + 1.5rem)!important;padding-left:var(--form-element-spacing-horizontal);-webkit-padding-start:var(--form-element-spacing-horizontal)!important;padding-inline-start:var(--form-element-spacing-horizontal)!important;-webkit-padding-end:calc(var(--form-element-spacing-horizontal) + 1.5rem)!important;padding-inline-end:calc(var(--form-element-spacing-horizontal) + 1.5rem)!important;background-position:center right .75rem;background-size:1rem auto;background-repeat:no-repeat}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week])[aria-invalid=false]{background-image:var(--icon-valid)}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week])[aria-invalid=true]{background-image:var(--icon-invalid)}:where(input,select,textarea)[aria-invalid=false]{--border-color:var(--form-element-valid-border-color)}:where(input,select,textarea)[aria-invalid=false]:is(:active,:focus){--border-color:var(--form-element-valid-active-border-color)!important;--box-shadow:0 0 0 var(--outline-width) var(--form-element-valid-focus-color)!important}:where(input,select,textarea)[aria-invalid=true]{--border-color:var(--form-element-invalid-border-color)}:where(input,select,textarea)[aria-invalid=true]:is(:active,:focus){--border-color:var(--form-element-invalid-active-border-color)!important;--box-shadow:0 0 0 var(--outline-width) var(--form-element-invalid-focus-color)!important}[dir=rtl] :where(input,select,textarea):not([type=checkbox],[type=radio]):is([aria-invalid],[aria-invalid=true],[aria-invalid=false]){background-position:center left .75rem}input::-webkit-input-placeholder,input::placeholder,select:invalid,textarea::-webkit-input-placeholder,textarea::placeholder{color:var(--form-element-placeholder-color);opacity:1}input:not([type=checkbox],[type=radio]),select,textarea{margin-bottom:var(--spacing)}select::-ms-expand{border:0;background-color:transparent}select:not([multiple],[size]){padding-right:calc(var(--form-element-spacing-horizontal) + 1.5rem);padding-left:var(--form-element-spacing-horizontal);-webkit-padding-start:var(--form-element-spacing-horizontal);padding-inline-start:var(--form-element-spacing-horizontal);-webkit-padding-end:calc(var(--form-element-spacing-horizontal) + 1.5rem);padding-inline-end:calc(var(--form-element-spacing-horizontal) + 1.5rem);background-image:var(--icon-chevron);background-position:center right .75rem;background-size:1rem auto;background-repeat:no-repeat}[dir=rtl] select:not([multiple],[size]){background-position:center left .75rem}:where(input,select,textarea,.grid)+small{display:block;width:100%;margin-top:calc(var(--spacing) * -.75);margin-bottom:var(--spacing);color:var(--muted-color)}label>:where(input,select,textarea){margin-top:calc(var(--spacing) * .25)}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1.25em;height:1.25em;margin-top:-.125em;margin-right:.375em;margin-left:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:.375em;margin-inline-end:.375em;border-width:var(--border-width);font-size:inherit;vertical-align:middle;cursor:pointer}[type=checkbox]::-ms-check,[type=radio]::-ms-check{display:none}[type=checkbox]:checked,[type=checkbox]:checked:active,[type=checkbox]:checked:focus,[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--background-color:var(--primary);--border-color:var(--primary);background-image:var(--icon-checkbox);background-position:center;background-size:.75em auto;background-repeat:no-repeat}[type=checkbox]~label,[type=radio]~label{display:inline-block;margin-right:.375em;margin-bottom:0;cursor:pointer}[type=checkbox]:indeterminate{--background-color:var(--primary);--border-color:var(--primary);background-image:var(--icon-minus);background-position:center;background-size:.75em auto;background-repeat:no-repeat}[type=radio]{border-radius:50%}[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--background-color:var(--primary-inverse);border-width:.35em;background-image:none}[type=checkbox][role=switch]{--background-color:var(--switch-background-color);--border-color:var(--switch-background-color);--color:var(--switch-color);width:2.25em;height:1.25em;border:var(--border-width) solid var(--border-color);border-radius:1.25em;background-color:var(--background-color);line-height:1.25em}[type=checkbox][role=switch]:focus{--background-color:var(--switch-background-color);--border-color:var(--switch-background-color)}[type=checkbox][role=switch]:checked{--background-color:var(--switch-checked-background-color);--border-color:var(--switch-checked-background-color)}[type=checkbox][role=switch]:before{display:block;width:calc(1.25em - (var(--border-width) * 2));height:100%;border-radius:50%;background-color:var(--color);content:"";transition:margin .1s ease-in-out}[type=checkbox][role=switch]:checked{background-image:none}[type=checkbox][role=switch]:checked::before{margin-left:calc(1.125em - var(--border-width));-webkit-margin-start:calc(1.125em - var(--border-width));margin-inline-start:calc(1.125em - var(--border-width))}[type=checkbox]:checked[aria-invalid=false],[type=checkbox][aria-invalid=false],[type=checkbox][role=switch]:checked[aria-invalid=false],[type=checkbox][role=switch][aria-invalid=false],[type=radio]:checked[aria-invalid=false],[type=radio][aria-invalid=false]{--border-color:var(--form-element-valid-border-color)}[type=checkbox]:checked[aria-invalid=true],[type=checkbox][aria-invalid=true],[type=checkbox][role=switch]:checked[aria-invalid=true],[type=checkbox][role=switch][aria-invalid=true],[type=radio]:checked[aria-invalid=true],[type=radio][aria-invalid=true]{--border-color:var(--form-element-invalid-border-color)}[type=color]::-webkit-color-swatch-wrapper{padding:0}[type=color]::-moz-focus-inner{padding:0}[type=color]::-webkit-color-swatch{border:0;border-radius:calc(var(--border-radius) * .5)}[type=color]::-moz-color-swatch{border:0;border-radius:calc(var(--border-radius) * .5)}input:not([type=checkbox],[type=radio],[type=range],[type=file]):is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){--icon-position:0.75rem;--icon-width:1rem;padding-right:calc(var(--icon-width) + var(--icon-position));background-image:var(--icon-date);background-position:center right var(--icon-position);background-size:var(--icon-width) auto;background-repeat:no-repeat}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=time]{background-image:var(--icon-time)}[type=date]::-webkit-calendar-picker-indicator,[type=datetime-local]::-webkit-calendar-picker-indicator,[type=month]::-webkit-calendar-picker-indicator,[type=time]::-webkit-calendar-picker-indicator,[type=week]::-webkit-calendar-picker-indicator{width:var(--icon-width);margin-right:calc(var(--icon-width) * -1);margin-left:var(--icon-position);opacity:0}[dir=rtl] :is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){text-align:right}@-moz-document url-prefix(){[type=date],[type=datetime-local],[type=month],[type=time],[type=week]{padding-right:var(--form-element-spacing-horizontal)!important;background-image:none!important}}[type=file]{--color:var(--muted-color);padding:calc(var(--form-element-spacing-vertical) * .5) 0;border:0;border-radius:0;background:0 0}[type=file]::file-selector-button{--background-color:var(--secondary);--border-color:var(--secondary);--color:var(--secondary-inverse);margin-right:calc(var(--spacing)/ 2);margin-left:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(var(--spacing)/ 2);margin-inline-end:calc(var(--spacing)/ 2);padding:calc(var(--form-element-spacing-vertical) * .5) calc(var(--form-element-spacing-horizontal) * .5);border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius);outline:0;background-color:var(--background-color);box-shadow:var(--box-shadow);color:var(--color);font-weight:var(--font-weight);font-size:1rem;line-height:var(--line-height);text-align:center;cursor:pointer;transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition)}[type=file]::file-selector-button:is(:hover,:active,:focus){--background-color:var(--secondary-hover);--border-color:var(--secondary-hover)}[type=file]::-webkit-file-upload-button{--background-color:var(--secondary);--border-color:var(--secondary);--color:var(--secondary-inverse);margin-right:calc(var(--spacing)/ 2);margin-left:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(var(--spacing)/ 2);margin-inline-end:calc(var(--spacing)/ 2);padding:calc(var(--form-element-spacing-vertical) * .5) calc(var(--form-element-spacing-horizontal) * .5);border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius);outline:0;background-color:var(--background-color);box-shadow:var(--box-shadow);color:var(--color);font-weight:var(--font-weight);font-size:1rem;line-height:var(--line-height);text-align:center;cursor:pointer;-webkit-transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition);transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition)}[type=file]::-webkit-file-upload-button:is(:hover,:active,:focus){--background-color:var(--secondary-hover);--border-color:var(--secondary-hover)}[type=file]::-ms-browse{--background-color:var(--secondary);--border-color:var(--secondary);--color:var(--secondary-inverse);margin-right:calc(var(--spacing)/ 2);margin-left:0;margin-inline-start:0;margin-inline-end:calc(var(--spacing)/ 2);padding:calc(var(--form-element-spacing-vertical) * .5) calc(var(--form-element-spacing-horizontal) * .5);border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius);outline:0;background-color:var(--background-color);box-shadow:var(--box-shadow);color:var(--color);font-weight:var(--font-weight);font-size:1rem;line-height:var(--line-height);text-align:center;cursor:pointer;-ms-transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition);transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition)}[type=file]::-ms-browse:is(:hover,:active,:focus){--background-color:var(--secondary-hover);--border-color:var(--secondary-hover)}[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.25rem;background:0 0}[type=range]::-webkit-slider-runnable-track{width:100%;height:.25rem;border-radius:var(--border-radius);background-color:var(--range-border-color);-webkit-transition:background-color var(--transition),box-shadow var(--transition);transition:background-color var(--transition),box-shadow var(--transition)}[type=range]::-moz-range-track{width:100%;height:.25rem;border-radius:var(--border-radius);background-color:var(--range-border-color);-moz-transition:background-color var(--transition),box-shadow var(--transition);transition:background-color var(--transition),box-shadow var(--transition)}[type=range]::-ms-track{width:100%;height:.25rem;border-radius:var(--border-radius);background-color:var(--range-border-color);-ms-transition:background-color var(--transition),box-shadow var(--transition);transition:background-color var(--transition),box-shadow var(--transition)}[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.5rem;border:2px solid var(--range-thumb-border-color);border-radius:50%;background-color:var(--range-thumb-color);cursor:pointer;-webkit-transition:background-color var(--transition),transform var(--transition);transition:background-color var(--transition),transform var(--transition)}[type=range]::-moz-range-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.5rem;border:2px solid var(--range-thumb-border-color);border-radius:50%;background-color:var(--range-thumb-color);cursor:pointer;-moz-transition:background-color var(--transition),transform var(--transition);transition:background-color var(--transition),transform var(--transition)}[type=range]::-ms-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.5rem;border:2px solid var(--range-thumb-border-color);border-radius:50%;background-color:var(--range-thumb-color);cursor:pointer;-ms-transition:background-color var(--transition),transform var(--transition);transition:background-color var(--transition),transform var(--transition)}[type=range]:focus,[type=range]:hover{--range-border-color:var(--range-active-border-color);--range-thumb-color:var(--range-thumb-hover-color)}[type=range]:active{--range-thumb-color:var(--range-thumb-active-color)}[type=range]:active::-webkit-slider-thumb{transform:scale(1.25)}[type=range]:active::-moz-range-thumb{transform:scale(1.25)}[type=range]:active::-ms-thumb{transform:scale(1.25)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{-webkit-padding-start:calc(var(--form-element-spacing-horizontal) + 1.75rem);padding-inline-start:calc(var(--form-element-spacing-horizontal) + 1.75rem);border-radius:5rem;background-image:var(--icon-search);background-position:center left 1.125rem;background-size:1rem auto;background-repeat:no-repeat}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{-webkit-padding-start:calc(var(--form-element-spacing-horizontal) + 1.75rem)!important;padding-inline-start:calc(var(--form-element-spacing-horizontal) + 1.75rem)!important;background-position:center left 1.125rem,center right .75rem}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=false]{background-image:var(--icon-search),var(--icon-valid)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=true]{background-image:var(--icon-search),var(--icon-invalid)}[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;display:none}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{background-position:center right 1.125rem}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{background-position:center right 1.125rem,center left .75rem}:where(table){width:100%;border-collapse:collapse;border-spacing:0;text-indent:0}td,th{padding:calc(var(--spacing)/ 2) var(--spacing);border-bottom:var(--border-width) solid var(--table-border-color);color:var(--color);font-weight:var(--font-weight);font-size:var(--font-size);text-align:left;text-align:start}tfoot td,tfoot th{border-top:var(--border-width) solid var(--table-border-color);border-bottom:0}table[role=grid] tbody tr:nth-child(odd){background-color:var(--table-row-stripped-background-color)}code,kbd,pre,samp{font-size:.875em;font-family:var(--font-family)}pre{-ms-overflow-style:scrollbar;overflow:auto}code,kbd,pre{border-radius:var(--border-radius);background:var(--code-background-color);color:var(--code-color);font-weight:var(--font-weight);line-height:initial}code,kbd{display:inline-block;padding:.375rem .5rem}pre{display:block;margin-bottom:var(--spacing);overflow-x:auto}pre>code{display:block;padding:var(--spacing);background:0 0;font-size:14px;line-height:var(--line-height)}code b{color:var(--code-tag-color);font-weight:var(--font-weight)}code i{color:var(--code-property-color);font-style:normal}code u{color:var(--code-value-color);text-decoration:none}code em{color:var(--code-comment-color);font-style:normal}kbd{background-color:var(--code-kbd-background-color);color:var(--code-kbd-color);vertical-align:baseline}hr{height:0;border:0;border-top:1px solid var(--muted-border-color);color:inherit}[hidden],template{display:none!important}canvas{display:inline-block}details{display:block;margin-bottom:var(--spacing);padding-bottom:var(--spacing);border-bottom:var(--border-width) solid var(--accordion-border-color)}details summary{line-height:1rem;list-style-type:none;cursor:pointer;transition:color var(--transition)}details summary:not([role]){color:var(--accordion-close-summary-color)}details summary::-webkit-details-marker{display:none}details summary::marker{display:none}details summary::-moz-list-bullet{list-style-type:none}details summary::after{display:block;width:1rem;height:1rem;-webkit-margin-start:calc(var(--spacing,1rem) * 0.5);margin-inline-start:calc(var(--spacing,1rem) * .5);float:right;transform:rotate(-90deg);background-image:var(--icon-chevron);background-position:right center;background-size:1rem auto;background-repeat:no-repeat;content:"";transition:transform var(--transition)}details summary:focus{outline:0}details summary:focus:not([role=button]){color:var(--accordion-active-summary-color)}details summary[role=button]{width:100%;text-align:left}details summary[role=button]::after{height:calc(1rem * var(--line-height,1.5));background-image:var(--icon-chevron-button)}details summary[role=button]:not(.outline).contrast::after{background-image:var(--icon-chevron-button-inverse)}details[open]>summary{margin-bottom:calc(var(--spacing))}details[open]>summary:not([role]):not(:focus){color:var(--accordion-open-summary-color)}details[open]>summary::after{transform:rotate(0)}[dir=rtl] details summary{text-align:right}[dir=rtl] details summary::after{float:left;background-position:left center}article{margin:var(--block-spacing-vertical) 0;padding:var(--block-spacing-vertical) var(--block-spacing-horizontal);border-radius:var(--border-radius);background:var(--card-background-color);box-shadow:var(--card-box-shadow)}article>footer,article>header{margin-right:calc(var(--block-spacing-horizontal) * -1);margin-left:calc(var(--block-spacing-horizontal) * -1);padding:calc(var(--block-spacing-vertical) * .66) var(--block-spacing-horizontal);background-color:var(--card-sectionning-background-color)}article>header{margin-top:calc(var(--block-spacing-vertical) * -1);margin-bottom:var(--block-spacing-vertical);border-bottom:var(--border-width) solid var(--card-border-color);border-top-right-radius:var(--border-radius);border-top-left-radius:var(--border-radius)}article>footer{margin-top:var(--block-spacing-vertical);margin-bottom:calc(var(--block-spacing-vertical) * -1);border-top:var(--border-width) solid var(--card-border-color);border-bottom-right-radius:var(--border-radius);border-bottom-left-radius:var(--border-radius)}:root{--scrollbar-width:0px}dialog{display:flex;z-index:999;position:fixed;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;width:inherit;min-width:100%;height:inherit;min-height:100%;padding:var(--spacing);border:0;-webkit-backdrop-filter:var(--modal-overlay-backdrop-filter);backdrop-filter:var(--modal-overlay-backdrop-filter);background-color:var(--modal-overlay-background-color);color:var(--color)}dialog article{max-height:calc(100vh - var(--spacing) * 2);overflow:auto}@media (min-width:576px){dialog article{max-width:510px}}@media (min-width:768px){dialog article{max-width:700px}}dialog article>footer,dialog article>header{padding:calc(var(--block-spacing-vertical) * .5) var(--block-spacing-horizontal)}dialog article>header .close{margin:0;margin-left:var(--spacing);float:right}dialog article>footer{text-align:right}dialog article>footer [role=button]{margin-bottom:0}dialog article>footer [role=button]:not(:first-of-type){margin-left:calc(var(--spacing) * .5)}dialog article p:last-of-type{margin:0}dialog article .close{display:block;width:1rem;height:1rem;margin-top:calc(var(--block-spacing-vertical) * -.5);margin-bottom:var(--typography-spacing-vertical);margin-left:auto;background-image:var(--icon-close);background-position:center;background-size:auto 1rem;background-repeat:no-repeat;opacity:.5;transition:opacity var(--transition)}dialog article .close:is([aria-current],:hover,:active,:focus){opacity:1}dialog:not([open]),dialog[open=false]{display:none}.modal-is-open{padding-right:var(--scrollbar-width,0);overflow:hidden;pointer-events:none;touch-action:none}.modal-is-open dialog{pointer-events:auto}:where(.modal-is-opening,.modal-is-closing) dialog,:where(.modal-is-opening,.modal-is-closing) dialog>article{animation-duration:.2s;animation-timing-function:ease-in-out;animation-fill-mode:both}:where(.modal-is-opening,.modal-is-closing) dialog{animation-duration:.8s;animation-name:modal-overlay}:where(.modal-is-opening,.modal-is-closing) dialog>article{animation-delay:.2s;animation-name:modal}.modal-is-closing dialog,.modal-is-closing dialog>article{animation-delay:0s;animation-direction:reverse}@keyframes modal-overlay{from{-webkit-backdrop-filter:none;backdrop-filter:none;background-color:transparent}}@keyframes modal{from{transform:translateY(-100%);opacity:0}}:where(nav li)::before{float:left;content:""}nav,nav ul{display:flex}nav{justify-content:space-between}nav ol,nav ul{align-items:center;margin-bottom:0;padding:0;list-style:none}nav ol:first-of-type,nav ul:first-of-type{margin-left:calc(var(--nav-element-spacing-horizontal) * -1)}nav ol:last-of-type,nav ul:last-of-type{margin-right:calc(var(--nav-element-spacing-horizontal) * -1)}nav li{display:inline-block;margin:0;padding:var(--nav-element-spacing-vertical) var(--nav-element-spacing-horizontal)}nav li>*{--spacing:0}nav :where(a,[role=link]){display:inline-block;margin:calc(var(--nav-link-spacing-vertical) * -1) calc(var(--nav-link-spacing-horizontal) * -1);padding:var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal);border-radius:var(--border-radius);text-decoration:none}nav :where(a,[role=link]):is([aria-current],:hover,:active,:focus){text-decoration:none}nav[aria-label=breadcrumb]{align-items:center;justify-content:start}nav[aria-label=breadcrumb] ul li:not(:first-child){-webkit-margin-start:var(--nav-link-spacing-horizontal);margin-inline-start:var(--nav-link-spacing-horizontal)}nav[aria-label=breadcrumb] ul li:not(:last-child) ::after{position:absolute;width:calc(var(--nav-link-spacing-horizontal) * 2);-webkit-margin-start:calc(var(--nav-link-spacing-horizontal)/ 2);margin-inline-start:calc(var(--nav-link-spacing-horizontal)/ 2);content:"/";color:var(--muted-color);text-align:center}nav[aria-label=breadcrumb] a[aria-current]{background-color:transparent;color:inherit;text-decoration:none;pointer-events:none}nav [role=button]{margin-right:inherit;margin-left:inherit;padding:var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal)}aside li,aside nav,aside ol,aside ul{display:block}aside li{padding:calc(var(--nav-element-spacing-vertical) * .5) var(--nav-element-spacing-horizontal)}aside li a{display:block}aside li [role=button]{margin:inherit}[dir=rtl] nav[aria-label=breadcrumb] ul li:not(:last-child) ::after{content:"\\"}progress{display:inline-block;vertical-align:baseline}progress{-webkit-appearance:none;-moz-appearance:none;display:inline-block;appearance:none;width:100%;height:.5rem;margin-bottom:calc(var(--spacing) * .5);overflow:hidden;border:0;border-radius:var(--border-radius);background-color:var(--progress-background-color);color:var(--progress-color)}progress::-webkit-progress-bar{border-radius:var(--border-radius);background:0 0}progress[value]::-webkit-progress-value{background-color:var(--progress-color)}progress::-moz-progress-bar{background-color:var(--progress-color)}@media (prefers-reduced-motion:no-preference){progress:indeterminate{background:var(--progress-background-color) linear-gradient(to right,var(--progress-color) 30%,var(--progress-background-color) 30%) top left/150% 150% no-repeat;animation:progress-indeterminate 1s linear infinite}progress:indeterminate[value]::-webkit-progress-value{background-color:transparent}progress:indeterminate::-moz-progress-bar{background-color:transparent}}@media (prefers-reduced-motion:no-preference){[dir=rtl] progress:indeterminate{animation-direction:reverse}}@keyframes progress-indeterminate{0%{background-position:200% 0}100%{background-position:-200% 0}}details[role=list],li[role=list]{position:relative}details[role=list] summary+ul,li[role=list]>ul{display:flex;z-index:99;position:absolute;top:auto;right:0;left:0;flex-direction:column;margin:0;padding:0;border:var(--border-width) solid var(--dropdown-border-color);border-radius:var(--border-radius);border-top-right-radius:0;border-top-left-radius:0;background-color:var(--dropdown-background-color);box-shadow:var(--card-box-shadow);color:var(--dropdown-color);white-space:nowrap}details[role=list] summary+ul li,li[role=list]>ul li{width:100%;margin-bottom:0;padding:calc(var(--form-element-spacing-vertical) * .5) var(--form-element-spacing-horizontal);list-style:none}details[role=list] summary+ul li:first-of-type,li[role=list]>ul li:first-of-type{margin-top:calc(var(--form-element-spacing-vertical) * .5)}details[role=list] summary+ul li:last-of-type,li[role=list]>ul li:last-of-type{margin-bottom:calc(var(--form-element-spacing-vertical) * .5)}details[role=list] summary+ul li a,li[role=list]>ul li a{display:block;margin:calc(var(--form-element-spacing-vertical) * -.5) calc(var(--form-element-spacing-horizontal) * -1);padding:calc(var(--form-element-spacing-vertical) * .5) var(--form-element-spacing-horizontal);overflow:hidden;color:var(--dropdown-color);text-decoration:none;text-overflow:ellipsis}details[role=list] summary+ul li a:hover,li[role=list]>ul li a:hover{background-color:var(--dropdown-hover-background-color)}details[role=list] summary::after,li[role=list]>a::after{display:block;width:1rem;height:calc(1rem * var(--line-height,1.5));-webkit-margin-start:0.5rem;margin-inline-start:.5rem;float:right;transform:rotate(0);background-position:right center;background-size:1rem auto;background-repeat:no-repeat;content:""}details[role=list]{padding:0;border-bottom:none}details[role=list] summary{margin-bottom:0}details[role=list] summary:not([role]){height:calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2);padding:var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal);border:var(--border-width) solid var(--form-element-border-color);border-radius:var(--border-radius);background-color:var(--form-element-background-color);color:var(--form-element-placeholder-color);line-height:inherit;cursor:pointer;transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition)}details[role=list] summary:not([role]):active,details[role=list] summary:not([role]):focus{border-color:var(--form-element-active-border-color);background-color:var(--form-element-active-background-color)}details[role=list] summary:not([role]):focus{box-shadow:0 0 0 var(--outline-width) var(--form-element-focus-color)}details[role=list][open] summary{border-bottom-right-radius:0;border-bottom-left-radius:0}details[role=list][open] summary::before{display:block;z-index:1;position:fixed;top:0;right:0;bottom:0;left:0;background:0 0;content:"";cursor:default}nav details[role=list] summary,nav li[role=list] a{display:flex;direction:ltr}nav details[role=list] summary+ul,nav li[role=list]>ul{min-width:-moz-fit-content;min-width:fit-content;border-radius:var(--border-radius)}nav details[role=list] summary+ul li a,nav li[role=list]>ul li a{border-radius:0}nav details[role=list] summary,nav details[role=list] summary:not([role]){height:auto;padding:var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal)}nav details[role=list][open] summary{border-radius:var(--border-radius)}nav details[role=list] summary+ul{margin-top:var(--outline-width);-webkit-margin-start:0;margin-inline-start:0}nav details[role=list] summary[role=link]{margin-bottom:calc(var(--nav-link-spacing-vertical) * -1);line-height:var(--line-height)}nav details[role=list] summary[role=link]+ul{margin-top:calc(var(--nav-link-spacing-vertical) + var(--outline-width));-webkit-margin-start:calc(var(--nav-link-spacing-horizontal) * -1);margin-inline-start:calc(var(--nav-link-spacing-horizontal) * -1)}li[role=list] a:active~ul,li[role=list] a:focus~ul,li[role=list]:hover>ul{display:flex}li[role=list]>ul{display:none;margin-top:calc(var(--nav-link-spacing-vertical) + var(--outline-width));-webkit-margin-start:calc(var(--nav-element-spacing-horizontal) - var(--nav-link-spacing-horizontal));margin-inline-start:calc(var(--nav-element-spacing-horizontal) - var(--nav-link-spacing-horizontal))}li[role=list]>a::after{background-image:var(--icon-chevron)}label>details[role=list]{margin-top:calc(var(--spacing) * .25);margin-bottom:var(--spacing)}[aria-busy=true]{cursor:progress}[aria-busy=true]:not(input,select,textarea,html)::before{display:inline-block;width:1em;height:1em;border:.1875em solid currentColor;border-radius:1em;border-right-color:transparent;content:"";vertical-align:text-bottom;vertical-align:-.125em;animation:spinner .75s linear infinite;opacity:var(--loading-spinner-opacity)}[aria-busy=true]:not(input,select,textarea,html):not(:empty)::before{margin-right:calc(var(--spacing) * .5);margin-left:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(var(--spacing) * .5);margin-inline-end:calc(var(--spacing) * .5)}[aria-busy=true]:not(input,select,textarea,html):empty{text-align:center}a[aria-busy=true],button[aria-busy=true],input[type=button][aria-busy=true],input[type=reset][aria-busy=true],input[type=submit][aria-busy=true]{pointer-events:none}@keyframes spinner{to{transform:rotate(360deg)}}[data-tooltip]{position:relative}[data-tooltip]:not(a,button,input){border-bottom:1px dotted;text-decoration:none;cursor:help}[data-tooltip]::after,[data-tooltip]::before,[data-tooltip][data-placement=top]::after,[data-tooltip][data-placement=top]::before{display:block;z-index:99;position:absolute;bottom:100%;left:50%;padding:.25rem .5rem;overflow:hidden;transform:translate(-50%,-.25rem);border-radius:var(--border-radius);background:var(--tooltip-background-color);content:attr(data-tooltip);color:var(--tooltip-color);font-style:normal;font-weight:var(--font-weight);font-size:.875rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;opacity:0;pointer-events:none}[data-tooltip]::after,[data-tooltip][data-placement=top]::after{padding:0;transform:translate(-50%,0);border-top:.3rem solid;border-right:.3rem solid transparent;border-left:.3rem solid transparent;border-radius:0;background-color:transparent;content:"";color:var(--tooltip-background-color)}[data-tooltip][data-placement=bottom]::after,[data-tooltip][data-placement=bottom]::before{top:100%;bottom:auto;transform:translate(-50%,.25rem)}[data-tooltip][data-placement=bottom]:after{transform:translate(-50%,-.3rem);border:.3rem solid transparent;border-bottom:.3rem solid}[data-tooltip][data-placement=left]::after,[data-tooltip][data-placement=left]::before{top:50%;right:100%;bottom:auto;left:auto;transform:translate(-.25rem,-50%)}[data-tooltip][data-placement=left]:after{transform:translate(.3rem,-50%);border:.3rem solid transparent;border-left:.3rem solid}[data-tooltip][data-placement=right]::after,[data-tooltip][data-placement=right]::before{top:50%;right:auto;bottom:auto;left:100%;transform:translate(.25rem,-50%)}[data-tooltip][data-placement=right]:after{transform:translate(-.3rem,-50%);border:.3rem solid transparent;border-right:.3rem solid}[data-tooltip]:focus::after,[data-tooltip]:focus::before,[data-tooltip]:hover::after,[data-tooltip]:hover::before{opacity:1}@media (hover:hover) and (pointer:fine){[data-tooltip]:hover::after,[data-tooltip]:hover::before,[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:focus::before,[data-tooltip][data-placement=bottom]:hover [data-tooltip]:focus::after,[data-tooltip][data-placement=bottom]:hover [data-tooltip]:focus::before{animation-duration:.2s;animation-name:tooltip-slide-top}[data-tooltip]:hover::after,[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:hover [data-tooltip]:focus::after{animation-name:tooltip-caret-slide-top}[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:focus::before,[data-tooltip][data-placement=bottom]:hover::after,[data-tooltip][data-placement=bottom]:hover::before{animation-duration:.2s;animation-name:tooltip-slide-bottom}[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:hover::after{animation-name:tooltip-caret-slide-bottom}[data-tooltip][data-placement=left]:focus::after,[data-tooltip][data-placement=left]:focus::before,[data-tooltip][data-placement=left]:hover::after,[data-tooltip][data-placement=left]:hover::before{animation-duration:.2s;animation-name:tooltip-slide-left}[data-tooltip][data-placement=left]:focus::after,[data-tooltip][data-placement=left]:hover::after{animation-name:tooltip-caret-slide-left}[data-tooltip][data-placement=right]:focus::after,[data-tooltip][data-placement=right]:focus::before,[data-tooltip][data-placement=right]:hover::after,[data-tooltip][data-placement=right]:hover::before{animation-duration:.2s;animation-name:tooltip-slide-right}[data-tooltip][data-placement=right]:focus::after,[data-tooltip][data-placement=right]:hover::after{animation-name:tooltip-caret-slide-right}}@keyframes tooltip-slide-top{from{transform:translate(-50%,.75rem);opacity:0}to{transform:translate(-50%,-.25rem);opacity:1}}@keyframes tooltip-caret-slide-top{from{opacity:0}50%{transform:translate(-50%,-.25rem);opacity:0}to{transform:translate(-50%,0);opacity:1}}@keyframes tooltip-slide-bottom{from{transform:translate(-50%,-.75rem);opacity:0}to{transform:translate(-50%,.25rem);opacity:1}}@keyframes tooltip-caret-slide-bottom{from{opacity:0}50%{transform:translate(-50%,-.5rem);opacity:0}to{transform:translate(-50%,-.3rem);opacity:1}}@keyframes tooltip-slide-left{from{transform:translate(.75rem,-50%);opacity:0}to{transform:translate(-.25rem,-50%);opacity:1}}@keyframes tooltip-caret-slide-left{from{opacity:0}50%{transform:translate(.05rem,-50%);opacity:0}to{transform:translate(.3rem,-50%);opacity:1}}@keyframes tooltip-slide-right{from{transform:translate(-.75rem,-50%);opacity:0}to{transform:translate(.25rem,-50%);opacity:1}}@keyframes tooltip-caret-slide-right{from{opacity:0}50%{transform:translate(-.05rem,-50%);opacity:0}to{transform:translate(-.3rem,-50%);opacity:1}}[aria-controls]{cursor:pointer}[aria-disabled=true],[disabled]{cursor:not-allowed}[aria-hidden=false][hidden]{display:initial}[aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);position:absolute}[tabindex],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation}[dir=rtl]{direction:rtl}@media (prefers-reduced-motion:reduce){:not([aria-busy=true]),:not([aria-busy=true])::after,:not([aria-busy=true])::before{background-attachment:initial!important;animation-duration:1ms!important;animation-delay:-1ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-delay:0s!important;transition-duration:0s!important}}
-/*# sourceMappingURL=pico.min.css.map */
diff --git a/src/khoj/interface/web/assets/purify.min.js b/src/khoj/interface/web/assets/purify.min.js
deleted file mode 100644
index 40e13ee9..00000000
--- a/src/khoj/interface/web/assets/purify.min.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/*! @license DOMPurify 3.1.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.2/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),_=b(String.prototype.trim),y=b(Object.prototype.hasOwnProperty),E=b(RegExp.prototype.test),A=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t/gm),B=a(/\${[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:z,TMPLIT_EXPR:B,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:X,DOCTYPE_NAME:q,CUSTOM_ELEMENT:$});const V=function(){return"undefined"==typeof window?null:window},Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var J=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V();const o=e=>t(e);if(o.version="3.1.2",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:b,Element:R,NodeFilter:H,NamedNodeMap:z=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=C(j,"cloneNode"),$=C(j,"nextSibling"),J=C(j,"childNodes"),Q=C(j,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ee,te="";const{implementation:ne,createNodeIterator:oe,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:ae}=a;let le={};o.isSupported="function"==typeof e&&"function"==typeof Q&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:se,TMPLIT_EXPR:ue,DATA_ATTR:me,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:he}=K;let{IS_ALLOWED_URI:ge}=K,Te=null;const _e=S({},[...v,...L,...D,...x,...M]);let ye=null;const Ee=S({},[...I,...U,...P,...F]);let Ae=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,be=null,Se=!0,Re=!0,we=!1,Ce=!0,ve=!1,Le=!0,De=!1,Oe=!1,xe=!1,ke=!1,Me=!1,Ie=!1,Ue=!0,Pe=!1;const Fe="user-content-";let He=!0,ze=!1,Be={},We=null;const Ge=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ye=null;const je=S({},["audio","video","img","source","image","track"]);let Xe=null;const qe=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let Ze=Ve,Je=!1,Qe=null;const et=S({},[$e,Ke,Ve],d);let tt=null;const nt=["application/xhtml+xml","text/html"],ot="text/html";let rt=null,it=null;const at=255,lt=r.createElement("form"),ct=function(e){return e instanceof RegExp||e instanceof Function},st=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!it||it!==e){if(e&&"object"==typeof e||(e={}),e=w(e),tt=-1===nt.indexOf(e.PARSER_MEDIA_TYPE)?ot:e.PARSER_MEDIA_TYPE,rt="application/xhtml+xml"===tt?d:f,Te=y(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,rt):_e,ye=y(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,rt):Ee,Qe=y(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,d):et,Xe=y(e,"ADD_URI_SAFE_ATTR")?S(w(qe),e.ADD_URI_SAFE_ATTR,rt):qe,Ye=y(e,"ADD_DATA_URI_TAGS")?S(w(je),e.ADD_DATA_URI_TAGS,rt):je,We=y(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,rt):Ge,Ne=y(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,rt):{},be=y(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,rt):{},Be=!!y(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ve=e.SAFE_FOR_TEMPLATES||!1,Le=!1!==e.SAFE_FOR_XML,De=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Pe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,ge=e.ALLOWED_URI_REGEXP||Y,Ze=e.NAMESPACE||Ve,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(Re=!1),Me&&(ke=!0),Be&&(Te=S({},M),ye=[],!0===Be.html&&(S(Te,v),S(ye,I)),!0===Be.svg&&(S(Te,L),S(ye,U),S(ye,F)),!0===Be.svgFilters&&(S(Te,D),S(ye,U),S(ye,F)),!0===Be.mathMl&&(S(Te,x),S(ye,P),S(ye,F))),e.ADD_TAGS&&(Te===_e&&(Te=w(Te)),S(Te,e.ADD_TAGS,rt)),e.ADD_ATTR&&(ye===Ee&&(ye=w(ye)),S(ye,e.ADD_ATTR,rt)),e.ADD_URI_SAFE_ATTR&&S(Xe,e.ADD_URI_SAFE_ATTR,rt),e.FORBID_CONTENTS&&(We===Ge&&(We=w(We)),S(We,e.FORBID_CONTENTS,rt)),He&&(Te["#text"]=!0),De&&S(Te,["html","head","body"]),Te.table&&(S(Te,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=Z(G,c)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));i&&i(e),it=e}},ut=S({},["mi","mo","mn","ms","mtext"]),mt=S({},["foreignobject","annotation-xml"]),pt=S({},["title","style","font","a","script"]),ft=S({},[...L,...D,...O]),dt=S({},[...x,...k]),ht=function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!Qe[e.namespaceURI]&&(e.namespaceURI===Ke?t.namespaceURI===Ve?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===o||ut[o]):Boolean(ft[n]):e.namespaceURI===$e?t.namespaceURI===Ve?"math"===n:t.namespaceURI===Ke?"math"===n&&mt[o]:Boolean(dt[n]):e.namespaceURI===Ve?!(t.namespaceURI===Ke&&!mt[o])&&(!(t.namespaceURI===$e&&!ut[o])&&(!dt[n]&&(pt[n]||!ft[n]))):!("application/xhtml+xml"!==tt||!Qe[e.namespaceURI]))},gt=function(e){p(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Tt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(ke||Me)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(xe)e=" "+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===tt&&Ze===Ve&&(e=''+e+"");const o=ee?ee.createHTML(e):e;if(Ze===Ve)try{t=(new W).parseFromString(o,tt)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Je?te:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ze===Ve?ie.call(t,De?"html":"body")[0]:De?t.documentElement:i},yt=function(e){return oe.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof B&&(void 0!==e.__depth&&"number"!=typeof e.__depth||void 0!==e.__removalCount&&"number"!=typeof e.__removalCount||"string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},At=function(e){return"function"==typeof b&&e instanceof b},Nt=function(e,t,n){le[e]&&u(le[e],(e=>{e.call(o,t,n,it)}))},bt=function(e){let t=null;if(Nt("beforeSanitizeElements",e,null),Et(e))return gt(e),!0;const n=rt(e.nodeName);if(Nt("uponSanitizeElement",e,{tagName:n,allowedTags:Te}),e.hasChildNodes()&&!At(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Le&&8===e.nodeType&&E(/<[/\w]/g,e.data))return gt(e),!0;if(!Te[n]||Ne[n]){if(!Ne[n]&&Rt(n)){if(Ae.tagNameCheck instanceof RegExp&&E(Ae.tagNameCheck,n))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))return!1}if(He&&!We[n]){const t=Q(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,$(e))}}}return gt(e),!0}return e instanceof R&&!ht(e)?(gt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(ve&&3===e.nodeType&&(t=e.textContent,u([ce,se,ue],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),Nt("afterSanitizeElements",e,null),!1):(gt(e),!0)},St=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in lt))return!1;if(Re&&!be[t]&&E(me,t));else if(Se&&E(pe,t));else if(!ye[t]||be[t]){if(!(Rt(e)&&(Ae.tagNameCheck instanceof RegExp&&E(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&E(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&E(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1}else if(Xe[t]);else if(E(ge,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Ye[e]){if(we&&!E(fe,g(n,de,"")));else if(n)return!1}else;return!0},Rt=function(e){return"annotation-xml"!==e&&h(e,he)},wt=function(e){Nt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=rt(a);let p="value"===a?c:_(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,Nt("uponSanitizeAttribute",e,n),p=n.attrValue,n.forceKeepAttr)continue;if(Tt(a,e),!n.keepAttr)continue;if(!Ce&&E(/\/>/i,p)){Tt(a,e);continue}ve&&u([ce,se,ue],(e=>{p=g(p,e," ")}));const f=rt(e.nodeName);if(St(f,s,p)){if(!Pe||"id"!==s&&"name"!==s||(Tt(a,e),p=Fe+p),ee&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ee.createHTML(p);break;case"TrustedScriptURL":p=ee.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),m(o.removed)}catch(e){}}}Nt("afterSanitizeAttributes",e,null)},Ct=function e(t){let n=null;const o=yt(t);for(Nt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();){if(Nt("uponSanitizeShadowNode",n,null),bt(n))continue;const t=Q(n);1===n.nodeType&&(t&&t.__depth?n.__depth=(n.__removalCount||0)+t.__depth+1:n.__depth=1),n.__depth>=at&>(n),n.content instanceof s&&(n.content.__depth=n.__depth,e(n.content)),wt(n)}Nt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!At(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Oe||st(t),o.removed=[],"string"==typeof e&&(ze=!1),ze){if(e.nodeName){const t=rt(e.nodeName);if(!Te[t]||Ne[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ke&&!ve&&!De&&-1===e.indexOf("<"))return ee&&Ie?ee.createHTML(e):e;if(n=_t(e),!n)return ke?null:Ie?te:""}n&&xe&>(n.firstChild);const c=yt(ze?e:n);for(;i=c.nextNode();){if(bt(i))continue;const e=Q(i);1===i.nodeType&&(e&&e.__depth?i.__depth=(i.__removalCount||0)+e.__depth+1:i.__depth=1),i.__depth>=at&>(i),i.content instanceof s&&(i.content.__depth=i.__depth,Ct(i.content)),wt(i)}if(ze)return e;if(ke){if(Me)for(l=re.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ae.call(a,l,!0)),l}let m=De?n.outerHTML:n.innerHTML;return De&&Te["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(q,n.ownerDocument.doctype.name)&&(m="\n"+m),ve&&u([ce,se,ue],(e=>{m=g(m,e," ")})),ee&&Ie?ee.createHTML(m):m},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};st(e),Oe=!0},o.clearConfig=function(){it=null,Oe=!1},o.isValidAttribute=function(e,t,n){it||st({});const o=rt(e),r=rt(t);return St(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(le[e]=le[e]||[],p(le[e],t))},o.removeHook=function(e){if(le[e])return m(le[e])},o.removeHooks=function(e){le[e]&&(le[e]=[])},o.removeAllHooks=function(){le={}},o}();return J}));
-//# sourceMappingURL=purify.min.js.map
diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html
deleted file mode 100644
index ae3e8cfe..00000000
--- a/src/khoj/interface/web/chat.html
+++ /dev/null
@@ -1,3436 +0,0 @@
-
-
-
-
-
-
-
- Khoj - Chat
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% import 'utils.html' as utils %}
- {{ utils.heading_pane(user_photo, username, is_active, has_documents) }}
-
-
-
-
-
diff --git a/src/khoj/interface/web/config_automation.html b/src/khoj/interface/web/config_automation.html
deleted file mode 100644
index 75927b60..00000000
--- a/src/khoj/interface/web/config_automation.html
+++ /dev/null
@@ -1,1103 +0,0 @@
-{% extends "base_config.html" %}
-{% block content %}
-
-
-
-
-
- Automate (Preview)
-
- Automations allow you to schedule smart reminders using Khoj. This is an experimental feature, so your results may vary! Send any feedback to
team@khoj.dev .
-
-
-
-
-
-
- Build Your Own
-
-
-
-
- Suggested Automations
-
-
-
-
-
-
-
-
-
-
-
-
-{% endblock %}
diff --git a/src/khoj/interface/web/content_source_computer_input.html b/src/khoj/interface/web/content_source_computer_input.html
deleted file mode 100644
index fd66360d..00000000
--- a/src/khoj/interface/web/content_source_computer_input.html
+++ /dev/null
@@ -1,139 +0,0 @@
-{% extends "base_config.html" %}
-{% block content %}
-
-
-
-
- Files
-
-
Manage files from your computer
-
Get the Khoj Desktop , Obsidian or Emacs app to sync documents from your computer
-
-
-
-
- 🗑️ Delete all
-
-
-
-
-
-
-
-
-{% endblock %}
diff --git a/src/khoj/interface/web/content_source_notion_input.html b/src/khoj/interface/web/content_source_notion_input.html
deleted file mode 100644
index 8a7260b7..00000000
--- a/src/khoj/interface/web/content_source_notion_input.html
+++ /dev/null
@@ -1,94 +0,0 @@
-{% extends "base_config.html" %}
-{% block content %}
-
-
-
-
- Notion
-
-
-
-
-
-
-
-{% endblock %}
diff --git a/src/khoj/interface/web/public_conversation.html b/src/khoj/interface/web/public_conversation.html
deleted file mode 100644
index be67cb00..00000000
--- a/src/khoj/interface/web/public_conversation.html
+++ /dev/null
@@ -1,2006 +0,0 @@
-
-
-
-
-
- Khoj: {{ public_conversation_slug | replace("-", " ")}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Login to continue
-
-
-
- Send Magic Link
-
-
-
OR
-
-
-
-
-
-
-
-
- {% import 'utils.html' as utils %}
- {{ utils.heading_pane(user_photo, username, is_active, has_documents) }}
-
-
-
-
-
-
- New Topic
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/khoj/interface/web/search.html b/src/khoj/interface/web/search.html
deleted file mode 100644
index 817daa38..00000000
--- a/src/khoj/interface/web/search.html
+++ /dev/null
@@ -1,470 +0,0 @@
-
-
-
-
- Khoj - Search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% import 'utils.html' as utils %}
- {{ utils.heading_pane(user_photo, username, is_active, has_documents) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/khoj/interface/web/settings.html b/src/khoj/interface/web/settings.html
deleted file mode 100644
index 11cb33e7..00000000
--- a/src/khoj/interface/web/settings.html
+++ /dev/null
@@ -1,1011 +0,0 @@
-{% extends "base_config.html" %}
-{% block content %}
-
-
-
-
Profile
-
-
-
-
-
- Name
-
-
-
-
-
-
-
- Save
-
-
-
-
-
Content
-
- Data Usage
-
-
-
-
-
-
-
- Files
-
-
-
-
-
Manage files from your computer
-
-
-
-
-
-
-
- Github
-
-
-
-
-
Set repositories to index
-
-
-
-
-
-
-
- Notion
-
-
-
-
-
Sync your Notion pages
-
-
-
-
-
-
-
- Language
-
-
-
-
- {% for option in search_model_options %}
- {{ option.name }}
- {% endfor %}
-
-
-
-
- Save
-
-
-
-
-
-
-
-
-
Features
-
-
-
-
-
-
- Chat
-
-
-
-
- {% for option in chat_model_options %}
- {{ option.name }}
- {% endfor %}
-
-
-
- {% if (not billing_enabled) or (subscription_state != 'unsubscribed' and subscription_state != 'expired') %}
-
- Save
-
- {% else %}
-
- Subscribe to use different models
-
- {% endif %}
-
-
-
-
-
-
- Paint
-
-
-
-
- {% for option in paint_model_options %}
- {{ option.name }}
- {% endfor %}
-
-
-
- {% if (not billing_enabled) or (subscription_state != 'unsubscribed' and subscription_state != 'expired') %}
-
- Save
-
- {% else %}
-
- Subscribe to use different models
-
- {% endif %}
-
-
- {% if is_eleven_labs_enabled %}
-
-
-
-
- Voice
-
-
-
-
- {% for option in voice_model_options %}
- {{ option.name }}
- {% endfor %}
-
-
-
- {% if (not billing_enabled) or (subscription_state != 'unsubscribed' and subscription_state != 'expired') %}
-
- Save
-
- {% else %}
-
- You must be subscribed to use this feature
-
- {% endif %}
-
-
- {% endif %}
-
-
- {% if not anonymous_mode or is_twilio_enabled %}
-
-
Clients
- {% if not anonymous_mode %}
-
-
-
-
- API Keys
-
-
-
-
Manage access from your client apps to Khoj
-
-
-
-
- Name
- Key
- Actions
-
-
-
-
-
-
- Generate API Key
-
-
-
- {% endif %}
- {% if is_twilio_enabled %}
-
- {% endif %}
-
- {% endif %}
- {% if billing_enabled %}
-
-
Billing
-
-
-
-
-
- Subscription
-
-
-
-
-
- Subscribe to Khoj Cloud. See pricing for details.
-
-
- You are subscribed to Khoj Cloud. Subscription will renew on {{ subscription_renewal_date }}
-
-
- You are subscribed to Khoj Cloud. Subscription will expire on {{ subscription_renewal_date }}
-
-
- Subscribe to Khoj Cloud. Subscription expired on {{ subscription_renewal_date }}
-
-
-
-
-
-
- {% endif %}
-
-
-
-
-{% endblock %}
diff --git a/src/khoj/routers/web_client.py b/src/khoj/routers/web_client.py
index 21be774a..f890f6b3 100644
--- a/src/khoj/routers/web_client.py
+++ b/src/khoj/routers/web_client.py
@@ -1,27 +1,16 @@
# System Packages
import json
import os
-from typing import Optional
from fastapi import APIRouter, Request
from fastapi.responses import FileResponse, HTMLResponse, RedirectResponse
from fastapi.templating import Jinja2Templates
from starlette.authentication import requires
-from khoj.database.adapters import (
- AgentAdapters,
- PublicConversationAdapters,
- get_user_github_config,
- get_user_notion_config,
-)
-from khoj.database.models import KhojUser
+from khoj.database.adapters import get_user_github_config
from khoj.routers.helpers import get_next_url, get_user_config
-from khoj.utils import constants, state
-from khoj.utils.rawconfig import (
- GithubContentConfig,
- GithubRepoConfig,
- NotionContentConfig,
-)
+from khoj.utils import constants
+from khoj.utils.rawconfig import GithubContentConfig, GithubRepoConfig
# Initialize Router
web_client = APIRouter()
@@ -30,39 +19,36 @@ templates = Jinja2Templates([constants.web_directory, constants.next_js_director
# Create Routes
@web_client.get("/", response_class=FileResponse)
-@requires(["authenticated"], redirect="login_page")
def index(request: Request):
- user = request.user.object
- user_config = get_user_config(user, request)
-
- return templates.TemplateResponse("chat.html", context=user_config)
+ return templates.TemplateResponse("index.html", context={"request": request})
@web_client.post("/", response_class=FileResponse)
@requires(["authenticated"], redirect="login_page")
def index_post(request: Request):
- user = request.user.object
- user_config = get_user_config(user, request)
-
- return templates.TemplateResponse("chat.html", context=user_config)
+ return templates.TemplateResponse("index.html", context={"request": request})
@web_client.get("/search", response_class=FileResponse)
@requires(["authenticated"], redirect="login_page")
def search_page(request: Request):
- user = request.user.object
- user_config = get_user_config(user, request)
-
- return templates.TemplateResponse("search.html", context=user_config)
+ return templates.TemplateResponse(
+ "search/index.html",
+ context={
+ "request": request,
+ },
+ )
@web_client.get("/chat", response_class=FileResponse)
@requires(["authenticated"], redirect="login_page")
def chat_page(request: Request):
- user = request.user.object
- user_config = get_user_config(user, request)
-
- return templates.TemplateResponse("chat.html", context=user_config)
+ return templates.TemplateResponse(
+ "chat/index.html",
+ context={
+ "request": request,
+ },
+ )
@web_client.get("/experimental", response_class=FileResponse)
@@ -113,38 +99,10 @@ def agents_page(request: Request):
)
-@web_client.get("/agent/{agent_slug}", response_class=HTMLResponse)
-def agent_page(request: Request, agent_slug: str):
- user: KhojUser = request.user.object if request.user.is_authenticated else None
- user_config = get_user_config(user, request)
- agent = AgentAdapters.get_agent_by_slug(agent_slug)
-
- if agent == None:
- user_config["has_documents"] = False
- return templates.TemplateResponse("404.html", context=user_config)
-
- user_config["agent"] = {
- "slug": agent.slug,
- "avatar": agent.avatar,
- "name": agent.name,
- "personality": agent.personality,
- "public": agent.public,
- "creator": agent.creator.username if agent.creator else None,
- "managed_by_admin": agent.managed_by_admin,
- "chat_model": agent.chat_model.chat_model,
- "creator_not_self": agent.creator != user,
- }
-
- return templates.TemplateResponse("agent.html", context=user_config)
-
-
@web_client.get("/settings", response_class=HTMLResponse)
@requires(["authenticated"], redirect="login_page")
def config_page(request: Request):
- user: KhojUser = request.user.object
- user_config = get_user_config(user, request, is_detailed=True)
-
- return templates.TemplateResponse("settings.html", context=user_config)
+ return templates.TemplateResponse("settings/index.html", context={"request": request})
@web_client.get("/settings/content/github", response_class=HTMLResponse)
@@ -177,82 +135,23 @@ def github_config_page(request: Request):
return templates.TemplateResponse("content_source_github_input.html", context=user_config)
-@web_client.get("/settings/content/notion", response_class=HTMLResponse)
-@requires(["authenticated"], redirect="login_page")
-def notion_config_page(request: Request):
- user = request.user.object
- user_config = get_user_config(user, request)
-
- current_notion_config = get_user_notion_config(user)
- token = current_notion_config.token if current_notion_config else ""
- current_config = NotionContentConfig(token=token)
- current_config = json.loads(current_config.model_dump_json())
-
- user_config["current_config"] = current_config
- return templates.TemplateResponse("content_source_notion_input.html", context=user_config)
-
-
-@web_client.get("/settings/content/computer", response_class=HTMLResponse)
-@requires(["authenticated"], redirect="login_page")
-def computer_config_page(request: Request):
- user = request.user.object if request.user.is_authenticated else None
- user_config = get_user_config(user, request)
-
- return templates.TemplateResponse("content_source_computer_input.html", context=user_config)
-
-
@web_client.get("/share/chat/{public_conversation_slug}", response_class=HTMLResponse)
def view_public_conversation(request: Request):
- public_conversation_slug = request.path_params.get("public_conversation_slug")
- public_conversation = PublicConversationAdapters.get_public_conversation_by_slug(public_conversation_slug)
- if not public_conversation:
- return templates.TemplateResponse(
- "404.html",
- context={
- "request": request,
- "khoj_version": state.khoj_version,
- },
- )
- user = request.user.object if request.user.is_authenticated else None
- user_config = get_user_config(user, request)
- user_config["public_conversation_slug"] = public_conversation_slug
- user_config["google_client_id"] = os.environ.get("GOOGLE_CLIENT_ID")
-
- all_agents = AgentAdapters.get_all_accessible_agents(request.user.object if request.user.is_authenticated else None)
-
- # Filter out the current agent
- all_agents = [agent for agent in all_agents if agent != public_conversation.agent]
- agents_packet = []
- for agent in all_agents:
- agents_packet.append(
- {
- "slug": agent.slug,
- "avatar": agent.avatar,
- "name": agent.name,
- }
- )
- user_config["agents"] = agents_packet
-
- redirect_uri = str(request.app.url_path_for("auth"))
- next_url = str(
- request.app.url_path_for("view_public_conversation", public_conversation_slug=public_conversation_slug)
+ return templates.TemplateResponse(
+ "share/chat/index.html",
+ context={
+ "request": request,
+ },
)
- user_config["redirect_uri"] = f"{redirect_uri}?next={next_url}"
-
- return templates.TemplateResponse("public_conversation.html", context=user_config)
@web_client.get("/automations", response_class=HTMLResponse)
def automations_config_page(
request: Request,
- subject: Optional[str] = None,
- crontime: Optional[str] = None,
- queryToRun: Optional[str] = None,
):
- user = request.user.object if request.user.is_authenticated else None
- user_config = get_user_config(user, request)
- user_config["subject"] = subject if subject else ""
- user_config["crontime"] = crontime if crontime else ""
- user_config["queryToRun"] = queryToRun if queryToRun else ""
-
- return templates.TemplateResponse("config_automation.html", context=user_config)
+ return templates.TemplateResponse(
+ "automations/index.html",
+ context={
+ "request": request,
+ },
+ )