diff --git "a/src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js" "b/src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js" new file mode 100644--- /dev/null +++ "b/src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js" @@ -0,0 +1,14408 @@ +var qo = Object.defineProperty; +var mr = (t) => { + throw TypeError(t); +}; +var zo = (t, e, n) => e in t ? qo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; +var Y = (t, e, n) => zo(t, typeof e != "symbol" ? e + "" : e, n), Uo = (t, e, n) => e.has(t) || mr("Cannot " + n); +var pr = (t, e, n) => e.has(t) ? mr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n); +var hn = (t, e, n) => (Uo(t, e, "access private method"), n); +function ht() { +} +function Go(t) { + return t(); +} +function jo(t) { + return typeof t == "function"; +} +function Vo(t, ...e) { + if (t == null) { + for (const i of e) i(void 0); + return ht; + } + const n = t.subscribe(...e); + return n.unsubscribe ? () => n.unsubscribe() : n; +} +function gr(t) { + const e = typeof t == "string" && t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); + return e ? [parseFloat(e[1]), e[2] || "px"] : [t, "px"]; +} +const _l = typeof window < "u"; +let br = _l ? () => window.performance.now() : () => Date.now(), dl = _l ? (t) => requestAnimationFrame(t) : ht; +const Ct = /* @__PURE__ */ new Set(); +function ml(t) { + Ct.forEach((e) => { + e.c(t) || (Ct.delete(e), e.f()); + }), Ct.size !== 0 && dl(ml); +} +function Xo(t) { + let e; + return Ct.size === 0 && dl(ml), { promise: new Promise((n) => { + Ct.add(e = { c: t, f: n }); + }), abort() { + Ct.delete(e); + } }; +} +function Zo(t) { + const e = t - 1; + return e * e * e + 1; +} +function vr(t, { delay: e = 0, duration: n = 400, easing: i = Zo, x: r = 0, y: l = 0, opacity: a = 0 } = {}) { + const o = getComputedStyle(t), s = +o.opacity, u = o.transform === "none" ? "" : o.transform, c = s * (1 - a), [_, h] = gr(r), [d, D] = gr(l); + return { delay: e, duration: n, easing: i, css: (E, F) => ` + transform: ${u} translate(${(1 - E) * _}${h}, ${(1 - E) * d}${D}); + opacity: ${s - c * F}` }; +} +const gt = []; +function Wo(t, e) { + return { subscribe: tn(t, e).subscribe }; +} +function tn(t, e = ht) { + let n; + const i = /* @__PURE__ */ new Set(); + function r(a) { + if (s = a, ((o = t) != o ? s == s : o !== s || o && typeof o == "object" || typeof o == "function") && (t = a, n)) { + const u = !gt.length; + for (const c of i) c[1](), gt.push(c, t); + if (u) { + for (let c = 0; c < gt.length; c += 2) gt[c][0](gt[c + 1]); + gt.length = 0; + } + } + var o, s; + } + function l(a) { + r(a(t)); + } + return { set: r, update: l, subscribe: function(a, o = ht) { + const s = [a, o]; + return i.add(s), i.size === 1 && (n = e(r, l) || ht), a(t), () => { + i.delete(s), i.size === 0 && n && (n(), n = null); + }; + } }; +} +function Lt(t, e, n) { + const i = !Array.isArray(t), r = i ? [t] : t; + if (!r.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value"); + const l = e.length < 2; + return Wo(n, (a, o) => { + let s = !1; + const u = []; + let c = 0, _ = ht; + const h = () => { + if (c) return; + _(); + const D = e(i ? u[0] : u, a, o); + l ? a(D) : _ = jo(D) ? D : ht; + }, d = r.map((D, E) => Vo(D, (F) => { + u[E] = F, c &= ~(1 << E), s && h(); + }, () => { + c |= 1 << E; + })); + return s = !0, h(), function() { + d.forEach(Go), _(), s = !1; + }; + }); +} +function yr(t) { + return Object.prototype.toString.call(t) === "[object Date]"; +} +function Ci(t, e, n, i) { + if (typeof n == "number" || yr(n)) { + const r = i - n, l = (n - e) / (t.dt || 1 / 60), a = (l + (t.opts.stiffness * r - t.opts.damping * l) * t.inv_mass) * t.dt; + return Math.abs(a) < t.opts.precision && Math.abs(r) < t.opts.precision ? i : (t.settled = !1, yr(n) ? new Date(n.getTime() + a) : n + a); + } + if (Array.isArray(n)) return n.map((r, l) => Ci(t, e[l], n[l], i[l])); + if (typeof n == "object") { + const r = {}; + for (const l in n) r[l] = Ci(t, e[l], n[l], i[l]); + return r; + } + throw new Error(`Cannot spring ${typeof n} values`); +} +function wr(t, e = {}) { + const n = tn(t), { stiffness: i = 0.15, damping: r = 0.8, precision: l = 0.01 } = e; + let a, o, s, u = t, c = t, _ = 1, h = 0, d = !1; + function D(F, C = {}) { + c = F; + const g = s = {}; + return t == null || C.hard || E.stiffness >= 1 && E.damping >= 1 ? (d = !0, a = br(), u = F, n.set(t = c), Promise.resolve()) : (C.soft && (h = 1 / (60 * (C.soft === !0 ? 0.5 : +C.soft)), _ = 0), o || (a = br(), d = !1, o = Xo((f) => { + if (d) return d = !1, o = null, !1; + _ = Math.min(_ + h, 1); + const m = { inv_mass: _, opts: E, settled: !0, dt: 60 * (f - a) / 1e3 }, v = Ci(m, u, t, c); + return a = f, u = t, n.set(t = v), m.settled && (o = null), !m.settled; + })), new Promise((f) => { + o.promise.then(() => { + g === s && f(); + }); + })); + } + const E = { set: D, update: (F, C) => D(F(c, t), C), subscribe: n.subscribe, stiffness: i, damping: r, precision: l }; + return E; +} +function Qo(t) { + return Yo(t) && !Jo(t); +} +function Yo(t) { + return !!t && typeof t == "object"; +} +function Jo(t) { + var e = Object.prototype.toString.call(t); + return e === "[object RegExp]" || e === "[object Date]" || ts(t); +} +var Ko = typeof Symbol == "function" && Symbol.for, es = Ko ? Symbol.for("react.element") : 60103; +function ts(t) { + return t.$$typeof === es; +} +var ns = Qo; +function is(t) { + return Array.isArray(t) ? [] : {}; +} +function Zt(t, e) { + return e.clone !== !1 && e.isMergeableObject(t) ? Bt(is(t), t, e) : t; +} +function rs(t, e, n) { + return t.concat(e).map(function(i) { + return Zt(i, n); + }); +} +function as(t, e) { + if (!e.customMerge) + return Bt; + var n = e.customMerge(t); + return typeof n == "function" ? n : Bt; +} +function ls(t) { + return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) { + return Object.propertyIsEnumerable.call(t, e); + }) : []; +} +function Dr(t) { + return Object.keys(t).concat(ls(t)); +} +function pl(t, e) { + try { + return e in t; + } catch { + return !1; + } +} +function os(t, e) { + return pl(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e)); +} +function ss(t, e, n) { + var i = {}; + return n.isMergeableObject(t) && Dr(t).forEach(function(r) { + i[r] = Zt(t[r], n); + }), Dr(e).forEach(function(r) { + os(t, r) || (pl(t, r) && n.isMergeableObject(e[r]) ? i[r] = as(r, n)(t[r], e[r], n) : i[r] = Zt(e[r], n)); + }), i; +} +function Bt(t, e, n) { + n = n || {}, n.arrayMerge = n.arrayMerge || rs, n.isMergeableObject = n.isMergeableObject || ns, n.cloneUnlessOtherwiseSpecified = Zt; + var i = Array.isArray(e), r = Array.isArray(t), l = i === r; + return l ? i ? n.arrayMerge(t, e, n) : ss(t, e, n) : Zt(e, n); +} +Bt.all = function(e, n) { + if (!Array.isArray(e)) + throw new Error("first argument should be an array"); + return e.reduce(function(i, r) { + return Bt(i, r, n); + }, {}); +}; +var Si = function(t, e) { + return Si = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { + n.__proto__ = i; + } || function(n, i) { + for (var r in i) Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]); + }, Si(t, e); +}; +function Vn(t, e) { + if (typeof e != "function" && e !== null) + throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); + Si(t, e); + function n() { + this.constructor = t; + } + t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n()); +} +var G = function() { + return G = Object.assign || function(e) { + for (var n, i = 1, r = arguments.length; i < r; i++) { + n = arguments[i]; + for (var l in n) Object.prototype.hasOwnProperty.call(n, l) && (e[l] = n[l]); + } + return e; + }, G.apply(this, arguments); +}; +function ii(t, e, n) { + if (n || arguments.length === 2) for (var i = 0, r = e.length, l; i < r; i++) + (l || !(i in e)) && (l || (l = Array.prototype.slice.call(e, 0, i)), l[i] = e[i]); + return t.concat(l || Array.prototype.slice.call(e)); +} +var q; +(function(t) { + t[t.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", t[t.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", t[t.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", t[t.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", t[t.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", t[t.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", t[t.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", t[t.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", t[t.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", t[t.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", t[t.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", t[t.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", t[t.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", t[t.INVALID_TAG = 23] = "INVALID_TAG", t[t.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", t[t.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", t[t.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; +})(q || (q = {})); +var K; +(function(t) { + t[t.literal = 0] = "literal", t[t.argument = 1] = "argument", t[t.number = 2] = "number", t[t.date = 3] = "date", t[t.time = 4] = "time", t[t.select = 5] = "select", t[t.plural = 6] = "plural", t[t.pound = 7] = "pound", t[t.tag = 8] = "tag"; +})(K || (K = {})); +var $t; +(function(t) { + t[t.number = 0] = "number", t[t.dateTime = 1] = "dateTime"; +})($t || ($t = {})); +function Er(t) { + return t.type === K.literal; +} +function us(t) { + return t.type === K.argument; +} +function gl(t) { + return t.type === K.number; +} +function bl(t) { + return t.type === K.date; +} +function vl(t) { + return t.type === K.time; +} +function yl(t) { + return t.type === K.select; +} +function wl(t) { + return t.type === K.plural; +} +function cs(t) { + return t.type === K.pound; +} +function Dl(t) { + return t.type === K.tag; +} +function El(t) { + return !!(t && typeof t == "object" && t.type === $t.number); +} +function xi(t) { + return !!(t && typeof t == "object" && t.type === $t.dateTime); +} +var Fl = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, hs = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; +function fs(t) { + var e = {}; + return t.replace(hs, function(n) { + var i = n.length; + switch (n[0]) { + case "G": + e.era = i === 4 ? "long" : i === 5 ? "narrow" : "short"; + break; + case "y": + e.year = i === 2 ? "2-digit" : "numeric"; + break; + case "Y": + case "u": + case "U": + case "r": + throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead"); + case "q": + case "Q": + throw new RangeError("`q/Q` (quarter) patterns are not supported"); + case "M": + case "L": + e.month = ["numeric", "2-digit", "short", "long", "narrow"][i - 1]; + break; + case "w": + case "W": + throw new RangeError("`w/W` (week) patterns are not supported"); + case "d": + e.day = ["numeric", "2-digit"][i - 1]; + break; + case "D": + case "F": + case "g": + throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead"); + case "E": + e.weekday = i === 4 ? "short" : i === 5 ? "narrow" : "short"; + break; + case "e": + if (i < 4) + throw new RangeError("`e..eee` (weekday) patterns are not supported"); + e.weekday = ["short", "long", "narrow", "short"][i - 4]; + break; + case "c": + if (i < 4) + throw new RangeError("`c..ccc` (weekday) patterns are not supported"); + e.weekday = ["short", "long", "narrow", "short"][i - 4]; + break; + case "a": + e.hour12 = !0; + break; + case "b": + case "B": + throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead"); + case "h": + e.hourCycle = "h12", e.hour = ["numeric", "2-digit"][i - 1]; + break; + case "H": + e.hourCycle = "h23", e.hour = ["numeric", "2-digit"][i - 1]; + break; + case "K": + e.hourCycle = "h11", e.hour = ["numeric", "2-digit"][i - 1]; + break; + case "k": + e.hourCycle = "h24", e.hour = ["numeric", "2-digit"][i - 1]; + break; + case "j": + case "J": + case "C": + throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead"); + case "m": + e.minute = ["numeric", "2-digit"][i - 1]; + break; + case "s": + e.second = ["numeric", "2-digit"][i - 1]; + break; + case "S": + case "A": + throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead"); + case "z": + e.timeZoneName = i < 4 ? "short" : "long"; + break; + case "Z": + case "O": + case "v": + case "V": + case "X": + case "x": + throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead"); + } + return ""; + }), e; +} +var _s = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; +function ds(t) { + if (t.length === 0) + throw new Error("Number skeleton cannot be empty"); + for (var e = t.split(_s).filter(function(h) { + return h.length > 0; + }), n = [], i = 0, r = e; i < r.length; i++) { + var l = r[i], a = l.split("/"); + if (a.length === 0) + throw new Error("Invalid number skeleton"); + for (var o = a[0], s = a.slice(1), u = 0, c = s; u < c.length; u++) { + var _ = c[u]; + if (_.length === 0) + throw new Error("Invalid number skeleton"); + } + n.push({ stem: o, options: s }); + } + return n; +} +function ms(t) { + return t.replace(/^(.*?)-/, ""); +} +var Fr = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, kl = /^(@+)?(\+|#+)?[rs]?$/g, ps = /(\*)(0+)|(#+)(0+)|(0+)/g, Al = /^(0+)$/; +function kr(t) { + var e = {}; + return t[t.length - 1] === "r" ? e.roundingPriority = "morePrecision" : t[t.length - 1] === "s" && (e.roundingPriority = "lessPrecision"), t.replace(kl, function(n, i, r) { + return typeof r != "string" ? (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length) : r === "+" ? e.minimumSignificantDigits = i.length : i[0] === "#" ? e.maximumSignificantDigits = i.length : (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length + (typeof r == "string" ? r.length : 0)), ""; + }), e; +} +function Cl(t) { + switch (t) { + case "sign-auto": + return { + signDisplay: "auto" + }; + case "sign-accounting": + case "()": + return { + currencySign: "accounting" + }; + case "sign-always": + case "+!": + return { + signDisplay: "always" + }; + case "sign-accounting-always": + case "()!": + return { + signDisplay: "always", + currencySign: "accounting" + }; + case "sign-except-zero": + case "+?": + return { + signDisplay: "exceptZero" + }; + case "sign-accounting-except-zero": + case "()?": + return { + signDisplay: "exceptZero", + currencySign: "accounting" + }; + case "sign-never": + case "+_": + return { + signDisplay: "never" + }; + } +} +function gs(t) { + var e; + if (t[0] === "E" && t[1] === "E" ? (e = { + notation: "engineering" + }, t = t.slice(2)) : t[0] === "E" && (e = { + notation: "scientific" + }, t = t.slice(1)), e) { + var n = t.slice(0, 2); + if (n === "+!" ? (e.signDisplay = "always", t = t.slice(2)) : n === "+?" && (e.signDisplay = "exceptZero", t = t.slice(2)), !Al.test(t)) + throw new Error("Malformed concise eng/scientific notation"); + e.minimumIntegerDigits = t.length; + } + return e; +} +function Ar(t) { + var e = {}, n = Cl(t); + return n || e; +} +function bs(t) { + for (var e = {}, n = 0, i = t; n < i.length; n++) { + var r = i[n]; + switch (r.stem) { + case "percent": + case "%": + e.style = "percent"; + continue; + case "%x100": + e.style = "percent", e.scale = 100; + continue; + case "currency": + e.style = "currency", e.currency = r.options[0]; + continue; + case "group-off": + case ",_": + e.useGrouping = !1; + continue; + case "precision-integer": + case ".": + e.maximumFractionDigits = 0; + continue; + case "measure-unit": + case "unit": + e.style = "unit", e.unit = ms(r.options[0]); + continue; + case "compact-short": + case "K": + e.notation = "compact", e.compactDisplay = "short"; + continue; + case "compact-long": + case "KK": + e.notation = "compact", e.compactDisplay = "long"; + continue; + case "scientific": + e = G(G(G({}, e), { notation: "scientific" }), r.options.reduce(function(s, u) { + return G(G({}, s), Ar(u)); + }, {})); + continue; + case "engineering": + e = G(G(G({}, e), { notation: "engineering" }), r.options.reduce(function(s, u) { + return G(G({}, s), Ar(u)); + }, {})); + continue; + case "notation-simple": + e.notation = "standard"; + continue; + case "unit-width-narrow": + e.currencyDisplay = "narrowSymbol", e.unitDisplay = "narrow"; + continue; + case "unit-width-short": + e.currencyDisplay = "code", e.unitDisplay = "short"; + continue; + case "unit-width-full-name": + e.currencyDisplay = "name", e.unitDisplay = "long"; + continue; + case "unit-width-iso-code": + e.currencyDisplay = "symbol"; + continue; + case "scale": + e.scale = parseFloat(r.options[0]); + continue; + case "integer-width": + if (r.options.length > 1) + throw new RangeError("integer-width stems only accept a single optional option"); + r.options[0].replace(ps, function(s, u, c, _, h, d) { + if (u) + e.minimumIntegerDigits = c.length; + else { + if (_ && h) + throw new Error("We currently do not support maximum integer digits"); + if (d) + throw new Error("We currently do not support exact integer digits"); + } + return ""; + }); + continue; + } + if (Al.test(r.stem)) { + e.minimumIntegerDigits = r.stem.length; + continue; + } + if (Fr.test(r.stem)) { + if (r.options.length > 1) + throw new RangeError("Fraction-precision stems only accept a single optional option"); + r.stem.replace(Fr, function(s, u, c, _, h, d) { + return c === "*" ? e.minimumFractionDigits = u.length : _ && _[0] === "#" ? e.maximumFractionDigits = _.length : h && d ? (e.minimumFractionDigits = h.length, e.maximumFractionDigits = h.length + d.length) : (e.minimumFractionDigits = u.length, e.maximumFractionDigits = u.length), ""; + }); + var l = r.options[0]; + l === "w" ? e = G(G({}, e), { trailingZeroDisplay: "stripIfInteger" }) : l && (e = G(G({}, e), kr(l))); + continue; + } + if (kl.test(r.stem)) { + e = G(G({}, e), kr(r.stem)); + continue; + } + var a = Cl(r.stem); + a && (e = G(G({}, e), a)); + var o = gs(r.stem); + o && (e = G(G({}, e), o)); + } + return e; +} +var fn = { + AX: [ + "H" + ], + BQ: [ + "H" + ], + CP: [ + "H" + ], + CZ: [ + "H" + ], + DK: [ + "H" + ], + FI: [ + "H" + ], + ID: [ + "H" + ], + IS: [ + "H" + ], + ML: [ + "H" + ], + NE: [ + "H" + ], + RU: [ + "H" + ], + SE: [ + "H" + ], + SJ: [ + "H" + ], + SK: [ + "H" + ], + AS: [ + "h", + "H" + ], + BT: [ + "h", + "H" + ], + DJ: [ + "h", + "H" + ], + ER: [ + "h", + "H" + ], + GH: [ + "h", + "H" + ], + IN: [ + "h", + "H" + ], + LS: [ + "h", + "H" + ], + PG: [ + "h", + "H" + ], + PW: [ + "h", + "H" + ], + SO: [ + "h", + "H" + ], + TO: [ + "h", + "H" + ], + VU: [ + "h", + "H" + ], + WS: [ + "h", + "H" + ], + "001": [ + "H", + "h" + ], + AL: [ + "h", + "H", + "hB" + ], + TD: [ + "h", + "H", + "hB" + ], + "ca-ES": [ + "H", + "h", + "hB" + ], + CF: [ + "H", + "h", + "hB" + ], + CM: [ + "H", + "h", + "hB" + ], + "fr-CA": [ + "H", + "h", + "hB" + ], + "gl-ES": [ + "H", + "h", + "hB" + ], + "it-CH": [ + "H", + "h", + "hB" + ], + "it-IT": [ + "H", + "h", + "hB" + ], + LU: [ + "H", + "h", + "hB" + ], + NP: [ + "H", + "h", + "hB" + ], + PF: [ + "H", + "h", + "hB" + ], + SC: [ + "H", + "h", + "hB" + ], + SM: [ + "H", + "h", + "hB" + ], + SN: [ + "H", + "h", + "hB" + ], + TF: [ + "H", + "h", + "hB" + ], + VA: [ + "H", + "h", + "hB" + ], + CY: [ + "h", + "H", + "hb", + "hB" + ], + GR: [ + "h", + "H", + "hb", + "hB" + ], + CO: [ + "h", + "H", + "hB", + "hb" + ], + DO: [ + "h", + "H", + "hB", + "hb" + ], + KP: [ + "h", + "H", + "hB", + "hb" + ], + KR: [ + "h", + "H", + "hB", + "hb" + ], + NA: [ + "h", + "H", + "hB", + "hb" + ], + PA: [ + "h", + "H", + "hB", + "hb" + ], + PR: [ + "h", + "H", + "hB", + "hb" + ], + VE: [ + "h", + "H", + "hB", + "hb" + ], + AC: [ + "H", + "h", + "hb", + "hB" + ], + AI: [ + "H", + "h", + "hb", + "hB" + ], + BW: [ + "H", + "h", + "hb", + "hB" + ], + BZ: [ + "H", + "h", + "hb", + "hB" + ], + CC: [ + "H", + "h", + "hb", + "hB" + ], + CK: [ + "H", + "h", + "hb", + "hB" + ], + CX: [ + "H", + "h", + "hb", + "hB" + ], + DG: [ + "H", + "h", + "hb", + "hB" + ], + FK: [ + "H", + "h", + "hb", + "hB" + ], + GB: [ + "H", + "h", + "hb", + "hB" + ], + GG: [ + "H", + "h", + "hb", + "hB" + ], + GI: [ + "H", + "h", + "hb", + "hB" + ], + IE: [ + "H", + "h", + "hb", + "hB" + ], + IM: [ + "H", + "h", + "hb", + "hB" + ], + IO: [ + "H", + "h", + "hb", + "hB" + ], + JE: [ + "H", + "h", + "hb", + "hB" + ], + LT: [ + "H", + "h", + "hb", + "hB" + ], + MK: [ + "H", + "h", + "hb", + "hB" + ], + MN: [ + "H", + "h", + "hb", + "hB" + ], + MS: [ + "H", + "h", + "hb", + "hB" + ], + NF: [ + "H", + "h", + "hb", + "hB" + ], + NG: [ + "H", + "h", + "hb", + "hB" + ], + NR: [ + "H", + "h", + "hb", + "hB" + ], + NU: [ + "H", + "h", + "hb", + "hB" + ], + PN: [ + "H", + "h", + "hb", + "hB" + ], + SH: [ + "H", + "h", + "hb", + "hB" + ], + SX: [ + "H", + "h", + "hb", + "hB" + ], + TA: [ + "H", + "h", + "hb", + "hB" + ], + ZA: [ + "H", + "h", + "hb", + "hB" + ], + "af-ZA": [ + "H", + "h", + "hB", + "hb" + ], + AR: [ + "H", + "h", + "hB", + "hb" + ], + CL: [ + "H", + "h", + "hB", + "hb" + ], + CR: [ + "H", + "h", + "hB", + "hb" + ], + CU: [ + "H", + "h", + "hB", + "hb" + ], + EA: [ + "H", + "h", + "hB", + "hb" + ], + "es-BO": [ + "H", + "h", + "hB", + "hb" + ], + "es-BR": [ + "H", + "h", + "hB", + "hb" + ], + "es-EC": [ + "H", + "h", + "hB", + "hb" + ], + "es-ES": [ + "H", + "h", + "hB", + "hb" + ], + "es-GQ": [ + "H", + "h", + "hB", + "hb" + ], + "es-PE": [ + "H", + "h", + "hB", + "hb" + ], + GT: [ + "H", + "h", + "hB", + "hb" + ], + HN: [ + "H", + "h", + "hB", + "hb" + ], + IC: [ + "H", + "h", + "hB", + "hb" + ], + KG: [ + "H", + "h", + "hB", + "hb" + ], + KM: [ + "H", + "h", + "hB", + "hb" + ], + LK: [ + "H", + "h", + "hB", + "hb" + ], + MA: [ + "H", + "h", + "hB", + "hb" + ], + MX: [ + "H", + "h", + "hB", + "hb" + ], + NI: [ + "H", + "h", + "hB", + "hb" + ], + PY: [ + "H", + "h", + "hB", + "hb" + ], + SV: [ + "H", + "h", + "hB", + "hb" + ], + UY: [ + "H", + "h", + "hB", + "hb" + ], + JP: [ + "H", + "h", + "K" + ], + AD: [ + "H", + "hB" + ], + AM: [ + "H", + "hB" + ], + AO: [ + "H", + "hB" + ], + AT: [ + "H", + "hB" + ], + AW: [ + "H", + "hB" + ], + BE: [ + "H", + "hB" + ], + BF: [ + "H", + "hB" + ], + BJ: [ + "H", + "hB" + ], + BL: [ + "H", + "hB" + ], + BR: [ + "H", + "hB" + ], + CG: [ + "H", + "hB" + ], + CI: [ + "H", + "hB" + ], + CV: [ + "H", + "hB" + ], + DE: [ + "H", + "hB" + ], + EE: [ + "H", + "hB" + ], + FR: [ + "H", + "hB" + ], + GA: [ + "H", + "hB" + ], + GF: [ + "H", + "hB" + ], + GN: [ + "H", + "hB" + ], + GP: [ + "H", + "hB" + ], + GW: [ + "H", + "hB" + ], + HR: [ + "H", + "hB" + ], + IL: [ + "H", + "hB" + ], + IT: [ + "H", + "hB" + ], + KZ: [ + "H", + "hB" + ], + MC: [ + "H", + "hB" + ], + MD: [ + "H", + "hB" + ], + MF: [ + "H", + "hB" + ], + MQ: [ + "H", + "hB" + ], + MZ: [ + "H", + "hB" + ], + NC: [ + "H", + "hB" + ], + NL: [ + "H", + "hB" + ], + PM: [ + "H", + "hB" + ], + PT: [ + "H", + "hB" + ], + RE: [ + "H", + "hB" + ], + RO: [ + "H", + "hB" + ], + SI: [ + "H", + "hB" + ], + SR: [ + "H", + "hB" + ], + ST: [ + "H", + "hB" + ], + TG: [ + "H", + "hB" + ], + TR: [ + "H", + "hB" + ], + WF: [ + "H", + "hB" + ], + YT: [ + "H", + "hB" + ], + BD: [ + "h", + "hB", + "H" + ], + PK: [ + "h", + "hB", + "H" + ], + AZ: [ + "H", + "hB", + "h" + ], + BA: [ + "H", + "hB", + "h" + ], + BG: [ + "H", + "hB", + "h" + ], + CH: [ + "H", + "hB", + "h" + ], + GE: [ + "H", + "hB", + "h" + ], + LI: [ + "H", + "hB", + "h" + ], + ME: [ + "H", + "hB", + "h" + ], + RS: [ + "H", + "hB", + "h" + ], + UA: [ + "H", + "hB", + "h" + ], + UZ: [ + "H", + "hB", + "h" + ], + XK: [ + "H", + "hB", + "h" + ], + AG: [ + "h", + "hb", + "H", + "hB" + ], + AU: [ + "h", + "hb", + "H", + "hB" + ], + BB: [ + "h", + "hb", + "H", + "hB" + ], + BM: [ + "h", + "hb", + "H", + "hB" + ], + BS: [ + "h", + "hb", + "H", + "hB" + ], + CA: [ + "h", + "hb", + "H", + "hB" + ], + DM: [ + "h", + "hb", + "H", + "hB" + ], + "en-001": [ + "h", + "hb", + "H", + "hB" + ], + FJ: [ + "h", + "hb", + "H", + "hB" + ], + FM: [ + "h", + "hb", + "H", + "hB" + ], + GD: [ + "h", + "hb", + "H", + "hB" + ], + GM: [ + "h", + "hb", + "H", + "hB" + ], + GU: [ + "h", + "hb", + "H", + "hB" + ], + GY: [ + "h", + "hb", + "H", + "hB" + ], + JM: [ + "h", + "hb", + "H", + "hB" + ], + KI: [ + "h", + "hb", + "H", + "hB" + ], + KN: [ + "h", + "hb", + "H", + "hB" + ], + KY: [ + "h", + "hb", + "H", + "hB" + ], + LC: [ + "h", + "hb", + "H", + "hB" + ], + LR: [ + "h", + "hb", + "H", + "hB" + ], + MH: [ + "h", + "hb", + "H", + "hB" + ], + MP: [ + "h", + "hb", + "H", + "hB" + ], + MW: [ + "h", + "hb", + "H", + "hB" + ], + NZ: [ + "h", + "hb", + "H", + "hB" + ], + SB: [ + "h", + "hb", + "H", + "hB" + ], + SG: [ + "h", + "hb", + "H", + "hB" + ], + SL: [ + "h", + "hb", + "H", + "hB" + ], + SS: [ + "h", + "hb", + "H", + "hB" + ], + SZ: [ + "h", + "hb", + "H", + "hB" + ], + TC: [ + "h", + "hb", + "H", + "hB" + ], + TT: [ + "h", + "hb", + "H", + "hB" + ], + UM: [ + "h", + "hb", + "H", + "hB" + ], + US: [ + "h", + "hb", + "H", + "hB" + ], + VC: [ + "h", + "hb", + "H", + "hB" + ], + VG: [ + "h", + "hb", + "H", + "hB" + ], + VI: [ + "h", + "hb", + "H", + "hB" + ], + ZM: [ + "h", + "hb", + "H", + "hB" + ], + BO: [ + "H", + "hB", + "h", + "hb" + ], + EC: [ + "H", + "hB", + "h", + "hb" + ], + ES: [ + "H", + "hB", + "h", + "hb" + ], + GQ: [ + "H", + "hB", + "h", + "hb" + ], + PE: [ + "H", + "hB", + "h", + "hb" + ], + AE: [ + "h", + "hB", + "hb", + "H" + ], + "ar-001": [ + "h", + "hB", + "hb", + "H" + ], + BH: [ + "h", + "hB", + "hb", + "H" + ], + DZ: [ + "h", + "hB", + "hb", + "H" + ], + EG: [ + "h", + "hB", + "hb", + "H" + ], + EH: [ + "h", + "hB", + "hb", + "H" + ], + HK: [ + "h", + "hB", + "hb", + "H" + ], + IQ: [ + "h", + "hB", + "hb", + "H" + ], + JO: [ + "h", + "hB", + "hb", + "H" + ], + KW: [ + "h", + "hB", + "hb", + "H" + ], + LB: [ + "h", + "hB", + "hb", + "H" + ], + LY: [ + "h", + "hB", + "hb", + "H" + ], + MO: [ + "h", + "hB", + "hb", + "H" + ], + MR: [ + "h", + "hB", + "hb", + "H" + ], + OM: [ + "h", + "hB", + "hb", + "H" + ], + PH: [ + "h", + "hB", + "hb", + "H" + ], + PS: [ + "h", + "hB", + "hb", + "H" + ], + QA: [ + "h", + "hB", + "hb", + "H" + ], + SA: [ + "h", + "hB", + "hb", + "H" + ], + SD: [ + "h", + "hB", + "hb", + "H" + ], + SY: [ + "h", + "hB", + "hb", + "H" + ], + TN: [ + "h", + "hB", + "hb", + "H" + ], + YE: [ + "h", + "hB", + "hb", + "H" + ], + AF: [ + "H", + "hb", + "hB", + "h" + ], + LA: [ + "H", + "hb", + "hB", + "h" + ], + CN: [ + "H", + "hB", + "hb", + "h" + ], + LV: [ + "H", + "hB", + "hb", + "h" + ], + TL: [ + "H", + "hB", + "hb", + "h" + ], + "zu-ZA": [ + "H", + "hB", + "hb", + "h" + ], + CD: [ + "hB", + "H" + ], + IR: [ + "hB", + "H" + ], + "hi-IN": [ + "hB", + "h", + "H" + ], + "kn-IN": [ + "hB", + "h", + "H" + ], + "ml-IN": [ + "hB", + "h", + "H" + ], + "te-IN": [ + "hB", + "h", + "H" + ], + KH: [ + "hB", + "h", + "H", + "hb" + ], + "ta-IN": [ + "hB", + "h", + "hb", + "H" + ], + BN: [ + "hb", + "hB", + "h", + "H" + ], + MY: [ + "hb", + "hB", + "h", + "H" + ], + ET: [ + "hB", + "hb", + "h", + "H" + ], + "gu-IN": [ + "hB", + "hb", + "h", + "H" + ], + "mr-IN": [ + "hB", + "hb", + "h", + "H" + ], + "pa-IN": [ + "hB", + "hb", + "h", + "H" + ], + TW: [ + "hB", + "hb", + "h", + "H" + ], + KE: [ + "hB", + "hb", + "H", + "h" + ], + MM: [ + "hB", + "hb", + "H", + "h" + ], + TZ: [ + "hB", + "hb", + "H", + "h" + ], + UG: [ + "hB", + "hb", + "H", + "h" + ] +}; +function vs(t, e) { + for (var n = "", i = 0; i < t.length; i++) { + var r = t.charAt(i); + if (r === "j") { + for (var l = 0; i + 1 < t.length && t.charAt(i + 1) === r; ) + l++, i++; + var a = 1 + (l & 1), o = l < 2 ? 1 : 3 + (l >> 1), s = "a", u = ys(e); + for ((u == "H" || u == "k") && (o = 0); o-- > 0; ) + n += s; + for (; a-- > 0; ) + n = u + n; + } else r === "J" ? n += "H" : n += r; + } + return n; +} +function ys(t) { + var e = t.hourCycle; + if (e === void 0 && // @ts-ignore hourCycle(s) is not identified yet + t.hourCycles && // @ts-ignore + t.hourCycles.length && (e = t.hourCycles[0]), e) + switch (e) { + case "h24": + return "k"; + case "h23": + return "H"; + case "h12": + return "h"; + case "h11": + return "K"; + default: + throw new Error("Invalid hourCycle"); + } + var n = t.language, i; + n !== "root" && (i = t.maximize().region); + var r = fn[i || ""] || fn[n || ""] || fn["".concat(n, "-001")] || fn["001"]; + return r[0]; +} +var ri, ws = new RegExp("^".concat(Fl.source, "*")), Ds = new RegExp("".concat(Fl.source, "*$")); +function z(t, e) { + return { start: t, end: e }; +} +var Es = !!String.prototype.startsWith, Fs = !!String.fromCodePoint, ks = !!Object.fromEntries, As = !!String.prototype.codePointAt, Cs = !!String.prototype.trimStart, Ss = !!String.prototype.trimEnd, xs = !!Number.isSafeInteger, Bs = xs ? Number.isSafeInteger : function(t) { + return typeof t == "number" && isFinite(t) && Math.floor(t) === t && Math.abs(t) <= 9007199254740991; +}, Bi = !0; +try { + var $s = xl("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + Bi = ((ri = $s.exec("a")) === null || ri === void 0 ? void 0 : ri[0]) === "a"; +} catch { + Bi = !1; +} +var Cr = Es ? ( + // Native + function(e, n, i) { + return e.startsWith(n, i); + } +) : ( + // For IE11 + function(e, n, i) { + return e.slice(i, i + n.length) === n; + } +), $i = Fs ? String.fromCodePoint : ( + // IE11 + function() { + for (var e = [], n = 0; n < arguments.length; n++) + e[n] = arguments[n]; + for (var i = "", r = e.length, l = 0, a; r > l; ) { + if (a = e[l++], a > 1114111) + throw RangeError(a + " is not a valid code point"); + i += a < 65536 ? String.fromCharCode(a) : String.fromCharCode(((a -= 65536) >> 10) + 55296, a % 1024 + 56320); + } + return i; + } +), Sr = ( + // native + ks ? Object.fromEntries : ( + // Ponyfill + function(e) { + for (var n = {}, i = 0, r = e; i < r.length; i++) { + var l = r[i], a = l[0], o = l[1]; + n[a] = o; + } + return n; + } + ) +), Sl = As ? ( + // Native + function(e, n) { + return e.codePointAt(n); + } +) : ( + // IE 11 + function(e, n) { + var i = e.length; + if (!(n < 0 || n >= i)) { + var r = e.charCodeAt(n), l; + return r < 55296 || r > 56319 || n + 1 === i || (l = e.charCodeAt(n + 1)) < 56320 || l > 57343 ? r : (r - 55296 << 10) + (l - 56320) + 65536; + } + } +), Ts = Cs ? ( + // Native + function(e) { + return e.trimStart(); + } +) : ( + // Ponyfill + function(e) { + return e.replace(ws, ""); + } +), Is = Ss ? ( + // Native + function(e) { + return e.trimEnd(); + } +) : ( + // Ponyfill + function(e) { + return e.replace(Ds, ""); + } +); +function xl(t, e) { + return new RegExp(t, e); +} +var Ti; +if (Bi) { + var xr = xl("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + Ti = function(e, n) { + var i; + xr.lastIndex = n; + var r = xr.exec(e); + return (i = r[1]) !== null && i !== void 0 ? i : ""; + }; +} else + Ti = function(e, n) { + for (var i = []; ; ) { + var r = Sl(e, n); + if (r === void 0 || Bl(r) || Ns(r)) + break; + i.push(r), n += r >= 65536 ? 2 : 1; + } + return $i.apply(void 0, i); + }; +var Ls = ( + /** @class */ + function() { + function t(e, n) { + n === void 0 && (n = {}), this.message = e, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!n.ignoreTag, this.locale = n.locale, this.requiresOtherClause = !!n.requiresOtherClause, this.shouldParseSkeletons = !!n.shouldParseSkeletons; + } + return t.prototype.parse = function() { + if (this.offset() !== 0) + throw Error("parser can only be used once"); + return this.parseMessage(0, "", !1); + }, t.prototype.parseMessage = function(e, n, i) { + for (var r = []; !this.isEOF(); ) { + var l = this.char(); + if (l === 123) { + var a = this.parseArgument(e, i); + if (a.err) + return a; + r.push(a.val); + } else { + if (l === 125 && e > 0) + break; + if (l === 35 && (n === "plural" || n === "selectordinal")) { + var o = this.clonePosition(); + this.bump(), r.push({ + type: K.pound, + location: z(o, this.clonePosition()) + }); + } else if (l === 60 && !this.ignoreTag && this.peek() === 47) { + if (i) + break; + return this.error(q.UNMATCHED_CLOSING_TAG, z(this.clonePosition(), this.clonePosition())); + } else if (l === 60 && !this.ignoreTag && Ii(this.peek() || 0)) { + var a = this.parseTag(e, n); + if (a.err) + return a; + r.push(a.val); + } else { + var a = this.parseLiteral(e, n); + if (a.err) + return a; + r.push(a.val); + } + } + } + return { val: r, err: null }; + }, t.prototype.parseTag = function(e, n) { + var i = this.clonePosition(); + this.bump(); + var r = this.parseTagName(); + if (this.bumpSpace(), this.bumpIf("/>")) + return { + val: { + type: K.literal, + value: "<".concat(r, "/>"), + location: z(i, this.clonePosition()) + }, + err: null + }; + if (this.bumpIf(">")) { + var l = this.parseMessage(e + 1, n, !0); + if (l.err) + return l; + var a = l.val, o = this.clonePosition(); + if (this.bumpIf("") ? { + val: { + type: K.tag, + value: r, + children: a, + location: z(i, this.clonePosition()) + }, + err: null + } : this.error(q.INVALID_TAG, z(o, this.clonePosition()))); + } else + return this.error(q.UNCLOSED_TAG, z(i, this.clonePosition())); + } else + return this.error(q.INVALID_TAG, z(i, this.clonePosition())); + }, t.prototype.parseTagName = function() { + var e = this.offset(); + for (this.bump(); !this.isEOF() && Ps(this.char()); ) + this.bump(); + return this.message.slice(e, this.offset()); + }, t.prototype.parseLiteral = function(e, n) { + for (var i = this.clonePosition(), r = ""; ; ) { + var l = this.tryParseQuote(n); + if (l) { + r += l; + continue; + } + var a = this.tryParseUnquoted(e, n); + if (a) { + r += a; + continue; + } + var o = this.tryParseLeftAngleBracket(); + if (o) { + r += o; + continue; + } + break; + } + var s = z(i, this.clonePosition()); + return { + val: { type: K.literal, value: r, location: s }, + err: null + }; + }, t.prototype.tryParseLeftAngleBracket = function() { + return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail. + !Hs(this.peek() || 0)) ? (this.bump(), "<") : null; + }, t.prototype.tryParseQuote = function(e) { + if (this.isEOF() || this.char() !== 39) + return null; + switch (this.peek()) { + case 39: + return this.bump(), this.bump(), "'"; + case 123: + case 60: + case 62: + case 125: + break; + case 35: + if (e === "plural" || e === "selectordinal") + break; + return null; + default: + return null; + } + this.bump(); + var n = [this.char()]; + for (this.bump(); !this.isEOF(); ) { + var i = this.char(); + if (i === 39) + if (this.peek() === 39) + n.push(39), this.bump(); + else { + this.bump(); + break; + } + else + n.push(i); + this.bump(); + } + return $i.apply(void 0, n); + }, t.prototype.tryParseUnquoted = function(e, n) { + if (this.isEOF()) + return null; + var i = this.char(); + return i === 60 || i === 123 || i === 35 && (n === "plural" || n === "selectordinal") || i === 125 && e > 0 ? null : (this.bump(), $i(i)); + }, t.prototype.parseArgument = function(e, n) { + var i = this.clonePosition(); + if (this.bump(), this.bumpSpace(), this.isEOF()) + return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(i, this.clonePosition())); + if (this.char() === 125) + return this.bump(), this.error(q.EMPTY_ARGUMENT, z(i, this.clonePosition())); + var r = this.parseIdentifierIfPossible().value; + if (!r) + return this.error(q.MALFORMED_ARGUMENT, z(i, this.clonePosition())); + if (this.bumpSpace(), this.isEOF()) + return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(i, this.clonePosition())); + switch (this.char()) { + case 125: + return this.bump(), { + val: { + type: K.argument, + // value does not include the opening and closing braces. + value: r, + location: z(i, this.clonePosition()) + }, + err: null + }; + case 44: + return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(i, this.clonePosition())) : this.parseArgumentOptions(e, n, r, i); + default: + return this.error(q.MALFORMED_ARGUMENT, z(i, this.clonePosition())); + } + }, t.prototype.parseIdentifierIfPossible = function() { + var e = this.clonePosition(), n = this.offset(), i = Ti(this.message, n), r = n + i.length; + this.bumpTo(r); + var l = this.clonePosition(), a = z(e, l); + return { value: i, location: a }; + }, t.prototype.parseArgumentOptions = function(e, n, i, r) { + var l, a = this.clonePosition(), o = this.parseIdentifierIfPossible().value, s = this.clonePosition(); + switch (o) { + case "": + return this.error(q.EXPECT_ARGUMENT_TYPE, z(a, s)); + case "number": + case "date": + case "time": { + this.bumpSpace(); + var u = null; + if (this.bumpIf(",")) { + this.bumpSpace(); + var c = this.clonePosition(), _ = this.parseSimpleArgStyleIfPossible(); + if (_.err) + return _; + var h = Is(_.val); + if (h.length === 0) + return this.error(q.EXPECT_ARGUMENT_STYLE, z(this.clonePosition(), this.clonePosition())); + var d = z(c, this.clonePosition()); + u = { style: h, styleLocation: d }; + } + var D = this.tryParseArgumentClose(r); + if (D.err) + return D; + var E = z(r, this.clonePosition()); + if (u && Cr(u == null ? void 0 : u.style, "::", 0)) { + var F = Ts(u.style.slice(2)); + if (o === "number") { + var _ = this.parseNumberSkeletonFromString(F, u.styleLocation); + return _.err ? _ : { + val: { type: K.number, value: i, location: E, style: _.val }, + err: null + }; + } else { + if (F.length === 0) + return this.error(q.EXPECT_DATE_TIME_SKELETON, E); + var C = F; + this.locale && (C = vs(F, this.locale)); + var h = { + type: $t.dateTime, + pattern: C, + location: u.styleLocation, + parsedOptions: this.shouldParseSkeletons ? fs(C) : {} + }, g = o === "date" ? K.date : K.time; + return { + val: { type: g, value: i, location: E, style: h }, + err: null + }; + } + } + return { + val: { + type: o === "number" ? K.number : o === "date" ? K.date : K.time, + value: i, + location: E, + style: (l = u == null ? void 0 : u.style) !== null && l !== void 0 ? l : null + }, + err: null + }; + } + case "plural": + case "selectordinal": + case "select": { + var f = this.clonePosition(); + if (this.bumpSpace(), !this.bumpIf(",")) + return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS, z(f, G({}, f))); + this.bumpSpace(); + var m = this.parseIdentifierIfPossible(), v = 0; + if (o !== "select" && m.value === "offset") { + if (!this.bumpIf(":")) + return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, z(this.clonePosition(), this.clonePosition())); + this.bumpSpace(); + var _ = this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE); + if (_.err) + return _; + this.bumpSpace(), m = this.parseIdentifierIfPossible(), v = _.val; + } + var p = this.tryParsePluralOrSelectOptions(e, o, n, m); + if (p.err) + return p; + var D = this.tryParseArgumentClose(r); + if (D.err) + return D; + var b = z(r, this.clonePosition()); + return o === "select" ? { + val: { + type: K.select, + value: i, + options: Sr(p.val), + location: b + }, + err: null + } : { + val: { + type: K.plural, + value: i, + options: Sr(p.val), + offset: v, + pluralType: o === "plural" ? "cardinal" : "ordinal", + location: b + }, + err: null + }; + } + default: + return this.error(q.INVALID_ARGUMENT_TYPE, z(a, s)); + } + }, t.prototype.tryParseArgumentClose = function(e) { + return this.isEOF() || this.char() !== 125 ? this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(e, this.clonePosition())) : (this.bump(), { val: !0, err: null }); + }, t.prototype.parseSimpleArgStyleIfPossible = function() { + for (var e = 0, n = this.clonePosition(); !this.isEOF(); ) { + var i = this.char(); + switch (i) { + case 39: { + this.bump(); + var r = this.clonePosition(); + if (!this.bumpUntil("'")) + return this.error(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, z(r, this.clonePosition())); + this.bump(); + break; + } + case 123: { + e += 1, this.bump(); + break; + } + case 125: { + if (e > 0) + e -= 1; + else + return { + val: this.message.slice(n.offset, this.offset()), + err: null + }; + break; + } + default: + this.bump(); + break; + } + } + return { + val: this.message.slice(n.offset, this.offset()), + err: null + }; + }, t.prototype.parseNumberSkeletonFromString = function(e, n) { + var i = []; + try { + i = ds(e); + } catch { + return this.error(q.INVALID_NUMBER_SKELETON, n); + } + return { + val: { + type: $t.number, + tokens: i, + location: n, + parsedOptions: this.shouldParseSkeletons ? bs(i) : {} + }, + err: null + }; + }, t.prototype.tryParsePluralOrSelectOptions = function(e, n, i, r) { + for (var l, a = !1, o = [], s = /* @__PURE__ */ new Set(), u = r.value, c = r.location; ; ) { + if (u.length === 0) { + var _ = this.clonePosition(); + if (n !== "select" && this.bumpIf("=")) { + var h = this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR, q.INVALID_PLURAL_ARGUMENT_SELECTOR); + if (h.err) + return h; + c = z(_, this.clonePosition()), u = this.message.slice(_.offset, this.offset()); + } else + break; + } + if (s.has(u)) + return this.error(n === "select" ? q.DUPLICATE_SELECT_ARGUMENT_SELECTOR : q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, c); + u === "other" && (a = !0), this.bumpSpace(); + var d = this.clonePosition(); + if (!this.bumpIf("{")) + return this.error(n === "select" ? q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, z(this.clonePosition(), this.clonePosition())); + var D = this.parseMessage(e + 1, n, i); + if (D.err) + return D; + var E = this.tryParseArgumentClose(d); + if (E.err) + return E; + o.push([ + u, + { + value: D.val, + location: z(d, this.clonePosition()) + } + ]), s.add(u), this.bumpSpace(), l = this.parseIdentifierIfPossible(), u = l.value, c = l.location; + } + return o.length === 0 ? this.error(n === "select" ? q.EXPECT_SELECT_ARGUMENT_SELECTOR : q.EXPECT_PLURAL_ARGUMENT_SELECTOR, z(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !a ? this.error(q.MISSING_OTHER_CLAUSE, z(this.clonePosition(), this.clonePosition())) : { val: o, err: null }; + }, t.prototype.tryParseDecimalInteger = function(e, n) { + var i = 1, r = this.clonePosition(); + this.bumpIf("+") || this.bumpIf("-") && (i = -1); + for (var l = !1, a = 0; !this.isEOF(); ) { + var o = this.char(); + if (o >= 48 && o <= 57) + l = !0, a = a * 10 + (o - 48), this.bump(); + else + break; + } + var s = z(r, this.clonePosition()); + return l ? (a *= i, Bs(a) ? { val: a, err: null } : this.error(n, s)) : this.error(e, s); + }, t.prototype.offset = function() { + return this.position.offset; + }, t.prototype.isEOF = function() { + return this.offset() === this.message.length; + }, t.prototype.clonePosition = function() { + return { + offset: this.position.offset, + line: this.position.line, + column: this.position.column + }; + }, t.prototype.char = function() { + var e = this.position.offset; + if (e >= this.message.length) + throw Error("out of bound"); + var n = Sl(this.message, e); + if (n === void 0) + throw Error("Offset ".concat(e, " is at invalid UTF-16 code unit boundary")); + return n; + }, t.prototype.error = function(e, n) { + return { + val: null, + err: { + kind: e, + message: this.message, + location: n + } + }; + }, t.prototype.bump = function() { + if (!this.isEOF()) { + var e = this.char(); + e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2); + } + }, t.prototype.bumpIf = function(e) { + if (Cr(this.message, e, this.offset())) { + for (var n = 0; n < e.length; n++) + this.bump(); + return !0; + } + return !1; + }, t.prototype.bumpUntil = function(e) { + var n = this.offset(), i = this.message.indexOf(e, n); + return i >= 0 ? (this.bumpTo(i), !0) : (this.bumpTo(this.message.length), !1); + }, t.prototype.bumpTo = function(e) { + if (this.offset() > e) + throw Error("targetOffset ".concat(e, " must be greater than or equal to the current offset ").concat(this.offset())); + for (e = Math.min(e, this.message.length); ; ) { + var n = this.offset(); + if (n === e) + break; + if (n > e) + throw Error("targetOffset ".concat(e, " is at invalid UTF-16 code unit boundary")); + if (this.bump(), this.isEOF()) + break; + } + }, t.prototype.bumpSpace = function() { + for (; !this.isEOF() && Bl(this.char()); ) + this.bump(); + }, t.prototype.peek = function() { + if (this.isEOF()) + return null; + var e = this.char(), n = this.offset(), i = this.message.charCodeAt(n + (e >= 65536 ? 2 : 1)); + return i ?? null; + }, t; + }() +); +function Ii(t) { + return t >= 97 && t <= 122 || t >= 65 && t <= 90; +} +function Hs(t) { + return Ii(t) || t === 47; +} +function Ps(t) { + return t === 45 || t === 46 || t >= 48 && t <= 57 || t === 95 || t >= 97 && t <= 122 || t >= 65 && t <= 90 || t == 183 || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 893 || t >= 895 && t <= 8191 || t >= 8204 && t <= 8205 || t >= 8255 && t <= 8256 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039; +} +function Bl(t) { + return t >= 9 && t <= 13 || t === 32 || t === 133 || t >= 8206 && t <= 8207 || t === 8232 || t === 8233; +} +function Ns(t) { + return t >= 33 && t <= 35 || t === 36 || t >= 37 && t <= 39 || t === 40 || t === 41 || t === 42 || t === 43 || t === 44 || t === 45 || t >= 46 && t <= 47 || t >= 58 && t <= 59 || t >= 60 && t <= 62 || t >= 63 && t <= 64 || t === 91 || t === 92 || t === 93 || t === 94 || t === 96 || t === 123 || t === 124 || t === 125 || t === 126 || t === 161 || t >= 162 && t <= 165 || t === 166 || t === 167 || t === 169 || t === 171 || t === 172 || t === 174 || t === 176 || t === 177 || t === 182 || t === 187 || t === 191 || t === 215 || t === 247 || t >= 8208 && t <= 8213 || t >= 8214 && t <= 8215 || t === 8216 || t === 8217 || t === 8218 || t >= 8219 && t <= 8220 || t === 8221 || t === 8222 || t === 8223 || t >= 8224 && t <= 8231 || t >= 8240 && t <= 8248 || t === 8249 || t === 8250 || t >= 8251 && t <= 8254 || t >= 8257 && t <= 8259 || t === 8260 || t === 8261 || t === 8262 || t >= 8263 && t <= 8273 || t === 8274 || t === 8275 || t >= 8277 && t <= 8286 || t >= 8592 && t <= 8596 || t >= 8597 && t <= 8601 || t >= 8602 && t <= 8603 || t >= 8604 && t <= 8607 || t === 8608 || t >= 8609 && t <= 8610 || t === 8611 || t >= 8612 && t <= 8613 || t === 8614 || t >= 8615 && t <= 8621 || t === 8622 || t >= 8623 && t <= 8653 || t >= 8654 && t <= 8655 || t >= 8656 && t <= 8657 || t === 8658 || t === 8659 || t === 8660 || t >= 8661 && t <= 8691 || t >= 8692 && t <= 8959 || t >= 8960 && t <= 8967 || t === 8968 || t === 8969 || t === 8970 || t === 8971 || t >= 8972 && t <= 8991 || t >= 8992 && t <= 8993 || t >= 8994 && t <= 9e3 || t === 9001 || t === 9002 || t >= 9003 && t <= 9083 || t === 9084 || t >= 9085 && t <= 9114 || t >= 9115 && t <= 9139 || t >= 9140 && t <= 9179 || t >= 9180 && t <= 9185 || t >= 9186 && t <= 9254 || t >= 9255 && t <= 9279 || t >= 9280 && t <= 9290 || t >= 9291 && t <= 9311 || t >= 9472 && t <= 9654 || t === 9655 || t >= 9656 && t <= 9664 || t === 9665 || t >= 9666 && t <= 9719 || t >= 9720 && t <= 9727 || t >= 9728 && t <= 9838 || t === 9839 || t >= 9840 && t <= 10087 || t === 10088 || t === 10089 || t === 10090 || t === 10091 || t === 10092 || t === 10093 || t === 10094 || t === 10095 || t === 10096 || t === 10097 || t === 10098 || t === 10099 || t === 10100 || t === 10101 || t >= 10132 && t <= 10175 || t >= 10176 && t <= 10180 || t === 10181 || t === 10182 || t >= 10183 && t <= 10213 || t === 10214 || t === 10215 || t === 10216 || t === 10217 || t === 10218 || t === 10219 || t === 10220 || t === 10221 || t === 10222 || t === 10223 || t >= 10224 && t <= 10239 || t >= 10240 && t <= 10495 || t >= 10496 && t <= 10626 || t === 10627 || t === 10628 || t === 10629 || t === 10630 || t === 10631 || t === 10632 || t === 10633 || t === 10634 || t === 10635 || t === 10636 || t === 10637 || t === 10638 || t === 10639 || t === 10640 || t === 10641 || t === 10642 || t === 10643 || t === 10644 || t === 10645 || t === 10646 || t === 10647 || t === 10648 || t >= 10649 && t <= 10711 || t === 10712 || t === 10713 || t === 10714 || t === 10715 || t >= 10716 && t <= 10747 || t === 10748 || t === 10749 || t >= 10750 && t <= 11007 || t >= 11008 && t <= 11055 || t >= 11056 && t <= 11076 || t >= 11077 && t <= 11078 || t >= 11079 && t <= 11084 || t >= 11085 && t <= 11123 || t >= 11124 && t <= 11125 || t >= 11126 && t <= 11157 || t === 11158 || t >= 11159 && t <= 11263 || t >= 11776 && t <= 11777 || t === 11778 || t === 11779 || t === 11780 || t === 11781 || t >= 11782 && t <= 11784 || t === 11785 || t === 11786 || t === 11787 || t === 11788 || t === 11789 || t >= 11790 && t <= 11798 || t === 11799 || t >= 11800 && t <= 11801 || t === 11802 || t === 11803 || t === 11804 || t === 11805 || t >= 11806 && t <= 11807 || t === 11808 || t === 11809 || t === 11810 || t === 11811 || t === 11812 || t === 11813 || t === 11814 || t === 11815 || t === 11816 || t === 11817 || t >= 11818 && t <= 11822 || t === 11823 || t >= 11824 && t <= 11833 || t >= 11834 && t <= 11835 || t >= 11836 && t <= 11839 || t === 11840 || t === 11841 || t === 11842 || t >= 11843 && t <= 11855 || t >= 11856 && t <= 11857 || t === 11858 || t >= 11859 && t <= 11903 || t >= 12289 && t <= 12291 || t === 12296 || t === 12297 || t === 12298 || t === 12299 || t === 12300 || t === 12301 || t === 12302 || t === 12303 || t === 12304 || t === 12305 || t >= 12306 && t <= 12307 || t === 12308 || t === 12309 || t === 12310 || t === 12311 || t === 12312 || t === 12313 || t === 12314 || t === 12315 || t === 12316 || t === 12317 || t >= 12318 && t <= 12319 || t === 12320 || t === 12336 || t === 64830 || t === 64831 || t >= 65093 && t <= 65094; +} +function Li(t) { + t.forEach(function(e) { + if (delete e.location, yl(e) || wl(e)) + for (var n in e.options) + delete e.options[n].location, Li(e.options[n].value); + else gl(e) && El(e.style) || (bl(e) || vl(e)) && xi(e.style) ? delete e.style.location : Dl(e) && Li(e.children); + }); +} +function Os(t, e) { + e === void 0 && (e = {}), e = G({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, e); + var n = new Ls(t, e).parse(); + if (n.err) { + var i = SyntaxError(q[n.err.kind]); + throw i.location = n.err.location, i.originalMessage = n.err.message, i; + } + return e != null && e.captureLocation || Li(n.val), n.val; +} +function ai(t, e) { + var n = e && e.cache ? e.cache : Gs, i = e && e.serializer ? e.serializer : Us, r = e && e.strategy ? e.strategy : qs; + return r(t, { + cache: n, + serializer: i + }); +} +function Rs(t) { + return t == null || typeof t == "number" || typeof t == "boolean"; +} +function Ms(t, e, n, i) { + var r = Rs(i) ? i : n(i), l = e.get(r); + return typeof l > "u" && (l = t.call(this, i), e.set(r, l)), l; +} +function $l(t, e, n) { + var i = Array.prototype.slice.call(arguments, 3), r = n(i), l = e.get(r); + return typeof l > "u" && (l = t.apply(this, i), e.set(r, l)), l; +} +function Tl(t, e, n, i, r) { + return n.bind(e, t, i, r); +} +function qs(t, e) { + var n = t.length === 1 ? Ms : $l; + return Tl(t, this, n, e.cache.create(), e.serializer); +} +function zs(t, e) { + return Tl(t, this, $l, e.cache.create(), e.serializer); +} +var Us = function() { + return JSON.stringify(arguments); +}; +function er() { + this.cache = /* @__PURE__ */ Object.create(null); +} +er.prototype.get = function(t) { + return this.cache[t]; +}; +er.prototype.set = function(t, e) { + this.cache[t] = e; +}; +var Gs = { + create: function() { + return new er(); + } +}, li = { + variadic: zs +}, Tt; +(function(t) { + t.MISSING_VALUE = "MISSING_VALUE", t.INVALID_VALUE = "INVALID_VALUE", t.MISSING_INTL_API = "MISSING_INTL_API"; +})(Tt || (Tt = {})); +var Xn = ( + /** @class */ + function(t) { + Vn(e, t); + function e(n, i, r) { + var l = t.call(this, n) || this; + return l.code = i, l.originalMessage = r, l; + } + return e.prototype.toString = function() { + return "[formatjs Error: ".concat(this.code, "] ").concat(this.message); + }, e; + }(Error) +), Br = ( + /** @class */ + function(t) { + Vn(e, t); + function e(n, i, r, l) { + return t.call(this, 'Invalid values for "'.concat(n, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), Tt.INVALID_VALUE, l) || this; + } + return e; + }(Xn) +), js = ( + /** @class */ + function(t) { + Vn(e, t); + function e(n, i, r) { + return t.call(this, 'Value for "'.concat(n, '" must be of type ').concat(i), Tt.INVALID_VALUE, r) || this; + } + return e; + }(Xn) +), Vs = ( + /** @class */ + function(t) { + Vn(e, t); + function e(n, i) { + return t.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(i, '"'), Tt.MISSING_VALUE, i) || this; + } + return e; + }(Xn) +), de; +(function(t) { + t[t.literal = 0] = "literal", t[t.object = 1] = "object"; +})(de || (de = {})); +function Xs(t) { + return t.length < 2 ? t : t.reduce(function(e, n) { + var i = e[e.length - 1]; + return !i || i.type !== de.literal || n.type !== de.literal ? e.push(n) : i.value += n.value, e; + }, []); +} +function Zs(t) { + return typeof t == "function"; +} +function An(t, e, n, i, r, l, a) { + if (t.length === 1 && Er(t[0])) + return [ + { + type: de.literal, + value: t[0].value + } + ]; + for (var o = [], s = 0, u = t; s < u.length; s++) { + var c = u[s]; + if (Er(c)) { + o.push({ + type: de.literal, + value: c.value + }); + continue; + } + if (cs(c)) { + typeof l == "number" && o.push({ + type: de.literal, + value: n.getNumberFormat(e).format(l) + }); + continue; + } + var _ = c.value; + if (!(r && _ in r)) + throw new Vs(_, a); + var h = r[_]; + if (us(c)) { + (!h || typeof h == "string" || typeof h == "number") && (h = typeof h == "string" || typeof h == "number" ? String(h) : ""), o.push({ + type: typeof h == "string" ? de.literal : de.object, + value: h + }); + continue; + } + if (bl(c)) { + var d = typeof c.style == "string" ? i.date[c.style] : xi(c.style) ? c.style.parsedOptions : void 0; + o.push({ + type: de.literal, + value: n.getDateTimeFormat(e, d).format(h) + }); + continue; + } + if (vl(c)) { + var d = typeof c.style == "string" ? i.time[c.style] : xi(c.style) ? c.style.parsedOptions : i.time.medium; + o.push({ + type: de.literal, + value: n.getDateTimeFormat(e, d).format(h) + }); + continue; + } + if (gl(c)) { + var d = typeof c.style == "string" ? i.number[c.style] : El(c.style) ? c.style.parsedOptions : void 0; + d && d.scale && (h = h * (d.scale || 1)), o.push({ + type: de.literal, + value: n.getNumberFormat(e, d).format(h) + }); + continue; + } + if (Dl(c)) { + var D = c.children, E = c.value, F = r[E]; + if (!Zs(F)) + throw new js(E, "function", a); + var C = An(D, e, n, i, r, l), g = F(C.map(function(v) { + return v.value; + })); + Array.isArray(g) || (g = [g]), o.push.apply(o, g.map(function(v) { + return { + type: typeof v == "string" ? de.literal : de.object, + value: v + }; + })); + } + if (yl(c)) { + var f = c.options[h] || c.options.other; + if (!f) + throw new Br(c.value, h, Object.keys(c.options), a); + o.push.apply(o, An(f.value, e, n, i, r)); + continue; + } + if (wl(c)) { + var f = c.options["=".concat(h)]; + if (!f) { + if (!Intl.PluralRules) + throw new Xn(`Intl.PluralRules is not available in this environment. +Try polyfilling it using "@formatjs/intl-pluralrules" +`, Tt.MISSING_INTL_API, a); + var m = n.getPluralRules(e, { type: c.pluralType }).select(h - (c.offset || 0)); + f = c.options[m] || c.options.other; + } + if (!f) + throw new Br(c.value, h, Object.keys(c.options), a); + o.push.apply(o, An(f.value, e, n, i, r, h - (c.offset || 0))); + continue; + } + } + return Xs(o); +} +function Ws(t, e) { + return e ? G(G(G({}, t || {}), e || {}), Object.keys(t).reduce(function(n, i) { + return n[i] = G(G({}, t[i]), e[i] || {}), n; + }, {})) : t; +} +function Qs(t, e) { + return e ? Object.keys(t).reduce(function(n, i) { + return n[i] = Ws(t[i], e[i]), n; + }, G({}, t)) : t; +} +function oi(t) { + return { + create: function() { + return { + get: function(e) { + return t[e]; + }, + set: function(e, n) { + t[e] = n; + } + }; + } + }; +} +function Ys(t) { + return t === void 0 && (t = { + number: {}, + dateTime: {}, + pluralRules: {} + }), { + getNumberFormat: ai(function() { + for (var e, n = [], i = 0; i < arguments.length; i++) + n[i] = arguments[i]; + return new ((e = Intl.NumberFormat).bind.apply(e, ii([void 0], n, !1)))(); + }, { + cache: oi(t.number), + strategy: li.variadic + }), + getDateTimeFormat: ai(function() { + for (var e, n = [], i = 0; i < arguments.length; i++) + n[i] = arguments[i]; + return new ((e = Intl.DateTimeFormat).bind.apply(e, ii([void 0], n, !1)))(); + }, { + cache: oi(t.dateTime), + strategy: li.variadic + }), + getPluralRules: ai(function() { + for (var e, n = [], i = 0; i < arguments.length; i++) + n[i] = arguments[i]; + return new ((e = Intl.PluralRules).bind.apply(e, ii([void 0], n, !1)))(); + }, { + cache: oi(t.pluralRules), + strategy: li.variadic + }) + }; +} +var Js = ( + /** @class */ + function() { + function t(e, n, i, r) { + var l = this; + if (n === void 0 && (n = t.defaultLocale), this.formatterCache = { + number: {}, + dateTime: {}, + pluralRules: {} + }, this.format = function(a) { + var o = l.formatToParts(a); + if (o.length === 1) + return o[0].value; + var s = o.reduce(function(u, c) { + return !u.length || c.type !== de.literal || typeof u[u.length - 1] != "string" ? u.push(c.value) : u[u.length - 1] += c.value, u; + }, []); + return s.length <= 1 ? s[0] || "" : s; + }, this.formatToParts = function(a) { + return An(l.ast, l.locales, l.formatters, l.formats, a, void 0, l.message); + }, this.resolvedOptions = function() { + return { + locale: l.resolvedLocale.toString() + }; + }, this.getAst = function() { + return l.ast; + }, this.locales = n, this.resolvedLocale = t.resolveLocale(n), typeof e == "string") { + if (this.message = e, !t.__parse) + throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`"); + this.ast = t.__parse(e, { + ignoreTag: r == null ? void 0 : r.ignoreTag, + locale: this.resolvedLocale + }); + } else + this.ast = e; + if (!Array.isArray(this.ast)) + throw new TypeError("A message must be provided as a String or AST."); + this.formats = Qs(t.formats, i), this.formatters = r && r.formatters || Ys(this.formatterCache); + } + return Object.defineProperty(t, "defaultLocale", { + get: function() { + return t.memoizedDefaultLocale || (t.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), t.memoizedDefaultLocale; + }, + enumerable: !1, + configurable: !0 + }), t.memoizedDefaultLocale = null, t.resolveLocale = function(e) { + var n = Intl.NumberFormat.supportedLocalesOf(e); + return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof e == "string" ? e : e[0]); + }, t.__parse = Os, t.formats = { + number: { + integer: { + maximumFractionDigits: 0 + }, + currency: { + style: "currency" + }, + percent: { + style: "percent" + } + }, + date: { + short: { + month: "numeric", + day: "numeric", + year: "2-digit" + }, + medium: { + month: "short", + day: "numeric", + year: "numeric" + }, + long: { + month: "long", + day: "numeric", + year: "numeric" + }, + full: { + weekday: "long", + month: "long", + day: "numeric", + year: "numeric" + } + }, + time: { + short: { + hour: "numeric", + minute: "numeric" + }, + medium: { + hour: "numeric", + minute: "numeric", + second: "numeric" + }, + long: { + hour: "numeric", + minute: "numeric", + second: "numeric", + timeZoneName: "short" + }, + full: { + hour: "numeric", + minute: "numeric", + second: "numeric", + timeZoneName: "short" + } + } + }, t; + }() +); +function Ks(t, e) { + if (e == null) + return; + if (e in t) + return t[e]; + const n = e.split("."); + let i = t; + for (let r = 0; r < n.length; r++) + if (typeof i == "object") { + if (r > 0) { + const l = n.slice(r, n.length).join("."); + if (l in i) { + i = i[l]; + break; + } + } + i = i[n[r]]; + } else + i = void 0; + return i; +} +const it = {}, eu = (t, e, n) => n && (e in it || (it[e] = {}), t in it[e] || (it[e][t] = n), n), Il = (t, e) => { + if (e == null) + return; + if (e in it && t in it[e]) + return it[e][t]; + const n = Zn(e); + for (let i = 0; i < n.length; i++) { + const r = n[i], l = nu(r, t); + if (l) + return eu(t, e, l); + } +}; +let tr; +const nn = tn({}); +function tu(t) { + return tr[t] || null; +} +function Ll(t) { + return t in tr; +} +function nu(t, e) { + if (!Ll(t)) + return null; + const n = tu(t); + return Ks(n, e); +} +function iu(t) { + if (t == null) + return; + const e = Zn(t); + for (let n = 0; n < e.length; n++) { + const i = e[n]; + if (Ll(i)) + return i; + } +} +function ru(t, ...e) { + delete it[t], nn.update((n) => (n[t] = Bt.all([n[t] || {}, ...e]), n)); +} +Lt( + [nn], + ([t]) => Object.keys(t) +); +nn.subscribe((t) => tr = t); +const Cn = {}; +function au(t, e) { + Cn[t].delete(e), Cn[t].size === 0 && delete Cn[t]; +} +function Hl(t) { + return Cn[t]; +} +function lu(t) { + return Zn(t).map((e) => { + const n = Hl(e); + return [e, n ? [...n] : []]; + }).filter(([, e]) => e.length > 0); +} +function Hi(t) { + return t == null ? !1 : Zn(t).some( + (e) => { + var n; + return (n = Hl(e)) == null ? void 0 : n.size; + } + ); +} +function ou(t, e) { + return Promise.all( + e.map((i) => (au(t, i), i().then((r) => r.default || r))) + ).then((i) => ru(t, ...i)); +} +const Nt = {}; +function Pl(t) { + if (!Hi(t)) + return t in Nt ? Nt[t] : Promise.resolve(); + const e = lu(t); + return Nt[t] = Promise.all( + e.map( + ([n, i]) => ou(n, i) + ) + ).then(() => { + if (Hi(t)) + return Pl(t); + delete Nt[t]; + }), Nt[t]; +} +const su = { + number: { + scientific: { notation: "scientific" }, + engineering: { notation: "engineering" }, + compactLong: { notation: "compact", compactDisplay: "long" }, + compactShort: { notation: "compact", compactDisplay: "short" } + }, + date: { + short: { month: "numeric", day: "numeric", year: "2-digit" }, + medium: { month: "short", day: "numeric", year: "numeric" }, + long: { month: "long", day: "numeric", year: "numeric" }, + full: { weekday: "long", month: "long", day: "numeric", year: "numeric" } + }, + time: { + short: { hour: "numeric", minute: "numeric" }, + medium: { hour: "numeric", minute: "numeric", second: "numeric" }, + long: { + hour: "numeric", + minute: "numeric", + second: "numeric", + timeZoneName: "short" + }, + full: { + hour: "numeric", + minute: "numeric", + second: "numeric", + timeZoneName: "short" + } + } +}, uu = { + fallbackLocale: null, + loadingDelay: 200, + formats: su, + warnOnMissingMessages: !0, + handleMissingMessage: void 0, + ignoreTag: !0 +}, cu = uu; +function It() { + return cu; +} +const si = tn(!1); +var hu = Object.defineProperty, fu = Object.defineProperties, _u = Object.getOwnPropertyDescriptors, $r = Object.getOwnPropertySymbols, du = Object.prototype.hasOwnProperty, mu = Object.prototype.propertyIsEnumerable, Tr = (t, e, n) => e in t ? hu(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, pu = (t, e) => { + for (var n in e || (e = {})) + du.call(e, n) && Tr(t, n, e[n]); + if ($r) + for (var n of $r(e)) + mu.call(e, n) && Tr(t, n, e[n]); + return t; +}, gu = (t, e) => fu(t, _u(e)); +let Pi; +const Tn = tn(null); +function Ir(t) { + return t.split("-").map((e, n, i) => i.slice(0, n + 1).join("-")).reverse(); +} +function Zn(t, e = It().fallbackLocale) { + const n = Ir(t); + return e ? [.../* @__PURE__ */ new Set([...n, ...Ir(e)])] : n; +} +function dt() { + return Pi ?? void 0; +} +Tn.subscribe((t) => { + Pi = t ?? void 0, typeof window < "u" && t != null && document.documentElement.setAttribute("lang", t); +}); +const bu = (t) => { + if (t && iu(t) && Hi(t)) { + const { loadingDelay: e } = It(); + let n; + return typeof window < "u" && dt() != null && e ? n = window.setTimeout( + () => si.set(!0), + e + ) : si.set(!0), Pl(t).then(() => { + Tn.set(t); + }).finally(() => { + clearTimeout(n), si.set(!1); + }); + } + return Tn.set(t); +}, rn = gu(pu({}, Tn), { + set: bu +}), Wn = (t) => { + const e = /* @__PURE__ */ Object.create(null); + return (i) => { + const r = JSON.stringify(i); + return r in e ? e[r] : e[r] = t(i); + }; +}; +var vu = Object.defineProperty, In = Object.getOwnPropertySymbols, Nl = Object.prototype.hasOwnProperty, Ol = Object.prototype.propertyIsEnumerable, Lr = (t, e, n) => e in t ? vu(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, nr = (t, e) => { + for (var n in e || (e = {})) + Nl.call(e, n) && Lr(t, n, e[n]); + if (In) + for (var n of In(e)) + Ol.call(e, n) && Lr(t, n, e[n]); + return t; +}, Ht = (t, e) => { + var n = {}; + for (var i in t) + Nl.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]); + if (t != null && In) + for (var i of In(t)) + e.indexOf(i) < 0 && Ol.call(t, i) && (n[i] = t[i]); + return n; +}; +const Wt = (t, e) => { + const { formats: n } = It(); + if (t in n && e in n[t]) + return n[t][e]; + throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`); +}, yu = Wn( + (t) => { + var e = t, { locale: n, format: i } = e, r = Ht(e, ["locale", "format"]); + if (n == null) + throw new Error('[svelte-i18n] A "locale" must be set to format numbers'); + return i && (r = Wt("number", i)), new Intl.NumberFormat(n, r); + } +), wu = Wn( + (t) => { + var e = t, { locale: n, format: i } = e, r = Ht(e, ["locale", "format"]); + if (n == null) + throw new Error('[svelte-i18n] A "locale" must be set to format dates'); + return i ? r = Wt("date", i) : Object.keys(r).length === 0 && (r = Wt("date", "short")), new Intl.DateTimeFormat(n, r); + } +), Du = Wn( + (t) => { + var e = t, { locale: n, format: i } = e, r = Ht(e, ["locale", "format"]); + if (n == null) + throw new Error( + '[svelte-i18n] A "locale" must be set to format time values' + ); + return i ? r = Wt("time", i) : Object.keys(r).length === 0 && (r = Wt("time", "short")), new Intl.DateTimeFormat(n, r); + } +), Eu = (t = {}) => { + var e = t, { + locale: n = dt() + } = e, i = Ht(e, [ + "locale" + ]); + return yu(nr({ locale: n }, i)); +}, Fu = (t = {}) => { + var e = t, { + locale: n = dt() + } = e, i = Ht(e, [ + "locale" + ]); + return wu(nr({ locale: n }, i)); +}, ku = (t = {}) => { + var e = t, { + locale: n = dt() + } = e, i = Ht(e, [ + "locale" + ]); + return Du(nr({ locale: n }, i)); +}, Au = Wn( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + (t, e = dt()) => new Js(t, e, It().formats, { + ignoreTag: It().ignoreTag + }) +), Cu = (t, e = {}) => { + var n, i, r, l; + let a = e; + typeof t == "object" && (a = t, t = a.id); + const { + values: o, + locale: s = dt(), + default: u + } = a; + if (s == null) + throw new Error( + "[svelte-i18n] Cannot format a message without first setting the initial locale." + ); + let c = Il(t, s); + if (!c) + c = (l = (r = (i = (n = It()).handleMissingMessage) == null ? void 0 : i.call(n, { locale: s, id: t, defaultValue: u })) != null ? r : u) != null ? l : t; + else if (typeof c != "string") + return console.warn( + `[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.` + ), c; + if (!o) + return c; + let _ = c; + try { + _ = Au(c, s).format(o); + } catch (h) { + h instanceof Error && console.warn( + `[svelte-i18n] Message "${t}" has syntax error:`, + h.message + ); + } + return _; +}, Su = (t, e) => ku(e).format(t), xu = (t, e) => Fu(e).format(t), Bu = (t, e) => Eu(e).format(t), $u = (t, e = dt()) => Il(t, e); +Lt([rn, nn], () => Cu); +Lt([rn], () => Su); +Lt([rn], () => xu); +Lt([rn], () => Bu); +Lt([rn, nn], () => $u); +const { + SvelteComponent: Tu, + append_hydration: Ni, + assign: Iu, + attr: ue, + binding_callbacks: Lu, + children: Ut, + claim_element: Rl, + claim_space: Ml, + claim_svg_element: ui, + create_slot: Hu, + detach: Ge, + element: ql, + empty: Hr, + get_all_dirty_from_scope: Pu, + get_slot_changes: Nu, + get_spread_update: Ou, + init: Ru, + insert_hydration: Qt, + listen: Mu, + noop: qu, + safe_not_equal: zu, + set_dynamic_element_data: Pr, + set_style: j, + space: zl, + svg_element: ci, + toggle_class: ae, + transition_in: Ul, + transition_out: Gl, + update_slot_base: Uu +} = window.__gradio__svelte__internal; +function Nr(t) { + let e, n, i, r, l; + return { + c() { + e = ci("svg"), n = ci("line"), i = ci("line"), this.h(); + }, + l(a) { + e = ui(a, "svg", { class: !0, xmlns: !0, viewBox: !0 }); + var o = Ut(e); + n = ui(o, "line", { + x1: !0, + y1: !0, + x2: !0, + y2: !0, + stroke: !0, + "stroke-width": !0 + }), Ut(n).forEach(Ge), i = ui(o, "line", { + x1: !0, + y1: !0, + x2: !0, + y2: !0, + stroke: !0, + "stroke-width": !0 + }), Ut(i).forEach(Ge), o.forEach(Ge), this.h(); + }, + h() { + ue(n, "x1", "1"), ue(n, "y1", "9"), ue(n, "x2", "9"), ue(n, "y2", "1"), ue(n, "stroke", "gray"), ue(n, "stroke-width", "0.5"), ue(i, "x1", "5"), ue(i, "y1", "9"), ue(i, "x2", "9"), ue(i, "y2", "5"), ue(i, "stroke", "gray"), ue(i, "stroke-width", "0.5"), ue(e, "class", "resize-handle svelte-239wnu"), ue(e, "xmlns", "http://www.w3.org/2000/svg"), ue(e, "viewBox", "0 0 10 10"); + }, + m(a, o) { + Qt(a, e, o), Ni(e, n), Ni(e, i), r || (l = Mu( + e, + "mousedown", + /*resize*/ + t[27] + ), r = !0); + }, + p: qu, + d(a) { + a && Ge(e), r = !1, l(); + } + }; +} +function Gu(t) { + var _; + let e, n, i, r, l; + const a = ( + /*#slots*/ + t[31].default + ), o = Hu( + a, + t, + /*$$scope*/ + t[30], + null + ); + let s = ( + /*resizable*/ + t[19] && Nr(t) + ), u = [ + { "data-testid": ( + /*test_id*/ + t[11] + ) }, + { id: ( + /*elem_id*/ + t[6] + ) }, + { + class: i = "block " + /*elem_classes*/ + (((_ = t[7]) == null ? void 0 : _.join(" ")) || "") + " svelte-239wnu" + }, + { + dir: r = /*rtl*/ + t[20] ? "rtl" : "ltr" + } + ], c = {}; + for (let h = 0; h < u.length; h += 1) + c = Iu(c, u[h]); + return { + c() { + e = ql( + /*tag*/ + t[25] + ), o && o.c(), n = zl(), s && s.c(), this.h(); + }, + l(h) { + e = Rl( + h, + /*tag*/ + (t[25] || "null").toUpperCase(), + { + "data-testid": !0, + id: !0, + class: !0, + dir: !0 + } + ); + var d = Ut(e); + o && o.l(d), n = Ml(d), s && s.l(d), d.forEach(Ge), this.h(); + }, + h() { + Pr( + /*tag*/ + t[25] + )(e, c), ae( + e, + "hidden", + /*visible*/ + t[14] === !1 + ), ae( + e, + "padded", + /*padding*/ + t[10] + ), ae( + e, + "flex", + /*flex*/ + t[1] + ), ae( + e, + "border_focus", + /*border_mode*/ + t[9] === "focus" + ), ae( + e, + "border_contrast", + /*border_mode*/ + t[9] === "contrast" + ), ae(e, "hide-container", !/*explicit_call*/ + t[12] && !/*container*/ + t[13]), ae( + e, + "fullscreen", + /*fullscreen*/ + t[0] + ), ae( + e, + "animating", + /*fullscreen*/ + t[0] && /*preexpansionBoundingRect*/ + t[24] !== null + ), ae( + e, + "auto-margin", + /*scale*/ + t[17] === null + ), j( + e, + "height", + /*fullscreen*/ + t[0] ? void 0 : ( + /*get_dimension*/ + t[26]( + /*height*/ + t[2] + ) + ) + ), j( + e, + "min-height", + /*fullscreen*/ + t[0] ? void 0 : ( + /*get_dimension*/ + t[26]( + /*min_height*/ + t[3] + ) + ) + ), j( + e, + "max-height", + /*fullscreen*/ + t[0] ? void 0 : ( + /*get_dimension*/ + t[26]( + /*max_height*/ + t[4] + ) + ) + ), j( + e, + "--start-top", + /*preexpansionBoundingRect*/ + t[24] ? `${/*preexpansionBoundingRect*/ + t[24].top}px` : "0px" + ), j( + e, + "--start-left", + /*preexpansionBoundingRect*/ + t[24] ? `${/*preexpansionBoundingRect*/ + t[24].left}px` : "0px" + ), j( + e, + "--start-width", + /*preexpansionBoundingRect*/ + t[24] ? `${/*preexpansionBoundingRect*/ + t[24].width}px` : "0px" + ), j( + e, + "--start-height", + /*preexpansionBoundingRect*/ + t[24] ? `${/*preexpansionBoundingRect*/ + t[24].height}px` : "0px" + ), j( + e, + "width", + /*fullscreen*/ + t[0] ? void 0 : typeof /*width*/ + t[5] == "number" ? `calc(min(${/*width*/ + t[5]}px, 100%))` : ( + /*get_dimension*/ + t[26]( + /*width*/ + t[5] + ) + ) + ), j( + e, + "border-style", + /*variant*/ + t[8] + ), j( + e, + "overflow", + /*allow_overflow*/ + t[15] ? ( + /*overflow_behavior*/ + t[16] + ) : "hidden" + ), j( + e, + "flex-grow", + /*scale*/ + t[17] + ), j(e, "min-width", `calc(min(${/*min_width*/ + t[18]}px, 100%))`), j(e, "border-width", "var(--block-border-width)"); + }, + m(h, d) { + Qt(h, e, d), o && o.m(e, null), Ni(e, n), s && s.m(e, null), t[32](e), l = !0; + }, + p(h, d) { + var D; + o && o.p && (!l || d[0] & /*$$scope*/ + 1073741824) && Uu( + o, + a, + h, + /*$$scope*/ + h[30], + l ? Nu( + a, + /*$$scope*/ + h[30], + d, + null + ) : Pu( + /*$$scope*/ + h[30] + ), + null + ), /*resizable*/ + h[19] ? s ? s.p(h, d) : (s = Nr(h), s.c(), s.m(e, null)) : s && (s.d(1), s = null), Pr( + /*tag*/ + h[25] + )(e, c = Ou(u, [ + (!l || d[0] & /*test_id*/ + 2048) && { "data-testid": ( + /*test_id*/ + h[11] + ) }, + (!l || d[0] & /*elem_id*/ + 64) && { id: ( + /*elem_id*/ + h[6] + ) }, + (!l || d[0] & /*elem_classes*/ + 128 && i !== (i = "block " + /*elem_classes*/ + (((D = h[7]) == null ? void 0 : D.join(" ")) || "") + " svelte-239wnu")) && { class: i }, + (!l || d[0] & /*rtl*/ + 1048576 && r !== (r = /*rtl*/ + h[20] ? "rtl" : "ltr")) && { dir: r } + ])), ae( + e, + "hidden", + /*visible*/ + h[14] === !1 + ), ae( + e, + "padded", + /*padding*/ + h[10] + ), ae( + e, + "flex", + /*flex*/ + h[1] + ), ae( + e, + "border_focus", + /*border_mode*/ + h[9] === "focus" + ), ae( + e, + "border_contrast", + /*border_mode*/ + h[9] === "contrast" + ), ae(e, "hide-container", !/*explicit_call*/ + h[12] && !/*container*/ + h[13]), ae( + e, + "fullscreen", + /*fullscreen*/ + h[0] + ), ae( + e, + "animating", + /*fullscreen*/ + h[0] && /*preexpansionBoundingRect*/ + h[24] !== null + ), ae( + e, + "auto-margin", + /*scale*/ + h[17] === null + ), d[0] & /*fullscreen, height*/ + 5 && j( + e, + "height", + /*fullscreen*/ + h[0] ? void 0 : ( + /*get_dimension*/ + h[26]( + /*height*/ + h[2] + ) + ) + ), d[0] & /*fullscreen, min_height*/ + 9 && j( + e, + "min-height", + /*fullscreen*/ + h[0] ? void 0 : ( + /*get_dimension*/ + h[26]( + /*min_height*/ + h[3] + ) + ) + ), d[0] & /*fullscreen, max_height*/ + 17 && j( + e, + "max-height", + /*fullscreen*/ + h[0] ? void 0 : ( + /*get_dimension*/ + h[26]( + /*max_height*/ + h[4] + ) + ) + ), d[0] & /*preexpansionBoundingRect*/ + 16777216 && j( + e, + "--start-top", + /*preexpansionBoundingRect*/ + h[24] ? `${/*preexpansionBoundingRect*/ + h[24].top}px` : "0px" + ), d[0] & /*preexpansionBoundingRect*/ + 16777216 && j( + e, + "--start-left", + /*preexpansionBoundingRect*/ + h[24] ? `${/*preexpansionBoundingRect*/ + h[24].left}px` : "0px" + ), d[0] & /*preexpansionBoundingRect*/ + 16777216 && j( + e, + "--start-width", + /*preexpansionBoundingRect*/ + h[24] ? `${/*preexpansionBoundingRect*/ + h[24].width}px` : "0px" + ), d[0] & /*preexpansionBoundingRect*/ + 16777216 && j( + e, + "--start-height", + /*preexpansionBoundingRect*/ + h[24] ? `${/*preexpansionBoundingRect*/ + h[24].height}px` : "0px" + ), d[0] & /*fullscreen, width*/ + 33 && j( + e, + "width", + /*fullscreen*/ + h[0] ? void 0 : typeof /*width*/ + h[5] == "number" ? `calc(min(${/*width*/ + h[5]}px, 100%))` : ( + /*get_dimension*/ + h[26]( + /*width*/ + h[5] + ) + ) + ), d[0] & /*variant*/ + 256 && j( + e, + "border-style", + /*variant*/ + h[8] + ), d[0] & /*allow_overflow, overflow_behavior*/ + 98304 && j( + e, + "overflow", + /*allow_overflow*/ + h[15] ? ( + /*overflow_behavior*/ + h[16] + ) : "hidden" + ), d[0] & /*scale*/ + 131072 && j( + e, + "flex-grow", + /*scale*/ + h[17] + ), d[0] & /*min_width*/ + 262144 && j(e, "min-width", `calc(min(${/*min_width*/ + h[18]}px, 100%))`); + }, + i(h) { + l || (Ul(o, h), l = !0); + }, + o(h) { + Gl(o, h), l = !1; + }, + d(h) { + h && Ge(e), o && o.d(h), s && s.d(), t[32](null); + } + }; +} +function Or(t) { + let e; + return { + c() { + e = ql("div"), this.h(); + }, + l(n) { + e = Rl(n, "DIV", { class: !0 }), Ut(e).forEach(Ge), this.h(); + }, + h() { + ue(e, "class", "placeholder svelte-239wnu"), j( + e, + "height", + /*placeholder_height*/ + t[22] + "px" + ), j( + e, + "width", + /*placeholder_width*/ + t[23] + "px" + ); + }, + m(n, i) { + Qt(n, e, i); + }, + p(n, i) { + i[0] & /*placeholder_height*/ + 4194304 && j( + e, + "height", + /*placeholder_height*/ + n[22] + "px" + ), i[0] & /*placeholder_width*/ + 8388608 && j( + e, + "width", + /*placeholder_width*/ + n[23] + "px" + ); + }, + d(n) { + n && Ge(e); + } + }; +} +function ju(t) { + let e, n, i, r = ( + /*tag*/ + t[25] && Gu(t) + ), l = ( + /*fullscreen*/ + t[0] && Or(t) + ); + return { + c() { + r && r.c(), e = zl(), l && l.c(), n = Hr(); + }, + l(a) { + r && r.l(a), e = Ml(a), l && l.l(a), n = Hr(); + }, + m(a, o) { + r && r.m(a, o), Qt(a, e, o), l && l.m(a, o), Qt(a, n, o), i = !0; + }, + p(a, o) { + /*tag*/ + a[25] && r.p(a, o), /*fullscreen*/ + a[0] ? l ? l.p(a, o) : (l = Or(a), l.c(), l.m(n.parentNode, n)) : l && (l.d(1), l = null); + }, + i(a) { + i || (Ul(r, a), i = !0); + }, + o(a) { + Gl(r, a), i = !1; + }, + d(a) { + a && (Ge(e), Ge(n)), r && r.d(a), l && l.d(a); + } + }; +} +function Vu(t, e, n) { + let { $$slots: i = {}, $$scope: r } = e, { height: l = void 0 } = e, { min_height: a = void 0 } = e, { max_height: o = void 0 } = e, { width: s = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: _ = "solid" } = e, { border_mode: h = "base" } = e, { padding: d = !0 } = e, { type: D = "normal" } = e, { test_id: E = void 0 } = e, { explicit_call: F = !1 } = e, { container: C = !0 } = e, { visible: g = !0 } = e, { allow_overflow: f = !0 } = e, { overflow_behavior: m = "auto" } = e, { scale: v = null } = e, { min_width: p = 0 } = e, { flex: b = !1 } = e, { resizable: k = !1 } = e, { rtl: y = !1 } = e, { fullscreen: w = !1 } = e, A = w, B, N = D === "fieldset" ? "fieldset" : "div", L = 0, R = 0, M = null; + function J(x) { + w && x.key === "Escape" && n(0, w = !1); + } + const V = (x) => { + if (x !== void 0) { + if (typeof x == "number") + return x + "px"; + if (typeof x == "string") + return x; + } + }, T = (x) => { + let te = x.clientY; + const pe = (I) => { + const Re = I.clientY - te; + te = I.clientY, n(21, B.style.height = `${B.offsetHeight + Re}px`, B); + }, $ = () => { + window.removeEventListener("mousemove", pe), window.removeEventListener("mouseup", $); + }; + window.addEventListener("mousemove", pe), window.addEventListener("mouseup", $); + }; + function ee(x) { + Lu[x ? "unshift" : "push"](() => { + B = x, n(21, B); + }); + } + return t.$$set = (x) => { + "height" in x && n(2, l = x.height), "min_height" in x && n(3, a = x.min_height), "max_height" in x && n(4, o = x.max_height), "width" in x && n(5, s = x.width), "elem_id" in x && n(6, u = x.elem_id), "elem_classes" in x && n(7, c = x.elem_classes), "variant" in x && n(8, _ = x.variant), "border_mode" in x && n(9, h = x.border_mode), "padding" in x && n(10, d = x.padding), "type" in x && n(28, D = x.type), "test_id" in x && n(11, E = x.test_id), "explicit_call" in x && n(12, F = x.explicit_call), "container" in x && n(13, C = x.container), "visible" in x && n(14, g = x.visible), "allow_overflow" in x && n(15, f = x.allow_overflow), "overflow_behavior" in x && n(16, m = x.overflow_behavior), "scale" in x && n(17, v = x.scale), "min_width" in x && n(18, p = x.min_width), "flex" in x && n(1, b = x.flex), "resizable" in x && n(19, k = x.resizable), "rtl" in x && n(20, y = x.rtl), "fullscreen" in x && n(0, w = x.fullscreen), "$$scope" in x && n(30, r = x.$$scope); + }, t.$$.update = () => { + t.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/ + 538968065 && w !== A && (n(29, A = w), w ? (n(24, M = B.getBoundingClientRect()), n(22, L = B.offsetHeight), n(23, R = B.offsetWidth), window.addEventListener("keydown", J)) : (n(24, M = null), window.removeEventListener("keydown", J))), t.$$.dirty[0] & /*visible*/ + 16384 && (g || n(1, b = !1)); + }, [ + w, + b, + l, + a, + o, + s, + u, + c, + _, + h, + d, + E, + F, + C, + g, + f, + m, + v, + p, + k, + y, + B, + L, + R, + M, + N, + V, + T, + D, + A, + r, + i, + ee + ]; +} +class Xu extends Tu { + constructor(e) { + super(), Ru( + this, + e, + Vu, + ju, + zu, + { + height: 2, + min_height: 3, + max_height: 4, + width: 5, + elem_id: 6, + elem_classes: 7, + variant: 8, + border_mode: 9, + padding: 10, + type: 28, + test_id: 11, + explicit_call: 12, + container: 13, + visible: 14, + allow_overflow: 15, + overflow_behavior: 16, + scale: 17, + min_width: 18, + flex: 1, + resizable: 19, + rtl: 20, + fullscreen: 0 + }, + null, + [-1, -1] + ); + } +} +function ir() { + return { + async: !1, + breaks: !1, + extensions: null, + gfm: !0, + hooks: null, + pedantic: !1, + renderer: null, + silent: !1, + tokenizer: null, + walkTokens: null + }; +} +let mt = ir(); +function jl(t) { + mt = t; +} +const Vl = /[&<>"']/, Zu = new RegExp(Vl.source, "g"), Xl = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Wu = new RegExp(Xl.source, "g"), Qu = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" +}, Rr = (t) => Qu[t]; +function ve(t, e) { + if (e) { + if (Vl.test(t)) + return t.replace(Zu, Rr); + } else if (Xl.test(t)) + return t.replace(Wu, Rr); + return t; +} +const Yu = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; +function Ju(t) { + return t.replace(Yu, (e, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : "")); +} +const Ku = /(^|[^\[])\^/g; +function W(t, e) { + let n = typeof t == "string" ? t : t.source; + e = e || ""; + const i = { + replace: (r, l) => { + let a = typeof l == "string" ? l : l.source; + return a = a.replace(Ku, "$1"), n = n.replace(r, a), i; + }, + getRegex: () => new RegExp(n, e) + }; + return i; +} +function Mr(t) { + try { + t = encodeURI(t).replace(/%25/g, "%"); + } catch { + return null; + } + return t; +} +const Gt = { exec: () => null }; +function qr(t, e) { + const n = t.replace(/\|/g, (l, a, o) => { + let s = !1, u = a; + for (; --u >= 0 && o[u] === "\\"; ) + s = !s; + return s ? "|" : " |"; + }), i = n.split(/ \|/); + let r = 0; + if (i[0].trim() || i.shift(), i.length > 0 && !i[i.length - 1].trim() && i.pop(), e) + if (i.length > e) + i.splice(e); + else + for (; i.length < e; ) + i.push(""); + for (; r < i.length; r++) + i[r] = i[r].trim().replace(/\\\|/g, "|"); + return i; +} +function _n(t, e, n) { + const i = t.length; + if (i === 0) + return ""; + let r = 0; + for (; r < i && t.charAt(i - r - 1) === e; ) + r++; + return t.slice(0, i - r); +} +function ec(t, e) { + if (t.indexOf(e[1]) === -1) + return -1; + let n = 0; + for (let i = 0; i < t.length; i++) + if (t[i] === "\\") + i++; + else if (t[i] === e[0]) + n++; + else if (t[i] === e[1] && (n--, n < 0)) + return i; + return -1; +} +function zr(t, e, n, i) { + const r = e.href, l = e.title ? ve(e.title) : null, a = t[1].replace(/\\([\[\]])/g, "$1"); + if (t[0].charAt(0) !== "!") { + i.state.inLink = !0; + const o = { + type: "link", + raw: n, + href: r, + title: l, + text: a, + tokens: i.inlineTokens(a) + }; + return i.state.inLink = !1, o; + } + return { + type: "image", + raw: n, + href: r, + title: l, + text: ve(a) + }; +} +function tc(t, e) { + const n = t.match(/^(\s+)(?:```)/); + if (n === null) + return e; + const i = n[1]; + return e.split(` +`).map((r) => { + const l = r.match(/^\s+/); + if (l === null) + return r; + const [a] = l; + return a.length >= i.length ? r.slice(i.length) : r; + }).join(` +`); +} +class Ln { + // set by the lexer + constructor(e) { + Y(this, "options"); + Y(this, "rules"); + // set by the lexer + Y(this, "lexer"); + this.options = e || mt; + } + space(e) { + const n = this.rules.block.newline.exec(e); + if (n && n[0].length > 0) + return { + type: "space", + raw: n[0] + }; + } + code(e) { + const n = this.rules.block.code.exec(e); + if (n) { + const i = n[0].replace(/^ {1,4}/gm, ""); + return { + type: "code", + raw: n[0], + codeBlockStyle: "indented", + text: this.options.pedantic ? i : _n(i, ` +`) + }; + } + } + fences(e) { + const n = this.rules.block.fences.exec(e); + if (n) { + const i = n[0], r = tc(i, n[3] || ""); + return { + type: "code", + raw: i, + lang: n[2] ? n[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : n[2], + text: r + }; + } + } + heading(e) { + const n = this.rules.block.heading.exec(e); + if (n) { + let i = n[2].trim(); + if (/#$/.test(i)) { + const r = _n(i, "#"); + (this.options.pedantic || !r || / $/.test(r)) && (i = r.trim()); + } + return { + type: "heading", + raw: n[0], + depth: n[1].length, + text: i, + tokens: this.lexer.inline(i) + }; + } + } + hr(e) { + const n = this.rules.block.hr.exec(e); + if (n) + return { + type: "hr", + raw: n[0] + }; + } + blockquote(e) { + const n = this.rules.block.blockquote.exec(e); + if (n) { + let i = n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, ` + $1`); + i = _n(i.replace(/^ *>[ \t]?/gm, ""), ` +`); + const r = this.lexer.state.top; + this.lexer.state.top = !0; + const l = this.lexer.blockTokens(i); + return this.lexer.state.top = r, { + type: "blockquote", + raw: n[0], + tokens: l, + text: i + }; + } + } + list(e) { + let n = this.rules.block.list.exec(e); + if (n) { + let i = n[1].trim(); + const r = i.length > 1, l = { + type: "list", + raw: "", + ordered: r, + start: r ? +i.slice(0, -1) : "", + loose: !1, + items: [] + }; + i = r ? `\\d{1,9}\\${i.slice(-1)}` : `\\${i}`, this.options.pedantic && (i = r ? i : "[*+-]"); + const a = new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`); + let o = "", s = "", u = !1; + for (; e; ) { + let c = !1; + if (!(n = a.exec(e)) || this.rules.block.hr.test(e)) + break; + o = n[0], e = e.substring(o.length); + let _ = n[2].split(` +`, 1)[0].replace(/^\t+/, (C) => " ".repeat(3 * C.length)), h = e.split(` +`, 1)[0], d = 0; + this.options.pedantic ? (d = 2, s = _.trimStart()) : (d = n[2].search(/[^ ]/), d = d > 4 ? 1 : d, s = _.slice(d), d += n[1].length); + let D = !1; + if (!_ && /^ *$/.test(h) && (o += h + ` +`, e = e.substring(h.length + 1), c = !0), !c) { + const C = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), g = new RegExp(`^ {0,${Math.min(3, d - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), f = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:\`\`\`|~~~)`), m = new RegExp(`^ {0,${Math.min(3, d - 1)}}#`); + for (; e; ) { + const v = e.split(` +`, 1)[0]; + if (h = v, this.options.pedantic && (h = h.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), f.test(h) || m.test(h) || C.test(h) || g.test(e)) + break; + if (h.search(/[^ ]/) >= d || !h.trim()) + s += ` +` + h.slice(d); + else { + if (D || _.search(/[^ ]/) >= 4 || f.test(_) || m.test(_) || g.test(_)) + break; + s += ` +` + h; + } + !D && !h.trim() && (D = !0), o += v + ` +`, e = e.substring(v.length + 1), _ = h.slice(d); + } + } + l.loose || (u ? l.loose = !0 : /\n *\n *$/.test(o) && (u = !0)); + let E = null, F; + this.options.gfm && (E = /^\[[ xX]\] /.exec(s), E && (F = E[0] !== "[ ] ", s = s.replace(/^\[[ xX]\] +/, ""))), l.items.push({ + type: "list_item", + raw: o, + task: !!E, + checked: F, + loose: !1, + text: s, + tokens: [] + }), l.raw += o; + } + l.items[l.items.length - 1].raw = o.trimEnd(), l.items[l.items.length - 1].text = s.trimEnd(), l.raw = l.raw.trimEnd(); + for (let c = 0; c < l.items.length; c++) + if (this.lexer.state.top = !1, l.items[c].tokens = this.lexer.blockTokens(l.items[c].text, []), !l.loose) { + const _ = l.items[c].tokens.filter((d) => d.type === "space"), h = _.length > 0 && _.some((d) => /\n.*\n/.test(d.raw)); + l.loose = h; + } + if (l.loose) + for (let c = 0; c < l.items.length; c++) + l.items[c].loose = !0; + return l; + } + } + html(e) { + const n = this.rules.block.html.exec(e); + if (n) + return { + type: "html", + block: !0, + raw: n[0], + pre: n[1] === "pre" || n[1] === "script" || n[1] === "style", + text: n[0] + }; + } + def(e) { + const n = this.rules.block.def.exec(e); + if (n) { + const i = n[1].toLowerCase().replace(/\s+/g, " "), r = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", l = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : n[3]; + return { + type: "def", + tag: i, + raw: n[0], + href: r, + title: l + }; + } + } + table(e) { + const n = this.rules.block.table.exec(e); + if (!n || !/[:|]/.test(n[2])) + return; + const i = qr(n[1]), r = n[2].replace(/^\||\| *$/g, "").split("|"), l = n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(` +`) : [], a = { + type: "table", + raw: n[0], + header: [], + align: [], + rows: [] + }; + if (i.length === r.length) { + for (const o of r) + /^ *-+: *$/.test(o) ? a.align.push("right") : /^ *:-+: *$/.test(o) ? a.align.push("center") : /^ *:-+ *$/.test(o) ? a.align.push("left") : a.align.push(null); + for (const o of i) + a.header.push({ + text: o, + tokens: this.lexer.inline(o) + }); + for (const o of l) + a.rows.push(qr(o, a.header.length).map((s) => ({ + text: s, + tokens: this.lexer.inline(s) + }))); + return a; + } + } + lheading(e) { + const n = this.rules.block.lheading.exec(e); + if (n) + return { + type: "heading", + raw: n[0], + depth: n[2].charAt(0) === "=" ? 1 : 2, + text: n[1], + tokens: this.lexer.inline(n[1]) + }; + } + paragraph(e) { + const n = this.rules.block.paragraph.exec(e); + if (n) { + const i = n[1].charAt(n[1].length - 1) === ` +` ? n[1].slice(0, -1) : n[1]; + return { + type: "paragraph", + raw: n[0], + text: i, + tokens: this.lexer.inline(i) + }; + } + } + text(e) { + const n = this.rules.block.text.exec(e); + if (n) + return { + type: "text", + raw: n[0], + text: n[0], + tokens: this.lexer.inline(n[0]) + }; + } + escape(e) { + const n = this.rules.inline.escape.exec(e); + if (n) + return { + type: "escape", + raw: n[0], + text: ve(n[1]) + }; + } + tag(e) { + const n = this.rules.inline.tag.exec(e); + if (n) + return !this.lexer.state.inLink && /^/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), { + type: "html", + raw: n[0], + inLink: this.lexer.state.inLink, + inRawBlock: this.lexer.state.inRawBlock, + block: !1, + text: n[0] + }; + } + link(e) { + const n = this.rules.inline.link.exec(e); + if (n) { + const i = n[2].trim(); + if (!this.options.pedantic && /^$/.test(i)) + return; + const a = _n(i.slice(0, -1), "\\"); + if ((i.length - a.length) % 2 === 0) + return; + } else { + const a = ec(n[2], "()"); + if (a > -1) { + const s = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + a; + n[2] = n[2].substring(0, a), n[0] = n[0].substring(0, s).trim(), n[3] = ""; + } + } + let r = n[2], l = ""; + if (this.options.pedantic) { + const a = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r); + a && (r = a[1], l = a[3]); + } else + l = n[3] ? n[3].slice(1, -1) : ""; + return r = r.trim(), /^$/.test(i) ? r = r.slice(1) : r = r.slice(1, -1)), zr(n, { + href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), + title: l && l.replace(this.rules.inline.anyPunctuation, "$1") + }, n[0], this.lexer); + } + } + reflink(e, n) { + let i; + if ((i = this.rules.inline.reflink.exec(e)) || (i = this.rules.inline.nolink.exec(e))) { + const r = (i[2] || i[1]).replace(/\s+/g, " "), l = n[r.toLowerCase()]; + if (!l) { + const a = i[0].charAt(0); + return { + type: "text", + raw: a, + text: a + }; + } + return zr(i, l, i[0], this.lexer); + } + } + emStrong(e, n, i = "") { + let r = this.rules.inline.emStrongLDelim.exec(e); + if (!r || r[3] && i.match(/[\p{L}\p{N}]/u)) + return; + if (!(r[1] || r[2] || "") || !i || this.rules.inline.punctuation.exec(i)) { + const a = [...r[0]].length - 1; + let o, s, u = a, c = 0; + const _ = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; + for (_.lastIndex = 0, n = n.slice(-1 * e.length + a); (r = _.exec(n)) != null; ) { + if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) + continue; + if (s = [...o].length, r[3] || r[4]) { + u += s; + continue; + } else if ((r[5] || r[6]) && a % 3 && !((a + s) % 3)) { + c += s; + continue; + } + if (u -= s, u > 0) + continue; + s = Math.min(s, s + u + c); + const h = [...r[0]][0].length, d = e.slice(0, a + r.index + h + s); + if (Math.min(a, s) % 2) { + const E = d.slice(1, -1); + return { + type: "em", + raw: d, + text: E, + tokens: this.lexer.inlineTokens(E) + }; + } + const D = d.slice(2, -2); + return { + type: "strong", + raw: d, + text: D, + tokens: this.lexer.inlineTokens(D) + }; + } + } + } + codespan(e) { + const n = this.rules.inline.code.exec(e); + if (n) { + let i = n[2].replace(/\n/g, " "); + const r = /[^ ]/.test(i), l = /^ /.test(i) && / $/.test(i); + return r && l && (i = i.substring(1, i.length - 1)), i = ve(i, !0), { + type: "codespan", + raw: n[0], + text: i + }; + } + } + br(e) { + const n = this.rules.inline.br.exec(e); + if (n) + return { + type: "br", + raw: n[0] + }; + } + del(e) { + const n = this.rules.inline.del.exec(e); + if (n) + return { + type: "del", + raw: n[0], + text: n[2], + tokens: this.lexer.inlineTokens(n[2]) + }; + } + autolink(e) { + const n = this.rules.inline.autolink.exec(e); + if (n) { + let i, r; + return n[2] === "@" ? (i = ve(n[1]), r = "mailto:" + i) : (i = ve(n[1]), r = i), { + type: "link", + raw: n[0], + text: i, + href: r, + tokens: [ + { + type: "text", + raw: i, + text: i + } + ] + }; + } + } + url(e) { + var i; + let n; + if (n = this.rules.inline.url.exec(e)) { + let r, l; + if (n[2] === "@") + r = ve(n[0]), l = "mailto:" + r; + else { + let a; + do + a = n[0], n[0] = ((i = this.rules.inline._backpedal.exec(n[0])) == null ? void 0 : i[0]) ?? ""; + while (a !== n[0]); + r = ve(n[0]), n[1] === "www." ? l = "http://" + n[0] : l = n[0]; + } + return { + type: "link", + raw: n[0], + text: r, + href: l, + tokens: [ + { + type: "text", + raw: r, + text: r + } + ] + }; + } + } + inlineText(e) { + const n = this.rules.inline.text.exec(e); + if (n) { + let i; + return this.lexer.state.inRawBlock ? i = n[0] : i = ve(n[0]), { + type: "text", + raw: n[0], + text: i + }; + } + } +} +const nc = /^(?: *(?:\n|$))+/, ic = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, rc = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, an = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ac = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Zl = /(?:[*+-]|\d{1,9}[.)])/, Wl = W(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Zl).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), rr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, lc = /^[^\n]+/, ar = /(?!\s*\])(?:\\.|[^\[\]\\])+/, oc = W(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ar).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), sc = W(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Zl).getRegex(), Qn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", lr = /|$))/, uc = W("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", lr).replace("tag", Qn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ql = W(rr).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex(), cc = W(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ql).getRegex(), or = { + blockquote: cc, + code: ic, + def: oc, + fences: rc, + heading: ac, + hr: an, + html: uc, + lheading: Wl, + list: sc, + newline: nc, + paragraph: Ql, + table: Gt, + text: lc +}, Ur = W("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex(), hc = { + ...or, + table: Ur, + paragraph: W(rr).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ur).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex() +}, fc = { + ...or, + html: W(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", lr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), + def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^(#{1,6})(.*)(?:\n+|$)/, + fences: Gt, + // fences not supported + lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, + paragraph: W(rr).replace("hr", an).replace("heading", ` *#{1,6} *[^ +]`).replace("lheading", Wl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() +}, Yl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, _c = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Jl = /^( {2,}|\\)\n(?!\s*$)/, dc = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, gc = W(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, ln).getRegex(), bc = W("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, ln).getRegex(), vc = W("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, ln).getRegex(), yc = W(/\\([punct])/, "gu").replace(/punct/g, ln).getRegex(), wc = W(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Dc = W(lr).replace("(?:-->|$)", "-->").getRegex(), Ec = W("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", Dc).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Hn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Fc = W(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Hn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Kl = W(/^!?\[(label)\]\[(ref)\]/).replace("label", Hn).replace("ref", ar).getRegex(), eo = W(/^!?\[(ref)\](?:\[\])?/).replace("ref", ar).getRegex(), kc = W("reflink|nolink(?!\\()", "g").replace("reflink", Kl).replace("nolink", eo).getRegex(), sr = { + _backpedal: Gt, + // only used for GFM url + anyPunctuation: yc, + autolink: wc, + blockSkip: pc, + br: Jl, + code: _c, + del: Gt, + emStrongLDelim: gc, + emStrongRDelimAst: bc, + emStrongRDelimUnd: vc, + escape: Yl, + link: Fc, + nolink: eo, + punctuation: mc, + reflink: Kl, + reflinkSearch: kc, + tag: Ec, + text: dc, + url: Gt +}, Ac = { + ...sr, + link: W(/^!?\[(label)\]\((.*?)\)/).replace("label", Hn).getRegex(), + reflink: W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Hn).getRegex() +}, Oi = { + ...sr, + escape: W(Yl).replace("])", "~|])").getRegex(), + url: W(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), + _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, + del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, + text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ s + " ".repeat(u.length)); + let i, r, l, a; + for (; e; ) + if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((o) => (i = o.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1))) { + if (i = this.tokenizer.space(e)) { + e = e.substring(i.raw.length), i.raw.length === 1 && n.length > 0 ? n[n.length - 1].raw += ` +` : n.push(i); + continue; + } + if (i = this.tokenizer.code(e)) { + e = e.substring(i.raw.length), r = n[n.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += ` +` + i.raw, r.text += ` +` + i.text, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : n.push(i); + continue; + } + if (i = this.tokenizer.fences(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.heading(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.hr(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.blockquote(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.list(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.html(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.def(e)) { + e = e.substring(i.raw.length), r = n[n.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += ` +` + i.raw, r.text += ` +` + i.raw, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = { + href: i.href, + title: i.title + }); + continue; + } + if (i = this.tokenizer.table(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.lheading(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (l = e, this.options.extensions && this.options.extensions.startBlock) { + let o = 1 / 0; + const s = e.slice(1); + let u; + this.options.extensions.startBlock.forEach((c) => { + u = c.call({ lexer: this }, s), typeof u == "number" && u >= 0 && (o = Math.min(o, u)); + }), o < 1 / 0 && o >= 0 && (l = e.substring(0, o + 1)); + } + if (this.state.top && (i = this.tokenizer.paragraph(l))) { + r = n[n.length - 1], a && r.type === "paragraph" ? (r.raw += ` +` + i.raw, r.text += ` +` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : n.push(i), a = l.length !== e.length, e = e.substring(i.raw.length); + continue; + } + if (i = this.tokenizer.text(e)) { + e = e.substring(i.raw.length), r = n[n.length - 1], r && r.type === "text" ? (r.raw += ` +` + i.raw, r.text += ` +` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : n.push(i); + continue; + } + if (e) { + const o = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(o); + break; + } else + throw new Error(o); + } + } + return this.state.top = !0, n; + } + inline(e, n = []) { + return this.inlineQueue.push({ src: e, tokens: n }), n; + } + /** + * Lexing/Compiling + */ + inlineTokens(e, n = []) { + let i, r, l, a = e, o, s, u; + if (this.tokens.links) { + const c = Object.keys(this.tokens.links); + if (c.length > 0) + for (; (o = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; ) + c.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); + } + for (; (o = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; ) + a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; ) + a = a.slice(0, o.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); + for (; e; ) + if (s || (u = ""), s = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((c) => (i = c.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1))) { + if (i = this.tokenizer.escape(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.tag(e)) { + e = e.substring(i.raw.length), r = n[n.length - 1], r && i.type === "text" && r.type === "text" ? (r.raw += i.raw, r.text += i.text) : n.push(i); + continue; + } + if (i = this.tokenizer.link(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.reflink(e, this.tokens.links)) { + e = e.substring(i.raw.length), r = n[n.length - 1], r && i.type === "text" && r.type === "text" ? (r.raw += i.raw, r.text += i.text) : n.push(i); + continue; + } + if (i = this.tokenizer.emStrong(e, a, u)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.codespan(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.br(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.del(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (i = this.tokenizer.autolink(e)) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (!this.state.inLink && (i = this.tokenizer.url(e))) { + e = e.substring(i.raw.length), n.push(i); + continue; + } + if (l = e, this.options.extensions && this.options.extensions.startInline) { + let c = 1 / 0; + const _ = e.slice(1); + let h; + this.options.extensions.startInline.forEach((d) => { + h = d.call({ lexer: this }, _), typeof h == "number" && h >= 0 && (c = Math.min(c, h)); + }), c < 1 / 0 && c >= 0 && (l = e.substring(0, c + 1)); + } + if (i = this.tokenizer.inlineText(l)) { + e = e.substring(i.raw.length), i.raw.slice(-1) !== "_" && (u = i.raw.slice(-1)), s = !0, r = n[n.length - 1], r && r.type === "text" ? (r.raw += i.raw, r.text += i.text) : n.push(i); + continue; + } + if (e) { + const c = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(c); + break; + } else + throw new Error(c); + } + } + return n; + } +} +class Pn { + constructor(e) { + Y(this, "options"); + this.options = e || mt; + } + code(e, n, i) { + var l; + const r = (l = (n || "").match(/^\S*/)) == null ? void 0 : l[0]; + return e = e.replace(/\n$/, "") + ` +`, r ? '
' + (i ? e : ve(e, !0)) + `
+` : "
" + (i ? e : ve(e, !0)) + `
+`; + } + blockquote(e) { + return `
+${e}
+`; + } + html(e, n) { + return e; + } + heading(e, n, i) { + return `${e} +`; + } + hr() { + return `
+`; + } + list(e, n, i) { + const r = n ? "ol" : "ul", l = n && i !== 1 ? ' start="' + i + '"' : ""; + return "<" + r + l + `> +` + e + " +`; + } + listitem(e, n, i) { + return `
  • ${e}
  • +`; + } + checkbox(e) { + return "'; + } + paragraph(e) { + return `

    ${e}

    +`; + } + table(e, n) { + return n && (n = `${n}`), ` + +` + e + ` +` + n + `
    +`; + } + tablerow(e) { + return ` +${e} +`; + } + tablecell(e, n) { + const i = n.header ? "th" : "td"; + return (n.align ? `<${i} align="${n.align}">` : `<${i}>`) + e + ` +`; + } + /** + * span level renderer + */ + strong(e) { + return `${e}`; + } + em(e) { + return `${e}`; + } + codespan(e) { + return `${e}`; + } + br() { + return "
    "; + } + del(e) { + return `${e}`; + } + link(e, n, i) { + const r = Mr(e); + if (r === null) + return i; + e = r; + let l = '
    ", l; + } + image(e, n, i) { + const r = Mr(e); + if (r === null) + return i; + e = r; + let l = `${i} 0 && h.tokens[0].type === "paragraph" ? (h.tokens[0].text = F + " " + h.tokens[0].text, h.tokens[0].tokens && h.tokens[0].tokens.length > 0 && h.tokens[0].tokens[0].type === "text" && (h.tokens[0].tokens[0].text = F + " " + h.tokens[0].tokens[0].text)) : h.tokens.unshift({ + type: "text", + text: F + " " + }) : E += F + " "; + } + E += this.parse(h.tokens, u), c += this.renderer.listitem(E, D, !!d); + } + i += this.renderer.list(c, o, s); + continue; + } + case "html": { + const a = l; + i += this.renderer.html(a.text, a.block); + continue; + } + case "paragraph": { + const a = l; + i += this.renderer.paragraph(this.parseInline(a.tokens)); + continue; + } + case "text": { + let a = l, o = a.tokens ? this.parseInline(a.tokens) : a.text; + for (; r + 1 < e.length && e[r + 1].type === "text"; ) + a = e[++r], o += ` +` + (a.tokens ? this.parseInline(a.tokens) : a.text); + i += n ? this.renderer.paragraph(o) : o; + continue; + } + default: { + const a = 'Token with "' + l.type + '" type was not found.'; + if (this.options.silent) + return console.error(a), ""; + throw new Error(a); + } + } + } + return i; + } + /** + * Parse Inline Tokens + */ + parseInline(e, n) { + n = n || this.renderer; + let i = ""; + for (let r = 0; r < e.length; r++) { + const l = e[r]; + if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[l.type]) { + const a = this.options.extensions.renderers[l.type].call({ parser: this }, l); + if (a !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(l.type)) { + i += a || ""; + continue; + } + } + switch (l.type) { + case "escape": { + const a = l; + i += n.text(a.text); + break; + } + case "html": { + const a = l; + i += n.html(a.text); + break; + } + case "link": { + const a = l; + i += n.link(a.href, a.title, this.parseInline(a.tokens, n)); + break; + } + case "image": { + const a = l; + i += n.image(a.href, a.title, a.text); + break; + } + case "strong": { + const a = l; + i += n.strong(this.parseInline(a.tokens, n)); + break; + } + case "em": { + const a = l; + i += n.em(this.parseInline(a.tokens, n)); + break; + } + case "codespan": { + const a = l; + i += n.codespan(a.text); + break; + } + case "br": { + i += n.br(); + break; + } + case "del": { + const a = l; + i += n.del(this.parseInline(a.tokens, n)); + break; + } + case "text": { + const a = l; + i += n.text(a.text); + break; + } + default: { + const a = 'Token with "' + l.type + '" type was not found.'; + if (this.options.silent) + return console.error(a), ""; + throw new Error(a); + } + } + } + return i; + } +} +class jt { + constructor(e) { + Y(this, "options"); + this.options = e || mt; + } + /** + * Process markdown before marked + */ + preprocess(e) { + return e; + } + /** + * Process HTML after marked is finished + */ + postprocess(e) { + return e; + } + /** + * Process all tokens before walk tokens + */ + processAllTokens(e) { + return e; + } +} +Y(jt, "passThroughHooks", /* @__PURE__ */ new Set([ + "preprocess", + "postprocess", + "processAllTokens" +])); +var _t, Ri, no; +class to { + constructor(...e) { + pr(this, _t); + Y(this, "defaults", ir()); + Y(this, "options", this.setOptions); + Y(this, "parse", hn(this, _t, Ri).call(this, je.lex, Ve.parse)); + Y(this, "parseInline", hn(this, _t, Ri).call(this, je.lexInline, Ve.parseInline)); + Y(this, "Parser", Ve); + Y(this, "Renderer", Pn); + Y(this, "TextRenderer", ur); + Y(this, "Lexer", je); + Y(this, "Tokenizer", Ln); + Y(this, "Hooks", jt); + this.use(...e); + } + /** + * Run callback for every token + */ + walkTokens(e, n) { + var r, l; + let i = []; + for (const a of e) + switch (i = i.concat(n.call(this, a)), a.type) { + case "table": { + const o = a; + for (const s of o.header) + i = i.concat(this.walkTokens(s.tokens, n)); + for (const s of o.rows) + for (const u of s) + i = i.concat(this.walkTokens(u.tokens, n)); + break; + } + case "list": { + const o = a; + i = i.concat(this.walkTokens(o.items, n)); + break; + } + default: { + const o = a; + (l = (r = this.defaults.extensions) == null ? void 0 : r.childTokens) != null && l[o.type] ? this.defaults.extensions.childTokens[o.type].forEach((s) => { + const u = o[s].flat(1 / 0); + i = i.concat(this.walkTokens(u, n)); + }) : o.tokens && (i = i.concat(this.walkTokens(o.tokens, n))); + } + } + return i; + } + use(...e) { + const n = this.defaults.extensions || { renderers: {}, childTokens: {} }; + return e.forEach((i) => { + const r = { ...i }; + if (r.async = this.defaults.async || r.async || !1, i.extensions && (i.extensions.forEach((l) => { + if (!l.name) + throw new Error("extension name required"); + if ("renderer" in l) { + const a = n.renderers[l.name]; + a ? n.renderers[l.name] = function(...o) { + let s = l.renderer.apply(this, o); + return s === !1 && (s = a.apply(this, o)), s; + } : n.renderers[l.name] = l.renderer; + } + if ("tokenizer" in l) { + if (!l.level || l.level !== "block" && l.level !== "inline") + throw new Error("extension level must be 'block' or 'inline'"); + const a = n[l.level]; + a ? a.unshift(l.tokenizer) : n[l.level] = [l.tokenizer], l.start && (l.level === "block" ? n.startBlock ? n.startBlock.push(l.start) : n.startBlock = [l.start] : l.level === "inline" && (n.startInline ? n.startInline.push(l.start) : n.startInline = [l.start])); + } + "childTokens" in l && l.childTokens && (n.childTokens[l.name] = l.childTokens); + }), r.extensions = n), i.renderer) { + const l = this.defaults.renderer || new Pn(this.defaults); + for (const a in i.renderer) { + if (!(a in l)) + throw new Error(`renderer '${a}' does not exist`); + if (a === "options") + continue; + const o = a, s = i.renderer[o], u = l[o]; + l[o] = (...c) => { + let _ = s.apply(l, c); + return _ === !1 && (_ = u.apply(l, c)), _ || ""; + }; + } + r.renderer = l; + } + if (i.tokenizer) { + const l = this.defaults.tokenizer || new Ln(this.defaults); + for (const a in i.tokenizer) { + if (!(a in l)) + throw new Error(`tokenizer '${a}' does not exist`); + if (["options", "rules", "lexer"].includes(a)) + continue; + const o = a, s = i.tokenizer[o], u = l[o]; + l[o] = (...c) => { + let _ = s.apply(l, c); + return _ === !1 && (_ = u.apply(l, c)), _; + }; + } + r.tokenizer = l; + } + if (i.hooks) { + const l = this.defaults.hooks || new jt(); + for (const a in i.hooks) { + if (!(a in l)) + throw new Error(`hook '${a}' does not exist`); + if (a === "options") + continue; + const o = a, s = i.hooks[o], u = l[o]; + jt.passThroughHooks.has(a) ? l[o] = (c) => { + if (this.defaults.async) + return Promise.resolve(s.call(l, c)).then((h) => u.call(l, h)); + const _ = s.call(l, c); + return u.call(l, _); + } : l[o] = (...c) => { + let _ = s.apply(l, c); + return _ === !1 && (_ = u.apply(l, c)), _; + }; + } + r.hooks = l; + } + if (i.walkTokens) { + const l = this.defaults.walkTokens, a = i.walkTokens; + r.walkTokens = function(o) { + let s = []; + return s.push(a.call(this, o)), l && (s = s.concat(l.call(this, o))), s; + }; + } + this.defaults = { ...this.defaults, ...r }; + }), this; + } + setOptions(e) { + return this.defaults = { ...this.defaults, ...e }, this; + } + lexer(e, n) { + return je.lex(e, n ?? this.defaults); + } + parser(e, n) { + return Ve.parse(e, n ?? this.defaults); + } +} +_t = new WeakSet(), Ri = function(e, n) { + return (i, r) => { + const l = { ...r }, a = { ...this.defaults, ...l }; + this.defaults.async === !0 && l.async === !1 && (a.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), a.async = !0); + const o = hn(this, _t, no).call(this, !!a.silent, !!a.async); + if (typeof i > "u" || i === null) + return o(new Error("marked(): input parameter is undefined or null")); + if (typeof i != "string") + return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(i) + ", string expected")); + if (a.hooks && (a.hooks.options = a), a.async) + return Promise.resolve(a.hooks ? a.hooks.preprocess(i) : i).then((s) => e(s, a)).then((s) => a.hooks ? a.hooks.processAllTokens(s) : s).then((s) => a.walkTokens ? Promise.all(this.walkTokens(s, a.walkTokens)).then(() => s) : s).then((s) => n(s, a)).then((s) => a.hooks ? a.hooks.postprocess(s) : s).catch(o); + try { + a.hooks && (i = a.hooks.preprocess(i)); + let s = e(i, a); + a.hooks && (s = a.hooks.processAllTokens(s)), a.walkTokens && this.walkTokens(s, a.walkTokens); + let u = n(s, a); + return a.hooks && (u = a.hooks.postprocess(u)), u; + } catch (s) { + return o(s); + } + }; +}, no = function(e, n) { + return (i) => { + if (i.message += ` +Please report this to https://github.com/markedjs/marked.`, e) { + const r = "

    An error occurred:

    " + ve(i.message + "", !0) + "
    "; + return n ? Promise.resolve(r) : r; + } + if (n) + return Promise.reject(i); + throw i; + }; +}; +const ft = new to(); +function Z(t, e) { + return ft.parse(t, e); +} +Z.options = Z.setOptions = function(t) { + return ft.setOptions(t), Z.defaults = ft.defaults, jl(Z.defaults), Z; +}; +Z.getDefaults = ir; +Z.defaults = mt; +Z.use = function(...t) { + return ft.use(...t), Z.defaults = ft.defaults, jl(Z.defaults), Z; +}; +Z.walkTokens = function(t, e) { + return ft.walkTokens(t, e); +}; +Z.parseInline = ft.parseInline; +Z.Parser = Ve; +Z.parser = Ve.parse; +Z.Renderer = Pn; +Z.TextRenderer = ur; +Z.Lexer = je; +Z.lexer = je.lex; +Z.Tokenizer = Ln; +Z.Hooks = jt; +Z.parse = Z; +Z.options; +Z.setOptions; +Z.use; +Z.walkTokens; +Z.parseInline; +Ve.parse; +je.lex; +function Sc(t) { + if (typeof t == "function" && (t = { + highlight: t + }), !t || typeof t.highlight != "function") + throw new Error("Must provide highlight function"); + return typeof t.langPrefix != "string" && (t.langPrefix = "language-"), typeof t.emptyLangClass != "string" && (t.emptyLangClass = ""), { + async: !!t.async, + walkTokens(e) { + if (e.type !== "code") + return; + const n = Gr(e.lang); + if (t.async) + return Promise.resolve(t.highlight(e.text, n, e.lang || "")).then(jr(e)); + const i = t.highlight(e.text, n, e.lang || ""); + if (i instanceof Promise) + throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function."); + jr(e)(i); + }, + useNewRenderer: !0, + renderer: { + code(e, n, i) { + typeof e == "object" && (i = e.escaped, n = e.lang, e = e.text); + const r = Gr(n), l = r ? t.langPrefix + Xr(r) : t.emptyLangClass, a = l ? ` class="${l}"` : ""; + return e = e.replace(/\n$/, ""), `
    ${i ? e : Xr(e, !0)}
    +
    `; + } + } + }; +} +function Gr(t) { + return (t || "").match(/\S*/)[0]; +} +function jr(t) { + return (e) => { + typeof e == "string" && e !== t.text && (t.escaped = !0, t.text = e); + }; +} +const io = /[&<>"']/, xc = new RegExp(io.source, "g"), ro = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Bc = new RegExp(ro.source, "g"), $c = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" +}, Vr = (t) => $c[t]; +function Xr(t, e) { + if (e) { + if (io.test(t)) + return t.replace(xc, Vr); + } else if (ro.test(t)) + return t.replace(Bc, Vr); + return t; +} +const Tc = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, Ic = Object.hasOwnProperty; +class cr { + /** + * Create a new slug class. + */ + constructor() { + this.occurrences, this.reset(); + } + /** + * Generate a unique slug. + * + * Tracks previously generated slugs: repeated calls with the same value + * will result in different slugs. + * Use the `slug` function to get same slugs. + * + * @param {string} value + * String of text to slugify + * @param {boolean} [maintainCase=false] + * Keep the current case, otherwise make all lowercase + * @return {string} + * A unique slug string + */ + slug(e, n) { + const i = this; + let r = Lc(e, n === !0); + const l = r; + for (; Ic.call(i.occurrences, r); ) + i.occurrences[l]++, r = l + "-" + i.occurrences[l]; + return i.occurrences[r] = 0, r; + } + /** + * Reset - Forget all previous slugs + * + * @return void + */ + reset() { + this.occurrences = /* @__PURE__ */ Object.create(null); + } +} +function Lc(t, e) { + return typeof t != "string" ? "" : (e || (t = t.toLowerCase()), t.replace(Tc, "").replace(/ /g, "-")); +} +let ao = new cr(), lo = []; +function Hc({ prefix: t = "", globalSlugs: e = !1 } = {}) { + return { + headerIds: !1, + // prevent deprecation warning; remove this once headerIds option is removed + hooks: { + preprocess(n) { + return e || Pc(), n; + } + }, + renderer: { + heading(n, i, r) { + r = r.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, ""); + const l = `${t}${ao.slug(r)}`, a = { level: i, text: n, id: l }; + return lo.push(a), `${n} +`; + } + } + }; +} +function Pc() { + lo = [], ao = new cr(); +} +var Zr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function rm(t) { + return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; +} +var oo = { exports: {} }; +(function(t) { + var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {}; + /** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ + var n = function(i) { + var r = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, l = 0, a = {}, o = { + /** + * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the + * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load + * additional languages or plugins yourself. + * + * By setting this value to `true`, Prism will not automatically highlight all code elements on the page. + * + * You obviously have to change this value before the automatic highlighting started. To do this, you can add an + * empty Prism object into the global scope before loading the Prism script like this: + * + * ```js + * window.Prism = window.Prism || {}; + * Prism.manual = true; + * // add a new