diff --git a/.obsidian/plugins/task-list-kanban/main.js b/.obsidian/plugins/task-list-kanban/main.js index e6174ba..21e314c 100644 --- a/.obsidian/plugins/task-list-kanban/main.js +++ b/.obsidian/plugins/task-list-kanban/main.js @@ -49,9 +49,1007 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/common.js +// node_modules/crypto-js/core.js +var require_core = __commonJS({ + "node_modules/crypto-js/core.js"(exports2, module2) { + (function(root18, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(); + } else if (typeof define === "function" && define.amd) { + define([], factory); + } else { + root18.CryptoJS = factory(); + } + })(exports2, function() { + var CryptoJS = CryptoJS || (function(Math2, undefined2) { + var crypto2; + if (typeof window !== "undefined" && window.crypto) { + crypto2 = window.crypto; + } + if (typeof self !== "undefined" && self.crypto) { + crypto2 = self.crypto; + } + if (typeof globalThis !== "undefined" && globalThis.crypto) { + crypto2 = globalThis.crypto; + } + if (!crypto2 && typeof window !== "undefined" && window.msCrypto) { + crypto2 = window.msCrypto; + } + if (!crypto2 && typeof global !== "undefined" && global.crypto) { + crypto2 = global.crypto; + } + if (!crypto2 && typeof require === "function") { + try { + crypto2 = require("crypto"); + } catch (err) { + } + } + var cryptoSecureRandomInt = function() { + if (crypto2) { + if (typeof crypto2.getRandomValues === "function") { + try { + return crypto2.getRandomValues(new Uint32Array(1))[0]; + } catch (err) { + } + } + if (typeof crypto2.randomBytes === "function") { + try { + return crypto2.randomBytes(4).readInt32LE(); + } catch (err) { + } + } + } + throw new Error("Native crypto module could not be used to get secure random number."); + }; + var create = Object.create || /* @__PURE__ */ (function() { + function F() { + } + return function(obj) { + var subtype; + F.prototype = obj; + subtype = new F(); + F.prototype = null; + return subtype; + }; + })(); + var C = {}; + var C_lib = C.lib = {}; + var Base2 = C_lib.Base = /* @__PURE__ */ (function() { + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function(overrides) { + var subtype = create(this); + if (overrides) { + subtype.mixIn(overrides); + } + if (!subtype.hasOwnProperty("init") || this.init === subtype.init) { + subtype.init = function() { + subtype.$super.init.apply(this, arguments); + }; + } + subtype.init.prototype = subtype; + subtype.$super = this; + return subtype; + }, + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function() { + var instance = this.extend(); + instance.init.apply(instance, arguments); + return instance; + }, + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function() { + }, + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function(properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + if (properties.hasOwnProperty("toString")) { + this.toString = properties.toString; + } + }, + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function() { + return this.init.prototype.extend(this); + } + }; + })(); + var WordArray = C_lib.WordArray = Base2.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function(words, sigBytes) { + words = this.words = words || []; + if (sigBytes != undefined2) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function(encoder) { + return (encoder || Hex).stringify(this); + }, + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function(wordArray) { + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + this.clamp(); + if (thisSigBytes % 4) { + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255; + thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8; + } + } else { + for (var j = 0; j < thatSigBytes; j += 4) { + thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2]; + } + } + this.sigBytes += thatSigBytes; + return this; + }, + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function() { + var words = this.words; + var sigBytes = this.sigBytes; + words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8; + words.length = Math2.ceil(sigBytes / 4); + }, + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function() { + var clone = Base2.clone.call(this); + clone.words = this.words.slice(0); + return clone; + }, + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function(nBytes) { + var words = []; + for (var i = 0; i < nBytes; i += 4) { + words.push(cryptoSecureRandomInt()); + } + return new WordArray.init(words, nBytes); + } + }); + var C_enc = C.enc = {}; + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function(wordArray) { + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 15).toString(16)); + } + return hexChars.join(""); + }, + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function(hexStr) { + var hexStrLength = hexStr.length; + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4; + } + return new WordArray.init(words, hexStrLength / 2); + } + }; + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function(wordArray) { + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; + latin1Chars.push(String.fromCharCode(bite)); + } + return latin1Chars.join(""); + }, + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function(latin1Str) { + var latin1StrLength = latin1Str.length; + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8; + } + return new WordArray.init(words, latin1StrLength); + } + }; + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function(wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error("Malformed UTF-8 data"); + } + }, + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function(utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base2.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function() { + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function(data) { + if (typeof data == "string") { + data = Utf8.parse(data); + } + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function(doFlush) { + var processedWords; + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + nBlocksReady = Math2.ceil(nBlocksReady); + } else { + nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + var nWordsReady = nBlocksReady * blockSize; + var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes); + if (nWordsReady) { + for (var offset3 = 0; offset3 < nWordsReady; offset3 += blockSize) { + this._doProcessBlock(dataWords, offset3); + } + processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + return new WordArray.init(processedWords, nBytesReady); + }, + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function() { + var clone = Base2.clone.call(this); + clone._data = this._data.clone(); + return clone; + }, + _minBufferSize: 0 + }); + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base2.extend(), + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function(cfg) { + this.cfg = this.cfg.extend(cfg); + this.reset(); + }, + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function() { + BufferedBlockAlgorithm.reset.call(this); + this._doReset(); + }, + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function(messageUpdate) { + this._append(messageUpdate); + this._process(); + return this; + }, + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function(messageUpdate) { + if (messageUpdate) { + this._append(messageUpdate); + } + var hash2 = this._doFinalize(); + return hash2; + }, + blockSize: 512 / 32, + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function(hasher) { + return function(message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function(hasher) { + return function(message, key2) { + return new C_algo.HMAC.init(hasher, key2).finalize(message); + }; + } + }); + var C_algo = C.algo = {}; + return C; + })(Math); + return CryptoJS; + }); + } +}); + +// node_modules/crypto-js/sha256.js +var require_sha256 = __commonJS({ + "node_modules/crypto-js/sha256.js"(exports2, module2) { + (function(root18, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root18.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function(Math2) { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + var H = []; + var K = []; + (function() { + function isPrime(n2) { + var sqrtN = Math2.sqrt(n2); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n2 % factor)) { + return false; + } + } + return true; + } + function getFractionalBits(n2) { + return (n2 - (n2 | 0)) * 4294967296 | 0; + } + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3)); + nPrime++; + } + n++; + } + })(); + var W = []; + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function() { + this._hash = new WordArray.init(H.slice(0)); + }, + _doProcessBlock: function(M, offset3) { + var H2 = this._hash.words; + var a = H2[0]; + var b = H2[1]; + var c = H2[2]; + var d = H2[3]; + var e = H2[4]; + var f = H2[5]; + var g = H2[6]; + var h = H2[7]; + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset3 + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3; + var gamma1x = W[i - 2]; + var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10; + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + var ch = e & f ^ ~e & g; + var maj = a & b ^ a & c ^ b & c; + var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22); + var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25); + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + h = g; + g = f; + f = e; + e = d + t1 | 0; + d = c; + c = b; + b = a; + a = t1 + t2 | 0; + } + H2[0] = H2[0] + a | 0; + H2[1] = H2[1] + b | 0; + H2[2] = H2[2] + c | 0; + H2[3] = H2[3] + d | 0; + H2[4] = H2[4] + e | 0; + H2[5] = H2[5] + f | 0; + H2[6] = H2[6] + g | 0; + H2[7] = H2[7] + h | 0; + }, + _doFinalize: function() { + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296); + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + this._process(); + return this._hash; + }, + clone: function() { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + return clone; + } + }); + C.SHA256 = Hasher._createHelper(SHA256); + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + })(Math); + return CryptoJS.SHA256; + }); + } +}); + +// node_modules/kind-of/index.js +var require_kind_of = __commonJS({ + "node_modules/kind-of/index.js"(exports2, module2) { + var toString = Object.prototype.toString; + module2.exports = function kindOf(val) { + if (val === void 0) return "undefined"; + if (val === null) return "null"; + var type = typeof val; + if (type === "boolean") return "boolean"; + if (type === "string") return "string"; + if (type === "number") return "number"; + if (type === "symbol") return "symbol"; + if (type === "function") { + return isGeneratorFn(val) ? "generatorfunction" : "function"; + } + if (isArray(val)) return "array"; + if (isBuffer(val)) return "buffer"; + if (isArguments(val)) return "arguments"; + if (isDate(val)) return "date"; + if (isError(val)) return "error"; + if (isRegexp(val)) return "regexp"; + switch (ctorName(val)) { + case "Symbol": + return "symbol"; + case "Promise": + return "promise"; + // Set, Map, WeakSet, WeakMap + case "WeakMap": + return "weakmap"; + case "WeakSet": + return "weakset"; + case "Map": + return "map"; + case "Set": + return "set"; + // 8-bit typed arrays + case "Int8Array": + return "int8array"; + case "Uint8Array": + return "uint8array"; + case "Uint8ClampedArray": + return "uint8clampedarray"; + // 16-bit typed arrays + case "Int16Array": + return "int16array"; + case "Uint16Array": + return "uint16array"; + // 32-bit typed arrays + case "Int32Array": + return "int32array"; + case "Uint32Array": + return "uint32array"; + case "Float32Array": + return "float32array"; + case "Float64Array": + return "float64array"; + } + if (isGeneratorObj(val)) { + return "generator"; + } + type = toString.call(val); + switch (type) { + case "[object Object]": + return "object"; + // iterators + case "[object Map Iterator]": + return "mapiterator"; + case "[object Set Iterator]": + return "setiterator"; + case "[object String Iterator]": + return "stringiterator"; + case "[object Array Iterator]": + return "arrayiterator"; + } + return type.slice(8, -1).toLowerCase().replace(/\s/g, ""); + }; + function ctorName(val) { + return typeof val.constructor === "function" ? val.constructor.name : null; + } + function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; + } + function isError(val) { + return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number"; + } + function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function"; + } + function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === "string" && typeof val.ignoreCase === "boolean" && typeof val.multiline === "boolean" && typeof val.global === "boolean"; + } + function isGeneratorFn(name, val) { + return ctorName(name) === "GeneratorFunction"; + } + function isGeneratorObj(val) { + return typeof val.throw === "function" && typeof val.return === "function" && typeof val.next === "function"; + } + function isArguments(val) { + try { + if (typeof val.length === "number" && typeof val.callee === "function") { + return true; + } + } catch (err) { + if (err.message.indexOf("callee") !== -1) { + return true; + } + } + return false; + } + function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === "function") { + return val.constructor.isBuffer(val); + } + return false; + } + } +}); + +// node_modules/is-extendable/index.js +var require_is_extendable = __commonJS({ + "node_modules/is-extendable/index.js"(exports2, module2) { + "use strict"; + module2.exports = function isExtendable(val) { + return typeof val !== "undefined" && val !== null && (typeof val === "object" || typeof val === "function"); + }; + } +}); + +// node_modules/extend-shallow/index.js +var require_extend_shallow = __commonJS({ + "node_modules/extend-shallow/index.js"(exports2, module2) { + "use strict"; + var isObject = require_is_extendable(); + module2.exports = function extend(o) { + if (!isObject(o)) { + o = {}; + } + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + if (isObject(obj)) { + assign2(o, obj); + } + } + return o; + }; + function assign2(a, b) { + for (var key2 in b) { + if (hasOwn(b, key2)) { + a[key2] = b[key2]; + } + } + } + function hasOwn(obj, key2) { + return Object.prototype.hasOwnProperty.call(obj, key2); + } + } +}); + +// node_modules/section-matter/index.js +var require_section_matter = __commonJS({ + "node_modules/section-matter/index.js"(exports2, module2) { + "use strict"; + var typeOf = require_kind_of(); + var extend = require_extend_shallow(); + module2.exports = function(input, options2) { + if (typeof options2 === "function") { + options2 = { parse: options2 }; + } + var file = toObject(input); + var defaults = { section_delimiter: "---", parse: identity }; + var opts = extend({}, defaults, options2); + var delim = opts.section_delimiter; + var lines = file.content.split(/\r?\n/); + var sections = null; + var section = createSection(); + var content = []; + var stack2 = []; + function initSections(val) { + file.content = val; + sections = []; + content = []; + } + function closeSection(val) { + if (stack2.length) { + section.key = getKey(stack2[0], delim); + section.content = val; + opts.parse(section, sections); + sections.push(section); + section = createSection(); + content = []; + stack2 = []; + } + } + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var len = stack2.length; + var ln = line.trim(); + if (isDelimiter(ln, delim)) { + if (ln.length === 3 && i !== 0) { + if (len === 0 || len === 2) { + content.push(line); + continue; + } + stack2.push(ln); + section.data = content.join("\n"); + content = []; + continue; + } + if (sections === null) { + initSections(content.join("\n")); + } + if (len === 2) { + closeSection(content.join("\n")); + } + stack2.push(ln); + continue; + } + content.push(line); + } + if (sections === null) { + initSections(content.join("\n")); + } else { + closeSection(content.join("\n")); + } + file.sections = sections; + return file; + }; + function isDelimiter(line, delim) { + if (line.slice(0, delim.length) !== delim) { + return false; + } + if (line.charAt(delim.length + 1) === delim.slice(-1)) { + return false; + } + return true; + } + function toObject(input) { + if (typeOf(input) !== "object") { + input = { content: input }; + } + if (typeof input.content !== "string" && !isBuffer(input.content)) { + throw new TypeError("expected a buffer or string"); + } + input.content = input.content.toString(); + input.sections = []; + return input; + } + function getKey(val, delim) { + return val ? val.slice(delim.length).trim() : ""; + } + function createSection() { + return { key: "", data: "", content: "" }; + } + function identity(val) { + return val; + } + function isBuffer(val) { + if (val && val.constructor && typeof val.constructor.isBuffer === "function") { + return val.constructor.isBuffer(val); + } + return false; + } + } +}); + +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/common.js var require_common = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/common.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/common.js"(exports2, module2) { "use strict"; function isNothing(subject) { return typeof subject === "undefined" || subject === null; @@ -94,9 +1092,9 @@ var require_common = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/exception.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/exception.js var require_exception = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/exception.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/exception.js"(exports2, module2) { "use strict"; function YAMLException(reason, mark) { Error.call(this); @@ -124,9 +1122,9 @@ var require_exception = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/mark.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/mark.js var require_mark = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/mark.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/mark.js"(exports2, module2) { "use strict"; var common = require_common(); function Mark(name, buffer, position, line, column) { @@ -182,9 +1180,9 @@ var require_mark = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type.js var require_type = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type.js"(exports2, module2) { "use strict"; var YAMLException = require_exception(); var TYPE_CONSTRUCTOR_OPTIONS = [ @@ -213,26 +1211,26 @@ var require_type = __commonJS({ } return result; } - function Type(tag2, options) { - options = options || {}; - Object.keys(options).forEach(function(name) { + function Type(tag2, options2) { + options2 = options2 || {}; + Object.keys(options2).forEach(function(name) { if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag2 + '" YAML type.'); } }); this.tag = tag2; - this.kind = options["kind"] || null; - this.resolve = options["resolve"] || function() { + this.kind = options2["kind"] || null; + this.resolve = options2["resolve"] || function() { return true; }; - this.construct = options["construct"] || function(data) { + this.construct = options2["construct"] || function(data) { return data; }; - this.instanceOf = options["instanceOf"] || null; - this.predicate = options["predicate"] || null; - this.represent = options["represent"] || null; - this.defaultStyle = options["defaultStyle"] || null; - this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + this.instanceOf = options2["instanceOf"] || null; + this.predicate = options2["predicate"] || null; + this.represent = options2["represent"] || null; + this.defaultStyle = options2["defaultStyle"] || null; + this.styleAliases = compileStyleAliases(options2["styleAliases"] || null); if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag2 + '" YAML type.'); } @@ -241,9 +1239,9 @@ var require_type = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema.js var require_schema = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema.js"(exports2, module2) { "use strict"; var common = require_common(); var YAMLException = require_exception(); @@ -329,9 +1327,9 @@ var require_schema = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/str.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/str.js var require_str = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/str.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/str.js"(exports2, module2) { "use strict"; var Type = require_type(); module2.exports = new Type("tag:yaml.org,2002:str", { @@ -343,9 +1341,9 @@ var require_str = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/seq.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/seq.js var require_seq = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/seq.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/seq.js"(exports2, module2) { "use strict"; var Type = require_type(); module2.exports = new Type("tag:yaml.org,2002:seq", { @@ -357,9 +1355,9 @@ var require_seq = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/map.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/map.js var require_map = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/map.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/map.js"(exports2, module2) { "use strict"; var Type = require_type(); module2.exports = new Type("tag:yaml.org,2002:map", { @@ -371,9 +1369,9 @@ var require_map = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js var require_failsafe = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"(exports2, module2) { "use strict"; var Schema = require_schema(); module2.exports = new Schema({ @@ -386,9 +1384,9 @@ var require_failsafe = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/null.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/null.js var require_null = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/null.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/null.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveYamlNull(data) { @@ -426,9 +1424,9 @@ var require_null = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/bool.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/bool.js var require_bool = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/bool.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/bool.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveYamlBoolean(data) { @@ -463,9 +1461,9 @@ var require_bool = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/int.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/int.js var require_int = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/int.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/int.js"(exports2, module2) { "use strict"; var common = require_common(); var Type = require_type(); @@ -596,9 +1594,9 @@ var require_int = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/float.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/float.js var require_float = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/float.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/float.js"(exports2, module2) { "use strict"; var common = require_common(); var Type = require_type(); @@ -691,9 +1689,9 @@ var require_float = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/json.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/json.js var require_json = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/json.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/json.js"(exports2, module2) { "use strict"; var Schema = require_schema(); module2.exports = new Schema({ @@ -710,9 +1708,9 @@ var require_json = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/core.js -var require_core = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/core.js"(exports, module2) { +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/core.js +var require_core2 = __commonJS({ + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/core.js"(exports2, module2) { "use strict"; var Schema = require_schema(); module2.exports = new Schema({ @@ -723,9 +1721,9 @@ var require_core = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/timestamp.js var require_timestamp = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/timestamp.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/timestamp.js"(exports2, module2) { "use strict"; var Type = require_type(); var YAML_DATE_REGEXP = new RegExp( @@ -784,9 +1782,9 @@ var require_timestamp = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/merge.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/merge.js var require_merge = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/merge.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/merge.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveYamlMerge(data) { @@ -799,9 +1797,9 @@ var require_merge = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/binary.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/binary.js var require_binary = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/binary.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/binary.js"(exports2, module2) { "use strict"; var NodeBuffer; try { @@ -892,9 +1890,9 @@ var require_binary = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/omap.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/omap.js var require_omap = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/omap.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/omap.js"(exports2, module2) { "use strict"; var Type = require_type(); var _hasOwnProperty = Object.prototype.hasOwnProperty; @@ -929,9 +1927,9 @@ var require_omap = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/pairs.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/pairs.js var require_pairs = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/pairs.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/pairs.js"(exports2, module2) { "use strict"; var Type = require_type(); var _toString = Object.prototype.toString; @@ -967,9 +1965,9 @@ var require_pairs = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/set.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/set.js var require_set = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/set.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/set.js"(exports2, module2) { "use strict"; var Type = require_type(); var _hasOwnProperty = Object.prototype.hasOwnProperty; @@ -994,14 +1992,14 @@ var require_set = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js var require_default_safe = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"(exports2, module2) { "use strict"; var Schema = require_schema(); module2.exports = new Schema({ include: [ - require_core() + require_core2() ], implicit: [ require_timestamp(), @@ -1017,9 +2015,9 @@ var require_default_safe = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js var require_undefined = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveJavascriptUndefined() { @@ -1044,9 +2042,9 @@ var require_undefined = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js var require_regexp = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveJavascriptRegExp(data) { @@ -1088,9 +2086,9 @@ var require_regexp = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/js/function.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/function.js var require_function = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/type/js/function.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/function.js"(exports2, module2) { "use strict"; var esprima; try { @@ -1143,9 +2141,9 @@ var require_function = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_full.js var require_default_full = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/schema/default_full.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_full.js"(exports2, module2) { "use strict"; var Schema = require_schema(); module2.exports = Schema.DEFAULT = new Schema({ @@ -1161,9 +2159,9 @@ var require_default_full = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/loader.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/loader.js var require_loader = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/loader.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/loader.js"(exports2, module2) { "use strict"; var common = require_common(); var YAMLException = require_exception(); @@ -1258,14 +2256,14 @@ var require_loader = __commonJS({ simpleEscapeMap[i] = simpleEscapeSequence(i); } var i; - function State(input, options) { + function State(input, options2) { this.input = input; - this.filename = options["filename"] || null; - this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; - this.onWarning = options["onWarning"] || null; - this.legacy = options["legacy"] || false; - this.json = options["json"] || false; - this.listener = options["listener"] || null; + this.filename = options2["filename"] || null; + this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options2["onWarning"] || null; + this.legacy = options2["legacy"] || false; + this.json = options2["json"] || false; + this.listener = options2["listener"] || null; this.implicitTypes = this.schema.compiledImplicit; this.typeMap = this.schema.compiledTypeMap; this.length = input.length; @@ -2214,9 +3212,9 @@ var require_loader = __commonJS({ return; } } - function loadDocuments(input, options) { + function loadDocuments(input, options2) { input = String(input); - options = options || {}; + options2 = options2 || {}; if (input.length !== 0) { if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { input += "\n"; @@ -2225,7 +3223,7 @@ var require_loader = __commonJS({ input = input.slice(1); } } - var state2 = new State(input, options); + var state2 = new State(input, options2); var nullpos = input.indexOf("\0"); if (nullpos !== -1) { state2.position = nullpos; @@ -2241,12 +3239,12 @@ var require_loader = __commonJS({ } return state2.documents; } - function loadAll(input, iterator, options) { - if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { - options = iterator; + function loadAll(input, iterator, options2) { + if (iterator !== null && typeof iterator === "object" && typeof options2 === "undefined") { + options2 = iterator; iterator = null; } - var documents = loadDocuments(input, options); + var documents = loadDocuments(input, options2); if (typeof iterator !== "function") { return documents; } @@ -2254,8 +3252,8 @@ var require_loader = __commonJS({ iterator(documents[index2]); } } - function load(input, options) { - var documents = loadDocuments(input, options); + function load(input, options2) { + var documents = loadDocuments(input, options2); if (documents.length === 0) { return void 0; } else if (documents.length === 1) { @@ -2263,15 +3261,15 @@ var require_loader = __commonJS({ } throw new YAMLException("expected a single document in the stream, but found more"); } - function safeLoadAll(input, iterator, options) { - if (typeof iterator === "object" && iterator !== null && typeof options === "undefined") { - options = iterator; + function safeLoadAll(input, iterator, options2) { + if (typeof iterator === "object" && iterator !== null && typeof options2 === "undefined") { + options2 = iterator; iterator = null; } - return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); } - function safeLoad(input, options) { - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + function safeLoad(input, options2) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); } module2.exports.loadAll = loadAll; module2.exports.load = load; @@ -2280,9 +3278,9 @@ var require_loader = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/dumper.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/dumper.js var require_dumper = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml/dumper.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/dumper.js"(exports2, module2) { "use strict"; var common = require_common(); var YAMLException = require_exception(); @@ -2384,18 +3382,18 @@ var require_dumper = __commonJS({ } return "\\" + handle + common.repeat("0", length - string.length) + string; } - function State(options) { - this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, options["indent"] || 2); - this.noArrayIndent = options["noArrayIndent"] || false; - this.skipInvalid = options["skipInvalid"] || false; - this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; - this.styleMap = compileStyleMap(this.schema, options["styles"] || null); - this.sortKeys = options["sortKeys"] || false; - this.lineWidth = options["lineWidth"] || 80; - this.noRefs = options["noRefs"] || false; - this.noCompatMode = options["noCompatMode"] || false; - this.condenseFlow = options["condenseFlow"] || false; + function State(options2) { + this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options2["indent"] || 2); + this.noArrayIndent = options2["noArrayIndent"] || false; + this.skipInvalid = options2["skipInvalid"] || false; + this.flowLevel = common.isNothing(options2["flowLevel"]) ? -1 : options2["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options2["styles"] || null); + this.sortKeys = options2["sortKeys"] || false; + this.lineWidth = options2["lineWidth"] || 80; + this.noRefs = options2["noRefs"] || false; + this.noCompatMode = options2["noCompatMode"] || false; + this.condenseFlow = options2["condenseFlow"] || false; this.implicitTypes = this.schema.compiledImplicit; this.explicitTypes = this.schema.compiledExplicit; this.tag = null; @@ -2422,11 +3420,11 @@ var require_dumper = __commonJS({ function generateNextLine(state2, level) { return "\n" + common.repeat(" ", state2.indent * level); } - function testImplicitResolving(state2, str) { + function testImplicitResolving(state2, str2) { var index2, length, type; for (index2 = 0, length = state2.implicitTypes.length; index2 < length; index2 += 1) { type = state2.implicitTypes[index2]; - if (type.resolve(str)) { + if (type.resolve(str2)) { return true; } } @@ -2813,24 +3811,24 @@ var require_dumper = __commonJS({ } } } - function dump(input, options) { - options = options || {}; - var state2 = new State(options); + function dump(input, options2) { + options2 = options2 || {}; + var state2 = new State(options2); if (!state2.noRefs) getDuplicateReferences(input, state2); if (writeNode(state2, 0, input, true, true)) return state2.dump + "\n"; return ""; } - function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + function safeDump(input, options2) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); } module2.exports.dump = dump; module2.exports.safeDump = safeDump; } }); -// node_modules/front-matter/node_modules/js-yaml/lib/js-yaml.js +// node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml.js var require_js_yaml = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/lib/js-yaml.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml.js"(exports2, module2) { "use strict"; var loader = require_loader(); var dumper = require_dumper(); @@ -2843,7 +3841,7 @@ var require_js_yaml = __commonJS({ module2.exports.Schema = require_schema(); module2.exports.FAILSAFE_SCHEMA = require_failsafe(); module2.exports.JSON_SCHEMA = require_json(); - module2.exports.CORE_SCHEMA = require_core(); + module2.exports.CORE_SCHEMA = require_core2(); module2.exports.DEFAULT_SAFE_SCHEMA = require_default_safe(); module2.exports.DEFAULT_FULL_SCHEMA = require_default_full(); module2.exports.load = loader.load; @@ -2863,808 +3861,403 @@ var require_js_yaml = __commonJS({ } }); -// node_modules/front-matter/node_modules/js-yaml/index.js +// node_modules/gray-matter/node_modules/js-yaml/index.js var require_js_yaml2 = __commonJS({ - "node_modules/front-matter/node_modules/js-yaml/index.js"(exports, module2) { + "node_modules/gray-matter/node_modules/js-yaml/index.js"(exports2, module2) { "use strict"; - var yaml = require_js_yaml(); - module2.exports = yaml; + var yaml2 = require_js_yaml(); + module2.exports = yaml2; } }); -// node_modules/front-matter/index.js -var require_front_matter = __commonJS({ - "node_modules/front-matter/index.js"(exports, module2) { - var parser = require_js_yaml2(); - var optionalByteOrderMark = "\\ufeff?"; - var platform2 = typeof process !== "undefined" ? process.platform : ""; - var pattern = "^(" + optionalByteOrderMark + "(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$" + (platform2 === "win32" ? "\\r?" : "") + "(?:\\n)?)"; - var regex = new RegExp(pattern, "m"); - module2.exports = extractor; - module2.exports.test = test; - function extractor(string, options) { - string = string || ""; - var defaultOptions = { allowUnsafe: false }; - options = options instanceof Object ? { ...defaultOptions, ...options } : defaultOptions; - options.allowUnsafe = Boolean(options.allowUnsafe); - var lines = string.split(/(\r?\n)/); - if (lines[0] && /= yaml =|---/.test(lines[0])) { - return parse(string, options.allowUnsafe); - } else { - return { - attributes: {}, - body: string, - bodyBegin: 1 - }; +// node_modules/gray-matter/lib/engines.js +var require_engines = __commonJS({ + "node_modules/gray-matter/lib/engines.js"(exports, module) { + "use strict"; + var yaml = require_js_yaml2(); + var engines = exports = module.exports; + engines.yaml = { + parse: yaml.safeLoad.bind(yaml), + stringify: yaml.safeDump.bind(yaml) + }; + engines.json = { + parse: JSON.parse.bind(JSON), + stringify: function(obj, options2) { + const opts = Object.assign({ replacer: null, space: 2 }, options2); + return JSON.stringify(obj, opts.replacer, opts.space); } - } - function computeLocation(match, body) { - var line = 1; - var pos = body.indexOf("\n"); - var offset3 = match.index + match[0].length; - while (pos !== -1) { - if (pos >= offset3) { - return line; + }; + engines.javascript = { + parse: function parse(str, options, wrap) { + try { + if (wrap !== false) { + str = "(function() {\nreturn " + str.trim() + ";\n}());"; + } + return eval(str) || {}; + } catch (err) { + if (wrap !== false && /(unexpected|identifier)/i.test(err.message)) { + return parse(str, options, false); + } + throw new SyntaxError(err); + } + }, + stringify: function() { + throw new Error("stringifying JavaScript is not supported"); + } + }; + } +}); + +// node_modules/strip-bom-string/index.js +var require_strip_bom_string = __commonJS({ + "node_modules/strip-bom-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(str2) { + if (typeof str2 === "string" && str2.charAt(0) === "\uFEFF") { + return str2.slice(1); + } + return str2; + }; + } +}); + +// node_modules/gray-matter/lib/utils.js +var require_utils = __commonJS({ + "node_modules/gray-matter/lib/utils.js"(exports2) { + "use strict"; + var stripBom = require_strip_bom_string(); + var typeOf = require_kind_of(); + exports2.define = function(obj, key2, val) { + Reflect.defineProperty(obj, key2, { + enumerable: false, + configurable: true, + writable: true, + value: val + }); + }; + exports2.isBuffer = function(val) { + return typeOf(val) === "buffer"; + }; + exports2.isObject = function(val) { + return typeOf(val) === "object"; + }; + exports2.toBuffer = function(input) { + return typeof input === "string" ? Buffer.from(input) : input; + }; + exports2.toString = function(input) { + if (exports2.isBuffer(input)) return stripBom(String(input)); + if (typeof input !== "string") { + throw new TypeError("expected input to be a string or buffer"); + } + return stripBom(input); + }; + exports2.arrayify = function(val) { + return val ? Array.isArray(val) ? val : [val] : []; + }; + exports2.startsWith = function(str2, substr, len) { + if (typeof len !== "number") len = substr.length; + return str2.slice(0, len) === substr; + }; + } +}); + +// node_modules/gray-matter/lib/defaults.js +var require_defaults = __commonJS({ + "node_modules/gray-matter/lib/defaults.js"(exports2, module2) { + "use strict"; + var engines2 = require_engines(); + var utils = require_utils(); + module2.exports = function(options2) { + const opts = Object.assign({}, options2); + opts.delimiters = utils.arrayify(opts.delims || opts.delimiters || "---"); + if (opts.delimiters.length === 1) { + opts.delimiters.push(opts.delimiters[0]); + } + opts.language = (opts.language || opts.lang || "yaml").toLowerCase(); + opts.engines = Object.assign({}, engines2, opts.parsers, opts.engines); + return opts; + }; + } +}); + +// node_modules/gray-matter/lib/engine.js +var require_engine = __commonJS({ + "node_modules/gray-matter/lib/engine.js"(exports2, module2) { + "use strict"; + module2.exports = function(name, options2) { + let engine = options2.engines[name] || options2.engines[aliase(name)]; + if (typeof engine === "undefined") { + throw new Error('gray-matter engine "' + name + '" is not registered'); + } + if (typeof engine === "function") { + engine = { parse: engine }; + } + return engine; + }; + function aliase(name) { + switch (name.toLowerCase()) { + case "js": + case "javascript": + return "javascript"; + case "coffee": + case "coffeescript": + case "cson": + return "coffee"; + case "yaml": + case "yml": + return "yaml"; + default: { + return name; } - line++; - pos = body.indexOf("\n", pos + 1); } - return line; } - function parse(string, allowUnsafe) { - var match = regex.exec(string); - if (!match) { - return { - attributes: {}, - body: string, - bodyBegin: 1 - }; + } +}); + +// node_modules/gray-matter/lib/stringify.js +var require_stringify = __commonJS({ + "node_modules/gray-matter/lib/stringify.js"(exports2, module2) { + "use strict"; + var typeOf = require_kind_of(); + var getEngine = require_engine(); + var defaults = require_defaults(); + module2.exports = function(file, data, options2) { + if (data == null && options2 == null) { + switch (typeOf(file)) { + case "object": + data = file.data; + options2 = {}; + break; + case "string": + return file; + default: { + throw new TypeError("expected file to be a string or object"); + } + } } - var loader = allowUnsafe ? parser.load : parser.safeLoad; - var yaml = match[match.length - 1].replace(/^\s+|\s+$/g, ""); - var attributes = loader(yaml) || {}; - var body = string.replace(match[0], ""); - var line = computeLocation(match, string); + const str2 = file.content; + const opts = defaults(options2); + if (data == null) { + if (!opts.data) return file; + data = opts.data; + } + const language = file.language || opts.language; + const engine = getEngine(language, opts); + if (typeof engine.stringify !== "function") { + throw new TypeError('expected "' + language + '.stringify" to be a function'); + } + data = Object.assign({}, file.data, data); + const open = opts.delimiters[0]; + const close = opts.delimiters[1]; + const matter2 = engine.stringify(data, options2).trim(); + let buf = ""; + if (matter2 !== "{}") { + buf = newline(open) + newline(matter2) + newline(close); + } + if (typeof file.excerpt === "string" && file.excerpt !== "") { + if (str2.indexOf(file.excerpt.trim()) === -1) { + buf += newline(file.excerpt) + newline(close); + } + } + return buf + newline(str2); + }; + function newline(str2) { + return str2.slice(-1) !== "\n" ? str2 + "\n" : str2; + } + } +}); + +// node_modules/gray-matter/lib/excerpt.js +var require_excerpt = __commonJS({ + "node_modules/gray-matter/lib/excerpt.js"(exports2, module2) { + "use strict"; + var defaults = require_defaults(); + module2.exports = function(file, options2) { + const opts = defaults(options2); + if (file.data == null) { + file.data = {}; + } + if (typeof opts.excerpt === "function") { + return opts.excerpt(file, opts); + } + const sep = file.data.excerpt_separator || opts.excerpt_separator; + if (sep == null && (opts.excerpt === false || opts.excerpt == null)) { + return file; + } + const delimiter = typeof opts.excerpt === "string" ? opts.excerpt : sep || opts.delimiters[0]; + const idx = file.content.indexOf(delimiter); + if (idx !== -1) { + file.excerpt = file.content.slice(0, idx); + } + return file; + }; + } +}); + +// node_modules/gray-matter/lib/to-file.js +var require_to_file = __commonJS({ + "node_modules/gray-matter/lib/to-file.js"(exports2, module2) { + "use strict"; + var typeOf = require_kind_of(); + var stringify = require_stringify(); + var utils = require_utils(); + module2.exports = function(file) { + if (typeOf(file) !== "object") { + file = { content: file }; + } + if (typeOf(file.data) !== "object") { + file.data = {}; + } + if (file.contents && file.content == null) { + file.content = file.contents; + } + utils.define(file, "orig", utils.toBuffer(file.content)); + utils.define(file, "language", file.language || ""); + utils.define(file, "matter", file.matter || ""); + utils.define(file, "stringify", function(data, options2) { + if (options2 && options2.language) { + file.language = options2.language; + } + return stringify(file, data, options2); + }); + file.content = utils.toString(file.content); + file.isEmpty = false; + file.excerpt = ""; + return file; + }; + } +}); + +// node_modules/gray-matter/lib/parse.js +var require_parse = __commonJS({ + "node_modules/gray-matter/lib/parse.js"(exports2, module2) { + "use strict"; + var getEngine = require_engine(); + var defaults = require_defaults(); + module2.exports = function(language, str2, options2) { + const opts = defaults(options2); + const engine = getEngine(language, opts); + if (typeof engine.parse !== "function") { + throw new TypeError('expected "' + language + '.parse" to be a function'); + } + return engine.parse(str2, opts); + }; + } +}); + +// node_modules/gray-matter/index.js +var require_gray_matter = __commonJS({ + "node_modules/gray-matter/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var sections = require_section_matter(); + var defaults = require_defaults(); + var stringify = require_stringify(); + var excerpt = require_excerpt(); + var engines2 = require_engines(); + var toFile = require_to_file(); + var parse2 = require_parse(); + var utils = require_utils(); + function matter2(input, options2) { + if (input === "") { + return { data: {}, content: input, excerpt: "", orig: input }; + } + let file = toFile(input); + const cached = matter2.cache[file.content]; + if (!options2) { + if (cached) { + file = Object.assign({}, cached); + file.orig = cached.orig; + return file; + } + matter2.cache[file.content] = file; + } + return parseMatter(file, options2); + } + function parseMatter(file, options2) { + const opts = defaults(options2); + const open = opts.delimiters[0]; + const close = "\n" + opts.delimiters[1]; + let str2 = file.content; + if (opts.language) { + file.language = opts.language; + } + const openLen = open.length; + if (!utils.startsWith(str2, open, openLen)) { + excerpt(file, opts); + return file; + } + if (str2.charAt(openLen) === open.slice(-1)) { + return file; + } + str2 = str2.slice(openLen); + const len = str2.length; + const language = matter2.language(str2, opts); + if (language.name) { + file.language = language.name; + str2 = str2.slice(language.raw.length); + } + let closeIndex = str2.indexOf(close); + if (closeIndex === -1) { + closeIndex = len; + } + file.matter = str2.slice(0, closeIndex); + const block2 = file.matter.replace(/^\s*#[^\n]+/gm, "").trim(); + if (block2 === "") { + file.isEmpty = true; + file.empty = file.content; + file.data = {}; + } else { + file.data = parse2(file.language, file.matter, opts); + } + if (closeIndex === len) { + file.content = ""; + } else { + file.content = str2.slice(closeIndex + close.length); + if (file.content[0] === "\r") { + file.content = file.content.slice(1); + } + if (file.content[0] === "\n") { + file.content = file.content.slice(1); + } + } + excerpt(file, opts); + if (opts.sections === true || typeof opts.section === "function") { + sections(file, opts.section); + } + return file; + } + matter2.engines = engines2; + matter2.stringify = function(file, data, options2) { + if (typeof file === "string") file = matter2(file, options2); + return stringify(file, data, options2); + }; + matter2.read = function(filepath, options2) { + const str2 = fs.readFileSync(filepath, "utf8"); + const file = matter2(str2, options2); + file.path = filepath; + return file; + }; + matter2.test = function(str2, options2) { + return utils.startsWith(str2, defaults(options2).delimiters[0]); + }; + matter2.language = function(str2, options2) { + const opts = defaults(options2); + const open = opts.delimiters[0]; + if (matter2.test(str2)) { + str2 = str2.slice(open.length); + } + const language = str2.slice(0, str2.search(/\r?\n/)); return { - attributes, - body, - bodyBegin: line, - frontmatter: yaml + raw: language, + name: language ? language.trim() : "" }; - } - function test(string) { - string = string || ""; - return regex.test(string); - } - } -}); - -// node_modules/crypto-js/core.js -var require_core2 = __commonJS({ - "node_modules/crypto-js/core.js"(exports, module2) { - (function(root16, factory) { - if (typeof exports === "object") { - module2.exports = exports = factory(); - } else if (typeof define === "function" && define.amd) { - define([], factory); - } else { - root16.CryptoJS = factory(); - } - })(exports, function() { - var CryptoJS = CryptoJS || (function(Math2, undefined2) { - var crypto2; - if (typeof window !== "undefined" && window.crypto) { - crypto2 = window.crypto; - } - if (typeof self !== "undefined" && self.crypto) { - crypto2 = self.crypto; - } - if (typeof globalThis !== "undefined" && globalThis.crypto) { - crypto2 = globalThis.crypto; - } - if (!crypto2 && typeof window !== "undefined" && window.msCrypto) { - crypto2 = window.msCrypto; - } - if (!crypto2 && typeof global !== "undefined" && global.crypto) { - crypto2 = global.crypto; - } - if (!crypto2 && typeof require === "function") { - try { - crypto2 = require("crypto"); - } catch (err) { - } - } - var cryptoSecureRandomInt = function() { - if (crypto2) { - if (typeof crypto2.getRandomValues === "function") { - try { - return crypto2.getRandomValues(new Uint32Array(1))[0]; - } catch (err) { - } - } - if (typeof crypto2.randomBytes === "function") { - try { - return crypto2.randomBytes(4).readInt32LE(); - } catch (err) { - } - } - } - throw new Error("Native crypto module could not be used to get secure random number."); - }; - var create = Object.create || /* @__PURE__ */ (function() { - function F() { - } - return function(obj) { - var subtype; - F.prototype = obj; - subtype = new F(); - F.prototype = null; - return subtype; - }; - })(); - var C = {}; - var C_lib = C.lib = {}; - var Base2 = C_lib.Base = /* @__PURE__ */ (function() { - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function(overrides) { - var subtype = create(this); - if (overrides) { - subtype.mixIn(overrides); - } - if (!subtype.hasOwnProperty("init") || this.init === subtype.init) { - subtype.init = function() { - subtype.$super.init.apply(this, arguments); - }; - } - subtype.init.prototype = subtype; - subtype.$super = this; - return subtype; - }, - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function() { - var instance = this.extend(); - instance.init.apply(instance, arguments); - return instance; - }, - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function() { - }, - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function(properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } - if (properties.hasOwnProperty("toString")) { - this.toString = properties.toString; - } - }, - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function() { - return this.init.prototype.extend(this); - } - }; - })(); - var WordArray = C_lib.WordArray = Base2.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function(words, sigBytes) { - words = this.words = words || []; - if (sigBytes != undefined2) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function(encoder) { - return (encoder || Hex).stringify(this); - }, - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function(wordArray) { - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; - this.clamp(); - if (thisSigBytes % 4) { - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255; - thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8; - } - } else { - for (var j = 0; j < thatSigBytes; j += 4) { - thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2]; - } - } - this.sigBytes += thatSigBytes; - return this; - }, - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function() { - var words = this.words; - var sigBytes = this.sigBytes; - words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8; - words.length = Math2.ceil(sigBytes / 4); - }, - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function() { - var clone = Base2.clone.call(this); - clone.words = this.words.slice(0); - return clone; - }, - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function(nBytes) { - var words = []; - for (var i = 0; i < nBytes; i += 4) { - words.push(cryptoSecureRandomInt()); - } - return new WordArray.init(words, nBytes); - } - }); - var C_enc = C.enc = {}; - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function(wordArray) { - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 15).toString(16)); - } - return hexChars.join(""); - }, - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function(hexStr) { - var hexStrLength = hexStr.length; - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4; - } - return new WordArray.init(words, hexStrLength / 2); - } - }; - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function(wordArray) { - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - latin1Chars.push(String.fromCharCode(bite)); - } - return latin1Chars.join(""); - }, - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function(latin1Str) { - var latin1StrLength = latin1Str.length; - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8; - } - return new WordArray.init(words, latin1StrLength); - } - }; - var Utf8 = C_enc.Utf8 = { - /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example - * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); - */ - stringify: function(wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error("Malformed UTF-8 data"); - } - }, - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function(utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } - }; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base2.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function() { - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function(data) { - if (typeof data == "string") { - data = Utf8.parse(data); - } - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function(doFlush) { - var processedWords; - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math2.ceil(nBlocksReady); - } else { - nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0); - } - var nWordsReady = nBlocksReady * blockSize; - var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes); - if (nWordsReady) { - for (var offset3 = 0; offset3 < nWordsReady; offset3 += blockSize) { - this._doProcessBlock(dataWords, offset3); - } - processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - return new WordArray.init(processedWords, nBytesReady); - }, - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function() { - var clone = Base2.clone.call(this); - clone._data = this._data.clone(); - return clone; - }, - _minBufferSize: 0 - }); - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base2.extend(), - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function(cfg) { - this.cfg = this.cfg.extend(cfg); - this.reset(); - }, - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function() { - BufferedBlockAlgorithm.reset.call(this); - this._doReset(); - }, - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function(messageUpdate) { - this._append(messageUpdate); - this._process(); - return this; - }, - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function(messageUpdate) { - if (messageUpdate) { - this._append(messageUpdate); - } - var hash2 = this._doFinalize(); - return hash2; - }, - blockSize: 512 / 32, - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function(hasher) { - return function(message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function(hasher) { - return function(message, key2) { - return new C_algo.HMAC.init(hasher, key2).finalize(message); - }; - } - }); - var C_algo = C.algo = {}; - return C; - })(Math); - return CryptoJS; - }); - } -}); - -// node_modules/crypto-js/sha256.js -var require_sha256 = __commonJS({ - "node_modules/crypto-js/sha256.js"(exports, module2) { - (function(root16, factory) { - if (typeof exports === "object") { - module2.exports = exports = factory(require_core2()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root16.CryptoJS); - } - })(exports, function(CryptoJS) { - (function(Math2) { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - var H = []; - var K = []; - (function() { - function isPrime(n2) { - var sqrtN = Math2.sqrt(n2); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n2 % factor)) { - return false; - } - } - return true; - } - function getFractionalBits(n2) { - return (n2 - (n2 | 0)) * 4294967296 | 0; - } - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3)); - nPrime++; - } - n++; - } - })(); - var W = []; - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function() { - this._hash = new WordArray.init(H.slice(0)); - }, - _doProcessBlock: function(M, offset3) { - var H2 = this._hash.words; - var a = H2[0]; - var b = H2[1]; - var c = H2[2]; - var d = H2[3]; - var e = H2[4]; - var f = H2[5]; - var g = H2[6]; - var h = H2[7]; - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset3 + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3; - var gamma1x = W[i - 2]; - var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10; - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - var ch = e & f ^ ~e & g; - var maj = a & b ^ a & c ^ b & c; - var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22); - var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25); - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - h = g; - g = f; - f = e; - e = d + t1 | 0; - d = c; - c = b; - b = a; - a = t1 + t2 | 0; - } - H2[0] = H2[0] + a | 0; - H2[1] = H2[1] + b | 0; - H2[2] = H2[2] + c | 0; - H2[3] = H2[3] + d | 0; - H2[4] = H2[4] + e | 0; - H2[5] = H2[5] + f | 0; - H2[6] = H2[6] + g | 0; - H2[7] = H2[7] + h | 0; - }, - _doFinalize: function() { - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296); - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - this._process(); - return this._hash; - }, - clone: function() { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } - }); - C.SHA256 = Hasher._createHelper(SHA256); - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - })(Math); - return CryptoJS.SHA256; - }); + }; + matter2.cache = {}; + matter2.clearCache = function() { + matter2.cache = {}; + }; + module2.exports = matter2; } }); @@ -3678,7 +4271,6 @@ var import_obsidian12 = require("obsidian"); // src/ui/text_view.ts var import_obsidian11 = require("obsidian"); -var import_front_matter = __toESM(require_front_matter()); // node_modules/svelte/src/internal/client/constants.js var DERIVED = 1 << 1; @@ -5564,11 +6156,11 @@ process_fn = function() { var effects = collected_effects = []; var render_effects = []; var updates = legacy_updates = []; - for (const root16 of roots) { + for (const root18 of roots) { try { - __privateMethod(this, _Batch_instances, traverse_fn).call(this, root16, effects, render_effects); + __privateMethod(this, _Batch_instances, traverse_fn).call(this, root18, effects, render_effects); } catch (e) { - reset_all(root16); + reset_all(root18); if (!__privateMethod(this, _Batch_instances, is_deferred_fn).call(this)) this.discard(); throw e; } @@ -5641,9 +6233,9 @@ process_fn = function() { * @param {Effect[]} effects * @param {Effect[]} render_effects */ -traverse_fn = function(root16, effects, render_effects) { - root16.f ^= CLEAN; - var effect2 = root16.first; +traverse_fn = function(root18, effects, render_effects) { + root18.f ^= CLEAN; + var effect2 = root18.first; while (effect2 !== null) { var flags2 = effect2.f; var is_branch = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0; @@ -5821,8 +6413,8 @@ commit_fn = function() { } if (__privateGet(batch, _roots).length > 0 && !__privateGet(batch, _decrement_queued)) { batch.apply(); - for (var root16 of __privateGet(batch, _roots)) { - __privateMethod(_a5 = batch, _Batch_instances, traverse_fn).call(_a5, root16, [], []); + for (var root18 of __privateGet(batch, _roots)) { + __privateMethod(_a5 = batch, _Batch_instances, traverse_fn).call(_a5, root18, [], []); } __privateSet(batch, _roots, []); } @@ -7208,7 +7800,7 @@ function is_dirty(reaction) { } return false; } -function schedule_possible_effect_self_invalidation(signal, effect2, root16 = true) { +function schedule_possible_effect_self_invalidation(signal, effect2, root18 = true) { var reactions = signal.reactions; if (reactions === null) return; if (!async_mode_flag && current_sources !== null && current_sources.has(signal)) { @@ -7224,7 +7816,7 @@ function schedule_possible_effect_self_invalidation(signal, effect2, root16 = tr false ); } else if (effect2 === reaction) { - if (root16) { + if (root18) { set_signal_status(reaction, DIRTY); } else if ((reaction.f & CLEAN) !== 0) { set_signal_status(reaction, MAYBE_DIRTY); @@ -7772,9 +8364,9 @@ function effect_root(fn) { function component_root(fn) { Batch.ensure(); const effect2 = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn); - return (options = {}) => { + return (options2 = {}) => { return new Promise((fulfil) => { - if (options.outro) { + if (options2.outro) { pause_effect(effect2, () => { destroy_effect(effect2); fulfil(void 0); @@ -8034,9 +8626,9 @@ function move_effect(effect2, fragment) { var event_symbol = /* @__PURE__ */ Symbol("events"); var all_registered_events = /* @__PURE__ */ new Set(); var root_event_handles = /* @__PURE__ */ new Set(); -function create_event(event_name, dom, handler, options = {}) { +function create_event(event_name, dom, handler, options2 = {}) { function target_handler(event2) { - if (!options.capture) { + if (!options2.capture) { handle_event_propagation.call(dom, event2); } if (!event2.cancelBubble) { @@ -8047,22 +8639,22 @@ function create_event(event_name, dom, handler, options = {}) { } if (event_name.startsWith("pointer") || event_name.startsWith("touch") || event_name === "wheel") { queue_micro_task(() => { - dom.addEventListener(event_name, target_handler, options); + dom.addEventListener(event_name, target_handler, options2); }); } else { - dom.addEventListener(event_name, target_handler, options); + dom.addEventListener(event_name, target_handler, options2); } return target_handler; } function event(event_name, dom, handler, capture2, passive2) { - var options = { capture: capture2, passive: passive2 }; - var target_handler = create_event(event_name, dom, handler, options); + var options2 = { capture: capture2, passive: passive2 }; + var target_handler = create_event(event_name, dom, handler, options2); if (dom === document.body || // @ts-ignore dom === window || // @ts-ignore dom === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed dom instanceof HTMLMediaElement) { teardown(() => { - dom.removeEventListener(event_name, target_handler, options); + dom.removeEventListener(event_name, target_handler, options2); }); } } @@ -8252,21 +8844,21 @@ function from_namespace(content, flags2, ns = "svg") { /** @type {DocumentFragment} */ create_fragment_from_html(wrapped) ); - var root16 = ( + var root18 = ( /** @type {Element} */ get_first_child(fragment) ); if (is_fragment) { node = document.createDocumentFragment(); - while (get_first_child(root16)) { + while (get_first_child(root18)) { node.appendChild( /** @type {TemplateNode} */ - get_first_child(root16) + get_first_child(root18) ); } } else { node = /** @type {Element} */ - get_first_child(root16); + get_first_child(root18); } } var clone = ( @@ -8482,21 +9074,21 @@ var RUNES = ( var should_intro = true; function set_text(text2, value) { var _a5, _b3; - var str = value == null ? "" : typeof value === "object" ? `${value}` : value; - if (str !== /** @type {any} */ + var str2 = value == null ? "" : typeof value === "object" ? `${value}` : value; + if (str2 !== /** @type {any} */ ((_b3 = text2[_a5 = TEXT_CACHE]) != null ? _b3 : text2[_a5] = text2.nodeValue)) { - text2[TEXT_CACHE] = str; - text2.nodeValue = `${str}`; + text2[TEXT_CACHE] = str2; + text2.nodeValue = `${str2}`; } } -function mount(component2, options) { - return _mount(component2, options); +function mount(component2, options2) { + return _mount(component2, options2); } -function hydrate(component2, options) { +function hydrate(component2, options2) { var _a5; init_operations(); - options.intro = (_a5 = options.intro) != null ? _a5 : false; - const target = options.target; + options2.intro = (_a5 = options2.intro) != null ? _a5 : false; + const target = options2.target; const was_hydrating = hydrating; const previous_hydrate_node = hydrate_node; try { @@ -8513,7 +9105,7 @@ function hydrate(component2, options) { /** @type {Comment} */ anchor ); - const instance = _mount(component2, { ...options, anchor }); + const instance = _mount(component2, { ...options2, anchor }); set_hydrating(false); return ( /** @type {Exports} */ @@ -8526,13 +9118,13 @@ function hydrate(component2, options) { if (error !== HYDRATION_ERROR) { console.warn("Failed to hydrate: ", error); } - if (options.recover === false) { + if (options2.recover === false) { hydration_failed(); } init_operations(); clear_text_content(target); set_hydrating(false); - return mount(component2, options); + return mount(component2, options2); } finally { set_hydrating(was_hydrating); set_hydrate_node(previous_hydrate_node); @@ -8641,11 +9233,11 @@ function _mount(Component2, { target, anchor, props = {}, events, context, intro return component2; } var mounted_components = /* @__PURE__ */ new WeakMap(); -function unmount(component2, options) { +function unmount(component2, options2) { const fn = mounted_components.get(component2); if (fn) { mounted_components.delete(component2); - return fn(options); + return fn(options2); } if (dev_fallback_default) { if (STATE_SYMBOL in component2) { @@ -8680,8 +9272,8 @@ function preventDefault(fn) { } // node_modules/svelte/src/legacy/legacy-client.js -function createClassComponent(options) { - return new Svelte4Component(options); +function createClassComponent(options2) { + return new Svelte4Component(options2); } var _events, _instance; var Svelte4Component = class { @@ -8690,7 +9282,7 @@ var Svelte4Component = class { * component: any; * }} options */ - constructor(options) { + constructor(options2) { /** @type {any} */ __privateAdd(this, _events); /** @type {Record} */ @@ -8703,7 +9295,7 @@ var Svelte4Component = class { return s; }; const props = new Proxy( - { ...options.props || {}, $$events: {} }, + { ...options2.props || {}, $$events: {} }, { get(target, prop2) { var _a6; @@ -8722,16 +9314,16 @@ var Svelte4Component = class { } } ); - __privateSet(this, _instance, (options.hydrate ? hydrate : mount)(options.component, { - target: options.target, - anchor: options.anchor, + __privateSet(this, _instance, (options2.hydrate ? hydrate : mount)(options2.component, { + target: options2.target, + anchor: options2.anchor, props, - context: options.context, - intro: (_a5 = options.intro) != null ? _a5 : false, - recover: options.recover, - transformError: options.transformError + context: options2.context, + intro: (_a5 = options2.intro) != null ? _a5 : false, + recover: options2.recover, + transformError: options2.transformError })); - if (!async_mode_flag && (!((_b3 = options == null ? void 0 : options.props) == null ? void 0 : _b3.$$host) || options.sync === false)) { + if (!async_mode_flag && (!((_b3 = options2 == null ? void 0 : options2.props) == null ? void 0 : _b3.$$host) || options2.sync === false)) { flushSync(); } __privateSet(this, _events, props.$$events); @@ -9033,7 +9625,7 @@ function createEventDispatcher() { if (active_component_context === null) { lifecycle_outside_component("createEventDispatcher"); } - return (type, detail, options) => { + return (type, detail, options2) => { var _a5; const events = ( /** @type {Record} */ @@ -9048,7 +9640,7 @@ function createEventDispatcher() { /** @type {string} */ type, detail, - options + options2 ); for (const fn of callbacks) { fn.call(active_component_context.x, event2); @@ -9655,17 +10247,17 @@ function sanitize_slots(props) { function append_styles(anchor, css) { effect(() => { var _a5; - var root16 = anchor.getRootNode(); + var root18 = anchor.getRootNode(); var target = ( /** @type {ShadowRoot} */ - root16.host ? ( + root18.host ? ( /** @type {ShadowRoot} */ - root16 + root18 ) : ( /** @type {Document} */ - (_a5 = root16.head) != null ? _a5 : ( + (_a5 = root18.head) != null ? _a5 : ( /** @type {Document} */ - root16.ownerDocument.head + root18.ownerDocument.head ) ) ); @@ -10795,22 +11387,22 @@ if (typeof HTMLElement === "function") { * @param {EventListenerOrEventListenerObject} listener * @param {boolean | AddEventListenerOptions} [options] */ - addEventListener(type, listener, options) { + addEventListener(type, listener, options2) { this.$$l[type] = this.$$l[type] || []; this.$$l[type].push(listener); if (this.$$c) { const unsub = this.$$c.$on(type, listener); this.$$l_u.set(listener, unsub); } - super.addEventListener(type, listener, options); + super.addEventListener(type, listener, options2); } /** * @param {string} type * @param {EventListenerOrEventListenerObject} listener * @param {boolean | AddEventListenerOptions} [options] */ - removeEventListener(type, listener, options) { - super.removeEventListener(type, listener, options); + removeEventListener(type, listener, options2) { + super.removeEventListener(type, listener, options2); if (this.$$c) { const unsub = this.$$l_u.get(listener); if (unsub) { @@ -11291,7 +11883,7 @@ var root_3 = from_html(`

`); var $$css2 = { hash: "svelte-1q9xxoc", - code: '.column-header.svelte-1q9xxoc {width:100%;--header-accent: var(--column-color, var(--background-modifier-border-hover));--column-header-x-padding: var(--column-header-x-padding-override, var(--size-4-4));--column-header-y-padding: var(--column-header-y-padding-override, var(--size-4-4));display:flex;flex-direction:column;gap:var(--size-2-3);}.column-header.svelte-1q9xxoc::before {content:"";display:block;width:calc(100% + 2 * var(--column-header-x-padding));height:12px;margin:calc(-1 * var(--column-header-y-padding)) calc(-1 * var(--column-header-x-padding)) 0;border-radius:2px;background:var(--header-accent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--text-normal) 10%, transparent);flex:0 0 auto;}.column-header.row-header.svelte-1q9xxoc {display:flex;align-items:stretch;margin-bottom:var(--size-4-2);}.column-header.row-header.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) {margin-right:0;}.column-header.collapsed.svelte-1q9xxoc {position:sticky;top:0;align-self:flex-start;z-index:1;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) {flex-direction:column;align-items:center;min-height:unset;gap:var(--size-4-2);}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .column-title-group:where(.svelte-1q9xxoc) {order:2;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .column-title-group:where(.svelte-1q9xxoc) h2:where(.svelte-1q9xxoc) {writing-mode:vertical-rl;text-orientation:mixed;white-space:nowrap;overflow:visible;text-overflow:unset;flex:0 0 auto;line-height:normal;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .task-count:where(.svelte-1q9xxoc) {order:3;writing-mode:horizontal-tb;align-self:center;line-height:normal;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .header-menu:where(.svelte-1q9xxoc) {display:flex;margin-left:0;order:4;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .header-menu button {width:20px;height:20px;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .collapse-btn:where(.svelte-1q9xxoc) {order:1;}.column-header.vertical-collapsed.row-header.svelte-1q9xxoc {margin-bottom:0;}.column-header.vertical-collapsed.row-header.svelte-1q9xxoc .header-menu:where(.svelte-1q9xxoc) {display:flex;}.header.svelte-1q9xxoc {display:flex;align-items:center;min-height:22px;width:100%;flex-shrink:0;gap:var(--size-4-2);}.header.svelte-1q9xxoc .column-title-group:where(.svelte-1q9xxoc) {min-width:0;display:flex;flex-direction:column;gap:2px;flex:1 1 auto;}.header.svelte-1q9xxoc h2:where(.svelte-1q9xxoc) {font-size:var(--font-ui-medium);font-weight:var(--font-bold);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2;}.header.svelte-1q9xxoc .task-count:where(.svelte-1q9xxoc) {font-size:var(--font-ui-small);color:var(--text-muted);white-space:nowrap;align-self:flex-start;line-height:28px;}.header.svelte-1q9xxoc .header-menu:where(.svelte-1q9xxoc) {margin-left:auto;flex-shrink:0;display:flex;align-items:center;gap:var(--size-2-1);height:24px;}.header.svelte-1q9xxoc .collapse-btn:where(.svelte-1q9xxoc) {background:transparent;border:none;cursor:pointer;color:var(--text-muted);padding:0;width:20px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-s);font-size:var(--font-ui-smaller);line-height:1;flex-shrink:0;transition:color 0.15s ease, background 0.15s ease;}.header.svelte-1q9xxoc .collapse-btn:where(.svelte-1q9xxoc):hover {color:var(--text-normal);background:var(--background-modifier-hover);}.header.svelte-1q9xxoc .collapse-btn:where(.svelte-1q9xxoc):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:2px;}.mode-toggle.svelte-1q9xxoc {display:flex;align-items:center;background:var(--background-modifier-form-field, var(--background-secondary));border-radius:var(--radius-s);padding:2px;gap:0;width:fit-content;max-width:100%;flex:0 0 auto;}.mode-toggle.svelte-1q9xxoc .mode-btn:where(.svelte-1q9xxoc) {font-size:var(--font-ui-smaller);padding:1px 5px;min-width:0;width:auto;border:none;background:transparent;color:var(--text-muted);border-radius:calc(var(--radius-s) - 2px);cursor:pointer;transition:background 0.15s ease, color 0.15s ease;white-space:nowrap;box-shadow:none;line-height:1.2;}.mode-toggle.svelte-1q9xxoc .mode-btn:where(.svelte-1q9xxoc):hover {background:transparent;color:var(--text-normal);box-shadow:none;}.mode-toggle.svelte-1q9xxoc .mode-btn.active:where(.svelte-1q9xxoc) {background:var(--background-primary);color:var(--text-normal);box-shadow:var(--input-shadow);font-weight:var(--font-medium);}.mode-toggle.svelte-1q9xxoc .mode-btn:where(.svelte-1q9xxoc):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:1px;}.column-meta.svelte-1q9xxoc {display:flex;flex-direction:column;gap:var(--size-2-1);width:100%;align-items:flex-start;}.column-meta.svelte-1q9xxoc .column-meta-line:where(.svelte-1q9xxoc) {display:flex;align-items:center;justify-content:space-between;width:100%;gap:var(--size-2-3);min-width:0;}.column-meta.svelte-1q9xxoc .column-meta-line:where(.svelte-1q9xxoc) .task-count:where(.svelte-1q9xxoc) {font-size:var(--font-ui-small);color:var(--text-muted);white-space:nowrap;line-height:1.3;margin-left:auto;flex:0 0 auto;}.column-match-tags.svelte-1q9xxoc {font-size:var(--font-ui-small);color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;min-width:0;flex:1 1 auto;}.selection-info.svelte-1q9xxoc {font-size:var(--font-ui-smaller);color:var(--text-muted);margin-top:var(--size-2-1);}' + code: '.column-header.svelte-1q9xxoc {width:100%;--header-accent: var(--column-color, var(--background-modifier-border-hover));--column-header-x-padding: var(--column-header-x-padding-override, var(--size-4-4));--column-header-y-padding: var(--column-header-y-padding-override, var(--size-4-4));display:flex;flex-direction:column;gap:var(--size-2-3);}.column-header.svelte-1q9xxoc::before {content:"";display:block;width:calc(100% + 2 * var(--column-header-x-padding));height:12px;margin:calc(-1 * var(--column-header-y-padding)) calc(-1 * var(--column-header-x-padding)) 0;border-radius:2px;background:var(--header-accent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--text-normal) 10%, transparent);flex:0 0 auto;}.column-header.row-header.svelte-1q9xxoc {position:relative;display:flex;align-items:stretch;margin-bottom:0;}.column-header.row-header.svelte-1q9xxoc::before {position:absolute;top:calc(-1 * var(--column-header-y-padding));bottom:calc(-1 * var(--column-header-y-padding));left:calc(-1 * var(--column-header-x-padding));width:12px;height:auto;margin:0;}.column-header.row-header.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) {margin-right:0;padding-left:var(--size-4-3);box-sizing:border-box;}.column-header.row-header.svelte-1q9xxoc .column-meta:where(.svelte-1q9xxoc),\n.column-header.row-header.svelte-1q9xxoc .selection-info:where(.svelte-1q9xxoc) {padding-left:var(--size-4-3);box-sizing:border-box;}.column-header.row-header.svelte-1q9xxoc .column-meta:where(.svelte-1q9xxoc) {margin-top:var(--size-2-2);}.column-header.row-header.svelte-1q9xxoc .column-meta:where(.svelte-1q9xxoc) .column-meta-line:where(.svelte-1q9xxoc) {justify-content:flex-start;flex-wrap:wrap;gap:var(--size-2-2) var(--size-4-2);}.column-header.row-header.svelte-1q9xxoc .column-meta:where(.svelte-1q9xxoc) .column-meta-line:where(.svelte-1q9xxoc) .column-match-tags:where(.svelte-1q9xxoc) {order:1;flex:0 0 100%;}.column-header.row-header.svelte-1q9xxoc .column-meta:where(.svelte-1q9xxoc) .column-meta-line:where(.svelte-1q9xxoc) .task-count:where(.svelte-1q9xxoc) {order:2;flex:0 0 100%;margin-left:0;}.column-header.row-header.svelte-1q9xxoc .column-meta:where(.svelte-1q9xxoc) .column-meta-line:where(.svelte-1q9xxoc) .mode-toggle:where(.svelte-1q9xxoc) {order:3;flex:0 0 auto;}.column-header.collapsed.svelte-1q9xxoc {position:sticky;top:0;align-self:flex-start;z-index:1;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) {flex-direction:column;align-items:center;min-height:unset;gap:var(--size-4-2);}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .column-title-group:where(.svelte-1q9xxoc) {order:2;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .column-title-group:where(.svelte-1q9xxoc) h2:where(.svelte-1q9xxoc) {writing-mode:vertical-rl;text-orientation:mixed;white-space:nowrap;overflow:visible;text-overflow:unset;flex:0 0 auto;line-height:normal;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .task-count:where(.svelte-1q9xxoc) {order:3;writing-mode:horizontal-tb;align-self:center;line-height:normal;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .header-menu:where(.svelte-1q9xxoc) {display:flex;margin-left:0;order:4;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .header-menu button {width:20px;height:20px;}.column-header.collapsed.svelte-1q9xxoc .header:where(.svelte-1q9xxoc) .collapse-btn:where(.svelte-1q9xxoc) {order:1;}.column-header.vertical-collapsed.row-header.svelte-1q9xxoc {margin-bottom:0;}.column-header.vertical-collapsed.row-header.svelte-1q9xxoc .header-menu:where(.svelte-1q9xxoc) {display:flex;}.header.svelte-1q9xxoc {display:flex;align-items:center;min-height:22px;width:100%;flex-shrink:0;gap:var(--size-4-2);}.header.svelte-1q9xxoc .column-title-group:where(.svelte-1q9xxoc) {min-width:0;display:flex;flex-direction:column;gap:2px;flex:1 1 auto;}.header.svelte-1q9xxoc h2:where(.svelte-1q9xxoc) {font-size:var(--font-ui-medium);font-weight:var(--font-bold);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2;}.header.svelte-1q9xxoc .task-count:where(.svelte-1q9xxoc) {font-size:var(--font-ui-small);color:var(--text-muted);white-space:nowrap;align-self:flex-start;line-height:28px;}.header.svelte-1q9xxoc .header-menu:where(.svelte-1q9xxoc) {margin-left:auto;flex-shrink:0;display:flex;align-items:center;gap:var(--size-2-1);height:24px;}.header.svelte-1q9xxoc .collapse-btn:where(.svelte-1q9xxoc) {background:transparent;border:none;cursor:pointer;color:var(--text-muted);padding:0;width:20px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-s);font-size:var(--font-ui-smaller);line-height:1;flex-shrink:0;transition:color 0.15s ease, background 0.15s ease;}.header.svelte-1q9xxoc .collapse-btn:where(.svelte-1q9xxoc):hover {color:var(--text-normal);background:var(--background-modifier-hover);}.header.svelte-1q9xxoc .collapse-btn:where(.svelte-1q9xxoc):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:2px;}.mode-toggle.svelte-1q9xxoc {display:flex;align-items:center;background:var(--background-modifier-form-field, var(--background-secondary));border-radius:var(--radius-s);padding:2px;gap:0;width:fit-content;max-width:100%;flex:0 0 auto;}.mode-toggle.svelte-1q9xxoc .mode-btn:where(.svelte-1q9xxoc) {font-size:var(--font-ui-smaller);padding:1px 5px;min-width:0;width:auto;border:none;background:transparent;color:var(--text-muted);border-radius:calc(var(--radius-s) - 2px);cursor:pointer;transition:background 0.15s ease, color 0.15s ease;white-space:nowrap;box-shadow:none;line-height:1.2;}.mode-toggle.svelte-1q9xxoc .mode-btn:where(.svelte-1q9xxoc):hover {background:transparent;color:var(--text-normal);box-shadow:none;}.mode-toggle.svelte-1q9xxoc .mode-btn.active:where(.svelte-1q9xxoc) {background:var(--background-primary);color:var(--text-normal);box-shadow:var(--input-shadow);font-weight:var(--font-medium);}.mode-toggle.svelte-1q9xxoc .mode-btn:where(.svelte-1q9xxoc):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:1px;}.column-meta.svelte-1q9xxoc {display:flex;flex-direction:column;gap:var(--size-2-1);width:100%;align-items:flex-start;}.column-meta.svelte-1q9xxoc .column-meta-line:where(.svelte-1q9xxoc) {display:flex;align-items:center;justify-content:space-between;width:100%;gap:var(--size-2-3);min-width:0;}.column-meta.svelte-1q9xxoc .column-meta-line:where(.svelte-1q9xxoc) .task-count:where(.svelte-1q9xxoc) {font-size:var(--font-ui-small);color:var(--text-muted);white-space:nowrap;line-height:1.3;margin-left:auto;flex:0 0 auto;}.column-match-tags.svelte-1q9xxoc {font-size:var(--font-ui-small);color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;min-width:0;flex:1 1 auto;}.selection-info.svelte-1q9xxoc {font-size:var(--font-ui-smaller);color:var(--text-muted);margin-top:var(--size-2-1);}' }; function ColumnHeader($$anchor, $$props) { if (new.target) return createClassComponent({ component: ColumnHeader, ...$$anchor }); @@ -11825,17 +12417,911 @@ function Task_menu($$anchor, $$props) { return $$pop; } +// src/parsing/properties/property_schema.ts +var PropertySchemaOption = /* @__PURE__ */ ((PropertySchemaOption3) => { + PropertySchemaOption3["None"] = "none"; + PropertySchemaOption3["TasksPlugin"] = "tasks"; + PropertySchemaOption3["Dataview"] = "dataview"; + return PropertySchemaOption3; +})(PropertySchemaOption || {}); +var UNIVERSAL_STATUS_PROPERTY_KEY = "status"; +function findStatusRange(statusMatch) { + var _a5, _b3; + if (!(statusMatch == null ? void 0 : statusMatch[0])) { + return { startIndex: -1, endIndex: -1 }; + } + const bracketIndex = statusMatch[0].indexOf("["); + const startIndex = bracketIndex >= 0 ? bracketIndex + 1 : -1; + const endIndex = startIndex >= 0 ? startIndex + ((_b3 = (_a5 = statusMatch[1]) == null ? void 0 : _a5.length) != null ? _b3 : 0) : -1; + return { startIndex, endIndex }; +} +function parseUniversalStatus(rawLine) { + var _a5, _b3; + const match = rawLine.match(/^\s*[-*+]\s\[([^\[\]]*)\]/); + const statusChar = match ? (_a5 = match[1]) != null ? _a5 : " " : " "; + const { startIndex, endIndex } = findStatusRange(match); + const value = statusChar === "" ? " " : (_b3 = Array.from(statusChar)[0]) != null ? _b3 : " "; + return { + key: UNIVERSAL_STATUS_PROPERTY_KEY, + rawValue: value, + value, + startIndex, + endIndex + }; +} +function createPropertyMapWithStatus(rawLine) { + const properties = /* @__PURE__ */ new Map(); + const statusProp = parseUniversalStatus(rawLine); + properties.set(UNIVERSAL_STATUS_PROPERTY_KEY, statusProp); + return properties; +} + +// src/parsing/properties/none_schema.ts +var NoneSchema = class { + constructor() { + this.id = "none" /* None */; + this.label = "None"; + } + parseProperties(rawLine) { + return createPropertyMapWithStatus(rawLine); + } + knownKeys() { + return [ + { + key: UNIVERSAL_STATUS_PROPERTY_KEY, + label: "Status", + type: "text" + } + ]; + } +}; + +// src/parsing/properties/normalization.ts +var PROPERTY_KEY_ALIASES = { + completion: "done", + repeat: "recurrence" +}; +function normalizePropertyKey(key2) { + var _a5; + return (_a5 = PROPERTY_KEY_ALIASES[key2]) != null ? _a5 : key2; +} +function getPropertyAliases(key2) { + const canonicalKey = normalizePropertyKey(key2); + const aliases = Object.entries(PROPERTY_KEY_ALIASES).filter(([, canonical]) => canonical === canonicalKey).map(([alias]) => alias); + return [ + ...canonicalKey !== key2 ? [canonicalKey] : [], + ...aliases.filter((alias) => alias !== key2) + ]; +} +function getPropertyByKey(properties, key2) { + const exactMatch = properties.get(key2); + if (exactMatch) return exactMatch; + const canonicalKey = normalizePropertyKey(key2); + for (const [propertyKey, property] of properties) { + if (normalizePropertyKey(propertyKey) === canonicalKey) { + return property; + } + } + return void 0; +} + +// src/parsing/properties/value_parsers.ts +var DATE_ONLY_PATTERN = "\\d{4}-\\d{2}-\\d{2}"; +function parseDateOnly(value) { + const match = value.match(/^(\d{4})-(\d{2})-(\d{2})$/); + if (!match) return null; + const year = Number(match[1]); + const month = Number(match[2]); + const day = Number(match[3]); + const parsed = new Date(Date.UTC(year, month - 1, day)); + return parsed.getUTCFullYear() === year && parsed.getUTCMonth() === month - 1 && parsed.getUTCDate() === day ? parsed : null; +} +function parseIsoDate(value) { + const trimmed = value.trim(); + const dateOnly = parseDateOnly(trimmed); + if (dateOnly) return dateOnly; + if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z|[+-]\d{2}:\d{2})?$/.test(trimmed)) { + const parsed = new Date(trimmed); + return isNaN(parsed.getTime()) ? null : parsed; + } + return null; +} +function parseNumber(value) { + const trimmed = value.trim(); + if (!/^-?\d+(\.\d+)?$/.test(trimmed)) return null; + const parsed = Number(trimmed); + return isNaN(parsed) ? null : parsed; +} +function escapeRegExp(input) { + return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} + +// src/parsing/properties/tasks_schema.ts +var DATE_FIELDS = [ + { key: "due", label: "Due", emojis: ["\u{1F4C5}"] }, + { key: "scheduled", label: "Scheduled", emojis: ["\u23F3", "\u23F0"] }, + { key: "start", label: "Start", emojis: ["\u{1F6EB}"] }, + { key: "done", label: "Done", emojis: ["\u2705", "\u{1F3C1}"] }, + { key: "created", label: "Created", emojis: ["\u2795"] } +]; +var PRIORITY_VALUES = /* @__PURE__ */ new Map([ + ["\u{1F53A}", 5], + ["\u23EB", 4], + ["\u{1F53C}", 3], + ["\u{1F53D}", 2], + ["\u23EC", 1] +]); +var METADATA_EMOJIS = [ + ...DATE_FIELDS.flatMap((field) => field.emojis), + ...PRIORITY_VALUES.keys(), + "\u{1F501}" +]; +var RECURRENCE_EMOJI = "\u{1F501}"; +var TASKS_PROPERTY_ICONS = { + ...Object.fromEntries(DATE_FIELDS.map((field) => [field.key, field.emojis[0]])), + recurrence: RECURRENCE_EMOJI +}; +function getTasksPriorityEmoji(value) { + for (const [emoji, weight] of PRIORITY_VALUES) { + if (weight === value) return emoji; + } + return void 0; +} +function parseDateFields(rawLine) { + return DATE_FIELDS.flatMap( + (field) => field.emojis.flatMap((emoji) => { + const regex = new RegExp(`${escapeRegExp(emoji)}\\s*(${DATE_ONLY_PATTERN})`, "gu"); + return [...rawLine.matchAll(regex)].map((match) => { + var _a5, _b3; + return { + index: (_a5 = match.index) != null ? _a5 : Number.MAX_SAFE_INTEGER, + endIndex: ((_b3 = match.index) != null ? _b3 : 0) + match[0].length, + key: field.key, + rawValue: match[0], + value: match[1] ? parseDateOnly(match[1]) : null + }; + }); + }) + ); +} +function parsePriorityFields(rawLine) { + const priorityPattern = Array.from(PRIORITY_VALUES.keys()).map(escapeRegExp).join("|"); + const regex = new RegExp(priorityPattern, "gu"); + return [...rawLine.matchAll(regex)].map((match) => { + var _a5, _b3, _c2; + return { + index: (_a5 = match.index) != null ? _a5 : Number.MAX_SAFE_INTEGER, + endIndex: ((_b3 = match.index) != null ? _b3 : 0) + match[0].length, + key: "priority", + rawValue: match[0], + value: (_c2 = PRIORITY_VALUES.get(match[0])) != null ? _c2 : null + }; + }); +} +function parseRecurrenceFields(rawLine) { + const metadataPattern = METADATA_EMOJIS.map(escapeRegExp).join("|"); + const regex = new RegExp(`\u{1F501}\\s*(.+?)(?=\\s*(?:${metadataPattern})(?:\\s*${DATE_ONLY_PATTERN})?|$)`, "gu"); + return [...rawLine.matchAll(regex)].map((match) => { + var _a5, _b3, _c2; + const value = (_b3 = (_a5 = match[1]) == null ? void 0 : _a5.trim()) != null ? _b3 : ""; + const rawValue = match[0].trimEnd(); + const index2 = (_c2 = match.index) != null ? _c2 : Number.MAX_SAFE_INTEGER; + return { + index: index2, + endIndex: index2 + rawValue.length, + key: "recurrence", + rawValue, + value + }; + }).filter((field) => field.value !== ""); +} +var TasksPluginSchema = class { + constructor() { + this.id = "tasks" /* TasksPlugin */; + this.label = "Tasks Plugin"; + } + parseProperties(rawLine) { + const properties = createPropertyMapWithStatus(rawLine); + const parsedFields = [ + ...parseDateFields(rawLine), + ...parsePriorityFields(rawLine), + ...parseRecurrenceFields(rawLine) + ].sort((a, b) => a.index - b.index); + for (const field of parsedFields) { + if (!properties.has(field.key)) { + properties.set(field.key, { + key: field.key, + rawValue: field.rawValue, + value: field.value, + startIndex: field.index, + endIndex: field.endIndex + }); + } + } + return properties; + } + knownKeys() { + return [ + { key: UNIVERSAL_STATUS_PROPERTY_KEY, label: "Status", type: "text" }, + { key: "due", label: "Due", type: "date" }, + { key: "scheduled", label: "Scheduled", type: "date" }, + { key: "start", label: "Start", type: "date" }, + { key: "done", label: "Done", type: "date", aliases: getPropertyAliases("done") }, + { key: "created", label: "Created", type: "date" }, + { key: "priority", label: "Priority", type: "priority" }, + { key: "recurrence", label: "Recurrence", type: "text", aliases: getPropertyAliases("recurrence") } + ]; + } +}; + +// src/parsing/properties/dataview_schema.ts +var DATAVIEW_KEY_PATTERN = "[a-zA-Z0-9_-]+"; +var ENCLOSED_DATAVIEW_REGEX = /\[\s*([a-zA-Z0-9_-]+)\s*::\s*([^\]]*?)\s*\]|\(\s*([a-zA-Z0-9_-]+)\s*::\s*([^\)]*?)\s*\)/g; +var BARE_DATAVIEW_MARKER_REGEX = new RegExp(`(^|\\s)(${DATAVIEW_KEY_PATTERN})\\s*::\\s*`, "g"); +function parseDataviewValue(value) { + const trimmed = value.trim(); + const parsedDate = parseIsoDate(trimmed); + if (parsedDate) { + return parsedDate; + } + const parsedNumber = parseNumber(trimmed); + if (parsedNumber !== null) { + return parsedNumber; + } + return trimmed; +} +function isInsideRange(index2, ranges) { + return ranges.some((range) => index2 >= range.start && index2 < range.end); +} +function parseEnclosedFields(rawLine) { + return [...rawLine.matchAll(ENCLOSED_DATAVIEW_REGEX)].flatMap((match) => { + var _a5, _b3, _c2; + const index2 = (_a5 = match.index) != null ? _a5 : Number.MAX_SAFE_INTEGER; + const key2 = (_b3 = match[1]) != null ? _b3 : match[3]; + const rawValueText = (_c2 = match[2]) != null ? _c2 : match[4]; + if (!key2 || rawValueText === void 0) return []; + return [{ + index: index2, + endIndex: index2 + match[0].length, + key: key2, + rawValue: match[0], + rawValueText + }]; + }); +} +function parseBareFields(rawLine, enclosedFields) { + const enclosedRanges = enclosedFields.map((field) => ({ start: field.index, end: field.endIndex })); + const markers = [...rawLine.matchAll(BARE_DATAVIEW_MARKER_REGEX)].map((match) => { + var _a5, _b3, _c2; + const prefix = (_a5 = match[1]) != null ? _a5 : ""; + const index2 = ((_b3 = match.index) != null ? _b3 : 0) + prefix.length; + return { + index: index2, + valueStart: ((_c2 = match.index) != null ? _c2 : 0) + match[0].length, + key: match[2] + }; + }).filter((marker) => marker.key && !isInsideRange(marker.index, enclosedRanges)); + return markers.flatMap((marker, markerIndex) => { + var _a5, _b3, _c2; + if (!marker.key) return []; + const nextMarkerIndex = (_b3 = (_a5 = markers[markerIndex + 1]) == null ? void 0 : _a5.index) != null ? _b3 : Number.MAX_SAFE_INTEGER; + const nextEnclosedIndex = (_c2 = enclosedFields.map((field) => field.index).filter((index2) => index2 > marker.valueStart).sort((a, b) => a - b)[0]) != null ? _c2 : Number.MAX_SAFE_INTEGER; + const endIndex = Math.min(nextMarkerIndex, nextEnclosedIndex, rawLine.length); + const rawValueText = rawLine.slice(marker.valueStart, endIndex).trim(); + const rawValue = rawLine.slice(marker.index, endIndex).trimEnd(); + if (!rawValueText) return []; + return [{ + index: marker.index, + endIndex: marker.index + rawValue.length, + key: marker.key, + rawValue, + rawValueText + }]; + }); +} +var DataviewSchema = class { + constructor() { + this.id = "dataview" /* Dataview */; + this.label = "Dataview"; + } + parseProperties(rawLine) { + const properties = createPropertyMapWithStatus(rawLine); + const enclosedFields = parseEnclosedFields(rawLine); + const fields = [ + ...enclosedFields, + ...parseBareFields(rawLine, enclosedFields) + ].sort((a, b) => a.index - b.index); + for (const field of fields) { + if (!properties.has(field.key)) { + properties.set(field.key, { + key: field.key, + rawValue: field.rawValue, + value: parseDataviewValue(field.rawValueText), + startIndex: field.index, + endIndex: field.endIndex + }); + } + } + return properties; + } + knownKeys() { + return [ + { key: UNIVERSAL_STATUS_PROPERTY_KEY, label: "Status", type: "text" }, + { key: "due", label: "Due", type: "date" }, + { key: "scheduled", label: "Scheduled", type: "date" }, + { key: "start", label: "Start", type: "date" }, + { key: "done", label: "Done", type: "date", aliases: getPropertyAliases("done") }, + { key: "completion", label: "Completion", type: "date" }, + { key: "created", label: "Created", type: "date" }, + { key: "priority", label: "Priority", type: "text" }, + { key: "repeat", label: "Repeat", type: "text", aliases: getPropertyAliases("repeat") } + ]; + } +}; + +// src/parsing/properties/comparators.ts +var ColumnOrderMode = /* @__PURE__ */ ((ColumnOrderMode2) => { + ColumnOrderMode2["FileOrder"] = "file"; + ColumnOrderMode2["TaskName"] = "task-name"; + ColumnOrderMode2["Property"] = "property"; + ColumnOrderMode2["Manual"] = "manual"; + return ColumnOrderMode2; +})(ColumnOrderMode || {}); +function compareValues(a, b) { + if (a instanceof Date && b instanceof Date) { + return a.getTime() - b.getTime(); + } + if (typeof a === "number" && typeof b === "number") { + return a - b; + } + return String(a).localeCompare(String(b)); +} +function compareByProperty(a, b, key2, direction, options2 = {}) { + var _a5, _b3, _c2, _d, _e, _f; + const aValue = (_b3 = (_a5 = a.properties.get(key2)) == null ? void 0 : _a5.value) != null ? _b3 : null; + const bValue = (_d = (_c2 = b.properties.get(key2)) == null ? void 0 : _c2.value) != null ? _d : null; + if (aValue === null && bValue === null) return 0; + if (aValue === null) return 1; + if (bValue === null) return -1; + if (key2 === UNIVERSAL_STATUS_PROPERTY_KEY) { + return compareStatusMarkerValues( + aValue, + bValue, + (_e = options2.statusMarkerOrder) != null ? _e : "", + (_f = options2.doneStatusMarkers) != null ? _f : "", + direction + ); + } + const result = compareValues(aValue, bValue); + return direction === "desc" ? -result : result; +} +function compareStatusMarkerValues(a, b, statusMarkerOrder, doneStatusMarkers = "", direction = "asc") { + const aMarker = String(a); + const bMarker = String(b); + const doneRankByMarker = createMarkerRankMap(doneStatusMarkers); + const aDoneRank = doneRankByMarker.get(aMarker); + const bDoneRank = doneRankByMarker.get(bMarker); + if (aDoneRank !== void 0 && bDoneRank !== void 0) { + return aDoneRank - bDoneRank; + } + if (aDoneRank !== void 0) return 1; + if (bDoneRank !== void 0) return -1; + const rankByMarker = createStatusMarkerRankMap(statusMarkerOrder); + const aRank = rankByMarker.get(aMarker); + const bRank = rankByMarker.get(bMarker); + let result; + if (aRank !== void 0 && bRank !== void 0) { + result = aRank - bRank; + } else if (aRank !== void 0) { + result = -1; + } else if (bRank !== void 0) { + result = 1; + } else { + result = aMarker.localeCompare(bMarker); + } + return direction === "desc" ? -result : result; +} +function createStatusMarkerRankMap(statusMarkerOrder) { + const orderedMarkers = Array.from(statusMarkerOrder); + if (!orderedMarkers.includes(" ")) { + orderedMarkers.unshift(" "); + } + return createMarkerRankMap(orderedMarkers.join("")); +} +function createMarkerRankMap(markers) { + const rankByMarker = /* @__PURE__ */ new Map(); + for (const marker of Array.from(markers)) { + if (!rankByMarker.has(marker)) { + rankByMarker.set(marker, rankByMarker.size); + } + } + return rankByMarker; +} + +// src/parsing/properties/display.ts +var PRIORITY_LABELS = { + 5: "Highest", + 4: "High", + 3: "Medium", + 2: "Low", + 1: "Lowest" +}; +function formatPropertyLabel(key2) { + if (!key2) return key2; + return key2.charAt(0).toUpperCase() + key2.slice(1); +} +function formatPropertyValue(prop2) { + var _a5; + if (prop2.value instanceof Date) { + return prop2.value.toLocaleDateString(void 0, { + month: "short", + day: "numeric", + timeZone: "UTC" + }); + } + if (prop2.key === "priority" && typeof prop2.value === "number") { + return (_a5 = PRIORITY_LABELS[prop2.value]) != null ? _a5 : String(prop2.value); + } + if (prop2.value === null) { + return prop2.rawValue; + } + return String(prop2.value); +} +function tasksIconFor(prop2) { + if (prop2.key === "priority" && typeof prop2.value === "number") { + return getTasksPriorityEmoji(prop2.value); + } + return TASKS_PROPERTY_ICONS[prop2.key]; +} +function stripDisplayedPropertiesFromContent(content, properties) { + let result = content; + for (const [key2, prop2] of properties) { + if (key2 === UNIVERSAL_STATUS_PROPERTY_KEY) continue; + if (!prop2.rawValue) continue; + result = result.split(prop2.rawValue).join(" "); + } + return result.replace(/[ \t]{2,}/g, " ").trim(); +} +function toDisplayProperties(properties) { + const result = []; + for (const [key2, prop2] of properties) { + if (key2 === UNIVERSAL_STATUS_PROPERTY_KEY) continue; + result.push({ + key: key2, + label: formatPropertyLabel(key2), + value: formatPropertyValue(prop2), + icon: tasksIconFor(prop2) + }); + } + return result; +} + +// src/parsing/properties/write.ts +var TASKS_WRITERS = { + due: "\u{1F4C5}", + scheduled: "\u23F3", + start: "\u{1F6EB}", + done: "\u2705" +}; +var DATAVIEW_WRITERS = { + due: "due", + scheduled: "scheduled", + start: "start", + completion: "completion" +}; +var TRAILING_BLOCK_LINK_REGEX = /(\s\^[a-zA-Z0-9-]+)$/; +var TasksPluginWriteAdapter = class { + constructor() { + this.schema = "tasks" /* TasksPlugin */; + this.propertySchema = new TasksPluginSchema(); + } + addCompletionDateIfMissing(rawLine, date) { + if (this.propertySchema.parseProperties(rawLine).has("done")) { + return rawLine; + } + return appendBeforeBlockLink(rawLine, `${TASKS_WRITERS.done} ${date}`); + } + upsertDate(rawLine, key2, date) { + var _a5; + const marker = (_a5 = markerForExistingTasksProperty(rawLine, key2)) != null ? _a5 : TASKS_WRITERS[key2]; + const property = this.propertySchema.parseProperties(rawLine).get(key2); + return upsertProperty(rawLine, property, `${marker} ${date}`); + } + removeDate(rawLine, key2) { + const propertyKey = key2 === "completion" ? "done" : key2; + const property = this.propertySchema.parseProperties(rawLine).get(propertyKey); + return property ? removeProperty(rawLine, property) : rawLine; + } +}; +var DataviewWriteAdapter = class { + constructor() { + this.schema = "dataview" /* Dataview */; + this.propertySchema = new DataviewSchema(); + } + addCompletionDateIfMissing(rawLine, date) { + if (hasDataviewCompletionProperty(rawLine, this.propertySchema)) { + return rawLine; + } + return appendBeforeBlockLink(rawLine, formatDataviewField("completion", date)); + } + upsertDate(rawLine, key2, date) { + const property = this.propertySchema.parseProperties(rawLine).get(key2); + return upsertProperty(rawLine, property, formatDataviewField(DATAVIEW_WRITERS[key2], date)); + } + removeDate(rawLine, key2) { + const property = this.propertySchema.parseProperties(rawLine).get(key2); + return property ? removeProperty(rawLine, property) : rawLine; + } +}; +var WRITE_ADAPTERS = { + ["tasks" /* TasksPlugin */]: new TasksPluginWriteAdapter(), + ["dataview" /* Dataview */]: new DataviewWriteAdapter() +}; +function getPropertyWriteAdapter(schema) { + if (schema === "tasks" /* TasksPlugin */ || schema === "dataview" /* Dataview */) { + return WRITE_ADAPTERS[schema]; + } + return null; +} +function formatLocalDate(date = /* @__PURE__ */ new Date()) { + const year = date.getFullYear(); + const month = `${date.getMonth() + 1}`.padStart(2, "0"); + const day = `${date.getDate()}`.padStart(2, "0"); + return `${year}-${month}-${day}`; +} +function formatDataviewField(key2, date) { + return `[${key2}:: ${date}]`; +} +function upsertProperty(rawLine, property, replacement) { + if (!property) { + return appendBeforeBlockLink(rawLine, replacement); + } + return replaceProperty(rawLine, property, replacement); +} +function replaceProperty(rawLine, property, replacement) { + return `${rawLine.slice(0, property.startIndex)}${replacement}${rawLine.slice(property.endIndex)}`; +} +function removeProperty(rawLine, property) { + const next2 = `${rawLine.slice(0, property.startIndex)}${rawLine.slice(property.endIndex)}`; + return normalizeWhitespaceAroundIndex(next2, property.startIndex); +} +function appendBeforeBlockLink(rawLine, metadata) { + const match = rawLine.match(TRAILING_BLOCK_LINK_REGEX); + if (!(match == null ? void 0 : match.index)) { + return `${rawLine.trimEnd()} ${metadata}`; + } + const body = rawLine.slice(0, match.index).trimEnd(); + return `${body} ${metadata}${match[0]}`; +} +function normalizeWhitespaceAroundIndex(rawLine, index2) { + var _a5, _b3; + let start = Math.max(0, index2); + while (start > 0 && /[ \t]/.test((_a5 = rawLine[start - 1]) != null ? _a5 : "")) { + start -= 1; + } + let end = Math.min(rawLine.length, index2); + while (end < rawLine.length && /[ \t]/.test((_b3 = rawLine[end]) != null ? _b3 : "")) { + end += 1; + } + const before = rawLine.slice(0, start); + const after = rawLine.slice(end); + const separator = before && after ? " " : ""; + return `${before}${separator}${after}`.trimEnd(); +} +function markerForExistingTasksProperty(rawLine, key2) { + const property = new TasksPluginSchema().parseProperties(rawLine).get(key2); + if (!property) return void 0; + const marker = Array.from(property.rawValue.trim())[0]; + return marker; +} +function hasDataviewCompletionProperty(rawLine, schema) { + const properties = schema.parseProperties(rawLine); + return properties.has("completion") || properties.has("done"); +} + +// src/parsing/properties/index.ts +var SCHEMA_IMPLS = { + ["none" /* None */]: new NoneSchema(), + ["tasks" /* TasksPlugin */]: new TasksPluginSchema(), + ["dataview" /* Dataview */]: new DataviewSchema() +}; +function getSchemaImpl(option) { + var _a5; + return (_a5 = SCHEMA_IMPLS[option]) != null ? _a5 : SCHEMA_IMPLS["none" /* None */]; +} + +// src/ui/components/DateInputFields.svelte +var root3 = from_html(``); +var root_12 = from_html(``); +var root_22 = from_html(`
`); +var $$css3 = { + hash: "svelte-4hxhuo", + code: ".date-input-fields.svelte-4hxhuo {display:flex;flex-wrap:wrap;align-items:end;gap:var(--size-2-2);width:100%;}.date-input-field.svelte-4hxhuo {display:flex;flex-direction:column;gap:2px;min-width:116px;flex:1 1 116px;color:var(--text-muted);font-size:var(--font-smallest);text-transform:uppercase;}.date-input-field.svelte-4hxhuo input:where(.svelte-4hxhuo) {width:100%;min-height:28px;font-size:var(--font-ui-smaller);text-transform:none;}.done-date-editing.svelte-4hxhuo {display:inline-flex;align-items:center;gap:var(--size-2-1);min-height:28px;padding:1px var(--size-2-2);border:var(--border-width) solid var(--background-modifier-border);border-radius:var(--radius-s);background:var(--background-secondary-alt);color:var(--text-muted);box-shadow:none;line-height:var(--line-height-tight);}.done-date-editing.svelte-4hxhuo:hover {border-color:var(--text-muted);color:var(--text-normal);background:var(--background-secondary);box-shadow:none;}" +}; +function DateInputFields($$anchor, $$props) { + if (new.target) return createClassComponent({ component: DateInputFields, ...$$anchor }); + push($$props, false); + append_styles($$anchor, $$css3); + let values = prop($$props, "values", 12); + let onDateChange = prop($$props, "onDateChange", 12); + let showDoneButton = prop($$props, "showDoneButton", 12, false); + let onDone = prop($$props, "onDone", 12, () => { + }); + const editableDateFields = [ + { key: "due", label: "Due" }, + { key: "scheduled", label: "Scheduled" }, + { key: "start", label: "Start" } + ]; + var $$exports = { + get values() { + return values(); + }, + set values($$value) { + values($$value); + flushSync(); + }, + get onDateChange() { + return onDateChange(); + }, + set onDateChange($$value) { + onDateChange($$value); + flushSync(); + }, + get showDoneButton() { + return showDoneButton(); + }, + set showDoneButton($$value) { + showDoneButton($$value); + flushSync(); + }, + get onDone() { + return onDone(); + }, + set onDone($$value) { + onDone($$value); + flushSync(); + }, + $set: update_legacy_props, + $on: ($$event_name, $$event_cb) => add_legacy_event_listener($$props, $$event_name, $$event_cb) + }; + init(); + var div = root_22(); + var node = child(div); + each(node, 1, () => editableDateFields, (field) => field.key, ($$anchor2, field) => { + var label = root3(); + var span = child(label); + var text2 = child(span, true); + reset(span); + var input = sibling(span, 2); + remove_input_defaults(input); + reset(label); + template_effect(() => { + set_text(text2, (get(field), untrack(() => get(field).label))); + set_value(input, (deep_read_state(values()), get(field), untrack(() => values()[get(field).key]))); + }); + event("mousedown", input, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + event("mouseup", input, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + event("click", input, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + event("change", input, (event2) => onDateChange()(get(field).key, event2.currentTarget.value)); + event("keydown", input, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + append($$anchor2, label); + }); + var node_1 = sibling(node, 2); + { + var consequent = ($$anchor2) => { + var button = root_12(); + event("mousedown", button, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + event("mouseup", button, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + event("click", button, function(...$$args) { + var _a5; + (_a5 = onDone()) == null ? void 0 : _a5.apply(this, $$args); + }); + event("keydown", button, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + append($$anchor2, button); + }; + if_block(node_1, ($$render) => { + if (showDoneButton()) $$render(consequent); + }); + } + reset(div); + append($$anchor, div); + return pop($$exports); +} + +// src/ui/components/TaskDateFields.svelte +var root4 = from_html(`
`); +var root_13 = from_html(`
`); +var $$css4 = { + hash: "svelte-1ml44qr", + code: ".task-date-fields.svelte-1ml44qr {display:contents;font-size:var(--font-ui-smaller);}.add-date-button.svelte-1ml44qr {display:inline-flex;align-items:center;gap:var(--size-2-1);height:auto;min-height:0;padding:0 var(--size-2-2);margin:0;border:none;border-radius:var(--radius-s);background:transparent;color:var(--text-accent);box-shadow:none;font-size:inherit;font-weight:var(--font-medium);line-height:inherit;}.add-date-button.svelte-1ml44qr span:where(.svelte-1ml44qr) {font-size:inherit;line-height:1;}.add-date-button.svelte-1ml44qr:hover {background:transparent;color:var(--text-accent-hover);box-shadow:none;}.edit-mode.svelte-1ml44qr {display:flex;width:100%;padding-top:var(--size-2-1);border-top:var(--border-width) solid var(--background-modifier-border);}" +}; +function TaskDateFields($$anchor, $$props) { + if (new.target) return createClassComponent({ component: TaskDateFields, ...$$anchor }); + push($$props, false); + append_styles($$anchor, $$css4); + const dateEditingEnabled = mutable_source(); + const dateValues = mutable_source(); + const showDateInputs = mutable_source(); + const showReadChips = mutable_source(); + let task = prop($$props, "task", 12); + let taskActions = prop($$props, "taskActions", 12); + let propertySchemaOption = prop($$props, "propertySchemaOption", 28, () => "none" /* None */); + let isTaskEditing = prop($$props, "isTaskEditing", 12, false); + let isEditingDates = prop($$props, "isEditingDates", 12, false); + const editableDateFields = [ + { key: "due", label: "Due", shortLabel: "Due" }, + { key: "scheduled", label: "Scheduled", shortLabel: "Sched" }, + { key: "start", label: "Start", shortLabel: "Start" } + ]; + let isDateEditing = mutable_source(false); + let draftDateValues = mutable_source({ due: "", scheduled: "", start: "" }); + let wasShowingDateInputs = mutable_source(false); + function getDateValue(key2) { + const property = getPropertyByKey(task().properties, key2); + return (property == null ? void 0 : property.value) instanceof Date ? formatLocalDate(property.value) : ""; + } + function openDateEditor() { + set(draftDateValues, { ...get(dateValues) }); + set(isDateEditing, true); + } + function handleDraftDateChange(key2, value) { + set(draftDateValues, { ...get(draftDateValues), [key2]: value }); + } + async function saveDraftDates() { + var _a5; + for (const field of editableDateFields) { + const key2 = field.key; + const nextValue = (_a5 = get(draftDateValues)[key2]) != null ? _a5 : ""; + if (nextValue === get(dateValues)[key2]) { + continue; + } + if (nextValue) { + await taskActions().setDateProperty(task().id, key2, nextValue); + } else { + await taskActions().clearDateProperty(task().id, key2); + } + } + set(isDateEditing, false); + } + legacy_pre_effect( + () => (getPropertyWriteAdapter, deep_read_state(propertySchemaOption())), + () => { + set(dateEditingEnabled, getPropertyWriteAdapter(propertySchemaOption()) !== null); + } + ); + legacy_pre_effect(() => { + }, () => { + set(dateValues, Object.fromEntries(editableDateFields.map((field) => [field.key, getDateValue(field.key)]))); + }); + legacy_pre_effect( + () => (get(dateEditingEnabled), deep_read_state(isTaskEditing()), get(isDateEditing)), + () => { + set(showDateInputs, get(dateEditingEnabled) && (isTaskEditing() || get(isDateEditing))); + } + ); + legacy_pre_effect(() => (get(dateEditingEnabled), get(showDateInputs)), () => { + set(showReadChips, get(dateEditingEnabled) && !get(showDateInputs)); + }); + legacy_pre_effect(() => get(showDateInputs), () => { + isEditingDates(get(showDateInputs)); + }); + legacy_pre_effect( + () => (get(showDateInputs), get(wasShowingDateInputs), get(dateValues)), + () => { + if (get(showDateInputs) && !get(wasShowingDateInputs)) { + set(draftDateValues, { ...get(dateValues) }); + } + set(wasShowingDateInputs, get(showDateInputs)); + } + ); + legacy_pre_effect_reset(); + var $$exports = { + get task() { + return task(); + }, + set task($$value) { + task($$value); + flushSync(); + }, + get taskActions() { + return taskActions(); + }, + set taskActions($$value) { + taskActions($$value); + flushSync(); + }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + set propertySchemaOption($$value) { + propertySchemaOption($$value); + flushSync(); + }, + get isTaskEditing() { + return isTaskEditing(); + }, + set isTaskEditing($$value) { + isTaskEditing($$value); + flushSync(); + }, + get isEditingDates() { + return isEditingDates(); + }, + set isEditingDates($$value) { + isEditingDates($$value); + flushSync(); + }, + $set: update_legacy_props, + $on: ($$event_name, $$event_cb) => add_legacy_event_listener($$props, $$event_name, $$event_cb) + }; + init(); + var fragment = comment(); + var node = first_child(fragment); + { + var consequent = ($$anchor2) => { + var div = root4(); + var button = child(div); + reset(div); + event("mousedown", button, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + event("mouseup", button, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + event("click", button, openDateEditor); + event("keydown", button, stopPropagation(function($$arg) { + bubble_event.call(this, $$props, $$arg); + })); + append($$anchor2, div); + }; + var consequent_1 = ($$anchor2) => { + var div_1 = root_13(); + var node_1 = child(div_1); + DateInputFields(node_1, { + get values() { + return get(draftDateValues); + }, + onDateChange: handleDraftDateChange, + showDoneButton: true, + onDone: saveDraftDates + }); + reset(div_1); + append($$anchor2, div_1); + }; + if_block(node, ($$render) => { + if (get(showReadChips)) $$render(consequent); + else if (get(showDateInputs)) $$render(consequent_1, 1); + }); + } + append($$anchor, fragment); + return pop($$exports); +} + // src/ui/components/icon.svelte var import_obsidian4 = require("obsidian"); -var root3 = from_html(``); -var $$css3 = { +var root5 = from_html(``); +var $$css5 = { hash: "svelte-1cj3qcy", code: ".icon.svelte-1cj3qcy {display:inline-flex;justify-content:center;align-items:center;flex-shrink:0;}.icon.svelte-1cj3qcy svg {width:100%;height:100%;}" }; function Icon($$anchor, $$props) { if (new.target) return createClassComponent({ component: Icon, ...$$anchor }); push($$props, false); - append_styles($$anchor, $$css3); + append_styles($$anchor, $$css5); let name = prop($$props, "name", 12); let size2 = prop( $$props, @@ -11891,7 +13377,7 @@ function Icon($$anchor, $$props) { $on: ($$event_name, $$event_cb) => add_legacy_event_listener($$props, $$event_name, $$event_cb) }; init(); - var span = root3(); + var span = root5(); let styles; bind_this(span, ($$value) => set(element2, $$value), () => get(element2)); template_effect(() => { @@ -13047,43 +14533,43 @@ var ZodString = class _ZodString extends ZodType { base64(message) { return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) }); } - ip(options) { - return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); + ip(options2) { + return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options2) }); } - datetime(options) { + datetime(options2) { var _a5, _b3; - if (typeof options === "string") { + if (typeof options2 === "string") { return this._addCheck({ kind: "datetime", precision: null, offset: false, local: false, - message: options + message: options2 }); } return this._addCheck({ kind: "datetime", - precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision, - offset: (_a5 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a5 !== void 0 ? _a5 : false, - local: (_b3 = options === null || options === void 0 ? void 0 : options.local) !== null && _b3 !== void 0 ? _b3 : false, - ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) + precision: typeof (options2 === null || options2 === void 0 ? void 0 : options2.precision) === "undefined" ? null : options2 === null || options2 === void 0 ? void 0 : options2.precision, + offset: (_a5 = options2 === null || options2 === void 0 ? void 0 : options2.offset) !== null && _a5 !== void 0 ? _a5 : false, + local: (_b3 = options2 === null || options2 === void 0 ? void 0 : options2.local) !== null && _b3 !== void 0 ? _b3 : false, + ...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message) }); } date(message) { return this._addCheck({ kind: "date", message }); } - time(options) { - if (typeof options === "string") { + time(options2) { + if (typeof options2 === "string") { return this._addCheck({ kind: "time", precision: null, - message: options + message: options2 }); } return this._addCheck({ kind: "time", - precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision, - ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) + precision: typeof (options2 === null || options2 === void 0 ? void 0 : options2.precision) === "undefined" ? null : options2 === null || options2 === void 0 ? void 0 : options2.precision, + ...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message) }); } duration(message) { @@ -13096,12 +14582,12 @@ var ZodString = class _ZodString extends ZodType { ...errorUtil.errToObj(message) }); } - includes(value, options) { + includes(value, options2) { return this._addCheck({ kind: "includes", value, - position: options === null || options === void 0 ? void 0 : options.position, - ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) + position: options2 === null || options2 === void 0 ? void 0 : options2.position, + ...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message) }); } startsWith(value, message) { @@ -14374,7 +15860,7 @@ ZodObject.lazycreate = (shape, params) => { var ZodUnion = class extends ZodType { _parse(input) { const { ctx } = this._processInputParams(input); - const options = this._def.options; + const options2 = this._def.options; function handleResults(results) { for (const result of results) { if (result.result.status === "valid") { @@ -14395,7 +15881,7 @@ var ZodUnion = class extends ZodType { return INVALID; } if (ctx.common.async) { - return Promise.all(options.map(async (option) => { + return Promise.all(options2.map(async (option) => { const childCtx = { ...ctx, common: { @@ -14416,7 +15902,7 @@ var ZodUnion = class extends ZodType { } else { let dirty = void 0; const issues = []; - for (const option of options) { + for (const option of options2) { const childCtx = { ...ctx, common: { @@ -14546,9 +16032,9 @@ var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { * @param types an array of object schemas * @param params */ - static create(discriminator, options, params) { + static create(discriminator, options2, params) { const optionsMap = /* @__PURE__ */ new Map(); - for (const type of options) { + for (const type of options2) { const discriminatorValues = getDiscriminator(type.shape[discriminator]); if (!discriminatorValues.length) { throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); @@ -14563,7 +16049,7 @@ var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { return new _ZodDiscriminatedUnion({ typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, discriminator, - options, + options: options2, optionsMap, ...processCreateParams(params) }); @@ -15845,65 +17331,6 @@ function isValidTag(tag2) { var tagsRegex = /#([-_/\p{L}\p{N}]+)/gu; var tagNonNumericTest = /\p{L}/u; -// src/parsing/properties/property_schema.ts -var PropertySchemaOption = /* @__PURE__ */ ((PropertySchemaOption2) => { - PropertySchemaOption2["None"] = "none"; - PropertySchemaOption2["TasksPlugin"] = "tasks"; - PropertySchemaOption2["Dataview"] = "dataview"; - return PropertySchemaOption2; -})(PropertySchemaOption || {}); -var UNIVERSAL_STATUS_PROPERTY_KEY = "status"; -function findStatusRange(statusMatch) { - var _a5, _b3; - if (!(statusMatch == null ? void 0 : statusMatch[0])) { - return { startIndex: -1, endIndex: -1 }; - } - const bracketIndex = statusMatch[0].indexOf("["); - const startIndex = bracketIndex >= 0 ? bracketIndex + 1 : -1; - const endIndex = startIndex >= 0 ? startIndex + ((_b3 = (_a5 = statusMatch[1]) == null ? void 0 : _a5.length) != null ? _b3 : 0) : -1; - return { startIndex, endIndex }; -} -function parseUniversalStatus(rawLine) { - var _a5, _b3; - const match = rawLine.match(/^\s*[-*+]\s\[([^\[\]]*)\]/); - const statusChar = match ? (_a5 = match[1]) != null ? _a5 : " " : " "; - const { startIndex, endIndex } = findStatusRange(match); - const value = statusChar === "" ? " " : (_b3 = Array.from(statusChar)[0]) != null ? _b3 : " "; - return { - key: UNIVERSAL_STATUS_PROPERTY_KEY, - rawValue: value, - value, - startIndex, - endIndex - }; -} -function createPropertyMapWithStatus(rawLine) { - const properties = /* @__PURE__ */ new Map(); - const statusProp = parseUniversalStatus(rawLine); - properties.set(UNIVERSAL_STATUS_PROPERTY_KEY, statusProp); - return properties; -} - -// src/parsing/properties/none_schema.ts -var NoneSchema = class { - constructor() { - this.id = "none" /* None */; - this.label = "None"; - } - parseProperties(rawLine) { - return createPropertyMapWithStatus(rawLine); - } - knownKeys() { - return [ - { - key: UNIVERSAL_STATUS_PROPERTY_KEY, - label: "Status", - type: "text" - } - ]; - } -}; - // src/ui/tasks/task.ts var DEFAULT_DONE_STATUS_MARKERS = "xX"; var DEFAULT_IGNORED_STATUS_MARKERS = ""; @@ -16082,7 +17509,7 @@ var Task = class { return this.getPlacementTagsForColumn(this.column); } stripTagFromContent(value, tag2) { - const escapedTag = escapeRegExp(tag2); + const escapedTag = escapeRegExp2(tag2); return value.replace(new RegExp(`(^|\\s)#${escapedTag}(?=$|\\s|[^-_/\\p{L}\\p{N}])`, "gu"), "$1").replace(/[ \t]{2,}/g, " ").trim(); } replaceTag(oldTag, newTag) { @@ -16174,89 +17601,10 @@ function isTrackedTaskString(input, ignoredStatusMarkers = DEFAULT_IGNORED_STATU } var taskStringRegex = /^(\s*)[-*+]\s\[([^\[\]]*)\]\s(.+)/; var blockLinkRegexp = /\s\^([a-zA-Z0-9-]+)$/; -function escapeRegExp(input) { +function escapeRegExp2(input) { return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } -// src/parsing/properties/comparators.ts -var ColumnOrderMode = /* @__PURE__ */ ((ColumnOrderMode2) => { - ColumnOrderMode2["FileOrder"] = "file"; - ColumnOrderMode2["TaskName"] = "task-name"; - ColumnOrderMode2["Property"] = "property"; - ColumnOrderMode2["Manual"] = "manual"; - return ColumnOrderMode2; -})(ColumnOrderMode || {}); -function compareValues(a, b) { - if (a instanceof Date && b instanceof Date) { - return a.getTime() - b.getTime(); - } - if (typeof a === "number" && typeof b === "number") { - return a - b; - } - return String(a).localeCompare(String(b)); -} -function compareByProperty(a, b, key2, direction, options = {}) { - var _a5, _b3, _c2, _d, _e, _f; - const aValue = (_b3 = (_a5 = a.properties.get(key2)) == null ? void 0 : _a5.value) != null ? _b3 : null; - const bValue = (_d = (_c2 = b.properties.get(key2)) == null ? void 0 : _c2.value) != null ? _d : null; - if (aValue === null && bValue === null) return 0; - if (aValue === null) return 1; - if (bValue === null) return -1; - if (key2 === UNIVERSAL_STATUS_PROPERTY_KEY) { - return compareStatusMarkerValues( - aValue, - bValue, - (_e = options.statusMarkerOrder) != null ? _e : "", - (_f = options.doneStatusMarkers) != null ? _f : "", - direction - ); - } - const result = compareValues(aValue, bValue); - return direction === "desc" ? -result : result; -} -function compareStatusMarkerValues(a, b, statusMarkerOrder, doneStatusMarkers = "", direction = "asc") { - const aMarker = String(a); - const bMarker = String(b); - const doneRankByMarker = createMarkerRankMap(doneStatusMarkers); - const aDoneRank = doneRankByMarker.get(aMarker); - const bDoneRank = doneRankByMarker.get(bMarker); - if (aDoneRank !== void 0 && bDoneRank !== void 0) { - return aDoneRank - bDoneRank; - } - if (aDoneRank !== void 0) return 1; - if (bDoneRank !== void 0) return -1; - const rankByMarker = createStatusMarkerRankMap(statusMarkerOrder); - const aRank = rankByMarker.get(aMarker); - const bRank = rankByMarker.get(bMarker); - let result; - if (aRank !== void 0 && bRank !== void 0) { - result = aRank - bRank; - } else if (aRank !== void 0) { - result = -1; - } else if (bRank !== void 0) { - result = 1; - } else { - result = aMarker.localeCompare(bMarker); - } - return direction === "desc" ? -result : result; -} -function createStatusMarkerRankMap(statusMarkerOrder) { - const orderedMarkers = Array.from(statusMarkerOrder); - if (!orderedMarkers.includes(" ")) { - orderedMarkers.unshift(" "); - } - return createMarkerRankMap(orderedMarkers.join("")); -} -function createMarkerRankMap(markers) { - const rankByMarker = /* @__PURE__ */ new Map(); - for (const marker of Array.from(markers)) { - if (!rankByMarker.has(marker)) { - rankByMarker.set(marker, rankByMarker.size); - } - } - return rankByMarker; -} - // src/ui/tasks/task_grouping.ts var DEFAULT_GROUP_BUCKET_ID = "__default__"; function deriveGroupBuckets(tasks, source2, excludedTags = [], statusMarkerOrder = "", doneStatusMarkers = "") { @@ -16329,10 +17677,14 @@ function deriveGroupBuckets(tasks, source2, excludedTags = [], statusMarkerOrder } if (source2.kind === "property") { const valueMap = /* @__PURE__ */ new Map(); + let hasMissingValue = false; for (const task of tasks) { const property = task.properties.get(source2.key); const value = (_a5 = property == null ? void 0 : property.value) != null ? _a5 : null; - if (value === null) continue; + if (value === null) { + hasMissingValue = true; + continue; + } const key2 = propertyValueKey(value); if (!valueMap.has(key2)) { valueMap.set(key2, { @@ -16354,6 +17706,15 @@ function deriveGroupBuckets(tasks, source2, excludedTags = [], statusMarkerOrder source: source2, isDefault: false })); + if (hasMissingValue || buckets.length === 0) { + buckets.push({ + id: createPropertyMissingGroupBucketId(source2.key), + label: "Unassigned", + value: null, + source: source2, + isDefault: true + }); + } return buckets; } return [ @@ -16434,6 +17795,9 @@ function createTagPrefixUnassignedGroupBucketId(prefix) { function createPropertyGroupBucketId(key2, value) { return `property:${key2}:${propertyValueKey(value)}`; } +function createPropertyMissingGroupBucketId(key2) { + return `property:${key2}:__missing__`; +} function propertyValueKey(value) { if (value instanceof Date) { return `date:${value.getTime()}`; @@ -16666,10 +18030,10 @@ var defaultSettings = { manualOrder: {} }; var createSettingsStore = () => writable(defaultSettings); -function parseSettingsString(str) { +function parseSettingsString(str2) { var _a5, _b3; try { - const parsed = JSON.parse(str); + const parsed = JSON.parse(str2); const partial = settingsObject.partial().parse(parsed); const columns = migrateColumnDefinitions( (_a5 = partial.columns) != null ? _a5 : defaultSettings.columns @@ -16699,231 +18063,6 @@ function createDefaultColumns(labels) { })); } -// src/parsing/properties/normalization.ts -var PROPERTY_KEY_ALIASES = { - completion: "done", - repeat: "recurrence" -}; -function normalizePropertyKey(key2) { - var _a5; - return (_a5 = PROPERTY_KEY_ALIASES[key2]) != null ? _a5 : key2; -} -function getPropertyAliases(key2) { - const canonicalKey = normalizePropertyKey(key2); - const aliases = Object.entries(PROPERTY_KEY_ALIASES).filter(([, canonical]) => canonical === canonicalKey).map(([alias]) => alias); - return [ - ...canonicalKey !== key2 ? [canonicalKey] : [], - ...aliases.filter((alias) => alias !== key2) - ]; -} - -// src/parsing/properties/value_parsers.ts -var DATE_ONLY_PATTERN = "\\d{4}-\\d{2}-\\d{2}"; -function parseDateOnly(value) { - const match = value.match(/^(\d{4})-(\d{2})-(\d{2})$/); - if (!match) return null; - const year = Number(match[1]); - const month = Number(match[2]); - const day = Number(match[3]); - const parsed = new Date(Date.UTC(year, month - 1, day)); - return parsed.getUTCFullYear() === year && parsed.getUTCMonth() === month - 1 && parsed.getUTCDate() === day ? parsed : null; -} -function parseIsoDate(value) { - const trimmed = value.trim(); - const dateOnly = parseDateOnly(trimmed); - if (dateOnly) return dateOnly; - if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z|[+-]\d{2}:\d{2})?$/.test(trimmed)) { - const parsed = new Date(trimmed); - return isNaN(parsed.getTime()) ? null : parsed; - } - return null; -} -function parseNumber(value) { - const trimmed = value.trim(); - if (!/^-?\d+(\.\d+)?$/.test(trimmed)) return null; - const parsed = Number(trimmed); - return isNaN(parsed) ? null : parsed; -} -function escapeRegExp2(input) { - return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); -} - -// src/parsing/properties/tasks_schema.ts -var DATE_FIELDS = [ - { key: "due", label: "Due", emojis: ["\u{1F4C5}"] }, - { key: "scheduled", label: "Scheduled", emojis: ["\u23F3", "\u23F0"] }, - { key: "start", label: "Start", emojis: ["\u{1F6EB}"] }, - { key: "done", label: "Done", emojis: ["\u2705", "\u{1F3C1}"] }, - { key: "created", label: "Created", emojis: ["\u2795"] } -]; -var PRIORITY_VALUES = /* @__PURE__ */ new Map([ - ["\u{1F53A}", 5], - ["\u23EB", 4], - ["\u{1F53C}", 3], - ["\u{1F53D}", 2], - ["\u23EC", 1] -]); -var METADATA_EMOJIS = [ - ...DATE_FIELDS.flatMap((field) => field.emojis), - ...PRIORITY_VALUES.keys(), - "\u{1F501}" -]; -var RECURRENCE_EMOJI = "\u{1F501}"; -var TASKS_PROPERTY_ICONS = { - ...Object.fromEntries(DATE_FIELDS.map((field) => [field.key, field.emojis[0]])), - recurrence: RECURRENCE_EMOJI -}; -function getTasksPriorityEmoji(value) { - for (const [emoji, weight] of PRIORITY_VALUES) { - if (weight === value) return emoji; - } - return void 0; -} -function parseDateFields(rawLine) { - return DATE_FIELDS.flatMap( - (field) => field.emojis.flatMap((emoji) => { - const regex = new RegExp(`${escapeRegExp2(emoji)}\\s*(${DATE_ONLY_PATTERN})`, "gu"); - return [...rawLine.matchAll(regex)].map((match) => { - var _a5, _b3; - return { - index: (_a5 = match.index) != null ? _a5 : Number.MAX_SAFE_INTEGER, - endIndex: ((_b3 = match.index) != null ? _b3 : 0) + match[0].length, - key: field.key, - rawValue: match[0], - value: match[1] ? parseDateOnly(match[1]) : null - }; - }); - }) - ); -} -function parsePriorityFields(rawLine) { - const priorityPattern = Array.from(PRIORITY_VALUES.keys()).map(escapeRegExp2).join("|"); - const regex = new RegExp(priorityPattern, "gu"); - return [...rawLine.matchAll(regex)].map((match) => { - var _a5, _b3, _c2; - return { - index: (_a5 = match.index) != null ? _a5 : Number.MAX_SAFE_INTEGER, - endIndex: ((_b3 = match.index) != null ? _b3 : 0) + match[0].length, - key: "priority", - rawValue: match[0], - value: (_c2 = PRIORITY_VALUES.get(match[0])) != null ? _c2 : null - }; - }); -} -function parseRecurrenceFields(rawLine) { - const metadataPattern = METADATA_EMOJIS.map(escapeRegExp2).join("|"); - const regex = new RegExp(`\u{1F501}\\s*(.+?)(?=\\s*(?:${metadataPattern})(?:\\s*${DATE_ONLY_PATTERN})?|$)`, "gu"); - return [...rawLine.matchAll(regex)].map((match) => { - var _a5, _b3, _c2; - const value = (_b3 = (_a5 = match[1]) == null ? void 0 : _a5.trim()) != null ? _b3 : ""; - const rawValue = match[0].trimEnd(); - const index2 = (_c2 = match.index) != null ? _c2 : Number.MAX_SAFE_INTEGER; - return { - index: index2, - endIndex: index2 + rawValue.length, - key: "recurrence", - rawValue, - value - }; - }).filter((field) => field.value !== ""); -} -var TasksPluginSchema = class { - constructor() { - this.id = "tasks" /* TasksPlugin */; - this.label = "Tasks Plugin"; - } - parseProperties(rawLine) { - const properties = createPropertyMapWithStatus(rawLine); - const parsedFields = [ - ...parseDateFields(rawLine), - ...parsePriorityFields(rawLine), - ...parseRecurrenceFields(rawLine) - ].sort((a, b) => a.index - b.index); - for (const field of parsedFields) { - if (!properties.has(field.key)) { - properties.set(field.key, { - key: field.key, - rawValue: field.rawValue, - value: field.value, - startIndex: field.index, - endIndex: field.endIndex - }); - } - } - return properties; - } - knownKeys() { - return [ - { key: UNIVERSAL_STATUS_PROPERTY_KEY, label: "Status", type: "text" }, - { key: "due", label: "Due", type: "date" }, - { key: "scheduled", label: "Scheduled", type: "date" }, - { key: "start", label: "Start", type: "date" }, - { key: "done", label: "Done", type: "date", aliases: getPropertyAliases("done") }, - { key: "created", label: "Created", type: "date" }, - { key: "priority", label: "Priority", type: "priority" }, - { key: "recurrence", label: "Recurrence", type: "text", aliases: getPropertyAliases("recurrence") } - ]; - } -}; - -// src/parsing/properties/display.ts -var PRIORITY_LABELS = { - 5: "Highest", - 4: "High", - 3: "Medium", - 2: "Low", - 1: "Lowest" -}; -function formatPropertyLabel(key2) { - if (!key2) return key2; - return key2.charAt(0).toUpperCase() + key2.slice(1); -} -function formatPropertyValue(prop2) { - var _a5; - if (prop2.value instanceof Date) { - return prop2.value.toLocaleDateString(void 0, { - month: "short", - day: "numeric", - timeZone: "UTC" - }); - } - if (prop2.key === "priority" && typeof prop2.value === "number") { - return (_a5 = PRIORITY_LABELS[prop2.value]) != null ? _a5 : String(prop2.value); - } - if (prop2.value === null) { - return prop2.rawValue; - } - return String(prop2.value); -} -function tasksIconFor(prop2) { - if (prop2.key === "priority" && typeof prop2.value === "number") { - return getTasksPriorityEmoji(prop2.value); - } - return TASKS_PROPERTY_ICONS[prop2.key]; -} -function stripDisplayedPropertiesFromContent(content, properties) { - let result = content; - for (const [key2, prop2] of properties) { - if (key2 === UNIVERSAL_STATUS_PROPERTY_KEY) continue; - if (!prop2.rawValue) continue; - result = result.split(prop2.rawValue).join(" "); - } - return result.replace(/[ \t]{2,}/g, " ").trim(); -} -function toDisplayProperties(properties) { - const result = []; - for (const [key2, prop2] of properties) { - if (key2 === UNIVERSAL_STATUS_PROPERTY_KEY) continue; - result.push({ - key: key2, - label: formatPropertyLabel(key2), - value: formatPropertyValue(prop2), - icon: tasksIconFor(prop2) - }); - } - return result; -} - // src/ui/components/task_markdown.ts function renderTaskMarkdownSource({ content, @@ -16946,9 +18085,9 @@ function stripTagFromRenderedContent(content, tag2) { } // src/ui/components/task.svelte -var root4 = from_html(``); -var root_12 = from_html(` `); -var root_22 = from_html(``); +var root6 = from_html(``); +var root_14 = from_html(` `); +var root_23 = from_html(``); var root_32 = from_html(``); var root_42 = from_html(`
`); var root_5 = from_html(``); @@ -16959,27 +18098,36 @@ var root_9 = from_html(`
 `);
 var root_11 = from_html(` `);
 var root_122 = from_html(`  `);
-var root_13 = from_html(`
`); -var root_14 = from_html(``); -var root_15 = from_html(`
`); -var $$css4 = { +var root_132 = from_html(`
`); +var root_142 = from_html(` `); +var root_15 = from_html(` `, 1); +var root_16 = from_html(`
`); +var root_17 = from_html(``); +var root_18 = from_html(`
`); +var $$css6 = { hash: "svelte-1fvsaoa", - code: '.task.svelte-1fvsaoa {--task-accent: var(--task-accent-color, var(--background-modifier-border-hover));position:relative;overflow:hidden;background:var(--background-primary);border-radius:var(--radius-s);border:var(--border-width) solid var(--background-modifier-border);cursor:grab;box-shadow:0 1px 2px rgba(0, 0, 0, 0.06);transition:border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;}.task.svelte-1fvsaoa::before {content:"";position:absolute;inset:0 auto 0 0;width:8px;background:var(--task-accent);}.task.svelte-1fvsaoa:hover {border-color:color-mix(in srgb, var(--text-muted) 45%, var(--background-modifier-border));box-shadow:0 8px 22px rgba(0, 0, 0, 0.08);transform:translateY(-1px);}.task.is-dragging.svelte-1fvsaoa {opacity:0.15;}.task.is-selected.svelte-1fvsaoa {border-color:var(--interactive-accent);background:color-mix(in srgb, var(--interactive-accent) 8%, var(--background-primary));}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) {padding:var(--size-4-2) var(--size-4-2) var(--size-4-2) calc(var(--size-4-2) + 8px);display:flex;gap:var(--size-2-3);align-items:flex-start;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-left:where(.svelte-1fvsaoa) {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:18px;height:18px;margin-top:2px;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) {flex:1;min-width:0;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) textarea:where(.svelte-1fvsaoa) {cursor:text;background-color:var(--color-base-25);width:100%;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) .content-preview:where(.svelte-1fvsaoa) {min-height:1.5rem;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) .content-preview:where(.svelte-1fvsaoa):focus {box-shadow:0 0 0 3px var(--background-modifier-border-focus);}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-right:where(.svelte-1fvsaoa) {display:flex;align-items:center;flex-shrink:0;margin-top:-4px;}.task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa) {display:flex;justify-content:center;align-items:center;width:22px;height:22px;padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-s);transition:opacity 0.2s ease;box-shadow:none;}.task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa):hover, .task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa):active {background:transparent;box-shadow:none;}.task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:2px;}.task.svelte-1fvsaoa .icon-button.select-task:where(.svelte-1fvsaoa):hover svg {opacity:0.8 !important;color:var(--interactive-accent);}.task.svelte-1fvsaoa .icon-button.select-task.is-selected:where(.svelte-1fvsaoa) svg {color:var(--interactive-accent);}.task.svelte-1fvsaoa .icon-button.pin-marker:where(.svelte-1fvsaoa) svg {color:var(--interactive-accent);}.task.svelte-1fvsaoa .icon-button.pin-marker:where(.svelte-1fvsaoa):hover svg {opacity:1 !important;}.task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) {color:var(--text-normal);}.task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) .source-status-checkbox:where(.svelte-1fvsaoa), .task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) .status-text-marker:where(.svelte-1fvsaoa) {display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;min-width:18px;min-height:18px;margin:0 !important;padding:0 !important;pointer-events:none;line-height:1;}.task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) .status-text-marker:where(.svelte-1fvsaoa) {font-size:15px;}.task.svelte-1fvsaoa .drag-handle:where(.svelte-1fvsaoa) {display:flex;align-items:center;justify-content:center;width:22px;height:22px;cursor:grab;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) {border-top:var(--border-width) solid var(--background-modifier-border);padding:var(--size-2-3) var(--size-4-2) var(--size-2-3) calc(var(--size-4-2) + 8px);}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa) {display:flex;align-items:center;justify-content:flex-start;gap:var(--size-2-1);width:100%;padding:0;border:none;background:transparent;cursor:pointer;text-align:left;box-shadow:none;transition:opacity 0.2s ease;border-radius:var(--radius-s);}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):hover {background:transparent;box-shadow:none;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):hover svg {opacity:1 !important;color:var(--interactive-accent);}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):hover .file-path:where(.svelte-1fvsaoa) {color:var(--interactive-accent);}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:2px;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa) .file-path:where(.svelte-1fvsaoa) {margin:0;font-size:var(--font-ui-smaller);color:var(--text-muted);transition:color 0.2s ease;overflow-wrap:anywhere;white-space:normal;flex:1;min-width:0;line-height:1.2;}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) {display:flex;flex-wrap:wrap;gap:var(--size-2-1);padding:0 var(--size-4-2) var(--size-4-2) calc(var(--size-4-2) + 8px);margin-top:calc(-1 * var(--size-2-2));}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa) {background-color:var(--background-secondary);color:var(--text-muted);border:1px solid var(--background-modifier-border);border-radius:var(--radius-s);padding:1px 5px;font-size:var(--font-ui-smaller);line-height:1.1;display:inline-flex;align-items:center;transition:color 0.15s ease, border-color 0.15s ease;}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa):hover {color:var(--text-normal);border-color:var(--text-muted);}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa) .cm-formatting-hashtag {color:var(--text-accent) !important;font-weight:var(--font-medium);margin-right:1px;}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa) .cm-hashtag-end {color:inherit !important;}.task.svelte-1fvsaoa .task-properties-debug:where(.svelte-1fvsaoa) {padding:var(--size-2-3) var(--size-4-2) var(--size-2-3) calc(var(--size-4-2) + 8px);border-top:var(--border-width) solid var(--background-modifier-border);background-color:var(--background-secondary-alt);font-size:var(--font-ui-smaller);overflow-x:auto;}.task.svelte-1fvsaoa .task-properties-debug:where(.svelte-1fvsaoa) pre:where(.svelte-1fvsaoa) {margin:0;}.task.svelte-1fvsaoa .task-properties:where(.svelte-1fvsaoa) {display:flex;flex-wrap:wrap;gap:var(--size-2-2);padding:var(--size-2-3) var(--size-4-2) var(--size-2-3) calc(var(--size-4-2) + 8px);border-top:var(--border-width) solid var(--background-modifier-border);font-size:var(--font-ui-smaller);}.task.svelte-1fvsaoa .task-property:where(.svelte-1fvsaoa) {display:inline-flex;align-items:baseline;gap:var(--size-2-1);padding:0 var(--size-2-2);border-radius:var(--radius-s);background-color:var(--background-secondary-alt);line-height:var(--line-height-tight);}.task.svelte-1fvsaoa .task-property-label:where(.svelte-1fvsaoa) {color:var(--text-muted);text-transform:uppercase;font-size:var(--font-smallest);letter-spacing:0.02em;}.task.svelte-1fvsaoa .task-property-icon:where(.svelte-1fvsaoa) {font-size:var(--font-ui-smaller);line-height:1;}.task.svelte-1fvsaoa .task-property-value:where(.svelte-1fvsaoa) {color:var(--text-normal);}.task-row-content img {max-width:100%;max-height:160px;object-fit:contain;}.task-row-content code {white-space:pre-wrap;}.task-row-content .content-preview,\n.task-row-content .content-preview > ul,\n.task-row-content .content-preview > ul > li,\n.task-row-content .content-preview > ul > li > p {margin:0;}.task .task-row-content .content-preview > ul {padding-left:0 !important;margin:0 !important;list-style:none !important;}.task-row-content .content-preview .task-list-item {min-width:0;word-break:break-word;padding-left:0 !important;list-style-type:none !important;}.task-row-content input.task-nested-checkbox {pointer-events:none;}.task-row-content .content-preview .task-list-item > input[type="checkbox"].task-primary-checkbox {display:none !important;}.task-row-content .content-preview .task-list-item > *:not(input[type="checkbox"]) {min-width:0;}' + code: '.task.svelte-1fvsaoa {--task-accent: var(--task-accent-color, var(--background-modifier-border-hover));--task-footer-line-height: 1.15;--task-footer-block-padding: 2px;position:relative;overflow:hidden;background:var(--background-primary);border-radius:var(--radius-s);border:var(--border-width) solid var(--background-modifier-border);cursor:grab;box-shadow:0 1px 2px rgba(0, 0, 0, 0.06);transition:border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;}.task.svelte-1fvsaoa::before {content:"";position:absolute;inset:0 auto 0 0;width:8px;background:var(--task-accent);}.task.svelte-1fvsaoa:hover {border-color:color-mix(in srgb, var(--text-muted) 45%, var(--background-modifier-border));box-shadow:0 8px 22px rgba(0, 0, 0, 0.08);transform:translateY(-1px);}.task.is-dragging.svelte-1fvsaoa {opacity:0.15;}.task.is-selected.svelte-1fvsaoa {border-color:var(--interactive-accent);background:color-mix(in srgb, var(--interactive-accent) 8%, var(--background-primary));}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) {padding:var(--size-4-2) var(--size-4-2) var(--size-4-2) calc(var(--size-4-2) + 8px);display:flex;gap:var(--size-2-3);align-items:flex-start;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-left:where(.svelte-1fvsaoa) {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:18px;height:18px;margin-top:2px;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) {flex:1;min-width:0;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) textarea:where(.svelte-1fvsaoa) {cursor:text;background-color:var(--color-base-25);width:100%;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) .content-preview:where(.svelte-1fvsaoa) {min-height:1.5rem;}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-content:where(.svelte-1fvsaoa) .content-preview:where(.svelte-1fvsaoa):focus {box-shadow:0 0 0 3px var(--background-modifier-border-focus);}.task.svelte-1fvsaoa .task-row:where(.svelte-1fvsaoa) .task-row-right:where(.svelte-1fvsaoa) {display:flex;align-items:center;flex-shrink:0;margin-top:-4px;}.task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa) {display:flex;justify-content:center;align-items:center;width:22px;height:22px;padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-s);transition:opacity 0.2s ease;box-shadow:none;}.task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa):hover, .task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa):active {background:transparent;box-shadow:none;}.task.svelte-1fvsaoa .icon-button:where(.svelte-1fvsaoa):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:2px;}.task.svelte-1fvsaoa .icon-button.select-task:where(.svelte-1fvsaoa):hover svg {opacity:0.8 !important;color:var(--interactive-accent);}.task.svelte-1fvsaoa .icon-button.select-task.is-selected:where(.svelte-1fvsaoa) svg {color:var(--interactive-accent);}.task.svelte-1fvsaoa .icon-button.pin-marker:where(.svelte-1fvsaoa) svg {color:var(--interactive-accent);}.task.svelte-1fvsaoa .icon-button.pin-marker:where(.svelte-1fvsaoa):hover svg {opacity:1 !important;}.task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) {color:var(--text-normal);}.task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) .source-status-checkbox:where(.svelte-1fvsaoa), .task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) .status-text-marker:where(.svelte-1fvsaoa) {display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;min-width:18px;min-height:18px;margin:0 !important;padding:0 !important;pointer-events:none;line-height:1;}.task.svelte-1fvsaoa .icon-button.usesStatusMarker:where(.svelte-1fvsaoa) .status-text-marker:where(.svelte-1fvsaoa) {font-size:15px;}.task.svelte-1fvsaoa .drag-handle:where(.svelte-1fvsaoa) {display:flex;align-items:center;justify-content:center;width:22px;height:22px;cursor:grab;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) {border-top:var(--border-width) solid var(--background-modifier-border);padding:var(--task-footer-block-padding) var(--size-4-2) var(--task-footer-block-padding) calc(var(--size-4-2) + 8px);font-size:var(--font-ui-smaller);line-height:var(--task-footer-line-height);display:flex;align-items:center;min-height:0;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa) {display:inline-flex;align-items:center;justify-content:flex-start;gap:var(--size-2-1);width:auto;max-width:100%;padding:0;min-height:0;height:auto;border:none;background:transparent;cursor:pointer;text-align:left;box-shadow:none;transition:opacity 0.2s ease;border-radius:var(--radius-s);font:inherit;line-height:inherit;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):hover {background:transparent;box-shadow:none;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):hover svg {opacity:1 !important;color:var(--interactive-accent);}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):hover .file-path:where(.svelte-1fvsaoa) {color:var(--interactive-accent);}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa):focus-visible {outline:2px solid var(--background-modifier-border-focus);outline-offset:2px;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa) .file-path:where(.svelte-1fvsaoa) {margin:0;color:var(--text-muted);transition:color 0.2s ease;overflow-wrap:anywhere;white-space:normal;min-width:0;line-height:inherit;}.task.svelte-1fvsaoa .task-footer:where(.svelte-1fvsaoa) .go-to-file-button:where(.svelte-1fvsaoa) svg {width:1em;height:1em;}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) {display:flex;flex-wrap:wrap;gap:var(--size-2-1);padding:0 var(--size-4-2) var(--size-4-2) calc(var(--size-4-2) + 8px);margin-top:calc(-1 * var(--size-2-2));}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa) {background-color:var(--background-secondary);color:var(--text-muted);border:1px solid var(--background-modifier-border);border-radius:var(--radius-s);padding:1px 5px;font-size:var(--font-ui-smaller);line-height:1.1;display:inline-flex;align-items:center;transition:color 0.15s ease, border-color 0.15s ease;}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa):hover {color:var(--text-normal);border-color:var(--text-muted);}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa) .cm-formatting-hashtag {color:var(--text-accent) !important;font-weight:var(--font-medium);margin-right:1px;}.task.svelte-1fvsaoa .task-tags:where(.svelte-1fvsaoa) span:where(.svelte-1fvsaoa) .cm-hashtag-end {color:inherit !important;}.task.svelte-1fvsaoa .task-properties-debug:where(.svelte-1fvsaoa) {padding:var(--size-2-3) var(--size-4-2) var(--size-2-3) calc(var(--size-4-2) + 8px);border-top:var(--border-width) solid var(--background-modifier-border);background-color:var(--background-secondary-alt);font-size:var(--font-ui-smaller);overflow-x:auto;}.task.svelte-1fvsaoa .task-properties-debug:where(.svelte-1fvsaoa) pre:where(.svelte-1fvsaoa) {margin:0;}.task.svelte-1fvsaoa .task-properties:where(.svelte-1fvsaoa) {display:flex;flex-wrap:wrap;gap:var(--size-2-2);padding:var(--task-footer-block-padding) var(--size-4-2) var(--task-footer-block-padding) calc(var(--size-4-2) + 8px);border-top:var(--border-width) solid var(--background-modifier-border);font-size:var(--font-ui-smaller);line-height:var(--task-footer-line-height);}.task.svelte-1fvsaoa .task-date-properties:where(.svelte-1fvsaoa) {align-items:center;}.task.svelte-1fvsaoa .task-date-properties:where(.svelte-1fvsaoa) .edit-mode {flex-basis:100%;}.task.svelte-1fvsaoa .task-property:where(.svelte-1fvsaoa) {display:inline-flex;align-items:baseline;gap:var(--size-2-1);padding:0 var(--size-2-2);border-radius:var(--radius-s);background-color:var(--background-secondary-alt);line-height:inherit;}.task.svelte-1fvsaoa .task-property-label:where(.svelte-1fvsaoa) {color:var(--text-muted);text-transform:uppercase;font-size:var(--font-smallest);letter-spacing:0.02em;}.task.svelte-1fvsaoa .task-property.dataview-property:where(.svelte-1fvsaoa) .task-property-label:where(.svelte-1fvsaoa) {text-transform:none;letter-spacing:0;}.task.svelte-1fvsaoa .task-property-icon:where(.svelte-1fvsaoa) {font-size:inherit;line-height:1;}.task.svelte-1fvsaoa .task-property-value:where(.svelte-1fvsaoa) {color:var(--text-normal);}.task-row-content img {max-width:100%;max-height:160px;object-fit:contain;}.task-row-content code {white-space:pre-wrap;}.task-row-content .content-preview,\n.task-row-content .content-preview > ul,\n.task-row-content .content-preview > ul > li,\n.task-row-content .content-preview > ul > li > p {margin:0;}.task .task-row-content .content-preview > ul {padding-left:0 !important;margin:0 !important;list-style:none !important;}.task-row-content .content-preview .task-list-item {min-width:0;word-break:break-word;padding-left:0 !important;list-style-type:none !important;}.task-row-content input.task-nested-checkbox {pointer-events:none;}.task-row-content .content-preview .task-list-item > input[type="checkbox"].task-primary-checkbox {display:none !important;}.task-row-content .content-preview .task-list-item > *:not(input[type="checkbox"]) {min-width:0;}' }; function Task2($$anchor, $$props) { if (new.target) return createClassComponent({ component: Task2, ...$$anchor }); push($$props, false); - append_styles($$anchor, $$css4); + append_styles($$anchor, $$css6); const displayStatusIsCustom = mutable_source(); const excludedTagNames = mutable_source(); const visibleTags = mutable_source(); const shouldconsolidateTags = mutable_source(); + const dateEditingEnabled = mutable_source(); + const displayProperties = mutable_source(); + const dateDisplayProperties = mutable_source(); + const nonDateDisplayProperties = mutable_source(); + const dateProperties = mutable_source(); let app = prop($$props, "app", 12); let task = prop($$props, "task", 12); let taskActions = prop($$props, "taskActions", 12); let columnTagTableStore = prop($$props, "columnTagTableStore", 12); let showFilepath = prop($$props, "showFilepath", 12); let propertyDisplay = prop($$props, "propertyDisplay", 28, () => "none" /* None */); + let propertySchemaOption = prop($$props, "propertySchemaOption", 28, () => "none" /* None */); let consolidateTags = prop($$props, "consolidateTags", 12); let excludedTags = prop($$props, "excludedTags", 28, () => []); let displayColumn = prop($$props, "displayColumn", 12); @@ -17063,6 +18211,8 @@ function Task2($$anchor, $$props) { let textAreaEl = mutable_source(); let previewContainerEl = mutable_source(); let markdownComponent; + let isEditingDates = mutable_source(false); + const editableDatePropertyKeys = /* @__PURE__ */ new Set(["due", "scheduled", "start"]); const interactiveTagNames = /* @__PURE__ */ new Set([ "a", "button", @@ -17117,7 +18267,14 @@ function Task2($$anchor, $$props) { ); } function renderTaskMarkdown() { - const body = propertyDisplay() === "pretty" /* Pretty */ && task().properties ? stripDisplayedPropertiesFromContent(task().content, task().properties) : task().content; + let body = task().content; + if (task().properties) { + if (propertyDisplay() === "pretty" /* Pretty */) { + body = stripDisplayedPropertiesFromContent(body, task().properties); + } else if (get(dateEditingEnabled)) { + body = stripDisplayedPropertiesFromContent(body, get(dateProperties)); + } + } return renderTaskMarkdownSource({ content: body, displayStatus: task().displayStatus, @@ -17249,6 +18406,28 @@ function Task2($$anchor, $$props) { legacy_pre_effect(() => (deep_read_state(consolidateTags()), get(visibleTags)), () => { set(shouldconsolidateTags, consolidateTags() && get(visibleTags).length > 0); }); + legacy_pre_effect( + () => (getPropertyWriteAdapter, deep_read_state(propertySchemaOption())), + () => { + set(dateEditingEnabled, getPropertyWriteAdapter(propertySchemaOption()) !== null); + } + ); + legacy_pre_effect(() => (deep_read_state(task()), toDisplayProperties), () => { + set(displayProperties, task().properties ? toDisplayProperties(task().properties) : []); + }); + legacy_pre_effect( + () => (get(dateEditingEnabled), get(displayProperties), deep_read_state(propertySchemaOption()), PropertySchemaOption), + () => { + set(dateDisplayProperties, get(dateEditingEnabled) ? get(displayProperties).filter((prop2) => editableDatePropertyKeys.has(prop2.key)).map((prop2) => propertySchemaOption() === "dataview" /* Dataview */ ? { ...prop2, icon: void 0, label: `${prop2.key}::` } : prop2) : []); + } + ); + legacy_pre_effect(() => get(displayProperties), () => { + set(nonDateDisplayProperties, get(displayProperties).filter((prop2) => !editableDatePropertyKeys.has(prop2.key))); + }); + legacy_pre_effect(() => deep_read_state(task()), () => { + var _a5, _b3; + set(dateProperties, new Map(Array.from((_b3 = (_a5 = task().properties) == null ? void 0 : _a5.entries()) != null ? _b3 : []).filter(([key2]) => editableDatePropertyKeys.has(key2)))); + }); legacy_pre_effect_reset(); var $$exports = { get app() { @@ -17293,6 +18472,13 @@ function Task2($$anchor, $$props) { propertyDisplay($$value); flushSync(); }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + set propertySchemaOption($$value) { + propertySchemaOption($$value); + flushSync(); + }, get consolidateTags() { return consolidateTags(); }, @@ -17402,7 +18588,7 @@ function Task2($$anchor, $$props) { $on: ($$event_name, $$event_cb) => add_legacy_event_listener($$props, $$event_name, $$event_cb) }; init(); - var div = root_15(); + var div = root_18(); let classes; let styles; var div_1 = child(div); @@ -17410,7 +18596,7 @@ function Task2($$anchor, $$props) { var node = child(div_2); { var consequent = ($$anchor2) => { - var button = root4(); + var button = root6(); let classes_1; var node_1 = child(button); { @@ -17446,7 +18632,7 @@ function Task2($$anchor, $$props) { append($$anchor2, button); }; var alternate_2 = ($$anchor2) => { - var button_1 = root4(); + var button_1 = root6(); let classes_2; var node_2 = child(button_1); { @@ -17455,7 +18641,7 @@ function Task2($$anchor, $$props) { var node_3 = first_child(fragment); { var consequent_1 = ($$anchor4) => { - var span = root_12(); + var span = root_14(); var text2 = child(span, true); reset(span); template_effect(() => set_text(text2, (deep_read_state(task()), untrack(() => task().displayStatus)))); @@ -17463,7 +18649,7 @@ function Task2($$anchor, $$props) { }; var d = user_derived(() => (deep_read_state(task()), untrack(() => shouldRenderStatusAsText(task().displayStatus)))); var alternate = ($$anchor4) => { - var span_1 = root_22(); + var span_1 = root_23(); template_effect(() => set_attribute2(span_1, "data-task", (deep_read_state(task()), untrack(() => task().displayStatus)))); append($$anchor4, span_1); }; @@ -17650,13 +18836,12 @@ function Task2($$anchor, $$props) { append($$anchor2, div_7); }; var consequent_10 = ($$anchor2) => { - const displayProperties = derived_safe_equal(() => (deep_read_state(toDisplayProperties), deep_read_state(task()), untrack(() => toDisplayProperties(task().properties)))); var fragment_2 = comment(); var node_12 = first_child(fragment_2); { var consequent_9 = ($$anchor3) => { - var div_8 = root_13(); - each(div_8, 5, () => get(displayProperties), (prop2) => prop2.key, ($$anchor4, prop2) => { + var div_8 = root_132(); + each(div_8, 5, () => get(nonDateDisplayProperties), (prop2) => prop2.key, ($$anchor4, prop2) => { var span_5 = root_122(); var node_13 = child(span_5); { @@ -17694,7 +18879,7 @@ function Task2($$anchor, $$props) { append($$anchor3, div_8); }; if_block(node_12, ($$render) => { - if (deep_read_state(get(displayProperties)), untrack(() => get(displayProperties).length > 0)) $$render(consequent_9); + if (get(nonDateDisplayProperties), untrack(() => get(nonDateDisplayProperties).length > 0)) $$render(consequent_9); }); } append($$anchor2, fragment_2); @@ -17706,17 +18891,125 @@ function Task2($$anchor, $$props) { } var node_14 = sibling(node_11, 2); { - var consequent_11 = ($$anchor2) => { - var div_9 = root_14(); - var button_3 = child(div_9); - var node_15 = child(button_3); - Icon(node_15, { name: "lucide-arrow-up-right", size: 18, opacity: 0.5 }); - var span_9 = sibling(node_15, 2); - var text_6 = child(span_9, true); - reset(span_9); - reset(button_3); + var consequent_13 = ($$anchor2) => { + var div_9 = root_16(); + var node_15 = child(div_9); + { + var consequent_12 = ($$anchor3) => { + var fragment_3 = root_15(); + var node_16 = first_child(fragment_3); + TaskDateFields(node_16, { + get task() { + return task(); + }, + get taskActions() { + return taskActions(); + }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + get isTaskEditing() { + return get(isEditing); + }, + get isEditingDates() { + return get(isEditingDates); + }, + set isEditingDates($$value) { + set(isEditingDates, $$value); + }, + $$legacy: true + }); + var node_17 = sibling(node_16, 2); + each(node_17, 1, () => get(dateDisplayProperties), (prop2) => prop2.key, ($$anchor4, prop2) => { + var span_9 = root_142(); + let classes_4; + var node_18 = child(span_9); + { + var consequent_11 = ($$anchor5) => { + var span_10 = root_10(); + var text_6 = child(span_10, true); + reset(span_10); + template_effect(() => { + set_attribute2(span_10, "title", (get(prop2), untrack(() => get(prop2).label))); + set_attribute2(span_10, "aria-label", (get(prop2), untrack(() => get(prop2).label))); + set_text(text_6, (get(prop2), untrack(() => get(prop2).icon))); + }); + append($$anchor5, span_10); + }; + var alternate_5 = ($$anchor5) => { + var span_11 = root_11(); + var text_7 = child(span_11, true); + reset(span_11); + template_effect(() => set_text(text_7, (get(prop2), untrack(() => get(prop2).label)))); + append($$anchor5, span_11); + }; + if_block(node_18, ($$render) => { + if (get(prop2), untrack(() => get(prop2).icon)) $$render(consequent_11); + else $$render(alternate_5, -1); + }); + } + var span_12 = sibling(node_18, 2); + var text_8 = child(span_12, true); + reset(span_12); + reset(span_9); + template_effect(() => { + classes_4 = set_class(span_9, 1, "task-property svelte-1fvsaoa", null, classes_4, { + "dataview-property": propertySchemaOption() === "dataview" /* Dataview */ + }); + set_text(text_8, (get(prop2), untrack(() => get(prop2).value))); + }); + append($$anchor4, span_9); + }); + append($$anchor3, fragment_3); + }; + var alternate_6 = ($$anchor3) => { + TaskDateFields($$anchor3, { + get task() { + return task(); + }, + get taskActions() { + return taskActions(); + }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + get isTaskEditing() { + return get(isEditing); + }, + get isEditingDates() { + return get(isEditingDates); + }, + set isEditingDates($$value) { + set(isEditingDates, $$value); + }, + $$legacy: true + }); + }; + if_block(node_15, ($$render) => { + if (!get(isEditingDates)) $$render(consequent_12); + else $$render(alternate_6, -1); + }); + } reset(div_9); - template_effect(() => set_text(text_6, (deep_read_state(task()), untrack(() => task().path)))); + append($$anchor2, div_9); + }; + if_block(node_14, ($$render) => { + if (get(dateEditingEnabled)) $$render(consequent_13); + }); + } + var node_19 = sibling(node_14, 2); + { + var consequent_14 = ($$anchor2) => { + var div_10 = root_17(); + var button_3 = child(div_10); + var node_20 = child(button_3); + Icon(node_20, { name: "lucide-arrow-up-right", size: 18, opacity: 0.5 }); + var span_13 = sibling(node_20, 2); + var text_9 = child(span_13, true); + reset(span_13); + reset(button_3); + reset(div_10); + template_effect(() => set_text(text_9, (deep_read_state(task()), untrack(() => task().path)))); event("click", button_3, (e) => taskActions().viewFile(task().id, e)); event("keydown", button_3, (e) => { if (e.key === "Enter" || e.key === " ") { @@ -17724,10 +19017,10 @@ function Task2($$anchor, $$props) { taskActions().viewFile(task().id, e); } }); - append($$anchor2, div_9); + append($$anchor2, div_10); }; - if_block(node_14, ($$render) => { - if (showFilepath()) $$render(consequent_11); + if_block(node_19, ($$render) => { + if (showFilepath()) $$render(consequent_14); }); } reset(div); @@ -17879,20 +19172,21 @@ function ensureRowBlockLink(row, existing) { } // src/ui/board/BoardCell.svelte -var root5 = from_html(`(default)`); -var root_16 = from_html(`
\u2192
`); -var root_23 = from_html(`
`, 1); -var root_33 = from_html(`
`); -var root_43 = from_html(`
`); -var root_52 = from_html(`
`); -var $$css5 = { +var root7 = from_html(`(default)`); +var root_19 = from_html(`
\u2192
`); +var root_24 = from_html(`
`, 1); +var root_33 = from_html(`
`); +var root_43 = from_html(`
`); +var root_52 = from_html(`
`); +var root_62 = from_html(`
`); +var $$css7 = { hash: "svelte-xi2aql", - code: '.tasks-wrapper.svelte-xi2aql {display:flex;flex-direction:column;height:100%;min-height:100%;border:var(--border-width) solid transparent;border-radius:var(--radius-s);\n /* The wrapper should be invisible if collapsed in horizontal mode */}.tasks-wrapper.collapsed.svelte-xi2aql {display:none;}.tasks-wrapper.vertical-collapsed.svelte-xi2aql {display:none;}.tasks-wrapper.vertical-flow.svelte-xi2aql {width:100%;display:flex;flex-direction:column;gap:var(--size-4-2);}.tasks-wrapper.vertical-flow.svelte-xi2aql .tasks:where(.svelte-xi2aql) {flex-direction:row;flex-wrap:wrap;align-items:flex-start;}.tasks-wrapper.vertical-flow.svelte-xi2aql .tasks:where(.svelte-xi2aql) .task {width:min(var(--column-width, 300px), 100%);flex-shrink:0;}.tasks-wrapper.drop-active.svelte-xi2aql .tasks:where(.svelte-xi2aql) {opacity:0.4;}.tasks-wrapper.drop-hover.svelte-xi2aql {border-color:color-mix(in srgb, var(--column-color, var(--interactive-accent)) 75%, transparent);background:color-mix(in srgb, var(--column-color, var(--interactive-accent)) 10%, transparent);}.tasks-wrapper.svelte-xi2aql .tasks:where(.svelte-xi2aql) {display:flex;flex-direction:column;gap:var(--size-4-2);padding-top:var(--size-4-2);}.tasks-wrapper.svelte-xi2aql .task-slot:where(.svelte-xi2aql) {position:relative;}.tasks-wrapper.svelte-xi2aql .task-slot.drop-before:where(.svelte-xi2aql)::before, .tasks-wrapper.svelte-xi2aql .task-slot.drop-after:where(.svelte-xi2aql)::after {content:"";position:absolute;left:0;right:0;height:2px;background:var(--column-color, var(--interactive-accent));border-radius:1px;}.tasks-wrapper.svelte-xi2aql .task-slot.drop-before:where(.svelte-xi2aql)::before {top:calc(-1 * var(--size-4-1));}.tasks-wrapper.svelte-xi2aql .task-slot.drop-after:where(.svelte-xi2aql)::after {bottom:calc(-1 * var(--size-4-1));}.tasks-wrapper.svelte-xi2aql .new-task-input:where(.svelte-xi2aql) {margin-top:var(--size-4-3);background-color:var(--background-primary);border-radius:var(--radius-s);border:var(--border-width) solid var(--background-modifier-border);padding:var(--size-4-2);}.tasks-wrapper.svelte-xi2aql .new-task-input:where(.svelte-xi2aql) textarea:where(.svelte-xi2aql) {cursor:text;background-color:var(--color-base-25);width:100%;}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql) {display:flex;align-items:center;align-self:flex-start;cursor:pointer;border:0;border-radius:0;box-shadow:none;margin:0;min-height:26px;padding:2px var(--size-4-2);font-size:var(--font-ui-small);font-weight:var(--font-medium);line-height:1.2;}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql) span:where(.svelte-xi2aql) {display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;flex:0 0 15px;}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql) span:where(.svelte-xi2aql) svg {width:15px;height:15px;display:block;}.tasks-wrapper.svelte-xi2aql .add-new-controls:where(.svelte-xi2aql) {display:inline-flex;align-items:center;align-self:flex-start;border:var(--border-width) solid var(--background-modifier-border);border-radius:var(--radius-s);overflow:hidden;background-color:var(--interactive-normal);box-shadow:0 1px 2px rgba(0, 0, 0, 0.06);}.tasks-wrapper.svelte-xi2aql .add-new-picker-btn {flex-shrink:0;width:28px;height:26px;border:0;border-left:var(--border-width) solid var(--background-modifier-border);border-radius:0;box-shadow:none;margin:0;background-color:transparent;}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql),\n.tasks-wrapper.svelte-xi2aql .add-new-picker-btn {background-color:transparent;}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql):hover:not(:disabled),\n.tasks-wrapper.svelte-xi2aql .add-new-picker-btn:hover:not(:disabled) {background-color:var(--interactive-hover);}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql):active:not(:disabled),\n.tasks-wrapper.svelte-xi2aql .add-new-picker-btn:active:not(:disabled) {background-color:var(--interactive-accent-hover);}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) {display:flex;align-items:center;gap:var(--size-2-1);font-size:var(--font-ui-small);color:var(--text-muted);margin-top:var(--size-2-1);}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) .file-indicator-arrow:where(.svelte-xi2aql) {flex-shrink:0;}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) .file-indicator-name:where(.svelte-xi2aql) {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) .file-indicator-label:where(.svelte-xi2aql) {white-space:nowrap;}' + code: '.tasks-wrapper.svelte-xi2aql {display:flex;flex-direction:column;height:100%;min-height:100%;border:var(--border-width) solid transparent;border-radius:var(--radius-s);\n /* The wrapper should be invisible if collapsed in horizontal mode */}.tasks-wrapper.collapsed.svelte-xi2aql {display:none;}.tasks-wrapper.vertical-collapsed.svelte-xi2aql {display:none;}.tasks-wrapper.vertical-flow.svelte-xi2aql {width:100%;display:flex;flex-direction:column;gap:var(--size-4-2);}.tasks-wrapper.vertical-flow.svelte-xi2aql .tasks:where(.svelte-xi2aql) {order:1;flex-direction:row;flex-wrap:nowrap;align-items:flex-start;min-width:max-content;}.tasks-wrapper.vertical-flow.svelte-xi2aql .tasks:where(.svelte-xi2aql) .task {width:var(--column-width, 300px);flex-shrink:0;}.tasks-wrapper.vertical-flow.svelte-xi2aql .task-slot:where(.svelte-xi2aql) {flex:0 0 var(--column-width, 300px);}.tasks-wrapper.vertical-flow.svelte-xi2aql .new-task-input:where(.svelte-xi2aql) {order:4;width:var(--column-width, 300px);box-sizing:border-box;}.tasks-wrapper.vertical-flow.svelte-xi2aql .add-new-controls:where(.svelte-xi2aql) {order:2;}.tasks-wrapper.vertical-flow.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) {order:3;}.tasks-wrapper.drop-active.svelte-xi2aql .tasks:where(.svelte-xi2aql) {opacity:0.4;}.tasks-wrapper.drop-hover.svelte-xi2aql {border-color:color-mix(in srgb, var(--column-color, var(--interactive-accent)) 75%, transparent);background:color-mix(in srgb, var(--column-color, var(--interactive-accent)) 10%, transparent);}.tasks-wrapper.svelte-xi2aql .tasks:where(.svelte-xi2aql) {display:flex;flex-direction:column;gap:var(--size-4-2);padding-top:var(--size-4-2);}.tasks-wrapper.svelte-xi2aql .task-slot:where(.svelte-xi2aql) {position:relative;}.tasks-wrapper.svelte-xi2aql .task-slot.drop-before:where(.svelte-xi2aql)::before, .tasks-wrapper.svelte-xi2aql .task-slot.drop-after:where(.svelte-xi2aql)::after {content:"";position:absolute;left:0;right:0;height:2px;background:var(--column-color, var(--interactive-accent));border-radius:1px;}.tasks-wrapper.svelte-xi2aql .task-slot.drop-before:where(.svelte-xi2aql)::before {top:calc(-1 * var(--size-4-1));}.tasks-wrapper.svelte-xi2aql .task-slot.drop-after:where(.svelte-xi2aql)::after {bottom:calc(-1 * var(--size-4-1));}.tasks-wrapper.svelte-xi2aql .new-task-input:where(.svelte-xi2aql) {margin-top:var(--size-4-3);background-color:var(--background-primary);border-radius:var(--radius-s);border:var(--border-width) solid var(--background-modifier-border);padding:var(--size-4-2);}.tasks-wrapper.svelte-xi2aql .new-task-input:where(.svelte-xi2aql) textarea:where(.svelte-xi2aql) {cursor:text;background-color:var(--color-base-25);width:100%;}.tasks-wrapper.svelte-xi2aql .new-task-date-fields:where(.svelte-xi2aql) {margin-top:var(--size-2-3);}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql) {display:inline-flex;align-items:center;gap:var(--size-2-1);align-self:flex-start;cursor:pointer;border:0;border-radius:var(--radius-s);box-shadow:none;margin:0;min-height:26px;padding:0;background:transparent;color:var(--text-accent);font-size:var(--font-ui-small);font-weight:var(--font-medium);line-height:1.2;}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql) span:where(.svelte-xi2aql) {display:inline-flex;align-items:center;justify-content:center;font-size:var(--font-ui-medium);line-height:1;}.tasks-wrapper.svelte-xi2aql .add-new-controls:where(.svelte-xi2aql) {display:inline-flex;align-items:center;gap:var(--size-2-1);align-self:flex-start;border:0;background:transparent;box-shadow:none;}.tasks-wrapper.svelte-xi2aql .add-new-picker-btn {flex-shrink:0;width:22px;height:26px;border:0;border-radius:var(--radius-s);box-shadow:none;margin:0;background-color:transparent;color:var(--text-accent);}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql),\n.tasks-wrapper.svelte-xi2aql .add-new-picker-btn {background-color:transparent;}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql):hover:not(:disabled),\n.tasks-wrapper.svelte-xi2aql .add-new-picker-btn:hover:not(:disabled) {background-color:transparent;color:var(--text-accent-hover);}.tasks-wrapper.svelte-xi2aql .add-new-btn:where(.svelte-xi2aql):active:not(:disabled),\n.tasks-wrapper.svelte-xi2aql .add-new-picker-btn:active:not(:disabled) {background-color:transparent;color:var(--text-accent-hover);}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) {display:flex;align-items:center;gap:var(--size-2-1);font-size:var(--font-ui-small);color:var(--text-muted);margin-top:var(--size-2-1);}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) .file-indicator-arrow:where(.svelte-xi2aql) {flex-shrink:0;}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) .file-indicator-name:where(.svelte-xi2aql) {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.tasks-wrapper.svelte-xi2aql .file-indicator:where(.svelte-xi2aql) .file-indicator-label:where(.svelte-xi2aql) {white-space:nowrap;}' }; function BoardCell($$anchor, $$props) { if (new.target) return createClassComponent({ component: BoardCell, ...$$anchor }); push($$props, false); - append_styles($$anchor, $$css5); + append_styles($$anchor, $$css7); const $selectionModeStore = () => store_get(selectionModeStore, "$selectionModeStore", $$stores); const $taskSelectionStore = () => store_get(taskSelectionStore, "$taskSelectionStore", $$stores); const $isDraggingStore = () => store_get(isDraggingStore, "$isDraggingStore", $$stores); @@ -17918,6 +19212,7 @@ function BoardCell($$anchor, $$props) { const isFileSwimlaneDrop = mutable_source(); const isTagSwimlaneDrop = mutable_source(); const canDrop = mutable_source(); + const canEditNewTaskDates = mutable_source(); let app = prop($$props, "app", 12); let cell = prop($$props, "cell", 12); let primaryTasks = prop($$props, "primaryTasks", 28, () => []); @@ -17927,6 +19222,7 @@ function BoardCell($$anchor, $$props) { let columnTagTableStore = prop($$props, "columnTagTableStore", 12); let showFilepath = prop($$props, "showFilepath", 12); let propertyDisplay = prop($$props, "propertyDisplay", 28, () => "none" /* None */); + let propertySchemaOption = prop($$props, "propertySchemaOption", 28, () => "none" /* None */); let consolidateTags = prop($$props, "consolidateTags", 12); let excludedTags = prop($$props, "excludedTags", 28, () => []); let isVerticalFlow = prop($$props, "isVerticalFlow", 12, false); @@ -18019,24 +19315,33 @@ function BoardCell($$anchor, $$props) { } clearColumnSelections(droppedIds); } - let buttonEl = mutable_source(); let pendingNewTask = mutable_source(null); let pendingCancelled = false; let newTaskTextAreaEl = mutable_source(); - async function handleNewTaskSave() { - var _a5, _b3; + let newTaskInputEl = mutable_source(); + const emptyDateValues = { due: "", scheduled: "", start: "" }; + let newTaskDateValues = mutable_source({ ...emptyDateValues }); + async function handleNewTaskSave(event2) { + var _a5, _b3, _c2; + const nextTarget = event2 == null ? void 0 : event2.relatedTarget; + if (nextTarget instanceof Node && ((_a5 = get(newTaskInputEl)) == null ? void 0 : _a5.contains(nextTarget))) { + return; + } if (pendingCancelled) { pendingCancelled = false; set(pendingNewTask, null); + set(newTaskDateValues, { ...emptyDateValues }); return; } - const content = (_b3 = (_a5 = get(newTaskTextAreaEl)) == null ? void 0 : _a5.value) == null ? void 0 : _b3.trim(); + const content = (_c2 = (_b3 = get(newTaskTextAreaEl)) == null ? void 0 : _b3.value) == null ? void 0 : _c2.trim(); const file = get(pendingNewTask); set(pendingNewTask, null); if (!content || !file || !get(isColTag)) { + set(newTaskDateValues, { ...emptyDateValues }); return; } - await taskActions().createTask(file, content, get(column), get(creationMetadata).additionalTags); + await taskActions().createTask(file, content, get(column), get(creationMetadata).additionalTags, get(newTaskDateValues)); + set(newTaskDateValues, { ...emptyDateValues }); } function handleNewTaskKeydown(e) { var _a5, _b3; @@ -18053,11 +19358,13 @@ function BoardCell($$anchor, $$props) { if (!get(isColTag)) { return; } + set(newTaskDateValues, { ...emptyDateValues }); if (get(fileGroupTargetFile)) { set(pendingNewTask, get(fileGroupTargetFile)); return; } taskActions().pickFileForNewTask(get(column), e, (file) => { + set(newTaskDateValues, { ...emptyDateValues }); set(pendingNewTask, file); }); } @@ -18069,11 +19376,15 @@ function BoardCell($$anchor, $$props) { get(column), e, (file) => { + set(newTaskDateValues, { ...emptyDateValues }); set(pendingNewTask, file); }, true ); } + function handleNewTaskDateChange(key2, value) { + set(newTaskDateValues, { ...get(newTaskDateValues), [key2]: value }); + } function groupIdsBySecondaryId(taskIds, taskSecondaryIds2) { var _a5, _b3; const grouped = /* @__PURE__ */ new Map(); @@ -18201,11 +19512,12 @@ function BoardCell($$anchor, $$props) { set(canDrop, get(isSameSwimlaneColumnDrop) || get(isFileSwimlaneDrop) || get(isTagSwimlaneDrop)); } ); - legacy_pre_effect(() => (get(buttonEl), import_obsidian6.setIcon), () => { - if (get(buttonEl)) { - (0, import_obsidian6.setIcon)(get(buttonEl), "lucide-plus"); + legacy_pre_effect( + () => (getPropertyWriteAdapter, deep_read_state(propertySchemaOption())), + () => { + set(canEditNewTaskDates, getPropertyWriteAdapter(propertySchemaOption()) !== null); } - }); + ); legacy_pre_effect(() => (get(pendingNewTask), get(newTaskTextAreaEl)), () => { if (get(pendingNewTask) && get(newTaskTextAreaEl)) { get(newTaskTextAreaEl).focus(); @@ -18276,6 +19588,13 @@ function BoardCell($$anchor, $$props) { propertyDisplay($$value); flushSync(); }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + set propertySchemaOption($$value) { + propertySchemaOption($$value); + flushSync(); + }, get consolidateTags() { return consolidateTags(); }, @@ -18357,18 +19676,14 @@ function BoardCell($$anchor, $$props) { $on: ($$event_name, $$event_cb) => add_legacy_event_listener($$props, $$event_name, $$event_cb) }; init(); - var div = root_52(); + var div = root_62(); let classes; var node = child(div); { var consequent_2 = ($$anchor2) => { - var fragment = root_23(); + var fragment = root_24(); var div_1 = first_child(fragment); var button = child(div_1); - var span = child(button); - bind_this(span, ($$value) => set(buttonEl, $$value), () => get(buttonEl)); - next(); - reset(button); var node_1 = sibling(button, 2); { let $0 = derived_safe_equal(() => !!get(pendingNewTask)); @@ -18389,15 +19704,15 @@ function BoardCell($$anchor, $$props) { var node_2 = sibling(div_1, 2); { var consequent_1 = ($$anchor3) => { - var div_2 = root_16(); - var span_1 = sibling(child(div_2), 2); - var text2 = child(span_1, true); - reset(span_1); - var node_3 = sibling(span_1, 2); + var div_2 = root_19(); + var span = sibling(child(div_2), 2); + var text2 = child(span, true); + reset(span); + var node_3 = sibling(span, 2); { var consequent = ($$anchor4) => { - var span_2 = root5(); - append($$anchor4, span_2); + var span_1 = root7(); + append($$anchor4, span_1); }; if_block(node_3, ($$render) => { if (get(effectiveTargetFileIsDefault)) $$render(consequent); @@ -18405,7 +19720,7 @@ function BoardCell($$anchor, $$props) { } reset(div_2); template_effect(() => { - set_attribute2(span_1, "title", (get(effectiveTargetTaskFile), untrack(() => get(effectiveTargetTaskFile).path))); + set_attribute2(span, "title", (get(effectiveTargetTaskFile), untrack(() => get(effectiveTargetTaskFile).path))); set_text(text2, (get(effectiveTargetTaskFile), untrack(() => get(effectiveTargetTaskFile).name))); }); append($$anchor3, div_2); @@ -18428,28 +19743,47 @@ function BoardCell($$anchor, $$props) { } var node_4 = sibling(node, 2); { - var consequent_3 = ($$anchor2) => { - var div_3 = root_33(); + var consequent_4 = ($$anchor2) => { + var div_3 = root_43(); var textarea = child(div_3); bind_this(textarea, ($$value) => set(newTaskTextAreaEl, $$value), () => get(newTaskTextAreaEl)); + var node_5 = sibling(textarea, 2); + { + var consequent_3 = ($$anchor3) => { + var div_4 = root_33(); + var node_6 = child(div_4); + DateInputFields(node_6, { + get values() { + return get(newTaskDateValues); + }, + onDateChange: handleNewTaskDateChange + }); + reset(div_4); + append($$anchor3, div_4); + }; + if_block(node_5, ($$render) => { + if (get(canEditNewTaskDates)) $$render(consequent_3); + }); + } reset(div_3); - event("blur", textarea, handleNewTaskSave); + bind_this(div_3, ($$value) => set(newTaskInputEl, $$value), () => get(newTaskInputEl)); event("keydown", textarea, handleNewTaskKeydown); + event("focusout", div_3, handleNewTaskSave); append($$anchor2, div_3); }; if_block(node_4, ($$render) => { - if (get(pendingNewTask)) $$render(consequent_3); + if (get(pendingNewTask)) $$render(consequent_4); }); } - var div_4 = sibling(node_4, 2); - each(div_4, 5, () => get(tasks), (task) => task.id, ($$anchor2, task) => { - var div_5 = root_43(); + var div_5 = sibling(node_4, 2); + each(div_5, 5, () => get(tasks), (task) => task.id, ($$anchor2, task) => { + var div_6 = root_52(); let classes_1; - var node_5 = child(div_5); + var node_7 = child(div_6); { let $0 = derived_safe_equal(() => (deep_read_state(isTaskSelected), get(task), $taskSelectionStore(), untrack(() => isTaskSelected(get(task).id, $taskSelectionStore())))); let $1 = derived_safe_equal(() => (get(pinnedIds), get(task), untrack(() => get(pinnedIds).has(get(task).id)))); - Task2(node_5, { + Task2(node_7, { get app() { return app(); }, @@ -18468,6 +19802,9 @@ function BoardCell($$anchor, $$props) { get propertyDisplay() { return propertyDisplay(); }, + get propertySchemaOption() { + return propertySchemaOption(); + }, get consolidateTags() { return consolidateTags(); }, @@ -18511,17 +19848,17 @@ function BoardCell($$anchor, $$props) { onUnpin: () => taskActions().unpinTask(cell().secondaryId, get(column), get(task).id) }); } - reset(div_5); - template_effect(() => classes_1 = set_class(div_5, 1, "task-slot svelte-xi2aql", null, classes_1, { + reset(div_6); + template_effect(() => classes_1 = set_class(div_6, 1, "task-slot svelte-xi2aql", null, classes_1, { "drop-before": get(isManualReorderDrag) && get(reorderOverId) === get(task).id && get(reorderPlaceBefore), "drop-after": get(isManualReorderDrag) && get(reorderOverId) === get(task).id && !get(reorderPlaceBefore) })); - event("dragover", div_5, (e) => handleReorderDragOver(e, get(task).id)); - event("drop", div_5, (e) => handleReorderDrop(e, get(task).id)); - event("dragleave", div_5, handleReorderDragLeave); - append($$anchor2, div_5); + event("dragover", div_6, (e) => handleReorderDragOver(e, get(task).id)); + event("drop", div_6, (e) => handleReorderDrop(e, get(task).id)); + event("dragleave", div_6, handleReorderDragLeave); + append($$anchor2, div_6); }); - reset(div_4); + reset(div_5); reset(div); template_effect(() => { var _a5; @@ -18544,21 +19881,26 @@ function BoardCell($$anchor, $$props) { } // src/ui/board/board_matrix_vertical.svelte -var root6 = from_html(`
`); -var root_17 = from_html(`
`, 1); -var root_24 = from_html(`
`); -var root_34 = from_html(`
`); -var root_44 = from_html(`
`); -var $$css6 = { +var root8 = from_html(`
`, 1); +var root_110 = from_html(`
`); +var root_25 = from_html(`
`); +var root_34 = from_html(`
`); +var root_44 = from_html(`
`, 1); +var root_53 = from_html(`
`); +var $$css8 = { hash: "svelte-iq029y", - code: ".matrix-vertical.svelte-iq029y {display:flex;flex-direction:column;gap:var(--size-4-4);width:100%;padding-bottom:var(--size-4-4);}.column-vertical.svelte-iq029y {display:flex;flex-direction:column;width:100%;padding:var(--size-4-4);border-radius:var(--radius-m);border:var(--border-width) solid var(--background-modifier-border);background:color-mix(in srgb, var(--background-primary) 88%, var(--background-secondary));transition:padding-bottom 250ms ease;overflow:hidden;box-shadow:var(--shadow-s);}.column-vertical.collapsed.svelte-iq029y {cursor:pointer;padding-bottom:var(--size-4-4);}.header-wrapper.svelte-iq029y {width:100%;z-index:1;}.cells-container.svelte-iq029y {display:flex;flex-direction:column;width:100%;margin-top:var(--size-4-4);gap:0;border:var(--border-width) solid var(--background-modifier-border);border-radius:var(--radius-s);overflow:clip;}.swimlane-header.svelte-iq029y {font-size:var(--font-ui-medium);font-weight:var(--font-medium);color:var(--text-normal);padding:var(--size-4-3) var(--size-4-4);border-bottom:var(--border-width) solid var(--background-modifier-border);background:color-mix(in srgb, var(--background-secondary) 72%, var(--background-primary));}.cell-wrapper.svelte-iq029y {width:100%;padding:var(--size-4-2) var(--size-4-4);border-bottom:var(--border-width) solid var(--background-modifier-border);}" + code: ".matrix-vertical.svelte-iq029y {--vertical-row-header-width: clamp(220px, 24vw, 280px);padding-bottom:var(--size-4-4);}.matrix-vertical.ungrouped-grid.svelte-iq029y, .matrix-vertical.transposed-grid.svelte-iq029y {display:grid;column-gap:0;row-gap:0;align-items:stretch;min-width:max-content;border:var(--border-width) solid var(--background-modifier-border);border-radius:var(--radius-m);background:var(--background-primary);box-shadow:var(--shadow-s);overflow:visible;}.matrix-vertical.ungrouped-grid.svelte-iq029y {grid-template-columns:var(--vertical-row-header-width) max-content;}.matrix-corner.svelte-iq029y,\n.group-header-cell.svelte-iq029y {position:sticky;top:0;z-index:5;min-height:64px;background:color-mix(in srgb, var(--background-secondary) 72%, var(--background-primary));border-right:var(--border-width) solid var(--background-modifier-border);border-bottom:var(--border-width) solid var(--background-modifier-border);box-shadow:inset 0 var(--border-width) 0 var(--background-modifier-border), inset var(--border-width) 0 0 var(--background-modifier-border);}.matrix-corner.svelte-iq029y {left:0;z-index:8;}.group-header-cell.svelte-iq029y {display:flex;align-items:center;min-width:var(--column-width, 300px);padding:var(--size-4-3) var(--size-4-4);overflow:clip;}.group-header-cell.svelte-iq029y .group-label:where(.svelte-iq029y) {position:sticky;left:calc(var(--vertical-row-header-width) + var(--size-4-4));display:inline-block;max-width:max-content;color:var(--text-normal);font-size:var(--font-ui-medium);font-weight:var(--font-medium);line-height:1.2;white-space:nowrap;}.row-header-wrapper.svelte-iq029y,\n.row-cell.svelte-iq029y {border-bottom:var(--border-width) solid var(--background-modifier-border);}.row-header-wrapper.svelte-iq029y {position:sticky;left:0;z-index:4;display:flex;align-items:stretch;min-height:96px;padding:var(--size-4-2) var(--size-4-3);background:color-mix(in srgb, var(--background-secondary) 72%, var(--background-primary));border-right:var(--border-width) solid var(--background-modifier-border);--column-header-x-padding-override: var(--size-4-3);--column-header-y-padding-override: var(--size-4-2);}.row-header-wrapper.collapsed.svelte-iq029y {min-height:64px;cursor:pointer;}.row-cell.svelte-iq029y {z-index:1;display:flex;align-self:stretch;min-height:96px;min-width:max-content;padding:var(--size-4-2) var(--size-4-4);background:color-mix(in srgb, var(--background-primary) 88%, var(--background-secondary));}.row-cell.collapsed.svelte-iq029y {display:none;}.cell-wrapper.svelte-iq029y {padding:var(--size-4-2) var(--size-4-4);border-bottom:var(--border-width) solid var(--background-modifier-border);}.cell-wrapper.grouped-cell.svelte-iq029y {z-index:1;display:flex;align-self:stretch;min-height:96px;min-width:var(--column-width, 300px);background:color-mix(in srgb, var(--background-primary) 88%, var(--background-secondary));border-right:var(--border-width) solid var(--background-modifier-border);}.cell-wrapper.grouped-cell.collapsed.svelte-iq029y {display:none;}" }; function Board_matrix_vertical($$anchor, $$props) { if (new.target) return createClassComponent({ component: Board_matrix_vertical, ...$$anchor }); push($$props, false); - append_styles($$anchor, $$css6); + append_styles($$anchor, $$css8); const tasksByPrimary = mutable_source(); const showSwimlaneHeaders = mutable_source(); + const ungroupedSecondaryBucket = mutable_source(); + const ungroupedGridTemplateRows = mutable_source(); + const groupedGridTemplateColumns = mutable_source(); + const groupedGridTemplateRows = mutable_source(); let app = prop($$props, "app", 12); let matrix = prop($$props, "matrix", 12); let taskActions = prop($$props, "taskActions", 12); @@ -18567,6 +19909,7 @@ function Board_matrix_vertical($$anchor, $$props) { let columnMatchTagTableStore = prop($$props, "columnMatchTagTableStore", 12); let showFilepath = prop($$props, "showFilepath", 12); let propertyDisplay = prop($$props, "propertyDisplay", 28, () => "none" /* None */); + let propertySchemaOption = prop($$props, "propertySchemaOption", 28, () => "none" /* None */); let consolidateTags = prop($$props, "consolidateTags", 12); let excludedTags = prop($$props, "excludedTags", 28, () => []); let targetTaskFile = prop($$props, "targetTaskFile", 12, null); @@ -18587,6 +19930,24 @@ function Board_matrix_vertical($$anchor, $$props) { var _a5; set(showSwimlaneHeaders, matrix().secondaryAxis.length > 1 || matrix().secondaryAxis.length > 0 && !((_a5 = matrix().secondaryAxis[0].meta) == null ? void 0 : _a5.isDefault)); }); + legacy_pre_effect(() => deep_read_state(matrix()), () => { + set(ungroupedSecondaryBucket, matrix().secondaryAxis[0]); + }); + legacy_pre_effect(() => deep_read_state(matrix()), () => { + set(ungroupedGridTemplateRows, matrix().primaryAxis.map(() => "max-content").join(" ")); + }); + legacy_pre_effect(() => deep_read_state(matrix()), () => { + set(groupedGridTemplateColumns, [ + "var(--vertical-row-header-width)", + ...matrix().secondaryAxis.map(() => "max-content") + ].join(" ")); + }); + legacy_pre_effect(() => deep_read_state(matrix()), () => { + set(groupedGridTemplateRows, [ + "max-content", + ...matrix().primaryAxis.map(() => "max-content") + ].join(" ")); + }); legacy_pre_effect_reset(); var $$exports = { get app() { @@ -18645,6 +20006,13 @@ function Board_matrix_vertical($$anchor, $$props) { propertyDisplay($$value); flushSync(); }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + set propertySchemaOption($$value) { + propertySchemaOption($$value); + flushSync(); + }, get consolidateTags() { return consolidateTags(); }, @@ -18719,82 +20087,257 @@ function Board_matrix_vertical($$anchor, $$props) { $on: ($$event_name, $$event_cb) => add_legacy_event_listener($$props, $$event_name, $$event_cb) }; init(); - var div = root_44(); - each( - div, - 5, - () => (deep_read_state(matrix()), untrack(() => matrix().primaryAxis)), - (pBucket) => pBucket.id, - ($$anchor2, pBucket) => { - var div_1 = root_34(); - let classes; + var fragment = comment(); + var node = first_child(fragment); + { + var consequent = ($$anchor2) => { + var div = root_110(); let styles; - var div_2 = child(div_1); - var node = child(div_2); - { - let $0 = derived_safe_equal(() => (get(tasksByPrimary), get(pBucket), untrack(() => { - var _a5; - return (_a5 = get(tasksByPrimary)[get(pBucket).id]) != null ? _a5 : []; - }))); - ColumnHeader(node, { - get column() { - return get(pBucket), untrack(() => get(pBucket).id); - }, - get tasks() { - return get($0); - }, - get taskActions() { - return taskActions(); - }, - get columnTagTableStore() { - return columnTagTableStore(); - }, - get columnColourTableStore() { - return columnColourTableStore(); - }, - get columnMatchTagTableStore() { - return columnMatchTagTableStore(); - }, - isVerticalFlow: true, - get isCollapsed() { - return get(pBucket), untrack(() => get(pBucket).collapsed); - }, - onToggleCollapse: () => onToggleCollapse()(get(pBucket).id), - get uncategorizedColumnName() { - return uncategorizedColumnName(); - }, - get doneColumnName() { - return doneColumnName(); + each( + div, + 7, + () => (deep_read_state(matrix()), untrack(() => matrix().primaryAxis)), + (pBucket) => pBucket.id, + ($$anchor3, pBucket, pIndex) => { + var fragment_1 = root8(); + var div_1 = first_child(fragment_1); + let classes; + let styles_1; + var node_1 = child(div_1); + { + let $0 = derived_safe_equal(() => (get(tasksByPrimary), get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(tasksByPrimary)[get(pBucket).id]) != null ? _a5 : []; + }))); + ColumnHeader(node_1, { + get column() { + return get(pBucket), untrack(() => get(pBucket).id); + }, + get tasks() { + return get($0); + }, + get taskActions() { + return taskActions(); + }, + get columnTagTableStore() { + return columnTagTableStore(); + }, + get columnColourTableStore() { + return columnColourTableStore(); + }, + get columnMatchTagTableStore() { + return columnMatchTagTableStore(); + }, + isVerticalFlow: true, + get isCollapsed() { + return get(pBucket), untrack(() => get(pBucket).collapsed); + }, + onToggleCollapse: () => onToggleCollapse()(get(pBucket).id), + get uncategorizedColumnName() { + return uncategorizedColumnName(); + }, + get doneColumnName() { + return doneColumnName(); + } + }); } - }); - } - reset(div_2); - var node_1 = sibling(div_2, 2); - { - var consequent_1 = ($$anchor3) => { - var div_3 = root_24(); + reset(div_1); + var div_2 = sibling(div_1, 2); + let classes_1; + let styles_2; + var node_2 = child(div_2); + { + let $0 = derived_safe_equal(() => (get(tasksByPrimary), get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(tasksByPrimary)[get(pBucket).id]) != null ? _a5 : []; + }))); + let $1 = derived_safe_equal(() => (get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(pBucket).meta) == null ? void 0 : _a5.color; + }))); + let $2 = derived_safe_equal(() => (deep_read_state(manualOrder()), get(ungroupedSecondaryBucket), get(pBucket), untrack(() => { + var _a5; + return (_a5 = manualOrder()[get(ungroupedSecondaryBucket).id]) == null ? void 0 : _a5[get(pBucket).id]; + }))); + BoardCell(node_2, { + get app() { + return app(); + }, + get cell() { + return deep_read_state(matrix()), get(pBucket), get(ungroupedSecondaryBucket), untrack(() => matrix().cells[get(pBucket).id][get(ungroupedSecondaryBucket).id]); + }, + get primaryTasks() { + return get($0); + }, + get secondaryAxisBucket() { + return get(ungroupedSecondaryBucket); + }, + get primaryAxisLabel() { + return get(pBucket), untrack(() => get(pBucket).label); + }, + get taskActions() { + return taskActions(); + }, + get columnTagTableStore() { + return columnTagTableStore(); + }, + get showFilepath() { + return showFilepath(); + }, + get propertyDisplay() { + return propertyDisplay(); + }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + get consolidateTags() { + return consolidateTags(); + }, + get excludedTags() { + return excludedTags(); + }, + isVerticalFlow: true, + get targetTaskFile() { + return targetTaskFile(); + }, + get targetFileIsDefault() { + return targetFileIsDefault(); + }, + get doneColumnName() { + return doneColumnName(); + }, + get isCollapsed() { + return get(pBucket), untrack(() => get(pBucket).collapsed); + }, + get accentColor() { + return get($1); + }, + get isManualOrder() { + return isManualOrder(); + }, + get manualOrderEntries() { + return get($2); + }, + get reorderEnabled() { + return reorderEnabled(); + } + }); + } + reset(div_2); + template_effect(() => { + classes = set_class(div_1, 1, "row-header-wrapper svelte-iq029y", null, classes, { collapsed: get(pBucket).collapsed }); + styles_1 = set_style(div_1, "", styles_1, { + "grid-column": "1", + "grid-row": get(pIndex) + 1, + "--column-color": (get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(pBucket).meta) == null ? void 0 : _a5.color; + })) + }); + classes_1 = set_class(div_2, 1, "cell-wrapper row-cell svelte-iq029y", null, classes_1, { collapsed: get(pBucket).collapsed }); + styles_2 = set_style(div_2, "", styles_2, { + "grid-column": "2", + "grid-row": get(pIndex) + 1, + "--column-color": (get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(pBucket).meta) == null ? void 0 : _a5.color; + })) + }); + }); + append($$anchor3, fragment_1); + } + ); + reset(div); + template_effect(() => styles = set_style(div, "", styles, { "grid-template-rows": get(ungroupedGridTemplateRows) })); + append($$anchor2, div); + }; + var alternate = ($$anchor2) => { + var div_3 = root_53(); + let styles_3; + var div_4 = child(div_3); + set_style(div_4, "", {}, { "grid-column": "1", "grid-row": "1" }); + var node_3 = sibling(div_4, 2); + each( + node_3, + 3, + () => (deep_read_state(matrix()), untrack(() => matrix().secondaryAxis)), + (sBucket) => sBucket.id, + ($$anchor3, sBucket, sIndex) => { + var div_5 = root_25(); + let styles_4; + var span = child(div_5); + var text2 = child(span, true); + reset(span); + reset(div_5); + template_effect(() => { + styles_4 = set_style(div_5, "", styles_4, { "grid-column": get(sIndex) + 2, "grid-row": "1" }); + set_attribute2(span, "title", (get(sBucket), untrack(() => get(sBucket).label))); + set_text(text2, (get(sBucket), untrack(() => get(sBucket).label))); + }); + append($$anchor3, div_5); + } + ); + var node_4 = sibling(node_3, 2); + each( + node_4, + 3, + () => (deep_read_state(matrix()), untrack(() => matrix().primaryAxis)), + (pBucket) => pBucket.id, + ($$anchor3, pBucket, pIndex) => { + var fragment_2 = root_44(); + var div_6 = first_child(fragment_2); + let classes_2; + let styles_5; + var node_5 = child(div_6); + { + let $0 = derived_safe_equal(() => (get(tasksByPrimary), get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(tasksByPrimary)[get(pBucket).id]) != null ? _a5 : []; + }))); + ColumnHeader(node_5, { + get column() { + return get(pBucket), untrack(() => get(pBucket).id); + }, + get tasks() { + return get($0); + }, + get taskActions() { + return taskActions(); + }, + get columnTagTableStore() { + return columnTagTableStore(); + }, + get columnColourTableStore() { + return columnColourTableStore(); + }, + get columnMatchTagTableStore() { + return columnMatchTagTableStore(); + }, + isVerticalFlow: true, + get isCollapsed() { + return get(pBucket), untrack(() => get(pBucket).collapsed); + }, + onToggleCollapse: () => onToggleCollapse()(get(pBucket).id), + get uncategorizedColumnName() { + return uncategorizedColumnName(); + }, + get doneColumnName() { + return doneColumnName(); + } + }); + } + reset(div_6); + var node_6 = sibling(div_6, 2); each( - div_3, - 5, + node_6, + 3, () => (deep_read_state(matrix()), untrack(() => matrix().secondaryAxis)), (sBucket) => sBucket.id, - ($$anchor4, sBucket) => { - var fragment = root_17(); - var node_2 = first_child(fragment); - { - var consequent = ($$anchor5) => { - var div_4 = root6(); - var text2 = child(div_4, true); - reset(div_4); - template_effect(() => set_text(text2, (get(sBucket), untrack(() => get(sBucket).label)))); - append($$anchor5, div_4); - }; - if_block(node_2, ($$render) => { - if (get(showSwimlaneHeaders)) $$render(consequent); - }); - } - var div_5 = sibling(node_2, 2); - var node_3 = child(div_5); + ($$anchor4, sBucket, sIndex) => { + var div_7 = root_34(); + let classes_3; + let styles_6; + var node_7 = child(div_7); { let $0 = derived_safe_equal(() => (get(tasksByPrimary), get(pBucket), untrack(() => { var _a5; @@ -18808,7 +20351,7 @@ function Board_matrix_vertical($$anchor, $$props) { var _a5; return (_a5 = manualOrder()[get(sBucket).id]) == null ? void 0 : _a5[get(pBucket).id]; }))); - BoardCell(node_3, { + BoardCell(node_7, { get app() { return app(); }, @@ -18836,6 +20379,9 @@ function Board_matrix_vertical($$anchor, $$props) { get propertyDisplay() { return propertyDisplay(); }, + get propertySchemaOption() { + return propertySchemaOption(); + }, get consolidateTags() { return consolidateTags(); }, @@ -18869,60 +20415,65 @@ function Board_matrix_vertical($$anchor, $$props) { } }); } - reset(div_5); - append($$anchor4, fragment); + reset(div_7); + template_effect(() => { + classes_3 = set_class(div_7, 1, "cell-wrapper grouped-cell svelte-iq029y", null, classes_3, { collapsed: get(pBucket).collapsed }); + styles_6 = set_style(div_7, "", styles_6, { + "grid-column": get(sIndex) + 2, + "grid-row": get(pIndex) + 2, + "--column-color": (get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(pBucket).meta) == null ? void 0 : _a5.color; + })) + }); + }); + append($$anchor4, div_7); } ); - reset(div_3); - append($$anchor3, div_3); - }; - if_block(node_1, ($$render) => { - if (get(pBucket), untrack(() => !get(pBucket).collapsed)) $$render(consequent_1); - }); - } - reset(div_1); - template_effect(() => { - classes = set_class(div_1, 1, "column-vertical svelte-iq029y", null, classes, { collapsed: get(pBucket).collapsed }); - styles = set_style( - div_1, - (get(pBucket), untrack(() => { - var _a5; - return ((_a5 = get(pBucket).meta) == null ? void 0 : _a5.color) ? `background-color: ${get(pBucket).meta.color};` : ""; - })), - styles, - { - "--column-color": (get(pBucket), untrack(() => { - var _a5; - return (_a5 = get(pBucket).meta) == null ? void 0 : _a5.color; - })) - } - ); - }); - event("click", div_1, () => { - if (get(pBucket).collapsed) onToggleCollapse()(get(pBucket).id); - }); - append($$anchor2, div_1); - } - ); - reset(div); - append($$anchor, div); + template_effect(() => { + classes_2 = set_class(div_6, 1, "row-header-wrapper svelte-iq029y", null, classes_2, { collapsed: get(pBucket).collapsed }); + styles_5 = set_style(div_6, "", styles_5, { + "grid-column": "1", + "grid-row": get(pIndex) + 2, + "--column-color": (get(pBucket), untrack(() => { + var _a5; + return (_a5 = get(pBucket).meta) == null ? void 0 : _a5.color; + })) + }); + }); + append($$anchor3, fragment_2); + } + ); + reset(div_3); + template_effect(() => styles_3 = set_style(div_3, "", styles_3, { + "grid-template-columns": get(groupedGridTemplateColumns), + "grid-template-rows": get(groupedGridTemplateRows) + })); + append($$anchor2, div_3); + }; + if_block(node, ($$render) => { + if (!get(showSwimlaneHeaders) && get(ungroupedSecondaryBucket)) $$render(consequent); + else $$render(alternate, -1); + }); + } + append($$anchor, fragment); return pop($$exports); } // src/ui/board/board_matrix_horizontal.svelte -var root7 = from_html(`
`); -var root_18 = from_html(`
`); -var root_25 = from_html(`
`); +var root9 = from_html(`
`); +var root_111 = from_html(`
`); +var root_26 = from_html(`
`); var root_35 = from_html(` `, 1); var root_45 = from_html(`
`); -var $$css7 = { +var $$css9 = { hash: "svelte-1j479gc", code: ".matrix-horizontal.svelte-1j479gc {display:grid;column-gap:0;row-gap:0;align-items:stretch;min-width:max-content;padding-bottom:var(--size-4-4);border:var(--border-width) solid var(--background-modifier-border);border-radius:var(--radius-m);background:var(--background-primary);box-shadow:var(--shadow-s);overflow:visible;}.matrix-corner.svelte-1j479gc,\n.header-wrapper.svelte-1j479gc {background:color-mix(in srgb, var(--background-secondary) 72%, var(--background-primary));border-bottom:var(--border-width) solid var(--background-modifier-border);border-right:var(--border-width) solid var(--background-modifier-border);min-height:64px;}.matrix-corner.svelte-1j479gc {position:sticky;left:0;top:0;z-index:7;}.header-wrapper.svelte-1j479gc {position:sticky;top:0;z-index:5;padding:var(--size-4-2) var(--size-4-3);--column-header-x-padding-override: var(--size-4-3);--column-header-y-padding-override: var(--size-4-2);display:flex;align-items:stretch;}.header-wrapper.collapsed.svelte-1j479gc {position:sticky;top:0;display:flex;flex-direction:column;align-self:start;height:100%;min-height:100%;padding:0 var(--size-2-3) var(--size-4-3);--column-header-x-padding-override: var(--size-2-3);--column-header-y-padding-override: 0px;cursor:pointer;z-index:6;}.swimlane-header-cell.svelte-1j479gc {position:sticky;left:0;z-index:3;display:flex;align-items:center;justify-content:center;min-height:188px;padding:var(--size-4-3) var(--size-2-2);background:color-mix(in srgb, var(--background-primary) 82%, var(--background-secondary));border-right:var(--border-width) solid var(--background-modifier-border);border-bottom:var(--border-width) solid var(--background-modifier-border);}.swimlane-header-cell.svelte-1j479gc .swimlane-label:where(.svelte-1j479gc) {color:var(--text-normal);font-size:var(--font-ui-medium);font-weight:var(--font-medium);line-height:1.2;writing-mode:vertical-rl;text-orientation:mixed;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:100%;}.cell-wrapper.svelte-1j479gc {z-index:1;min-height:188px;padding:var(--size-4-2) var(--size-4-4);display:flex;flex-direction:column;align-self:stretch;background:color-mix(in srgb, var(--background-primary) 88%, var(--background-secondary));border-right:var(--border-width) solid var(--background-modifier-border);border-bottom:var(--border-width) solid var(--background-modifier-border);}.cell-wrapper.collapsed.svelte-1j479gc {display:none;}" }; function Board_matrix_horizontal($$anchor, $$props) { if (new.target) return createClassComponent({ component: Board_matrix_horizontal, ...$$anchor }); push($$props, false); - append_styles($$anchor, $$css7); + append_styles($$anchor, $$css9); const tasksByPrimary = mutable_source(); const showSwimlaneHeaders = mutable_source(); const gridTemplateColumns = mutable_source(); @@ -18936,6 +20487,7 @@ function Board_matrix_horizontal($$anchor, $$props) { let columnMatchTagTableStore = prop($$props, "columnMatchTagTableStore", 12); let showFilepath = prop($$props, "showFilepath", 12); let propertyDisplay = prop($$props, "propertyDisplay", 28, () => "none" /* None */); + let propertySchemaOption = prop($$props, "propertySchemaOption", 28, () => "none" /* None */); let consolidateTags = prop($$props, "consolidateTags", 12); let excludedTags = prop($$props, "excludedTags", 28, () => []); let targetTaskFile = prop($$props, "targetTaskFile", 12, null); @@ -19036,6 +20588,13 @@ function Board_matrix_horizontal($$anchor, $$props) { propertyDisplay($$value); flushSync(); }, + get propertySchemaOption() { + return propertySchemaOption(); + }, + set propertySchemaOption($$value) { + propertySchemaOption($$value); + flushSync(); + }, get consolidateTags() { return consolidateTags(); }, @@ -19122,7 +20681,7 @@ function Board_matrix_horizontal($$anchor, $$props) { var node = child(div); { var consequent = ($$anchor2) => { - var div_1 = root7(); + var div_1 = root9(); set_style(div_1, "", {}, { "grid-column": "1", "grid-row": "1" }); append($$anchor2, div_1); }; @@ -19137,7 +20696,7 @@ function Board_matrix_horizontal($$anchor, $$props) { () => (deep_read_state(matrix()), untrack(() => matrix().primaryAxis)), (pBucket) => pBucket.id, ($$anchor2, pBucket, index2) => { - var div_2 = root_18(); + var div_2 = root_111(); let classes; let styles_1; var node_2 = child(div_2); @@ -19204,7 +20763,7 @@ function Board_matrix_horizontal($$anchor, $$props) { var node_4 = first_child(fragment); { var consequent_1 = ($$anchor3) => { - var div_3 = root_25(); + var div_3 = root_26(); let styles_2; var span = child(div_3); var text2 = child(span, true); @@ -19228,7 +20787,7 @@ function Board_matrix_horizontal($$anchor, $$props) { () => (deep_read_state(matrix()), untrack(() => matrix().primaryAxis)), (pBucket) => pBucket.id, ($$anchor3, pBucket, pIndex) => { - var div_4 = root_18(); + var div_4 = root_111(); let classes_1; let styles_3; var node_6 = child(div_4); @@ -19273,6 +20832,9 @@ function Board_matrix_horizontal($$anchor, $$props) { get propertyDisplay() { return propertyDisplay(); }, + get propertySchemaOption() { + return propertySchemaOption(); + }, get consolidateTags() { return consolidateTags(); }, @@ -19754,10 +21316,10 @@ var computePosition = async (reference, floating, config) => { middlewareData }; }; -async function detectOverflow(state2, options) { +async function detectOverflow(state2, options2) { var _await$platform$isEle; - if (options === void 0) { - options = {}; + if (options2 === void 0) { + options2 = {}; } const { x, @@ -19773,7 +21335,7 @@ async function detectOverflow(state2, options) { elementContext = "floating", altBoundary = false, padding = 0 - } = evaluate(options, state2); + } = evaluate(options2, state2); const paddingObject = getPaddingObject(padding); const altContext = elementContext === "floating" ? "reference" : "floating"; const element2 = elements[altBoundary ? altContext : elementContext]; @@ -19809,13 +21371,13 @@ async function detectOverflow(state2, options) { right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x }; } -var flip = function(options) { - if (options === void 0) { - options = {}; +var flip = function(options2) { + if (options2 === void 0) { + options2 = {}; } return { name: "flip", - options, + options: options2, async fn(state2) { var _middlewareData$arrow, _middlewareData$flip; const { @@ -19834,7 +21396,7 @@ var flip = function(options) { fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions - } = evaluate(options, state2); + } = evaluate(options2, state2); if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } @@ -19903,7 +21465,7 @@ var flip = function(options) { } }; }; -async function convertValueToCoords(state2, options) { +async function convertValueToCoords(state2, options2) { const { placement, platform: platform2, @@ -19915,7 +21477,7 @@ async function convertValueToCoords(state2, options) { const isVertical = getSideAxis(placement) === "y"; const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1; - const rawValue = evaluate(options, state2); + const rawValue = evaluate(options2, state2); let { mainAxis, crossAxis, @@ -19941,13 +21503,13 @@ async function convertValueToCoords(state2, options) { y: crossAxis * crossAxisMulti }; } -var offset = function(options) { - if (options === void 0) { - options = 0; +var offset = function(options2) { + if (options2 === void 0) { + options2 = 0; } return { name: "offset", - options, + options: options2, async fn(state2) { var _middlewareData$offse, _middlewareData$arrow; const { @@ -19956,7 +21518,7 @@ var offset = function(options) { placement, middlewareData } = state2; - const diffCoords = await convertValueToCoords(state2, options); + const diffCoords = await convertValueToCoords(state2, options2); if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } @@ -19971,13 +21533,13 @@ var offset = function(options) { } }; }; -var shift = function(options) { - if (options === void 0) { - options = {}; +var shift = function(options2) { + if (options2 === void 0) { + options2 = {}; } return { name: "shift", - options, + options: options2, async fn(state2) { const { x, @@ -20000,7 +21562,7 @@ var shift = function(options) { } }, ...detectOverflowOptions - } = evaluate(options, state2); + } = evaluate(options2, state2); const coords = { x, y @@ -20575,7 +22137,7 @@ var platform = { function observeMove(element2, onMove) { let io = null; let timeoutId; - const root16 = getDocumentElement(element2); + const root18 = getDocumentElement(element2); function cleanup() { var _io; clearTimeout(timeoutId); @@ -20603,11 +22165,11 @@ function observeMove(element2, onMove) { return; } const insetTop = floor(top); - const insetRight = floor(root16.clientWidth - (left + width)); - const insetBottom = floor(root16.clientHeight - (top + height)); + const insetRight = floor(root18.clientWidth - (left + width)); + const insetBottom = floor(root18.clientHeight - (top + height)); const insetLeft = floor(left); const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; - const options = { + const options2 = { rootMargin, threshold: max(0, min(1, threshold)) || 1 }; @@ -20630,21 +22192,21 @@ function observeMove(element2, onMove) { } try { io = new IntersectionObserver(handleObserve, { - ...options, + ...options2, // Handle