").addClass(r3.dropdownContentClass).appendTo(e3), (o3 = w3.attr("id")) && (d3.attr("id", o3 + "-selectized"), a2("label[for='" + o3 + "']").attr("for", o3 + "-selectized")), p3.settings.copyClassesToDropdown && e3.addClass(m3), b3.css({ width: w3[0].style.width }), p3.plugins.names.length && (n3 = "plugin-" + p3.plugins.names.join(" plugin-"), b3.addClass(n3), e3.addClass(n3)), (null === r3.maxItems || r3.maxItems > 1) && 1 === p3.tagType && w3.attr("multiple", "multiple"), p3.settings.placeholder && d3.attr("placeholder", r3.placeholder), !p3.settings.splitOn && p3.settings.delimiter) {
var x2 = p3.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
p3.settings.splitOn = new RegExp("\\s*" + x2 + "+\\s*");
@@ -7578,9 +7578,9 @@
return false;
p3.$control.has(a3.target).length || a3.target === p3.$control[0] || p3.blur(a3.target);
}
- }), t3.on(["scroll" + s3, "resize" + s3].join(" "), function() {
+ }), t4.on(["scroll" + s3, "resize" + s3].join(" "), function() {
p3.isOpen && p3.positionDropdown.apply(p3, arguments);
- }), t3.on("mousemove" + s3, function() {
+ }), t4.on("mousemove" + s3, function() {
p3.ignoreHover = false;
}), this.revertSettings = { $children: w3.children().detach(), tabindex: w3.attr("tabindex") }, w3.attr("tabindex", -1).hide().after(p3.$wrapper), a2.isArray(r3.items) && (p3.setValue(r3.items), delete r3.items), i2 && w3.on("invalid" + s3, function(a3) {
a3.preventDefault(), p3.isInvalid = true, p3.refreshState();
@@ -7773,7 +7773,7 @@
-1 !== f3.items.indexOf(k2(d3.items[c3].id)) && d3.items.splice(c3, 1);
return d3;
}, refreshOptions: function(b3) {
- var c3, e3, f3, g3, h3, i3, j3, l3, m3, n3, o3, p3, q3, r3, s3, t3;
+ var c3, e3, f3, g3, h3, i3, j3, l3, m3, n3, o3, p3, q3, r3, s3, t4;
void 0 === b3 && (b3 = true);
var u3 = this, w3 = a2.trim(u3.$control_input.val()), x2 = u3.search(w3), y2 = u3.$dropdown_content, z2 = u3.$activeOption && k2(u3.$activeOption.attr("data-value"));
for (g3 = x2.items.length, "number" == typeof u3.settings.maxOptions && (g3 = Math.min(g3, u3.settings.maxOptions)), h3 = {}, i3 = [], c3 = 0; c3 < g3; c3++)
@@ -7789,7 +7789,7 @@
if (!u3.settings.hideSelected)
for (c3 = 0, g3 = u3.items.length; c3 < g3; c3++)
u3.getOption(u3.items[c3]).addClass("selected");
- q3 = u3.canCreate(w3), q3 && (y2.prepend(u3.render("option_create", { input: w3 })), t3 = a2(y2[0].childNodes[0])), u3.hasOptions = x2.items.length > 0 || q3, u3.hasOptions ? (x2.items.length > 0 ? (s3 = z2 && u3.getOption(z2), s3 && s3.length ? r3 = s3 : "single" === u3.settings.mode && u3.items.length && (r3 = u3.getOption(u3.items[0])), r3 && r3.length || (r3 = t3 && !u3.settings.addPrecedence ? u3.getAdjacentOption(t3, 1) : y2.find("[data-selectable]:first"))) : r3 = t3, u3.setActiveOption(r3), b3 && !u3.isOpen && u3.open()) : (u3.setActiveOption(null), b3 && u3.isOpen && u3.close());
+ q3 = u3.canCreate(w3), q3 && (y2.prepend(u3.render("option_create", { input: w3 })), t4 = a2(y2[0].childNodes[0])), u3.hasOptions = x2.items.length > 0 || q3, u3.hasOptions ? (x2.items.length > 0 ? (s3 = z2 && u3.getOption(z2), s3 && s3.length ? r3 = s3 : "single" === u3.settings.mode && u3.items.length && (r3 = u3.getOption(u3.items[0])), r3 && r3.length || (r3 = t4 && !u3.settings.addPrecedence ? u3.getAdjacentOption(t4, 1) : y2.find("[data-selectable]:first"))) : r3 = t4, u3.setActiveOption(r3), b3 && !u3.isOpen && u3.open()) : (u3.setActiveOption(null), b3 && u3.isOpen && u3.close());
}, addOption: function(b3) {
var c3, d3, e3, f3 = this;
if (a2.isArray(b3))
@@ -8036,7 +8036,7 @@
var m4, n4, o3, p3, q3 = c4.options, r3 = {}, s3 = function(a3) {
var b5 = e3 && a3.attr(e3);
return "string" == typeof b5 && b5.length ? JSON.parse(b5) : null;
- }, t3 = function(b5, e4) {
+ }, t4 = function(b5, e4) {
b5 = a2(b5);
var j4 = k2(b5.val());
if (j4 || d3.allowEmptyOption)
@@ -8054,8 +8054,8 @@
o3 = p3[m4].tagName.toLowerCase(), "optgroup" === o3 ? function(b5) {
var d4, e4, f4, g4, i4;
for (b5 = a2(b5), f4 = b5.attr("label"), f4 && (g4 = s3(b5) || {}, g4[j3] = f4, g4[l3] = f4, g4[h3] = b5.prop("disabled"), c4.optgroups.push(g4)), i4 = a2("option", b5), d4 = 0, e4 = i4.length; d4 < e4; d4++)
- t3(i4[d4], f4);
- }(p3[m4]) : "option" === o3 && t3(p3[m4]);
+ t4(i4[d4], f4);
+ }(p3[m4]) : "option" === o3 && t4(p3[m4]);
};
return this.each(function() {
if (!this.selectize) {
@@ -8203,25 +8203,25 @@
window.$ = import_jquery.default;
// node_modules/trix/dist/trix.esm.min.js
- var t = "2.1.4";
+ var t = "2.1.10";
var e = "[data-trix-attachment]";
var i = { preview: { presentation: "gallery", caption: { name: true, size: true } }, file: { caption: { size: true } } };
- var n = { default: { tagName: "div", parse: false }, quote: { tagName: "blockquote", nestable: true }, heading1: { tagName: "h1", terminal: true, breakOnReturn: true, group: false }, code: { tagName: "pre", terminal: true, htmlAttributes: ["language"], text: { plaintext: true } }, bulletList: { tagName: "ul", parse: false }, bullet: { tagName: "li", listAttribute: "bulletList", group: false, nestable: true, test(t2) {
- return r(t2.parentNode) === n[this.listAttribute].tagName;
- } }, numberList: { tagName: "ol", parse: false }, number: { tagName: "li", listAttribute: "numberList", group: false, nestable: true, test(t2) {
- return r(t2.parentNode) === n[this.listAttribute].tagName;
+ var n = { default: { tagName: "div", parse: false }, quote: { tagName: "blockquote", nestable: true }, heading1: { tagName: "h1", terminal: true, breakOnReturn: true, group: false }, code: { tagName: "pre", terminal: true, htmlAttributes: ["language"], text: { plaintext: true } }, bulletList: { tagName: "ul", parse: false }, bullet: { tagName: "li", listAttribute: "bulletList", group: false, nestable: true, test(t3) {
+ return r(t3.parentNode) === n[this.listAttribute].tagName;
+ } }, numberList: { tagName: "ol", parse: false }, number: { tagName: "li", listAttribute: "numberList", group: false, nestable: true, test(t3) {
+ return r(t3.parentNode) === n[this.listAttribute].tagName;
} }, attachmentGallery: { tagName: "div", exclusive: true, terminal: true, parse: false, group: false } };
- var r = (t2) => {
+ var r = (t3) => {
var e2;
- return null == t2 || null === (e2 = t2.tagName) || void 0 === e2 ? void 0 : e2.toLowerCase();
+ return null == t3 || null === (e2 = t3.tagName) || void 0 === e2 ? void 0 : e2.toLowerCase();
};
var o = navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i);
var s = o && parseInt(o[1]);
- var a = { composesExistingText: /Android.*Chrome/.test(navigator.userAgent), recentAndroid: s && s > 12, samsungAndroid: s && navigator.userAgent.match(/Android.*SM-/), forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent), supportsInputEvents: "undefined" != typeof InputEvent && ["data", "getTargetRanges", "inputType"].every((t2) => t2 in InputEvent.prototype) };
+ var a = { composesExistingText: /Android.*Chrome/.test(navigator.userAgent), recentAndroid: s && s > 12, samsungAndroid: s && navigator.userAgent.match(/Android.*SM-/), forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent), supportsInputEvents: "undefined" != typeof InputEvent && ["data", "getTargetRanges", "inputType"].every((t3) => t3 in InputEvent.prototype) };
var l = { attachFiles: "Attach Files", bold: "Bold", bullets: "Bullets", byte: "Byte", bytes: "Bytes", captionPlaceholder: "Add a caption\u2026", code: "Code", heading1: "Heading", indent: "Increase Level", italic: "Italic", link: "Link", numbers: "Numbers", outdent: "Decrease Level", quote: "Quote", redo: "Redo", remove: "Remove", strike: "Strikethrough", undo: "Undo", unlink: "Unlink", url: "URL", urlPlaceholder: "Enter a URL\u2026", GB: "GB", KB: "KB", MB: "MB", PB: "PB", TB: "TB" };
var c = [l.bytes, l.KB, l.MB, l.GB, l.TB, l.PB];
- var u = { prefix: "IEC", precision: 2, formatter(t2) {
- switch (t2) {
+ var u = { prefix: "IEC", precision: 2, formatter(t3) {
+ switch (t3) {
case 0:
return "0 ".concat(l.bytes);
case 1:
@@ -8229,80 +8229,80 @@
default:
let e2;
"SI" === this.prefix ? e2 = 1e3 : "IEC" === this.prefix && (e2 = 1024);
- const i2 = Math.floor(Math.log(t2) / Math.log(e2)), n2 = (t2 / Math.pow(e2, i2)).toFixed(this.precision).replace(/0*$/, "").replace(/\.$/, "");
+ const i2 = Math.floor(Math.log(t3) / Math.log(e2)), n2 = (t3 / Math.pow(e2, i2)).toFixed(this.precision).replace(/0*$/, "").replace(/\.$/, "");
return "".concat(n2, " ").concat(c[i2]);
}
} };
var h = "\uFEFF";
var d = "\xA0";
- var g = function(t2) {
- for (const e2 in t2) {
- const i2 = t2[e2];
+ var g = function(t3) {
+ for (const e2 in t3) {
+ const i2 = t3[e2];
this[e2] = i2;
}
return this;
};
var m = document.documentElement;
var p = m.matches;
- var f = function(t2) {
+ var f = function(t3) {
let { onElement: e2, matchingSelector: i2, withCallback: n2, inPhase: r2, preventDefault: o2, times: s2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- const a2 = e2 || m, l2 = i2, c2 = "capturing" === r2, u2 = function(t3) {
+ const a2 = e2 || m, l2 = i2, c2 = "capturing" === r2, u2 = function(t4) {
null != s2 && 0 == --s2 && u2.destroy();
- const e3 = A(t3.target, { matchingSelector: l2 });
- null != e3 && (null == n2 || n2.call(e3, t3, e3), o2 && t3.preventDefault());
+ const e3 = A(t4.target, { matchingSelector: l2 });
+ null != e3 && (null == n2 || n2.call(e3, t4, e3), o2 && t4.preventDefault());
};
- return u2.destroy = () => a2.removeEventListener(t2, u2, c2), a2.addEventListener(t2, u2, c2), u2;
+ return u2.destroy = () => a2.removeEventListener(t3, u2, c2), a2.addEventListener(t3, u2, c2), u2;
};
- var b = function(t2) {
+ var b = function(t3) {
let { onElement: e2, bubbles: i2, cancelable: n2, attributes: r2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
const o2 = null != e2 ? e2 : m;
i2 = false !== i2, n2 = false !== n2;
const s2 = document.createEvent("Events");
- return s2.initEvent(t2, i2, n2), null != r2 && g.call(s2, r2), o2.dispatchEvent(s2);
+ return s2.initEvent(t3, i2, n2), null != r2 && g.call(s2, r2), o2.dispatchEvent(s2);
};
- var v = function(t2, e2) {
- if (1 === (null == t2 ? void 0 : t2.nodeType))
- return p.call(t2, e2);
+ var v = function(t3, e2) {
+ if (1 === (null == t3 ? void 0 : t3.nodeType))
+ return p.call(t3, e2);
};
- var A = function(t2) {
+ var A = function(t3) {
let { matchingSelector: e2, untilNode: i2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- for (; t2 && t2.nodeType !== Node.ELEMENT_NODE; )
- t2 = t2.parentNode;
- if (null != t2) {
+ for (; t3 && t3.nodeType !== Node.ELEMENT_NODE; )
+ t3 = t3.parentNode;
+ if (null != t3) {
if (null == e2)
- return t2;
- if (t2.closest && null == i2)
- return t2.closest(e2);
- for (; t2 && t2 !== i2; ) {
- if (v(t2, e2))
- return t2;
- t2 = t2.parentNode;
+ return t3;
+ if (t3.closest && null == i2)
+ return t3.closest(e2);
+ for (; t3 && t3 !== i2; ) {
+ if (v(t3, e2))
+ return t3;
+ t3 = t3.parentNode;
}
}
};
- var x = (t2) => document.activeElement !== t2 && y(t2, document.activeElement);
- var y = function(t2, e2) {
- if (t2 && e2)
+ var y = (t3) => document.activeElement !== t3 && x(t3, document.activeElement);
+ var x = function(t3, e2) {
+ if (t3 && e2)
for (; e2; ) {
- if (e2 === t2)
+ if (e2 === t3)
return true;
e2 = e2.parentNode;
}
};
- var C = function(t2) {
+ var C = function(t3) {
var e2;
- if (null === (e2 = t2) || void 0 === e2 || !e2.parentNode)
+ if (null === (e2 = t3) || void 0 === e2 || !e2.parentNode)
return;
let i2 = 0;
- for (t2 = t2.previousSibling; t2; )
- i2++, t2 = t2.previousSibling;
+ for (t3 = t3.previousSibling; t3; )
+ i2++, t3 = t3.previousSibling;
return i2;
};
- var k = (t2) => {
+ var E = (t3) => {
var e2;
- return null == t2 || null === (e2 = t2.parentNode) || void 0 === e2 ? void 0 : e2.removeChild(t2);
+ return null == t3 || null === (e2 = t3.parentNode) || void 0 === e2 ? void 0 : e2.removeChild(t3);
};
- var R = function(t2) {
+ var S = function(t3) {
let { onlyNodesOfType: e2, usingFilter: i2, expandEntityReferences: n2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
const r2 = (() => {
switch (e2) {
@@ -8316,16 +8316,16 @@
return NodeFilter.SHOW_ALL;
}
})();
- return document.createTreeWalker(t2, r2, null != i2 ? i2 : null, true === n2);
+ return document.createTreeWalker(t3, r2, null != i2 ? i2 : null, true === n2);
};
- var E = (t2) => {
+ var R = (t3) => {
var e2;
- return null == t2 || null === (e2 = t2.tagName) || void 0 === e2 ? void 0 : e2.toLowerCase();
+ return null == t3 || null === (e2 = t3.tagName) || void 0 === e2 ? void 0 : e2.toLowerCase();
};
- var S = function(t2) {
+ var k = function(t3) {
let e2, i2, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- "object" == typeof t2 ? (n2 = t2, t2 = n2.tagName) : n2 = { attributes: n2 };
- const r2 = document.createElement(t2);
+ "object" == typeof t3 ? (n2 = t3, t3 = n2.tagName) : n2 = { attributes: n2 };
+ const r2 = document.createElement(t3);
if (null != n2.editable && (null == n2.attributes && (n2.attributes = {}), n2.attributes.contenteditable = n2.editable), n2.attributes)
for (e2 in n2.attributes)
i2 = n2.attributes[e2], r2.setAttribute(e2, i2);
@@ -8335,111 +8335,111 @@
if (n2.data)
for (e2 in n2.data)
i2 = n2.data[e2], r2.dataset[e2] = i2;
- return n2.className && n2.className.split(" ").forEach((t3) => {
- r2.classList.add(t3);
- }), n2.textContent && (r2.textContent = n2.textContent), n2.childNodes && [].concat(n2.childNodes).forEach((t3) => {
- r2.appendChild(t3);
+ return n2.className && n2.className.split(" ").forEach((t4) => {
+ r2.classList.add(t4);
+ }), n2.textContent && (r2.textContent = n2.textContent), n2.childNodes && [].concat(n2.childNodes).forEach((t4) => {
+ r2.appendChild(t4);
}), r2;
};
- var L;
- var D = function() {
- if (null != L)
- return L;
- L = [];
- for (const t2 in n) {
- const e2 = n[t2];
- e2.tagName && L.push(e2.tagName);
- }
- return L;
+ var T;
+ var w = function() {
+ if (null != T)
+ return T;
+ T = [];
+ for (const t3 in n) {
+ const e2 = n[t3];
+ e2.tagName && T.push(e2.tagName);
+ }
+ return T;
};
- var w = (t2) => B(null == t2 ? void 0 : t2.firstChild);
- var T = function(t2) {
+ var L = (t3) => N(null == t3 ? void 0 : t3.firstChild);
+ var D = function(t3) {
let { strict: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { strict: true };
- return e2 ? B(t2) : B(t2) || !B(t2.firstChild) && function(t3) {
- return D().includes(E(t3)) && !D().includes(E(t3.firstChild));
- }(t2);
+ return e2 ? N(t3) : N(t3) || !N(t3.firstChild) && function(t4) {
+ return w().includes(R(t4)) && !w().includes(R(t4.firstChild));
+ }(t3);
};
- var B = (t2) => F(t2) && "block" === (null == t2 ? void 0 : t2.data);
- var F = (t2) => (null == t2 ? void 0 : t2.nodeType) === Node.COMMENT_NODE;
- var P = function(t2) {
+ var N = (t3) => I(t3) && "block" === (null == t3 ? void 0 : t3.data);
+ var I = (t3) => (null == t3 ? void 0 : t3.nodeType) === Node.COMMENT_NODE;
+ var O = function(t3) {
let { name: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- if (t2)
- return O(t2) ? t2.data === h ? !e2 || t2.parentNode.dataset.trixCursorTarget === e2 : void 0 : P(t2.firstChild);
+ if (t3)
+ return M(t3) ? t3.data === h ? !e2 || t3.parentNode.dataset.trixCursorTarget === e2 : void 0 : O(t3.firstChild);
};
- var I = (t2) => v(t2, e);
- var N = (t2) => O(t2) && "" === (null == t2 ? void 0 : t2.data);
- var O = (t2) => (null == t2 ? void 0 : t2.nodeType) === Node.TEXT_NODE;
- var M = { level2Enabled: true, getLevel() {
+ var P = (t3) => v(t3, e);
+ var F = (t3) => M(t3) && "" === (null == t3 ? void 0 : t3.data);
+ var M = (t3) => (null == t3 ? void 0 : t3.nodeType) === Node.TEXT_NODE;
+ var B = { level2Enabled: true, getLevel() {
return this.level2Enabled && a.supportsInputEvents ? 2 : 0;
- }, pickFiles(t2) {
- const e2 = S("input", { type: "file", multiple: true, hidden: true, id: this.fileInputId });
+ }, pickFiles(t3) {
+ const e2 = k("input", { type: "file", multiple: true, hidden: true, id: this.fileInputId });
e2.addEventListener("change", () => {
- t2(e2.files), k(e2);
- }), k(document.getElementById(this.fileInputId)), document.body.appendChild(e2), e2.click();
+ t3(e2.files), E(e2);
+ }), E(document.getElementById(this.fileInputId)), document.body.appendChild(e2), e2.click();
} };
- var j = { removeBlankTableCells: false, tableCellSeparator: " | ", tableRowSeparator: "\n" };
- var W = { bold: { tagName: "strong", inheritable: true, parser(t2) {
- const e2 = window.getComputedStyle(t2);
+ var _ = { removeBlankTableCells: false, tableCellSeparator: " | ", tableRowSeparator: "\n" };
+ var j = { bold: { tagName: "strong", inheritable: true, parser(t3) {
+ const e2 = window.getComputedStyle(t3);
return "bold" === e2.fontWeight || e2.fontWeight >= 600;
- } }, italic: { tagName: "em", inheritable: true, parser: (t2) => "italic" === window.getComputedStyle(t2).fontStyle }, href: { groupTagName: "a", parser(t2) {
- const i2 = "a:not(".concat(e, ")"), n2 = t2.closest(i2);
+ } }, italic: { tagName: "em", inheritable: true, parser: (t3) => "italic" === window.getComputedStyle(t3).fontStyle }, href: { groupTagName: "a", parser(t3) {
+ const i2 = "a:not(".concat(e, ")"), n2 = t3.closest(i2);
if (n2)
return n2.getAttribute("href");
} }, strike: { tagName: "del", inheritable: true }, frozen: { style: { backgroundColor: "highlight" } } };
- var U = { getDefaultHTML: () => '
\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n\n
') };
- var q = { interval: 5e3 };
- var V = Object.freeze({ __proto__: null, attachments: i, blockAttributes: n, browser: a, css: { attachment: "attachment", attachmentCaption: "attachment__caption", attachmentCaptionEditor: "attachment__caption-editor", attachmentMetadata: "attachment__metadata", attachmentMetadataContainer: "attachment__metadata-container", attachmentName: "attachment__name", attachmentProgress: "attachment__progress", attachmentSize: "attachment__size", attachmentToolbar: "attachment__toolbar", attachmentGallery: "attachment-gallery" }, fileSize: u, input: M, keyNames: { 8: "backspace", 9: "tab", 13: "return", 27: "escape", 37: "left", 39: "right", 46: "delete", 68: "d", 72: "h", 79: "o" }, lang: l, parser: j, textAttributes: W, toolbar: U, undo: q });
- var H = class {
- static proxyMethod(t2) {
- const { name: e2, toMethod: i2, toProperty: n2, optional: r2 } = z(t2);
+ var W = { getDefaultHTML: () => '
\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n\n
') };
+ var U = { interval: 5e3 };
+ var V = Object.freeze({ __proto__: null, attachments: i, blockAttributes: n, browser: a, css: { attachment: "attachment", attachmentCaption: "attachment__caption", attachmentCaptionEditor: "attachment__caption-editor", attachmentMetadata: "attachment__metadata", attachmentMetadataContainer: "attachment__metadata-container", attachmentName: "attachment__name", attachmentProgress: "attachment__progress", attachmentSize: "attachment__size", attachmentToolbar: "attachment__toolbar", attachmentGallery: "attachment-gallery" }, fileSize: u, input: B, keyNames: { 8: "backspace", 9: "tab", 13: "return", 27: "escape", 37: "left", 39: "right", 46: "delete", 68: "d", 72: "h", 79: "o" }, lang: l, parser: _, textAttributes: j, toolbar: W, undo: U });
+ var z = class {
+ static proxyMethod(t3) {
+ const { name: e2, toMethod: i2, toProperty: n2, optional: r2 } = q(t3);
this.prototype[e2] = function() {
- let t3, o2;
+ let t4, o2;
var s2, a2;
i2 ? o2 = r2 ? null === (s2 = this[i2]) || void 0 === s2 ? void 0 : s2.call(this) : this[i2]() : n2 && (o2 = this[n2]);
- return r2 ? (t3 = null === (a2 = o2) || void 0 === a2 ? void 0 : a2[e2], t3 ? _.call(t3, o2, arguments) : void 0) : (t3 = o2[e2], _.call(t3, o2, arguments));
+ return r2 ? (t4 = null === (a2 = o2) || void 0 === a2 ? void 0 : a2[e2], t4 ? H.call(t4, o2, arguments) : void 0) : (t4 = o2[e2], H.call(t4, o2, arguments));
};
}
};
- var z = function(t2) {
- const e2 = t2.match(J);
+ var q = function(t3) {
+ const e2 = t3.match(J);
if (!e2)
- throw new Error("can't parse @proxyMethod expression: ".concat(t2));
+ throw new Error("can't parse @proxyMethod expression: ".concat(t3));
const i2 = { name: e2[4] };
return null != e2[2] ? i2.toMethod = e2[1] : i2.toProperty = e2[1], null != e2[3] && (i2.optional = true), i2;
};
- var { apply: _ } = Function.prototype;
+ var { apply: H } = Function.prototype;
var J = new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$");
var K;
var G;
- var $2;
- var X = class extends H {
+ var Y;
+ var $2 = class extends z {
static box() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
- return t2 instanceof this ? t2 : this.fromUCS2String(null == t2 ? void 0 : t2.toString());
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
+ return t3 instanceof this ? t3 : this.fromUCS2String(null == t3 ? void 0 : t3.toString());
}
- static fromUCS2String(t2) {
- return new this(t2, tt(t2));
+ static fromUCS2String(t3) {
+ return new this(t3, tt(t3));
}
- static fromCodepoints(t2) {
- return new this(et(t2), t2);
+ static fromCodepoints(t3) {
+ return new this(et(t3), t3);
}
- constructor(t2, e2) {
- super(...arguments), this.ucs2String = t2, this.codepoints = e2, this.length = this.codepoints.length, this.ucs2Length = this.ucs2String.length;
+ constructor(t3, e2) {
+ super(...arguments), this.ucs2String = t3, this.codepoints = e2, this.length = this.codepoints.length, this.ucs2Length = this.ucs2String.length;
}
- offsetToUCS2Offset(t2) {
- return et(this.codepoints.slice(0, Math.max(0, t2))).length;
+ offsetToUCS2Offset(t3) {
+ return et(this.codepoints.slice(0, Math.max(0, t3))).length;
}
- offsetFromUCS2Offset(t2) {
- return tt(this.ucs2String.slice(0, Math.max(0, t2))).length;
+ offsetFromUCS2Offset(t3) {
+ return tt(this.ucs2String.slice(0, Math.max(0, t3))).length;
}
slice() {
return this.constructor.fromCodepoints(this.codepoints.slice(...arguments));
}
- charAt(t2) {
- return this.slice(t2, t2 + 1);
+ charAt(t3) {
+ return this.slice(t3, t3 + 1);
}
- isEqualTo(t2) {
- return this.constructor.box(t2).ucs2String === this.ucs2String;
+ isEqualTo(t3) {
+ return this.constructor.box(t3).ucs2String === this.ucs2String;
}
toJSON() {
return this.ucs2String;
@@ -8451,54 +8451,54 @@
return this.ucs2String;
}
};
- var Y = 1 === (null === (K = Array.from) || void 0 === K ? void 0 : K.call(Array, "\u{1F47C}").length);
- var Q = null != (null === (G = " ".codePointAt) || void 0 === G ? void 0 : G.call(" ", 0));
- var Z = " \u{1F47C}" === (null === ($2 = String.fromCodePoint) || void 0 === $2 ? void 0 : $2.call(String, 32, 128124));
+ var X = 1 === (null === (K = Array.from) || void 0 === K ? void 0 : K.call(Array, "\u{1F47C}").length);
+ var Z = null != (null === (G = " ".codePointAt) || void 0 === G ? void 0 : G.call(" ", 0));
+ var Q = " \u{1F47C}" === (null === (Y = String.fromCodePoint) || void 0 === Y ? void 0 : Y.call(String, 32, 128124));
var tt;
var et;
- tt = Y && Q ? (t2) => Array.from(t2).map((t3) => t3.codePointAt(0)) : function(t2) {
+ tt = X && Z ? (t3) => Array.from(t3).map((t4) => t4.codePointAt(0)) : function(t3) {
const e2 = [];
let i2 = 0;
- const { length: n2 } = t2;
+ const { length: n2 } = t3;
for (; i2 < n2; ) {
- let r2 = t2.charCodeAt(i2++);
+ let r2 = t3.charCodeAt(i2++);
if (55296 <= r2 && r2 <= 56319 && i2 < n2) {
- const e3 = t2.charCodeAt(i2++);
+ const e3 = t3.charCodeAt(i2++);
56320 == (64512 & e3) ? r2 = ((1023 & r2) << 10) + (1023 & e3) + 65536 : i2--;
}
e2.push(r2);
}
return e2;
- }, et = Z ? (t2) => String.fromCodePoint(...Array.from(t2 || [])) : function(t2) {
+ }, et = Q ? (t3) => String.fromCodePoint(...Array.from(t3 || [])) : function(t3) {
return (() => {
const e2 = [];
- return Array.from(t2).forEach((t3) => {
+ return Array.from(t3).forEach((t4) => {
let i2 = "";
- t3 > 65535 && (t3 -= 65536, i2 += String.fromCharCode(t3 >>> 10 & 1023 | 55296), t3 = 56320 | 1023 & t3), e2.push(i2 + String.fromCharCode(t3));
+ t4 > 65535 && (t4 -= 65536, i2 += String.fromCharCode(t4 >>> 10 & 1023 | 55296), t4 = 56320 | 1023 & t4), e2.push(i2 + String.fromCharCode(t4));
}), e2;
})().join("");
};
var it = 0;
- var nt = class extends H {
- static fromJSONString(t2) {
- return this.fromJSON(JSON.parse(t2));
+ var nt = class extends z {
+ static fromJSONString(t3) {
+ return this.fromJSON(JSON.parse(t3));
}
constructor() {
super(...arguments), this.id = ++it;
}
- hasSameConstructorAs(t2) {
- return this.constructor === (null == t2 ? void 0 : t2.constructor);
+ hasSameConstructorAs(t3) {
+ return this.constructor === (null == t3 ? void 0 : t3.constructor);
}
- isEqualTo(t2) {
- return this === t2;
+ isEqualTo(t3) {
+ return this === t3;
}
inspect() {
- const t2 = [], e2 = this.contentsForInspection() || {};
+ const t3 = [], e2 = this.contentsForInspection() || {};
for (const i2 in e2) {
const n2 = e2[i2];
- t2.push("".concat(i2, "=").concat(n2));
+ t3.push("".concat(i2, "=").concat(n2));
}
- return "#<".concat(this.constructor.name, ":").concat(this.id).concat(t2.length ? " ".concat(t2.join(", ")) : "", ">");
+ return "#<".concat(this.constructor.name, ":").concat(this.id).concat(t3.length ? " ".concat(t3.join(", ")) : "", ">");
}
contentsForInspection() {
}
@@ -8506,51 +8506,51 @@
return JSON.stringify(this);
}
toUTF16String() {
- return X.box(this);
+ return $2.box(this);
}
getCacheKey() {
return this.id.toString();
}
};
var rt = function() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
- if (t2.length !== e2.length)
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
+ if (t3.length !== e2.length)
return false;
- for (let i2 = 0; i2 < t2.length; i2++) {
- if (t2[i2] !== e2[i2])
+ for (let i2 = 0; i2 < t3.length; i2++) {
+ if (t3[i2] !== e2[i2])
return false;
}
return true;
};
- var ot = function(t2) {
- const e2 = t2.slice(0);
+ var ot = function(t3) {
+ const e2 = t3.slice(0);
for (var i2 = arguments.length, n2 = new Array(i2 > 1 ? i2 - 1 : 0), r2 = 1; r2 < i2; r2++)
n2[r2 - 1] = arguments[r2];
return e2.splice(...n2), e2;
};
var st = /[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/;
var at = function() {
- const t2 = S("input", { dir: "auto", name: "x", dirName: "x.dir" }), e2 = S("textarea", { dir: "auto", name: "y", dirName: "y.dir" }), i2 = S("form");
- i2.appendChild(t2), i2.appendChild(e2);
+ const t3 = k("input", { dir: "auto", name: "x", dirName: "x.dir" }), e2 = k("textarea", { dir: "auto", name: "y", dirName: "y.dir" }), i2 = k("form");
+ i2.appendChild(t3), i2.appendChild(e2);
const n2 = function() {
try {
return new FormData(i2).has(e2.dirName);
- } catch (t3) {
+ } catch (t4) {
return false;
}
}(), r2 = function() {
try {
- return t2.matches(":dir(ltr),:dir(rtl)");
- } catch (t3) {
+ return t3.matches(":dir(ltr),:dir(rtl)");
+ } catch (t4) {
return false;
}
}();
- return n2 ? function(t3) {
- return e2.value = t3, new FormData(i2).get(e2.dirName);
+ return n2 ? function(t4) {
+ return e2.value = t4, new FormData(i2).get(e2.dirName);
} : r2 ? function(e3) {
- return t2.value = e3, t2.matches(":dir(rtl)") ? "rtl" : "ltr";
- } : function(t3) {
- const e3 = t3.trim().charAt(0);
+ return t3.value = e3, t3.matches(":dir(rtl)") ? "rtl" : "ltr";
+ } : function(t4) {
+ const e3 = t4.trim().charAt(0);
return st.test(e3) ? "rtl" : "ltr";
};
}();
@@ -8559,80 +8559,82 @@
var ut = null;
var ht = null;
var dt = () => (lt || (lt = ft().concat(mt())), lt);
- var gt = (t2) => n[t2];
+ var gt = (t3) => n[t3];
var mt = () => (ct || (ct = Object.keys(n)), ct);
- var pt = (t2) => W[t2];
- var ft = () => (ut || (ut = Object.keys(W)), ut);
- var bt = function(t2, e2) {
- vt(t2).textContent = e2.replace(/%t/g, t2);
+ var pt = (t3) => j[t3];
+ var ft = () => (ut || (ut = Object.keys(j)), ut);
+ var bt = function(t3, e2) {
+ vt(t3).textContent = e2.replace(/%t/g, t3);
};
- var vt = function(t2) {
+ var vt = function(t3) {
const e2 = document.createElement("style");
- e2.setAttribute("type", "text/css"), e2.setAttribute("data-tag-name", t2.toLowerCase());
+ e2.setAttribute("type", "text/css"), e2.setAttribute("data-tag-name", t3.toLowerCase());
const i2 = At();
return i2 && e2.setAttribute("nonce", i2), document.head.insertBefore(e2, document.head.firstChild), e2;
};
var At = function() {
- const t2 = xt("trix-csp-nonce") || xt("csp-nonce");
- if (t2)
- return t2.getAttribute("content");
+ const t3 = yt("trix-csp-nonce") || yt("csp-nonce");
+ if (t3) {
+ const { nonce: e2, content: i2 } = t3;
+ return "" == e2 ? i2 : e2;
+ }
};
- var xt = (t2) => document.head.querySelector("meta[name=".concat(t2, "]"));
- var yt = { "application/x-trix-feature-detection": "test" };
- var Ct = function(t2) {
- const e2 = t2.getData("text/plain"), i2 = t2.getData("text/html");
+ var yt = (t3) => document.head.querySelector("meta[name=".concat(t3, "]"));
+ var xt = { "application/x-trix-feature-detection": "test" };
+ var Ct = function(t3) {
+ const e2 = t3.getData("text/plain"), i2 = t3.getData("text/html");
if (!e2 || !i2)
return null == e2 ? void 0 : e2.length;
{
- const { body: t3 } = new DOMParser().parseFromString(i2, "text/html");
- if (t3.textContent === e2)
- return !t3.querySelector("*");
+ const { body: t4 } = new DOMParser().parseFromString(i2, "text/html");
+ if (t4.textContent === e2)
+ return !t4.querySelector("*");
}
};
- var kt = /Mac|^iP/.test(navigator.platform) ? (t2) => t2.metaKey : (t2) => t2.ctrlKey;
- var Rt = (t2) => setTimeout(t2, 1);
- var Et = function() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
+ var Et = /Mac|^iP/.test(navigator.platform) ? (t3) => t3.metaKey : (t3) => t3.ctrlKey;
+ var St = (t3) => setTimeout(t3, 1);
+ var Rt = function() {
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
const e2 = {};
- for (const i2 in t2) {
- const n2 = t2[i2];
+ for (const i2 in t3) {
+ const n2 = t3[i2];
e2[i2] = n2;
}
return e2;
};
- var St = function() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- if (Object.keys(t2).length !== Object.keys(e2).length)
+ var kt = function() {
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
+ if (Object.keys(t3).length !== Object.keys(e2).length)
return false;
- for (const i2 in t2) {
- if (t2[i2] !== e2[i2])
+ for (const i2 in t3) {
+ if (t3[i2] !== e2[i2])
return false;
}
return true;
};
- var Lt = function(t2) {
- if (null != t2)
- return Array.isArray(t2) || (t2 = [t2, t2]), [Tt(t2[0]), Tt(null != t2[1] ? t2[1] : t2[0])];
+ var Tt = function(t3) {
+ if (null != t3)
+ return Array.isArray(t3) || (t3 = [t3, t3]), [Dt(t3[0]), Dt(null != t3[1] ? t3[1] : t3[0])];
};
- var Dt = function(t2) {
- if (null == t2)
+ var wt = function(t3) {
+ if (null == t3)
return;
- const [e2, i2] = Lt(t2);
- return Bt(e2, i2);
+ const [e2, i2] = Tt(t3);
+ return Nt(e2, i2);
};
- var wt = function(t2, e2) {
- if (null == t2 || null == e2)
+ var Lt = function(t3, e2) {
+ if (null == t3 || null == e2)
return;
- const [i2, n2] = Lt(t2), [r2, o2] = Lt(e2);
- return Bt(i2, r2) && Bt(n2, o2);
+ const [i2, n2] = Tt(t3), [r2, o2] = Tt(e2);
+ return Nt(i2, r2) && Nt(n2, o2);
};
- var Tt = function(t2) {
- return "number" == typeof t2 ? t2 : Et(t2);
+ var Dt = function(t3) {
+ return "number" == typeof t3 ? t3 : Rt(t3);
};
- var Bt = function(t2, e2) {
- return "number" == typeof t2 ? t2 === e2 : St(t2, e2);
+ var Nt = function(t3, e2) {
+ return "number" == typeof t3 ? t3 === e2 : kt(t3, e2);
};
- var Ft = class extends H {
+ var It = class extends z {
constructor() {
super(...arguments), this.update = this.update.bind(this), this.selectionManagers = [];
}
@@ -8643,16 +8645,16 @@
if (this.started)
return this.started = false, document.removeEventListener("selectionchange", this.update, true);
}
- registerSelectionManager(t2) {
- if (!this.selectionManagers.includes(t2))
- return this.selectionManagers.push(t2), this.start();
+ registerSelectionManager(t3) {
+ if (!this.selectionManagers.includes(t3))
+ return this.selectionManagers.push(t3), this.start();
}
- unregisterSelectionManager(t2) {
- if (this.selectionManagers = this.selectionManagers.filter((e2) => e2 !== t2), 0 === this.selectionManagers.length)
+ unregisterSelectionManager(t3) {
+ if (this.selectionManagers = this.selectionManagers.filter((e2) => e2 !== t3), 0 === this.selectionManagers.length)
return this.stop();
}
notifySelectionManagersOfSelectionChange() {
- return this.selectionManagers.map((t2) => t2.selectionDidChange());
+ return this.selectionManagers.map((t3) => t3.selectionDidChange());
}
update() {
this.notifySelectionManagersOfSelectionChange();
@@ -8661,105 +8663,105 @@
this.update();
}
};
- var Pt = new Ft();
- var It = function() {
- const t2 = window.getSelection();
- if (t2.rangeCount > 0)
- return t2;
+ var Ot = new It();
+ var Pt = function() {
+ const t3 = window.getSelection();
+ if (t3.rangeCount > 0)
+ return t3;
};
- var Nt = function() {
- var t2;
- const e2 = null === (t2 = It()) || void 0 === t2 ? void 0 : t2.getRangeAt(0);
- if (e2 && !Mt(e2))
+ var Ft = function() {
+ var t3;
+ const e2 = null === (t3 = Pt()) || void 0 === t3 ? void 0 : t3.getRangeAt(0);
+ if (e2 && !Bt(e2))
return e2;
};
- var Ot = function(t2) {
+ var Mt = function(t3) {
const e2 = window.getSelection();
- return e2.removeAllRanges(), e2.addRange(t2), Pt.update();
+ return e2.removeAllRanges(), e2.addRange(t3), Ot.update();
};
- var Mt = (t2) => jt(t2.startContainer) || jt(t2.endContainer);
- var jt = (t2) => !Object.getPrototypeOf(t2);
- var Wt = (t2) => t2.replace(new RegExp("".concat(h), "g"), "").replace(new RegExp("".concat(d), "g"), " ");
- var Ut = new RegExp("[^\\S".concat(d, "]"));
- var qt = (t2) => t2.replace(new RegExp("".concat(Ut.source), "g"), " ").replace(/\ {2,}/g, " ");
- var Vt = function(t2, e2) {
- if (t2.isEqualTo(e2))
+ var Bt = (t3) => _t(t3.startContainer) || _t(t3.endContainer);
+ var _t = (t3) => !Object.getPrototypeOf(t3);
+ var jt = (t3) => t3.replace(new RegExp("".concat(h), "g"), "").replace(new RegExp("".concat(d), "g"), " ");
+ var Wt = new RegExp("[^\\S".concat(d, "]"));
+ var Ut = (t3) => t3.replace(new RegExp("".concat(Wt.source), "g"), " ").replace(/\ {2,}/g, " ");
+ var Vt = function(t3, e2) {
+ if (t3.isEqualTo(e2))
return ["", ""];
- const i2 = Ht(t2, e2), { length: n2 } = i2.utf16String;
+ const i2 = zt(t3, e2), { length: n2 } = i2.utf16String;
let r2;
if (n2) {
- const { offset: o2 } = i2, s2 = t2.codepoints.slice(0, o2).concat(t2.codepoints.slice(o2 + n2));
- r2 = Ht(e2, X.fromCodepoints(s2));
+ const { offset: o2 } = i2, s2 = t3.codepoints.slice(0, o2).concat(t3.codepoints.slice(o2 + n2));
+ r2 = zt(e2, $2.fromCodepoints(s2));
} else
- r2 = Ht(e2, t2);
+ r2 = zt(e2, t3);
return [i2.utf16String.toString(), r2.utf16String.toString()];
};
- var Ht = function(t2, e2) {
- let i2 = 0, n2 = t2.length, r2 = e2.length;
- for (; i2 < n2 && t2.charAt(i2).isEqualTo(e2.charAt(i2)); )
+ var zt = function(t3, e2) {
+ let i2 = 0, n2 = t3.length, r2 = e2.length;
+ for (; i2 < n2 && t3.charAt(i2).isEqualTo(e2.charAt(i2)); )
i2++;
- for (; n2 > i2 + 1 && t2.charAt(n2 - 1).isEqualTo(e2.charAt(r2 - 1)); )
+ for (; n2 > i2 + 1 && t3.charAt(n2 - 1).isEqualTo(e2.charAt(r2 - 1)); )
n2--, r2--;
- return { utf16String: t2.slice(i2, n2), offset: i2 };
+ return { utf16String: t3.slice(i2, n2), offset: i2 };
};
- var zt = class _zt extends nt {
+ var qt = class _qt extends nt {
static fromCommonAttributesOfObjects() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- if (!t2.length)
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
+ if (!t3.length)
return new this();
- let e2 = Gt(t2[0]), i2 = e2.getKeys();
- return t2.slice(1).forEach((t3) => {
- i2 = e2.getKeysCommonToHash(Gt(t3)), e2 = e2.slice(i2);
+ let e2 = Gt(t3[0]), i2 = e2.getKeys();
+ return t3.slice(1).forEach((t4) => {
+ i2 = e2.getKeysCommonToHash(Gt(t4)), e2 = e2.slice(i2);
}), e2;
}
- static box(t2) {
- return Gt(t2);
+ static box(t3) {
+ return Gt(t3);
}
constructor() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- super(...arguments), this.values = Kt(t2);
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
+ super(...arguments), this.values = Kt(t3);
}
- add(t2, e2) {
- return this.merge(_t(t2, e2));
+ add(t3, e2) {
+ return this.merge(Ht(t3, e2));
}
- remove(t2) {
- return new _zt(Kt(this.values, t2));
+ remove(t3) {
+ return new _qt(Kt(this.values, t3));
}
- get(t2) {
- return this.values[t2];
+ get(t3) {
+ return this.values[t3];
}
- has(t2) {
- return t2 in this.values;
+ has(t3) {
+ return t3 in this.values;
}
- merge(t2) {
- return new _zt(Jt(this.values, $t(t2)));
+ merge(t3) {
+ return new _qt(Jt(this.values, Yt(t3)));
}
- slice(t2) {
+ slice(t3) {
const e2 = {};
- return Array.from(t2).forEach((t3) => {
- this.has(t3) && (e2[t3] = this.values[t3]);
- }), new _zt(e2);
+ return Array.from(t3).forEach((t4) => {
+ this.has(t4) && (e2[t4] = this.values[t4]);
+ }), new _qt(e2);
}
getKeys() {
return Object.keys(this.values);
}
- getKeysCommonToHash(t2) {
- return t2 = Gt(t2), this.getKeys().filter((e2) => this.values[e2] === t2.values[e2]);
+ getKeysCommonToHash(t3) {
+ return t3 = Gt(t3), this.getKeys().filter((e2) => this.values[e2] === t3.values[e2]);
}
- isEqualTo(t2) {
- return rt(this.toArray(), Gt(t2).toArray());
+ isEqualTo(t3) {
+ return rt(this.toArray(), Gt(t3).toArray());
}
isEmpty() {
return 0 === this.getKeys().length;
}
toArray() {
if (!this.array) {
- const t2 = [];
+ const t3 = [];
for (const e2 in this.values) {
const i2 = this.values[e2];
- t2.push(t2.push(e2, i2));
+ t3.push(t3.push(e2, i2));
}
- this.array = t2.slice(0);
+ this.array = t3.slice(0);
}
return this.array;
}
@@ -8773,49 +8775,49 @@
return { values: JSON.stringify(this.values) };
}
};
- var _t = function(t2, e2) {
+ var Ht = function(t3, e2) {
const i2 = {};
- return i2[t2] = e2, i2;
+ return i2[t3] = e2, i2;
};
- var Jt = function(t2, e2) {
- const i2 = Kt(t2);
- for (const t3 in e2) {
- const n2 = e2[t3];
- i2[t3] = n2;
+ var Jt = function(t3, e2) {
+ const i2 = Kt(t3);
+ for (const t4 in e2) {
+ const n2 = e2[t4];
+ i2[t4] = n2;
}
return i2;
};
- var Kt = function(t2, e2) {
+ var Kt = function(t3, e2) {
const i2 = {};
- return Object.keys(t2).sort().forEach((n2) => {
- n2 !== e2 && (i2[n2] = t2[n2]);
+ return Object.keys(t3).sort().forEach((n2) => {
+ n2 !== e2 && (i2[n2] = t3[n2]);
}), i2;
};
- var Gt = function(t2) {
- return t2 instanceof zt ? t2 : new zt(t2);
+ var Gt = function(t3) {
+ return t3 instanceof qt ? t3 : new qt(t3);
};
- var $t = function(t2) {
- return t2 instanceof zt ? t2.values : t2;
+ var Yt = function(t3) {
+ return t3 instanceof qt ? t3.values : t3;
};
- var Xt = class {
+ var $t = class {
static groupObjects() {
- let t2, e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], { depth: i2, asTree: n2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
+ let t3, e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], { depth: i2, asTree: n2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
n2 && null == i2 && (i2 = 0);
const r2 = [];
return Array.from(e2).forEach((e3) => {
var o2;
- if (t2) {
+ if (t3) {
var s2, a2, l2;
- if (null !== (s2 = e3.canBeGrouped) && void 0 !== s2 && s2.call(e3, i2) && null !== (a2 = (l2 = t2[t2.length - 1]).canBeGroupedWith) && void 0 !== a2 && a2.call(l2, e3, i2))
- return void t2.push(e3);
- r2.push(new this(t2, { depth: i2, asTree: n2 })), t2 = null;
+ if (null !== (s2 = e3.canBeGrouped) && void 0 !== s2 && s2.call(e3, i2) && null !== (a2 = (l2 = t3[t3.length - 1]).canBeGroupedWith) && void 0 !== a2 && a2.call(l2, e3, i2))
+ return void t3.push(e3);
+ r2.push(new this(t3, { depth: i2, asTree: n2 })), t3 = null;
}
- null !== (o2 = e3.canBeGrouped) && void 0 !== o2 && o2.call(e3, i2) ? t2 = [e3] : r2.push(e3);
- }), t2 && r2.push(new this(t2, { depth: i2, asTree: n2 })), r2;
+ null !== (o2 = e3.canBeGrouped) && void 0 !== o2 && o2.call(e3, i2) ? t3 = [e3] : r2.push(e3);
+ }), t3 && r2.push(new this(t3, { depth: i2, asTree: n2 })), r2;
}
constructor() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], { depth: e2, asTree: i2 } = arguments.length > 1 ? arguments[1] : void 0;
- this.objects = t2, i2 && (this.depth = e2, this.objects = this.constructor.groupObjects(this.objects, { asTree: i2, depth: this.depth + 1 }));
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], { depth: e2, asTree: i2 } = arguments.length > 1 ? arguments[1] : void 0;
+ this.objects = t3, i2 && (this.depth = e2, this.objects = this.constructor.groupObjects(this.objects, { asTree: i2, depth: this.depth + 1 }));
}
getObjects() {
return this.objects;
@@ -8824,47 +8826,47 @@
return this.depth;
}
getCacheKey() {
- const t2 = ["objectGroup"];
+ const t3 = ["objectGroup"];
return Array.from(this.getObjects()).forEach((e2) => {
- t2.push(e2.getCacheKey());
- }), t2.join("/");
+ t3.push(e2.getCacheKey());
+ }), t3.join("/");
}
};
- var Yt = class extends H {
+ var Xt = class extends z {
constructor() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- super(...arguments), this.objects = {}, Array.from(t2).forEach((t3) => {
- const e2 = JSON.stringify(t3);
- null == this.objects[e2] && (this.objects[e2] = t3);
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
+ super(...arguments), this.objects = {}, Array.from(t3).forEach((t4) => {
+ const e2 = JSON.stringify(t4);
+ null == this.objects[e2] && (this.objects[e2] = t4);
});
}
- find(t2) {
- const e2 = JSON.stringify(t2);
+ find(t3) {
+ const e2 = JSON.stringify(t3);
return this.objects[e2];
}
};
- var Qt = class {
- constructor(t2) {
- this.reset(t2);
+ var Zt = class {
+ constructor(t3) {
+ this.reset(t3);
}
- add(t2) {
- const e2 = Zt(t2);
- this.elements[e2] = t2;
+ add(t3) {
+ const e2 = Qt(t3);
+ this.elements[e2] = t3;
}
- remove(t2) {
- const e2 = Zt(t2), i2 = this.elements[e2];
+ remove(t3) {
+ const e2 = Qt(t3), i2 = this.elements[e2];
if (i2)
return delete this.elements[e2], i2;
}
reset() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- return this.elements = {}, Array.from(t2).forEach((t3) => {
- this.add(t3);
- }), t2;
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
+ return this.elements = {}, Array.from(t3).forEach((t4) => {
+ this.add(t4);
+ }), t3;
}
};
- var Zt = (t2) => t2.dataset.trixStoreKey;
- var te = class extends H {
+ var Qt = (t3) => t3.dataset.trixStoreKey;
+ var te = class extends z {
isPerforming() {
return true === this.performing;
}
@@ -8878,65 +8880,65 @@
return this.performed && !this.succeeded;
}
getPromise() {
- return this.promise || (this.promise = new Promise((t2, e2) => (this.performing = true, this.perform((i2, n2) => {
- this.succeeded = i2, this.performing = false, this.performed = true, this.succeeded ? t2(n2) : e2(n2);
+ return this.promise || (this.promise = new Promise((t3, e2) => (this.performing = true, this.perform((i2, n2) => {
+ this.succeeded = i2, this.performing = false, this.performed = true, this.succeeded ? t3(n2) : e2(n2);
})))), this.promise;
}
- perform(t2) {
- return t2(false);
+ perform(t3) {
+ return t3(false);
}
release() {
- var t2, e2;
- null === (t2 = this.promise) || void 0 === t2 || null === (e2 = t2.cancel) || void 0 === e2 || e2.call(t2), this.promise = null, this.performing = null, this.performed = null, this.succeeded = null;
+ var t3, e2;
+ null === (t3 = this.promise) || void 0 === t3 || null === (e2 = t3.cancel) || void 0 === e2 || e2.call(t3), this.promise = null, this.performing = null, this.performed = null, this.succeeded = null;
}
};
te.proxyMethod("getPromise().then"), te.proxyMethod("getPromise().catch");
- var ee = class extends H {
- constructor(t2) {
+ var ee = class extends z {
+ constructor(t3) {
let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- super(...arguments), this.object = t2, this.options = e2, this.childViews = [], this.rootView = this;
+ super(...arguments), this.object = t3, this.options = e2, this.childViews = [], this.rootView = this;
}
getNodes() {
- return this.nodes || (this.nodes = this.createNodes()), this.nodes.map((t2) => t2.cloneNode(true));
+ return this.nodes || (this.nodes = this.createNodes()), this.nodes.map((t3) => t3.cloneNode(true));
}
invalidate() {
- var t2;
- return this.nodes = null, this.childViews = [], null === (t2 = this.parentView) || void 0 === t2 ? void 0 : t2.invalidate();
+ var t3;
+ return this.nodes = null, this.childViews = [], null === (t3 = this.parentView) || void 0 === t3 ? void 0 : t3.invalidate();
}
- invalidateViewForObject(t2) {
+ invalidateViewForObject(t3) {
var e2;
- return null === (e2 = this.findViewForObject(t2)) || void 0 === e2 ? void 0 : e2.invalidate();
+ return null === (e2 = this.findViewForObject(t3)) || void 0 === e2 ? void 0 : e2.invalidate();
}
- findOrCreateCachedChildView(t2, e2, i2) {
+ findOrCreateCachedChildView(t3, e2, i2) {
let n2 = this.getCachedViewForObject(e2);
return n2 ? this.recordChildView(n2) : (n2 = this.createChildView(...arguments), this.cacheViewForObject(n2, e2)), n2;
}
- createChildView(t2, e2) {
+ createChildView(t3, e2) {
let i2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
- e2 instanceof Xt && (i2.viewClass = t2, t2 = ie);
- const n2 = new t2(e2, i2);
+ e2 instanceof $t && (i2.viewClass = t3, t3 = ie);
+ const n2 = new t3(e2, i2);
return this.recordChildView(n2);
}
- recordChildView(t2) {
- return t2.parentView = this, t2.rootView = this.rootView, this.childViews.push(t2), t2;
+ recordChildView(t3) {
+ return t3.parentView = this, t3.rootView = this.rootView, this.childViews.push(t3), t3;
}
getAllChildViews() {
- let t2 = [];
+ let t3 = [];
return this.childViews.forEach((e2) => {
- t2.push(e2), t2 = t2.concat(e2.getAllChildViews());
- }), t2;
+ t3.push(e2), t3 = t3.concat(e2.getAllChildViews());
+ }), t3;
}
findElement() {
return this.findElementForObject(this.object);
}
- findElementForObject(t2) {
- const e2 = null == t2 ? void 0 : t2.id;
+ findElementForObject(t3) {
+ const e2 = null == t3 ? void 0 : t3.id;
if (e2)
return this.rootView.element.querySelector("[data-trix-id='".concat(e2, "']"));
}
- findViewForObject(t2) {
+ findViewForObject(t3) {
for (const e2 of this.getAllChildViews())
- if (e2.object === t2)
+ if (e2.object === t3)
return e2;
}
getViewCache() {
@@ -8951,20 +8953,20 @@
disableViewCaching() {
this.shouldCacheViews = false;
}
- getCachedViewForObject(t2) {
+ getCachedViewForObject(t3) {
var e2;
- return null === (e2 = this.getViewCache()) || void 0 === e2 ? void 0 : e2[t2.getCacheKey()];
+ return null === (e2 = this.getViewCache()) || void 0 === e2 ? void 0 : e2[t3.getCacheKey()];
}
- cacheViewForObject(t2, e2) {
+ cacheViewForObject(t3, e2) {
const i2 = this.getViewCache();
- i2 && (i2[e2.getCacheKey()] = t2);
+ i2 && (i2[e2.getCacheKey()] = t3);
}
garbageCollectCachedViews() {
- const t2 = this.getViewCache();
- if (t2) {
- const e2 = this.getAllChildViews().concat(this).map((t3) => t3.object.getCacheKey());
- for (const i2 in t2)
- e2.includes(i2) || delete t2[i2];
+ const t3 = this.getViewCache();
+ if (t3) {
+ const e2 = this.getAllChildViews().concat(this).map((t4) => t4.object.getCacheKey());
+ for (const i2 in t3)
+ e2.includes(i2) || delete t3[i2];
}
}
};
@@ -8973,41 +8975,442 @@
super(...arguments), this.objectGroup = this.object, this.viewClass = this.options.viewClass, delete this.options.viewClass;
}
getChildViews() {
- return this.childViews.length || Array.from(this.objectGroup.getObjects()).forEach((t2) => {
- this.findOrCreateCachedChildView(this.viewClass, t2, this.options);
+ return this.childViews.length || Array.from(this.objectGroup.getObjects()).forEach((t3) => {
+ this.findOrCreateCachedChildView(this.viewClass, t3, this.options);
}), this.childViews;
}
createNodes() {
- const t2 = this.createContainerElement();
+ const t3 = this.createContainerElement();
return this.getChildViews().forEach((e2) => {
Array.from(e2.getNodes()).forEach((e3) => {
- t2.appendChild(e3);
+ t3.appendChild(e3);
});
- }), [t2];
+ }), [t3];
}
createContainerElement() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.objectGroup.getDepth();
- return this.getChildViews()[0].createContainerElement(t2);
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.objectGroup.getDepth();
+ return this.getChildViews()[0].createContainerElement(t3);
+ }
+ };
+ var { entries: ne, setPrototypeOf: re, isFrozen: oe, getPrototypeOf: se, getOwnPropertyDescriptor: ae } = Object;
+ var { freeze: le, seal: ce, create: ue } = Object;
+ var { apply: he, construct: de } = "undefined" != typeof Reflect && Reflect;
+ le || (le = function(t3) {
+ return t3;
+ }), ce || (ce = function(t3) {
+ return t3;
+ }), he || (he = function(t3, e2, i2) {
+ return t3.apply(e2, i2);
+ }), de || (de = function(t3, e2) {
+ return new t3(...e2);
+ });
+ var ge = ke(Array.prototype.forEach);
+ var me = ke(Array.prototype.pop);
+ var pe = ke(Array.prototype.push);
+ var fe = ke(String.prototype.toLowerCase);
+ var be = ke(String.prototype.toString);
+ var ve = ke(String.prototype.match);
+ var Ae = ke(String.prototype.replace);
+ var ye = ke(String.prototype.indexOf);
+ var xe = ke(String.prototype.trim);
+ var Ce = ke(Object.prototype.hasOwnProperty);
+ var Ee = ke(RegExp.prototype.test);
+ var Se = (Re = TypeError, function() {
+ for (var t3 = arguments.length, e2 = new Array(t3), i2 = 0; i2 < t3; i2++)
+ e2[i2] = arguments[i2];
+ return de(Re, e2);
+ });
+ var Re;
+ function ke(t3) {
+ return function(e2) {
+ for (var i2 = arguments.length, n2 = new Array(i2 > 1 ? i2 - 1 : 0), r2 = 1; r2 < i2; r2++)
+ n2[r2 - 1] = arguments[r2];
+ return he(t3, e2, n2);
+ };
+ }
+ function Te(t3, e2) {
+ let i2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : fe;
+ re && re(t3, null);
+ let n2 = e2.length;
+ for (; n2--; ) {
+ let r2 = e2[n2];
+ if ("string" == typeof r2) {
+ const t4 = i2(r2);
+ t4 !== r2 && (oe(e2) || (e2[n2] = t4), r2 = t4);
+ }
+ t3[r2] = true;
+ }
+ return t3;
+ }
+ function we(t3) {
+ for (let e2 = 0; e2 < t3.length; e2++) {
+ Ce(t3, e2) || (t3[e2] = null);
+ }
+ return t3;
+ }
+ function Le(t3) {
+ const e2 = ue(null);
+ for (const [i2, n2] of ne(t3)) {
+ Ce(t3, i2) && (Array.isArray(n2) ? e2[i2] = we(n2) : n2 && "object" == typeof n2 && n2.constructor === Object ? e2[i2] = Le(n2) : e2[i2] = n2);
+ }
+ return e2;
+ }
+ function De(t3, e2) {
+ for (; null !== t3; ) {
+ const i2 = ae(t3, e2);
+ if (i2) {
+ if (i2.get)
+ return ke(i2.get);
+ if ("function" == typeof i2.value)
+ return ke(i2.value);
+ }
+ t3 = se(t3);
}
+ return function() {
+ return null;
+ };
+ }
+ var Ne = le(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
+ var Ie = le(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
+ var Oe = le(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
+ var Pe = le(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
+ var Fe = le(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
+ var Me = le(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
+ var Be = le(["#text"]);
+ var _e = le(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
+ var je = le(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
+ var We = le(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
+ var Ue = le(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
+ var Ve = ce(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
+ var ze = ce(/<%[\w\W]*|[\w\W]*%>/gm);
+ var qe = ce(/\$\{[\w\W]*}/gm);
+ var He = ce(/^data-[\-\w.\u00B7-\uFFFF]+$/);
+ var Je = ce(/^aria-[\-\w]+$/);
+ var Ke = ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);
+ var Ge = ce(/^(?:\w+script|data):/i);
+ var Ye = ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
+ var $e = ce(/^html$/i);
+ var Xe = ce(/^[a-z][.\w]*(-[.\w]+)+$/i);
+ var Ze = Object.freeze({ __proto__: null, ARIA_ATTR: Je, ATTR_WHITESPACE: Ye, CUSTOM_ELEMENT: Xe, DATA_ATTR: He, DOCTYPE_NAME: $e, ERB_EXPR: ze, IS_ALLOWED_URI: Ke, IS_SCRIPT_OR_DATA: Ge, MUSTACHE_EXPR: Ve, TMPLIT_EXPR: qe });
+ var Qe = 1;
+ var ti = 3;
+ var ei = 7;
+ var ii = 8;
+ var ni = 9;
+ var ri = function() {
+ return "undefined" == typeof window ? null : window;
};
- var ne = "style href src width height language class".split(" ");
- var re = "javascript:".split(" ");
- var oe = "script iframe form noscript".split(" ");
- var se = class extends H {
- static setHTML(t2, e2) {
+ var oi = function t2() {
+ let e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ri();
+ const i2 = (e3) => t2(e3);
+ if (i2.version = "3.2.3", i2.removed = [], !e2 || !e2.document || e2.document.nodeType !== ni)
+ return i2.isSupported = false, i2;
+ let { document: n2 } = e2;
+ const r2 = n2, o2 = r2.currentScript, { DocumentFragment: s2, HTMLTemplateElement: a2, Node: l2, Element: c2, NodeFilter: u2, NamedNodeMap: h2 = e2.NamedNodeMap || e2.MozNamedAttrMap, HTMLFormElement: d2, DOMParser: g2, trustedTypes: m2 } = e2, p2 = c2.prototype, f2 = De(p2, "cloneNode"), b2 = De(p2, "remove"), v2 = De(p2, "nextSibling"), A2 = De(p2, "childNodes"), y2 = De(p2, "parentNode");
+ if ("function" == typeof a2) {
+ const t3 = n2.createElement("template");
+ t3.content && t3.content.ownerDocument && (n2 = t3.content.ownerDocument);
+ }
+ let x2, C2 = "";
+ const { implementation: E2, createNodeIterator: S2, createDocumentFragment: R2, getElementsByTagName: k2 } = n2, { importNode: T2 } = r2;
+ let w2 = { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] };
+ i2.isSupported = "function" == typeof ne && "function" == typeof y2 && E2 && void 0 !== E2.createHTMLDocument;
+ const { MUSTACHE_EXPR: L2, ERB_EXPR: D2, TMPLIT_EXPR: N2, DATA_ATTR: I2, ARIA_ATTR: O2, IS_SCRIPT_OR_DATA: P2, ATTR_WHITESPACE: F2, CUSTOM_ELEMENT: M2 } = Ze;
+ let { IS_ALLOWED_URI: B2 } = Ze, _2 = null;
+ const j2 = Te({}, [...Ne, ...Ie, ...Oe, ...Fe, ...Be]);
+ let W2 = null;
+ const U2 = Te({}, [..._e, ...je, ...We, ...Ue]);
+ let V2 = Object.seal(ue(null, { tagNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, attributeNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, allowCustomizedBuiltInElements: { writable: true, configurable: false, enumerable: true, value: false } })), z2 = null, q2 = null, H2 = true, J2 = true, K2 = false, G2 = true, Y2 = false, $5 = true, X2 = false, Z2 = false, Q2 = false, tt2 = false, et2 = false, it2 = false, nt2 = true, rt2 = false, ot2 = true, st2 = false, at2 = {}, lt2 = null;
+ const ct2 = Te({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
+ let ut2 = null;
+ const ht2 = Te({}, ["audio", "video", "img", "source", "image", "track"]);
+ let dt2 = null;
+ const gt2 = Te({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), mt2 = "http://www.w3.org/1998/Math/MathML", pt2 = "http://www.w3.org/2000/svg", ft2 = "http://www.w3.org/1999/xhtml";
+ let bt2 = ft2, vt2 = false, At2 = null;
+ const yt2 = Te({}, [mt2, pt2, ft2], be);
+ let xt2 = Te({}, ["mi", "mo", "mn", "ms", "mtext"]), Ct2 = Te({}, ["annotation-xml"]);
+ const Et2 = Te({}, ["title", "style", "font", "a", "script"]);
+ let St2 = null;
+ const Rt2 = ["application/xhtml+xml", "text/html"];
+ let kt2 = null, Tt2 = null;
+ const wt2 = n2.createElement("form"), Lt2 = function(t3) {
+ return t3 instanceof RegExp || t3 instanceof Function;
+ }, Dt2 = function() {
+ let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
+ if (!Tt2 || Tt2 !== t3) {
+ if (t3 && "object" == typeof t3 || (t3 = {}), t3 = Le(t3), St2 = -1 === Rt2.indexOf(t3.PARSER_MEDIA_TYPE) ? "text/html" : t3.PARSER_MEDIA_TYPE, kt2 = "application/xhtml+xml" === St2 ? be : fe, _2 = Ce(t3, "ALLOWED_TAGS") ? Te({}, t3.ALLOWED_TAGS, kt2) : j2, W2 = Ce(t3, "ALLOWED_ATTR") ? Te({}, t3.ALLOWED_ATTR, kt2) : U2, At2 = Ce(t3, "ALLOWED_NAMESPACES") ? Te({}, t3.ALLOWED_NAMESPACES, be) : yt2, dt2 = Ce(t3, "ADD_URI_SAFE_ATTR") ? Te(Le(gt2), t3.ADD_URI_SAFE_ATTR, kt2) : gt2, ut2 = Ce(t3, "ADD_DATA_URI_TAGS") ? Te(Le(ht2), t3.ADD_DATA_URI_TAGS, kt2) : ht2, lt2 = Ce(t3, "FORBID_CONTENTS") ? Te({}, t3.FORBID_CONTENTS, kt2) : ct2, z2 = Ce(t3, "FORBID_TAGS") ? Te({}, t3.FORBID_TAGS, kt2) : {}, q2 = Ce(t3, "FORBID_ATTR") ? Te({}, t3.FORBID_ATTR, kt2) : {}, at2 = !!Ce(t3, "USE_PROFILES") && t3.USE_PROFILES, H2 = false !== t3.ALLOW_ARIA_ATTR, J2 = false !== t3.ALLOW_DATA_ATTR, K2 = t3.ALLOW_UNKNOWN_PROTOCOLS || false, G2 = false !== t3.ALLOW_SELF_CLOSE_IN_ATTR, Y2 = t3.SAFE_FOR_TEMPLATES || false, $5 = false !== t3.SAFE_FOR_XML, X2 = t3.WHOLE_DOCUMENT || false, tt2 = t3.RETURN_DOM || false, et2 = t3.RETURN_DOM_FRAGMENT || false, it2 = t3.RETURN_TRUSTED_TYPE || false, Q2 = t3.FORCE_BODY || false, nt2 = false !== t3.SANITIZE_DOM, rt2 = t3.SANITIZE_NAMED_PROPS || false, ot2 = false !== t3.KEEP_CONTENT, st2 = t3.IN_PLACE || false, B2 = t3.ALLOWED_URI_REGEXP || Ke, bt2 = t3.NAMESPACE || ft2, xt2 = t3.MATHML_TEXT_INTEGRATION_POINTS || xt2, Ct2 = t3.HTML_INTEGRATION_POINTS || Ct2, V2 = t3.CUSTOM_ELEMENT_HANDLING || {}, t3.CUSTOM_ELEMENT_HANDLING && Lt2(t3.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (V2.tagNameCheck = t3.CUSTOM_ELEMENT_HANDLING.tagNameCheck), t3.CUSTOM_ELEMENT_HANDLING && Lt2(t3.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (V2.attributeNameCheck = t3.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), t3.CUSTOM_ELEMENT_HANDLING && "boolean" == typeof t3.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (V2.allowCustomizedBuiltInElements = t3.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Y2 && (J2 = false), et2 && (tt2 = true), at2 && (_2 = Te({}, Be), W2 = [], true === at2.html && (Te(_2, Ne), Te(W2, _e)), true === at2.svg && (Te(_2, Ie), Te(W2, je), Te(W2, Ue)), true === at2.svgFilters && (Te(_2, Oe), Te(W2, je), Te(W2, Ue)), true === at2.mathMl && (Te(_2, Fe), Te(W2, We), Te(W2, Ue))), t3.ADD_TAGS && (_2 === j2 && (_2 = Le(_2)), Te(_2, t3.ADD_TAGS, kt2)), t3.ADD_ATTR && (W2 === U2 && (W2 = Le(W2)), Te(W2, t3.ADD_ATTR, kt2)), t3.ADD_URI_SAFE_ATTR && Te(dt2, t3.ADD_URI_SAFE_ATTR, kt2), t3.FORBID_CONTENTS && (lt2 === ct2 && (lt2 = Le(lt2)), Te(lt2, t3.FORBID_CONTENTS, kt2)), ot2 && (_2["#text"] = true), X2 && Te(_2, ["html", "head", "body"]), _2.table && (Te(_2, ["tbody"]), delete z2.tbody), t3.TRUSTED_TYPES_POLICY) {
+ if ("function" != typeof t3.TRUSTED_TYPES_POLICY.createHTML)
+ throw Se('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
+ if ("function" != typeof t3.TRUSTED_TYPES_POLICY.createScriptURL)
+ throw Se('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
+ x2 = t3.TRUSTED_TYPES_POLICY, C2 = x2.createHTML("");
+ } else
+ void 0 === x2 && (x2 = function(t4, e3) {
+ if ("object" != typeof t4 || "function" != typeof t4.createPolicy)
+ return null;
+ let i3 = null;
+ const n3 = "data-tt-policy-suffix";
+ e3 && e3.hasAttribute(n3) && (i3 = e3.getAttribute(n3));
+ const r3 = "dompurify" + (i3 ? "#" + i3 : "");
+ try {
+ return t4.createPolicy(r3, { createHTML: (t5) => t5, createScriptURL: (t5) => t5 });
+ } catch (t5) {
+ return console.warn("TrustedTypes policy " + r3 + " could not be created."), null;
+ }
+ }(m2, o2)), null !== x2 && "string" == typeof C2 && (C2 = x2.createHTML(""));
+ le && le(t3), Tt2 = t3;
+ }
+ }, Nt2 = Te({}, [...Ie, ...Oe, ...Pe]), It2 = Te({}, [...Fe, ...Me]), Ot2 = function(t3) {
+ pe(i2.removed, { element: t3 });
+ try {
+ y2(t3).removeChild(t3);
+ } catch (e3) {
+ b2(t3);
+ }
+ }, Pt2 = function(t3, e3) {
+ try {
+ pe(i2.removed, { attribute: e3.getAttributeNode(t3), from: e3 });
+ } catch (t4) {
+ pe(i2.removed, { attribute: null, from: e3 });
+ }
+ if (e3.removeAttribute(t3), "is" === t3)
+ if (tt2 || et2)
+ try {
+ Ot2(e3);
+ } catch (t4) {
+ }
+ else
+ try {
+ e3.setAttribute(t3, "");
+ } catch (t4) {
+ }
+ }, Ft2 = function(t3) {
+ let e3 = null, i3 = null;
+ if (Q2)
+ t3 = "
" + t3;
+ else {
+ const e4 = ve(t3, /^[\r\n\t ]+/);
+ i3 = e4 && e4[0];
+ }
+ "application/xhtml+xml" === St2 && bt2 === ft2 && (t3 = '' + t3 + "");
+ const r3 = x2 ? x2.createHTML(t3) : t3;
+ if (bt2 === ft2)
+ try {
+ e3 = new g2().parseFromString(r3, St2);
+ } catch (t4) {
+ }
+ if (!e3 || !e3.documentElement) {
+ e3 = E2.createDocument(bt2, "template", null);
+ try {
+ e3.documentElement.innerHTML = vt2 ? C2 : r3;
+ } catch (t4) {
+ }
+ }
+ const o3 = e3.body || e3.documentElement;
+ return t3 && i3 && o3.insertBefore(n2.createTextNode(i3), o3.childNodes[0] || null), bt2 === ft2 ? k2.call(e3, X2 ? "html" : "body")[0] : X2 ? e3.documentElement : o3;
+ }, Mt2 = function(t3) {
+ return S2.call(t3.ownerDocument || t3, t3, u2.SHOW_ELEMENT | u2.SHOW_COMMENT | u2.SHOW_TEXT | u2.SHOW_PROCESSING_INSTRUCTION | u2.SHOW_CDATA_SECTION, null);
+ }, Bt2 = function(t3) {
+ return t3 instanceof d2 && ("string" != typeof t3.nodeName || "string" != typeof t3.textContent || "function" != typeof t3.removeChild || !(t3.attributes instanceof h2) || "function" != typeof t3.removeAttribute || "function" != typeof t3.setAttribute || "string" != typeof t3.namespaceURI || "function" != typeof t3.insertBefore || "function" != typeof t3.hasChildNodes);
+ }, _t2 = function(t3) {
+ return "function" == typeof l2 && t3 instanceof l2;
+ };
+ function jt2(t3, e3, n3) {
+ ge(t3, (t4) => {
+ t4.call(i2, e3, n3, Tt2);
+ });
+ }
+ const Wt2 = function(t3) {
+ let e3 = null;
+ if (jt2(w2.beforeSanitizeElements, t3, null), Bt2(t3))
+ return Ot2(t3), true;
+ const n3 = kt2(t3.nodeName);
+ if (jt2(w2.uponSanitizeElement, t3, { tagName: n3, allowedTags: _2 }), t3.hasChildNodes() && !_t2(t3.firstElementChild) && Ee(/<[/\w]/g, t3.innerHTML) && Ee(/<[/\w]/g, t3.textContent))
+ return Ot2(t3), true;
+ if (t3.nodeType === ei)
+ return Ot2(t3), true;
+ if ($5 && t3.nodeType === ii && Ee(/<[/\w]/g, t3.data))
+ return Ot2(t3), true;
+ if (!_2[n3] || z2[n3]) {
+ if (!z2[n3] && Vt2(n3)) {
+ if (V2.tagNameCheck instanceof RegExp && Ee(V2.tagNameCheck, n3))
+ return false;
+ if (V2.tagNameCheck instanceof Function && V2.tagNameCheck(n3))
+ return false;
+ }
+ if (ot2 && !lt2[n3]) {
+ const e4 = y2(t3) || t3.parentNode, i3 = A2(t3) || t3.childNodes;
+ if (i3 && e4) {
+ for (let n4 = i3.length - 1; n4 >= 0; --n4) {
+ const r3 = f2(i3[n4], true);
+ r3.__removalCount = (t3.__removalCount || 0) + 1, e4.insertBefore(r3, v2(t3));
+ }
+ }
+ }
+ return Ot2(t3), true;
+ }
+ return t3 instanceof c2 && !function(t4) {
+ let e4 = y2(t4);
+ e4 && e4.tagName || (e4 = { namespaceURI: bt2, tagName: "template" });
+ const i3 = fe(t4.tagName), n4 = fe(e4.tagName);
+ return !!At2[t4.namespaceURI] && (t4.namespaceURI === pt2 ? e4.namespaceURI === ft2 ? "svg" === i3 : e4.namespaceURI === mt2 ? "svg" === i3 && ("annotation-xml" === n4 || xt2[n4]) : Boolean(Nt2[i3]) : t4.namespaceURI === mt2 ? e4.namespaceURI === ft2 ? "math" === i3 : e4.namespaceURI === pt2 ? "math" === i3 && Ct2[n4] : Boolean(It2[i3]) : t4.namespaceURI === ft2 ? !(e4.namespaceURI === pt2 && !Ct2[n4]) && !(e4.namespaceURI === mt2 && !xt2[n4]) && !It2[i3] && (Et2[i3] || !Nt2[i3]) : !("application/xhtml+xml" !== St2 || !At2[t4.namespaceURI]));
+ }(t3) ? (Ot2(t3), true) : "noscript" !== n3 && "noembed" !== n3 && "noframes" !== n3 || !Ee(/<\/no(script|embed|frames)/i, t3.innerHTML) ? (Y2 && t3.nodeType === ti && (e3 = t3.textContent, ge([L2, D2, N2], (t4) => {
+ e3 = Ae(e3, t4, " ");
+ }), t3.textContent !== e3 && (pe(i2.removed, { element: t3.cloneNode() }), t3.textContent = e3)), jt2(w2.afterSanitizeElements, t3, null), false) : (Ot2(t3), true);
+ }, Ut2 = function(t3, e3, i3) {
+ if (nt2 && ("id" === e3 || "name" === e3) && (i3 in n2 || i3 in wt2))
+ return false;
+ if (J2 && !q2[e3] && Ee(I2, e3))
+ ;
+ else if (H2 && Ee(O2, e3))
+ ;
+ else if (!W2[e3] || q2[e3]) {
+ if (!(Vt2(t3) && (V2.tagNameCheck instanceof RegExp && Ee(V2.tagNameCheck, t3) || V2.tagNameCheck instanceof Function && V2.tagNameCheck(t3)) && (V2.attributeNameCheck instanceof RegExp && Ee(V2.attributeNameCheck, e3) || V2.attributeNameCheck instanceof Function && V2.attributeNameCheck(e3)) || "is" === e3 && V2.allowCustomizedBuiltInElements && (V2.tagNameCheck instanceof RegExp && Ee(V2.tagNameCheck, i3) || V2.tagNameCheck instanceof Function && V2.tagNameCheck(i3))))
+ return false;
+ } else if (dt2[e3])
+ ;
+ else if (Ee(B2, Ae(i3, F2, "")))
+ ;
+ else if ("src" !== e3 && "xlink:href" !== e3 && "href" !== e3 || "script" === t3 || 0 !== ye(i3, "data:") || !ut2[t3]) {
+ if (K2 && !Ee(P2, Ae(i3, F2, "")))
+ ;
+ else if (i3)
+ return false;
+ } else
+ ;
+ return true;
+ }, Vt2 = function(t3) {
+ return "annotation-xml" !== t3 && ve(t3, M2);
+ }, zt2 = function(t3) {
+ jt2(w2.beforeSanitizeAttributes, t3, null);
+ const { attributes: e3 } = t3;
+ if (!e3 || Bt2(t3))
+ return;
+ const n3 = { attrName: "", attrValue: "", keepAttr: true, allowedAttributes: W2, forceKeepAttr: void 0 };
+ let r3 = e3.length;
+ for (; r3--; ) {
+ const o3 = e3[r3], { name: s3, namespaceURI: a3, value: l3 } = o3, c3 = kt2(s3);
+ let u3 = "value" === s3 ? l3 : xe(l3);
+ if (n3.attrName = c3, n3.attrValue = u3, n3.keepAttr = true, n3.forceKeepAttr = void 0, jt2(w2.uponSanitizeAttribute, t3, n3), u3 = n3.attrValue, !rt2 || "id" !== c3 && "name" !== c3 || (Pt2(s3, t3), u3 = "user-content-" + u3), $5 && Ee(/((--!?|])>)|<\/(style|title)/i, u3)) {
+ Pt2(s3, t3);
+ continue;
+ }
+ if (n3.forceKeepAttr)
+ continue;
+ if (Pt2(s3, t3), !n3.keepAttr)
+ continue;
+ if (!G2 && Ee(/\/>/i, u3)) {
+ Pt2(s3, t3);
+ continue;
+ }
+ Y2 && ge([L2, D2, N2], (t4) => {
+ u3 = Ae(u3, t4, " ");
+ });
+ const h3 = kt2(t3.nodeName);
+ if (Ut2(h3, c3, u3)) {
+ if (x2 && "object" == typeof m2 && "function" == typeof m2.getAttributeType)
+ if (a3)
+ ;
+ else
+ switch (m2.getAttributeType(h3, c3)) {
+ case "TrustedHTML":
+ u3 = x2.createHTML(u3);
+ break;
+ case "TrustedScriptURL":
+ u3 = x2.createScriptURL(u3);
+ }
+ try {
+ a3 ? t3.setAttributeNS(a3, s3, u3) : t3.setAttribute(s3, u3), Bt2(t3) ? Ot2(t3) : me(i2.removed);
+ } catch (t4) {
+ }
+ }
+ }
+ jt2(w2.afterSanitizeAttributes, t3, null);
+ }, qt2 = function t3(e3) {
+ let i3 = null;
+ const n3 = Mt2(e3);
+ for (jt2(w2.beforeSanitizeShadowDOM, e3, null); i3 = n3.nextNode(); )
+ jt2(w2.uponSanitizeShadowNode, i3, null), Wt2(i3), zt2(i3), i3.content instanceof s2 && t3(i3.content);
+ jt2(w2.afterSanitizeShadowDOM, e3, null);
+ };
+ return i2.sanitize = function(t3) {
+ let e3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n3 = null, o3 = null, a3 = null, c3 = null;
+ if (vt2 = !t3, vt2 && (t3 = ""), "string" != typeof t3 && !_t2(t3)) {
+ if ("function" != typeof t3.toString)
+ throw Se("toString is not a function");
+ if ("string" != typeof (t3 = t3.toString()))
+ throw Se("dirty is not a string, aborting");
+ }
+ if (!i2.isSupported)
+ return t3;
+ if (Z2 || Dt2(e3), i2.removed = [], "string" == typeof t3 && (st2 = false), st2) {
+ if (t3.nodeName) {
+ const e4 = kt2(t3.nodeName);
+ if (!_2[e4] || z2[e4])
+ throw Se("root node is forbidden and cannot be sanitized in-place");
+ }
+ } else if (t3 instanceof l2)
+ n3 = Ft2(""), o3 = n3.ownerDocument.importNode(t3, true), o3.nodeType === Qe && "BODY" === o3.nodeName || "HTML" === o3.nodeName ? n3 = o3 : n3.appendChild(o3);
+ else {
+ if (!tt2 && !Y2 && !X2 && -1 === t3.indexOf("<"))
+ return x2 && it2 ? x2.createHTML(t3) : t3;
+ if (n3 = Ft2(t3), !n3)
+ return tt2 ? null : it2 ? C2 : "";
+ }
+ n3 && Q2 && Ot2(n3.firstChild);
+ const u3 = Mt2(st2 ? t3 : n3);
+ for (; a3 = u3.nextNode(); )
+ Wt2(a3), zt2(a3), a3.content instanceof s2 && qt2(a3.content);
+ if (st2)
+ return t3;
+ if (tt2) {
+ if (et2)
+ for (c3 = R2.call(n3.ownerDocument); n3.firstChild; )
+ c3.appendChild(n3.firstChild);
+ else
+ c3 = n3;
+ return (W2.shadowroot || W2.shadowrootmode) && (c3 = T2.call(r2, c3, true)), c3;
+ }
+ let h3 = X2 ? n3.outerHTML : n3.innerHTML;
+ return X2 && _2["!doctype"] && n3.ownerDocument && n3.ownerDocument.doctype && n3.ownerDocument.doctype.name && Ee($e, n3.ownerDocument.doctype.name) && (h3 = "\n" + h3), Y2 && ge([L2, D2, N2], (t4) => {
+ h3 = Ae(h3, t4, " ");
+ }), x2 && it2 ? x2.createHTML(h3) : h3;
+ }, i2.setConfig = function() {
+ Dt2(arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}), Z2 = true;
+ }, i2.clearConfig = function() {
+ Tt2 = null, Z2 = false;
+ }, i2.isValidAttribute = function(t3, e3, i3) {
+ Tt2 || Dt2({});
+ const n3 = kt2(t3), r3 = kt2(e3);
+ return Ut2(n3, r3, i3);
+ }, i2.addHook = function(t3, e3) {
+ "function" == typeof e3 && pe(w2[t3], e3);
+ }, i2.removeHook = function(t3) {
+ return me(w2[t3]);
+ }, i2.removeHooks = function(t3) {
+ w2[t3] = [];
+ }, i2.removeAllHooks = function() {
+ w2 = { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] };
+ }, i2;
+ }();
+ var si = "style href src width height language class".split(" ");
+ var ai = "javascript:".split(" ");
+ var li = "script iframe form noscript".split(" ");
+ var ci = class extends z {
+ static setHTML(t3, e2) {
const i2 = new this(e2).sanitize(), n2 = i2.getHTML ? i2.getHTML() : i2.outerHTML;
- t2.innerHTML = n2;
+ t3.innerHTML = n2;
}
- static sanitize(t2, e2) {
- const i2 = new this(t2, e2);
+ static sanitize(t3, e2) {
+ const i2 = new this(t3, e2);
return i2.sanitize(), i2;
}
- constructor(t2) {
+ constructor(t3) {
let { allowedAttributes: e2, forbiddenProtocols: i2, forbiddenElements: n2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- super(...arguments), this.allowedAttributes = e2 || ne, this.forbiddenProtocols = i2 || re, this.forbiddenElements = n2 || oe, this.body = ae(t2);
+ super(...arguments), this.allowedAttributes = e2 || si, this.forbiddenProtocols = i2 || ai, this.forbiddenElements = n2 || li, this.body = ui(t3);
}
sanitize() {
- return this.sanitizeElements(), this.normalizeListElementNesting();
+ return this.sanitizeElements(), this.normalizeListElementNesting(), oi.sanitize(this.body, { ADD_ATTR: ["language"], RETURN_DOM: true });
}
getHTML() {
return this.body.innerHTML;
@@ -9016,9 +9419,9 @@
return this.body;
}
sanitizeElements() {
- const t2 = R(this.body), e2 = [];
- for (; t2.nextNode(); ) {
- const i2 = t2.currentNode;
+ const t3 = S(this.body), e2 = [];
+ for (; t3.nextNode(); ) {
+ const i2 = t3.currentNode;
switch (i2.nodeType) {
case Node.ELEMENT_NODE:
this.elementIsRemovable(i2) ? e2.push(i2) : this.sanitizeElement(i2);
@@ -9027,41 +9430,41 @@
e2.push(i2);
}
}
- return e2.forEach((t3) => k(t3)), this.body;
+ return e2.forEach((t4) => E(t4)), this.body;
}
- sanitizeElement(t2) {
- return t2.hasAttribute("href") && this.forbiddenProtocols.includes(t2.protocol) && t2.removeAttribute("href"), Array.from(t2.attributes).forEach((e2) => {
+ sanitizeElement(t3) {
+ return t3.hasAttribute("href") && this.forbiddenProtocols.includes(t3.protocol) && t3.removeAttribute("href"), Array.from(t3.attributes).forEach((e2) => {
let { name: i2 } = e2;
- this.allowedAttributes.includes(i2) || 0 === i2.indexOf("data-trix") || t2.removeAttribute(i2);
- }), t2;
+ this.allowedAttributes.includes(i2) || 0 === i2.indexOf("data-trix") || t3.removeAttribute(i2);
+ }), t3;
}
normalizeListElementNesting() {
- return Array.from(this.body.querySelectorAll("ul,ol")).forEach((t2) => {
- const e2 = t2.previousElementSibling;
- e2 && "li" === E(e2) && e2.appendChild(t2);
+ return Array.from(this.body.querySelectorAll("ul,ol")).forEach((t3) => {
+ const e2 = t3.previousElementSibling;
+ e2 && "li" === R(e2) && e2.appendChild(t3);
}), this.body;
}
- elementIsRemovable(t2) {
- if ((null == t2 ? void 0 : t2.nodeType) === Node.ELEMENT_NODE)
- return this.elementIsForbidden(t2) || this.elementIsntSerializable(t2);
+ elementIsRemovable(t3) {
+ if ((null == t3 ? void 0 : t3.nodeType) === Node.ELEMENT_NODE)
+ return this.elementIsForbidden(t3) || this.elementIsntSerializable(t3);
}
- elementIsForbidden(t2) {
- return this.forbiddenElements.includes(E(t2));
+ elementIsForbidden(t3) {
+ return this.forbiddenElements.includes(R(t3));
}
- elementIsntSerializable(t2) {
- return "false" === t2.getAttribute("data-trix-serialize") && !I(t2);
+ elementIsntSerializable(t3) {
+ return "false" === t3.getAttribute("data-trix-serialize") && !P(t3);
}
};
- var ae = function() {
- let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
- t2 = t2.replace(/<\/html[^>]*>[^]*$/i, "