diff --git a/app/assets/builds/administrate/application.js b/app/assets/builds/administrate/application.js index f9c70ad9f..9fb9bf134 100644 --- a/app/assets/builds/administrate/application.js +++ b/app/assets/builds/administrate/application.js @@ -15,13 +15,13 @@ for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; - var __copyProps = (to, from, except, desc) => { + var __copyProps = (to2, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + if (!__hasOwnProp.call(to2, key) && key !== except) + __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - return to; + return to2; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM @@ -2844,7 +2844,7 @@ jQuery.event = { global: {}, add: function(elem, types, handler, data, selector) { - var handleObjIn, eventHandle, tmp, events, t2, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem); + var handleObjIn, eventHandle, tmp, events, t3, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem); if (!acceptData(elem)) { return; } @@ -2868,9 +2868,9 @@ }; } types = (types || "").match(rnothtmlwhite) || [""]; - t2 = types.length; - while (t2--) { - tmp = rtypenamespace.exec(types[t2]) || []; + t3 = types.length; + while (t3--) { + tmp = rtypenamespace.exec(types[t3]) || []; type = origType = tmp[1]; namespaces = (tmp[2] || "").split(".").sort(); if (!type) { @@ -2914,19 +2914,19 @@ }, // Detach an event or set of events from an element remove: function(elem, types, handler, selector, mappedTypes) { - var j2, origCount, tmp, events, t2, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem); + var j2, origCount, tmp, events, t3, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem); if (!elemData || !(events = elemData.events)) { return; } types = (types || "").match(rnothtmlwhite) || [""]; - t2 = types.length; - while (t2--) { - tmp = rtypenamespace.exec(types[t2]) || []; + t3 = types.length; + while (t3--) { + tmp = rtypenamespace.exec(types[t3]) || []; type = origType = tmp[1]; namespaces = (tmp[2] || "").split(".").sort(); if (!type) { for (type in events) { - jQuery.event.remove(elem, type + types[t2], handler, selector, true); + jQuery.event.remove(elem, type + types[t3], handler, selector, true); } continue; } @@ -3730,19 +3730,19 @@ // Only Firefox includes border widths // in computed dimensions. (gh-4529) reliableTrDimensions: function() { - var table, tr, trChild, trStyle; + var table, tr2, trChild, trStyle; if (reliableTrDimensionsVal == null) { table = document2.createElement("table"); - tr = document2.createElement("tr"); + tr2 = document2.createElement("tr"); trChild = document2.createElement("div"); table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; - tr.style.cssText = "border:1px solid"; - tr.style.height = "1px"; + tr2.style.cssText = "border:1px solid"; + tr2.style.height = "1px"; trChild.style.height = "9px"; trChild.style.display = "block"; - documentElement.appendChild(table).appendChild(tr).appendChild(trChild); - trStyle = window2.getComputedStyle(tr); - reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight; + documentElement.appendChild(table).appendChild(tr2).appendChild(trChild); + trStyle = window2.getComputedStyle(tr2); + reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr2.offsetHeight; documentElement.removeChild(table); } return reliableTrDimensionsVal; @@ -4492,8 +4492,8 @@ return opt; }; jQuery.fn.extend({ - fadeTo: function(speed, to, easing, callback) { - return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback); + fadeTo: function(speed, to2, easing, callback) { + return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to2 }, speed, easing, callback); }, animate: function(prop, speed, easing, callback) { var empty = jQuery.isEmptyObject(prop), optall = jQuery.speed(speed, easing, callback), doAnimation = function() { @@ -7504,12 +7504,12 @@ else f3 = a3.css(); b3.css(f3); - }, t2 = function(b3, c3) { + }, t3 = function(b3, c3) { return b3 ? (w2.$testInput || (w2.$testInput = a2("").css({ position: "absolute", top: -99999, left: -99999, width: "auto", padding: 0, whiteSpace: "pre" }).appendTo("body")), w2.$testInput.text(b3), s2(c3, w2.$testInput, ["letterSpacing", "fontSize", "fontFamily", "fontWeight", "textTransform"]), w2.$testInput.width()) : 0; }, u2 = function(a3) { var b3 = null, c3 = function(c4, d3) { var e3, f3, g3, h3, i3, j3, k3, l3; - c4 = c4 || window.event || {}, d3 = d3 || {}, c4.metaKey || c4.altKey || (d3.force || false !== a3.data("grow")) && (e3 = a3.val(), c4.type && "keydown" === c4.type.toLowerCase() && (f3 = c4.keyCode, g3 = f3 >= 48 && f3 <= 57 || f3 >= 65 && f3 <= 90 || f3 >= 96 && f3 <= 111 || f3 >= 186 && f3 <= 222 || 32 === f3, 46 === f3 || 8 === f3 ? (l3 = r2(a3[0]), l3.length ? e3 = e3.substring(0, l3.start) + e3.substring(l3.start + l3.length) : 8 === f3 && l3.start ? e3 = e3.substring(0, l3.start - 1) + e3.substring(l3.start + 1) : 46 === f3 && void 0 !== l3.start && (e3 = e3.substring(0, l3.start) + e3.substring(l3.start + 1))) : g3 && (j3 = c4.shiftKey, k3 = String.fromCharCode(c4.keyCode), k3 = j3 ? k3.toUpperCase() : k3.toLowerCase(), e3 += k3)), h3 = a3.attr("placeholder"), !e3 && h3 && (e3 = h3), (i3 = t2(e3, a3) + 4) !== b3 && (b3 = i3, a3.width(i3), a3.triggerHandler("resize"))); + c4 = c4 || window.event || {}, d3 = d3 || {}, c4.metaKey || c4.altKey || (d3.force || false !== a3.data("grow")) && (e3 = a3.val(), c4.type && "keydown" === c4.type.toLowerCase() && (f3 = c4.keyCode, g3 = f3 >= 48 && f3 <= 57 || f3 >= 65 && f3 <= 90 || f3 >= 96 && f3 <= 111 || f3 >= 186 && f3 <= 222 || 32 === f3, 46 === f3 || 8 === f3 ? (l3 = r2(a3[0]), l3.length ? e3 = e3.substring(0, l3.start) + e3.substring(l3.start + l3.length) : 8 === f3 && l3.start ? e3 = e3.substring(0, l3.start - 1) + e3.substring(l3.start + 1) : 46 === f3 && void 0 !== l3.start && (e3 = e3.substring(0, l3.start) + e3.substring(l3.start + 1))) : g3 && (j3 = c4.shiftKey, k3 = String.fromCharCode(c4.keyCode), k3 = j3 ? k3.toUpperCase() : k3.toLowerCase(), e3 += k3)), h3 = a3.attr("placeholder"), !e3 && h3 && (e3 = h3), (i3 = t3(e3, a3) + 4) !== b3 && (b3 = i3, a3.width(i3), a3.triggerHandler("resize"))); }; a3.on("keydown keyup update blur", c3), c3(); }, v2 = function(a3) { @@ -7535,7 +7535,7 @@ b3 || (b3 = {}); console.error("Selectize: " + a3), b3.explanation && (console.group && console.group(), console.error(b3.explanation), console.group && console.groupEnd()); }("Dependency MicroPlugin is missing", { explanation: 'Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.' }), a2.extend(w2.prototype, { setup: function() { - var b3, c3, d3, e3, j3, k3, l3, m3, n3, o3, p3 = this, r3 = p3.settings, s3 = p3.eventNS, t3 = a2(window), v3 = a2(document), w3 = p3.$input; + var b3, c3, d3, e3, j3, k3, l3, m3, n3, o3, p3 = this, r3 = p3.settings, s3 = p3.eventNS, t4 = a2(window), v3 = a2(document), w3 = p3.$input; if (l3 = p3.settings.mode, m3 = w3.attr("class") || "", b3 = a2("
").addClass(r3.wrapperClass).addClass(m3).addClass(l3), c3 = a2("
").addClass(r3.inputClass).addClass("items").appendTo(b3), d3 = a2('').appendTo(c3).attr("tabindex", w3.is(":disabled") ? "-1" : p3.tabIndex), k3 = a2(r3.dropdownParent || b3), e3 = a2("
").addClass(r3.dropdownClass).addClass(l3).hide().appendTo(k3), j3 = a2("
").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
\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
\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, ""); + var ui = function() { + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; + t3 = t3.replace(/<\/html[^>]*>[^]*$/i, ""); const e2 = document.implementation.createHTMLDocument(""); - return e2.documentElement.innerHTML = t2, Array.from(e2.head.querySelectorAll("style")).forEach((t3) => { - e2.body.appendChild(t3); + return e2.documentElement.innerHTML = t3, Array.from(e2.head.querySelectorAll("style")).forEach((t4) => { + e2.body.appendChild(t4); }), e2.body; }; - var { css: le } = V; - var ce = class extends ee { + var { css: hi } = V; + var di = class extends ee { constructor() { super(...arguments), this.attachment = this.object, this.attachment.uploadProgressDelegate = this, this.attachmentPiece = this.options.piece; } @@ -9069,143 +9472,143 @@ return []; } createNodes() { - let t2; - const e2 = t2 = S({ tagName: "figure", className: this.getClassName(), data: this.getData(), editable: false }), i2 = this.getHref(); - return i2 && (t2 = S({ tagName: "a", editable: false, attributes: { href: i2, tabindex: -1 } }), e2.appendChild(t2)), this.attachment.hasContent() ? se.setHTML(t2, this.attachment.getContent()) : this.createContentNodes().forEach((e3) => { - t2.appendChild(e3); - }), t2.appendChild(this.createCaptionElement()), this.attachment.isPending() && (this.progressElement = S({ tagName: "progress", attributes: { class: le.attachmentProgress, value: this.attachment.getUploadProgress(), max: 100 }, data: { trixMutable: true, trixStoreKey: ["progressElement", this.attachment.id].join("/") } }), e2.appendChild(this.progressElement)), [ue("left"), e2, ue("right")]; + let t3; + const e2 = t3 = k({ tagName: "figure", className: this.getClassName(), data: this.getData(), editable: false }), i2 = this.getHref(); + return i2 && (t3 = k({ tagName: "a", editable: false, attributes: { href: i2, tabindex: -1 } }), e2.appendChild(t3)), this.attachment.hasContent() ? ci.setHTML(t3, this.attachment.getContent()) : this.createContentNodes().forEach((e3) => { + t3.appendChild(e3); + }), t3.appendChild(this.createCaptionElement()), this.attachment.isPending() && (this.progressElement = k({ tagName: "progress", attributes: { class: hi.attachmentProgress, value: this.attachment.getUploadProgress(), max: 100 }, data: { trixMutable: true, trixStoreKey: ["progressElement", this.attachment.id].join("/") } }), e2.appendChild(this.progressElement)), [gi("left"), e2, gi("right")]; } createCaptionElement() { - const t2 = S({ tagName: "figcaption", className: le.attachmentCaption }), e2 = this.attachmentPiece.getCaption(); + const t3 = k({ tagName: "figcaption", className: hi.attachmentCaption }), e2 = this.attachmentPiece.getCaption(); if (e2) - t2.classList.add("".concat(le.attachmentCaption, "--edited")), t2.textContent = e2; + t3.classList.add("".concat(hi.attachmentCaption, "--edited")), t3.textContent = e2; else { let e3, i2; const n2 = this.getCaptionConfig(); if (n2.name && (e3 = this.attachment.getFilename()), n2.size && (i2 = this.attachment.getFormattedFilesize()), e3) { - const i3 = S({ tagName: "span", className: le.attachmentName, textContent: e3 }); - t2.appendChild(i3); + const i3 = k({ tagName: "span", className: hi.attachmentName, textContent: e3 }); + t3.appendChild(i3); } if (i2) { - e3 && t2.appendChild(document.createTextNode(" ")); - const n3 = S({ tagName: "span", className: le.attachmentSize, textContent: i2 }); - t2.appendChild(n3); + e3 && t3.appendChild(document.createTextNode(" ")); + const n3 = k({ tagName: "span", className: hi.attachmentSize, textContent: i2 }); + t3.appendChild(n3); } } - return t2; + return t3; } getClassName() { - const t2 = [le.attachment, "".concat(le.attachment, "--").concat(this.attachment.getType())], e2 = this.attachment.getExtension(); - return e2 && t2.push("".concat(le.attachment, "--").concat(e2)), t2.join(" "); + const t3 = [hi.attachment, "".concat(hi.attachment, "--").concat(this.attachment.getType())], e2 = this.attachment.getExtension(); + return e2 && t3.push("".concat(hi.attachment, "--").concat(e2)), t3.join(" "); } getData() { - const t2 = { trixAttachment: JSON.stringify(this.attachment), trixContentType: this.attachment.getContentType(), trixId: this.attachment.id }, { attributes: e2 } = this.attachmentPiece; - return e2.isEmpty() || (t2.trixAttributes = JSON.stringify(e2)), this.attachment.isPending() && (t2.trixSerialize = false), t2; + const t3 = { trixAttachment: JSON.stringify(this.attachment), trixContentType: this.attachment.getContentType(), trixId: this.attachment.id }, { attributes: e2 } = this.attachmentPiece; + return e2.isEmpty() || (t3.trixAttributes = JSON.stringify(e2)), this.attachment.isPending() && (t3.trixSerialize = false), t3; } getHref() { - if (!he(this.attachment.getContent(), "a")) + if (!mi(this.attachment.getContent(), "a")) return this.attachment.getHref(); } getCaptionConfig() { - var t2; - const e2 = this.attachment.getType(), n2 = Et(null === (t2 = i[e2]) || void 0 === t2 ? void 0 : t2.caption); + var t3; + const e2 = this.attachment.getType(), n2 = Rt(null === (t3 = i[e2]) || void 0 === t3 ? void 0 : t3.caption); return "file" === e2 && (n2.name = true), n2; } findProgressElement() { - var t2; - return null === (t2 = this.findElement()) || void 0 === t2 ? void 0 : t2.querySelector("progress"); + var t3; + return null === (t3 = this.findElement()) || void 0 === t3 ? void 0 : t3.querySelector("progress"); } attachmentDidChangeUploadProgress() { - const t2 = this.attachment.getUploadProgress(), e2 = this.findProgressElement(); - e2 && (e2.value = t2); + const t3 = this.attachment.getUploadProgress(), e2 = this.findProgressElement(); + e2 && (e2.value = t3); } }; - var ue = (t2) => S({ tagName: "span", textContent: h, data: { trixCursorTarget: t2, trixSerialize: false } }); - var he = function(t2, e2) { - const i2 = S("div"); - return se.setHTML(i2, t2 || ""), i2.querySelector(e2); + var gi = (t3) => k({ tagName: "span", textContent: h, data: { trixCursorTarget: t3, trixSerialize: false } }); + var mi = function(t3, e2) { + const i2 = k("div"); + return ci.setHTML(i2, t3 || ""), i2.querySelector(e2); }; - var de = class extends ce { + var pi = class extends di { constructor() { super(...arguments), this.attachment.previewDelegate = this; } createContentNodes() { - return this.image = S({ tagName: "img", attributes: { src: "" }, data: { trixMutable: true } }), this.refresh(this.image), [this.image]; + return this.image = k({ tagName: "img", attributes: { src: "" }, data: { trixMutable: true } }), this.refresh(this.image), [this.image]; } createCaptionElement() { - const t2 = super.createCaptionElement(...arguments); - return t2.textContent || t2.setAttribute("data-trix-placeholder", l.captionPlaceholder), t2; + const t3 = super.createCaptionElement(...arguments); + return t3.textContent || t3.setAttribute("data-trix-placeholder", l.captionPlaceholder), t3; } - refresh(t2) { + refresh(t3) { var e2; - t2 || (t2 = null === (e2 = this.findElement()) || void 0 === e2 ? void 0 : e2.querySelector("img")); - if (t2) - return this.updateAttributesForImage(t2); + t3 || (t3 = null === (e2 = this.findElement()) || void 0 === e2 ? void 0 : e2.querySelector("img")); + if (t3) + return this.updateAttributesForImage(t3); } - updateAttributesForImage(t2) { + updateAttributesForImage(t3) { const e2 = this.attachment.getURL(), i2 = this.attachment.getPreviewURL(); - if (t2.src = i2 || e2, i2 === e2) - t2.removeAttribute("data-trix-serialized-attributes"); + if (t3.src = i2 || e2, i2 === e2) + t3.removeAttribute("data-trix-serialized-attributes"); else { const i3 = JSON.stringify({ src: e2 }); - t2.setAttribute("data-trix-serialized-attributes", i3); + t3.setAttribute("data-trix-serialized-attributes", i3); } const n2 = this.attachment.getWidth(), r2 = this.attachment.getHeight(); - null != n2 && (t2.width = n2), null != r2 && (t2.height = r2); - const o2 = ["imageElement", this.attachment.id, t2.src, t2.width, t2.height].join("/"); - t2.dataset.trixStoreKey = o2; + null != n2 && (t3.width = n2), null != r2 && (t3.height = r2); + const o2 = ["imageElement", this.attachment.id, t3.src, t3.width, t3.height].join("/"); + t3.dataset.trixStoreKey = o2; } attachmentDidChangeAttributes() { return this.refresh(this.image), this.refresh(); } }; - var ge = class extends ee { + var fi = class extends ee { constructor() { super(...arguments), this.piece = this.object, this.attributes = this.piece.getAttributes(), this.textConfig = this.options.textConfig, this.context = this.options.context, this.piece.attachment ? this.attachment = this.piece.attachment : this.string = this.piece.toString(); } createNodes() { - let t2 = this.attachment ? this.createAttachmentNodes() : this.createStringNodes(); + let t3 = this.attachment ? this.createAttachmentNodes() : this.createStringNodes(); const e2 = this.createElement(); if (e2) { - const i2 = function(t3) { - for (; null !== (e3 = t3) && void 0 !== e3 && e3.firstElementChild; ) { + const i2 = function(t4) { + for (; null !== (e3 = t4) && void 0 !== e3 && e3.firstElementChild; ) { var e3; - t3 = t3.firstElementChild; + t4 = t4.firstElementChild; } - return t3; + return t4; }(e2); - Array.from(t2).forEach((t3) => { - i2.appendChild(t3); - }), t2 = [e2]; + Array.from(t3).forEach((t4) => { + i2.appendChild(t4); + }), t3 = [e2]; } - return t2; + return t3; } createAttachmentNodes() { - const t2 = this.attachment.isPreviewable() ? de : ce; - return this.createChildView(t2, this.piece.attachment, { piece: this.piece }).getNodes(); + const t3 = this.attachment.isPreviewable() ? pi : di; + return this.createChildView(t3, this.piece.attachment, { piece: this.piece }).getNodes(); } createStringNodes() { - var t2; - if (null !== (t2 = this.textConfig) && void 0 !== t2 && t2.plaintext) + var t3; + if (null !== (t3 = this.textConfig) && void 0 !== t3 && t3.plaintext) return [document.createTextNode(this.string)]; { - const t3 = [], e2 = this.string.split("\n"); + const t4 = [], e2 = this.string.split("\n"); for (let i2 = 0; i2 < e2.length; i2++) { const n2 = e2[i2]; if (i2 > 0) { - const e3 = S("br"); - t3.push(e3); + const e3 = k("br"); + t4.push(e3); } if (n2.length) { const e3 = document.createTextNode(this.preserveSpaces(n2)); - t3.push(e3); + t4.push(e3); } } - return t3; + return t4; } } createElement() { - let t2, e2, i2; + let t3, e2, i2; const n2 = {}; for (e2 in this.attributes) { i2 = this.attributes[e2]; @@ -9213,8 +9616,8 @@ if (o2) { if (o2.tagName) { var r2; - const e3 = S(o2.tagName); - r2 ? (r2.appendChild(e3), r2 = e3) : t2 = r2 = e3; + const e3 = k(o2.tagName); + r2 ? (r2.appendChild(e3), r2 = e3) : t3 = r2 = e3; } if (o2.styleProperty && (n2[o2.styleProperty] = i2), o2.style) for (e2 in o2.style) @@ -9222,151 +9625,151 @@ } } if (Object.keys(n2).length) - for (e2 in t2 || (t2 = S("span")), n2) - i2 = n2[e2], t2.style[e2] = i2; - return t2; + for (e2 in t3 || (t3 = k("span")), n2) + i2 = n2[e2], t3.style[e2] = i2; + return t3; } createContainerElement() { - for (const t2 in this.attributes) { - const e2 = this.attributes[t2], i2 = pt(t2); + for (const t3 in this.attributes) { + const e2 = this.attributes[t3], i2 = pt(t3); if (i2 && i2.groupTagName) { const n2 = {}; - return n2[t2] = e2, S(i2.groupTagName, n2); + return n2[t3] = e2, k(i2.groupTagName, n2); } } } - preserveSpaces(t2) { - return this.context.isLast && (t2 = t2.replace(/\ $/, d)), t2 = t2.replace(/(\S)\ {3}(\S)/g, "$1 ".concat(d, " $2")).replace(/\ {2}/g, "".concat(d, " ")).replace(/\ {2}/g, " ".concat(d)), (this.context.isFirst || this.context.followsWhitespace) && (t2 = t2.replace(/^\ /, d)), t2; + preserveSpaces(t3) { + return this.context.isLast && (t3 = t3.replace(/\ $/, d)), t3 = t3.replace(/(\S)\ {3}(\S)/g, "$1 ".concat(d, " $2")).replace(/\ {2}/g, "".concat(d, " ")).replace(/\ {2}/g, " ".concat(d)), (this.context.isFirst || this.context.followsWhitespace) && (t3 = t3.replace(/^\ /, d)), t3; } }; - var me = class extends ee { + var bi = class extends ee { constructor() { super(...arguments), this.text = this.object, this.textConfig = this.options.textConfig; } createNodes() { - const t2 = [], e2 = Xt.groupObjects(this.getPieces()), i2 = e2.length - 1; + const t3 = [], e2 = $t.groupObjects(this.getPieces()), i2 = e2.length - 1; for (let r2 = 0; r2 < e2.length; r2++) { const o2 = e2[r2], s2 = {}; - 0 === r2 && (s2.isFirst = true), r2 === i2 && (s2.isLast = true), pe(n2) && (s2.followsWhitespace = true); - const a2 = this.findOrCreateCachedChildView(ge, o2, { textConfig: this.textConfig, context: s2 }); - t2.push(...Array.from(a2.getNodes() || [])); + 0 === r2 && (s2.isFirst = true), r2 === i2 && (s2.isLast = true), vi(n2) && (s2.followsWhitespace = true); + const a2 = this.findOrCreateCachedChildView(fi, o2, { textConfig: this.textConfig, context: s2 }); + t3.push(...Array.from(a2.getNodes() || [])); var n2 = o2; } - return t2; + return t3; } getPieces() { - return Array.from(this.text.getPieces()).filter((t2) => !t2.hasAttribute("blockBreak")); + return Array.from(this.text.getPieces()).filter((t3) => !t3.hasAttribute("blockBreak")); } }; - var pe = (t2) => /\s$/.test(null == t2 ? void 0 : t2.toString()); - var { css: fe } = V; - var be = class extends ee { + var vi = (t3) => /\s$/.test(null == t3 ? void 0 : t3.toString()); + var { css: Ai } = V; + var yi = class extends ee { constructor() { super(...arguments), this.block = this.object, this.attributes = this.block.getAttributes(); } createNodes() { - const t2 = [document.createComment("block")]; + const t3 = [document.createComment("block")]; if (this.block.isEmpty()) - t2.push(S("br")); + t3.push(k("br")); else { var e2; - const i2 = null === (e2 = gt(this.block.getLastAttribute())) || void 0 === e2 ? void 0 : e2.text, n2 = this.findOrCreateCachedChildView(me, this.block.text, { textConfig: i2 }); - t2.push(...Array.from(n2.getNodes() || [])), this.shouldAddExtraNewlineElement() && t2.push(S("br")); + const i2 = null === (e2 = gt(this.block.getLastAttribute())) || void 0 === e2 ? void 0 : e2.text, n2 = this.findOrCreateCachedChildView(bi, this.block.text, { textConfig: i2 }); + t3.push(...Array.from(n2.getNodes() || [])), this.shouldAddExtraNewlineElement() && t3.push(k("br")); } if (this.attributes.length) - return t2; + return t3; { let e3; const { tagName: i2 } = n.default; this.block.isRTL() && (e3 = { dir: "rtl" }); - const r2 = S({ tagName: i2, attributes: e3 }); - return t2.forEach((t3) => r2.appendChild(t3)), [r2]; + const r2 = k({ tagName: i2, attributes: e3 }); + return t3.forEach((t4) => r2.appendChild(t4)), [r2]; } } - createContainerElement(t2) { + createContainerElement(t3) { const e2 = {}; let i2; - const n2 = this.attributes[t2], { tagName: r2, htmlAttributes: o2 = [] } = gt(n2); - if (0 === t2 && this.block.isRTL() && Object.assign(e2, { dir: "rtl" }), "attachmentGallery" === n2) { - const t3 = this.block.getBlockBreakPosition(); - i2 = "".concat(fe.attachmentGallery, " ").concat(fe.attachmentGallery, "--").concat(t3); + const n2 = this.attributes[t3], { tagName: r2, htmlAttributes: o2 = [] } = gt(n2); + if (0 === t3 && this.block.isRTL() && Object.assign(e2, { dir: "rtl" }), "attachmentGallery" === n2) { + const t4 = this.block.getBlockBreakPosition(); + i2 = "".concat(Ai.attachmentGallery, " ").concat(Ai.attachmentGallery, "--").concat(t4); } - return Object.entries(this.block.htmlAttributes).forEach((t3) => { - let [i3, n3] = t3; + return Object.entries(this.block.htmlAttributes).forEach((t4) => { + let [i3, n3] = t4; o2.includes(i3) && (e2[i3] = n3); - }), S({ tagName: r2, className: i2, attributes: e2 }); + }), k({ tagName: r2, className: i2, attributes: e2 }); } shouldAddExtraNewlineElement() { return /\n\n$/.test(this.block.toString()); } }; - var ve = class extends ee { - static render(t2) { - const e2 = S("div"), i2 = new this(t2, { element: e2 }); + var xi = class extends ee { + static render(t3) { + const e2 = k("div"), i2 = new this(t3, { element: e2 }); return i2.render(), i2.sync(), e2; } constructor() { - super(...arguments), this.element = this.options.element, this.elementStore = new Qt(), this.setDocument(this.object); + super(...arguments), this.element = this.options.element, this.elementStore = new Zt(), this.setDocument(this.object); } - setDocument(t2) { - t2.isEqualTo(this.document) || (this.document = this.object = t2); + setDocument(t3) { + t3.isEqualTo(this.document) || (this.document = this.object = t3); } render() { - if (this.childViews = [], this.shadowElement = S("div"), !this.document.isEmpty()) { - const t2 = Xt.groupObjects(this.document.getBlocks(), { asTree: true }); - Array.from(t2).forEach((t3) => { - const e2 = this.findOrCreateCachedChildView(be, t3); - Array.from(e2.getNodes()).map((t4) => this.shadowElement.appendChild(t4)); + if (this.childViews = [], this.shadowElement = k("div"), !this.document.isEmpty()) { + const t3 = $t.groupObjects(this.document.getBlocks(), { asTree: true }); + Array.from(t3).forEach((t4) => { + const e2 = this.findOrCreateCachedChildView(yi, t4); + Array.from(e2.getNodes()).map((t5) => this.shadowElement.appendChild(t5)); }); } } isSynced() { - return xe(this.shadowElement, this.element); + return Ei(this.shadowElement, this.element); } sync() { - const t2 = this.createDocumentFragmentForSync(); + const t3 = this.createDocumentFragmentForSync(); for (; this.element.lastChild; ) this.element.removeChild(this.element.lastChild); - return this.element.appendChild(t2), this.didSync(); + return this.element.appendChild(t3), this.didSync(); } didSync() { - return this.elementStore.reset(Ae(this.element)), Rt(() => this.garbageCollectCachedViews()); + return this.elementStore.reset(Ci(this.element)), St(() => this.garbageCollectCachedViews()); } createDocumentFragmentForSync() { - const t2 = document.createDocumentFragment(); + const t3 = document.createDocumentFragment(); return Array.from(this.shadowElement.childNodes).forEach((e2) => { - t2.appendChild(e2.cloneNode(true)); - }), Array.from(Ae(t2)).forEach((t3) => { - const e2 = this.elementStore.remove(t3); - e2 && t3.parentNode.replaceChild(e2, t3); - }), t2; + t3.appendChild(e2.cloneNode(true)); + }), Array.from(Ci(t3)).forEach((t4) => { + const e2 = this.elementStore.remove(t4); + e2 && t4.parentNode.replaceChild(e2, t4); + }), t3; } }; - var Ae = (t2) => t2.querySelectorAll("[data-trix-store-key]"); - var xe = (t2, e2) => ye(t2.innerHTML) === ye(e2.innerHTML); - var ye = (t2) => t2.replace(/ /g, " "); - function Ce(t2) { + var Ci = (t3) => t3.querySelectorAll("[data-trix-store-key]"); + var Ei = (t3, e2) => Si(t3.innerHTML) === Si(e2.innerHTML); + var Si = (t3) => t3.replace(/ /g, " "); + function Ri(t3) { var e2, i2; function n2(e3, i3) { try { - var o2 = t2[e3](i3), s2 = o2.value, a2 = s2 instanceof ke; + var o2 = t3[e3](i3), s2 = o2.value, a2 = s2 instanceof ki; Promise.resolve(a2 ? s2.v : s2).then(function(i4) { if (a2) { var l2 = "return" === e3 ? "return" : "next"; if (!s2.k || i4.done) return n2(l2, i4); - i4 = t2[l2](i4).value; + i4 = t3[l2](i4).value; } r2(o2.done ? "return" : "normal", i4); - }, function(t3) { - n2("throw", t3); + }, function(t4) { + n2("throw", t4); }); - } catch (t3) { - r2("throw", t3); + } catch (t4) { + r2("throw", t4); } } - function r2(t3, r3) { - switch (t3) { + function r2(t4, r3) { + switch (t4) { case "return": e2.resolve({ value: r3, done: true }); break; @@ -9378,70 +9781,105 @@ } (e2 = e2.next) ? n2(e2.key, e2.arg) : i2 = null; } - this._invoke = function(t3, r3) { + this._invoke = function(t4, r3) { return new Promise(function(o2, s2) { - var a2 = { key: t3, arg: r3, resolve: o2, reject: s2, next: null }; - i2 ? i2 = i2.next = a2 : (e2 = i2 = a2, n2(t3, r3)); + var a2 = { key: t4, arg: r3, resolve: o2, reject: s2, next: null }; + i2 ? i2 = i2.next = a2 : (e2 = i2 = a2, n2(t4, r3)); }); - }, "function" != typeof t2.return && (this.return = void 0); + }, "function" != typeof t3.return && (this.return = void 0); } - function ke(t2, e2) { - this.v = t2, this.k = e2; + function ki(t3, e2) { + this.v = t3, this.k = e2; } - function Re(t2, e2, i2) { - return (e2 = Ee(e2)) in t2 ? Object.defineProperty(t2, e2, { value: i2, enumerable: true, configurable: true, writable: true }) : t2[e2] = i2, t2; + function Ti(t3, e2, i2) { + return (e2 = wi(e2)) in t3 ? Object.defineProperty(t3, e2, { value: i2, enumerable: true, configurable: true, writable: true }) : t3[e2] = i2, t3; } - function Ee(t2) { - var e2 = function(t3, e3) { - if ("object" != typeof t3 || null === t3) - return t3; - var i2 = t3[Symbol.toPrimitive]; + function wi(t3) { + var e2 = function(t4, e3) { + if ("object" != typeof t4 || null === t4) + return t4; + var i2 = t4[Symbol.toPrimitive]; if (void 0 !== i2) { - var n2 = i2.call(t3, e3 || "default"); + var n2 = i2.call(t4, e3 || "default"); if ("object" != typeof n2) return n2; throw new TypeError("@@toPrimitive must return a primitive value."); } - return ("string" === e3 ? String : Number)(t3); - }(t2, "string"); + return ("string" === e3 ? String : Number)(t4); + }(t3, "string"); return "symbol" == typeof e2 ? e2 : String(e2); } - Ce.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() { + Ri.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() { return this; - }, Ce.prototype.next = function(t2) { - return this._invoke("next", t2); - }, Ce.prototype.throw = function(t2) { - return this._invoke("throw", t2); - }, Ce.prototype.return = function(t2) { - return this._invoke("return", t2); + }, Ri.prototype.next = function(t3) { + return this._invoke("next", t3); + }, Ri.prototype.throw = function(t3) { + return this._invoke("throw", t3); + }, Ri.prototype.return = function(t3) { + return this._invoke("return", t3); }; - var Se = class extends nt { - static registerType(t2, e2) { - e2.type = t2, this.types[t2] = e2; + function Li(t3, e2) { + return Ii(t3, Ni(t3, e2, "get")); + } + function Di(t3, e2, i2) { + return Oi(t3, Ni(t3, e2, "set"), i2), i2; + } + function Ni(t3, e2, i2) { + if (!e2.has(t3)) + throw new TypeError("attempted to " + i2 + " private field on non-instance"); + return e2.get(t3); + } + function Ii(t3, e2) { + return e2.get ? e2.get.call(t3) : e2.value; + } + function Oi(t3, e2, i2) { + if (e2.set) + e2.set.call(t3, i2); + else { + if (!e2.writable) + throw new TypeError("attempted to set read only private field"); + e2.value = i2; } - static fromJSON(t2) { - const e2 = this.types[t2.type]; + } + function Pi(t3, e2, i2) { + if (!e2.has(t3)) + throw new TypeError("attempted to get private field on non-instance"); + return i2; + } + function Fi(t3, e2) { + if (e2.has(t3)) + throw new TypeError("Cannot initialize the same private elements twice on an object"); + } + function Mi(t3, e2, i2) { + Fi(t3, e2), e2.set(t3, i2); + } + var Bi = class extends nt { + static registerType(t3, e2) { + e2.type = t3, this.types[t3] = e2; + } + static fromJSON(t3) { + const e2 = this.types[t3.type]; if (e2) - return e2.fromJSON(t2); + return e2.fromJSON(t3); } - constructor(t2) { + constructor(t3) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - super(...arguments), this.attributes = zt.box(e2); + super(...arguments), this.attributes = qt.box(e2); } - copyWithAttributes(t2) { - return new this.constructor(this.getValue(), t2); + copyWithAttributes(t3) { + return new this.constructor(this.getValue(), t3); } - copyWithAdditionalAttributes(t2) { - return this.copyWithAttributes(this.attributes.merge(t2)); + copyWithAdditionalAttributes(t3) { + return this.copyWithAttributes(this.attributes.merge(t3)); } - copyWithoutAttribute(t2) { - return this.copyWithAttributes(this.attributes.remove(t2)); + copyWithoutAttribute(t3) { + return this.copyWithAttributes(this.attributes.remove(t3)); } copy() { return this.copyWithAttributes(this.attributes); } - getAttribute(t2) { - return this.attributes.get(t2); + getAttribute(t3) { + return this.attributes.get(t3); } getAttributesHash() { return this.attributes; @@ -9449,20 +9887,20 @@ getAttributes() { return this.attributes.toObject(); } - hasAttribute(t2) { - return this.attributes.has(t2); + hasAttribute(t3) { + return this.attributes.has(t3); } - hasSameStringValueAsPiece(t2) { - return t2 && this.toString() === t2.toString(); + hasSameStringValueAsPiece(t3) { + return t3 && this.toString() === t3.toString(); } - hasSameAttributesAsPiece(t2) { - return t2 && (this.attributes === t2.attributes || this.attributes.isEqualTo(t2.attributes)); + hasSameAttributesAsPiece(t3) { + return t3 && (this.attributes === t3.attributes || this.attributes.isEqualTo(t3.attributes)); } isBlockBreak() { return false; } - isEqualTo(t2) { - return super.isEqualTo(...arguments) || this.hasSameConstructorAs(t2) && this.hasSameStringValueAsPiece(t2) && this.hasSameAttributesAsPiece(t2); + isEqualTo(t3) { + return super.isEqualTo(...arguments) || this.hasSameConstructorAs(t3) && this.hasSameStringValueAsPiece(t3) && this.hasSameAttributesAsPiece(t3); } isEmpty() { return 0 === this.length; @@ -9479,53 +9917,53 @@ canBeGrouped() { return this.hasAttribute("href"); } - canBeGroupedWith(t2) { - return this.getAttribute("href") === t2.getAttribute("href"); + canBeGroupedWith(t3) { + return this.getAttribute("href") === t3.getAttribute("href"); } getLength() { return this.length; } - canBeConsolidatedWith(t2) { + canBeConsolidatedWith(t3) { return false; } }; - Re(Se, "types", {}); - var Le = class extends te { - constructor(t2) { - super(...arguments), this.url = t2; + Ti(Bi, "types", {}); + var _i = class extends te { + constructor(t3) { + super(...arguments), this.url = t3; } - perform(t2) { + perform(t3) { const e2 = new Image(); - e2.onload = () => (e2.width = this.width = e2.naturalWidth, e2.height = this.height = e2.naturalHeight, t2(true, e2)), e2.onerror = () => t2(false), e2.src = this.url; + e2.onload = () => (e2.width = this.width = e2.naturalWidth, e2.height = this.height = e2.naturalHeight, t3(true, e2)), e2.onerror = () => t3(false), e2.src = this.url; } }; - var De = class _De extends nt { - static attachmentForFile(t2) { - const e2 = new this(this.attributesForFile(t2)); - return e2.setFile(t2), e2; + var ji = class _ji extends nt { + static attachmentForFile(t3) { + const e2 = new this(this.attributesForFile(t3)); + return e2.setFile(t3), e2; } - static attributesForFile(t2) { - return new zt({ filename: t2.name, filesize: t2.size, contentType: t2.type }); + static attributesForFile(t3) { + return new qt({ filename: t3.name, filesize: t3.size, contentType: t3.type }); } - static fromJSON(t2) { - return new this(t2); + static fromJSON(t3) { + return new this(t3); } constructor() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; - super(t2), this.releaseFile = this.releaseFile.bind(this), this.attributes = zt.box(t2), this.didChangeAttributes(); + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + super(t3), this.releaseFile = this.releaseFile.bind(this), this.attributes = qt.box(t3), this.didChangeAttributes(); } - getAttribute(t2) { - return this.attributes.get(t2); + getAttribute(t3) { + return this.attributes.get(t3); } - hasAttribute(t2) { - return this.attributes.has(t2); + hasAttribute(t3) { + return this.attributes.has(t3); } getAttributes() { return this.attributes.toObject(); } setAttributes() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; - const e2 = this.attributes.merge(t2); + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + const e2 = this.attributes.merge(t3); var i2, n2, r2, o2; if (!this.attributes.isEqualTo(e2)) return this.attributes = e2, this.didChangeAttributes(), null === (i2 = this.previewDelegate) || void 0 === i2 || null === (n2 = i2.attachmentDidChangeAttributes) || void 0 === n2 || n2.call(i2, this), null === (r2 = this.delegate) || void 0 === r2 || null === (o2 = r2.attachmentDidChangeAttributes) || void 0 === o2 ? void 0 : o2.call(r2, this); @@ -9538,7 +9976,7 @@ return null != this.file && !(this.getURL() || this.getHref()); } isPreviewable() { - return this.attributes.has("previewable") ? this.attributes.get("previewable") : _De.previewablePattern.test(this.getContentType()); + return this.attributes.has("previewable") ? this.attributes.get("previewable") : _ji.previewablePattern.test(this.getContentType()); } getType() { return this.hasContent() ? "content" : this.isPreviewable() ? "preview" : "file"; @@ -9556,12 +9994,12 @@ return this.attributes.get("filesize"); } getFormattedFilesize() { - const t2 = this.attributes.get("filesize"); - return "number" == typeof t2 ? u.formatter(t2) : ""; + const t3 = this.attributes.get("filesize"); + return "number" == typeof t3 ? u.formatter(t3) : ""; } getExtension() { - var t2; - return null === (t2 = this.getFilename().match(/\.(\w+)$/)) || void 0 === t2 ? void 0 : t2[1].toLowerCase(); + var t3; + return null === (t3 = this.getFilename().match(/\.(\w+)$/)) || void 0 === t3 ? void 0 : t3[1].toLowerCase(); } getContentType() { return this.attributes.get("contentType"); @@ -9581,8 +10019,8 @@ getFile() { return this.file; } - setFile(t2) { - if (this.file = t2, this.isPreviewable()) + setFile(t3) { + if (this.file = t3, this.isPreviewable()) return this.preloadFile(); } releaseFile() { @@ -9591,10 +10029,10 @@ getUploadProgress() { return null != this.uploadProgress ? this.uploadProgress : 0; } - setUploadProgress(t2) { + setUploadProgress(t3) { var e2, i2; - if (this.uploadProgress !== t2) - return this.uploadProgress = t2, null === (e2 = this.uploadProgressDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeUploadProgress) || void 0 === i2 ? void 0 : i2.call(e2, this); + if (this.uploadProgress !== t3) + return this.uploadProgress = t3, null === (e2 = this.uploadProgressDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeUploadProgress) || void 0 === i2 ? void 0 : i2.call(e2, this); } toJSON() { return this.getAttributes(); @@ -9605,10 +10043,10 @@ getPreviewURL() { return this.previewURL || this.preloadingURL; } - setPreviewURL(t2) { + setPreviewURL(t3) { var e2, i2, n2, r2; - if (t2 !== this.getPreviewURL()) - return this.previewURL = t2, null === (e2 = this.previewDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeAttributes) || void 0 === i2 || i2.call(e2, this), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.attachmentDidChangePreviewURL) || void 0 === r2 ? void 0 : r2.call(n2, this); + if (t3 !== this.getPreviewURL()) + return this.previewURL = t3, null === (e2 = this.previewDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeAttributes) || void 0 === i2 || i2.call(e2, this), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.attachmentDidChangePreviewURL) || void 0 === r2 ? void 0 : r2.call(n2, this); } preloadURL() { return this.preload(this.getURL(), this.releaseFile); @@ -9620,30 +10058,30 @@ releasePreloadedFile() { this.fileObjectURL && (URL.revokeObjectURL(this.fileObjectURL), this.fileObjectURL = null); } - preload(t2, e2) { - if (t2 && t2 !== this.getPreviewURL()) { - this.preloadingURL = t2; - return new Le(t2).then((i2) => { + preload(t3, e2) { + if (t3 && t3 !== this.getPreviewURL()) { + this.preloadingURL = t3; + return new _i(t3).then((i2) => { let { width: n2, height: r2 } = i2; - return this.getWidth() && this.getHeight() || this.setAttributes({ width: n2, height: r2 }), this.preloadingURL = null, this.setPreviewURL(t2), null == e2 ? void 0 : e2(); + return this.getWidth() && this.getHeight() || this.setAttributes({ width: n2, height: r2 }), this.preloadingURL = null, this.setPreviewURL(t3), null == e2 ? void 0 : e2(); }).catch(() => (this.preloadingURL = null, null == e2 ? void 0 : e2())); } } }; - Re(De, "previewablePattern", /^image(\/(gif|png|webp|jpe?g)|$)/); - var we = class _we extends Se { - static fromJSON(t2) { - return new this(De.fromJSON(t2.attachment), t2.attributes); + Ti(ji, "previewablePattern", /^image(\/(gif|png|webp|jpe?g)|$)/); + var Wi = class _Wi extends Bi { + static fromJSON(t3) { + return new this(ji.fromJSON(t3.attachment), t3.attributes); } - constructor(t2) { - super(...arguments), this.attachment = t2, this.length = 1, this.ensureAttachmentExclusivelyHasAttribute("href"), this.attachment.hasContent() || this.removeProhibitedAttributes(); + constructor(t3) { + super(...arguments), this.attachment = t3, this.length = 1, this.ensureAttachmentExclusivelyHasAttribute("href"), this.attachment.hasContent() || this.removeProhibitedAttributes(); } - ensureAttachmentExclusivelyHasAttribute(t2) { - this.hasAttribute(t2) && (this.attachment.hasAttribute(t2) || this.attachment.setAttributes(this.attributes.slice([t2])), this.attributes = this.attributes.remove(t2)); + ensureAttachmentExclusivelyHasAttribute(t3) { + this.hasAttribute(t3) && (this.attachment.hasAttribute(t3) || this.attachment.setAttributes(this.attributes.slice([t3])), this.attributes = this.attributes.remove(t3)); } removeProhibitedAttributes() { - const t2 = this.attributes.slice(_we.permittedAttributes); - t2.isEqualTo(this.attributes) || (this.attributes = t2); + const t3 = this.attributes.slice(_Wi.permittedAttributes); + t3.isEqualTo(this.attributes) || (this.attributes = t3); } getValue() { return this.attachment; @@ -9654,16 +10092,16 @@ getCaption() { return this.attributes.get("caption") || ""; } - isEqualTo(t2) { + isEqualTo(t3) { var e2; - return super.isEqualTo(t2) && this.attachment.id === (null == t2 || null === (e2 = t2.attachment) || void 0 === e2 ? void 0 : e2.id); + return super.isEqualTo(t3) && this.attachment.id === (null == t3 || null === (e2 = t3.attachment) || void 0 === e2 ? void 0 : e2.id); } toString() { return "\uFFFC"; } toJSON() { - const t2 = super.toJSON(...arguments); - return t2.attachment = this.attachment, t2; + const t3 = super.toJSON(...arguments); + return t3.attachment = this.attachment, t3; } getCacheKey() { return [super.getCacheKey(...arguments), this.attachment.getCacheKey()].join("/"); @@ -9672,13 +10110,13 @@ return JSON.stringify(this.toString()); } }; - Re(we, "permittedAttributes", ["caption", "presentation"]), Se.registerType("attachment", we); - var Te = class extends Se { - static fromJSON(t2) { - return new this(t2.string, t2.attributes); + Ti(Wi, "permittedAttributes", ["caption", "presentation"]), Bi.registerType("attachment", Wi); + var Ui = class extends Bi { + static fromJSON(t3) { + return new this(t3.string, t3.attributes); } - constructor(t2) { - super(...arguments), this.string = ((t3) => t3.replace(/\r\n?/g, "\n"))(t2), this.length = this.string.length; + constructor(t3) { + super(...arguments), this.string = ((t4) => t4.replace(/\r\n?/g, "\n"))(t3), this.length = this.string.length; } getValue() { return this.string; @@ -9690,98 +10128,98 @@ return "\n" === this.toString() && true === this.getAttribute("blockBreak"); } toJSON() { - const t2 = super.toJSON(...arguments); - return t2.string = this.string, t2; + const t3 = super.toJSON(...arguments); + return t3.string = this.string, t3; } - canBeConsolidatedWith(t2) { - return t2 && this.hasSameConstructorAs(t2) && this.hasSameAttributesAsPiece(t2); + canBeConsolidatedWith(t3) { + return t3 && this.hasSameConstructorAs(t3) && this.hasSameAttributesAsPiece(t3); } - consolidateWith(t2) { - return new this.constructor(this.toString() + t2.toString(), this.attributes); + consolidateWith(t3) { + return new this.constructor(this.toString() + t3.toString(), this.attributes); } - splitAtOffset(t2) { + splitAtOffset(t3) { let e2, i2; - return 0 === t2 ? (e2 = null, i2 = this) : t2 === this.length ? (e2 = this, i2 = null) : (e2 = new this.constructor(this.string.slice(0, t2), this.attributes), i2 = new this.constructor(this.string.slice(t2), this.attributes)), [e2, i2]; + return 0 === t3 ? (e2 = null, i2 = this) : t3 === this.length ? (e2 = this, i2 = null) : (e2 = new this.constructor(this.string.slice(0, t3), this.attributes), i2 = new this.constructor(this.string.slice(t3), this.attributes)), [e2, i2]; } toConsole() { - let { string: t2 } = this; - return t2.length > 15 && (t2 = t2.slice(0, 14) + "\u2026"), JSON.stringify(t2.toString()); + let { string: t3 } = this; + return t3.length > 15 && (t3 = t3.slice(0, 14) + "\u2026"), JSON.stringify(t3.toString()); } }; - Se.registerType("string", Te); - var Be = class extends nt { - static box(t2) { - return t2 instanceof this ? t2 : new this(t2); + Bi.registerType("string", Ui); + var Vi = class extends nt { + static box(t3) { + return t3 instanceof this ? t3 : new this(t3); } constructor() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; - super(...arguments), this.objects = t2.slice(0), this.length = this.objects.length; + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; + super(...arguments), this.objects = t3.slice(0), this.length = this.objects.length; } - indexOf(t2) { - return this.objects.indexOf(t2); + indexOf(t3) { + return this.objects.indexOf(t3); } splice() { - for (var t2 = arguments.length, e2 = new Array(t2), i2 = 0; i2 < t2; i2++) + for (var t3 = arguments.length, e2 = new Array(t3), i2 = 0; i2 < t3; i2++) e2[i2] = arguments[i2]; return new this.constructor(ot(this.objects, ...e2)); } - eachObject(t2) { - return this.objects.map((e2, i2) => t2(e2, i2)); + eachObject(t3) { + return this.objects.map((e2, i2) => t3(e2, i2)); } - insertObjectAtIndex(t2, e2) { - return this.splice(e2, 0, t2); + insertObjectAtIndex(t3, e2) { + return this.splice(e2, 0, t3); } - insertSplittableListAtIndex(t2, e2) { - return this.splice(e2, 0, ...t2.objects); + insertSplittableListAtIndex(t3, e2) { + return this.splice(e2, 0, ...t3.objects); } - insertSplittableListAtPosition(t2, e2) { + insertSplittableListAtPosition(t3, e2) { const [i2, n2] = this.splitObjectAtPosition(e2); - return new this.constructor(i2).insertSplittableListAtIndex(t2, n2); + return new this.constructor(i2).insertSplittableListAtIndex(t3, n2); } - editObjectAtIndex(t2, e2) { - return this.replaceObjectAtIndex(e2(this.objects[t2]), t2); + editObjectAtIndex(t3, e2) { + return this.replaceObjectAtIndex(e2(this.objects[t3]), t3); } - replaceObjectAtIndex(t2, e2) { - return this.splice(e2, 1, t2); + replaceObjectAtIndex(t3, e2) { + return this.splice(e2, 1, t3); } - removeObjectAtIndex(t2) { - return this.splice(t2, 1); + removeObjectAtIndex(t3) { + return this.splice(t3, 1); } - getObjectAtIndex(t2) { - return this.objects[t2]; + getObjectAtIndex(t3) { + return this.objects[t3]; } - getSplittableListInRange(t2) { - const [e2, i2, n2] = this.splitObjectsAtRange(t2); + getSplittableListInRange(t3) { + const [e2, i2, n2] = this.splitObjectsAtRange(t3); return new this.constructor(e2.slice(i2, n2 + 1)); } - selectSplittableList(t2) { - const e2 = this.objects.filter((e3) => t2(e3)); + selectSplittableList(t3) { + const e2 = this.objects.filter((e3) => t3(e3)); return new this.constructor(e2); } - removeObjectsInRange(t2) { - const [e2, i2, n2] = this.splitObjectsAtRange(t2); + removeObjectsInRange(t3) { + const [e2, i2, n2] = this.splitObjectsAtRange(t3); return new this.constructor(e2).splice(i2, n2 - i2 + 1); } - transformObjectsInRange(t2, e2) { - const [i2, n2, r2] = this.splitObjectsAtRange(t2), o2 = i2.map((t3, i3) => n2 <= i3 && i3 <= r2 ? e2(t3) : t3); + transformObjectsInRange(t3, e2) { + const [i2, n2, r2] = this.splitObjectsAtRange(t3), o2 = i2.map((t4, i3) => n2 <= i3 && i3 <= r2 ? e2(t4) : t4); return new this.constructor(o2); } - splitObjectsAtRange(t2) { - let e2, [i2, n2, r2] = this.splitObjectAtPosition(Pe(t2)); - return [i2, e2] = new this.constructor(i2).splitObjectAtPosition(Ie(t2) + r2), [i2, n2, e2 - 1]; + splitObjectsAtRange(t3) { + let e2, [i2, n2, r2] = this.splitObjectAtPosition(qi(t3)); + return [i2, e2] = new this.constructor(i2).splitObjectAtPosition(Hi(t3) + r2), [i2, n2, e2 - 1]; } - getObjectAtPosition(t2) { - const { index: e2 } = this.findIndexAndOffsetAtPosition(t2); + getObjectAtPosition(t3) { + const { index: e2 } = this.findIndexAndOffsetAtPosition(t3); return this.objects[e2]; } - splitObjectAtPosition(t2) { + splitObjectAtPosition(t3) { let e2, i2; - const { index: n2, offset: r2 } = this.findIndexAndOffsetAtPosition(t2), o2 = this.objects.slice(0); + const { index: n2, offset: r2 } = this.findIndexAndOffsetAtPosition(t3), o2 = this.objects.slice(0); if (null != n2) if (0 === r2) e2 = n2, i2 = 0; else { - const t3 = this.getObjectAtIndex(n2), [s2, a2] = t3.splitAtOffset(r2); + const t4 = this.getObjectAtIndex(n2), [s2, a2] = t4.splitAtOffset(r2); o2.splice(n2, 1, s2, a2), e2 = n2 + 1, i2 = s2.getLength() - r2; } else @@ -9789,34 +10227,34 @@ return [o2, e2, i2]; } consolidate() { - const t2 = []; + const t3 = []; let e2 = this.objects[0]; return this.objects.slice(1).forEach((i2) => { var n2, r2; - null !== (n2 = (r2 = e2).canBeConsolidatedWith) && void 0 !== n2 && n2.call(r2, i2) ? e2 = e2.consolidateWith(i2) : (t2.push(e2), e2 = i2); - }), e2 && t2.push(e2), new this.constructor(t2); + null !== (n2 = (r2 = e2).canBeConsolidatedWith) && void 0 !== n2 && n2.call(r2, i2) ? e2 = e2.consolidateWith(i2) : (t3.push(e2), e2 = i2); + }), e2 && t3.push(e2), new this.constructor(t3); } - consolidateFromIndexToIndex(t2, e2) { - const i2 = this.objects.slice(0).slice(t2, e2 + 1), n2 = new this.constructor(i2).consolidate().toArray(); - return this.splice(t2, i2.length, ...n2); + consolidateFromIndexToIndex(t3, e2) { + const i2 = this.objects.slice(0).slice(t3, e2 + 1), n2 = new this.constructor(i2).consolidate().toArray(); + return this.splice(t3, i2.length, ...n2); } - findIndexAndOffsetAtPosition(t2) { + findIndexAndOffsetAtPosition(t3) { let e2, i2 = 0; for (e2 = 0; e2 < this.objects.length; e2++) { const n2 = i2 + this.objects[e2].getLength(); - if (i2 <= t2 && t2 < n2) - return { index: e2, offset: t2 - i2 }; + if (i2 <= t3 && t3 < n2) + return { index: e2, offset: t3 - i2 }; i2 = n2; } return { index: null, offset: null }; } - findPositionAtIndexAndOffset(t2, e2) { + findPositionAtIndexAndOffset(t3, e2) { let i2 = 0; for (let n2 = 0; n2 < this.objects.length; n2++) { const r2 = this.objects[n2]; - if (n2 < t2) + if (n2 < t3) i2 += r2.getLength(); - else if (n2 === t2) { + else if (n2 === t3) { i2 += e2; break; } @@ -9824,7 +10262,7 @@ return i2; } getEndPosition() { - return null == this.endPosition && (this.endPosition = 0, this.objects.forEach((t2) => this.endPosition += t2.getLength())), this.endPosition; + return null == this.endPosition && (this.endPosition = 0, this.objects.forEach((t3) => this.endPosition += t3.getLength())), this.endPosition; } toString() { return this.objects.join(""); @@ -9835,147 +10273,147 @@ toJSON() { return this.toArray(); } - isEqualTo(t2) { - return super.isEqualTo(...arguments) || Fe(this.objects, null == t2 ? void 0 : t2.objects); + isEqualTo(t3) { + return super.isEqualTo(...arguments) || zi(this.objects, null == t3 ? void 0 : t3.objects); } contentsForInspection() { - return { objects: "[".concat(this.objects.map((t2) => t2.inspect()).join(", "), "]") }; + return { objects: "[".concat(this.objects.map((t3) => t3.inspect()).join(", "), "]") }; } }; - var Fe = function(t2) { + var zi = function(t3) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; - if (t2.length !== e2.length) + if (t3.length !== e2.length) return false; let i2 = true; - for (let n2 = 0; n2 < t2.length; n2++) { - const r2 = t2[n2]; + for (let n2 = 0; n2 < t3.length; n2++) { + const r2 = t3[n2]; i2 && !r2.isEqualTo(e2[n2]) && (i2 = false); } return i2; }; - var Pe = (t2) => t2[0]; - var Ie = (t2) => t2[1]; - var Ne = class extends nt { - static textForAttachmentWithAttributes(t2, e2) { - return new this([new we(t2, e2)]); + var qi = (t3) => t3[0]; + var Hi = (t3) => t3[1]; + var Ji = class extends nt { + static textForAttachmentWithAttributes(t3, e2) { + return new this([new Wi(t3, e2)]); } - static textForStringWithAttributes(t2, e2) { - return new this([new Te(t2, e2)]); + static textForStringWithAttributes(t3, e2) { + return new this([new Ui(t3, e2)]); } - static fromJSON(t2) { - return new this(Array.from(t2).map((t3) => Se.fromJSON(t3))); + static fromJSON(t3) { + return new this(Array.from(t3).map((t4) => Bi.fromJSON(t4))); } constructor() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; super(...arguments); - const e2 = t2.filter((t3) => !t3.isEmpty()); - this.pieceList = new Be(e2); + const e2 = t3.filter((t4) => !t4.isEmpty()); + this.pieceList = new Vi(e2); } copy() { return this.copyWithPieceList(this.pieceList); } - copyWithPieceList(t2) { - return new this.constructor(t2.consolidate().toArray()); + copyWithPieceList(t3) { + return new this.constructor(t3.consolidate().toArray()); } - copyUsingObjectMap(t2) { - const e2 = this.getPieces().map((e3) => t2.find(e3) || e3); + copyUsingObjectMap(t3) { + const e2 = this.getPieces().map((e3) => t3.find(e3) || e3); return new this.constructor(e2); } - appendText(t2) { - return this.insertTextAtPosition(t2, this.getLength()); + appendText(t3) { + return this.insertTextAtPosition(t3, this.getLength()); } - insertTextAtPosition(t2, e2) { - return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t2.pieceList, e2)); + insertTextAtPosition(t3, e2) { + return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t3.pieceList, e2)); } - removeTextAtRange(t2) { - return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t2)); + removeTextAtRange(t3) { + return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t3)); } - replaceTextAtRange(t2, e2) { - return this.removeTextAtRange(e2).insertTextAtPosition(t2, e2[0]); + replaceTextAtRange(t3, e2) { + return this.removeTextAtRange(e2).insertTextAtPosition(t3, e2[0]); } - moveTextFromRangeToPosition(t2, e2) { - if (t2[0] <= e2 && e2 <= t2[1]) + moveTextFromRangeToPosition(t3, e2) { + if (t3[0] <= e2 && e2 <= t3[1]) return; - const i2 = this.getTextAtRange(t2), n2 = i2.getLength(); - return t2[0] < e2 && (e2 -= n2), this.removeTextAtRange(t2).insertTextAtPosition(i2, e2); + const i2 = this.getTextAtRange(t3), n2 = i2.getLength(); + return t3[0] < e2 && (e2 -= n2), this.removeTextAtRange(t3).insertTextAtPosition(i2, e2); } - addAttributeAtRange(t2, e2, i2) { + addAttributeAtRange(t3, e2, i2) { const n2 = {}; - return n2[t2] = e2, this.addAttributesAtRange(n2, i2); + return n2[t3] = e2, this.addAttributesAtRange(n2, i2); } - addAttributesAtRange(t2, e2) { - return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e2, (e3) => e3.copyWithAdditionalAttributes(t2))); + addAttributesAtRange(t3, e2) { + return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e2, (e3) => e3.copyWithAdditionalAttributes(t3))); } - removeAttributeAtRange(t2, e2) { - return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e2, (e3) => e3.copyWithoutAttribute(t2))); + removeAttributeAtRange(t3, e2) { + return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e2, (e3) => e3.copyWithoutAttribute(t3))); } - setAttributesAtRange(t2, e2) { - return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e2, (e3) => e3.copyWithAttributes(t2))); + setAttributesAtRange(t3, e2) { + return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e2, (e3) => e3.copyWithAttributes(t3))); } - getAttributesAtPosition(t2) { + getAttributesAtPosition(t3) { var e2; - return (null === (e2 = this.pieceList.getObjectAtPosition(t2)) || void 0 === e2 ? void 0 : e2.getAttributes()) || {}; + return (null === (e2 = this.pieceList.getObjectAtPosition(t3)) || void 0 === e2 ? void 0 : e2.getAttributes()) || {}; } getCommonAttributes() { - const t2 = Array.from(this.pieceList.toArray()).map((t3) => t3.getAttributes()); - return zt.fromCommonAttributesOfObjects(t2).toObject(); + const t3 = Array.from(this.pieceList.toArray()).map((t4) => t4.getAttributes()); + return qt.fromCommonAttributesOfObjects(t3).toObject(); } - getCommonAttributesAtRange(t2) { - return this.getTextAtRange(t2).getCommonAttributes() || {}; + getCommonAttributesAtRange(t3) { + return this.getTextAtRange(t3).getCommonAttributes() || {}; } - getExpandedRangeForAttributeAtOffset(t2, e2) { + getExpandedRangeForAttributeAtOffset(t3, e2) { let i2, n2 = i2 = e2; const r2 = this.getLength(); - for (; n2 > 0 && this.getCommonAttributesAtRange([n2 - 1, i2])[t2]; ) + for (; n2 > 0 && this.getCommonAttributesAtRange([n2 - 1, i2])[t3]; ) n2--; - for (; i2 < r2 && this.getCommonAttributesAtRange([e2, i2 + 1])[t2]; ) + for (; i2 < r2 && this.getCommonAttributesAtRange([e2, i2 + 1])[t3]; ) i2++; return [n2, i2]; } - getTextAtRange(t2) { - return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t2)); + getTextAtRange(t3) { + return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t3)); } - getStringAtRange(t2) { - return this.pieceList.getSplittableListInRange(t2).toString(); + getStringAtRange(t3) { + return this.pieceList.getSplittableListInRange(t3).toString(); } - getStringAtPosition(t2) { - return this.getStringAtRange([t2, t2 + 1]); + getStringAtPosition(t3) { + return this.getStringAtRange([t3, t3 + 1]); } - startsWithString(t2) { - return this.getStringAtRange([0, t2.length]) === t2; + startsWithString(t3) { + return this.getStringAtRange([0, t3.length]) === t3; } - endsWithString(t2) { + endsWithString(t3) { const e2 = this.getLength(); - return this.getStringAtRange([e2 - t2.length, e2]) === t2; + return this.getStringAtRange([e2 - t3.length, e2]) === t3; } getAttachmentPieces() { - return this.pieceList.toArray().filter((t2) => !!t2.attachment); + return this.pieceList.toArray().filter((t3) => !!t3.attachment); } getAttachments() { - return this.getAttachmentPieces().map((t2) => t2.attachment); + return this.getAttachmentPieces().map((t3) => t3.attachment); } - getAttachmentAndPositionById(t2) { + getAttachmentAndPositionById(t3) { let e2 = 0; for (const n2 of this.pieceList.toArray()) { var i2; - if ((null === (i2 = n2.attachment) || void 0 === i2 ? void 0 : i2.id) === t2) + if ((null === (i2 = n2.attachment) || void 0 === i2 ? void 0 : i2.id) === t3) return { attachment: n2.attachment, position: e2 }; e2 += n2.length; } return { attachment: null, position: null }; } - getAttachmentById(t2) { - const { attachment: e2 } = this.getAttachmentAndPositionById(t2); + getAttachmentById(t3) { + const { attachment: e2 } = this.getAttachmentAndPositionById(t3); return e2; } - getRangeOfAttachment(t2) { - const e2 = this.getAttachmentAndPositionById(t2.id), i2 = e2.position; - if (t2 = e2.attachment) + getRangeOfAttachment(t3) { + const e2 = this.getAttachmentAndPositionById(t3.id), i2 = e2.position; + if (t3 = e2.attachment) return [i2, i2 + 1]; } - updateAttributesForAttachment(t2, e2) { + updateAttributesForAttachment(t3, e2) { const i2 = this.getRangeOfAttachment(e2); - return i2 ? this.addAttributesAtRange(t2, i2) : this; + return i2 ? this.addAttributesAtRange(t3, i2) : this; } getLength() { return this.pieceList.getEndPosition(); @@ -9983,28 +10421,28 @@ isEmpty() { return 0 === this.getLength(); } - isEqualTo(t2) { + isEqualTo(t3) { var e2; - return super.isEqualTo(t2) || (null == t2 || null === (e2 = t2.pieceList) || void 0 === e2 ? void 0 : e2.isEqualTo(this.pieceList)); + return super.isEqualTo(t3) || (null == t3 || null === (e2 = t3.pieceList) || void 0 === e2 ? void 0 : e2.isEqualTo(this.pieceList)); } isBlockBreak() { return 1 === this.getLength() && this.pieceList.getObjectAtIndex(0).isBlockBreak(); } - eachPiece(t2) { - return this.pieceList.eachObject(t2); + eachPiece(t3) { + return this.pieceList.eachObject(t3); } getPieces() { return this.pieceList.toArray(); } - getPieceAtPosition(t2) { - return this.pieceList.getObjectAtPosition(t2); + getPieceAtPosition(t3) { + return this.pieceList.getObjectAtPosition(t3); } contentsForInspection() { return { pieceList: this.pieceList.inspect() }; } toSerializableText() { - const t2 = this.pieceList.selectSplittableList((t3) => t3.isSerializable()); - return this.copyWithPieceList(t2); + const t3 = this.pieceList.selectSplittableList((t4) => t4.isSerializable()); + return this.copyWithPieceList(t3); } toString() { return this.pieceList.toString(); @@ -10013,7 +10451,7 @@ return this.pieceList.toJSON(); } toConsole() { - return JSON.stringify(this.pieceList.toArray().map((t2) => JSON.parse(t2.toConsole()))); + return JSON.stringify(this.pieceList.toArray().map((t3) => JSON.parse(t3.toConsole()))); } getDirection() { return at(this.toString()); @@ -10022,52 +10460,52 @@ return "rtl" === this.getDirection(); } }; - var Oe = class _Oe extends nt { - static fromJSON(t2) { - return new this(Ne.fromJSON(t2.text), t2.attributes, t2.htmlAttributes); + var Ki = class _Ki extends nt { + static fromJSON(t3) { + return new this(Ji.fromJSON(t3.text), t3.attributes, t3.htmlAttributes); } - constructor(t2, e2, i2) { - super(...arguments), this.text = Me(t2 || new Ne()), this.attributes = e2 || [], this.htmlAttributes = i2 || {}; + constructor(t3, e2, i2) { + super(...arguments), this.text = Gi(t3 || new Ji()), this.attributes = e2 || [], this.htmlAttributes = i2 || {}; } isEmpty() { return this.text.isBlockBreak(); } - isEqualTo(t2) { - return !!super.isEqualTo(t2) || this.text.isEqualTo(null == t2 ? void 0 : t2.text) && rt(this.attributes, null == t2 ? void 0 : t2.attributes) && St(this.htmlAttributes, null == t2 ? void 0 : t2.htmlAttributes); + isEqualTo(t3) { + return !!super.isEqualTo(t3) || this.text.isEqualTo(null == t3 ? void 0 : t3.text) && rt(this.attributes, null == t3 ? void 0 : t3.attributes) && kt(this.htmlAttributes, null == t3 ? void 0 : t3.htmlAttributes); } - copyWithText(t2) { - return new _Oe(t2, this.attributes, this.htmlAttributes); + copyWithText(t3) { + return new _Ki(t3, this.attributes, this.htmlAttributes); } copyWithoutText() { return this.copyWithText(null); } - copyWithAttributes(t2) { - return new _Oe(this.text, t2, this.htmlAttributes); + copyWithAttributes(t3) { + return new _Ki(this.text, t3, this.htmlAttributes); } copyWithoutAttributes() { return this.copyWithAttributes(null); } - copyUsingObjectMap(t2) { - const e2 = t2.find(this.text); - return e2 ? this.copyWithText(e2) : this.copyWithText(this.text.copyUsingObjectMap(t2)); + copyUsingObjectMap(t3) { + const e2 = t3.find(this.text); + return e2 ? this.copyWithText(e2) : this.copyWithText(this.text.copyUsingObjectMap(t3)); } - addAttribute(t2) { - const e2 = this.attributes.concat(He(t2)); + addAttribute(t3) { + const e2 = this.attributes.concat(tn(t3)); return this.copyWithAttributes(e2); } - addHTMLAttribute(t2, e2) { - const i2 = Object.assign({}, this.htmlAttributes, { [t2]: e2 }); - return new _Oe(this.text, this.attributes, i2); + addHTMLAttribute(t3, e2) { + const i2 = Object.assign({}, this.htmlAttributes, { [t3]: e2 }); + return new _Ki(this.text, this.attributes, i2); } - removeAttribute(t2) { - const { listAttribute: e2 } = gt(t2), i2 = _e(_e(this.attributes, t2), e2); + removeAttribute(t3) { + const { listAttribute: e2 } = gt(t3), i2 = nn(nn(this.attributes, t3), e2); return this.copyWithAttributes(i2); } removeLastAttribute() { return this.removeAttribute(this.getLastAttribute()); } getLastAttribute() { - return ze(this.attributes); + return en(this.attributes); } getAttributes() { return this.attributes.slice(0); @@ -10075,55 +10513,55 @@ getAttributeLevel() { return this.attributes.length; } - getAttributeAtLevel(t2) { - return this.attributes[t2 - 1]; + getAttributeAtLevel(t3) { + return this.attributes[t3 - 1]; } - hasAttribute(t2) { - return this.attributes.includes(t2); + hasAttribute(t3) { + return this.attributes.includes(t3); } hasAttributes() { return this.getAttributeLevel() > 0; } getLastNestableAttribute() { - return ze(this.getNestableAttributes()); + return en(this.getNestableAttributes()); } getNestableAttributes() { - return this.attributes.filter((t2) => gt(t2).nestable); + return this.attributes.filter((t3) => gt(t3).nestable); } getNestingLevel() { return this.getNestableAttributes().length; } decreaseNestingLevel() { - const t2 = this.getLastNestableAttribute(); - return t2 ? this.removeAttribute(t2) : this; + const t3 = this.getLastNestableAttribute(); + return t3 ? this.removeAttribute(t3) : this; } increaseNestingLevel() { - const t2 = this.getLastNestableAttribute(); - if (t2) { - const e2 = this.attributes.lastIndexOf(t2), i2 = ot(this.attributes, e2 + 1, 0, ...He(t2)); + const t3 = this.getLastNestableAttribute(); + if (t3) { + const e2 = this.attributes.lastIndexOf(t3), i2 = ot(this.attributes, e2 + 1, 0, ...tn(t3)); return this.copyWithAttributes(i2); } return this; } getListItemAttributes() { - return this.attributes.filter((t2) => gt(t2).listAttribute); + return this.attributes.filter((t3) => gt(t3).listAttribute); } isListItem() { - var t2; - return null === (t2 = gt(this.getLastAttribute())) || void 0 === t2 ? void 0 : t2.listAttribute; + var t3; + return null === (t3 = gt(this.getLastAttribute())) || void 0 === t3 ? void 0 : t3.listAttribute; } isTerminalBlock() { - var t2; - return null === (t2 = gt(this.getLastAttribute())) || void 0 === t2 ? void 0 : t2.terminal; + var t3; + return null === (t3 = gt(this.getLastAttribute())) || void 0 === t3 ? void 0 : t3.terminal; } breaksOnReturn() { - var t2; - return null === (t2 = gt(this.getLastAttribute())) || void 0 === t2 ? void 0 : t2.breakOnReturn; + var t3; + return null === (t3 = gt(this.getLastAttribute())) || void 0 === t3 ? void 0 : t3.breakOnReturn; } - findLineBreakInDirectionFromPosition(t2, e2) { + findLineBreakInDirectionFromPosition(t3, e2) { const i2 = this.toString(); let n2; - switch (t2) { + switch (t3) { case "forward": n2 = i2.indexOf("\n", e2); break; @@ -10151,302 +10589,302 @@ getLength() { return this.text.getLength(); } - canBeConsolidatedWith(t2) { - return !this.hasAttributes() && !t2.hasAttributes() && this.getDirection() === t2.getDirection(); + canBeConsolidatedWith(t3) { + return !this.hasAttributes() && !t3.hasAttributes() && this.getDirection() === t3.getDirection(); } - consolidateWith(t2) { - const e2 = Ne.textForStringWithAttributes("\n"), i2 = this.getTextWithoutBlockBreak().appendText(e2); - return this.copyWithText(i2.appendText(t2.text)); + consolidateWith(t3) { + const e2 = Ji.textForStringWithAttributes("\n"), i2 = this.getTextWithoutBlockBreak().appendText(e2); + return this.copyWithText(i2.appendText(t3.text)); } - splitAtOffset(t2) { + splitAtOffset(t3) { let e2, i2; - return 0 === t2 ? (e2 = null, i2 = this) : t2 === this.getLength() ? (e2 = this, i2 = null) : (e2 = this.copyWithText(this.text.getTextAtRange([0, t2])), i2 = this.copyWithText(this.text.getTextAtRange([t2, this.getLength()]))), [e2, i2]; + return 0 === t3 ? (e2 = null, i2 = this) : t3 === this.getLength() ? (e2 = this, i2 = null) : (e2 = this.copyWithText(this.text.getTextAtRange([0, t3])), i2 = this.copyWithText(this.text.getTextAtRange([t3, this.getLength()]))), [e2, i2]; } getBlockBreakPosition() { return this.text.getLength() - 1; } getTextWithoutBlockBreak() { - return qe(this.text) ? this.text.getTextAtRange([0, this.getBlockBreakPosition()]) : this.text.copy(); + return Zi(this.text) ? this.text.getTextAtRange([0, this.getBlockBreakPosition()]) : this.text.copy(); } - canBeGrouped(t2) { - return this.attributes[t2]; + canBeGrouped(t3) { + return this.attributes[t3]; } - canBeGroupedWith(t2, e2) { - const i2 = t2.getAttributes(), r2 = i2[e2], o2 = this.attributes[e2]; + canBeGroupedWith(t3, e2) { + const i2 = t3.getAttributes(), r2 = i2[e2], o2 = this.attributes[e2]; return o2 === r2 && !(false === gt(o2).group && !(() => { if (!ht) { ht = []; - for (const t3 in n) { - const { listAttribute: e3 } = n[t3]; + for (const t4 in n) { + const { listAttribute: e3 } = n[t4]; null != e3 && ht.push(e3); } } return ht; - })().includes(i2[e2 + 1])) && (this.getDirection() === t2.getDirection() || t2.isEmpty()); + })().includes(i2[e2 + 1])) && (this.getDirection() === t3.getDirection() || t3.isEmpty()); } }; - var Me = function(t2) { - return t2 = je(t2), t2 = Ue(t2); + var Gi = function(t3) { + return t3 = Yi(t3), t3 = Xi(t3); }; - var je = function(t2) { + var Yi = function(t3) { let e2 = false; - const i2 = t2.getPieces(); + const i2 = t3.getPieces(); let n2 = i2.slice(0, i2.length - 1); const r2 = i2[i2.length - 1]; - return r2 ? (n2 = n2.map((t3) => t3.isBlockBreak() ? (e2 = true, Ve(t3)) : t3), e2 ? new Ne([...n2, r2]) : t2) : t2; + return r2 ? (n2 = n2.map((t4) => t4.isBlockBreak() ? (e2 = true, Qi(t4)) : t4), e2 ? new Ji([...n2, r2]) : t3) : t3; }; - var We = Ne.textForStringWithAttributes("\n", { blockBreak: true }); - var Ue = function(t2) { - return qe(t2) ? t2 : t2.appendText(We); + var $i = Ji.textForStringWithAttributes("\n", { blockBreak: true }); + var Xi = function(t3) { + return Zi(t3) ? t3 : t3.appendText($i); }; - var qe = function(t2) { - const e2 = t2.getLength(); + var Zi = function(t3) { + const e2 = t3.getLength(); if (0 === e2) return false; - return t2.getTextAtRange([e2 - 1, e2]).isBlockBreak(); + return t3.getTextAtRange([e2 - 1, e2]).isBlockBreak(); }; - var Ve = (t2) => t2.copyWithoutAttribute("blockBreak"); - var He = function(t2) { - const { listAttribute: e2 } = gt(t2); - return e2 ? [e2, t2] : [t2]; + var Qi = (t3) => t3.copyWithoutAttribute("blockBreak"); + var tn = function(t3) { + const { listAttribute: e2 } = gt(t3); + return e2 ? [e2, t3] : [t3]; }; - var ze = (t2) => t2.slice(-1)[0]; - var _e = function(t2, e2) { - const i2 = t2.lastIndexOf(e2); - return -1 === i2 ? t2 : ot(t2, i2, 1); + var en = (t3) => t3.slice(-1)[0]; + var nn = function(t3, e2) { + const i2 = t3.lastIndexOf(e2); + return -1 === i2 ? t3 : ot(t3, i2, 1); }; - var Je = class extends nt { - static fromJSON(t2) { - return new this(Array.from(t2).map((t3) => Oe.fromJSON(t3))); + var rn = class extends nt { + static fromJSON(t3) { + return new this(Array.from(t3).map((t4) => Ki.fromJSON(t4))); } - static fromString(t2, e2) { - const i2 = Ne.textForStringWithAttributes(t2, e2); - return new this([new Oe(i2)]); + static fromString(t3, e2) { + const i2 = Ji.textForStringWithAttributes(t3, e2); + return new this([new Ki(i2)]); } constructor() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; - super(...arguments), 0 === t2.length && (t2 = [new Oe()]), this.blockList = Be.box(t2); + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; + super(...arguments), 0 === t3.length && (t3 = [new Ki()]), this.blockList = Vi.box(t3); } isEmpty() { - const t2 = this.getBlockAtIndex(0); - return 1 === this.blockList.length && t2.isEmpty() && !t2.hasAttributes(); + const t3 = this.getBlockAtIndex(0); + return 1 === this.blockList.length && t3.isEmpty() && !t3.hasAttributes(); } copy() { - const t2 = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).consolidateBlocks ? this.blockList.consolidate().toArray() : this.blockList.toArray(); - return new this.constructor(t2); + const t3 = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).consolidateBlocks ? this.blockList.consolidate().toArray() : this.blockList.toArray(); + return new this.constructor(t3); } - copyUsingObjectsFromDocument(t2) { - const e2 = new Yt(t2.getObjects()); + copyUsingObjectsFromDocument(t3) { + const e2 = new Xt(t3.getObjects()); return this.copyUsingObjectMap(e2); } - copyUsingObjectMap(t2) { - const e2 = this.getBlocks().map((e3) => t2.find(e3) || e3.copyUsingObjectMap(t2)); + copyUsingObjectMap(t3) { + const e2 = this.getBlocks().map((e3) => t3.find(e3) || e3.copyUsingObjectMap(t3)); return new this.constructor(e2); } copyWithBaseBlockAttributes() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; const e2 = this.getBlocks().map((e3) => { - const i2 = t2.concat(e3.getAttributes()); + const i2 = t3.concat(e3.getAttributes()); return e3.copyWithAttributes(i2); }); return new this.constructor(e2); } - replaceBlock(t2, e2) { - const i2 = this.blockList.indexOf(t2); + replaceBlock(t3, e2) { + const i2 = this.blockList.indexOf(t3); return -1 === i2 ? this : new this.constructor(this.blockList.replaceObjectAtIndex(e2, i2)); } - insertDocumentAtRange(t2, e2) { - const { blockList: i2 } = t2; - e2 = Lt(e2); + insertDocumentAtRange(t3, e2) { + const { blockList: i2 } = t3; + e2 = Tt(e2); let [n2] = e2; const { index: r2, offset: o2 } = this.locationFromPosition(n2); let s2 = this; const a2 = this.getBlockAtPosition(n2); - return Dt(e2) && a2.isEmpty() && !a2.hasAttributes() ? s2 = new this.constructor(s2.blockList.removeObjectAtIndex(r2)) : a2.getBlockBreakPosition() === o2 && n2++, s2 = s2.removeTextAtRange(e2), new this.constructor(s2.blockList.insertSplittableListAtPosition(i2, n2)); + return wt(e2) && a2.isEmpty() && !a2.hasAttributes() ? s2 = new this.constructor(s2.blockList.removeObjectAtIndex(r2)) : a2.getBlockBreakPosition() === o2 && n2++, s2 = s2.removeTextAtRange(e2), new this.constructor(s2.blockList.insertSplittableListAtPosition(i2, n2)); } - mergeDocumentAtRange(t2, e2) { + mergeDocumentAtRange(t3, e2) { let i2, n2; - e2 = Lt(e2); - const [r2] = e2, o2 = this.locationFromPosition(r2), s2 = this.getBlockAtIndex(o2.index).getAttributes(), a2 = t2.getBaseBlockAttributes(), l2 = s2.slice(-a2.length); + e2 = Tt(e2); + const [r2] = e2, o2 = this.locationFromPosition(r2), s2 = this.getBlockAtIndex(o2.index).getAttributes(), a2 = t3.getBaseBlockAttributes(), l2 = s2.slice(-a2.length); if (rt(a2, l2)) { const e3 = s2.slice(0, -a2.length); - i2 = t2.copyWithBaseBlockAttributes(e3); + i2 = t3.copyWithBaseBlockAttributes(e3); } else - i2 = t2.copy({ consolidateBlocks: true }).copyWithBaseBlockAttributes(s2); + i2 = t3.copy({ consolidateBlocks: true }).copyWithBaseBlockAttributes(s2); const c2 = i2.getBlockCount(), u2 = i2.getBlockAtIndex(0); if (rt(s2, u2.getAttributes())) { - const t3 = u2.getTextWithoutBlockBreak(); - if (n2 = this.insertTextAtRange(t3, e2), c2 > 1) { + const t4 = u2.getTextWithoutBlockBreak(); + if (n2 = this.insertTextAtRange(t4, e2), c2 > 1) { i2 = new this.constructor(i2.getBlocks().slice(1)); - const e3 = r2 + t3.getLength(); + const e3 = r2 + t4.getLength(); n2 = n2.insertDocumentAtRange(i2, e3); } } else n2 = this.insertDocumentAtRange(i2, e2); return n2; } - insertTextAtRange(t2, e2) { - e2 = Lt(e2); + insertTextAtRange(t3, e2) { + e2 = Tt(e2); const [i2] = e2, { index: n2, offset: r2 } = this.locationFromPosition(i2), o2 = this.removeTextAtRange(e2); - return new this.constructor(o2.blockList.editObjectAtIndex(n2, (e3) => e3.copyWithText(e3.text.insertTextAtPosition(t2, r2)))); + return new this.constructor(o2.blockList.editObjectAtIndex(n2, (e3) => e3.copyWithText(e3.text.insertTextAtPosition(t3, r2)))); } - removeTextAtRange(t2) { + removeTextAtRange(t3) { let e2; - t2 = Lt(t2); - const [i2, n2] = t2; - if (Dt(t2)) + t3 = Tt(t3); + const [i2, n2] = t3; + if (wt(t3)) return this; - const [r2, o2] = Array.from(this.locationRangeFromRange(t2)), s2 = r2.index, a2 = r2.offset, l2 = this.getBlockAtIndex(s2), c2 = o2.index, u2 = o2.offset, h2 = this.getBlockAtIndex(c2); + const [r2, o2] = Array.from(this.locationRangeFromRange(t3)), s2 = r2.index, a2 = r2.offset, l2 = this.getBlockAtIndex(s2), c2 = o2.index, u2 = o2.offset, h2 = this.getBlockAtIndex(c2); if (n2 - i2 == 1 && l2.getBlockBreakPosition() === a2 && h2.getBlockBreakPosition() !== u2 && "\n" === h2.text.getStringAtPosition(u2)) - e2 = this.blockList.editObjectAtIndex(c2, (t3) => t3.copyWithText(t3.text.removeTextAtRange([u2, u2 + 1]))); + e2 = this.blockList.editObjectAtIndex(c2, (t4) => t4.copyWithText(t4.text.removeTextAtRange([u2, u2 + 1]))); else { - let t3; + let t4; const i3 = l2.text.getTextAtRange([0, a2]), n3 = h2.text.getTextAtRange([u2, h2.getLength()]), r3 = i3.appendText(n3); - t3 = s2 !== c2 && 0 === a2 && l2.getAttributeLevel() >= h2.getAttributeLevel() ? h2.copyWithText(r3) : l2.copyWithText(r3); + t4 = s2 !== c2 && 0 === a2 && l2.getAttributeLevel() >= h2.getAttributeLevel() ? h2.copyWithText(r3) : l2.copyWithText(r3); const o3 = c2 + 1 - s2; - e2 = this.blockList.splice(s2, o3, t3); + e2 = this.blockList.splice(s2, o3, t4); } return new this.constructor(e2); } - moveTextFromRangeToPosition(t2, e2) { + moveTextFromRangeToPosition(t3, e2) { let i2; - t2 = Lt(t2); - const [n2, r2] = t2; + t3 = Tt(t3); + const [n2, r2] = t3; if (n2 <= e2 && e2 <= r2) return this; - let o2 = this.getDocumentAtRange(t2), s2 = this.removeTextAtRange(t2); + let o2 = this.getDocumentAtRange(t3), s2 = this.removeTextAtRange(t3); const a2 = n2 < e2; a2 && (e2 -= o2.getLength()); const [l2, ...c2] = o2.getBlocks(); return 0 === c2.length ? (i2 = l2.getTextWithoutBlockBreak(), a2 && (e2 += 1)) : i2 = l2.text, s2 = s2.insertTextAtRange(i2, e2), 0 === c2.length ? s2 : (o2 = new this.constructor(c2), e2 += i2.getLength(), s2.insertDocumentAtRange(o2, e2)); } - addAttributeAtRange(t2, e2, i2) { + addAttributeAtRange(t3, e2, i2) { let { blockList: n2 } = this; return this.eachBlockAtRange(i2, (i3, r2, o2) => n2 = n2.editObjectAtIndex(o2, function() { - return gt(t2) ? i3.addAttribute(t2, e2) : r2[0] === r2[1] ? i3 : i3.copyWithText(i3.text.addAttributeAtRange(t2, e2, r2)); + return gt(t3) ? i3.addAttribute(t3, e2) : r2[0] === r2[1] ? i3 : i3.copyWithText(i3.text.addAttributeAtRange(t3, e2, r2)); })), new this.constructor(n2); } - addAttribute(t2, e2) { + addAttribute(t3, e2) { let { blockList: i2 } = this; - return this.eachBlock((n2, r2) => i2 = i2.editObjectAtIndex(r2, () => n2.addAttribute(t2, e2))), new this.constructor(i2); + return this.eachBlock((n2, r2) => i2 = i2.editObjectAtIndex(r2, () => n2.addAttribute(t3, e2))), new this.constructor(i2); } - removeAttributeAtRange(t2, e2) { + removeAttributeAtRange(t3, e2) { let { blockList: i2 } = this; return this.eachBlockAtRange(e2, function(e3, n2, r2) { - gt(t2) ? i2 = i2.editObjectAtIndex(r2, () => e3.removeAttribute(t2)) : n2[0] !== n2[1] && (i2 = i2.editObjectAtIndex(r2, () => e3.copyWithText(e3.text.removeAttributeAtRange(t2, n2)))); + gt(t3) ? i2 = i2.editObjectAtIndex(r2, () => e3.removeAttribute(t3)) : n2[0] !== n2[1] && (i2 = i2.editObjectAtIndex(r2, () => e3.copyWithText(e3.text.removeAttributeAtRange(t3, n2)))); }), new this.constructor(i2); } - updateAttributesForAttachment(t2, e2) { + updateAttributesForAttachment(t3, e2) { const i2 = this.getRangeOfAttachment(e2), [n2] = Array.from(i2), { index: r2 } = this.locationFromPosition(n2), o2 = this.getTextAtIndex(r2); - return new this.constructor(this.blockList.editObjectAtIndex(r2, (i3) => i3.copyWithText(o2.updateAttributesForAttachment(t2, e2)))); + return new this.constructor(this.blockList.editObjectAtIndex(r2, (i3) => i3.copyWithText(o2.updateAttributesForAttachment(t3, e2)))); } - removeAttributeForAttachment(t2, e2) { + removeAttributeForAttachment(t3, e2) { const i2 = this.getRangeOfAttachment(e2); - return this.removeAttributeAtRange(t2, i2); + return this.removeAttributeAtRange(t3, i2); } - setHTMLAttributeAtPosition(t2, e2, i2) { - const n2 = this.getBlockAtPosition(t2), r2 = n2.addHTMLAttribute(e2, i2); + setHTMLAttributeAtPosition(t3, e2, i2) { + const n2 = this.getBlockAtPosition(t3), r2 = n2.addHTMLAttribute(e2, i2); return this.replaceBlock(n2, r2); } - insertBlockBreakAtRange(t2) { + insertBlockBreakAtRange(t3) { let e2; - t2 = Lt(t2); - const [i2] = t2, { offset: n2 } = this.locationFromPosition(i2), r2 = this.removeTextAtRange(t2); - return 0 === n2 && (e2 = [new Oe()]), new this.constructor(r2.blockList.insertSplittableListAtPosition(new Be(e2), i2)); + t3 = Tt(t3); + const [i2] = t3, { offset: n2 } = this.locationFromPosition(i2), r2 = this.removeTextAtRange(t3); + return 0 === n2 && (e2 = [new Ki()]), new this.constructor(r2.blockList.insertSplittableListAtPosition(new Vi(e2), i2)); } - applyBlockAttributeAtRange(t2, e2, i2) { + applyBlockAttributeAtRange(t3, e2, i2) { const n2 = this.expandRangeToLineBreaksAndSplitBlocks(i2); let r2 = n2.document; i2 = n2.range; - const o2 = gt(t2); + const o2 = gt(t3); if (o2.listAttribute) { - r2 = r2.removeLastListAttributeAtRange(i2, { exceptAttributeName: t2 }); + r2 = r2.removeLastListAttributeAtRange(i2, { exceptAttributeName: t3 }); const e3 = r2.convertLineBreaksToBlockBreaksInRange(i2); r2 = e3.document, i2 = e3.range; } else r2 = o2.exclusive ? r2.removeBlockAttributesAtRange(i2) : o2.terminal ? r2.removeLastTerminalAttributeAtRange(i2) : r2.consolidateBlocksAtRange(i2); - return r2.addAttributeAtRange(t2, e2, i2); + return r2.addAttributeAtRange(t3, e2, i2); } - removeLastListAttributeAtRange(t2) { + removeLastListAttributeAtRange(t3) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, { blockList: i2 } = this; - return this.eachBlockAtRange(t2, function(t3, n2, r2) { - const o2 = t3.getLastAttribute(); - o2 && gt(o2).listAttribute && o2 !== e2.exceptAttributeName && (i2 = i2.editObjectAtIndex(r2, () => t3.removeAttribute(o2))); + return this.eachBlockAtRange(t3, function(t4, n2, r2) { + const o2 = t4.getLastAttribute(); + o2 && gt(o2).listAttribute && o2 !== e2.exceptAttributeName && (i2 = i2.editObjectAtIndex(r2, () => t4.removeAttribute(o2))); }), new this.constructor(i2); } - removeLastTerminalAttributeAtRange(t2) { + removeLastTerminalAttributeAtRange(t3) { let { blockList: e2 } = this; - return this.eachBlockAtRange(t2, function(t3, i2, n2) { - const r2 = t3.getLastAttribute(); - r2 && gt(r2).terminal && (e2 = e2.editObjectAtIndex(n2, () => t3.removeAttribute(r2))); + return this.eachBlockAtRange(t3, function(t4, i2, n2) { + const r2 = t4.getLastAttribute(); + r2 && gt(r2).terminal && (e2 = e2.editObjectAtIndex(n2, () => t4.removeAttribute(r2))); }), new this.constructor(e2); } - removeBlockAttributesAtRange(t2) { + removeBlockAttributesAtRange(t3) { let { blockList: e2 } = this; - return this.eachBlockAtRange(t2, function(t3, i2, n2) { - t3.hasAttributes() && (e2 = e2.editObjectAtIndex(n2, () => t3.copyWithoutAttributes())); + return this.eachBlockAtRange(t3, function(t4, i2, n2) { + t4.hasAttributes() && (e2 = e2.editObjectAtIndex(n2, () => t4.copyWithoutAttributes())); }), new this.constructor(e2); } - expandRangeToLineBreaksAndSplitBlocks(t2) { + expandRangeToLineBreaksAndSplitBlocks(t3) { let e2; - t2 = Lt(t2); - let [i2, n2] = t2; + t3 = Tt(t3); + let [i2, n2] = t3; const r2 = this.locationFromPosition(i2), o2 = this.locationFromPosition(n2); let s2 = this; const a2 = s2.getBlockAtIndex(r2.index); if (r2.offset = a2.findLineBreakInDirectionFromPosition("backward", r2.offset), null != r2.offset && (e2 = s2.positionFromLocation(r2), s2 = s2.insertBlockBreakAtRange([e2, e2 + 1]), o2.index += 1, o2.offset -= s2.getBlockAtIndex(r2.index).getLength(), r2.index += 1), r2.offset = 0, 0 === o2.offset && o2.index > r2.index) o2.index -= 1, o2.offset = s2.getBlockAtIndex(o2.index).getBlockBreakPosition(); else { - const t3 = s2.getBlockAtIndex(o2.index); - "\n" === t3.text.getStringAtRange([o2.offset - 1, o2.offset]) ? o2.offset -= 1 : o2.offset = t3.findLineBreakInDirectionFromPosition("forward", o2.offset), o2.offset !== t3.getBlockBreakPosition() && (e2 = s2.positionFromLocation(o2), s2 = s2.insertBlockBreakAtRange([e2, e2 + 1])); + const t4 = s2.getBlockAtIndex(o2.index); + "\n" === t4.text.getStringAtRange([o2.offset - 1, o2.offset]) ? o2.offset -= 1 : o2.offset = t4.findLineBreakInDirectionFromPosition("forward", o2.offset), o2.offset !== t4.getBlockBreakPosition() && (e2 = s2.positionFromLocation(o2), s2 = s2.insertBlockBreakAtRange([e2, e2 + 1])); } - return i2 = s2.positionFromLocation(r2), n2 = s2.positionFromLocation(o2), { document: s2, range: t2 = Lt([i2, n2]) }; + return i2 = s2.positionFromLocation(r2), n2 = s2.positionFromLocation(o2), { document: s2, range: t3 = Tt([i2, n2]) }; } - convertLineBreaksToBlockBreaksInRange(t2) { - t2 = Lt(t2); - let [e2] = t2; - const i2 = this.getStringAtRange(t2).slice(0, -1); + convertLineBreaksToBlockBreaksInRange(t3) { + t3 = Tt(t3); + let [e2] = t3; + const i2 = this.getStringAtRange(t3).slice(0, -1); let n2 = this; - return i2.replace(/.*?\n/g, function(t3) { - e2 += t3.length, n2 = n2.insertBlockBreakAtRange([e2 - 1, e2]); - }), { document: n2, range: t2 }; + return i2.replace(/.*?\n/g, function(t4) { + e2 += t4.length, n2 = n2.insertBlockBreakAtRange([e2 - 1, e2]); + }), { document: n2, range: t3 }; } - consolidateBlocksAtRange(t2) { - t2 = Lt(t2); - const [e2, i2] = t2, n2 = this.locationFromPosition(e2).index, r2 = this.locationFromPosition(i2).index; + consolidateBlocksAtRange(t3) { + t3 = Tt(t3); + const [e2, i2] = t3, n2 = this.locationFromPosition(e2).index, r2 = this.locationFromPosition(i2).index; return new this.constructor(this.blockList.consolidateFromIndexToIndex(n2, r2)); } - getDocumentAtRange(t2) { - t2 = Lt(t2); - const e2 = this.blockList.getSplittableListInRange(t2).toArray(); + getDocumentAtRange(t3) { + t3 = Tt(t3); + const e2 = this.blockList.getSplittableListInRange(t3).toArray(); return new this.constructor(e2); } - getStringAtRange(t2) { + getStringAtRange(t3) { let e2; - const i2 = t2 = Lt(t2); - return i2[i2.length - 1] !== this.getLength() && (e2 = -1), this.getDocumentAtRange(t2).toString().slice(0, e2); + const i2 = t3 = Tt(t3); + return i2[i2.length - 1] !== this.getLength() && (e2 = -1), this.getDocumentAtRange(t3).toString().slice(0, e2); } - getBlockAtIndex(t2) { - return this.blockList.getObjectAtIndex(t2); + getBlockAtIndex(t3) { + return this.blockList.getObjectAtIndex(t3); } - getBlockAtPosition(t2) { - const { index: e2 } = this.locationFromPosition(t2); + getBlockAtPosition(t3) { + const { index: e2 } = this.locationFromPosition(t3); return this.getBlockAtIndex(e2); } - getTextAtIndex(t2) { + getTextAtIndex(t3) { var e2; - return null === (e2 = this.getBlockAtIndex(t2)) || void 0 === e2 ? void 0 : e2.text; + return null === (e2 = this.getBlockAtIndex(t3)) || void 0 === e2 ? void 0 : e2.text; } - getTextAtPosition(t2) { - const { index: e2 } = this.locationFromPosition(t2); + getTextAtPosition(t3) { + const { index: e2 } = this.locationFromPosition(t3); return this.getTextAtIndex(e2); } - getPieceAtPosition(t2) { - const { index: e2, offset: i2 } = this.locationFromPosition(t2); + getPieceAtPosition(t3) { + const { index: e2, offset: i2 } = this.locationFromPosition(t3); return this.getTextAtIndex(e2).getPieceAtPosition(i2); } - getCharacterAtPosition(t2) { - const { index: e2, offset: i2 } = this.locationFromPosition(t2); + getCharacterAtPosition(t3) { + const { index: e2, offset: i2 } = this.locationFromPosition(t3); return this.getTextAtIndex(e2).getStringAtRange([i2, i2 + 1]); } getLength() { @@ -10461,18 +10899,18 @@ getEditCount() { return this.editCount; } - eachBlock(t2) { - return this.blockList.eachObject(t2); + eachBlock(t3) { + return this.blockList.eachObject(t3); } - eachBlockAtRange(t2, e2) { + eachBlockAtRange(t3, e2) { let i2, n2; - t2 = Lt(t2); - const [r2, o2] = t2, s2 = this.locationFromPosition(r2), a2 = this.locationFromPosition(o2); + t3 = Tt(t3); + const [r2, o2] = t3, s2 = this.locationFromPosition(r2), a2 = this.locationFromPosition(o2); if (s2.index === a2.index) return i2 = this.getBlockAtIndex(s2.index), n2 = [s2.offset, a2.offset], e2(i2, n2, s2.index); - for (let t3 = s2.index; t3 <= a2.index; t3++) - if (i2 = this.getBlockAtIndex(t3), i2) { - switch (t3) { + for (let t4 = s2.index; t4 <= a2.index; t4++) + if (i2 = this.getBlockAtIndex(t4), i2) { + switch (t4) { case s2.index: n2 = [s2.offset, i2.text.getLength()]; break; @@ -10482,146 +10920,146 @@ default: n2 = [0, i2.text.getLength()]; } - e2(i2, n2, t3); + e2(i2, n2, t4); } } - getCommonAttributesAtRange(t2) { - t2 = Lt(t2); - const [e2] = t2; - if (Dt(t2)) + getCommonAttributesAtRange(t3) { + t3 = Tt(t3); + const [e2] = t3; + if (wt(t3)) return this.getCommonAttributesAtPosition(e2); { const e3 = [], i2 = []; - return this.eachBlockAtRange(t2, function(t3, n2) { + return this.eachBlockAtRange(t3, function(t4, n2) { if (n2[0] !== n2[1]) - return e3.push(t3.text.getCommonAttributesAtRange(n2)), i2.push(Ke(t3)); - }), zt.fromCommonAttributesOfObjects(e3).merge(zt.fromCommonAttributesOfObjects(i2)).toObject(); + return e3.push(t4.text.getCommonAttributesAtRange(n2)), i2.push(on(t4)); + }), qt.fromCommonAttributesOfObjects(e3).merge(qt.fromCommonAttributesOfObjects(i2)).toObject(); } } - getCommonAttributesAtPosition(t2) { + getCommonAttributesAtPosition(t3) { let e2, i2; - const { index: n2, offset: r2 } = this.locationFromPosition(t2), o2 = this.getBlockAtIndex(n2); + const { index: n2, offset: r2 } = this.locationFromPosition(t3), o2 = this.getBlockAtIndex(n2); if (!o2) return {}; - const s2 = Ke(o2), a2 = o2.text.getAttributesAtPosition(r2), l2 = o2.text.getAttributesAtPosition(r2 - 1), c2 = Object.keys(W).filter((t3) => W[t3].inheritable); + const s2 = on(o2), a2 = o2.text.getAttributesAtPosition(r2), l2 = o2.text.getAttributesAtPosition(r2 - 1), c2 = Object.keys(j).filter((t4) => j[t4].inheritable); for (e2 in l2) i2 = l2[e2], (i2 === a2[e2] || c2.includes(e2)) && (s2[e2] = i2); return s2; } - getRangeOfCommonAttributeAtPosition(t2, e2) { - const { index: i2, offset: n2 } = this.locationFromPosition(e2), r2 = this.getTextAtIndex(i2), [o2, s2] = Array.from(r2.getExpandedRangeForAttributeAtOffset(t2, n2)), a2 = this.positionFromLocation({ index: i2, offset: o2 }), l2 = this.positionFromLocation({ index: i2, offset: s2 }); - return Lt([a2, l2]); + getRangeOfCommonAttributeAtPosition(t3, e2) { + const { index: i2, offset: n2 } = this.locationFromPosition(e2), r2 = this.getTextAtIndex(i2), [o2, s2] = Array.from(r2.getExpandedRangeForAttributeAtOffset(t3, n2)), a2 = this.positionFromLocation({ index: i2, offset: o2 }), l2 = this.positionFromLocation({ index: i2, offset: s2 }); + return Tt([a2, l2]); } getBaseBlockAttributes() { - let t2 = this.getBlockAtIndex(0).getAttributes(); + let t3 = this.getBlockAtIndex(0).getAttributes(); for (let e2 = 1; e2 < this.getBlockCount(); e2++) { - const i2 = this.getBlockAtIndex(e2).getAttributes(), n2 = Math.min(t2.length, i2.length); - t2 = (() => { + const i2 = this.getBlockAtIndex(e2).getAttributes(), n2 = Math.min(t3.length, i2.length); + t3 = (() => { const e3 = []; - for (let r2 = 0; r2 < n2 && i2[r2] === t2[r2]; r2++) + for (let r2 = 0; r2 < n2 && i2[r2] === t3[r2]; r2++) e3.push(i2[r2]); return e3; })(); } - return t2; + return t3; } - getAttachmentById(t2) { + getAttachmentById(t3) { for (const e2 of this.getAttachments()) - if (e2.id === t2) + if (e2.id === t3) return e2; } getAttachmentPieces() { - let t2 = []; + let t3 = []; return this.blockList.eachObject((e2) => { let { text: i2 } = e2; - return t2 = t2.concat(i2.getAttachmentPieces()); - }), t2; + return t3 = t3.concat(i2.getAttachmentPieces()); + }), t3; } getAttachments() { - return this.getAttachmentPieces().map((t2) => t2.attachment); + return this.getAttachmentPieces().map((t3) => t3.attachment); } - getRangeOfAttachment(t2) { + getRangeOfAttachment(t3) { let e2 = 0; const i2 = this.blockList.toArray(); for (let n2 = 0; n2 < i2.length; n2++) { - const { text: r2 } = i2[n2], o2 = r2.getRangeOfAttachment(t2); + const { text: r2 } = i2[n2], o2 = r2.getRangeOfAttachment(t3); if (o2) - return Lt([e2 + o2[0], e2 + o2[1]]); + return Tt([e2 + o2[0], e2 + o2[1]]); e2 += r2.getLength(); } } - getLocationRangeOfAttachment(t2) { - const e2 = this.getRangeOfAttachment(t2); + getLocationRangeOfAttachment(t3) { + const e2 = this.getRangeOfAttachment(t3); return this.locationRangeFromRange(e2); } - getAttachmentPieceForAttachment(t2) { + getAttachmentPieceForAttachment(t3) { for (const e2 of this.getAttachmentPieces()) - if (e2.attachment === t2) + if (e2.attachment === t3) return e2; } - findRangesForBlockAttribute(t2) { + findRangesForBlockAttribute(t3) { let e2 = 0; const i2 = []; return this.getBlocks().forEach((n2) => { const r2 = n2.getLength(); - n2.hasAttribute(t2) && i2.push([e2, e2 + r2]), e2 += r2; + n2.hasAttribute(t3) && i2.push([e2, e2 + r2]), e2 += r2; }), i2; } - findRangesForTextAttribute(t2) { + findRangesForTextAttribute(t3) { let { withValue: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i2 = 0, n2 = []; const r2 = []; return this.getPieces().forEach((o2) => { const s2 = o2.getLength(); (function(i3) { - return e2 ? i3.getAttribute(t2) === e2 : i3.hasAttribute(t2); + return e2 ? i3.getAttribute(t3) === e2 : i3.hasAttribute(t3); })(o2) && (n2[1] === i2 ? n2[1] = i2 + s2 : r2.push(n2 = [i2, i2 + s2])), i2 += s2; }), r2; } - locationFromPosition(t2) { - const e2 = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, t2)); + locationFromPosition(t3) { + const e2 = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, t3)); if (null != e2.index) return e2; { - const t3 = this.getBlocks(); - return { index: t3.length - 1, offset: t3[t3.length - 1].getLength() }; + const t4 = this.getBlocks(); + return { index: t4.length - 1, offset: t4[t4.length - 1].getLength() }; } } - positionFromLocation(t2) { - return this.blockList.findPositionAtIndexAndOffset(t2.index, t2.offset); + positionFromLocation(t3) { + return this.blockList.findPositionAtIndexAndOffset(t3.index, t3.offset); } - locationRangeFromPosition(t2) { - return Lt(this.locationFromPosition(t2)); + locationRangeFromPosition(t3) { + return Tt(this.locationFromPosition(t3)); } - locationRangeFromRange(t2) { - if (!(t2 = Lt(t2))) + locationRangeFromRange(t3) { + if (!(t3 = Tt(t3))) return; - const [e2, i2] = Array.from(t2), n2 = this.locationFromPosition(e2), r2 = this.locationFromPosition(i2); - return Lt([n2, r2]); + const [e2, i2] = Array.from(t3), n2 = this.locationFromPosition(e2), r2 = this.locationFromPosition(i2); + return Tt([n2, r2]); } - rangeFromLocationRange(t2) { + rangeFromLocationRange(t3) { let e2; - t2 = Lt(t2); - const i2 = this.positionFromLocation(t2[0]); - return Dt(t2) || (e2 = this.positionFromLocation(t2[1])), Lt([i2, e2]); + t3 = Tt(t3); + const i2 = this.positionFromLocation(t3[0]); + return wt(t3) || (e2 = this.positionFromLocation(t3[1])), Tt([i2, e2]); } - isEqualTo(t2) { - return this.blockList.isEqualTo(null == t2 ? void 0 : t2.blockList); + isEqualTo(t3) { + return this.blockList.isEqualTo(null == t3 ? void 0 : t3.blockList); } getTexts() { - return this.getBlocks().map((t2) => t2.text); + return this.getBlocks().map((t3) => t3.text); } getPieces() { - const t2 = []; + const t3 = []; return Array.from(this.getTexts()).forEach((e2) => { - t2.push(...Array.from(e2.getPieces() || [])); - }), t2; + t3.push(...Array.from(e2.getPieces() || [])); + }), t3; } getObjects() { return this.getBlocks().concat(this.getTexts()).concat(this.getPieces()); } toSerializableDocument() { - const t2 = []; - return this.blockList.eachObject((e2) => t2.push(e2.copyWithText(e2.text.toSerializableText()))), new this.constructor(t2); + const t3 = []; + return this.blockList.eachObject((e2) => t3.push(e2.copyWithText(e2.text.toSerializableText()))), new this.constructor(t3); } toString() { return this.blockList.toString(); @@ -10630,93 +11068,93 @@ return this.blockList.toJSON(); } toConsole() { - return JSON.stringify(this.blockList.toArray().map((t2) => JSON.parse(t2.text.toConsole()))); + return JSON.stringify(this.blockList.toArray().map((t3) => JSON.parse(t3.text.toConsole()))); } }; - var Ke = function(t2) { - const e2 = {}, i2 = t2.getLastAttribute(); + var on = function(t3) { + const e2 = {}, i2 = t3.getLastAttribute(); return i2 && (e2[i2] = true), e2; }; - var Ge = function(t2) { + var sn = function(t3) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - return { string: t2 = Wt(t2), attributes: e2, type: "string" }; + return { string: t3 = jt(t3), attributes: e2, type: "string" }; }; - var $e = (t2, e2) => { + var an = (t3, e2) => { try { - return JSON.parse(t2.getAttribute("data-trix-".concat(e2))); - } catch (t3) { + return JSON.parse(t3.getAttribute("data-trix-".concat(e2))); + } catch (t4) { return {}; } }; - var Xe = class extends H { - static parse(t2, e2) { - const i2 = new this(t2, e2); + var ln = class extends z { + static parse(t3, e2) { + const i2 = new this(t3, e2); return i2.parse(), i2; } - constructor(t2) { + constructor(t3) { let { referenceElement: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - super(...arguments), this.html = t2, this.referenceElement = e2, this.blocks = [], this.blockElements = [], this.processedElements = []; + super(...arguments), this.html = t3, this.referenceElement = e2, this.blocks = [], this.blockElements = [], this.processedElements = []; } getDocument() { - return Je.fromJSON(this.blocks); + return rn.fromJSON(this.blocks); } parse() { try { - this.createHiddenContainer(), se.setHTML(this.containerElement, this.html); - const t2 = R(this.containerElement, { usingFilter: ti }); - for (; t2.nextNode(); ) - this.processNode(t2.currentNode); + this.createHiddenContainer(), ci.setHTML(this.containerElement, this.html); + const t3 = S(this.containerElement, { usingFilter: dn }); + for (; t3.nextNode(); ) + this.processNode(t3.currentNode); return this.translateBlockElementMarginsToNewlines(); } finally { this.removeHiddenContainer(); } } createHiddenContainer() { - return this.referenceElement ? (this.containerElement = this.referenceElement.cloneNode(false), this.containerElement.removeAttribute("id"), this.containerElement.setAttribute("data-trix-internal", ""), this.containerElement.style.display = "none", this.referenceElement.parentNode.insertBefore(this.containerElement, this.referenceElement.nextSibling)) : (this.containerElement = S({ tagName: "div", style: { display: "none" } }), document.body.appendChild(this.containerElement)); + return this.referenceElement ? (this.containerElement = this.referenceElement.cloneNode(false), this.containerElement.removeAttribute("id"), this.containerElement.setAttribute("data-trix-internal", ""), this.containerElement.style.display = "none", this.referenceElement.parentNode.insertBefore(this.containerElement, this.referenceElement.nextSibling)) : (this.containerElement = k({ tagName: "div", style: { display: "none" } }), document.body.appendChild(this.containerElement)); } removeHiddenContainer() { - return k(this.containerElement); + return E(this.containerElement); } - processNode(t2) { - switch (t2.nodeType) { + processNode(t3) { + switch (t3.nodeType) { case Node.TEXT_NODE: - if (!this.isInsignificantTextNode(t2)) - return this.appendBlockForTextNode(t2), this.processTextNode(t2); + if (!this.isInsignificantTextNode(t3)) + return this.appendBlockForTextNode(t3), this.processTextNode(t3); break; case Node.ELEMENT_NODE: - return this.appendBlockForElement(t2), this.processElement(t2); + return this.appendBlockForElement(t3), this.processElement(t3); } } - appendBlockForTextNode(t2) { - const e2 = t2.parentNode; - if (e2 === this.currentBlockElement && this.isBlockElement(t2.previousSibling)) + appendBlockForTextNode(t3) { + const e2 = t3.parentNode; + if (e2 === this.currentBlockElement && this.isBlockElement(t3.previousSibling)) return this.appendStringWithAttributes("\n"); if (e2 === this.containerElement || this.isBlockElement(e2)) { var i2; - const t3 = this.getBlockAttributes(e2), n2 = this.getBlockHTMLAttributes(e2); - rt(t3, null === (i2 = this.currentBlock) || void 0 === i2 ? void 0 : i2.attributes) || (this.currentBlock = this.appendBlockForAttributesWithElement(t3, e2, n2), this.currentBlockElement = e2); + const t4 = this.getBlockAttributes(e2), n2 = this.getBlockHTMLAttributes(e2); + rt(t4, null === (i2 = this.currentBlock) || void 0 === i2 ? void 0 : i2.attributes) || (this.currentBlock = this.appendBlockForAttributesWithElement(t4, e2, n2), this.currentBlockElement = e2); } } - appendBlockForElement(t2) { - const e2 = this.isBlockElement(t2), i2 = y(this.currentBlockElement, t2); - if (e2 && !this.isBlockElement(t2.firstChild)) { - if (!this.isInsignificantTextNode(t2.firstChild) || !this.isBlockElement(t2.firstElementChild)) { - const e3 = this.getBlockAttributes(t2), n2 = this.getBlockHTMLAttributes(t2); - if (t2.firstChild) { + appendBlockForElement(t3) { + const e2 = this.isBlockElement(t3), i2 = x(this.currentBlockElement, t3); + if (e2 && !this.isBlockElement(t3.firstChild)) { + if (!this.isInsignificantTextNode(t3.firstChild) || !this.isBlockElement(t3.firstElementChild)) { + const e3 = this.getBlockAttributes(t3), n2 = this.getBlockHTMLAttributes(t3); + if (t3.firstChild) { if (i2 && rt(e3, this.currentBlock.attributes)) return this.appendStringWithAttributes("\n"); - this.currentBlock = this.appendBlockForAttributesWithElement(e3, t2, n2), this.currentBlockElement = t2; + this.currentBlock = this.appendBlockForAttributesWithElement(e3, t3, n2), this.currentBlockElement = t3; } } } else if (this.currentBlockElement && !i2 && !e2) { - const e3 = this.findParentBlockElement(t2); + const e3 = this.findParentBlockElement(t3); if (e3) return this.appendBlockForElement(e3); this.currentBlock = this.appendEmptyBlock(), this.currentBlockElement = null; } } - findParentBlockElement(t2) { - let { parentElement: e2 } = t2; + findParentBlockElement(t3) { + let { parentElement: e2 } = t3; for (; e2 && e2 !== this.containerElement; ) { if (this.isBlockElement(e2) && this.blockElements.includes(e2)) return e2; @@ -10724,89 +11162,89 @@ } return null; } - processTextNode(t2) { - let e2 = t2.data; + processTextNode(t3) { + let e2 = t3.data; var i2; - Ye(t2.parentNode) || (e2 = qt(e2), ni(null === (i2 = t2.previousSibling) || void 0 === i2 ? void 0 : i2.textContent) && (e2 = ei(e2))); - return this.appendStringWithAttributes(e2, this.getTextAttributes(t2.parentNode)); + cn(t3.parentNode) || (e2 = Ut(e2), pn(null === (i2 = t3.previousSibling) || void 0 === i2 ? void 0 : i2.textContent) && (e2 = gn(e2))); + return this.appendStringWithAttributes(e2, this.getTextAttributes(t3.parentNode)); } - processElement(t2) { + processElement(t3) { let e2; - if (I(t2)) { - if (e2 = $e(t2, "attachment"), Object.keys(e2).length) { - const i2 = this.getTextAttributes(t2); - this.appendAttachmentWithAttributes(e2, i2), t2.innerHTML = ""; + if (P(t3)) { + if (e2 = an(t3, "attachment"), Object.keys(e2).length) { + const i2 = this.getTextAttributes(t3); + this.appendAttachmentWithAttributes(e2, i2), t3.innerHTML = ""; } - return this.processedElements.push(t2); + return this.processedElements.push(t3); } - switch (E(t2)) { + switch (R(t3)) { case "br": - return this.isExtraBR(t2) || this.isBlockElement(t2.nextSibling) || this.appendStringWithAttributes("\n", this.getTextAttributes(t2)), this.processedElements.push(t2); + return this.isExtraBR(t3) || this.isBlockElement(t3.nextSibling) || this.appendStringWithAttributes("\n", this.getTextAttributes(t3)), this.processedElements.push(t3); case "img": - e2 = { url: t2.getAttribute("src"), contentType: "image" }; - const i2 = ((t3) => { - const e3 = t3.getAttribute("width"), i3 = t3.getAttribute("height"), n2 = {}; + e2 = { url: t3.getAttribute("src"), contentType: "image" }; + const i2 = ((t4) => { + const e3 = t4.getAttribute("width"), i3 = t4.getAttribute("height"), n2 = {}; return e3 && (n2.width = parseInt(e3, 10)), i3 && (n2.height = parseInt(i3, 10)), n2; - })(t2); - for (const t3 in i2) { - const n2 = i2[t3]; - e2[t3] = n2; + })(t3); + for (const t4 in i2) { + const n2 = i2[t4]; + e2[t4] = n2; } - return this.appendAttachmentWithAttributes(e2, this.getTextAttributes(t2)), this.processedElements.push(t2); + return this.appendAttachmentWithAttributes(e2, this.getTextAttributes(t3)), this.processedElements.push(t3); case "tr": - if (this.needsTableSeparator(t2)) - return this.appendStringWithAttributes(j.tableRowSeparator); + if (this.needsTableSeparator(t3)) + return this.appendStringWithAttributes(_.tableRowSeparator); break; case "td": - if (this.needsTableSeparator(t2)) - return this.appendStringWithAttributes(j.tableCellSeparator); + if (this.needsTableSeparator(t3)) + return this.appendStringWithAttributes(_.tableCellSeparator); } } - appendBlockForAttributesWithElement(t2, e2) { + appendBlockForAttributesWithElement(t3, e2) { let i2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; this.blockElements.push(e2); const n2 = function() { return { text: [], attributes: arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, htmlAttributes: arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} }; - }(t2, i2); + }(t3, i2); return this.blocks.push(n2), n2; } appendEmptyBlock() { return this.appendBlockForAttributesWithElement([], null); } - appendStringWithAttributes(t2, e2) { - return this.appendPiece(Ge(t2, e2)); + appendStringWithAttributes(t3, e2) { + return this.appendPiece(sn(t3, e2)); } - appendAttachmentWithAttributes(t2, e2) { - return this.appendPiece(function(t3) { - return { attachment: t3, attributes: arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, type: "attachment" }; - }(t2, e2)); + appendAttachmentWithAttributes(t3, e2) { + return this.appendPiece(function(t4) { + return { attachment: t4, attributes: arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, type: "attachment" }; + }(t3, e2)); } - appendPiece(t2) { - return 0 === this.blocks.length && this.appendEmptyBlock(), this.blocks[this.blocks.length - 1].text.push(t2); + appendPiece(t3) { + return 0 === this.blocks.length && this.appendEmptyBlock(), this.blocks[this.blocks.length - 1].text.push(t3); } - appendStringToTextAtIndex(t2, e2) { + appendStringToTextAtIndex(t3, e2) { const { text: i2 } = this.blocks[e2], n2 = i2[i2.length - 1]; if ("string" !== (null == n2 ? void 0 : n2.type)) - return i2.push(Ge(t2)); - n2.string += t2; + return i2.push(sn(t3)); + n2.string += t3; } - prependStringToTextAtIndex(t2, e2) { + prependStringToTextAtIndex(t3, e2) { const { text: i2 } = this.blocks[e2], n2 = i2[0]; if ("string" !== (null == n2 ? void 0 : n2.type)) - return i2.unshift(Ge(t2)); - n2.string = t2 + n2.string; + return i2.unshift(sn(t3)); + n2.string = t3 + n2.string; } - getTextAttributes(t2) { + getTextAttributes(t3) { let e2; const i2 = {}; - for (const n2 in W) { - const r2 = W[n2]; - if (r2.tagName && A(t2, { matchingSelector: r2.tagName, untilNode: this.containerElement })) + for (const n2 in j) { + const r2 = j[n2]; + if (r2.tagName && A(t3, { matchingSelector: r2.tagName, untilNode: this.containerElement })) i2[n2] = true; else if (r2.parser) { - if (e2 = r2.parser(t2), e2) { + if (e2 = r2.parser(t3), e2) { let o2 = false; - for (const i3 of this.findBlockElementAncestors(t2)) + for (const i3 of this.findBlockElementAncestors(t3)) if (r2.parser(i3) === e2) { o2 = true; break; @@ -10814,185 +11252,185 @@ o2 || (i2[n2] = e2); } } else - r2.styleProperty && (e2 = t2.style[r2.styleProperty], e2 && (i2[n2] = e2)); + r2.styleProperty && (e2 = t3.style[r2.styleProperty], e2 && (i2[n2] = e2)); } - if (I(t2)) { - const n2 = $e(t2, "attributes"); - for (const t3 in n2) - e2 = n2[t3], i2[t3] = e2; + if (P(t3)) { + const n2 = an(t3, "attributes"); + for (const t4 in n2) + e2 = n2[t4], i2[t4] = e2; } return i2; } - getBlockAttributes(t2) { + getBlockAttributes(t3) { const e2 = []; - for (; t2 && t2 !== this.containerElement; ) { + for (; t3 && t3 !== this.containerElement; ) { for (const r2 in n) { const o2 = n[r2]; var i2; if (false !== o2.parse) { - if (E(t2) === o2.tagName) - (null !== (i2 = o2.test) && void 0 !== i2 && i2.call(o2, t2) || !o2.test) && (e2.push(r2), o2.listAttribute && e2.push(o2.listAttribute)); + if (R(t3) === o2.tagName) + (null !== (i2 = o2.test) && void 0 !== i2 && i2.call(o2, t3) || !o2.test) && (e2.push(r2), o2.listAttribute && e2.push(o2.listAttribute)); } } - t2 = t2.parentNode; + t3 = t3.parentNode; } return e2.reverse(); } - getBlockHTMLAttributes(t2) { - const e2 = {}, i2 = Object.values(n).find((e3) => e3.tagName === E(t2)); + getBlockHTMLAttributes(t3) { + const e2 = {}, i2 = Object.values(n).find((e3) => e3.tagName === R(t3)); return ((null == i2 ? void 0 : i2.htmlAttributes) || []).forEach((i3) => { - t2.hasAttribute(i3) && (e2[i3] = t2.getAttribute(i3)); + t3.hasAttribute(i3) && (e2[i3] = t3.getAttribute(i3)); }), e2; } - findBlockElementAncestors(t2) { + findBlockElementAncestors(t3) { const e2 = []; - for (; t2 && t2 !== this.containerElement; ) { - const i2 = E(t2); - D().includes(i2) && e2.push(t2), t2 = t2.parentNode; + for (; t3 && t3 !== this.containerElement; ) { + const i2 = R(t3); + w().includes(i2) && e2.push(t3), t3 = t3.parentNode; } return e2; } - isBlockElement(t2) { - if ((null == t2 ? void 0 : t2.nodeType) === Node.ELEMENT_NODE && !I(t2) && !A(t2, { matchingSelector: "td", untilNode: this.containerElement })) - return D().includes(E(t2)) || "block" === window.getComputedStyle(t2).display; + isBlockElement(t3) { + if ((null == t3 ? void 0 : t3.nodeType) === Node.ELEMENT_NODE && !P(t3) && !A(t3, { matchingSelector: "td", untilNode: this.containerElement })) + return w().includes(R(t3)) || "block" === window.getComputedStyle(t3).display; } - isInsignificantTextNode(t2) { - if ((null == t2 ? void 0 : t2.nodeType) !== Node.TEXT_NODE) + isInsignificantTextNode(t3) { + if ((null == t3 ? void 0 : t3.nodeType) !== Node.TEXT_NODE) return; - if (!ii(t2.data)) + if (!mn(t3.data)) return; - const { parentNode: e2, previousSibling: i2, nextSibling: n2 } = t2; - return Qe(e2.previousSibling) && !this.isBlockElement(e2.previousSibling) || Ye(e2) ? void 0 : !i2 || this.isBlockElement(i2) || !n2 || this.isBlockElement(n2); + const { parentNode: e2, previousSibling: i2, nextSibling: n2 } = t3; + return un(e2.previousSibling) && !this.isBlockElement(e2.previousSibling) || cn(e2) ? void 0 : !i2 || this.isBlockElement(i2) || !n2 || this.isBlockElement(n2); } - isExtraBR(t2) { - return "br" === E(t2) && this.isBlockElement(t2.parentNode) && t2.parentNode.lastChild === t2; + isExtraBR(t3) { + return "br" === R(t3) && this.isBlockElement(t3.parentNode) && t3.parentNode.lastChild === t3; } - needsTableSeparator(t2) { - if (j.removeBlankTableCells) { + needsTableSeparator(t3) { + if (_.removeBlankTableCells) { var e2; - const i2 = null === (e2 = t2.previousSibling) || void 0 === e2 ? void 0 : e2.textContent; + const i2 = null === (e2 = t3.previousSibling) || void 0 === e2 ? void 0 : e2.textContent; return i2 && /\S/.test(i2); } - return t2.previousSibling; + return t3.previousSibling; } translateBlockElementMarginsToNewlines() { - const t2 = this.getMarginOfDefaultBlockElement(); + const t3 = this.getMarginOfDefaultBlockElement(); for (let e2 = 0; e2 < this.blocks.length; e2++) { const i2 = this.getMarginOfBlockElementAtIndex(e2); - i2 && (i2.top > 2 * t2.top && this.prependStringToTextAtIndex("\n", e2), i2.bottom > 2 * t2.bottom && this.appendStringToTextAtIndex("\n", e2)); + i2 && (i2.top > 2 * t3.top && this.prependStringToTextAtIndex("\n", e2), i2.bottom > 2 * t3.bottom && this.appendStringToTextAtIndex("\n", e2)); } } - getMarginOfBlockElementAtIndex(t2) { - const e2 = this.blockElements[t2]; - if (e2 && e2.textContent && !D().includes(E(e2)) && !this.processedElements.includes(e2)) - return Ze(e2); + getMarginOfBlockElementAtIndex(t3) { + const e2 = this.blockElements[t3]; + if (e2 && e2.textContent && !w().includes(R(e2)) && !this.processedElements.includes(e2)) + return hn(e2); } getMarginOfDefaultBlockElement() { - const t2 = S(n.default.tagName); - return this.containerElement.appendChild(t2), Ze(t2); + const t3 = k(n.default.tagName); + return this.containerElement.appendChild(t3), hn(t3); } }; - var Ye = function(t2) { - const { whiteSpace: e2 } = window.getComputedStyle(t2); + var cn = function(t3) { + const { whiteSpace: e2 } = window.getComputedStyle(t3); return ["pre", "pre-wrap", "pre-line"].includes(e2); }; - var Qe = (t2) => t2 && !ni(t2.textContent); - var Ze = function(t2) { - const e2 = window.getComputedStyle(t2); + var un = (t3) => t3 && !pn(t3.textContent); + var hn = function(t3) { + const e2 = window.getComputedStyle(t3); if ("block" === e2.display) return { top: parseInt(e2.marginTop), bottom: parseInt(e2.marginBottom) }; }; - var ti = function(t2) { - return "style" === E(t2) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; + var dn = function(t3) { + return "style" === R(t3) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; }; - var ei = (t2) => t2.replace(new RegExp("^".concat(Ut.source, "+")), ""); - var ii = (t2) => new RegExp("^".concat(Ut.source, "*$")).test(t2); - var ni = (t2) => /\s$/.test(t2); - var ri = ["contenteditable", "data-trix-id", "data-trix-store-key", "data-trix-mutable", "data-trix-placeholder", "tabindex"]; - var oi = "data-trix-serialized-attributes"; - var si = "[".concat(oi, "]"); - var ai = new RegExp("", "g"); - var li = { "application/json": function(t2) { + var gn = (t3) => t3.replace(new RegExp("^".concat(Wt.source, "+")), ""); + var mn = (t3) => new RegExp("^".concat(Wt.source, "*$")).test(t3); + var pn = (t3) => /\s$/.test(t3); + var fn = ["contenteditable", "data-trix-id", "data-trix-store-key", "data-trix-mutable", "data-trix-placeholder", "tabindex"]; + var bn = "data-trix-serialized-attributes"; + var vn = "[".concat(bn, "]"); + var An = new RegExp("", "g"); + var yn = { "application/json": function(t3) { let e2; - if (t2 instanceof Je) - e2 = t2; + if (t3 instanceof rn) + e2 = t3; else { - if (!(t2 instanceof HTMLElement)) + if (!(t3 instanceof HTMLElement)) throw new Error("unserializable object"); - e2 = Xe.parse(t2.innerHTML).getDocument(); + e2 = ln.parse(t3.innerHTML).getDocument(); } return e2.toSerializableDocument().toJSONString(); - }, "text/html": function(t2) { + }, "text/html": function(t3) { let e2; - if (t2 instanceof Je) - e2 = ve.render(t2); + if (t3 instanceof rn) + e2 = xi.render(t3); else { - if (!(t2 instanceof HTMLElement)) + if (!(t3 instanceof HTMLElement)) throw new Error("unserializable object"); - e2 = t2.cloneNode(true); + e2 = t3.cloneNode(true); } - return Array.from(e2.querySelectorAll("[data-trix-serialize=false]")).forEach((t3) => { - k(t3); - }), ri.forEach((t3) => { - Array.from(e2.querySelectorAll("[".concat(t3, "]"))).forEach((e3) => { - e3.removeAttribute(t3); + return Array.from(e2.querySelectorAll("[data-trix-serialize=false]")).forEach((t4) => { + E(t4); + }), fn.forEach((t4) => { + Array.from(e2.querySelectorAll("[".concat(t4, "]"))).forEach((e3) => { + e3.removeAttribute(t4); }); - }), Array.from(e2.querySelectorAll(si)).forEach((t3) => { + }), Array.from(e2.querySelectorAll(vn)).forEach((t4) => { try { - const e3 = JSON.parse(t3.getAttribute(oi)); - t3.removeAttribute(oi); + const e3 = JSON.parse(t4.getAttribute(bn)); + t4.removeAttribute(bn); for (const i2 in e3) { const n2 = e3[i2]; - t3.setAttribute(i2, n2); + t4.setAttribute(i2, n2); } - } catch (t4) { + } catch (t5) { } - }), e2.innerHTML.replace(ai, ""); + }), e2.innerHTML.replace(An, ""); } }; - var ci = Object.freeze({ __proto__: null }); - var ui = class extends H { - constructor(t2, e2) { - super(...arguments), this.attachmentManager = t2, this.attachment = e2, this.id = this.attachment.id, this.file = this.attachment.file; + var xn = Object.freeze({ __proto__: null }); + var Cn = class extends z { + constructor(t3, e2) { + super(...arguments), this.attachmentManager = t3, this.attachment = e2, this.id = this.attachment.id, this.file = this.attachment.file; } remove() { return this.attachmentManager.requestRemovalOfAttachment(this.attachment); } }; - ui.proxyMethod("attachment.getAttribute"), ui.proxyMethod("attachment.hasAttribute"), ui.proxyMethod("attachment.setAttribute"), ui.proxyMethod("attachment.getAttributes"), ui.proxyMethod("attachment.setAttributes"), ui.proxyMethod("attachment.isPending"), ui.proxyMethod("attachment.isPreviewable"), ui.proxyMethod("attachment.getURL"), ui.proxyMethod("attachment.getHref"), ui.proxyMethod("attachment.getFilename"), ui.proxyMethod("attachment.getFilesize"), ui.proxyMethod("attachment.getFormattedFilesize"), ui.proxyMethod("attachment.getExtension"), ui.proxyMethod("attachment.getContentType"), ui.proxyMethod("attachment.getFile"), ui.proxyMethod("attachment.setFile"), ui.proxyMethod("attachment.releaseFile"), ui.proxyMethod("attachment.getUploadProgress"), ui.proxyMethod("attachment.setUploadProgress"); - var hi = class extends H { + Cn.proxyMethod("attachment.getAttribute"), Cn.proxyMethod("attachment.hasAttribute"), Cn.proxyMethod("attachment.setAttribute"), Cn.proxyMethod("attachment.getAttributes"), Cn.proxyMethod("attachment.setAttributes"), Cn.proxyMethod("attachment.isPending"), Cn.proxyMethod("attachment.isPreviewable"), Cn.proxyMethod("attachment.getURL"), Cn.proxyMethod("attachment.getHref"), Cn.proxyMethod("attachment.getFilename"), Cn.proxyMethod("attachment.getFilesize"), Cn.proxyMethod("attachment.getFormattedFilesize"), Cn.proxyMethod("attachment.getExtension"), Cn.proxyMethod("attachment.getContentType"), Cn.proxyMethod("attachment.getFile"), Cn.proxyMethod("attachment.setFile"), Cn.proxyMethod("attachment.releaseFile"), Cn.proxyMethod("attachment.getUploadProgress"), Cn.proxyMethod("attachment.setUploadProgress"); + var En = class extends z { constructor() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; - super(...arguments), this.managedAttachments = {}, Array.from(t2).forEach((t3) => { - this.manageAttachment(t3); + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; + super(...arguments), this.managedAttachments = {}, Array.from(t3).forEach((t4) => { + this.manageAttachment(t4); }); } getAttachments() { - const t2 = []; + const t3 = []; for (const e2 in this.managedAttachments) { const i2 = this.managedAttachments[e2]; - t2.push(i2); + t3.push(i2); } - return t2; + return t3; } - manageAttachment(t2) { - return this.managedAttachments[t2.id] || (this.managedAttachments[t2.id] = new ui(this, t2)), this.managedAttachments[t2.id]; + manageAttachment(t3) { + return this.managedAttachments[t3.id] || (this.managedAttachments[t3.id] = new Cn(this, t3)), this.managedAttachments[t3.id]; } - attachmentIsManaged(t2) { - return t2.id in this.managedAttachments; + attachmentIsManaged(t3) { + return t3.id in this.managedAttachments; } - requestRemovalOfAttachment(t2) { + requestRemovalOfAttachment(t3) { var e2, i2; - if (this.attachmentIsManaged(t2)) - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentManagerDidRequestRemovalOfAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t2); + if (this.attachmentIsManaged(t3)) + return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentManagerDidRequestRemovalOfAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t3); } - unmanageAttachment(t2) { - const e2 = this.managedAttachments[t2.id]; - return delete this.managedAttachments[t2.id], e2; + unmanageAttachment(t3) { + const e2 = this.managedAttachments[t3.id]; + return delete this.managedAttachments[t3.id], e2; } }; - var di = class { - constructor(t2) { - this.composition = t2, this.document = this.composition.document; + var Sn = class { + constructor(t3) { + this.composition = t3, this.document = this.composition.document; const e2 = this.composition.getSelectedRange(); this.startPosition = e2[0], this.endPosition = e2[1], this.startLocation = this.document.locationFromPosition(this.startPosition), this.endLocation = this.document.locationFromPosition(this.endPosition), this.block = this.document.getBlockAtIndex(this.endLocation.index), this.breaksOnReturn = this.block.breaksOnReturn(), this.previousCharacter = this.block.text.getStringAtPosition(this.endLocation.offset - 1), this.nextCharacter = this.block.text.getStringAtPosition(this.endLocation.offset); } @@ -11012,133 +11450,133 @@ return this.block.hasAttributes() && !this.block.isListItem() && this.block.isEmpty(); } }; - var gi = class extends H { + var Rn = class extends z { constructor() { - super(...arguments), this.document = new Je(), this.attachments = [], this.currentAttributes = {}, this.revision = 0; + super(...arguments), this.document = new rn(), this.attachments = [], this.currentAttributes = {}, this.revision = 0; } - setDocument(t2) { + setDocument(t3) { var e2, i2; - if (!t2.isEqualTo(this.document)) - return this.document = t2, this.refreshAttachments(), this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidChangeDocument) || void 0 === i2 ? void 0 : i2.call(e2, t2); + if (!t3.isEqualTo(this.document)) + return this.document = t3, this.refreshAttachments(), this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidChangeDocument) || void 0 === i2 ? void 0 : i2.call(e2, t3); } getSnapshot() { return { document: this.document, selectedRange: this.getSelectedRange() }; } - loadSnapshot(t2) { + loadSnapshot(t3) { var e2, i2, n2, r2; - let { document: o2, selectedRange: s2 } = t2; - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionWillLoadSnapshot) || void 0 === i2 || i2.call(e2), this.setDocument(null != o2 ? o2 : new Je()), this.setSelection(null != s2 ? s2 : [0, 0]), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.compositionDidLoadSnapshot) || void 0 === r2 ? void 0 : r2.call(n2); + let { document: o2, selectedRange: s2 } = t3; + return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionWillLoadSnapshot) || void 0 === i2 || i2.call(e2), this.setDocument(null != o2 ? o2 : new rn()), this.setSelection(null != s2 ? s2 : [0, 0]), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.compositionDidLoadSnapshot) || void 0 === r2 ? void 0 : r2.call(n2); } - insertText(t2) { + insertText(t3) { let { updatePosition: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { updatePosition: true }; const i2 = this.getSelectedRange(); - this.setDocument(this.document.insertTextAtRange(t2, i2)); - const n2 = i2[0], r2 = n2 + t2.getLength(); + this.setDocument(this.document.insertTextAtRange(t3, i2)); + const n2 = i2[0], r2 = n2 + t3.getLength(); return e2 && this.setSelection(r2), this.notifyDelegateOfInsertionAtRange([n2, r2]); } insertBlock() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Oe(); - const e2 = new Je([t2]); + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Ki(); + const e2 = new rn([t3]); return this.insertDocument(e2); } insertDocument() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Je(); + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new rn(); const e2 = this.getSelectedRange(); - this.setDocument(this.document.insertDocumentAtRange(t2, e2)); - const i2 = e2[0], n2 = i2 + t2.getLength(); + this.setDocument(this.document.insertDocumentAtRange(t3, e2)); + const i2 = e2[0], n2 = i2 + t3.getLength(); return this.setSelection(n2), this.notifyDelegateOfInsertionAtRange([i2, n2]); } - insertString(t2, e2) { - const i2 = this.getCurrentTextAttributes(), n2 = Ne.textForStringWithAttributes(t2, i2); + insertString(t3, e2) { + const i2 = this.getCurrentTextAttributes(), n2 = Ji.textForStringWithAttributes(t3, i2); return this.insertText(n2, e2); } insertBlockBreak() { - const t2 = this.getSelectedRange(); - this.setDocument(this.document.insertBlockBreakAtRange(t2)); - const e2 = t2[0], i2 = e2 + 1; + const t3 = this.getSelectedRange(); + this.setDocument(this.document.insertBlockBreakAtRange(t3)); + const e2 = t3[0], i2 = e2 + 1; return this.setSelection(i2), this.notifyDelegateOfInsertionAtRange([e2, i2]); } insertLineBreak() { - const t2 = new di(this); - if (t2.shouldDecreaseListLevel()) - return this.decreaseListLevel(), this.setSelection(t2.startPosition); - if (t2.shouldPrependListItem()) { - const e2 = new Je([t2.block.copyWithoutText()]); + const t3 = new Sn(this); + if (t3.shouldDecreaseListLevel()) + return this.decreaseListLevel(), this.setSelection(t3.startPosition); + if (t3.shouldPrependListItem()) { + const e2 = new rn([t3.block.copyWithoutText()]); return this.insertDocument(e2); } - return t2.shouldInsertBlockBreak() ? this.insertBlockBreak() : t2.shouldRemoveLastBlockAttribute() ? this.removeLastBlockAttribute() : t2.shouldBreakFormattedBlock() ? this.breakFormattedBlock(t2) : this.insertString("\n"); + return t3.shouldInsertBlockBreak() ? this.insertBlockBreak() : t3.shouldRemoveLastBlockAttribute() ? this.removeLastBlockAttribute() : t3.shouldBreakFormattedBlock() ? this.breakFormattedBlock(t3) : this.insertString("\n"); } - insertHTML(t2) { - const e2 = Xe.parse(t2).getDocument(), i2 = this.getSelectedRange(); + insertHTML(t3) { + const e2 = ln.parse(t3).getDocument(), i2 = this.getSelectedRange(); this.setDocument(this.document.mergeDocumentAtRange(e2, i2)); const n2 = i2[0], r2 = n2 + e2.getLength() - 1; return this.setSelection(r2), this.notifyDelegateOfInsertionAtRange([n2, r2]); } - replaceHTML(t2) { - const e2 = Xe.parse(t2).getDocument().copyUsingObjectsFromDocument(this.document), i2 = this.getLocationRange({ strict: false }), n2 = this.document.rangeFromLocationRange(i2); + replaceHTML(t3) { + const e2 = ln.parse(t3).getDocument().copyUsingObjectsFromDocument(this.document), i2 = this.getLocationRange({ strict: false }), n2 = this.document.rangeFromLocationRange(i2); return this.setDocument(e2), this.setSelection(n2); } - insertFile(t2) { - return this.insertFiles([t2]); + insertFile(t3) { + return this.insertFiles([t3]); } - insertFiles(t2) { + insertFiles(t3) { const e2 = []; - return Array.from(t2).forEach((t3) => { + return Array.from(t3).forEach((t4) => { var i2; - if (null !== (i2 = this.delegate) && void 0 !== i2 && i2.compositionShouldAcceptFile(t3)) { - const i3 = De.attachmentForFile(t3); + if (null !== (i2 = this.delegate) && void 0 !== i2 && i2.compositionShouldAcceptFile(t4)) { + const i3 = ji.attachmentForFile(t4); e2.push(i3); } }), this.insertAttachments(e2); } - insertAttachment(t2) { - return this.insertAttachments([t2]); + insertAttachment(t3) { + return this.insertAttachments([t3]); } - insertAttachments(t2) { - let e2 = new Ne(); - return Array.from(t2).forEach((t3) => { + insertAttachments(t3) { + let e2 = new Ji(); + return Array.from(t3).forEach((t4) => { var n2; - const r2 = t3.getType(), o2 = null === (n2 = i[r2]) || void 0 === n2 ? void 0 : n2.presentation, s2 = this.getCurrentTextAttributes(); + const r2 = t4.getType(), o2 = null === (n2 = i[r2]) || void 0 === n2 ? void 0 : n2.presentation, s2 = this.getCurrentTextAttributes(); o2 && (s2.presentation = o2); - const a2 = Ne.textForAttachmentWithAttributes(t3, s2); + const a2 = Ji.textForAttachmentWithAttributes(t4, s2); e2 = e2.appendText(a2); }), this.insertText(e2); } - shouldManageDeletingInDirection(t2) { + shouldManageDeletingInDirection(t3) { const e2 = this.getLocationRange(); - if (Dt(e2)) { - if ("backward" === t2 && 0 === e2[0].offset) + if (wt(e2)) { + if ("backward" === t3 && 0 === e2[0].offset) return true; - if (this.shouldManageMovingCursorInDirection(t2)) + if (this.shouldManageMovingCursorInDirection(t3)) return true; } else if (e2[0].index !== e2[1].index) return true; return false; } - deleteInDirection(t2) { + deleteInDirection(t3) { let e2, i2, n2, { length: r2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; const o2 = this.getLocationRange(); let s2 = this.getSelectedRange(); - const a2 = Dt(s2); - if (a2 ? i2 = "backward" === t2 && 0 === o2[0].offset : n2 = o2[0].index !== o2[1].index, i2 && this.canDecreaseBlockAttributeLevel()) { - const t3 = this.getBlock(); - if (t3.isListItem() ? this.decreaseListLevel() : this.decreaseBlockAttributeLevel(), this.setSelection(s2[0]), t3.isEmpty()) + const a2 = wt(s2); + if (a2 ? i2 = "backward" === t3 && 0 === o2[0].offset : n2 = o2[0].index !== o2[1].index, i2 && this.canDecreaseBlockAttributeLevel()) { + const t4 = this.getBlock(); + if (t4.isListItem() ? this.decreaseListLevel() : this.decreaseBlockAttributeLevel(), this.setSelection(s2[0]), t4.isEmpty()) return false; } - return a2 && (s2 = this.getExpandedRangeInDirection(t2, { length: r2 }), "backward" === t2 && (e2 = this.getAttachmentAtRange(s2))), e2 ? (this.editAttachment(e2), false) : (this.setDocument(this.document.removeTextAtRange(s2)), this.setSelection(s2[0]), !i2 && !n2 && void 0); + return a2 && (s2 = this.getExpandedRangeInDirection(t3, { length: r2 }), "backward" === t3 && (e2 = this.getAttachmentAtRange(s2))), e2 ? (this.editAttachment(e2), false) : (this.setDocument(this.document.removeTextAtRange(s2)), this.setSelection(s2[0]), !i2 && !n2 && void 0); } - moveTextFromRange(t2) { + moveTextFromRange(t3) { const [e2] = Array.from(this.getSelectedRange()); - return this.setDocument(this.document.moveTextFromRangeToPosition(t2, e2)), this.setSelection(e2); + return this.setDocument(this.document.moveTextFromRangeToPosition(t3, e2)), this.setSelection(e2); } - removeAttachment(t2) { - const e2 = this.document.getRangeOfAttachment(t2); + removeAttachment(t3) { + const e2 = this.document.getRangeOfAttachment(t3); if (e2) return this.stopEditingAttachment(), this.setDocument(this.document.removeTextAtRange(e2)), this.setSelection(e2[0]); } removeLastBlockAttribute() { - const [t2, e2] = Array.from(this.getSelectedRange()), i2 = this.document.getBlockAtPosition(e2); - return this.removeCurrentAttribute(i2.getLastAttribute()), this.setSelection(t2); + const [t3, e2] = Array.from(this.getSelectedRange()), i2 = this.document.getBlockAtPosition(e2); + return this.removeCurrentAttribute(i2.getLastAttribute()), this.setSelection(t3); } insertPlaceholder() { return this.placeholderPosition = this.getPosition(), this.insertString(" "); @@ -11150,131 +11588,131 @@ forgetPlaceholder() { this.placeholderPosition = null; } - hasCurrentAttribute(t2) { - const e2 = this.currentAttributes[t2]; + hasCurrentAttribute(t3) { + const e2 = this.currentAttributes[t3]; return null != e2 && false !== e2; } - toggleCurrentAttribute(t2) { - const e2 = !this.currentAttributes[t2]; - return e2 ? this.setCurrentAttribute(t2, e2) : this.removeCurrentAttribute(t2); + toggleCurrentAttribute(t3) { + const e2 = !this.currentAttributes[t3]; + return e2 ? this.setCurrentAttribute(t3, e2) : this.removeCurrentAttribute(t3); } - canSetCurrentAttribute(t2) { - return gt(t2) ? this.canSetCurrentBlockAttribute(t2) : this.canSetCurrentTextAttribute(t2); + canSetCurrentAttribute(t3) { + return gt(t3) ? this.canSetCurrentBlockAttribute(t3) : this.canSetCurrentTextAttribute(t3); } - canSetCurrentTextAttribute(t2) { + canSetCurrentTextAttribute(t3) { const e2 = this.getSelectedDocument(); if (e2) { - for (const t3 of Array.from(e2.getAttachments())) - if (!t3.hasContent()) + for (const t4 of Array.from(e2.getAttachments())) + if (!t4.hasContent()) return false; return true; } } - canSetCurrentBlockAttribute(t2) { + canSetCurrentBlockAttribute(t3) { const e2 = this.getBlock(); if (e2) return !e2.isTerminalBlock(); } - setCurrentAttribute(t2, e2) { - return gt(t2) ? this.setBlockAttribute(t2, e2) : (this.setTextAttribute(t2, e2), this.currentAttributes[t2] = e2, this.notifyDelegateOfCurrentAttributesChange()); + setCurrentAttribute(t3, e2) { + return gt(t3) ? this.setBlockAttribute(t3, e2) : (this.setTextAttribute(t3, e2), this.currentAttributes[t3] = e2, this.notifyDelegateOfCurrentAttributesChange()); } - setHTMLAtributeAtPosition(t2, e2, i2) { + setHTMLAtributeAtPosition(t3, e2, i2) { var n2; - const r2 = this.document.getBlockAtPosition(t2), o2 = null === (n2 = gt(r2.getLastAttribute())) || void 0 === n2 ? void 0 : n2.htmlAttributes; + const r2 = this.document.getBlockAtPosition(t3), o2 = null === (n2 = gt(r2.getLastAttribute())) || void 0 === n2 ? void 0 : n2.htmlAttributes; if (r2 && null != o2 && o2.includes(e2)) { - const n3 = this.document.setHTMLAttributeAtPosition(t2, e2, i2); + const n3 = this.document.setHTMLAttributeAtPosition(t3, e2, i2); this.setDocument(n3); } } - setTextAttribute(t2, e2) { + setTextAttribute(t3, e2) { const i2 = this.getSelectedRange(); if (!i2) return; const [n2, r2] = Array.from(i2); if (n2 !== r2) - return this.setDocument(this.document.addAttributeAtRange(t2, e2, i2)); - if ("href" === t2) { - const t3 = Ne.textForStringWithAttributes(e2, { href: e2 }); - return this.insertText(t3); + return this.setDocument(this.document.addAttributeAtRange(t3, e2, i2)); + if ("href" === t3) { + const t4 = Ji.textForStringWithAttributes(e2, { href: e2 }); + return this.insertText(t4); } } - setBlockAttribute(t2, e2) { + setBlockAttribute(t3, e2) { const i2 = this.getSelectedRange(); - if (this.canSetCurrentAttribute(t2)) - return this.setDocument(this.document.applyBlockAttributeAtRange(t2, e2, i2)), this.setSelection(i2); + if (this.canSetCurrentAttribute(t3)) + return this.setDocument(this.document.applyBlockAttributeAtRange(t3, e2, i2)), this.setSelection(i2); } - removeCurrentAttribute(t2) { - return gt(t2) ? (this.removeBlockAttribute(t2), this.updateCurrentAttributes()) : (this.removeTextAttribute(t2), delete this.currentAttributes[t2], this.notifyDelegateOfCurrentAttributesChange()); + removeCurrentAttribute(t3) { + return gt(t3) ? (this.removeBlockAttribute(t3), this.updateCurrentAttributes()) : (this.removeTextAttribute(t3), delete this.currentAttributes[t3], this.notifyDelegateOfCurrentAttributesChange()); } - removeTextAttribute(t2) { + removeTextAttribute(t3) { const e2 = this.getSelectedRange(); if (e2) - return this.setDocument(this.document.removeAttributeAtRange(t2, e2)); + return this.setDocument(this.document.removeAttributeAtRange(t3, e2)); } - removeBlockAttribute(t2) { + removeBlockAttribute(t3) { const e2 = this.getSelectedRange(); if (e2) - return this.setDocument(this.document.removeAttributeAtRange(t2, e2)); + return this.setDocument(this.document.removeAttributeAtRange(t3, e2)); } canDecreaseNestingLevel() { - var t2; - return (null === (t2 = this.getBlock()) || void 0 === t2 ? void 0 : t2.getNestingLevel()) > 0; + var t3; + return (null === (t3 = this.getBlock()) || void 0 === t3 ? void 0 : t3.getNestingLevel()) > 0; } canIncreaseNestingLevel() { - var t2; + var t3; const e2 = this.getBlock(); if (e2) { - if (null === (t2 = gt(e2.getLastNestableAttribute())) || void 0 === t2 || !t2.listAttribute) + if (null === (t3 = gt(e2.getLastNestableAttribute())) || void 0 === t3 || !t3.listAttribute) return e2.getNestingLevel() > 0; { - const t3 = this.getPreviousBlock(); - if (t3) + const t4 = this.getPreviousBlock(); + if (t4) return function() { - let t4 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; - return rt((arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []).slice(0, t4.length), t4); - }(t3.getListItemAttributes(), e2.getListItemAttributes()); + let t5 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; + return rt((arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []).slice(0, t5.length), t5); + }(t4.getListItemAttributes(), e2.getListItemAttributes()); } } } decreaseNestingLevel() { - const t2 = this.getBlock(); - if (t2) - return this.setDocument(this.document.replaceBlock(t2, t2.decreaseNestingLevel())); + const t3 = this.getBlock(); + if (t3) + return this.setDocument(this.document.replaceBlock(t3, t3.decreaseNestingLevel())); } increaseNestingLevel() { - const t2 = this.getBlock(); - if (t2) - return this.setDocument(this.document.replaceBlock(t2, t2.increaseNestingLevel())); + const t3 = this.getBlock(); + if (t3) + return this.setDocument(this.document.replaceBlock(t3, t3.increaseNestingLevel())); } canDecreaseBlockAttributeLevel() { - var t2; - return (null === (t2 = this.getBlock()) || void 0 === t2 ? void 0 : t2.getAttributeLevel()) > 0; + var t3; + return (null === (t3 = this.getBlock()) || void 0 === t3 ? void 0 : t3.getAttributeLevel()) > 0; } decreaseBlockAttributeLevel() { - var t2; - const e2 = null === (t2 = this.getBlock()) || void 0 === t2 ? void 0 : t2.getLastAttribute(); + var t3; + const e2 = null === (t3 = this.getBlock()) || void 0 === t3 ? void 0 : t3.getLastAttribute(); if (e2) return this.removeCurrentAttribute(e2); } decreaseListLevel() { - let [t2] = Array.from(this.getSelectedRange()); - const { index: e2 } = this.document.locationFromPosition(t2); + let [t3] = Array.from(this.getSelectedRange()); + const { index: e2 } = this.document.locationFromPosition(t3); let i2 = e2; const n2 = this.getBlock().getAttributeLevel(); let r2 = this.document.getBlockAtIndex(i2 + 1); for (; r2 && r2.isListItem() && !(r2.getAttributeLevel() <= n2); ) i2++, r2 = this.document.getBlockAtIndex(i2 + 1); - t2 = this.document.positionFromLocation({ index: e2, offset: 0 }); + t3 = this.document.positionFromLocation({ index: e2, offset: 0 }); const o2 = this.document.positionFromLocation({ index: i2, offset: 0 }); - return this.setDocument(this.document.removeLastListAttributeAtRange([t2, o2])); + return this.setDocument(this.document.removeLastListAttributeAtRange([t3, o2])); } updateCurrentAttributes() { - const t2 = this.getSelectedRange({ ignoreLock: true }); - if (t2) { - const e2 = this.document.getCommonAttributesAtRange(t2); - if (Array.from(dt()).forEach((t3) => { - e2[t3] || this.canSetCurrentAttribute(t3) || (e2[t3] = false); - }), !St(e2, this.currentAttributes)) + const t3 = this.getSelectedRange({ ignoreLock: true }); + if (t3) { + const e2 = this.document.getCommonAttributesAtRange(t3); + if (Array.from(dt()).forEach((t4) => { + e2[t4] || this.canSetCurrentAttribute(t4) || (e2[t4] = false); + }), !kt(e2, this.currentAttributes)) return this.currentAttributes = e2, this.notifyDelegateOfCurrentAttributesChange(); } } @@ -11282,12 +11720,12 @@ return g.call({}, this.currentAttributes); } getCurrentTextAttributes() { - const t2 = {}; + const t3 = {}; for (const e2 in this.currentAttributes) { const i2 = this.currentAttributes[e2]; - false !== i2 && pt(e2) && (t2[e2] = i2); + false !== i2 && pt(e2) && (t3[e2] = i2); } - return t2; + return t3; } freezeSelection() { return this.setCurrentAttribute("frozen", true); @@ -11298,31 +11736,31 @@ hasFrozenSelection() { return this.hasCurrentAttribute("frozen"); } - setSelection(t2) { + setSelection(t3) { var e2; - const i2 = this.document.locationRangeFromRange(t2); + const i2 = this.document.locationRangeFromRange(t3); return null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.compositionDidRequestChangingSelectionToLocationRange(i2); } getSelectedRange() { - const t2 = this.getLocationRange(); - if (t2) - return this.document.rangeFromLocationRange(t2); + const t3 = this.getLocationRange(); + if (t3) + return this.document.rangeFromLocationRange(t3); } - setSelectedRange(t2) { - const e2 = this.document.locationRangeFromRange(t2); + setSelectedRange(t3) { + const e2 = this.document.locationRangeFromRange(t3); return this.getSelectionManager().setLocationRange(e2); } getPosition() { - const t2 = this.getLocationRange(); - if (t2) - return this.document.positionFromLocation(t2[0]); + const t3 = this.getLocationRange(); + if (t3) + return this.document.positionFromLocation(t3[0]); } - getLocationRange(t2) { - return this.targetLocationRange ? this.targetLocationRange : this.getSelectionManager().getLocationRange(t2) || Lt({ index: 0, offset: 0 }); + getLocationRange(t3) { + return this.targetLocationRange ? this.targetLocationRange : this.getSelectionManager().getLocationRange(t3) || Tt({ index: 0, offset: 0 }); } - withTargetLocationRange(t2, e2) { + withTargetLocationRange(t3, e2) { let i2; - this.targetLocationRange = t2; + this.targetLocationRange = t3; try { i2 = e2(); } finally { @@ -11330,191 +11768,191 @@ } return i2; } - withTargetRange(t2, e2) { - const i2 = this.document.locationRangeFromRange(t2); + withTargetRange(t3, e2) { + const i2 = this.document.locationRangeFromRange(t3); return this.withTargetLocationRange(i2, e2); } - withTargetDOMRange(t2, e2) { - const i2 = this.createLocationRangeFromDOMRange(t2, { strict: false }); + withTargetDOMRange(t3, e2) { + const i2 = this.createLocationRangeFromDOMRange(t3, { strict: false }); return this.withTargetLocationRange(i2, e2); } - getExpandedRangeInDirection(t2) { + getExpandedRangeInDirection(t3) { let { length: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, [i2, n2] = Array.from(this.getSelectedRange()); - return "backward" === t2 ? e2 ? i2 -= e2 : i2 = this.translateUTF16PositionFromOffset(i2, -1) : e2 ? n2 += e2 : n2 = this.translateUTF16PositionFromOffset(n2, 1), Lt([i2, n2]); + return "backward" === t3 ? e2 ? i2 -= e2 : i2 = this.translateUTF16PositionFromOffset(i2, -1) : e2 ? n2 += e2 : n2 = this.translateUTF16PositionFromOffset(n2, 1), Tt([i2, n2]); } - shouldManageMovingCursorInDirection(t2) { + shouldManageMovingCursorInDirection(t3) { if (this.editingAttachment) return true; - const e2 = this.getExpandedRangeInDirection(t2); + const e2 = this.getExpandedRangeInDirection(t3); return null != this.getAttachmentAtRange(e2); } - moveCursorInDirection(t2) { + moveCursorInDirection(t3) { let e2, i2; if (this.editingAttachment) i2 = this.document.getRangeOfAttachment(this.editingAttachment); else { const n2 = this.getSelectedRange(); - i2 = this.getExpandedRangeInDirection(t2), e2 = !wt(n2, i2); + i2 = this.getExpandedRangeInDirection(t3), e2 = !Lt(n2, i2); } - if ("backward" === t2 ? this.setSelectedRange(i2[0]) : this.setSelectedRange(i2[1]), e2) { - const t3 = this.getAttachmentAtRange(i2); - if (t3) - return this.editAttachment(t3); + if ("backward" === t3 ? this.setSelectedRange(i2[0]) : this.setSelectedRange(i2[1]), e2) { + const t4 = this.getAttachmentAtRange(i2); + if (t4) + return this.editAttachment(t4); } } - expandSelectionInDirection(t2) { + expandSelectionInDirection(t3) { let { length: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - const i2 = this.getExpandedRangeInDirection(t2, { length: e2 }); + const i2 = this.getExpandedRangeInDirection(t3, { length: e2 }); return this.setSelectedRange(i2); } expandSelectionForEditing() { if (this.hasCurrentAttribute("href")) return this.expandSelectionAroundCommonAttribute("href"); } - expandSelectionAroundCommonAttribute(t2) { - const e2 = this.getPosition(), i2 = this.document.getRangeOfCommonAttributeAtPosition(t2, e2); + expandSelectionAroundCommonAttribute(t3) { + const e2 = this.getPosition(), i2 = this.document.getRangeOfCommonAttributeAtPosition(t3, e2); return this.setSelectedRange(i2); } selectionContainsAttachments() { - var t2; - return (null === (t2 = this.getSelectedAttachments()) || void 0 === t2 ? void 0 : t2.length) > 0; + var t3; + return (null === (t3 = this.getSelectedAttachments()) || void 0 === t3 ? void 0 : t3.length) > 0; } selectionIsInCursorTarget() { return this.editingAttachment || this.positionIsCursorTarget(this.getPosition()); } - positionIsCursorTarget(t2) { - const e2 = this.document.locationFromPosition(t2); + positionIsCursorTarget(t3) { + const e2 = this.document.locationFromPosition(t3); if (e2) return this.locationIsCursorTarget(e2); } - positionIsBlockBreak(t2) { + positionIsBlockBreak(t3) { var e2; - return null === (e2 = this.document.getPieceAtPosition(t2)) || void 0 === e2 ? void 0 : e2.isBlockBreak(); + return null === (e2 = this.document.getPieceAtPosition(t3)) || void 0 === e2 ? void 0 : e2.isBlockBreak(); } getSelectedDocument() { - const t2 = this.getSelectedRange(); - if (t2) - return this.document.getDocumentAtRange(t2); + const t3 = this.getSelectedRange(); + if (t3) + return this.document.getDocumentAtRange(t3); } getSelectedAttachments() { - var t2; - return null === (t2 = this.getSelectedDocument()) || void 0 === t2 ? void 0 : t2.getAttachments(); + var t3; + return null === (t3 = this.getSelectedDocument()) || void 0 === t3 ? void 0 : t3.getAttachments(); } getAttachments() { return this.attachments.slice(0); } refreshAttachments() { - const t2 = this.document.getAttachments(), { added: e2, removed: i2 } = function() { - let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; + const t3 = this.document.getAttachments(), { added: e2, removed: i2 } = function() { + let t4 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; const i3 = [], n2 = [], r2 = /* @__PURE__ */ new Set(); - t3.forEach((t4) => { - r2.add(t4); + t4.forEach((t5) => { + r2.add(t5); }); const o2 = /* @__PURE__ */ new Set(); - return e3.forEach((t4) => { - o2.add(t4), r2.has(t4) || i3.push(t4); - }), t3.forEach((t4) => { - o2.has(t4) || n2.push(t4); + return e3.forEach((t5) => { + o2.add(t5), r2.has(t5) || i3.push(t5); + }), t4.forEach((t5) => { + o2.has(t5) || n2.push(t5); }), { added: i3, removed: n2 }; - }(this.attachments, t2); - return this.attachments = t2, Array.from(i2).forEach((t3) => { + }(this.attachments, t3); + return this.attachments = t3, Array.from(i2).forEach((t4) => { var e3, i3; - t3.delegate = null, null === (e3 = this.delegate) || void 0 === e3 || null === (i3 = e3.compositionDidRemoveAttachment) || void 0 === i3 || i3.call(e3, t3); + t4.delegate = null, null === (e3 = this.delegate) || void 0 === e3 || null === (i3 = e3.compositionDidRemoveAttachment) || void 0 === i3 || i3.call(e3, t4); }), (() => { - const t3 = []; + const t4 = []; return Array.from(e2).forEach((e3) => { var i3, n2; - e3.delegate = this, t3.push(null === (i3 = this.delegate) || void 0 === i3 || null === (n2 = i3.compositionDidAddAttachment) || void 0 === n2 ? void 0 : n2.call(i3, e3)); - }), t3; + e3.delegate = this, t4.push(null === (i3 = this.delegate) || void 0 === i3 || null === (n2 = i3.compositionDidAddAttachment) || void 0 === n2 ? void 0 : n2.call(i3, e3)); + }), t4; })(); } - attachmentDidChangeAttributes(t2) { + attachmentDidChangeAttributes(t3) { var e2, i2; - return this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidEditAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t2); + return this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidEditAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t3); } - attachmentDidChangePreviewURL(t2) { + attachmentDidChangePreviewURL(t3) { var e2, i2; - return this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidChangeAttachmentPreviewURL) || void 0 === i2 ? void 0 : i2.call(e2, t2); + return this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidChangeAttachmentPreviewURL) || void 0 === i2 ? void 0 : i2.call(e2, t3); } - editAttachment(t2, e2) { + editAttachment(t3, e2) { var i2, n2; - if (t2 !== this.editingAttachment) - return this.stopEditingAttachment(), this.editingAttachment = t2, null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionDidStartEditingAttachment) || void 0 === n2 ? void 0 : n2.call(i2, this.editingAttachment, e2); + if (t3 !== this.editingAttachment) + return this.stopEditingAttachment(), this.editingAttachment = t3, null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionDidStartEditingAttachment) || void 0 === n2 ? void 0 : n2.call(i2, this.editingAttachment, e2); } stopEditingAttachment() { - var t2, e2; - this.editingAttachment && (null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.compositionDidStopEditingAttachment) || void 0 === e2 || e2.call(t2, this.editingAttachment), this.editingAttachment = null); + var t3, e2; + this.editingAttachment && (null === (t3 = this.delegate) || void 0 === t3 || null === (e2 = t3.compositionDidStopEditingAttachment) || void 0 === e2 || e2.call(t3, this.editingAttachment), this.editingAttachment = null); } - updateAttributesForAttachment(t2, e2) { - return this.setDocument(this.document.updateAttributesForAttachment(t2, e2)); + updateAttributesForAttachment(t3, e2) { + return this.setDocument(this.document.updateAttributesForAttachment(t3, e2)); } - removeAttributeForAttachment(t2, e2) { - return this.setDocument(this.document.removeAttributeForAttachment(t2, e2)); + removeAttributeForAttachment(t3, e2) { + return this.setDocument(this.document.removeAttributeForAttachment(t3, e2)); } - breakFormattedBlock(t2) { - let { document: e2 } = t2; - const { block: i2 } = t2; - let n2 = t2.startPosition, r2 = [n2 - 1, n2]; - i2.getBlockBreakPosition() === t2.startLocation.offset ? (i2.breaksOnReturn() && "\n" === t2.nextCharacter ? n2 += 1 : e2 = e2.removeTextAtRange(r2), r2 = [n2, n2]) : "\n" === t2.nextCharacter ? "\n" === t2.previousCharacter ? r2 = [n2 - 1, n2 + 1] : (r2 = [n2, n2 + 1], n2 += 1) : t2.startLocation.offset - 1 != 0 && (n2 += 1); - const o2 = new Je([i2.removeLastAttribute().copyWithoutText()]); + breakFormattedBlock(t3) { + let { document: e2 } = t3; + const { block: i2 } = t3; + let n2 = t3.startPosition, r2 = [n2 - 1, n2]; + i2.getBlockBreakPosition() === t3.startLocation.offset ? (i2.breaksOnReturn() && "\n" === t3.nextCharacter ? n2 += 1 : e2 = e2.removeTextAtRange(r2), r2 = [n2, n2]) : "\n" === t3.nextCharacter ? "\n" === t3.previousCharacter ? r2 = [n2 - 1, n2 + 1] : (r2 = [n2, n2 + 1], n2 += 1) : t3.startLocation.offset - 1 != 0 && (n2 += 1); + const o2 = new rn([i2.removeLastAttribute().copyWithoutText()]); return this.setDocument(e2.insertDocumentAtRange(o2, r2)), this.setSelection(n2); } getPreviousBlock() { - const t2 = this.getLocationRange(); - if (t2) { - const { index: e2 } = t2[0]; + const t3 = this.getLocationRange(); + if (t3) { + const { index: e2 } = t3[0]; if (e2 > 0) return this.document.getBlockAtIndex(e2 - 1); } } getBlock() { - const t2 = this.getLocationRange(); - if (t2) - return this.document.getBlockAtIndex(t2[0].index); + const t3 = this.getLocationRange(); + if (t3) + return this.document.getBlockAtIndex(t3[0].index); } - getAttachmentAtRange(t2) { - const e2 = this.document.getDocumentAtRange(t2); + getAttachmentAtRange(t3) { + const e2 = this.document.getDocumentAtRange(t3); if (e2.toString() === "".concat("\uFFFC", "\n")) return e2.getAttachments()[0]; } notifyDelegateOfCurrentAttributesChange() { - var t2, e2; - return null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.compositionDidChangeCurrentAttributes) || void 0 === e2 ? void 0 : e2.call(t2, this.currentAttributes); + var t3, e2; + return null === (t3 = this.delegate) || void 0 === t3 || null === (e2 = t3.compositionDidChangeCurrentAttributes) || void 0 === e2 ? void 0 : e2.call(t3, this.currentAttributes); } - notifyDelegateOfInsertionAtRange(t2) { + notifyDelegateOfInsertionAtRange(t3) { var e2, i2; - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidPerformInsertionAtRange) || void 0 === i2 ? void 0 : i2.call(e2, t2); + return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidPerformInsertionAtRange) || void 0 === i2 ? void 0 : i2.call(e2, t3); } - translateUTF16PositionFromOffset(t2, e2) { - const i2 = this.document.toUTF16String(), n2 = i2.offsetFromUCS2Offset(t2); + translateUTF16PositionFromOffset(t3, e2) { + const i2 = this.document.toUTF16String(), n2 = i2.offsetFromUCS2Offset(t3); return i2.offsetToUCS2Offset(n2 + e2); } }; - gi.proxyMethod("getSelectionManager().getPointRange"), gi.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"), gi.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"), gi.proxyMethod("getSelectionManager().locationIsCursorTarget"), gi.proxyMethod("getSelectionManager().selectionIsExpanded"), gi.proxyMethod("delegate?.getSelectionManager"); - var mi = class extends H { - constructor(t2) { - super(...arguments), this.composition = t2, this.undoEntries = [], this.redoEntries = []; + Rn.proxyMethod("getSelectionManager().getPointRange"), Rn.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"), Rn.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"), Rn.proxyMethod("getSelectionManager().locationIsCursorTarget"), Rn.proxyMethod("getSelectionManager().selectionIsExpanded"), Rn.proxyMethod("delegate?.getSelectionManager"); + var kn = class extends z { + constructor(t3) { + super(...arguments), this.composition = t3, this.undoEntries = [], this.redoEntries = []; } - recordUndoEntry(t2) { + recordUndoEntry(t3) { let { context: e2, consolidatable: i2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; const n2 = this.undoEntries.slice(-1)[0]; - if (!i2 || !pi(n2, t2, e2)) { - const i3 = this.createEntry({ description: t2, context: e2 }); + if (!i2 || !Tn(n2, t3, e2)) { + const i3 = this.createEntry({ description: t3, context: e2 }); this.undoEntries.push(i3), this.redoEntries = []; } } undo() { - const t2 = this.undoEntries.pop(); - if (t2) { - const e2 = this.createEntry(t2); - return this.redoEntries.push(e2), this.composition.loadSnapshot(t2.snapshot); + const t3 = this.undoEntries.pop(); + if (t3) { + const e2 = this.createEntry(t3); + return this.redoEntries.push(e2), this.composition.loadSnapshot(t3.snapshot); } } redo() { - const t2 = this.redoEntries.pop(); - if (t2) { - const e2 = this.createEntry(t2); - return this.undoEntries.push(e2), this.composition.loadSnapshot(t2.snapshot); + const t3 = this.redoEntries.pop(); + if (t3) { + const e2 = this.createEntry(t3); + return this.undoEntries.push(e2), this.composition.loadSnapshot(t3.snapshot); } } canUndo() { @@ -11524,15 +11962,15 @@ return this.redoEntries.length > 0; } createEntry() { - let { description: t2, context: e2 } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; - return { description: null == t2 ? void 0 : t2.toString(), context: JSON.stringify(e2), snapshot: this.composition.getSnapshot() }; + let { description: t3, context: e2 } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + return { description: null == t3 ? void 0 : t3.toString(), context: JSON.stringify(e2), snapshot: this.composition.getSnapshot() }; } }; - var pi = (t2, e2, i2) => (null == t2 ? void 0 : t2.description) === (null == e2 ? void 0 : e2.toString()) && (null == t2 ? void 0 : t2.context) === JSON.stringify(i2); - var fi = "attachmentGallery"; - var bi = class { - constructor(t2) { - this.document = t2.document, this.selectedRange = t2.selectedRange; + var Tn = (t3, e2, i2) => (null == t3 ? void 0 : t3.description) === (null == e2 ? void 0 : e2.toString()) && (null == t3 ? void 0 : t3.context) === JSON.stringify(i2); + var wn = "attachmentGallery"; + var Ln = class { + constructor(t3) { + this.document = t3.document, this.selectedRange = t3.selectedRange; } perform() { return this.removeBlockAttribute(), this.applyBlockAttribute(); @@ -11541,16 +11979,16 @@ return { document: this.document, selectedRange: this.selectedRange }; } removeBlockAttribute() { - return this.findRangesOfBlocks().map((t2) => this.document = this.document.removeAttributeAtRange(fi, t2)); + return this.findRangesOfBlocks().map((t3) => this.document = this.document.removeAttributeAtRange(wn, t3)); } applyBlockAttribute() { - let t2 = 0; + let t3 = 0; this.findRangesOfPieces().forEach((e2) => { - e2[1] - e2[0] > 1 && (e2[0] += t2, e2[1] += t2, "\n" !== this.document.getCharacterAtPosition(e2[1]) && (this.document = this.document.insertBlockBreakAtRange(e2[1]), e2[1] < this.selectedRange[1] && this.moveSelectedRangeForward(), e2[1]++, t2++), 0 !== e2[0] && "\n" !== this.document.getCharacterAtPosition(e2[0] - 1) && (this.document = this.document.insertBlockBreakAtRange(e2[0]), e2[0] < this.selectedRange[0] && this.moveSelectedRangeForward(), e2[0]++, t2++), this.document = this.document.applyBlockAttributeAtRange(fi, true, e2)); + e2[1] - e2[0] > 1 && (e2[0] += t3, e2[1] += t3, "\n" !== this.document.getCharacterAtPosition(e2[1]) && (this.document = this.document.insertBlockBreakAtRange(e2[1]), e2[1] < this.selectedRange[1] && this.moveSelectedRangeForward(), e2[1]++, t3++), 0 !== e2[0] && "\n" !== this.document.getCharacterAtPosition(e2[0] - 1) && (this.document = this.document.insertBlockBreakAtRange(e2[0]), e2[0] < this.selectedRange[0] && this.moveSelectedRangeForward(), e2[0]++, t3++), this.document = this.document.applyBlockAttributeAtRange(wn, true, e2)); }); } findRangesOfBlocks() { - return this.document.findRangesForBlockAttribute(fi); + return this.document.findRangesForBlockAttribute(wn); } findRangesOfPieces() { return this.document.findRangesForTextAttribute("presentation", { withValue: "gallery" }); @@ -11559,29 +11997,29 @@ this.selectedRange[0] += 1, this.selectedRange[1] += 1; } }; - var vi = function(t2) { - const e2 = new bi(t2); + var Dn = function(t3) { + const e2 = new Ln(t3); return e2.perform(), e2.getSnapshot(); }; - var Ai = [vi]; - var xi = class { - constructor(t2, e2, i2) { - this.insertFiles = this.insertFiles.bind(this), this.composition = t2, this.selectionManager = e2, this.element = i2, this.undoManager = new mi(this.composition), this.filters = Ai.slice(0); + var Nn = [Dn]; + var In = class { + constructor(t3, e2, i2) { + this.insertFiles = this.insertFiles.bind(this), this.composition = t3, this.selectionManager = e2, this.element = i2, this.undoManager = new kn(this.composition), this.filters = Nn.slice(0); } - loadDocument(t2) { - return this.loadSnapshot({ document: t2, selectedRange: [0, 0] }); + loadDocument(t3) { + return this.loadSnapshot({ document: t3, selectedRange: [0, 0] }); } loadHTML() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; - const e2 = Xe.parse(t2, { referenceElement: this.element }).getDocument(); + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; + const e2 = ln.parse(t3, { referenceElement: this.element }).getDocument(); return this.loadDocument(e2); } - loadJSON(t2) { - let { document: e2, selectedRange: i2 } = t2; - return e2 = Je.fromJSON(e2), this.loadSnapshot({ document: e2, selectedRange: i2 }); + loadJSON(t3) { + let { document: e2, selectedRange: i2 } = t3; + return e2 = rn.fromJSON(e2), this.loadSnapshot({ document: e2, selectedRange: i2 }); } - loadSnapshot(t2) { - return this.undoManager = new mi(this.composition), this.composition.loadSnapshot(t2); + loadSnapshot(t3) { + return this.undoManager = new kn(this.composition), this.composition.loadSnapshot(t3); } getDocument() { return this.composition.document; @@ -11595,32 +12033,32 @@ toJSON() { return this.getSnapshot(); } - deleteInDirection(t2) { - return this.composition.deleteInDirection(t2); + deleteInDirection(t3) { + return this.composition.deleteInDirection(t3); } - insertAttachment(t2) { - return this.composition.insertAttachment(t2); + insertAttachment(t3) { + return this.composition.insertAttachment(t3); } - insertAttachments(t2) { - return this.composition.insertAttachments(t2); + insertAttachments(t3) { + return this.composition.insertAttachments(t3); } - insertDocument(t2) { - return this.composition.insertDocument(t2); + insertDocument(t3) { + return this.composition.insertDocument(t3); } - insertFile(t2) { - return this.composition.insertFile(t2); + insertFile(t3) { + return this.composition.insertFile(t3); } - insertFiles(t2) { - return this.composition.insertFiles(t2); + insertFiles(t3) { + return this.composition.insertFiles(t3); } - insertHTML(t2) { - return this.composition.insertHTML(t2); + insertHTML(t3) { + return this.composition.insertHTML(t3); } - insertString(t2) { - return this.composition.insertString(t2); + insertString(t3) { + return this.composition.insertString(t3); } - insertText(t2) { - return this.composition.insertText(t2); + insertText(t3) { + return this.composition.insertText(t3); } insertLineBreak() { return this.composition.insertLineBreak(); @@ -11631,34 +12069,34 @@ getPosition() { return this.composition.getPosition(); } - getClientRectAtPosition(t2) { - const e2 = this.getDocument().locationRangeFromRange([t2, t2 + 1]); + getClientRectAtPosition(t3) { + const e2 = this.getDocument().locationRangeFromRange([t3, t3 + 1]); return this.selectionManager.getClientRectAtLocationRange(e2); } - expandSelectionInDirection(t2) { - return this.composition.expandSelectionInDirection(t2); + expandSelectionInDirection(t3) { + return this.composition.expandSelectionInDirection(t3); } - moveCursorInDirection(t2) { - return this.composition.moveCursorInDirection(t2); + moveCursorInDirection(t3) { + return this.composition.moveCursorInDirection(t3); } - setSelectedRange(t2) { - return this.composition.setSelectedRange(t2); + setSelectedRange(t3) { + return this.composition.setSelectedRange(t3); } - activateAttribute(t2) { + activateAttribute(t3) { let e2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; - return this.composition.setCurrentAttribute(t2, e2); + return this.composition.setCurrentAttribute(t3, e2); } - attributeIsActive(t2) { - return this.composition.hasCurrentAttribute(t2); + attributeIsActive(t3) { + return this.composition.hasCurrentAttribute(t3); } - canActivateAttribute(t2) { - return this.composition.canSetCurrentAttribute(t2); + canActivateAttribute(t3) { + return this.composition.canSetCurrentAttribute(t3); } - deactivateAttribute(t2) { - return this.composition.removeCurrentAttribute(t2); + deactivateAttribute(t3) { + return this.composition.removeCurrentAttribute(t3); } - setHTMLAtributeAtPosition(t2, e2, i2) { - this.composition.setHTMLAtributeAtPosition(t2, e2, i2); + setHTMLAtributeAtPosition(t3, e2, i2) { + this.composition.setHTMLAtributeAtPosition(t3, e2, i2); } canDecreaseNestingLevel() { return this.composition.canDecreaseNestingLevel(); @@ -11680,9 +12118,9 @@ canUndo() { return this.undoManager.canUndo(); } - recordUndoEntry(t2) { + recordUndoEntry(t3) { let { context: e2, consolidatable: i2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - return this.undoManager.recordUndoEntry(t2, { context: e2, consolidatable: i2 }); + return this.undoManager.recordUndoEntry(t3, { context: e2, consolidatable: i2 }); } redo() { if (this.canRedo()) @@ -11693,83 +12131,83 @@ return this.undoManager.undo(); } }; - var yi = class { - constructor(t2) { - this.element = t2; + var On = class { + constructor(t3) { + this.element = t3; } - findLocationFromContainerAndOffset(t2, e2) { + findLocationFromContainerAndOffset(t3, e2) { let { strict: i2 } = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { strict: true }, n2 = 0, r2 = false; - const o2 = { index: 0, offset: 0 }, s2 = this.findAttachmentElementParentForNode(t2); - s2 && (t2 = s2.parentNode, e2 = C(s2)); - const a2 = R(this.element, { usingFilter: Ei }); + const o2 = { index: 0, offset: 0 }, s2 = this.findAttachmentElementParentForNode(t3); + s2 && (t3 = s2.parentNode, e2 = C(s2)); + const a2 = S(this.element, { usingFilter: Bn }); for (; a2.nextNode(); ) { const s3 = a2.currentNode; - if (s3 === t2 && O(t2)) { - P(s3) || (o2.offset += e2); + if (s3 === t3 && M(t3)) { + O(s3) || (o2.offset += e2); break; } - if (s3.parentNode === t2) { + if (s3.parentNode === t3) { if (n2++ === e2) break; - } else if (!y(t2, s3) && n2 > 0) + } else if (!x(t3, s3) && n2 > 0) break; - T(s3, { strict: i2 }) ? (r2 && o2.index++, o2.offset = 0, r2 = true) : o2.offset += Ci(s3); + D(s3, { strict: i2 }) ? (r2 && o2.index++, o2.offset = 0, r2 = true) : o2.offset += Pn(s3); } return o2; } - findContainerAndOffsetFromLocation(t2) { + findContainerAndOffsetFromLocation(t3) { let e2, i2; - if (0 === t2.index && 0 === t2.offset) { + if (0 === t3.index && 0 === t3.offset) { for (e2 = this.element, i2 = 0; e2.firstChild; ) - if (e2 = e2.firstChild, w(e2)) { + if (e2 = e2.firstChild, L(e2)) { i2 = 1; break; } return [e2, i2]; } - let [n2, r2] = this.findNodeAndOffsetFromLocation(t2); + let [n2, r2] = this.findNodeAndOffsetFromLocation(t3); if (n2) { - if (O(n2)) - 0 === Ci(n2) ? (e2 = n2.parentNode.parentNode, i2 = C(n2.parentNode), P(n2, { name: "right" }) && i2++) : (e2 = n2, i2 = t2.offset - r2); + if (M(n2)) + 0 === Pn(n2) ? (e2 = n2.parentNode.parentNode, i2 = C(n2.parentNode), O(n2, { name: "right" }) && i2++) : (e2 = n2, i2 = t3.offset - r2); else { - if (e2 = n2.parentNode, !T(n2.previousSibling) && !w(e2)) - for (; n2 === e2.lastChild && (n2 = e2, e2 = e2.parentNode, !w(e2)); ) + if (e2 = n2.parentNode, !D(n2.previousSibling) && !L(e2)) + for (; n2 === e2.lastChild && (n2 = e2, e2 = e2.parentNode, !L(e2)); ) ; - i2 = C(n2), 0 !== t2.offset && i2++; + i2 = C(n2), 0 !== t3.offset && i2++; } return [e2, i2]; } } - findNodeAndOffsetFromLocation(t2) { + findNodeAndOffsetFromLocation(t3) { let e2, i2, n2 = 0; - for (const r2 of this.getSignificantNodesForIndex(t2.index)) { - const o2 = Ci(r2); - if (t2.offset <= n2 + o2) - if (O(r2)) { - if (e2 = r2, i2 = n2, t2.offset === i2 && P(e2)) + for (const r2 of this.getSignificantNodesForIndex(t3.index)) { + const o2 = Pn(r2); + if (t3.offset <= n2 + o2) + if (M(r2)) { + if (e2 = r2, i2 = n2, t3.offset === i2 && O(e2)) break; } else e2 || (e2 = r2, i2 = n2); - if (n2 += o2, n2 > t2.offset) + if (n2 += o2, n2 > t3.offset) break; } return [e2, i2]; } - findAttachmentElementParentForNode(t2) { - for (; t2 && t2 !== this.element; ) { - if (I(t2)) - return t2; - t2 = t2.parentNode; + findAttachmentElementParentForNode(t3) { + for (; t3 && t3 !== this.element; ) { + if (P(t3)) + return t3; + t3 = t3.parentNode; } } - getSignificantNodesForIndex(t2) { - const e2 = [], i2 = R(this.element, { usingFilter: ki }); + getSignificantNodesForIndex(t3) { + const e2 = [], i2 = S(this.element, { usingFilter: Fn }); let n2 = false; for (; i2.nextNode(); ) { const o2 = i2.currentNode; var r2; - if (B(o2)) { - if (null != r2 ? r2++ : r2 = 0, r2 === t2) + if (N(o2)) { + if (null != r2 ? r2++ : r2 = 0, r2 === t3) n2 = true; else if (n2) break; @@ -11779,263 +12217,263 @@ return e2; } }; - var Ci = function(t2) { - if (t2.nodeType === Node.TEXT_NODE) { - if (P(t2)) + var Pn = function(t3) { + if (t3.nodeType === Node.TEXT_NODE) { + if (O(t3)) return 0; - return t2.textContent.length; + return t3.textContent.length; } - return "br" === E(t2) || I(t2) ? 1 : 0; + return "br" === R(t3) || P(t3) ? 1 : 0; }; - var ki = function(t2) { - return Ri(t2) === NodeFilter.FILTER_ACCEPT ? Ei(t2) : NodeFilter.FILTER_REJECT; + var Fn = function(t3) { + return Mn(t3) === NodeFilter.FILTER_ACCEPT ? Bn(t3) : NodeFilter.FILTER_REJECT; }; - var Ri = function(t2) { - return N(t2) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; + var Mn = function(t3) { + return F(t3) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; }; - var Ei = function(t2) { - return I(t2.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; + var Bn = function(t3) { + return P(t3.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; }; - var Si = class { - createDOMRangeFromPoint(t2) { - let e2, { x: i2, y: n2 } = t2; + var _n = class { + createDOMRangeFromPoint(t3) { + let e2, { x: i2, y: n2 } = t3; if (document.caretPositionFromPoint) { - const { offsetNode: t3, offset: r2 } = document.caretPositionFromPoint(i2, n2); - return e2 = document.createRange(), e2.setStart(t3, r2), e2; + const { offsetNode: t4, offset: r2 } = document.caretPositionFromPoint(i2, n2); + return e2 = document.createRange(), e2.setStart(t4, r2), e2; } if (document.caretRangeFromPoint) return document.caretRangeFromPoint(i2, n2); if (document.body.createTextRange) { - const t3 = Nt(); + const t4 = Ft(); try { - const t4 = document.body.createTextRange(); - t4.moveToPoint(i2, n2), t4.select(); - } catch (t4) { + const t5 = document.body.createTextRange(); + t5.moveToPoint(i2, n2), t5.select(); + } catch (t5) { } - return e2 = Nt(), Ot(t3), e2; + return e2 = Ft(), Mt(t4), e2; } } - getClientRectsForDOMRange(t2) { - const e2 = Array.from(t2.getClientRects()); + getClientRectsForDOMRange(t3) { + const e2 = Array.from(t3.getClientRects()); return [e2[0], e2[e2.length - 1]]; } }; - var Li = class extends H { - constructor(t2) { - super(...arguments), this.didMouseDown = this.didMouseDown.bind(this), this.selectionDidChange = this.selectionDidChange.bind(this), this.element = t2, this.locationMapper = new yi(this.element), this.pointMapper = new Si(), this.lockCount = 0, f("mousedown", { onElement: this.element, withCallback: this.didMouseDown }); + var jn = class extends z { + constructor(t3) { + super(...arguments), this.didMouseDown = this.didMouseDown.bind(this), this.selectionDidChange = this.selectionDidChange.bind(this), this.element = t3, this.locationMapper = new On(this.element), this.pointMapper = new _n(), this.lockCount = 0, f("mousedown", { onElement: this.element, withCallback: this.didMouseDown }); } getLocationRange() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; - return false === t2.strict ? this.createLocationRangeFromDOMRange(Nt()) : t2.ignoreLock ? this.currentLocationRange : this.lockedLocationRange ? this.lockedLocationRange : this.currentLocationRange; + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + return false === t3.strict ? this.createLocationRangeFromDOMRange(Ft()) : t3.ignoreLock ? this.currentLocationRange : this.lockedLocationRange ? this.lockedLocationRange : this.currentLocationRange; } - setLocationRange(t2) { + setLocationRange(t3) { if (this.lockedLocationRange) return; - t2 = Lt(t2); - const e2 = this.createDOMRangeFromLocationRange(t2); - e2 && (Ot(e2), this.updateCurrentLocationRange(t2)); + t3 = Tt(t3); + const e2 = this.createDOMRangeFromLocationRange(t3); + e2 && (Mt(e2), this.updateCurrentLocationRange(t3)); } - setLocationRangeFromPointRange(t2) { - t2 = Lt(t2); - const e2 = this.getLocationAtPoint(t2[0]), i2 = this.getLocationAtPoint(t2[1]); + setLocationRangeFromPointRange(t3) { + t3 = Tt(t3); + const e2 = this.getLocationAtPoint(t3[0]), i2 = this.getLocationAtPoint(t3[1]); this.setLocationRange([e2, i2]); } - getClientRectAtLocationRange(t2) { - const e2 = this.createDOMRangeFromLocationRange(t2); + getClientRectAtLocationRange(t3) { + const e2 = this.createDOMRangeFromLocationRange(t3); if (e2) return this.getClientRectsForDOMRange(e2)[1]; } - locationIsCursorTarget(t2) { - const e2 = Array.from(this.findNodeAndOffsetFromLocation(t2))[0]; - return P(e2); + locationIsCursorTarget(t3) { + const e2 = Array.from(this.findNodeAndOffsetFromLocation(t3))[0]; + return O(e2); } lock() { 0 == this.lockCount++ && (this.updateCurrentLocationRange(), this.lockedLocationRange = this.getLocationRange()); } unlock() { if (0 == --this.lockCount) { - const { lockedLocationRange: t2 } = this; - if (this.lockedLocationRange = null, null != t2) - return this.setLocationRange(t2); + const { lockedLocationRange: t3 } = this; + if (this.lockedLocationRange = null, null != t3) + return this.setLocationRange(t3); } } clearSelection() { - var t2; - return null === (t2 = It()) || void 0 === t2 ? void 0 : t2.removeAllRanges(); + var t3; + return null === (t3 = Pt()) || void 0 === t3 ? void 0 : t3.removeAllRanges(); } selectionIsCollapsed() { - var t2; - return true === (null === (t2 = Nt()) || void 0 === t2 ? void 0 : t2.collapsed); + var t3; + return true === (null === (t3 = Ft()) || void 0 === t3 ? void 0 : t3.collapsed); } selectionIsExpanded() { return !this.selectionIsCollapsed(); } - createLocationRangeFromDOMRange(t2, e2) { - if (null == t2 || !this.domRangeWithinElement(t2)) + createLocationRangeFromDOMRange(t3, e2) { + if (null == t3 || !this.domRangeWithinElement(t3)) return; - const i2 = this.findLocationFromContainerAndOffset(t2.startContainer, t2.startOffset, e2); + const i2 = this.findLocationFromContainerAndOffset(t3.startContainer, t3.startOffset, e2); if (!i2) return; - const n2 = t2.collapsed ? void 0 : this.findLocationFromContainerAndOffset(t2.endContainer, t2.endOffset, e2); - return Lt([i2, n2]); + const n2 = t3.collapsed ? void 0 : this.findLocationFromContainerAndOffset(t3.endContainer, t3.endOffset, e2); + return Tt([i2, n2]); } didMouseDown() { return this.pauseTemporarily(); } pauseTemporarily() { - let t2; + let t3; this.paused = true; const e2 = () => { - if (this.paused = false, clearTimeout(i2), Array.from(t2).forEach((t3) => { - t3.destroy(); - }), y(document, this.element)) + if (this.paused = false, clearTimeout(i2), Array.from(t3).forEach((t4) => { + t4.destroy(); + }), x(document, this.element)) return this.selectionDidChange(); }, i2 = setTimeout(e2, 200); - t2 = ["mousemove", "keydown"].map((t3) => f(t3, { onElement: document, withCallback: e2 })); + t3 = ["mousemove", "keydown"].map((t4) => f(t4, { onElement: document, withCallback: e2 })); } selectionDidChange() { - if (!this.paused && !x(this.element)) + if (!this.paused && !y(this.element)) return this.updateCurrentLocationRange(); } - updateCurrentLocationRange(t2) { + updateCurrentLocationRange(t3) { var e2, i2; - if ((null != t2 ? t2 : t2 = this.createLocationRangeFromDOMRange(Nt())) && !wt(t2, this.currentLocationRange)) - return this.currentLocationRange = t2, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.locationRangeDidChange) || void 0 === i2 ? void 0 : i2.call(e2, this.currentLocationRange.slice(0)); + if ((null != t3 ? t3 : t3 = this.createLocationRangeFromDOMRange(Ft())) && !Lt(t3, this.currentLocationRange)) + return this.currentLocationRange = t3, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.locationRangeDidChange) || void 0 === i2 ? void 0 : i2.call(e2, this.currentLocationRange.slice(0)); } - createDOMRangeFromLocationRange(t2) { - const e2 = this.findContainerAndOffsetFromLocation(t2[0]), i2 = Dt(t2) ? e2 : this.findContainerAndOffsetFromLocation(t2[1]) || e2; + createDOMRangeFromLocationRange(t3) { + const e2 = this.findContainerAndOffsetFromLocation(t3[0]), i2 = wt(t3) ? e2 : this.findContainerAndOffsetFromLocation(t3[1]) || e2; if (null != e2 && null != i2) { - const t3 = document.createRange(); - return t3.setStart(...Array.from(e2 || [])), t3.setEnd(...Array.from(i2 || [])), t3; + const t4 = document.createRange(); + return t4.setStart(...Array.from(e2 || [])), t4.setEnd(...Array.from(i2 || [])), t4; } } - getLocationAtPoint(t2) { - const e2 = this.createDOMRangeFromPoint(t2); + getLocationAtPoint(t3) { + const e2 = this.createDOMRangeFromPoint(t3); var i2; if (e2) return null === (i2 = this.createLocationRangeFromDOMRange(e2)) || void 0 === i2 ? void 0 : i2[0]; } - domRangeWithinElement(t2) { - return t2.collapsed ? y(this.element, t2.startContainer) : y(this.element, t2.startContainer) && y(this.element, t2.endContainer); + domRangeWithinElement(t3) { + return t3.collapsed ? x(this.element, t3.startContainer) : x(this.element, t3.startContainer) && x(this.element, t3.endContainer); } }; - Li.proxyMethod("locationMapper.findLocationFromContainerAndOffset"), Li.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"), Li.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"), Li.proxyMethod("pointMapper.createDOMRangeFromPoint"), Li.proxyMethod("pointMapper.getClientRectsForDOMRange"); - var Di = Object.freeze({ __proto__: null, Attachment: De, AttachmentManager: hi, AttachmentPiece: we, Block: Oe, Composition: gi, Document: Je, Editor: xi, HTMLParser: Xe, HTMLSanitizer: se, LineBreakInsertion: di, LocationMapper: yi, ManagedAttachment: ui, Piece: Se, PointMapper: Si, SelectionManager: Li, SplittableList: Be, StringPiece: Te, Text: Ne, UndoManager: mi }); - var wi = Object.freeze({ __proto__: null, ObjectView: ee, AttachmentView: ce, BlockView: be, DocumentView: ve, PieceView: ge, PreviewableAttachmentView: de, TextView: me }); - var { lang: Ti, css: Bi, keyNames: Fi } = V; - var Pi = function(t2) { + jn.proxyMethod("locationMapper.findLocationFromContainerAndOffset"), jn.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"), jn.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"), jn.proxyMethod("pointMapper.createDOMRangeFromPoint"), jn.proxyMethod("pointMapper.getClientRectsForDOMRange"); + var Wn = Object.freeze({ __proto__: null, Attachment: ji, AttachmentManager: En, AttachmentPiece: Wi, Block: Ki, Composition: Rn, Document: rn, Editor: In, HTMLParser: ln, HTMLSanitizer: ci, LineBreakInsertion: Sn, LocationMapper: On, ManagedAttachment: Cn, Piece: Bi, PointMapper: _n, SelectionManager: jn, SplittableList: Vi, StringPiece: Ui, Text: Ji, UndoManager: kn }); + var Un = Object.freeze({ __proto__: null, ObjectView: ee, AttachmentView: di, BlockView: yi, DocumentView: xi, PieceView: fi, PreviewableAttachmentView: pi, TextView: bi }); + var { lang: Vn, css: zn, keyNames: qn } = V; + var Hn = function(t3) { return function() { - const e2 = t2.apply(this, arguments); + const e2 = t3.apply(this, arguments); e2.do(), this.undos || (this.undos = []), this.undos.push(e2.undo); }; }; - var Ii = class extends H { - constructor(t2, e2, i2) { + var Jn = class extends z { + constructor(t3, e2, i2) { let n2 = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}; - super(...arguments), Re(this, "makeElementMutable", Pi(() => ({ do: () => { + super(...arguments), Ti(this, "makeElementMutable", Hn(() => ({ do: () => { this.element.dataset.trixMutable = true; - }, undo: () => delete this.element.dataset.trixMutable }))), Re(this, "addToolbar", Pi(() => { - const t3 = S({ tagName: "div", className: Bi.attachmentToolbar, data: { trixMutable: true }, childNodes: S({ tagName: "div", className: "trix-button-row", childNodes: S({ tagName: "span", className: "trix-button-group trix-button-group--actions", childNodes: S({ tagName: "button", className: "trix-button trix-button--remove", textContent: Ti.remove, attributes: { title: Ti.remove }, data: { trixAction: "remove" } }) }) }) }); - return this.attachment.isPreviewable() && t3.appendChild(S({ tagName: "div", className: Bi.attachmentMetadataContainer, childNodes: S({ tagName: "span", className: Bi.attachmentMetadata, childNodes: [S({ tagName: "span", className: Bi.attachmentName, textContent: this.attachment.getFilename(), attributes: { title: this.attachment.getFilename() } }), S({ tagName: "span", className: Bi.attachmentSize, textContent: this.attachment.getFormattedFilesize() })] }) })), f("click", { onElement: t3, withCallback: this.didClickToolbar }), f("click", { onElement: t3, matchingSelector: "[data-trix-action]", withCallback: this.didClickActionButton }), b("trix-attachment-before-toolbar", { onElement: this.element, attributes: { toolbar: t3, attachment: this.attachment } }), { do: () => this.element.appendChild(t3), undo: () => k(t3) }; - })), Re(this, "installCaptionEditor", Pi(() => { - const t3 = S({ tagName: "textarea", className: Bi.attachmentCaptionEditor, attributes: { placeholder: Ti.captionPlaceholder }, data: { trixMutable: true } }); - t3.value = this.attachmentPiece.getCaption(); - const e3 = t3.cloneNode(); + }, undo: () => delete this.element.dataset.trixMutable }))), Ti(this, "addToolbar", Hn(() => { + const t4 = k({ tagName: "div", className: zn.attachmentToolbar, data: { trixMutable: true }, childNodes: k({ tagName: "div", className: "trix-button-row", childNodes: k({ tagName: "span", className: "trix-button-group trix-button-group--actions", childNodes: k({ tagName: "button", className: "trix-button trix-button--remove", textContent: Vn.remove, attributes: { title: Vn.remove }, data: { trixAction: "remove" } }) }) }) }); + return this.attachment.isPreviewable() && t4.appendChild(k({ tagName: "div", className: zn.attachmentMetadataContainer, childNodes: k({ tagName: "span", className: zn.attachmentMetadata, childNodes: [k({ tagName: "span", className: zn.attachmentName, textContent: this.attachment.getFilename(), attributes: { title: this.attachment.getFilename() } }), k({ tagName: "span", className: zn.attachmentSize, textContent: this.attachment.getFormattedFilesize() })] }) })), f("click", { onElement: t4, withCallback: this.didClickToolbar }), f("click", { onElement: t4, matchingSelector: "[data-trix-action]", withCallback: this.didClickActionButton }), b("trix-attachment-before-toolbar", { onElement: this.element, attributes: { toolbar: t4, attachment: this.attachment } }), { do: () => this.element.appendChild(t4), undo: () => E(t4) }; + })), Ti(this, "installCaptionEditor", Hn(() => { + const t4 = k({ tagName: "textarea", className: zn.attachmentCaptionEditor, attributes: { placeholder: Vn.captionPlaceholder }, data: { trixMutable: true } }); + t4.value = this.attachmentPiece.getCaption(); + const e3 = t4.cloneNode(); e3.classList.add("trix-autoresize-clone"), e3.tabIndex = -1; const i3 = function() { - e3.value = t3.value, t3.style.height = e3.scrollHeight + "px"; + e3.value = t4.value, t4.style.height = e3.scrollHeight + "px"; }; - f("input", { onElement: t3, withCallback: i3 }), f("input", { onElement: t3, withCallback: this.didInputCaption }), f("keydown", { onElement: t3, withCallback: this.didKeyDownCaption }), f("change", { onElement: t3, withCallback: this.didChangeCaption }), f("blur", { onElement: t3, withCallback: this.didBlurCaption }); + f("input", { onElement: t4, withCallback: i3 }), f("input", { onElement: t4, withCallback: this.didInputCaption }), f("keydown", { onElement: t4, withCallback: this.didKeyDownCaption }), f("change", { onElement: t4, withCallback: this.didChangeCaption }), f("blur", { onElement: t4, withCallback: this.didBlurCaption }); const n3 = this.element.querySelector("figcaption"), r2 = n3.cloneNode(); return { do: () => { - if (n3.style.display = "none", r2.appendChild(t3), r2.appendChild(e3), r2.classList.add("".concat(Bi.attachmentCaption, "--editing")), n3.parentElement.insertBefore(r2, n3), i3(), this.options.editCaption) - return Rt(() => t3.focus()); + if (n3.style.display = "none", r2.appendChild(t4), r2.appendChild(e3), r2.classList.add("".concat(zn.attachmentCaption, "--editing")), n3.parentElement.insertBefore(r2, n3), i3(), this.options.editCaption) + return St(() => t4.focus()); }, undo() { - k(r2), n3.style.display = null; + E(r2), n3.style.display = null; } }; - })), this.didClickToolbar = this.didClickToolbar.bind(this), this.didClickActionButton = this.didClickActionButton.bind(this), this.didKeyDownCaption = this.didKeyDownCaption.bind(this), this.didInputCaption = this.didInputCaption.bind(this), this.didChangeCaption = this.didChangeCaption.bind(this), this.didBlurCaption = this.didBlurCaption.bind(this), this.attachmentPiece = t2, this.element = e2, this.container = i2, this.options = n2, this.attachment = this.attachmentPiece.attachment, "a" === E(this.element) && (this.element = this.element.firstChild), this.install(); + })), this.didClickToolbar = this.didClickToolbar.bind(this), this.didClickActionButton = this.didClickActionButton.bind(this), this.didKeyDownCaption = this.didKeyDownCaption.bind(this), this.didInputCaption = this.didInputCaption.bind(this), this.didChangeCaption = this.didChangeCaption.bind(this), this.didBlurCaption = this.didBlurCaption.bind(this), this.attachmentPiece = t3, this.element = e2, this.container = i2, this.options = n2, this.attachment = this.attachmentPiece.attachment, "a" === R(this.element) && (this.element = this.element.firstChild), this.install(); } install() { this.makeElementMutable(), this.addToolbar(), this.attachment.isPreviewable() && this.installCaptionEditor(); } uninstall() { - var t2; + var t3; let e2 = this.undos.pop(); for (this.savePendingCaption(); e2; ) e2(), e2 = this.undos.pop(); - null === (t2 = this.delegate) || void 0 === t2 || t2.didUninstallAttachmentEditor(this); + null === (t3 = this.delegate) || void 0 === t3 || t3.didUninstallAttachmentEditor(this); } savePendingCaption() { if (null != this.pendingCaption) { const r2 = this.pendingCaption; - var t2, e2, i2, n2; + var t3, e2, i2, n2; if (this.pendingCaption = null, r2) - null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.attachmentEditorDidRequestUpdatingAttributesForAttachment) || void 0 === e2 || e2.call(t2, { caption: r2 }, this.attachment); + null === (t3 = this.delegate) || void 0 === t3 || null === (e2 = t3.attachmentEditorDidRequestUpdatingAttributesForAttachment) || void 0 === e2 || e2.call(t3, { caption: r2 }, this.attachment); else null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.attachmentEditorDidRequestRemovingAttributeForAttachment) || void 0 === n2 || n2.call(i2, "caption", this.attachment); } } - didClickToolbar(t2) { - return t2.preventDefault(), t2.stopPropagation(); + didClickToolbar(t3) { + return t3.preventDefault(), t3.stopPropagation(); } - didClickActionButton(t2) { + didClickActionButton(t3) { var e2; - if ("remove" === t2.target.getAttribute("data-trix-action")) + if ("remove" === t3.target.getAttribute("data-trix-action")) return null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.attachmentEditorDidRequestRemovalOfAttachment(this.attachment); } - didKeyDownCaption(t2) { + didKeyDownCaption(t3) { var e2, i2; - if ("return" === Fi[t2.keyCode]) - return t2.preventDefault(), this.savePendingCaption(), null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentEditorDidRequestDeselectingAttachment) || void 0 === i2 ? void 0 : i2.call(e2, this.attachment); + if ("return" === qn[t3.keyCode]) + return t3.preventDefault(), this.savePendingCaption(), null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentEditorDidRequestDeselectingAttachment) || void 0 === i2 ? void 0 : i2.call(e2, this.attachment); } - didInputCaption(t2) { - this.pendingCaption = t2.target.value.replace(/\s/g, " ").trim(); + didInputCaption(t3) { + this.pendingCaption = t3.target.value.replace(/\s/g, " ").trim(); } - didChangeCaption(t2) { + didChangeCaption(t3) { return this.savePendingCaption(); } - didBlurCaption(t2) { + didBlurCaption(t3) { return this.savePendingCaption(); } }; - var Ni = class extends H { - constructor(t2, i2) { - super(...arguments), this.didFocus = this.didFocus.bind(this), this.didBlur = this.didBlur.bind(this), this.didClickAttachment = this.didClickAttachment.bind(this), this.element = t2, this.composition = i2, this.documentView = new ve(this.composition.document, { element: this.element }), f("focus", { onElement: this.element, withCallback: this.didFocus }), f("blur", { onElement: this.element, withCallback: this.didBlur }), f("click", { onElement: this.element, matchingSelector: "a[contenteditable=false]", preventDefault: true }), f("mousedown", { onElement: this.element, matchingSelector: e, withCallback: this.didClickAttachment }), f("click", { onElement: this.element, matchingSelector: "a".concat(e), preventDefault: true }); + var Kn = class extends z { + constructor(t3, i2) { + super(...arguments), this.didFocus = this.didFocus.bind(this), this.didBlur = this.didBlur.bind(this), this.didClickAttachment = this.didClickAttachment.bind(this), this.element = t3, this.composition = i2, this.documentView = new xi(this.composition.document, { element: this.element }), f("focus", { onElement: this.element, withCallback: this.didFocus }), f("blur", { onElement: this.element, withCallback: this.didBlur }), f("click", { onElement: this.element, matchingSelector: "a[contenteditable=false]", preventDefault: true }), f("mousedown", { onElement: this.element, matchingSelector: e, withCallback: this.didClickAttachment }), f("click", { onElement: this.element, matchingSelector: "a".concat(e), preventDefault: true }); } - didFocus(t2) { + didFocus(t3) { var e2; const i2 = () => { - var t3, e3; + var t4, e3; if (!this.focused) - return this.focused = true, null === (t3 = this.delegate) || void 0 === t3 || null === (e3 = t3.compositionControllerDidFocus) || void 0 === e3 ? void 0 : e3.call(t3); + return this.focused = true, null === (t4 = this.delegate) || void 0 === t4 || null === (e3 = t4.compositionControllerDidFocus) || void 0 === e3 ? void 0 : e3.call(t4); }; return (null === (e2 = this.blurPromise) || void 0 === e2 ? void 0 : e2.then(i2)) || i2(); } - didBlur(t2) { - this.blurPromise = new Promise((t3) => Rt(() => { + didBlur(t3) { + this.blurPromise = new Promise((t4) => St(() => { var e2, i2; - x(this.element) || (this.focused = null, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionControllerDidBlur) || void 0 === i2 || i2.call(e2)); - return this.blurPromise = null, t3(); + y(this.element) || (this.focused = null, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionControllerDidBlur) || void 0 === i2 || i2.call(e2)); + return this.blurPromise = null, t4(); })); } - didClickAttachment(t2, e2) { + didClickAttachment(t3, e2) { var i2, n2; - const r2 = this.findAttachmentForElement(e2), o2 = !!A(t2.target, { matchingSelector: "figcaption" }); + const r2 = this.findAttachmentForElement(e2), o2 = !!A(t3.target, { matchingSelector: "figcaption" }); return null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionControllerDidSelectAttachment) || void 0 === n2 ? void 0 : n2.call(i2, r2, { editCaption: o2 }); } getSerializableElement() { return this.isEditingAttachment() ? this.documentView.shadowElement : this.element; } render() { - var t2, e2, i2, n2, r2, o2; + var t3, e2, i2, n2, r2, o2; (this.revision !== this.composition.revision && (this.documentView.setDocument(this.composition.document), this.documentView.render(), this.revision = this.composition.revision), this.canSyncDocumentView() && !this.documentView.isSynced()) && (null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionControllerWillSyncDocumentView) || void 0 === n2 || n2.call(i2), this.documentView.sync(), null === (r2 = this.delegate) || void 0 === r2 || null === (o2 = r2.compositionControllerDidSyncDocumentView) || void 0 === o2 || o2.call(r2)); - return null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.compositionControllerDidRender) || void 0 === e2 ? void 0 : e2.call(t2); + return null === (t3 = this.delegate) || void 0 === t3 || null === (e2 = t3.compositionControllerDidRender) || void 0 === e2 ? void 0 : e2.call(t3); } - rerenderViewForObject(t2) { - return this.invalidateViewForObject(t2), this.render(); + rerenderViewForObject(t3) { + return this.invalidateViewForObject(t3), this.render(); } - invalidateViewForObject(t2) { - return this.documentView.invalidateViewForObject(t2); + invalidateViewForObject(t3) { + return this.documentView.invalidateViewForObject(t3); } isViewCachingEnabled() { return this.documentView.isViewCachingEnabled(); @@ -12052,98 +12490,98 @@ isEditingAttachment() { return !!this.attachmentEditor; } - installAttachmentEditorForAttachment(t2, e2) { + installAttachmentEditorForAttachment(t3, e2) { var i2; - if ((null === (i2 = this.attachmentEditor) || void 0 === i2 ? void 0 : i2.attachment) === t2) + if ((null === (i2 = this.attachmentEditor) || void 0 === i2 ? void 0 : i2.attachment) === t3) return; - const n2 = this.documentView.findElementForObject(t2); + const n2 = this.documentView.findElementForObject(t3); if (!n2) return; this.uninstallAttachmentEditor(); - const r2 = this.composition.document.getAttachmentPieceForAttachment(t2); - this.attachmentEditor = new Ii(r2, n2, this.element, e2), this.attachmentEditor.delegate = this; + const r2 = this.composition.document.getAttachmentPieceForAttachment(t3); + this.attachmentEditor = new Jn(r2, n2, this.element, e2), this.attachmentEditor.delegate = this; } uninstallAttachmentEditor() { - var t2; - return null === (t2 = this.attachmentEditor) || void 0 === t2 ? void 0 : t2.uninstall(); + var t3; + return null === (t3 = this.attachmentEditor) || void 0 === t3 ? void 0 : t3.uninstall(); } didUninstallAttachmentEditor() { return this.attachmentEditor = null, this.render(); } - attachmentEditorDidRequestUpdatingAttributesForAttachment(t2, e2) { + attachmentEditorDidRequestUpdatingAttributesForAttachment(t3, e2) { var i2, n2; - return null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionControllerWillUpdateAttachment) || void 0 === n2 || n2.call(i2, e2), this.composition.updateAttributesForAttachment(t2, e2); + return null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionControllerWillUpdateAttachment) || void 0 === n2 || n2.call(i2, e2), this.composition.updateAttributesForAttachment(t3, e2); } - attachmentEditorDidRequestRemovingAttributeForAttachment(t2, e2) { + attachmentEditorDidRequestRemovingAttributeForAttachment(t3, e2) { var i2, n2; - return null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionControllerWillUpdateAttachment) || void 0 === n2 || n2.call(i2, e2), this.composition.removeAttributeForAttachment(t2, e2); + return null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionControllerWillUpdateAttachment) || void 0 === n2 || n2.call(i2, e2), this.composition.removeAttributeForAttachment(t3, e2); } - attachmentEditorDidRequestRemovalOfAttachment(t2) { + attachmentEditorDidRequestRemovalOfAttachment(t3) { var e2, i2; - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionControllerDidRequestRemovalOfAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t2); + return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionControllerDidRequestRemovalOfAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t3); } - attachmentEditorDidRequestDeselectingAttachment(t2) { + attachmentEditorDidRequestDeselectingAttachment(t3) { var e2, i2; - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionControllerDidRequestDeselectingAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t2); + return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionControllerDidRequestDeselectingAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t3); } canSyncDocumentView() { return !this.isEditingAttachment(); } - findAttachmentForElement(t2) { - return this.composition.document.getAttachmentById(parseInt(t2.dataset.trixId, 10)); + findAttachmentForElement(t3) { + return this.composition.document.getAttachmentById(parseInt(t3.dataset.trixId, 10)); } }; - var Oi = class extends H { + var Gn = class extends z { }; - var Mi = "data-trix-mutable"; - var ji = "[".concat(Mi, "]"); - var Wi = { attributes: true, childList: true, characterData: true, characterDataOldValue: true, subtree: true }; - var Ui = class extends H { - constructor(t2) { - super(t2), this.didMutate = this.didMutate.bind(this), this.element = t2, this.observer = new window.MutationObserver(this.didMutate), this.start(); + var Yn = "data-trix-mutable"; + var $n = "[".concat(Yn, "]"); + var Xn = { attributes: true, childList: true, characterData: true, characterDataOldValue: true, subtree: true }; + var Zn = class extends z { + constructor(t3) { + super(t3), this.didMutate = this.didMutate.bind(this), this.element = t3, this.observer = new window.MutationObserver(this.didMutate), this.start(); } start() { - return this.reset(), this.observer.observe(this.element, Wi); + return this.reset(), this.observer.observe(this.element, Xn); } stop() { return this.observer.disconnect(); } - didMutate(t2) { + didMutate(t3) { var e2, i2; - if (this.mutations.push(...Array.from(this.findSignificantMutations(t2) || [])), this.mutations.length) + if (this.mutations.push(...Array.from(this.findSignificantMutations(t3) || [])), this.mutations.length) return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.elementDidMutate) || void 0 === i2 || i2.call(e2, this.getMutationSummary()), this.reset(); } reset() { this.mutations = []; } - findSignificantMutations(t2) { - return t2.filter((t3) => this.mutationIsSignificant(t3)); + findSignificantMutations(t3) { + return t3.filter((t4) => this.mutationIsSignificant(t4)); } - mutationIsSignificant(t2) { - if (this.nodeIsMutable(t2.target)) + mutationIsSignificant(t3) { + if (this.nodeIsMutable(t3.target)) return false; - for (const e2 of Array.from(this.nodesModifiedByMutation(t2))) + for (const e2 of Array.from(this.nodesModifiedByMutation(t3))) if (this.nodeIsSignificant(e2)) return true; return false; } - nodeIsSignificant(t2) { - return t2 !== this.element && !this.nodeIsMutable(t2) && !N(t2); + nodeIsSignificant(t3) { + return t3 !== this.element && !this.nodeIsMutable(t3) && !F(t3); } - nodeIsMutable(t2) { - return A(t2, { matchingSelector: ji }); + nodeIsMutable(t3) { + return A(t3, { matchingSelector: $n }); } - nodesModifiedByMutation(t2) { + nodesModifiedByMutation(t3) { const e2 = []; - switch (t2.type) { + switch (t3.type) { case "attributes": - t2.attributeName !== Mi && e2.push(t2.target); + t3.attributeName !== Yn && e2.push(t3.target); break; case "characterData": - e2.push(t2.target.parentNode), e2.push(t2.target); + e2.push(t3.target.parentNode), e2.push(t3.target); break; case "childList": - e2.push(...Array.from(t2.addedNodes || [])), e2.push(...Array.from(t2.removedNodes || [])); + e2.push(...Array.from(t3.addedNodes || [])), e2.push(...Array.from(t3.removedNodes || [])); } return e2; } @@ -12151,104 +12589,105 @@ return this.getTextMutationSummary(); } getTextMutationSummary() { - const { additions: t2, deletions: e2 } = this.getTextChangesFromCharacterData(), i2 = this.getTextChangesFromChildList(); + const { additions: t3, deletions: e2 } = this.getTextChangesFromCharacterData(), i2 = this.getTextChangesFromChildList(); Array.from(i2.additions).forEach((e3) => { - Array.from(t2).includes(e3) || t2.push(e3); + Array.from(t3).includes(e3) || t3.push(e3); }), e2.push(...Array.from(i2.deletions || [])); - const n2 = {}, r2 = t2.join(""); + const n2 = {}, r2 = t3.join(""); r2 && (n2.textAdded = r2); const o2 = e2.join(""); return o2 && (n2.textDeleted = o2), n2; } - getMutationsByType(t2) { - return Array.from(this.mutations).filter((e2) => e2.type === t2); + getMutationsByType(t3) { + return Array.from(this.mutations).filter((e2) => e2.type === t3); } getTextChangesFromChildList() { - let t2, e2; + let t3, e2; const i2 = [], n2 = []; - Array.from(this.getMutationsByType("childList")).forEach((t3) => { - i2.push(...Array.from(t3.addedNodes || [])), n2.push(...Array.from(t3.removedNodes || [])); + Array.from(this.getMutationsByType("childList")).forEach((t4) => { + i2.push(...Array.from(t4.addedNodes || [])), n2.push(...Array.from(t4.removedNodes || [])); }); - 0 === i2.length && 1 === n2.length && B(n2[0]) ? (t2 = [], e2 = ["\n"]) : (t2 = qi(i2), e2 = qi(n2)); - return { additions: t2.filter((t3, i3) => t3 !== e2[i3]).map(Wt), deletions: e2.filter((e3, i3) => e3 !== t2[i3]).map(Wt) }; + 0 === i2.length && 1 === n2.length && N(n2[0]) ? (t3 = [], e2 = ["\n"]) : (t3 = Qn(i2), e2 = Qn(n2)); + const r2 = t3.filter((t4, i3) => t4 !== e2[i3]).map(jt), o2 = e2.filter((e3, i3) => e3 !== t3[i3]).map(jt); + return { additions: r2, deletions: o2 }; } getTextChangesFromCharacterData() { - let t2, e2; + let t3, e2; const i2 = this.getMutationsByType("characterData"); if (i2.length) { - const n2 = i2[0], r2 = i2[i2.length - 1], o2 = function(t3, e3) { + const n2 = i2[0], r2 = i2[i2.length - 1], o2 = function(t4, e3) { let i3, n3; - return t3 = X.box(t3), (e3 = X.box(e3)).length < t3.length ? [n3, i3] = Vt(t3, e3) : [i3, n3] = Vt(e3, t3), { added: i3, removed: n3 }; - }(Wt(n2.oldValue), Wt(r2.target.data)); - t2 = o2.added, e2 = o2.removed; + return t4 = $2.box(t4), (e3 = $2.box(e3)).length < t4.length ? [n3, i3] = Vt(t4, e3) : [i3, n3] = Vt(e3, t4), { added: i3, removed: n3 }; + }(jt(n2.oldValue), jt(r2.target.data)); + t3 = o2.added, e2 = o2.removed; } - return { additions: t2 ? [t2] : [], deletions: e2 ? [e2] : [] }; + return { additions: t3 ? [t3] : [], deletions: e2 ? [e2] : [] }; } }; - var qi = function() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; + var Qn = function() { + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; const e2 = []; - for (const i2 of Array.from(t2)) + for (const i2 of Array.from(t3)) switch (i2.nodeType) { case Node.TEXT_NODE: e2.push(i2.data); break; case Node.ELEMENT_NODE: - "br" === E(i2) ? e2.push("\n") : e2.push(...Array.from(qi(i2.childNodes) || [])); + "br" === R(i2) ? e2.push("\n") : e2.push(...Array.from(Qn(i2.childNodes) || [])); } return e2; }; - var Vi = class extends te { - constructor(t2) { - super(...arguments), this.file = t2; + var tr = class extends te { + constructor(t3) { + super(...arguments), this.file = t3; } - perform(t2) { + perform(t3) { const e2 = new FileReader(); - return e2.onerror = () => t2(false), e2.onload = () => { + return e2.onerror = () => t3(false), e2.onload = () => { e2.onerror = null; try { e2.abort(); - } catch (t3) { + } catch (t4) { } - return t2(true, this.file); + return t3(true, this.file); }, e2.readAsArrayBuffer(this.file); } }; - var Hi = class { - constructor(t2) { - this.element = t2; + var er = class { + constructor(t3) { + this.element = t3; } - shouldIgnore(t2) { - return !!a.samsungAndroid && (this.previousEvent = this.event, this.event = t2, this.checkSamsungKeyboardBuggyModeStart(), this.checkSamsungKeyboardBuggyModeEnd(), this.buggyMode); + shouldIgnore(t3) { + return !!a.samsungAndroid && (this.previousEvent = this.event, this.event = t3, this.checkSamsungKeyboardBuggyModeStart(), this.checkSamsungKeyboardBuggyModeEnd(), this.buggyMode); } checkSamsungKeyboardBuggyModeStart() { - this.insertingLongTextAfterUnidentifiedChar() && zi(this.element.innerText, this.event.data) && (this.buggyMode = true, this.event.preventDefault()); + this.insertingLongTextAfterUnidentifiedChar() && ir(this.element.innerText, this.event.data) && (this.buggyMode = true, this.event.preventDefault()); } checkSamsungKeyboardBuggyModeEnd() { this.buggyMode && "insertText" !== this.event.inputType && (this.buggyMode = false); } insertingLongTextAfterUnidentifiedChar() { - var t2; - return this.isBeforeInputInsertText() && this.previousEventWasUnidentifiedKeydown() && (null === (t2 = this.event.data) || void 0 === t2 ? void 0 : t2.length) > 50; + var t3; + return this.isBeforeInputInsertText() && this.previousEventWasUnidentifiedKeydown() && (null === (t3 = this.event.data) || void 0 === t3 ? void 0 : t3.length) > 50; } isBeforeInputInsertText() { return "beforeinput" === this.event.type && "insertText" === this.event.inputType; } previousEventWasUnidentifiedKeydown() { - var t2, e2; - return "keydown" === (null === (t2 = this.previousEvent) || void 0 === t2 ? void 0 : t2.type) && "Unidentified" === (null === (e2 = this.previousEvent) || void 0 === e2 ? void 0 : e2.key); + var t3, e2; + return "keydown" === (null === (t3 = this.previousEvent) || void 0 === t3 ? void 0 : t3.type) && "Unidentified" === (null === (e2 = this.previousEvent) || void 0 === e2 ? void 0 : e2.key); } }; - var zi = (t2, e2) => Ji(t2) === Ji(e2); - var _i = new RegExp("(".concat("\uFFFC", "|").concat(h, "|").concat(d, "|\\s)+"), "g"); - var Ji = (t2) => t2.replace(_i, " ").trim(); - var Ki = class extends H { - constructor(t2) { - super(...arguments), this.element = t2, this.mutationObserver = new Ui(this.element), this.mutationObserver.delegate = this, this.flakyKeyboardDetector = new Hi(this.element); - for (const t3 in this.constructor.events) - f(t3, { onElement: this.element, withCallback: this.handlerFor(t3) }); + var ir = (t3, e2) => rr(t3) === rr(e2); + var nr = new RegExp("(".concat("\uFFFC", "|").concat(h, "|").concat(d, "|\\s)+"), "g"); + var rr = (t3) => t3.replace(nr, " ").trim(); + var or = class extends z { + constructor(t3) { + super(...arguments), this.element = t3, this.mutationObserver = new Zn(this.element), this.mutationObserver.delegate = this, this.flakyKeyboardDetector = new er(this.element); + for (const t4 in this.constructor.events) + f(t4, { onElement: this.element, withCallback: this.handlerFor(t4) }); } - elementDidMutate(t2) { + elementDidMutate(t3) { } editorWillSyncDocumentView() { return this.mutationObserver.stop(); @@ -12257,60 +12696,60 @@ return this.mutationObserver.start(); } requestRender() { - var t2, e2; - return null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.inputControllerDidRequestRender) || void 0 === e2 ? void 0 : e2.call(t2); + var t3, e2; + return null === (t3 = this.delegate) || void 0 === t3 || null === (e2 = t3.inputControllerDidRequestRender) || void 0 === e2 ? void 0 : e2.call(t3); } requestReparse() { - var t2, e2; - return null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.inputControllerDidRequestReparse) || void 0 === e2 || e2.call(t2), this.requestRender(); + var t3, e2; + return null === (t3 = this.delegate) || void 0 === t3 || null === (e2 = t3.inputControllerDidRequestReparse) || void 0 === e2 || e2.call(t3), this.requestRender(); } - attachFiles(t2) { - const e2 = Array.from(t2).map((t3) => new Vi(t3)); - return Promise.all(e2).then((t3) => { + attachFiles(t3) { + const e2 = Array.from(t3).map((t4) => new tr(t4)); + return Promise.all(e2).then((t4) => { this.handleInput(function() { var e3, i2; - return null === (e3 = this.delegate) || void 0 === e3 || e3.inputControllerWillAttachFiles(), null === (i2 = this.responder) || void 0 === i2 || i2.insertFiles(t3), this.requestRender(); + return null === (e3 = this.delegate) || void 0 === e3 || e3.inputControllerWillAttachFiles(), null === (i2 = this.responder) || void 0 === i2 || i2.insertFiles(t4), this.requestRender(); }); }); } - handlerFor(t2) { + handlerFor(t3) { return (e2) => { e2.defaultPrevented || this.handleInput(() => { - if (!x(this.element)) { + if (!y(this.element)) { if (this.flakyKeyboardDetector.shouldIgnore(e2)) return; - this.eventName = t2, this.constructor.events[t2].call(this, e2); + this.eventName = t3, this.constructor.events[t3].call(this, e2); } }); }; } - handleInput(t2) { + handleInput(t3) { try { var e2; - null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillHandleInput(), t2.call(this); + null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillHandleInput(), t3.call(this); } finally { var i2; null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerDidHandleInput(); } } - createLinkHTML(t2, e2) { + createLinkHTML(t3, e2) { const i2 = document.createElement("a"); - return i2.href = t2, i2.textContent = e2 || t2, i2.outerHTML; + return i2.href = t3, i2.textContent = e2 || t3, i2.outerHTML; } }; - var Gi; - Re(Ki, "events", {}); - var { browser: $i, keyNames: Xi } = V; - var Yi = 0; - var Qi = class extends Ki { + var sr; + Ti(or, "events", {}); + var { browser: ar, keyNames: lr } = V; + var cr = 0; + var ur = class extends or { constructor() { super(...arguments), this.resetInputSummary(); } setInputSummary() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; this.inputSummary.eventName = this.eventName; - for (const e2 in t2) { - const i2 = t2[e2]; + for (const e2 in t3) { + const i2 = t3[e2]; this.inputSummary[e2] = i2; } return this.inputSummary; @@ -12319,140 +12758,140 @@ this.inputSummary = {}; } reset() { - return this.resetInputSummary(), Pt.reset(); + return this.resetInputSummary(), Ot.reset(); } - elementDidMutate(t2) { + elementDidMutate(t3) { var e2, i2; return this.isComposing() ? null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.inputControllerDidAllowUnhandledInput) || void 0 === i2 ? void 0 : i2.call(e2) : this.handleInput(function() { - return this.mutationIsSignificant(t2) && (this.mutationIsExpected(t2) ? this.requestRender() : this.requestReparse()), this.reset(); + return this.mutationIsSignificant(t3) && (this.mutationIsExpected(t3) ? this.requestRender() : this.requestReparse()), this.reset(); }); } - mutationIsExpected(t2) { - let { textAdded: e2, textDeleted: i2 } = t2; + mutationIsExpected(t3) { + let { textAdded: e2, textDeleted: i2 } = t3; if (this.inputSummary.preferDocument) return true; const n2 = null != e2 ? e2 === this.inputSummary.textAdded : !this.inputSummary.textAdded, r2 = null != i2 ? this.inputSummary.didDelete : !this.inputSummary.didDelete, o2 = ["\n", " \n"].includes(e2) && !n2, s2 = "\n" === i2 && !r2; if (o2 && !s2 || s2 && !o2) { - const t3 = this.getSelectedRange(); - if (t3) { + const t4 = this.getSelectedRange(); + if (t4) { var a2; const i3 = o2 ? e2.replace(/\n$/, "").length || -1 : (null == e2 ? void 0 : e2.length) || 1; - if (null !== (a2 = this.responder) && void 0 !== a2 && a2.positionIsBlockBreak(t3[1] + i3)) + if (null !== (a2 = this.responder) && void 0 !== a2 && a2.positionIsBlockBreak(t4[1] + i3)) return true; } } return n2 && r2; } - mutationIsSignificant(t2) { + mutationIsSignificant(t3) { var e2; - const i2 = Object.keys(t2).length > 0, n2 = "" === (null === (e2 = this.compositionInput) || void 0 === e2 ? void 0 : e2.getEndData()); + const i2 = Object.keys(t3).length > 0, n2 = "" === (null === (e2 = this.compositionInput) || void 0 === e2 ? void 0 : e2.getEndData()); return i2 || !n2; } getCompositionInput() { if (this.isComposing()) return this.compositionInput; - this.compositionInput = new rn(this); + this.compositionInput = new pr(this); } isComposing() { return this.compositionInput && !this.compositionInput.isEnded(); } - deleteInDirection(t2, e2) { + deleteInDirection(t3, e2) { var i2; - return false !== (null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.deleteInDirection(t2)) ? this.setInputSummary({ didDelete: true }) : e2 ? (e2.preventDefault(), this.requestRender()) : void 0; + return false !== (null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.deleteInDirection(t3)) ? this.setInputSummary({ didDelete: true }) : e2 ? (e2.preventDefault(), this.requestRender()) : void 0; } - serializeSelectionToDataTransfer(t2) { + serializeSelectionToDataTransfer(t3) { var e2; - if (!function(t3) { - if (null == t3 || !t3.setData) + if (!function(t4) { + if (null == t4 || !t4.setData) return false; - for (const e3 in yt) { - const i3 = yt[e3]; + for (const e3 in xt) { + const i3 = xt[e3]; try { - if (t3.setData(e3, i3), !t3.getData(e3) === i3) + if (t4.setData(e3, i3), !t4.getData(e3) === i3) return false; - } catch (t4) { + } catch (t5) { return false; } } return true; - }(t2)) + }(t3)) return; const i2 = null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.getSelectedDocument().toSerializableDocument(); - return t2.setData("application/x-trix-document", JSON.stringify(i2)), t2.setData("text/html", ve.render(i2).innerHTML), t2.setData("text/plain", i2.toString().replace(/\n$/, "")), true; + return t3.setData("application/x-trix-document", JSON.stringify(i2)), t3.setData("text/html", xi.render(i2).innerHTML), t3.setData("text/plain", i2.toString().replace(/\n$/, "")), true; } - canAcceptDataTransfer(t2) { + canAcceptDataTransfer(t3) { const e2 = {}; - return Array.from((null == t2 ? void 0 : t2.types) || []).forEach((t3) => { - e2[t3] = true; + return Array.from((null == t3 ? void 0 : t3.types) || []).forEach((t4) => { + e2[t4] = true; }), e2.Files || e2["application/x-trix-document"] || e2["text/html"] || e2["text/plain"]; } - getPastedHTMLUsingHiddenElement(t2) { - const e2 = this.getSelectedRange(), i2 = { position: "absolute", left: "".concat(window.pageXOffset, "px"), top: "".concat(window.pageYOffset, "px"), opacity: 0 }, n2 = S({ style: i2, tagName: "div", editable: true }); + getPastedHTMLUsingHiddenElement(t3) { + const e2 = this.getSelectedRange(), i2 = { position: "absolute", left: "".concat(window.pageXOffset, "px"), top: "".concat(window.pageYOffset, "px"), opacity: 0 }, n2 = k({ style: i2, tagName: "div", editable: true }); return document.body.appendChild(n2), n2.focus(), requestAnimationFrame(() => { const i3 = n2.innerHTML; - return k(n2), this.setSelectedRange(e2), t2(i3); + return E(n2), this.setSelectedRange(e2), t3(i3); }); } }; - Re(Qi, "events", { keydown(t2) { + Ti(ur, "events", { keydown(t3) { this.isComposing() || this.resetInputSummary(), this.inputSummary.didInput = true; - const e2 = Xi[t2.keyCode]; + const e2 = lr[t3.keyCode]; if (e2) { var i2; let n3 = this.keys; ["ctrl", "alt", "shift", "meta"].forEach((e3) => { var i3; - t2["".concat(e3, "Key")] && ("ctrl" === e3 && (e3 = "control"), n3 = null === (i3 = n3) || void 0 === i3 ? void 0 : i3[e3]); - }), null != (null === (i2 = n3) || void 0 === i2 ? void 0 : i2[e2]) && (this.setInputSummary({ keyName: e2 }), Pt.reset(), n3[e2].call(this, t2)); + t3["".concat(e3, "Key")] && ("ctrl" === e3 && (e3 = "control"), n3 = null === (i3 = n3) || void 0 === i3 ? void 0 : i3[e3]); + }), null != (null === (i2 = n3) || void 0 === i2 ? void 0 : i2[e2]) && (this.setInputSummary({ keyName: e2 }), Ot.reset(), n3[e2].call(this, t3)); } - if (kt(t2)) { - const e3 = String.fromCharCode(t2.keyCode).toLowerCase(); + if (Et(t3)) { + const e3 = String.fromCharCode(t3.keyCode).toLowerCase(); if (e3) { var n2; const i3 = ["alt", "shift"].map((e4) => { - if (t2["".concat(e4, "Key")]) + if (t3["".concat(e4, "Key")]) return e4; - }).filter((t3) => t3); - i3.push(e3), null !== (n2 = this.delegate) && void 0 !== n2 && n2.inputControllerDidReceiveKeyboardCommand(i3) && t2.preventDefault(); + }).filter((t4) => t4); + i3.push(e3), null !== (n2 = this.delegate) && void 0 !== n2 && n2.inputControllerDidReceiveKeyboardCommand(i3) && t3.preventDefault(); } } - }, keypress(t2) { + }, keypress(t3) { if (null != this.inputSummary.eventName) return; - if (t2.metaKey) + if (t3.metaKey) return; - if (t2.ctrlKey && !t2.altKey) + if (t3.ctrlKey && !t3.altKey) return; - const e2 = en(t2); + const e2 = gr(t3); var i2, n2; return e2 ? (null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillPerformTyping(), null === (n2 = this.responder) || void 0 === n2 || n2.insertString(e2), this.setInputSummary({ textAdded: e2, didDelete: this.selectionIsExpanded() })) : void 0; - }, textInput(t2) { - const { data: e2 } = t2, { textAdded: i2 } = this.inputSummary; + }, textInput(t3) { + const { data: e2 } = t3, { textAdded: i2 } = this.inputSummary; if (i2 && i2 !== e2 && i2.toUpperCase() === e2) { var n2; - const t3 = this.getSelectedRange(); - return this.setSelectedRange([t3[0], t3[1] + i2.length]), null === (n2 = this.responder) || void 0 === n2 || n2.insertString(e2), this.setInputSummary({ textAdded: e2 }), this.setSelectedRange(t3); + const t4 = this.getSelectedRange(); + return this.setSelectedRange([t4[0], t4[1] + i2.length]), null === (n2 = this.responder) || void 0 === n2 || n2.insertString(e2), this.setInputSummary({ textAdded: e2 }), this.setSelectedRange(t4); } - }, dragenter(t2) { - t2.preventDefault(); - }, dragstart(t2) { + }, dragenter(t3) { + t3.preventDefault(); + }, dragstart(t3) { var e2, i2; - return this.serializeSelectionToDataTransfer(t2.dataTransfer), this.draggedRange = this.getSelectedRange(), null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.inputControllerDidStartDrag) || void 0 === i2 ? void 0 : i2.call(e2); - }, dragover(t2) { - if (this.draggedRange || this.canAcceptDataTransfer(t2.dataTransfer)) { - t2.preventDefault(); - const n2 = { x: t2.clientX, y: t2.clientY }; + return this.serializeSelectionToDataTransfer(t3.dataTransfer), this.draggedRange = this.getSelectedRange(), null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.inputControllerDidStartDrag) || void 0 === i2 ? void 0 : i2.call(e2); + }, dragover(t3) { + if (this.draggedRange || this.canAcceptDataTransfer(t3.dataTransfer)) { + t3.preventDefault(); + const n2 = { x: t3.clientX, y: t3.clientY }; var e2, i2; - if (!St(n2, this.draggingPoint)) + if (!kt(n2, this.draggingPoint)) return this.draggingPoint = n2, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.inputControllerDidReceiveDragOverPoint) || void 0 === i2 ? void 0 : i2.call(e2, this.draggingPoint); } - }, dragend(t2) { + }, dragend(t3) { var e2, i2; null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.inputControllerDidCancelDrag) || void 0 === i2 || i2.call(e2), this.draggedRange = null, this.draggingPoint = null; - }, drop(t2) { + }, drop(t3) { var e2, i2; - t2.preventDefault(); - const n2 = null === (e2 = t2.dataTransfer) || void 0 === e2 ? void 0 : e2.files, r2 = t2.dataTransfer.getData("application/x-trix-document"), o2 = { x: t2.clientX, y: t2.clientY }; + t3.preventDefault(); + const n2 = null === (e2 = t3.dataTransfer) || void 0 === e2 ? void 0 : e2.files, r2 = t3.dataTransfer.getData("application/x-trix-document"), o2 = { x: t3.clientX, y: t3.clientY }; if (null === (i2 = this.responder) || void 0 === i2 || i2.setLocationRangeFromPointRange(o2), null != n2 && n2.length) this.attachFiles(n2); else if (this.draggedRange) { @@ -12460,29 +12899,29 @@ null === (s2 = this.delegate) || void 0 === s2 || s2.inputControllerWillMoveText(), null === (a2 = this.responder) || void 0 === a2 || a2.moveTextFromRange(this.draggedRange), this.draggedRange = null, this.requestRender(); } else if (r2) { var l2; - const t3 = Je.fromJSONString(r2); - null === (l2 = this.responder) || void 0 === l2 || l2.insertDocument(t3), this.requestRender(); + const t4 = rn.fromJSONString(r2); + null === (l2 = this.responder) || void 0 === l2 || l2.insertDocument(t4), this.requestRender(); } this.draggedRange = null, this.draggingPoint = null; - }, cut(t2) { + }, cut(t3) { var e2, i2; - if (null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionIsExpanded() && (this.serializeSelectionToDataTransfer(t2.clipboardData) && t2.preventDefault(), null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillCutText(), this.deleteInDirection("backward"), t2.defaultPrevented)) + if (null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionIsExpanded() && (this.serializeSelectionToDataTransfer(t3.clipboardData) && t3.preventDefault(), null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillCutText(), this.deleteInDirection("backward"), t3.defaultPrevented)) return this.requestRender(); - }, copy(t2) { + }, copy(t3) { var e2; - null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionIsExpanded() && this.serializeSelectionToDataTransfer(t2.clipboardData) && t2.preventDefault(); - }, paste(t2) { - const e2 = t2.clipboardData || t2.testClipboardData, i2 = { clipboard: e2 }; - if (!e2 || nn(t2)) - return void this.getPastedHTMLUsingHiddenElement((t3) => { + null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionIsExpanded() && this.serializeSelectionToDataTransfer(t3.clipboardData) && t3.preventDefault(); + }, paste(t3) { + const e2 = t3.clipboardData || t3.testClipboardData, i2 = { clipboard: e2 }; + if (!e2 || mr(t3)) + return void this.getPastedHTMLUsingHiddenElement((t4) => { var e3, n3, r3; - return i2.type = "text/html", i2.html = t3, null === (e3 = this.delegate) || void 0 === e3 || e3.inputControllerWillPaste(i2), null === (n3 = this.responder) || void 0 === n3 || n3.insertHTML(i2.html), this.requestRender(), null === (r3 = this.delegate) || void 0 === r3 ? void 0 : r3.inputControllerDidPaste(i2); + return i2.type = "text/html", i2.html = t4, null === (e3 = this.delegate) || void 0 === e3 || e3.inputControllerWillPaste(i2), null === (n3 = this.responder) || void 0 === n3 || n3.insertHTML(i2.html), this.requestRender(), null === (r3 = this.delegate) || void 0 === r3 ? void 0 : r3.inputControllerDidPaste(i2); }); const n2 = e2.getData("URL"), r2 = e2.getData("text/html"), o2 = e2.getData("public.url-name"); if (n2) { var s2, a2, l2; - let t3; - i2.type = "text/html", t3 = o2 ? qt(o2).trim() : n2, i2.html = this.createLinkHTML(n2, t3), null === (s2 = this.delegate) || void 0 === s2 || s2.inputControllerWillPaste(i2), this.setInputSummary({ textAdded: t3, didDelete: this.selectionIsExpanded() }), null === (a2 = this.responder) || void 0 === a2 || a2.insertHTML(i2.html), this.requestRender(), null === (l2 = this.delegate) || void 0 === l2 || l2.inputControllerDidPaste(i2); + let t4; + i2.type = "text/html", t4 = o2 ? Ut(o2).trim() : n2, i2.html = this.createLinkHTML(n2, t4), null === (s2 = this.delegate) || void 0 === s2 || s2.inputControllerWillPaste(i2), this.setInputSummary({ textAdded: t4, didDelete: this.selectionIsExpanded() }), null === (a2 = this.responder) || void 0 === a2 || a2.insertHTML(i2.html), this.requestRender(), null === (l2 = this.delegate) || void 0 === l2 || l2.inputControllerDidPaste(i2); } else if (Ct(e2)) { var c2, u2, h2; i2.type = "text/plain", i2.string = e2.getData("text/plain"), null === (c2 = this.delegate) || void 0 === c2 || c2.inputControllerWillPaste(i2), this.setInputSummary({ textAdded: i2.string, didDelete: this.selectionIsExpanded() }), null === (u2 = this.responder) || void 0 === u2 || u2.insertString(i2.string), this.requestRender(), null === (h2 = this.delegate) || void 0 === h2 || h2.inputControllerDidPaste(i2); @@ -12491,123 +12930,123 @@ i2.type = "text/html", i2.html = r2, null === (d2 = this.delegate) || void 0 === d2 || d2.inputControllerWillPaste(i2), null === (g2 = this.responder) || void 0 === g2 || g2.insertHTML(i2.html), this.requestRender(), null === (m2 = this.delegate) || void 0 === m2 || m2.inputControllerDidPaste(i2); } else if (Array.from(e2.types).includes("Files")) { var p2, f2; - const t3 = null === (p2 = e2.items) || void 0 === p2 || null === (p2 = p2[0]) || void 0 === p2 || null === (f2 = p2.getAsFile) || void 0 === f2 ? void 0 : f2.call(p2); - if (t3) { + const t4 = null === (p2 = e2.items) || void 0 === p2 || null === (p2 = p2[0]) || void 0 === p2 || null === (f2 = p2.getAsFile) || void 0 === f2 ? void 0 : f2.call(p2); + if (t4) { var b2, v2, A2; - const e3 = Zi(t3); - !t3.name && e3 && (t3.name = "pasted-file-".concat(++Yi, ".").concat(e3)), i2.type = "File", i2.file = t3, null === (b2 = this.delegate) || void 0 === b2 || b2.inputControllerWillAttachFiles(), null === (v2 = this.responder) || void 0 === v2 || v2.insertFile(i2.file), this.requestRender(), null === (A2 = this.delegate) || void 0 === A2 || A2.inputControllerDidPaste(i2); - } - } - t2.preventDefault(); - }, compositionstart(t2) { - return this.getCompositionInput().start(t2.data); - }, compositionupdate(t2) { - return this.getCompositionInput().update(t2.data); - }, compositionend(t2) { - return this.getCompositionInput().end(t2.data); - }, beforeinput(t2) { + const e3 = hr(t4); + !t4.name && e3 && (t4.name = "pasted-file-".concat(++cr, ".").concat(e3)), i2.type = "File", i2.file = t4, null === (b2 = this.delegate) || void 0 === b2 || b2.inputControllerWillAttachFiles(), null === (v2 = this.responder) || void 0 === v2 || v2.insertFile(i2.file), this.requestRender(), null === (A2 = this.delegate) || void 0 === A2 || A2.inputControllerDidPaste(i2); + } + } + t3.preventDefault(); + }, compositionstart(t3) { + return this.getCompositionInput().start(t3.data); + }, compositionupdate(t3) { + return this.getCompositionInput().update(t3.data); + }, compositionend(t3) { + return this.getCompositionInput().end(t3.data); + }, beforeinput(t3) { this.inputSummary.didInput = true; - }, input(t2) { - return this.inputSummary.didInput = true, t2.stopPropagation(); - } }), Re(Qi, "keys", { backspace(t2) { + }, input(t3) { + return this.inputSummary.didInput = true, t3.stopPropagation(); + } }), Ti(ur, "keys", { backspace(t3) { var e2; - return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("backward", t2); - }, delete(t2) { + return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("backward", t3); + }, delete(t3) { var e2; - return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("forward", t2); - }, return(t2) { + return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("forward", t3); + }, return(t3) { var e2, i2; return this.setInputSummary({ preferDocument: true }), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.insertLineBreak(); - }, tab(t2) { + }, tab(t3) { var e2, i2; - null !== (e2 = this.responder) && void 0 !== e2 && e2.canIncreaseNestingLevel() && (null === (i2 = this.responder) || void 0 === i2 || i2.increaseNestingLevel(), this.requestRender(), t2.preventDefault()); - }, left(t2) { + null !== (e2 = this.responder) && void 0 !== e2 && e2.canIncreaseNestingLevel() && (null === (i2 = this.responder) || void 0 === i2 || i2.increaseNestingLevel(), this.requestRender(), t3.preventDefault()); + }, left(t3) { var e2; if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("backward"); - }, right(t2) { + return t3.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("backward"); + }, right(t3) { var e2; if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("forward"); - }, control: { d(t2) { + return t3.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("forward"); + }, control: { d(t3) { var e2; - return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("forward", t2); - }, h(t2) { + return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("forward", t3); + }, h(t3) { var e2; - return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("backward", t2); - }, o(t2) { + return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("backward", t3); + }, o(t3) { var e2, i2; - return t2.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.insertString("\n", { updatePosition: false }), this.requestRender(); - } }, shift: { return(t2) { + return t3.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.insertString("\n", { updatePosition: false }), this.requestRender(); + } }, shift: { return(t3) { var e2, i2; - null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.insertString("\n"), this.requestRender(), t2.preventDefault(); - }, tab(t2) { + null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.insertString("\n"), this.requestRender(), t3.preventDefault(); + }, tab(t3) { var e2, i2; - null !== (e2 = this.responder) && void 0 !== e2 && e2.canDecreaseNestingLevel() && (null === (i2 = this.responder) || void 0 === i2 || i2.decreaseNestingLevel(), this.requestRender(), t2.preventDefault()); - }, left(t2) { + null !== (e2 = this.responder) && void 0 !== e2 && e2.canDecreaseNestingLevel() && (null === (i2 = this.responder) || void 0 === i2 || i2.decreaseNestingLevel(), this.requestRender(), t3.preventDefault()); + }, left(t3) { if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), this.expandSelectionInDirection("backward"); - }, right(t2) { + return t3.preventDefault(), this.expandSelectionInDirection("backward"); + }, right(t3) { if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), this.expandSelectionInDirection("forward"); - } }, alt: { backspace(t2) { + return t3.preventDefault(), this.expandSelectionInDirection("forward"); + } }, alt: { backspace(t3) { var e2; return this.setInputSummary({ preferDocument: false }), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.inputControllerWillPerformTyping(); - } }, meta: { backspace(t2) { + } }, meta: { backspace(t3) { var e2; return this.setInputSummary({ preferDocument: false }), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.inputControllerWillPerformTyping(); - } } }), Qi.proxyMethod("responder?.getSelectedRange"), Qi.proxyMethod("responder?.setSelectedRange"), Qi.proxyMethod("responder?.expandSelectionInDirection"), Qi.proxyMethod("responder?.selectionIsInCursorTarget"), Qi.proxyMethod("responder?.selectionIsExpanded"); - var Zi = (t2) => { + } } }), ur.proxyMethod("responder?.getSelectedRange"), ur.proxyMethod("responder?.setSelectedRange"), ur.proxyMethod("responder?.expandSelectionInDirection"), ur.proxyMethod("responder?.selectionIsInCursorTarget"), ur.proxyMethod("responder?.selectionIsExpanded"); + var hr = (t3) => { var e2; - return null === (e2 = t2.type) || void 0 === e2 || null === (e2 = e2.match(/\/(\w+)$/)) || void 0 === e2 ? void 0 : e2[1]; + return null === (e2 = t3.type) || void 0 === e2 || null === (e2 = e2.match(/\/(\w+)$/)) || void 0 === e2 ? void 0 : e2[1]; }; - var tn = !(null === (Gi = " ".codePointAt) || void 0 === Gi || !Gi.call(" ", 0)); - var en = function(t2) { - if (t2.key && tn && t2.key.codePointAt(0) === t2.keyCode) - return t2.key; + var dr = !(null === (sr = " ".codePointAt) || void 0 === sr || !sr.call(" ", 0)); + var gr = function(t3) { + if (t3.key && dr && t3.key.codePointAt(0) === t3.keyCode) + return t3.key; { let e2; - if (null === t2.which ? e2 = t2.keyCode : 0 !== t2.which && 0 !== t2.charCode && (e2 = t2.charCode), null != e2 && "escape" !== Xi[e2]) - return X.fromCodepoints([e2]).toString(); + if (null === t3.which ? e2 = t3.keyCode : 0 !== t3.which && 0 !== t3.charCode && (e2 = t3.charCode), null != e2 && "escape" !== lr[e2]) + return $2.fromCodepoints([e2]).toString(); } }; - var nn = function(t2) { - const e2 = t2.clipboardData; + var mr = function(t3) { + const e2 = t3.clipboardData; if (e2) { if (e2.types.includes("text/html")) { - for (const t3 of e2.types) { - const i2 = /^CorePasteboardFlavorType/.test(t3), n2 = /^dyn\./.test(t3) && e2.getData(t3); + for (const t4 of e2.types) { + const i2 = /^CorePasteboardFlavorType/.test(t4), n2 = /^dyn\./.test(t4) && e2.getData(t4); if (i2 || n2) return true; } return false; } { - const t3 = e2.types.includes("com.apple.webarchive"), i2 = e2.types.includes("com.apple.flat-rtfd"); - return t3 || i2; + const t4 = e2.types.includes("com.apple.webarchive"), i2 = e2.types.includes("com.apple.flat-rtfd"); + return t4 || i2; } } }; - var rn = class extends H { - constructor(t2) { - super(...arguments), this.inputController = t2, this.responder = this.inputController.responder, this.delegate = this.inputController.delegate, this.inputSummary = this.inputController.inputSummary, this.data = {}; + var pr = class extends z { + constructor(t3) { + super(...arguments), this.inputController = t3, this.responder = this.inputController.responder, this.delegate = this.inputController.delegate, this.inputSummary = this.inputController.inputSummary, this.data = {}; } - start(t2) { - if (this.data.start = t2, this.isSignificant()) { + start(t3) { + if (this.data.start = t3, this.isSignificant()) { var e2, i2; if ("keypress" === this.inputSummary.eventName && this.inputSummary.textAdded) null === (i2 = this.responder) || void 0 === i2 || i2.deleteInDirection("left"); this.selectionIsExpanded() || (this.insertPlaceholder(), this.requestRender()), this.range = null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.getSelectedRange(); } } - update(t2) { - if (this.data.update = t2, this.isSignificant()) { - const t3 = this.selectPlaceholder(); - t3 && (this.forgetPlaceholder(), this.range = t3); + update(t3) { + if (this.data.update = t3, this.isSignificant()) { + const t4 = this.selectPlaceholder(); + t4 && (this.forgetPlaceholder(), this.range = t4); } } - end(t2) { - return this.data.end = t2, this.isSignificant() ? (this.forgetPlaceholder(), this.canApplyToDocument() ? (this.setInputSummary({ preferDocument: true, didInput: false }), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.setSelectedRange(this.range), null === (n2 = this.responder) || void 0 === n2 || n2.insertString(this.data.end), null === (r2 = this.responder) || void 0 === r2 ? void 0 : r2.setSelectedRange(this.range[0] + this.data.end.length)) : null != this.data.start || null != this.data.update ? (this.requestReparse(), this.inputController.reset()) : void 0) : this.inputController.reset(); + end(t3) { + return this.data.end = t3, this.isSignificant() ? (this.forgetPlaceholder(), this.canApplyToDocument() ? (this.setInputSummary({ preferDocument: true, didInput: false }), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.setSelectedRange(this.range), null === (n2 = this.responder) || void 0 === n2 || n2.insertString(this.data.end), null === (r2 = this.responder) || void 0 === r2 ? void 0 : r2.setSelectedRange(this.range[0] + this.data.end.length)) : null != this.data.start || null != this.data.update ? (this.requestReparse(), this.inputController.reset()) : void 0) : this.inputController.reset(); var e2, i2, n2, r2; } getEndData() { @@ -12617,85 +13056,85 @@ return null != this.getEndData(); } isSignificant() { - return !$i.composesExistingText || this.inputSummary.didInput; + return !ar.composesExistingText || this.inputSummary.didInput; } canApplyToDocument() { - var t2, e2; - return 0 === (null === (t2 = this.data.start) || void 0 === t2 ? void 0 : t2.length) && (null === (e2 = this.data.end) || void 0 === e2 ? void 0 : e2.length) > 0 && this.range; + var t3, e2; + return 0 === (null === (t3 = this.data.start) || void 0 === t3 ? void 0 : t3.length) && (null === (e2 = this.data.end) || void 0 === e2 ? void 0 : e2.length) > 0 && this.range; } }; - rn.proxyMethod("inputController.setInputSummary"), rn.proxyMethod("inputController.requestRender"), rn.proxyMethod("inputController.requestReparse"), rn.proxyMethod("responder?.selectionIsExpanded"), rn.proxyMethod("responder?.insertPlaceholder"), rn.proxyMethod("responder?.selectPlaceholder"), rn.proxyMethod("responder?.forgetPlaceholder"); - var on = class extends Ki { + pr.proxyMethod("inputController.setInputSummary"), pr.proxyMethod("inputController.requestRender"), pr.proxyMethod("inputController.requestReparse"), pr.proxyMethod("responder?.selectionIsExpanded"), pr.proxyMethod("responder?.insertPlaceholder"), pr.proxyMethod("responder?.selectPlaceholder"), pr.proxyMethod("responder?.forgetPlaceholder"); + var fr = class extends or { constructor() { super(...arguments), this.render = this.render.bind(this); } elementDidMutate() { - return this.scheduledRender ? this.composing ? null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.inputControllerDidAllowUnhandledInput) || void 0 === e2 ? void 0 : e2.call(t2) : void 0 : this.reparse(); - var t2, e2; + return this.scheduledRender ? this.composing ? null === (t3 = this.delegate) || void 0 === t3 || null === (e2 = t3.inputControllerDidAllowUnhandledInput) || void 0 === e2 ? void 0 : e2.call(t3) : void 0 : this.reparse(); + var t3, e2; } scheduleRender() { return this.scheduledRender ? this.scheduledRender : this.scheduledRender = requestAnimationFrame(this.render); } render() { - var t2, e2; + var t3, e2; (cancelAnimationFrame(this.scheduledRender), this.scheduledRender = null, this.composing) || (null === (e2 = this.delegate) || void 0 === e2 || e2.render()); - null === (t2 = this.afterRender) || void 0 === t2 || t2.call(this), this.afterRender = null; + null === (t3 = this.afterRender) || void 0 === t3 || t3.call(this), this.afterRender = null; } reparse() { - var t2; - return null === (t2 = this.delegate) || void 0 === t2 ? void 0 : t2.reparse(); + var t3; + return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.reparse(); } insertString() { - var t2; + var t3; let e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", i2 = arguments.length > 1 ? arguments[1] : void 0; - return null === (t2 = this.delegate) || void 0 === t2 || t2.inputControllerWillPerformTyping(), this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.insertString(e2, i2); + return null === (t3 = this.delegate) || void 0 === t3 || t3.inputControllerWillPerformTyping(), this.withTargetDOMRange(function() { + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.insertString(e2, i2); }); } - toggleAttributeIfSupported(t2) { + toggleAttributeIfSupported(t3) { var e2; - if (dt().includes(t2)) - return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformFormatting(t2), this.withTargetDOMRange(function() { + if (dt().includes(t3)) + return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformFormatting(t3), this.withTargetDOMRange(function() { var e3; - return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.toggleCurrentAttribute(t2); + return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.toggleCurrentAttribute(t3); }); } - activateAttributeIfSupported(t2, e2) { + activateAttributeIfSupported(t3, e2) { var i2; - if (dt().includes(t2)) - return null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillPerformFormatting(t2), this.withTargetDOMRange(function() { + if (dt().includes(t3)) + return null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillPerformFormatting(t3), this.withTargetDOMRange(function() { var i3; - return null === (i3 = this.responder) || void 0 === i3 ? void 0 : i3.setCurrentAttribute(t2, e2); + return null === (i3 = this.responder) || void 0 === i3 ? void 0 : i3.setCurrentAttribute(t3, e2); }); } - deleteInDirection(t2) { + deleteInDirection(t3) { let { recordUndoEntry: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { recordUndoEntry: true }; var i2; e2 && (null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillPerformTyping()); const n2 = () => { var e3; - return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.deleteInDirection(t2); + return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.deleteInDirection(t3); }, r2 = this.getTargetDOMRange({ minLength: this.composing ? 1 : 2 }); return r2 ? this.withTargetDOMRange(r2, n2) : n2(); } - withTargetDOMRange(t2, e2) { + withTargetDOMRange(t3, e2) { var i2; - return "function" == typeof t2 && (e2 = t2, t2 = this.getTargetDOMRange()), t2 ? null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.withTargetDOMRange(t2, e2.bind(this)) : (Pt.reset(), e2.call(this)); + return "function" == typeof t3 && (e2 = t3, t3 = this.getTargetDOMRange()), t3 ? null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.withTargetDOMRange(t3, e2.bind(this)) : (Ot.reset(), e2.call(this)); } getTargetDOMRange() { - var t2, e2; + var t3, e2; let { minLength: i2 } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { minLength: 0 }; - const n2 = null === (t2 = (e2 = this.event).getTargetRanges) || void 0 === t2 ? void 0 : t2.call(e2); + const n2 = null === (t3 = (e2 = this.event).getTargetRanges) || void 0 === t3 ? void 0 : t3.call(e2); if (n2 && n2.length) { - const t3 = sn(n2[0]); - if (0 === i2 || t3.toString().length >= i2) - return t3; + const t4 = br(n2[0]); + if (0 === i2 || t4.toString().length >= i2) + return t4; } } - withEvent(t2, e2) { + withEvent(t3, e2) { let i2; - this.event = t2; + this.event = t3; try { i2 = e2.call(this); } finally { @@ -12704,86 +13143,87 @@ return i2; } }; - Re(on, "events", { keydown(t2) { - if (kt(t2)) { + Ti(fr, "events", { keydown(t3) { + if (Et(t3)) { var e2; - const i2 = hn(t2); - null !== (e2 = this.delegate) && void 0 !== e2 && e2.inputControllerDidReceiveKeyboardCommand(i2) && t2.preventDefault(); + const i2 = Cr(t3); + null !== (e2 = this.delegate) && void 0 !== e2 && e2.inputControllerDidReceiveKeyboardCommand(i2) && t3.preventDefault(); } else { - let e3 = t2.key; - t2.altKey && (e3 += "+Alt"), t2.shiftKey && (e3 += "+Shift"); + let e3 = t3.key; + t3.altKey && (e3 += "+Alt"), t3.shiftKey && (e3 += "+Shift"); const i2 = this.constructor.keys[e3]; if (i2) - return this.withEvent(t2, i2); + return this.withEvent(t3, i2); } - }, paste(t2) { + }, paste(t3) { var e2; let i2; - const n2 = null === (e2 = t2.clipboardData) || void 0 === e2 ? void 0 : e2.getData("URL"); - return cn(t2) ? (t2.preventDefault(), this.attachFiles(t2.clipboardData.files)) : un(t2) ? (t2.preventDefault(), i2 = { type: "text/plain", string: t2.clipboardData.getData("text/plain") }, null === (r2 = this.delegate) || void 0 === r2 || r2.inputControllerWillPaste(i2), null === (o2 = this.responder) || void 0 === o2 || o2.insertString(i2.string), this.render(), null === (s2 = this.delegate) || void 0 === s2 ? void 0 : s2.inputControllerDidPaste(i2)) : n2 ? (t2.preventDefault(), i2 = { type: "text/html", html: this.createLinkHTML(n2) }, null === (a2 = this.delegate) || void 0 === a2 || a2.inputControllerWillPaste(i2), null === (l2 = this.responder) || void 0 === l2 || l2.insertHTML(i2.html), this.render(), null === (c2 = this.delegate) || void 0 === c2 ? void 0 : c2.inputControllerDidPaste(i2)) : void 0; + const n2 = null === (e2 = t3.clipboardData) || void 0 === e2 ? void 0 : e2.getData("URL"); + return yr(t3) ? (t3.preventDefault(), this.attachFiles(t3.clipboardData.files)) : xr(t3) ? (t3.preventDefault(), i2 = { type: "text/plain", string: t3.clipboardData.getData("text/plain") }, null === (r2 = this.delegate) || void 0 === r2 || r2.inputControllerWillPaste(i2), null === (o2 = this.responder) || void 0 === o2 || o2.insertString(i2.string), this.render(), null === (s2 = this.delegate) || void 0 === s2 ? void 0 : s2.inputControllerDidPaste(i2)) : n2 ? (t3.preventDefault(), i2 = { type: "text/html", html: this.createLinkHTML(n2) }, null === (a2 = this.delegate) || void 0 === a2 || a2.inputControllerWillPaste(i2), null === (l2 = this.responder) || void 0 === l2 || l2.insertHTML(i2.html), this.render(), null === (c2 = this.delegate) || void 0 === c2 ? void 0 : c2.inputControllerDidPaste(i2)) : void 0; var r2, o2, s2, a2, l2, c2; - }, beforeinput(t2) { - const e2 = this.constructor.inputTypes[t2.inputType]; - e2 && (this.withEvent(t2, e2), this.scheduleRender()); - }, input(t2) { - Pt.reset(); - }, dragstart(t2) { + }, beforeinput(t3) { + const e2 = this.constructor.inputTypes[t3.inputType], i2 = (n2 = t3, !(!/iPhone|iPad/.test(navigator.userAgent) || n2.inputType && "insertParagraph" !== n2.inputType)); + var n2; + e2 && (this.withEvent(t3, e2), i2 || this.scheduleRender()), i2 && this.render(); + }, input(t3) { + Ot.reset(); + }, dragstart(t3) { var e2, i2; - null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionContainsAttachments() && (t2.dataTransfer.setData("application/x-trix-dragging", true), this.dragging = { range: null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.getSelectedRange(), point: dn(t2) }); - }, dragenter(t2) { - an(t2) && t2.preventDefault(); - }, dragover(t2) { + null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionContainsAttachments() && (t3.dataTransfer.setData("application/x-trix-dragging", true), this.dragging = { range: null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.getSelectedRange(), point: Er(t3) }); + }, dragenter(t3) { + vr(t3) && t3.preventDefault(); + }, dragover(t3) { if (this.dragging) { - t2.preventDefault(); - const i2 = dn(t2); + t3.preventDefault(); + const i2 = Er(t3); var e2; - if (!St(i2, this.dragging.point)) + if (!kt(i2, this.dragging.point)) return this.dragging.point = i2, null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.setLocationRangeFromPointRange(i2); } else - an(t2) && t2.preventDefault(); - }, drop(t2) { + vr(t3) && t3.preventDefault(); + }, drop(t3) { var e2, i2; if (this.dragging) - return t2.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillMoveText(), null === (i2 = this.responder) || void 0 === i2 || i2.moveTextFromRange(this.dragging.range), this.dragging = null, this.scheduleRender(); - if (an(t2)) { + return t3.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillMoveText(), null === (i2 = this.responder) || void 0 === i2 || i2.moveTextFromRange(this.dragging.range), this.dragging = null, this.scheduleRender(); + if (vr(t3)) { var n2; - t2.preventDefault(); - const e3 = dn(t2); - return null === (n2 = this.responder) || void 0 === n2 || n2.setLocationRangeFromPointRange(e3), this.attachFiles(t2.dataTransfer.files); + t3.preventDefault(); + const e3 = Er(t3); + return null === (n2 = this.responder) || void 0 === n2 || n2.setLocationRangeFromPointRange(e3), this.attachFiles(t3.dataTransfer.files); } }, dragend() { - var t2; - this.dragging && (null === (t2 = this.responder) || void 0 === t2 || t2.setSelectedRange(this.dragging.range), this.dragging = null); - }, compositionend(t2) { + var t3; + this.dragging && (null === (t3 = this.responder) || void 0 === t3 || t3.setSelectedRange(this.dragging.range), this.dragging = null); + }, compositionend(t3) { this.composing && (this.composing = false, a.recentAndroid || this.scheduleRender()); - } }), Re(on, "keys", { ArrowLeft() { - var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageMovingCursorInDirection("backward")) + } }), Ti(fr, "keys", { ArrowLeft() { + var t3, e2; + if (null !== (t3 = this.responder) && void 0 !== t3 && t3.shouldManageMovingCursorInDirection("backward")) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("backward"); }, ArrowRight() { - var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageMovingCursorInDirection("forward")) + var t3, e2; + if (null !== (t3 = this.responder) && void 0 !== t3 && t3.shouldManageMovingCursorInDirection("forward")) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("forward"); }, Backspace() { - var t2, e2, i2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageDeletingInDirection("backward")) + var t3, e2, i2; + if (null !== (t3 = this.responder) && void 0 !== t3 && t3.shouldManageDeletingInDirection("backward")) return this.event.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.deleteInDirection("backward"), this.render(); }, Tab() { - var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canIncreaseNestingLevel()) + var t3, e2; + if (null !== (t3 = this.responder) && void 0 !== t3 && t3.canIncreaseNestingLevel()) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 || e2.increaseNestingLevel(), this.render(); }, "Tab+Shift"() { - var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canDecreaseNestingLevel()) + var t3, e2; + if (null !== (t3 = this.responder) && void 0 !== t3 && t3.canDecreaseNestingLevel()) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 || e2.decreaseNestingLevel(), this.render(); - } }), Re(on, "inputTypes", { deleteByComposition() { + } }), Ti(fr, "inputTypes", { deleteByComposition() { return this.deleteInDirection("backward", { recordUndoEntry: false }); }, deleteByCut() { return this.deleteInDirection("backward"); }, deleteByDrag() { return this.event.preventDefault(), this.withTargetDOMRange(function() { - var t2; - this.deleteByDragRange = null === (t2 = this.responder) || void 0 === t2 ? void 0 : t2.getSelectedRange(); + var t3; + this.deleteByDragRange = null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.getSelectedRange(); }); }, deleteCompositionText() { return this.deleteInDirection("backward", { recordUndoEntry: false }); @@ -12816,11 +13256,11 @@ }, formatFontName() { return this.activateAttributeIfSupported("font", this.event.data); }, formatIndent() { - var t2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canIncreaseNestingLevel()) + var t3; + if (null !== (t3 = this.responder) && void 0 !== t3 && t3.canIncreaseNestingLevel()) return this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.increaseNestingLevel(); + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.increaseNestingLevel(); }); }, formatItalic() { return this.toggleAttributeIfSupported("italic"); @@ -12833,16 +13273,16 @@ }, formatJustifyRight() { return this.toggleAttributeIfSupported("justifyRight"); }, formatOutdent() { - var t2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canDecreaseNestingLevel()) + var t3; + if (null !== (t3 = this.responder) && void 0 !== t3 && t3.canDecreaseNestingLevel()) return this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.decreaseNestingLevel(); + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.decreaseNestingLevel(); }); }, formatRemove() { this.withTargetDOMRange(function() { - for (const i2 in null === (t2 = this.responder) || void 0 === t2 ? void 0 : t2.getCurrentAttributes()) { - var t2, e2; + for (const i2 in null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.getCurrentAttributes()) { + var t3, e2; null === (e2 = this.responder) || void 0 === e2 || e2.removeCurrentAttribute(i2); } }); @@ -12859,63 +13299,63 @@ }, formatUnderline() { return this.toggleAttributeIfSupported("underline"); }, historyRedo() { - var t2; - return null === (t2 = this.delegate) || void 0 === t2 ? void 0 : t2.inputControllerWillPerformRedo(); + var t3; + return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.inputControllerWillPerformRedo(); }, historyUndo() { - var t2; - return null === (t2 = this.delegate) || void 0 === t2 ? void 0 : t2.inputControllerWillPerformUndo(); + var t3; + return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.inputControllerWillPerformUndo(); }, insertCompositionText() { return this.composing = true, this.insertString(this.event.data); }, insertFromComposition() { return this.composing = false, this.insertString(this.event.data); }, insertFromDrop() { - const t2 = this.deleteByDragRange; + const t3 = this.deleteByDragRange; var e2; - if (t2) + if (t3) return this.deleteByDragRange = null, null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillMoveText(), this.withTargetDOMRange(function() { var e3; - return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.moveTextFromRange(t2); + return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.moveTextFromRange(t3); }); }, insertFromPaste() { - const { dataTransfer: t2 } = this.event, e2 = { dataTransfer: t2 }, i2 = t2.getData("URL"), n2 = t2.getData("text/html"); + const { dataTransfer: t3 } = this.event, e2 = { dataTransfer: t3 }, i2 = t3.getData("URL"), n2 = t3.getData("text/html"); if (i2) { var r2; let n3; this.event.preventDefault(), e2.type = "text/html"; - const o3 = t2.getData("public.url-name"); - n3 = o3 ? qt(o3).trim() : i2, e2.html = this.createLinkHTML(i2, n3), null === (r2 = this.delegate) || void 0 === r2 || r2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.insertHTML(e2.html); + const o3 = t3.getData("public.url-name"); + n3 = o3 ? Ut(o3).trim() : i2, e2.html = this.createLinkHTML(i2, n3), null === (r2 = this.delegate) || void 0 === r2 || r2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.insertHTML(e2.html); }), this.afterRender = () => { - var t3; - return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.inputControllerDidPaste(e2); + var t4; + return null === (t4 = this.delegate) || void 0 === t4 ? void 0 : t4.inputControllerDidPaste(e2); }; - } else if (Ct(t2)) { + } else if (Ct(t3)) { var o2; - e2.type = "text/plain", e2.string = t2.getData("text/plain"), null === (o2 = this.delegate) || void 0 === o2 || o2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.insertString(e2.string); + e2.type = "text/plain", e2.string = t3.getData("text/plain"), null === (o2 = this.delegate) || void 0 === o2 || o2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.insertString(e2.string); }), this.afterRender = () => { - var t3; - return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.inputControllerDidPaste(e2); + var t4; + return null === (t4 = this.delegate) || void 0 === t4 ? void 0 : t4.inputControllerDidPaste(e2); }; - } else if (ln(this.event)) { + } else if (Ar(this.event)) { var s2; - e2.type = "File", e2.file = t2.files[0], null === (s2 = this.delegate) || void 0 === s2 || s2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.insertFile(e2.file); + e2.type = "File", e2.file = t3.files[0], null === (s2 = this.delegate) || void 0 === s2 || s2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.insertFile(e2.file); }), this.afterRender = () => { - var t3; - return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.inputControllerDidPaste(e2); + var t4; + return null === (t4 = this.delegate) || void 0 === t4 ? void 0 : t4.inputControllerDidPaste(e2); }; } else if (n2) { var a2; this.event.preventDefault(), e2.type = "text/html", e2.html = n2, null === (a2 = this.delegate) || void 0 === a2 || a2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.insertHTML(e2.html); + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.insertHTML(e2.html); }), this.afterRender = () => { - var t3; - return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.inputControllerDidPaste(e2); + var t4; + return null === (t4 = this.delegate) || void 0 === t4 ? void 0 : t4.inputControllerDidPaste(e2); }; } }, insertFromYank() { @@ -12927,183 +13367,183 @@ }, insertOrderedList() { return this.toggleAttributeIfSupported("number"); }, insertParagraph() { - var t2; - return null === (t2 = this.delegate) || void 0 === t2 || t2.inputControllerWillPerformTyping(), this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.insertLineBreak(); + var t3; + return null === (t3 = this.delegate) || void 0 === t3 || t3.inputControllerWillPerformTyping(), this.withTargetDOMRange(function() { + var t4; + return null === (t4 = this.responder) || void 0 === t4 ? void 0 : t4.insertLineBreak(); }); }, insertReplacementText() { - const t2 = this.event.dataTransfer.getData("text/plain"), e2 = this.event.getTargetRanges()[0]; + const t3 = this.event.dataTransfer.getData("text/plain"), e2 = this.event.getTargetRanges()[0]; this.withTargetDOMRange(e2, () => { - this.insertString(t2, { updatePosition: false }); + this.insertString(t3, { updatePosition: false }); }); }, insertText() { - var t2; - return this.insertString(this.event.data || (null === (t2 = this.event.dataTransfer) || void 0 === t2 ? void 0 : t2.getData("text/plain"))); + var t3; + return this.insertString(this.event.data || (null === (t3 = this.event.dataTransfer) || void 0 === t3 ? void 0 : t3.getData("text/plain"))); }, insertTranspose() { return this.insertString(this.event.data); }, insertUnorderedList() { return this.toggleAttributeIfSupported("bullet"); } }); - var sn = function(t2) { + var br = function(t3) { const e2 = document.createRange(); - return e2.setStart(t2.startContainer, t2.startOffset), e2.setEnd(t2.endContainer, t2.endOffset), e2; + return e2.setStart(t3.startContainer, t3.startOffset), e2.setEnd(t3.endContainer, t3.endOffset), e2; }; - var an = (t2) => { + var vr = (t3) => { var e2; - return Array.from((null === (e2 = t2.dataTransfer) || void 0 === e2 ? void 0 : e2.types) || []).includes("Files"); + return Array.from((null === (e2 = t3.dataTransfer) || void 0 === e2 ? void 0 : e2.types) || []).includes("Files"); }; - var ln = (t2) => { + var Ar = (t3) => { var e2; - return (null === (e2 = t2.dataTransfer.files) || void 0 === e2 ? void 0 : e2[0]) && !cn(t2) && !((t3) => { - let { dataTransfer: e3 } = t3; + return (null === (e2 = t3.dataTransfer.files) || void 0 === e2 ? void 0 : e2[0]) && !yr(t3) && !((t4) => { + let { dataTransfer: e3 } = t4; return e3.types.includes("Files") && e3.types.includes("text/html") && e3.getData("text/html").includes("urn:schemas-microsoft-com:office:office"); - })(t2); + })(t3); }; - var cn = function(t2) { - const e2 = t2.clipboardData; + var yr = function(t3) { + const e2 = t3.clipboardData; if (e2) { - return Array.from(e2.types).filter((t3) => t3.match(/file/i)).length === e2.types.length && e2.files.length >= 1; + return Array.from(e2.types).filter((t4) => t4.match(/file/i)).length === e2.types.length && e2.files.length >= 1; } }; - var un = function(t2) { - const e2 = t2.clipboardData; + var xr = function(t3) { + const e2 = t3.clipboardData; if (e2) return e2.types.includes("text/plain") && 1 === e2.types.length; }; - var hn = function(t2) { + var Cr = function(t3) { const e2 = []; - return t2.altKey && e2.push("alt"), t2.shiftKey && e2.push("shift"), e2.push(t2.key), e2; + return t3.altKey && e2.push("alt"), t3.shiftKey && e2.push("shift"), e2.push(t3.key), e2; }; - var dn = (t2) => ({ x: t2.clientX, y: t2.clientY }); - var gn = "[data-trix-attribute]"; - var mn = "[data-trix-action]"; - var pn = "".concat(gn, ", ").concat(mn); - var fn = "[data-trix-dialog]"; - var bn = "".concat(fn, "[data-trix-active]"); - var vn = "".concat(fn, " [data-trix-method]"); - var An = "".concat(fn, " [data-trix-input]"); - var xn = (t2, e2) => (e2 || (e2 = Cn(t2)), t2.querySelector("[data-trix-input][name='".concat(e2, "']"))); - var yn = (t2) => t2.getAttribute("data-trix-action"); - var Cn = (t2) => t2.getAttribute("data-trix-attribute") || t2.getAttribute("data-trix-dialog-attribute"); - var kn = class extends H { - constructor(t2) { - super(t2), this.didClickActionButton = this.didClickActionButton.bind(this), this.didClickAttributeButton = this.didClickAttributeButton.bind(this), this.didClickDialogButton = this.didClickDialogButton.bind(this), this.didKeyDownDialogInput = this.didKeyDownDialogInput.bind(this), this.element = t2, this.attributes = {}, this.actions = {}, this.resetDialogInputs(), f("mousedown", { onElement: this.element, matchingSelector: mn, withCallback: this.didClickActionButton }), f("mousedown", { onElement: this.element, matchingSelector: gn, withCallback: this.didClickAttributeButton }), f("click", { onElement: this.element, matchingSelector: pn, preventDefault: true }), f("click", { onElement: this.element, matchingSelector: vn, withCallback: this.didClickDialogButton }), f("keydown", { onElement: this.element, matchingSelector: An, withCallback: this.didKeyDownDialogInput }); - } - didClickActionButton(t2, e2) { + var Er = (t3) => ({ x: t3.clientX, y: t3.clientY }); + var Sr = "[data-trix-attribute]"; + var Rr = "[data-trix-action]"; + var kr = "".concat(Sr, ", ").concat(Rr); + var Tr = "[data-trix-dialog]"; + var wr = "".concat(Tr, "[data-trix-active]"); + var Lr = "".concat(Tr, " [data-trix-method]"); + var Dr = "".concat(Tr, " [data-trix-input]"); + var Nr = (t3, e2) => (e2 || (e2 = Or(t3)), t3.querySelector("[data-trix-input][name='".concat(e2, "']"))); + var Ir = (t3) => t3.getAttribute("data-trix-action"); + var Or = (t3) => t3.getAttribute("data-trix-attribute") || t3.getAttribute("data-trix-dialog-attribute"); + var Pr = class extends z { + constructor(t3) { + super(t3), this.didClickActionButton = this.didClickActionButton.bind(this), this.didClickAttributeButton = this.didClickAttributeButton.bind(this), this.didClickDialogButton = this.didClickDialogButton.bind(this), this.didKeyDownDialogInput = this.didKeyDownDialogInput.bind(this), this.element = t3, this.attributes = {}, this.actions = {}, this.resetDialogInputs(), f("mousedown", { onElement: this.element, matchingSelector: Rr, withCallback: this.didClickActionButton }), f("mousedown", { onElement: this.element, matchingSelector: Sr, withCallback: this.didClickAttributeButton }), f("click", { onElement: this.element, matchingSelector: kr, preventDefault: true }), f("click", { onElement: this.element, matchingSelector: Lr, withCallback: this.didClickDialogButton }), f("keydown", { onElement: this.element, matchingSelector: Dr, withCallback: this.didKeyDownDialogInput }); + } + didClickActionButton(t3, e2) { var i2; - null === (i2 = this.delegate) || void 0 === i2 || i2.toolbarDidClickButton(), t2.preventDefault(); - const n2 = yn(e2); + null === (i2 = this.delegate) || void 0 === i2 || i2.toolbarDidClickButton(), t3.preventDefault(); + const n2 = Ir(e2); return this.getDialog(n2) ? this.toggleDialog(n2) : null === (r2 = this.delegate) || void 0 === r2 ? void 0 : r2.toolbarDidInvokeAction(n2, e2); var r2; } - didClickAttributeButton(t2, e2) { + didClickAttributeButton(t3, e2) { var i2; - null === (i2 = this.delegate) || void 0 === i2 || i2.toolbarDidClickButton(), t2.preventDefault(); - const n2 = Cn(e2); + null === (i2 = this.delegate) || void 0 === i2 || i2.toolbarDidClickButton(), t3.preventDefault(); + const n2 = Or(e2); var r2; this.getDialog(n2) ? this.toggleDialog(n2) : null === (r2 = this.delegate) || void 0 === r2 || r2.toolbarDidToggleAttribute(n2); return this.refreshAttributeButtons(); } - didClickDialogButton(t2, e2) { - const i2 = A(e2, { matchingSelector: fn }); + didClickDialogButton(t3, e2) { + const i2 = A(e2, { matchingSelector: Tr }); return this[e2.getAttribute("data-trix-method")].call(this, i2); } - didKeyDownDialogInput(t2, e2) { - if (13 === t2.keyCode) { - t2.preventDefault(); + didKeyDownDialogInput(t3, e2) { + if (13 === t3.keyCode) { + t3.preventDefault(); const i2 = e2.getAttribute("name"), n2 = this.getDialog(i2); this.setAttribute(n2); } - if (27 === t2.keyCode) - return t2.preventDefault(), this.hideDialog(); + if (27 === t3.keyCode) + return t3.preventDefault(), this.hideDialog(); } - updateActions(t2) { - return this.actions = t2, this.refreshActionButtons(); + updateActions(t3) { + return this.actions = t3, this.refreshActionButtons(); } refreshActionButtons() { - return this.eachActionButton((t2, e2) => { - t2.disabled = false === this.actions[e2]; + return this.eachActionButton((t3, e2) => { + t3.disabled = false === this.actions[e2]; }); } - eachActionButton(t2) { - return Array.from(this.element.querySelectorAll(mn)).map((e2) => t2(e2, yn(e2))); + eachActionButton(t3) { + return Array.from(this.element.querySelectorAll(Rr)).map((e2) => t3(e2, Ir(e2))); } - updateAttributes(t2) { - return this.attributes = t2, this.refreshAttributeButtons(); + updateAttributes(t3) { + return this.attributes = t3, this.refreshAttributeButtons(); } refreshAttributeButtons() { - return this.eachAttributeButton((t2, e2) => (t2.disabled = false === this.attributes[e2], this.attributes[e2] || this.dialogIsVisible(e2) ? (t2.setAttribute("data-trix-active", ""), t2.classList.add("trix-active")) : (t2.removeAttribute("data-trix-active"), t2.classList.remove("trix-active")))); + return this.eachAttributeButton((t3, e2) => (t3.disabled = false === this.attributes[e2], this.attributes[e2] || this.dialogIsVisible(e2) ? (t3.setAttribute("data-trix-active", ""), t3.classList.add("trix-active")) : (t3.removeAttribute("data-trix-active"), t3.classList.remove("trix-active")))); } - eachAttributeButton(t2) { - return Array.from(this.element.querySelectorAll(gn)).map((e2) => t2(e2, Cn(e2))); + eachAttributeButton(t3) { + return Array.from(this.element.querySelectorAll(Sr)).map((e2) => t3(e2, Or(e2))); } - applyKeyboardCommand(t2) { - const e2 = JSON.stringify(t2.sort()); - for (const t3 of Array.from(this.element.querySelectorAll("[data-trix-key]"))) { - const i2 = t3.getAttribute("data-trix-key").split("+"); + applyKeyboardCommand(t3) { + const e2 = JSON.stringify(t3.sort()); + for (const t4 of Array.from(this.element.querySelectorAll("[data-trix-key]"))) { + const i2 = t4.getAttribute("data-trix-key").split("+"); if (JSON.stringify(i2.sort()) === e2) - return b("mousedown", { onElement: t3 }), true; + return b("mousedown", { onElement: t4 }), true; } return false; } - dialogIsVisible(t2) { - const e2 = this.getDialog(t2); + dialogIsVisible(t3) { + const e2 = this.getDialog(t3); if (e2) return e2.hasAttribute("data-trix-active"); } - toggleDialog(t2) { - return this.dialogIsVisible(t2) ? this.hideDialog() : this.showDialog(t2); + toggleDialog(t3) { + return this.dialogIsVisible(t3) ? this.hideDialog() : this.showDialog(t3); } - showDialog(t2) { + showDialog(t3) { var e2, i2; this.hideDialog(), null === (e2 = this.delegate) || void 0 === e2 || e2.toolbarWillShowDialog(); - const n2 = this.getDialog(t2); - n2.setAttribute("data-trix-active", ""), n2.classList.add("trix-active"), Array.from(n2.querySelectorAll("input[disabled]")).forEach((t3) => { - t3.removeAttribute("disabled"); + const n2 = this.getDialog(t3); + n2.setAttribute("data-trix-active", ""), n2.classList.add("trix-active"), Array.from(n2.querySelectorAll("input[disabled]")).forEach((t4) => { + t4.removeAttribute("disabled"); }); - const r2 = Cn(n2); + const r2 = Or(n2); if (r2) { - const e3 = xn(n2, t2); + const e3 = Nr(n2, t3); e3 && (e3.value = this.attributes[r2] || "", e3.select()); } - return null === (i2 = this.delegate) || void 0 === i2 ? void 0 : i2.toolbarDidShowDialog(t2); + return null === (i2 = this.delegate) || void 0 === i2 ? void 0 : i2.toolbarDidShowDialog(t3); } - setAttribute(t2) { - const e2 = Cn(t2), i2 = xn(t2, e2); + setAttribute(t3) { + const e2 = Or(t3), i2 = Nr(t3, e2); return i2.willValidate && !i2.checkValidity() ? (i2.setAttribute("data-trix-validate", ""), i2.classList.add("trix-validate"), i2.focus()) : (null === (n2 = this.delegate) || void 0 === n2 || n2.toolbarDidUpdateAttribute(e2, i2.value), this.hideDialog()); var n2; } - removeAttribute(t2) { + removeAttribute(t3) { var e2; - const i2 = Cn(t2); + const i2 = Or(t3); return null === (e2 = this.delegate) || void 0 === e2 || e2.toolbarDidRemoveAttribute(i2), this.hideDialog(); } hideDialog() { - const t2 = this.element.querySelector(bn); + const t3 = this.element.querySelector(wr); var e2; - if (t2) - return t2.removeAttribute("data-trix-active"), t2.classList.remove("trix-active"), this.resetDialogInputs(), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.toolbarDidHideDialog(((t3) => t3.getAttribute("data-trix-dialog"))(t2)); + if (t3) + return t3.removeAttribute("data-trix-active"), t3.classList.remove("trix-active"), this.resetDialogInputs(), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.toolbarDidHideDialog(((t4) => t4.getAttribute("data-trix-dialog"))(t3)); } resetDialogInputs() { - Array.from(this.element.querySelectorAll(An)).forEach((t2) => { - t2.setAttribute("disabled", "disabled"), t2.removeAttribute("data-trix-validate"), t2.classList.remove("trix-validate"); + Array.from(this.element.querySelectorAll(Dr)).forEach((t3) => { + t3.setAttribute("disabled", "disabled"), t3.removeAttribute("data-trix-validate"), t3.classList.remove("trix-validate"); }); } - getDialog(t2) { - return this.element.querySelector("[data-trix-dialog=".concat(t2, "]")); + getDialog(t3) { + return this.element.querySelector("[data-trix-dialog=".concat(t3, "]")); } }; - var Rn = class extends Oi { - constructor(t2) { - let { editorElement: e2, document: i2, html: n2 } = t2; - super(...arguments), this.editorElement = e2, this.selectionManager = new Li(this.editorElement), this.selectionManager.delegate = this, this.composition = new gi(), this.composition.delegate = this, this.attachmentManager = new hi(this.composition.getAttachments()), this.attachmentManager.delegate = this, this.inputController = 2 === M.getLevel() ? new on(this.editorElement) : new Qi(this.editorElement), this.inputController.delegate = this, this.inputController.responder = this.composition, this.compositionController = new Ni(this.editorElement, this.composition), this.compositionController.delegate = this, this.toolbarController = new kn(this.editorElement.toolbarElement), this.toolbarController.delegate = this, this.editor = new xi(this.composition, this.selectionManager, this.editorElement), i2 ? this.editor.loadDocument(i2) : this.editor.loadHTML(n2); + var Fr = class extends Gn { + constructor(t3) { + let { editorElement: e2, document: i2, html: n2 } = t3; + super(...arguments), this.editorElement = e2, this.selectionManager = new jn(this.editorElement), this.selectionManager.delegate = this, this.composition = new Rn(), this.composition.delegate = this, this.attachmentManager = new En(this.composition.getAttachments()), this.attachmentManager.delegate = this, this.inputController = 2 === B.getLevel() ? new fr(this.editorElement) : new ur(this.editorElement), this.inputController.delegate = this, this.inputController.responder = this.composition, this.compositionController = new Kn(this.editorElement, this.composition), this.compositionController.delegate = this, this.toolbarController = new Pr(this.editorElement.toolbarElement), this.toolbarController.delegate = this, this.editor = new In(this.composition, this.selectionManager, this.editorElement), i2 ? this.editor.loadDocument(i2) : this.editor.loadHTML(n2); } registerSelectionManager() { - return Pt.registerSelectionManager(this.selectionManager); + return Ot.registerSelectionManager(this.selectionManager); } unregisterSelectionManager() { - return Pt.unregisterSelectionManager(this.selectionManager); + return Ot.unregisterSelectionManager(this.selectionManager); } render() { return this.compositionController.render(); @@ -13111,44 +13551,44 @@ reparse() { return this.composition.replaceHTML(this.editorElement.innerHTML); } - compositionDidChangeDocument(t2) { + compositionDidChangeDocument(t3) { if (this.notifyEditorElement("document-change"), !this.handlingInput) return this.render(); } - compositionDidChangeCurrentAttributes(t2) { - return this.currentAttributes = t2, this.toolbarController.updateAttributes(this.currentAttributes), this.updateCurrentActions(), this.notifyEditorElement("attributes-change", { attributes: this.currentAttributes }); + compositionDidChangeCurrentAttributes(t3) { + return this.currentAttributes = t3, this.toolbarController.updateAttributes(this.currentAttributes), this.updateCurrentActions(), this.notifyEditorElement("attributes-change", { attributes: this.currentAttributes }); } - compositionDidPerformInsertionAtRange(t2) { - this.pasting && (this.pastedRange = t2); + compositionDidPerformInsertionAtRange(t3) { + this.pasting && (this.pastedRange = t3); } - compositionShouldAcceptFile(t2) { - return this.notifyEditorElement("file-accept", { file: t2 }); + compositionShouldAcceptFile(t3) { + return this.notifyEditorElement("file-accept", { file: t3 }); } - compositionDidAddAttachment(t2) { - const e2 = this.attachmentManager.manageAttachment(t2); + compositionDidAddAttachment(t3) { + const e2 = this.attachmentManager.manageAttachment(t3); return this.notifyEditorElement("attachment-add", { attachment: e2 }); } - compositionDidEditAttachment(t2) { - this.compositionController.rerenderViewForObject(t2); - const e2 = this.attachmentManager.manageAttachment(t2); + compositionDidEditAttachment(t3) { + this.compositionController.rerenderViewForObject(t3); + const e2 = this.attachmentManager.manageAttachment(t3); return this.notifyEditorElement("attachment-edit", { attachment: e2 }), this.notifyEditorElement("change"); } - compositionDidChangeAttachmentPreviewURL(t2) { - return this.compositionController.invalidateViewForObject(t2), this.notifyEditorElement("change"); + compositionDidChangeAttachmentPreviewURL(t3) { + return this.compositionController.invalidateViewForObject(t3), this.notifyEditorElement("change"); } - compositionDidRemoveAttachment(t2) { - const e2 = this.attachmentManager.unmanageAttachment(t2); + compositionDidRemoveAttachment(t3) { + const e2 = this.attachmentManager.unmanageAttachment(t3); return this.notifyEditorElement("attachment-remove", { attachment: e2 }); } - compositionDidStartEditingAttachment(t2, e2) { - return this.attachmentLocationRange = this.composition.document.getLocationRangeOfAttachment(t2), this.compositionController.installAttachmentEditorForAttachment(t2, e2), this.selectionManager.setLocationRange(this.attachmentLocationRange); + compositionDidStartEditingAttachment(t3, e2) { + return this.attachmentLocationRange = this.composition.document.getLocationRangeOfAttachment(t3), this.compositionController.installAttachmentEditorForAttachment(t3, e2), this.selectionManager.setLocationRange(this.attachmentLocationRange); } - compositionDidStopEditingAttachment(t2) { + compositionDidStopEditingAttachment(t3) { this.compositionController.uninstallAttachmentEditor(), this.attachmentLocationRange = null; } - compositionDidRequestChangingSelectionToLocationRange(t2) { + compositionDidRequestChangingSelectionToLocationRange(t3) { if (!this.loadingSnapshot || this.isFocused()) - return this.requestedLocationRange = t2, this.compositionRevisionWhenLocationRangeRequested = this.composition.revision, this.handlingInput ? void 0 : this.render(); + return this.requestedLocationRange = t3, this.compositionRevisionWhenLocationRangeRequested = this.composition.revision, this.handlingInput ? void 0 : this.render(); } compositionWillLoadSnapshot() { this.loadingSnapshot = true; @@ -13159,8 +13599,8 @@ getSelectionManager() { return this.selectionManager; } - attachmentManagerDidRequestRemovalOfAttachment(t2) { - return this.removeAttachment(t2); + attachmentManagerDidRequestRemovalOfAttachment(t3) { + return this.removeAttachment(t3); } compositionControllerWillSyncDocumentView() { return this.inputController.editorWillSyncDocumentView(), this.selectionManager.lock(), this.selectionManager.clearSelection(); @@ -13177,18 +13617,18 @@ compositionControllerDidBlur() { return this.notifyEditorElement("blur"); } - compositionControllerDidSelectAttachment(t2, e2) { - return this.toolbarController.hideDialog(), this.composition.editAttachment(t2, e2); + compositionControllerDidSelectAttachment(t3, e2) { + return this.toolbarController.hideDialog(), this.composition.editAttachment(t3, e2); } - compositionControllerDidRequestDeselectingAttachment(t2) { - const e2 = this.attachmentLocationRange || this.composition.document.getLocationRangeOfAttachment(t2); + compositionControllerDidRequestDeselectingAttachment(t3) { + const e2 = this.attachmentLocationRange || this.composition.document.getLocationRangeOfAttachment(t3); return this.selectionManager.setLocationRange(e2[1]); } - compositionControllerWillUpdateAttachment(t2) { - return this.editor.recordUndoEntry("Edit Attachment", { context: t2.id, consolidatable: true }); + compositionControllerWillUpdateAttachment(t3) { + return this.editor.recordUndoEntry("Edit Attachment", { context: t3.id, consolidatable: true }); } - compositionControllerDidRequestRemovalOfAttachment(t2) { - return this.removeAttachment(t2); + compositionControllerDidRequestRemovalOfAttachment(t3) { + return this.removeAttachment(t3); } inputControllerWillHandleInput() { this.handlingInput = true, this.requestedRender = false; @@ -13209,17 +13649,17 @@ inputControllerWillPerformTyping() { return this.recordTypingUndoEntry(); } - inputControllerWillPerformFormatting(t2) { - return this.recordFormattingUndoEntry(t2); + inputControllerWillPerformFormatting(t3) { + return this.recordFormattingUndoEntry(t3); } inputControllerWillCutText() { return this.editor.recordUndoEntry("Cut"); } - inputControllerWillPaste(t2) { - return this.editor.recordUndoEntry("Paste"), this.pasting = true, this.notifyEditorElement("before-paste", { paste: t2 }); + inputControllerWillPaste(t3) { + return this.editor.recordUndoEntry("Paste"), this.pasting = true, this.notifyEditorElement("before-paste", { paste: t3 }); } - inputControllerDidPaste(t2) { - return t2.range = this.pastedRange, this.pastedRange = null, this.pasting = null, this.notifyEditorElement("paste", { paste: t2 }); + inputControllerDidPaste(t3) { + return t3.range = this.pastedRange, this.pastedRange = null, this.pasting = null, this.notifyEditorElement("paste", { paste: t3 }); } inputControllerWillMoveText() { return this.editor.recordUndoEntry("Move"); @@ -13233,48 +13673,48 @@ inputControllerWillPerformRedo() { return this.editor.redo(); } - inputControllerDidReceiveKeyboardCommand(t2) { - return this.toolbarController.applyKeyboardCommand(t2); + inputControllerDidReceiveKeyboardCommand(t3) { + return this.toolbarController.applyKeyboardCommand(t3); } inputControllerDidStartDrag() { this.locationRangeBeforeDrag = this.selectionManager.getLocationRange(); } - inputControllerDidReceiveDragOverPoint(t2) { - return this.selectionManager.setLocationRangeFromPointRange(t2); + inputControllerDidReceiveDragOverPoint(t3) { + return this.selectionManager.setLocationRangeFromPointRange(t3); } inputControllerDidCancelDrag() { this.selectionManager.setLocationRange(this.locationRangeBeforeDrag), this.locationRangeBeforeDrag = null; } - locationRangeDidChange(t2) { - return this.composition.updateCurrentAttributes(), this.updateCurrentActions(), this.attachmentLocationRange && !wt(this.attachmentLocationRange, t2) && this.composition.stopEditingAttachment(), this.notifyEditorElement("selection-change"); + locationRangeDidChange(t3) { + return this.composition.updateCurrentAttributes(), this.updateCurrentActions(), this.attachmentLocationRange && !Lt(this.attachmentLocationRange, t3) && this.composition.stopEditingAttachment(), this.notifyEditorElement("selection-change"); } toolbarDidClickButton() { if (!this.getLocationRange()) return this.setLocationRange({ index: 0, offset: 0 }); } - toolbarDidInvokeAction(t2, e2) { - return this.invokeAction(t2, e2); + toolbarDidInvokeAction(t3, e2) { + return this.invokeAction(t3, e2); } - toolbarDidToggleAttribute(t2) { - if (this.recordFormattingUndoEntry(t2), this.composition.toggleCurrentAttribute(t2), this.render(), !this.selectionFrozen) + toolbarDidToggleAttribute(t3) { + if (this.recordFormattingUndoEntry(t3), this.composition.toggleCurrentAttribute(t3), this.render(), !this.selectionFrozen) return this.editorElement.focus(); } - toolbarDidUpdateAttribute(t2, e2) { - if (this.recordFormattingUndoEntry(t2), this.composition.setCurrentAttribute(t2, e2), this.render(), !this.selectionFrozen) + toolbarDidUpdateAttribute(t3, e2) { + if (this.recordFormattingUndoEntry(t3), this.composition.setCurrentAttribute(t3, e2), this.render(), !this.selectionFrozen) return this.editorElement.focus(); } - toolbarDidRemoveAttribute(t2) { - if (this.recordFormattingUndoEntry(t2), this.composition.removeCurrentAttribute(t2), this.render(), !this.selectionFrozen) + toolbarDidRemoveAttribute(t3) { + if (this.recordFormattingUndoEntry(t3), this.composition.removeCurrentAttribute(t3), this.render(), !this.selectionFrozen) return this.editorElement.focus(); } - toolbarWillShowDialog(t2) { + toolbarWillShowDialog(t3) { return this.composition.expandSelectionForEditing(), this.freezeSelection(); } - toolbarDidShowDialog(t2) { - return this.notifyEditorElement("toolbar-dialog-show", { dialogName: t2 }); + toolbarDidShowDialog(t3) { + return this.notifyEditorElement("toolbar-dialog-show", { dialogName: t3 }); } - toolbarDidHideDialog(t2) { - return this.thawSelection(), this.editorElement.focus(), this.notifyEditorElement("toolbar-dialog-hide", { dialogName: t2 }); + toolbarDidHideDialog(t3) { + return this.thawSelection(), this.editorElement.focus(), this.notifyEditorElement("toolbar-dialog-hide", { dialogName: t3 }); } freezeSelection() { if (!this.selectionFrozen) @@ -13284,48 +13724,48 @@ if (this.selectionFrozen) return this.composition.thawSelection(), this.selectionManager.unlock(), this.selectionFrozen = false, this.render(); } - canInvokeAction(t2) { - return !!this.actionIsExternal(t2) || !(null === (e2 = this.actions[t2]) || void 0 === e2 || null === (e2 = e2.test) || void 0 === e2 || !e2.call(this)); + canInvokeAction(t3) { + return !!this.actionIsExternal(t3) || !(null === (e2 = this.actions[t3]) || void 0 === e2 || null === (e2 = e2.test) || void 0 === e2 || !e2.call(this)); var e2; } - invokeAction(t2, e2) { - return this.actionIsExternal(t2) ? this.notifyEditorElement("action-invoke", { actionName: t2, invokingElement: e2 }) : null === (i2 = this.actions[t2]) || void 0 === i2 || null === (i2 = i2.perform) || void 0 === i2 ? void 0 : i2.call(this); + invokeAction(t3, e2) { + return this.actionIsExternal(t3) ? this.notifyEditorElement("action-invoke", { actionName: t3, invokingElement: e2 }) : null === (i2 = this.actions[t3]) || void 0 === i2 || null === (i2 = i2.perform) || void 0 === i2 ? void 0 : i2.call(this); var i2; } - actionIsExternal(t2) { - return /^x-./.test(t2); + actionIsExternal(t3) { + return /^x-./.test(t3); } getCurrentActions() { - const t2 = {}; + const t3 = {}; for (const e2 in this.actions) - t2[e2] = this.canInvokeAction(e2); - return t2; + t3[e2] = this.canInvokeAction(e2); + return t3; } updateCurrentActions() { - const t2 = this.getCurrentActions(); - if (!St(t2, this.currentActions)) - return this.currentActions = t2, this.toolbarController.updateActions(this.currentActions), this.notifyEditorElement("actions-change", { actions: this.currentActions }); + const t3 = this.getCurrentActions(); + if (!kt(t3, this.currentActions)) + return this.currentActions = t3, this.toolbarController.updateActions(this.currentActions), this.notifyEditorElement("actions-change", { actions: this.currentActions }); } runEditorFilters() { - let t2 = this.composition.getSnapshot(); + let t3 = this.composition.getSnapshot(); if (Array.from(this.editor.filters).forEach((e3) => { - const { document: i3, selectedRange: n2 } = t2; - t2 = e3.call(this.editor, t2) || {}, t2.document || (t2.document = i3), t2.selectedRange || (t2.selectedRange = n2); - }), e2 = t2, i2 = this.composition.getSnapshot(), !wt(e2.selectedRange, i2.selectedRange) || !e2.document.isEqualTo(i2.document)) - return this.composition.loadSnapshot(t2); + const { document: i3, selectedRange: n2 } = t3; + t3 = e3.call(this.editor, t3) || {}, t3.document || (t3.document = i3), t3.selectedRange || (t3.selectedRange = n2); + }), e2 = t3, i2 = this.composition.getSnapshot(), !Lt(e2.selectedRange, i2.selectedRange) || !e2.document.isEqualTo(i2.document)) + return this.composition.loadSnapshot(t3); var e2, i2; } updateInputElement() { - const t2 = function(t3, e2) { - const i2 = li[e2]; + const t3 = function(t4, e2) { + const i2 = yn[e2]; if (i2) - return i2(t3); + return i2(t4); throw new Error("unknown content type: ".concat(e2)); }(this.compositionController.getSerializableElement(), "text/html"); - return this.editorElement.setInputElementValue(t2); + return this.editorElement.setFormValue(t3); } - notifyEditorElement(t2, e2) { - switch (t2) { + notifyEditorElement(t3, e2) { + switch (t3) { case "document-change": this.documentChangedSinceLastRender = true; break; @@ -13338,34 +13778,34 @@ case "attachment-remove": this.updateInputElement(); } - return this.editorElement.notify(t2, e2); + return this.editorElement.notify(t3, e2); } - removeAttachment(t2) { - return this.editor.recordUndoEntry("Delete Attachment"), this.composition.removeAttachment(t2), this.render(); + removeAttachment(t3) { + return this.editor.recordUndoEntry("Delete Attachment"), this.composition.removeAttachment(t3), this.render(); } - recordFormattingUndoEntry(t2) { - const e2 = gt(t2), i2 = this.selectionManager.getLocationRange(); - if (e2 || !Dt(i2)) + recordFormattingUndoEntry(t3) { + const e2 = gt(t3), i2 = this.selectionManager.getLocationRange(); + if (e2 || !wt(i2)) return this.editor.recordUndoEntry("Formatting", { context: this.getUndoContext(), consolidatable: true }); } recordTypingUndoEntry() { return this.editor.recordUndoEntry("Typing", { context: this.getUndoContext(this.currentAttributes), consolidatable: true }); } getUndoContext() { - for (var t2 = arguments.length, e2 = new Array(t2), i2 = 0; i2 < t2; i2++) + for (var t3 = arguments.length, e2 = new Array(t3), i2 = 0; i2 < t3; i2++) e2[i2] = arguments[i2]; return [this.getLocationContext(), this.getTimeContext(), ...Array.from(e2)]; } getLocationContext() { - const t2 = this.selectionManager.getLocationRange(); - return Dt(t2) ? t2[0].index : t2; + const t3 = this.selectionManager.getLocationRange(); + return wt(t3) ? t3[0].index : t3; } getTimeContext() { - return q.interval > 0 ? Math.floor((/* @__PURE__ */ new Date()).getTime() / q.interval) : 0; + return U.interval > 0 ? Math.floor((/* @__PURE__ */ new Date()).getTime() / U.interval) : 0; } isFocused() { - var t2; - return this.editorElement === (null === (t2 = this.editorElement.ownerDocument) || void 0 === t2 ? void 0 : t2.activeElement); + var t3; + return this.editorElement === (null === (t3 = this.editorElement.ownerDocument) || void 0 === t3 ? void 0 : t3.activeElement); } isFocusedInvisibly() { return this.isFocused() && !this.getLocationRange(); @@ -13374,7 +13814,7 @@ return this.constructor.actions; } }; - Re(Rn, "actions", { undo: { test() { + Ti(Fr, "actions", { undo: { test() { return this.editor.canUndo(); }, perform() { return this.editor.undo(); @@ -13393,157 +13833,291 @@ }, perform() { return this.editor.decreaseNestingLevel() && this.render(); } }, attachFiles: { test: () => true, perform() { - return M.pickFiles(this.editor.insertFiles); - } } }), Rn.proxyMethod("getSelectionManager().setLocationRange"), Rn.proxyMethod("getSelectionManager().getLocationRange"); - var En = Object.freeze({ __proto__: null, AttachmentEditorController: Ii, CompositionController: Ni, Controller: Oi, EditorController: Rn, InputController: Ki, Level0InputController: Qi, Level2InputController: on, ToolbarController: kn }); - var Sn = Object.freeze({ __proto__: null, MutationObserver: Ui, SelectionChangeObserver: Ft }); - var Ln = Object.freeze({ __proto__: null, FileVerificationOperation: Vi, ImagePreloadOperation: Le }); + return B.pickFiles(this.editor.insertFiles); + } } }), Fr.proxyMethod("getSelectionManager().setLocationRange"), Fr.proxyMethod("getSelectionManager().getLocationRange"); + var Mr = Object.freeze({ __proto__: null, AttachmentEditorController: Jn, CompositionController: Kn, Controller: Gn, EditorController: Fr, InputController: or, Level0InputController: ur, Level2InputController: fr, ToolbarController: Pr }); + var Br = Object.freeze({ __proto__: null, MutationObserver: Zn, SelectionChangeObserver: It }); + var _r = Object.freeze({ __proto__: null, FileVerificationOperation: tr, ImagePreloadOperation: _i }); bt("trix-toolbar", "%t {\n display: block;\n}\n\n%t {\n white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n background-color: #ffdddd;\n}"); - var Dn = class extends HTMLElement { + var jr = class extends HTMLElement { connectedCallback() { - "" === this.innerHTML && (this.innerHTML = U.getDefaultHTML()); + "" === this.innerHTML && (this.innerHTML = W.getDefaultHTML()); } }; - var wn = 0; - var Tn = function(t2) { - if (!t2.hasAttribute("contenteditable")) - return t2.setAttribute("contenteditable", ""), function(t3) { + var Wr = 0; + var Ur = function(t3) { + if (!t3.hasAttribute("contenteditable")) + return t3.setAttribute("contenteditable", ""), function(t4) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - return e2.times = 1, f(t3, e2); - }("focus", { onElement: t2, withCallback: () => Bn(t2) }); + return e2.times = 1, f(t4, e2); + }("focus", { onElement: t3, withCallback: () => Vr(t3) }); }; - var Bn = function(t2) { - return Fn(t2), Pn(t2); + var Vr = function(t3) { + return zr(t3), qr(t3); }; - var Fn = function(t2) { + var zr = function(t3) { var e2, i2; if (null !== (e2 = (i2 = document).queryCommandSupported) && void 0 !== e2 && e2.call(i2, "enableObjectResizing")) - return document.execCommand("enableObjectResizing", false, false), f("mscontrolselect", { onElement: t2, preventDefault: true }); + return document.execCommand("enableObjectResizing", false, false), f("mscontrolselect", { onElement: t3, preventDefault: true }); }; - var Pn = function(t2) { + var qr = function(t3) { var e2, i2; if (null !== (e2 = (i2 = document).queryCommandSupported) && void 0 !== e2 && e2.call(i2, "DefaultParagraphSeparator")) { - const { tagName: t3 } = n.default; - if (["div", "p"].includes(t3)) - return document.execCommand("DefaultParagraphSeparator", false, t3); + const { tagName: t4 } = n.default; + if (["div", "p"].includes(t4)) + return document.execCommand("DefaultParagraphSeparator", false, t4); + } + }; + var Hr = a.forcesObjectResizing ? { display: "inline", width: "auto" } : { display: "inline-block", width: "1px" }; + bt("trix-editor", "%t {\n display: block;\n}\n\n%t:empty::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t ".concat(e, " figcaption textarea {\n resize: none;\n}\n\n%t ").concat(e, " figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t ").concat(e, " figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: ").concat(Hr.display, " !important;\n width: ").concat(Hr.width, " !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}")); + var Jr = /* @__PURE__ */ new WeakMap(); + var Kr = /* @__PURE__ */ new WeakSet(); + var Gr = class { + constructor(t3) { + var e2, i2; + Fi(e2 = this, i2 = Kr), i2.add(e2), Mi(this, Jr, { writable: true, value: void 0 }), this.element = t3, Di(this, Jr, t3.attachInternals()); + } + connectedCallback() { + Pi(this, Kr, Yr).call(this); + } + disconnectedCallback() { + } + get labels() { + return Li(this, Jr).labels; + } + get disabled() { + var t3; + return null === (t3 = this.element.inputElement) || void 0 === t3 ? void 0 : t3.disabled; + } + set disabled(t3) { + this.element.toggleAttribute("disabled", t3); + } + get required() { + return this.element.hasAttribute("required"); + } + set required(t3) { + this.element.toggleAttribute("required", t3), Pi(this, Kr, Yr).call(this); + } + get validity() { + return Li(this, Jr).validity; + } + get validationMessage() { + return Li(this, Jr).validationMessage; + } + get willValidate() { + return Li(this, Jr).willValidate; + } + setFormValue(t3) { + Pi(this, Kr, Yr).call(this); + } + checkValidity() { + return Li(this, Jr).checkValidity(); + } + reportValidity() { + return Li(this, Jr).reportValidity(); + } + setCustomValidity(t3) { + Pi(this, Kr, Yr).call(this, t3); + } + }; + function Yr() { + let t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; + const { required: e2, value: i2 } = this.element, n2 = e2 && !i2, r2 = !!t3, o2 = k("input", { required: e2 }), s2 = t3 || o2.validationMessage; + Li(this, Jr).setValidity({ valueMissing: n2, customError: r2 }, s2); + } + var $r = /* @__PURE__ */ new WeakMap(); + var Xr = /* @__PURE__ */ new WeakMap(); + var Zr = /* @__PURE__ */ new WeakMap(); + var Qr = class { + constructor(t3) { + Mi(this, $r, { writable: true, value: void 0 }), Mi(this, Xr, { writable: true, value: (t4) => { + t4.defaultPrevented || t4.target === this.element.form && this.element.reset(); + } }), Mi(this, Zr, { writable: true, value: (t4) => { + if (t4.defaultPrevented) + return; + if (this.element.contains(t4.target)) + return; + const e2 = A(t4.target, { matchingSelector: "label" }); + e2 && Array.from(this.labels).includes(e2) && this.element.focus(); + } }), this.element = t3; + } + connectedCallback() { + Di(this, $r, function(t3) { + if (t3.hasAttribute("aria-label") || t3.hasAttribute("aria-labelledby")) + return; + const e2 = function() { + const e3 = Array.from(t3.labels).map((e4) => { + if (!e4.contains(t3)) + return e4.textContent; + }).filter((t4) => t4), i2 = e3.join(" "); + return i2 ? t3.setAttribute("aria-label", i2) : t3.removeAttribute("aria-label"); + }; + return e2(), f("focus", { onElement: t3, withCallback: e2 }); + }(this.element)), window.addEventListener("reset", Li(this, Xr), false), window.addEventListener("click", Li(this, Zr), false); + } + disconnectedCallback() { + var t3; + null === (t3 = Li(this, $r)) || void 0 === t3 || t3.destroy(), window.removeEventListener("reset", Li(this, Xr), false), window.removeEventListener("click", Li(this, Zr), false); + } + get labels() { + const t3 = []; + this.element.id && this.element.ownerDocument && t3.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id, "']")) || [])); + const e2 = A(this.element, { matchingSelector: "label" }); + return e2 && [this.element, null].includes(e2.control) && t3.push(e2), t3; + } + get disabled() { + return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."), false; + } + set disabled(t3) { + console.warn("This browser does not support the [disabled] attribute for trix-editor elements."); + } + get required() { + return console.warn("This browser does not support the [required] attribute for trix-editor elements."), false; + } + set required(t3) { + console.warn("This browser does not support the [required] attribute for trix-editor elements."); + } + get validity() { + return console.warn("This browser does not support the validity property for trix-editor elements."), null; + } + get validationMessage() { + return console.warn("This browser does not support the validationMessage property for trix-editor elements."), ""; + } + get willValidate() { + return console.warn("This browser does not support the willValidate property for trix-editor elements."), false; + } + setFormValue(t3) { + } + checkValidity() { + return console.warn("This browser does not support checkValidity() for trix-editor elements."), true; + } + reportValidity() { + return console.warn("This browser does not support reportValidity() for trix-editor elements."), true; + } + setCustomValidity(t3) { + console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements."); } }; - var In = a.forcesObjectResizing ? { display: "inline", width: "auto" } : { display: "inline-block", width: "1px" }; - bt("trix-editor", "%t {\n display: block;\n}\n\n%t:empty:not(:focus)::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t ".concat(e, " figcaption textarea {\n resize: none;\n}\n\n%t ").concat(e, " figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t ").concat(e, " figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: ").concat(In.display, " !important;\n width: ").concat(In.width, " !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}")); - var Nn = class extends HTMLElement { + var to = /* @__PURE__ */ new WeakMap(); + var eo = class extends HTMLElement { + constructor() { + super(), Mi(this, to, { writable: true, value: void 0 }), Di(this, to, this.constructor.formAssociated ? new Gr(this) : new Qr(this)); + } get trixId() { - return this.hasAttribute("trix-id") ? this.getAttribute("trix-id") : (this.setAttribute("trix-id", ++wn), this.trixId); + return this.hasAttribute("trix-id") ? this.getAttribute("trix-id") : (this.setAttribute("trix-id", ++Wr), this.trixId); } get labels() { - const t2 = []; - this.id && this.ownerDocument && t2.push(...Array.from(this.ownerDocument.querySelectorAll("label[for='".concat(this.id, "']")) || [])); - const e2 = A(this, { matchingSelector: "label" }); - return e2 && [this, null].includes(e2.control) && t2.push(e2), t2; + return Li(this, to).labels; + } + get disabled() { + return Li(this, to).disabled; + } + set disabled(t3) { + Li(this, to).disabled = t3; + } + get required() { + return Li(this, to).required; + } + set required(t3) { + Li(this, to).required = t3; + } + get validity() { + return Li(this, to).validity; + } + get validationMessage() { + return Li(this, to).validationMessage; + } + get willValidate() { + return Li(this, to).willValidate; + } + get type() { + return this.localName; } get toolbarElement() { - var t2; + var t3; if (this.hasAttribute("toolbar")) - return null === (t2 = this.ownerDocument) || void 0 === t2 ? void 0 : t2.getElementById(this.getAttribute("toolbar")); + return null === (t3 = this.ownerDocument) || void 0 === t3 ? void 0 : t3.getElementById(this.getAttribute("toolbar")); if (this.parentNode) { - const t3 = "trix-toolbar-".concat(this.trixId); - this.setAttribute("toolbar", t3); - const e2 = S("trix-toolbar", { id: t3 }); + const t4 = "trix-toolbar-".concat(this.trixId); + this.setAttribute("toolbar", t4); + const e2 = k("trix-toolbar", { id: t4 }); return this.parentNode.insertBefore(e2, this), e2; } } get form() { - var t2; - return null === (t2 = this.inputElement) || void 0 === t2 ? void 0 : t2.form; + var t3; + return null === (t3 = this.inputElement) || void 0 === t3 ? void 0 : t3.form; } get inputElement() { - var t2; + var t3; if (this.hasAttribute("input")) - return null === (t2 = this.ownerDocument) || void 0 === t2 ? void 0 : t2.getElementById(this.getAttribute("input")); + return null === (t3 = this.ownerDocument) || void 0 === t3 ? void 0 : t3.getElementById(this.getAttribute("input")); if (this.parentNode) { - const t3 = "trix-input-".concat(this.trixId); - this.setAttribute("input", t3); - const e2 = S("input", { type: "hidden", id: t3 }); + const t4 = "trix-input-".concat(this.trixId); + this.setAttribute("input", t4); + const e2 = k("input", { type: "hidden", id: t4 }); return this.parentNode.insertBefore(e2, this.nextElementSibling), e2; } } get editor() { - var t2; - return null === (t2 = this.editorController) || void 0 === t2 ? void 0 : t2.editor; + var t3; + return null === (t3 = this.editorController) || void 0 === t3 ? void 0 : t3.editor; } get name() { - var t2; - return null === (t2 = this.inputElement) || void 0 === t2 ? void 0 : t2.name; + var t3; + return null === (t3 = this.inputElement) || void 0 === t3 ? void 0 : t3.name; } get value() { - var t2; - return null === (t2 = this.inputElement) || void 0 === t2 ? void 0 : t2.value; + var t3; + return null === (t3 = this.inputElement) || void 0 === t3 ? void 0 : t3.value; } - set value(t2) { + set value(t3) { var e2; - this.defaultValue = t2, null === (e2 = this.editor) || void 0 === e2 || e2.loadHTML(this.defaultValue); + this.defaultValue = t3, null === (e2 = this.editor) || void 0 === e2 || e2.loadHTML(this.defaultValue); } - notify(t2, e2) { + notify(t3, e2) { if (this.editorController) - return b("trix-".concat(t2), { onElement: this, attributes: e2 }); + return b("trix-".concat(t3), { onElement: this, attributes: e2 }); } - setInputElementValue(t2) { - this.inputElement && (this.inputElement.value = t2); + setFormValue(t3) { + this.inputElement && (this.inputElement.value = t3, Li(this, to).setFormValue(t3)); } connectedCallback() { - this.hasAttribute("data-trix-internal") || (Tn(this), function(t2) { - if (!t2.hasAttribute("role")) - t2.setAttribute("role", "textbox"); - }(this), function(t2) { - if (t2.hasAttribute("aria-label") || t2.hasAttribute("aria-labelledby")) - return; - const e2 = function() { - const e3 = Array.from(t2.labels).map((e4) => { - if (!e4.contains(t2)) - return e4.textContent; - }).filter((t3) => t3), i2 = e3.join(" "); - return i2 ? t2.setAttribute("aria-label", i2) : t2.removeAttribute("aria-label"); - }; - e2(), f("focus", { onElement: t2, withCallback: e2 }); - }(this), this.editorController || (b("trix-before-initialize", { onElement: this }), this.editorController = new Rn({ editorElement: this, html: this.defaultValue = this.value }), requestAnimationFrame(() => b("trix-initialize", { onElement: this }))), this.editorController.registerSelectionManager(), this.registerResetListener(), this.registerClickListener(), function(t2) { - if (!document.querySelector(":focus") && t2.hasAttribute("autofocus") && document.querySelector("[autofocus]") === t2) - t2.focus(); + this.hasAttribute("data-trix-internal") || (Ur(this), function(t3) { + if (!t3.hasAttribute("role")) + t3.setAttribute("role", "textbox"); + }(this), this.editorController || (b("trix-before-initialize", { onElement: this }), this.editorController = new Fr({ editorElement: this, html: this.defaultValue = this.value }), requestAnimationFrame(() => b("trix-initialize", { onElement: this }))), this.editorController.registerSelectionManager(), Li(this, to).connectedCallback(), function(t3) { + if (!document.querySelector(":focus") && t3.hasAttribute("autofocus") && document.querySelector("[autofocus]") === t3) + t3.focus(); }(this)); } disconnectedCallback() { - var t2; - return null === (t2 = this.editorController) || void 0 === t2 || t2.unregisterSelectionManager(), this.unregisterResetListener(), this.unregisterClickListener(); + var t3; + null === (t3 = this.editorController) || void 0 === t3 || t3.unregisterSelectionManager(), Li(this, to).disconnectedCallback(); } - registerResetListener() { - return this.resetListener = this.resetBubbled.bind(this), window.addEventListener("reset", this.resetListener, false); + checkValidity() { + return Li(this, to).checkValidity(); } - unregisterResetListener() { - return window.removeEventListener("reset", this.resetListener, false); + reportValidity() { + return Li(this, to).reportValidity(); } - registerClickListener() { - return this.clickListener = this.clickBubbled.bind(this), window.addEventListener("click", this.clickListener, false); + setCustomValidity(t3) { + Li(this, to).setCustomValidity(t3); } - unregisterClickListener() { - return window.removeEventListener("click", this.clickListener, false); + formDisabledCallback(t3) { + this.inputElement && (this.inputElement.disabled = t3), this.toggleAttribute("contenteditable", !t3); } - resetBubbled(t2) { - if (!t2.defaultPrevented && t2.target === this.form) - return this.reset(); - } - clickBubbled(t2) { - if (t2.defaultPrevented) - return; - if (this.contains(t2.target)) - return; - const e2 = A(t2.target, { matchingSelector: "label" }); - return e2 && Array.from(this.labels).includes(e2) ? this.focus() : void 0; + formResetCallback() { + this.reset(); } reset() { this.value = this.defaultValue; } }; - var On = { VERSION: t, config: V, core: ci, models: Di, views: wi, controllers: En, observers: Sn, operations: Ln, elements: Object.freeze({ __proto__: null, TrixEditorElement: Nn, TrixToolbarElement: Dn }), filters: Object.freeze({ __proto__: null, Filter: bi, attachmentGalleryFilter: vi }) }; - Object.assign(On, Di), window.Trix = On, setTimeout(function() { - customElements.get("trix-toolbar") || customElements.define("trix-toolbar", Dn), customElements.get("trix-editor") || customElements.define("trix-editor", Nn); + Ti(eo, "formAssociated", "ElementInternals" in window); + var io = { VERSION: t, config: V, core: xn, models: Wn, views: Un, controllers: Mr, observers: Br, operations: _r, elements: Object.freeze({ __proto__: null, TrixEditorElement: eo, TrixToolbarElement: jr }), filters: Object.freeze({ __proto__: null, Filter: Ln, attachmentGalleryFilter: Dn }) }; + Object.assign(io, Wn), window.Trix = io, setTimeout(function() { + customElements.get("trix-toolbar") || customElements.define("trix-toolbar", jr), customElements.get("trix-editor") || customElements.define("trix-editor", eo); }, 0); // node_modules/@rails/actiontext/app/assets/javascripts/actiontext.esm.js @@ -13785,10 +14359,10 @@ } return Math.min(val, length); } - ArrayBuffer.prototype.slice = function(from, to) { + ArrayBuffer.prototype.slice = function(from, to2) { var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray; - if (to !== undefined$1) { - end = clamp(to, length); + if (to2 !== undefined$1) { + end = clamp(to2, length); } if (begin > end) { return new ArrayBuffer(0); @@ -17633,91 +18207,91 @@ removeNode(tempNode, ctx); } } - function ignoreAttribute(attr, to, updateType, ctx) { - if (attr === "value" && ctx.ignoreActiveValue && to === document.activeElement) { + function ignoreAttribute(attr, to2, updateType, ctx) { + if (attr === "value" && ctx.ignoreActiveValue && to2 === document.activeElement) { return true; } - return ctx.callbacks.beforeAttributeUpdated(attr, to, updateType) === false; + return ctx.callbacks.beforeAttributeUpdated(attr, to2, updateType) === false; } - function syncNodeFrom(from, to, ctx) { + function syncNodeFrom(from, to2, ctx) { let type = from.nodeType; if (type === 1) { const fromAttributes = from.attributes; - const toAttributes = to.attributes; + const toAttributes = to2.attributes; for (const fromAttribute of fromAttributes) { - if (ignoreAttribute(fromAttribute.name, to, "update", ctx)) { + if (ignoreAttribute(fromAttribute.name, to2, "update", ctx)) { continue; } - if (to.getAttribute(fromAttribute.name) !== fromAttribute.value) { - to.setAttribute(fromAttribute.name, fromAttribute.value); + if (to2.getAttribute(fromAttribute.name) !== fromAttribute.value) { + to2.setAttribute(fromAttribute.name, fromAttribute.value); } } for (let i2 = toAttributes.length - 1; 0 <= i2; i2--) { const toAttribute = toAttributes[i2]; - if (ignoreAttribute(toAttribute.name, to, "remove", ctx)) { + if (ignoreAttribute(toAttribute.name, to2, "remove", ctx)) { continue; } if (!from.hasAttribute(toAttribute.name)) { - to.removeAttribute(toAttribute.name); + to2.removeAttribute(toAttribute.name); } } } if (type === 8 || type === 3) { - if (to.nodeValue !== from.nodeValue) { - to.nodeValue = from.nodeValue; + if (to2.nodeValue !== from.nodeValue) { + to2.nodeValue = from.nodeValue; } } - if (!ignoreValueOfActiveElement(to, ctx)) { - syncInputValue(from, to, ctx); + if (!ignoreValueOfActiveElement(to2, ctx)) { + syncInputValue(from, to2, ctx); } } - function syncBooleanAttribute(from, to, attributeName, ctx) { - if (from[attributeName] !== to[attributeName]) { - let ignoreUpdate = ignoreAttribute(attributeName, to, "update", ctx); + function syncBooleanAttribute(from, to2, attributeName, ctx) { + if (from[attributeName] !== to2[attributeName]) { + let ignoreUpdate = ignoreAttribute(attributeName, to2, "update", ctx); if (!ignoreUpdate) { - to[attributeName] = from[attributeName]; + to2[attributeName] = from[attributeName]; } if (from[attributeName]) { if (!ignoreUpdate) { - to.setAttribute(attributeName, from[attributeName]); + to2.setAttribute(attributeName, from[attributeName]); } } else { - if (!ignoreAttribute(attributeName, to, "remove", ctx)) { - to.removeAttribute(attributeName); + if (!ignoreAttribute(attributeName, to2, "remove", ctx)) { + to2.removeAttribute(attributeName); } } } } - function syncInputValue(from, to, ctx) { - if (from instanceof HTMLInputElement && to instanceof HTMLInputElement && from.type !== "file") { + function syncInputValue(from, to2, ctx) { + if (from instanceof HTMLInputElement && to2 instanceof HTMLInputElement && from.type !== "file") { let fromValue = from.value; - let toValue = to.value; - syncBooleanAttribute(from, to, "checked", ctx); - syncBooleanAttribute(from, to, "disabled", ctx); + let toValue = to2.value; + syncBooleanAttribute(from, to2, "checked", ctx); + syncBooleanAttribute(from, to2, "disabled", ctx); if (!from.hasAttribute("value")) { - if (!ignoreAttribute("value", to, "remove", ctx)) { - to.value = ""; - to.removeAttribute("value"); + if (!ignoreAttribute("value", to2, "remove", ctx)) { + to2.value = ""; + to2.removeAttribute("value"); } } else if (fromValue !== toValue) { - if (!ignoreAttribute("value", to, "update", ctx)) { - to.setAttribute("value", fromValue); - to.value = fromValue; + if (!ignoreAttribute("value", to2, "update", ctx)) { + to2.setAttribute("value", fromValue); + to2.value = fromValue; } } } else if (from instanceof HTMLOptionElement) { - syncBooleanAttribute(from, to, "selected", ctx); - } else if (from instanceof HTMLTextAreaElement && to instanceof HTMLTextAreaElement) { + syncBooleanAttribute(from, to2, "selected", ctx); + } else if (from instanceof HTMLTextAreaElement && to2 instanceof HTMLTextAreaElement) { let fromValue = from.value; - let toValue = to.value; - if (ignoreAttribute("value", to, "update", ctx)) { + let toValue = to2.value; + if (ignoreAttribute("value", to2, "update", ctx)) { return; } if (fromValue !== toValue) { - to.value = fromValue; + to2.value = fromValue; } - if (to.firstChild && to.firstChild.nodeValue !== fromValue) { - to.firstChild.nodeValue = fromValue; + if (to2.firstChild && to2.firstChild.nodeValue !== fromValue) { + to2.firstChild.nodeValue = fromValue; } } } @@ -22190,6 +22764,9 @@ jquery/dist/jquery.js: selectize/dist/js/selectize.min.js: (*! selectize.js - v0.12.6 | https://github.com/selectize/selectize.js | Apache License (v2) *) +trix/dist/trix.esm.min.js: + (*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE *) + @hotwired/turbo/dist/turbo.es2017-esm.js: (*! Turbo 8.0.2 diff --git a/app/assets/builds/administrate/application.js.map b/app/assets/builds/administrate/application.js.map index 2f957d201..0a9ace27c 100644 --- a/app/assets/builds/administrate/application.js.map +++ b/app/assets/builds/administrate/application.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../../../node_modules/jquery/dist/jquery.js", "../../../../node_modules/@rails/actioncable/src/adapters.js", "../../../../node_modules/@rails/actioncable/src/logger.js", "../../../../node_modules/@rails/actioncable/src/connection_monitor.js", "../../../../node_modules/@rails/actioncable/src/internal.js", "../../../../node_modules/@rails/actioncable/src/connection.js", "../../../../node_modules/@rails/actioncable/src/subscription.js", "../../../../node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../../node_modules/@rails/actioncable/src/subscriptions.js", "../../../../node_modules/@rails/actioncable/src/consumer.js", "../../../../node_modules/@rails/actioncable/src/index.js", "../../../../node_modules/sifter/sifter.js", "../../../../node_modules/microplugin/src/microplugin.js", "../../../../node_modules/selectize/dist/js/selectize.min.js", "../../javascripts/administrate/add_jquery.js", "../../../../node_modules/trix/src/trix/config/attachments.js", "../../../../node_modules/trix/src/trix/config/block_attributes.js", "../../../../node_modules/trix/src/trix/config/browser.js", "../../../../node_modules/trix/src/trix/config/lang.js", "../../../../node_modules/trix/src/trix/config/file_size_formatting.js", "../../../../node_modules/trix/src/trix/constants.js", "../../../../node_modules/trix/src/trix/core/helpers/extend.js", "../../../../node_modules/trix/src/trix/core/helpers/dom.js", "../../../../node_modules/trix/src/trix/config/input.js", "../../../../node_modules/trix/src/trix/config/key_names.js", "../../../../node_modules/trix/src/trix/config/parser.js", "../../../../node_modules/trix/src/trix/config/text_attributes.js", "../../../../node_modules/trix/src/trix/config/toolbar.js", "../../../../node_modules/trix/src/trix/config/undo.js", "../../../../node_modules/trix/src/trix/config/css.js", "../../../../node_modules/trix/src/trix/core/basic_object.js", "../../../../node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../../node_modules/trix/src/trix/core/object.js", "../../../../node_modules/trix/src/trix/core/helpers/arrays.js", "../../../../node_modules/trix/src/trix/core/helpers/bidi.js", "../../../../node_modules/trix/src/trix/core/helpers/config.js", "../../../../node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../../node_modules/trix/src/trix/core/helpers/events.js", "../../../../node_modules/trix/src/trix/core/helpers/functions.js", "../../../../node_modules/trix/src/trix/core/helpers/objects.js", "../../../../node_modules/trix/src/trix/core/helpers/ranges.js", "../../../../node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../../node_modules/trix/src/trix/core/helpers/strings.js", "../../../../node_modules/trix/src/trix/core/collections/hash.js", "../../../../node_modules/trix/src/trix/core/collections/object_group.js", "../../../../node_modules/trix/src/trix/core/collections/object_map.js", "../../../../node_modules/trix/src/trix/core/collections/element_store.js", "../../../../node_modules/trix/src/trix/core/utilities/operation.js", "../../../../node_modules/trix/src/trix/views/object_view.js", "../../../../node_modules/trix/src/trix/models/html_sanitizer.js", "../../../../node_modules/trix/src/trix/views/attachment_view.js", "../../../../node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../../node_modules/trix/src/trix/views/piece_view.js", "../../../../node_modules/trix/src/trix/views/text_view.js", "../../../../node_modules/trix/src/trix/views/block_view.js", "../../../../node_modules/trix/src/trix/views/document_view.js", "../../../../node_modules/trix/src/trix/models/piece.js", "../../../../node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../../node_modules/trix/src/trix/models/attachment.js", "../../../../node_modules/trix/src/trix/models/attachment_piece.js", "../../../../node_modules/trix/src/trix/models/string_piece.js", "../../../../node_modules/trix/src/trix/models/splittable_list.js", "../../../../node_modules/trix/src/trix/models/text.js", "../../../../node_modules/trix/src/trix/models/block.js", "../../../../node_modules/trix/src/trix/models/document.js", "../../../../node_modules/trix/src/trix/models/html_parser.js", "../../../../node_modules/trix/src/trix/core/serialization.js", "../../../../node_modules/trix/src/trix/models/managed_attachment.js", "../../../../node_modules/trix/src/trix/models/attachment_manager.js", "../../../../node_modules/trix/src/trix/models/line_break_insertion.js", "../../../../node_modules/trix/src/trix/models/composition.js", "../../../../node_modules/trix/src/trix/models/undo_manager.js", "../../../../node_modules/trix/src/trix/filters/filter.js", "../../../../node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../../node_modules/trix/src/trix/models/editor.js", "../../../../node_modules/trix/src/trix/models/location_mapper.js", "../../../../node_modules/trix/src/trix/models/point_mapper.js", "../../../../node_modules/trix/src/trix/models/selection_manager.js", "../../../../node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../../node_modules/trix/src/trix/controllers/composition_controller.js", "../../../../node_modules/trix/src/trix/controllers/controller.js", "../../../../node_modules/trix/src/trix/observers/mutation_observer.js", "../../../../node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../../node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../../node_modules/trix/src/trix/controllers/input_controller.js", "../../../../node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../../node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../../node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../../node_modules/trix/src/trix/controllers/editor_controller.js", "../../../../node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../../node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../../node_modules/trix/src/trix/trix.js", "../../../../node_modules/@rails/actiontext/app/assets/javascripts/actiontext.esm.js", "../../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../javascripts/administrate/application.js", "../../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascripts/administrate/controllers/application.js", "../../javascripts/administrate/controllers/select_controller.js", "../../javascripts/administrate/controllers/table_controller.js", "../../javascripts/administrate/controllers/index.js"], - "sourcesContent": ["/*!\n * jQuery JavaScript Library v3.7.0\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-05-11T18:29Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.0\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (see trac-13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"\" +\n\t\t\t\"\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented\n// as part of Sizzle so let's maintain them in the 3.x line\n// for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces \";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting or other required elements.\n\tthead: [ 1, \"\", \"
\" ],\n\tcol: [ 2, \"\", \"
\" ],\n\ttr: [ 2, \"\", \"
\" ],\n\ttd: [ 3, \"\", \"
\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t// .css('filter') (IE 9 only, trac-12537)\n\t// .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"