var hne = Object.defineProperty;
var pne = (t, e, n) => e in t ? hne(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var we = (t, e, n) => pne(t, typeof e != "symbol" ? e + "" : e, n);
import * as J from "react";
import j, { useState as ft, useEffect as kt, forwardRef as mne, useRef as ct, useImperativeHandle as gne, useCallback as $t, useContext as Au, useLayoutEffect as rh, useMemo as Vm, Fragment as vne } from "react";
import xj, { createPortal as _j } from "react-dom";
(function() {
  try {
    var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, e = new t.Error().stack;
    e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "bfe81679-99e3-4b92-baf2-93d0d8b7ea9d", t._sentryDebugIdIdentifier = "sentry-dbid-bfe81679-99e3-4b92-baf2-93d0d8b7ea9d");
  } catch {
  }
})();
var on = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Gs(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
function Sk(t) {
  if (t.__esModule) return t;
  var e = t.default;
  if (typeof e == "function") {
    var n = function i() {
      return this instanceof i ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
    };
    n.prototype = e.prototype;
  } else n = {};
  return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(t).forEach(function(i) {
    var r = Object.getOwnPropertyDescriptor(t, i);
    Object.defineProperty(n, i, r.get ? r : {
      enumerable: !0,
      get: function() {
        return t[i];
      }
    });
  }), n;
}
var Oj = { exports: {} }, Ck = {};
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var bne = j, yne = Symbol.for("react.element"), wne = Symbol.for("react.fragment"), kne = Object.prototype.hasOwnProperty, xne = bne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ne = { key: !0, ref: !0, __self: !0, __source: !0 };
function Sj(t, e, n) {
  var i, r = {}, s = null, o = null;
  n !== void 0 && (s = "" + n), e.key !== void 0 && (s = "" + e.key), e.ref !== void 0 && (o = e.ref);
  for (i in e) kne.call(e, i) && !_ne.hasOwnProperty(i) && (r[i] = e[i]);
  if (t && t.defaultProps) for (i in e = t.defaultProps, e) r[i] === void 0 && (r[i] = e[i]);
  return { $$typeof: yne, type: t, key: s, ref: o, props: r, _owner: xne.current };
}
Ck.Fragment = wne;
Ck.jsx = Sj;
Ck.jsxs = Sj;
Oj.exports = Ck;
var y = Oj.exports;
const Cj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M12 2v20m10-10H2" })), xS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2 }, /* @__PURE__ */ J.createElement("path", { d: "M8 7h15" }), /* @__PURE__ */ J.createElement("path", { d: "M23 17.5V1H8v18.5", "data-cap": "butt" }), /* @__PURE__ */ J.createElement("circle", { cx: 4.5, cy: 19.5, r: 3.5 }), /* @__PURE__ */ J.createElement("circle", { cx: 19.5, cy: 17.5, r: 3.5 }))), Ej = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 2v10h8a5 5 0 0 0 0-10H3m2 20V12h9c3.314 0 6 2.238 6 5s-2.686 5-6 5H3" })), _S = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m21 22-9-5-9 5V3a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v19Z" })), OS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M22 6H2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1ZM7 12h10" })), SS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z" }), /* @__PURE__ */ J.createElement("path", { fill: "currentColor", d: "M12 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6.5v6" })), Tj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M31.976 10.886c-.007-.039-.014-.078-.024-.116l-.022-.066c-.01-.034-.022-.068-.035-.1l-.03-.067c-.015-.031-.03-.062-.048-.092-.012-.022-.026-.042-.039-.063-.018-.029-.037-.057-.058-.084-.015-.02-.03-.04-.047-.059-.022-.026-.045-.05-.068-.075l-.055-.053c-.025-.023-.051-.045-.078-.065-.021-.016-.041-.033-.063-.047-.008-.006-.014-.013-.023-.018L16.762.231c-.461-.308-1.063-.308-1.525 0L.612 9.981l-.022.017c-.022.015-.042.031-.063.047-.027.021-.053.043-.078.065-.019.017-.037.035-.055.054-.024.024-.046.048-.068.074-.017.02-.032.039-.047.06-.02.028-.04.055-.058.084l-.04.064c-.017.03-.032.06-.046.09-.01.022-.022.045-.03.067-.014.033-.026.067-.036.1l-.022.065c-.01.038-.017.076-.024.115-.004.02-.008.04-.01.06-.009.06-.013.119-.013.18v9.751c0 .06.004.121.013.18.003.022.009.039.013.06.007.038.013.077.026.116l.021.067c.011.034.022.069.035.1.009.022.021.043.03.065.014.03.03.06.047.092.012.021.026.043.04.062.018.03.038.056.06.082.014.022.03.04.047.06.022.026.043.051.069.074.017.018.034.04.056.052l.077.066c.021.017.043.03.06.046.009.005.014.013.022.017l14.621 9.755c.231.155.496.233.763.232.267-.002.532-.078.763-.232l14.625-9.75.022-.016c.022-.015.042-.031.063-.047.027-.021.053-.043.078-.066l.055-.053c.024-.024.047-.049.068-.075.017-.02.032-.039.047-.06.02-.026.04-.054.058-.083.014-.02.027-.042.04-.063.017-.03.032-.06.047-.092l.03-.066c.014-.033.025-.067.035-.1.008-.023.016-.045.022-.067.01-.038.017-.077.024-.116.004-.02.009-.039.01-.06.009-.059.013-.118.013-.179v-9.75c0-.06-.005-.12-.012-.18-.004-.02-.01-.038-.014-.06h.002zM16 19.253L11.137 16 16 12.747 20.863 16 16 19.253zm-1.375-8.895l-5.962 3.988-4.812-3.22 10.774-7.182v6.414zM6.19 16l-3.44 2.3V13.7l3.44 2.3zm2.473 1.655l5.962 3.987v6.414L3.85 20.873l4.812-3.219v.001zm8.712 3.986l5.961-3.987 4.813 3.22-10.774 7.181v-6.414zm8.434-5.64l3.44-2.302v4.602L25.81 16zm-2.473-1.655l-5.961-3.987V3.944l10.774 7.183-4.813 3.219z", fill: "#000", fillRule: "nonzero" })), CS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2 12h20" })), ES = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m2 5 10 8 10-8" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 4H3c-.53 0-1.04.199-1.414.553A1.837 1.837 0 0 0 1 5.89v13.22c0 .501.21.982.586 1.336C1.96 20.8 2.47 21 3 21h18c.53 0 1.04-.199 1.414-.553.375-.354.586-.835.586-1.336V5.89c0-.501-.21-.982-.586-1.336A2.061 2.061 0 0 0 21 4Z" })), Ug = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 7 2 2l5 18 3-7 8 8 3-3-8-8z" })), TS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m22 11.4-8.8 8.8c-2.5 2.5-6.7 2.5-9.2 0h0c-2.5-2.5-2.5-6.7 0-9.2l7.8-7.8c1.8-1.8 4.6-1.8 6.4 0h0C20 5 20 7.8 18.2 9.6L11 16.7c-1 1-2.6 1-3.5 0h0c-1-1-1-2.6 0-3.5l6-6" })), $S = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 5H3.2C1.985 5 1 5.806 1 6.8v14.4c0 .994.985 1.8 2.2 1.8h17.6c1.215 0 2.2-.806 2.2-1.8V6.8c0-.994-.985-1.8-2.2-1.8ZM6 1h12" }), /* @__PURE__ */ J.createElement("path", { fill: "currentColor", d: "M15.142 10.264a.75.75 0 0 1 .529.4l4 8A.75.75 0 0 1 19 19.75H6a.75.75 0 0 1-.498-1.31l9-8a.75.75 0 0 1 .64-.176ZM7 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" })), /* @__PURE__ */ J.createElement("defs", null, /* @__PURE__ */ J.createElement("clipPath", { id: "a" }, /* @__PURE__ */ J.createElement("path", { fill: "#fff", d: "M0 0h24v24H0z" })))), $j = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", ...t }, /* @__PURE__ */ J.createElement("g", { strokeLinecap: "round", strokeWidth: 2, fill: "none", stroke: "currentColor", strokeLinejoin: "round", className: "nc-icon-wrapper" }, /* @__PURE__ */ J.createElement("path", { d: "M3 9h42v36H3zm7-6h28" }), /* @__PURE__ */ J.createElement("path", { d: "m10 38 7-10 5 4 8-11 9 17H10z" }), /* @__PURE__ */ J.createElement("circle", { cx: 17, cy: 19, r: 3 }))), Mj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M1.5 2.75h21m-21 18.5h21M16 17V9a2 2 0 0 1 2-2h2m-4 6h3m-7 4V7m-5 6h1v2a2 2 0 0 1-4 0V9a2 2 0 0 1 2-2h2" })), Xb = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M22 7H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1ZM1 21h22M1 3h22" })), Nj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 19.5v-6.25M7 7v6.25m0 0h10M17 7v12.5" })), Aj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 22V12M4 2v10m0 0h16m0-10v20" })), MS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m8 6-6 6 6 6m8-12 6 6-6 6" })), NS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z" }), /* @__PURE__ */ J.createElement("path", { fill: "currentColor", d: "m19.642 16.276-3.85-7a.517.517 0 0 0-.181-.189.585.585 0 0 0-.749.115l-4.533 5.494-2.307-2.516a.548.548 0 0 0-.206-.14.598.598 0 0 0-.499.031.529.529 0 0 0-.183.164l-2.75 4a.468.468 0 0 0-.015.507.526.526 0 0 0 .202.189c.084.045.18.069.28.069H19.15a.594.594 0 0 0 .268-.063.532.532 0 0 0 .2-.174.462.462 0 0 0 .024-.487ZM9.25 9c.911 0 1.65-.672 1.65-1.5S10.161 6 9.25 6c-.91 0-1.65.672-1.65 1.5S8.34 9 9.25 9Z" })), K0 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 12h16m-4-4 4 4-4 4m-8 0-4-4 4-4" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.5, d: "M1 3v18M23 3v18" })), AS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", ...t }, /* @__PURE__ */ J.createElement("g", { strokeLinecap: "round", strokeWidth: 2, fill: "none", stroke: "currentColor", strokeLinejoin: "round", className: "nc-icon-wrapper" }, /* @__PURE__ */ J.createElement("circle", { cx: 18, cy: 16, r: 4 }), /* @__PURE__ */ J.createElement("path", { "data-cap": "butt", d: "M20.849 33.164 33 20l13 13M2 38l12-11 10 9" }), /* @__PURE__ */ J.createElement("path", { d: "M2 6h44v36H2z" }))), J0 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M23 8H1v8h22V8Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.5, d: "M1 21h22M1 3h22" })), e1 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M23 8H1v8h22V8Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.5, d: "M8 21h8M8 3h8" })), Dj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M22 2h-9.333m-1.334 20H2m4.667 0L17.333 2" })), DS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M13.54 10.46c2.2 2.2 2.2 5.61 0 7.81l-3.08 3.08c-2.2 2.2-5.61 2.2-7.81 0-2.2-2.2-2.2-5.61 0-7.81L5.4 10.9" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.46 13.54c-2.2-2.2-2.2-5.61 0-7.81l3.08-3.08c2.2-2.2 5.61-2.2 7.81 0 2.2 2.2 2.2 5.61 0 7.81L18.6 13.1" })), PS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 25 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 6v12m-3-2 2.813 2.813L23.625 16" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 19V6h-1L8 18.071H7L2 6H1v13" })), One = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M32 16C32 24.8361 24.8361 32 16 32C7.16394 32 0 24.8361 0 16C0 7.16394 7.16394 0 16 0C24.8379 0 32 7.16394 32 16Z", fill: "#2081E2" }), /* @__PURE__ */ J.createElement("path", { d: "M7.89371 16.5376L7.96274 16.4291L12.125 9.91784C12.1858 9.82251 12.3288 9.83236 12.3748 9.93592C13.0702 11.4943 13.6702 13.4324 13.3891 14.639C13.2691 15.1354 12.9403 15.8078 12.5704 16.4291C12.5228 16.5196 12.4702 16.6083 12.4143 16.6938C12.388 16.7333 12.3436 16.7563 12.2959 16.7563H8.01534C7.90027 16.7563 7.83288 16.6313 7.89371 16.5376Z", fill: "white" }), /* @__PURE__ */ J.createElement("path", { d: "M26.4461 17.7475V18.7782C26.4461 18.8374 26.4099 18.89 26.3573 18.913C26.0351 19.0511 24.9321 19.5574 24.4734 20.1952C23.303 21.8242 22.4088 24.1536 20.4098 24.1536H12.0706C9.11495 24.1536 6.71985 21.7503 6.71985 18.7848V18.6894C6.71985 18.6105 6.78394 18.5464 6.86286 18.5464H11.5117C11.6037 18.5464 11.6711 18.6319 11.6629 18.7223C11.63 19.0248 11.6859 19.3338 11.8289 19.6149C12.1051 20.1755 12.6772 20.5256 13.2952 20.5256H15.5966V18.7289H13.3215C13.2048 18.7289 13.1358 18.5941 13.2032 18.4987C13.2278 18.4609 13.2558 18.4215 13.2854 18.3771C13.5007 18.0714 13.8081 17.5963 14.1139 17.0555C14.3227 16.6905 14.5248 16.3009 14.6876 15.9097C14.7205 15.839 14.7468 15.7666 14.7731 15.696C14.8174 15.571 14.8635 15.4543 14.8964 15.3376C14.9293 15.239 14.9555 15.1354 14.9818 15.0384C15.0591 14.7064 15.092 14.3546 15.092 13.9897C15.092 13.8467 15.0854 13.697 15.0723 13.554C15.0657 13.3979 15.046 13.2417 15.0262 13.0855C15.0131 12.9474 14.9884 12.811 14.9621 12.668C14.9293 12.4592 14.8832 12.2521 14.8306 12.0433L14.8125 11.9644C14.7731 11.8214 14.7402 11.685 14.6942 11.542C14.5643 11.0932 14.4147 10.6559 14.2569 10.2466C14.1994 10.0839 14.1336 9.92771 14.0678 9.77155C13.9709 9.53647 13.8722 9.32278 13.7818 9.12057C13.7358 9.02851 13.6964 8.94467 13.6569 8.85919C13.6125 8.7622 13.5665 8.66521 13.5205 8.57318C13.4876 8.50249 13.4498 8.43673 13.4235 8.37097L13.1424 7.85151C13.1029 7.78083 13.1687 7.69699 13.2459 7.71836L15.0049 8.19507H15.0098C15.0131 8.19507 15.0147 8.19673 15.0164 8.19673L15.2481 8.26083L15.503 8.33318L15.5966 8.35945V7.31398C15.5966 6.80931 16.001 6.39999 16.5008 6.39999C16.7506 6.39999 16.9775 6.50191 17.1402 6.66793C17.303 6.83398 17.4049 7.06083 17.4049 7.31398V8.86579L17.5923 8.91836C17.6071 8.92332 17.6219 8.92988 17.635 8.93974C17.6811 8.97427 17.7468 9.02521 17.8306 9.08771C17.8964 9.14028 17.9671 9.20441 18.0526 9.27017C18.2219 9.40659 18.4241 9.58249 18.646 9.7847C18.7052 9.83564 18.7627 9.88825 18.8153 9.94086C19.1014 10.2072 19.4219 10.5195 19.7277 10.8647C19.8131 10.9617 19.897 11.0603 19.9824 11.1639C20.0679 11.2691 20.1583 11.3726 20.2372 11.4762C20.3408 11.6143 20.4526 11.7573 20.5496 11.9069C20.5956 11.9776 20.6482 12.0499 20.6926 12.1206C20.8175 12.3096 20.9277 12.5053 21.0329 12.7009C21.0773 12.7913 21.1233 12.8899 21.1627 12.9869C21.2794 13.2483 21.3715 13.5146 21.4307 13.7809C21.4487 13.8384 21.4619 13.9009 21.4685 13.9568V13.9699C21.4882 14.0488 21.4948 14.1327 21.5014 14.2181C21.5277 14.491 21.5145 14.7639 21.4553 15.0384C21.4307 15.1552 21.3978 15.2653 21.3583 15.382C21.3189 15.4938 21.2794 15.6105 21.2285 15.7206C21.1299 15.9491 21.0131 16.1776 20.875 16.3913C20.8307 16.4702 20.7781 16.5541 20.7254 16.633C20.6679 16.7168 20.6087 16.7957 20.5561 16.873C20.4838 16.9716 20.4066 17.0752 20.3277 17.1672C20.257 17.2642 20.1846 17.3612 20.1057 17.4467C19.9956 17.5765 19.8904 17.6998 19.7802 17.8182C19.7145 17.8954 19.6438 17.9744 19.5715 18.045C19.5008 18.1239 19.4285 18.1946 19.3627 18.2604C19.2526 18.3705 19.1605 18.456 19.0832 18.5267L18.9024 18.6927C18.8761 18.7157 18.8416 18.7289 18.8054 18.7289H17.4049V20.5256H19.1671C19.5616 20.5256 19.9364 20.3859 20.2389 20.1294C20.3424 20.039 20.7945 19.6478 21.3287 19.0577C21.3468 19.0379 21.3699 19.0231 21.3962 19.0166L26.2636 17.6094C26.354 17.5831 26.4461 17.6522 26.4461 17.7475Z", fill: "white" })), IS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2 }, /* @__PURE__ */ J.createElement("circle", { cx: 12, cy: 13, r: 2 }), /* @__PURE__ */ J.createElement("circle", { cx: 3, cy: 13, r: 2 }), /* @__PURE__ */ J.createElement("circle", { cx: 21, cy: 13, r: 2 }))), Ek = (t) => /* @__PURE__ */ J.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M12 1.5v21M1.5 12h21", strokeLinecap: "round", strokeLinejoin: "round" }))), LS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2 }, /* @__PURE__ */ J.createElement("path", { d: "M1.373 13.183a2.064 2.064 0 0 1 0-2.366C2.946 8.59 6.819 4 12 4s9.054 4.59 10.627 6.817a2.064 2.064 0 0 1 0 2.366C21.054 15.41 17.181 20 12 20s-9.054-4.59-10.627-6.817Z" }), /* @__PURE__ */ J.createElement("circle", { cx: 12, cy: 12, r: 4 }))), RS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m12 2.489 3.09 6.262L22 9.755l-5 4.874 1.18 6.882-6.18-3.25-6.18 3.25L7 14.629 2 9.755l6.91-1.004L12 2.489z" })), Pj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1 12h8v10H1V12Zm0 0C1 5 2.75 3.344 6 2m8 10h8v10h-8V12Zm0 0c0-7 1.75-8.656 5-10" })), Ij = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 22H10a5 5 0 0 1-5-5v-7" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "m1 14 4-4 4 4m1.5-12H14a5 5 0 0 1 5 5v7" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "m23 10-4 4-4-4" })), Lj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M22 13.667V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h9.667M22 13.667 13.667 22M22 13.667h-6.333a2 2 0 0 0-2 2V22" })), Gb = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M22 13.667V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h9.667M22 13.667 13.667 22M22 13.667h-6.333a2 2 0 0 0-2 2V22" })), Rj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M15.924 9.922c-.236 0-.43.194-.434.433l-.177 8.866.178 3.218c.003.235.197.43.433.43s.43-.195.433-.433v.004l.193-3.219-.193-8.867c-.003-.238-.197-.432-.433-.432zm12.14 5.102c-.54 0-1.054.11-1.522.306C26.228 11.783 23.254 9 19.625 9c-.887 0-1.753.175-2.517.47-.298.115-.377.234-.38.463v12.492c.004.242.19.442.426.466l10.91.006c2.174 0 3.936-1.762 3.936-3.936s-1.762-3.937-3.936-3.937zM10.886 22.56v-.002l.226-3.338-.226-7.276c-.006-.181-.148-.323-.325-.323-.176 0-.319.142-.324.323l-.202 7.276.202 3.34c.005.178.148.32.324.32.177 0 .318-.142.325-.321v.001zm-2.952.32c.144 0 .262-.117.27-.267l.264-3.394-.265-6.497c-.007-.15-.125-.267-.27-.267-.144 0-.263.117-.269.267l-.234 6.497.234 3.395c.006.149.125.266.27.266zm5.297-10.868c-.209 0-.375.166-.38.377l-.169 6.832.17 3.287c.004.21.17.375.379.375.207 0 .373-.166.378-.377v.002l.19-3.287-.19-6.832c-.005-.211-.17-.377-.378-.377zM2.802 22.657c.083 0 .15-.066.16-.156l.34-3.286-.34-3.41c-.01-.091-.077-.157-.16-.157-.084 0-.152.066-.16.157l-.299 3.41.299 3.285c.008.091.076.157.16.157zm2.546.188c.113 0 .206-.092.214-.212l.302-3.418-.302-3.25c-.008-.12-.1-.211-.214-.211-.116 0-.208.09-.216.212l-.266 3.25.266 3.417c.008.12.1.212.216.212zm6.543.03c.191 0 .346-.154.351-.35v.003l.209-3.309-.209-7.09c-.005-.196-.16-.35-.351-.35-.193 0-.348.154-.352.35l-.185 7.09.185 3.308c.004.194.159.348.352.348zm2.69.013c.22 0 .401-.181.405-.404v.002-.002l.172-3.263-.172-8.13c-.004-.223-.186-.405-.406-.405-.22 0-.403.182-.406.405l-.153 8.127.153 3.268c.003.22.186.402.406.402zm-5.338-.016c.16 0 .29-.129.296-.294l.246-3.36-.246-7.039c-.006-.165-.137-.294-.296-.294-.162 0-.292.13-.297.295l-.218 7.038.218 3.361c.005.164.135.293.297.293zM4.07 15.527c-.1 0-.18.08-.188.185L3.6 19.215l.282 3.39c.008.104.089.184.188.184.098 0 .178-.08.187-.184l.32-3.39-.32-3.504c-.009-.104-.09-.184-.187-.184zm2.565-1.837c-.129 0-.235.105-.242.24l-.25 5.287.25 3.417c.007.133.113.239.242.239s.235-.106.243-.24v.001l.283-3.417-.283-5.288c-.008-.134-.114-.24-.243-.24zm-4.957 2.65c-.01-.076-.066-.129-.133-.129-.068 0-.124.055-.133.13l-.315 2.873.315 2.81c.01.076.065.13.133.13.067 0 .122-.053.133-.129l.358-2.81-.358-2.874zm-1.316.972c-.067 0-.12.052-.128.125L0 19.214l.234 1.747c.009.074.061.125.128.125.065 0 .117-.05.128-.124l.277-1.748-.277-1.778c-.01-.073-.063-.124-.128-.124z", fill: "#EE7C25", fillRule: "evenodd" })), jj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M16 .053C7.19.053.047 7.194.047 16.003c0 8.81 7.142 15.951 15.951 15.951 8.81 0 15.951-7.14 15.951-15.95C31.95 7.194 24.81.054 16 .054V.053zm7.314 23.005c-.285.469-.899.618-1.367.33-3.745-2.288-8.46-2.806-14.013-1.537-.535.122-1.068-.213-1.19-.749-.122-.535.212-1.068.748-1.19 6.076-1.389 11.288-.79 15.493 1.779.468.287.617.899.33 1.367zm1.953-4.343c-.36.585-1.126.77-1.71.41-4.288-2.636-10.824-3.4-15.896-1.86-.657.199-1.352-.172-1.552-.828-.198-.658.173-1.351.83-1.551 5.793-1.758 12.994-.907 17.918 2.12.585.36.77 1.125.41 1.709zm.167-4.523c-5.14-3.054-13.623-3.334-18.531-1.845-.788.24-1.622-.205-1.86-.994-.24-.788.205-1.621.994-1.86 5.634-1.711 15.001-1.38 20.92 2.133.71.42.943 1.336.522 2.044-.42.71-1.337.943-2.044.522z", fill: "#1ED760", fillRule: "nonzero" })), jS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16.5 11 12 15l-4.5-4" })), Sne = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M10.063 29.002c12.076 0 18.68-10.005 18.68-18.68 0-.285 0-.567-.019-.85C30.01 8.545 31.12 7.393 32 6.076c-1.198.53-2.47.879-3.77 1.032 1.37-.82 2.395-2.11 2.886-3.63-1.29.764-2.7 1.303-4.17 1.593-2.035-2.164-5.268-2.694-7.887-1.292-2.62 1.401-3.973 4.386-3.3 7.28-5.28-.265-10.198-2.758-13.532-6.86-1.742 3-.852 6.838 2.033 8.764-1.045-.03-2.067-.313-2.98-.822v.084c0 3.125 2.204 5.817 5.267 6.435-.966.264-1.98.303-2.964.113.86 2.675 3.325 4.507 6.133 4.56-2.324 1.827-5.196 2.818-8.153 2.815-.522 0-1.044-.032-1.563-.094 3.002 1.927 6.496 2.949 10.063 2.944", fill: "#1DA1F2", fillRule: "nonzero" })), Fj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 122.43 122.41", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z" })), FS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6.555 20.963A1 1 0 0 1 5 20.131V3.87a1 1 0 0 1 1.555-.833l12.197 8.132a1 1 0 0 1 0 1.664l-12.197 8.13Z" })), Bj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M31.886 25.508c0 3.522-2.855 6.377-6.377 6.377H6.377C2.857 31.885 0 29.03 0 25.508V6.378C0 2.854 2.857 0 6.377 0H25.51c3.522 0 6.377 2.855 6.377 6.377v19.131", fill: "#0FB7FF" }), /* @__PURE__ */ J.createElement("path", { d: "M25.998 10.58c.175-.982.17-1.992-.436-2.755-.846-1.07-2.646-1.11-3.88-.921-1.003.153-4.397 1.651-5.552 5.236 2.046-.156 3.118.148 2.921 2.4-.082.943-.558 1.976-1.09 2.966-.614 1.141-1.765 3.382-3.274 1.767-1.36-1.454-1.257-4.235-1.568-6.086-.173-1.04-.356-2.334-.697-3.402-.293-.92-.966-2.027-1.788-2.267-.884-.26-1.976.146-2.618.523-2.042 1.2-3.598 2.908-5.365 4.317v.132c.35.335.444.884.96.959 1.216.179 2.375-1.134 3.184.232.492.834.645 1.749.96 2.648.42 1.198.746 2.503 1.09 3.88.583 2.334 1.299 5.82 3.316 6.675 1.029.437 2.575-.148 3.358-.612 2.122-1.255 3.775-3.075 5.19-4.927 3.234-4.382 5.019-9.347 5.289-10.765", fill: "#FFFFFE" }))), zj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M31.252 8.488c-.366-1.37-1.448-2.452-2.824-2.823C25.941 5 15.958 5 15.958 5s-9.977 0-12.47.665c-1.37.366-2.452 1.447-2.823 2.823C0 10.976 0 16.17 0 16.17s0 5.194.665 7.682c.366 1.372 1.447 2.453 2.823 2.823 2.493.666 12.47.666 12.47.666s9.983 0 12.47-.666c1.372-.365 2.453-1.447 2.824-2.823.665-2.488.665-7.682.665-7.682s0-5.194-.665-7.682", fill: "#D9252A" }), /* @__PURE__ */ J.createElement("path", { fill: "#FFFFFE", d: "M12.77 20.958l8.291-4.788-8.291-4.788v9.576" }))), FUe = () => {
  return /* @__PURE__ */ y.jsxs("div", { className: "koenig-lexical", children: [
    /* @__PURE__ */ y.jsx(t, { label: "Text toolbar" }),
    /* @__PURE__ */ y.jsx(e, {}),
    /* @__PURE__ */ y.jsx(t, { label: "Image toolbar" }),
    /* @__PURE__ */ y.jsx(n, {}),
    /* @__PURE__ */ y.jsx(t, { label: "Gallery toolbar" }),
    /* @__PURE__ */ y.jsx(i, {}),
    /* @__PURE__ */ y.jsx(t, { label: "Plus menu" }),
    /* @__PURE__ */ y.jsx(o, {}),
    /* @__PURE__ */ y.jsx(t, { label: "Card menu" }),
    /* @__PURE__ */ y.jsx(a, {}),
    /* @__PURE__ */ y.jsx(t, { label: "Divider card" }),
    /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[740px]", children: /* @__PURE__ */ y.jsx(d, {}) }),
    /* @__PURE__ */ y.jsx(t, { label: "Code block" }),
    /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[740px]", children: /* @__PURE__ */ y.jsx(h, {}) }),
    /* @__PURE__ */ y.jsx(t, { label: "Image card" }),
    /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[740px]", children: /* @__PURE__ */ y.jsx(m, {}) }),
    /* @__PURE__ */ y.jsx(t, { label: "Gallery card" }),
    /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[1172px]", children: /* @__PURE__ */ y.jsx(x, {}) })
  ] });
  function t({ label: _ }) {
    return /* @__PURE__ */ y.jsx("h3", { className: "mb-4 mt-20 text-xl font-bold first-of-type:mt-8", children: _ });
  }
  function e() {
    return /* @__PURE__ */ y.jsx("div", { className: "max-w-fit", children: /* @__PURE__ */ y.jsxs("ul", { className: "m-0 flex items-center justify-evenly rounded bg-black px-1 py-0 font-sans text-md font-normal text-white", children: [
      /* @__PURE__ */ y.jsx(r, { Icon: Ej, label: "Format text as bold" }),
      /* @__PURE__ */ y.jsx(r, { Icon: Dj, label: "Format text as italics" }),
      /* @__PURE__ */ y.jsx(r, { Icon: Aj, label: "Toggle heading 1" }),
      /* @__PURE__ */ y.jsx(r, { Icon: Nj, label: "Toggle heading 2" }),
      /* @__PURE__ */ y.jsx(s, {}),
      /* @__PURE__ */ y.jsx(r, { Icon: Pj, label: "Toggle blockquote" }),
      /* @__PURE__ */ y.jsx(r, { Icon: DS, label: "Insert link" }),
      /* @__PURE__ */ y.jsx(s, {}),
      /* @__PURE__ */ y.jsx(r, { Icon: Gb, label: "Save as snippet" })
    ] }) });
  }
  function n() {
    return /* @__PURE__ */ y.jsx("div", { className: "max-w-fit", children: /* @__PURE__ */ y.jsxs("ul", { className: "m-0 flex items-center justify-evenly rounded bg-black px-1 py-0 font-sans text-md font-normal text-white", children: [
      /* @__PURE__ */ y.jsx(r, { Icon: J0, label: "Set image to regular" }),
      /* @__PURE__ */ y.jsx(r, { Icon: e1, label: "Set image to wide" }),
      /* @__PURE__ */ y.jsx(r, { Icon: K0, label: "Set image to full" }),
      /* @__PURE__ */ y.jsx(s, {}),
      /* @__PURE__ */ y.jsx(r, { Icon: DS, label: "Insert link" }),
      /* @__PURE__ */ y.jsx(r, { Icon: Ij, label: "Replace image" }),
      /* @__PURE__ */ y.jsx(s, {}),
      /* @__PURE__ */ y.jsx(r, { Icon: Gb, label: "Save as snippet" })
    ] }) });
  }
  function i() {
    return /* @__PURE__ */ y.jsx("div", { className: "max-w-fit", children: /* @__PURE__ */ y.jsxs("ul", { className: "m-0 flex items-center justify-evenly rounded bg-black px-1 py-0 font-sans text-md font-normal text-white", children: [
      /* @__PURE__ */ y.jsx(r, { Icon: Cj, label: "Add image" }),
      /* @__PURE__ */ y.jsx(s, {}),
      /* @__PURE__ */ y.jsx(r, { Icon: Gb, label: "Save as snippet" })
    ] }) });
  }
  function r({ label: _, Icon: S, ...C }) {
    return /* @__PURE__ */ y.jsx("li", { className: "m-0 flex p-0 first:m-0", ...C, children: /* @__PURE__ */ y.jsx(
      "div",
      {
        className: "flex size-9 items-center justify-center",
        type: "button",
        children: /* @__PURE__ */ y.jsx(S, { className: "fill-white" })
      }
    ) });
  }
  function s() {
    return /* @__PURE__ */ y.jsx("li", { className: "m-0 mx-1 h-5 w-px bg-grey-900" });
  }
  function o() {
    return /* @__PURE__ */ y.jsx(
      "button",
      {
        "aria-label": "Add a card",
        className: "group relative flex size-7 cursor-pointer items-center justify-center rounded-full border border-grey bg-white transition-all ease-linear hover:border-grey-900 md:size-9",
        type: "button",
        children: /* @__PURE__ */ y.jsx(Ek, { className: "size-4 stroke-grey-800 stroke-2 group-hover:stroke-grey-900" })
      }
    );
  }
  function a() {
    return /* @__PURE__ */ y.jsxs("div", { className: "z-[9999999] m-0 mb-3 max-h-[376px] w-[312px] flex-col overflow-y-auto rounded-lg bg-white bg-clip-padding p-0 text-sm shadow", children: [
      /* @__PURE__ */ y.jsx(l, { label: "Primary" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Upload, or embed with /image [url]", Icon: NS, label: "Image" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Insert a Markdown editor card", Icon: PS, label: "Markdown" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Insert a raw HTML card", Icon: MS, label: "HTML" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Create an image gallery", Icon: $S, label: "Gallery" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Insert a dividing line", Icon: CS, label: "Divider" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Embed a link as a visual bookmark", Icon: _S, label: "Bookmark" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Only visible when delivered by email", Icon: ES, label: "Email content" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Target free or paid members with a CTA", Icon: Ug, label: "Email call to action" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Attract signups with a public intro", Icon: LS, label: "Public preview" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Add a button to your post", Icon: OS, label: "Button" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Info boxes that stand out", Icon: SS, label: "Callout" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Search and embed gifs", Icon: Mj, label: "GIF" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Add collapsible content", Icon: jS, label: "Toggle" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Upload and play a video", Icon: FS, label: "Video" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Upload and play an audio file", Icon: xS, label: "Audio" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Upload a downloadable file", Icon: TS, label: "File" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Add a product recommendation", Icon: RS, label: "Product" }),
      /* @__PURE__ */ y.jsx(u, { desc: "Add a bold section header", Icon: Xb, label: "Header" }),
      /* @__PURE__ */ y.jsx(l, { label: "Embed" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/youtube [video url]", Icon: zj, label: "YouTube" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/twitter [tweet url]", Icon: Sne, label: "Twitter" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/unsplash [search-term or url]", Icon: Fj, label: "Unsplash" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/vimeo [video url]", Icon: Bj, label: "Vimeo" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/codepen [pen url]", Icon: Tj, label: "CodePen" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/spotify [track or playlist url]", Icon: jj, label: "Spotify" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/soundcloud [track or playlist url]", Icon: Rj, label: "SoundCloud" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/nft [opensea url]", Icon: One, label: "NFT" }),
      /* @__PURE__ */ y.jsx(u, { desc: "/embed [url]", Icon: IS, label: "Other..." }),
      /* @__PURE__ */ y.jsx(l, { label: "Snippets" }),
      /* @__PURE__ */ y.jsx(f, { Icon: Lj, label: "A random snippet" })
    ] });
  }
  function l({ label: _, ...S }) {
    return /* @__PURE__ */ y.jsx("div", { className: "mb-2 flex shrink-0 flex-col justify-center px-4 pt-3 text-2xs font-medium uppercase tracking-[.06rem] text-grey", style: { minWidth: "calc(100% - 3.2rem)" }, ...S, children: _ });
  }
  function u({ label: _, desc: S, Icon: C, ...E }) {
    return /* @__PURE__ */ y.jsxs("div", { className: "flex cursor-pointer flex-row items-center border border-transparent px-4 py-2 text-grey-800 hover:bg-grey-100", ...E, children: [
      /* @__PURE__ */ y.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ y.jsx(C, { className: "size-7" }) }),
      /* @__PURE__ */ y.jsxs("div", { className: "flex flex-col", children: [
        /* @__PURE__ */ y.jsx("div", { className: "m-0 ml-4 truncate text-[1.3rem] font-normal leading-[1.333em] tracking-[.02rem] text-grey-900", children: _ }),
        /* @__PURE__ */ y.jsx("div", { className: "m-0 ml-4 truncate text-2xs font-normal leading-[1.333em] tracking-[.02rem] text-grey", children: S })
      ] })
    ] });
  }
  function f({ label: _, Icon: S, ...C }) {
    return /* @__PURE__ */ y.jsxs("div", { className: "flex cursor-pointer flex-row items-center border border-transparent px-4 py-2 text-grey-800 hover:bg-grey-100", ...C, children: [
      /* @__PURE__ */ y.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ y.jsx(S, { className: "size-7" }) }),
      /* @__PURE__ */ y.jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ y.jsx("div", { className: "m-0 ml-4 truncate text-[1.3rem] font-normal leading-[1.333em] tracking-[.02rem] text-grey-900", children: _ }) })
    ] });
  }
  function d() {
    return /* @__PURE__ */ y.jsx("div", { children: /* @__PURE__ */ y.jsx("hr", { className: "block h-[1px] border-0 border-t border-grey-300" }) });
  }
  function h() {
    return /* @__PURE__ */ y.jsxs("div", { className: "border-2 border-green", children: [
      /* @__PURE__ */ y.jsx("div", { className: "rounded bg-grey-50 px-3 py-2", children: /* @__PURE__ */ y.jsx("textarea", { className: "w-full resize-none bg-grey-50 font-mono text-[1.7rem]" }) }),
      /* @__PURE__ */ y.jsx(w, { placeholder: "Type caption for code block (optional)" })
    ] });
  }
  function m() {
    const [_, S] = ft(!1), [C, E] = ft(!1), M = () => {
      S(!_);
    }, $ = (P) => {
      P.stopPropagation(), E(!C);
    };
    return _ ? /* @__PURE__ */ y.jsxs(
      "div",
      {
        className: `border border-transparent ${_ ? "shadow-[0_0_0_2px_#30cf43]" : "hover:shadow-[0_0_0_1px_#30cf43]"}`,
        onClick: M,
        children: [
          /* @__PURE__ */ y.jsx(g, { desc: "Click to select an image", Icon: AS }),
          /* @__PURE__ */ y.jsx(w, { placeholder: "Type caption for image (optional)" }),
          /* @__PURE__ */ y.jsx(
            "button",
            {
              className: `absolute bottom-0 right-0 m-3 cursor-pointer rounded border px-1 text-[1.3rem] font-normal leading-7 tracking-wide transition-all duration-100 ${C ? "border-green bg-green text-white" : "border-grey text-grey"} `,
              type: "button",
              onClick: (P) => $(P),
              children: "Alt"
            }
          )
        ]
      }
    ) : /* @__PURE__ */ y.jsx(
      "div",
      {
        className: `border border-transparent ${_ ? "shadow-[0_0_0_2px_#30cf43]" : "hover:shadow-[0_0_0_1px_#30cf43]"}`,
        onClick: M,
        children: /* @__PURE__ */ y.jsx(g, { desc: "Click to select an image", Icon: AS })
      }
    );
  }
  function g({ desc: _, Icon: S, ...C }) {
    return /* @__PURE__ */ y.jsxs("div", { className: "relative", children: [
      /* @__PURE__ */ y.jsx("figure", { className: "cursor-pointer border border-transparent", ...C, children: /* @__PURE__ */ y.jsx("div", { className: "h-100 relative flex items-center justify-center border border-grey-100 bg-grey-50 before:pb-[62.5%]", children: /* @__PURE__ */ y.jsxs("button", { className: "group flex flex-col items-center justify-center p-20", type: "button", children: [
        /* @__PURE__ */ y.jsx(S, { className: "size-32 opacity-80 transition-all ease-linear group-hover:scale-105 group-hover:opacity-100" }),
        /* @__PURE__ */ y.jsx("p", { className: "mt-4 text-sm font-normal text-grey-700 group-hover:text-grey-800", children: _ })
      ] }) }) }),
      /* @__PURE__ */ y.jsx("form", { children: /* @__PURE__ */ y.jsx(
        "input",
        {
          accept: "image/*",
          hidden: !0,
          name: "image",
          type: "file"
        }
      ) })
    ] });
  }
  function w({ placeholder: _ }) {
    return /* @__PURE__ */ y.jsx(
      "input",
      {
        className: "not-kg-prose w-full p-2 text-center font-sans text-sm font-normal tracking-wide text-grey-900",
        placeholder: _
      }
    );
  }
  function x() {
    return /* @__PURE__ */ y.jsxs("div", { className: "border-2 border-green", children: [
      /* @__PURE__ */ y.jsx(g, { desc: "Click to select up to 9 images", Icon: $j }),
      /* @__PURE__ */ y.jsx(w, { placeholder: "Type caption for gallery (optional)" })
    ] });
  }
}, gn = j.createContext({}), dt = j.createContext({});
var me = {};
let Tk = {}, Wj = {}, sh = {}, yg = {}, BS = {}, oh = {}, Y6 = {}, zS = {}, Zg = {}, qg = {}, ku = {}, V6 = {}, X6 = {}, Hj = {}, Qj = {}, Uj = {}, Zj = {}, qj = {}, Yj = {}, Vj = {}, Wy = {}, Xj = {}, Gj = {}, Kj = {}, Jj = {}, eF = {}, tF = {}, nF = {}, iF = {}, rF = {}, G6 = {}, K6 = {}, WS = {}, sF = {}, oF = {}, aF = {};
function Le(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
let Ia = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Cne = Ia && "documentMode" in document ? document.documentMode : null, wr = Ia && /Mac|iPod|iPhone|iPad/.test(navigator.platform), zu = Ia && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Hy = Ia && "InputEvent" in window && !Cne ? "getTargetRanges" in new window.InputEvent("input") : !1, J6 = Ia && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), $k = Ia && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ene = Ia && /Android/.test(navigator.userAgent), Tne = Ia && /^(?=.*Chrome).*/i.test(navigator.userAgent), e5 = Ia && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Tne, Mk = J6 || $k || e5 ? " " : "​", $ne = zu ? " " : Mk, Mne = /^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/, Nne = /^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/, Oh = { bold: 1, code: 16, highlight: 128, italic: 2, strikethrough: 4, subscript: 32, superscript: 64, underline: 8 }, Ane = { directionless: 1, unmergeable: 2 }, W$ = { center: 2, end: 6, justify: 4, left: 1, right: 3, start: 5 }, Dne = { 2: "center", 6: "end", 4: "justify", 1: "left", 3: "right", 5: "start" }, Pne = { normal: 0, segmented: 2, token: 1 }, Ine = { 0: "normal", 2: "segmented", 1: "token" }, HS = !1, t5 = 0;
function Lne(t) {
  t5 = t.timeStamp;
}
function n3(t, e, n) {
  return e.__lexicalLineBreak === t || t[`__lexicalKey_${n._key}`] !== void 0;
}
function Rne(t) {
  return t.getEditorState().read(() => {
    let e = pn();
    return e !== null ? e.clone() : null;
  });
}
function lF(t, e, n) {
  HS = !0;
  let i = 100 < performance.now() - t5;
  try {
    qs(t, () => {
      let r = pn() || Rne(t);
      var s = /* @__PURE__ */ new Map(), o = t.getRootElement(), a = t._editorState, l = t._blockCursorElement;
      let u = !1, f = "";
      for (var d = 0; d < e.length; d++) {
        var h = e[d], m = h.type, g = h.target, w = n1(g, a);
        if (!(w === null && g !== o || ii(w))) {
          if (m === "characterData") {
            if (h = i && Ze(w)) e: {
              h = r, m = g;
              var x = w;
              if (xt(h)) {
                var _ = h.anchor.getNode();
                if (_.is(x) && h.format !== _.getFormat()) {
                  h = !1;
                  break e;
                }
              }
              h = m.nodeType === 3 && x.isAttached();
            }
            h && (x = La(t._window), m = h = null, x !== null && x.anchorNode === g && (h = x.anchorOffset, m = x.focusOffset), g = g.nodeValue, g !== null && o5(w, g, h, m, !1));
          } else if (m === "childList") {
            for (u = !0, m = h.addedNodes, x = 0; x < m.length; x++) {
              _ = m[x];
              var S = pF(_), C = _.parentNode;
              C == null || _ === l || S !== null || _.nodeName === "BR" && n3(_, C, t) || (zu && (S = _.innerText || _.nodeValue) && (f += S), C.removeChild(_));
            }
            if (h = h.removedNodes, m = h.length, 0 < m) {
              for (x = 0, _ = 0; _ < m; _++) C = h[_], (C.nodeName === "BR" && n3(C, g, t) || l === C) && (g.appendChild(C), x++);
              m !== x && (g === o && (w = a._nodeMap.get("root")), s.set(g, w));
            }
          }
        }
      }
      if (0 < s.size) for (let [
        E,
        M
      ] of s) if (xe(M)) for (s = M.getChildrenKeys(), o = E.firstChild, a = 0; a < s.length; a++) l = t.getElementByKey(s[a]), l !== null && (o == null ? (E.appendChild(l), o = l) : o !== l && E.replaceChild(l, o), o = o.nextSibling);
      else Ze(M) && M.markDirty();
      if (s = n.takeRecords(), 0 < s.length) {
        for (o = 0; o < s.length; o++) for (l = s[o], a = l.addedNodes, l = l.target, d = 0; d < a.length; d++) w = a[d], g = w.parentNode, g == null || w.nodeName !== "BR" || n3(w, l, t) || g.removeChild(w);
        n.takeRecords();
      }
      r !== null && (u && (r.dirty = !0, $a(r)), zu && bF(t) && r.insertRawText(f));
    });
  } finally {
    HS = !1;
  }
}
function uF(t) {
  let e = t._observer;
  if (e !== null) {
    let n = e.takeRecords();
    lF(t, n, e);
  }
}
function cF(t) {
  t5 === 0 && Ak(t).addEventListener("textInput", Lne, !0), t._observer = new MutationObserver((e, n) => {
    lF(t, e, n);
  });
}
function H$(t, e) {
  let n = t.__mode, i = t.__format;
  t = t.__style;
  let r = e.__mode, s = e.__format;
  return e = e.__style, (n === null || n === r) && (i === null || i === s) && (t === null || t === e);
}
function Q$(t, e) {
  let n = t.mergeWithSibling(e), i = Ln()._normalizedNodes;
  return i.add(t.__key), i.add(e.__key), n;
}
function fF(t) {
  if (t.__text === "" && t.isSimpleText() && !t.isUnmergeable()) t.remove();
  else {
    for (var e; (e = t.getPreviousSibling()) !== null && Ze(e) && e.isSimpleText() && !e.isUnmergeable(); ) if (e.__text === "") e.remove();
    else {
      H$(e, t) && (t = Q$(e, t));
      break;
    }
    for (var n; (n = t.getNextSibling()) !== null && Ze(n) && n.isSimpleText() && !n.isUnmergeable(); ) if (n.__text === "") n.remove();
    else {
      H$(t, n) && Q$(t, n);
      break;
    }
  }
}
function dF(t) {
  return U$(t.anchor), U$(t.focus), t;
}
function U$(t) {
  for (; t.type === "element"; ) {
    var e = t.getNode(), n = t.offset;
    if (n === e.getChildrenSize() ? (e = e.getChildAtIndex(n - 1), n = !0) : (e = e.getChildAtIndex(n), n = !1), Ze(e)) {
      t.set(e.__key, n ? e.getTextContentSize() : 0, "text");
      break;
    } else if (!xe(e)) break;
    t.set(e.__key, n ? e.getChildrenSize() : 0, "element");
  }
}
let jne = 1, Fne = typeof queueMicrotask == "function" ? queueMicrotask : (t) => {
  Promise.resolve().then(t);
};
function n5(t) {
  let e = document.activeElement;
  if (e === null) return !1;
  let n = e.nodeName;
  return ii(n1(t)) && (n === "INPUT" || n === "TEXTAREA" || e.contentEditable === "true" && e.__lexicalEditor == null);
}
function t1(t, e, n) {
  let i = t.getRootElement();
  try {
    return i !== null && i.contains(e) && i.contains(n) && e !== null && !n5(e) && i5(e) === t;
  } catch {
    return !1;
  }
}
function i5(t) {
  for (; t != null; ) {
    let e = t.__lexicalEditor;
    if (e != null) return e;
    t = Nk(t);
  }
  return null;
}
function QS(t) {
  return t.isToken() || t.isSegmented();
}
function Qy(t) {
  for (; t != null; ) {
    if (t.nodeType === 3) return t;
    t = t.firstChild;
  }
  return null;
}
function US(t, e, n) {
  let i = Oh[e];
  return n !== null && (t & i) === (n & i) || (t ^= i, e === "subscript" ? t &= -65 : e === "superscript" && (t &= -33)), t;
}
function hF(t, e) {
  if (e != null) t.__key = e;
  else {
    qr(), 99 < Gg && Le(14), e = Ln();
    var n = Ra(), i = "" + jne++;
    n._nodeMap.set(i, t), xe(t) ? e._dirtyElements.set(i, !0) : e._dirtyLeaves.add(i), e._cloneNotNeeded.add(i), e._dirtyType = 1, t.__key = i;
  }
}
function of(t) {
  var e = t.getParent();
  if (e !== null) {
    let r = t.getWritable();
    e = e.getWritable();
    var n = t.getPreviousSibling();
    if (t = t.getNextSibling(), n === null) if (t !== null) {
      var i = t.getWritable();
      e.__first = t.__key, i.__prev = null;
    } else e.__first = null;
    else {
      if (i = n.getWritable(), t !== null) {
        let s = t.getWritable();
        s.__prev = i.__key, i.__next = s.__key;
      } else i.__next = null;
      r.__prev = null;
    }
    t === null ? n !== null ? (t = n.getWritable(), e.__last = n.__key, t.__next = null) : e.__last = null : (t = t.getWritable(), n !== null ? (n = n.getWritable(), n.__next = t.__key, t.__prev = n.__key) : t.__prev = null, r.__next = null), e.__size--, r.__parent = null;
  }
}
function Uy(t) {
  99 < Gg && Le(14);
  var e = t.getLatest(), n = e.__parent, i = Ra();
  let r = Ln(), s = i._nodeMap;
  if (i = r._dirtyElements, n !== null) e: for (; n !== null; ) {
    if (i.has(n)) break e;
    let o = s.get(n);
    if (o === void 0) break;
    i.set(n, !1), n = o.__parent;
  }
  e = e.__key, r._dirtyType = 1, xe(t) ? i.set(e, !0) : r._dirtyLeaves.add(e);
}
function Pi(t) {
  qr();
  var e = Ln();
  let n = e._compositionKey;
  t !== n && (e._compositionKey = t, n !== null && (e = Tr(n), e !== null && e.getWritable()), t !== null && (t = Tr(t), t !== null && t.getWritable()));
}
function xu() {
  return Vh() ? null : Ln()._compositionKey;
}
function Tr(t, e) {
  return t = (e || Ra())._nodeMap.get(t), t === void 0 ? null : t;
}
function pF(t, e) {
  let n = Ln();
  return t = t[`__lexicalKey_${n._key}`], t !== void 0 ? Tr(t, e) : null;
}
function n1(t, e) {
  for (; t != null; ) {
    let n = pF(t, e);
    if (n !== null) return n;
    t = Nk(t);
  }
  return null;
}
function mF(t) {
  let e = Object.assign({}, t._decorators);
  return t._pendingDecorators = e;
}
function Z$(t) {
  return t.read(() => Zs().getTextContent());
}
function Bne(t, e) {
  qs(t, () => {
    var n = Ra();
    if (!n.isEmpty()) if (e === "root") Zs().markDirty();
    else {
      n = n._nodeMap;
      for (let [, i] of n) i.markDirty();
    }
  }, t._pendingEditorState === null ? { tag: "history-merge" } : void 0);
}
function Zs() {
  return Ra()._nodeMap.get("root");
}
function $a(t) {
  qr();
  let e = Ra();
  t !== null && (t.dirty = !0, t.setCachedNodes(null)), e._selection = t;
}
function Xd(t) {
  var e = Ln(), n;
  e: {
    for (n = t; n != null; ) {
      let i = n[`__lexicalKey_${e._key}`];
      if (i !== void 0) {
        n = i;
        break e;
      }
      n = Nk(n);
    }
    n = null;
  }
  return n === null ? (e = e.getRootElement(), t === e ? Tr("root") : null) : Tr(n);
}
function gF(t) {
  return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t);
}
function r5(t) {
  let e = [];
  for (; t !== null; ) e.push(t), t = t._parentEditor;
  return e;
}
function vF() {
  return Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 5);
}
function s5(t, e, n) {
  if (e = La(e._window), e !== null) {
    var i = e.anchorNode, { anchorOffset: r, focusOffset: s } = e;
    if (i !== null && (e = i.nodeType === 3 ? i.nodeValue : null, i = n1(i), e !== null && Ze(i))) {
      if (e === Mk && n) {
        let o = n.length;
        e = n, s = r = o;
      }
      e !== null && o5(i, e, r, s, t);
    }
  }
}
function o5(t, e, n, i, r) {
  let s = t;
  if (s.isAttached() && (r || !s.isDirty())) {
    let u = s.isComposing(), f = e;
    if ((u || r) && e[e.length - 1] === Mk && (f = e.slice(0, -1)), e = s.getTextContent(), r || f !== e) if (f === "") if (Pi(null), J6 || $k || e5) s.remove();
    else {
      let d = Ln();
      setTimeout(() => {
        d.update(() => {
          s.isAttached() && s.remove();
        });
      }, 20);
    }
    else {
      r = s.getParent(), e = Yh();
      var o = s.getTextContentSize(), a = xu(), l = s.getKey();
      s.isToken() || a !== null && l === a && !u || xt(e) && (r !== null && !r.canInsertTextBefore() && e.anchor.offset === 0 || e.anchor.key === t.__key && e.anchor.offset === 0 && !s.canInsertTextBefore() && !u || e.focus.key === t.__key && e.focus.offset === o && !s.canInsertTextAfter() && !u) ? s.markDirty() : (t = pn(), xt(t) && n !== null && i !== null && (t.setTextNodeRange(s, n, s, i), s.isSegmented() && (n = s.getTextContent(), n = rr(n), s.replace(n), s = n)), s.setTextContent(f));
    }
  }
}
function zne(t, e) {
  if (e.isSegmented()) return !0;
  if (!t.isCollapsed()) return !1;
  t = t.anchor.offset;
  let n = e.getParentOrThrow(), i = e.isToken();
  return t === 0 ? ((t = !e.canInsertTextBefore() || !n.canInsertTextBefore() || i) || (e = e.getPreviousSibling(), t = (Ze(e) || xe(e) && e.isInline()) && !e.canInsertTextAfter()), t) : t === e.getTextContentSize() ? !e.canInsertTextAfter() || !n.canInsertTextAfter() || i : !1;
}
function wg(t, e) {
  t.__lexicalClassNameCache === void 0 && (t.__lexicalClassNameCache = {});
  let n = t.__lexicalClassNameCache, i = n[e];
  return i !== void 0 ? i : (t = t[e], typeof t == "string" ? (t = t.split(" "), n[e] = t) : t);
}
function a5(t, e, n, i, r) {
  n.size !== 0 && (n = i.__type, i = i.__key, e = e.get(n), e === void 0 && Le(33, n), n = e.klass, e = t.get(n), e === void 0 && (e = /* @__PURE__ */ new Map(), t.set(n, e)), t = e.get(i), n = t === "destroyed" && r === "created", (t === void 0 || n) && e.set(i, n ? "updated" : r));
}
function q$(t, e, n) {
  let i = t.getParent(), r = n;
  return i !== null && (e && n === 0 ? (r = t.getIndexWithinParent(), t = i) : e || n !== t.getChildrenSize() || (r = t.getIndexWithinParent() + 1, t = i)), t.getChildAtIndex(e ? r - 1 : r);
}
function ZS(t, e) {
  var n = t.offset;
  return t.type === "element" ? (t = t.getNode(), q$(t, e, n)) : (t = t.getNode(), e && n === 0 || !e && n === t.getTextContentSize() ? (n = e ? t.getPreviousSibling() : t.getNextSibling(), n === null ? q$(t.getParentOrThrow(), e, t.getIndexWithinParent() + (e ? 0 : 1)) : n) : null);
}
function bF(t) {
  return t = (t = Ak(t).event) && t.inputType, t === "insertFromPaste" || t === "insertFromPasteAsQuotation";
}
function Zy(t) {
  return !Ws(t) && !t.isLastChild() && !t.isInline();
}
function qy(t, e) {
  return t = t._keyToDOMMap.get(e), t === void 0 && Le(75, e), t;
}
function Nk(t) {
  return t = t.assignedSlot || t.parentElement, t !== null && t.nodeType === 11 ? t.host : t;
}
function Yy(t, e) {
  for (t = t.getParent(); t !== null; ) {
    if (t.is(e)) return !0;
    t = t.getParent();
  }
  return !1;
}
function Ak(t) {
  return t = t._window, t === null && Le(78), t;
}
function yF(t) {
  for (t = t.getParentOrThrow(); t !== null && !Wu(t); ) t = t.getParentOrThrow();
  return t;
}
function Wu(t) {
  return Ws(t) || xe(t) && t.isShadowRoot();
}
function wF(t) {
  return t = t.constructor.clone(t), hF(t, null), t;
}
function i1(t) {
  var e = Ln();
  let n = t.constructor.getType();
  return e = e._nodes.get(n), e === void 0 && Le(97), e = e.replace, e !== null ? (e = e(t), e instanceof t.constructor || Le(98), e) : t;
}
function i3(t, e) {
  t = t.getParent(), !Ws(t) || xe(e) || ii(e) || Le(99);
}
function r3(t) {
  return (ii(t) || xe(t) && !t.canBeEmpty()) && !t.isInline();
}
function qS(t, e, n) {
  n.style.removeProperty("caret-color"), e._blockCursorElement = null, e = t.parentElement, e !== null && e.removeChild(t);
}
function La(t) {
  return Ia ? (t || window).getSelection() : null;
}
function Dk(t) {
  return t.nodeType === 1;
}
function jd(t) {
  if (ii(t) && !t.isInline()) return !0;
  if (!xe(t) || Wu(t)) return !1;
  var e = t.getFirstChild();
  return e = e === null || hf(e) || Ze(e) || e.isInline(), !t.isInline() && t.canBeEmpty() !== !1 && e;
}
function s3(t, e) {
  for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
  return e(t) ? t : null;
}
function kF(t, e, n, i, r, s) {
  for (t = t.getFirstChild(); t !== null; ) {
    let o = t.__key;
    t.__parent === e && (xe(t) && kF(t, o, n, i, r, s), n.has(o) || s.delete(o), r.push(o)), t = t.getNextSibling();
  }
}
function Wne(t, e, n, i) {
  t = t._nodeMap, e = e._nodeMap;
  let r = [];
  for (let [s] of i) {
    let o = e.get(s);
    o === void 0 || o.isAttached() || (xe(o) && kF(o, s, t, e, r, i), t.has(s) || i.delete(s), r.push(s));
  }
  for (let s of r) e.delete(s);
  for (let s of n) i = e.get(s), i === void 0 || i.isAttached() || (t.has(s) || n.delete(s), e.delete(s));
}
let Ni = "", Zr = "", dl = "", Hu, Ar, Yg, xF = !1, l5 = !1, Pk, Kb = null, YS, VS, df, Qu, XS, Vg;
function Jb(t, e) {
  let n = df.get(t);
  if (e !== null) {
    let i = JS(t);
    i.parentNode === e && e.removeChild(i);
  }
  Qu.has(t) || Ar._keyToDOMMap.delete(t), xe(n) && (t = Vy(n, df), GS(t, 0, t.length - 1, null)), n !== void 0 && a5(Vg, Yg, Pk, n, "destroyed");
}
function GS(t, e, n, i) {
  for (; e <= n; ++e) {
    let r = t[e];
    r !== void 0 && Jb(r, i);
  }
}
function Nc(t, e) {
  t.setProperty("text-align", e);
}
function _F(t, e) {
  var n = Hu.theme.indent;
  if (typeof n == "string") {
    let i = t.classList.contains(n);
    0 < e && !i ? t.classList.add(n) : 1 > e && i && t.classList.remove(n);
  }
  n = getComputedStyle(t).getPropertyValue("--lexical-indent-base-value") || "40px", t.style.setProperty("padding-inline-start", e === 0 ? "" : `calc(${e} * ${n})`);
}
function OF(t, e) {
  t = t.style, e === 0 ? Nc(t, "") : e === 1 ? Nc(t, "left") : e === 2 ? Nc(t, "center") : e === 3 ? Nc(t, "right") : e === 4 ? Nc(t, "justify") : e === 5 ? Nc(t, "start") : e === 6 && Nc(t, "end");
}
function ey(t, e, n) {
  let i = Qu.get(t);
  i === void 0 && Le(60);
  let r = i.createDOM(Hu, Ar);
  var s = Ar._keyToDOMMap;
  if (r["__lexicalKey_" + Ar._key] = t, s.set(t, r), Ze(i) ? r.setAttribute("data-lexical-text", "true") : ii(i) && r.setAttribute("data-lexical-decorator", "true"), xe(i)) {
    if (t = i.__indent, s = i.__size, t !== 0 && _F(r, t), s !== 0) {
      --s, t = Vy(i, Qu);
      var o = Zr;
      Zr = "", KS(t, i, 0, s, r, null), CF(i, r), Zr = o;
    }
    t = i.__format, t !== 0 && OF(r, t), i.isInline() || SF(null, i, r), Zy(i) && (Ni += `

`, dl += `

`);
  } else s = i.getTextContent(), ii(i) ? (o = i.decorate(Ar, Hu), o !== null && EF(t, o), r.contentEditable = "false") : Ze(i) && (i.isDirectionless() || (Zr += s)), Ni += s, dl += s;
  return e !== null && (n != null ? e.insertBefore(r, n) : (n = e.__lexicalLineBreak, n != null ? e.insertBefore(r, n) : e.appendChild(r))), a5(Vg, Yg, Pk, i, "created"), r;
}
function KS(t, e, n, i, r, s) {
  let o = Ni;
  for (Ni = ""; n <= i; ++n) ey(t[n], r, s);
  Zy(e) && (Ni += `

`), r.__lexicalTextContent = Ni, Ni = o + Ni;
}
function Y$(t, e) {
  return t = e.get(t), hf(t) || ii(t) && t.isInline();
}
function SF(t, e, n) {
  t = t !== null && (t.__size === 0 || Y$(t.__last, df)), e = e.__size === 0 || Y$(e.__last, Qu), t ? e || (e = n.__lexicalLineBreak, e != null && n.removeChild(e), n.__lexicalLineBreak = null) : e && (e = document.createElement("br"), n.__lexicalLineBreak = e, n.appendChild(e));
}
function CF(t, e) {
  var n = e.__lexicalDir;
  if (e.__lexicalDirTextContent !== Zr || n !== Kb) {
    let s = Zr === "";
    if (s) var i = Kb;
    else i = Zr, i = Mne.test(i) ? "rtl" : Nne.test(i) ? "ltr" : null;
    if (i !== n) {
      let o = e.classList, a = Hu.theme;
      var r = n !== null ? a[n] : void 0;
      let l = i !== null ? a[i] : void 0;
      r !== void 0 && (typeof r == "string" && (r = r.split(" "), r = a[n] = r), o.remove(...r)), i === null || s && i === "ltr" ? e.removeAttribute("dir") : (l !== void 0 && (typeof l == "string" && (n = l.split(" "), l = a[i] = n), l !== void 0 && o.add(...l)), e.dir = i), l5 || (t.getWritable().__dir = i);
    }
    Kb = i, e.__lexicalDirTextContent = Zr, e.__lexicalDir = i;
  }
}
function Vy(t, e) {
  let n = [];
  for (t = t.__first; t !== null; ) {
    let i = e.get(t);
    i === void 0 && Le(101), n.push(t), t = i.__next;
  }
  return n;
}
function Xm(t, e) {
  var n = df.get(t), i = Qu.get(t);
  n !== void 0 && i !== void 0 || Le(61);
  var r = xF || VS.has(t) || YS.has(t);
  let s = qy(Ar, t);
  if (n === i && !r) return xe(n) ? (i = s.__lexicalTextContent, i !== void 0 && (Ni += i, dl += i), i = s.__lexicalDirTextContent, i !== void 0 && (Zr += i)) : (i = n.getTextContent(), Ze(n) && !n.isDirectionless() && (Zr += i), dl += i, Ni += i), s;
  if (n !== i && r && a5(Vg, Yg, Pk, i, "updated"), i.updateDOM(n, s, Hu)) return i = ey(t, null, null), e === null && Le(62), e.replaceChild(i, s), Jb(t, null), i;
  if (xe(n) && xe(i)) {
    if (t = i.__indent, t !== n.__indent && _F(s, t), t = i.__format, t !== n.__format && OF(s, t), r) {
      t = Zr, Zr = "", r = Ni;
      var o = n.__size, a = i.__size;
      if (Ni = "", o === 1 && a === 1) {
        var l = n.__first;
        if (e = i.__first, l === e) Xm(l, s);
        else {
          var u = JS(l);
          e = ey(e, null, null), s.replaceChild(e, u), Jb(l, null);
        }
      } else {
        e = Vy(n, df);
        var f = Vy(i, Qu);
        if (o === 0) a !== 0 && KS(f, i, 0, a - 1, s, null);
        else if (a === 0) o !== 0 && (l = s.__lexicalLineBreak == null, GS(e, 0, o - 1, l ? null : s), l && (s.textContent = ""));
        else {
          var d = e;
          e = f, f = o - 1, o = a - 1;
          let m = s.firstChild, g = 0;
          for (a = 0; g <= f && a <= o; ) {
            var h = d[g];
            let w = e[a];
            if (h === w) m = o3(Xm(w, s)), g++, a++;
            else {
              l === void 0 && (l = new Set(d)), u === void 0 && (u = new Set(e));
              let x = u.has(h), _ = l.has(w);
              x ? (_ ? (h = qy(Ar, w), h === m ? m = o3(Xm(w, s)) : (m != null ? s.insertBefore(h, m) : s.appendChild(h), Xm(w, s)), g++) : ey(w, s, m), a++) : (m = o3(JS(h)), Jb(h, s), g++);
            }
          }
          l = g > f, u = a > o, l && !u ? (l = e[o + 1], l = l === void 0 ? null : Ar.getElementByKey(l), KS(e, i, a, o, s, l)) : u && !l && GS(d, g, f, s);
        }
      }
      Zy(i) && (Ni += `

`), s.__lexicalTextContent = Ni, Ni = r + Ni, CF(i, s), Zr = t, Ws(i) || i.isInline() || SF(n, i, s);
    }
    Zy(i) && (Ni += `

`, dl += `

`);
  } else n = i.getTextContent(), ii(i) ? (r = i.decorate(Ar, Hu), r !== null && EF(t, r)) : Ze(i) && !i.isDirectionless() && (Zr += n), Ni += n, dl += n;
  return !l5 && Ws(i) && i.__cachedText !== dl && (i.getWritable().__cachedText = dl), s;
}
function EF(t, e) {
  let n = Ar._pendingDecorators, i = Ar._decorators;
  if (n === null) {
    if (i[t] === e) return;
    n = mF(Ar);
  }
  n[t] = e;
}
function o3(t) {
  return t = t.nextSibling, t !== null && t === Ar._blockCursorElement && (t = t.nextSibling), t;
}
function JS(t) {
  let e = XS.get(t);
  return e === void 0 && Le(75, t), e;
}
let il = Object.freeze({}), e4 = [["keydown", Xne], ["pointerdown", Qne], ["compositionstart", Yne], ["compositionend", Vne], ["input", qne], ["click", Hne], ["cut", il], ["copy", il], ["dragstart", il], ["dragover", il], ["dragend", il], ["paste", il], ["focus", il], ["blur", il], ["drop", il]];
Hy && e4.push(["beforeinput", (t, e) => Zne(t, e)]);
let Xg = 0, TF = 0, $F = 0, Fd = null, kg = 0, t4 = !1, n4 = !1, xg = !1, Gm = !1, MF = [0, "", 0, "root", 0];
function NF(t, e, n, i, r) {
  let s = t.anchor, o = t.focus, a = s.getNode();
  var l = Ln();
  let u = La(l._window), f = u !== null ? u.anchorNode : null, d = s.key;
  l = l.getElementByKey(d);
  let h = n.length;
  return d !== o.key || !Ze(a) || (!r && (!Hy || $F < i + 50) || a.isDirty() && 2 > h || gF(n)) && s.offset !== o.offset && !a.isComposing() || QS(a) || a.isDirty() && 1 < h || (r || !Hy) && l !== null && !a.isComposing() && f !== Qy(l) || u !== null && e !== null && (!e.collapsed || e.startContainer !== u.anchorNode || e.startOffset !== u.anchorOffset) || a.getFormat() !== t.format || a.getStyle() !== t.style || zne(t, a);
}
function V$(t, e) {
  return t !== null && t.nodeValue !== null && t.nodeType === 3 && e !== 0 && e !== t.nodeValue.length;
}
function X$(t, e, n) {
  let { anchorNode: i, anchorOffset: r, focusNode: s, focusOffset: o } = t;
  t4 && (t4 = !1, V$(i, r) && V$(s, o)) || qs(e, () => {
    if (!n) $a(null);
    else if (t1(e, i, s)) {
      var a = pn();
      if (xt(a)) {
        var l = a.anchor, u = l.getNode();
        if (a.isCollapsed()) {
          t.type === "Range" && t.anchorNode === t.focusNode && (a.dirty = !0);
          var f = Ak(e).event;
          f = f ? f.timeStamp : performance.now();
          let [w, x, _, S, C] = MF;
          var d = Zs();
          d = e.isComposing() === !1 && d.getTextContent() === "", f < C + 200 && l.offset === _ && l.key === S ? (a.format = w, a.style = x) : l.type === "text" ? (Ze(u) || Le(141), a.format = u.getFormat(), a.style = u.getStyle()) : l.type !== "element" || d || (a.format = 0, a.style = "");
        } else {
          var h = l.key, m = a.focus.key;
          l = a.getNodes(), u = l.length;
          var g = a.isBackward();
          f = g ? o : r, d = g ? r : o;
          let w = g ? m : h;
          h = g ? h : m, m = 255, g = !1;
          for (let x = 0; x < u; x++) {
            let _ = l[x], S = _.getTextContentSize();
            if (Ze(_) && S !== 0 && !(x === 0 && _.__key === w && f === S || x === u - 1 && _.__key === h && d === 0) && (g = !0, m &= _.getFormat(), m === 0)) break;
          }
          a.format = g ? m : 0;
        }
      }
      Pe(e, Tk, void 0);
    }
  });
}
function Hne(t, e) {
  qs(e, () => {
    let n = pn();
    var i = La(e._window);
    let r = Yh();
    if (i) if (xt(n)) {
      let o = n.anchor;
      var s = o.getNode();
      o.type === "element" && o.offset === 0 && n.isCollapsed() && !Ws(s) && Zs().getChildrenSize() === 1 && s.getTopLevelElementOrThrow().isEmpty() && r !== null && n.is(r) ? (i.removeAllRanges(), n.dirty = !0) : t.detail !== 3 || n.isCollapsed() || (i = n.focus.getNode(), s !== i && (xe(s) ? s.select(0) : s.getParentOrThrow().select(0)));
    } else t.pointerType === "touch" && (s = i.anchorNode, s !== null && (s = s.nodeType, s === 1 || s === 3)) && (i = u5(r, i, e, t), $a(i));
    Pe(e, Wj, t);
  });
}
function Qne(t, e) {
  let n = t.target;
  t = t.pointerType, n instanceof Node && t !== "touch" && qs(e, () => {
    ii(n1(n)) || (n4 = !0);
  });
}
function AF(t) {
  return t.getTargetRanges ? (t = t.getTargetRanges(), t.length === 0 ? null : t[0]) : null;
}
function Une(t, e) {
  return t !== e || xe(t) || xe(e) || !t.isToken() || !e.isToken();
}
function Zne(t, e) {
  let n = t.inputType, i = AF(t);
  n === "deleteCompositionText" || zu && bF(e) || n !== "insertCompositionText" && qs(e, () => {
    let r = pn();
    if (n === "deleteContentBackward") {
      if (r === null) {
        var s = Yh();
        if (!xt(s)) return;
        $a(s.clone());
      }
      if (xt(r)) {
        Ene && Pi(r.anchor.key), TF === 229 && t.timeStamp < Xg + 30 && e.isComposing() && r.anchor.key === r.focus.key ? (Pi(null), Xg = 0, setTimeout(() => {
          qs(e, () => {
            Pi(null);
          });
        }, 30), xt(r) && (s = r.anchor.getNode(), s.markDirty(), r.format = s.getFormat(), Ze(s) || Le(142), r.style = s.getStyle()), 1 >= r.anchor.getNode().getTextContent().length && (t.preventDefault(), Pe(e, sh, !0))) : (Pi(null), t.preventDefault(), Pe(e, sh, !0));
        return;
      }
    }
    if (xt(r)) {
      s = t.data, Fd !== null && s5(!1, e, Fd), r.dirty && Fd === null || !r.isCollapsed() || Ws(r.anchor.getNode()) || i === null || r.applyDOMRange(i), Fd = null;
      var o = r.focus, a = r.anchor.getNode();
      if (o = o.getNode(), n === "insertText" || n === "insertTranspose") s === `
` ? (t.preventDefault(), Pe(e, yg, !1)) : s === `

` ? (t.preventDefault(), Pe(e, BS, void 0)) : s == null && t.dataTransfer ? (s = t.dataTransfer.getData("text/plain"), t.preventDefault(), r.insertRawText(s)) : s != null && NF(r, i, s, t.timeStamp, !0) ? (t.preventDefault(), Pe(e, oh, s)) : Fd = s, $F = t.timeStamp;
      else switch (t.preventDefault(), n) {
        case "insertFromYank":
        case "insertFromDrop":
        case "insertReplacementText":
          Pe(e, oh, t);
          break;
        case "insertFromComposition":
          Pi(null), Pe(e, oh, t);
          break;
        case "insertLineBreak":
          Pi(null), Pe(e, yg, !1);
          break;
        case "insertParagraph":
          Pi(null), xg && !$k ? (xg = !1, Pe(e, yg, !1)) : Pe(e, BS, void 0);
          break;
        case "insertFromPaste":
        case "insertFromPasteAsQuotation":
          Pe(e, Y6, t);
          break;
        case "deleteByComposition":
          Une(a, o) && Pe(
            e,
            zS,
            t
          );
          break;
        case "deleteByDrag":
        case "deleteByCut":
          Pe(e, zS, t);
          break;
        case "deleteContent":
          Pe(e, sh, !1);
          break;
        case "deleteWordBackward":
          Pe(e, Zg, !0);
          break;
        case "deleteWordForward":
          Pe(e, Zg, !1);
          break;
        case "deleteHardLineBackward":
        case "deleteSoftLineBackward":
          Pe(e, qg, !0);
          break;
        case "deleteContentForward":
        case "deleteHardLineForward":
        case "deleteSoftLineForward":
          Pe(e, qg, !1);
          break;
        case "formatStrikeThrough":
          Pe(e, ku, "strikethrough");
          break;
        case "formatBold":
          Pe(e, ku, "bold");
          break;
        case "formatItalic":
          Pe(e, ku, "italic");
          break;
        case "formatUnderline":
          Pe(e, ku, "underline");
          break;
        case "historyUndo":
          Pe(e, V6, void 0);
          break;
        case "historyRedo":
          Pe(e, X6, void 0);
      }
    }
  });
}
function qne(t, e) {
  t.stopPropagation(), qs(e, () => {
    var n = pn(), i = t.data, r = AF(t);
    if (i != null && xt(n) && NF(n, r, i, t.timeStamp, !1)) {
      Gm && (i4(e, i), Gm = !1);
      var s = n.anchor, o = s.getNode();
      if (r = La(e._window), r === null) return;
      let a = s.offset;
      (s = Hy && !n.isCollapsed() && Ze(o) && r.anchorNode !== null) && (o = o.getTextContent().slice(0, a) + i + o.getTextContent().slice(a + n.focus.offset), r = r.anchorNode, s = o === (r.nodeType === 3 ? r.nodeValue : null)), s || Pe(e, oh, i), i = i.length, zu && 1 < i && t.inputType === "insertCompositionText" && !e.isComposing() && (n.anchor.offset -= i), J6 || $k || e5 || !e.isComposing() || (Xg = 0, Pi(null));
    } else s5(!1, e, i !== null ? i : void 0), Gm && (i4(e, i || void 0), Gm = !1);
    qr(), n = Ln(), uF(n);
  }), Fd = null;
}
function Yne(t, e) {
  qs(e, () => {
    let n = pn();
    if (xt(n) && !e.isComposing()) {
      let i = n.anchor, r = n.anchor.getNode();
      Pi(i.key), (t.timeStamp < Xg + 30 || i.type === "element" || !n.isCollapsed() || r.getFormat() !== n.format || Ze(r) && r.getStyle() !== n.style) && Pe(e, oh, $ne);
    }
  });
}
function i4(t, e) {
  var n = t._compositionKey;
  if (Pi(null), n !== null && e != null) {
    if (e === "") {
      e = Tr(n), t = Qy(t.getElementByKey(n)), t !== null && t.nodeValue !== null && Ze(e) && o5(e, t.nodeValue, null, null, !0);
      return;
    }
    if (e[e.length - 1] === `
` && (n = pn(), xt(n))) {
      e = n.focus, n.anchor.set(e.key, e.offset, e.type), Pe(t, Wy, null);
      return;
    }
  }
  s5(!0, t, e);
}
function Vne(t, e) {
  zu ? Gm = !0 : qs(e, () => {
    i4(e, t.data);
  });
}
function Xne(t, e) {
  if (Xg = t.timeStamp, TF = t.keyCode, !e.isComposing()) {
    var { keyCode: n, shiftKey: i, ctrlKey: r, metaKey: s, altKey: o } = t;
    if (!Pe(e, Hj, t)) {
      if (n !== 39 || r || s || o) if (n !== 39 || o || i || !r && !s) if (n !== 37 || r || s || o) if (n !== 37 || o || i || !r && !s) if (n !== 38 || r || s) if (n !== 40 || r || s) if (n === 13 && i) xg = !0, Pe(e, Wy, t);
      else if (n === 32) Pe(e, Xj, t);
      else if (wr && r && n === 79) t.preventDefault(), xg = !0, Pe(e, yg, !0);
      else if (n !== 13 || i) {
        var a = wr ? o || s ? !1 : n === 8 || n === 72 && r : r || o || s ? !1 : n === 8;
        a ? n === 8 ? Pe(e, Gj, t) : (t.preventDefault(), Pe(e, sh, !0)) : n === 27 ? Pe(
          e,
          Kj,
          t
        ) : (a = wr ? i || o || s ? !1 : n === 46 || n === 68 && r : r || o || s ? !1 : n === 46, a ? n === 46 ? Pe(e, Jj, t) : (t.preventDefault(), Pe(e, sh, !1)) : n === 8 && (wr ? o : r) ? (t.preventDefault(), Pe(e, Zg, !0)) : n === 46 && (wr ? o : r) ? (t.preventDefault(), Pe(e, Zg, !1)) : wr && s && n === 8 ? (t.preventDefault(), Pe(e, qg, !0)) : wr && s && n === 46 ? (t.preventDefault(), Pe(e, qg, !1)) : n === 66 && !o && (wr ? s : r) ? (t.preventDefault(), Pe(e, ku, "bold")) : n === 85 && !o && (wr ? s : r) ? (t.preventDefault(), Pe(e, ku, "underline")) : n === 73 && !o && (wr ? s : r) ? (t.preventDefault(), Pe(e, ku, "italic")) : n !== 9 || o || r || s ? n === 90 && !i && (wr ? s : r) ? (t.preventDefault(), Pe(e, V6, void 0)) : (a = wr ? n === 90 && s && i : n === 89 && r || n === 90 && r && i, a ? (t.preventDefault(), Pe(e, X6, void 0)) : r1(e._editorState._selection) ? (a = i ? !1 : n === 67 ? wr ? s : r : !1, a ? (t.preventDefault(), Pe(e, G6, t)) : (a = i ? !1 : n === 88 ? wr ? s : r : !1, a ? (t.preventDefault(), Pe(e, K6, t)) : n === 65 && (wr ? s : r) && (t.preventDefault(), Pe(e, WS, t)))) : !zu && n === 65 && (wr ? s : r) && (t.preventDefault(), Pe(e, WS, t))) : Pe(e, eF, t));
      } else xg = !1, Pe(e, Wy, t);
      else Pe(e, Vj, t);
      else Pe(e, Yj, t);
      else Pe(e, qj, t);
      else Pe(e, Zj, t);
      else Pe(e, Uj, t);
      else Pe(e, Qj, t);
      (r || i || o || s) && Pe(e, aF, t);
    }
  }
}
function DF(t) {
  let e = t.__lexicalEventHandles;
  return e === void 0 && (e = [], t.__lexicalEventHandles = e), e;
}
let ah = /* @__PURE__ */ new Map();
function PF(t) {
  var e = t.target;
  let n = La(e == null ? null : e.nodeType === 9 ? e.defaultView : e.ownerDocument.defaultView);
  if (n !== null) {
    var i = i5(n.anchorNode);
    if (i !== null) {
      n4 && (n4 = !1, qs(i, () => {
        var a = Yh(), l = n.anchorNode;
        l !== null && (l = l.nodeType, l === 1 || l === 3) && (a = u5(a, n, i, t), $a(a));
      })), e = r5(i), e = e[e.length - 1];
      var r = e._key, s = ah.get(r), o = s || e;
      o !== i && X$(n, o, !1), X$(n, i, !0), i !== e ? ah.set(r, i) : s && ah.delete(r);
    }
  }
}
function Gne(t, e) {
  kg === 0 && t.ownerDocument.addEventListener("selectionchange", PF), kg++, t.__lexicalEditor = e;
  let n = DF(t);
  for (let i = 0; i < e4.length; i++) {
    let [r, s] = e4[i], o = typeof s == "function" ? (a) => {
      a._lexicalHandled !== !0 && (a._lexicalHandled = !0, e.isEditable() && s(a, e));
    } : (a) => {
      if (a._lexicalHandled !== !0 && (a._lexicalHandled = !0, e.isEditable())) switch (r) {
        case "cut":
          return Pe(e, K6, a);
        case "copy":
          return Pe(e, G6, a);
        case "paste":
          return Pe(e, Y6, a);
        case "dragstart":
          return Pe(e, nF, a);
        case "dragover":
          return Pe(e, iF, a);
        case "dragend":
          return Pe(
            e,
            rF,
            a
          );
        case "focus":
          return Pe(e, sF, a);
        case "blur":
          return Pe(e, oF, a);
        case "drop":
          return Pe(e, tF, a);
      }
    };
    t.addEventListener(r, o), n.push(() => {
      t.removeEventListener(r, o);
    });
  }
}
function r4(t, e, n) {
  qr();
  var i = t.__key;
  let r = t.getParent();
  if (r !== null) {
    var s = pn();
    if (xt(s) && xe(t)) {
      var { anchor: o, focus: a } = s, l = o.getNode(), u = a.getNode();
      Yy(l, t) && o.set(t.__key, 0, "element"), Yy(u, t) && a.set(t.__key, 0, "element");
    }
    if (l = s, u = !1, xt(l) && e) {
      s = l.anchor;
      let f = l.focus;
      s.key === i && (Gy(s, t, r, t.getPreviousSibling(), t.getNextSibling()), u = !0), f.key === i && (Gy(f, t, r, t.getPreviousSibling(), t.getNextSibling()), u = !0);
    } else r1(l) && e && t.isSelected() && t.selectPrevious();
    xt(l) && e && !u ? (i = t.getIndexWithinParent(), of(t), Xy(l, r, i, -1)) : of(t), n || Wu(r) || r.canBeEmpty() || !r.isEmpty() || r4(r, e), e && Ws(r) && r.isEmpty() && r.selectEnd();
  }
}
class Ik {
  static getType() {
    Le(64, this.name);
  }
  static clone() {
    Le(65, this.name);
  }
  constructor(e) {
    this.__type = this.constructor.getType(), this.__next = this.__prev = this.__parent = null, hF(this, e);
  }
  getType() {
    return this.__type;
  }
  isInline() {
    Le(137, this.constructor.name);
  }
  isAttached() {
    for (var e = this.__key; e !== null; ) {
      if (e === "root") return !0;
      if (e = Tr(e), e === null) break;
      e = e.__parent;
    }
    return !1;
  }
  isSelected(e) {
    if (e = e || pn(), e == null) return !1;
    let n = e.getNodes().some((i) => i.__key === this.__key);
    return Ze(this) ? n : xt(e) && e.anchor.type === "element" && e.focus.type === "element" && e.anchor.key === e.focus.key && e.anchor.offset === e.focus.offset ? !1 : n;
  }
  getKey() {
    return this.__key;
  }
  getIndexWithinParent() {
    var e = this.getParent();
    if (e === null) return -1;
    e = e.getFirstChild();
    let n = 0;
    for (; e !== null; ) {
      if (this.is(e)) return n;
      n++, e = e.getNextSibling();
    }
    return -1;
  }
  getParent() {
    let e = this.getLatest().__parent;
    return e === null ? null : Tr(e);
  }
  getParentOrThrow() {
    let e = this.getParent();
    return e === null && Le(66, this.__key), e;
  }
  getTopLevelElement() {
    let e = this;
    for (; e !== null; ) {
      let n = e.getParent();
      if (Wu(n)) return xe(e) || Le(138), e;
      e = n;
    }
    return null;
  }
  getTopLevelElementOrThrow() {
    let e = this.getTopLevelElement();
    return e === null && Le(67, this.__key), e;
  }
  getParents() {
    let e = [], n = this.getParent();
    for (; n !== null; ) e.push(n), n = n.getParent();
    return e;
  }
  getParentKeys() {
    let e = [], n = this.getParent();
    for (; n !== null; ) e.push(n.__key), n = n.getParent();
    return e;
  }
  getPreviousSibling() {
    let e = this.getLatest().__prev;
    return e === null ? null : Tr(e);
  }
  getPreviousSiblings() {
    let e = [];
    var n = this.getParent();
    if (n === null) return e;
    for (n = n.getFirstChild(); n !== null && !n.is(this); ) e.push(n), n = n.getNextSibling();
    return e;
  }
  getNextSibling() {
    let e = this.getLatest().__next;
    return e === null ? null : Tr(e);
  }
  getNextSiblings() {
    let e = [], n = this.getNextSibling();
    for (; n !== null; ) e.push(n), n = n.getNextSibling();
    return e;
  }
  getCommonAncestor(e) {
    let n = this.getParents();
    var i = e.getParents();
    xe(this) && n.unshift(this), xe(e) && i.unshift(e), e = n.length;
    var r = i.length;
    if (e === 0 || r === 0 || n[e - 1] !== i[r - 1]) return null;
    for (i = new Set(i), r = 0; r < e; r++) {
      let s = n[r];
      if (i.has(s)) return s;
    }
    return null;
  }
  is(e) {
    return e == null ? !1 : this.__key === e.__key;
  }
  isBefore(e) {
    if (this === e) return !1;
    if (e.isParentOf(this)) return !0;
    if (this.isParentOf(e)) return !1;
    var n = this.getCommonAncestor(e);
    let i = this;
    for (; ; ) {
      var r = i.getParentOrThrow();
      if (r === n) {
        r = i.getIndexWithinParent();
        break;
      }
      i = r;
    }
    for (i = e; ; ) {
      if (e = i.getParentOrThrow(), e === n) {
        n = i.getIndexWithinParent();
        break;
      }
      i = e;
    }
    return r < n;
  }
  isParentOf(e) {
    let n = this.__key;
    if (n === e.__key) return !1;
    for (; e !== null; ) {
      if (e.__key === n) return !0;
      e = e.getParent();
    }
    return !1;
  }
  getNodesBetween(e) {
    let n = this.isBefore(e), i = [], r = /* @__PURE__ */ new Set();
    for (var s = this; ; ) {
      var o = s.__key;
      if (r.has(o) || (r.add(o), i.push(s)), s === e) break;
      if (o = xe(s) ? n ? s.getFirstChild() : s.getLastChild() : null, o !== null) s = o;
      else if (o = n ? s.getNextSibling() : s.getPreviousSibling(), o !== null) s = o;
      else {
        if (s = s.getParentOrThrow(), r.has(s.__key) || i.push(s), s === e) break;
        o = s;
        do
          o === null && Le(68), s = n ? o.getNextSibling() : o.getPreviousSibling(), o = o.getParent(), o !== null && (s !== null || r.has(o.__key) || i.push(o));
        while (s === null);
      }
    }
    return n || i.reverse(), i;
  }
  isDirty() {
    let e = Ln()._dirtyLeaves;
    return e !== null && e.has(this.__key);
  }
  getLatest() {
    let e = Tr(this.__key);
    return e === null && Le(113), e;
  }
  getWritable() {
    qr();
    var e = Ra(), n = Ln();
    e = e._nodeMap;
    let i = this.__key, r = this.getLatest(), s = r.__parent;
    n = n._cloneNotNeeded;
    var o = pn();
    return o !== null && o.setCachedNodes(null), n.has(i) ? (Uy(r), r) : (o = r.constructor.clone(r), o.__parent = s, o.__next = r.__next, o.__prev = r.__prev, xe(r) && xe(o) ? (o.__first = r.__first, o.__last = r.__last, o.__size = r.__size, o.__indent = r.__indent, o.__format = r.__format, o.__dir = r.__dir) : Ze(r) && Ze(o) && (o.__format = r.__format, o.__style = r.__style, o.__mode = r.__mode, o.__detail = r.__detail), n.add(i), o.__key = i, Uy(o), e.set(i, o), o);
  }
  getTextContent() {
    return "";
  }
  getTextContentSize() {
    return this.getTextContent().length;
  }
  createDOM() {
    Le(70);
  }
  updateDOM() {
    Le(71);
  }
  exportDOM(e) {
    return { element: this.createDOM(e._config, e) };
  }
  exportJSON() {
    Le(72);
  }
  static importJSON() {
    Le(18, this.name);
  }
  static transform() {
    return null;
  }
  remove(e) {
    r4(this, !0, e);
  }
  replace(e, n) {
    qr();
    var i = pn();
    i !== null && (i = i.clone()), i3(this, e);
    let r = this.getLatest(), s = this.__key, o = e.__key, a = e.getWritable();
    e = this.getParentOrThrow().getWritable();
    let l = e.__size;
    of(a);
    let u = r.getPreviousSibling(), f = r.getNextSibling(), d = r.__prev, h = r.__next, m = r.__parent;
    return r4(r, !1, !0), u === null ? e.__first = o : u.getWritable().__next = o, a.__prev = d, f === null ? e.__last = o : f.getWritable().__prev = o, a.__next = h, a.__parent = m, e.__size = l, n && (xe(this) && xe(a) || Le(139), this.getChildren().forEach((g) => {
      a.append(g);
    })), xt(i) && ($a(i), n = i.anchor, i = i.focus, n.key === s && eM(n, a), i.key === s && eM(i, a)), xu() === s && Pi(o), a;
  }
  insertAfter(e, n = !0) {
    qr(), i3(this, e);
    var i = this.getWritable();
    let r = e.getWritable();
    var s = r.getParent();
    let o = pn();
    var a = !1, l = !1;
    if (s !== null) {
      var u = e.getIndexWithinParent();
      of(r), xt(o) && (l = s.__key, a = o.anchor, s = o.focus, a = a.type === "element" && a.key === l && a.offset === u + 1, l = s.type === "element" && s.key === l && s.offset === u + 1);
    }
    s = this.getNextSibling(), u = this.getParentOrThrow().getWritable();
    let f = r.__key, d = i.__next;
    return s === null ? u.__last = f : s.getWritable().__prev = f, u.__size++, i.__next = f, r.__next = d, r.__prev = i.__key, r.__parent = i.__parent, n && xt(o) && (n = this.getIndexWithinParent(), Xy(o, u, n + 1), i = u.__key, a && o.anchor.set(i, n + 2, "element"), l && o.focus.set(i, n + 2, "element")), e;
  }
  insertBefore(e, n = !0) {
    qr(), i3(this, e);
    var i = this.getWritable();
    let r = e.getWritable(), s = r.__key;
    of(r);
    let o = this.getPreviousSibling(), a = this.getParentOrThrow().getWritable(), l = i.__prev, u = this.getIndexWithinParent();
    return o === null ? a.__first = s : o.getWritable().__next = s, a.__size++, i.__prev = s, r.__prev = l, r.__next = i.__key, r.__parent = i.__parent, i = pn(), n && xt(i) && (n = this.getParentOrThrow(), Xy(
      i,
      n,
      u
    )), e;
  }
  isParentRequired() {
    return !1;
  }
  createParentElementNode() {
    return kl();
  }
  selectStart() {
    return this.selectPrevious();
  }
  selectEnd() {
    return this.selectNext(0, 0);
  }
  selectPrevious(e, n) {
    qr();
    let i = this.getPreviousSibling(), r = this.getParentOrThrow();
    return i === null ? r.select(0, 0) : xe(i) ? i.select() : Ze(i) ? i.select(e, n) : (e = i.getIndexWithinParent() + 1, r.select(e, e));
  }
  selectNext(e, n) {
    qr();
    let i = this.getNextSibling(), r = this.getParentOrThrow();
    return i === null ? r.select() : xe(i) ? i.select(0, 0) : Ze(i) ? i.select(e, n) : (e = i.getIndexWithinParent(), r.select(e, e));
  }
  markDirty() {
    this.getWritable();
  }
}
function Kne(t, e, n) {
  n = n || e.getParentOrThrow().getLastChild();
  let i = e;
  for (e = [e]; i !== n; ) i.getNextSibling() || Le(140), i = i.getNextSibling(), e.push(i);
  for (let r of e) t = t.insertAfter(r);
}
class Zh extends Ik {
  static getType() {
    return "linebreak";
  }
  static clone(e) {
    return new Zh(e.__key);
  }
  constructor(e) {
    super(e);
  }
  getTextContent() {
    return `
`;
  }
  createDOM() {
    return document.createElement("br");
  }
  updateDOM() {
    return !1;
  }
  static importDOM() {
    return { br: (e) => {
      e: {
        var n = e.parentElement;
        if (n !== null) {
          let i = n.firstChild;
          if ((i === e || i.nextSibling === e && G$(i)) && (n = n.lastChild, n === e || n.previousSibling === e && G$(n))) {
            e = !0;
            break e;
          }
        }
        e = !1;
      }
      return e ? null : { conversion: Jne, priority: 0 };
    } };
  }
  static importJSON() {
    return Sh();
  }
  exportJSON() {
    return {
      type: "linebreak",
      version: 1
    };
  }
}
function Jne() {
  return { node: Sh() };
}
function Sh() {
  return i1(new Zh());
}
function hf(t) {
  return t instanceof Zh;
}
function G$(t) {
  return t.nodeType === 3 && /^( |\t|\r?\n)+$/.test(t.textContent || "");
}
function a3(t, e) {
  return e & 16 ? "code" : e & 128 ? "mark" : e & 32 ? "sub" : e & 64 ? "sup" : null;
}
function l3(t, e) {
  return e & 1 ? "strong" : e & 2 ? "em" : "span";
}
function u3(t, e, n, i, r) {
  t = i.classList, i = wg(r, "base"), i !== void 0 && t.add(...i), i = wg(r, "underlineStrikethrough");
  let s = !1, o = e & 8 && e & 4;
  var a = n & 8 && n & 4;
  i !== void 0 && (a ? (s = !0, o || t.add(...i)) : o && t.remove(...i));
  for (let l in Oh) a = Oh[l], i = wg(r, l), i !== void 0 && (n & a ? !s || l !== "underline" && l !== "strikethrough" ? (!(e & a) || o && l === "underline" || l === "strikethrough") && t.add(...i) : e & a && t.remove(...i) : e & a && t.remove(...i));
}
function c3(t, e, n) {
  let i = e.firstChild;
  if (n = n.isComposing(), t += n ? Mk : "", i == null) e.textContent = t;
  else if (e = i.nodeValue, e !== t) if (n || zu) {
    n = e.length;
    let r = t.length, s = 0, o = 0;
    for (; s < n && s < r && e[s] === t[s]; ) s++;
    for (; o + s < n && o + s < r && e[n - o - 1] === t[r - o - 1]; ) o++;
    t = [s, n - s - o, t.slice(s, r - o)];
    let [a, l, u] = t;
    l !== 0 && i.deleteData(a, l), i.insertData(a, u);
  } else i.nodeValue = t;
}
function Bv(t, e) {
  return e = document.createElement(e), e.appendChild(t), e;
}
class Mf extends Ik {
  static getType() {
    return "text";
  }
  static clone(e) {
    return new Mf(e.__text, e.__key);
  }
  constructor(e, n) {
    super(n), this.__text = e, this.__format = 0, this.__style = "", this.__detail = this.__mode = 0;
  }
  getFormat() {
    return this.getLatest().__format;
  }
  getDetail() {
    return this.getLatest().__detail;
  }
  getMode() {
    let e = this.getLatest();
    return Ine[e.__mode];
  }
  getStyle() {
    return this.getLatest().__style;
  }
  isToken() {
    return this.getLatest().__mode === 1;
  }
  isComposing() {
    return this.__key === xu();
  }
  isSegmented() {
    return this.getLatest().__mode === 2;
  }
  isDirectionless() {
    return (this.getLatest().__detail & 1) !== 0;
  }
  isUnmergeable() {
    return (this.getLatest().__detail & 2) !== 0;
  }
  hasFormat(e) {
    return e = Oh[e], (this.getFormat() & e) !== 0;
  }
  isSimpleText() {
    return this.__type === "text" && this.__mode === 0;
  }
  getTextContent() {
    return this.getLatest().__text;
  }
  getFormatFlags(e, n) {
    let i = this.getLatest().__format;
    return US(i, e, n);
  }
  canHaveFormat() {
    return !0;
  }
  createDOM(e) {
    var n = this.__format, i = a3(this, n);
    let r = l3(this, n), s = document.createElement(i === null ? r : i), o = s;
    return this.hasFormat("code") && s.setAttribute("spellcheck", "false"), i !== null && (o = document.createElement(r), s.appendChild(o)), i = o, c3(this.__text, i, this), e = e.theme.text, e !== void 0 && u3(r, 0, n, i, e), n = this.__style, n !== "" && (s.style.cssText = n), s;
  }
  updateDOM(e, n, i) {
    let r = this.__text;
    var s = e.__format, o = this.__format, a = a3(this, s);
    let l = a3(this, o);
    var u = l3(this, s);
    let f = l3(this, o);
    return (a === null ? u : a) !== (l === null ? f : l) ? !0 : a === l && u !== f ? (s = n.firstChild, s == null && Le(48), e = a = document.createElement(f), c3(r, e, this), i = i.theme.text, i !== void 0 && u3(f, 0, o, e, i), n.replaceChild(
      a,
      s
    ), !1) : (u = n, l !== null && a !== null && (u = n.firstChild, u == null && Le(49)), c3(r, u, this), i = i.theme.text, i !== void 0 && s !== o && u3(f, s, o, u, i), o = this.__style, e.__style !== o && (n.style.cssText = o), !1);
  }
  static importDOM() {
    return {
      "#text": () => ({ conversion: nie, priority: 0 }),
      b: () => ({ conversion: tie, priority: 0 }),
      code: () => ({ conversion: nu, priority: 0 }),
      em: () => ({ conversion: nu, priority: 0 }),
      i: () => ({ conversion: nu, priority: 0 }),
      s: () => ({ conversion: nu, priority: 0 }),
      span: () => ({ conversion: eie, priority: 0 }),
      strong: () => ({ conversion: nu, priority: 0 }),
      sub: () => ({ conversion: nu, priority: 0 }),
      sup: () => ({ conversion: nu, priority: 0 }),
      u: () => ({ conversion: nu, priority: 0 })
    };
  }
  static importJSON(e) {
    let n = rr(e.text);
    return n.setFormat(e.format), n.setDetail(e.detail), n.setMode(e.mode), n.setStyle(e.style), n;
  }
  exportDOM(e) {
    return { element: e } = super.exportDOM(e), e !== null && Dk(e) || Le(132), e.style.whiteSpace = "pre-wrap", this.hasFormat("bold") && (e = Bv(e, "b")), this.hasFormat("italic") && (e = Bv(e, "i")), this.hasFormat("strikethrough") && (e = Bv(e, "s")), this.hasFormat("underline") && (e = Bv(e, "u")), { element: e };
  }
  exportJSON() {
    return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), type: "text", version: 1 };
  }
  selectionTransform() {
  }
  setFormat(e) {
    let n = this.getWritable();
    return n.__format = typeof e == "string" ? Oh[e] : e, n;
  }
  setDetail(e) {
    let n = this.getWritable();
    return n.__detail = typeof e == "string" ? Ane[e] : e, n;
  }
  setStyle(e) {
    let n = this.getWritable();
    return n.__style = e, n;
  }
  toggleFormat(e) {
    let n = this.getFormat();
    return e = US(n, e, null), this.setFormat(e);
  }
  toggleDirectionless() {
    let e = this.getWritable();
    return e.__detail ^= 1, e;
  }
  toggleUnmergeable() {
    let e = this.getWritable();
    return e.__detail ^= 2, e;
  }
  setMode(e) {
    if (e = Pne[e], this.__mode === e) return this;
    let n = this.getWritable();
    return n.__mode = e, n;
  }
  setTextContent(e) {
    if (this.__text === e) return this;
    let n = this.getWritable();
    return n.__text = e, n;
  }
  select(e, n) {
    qr();
    let i = pn();
    var r = this.getTextContent();
    let s = this.__key;
    if (typeof r == "string" ? (r = r.length, e === void 0 && (e = r), n === void 0 && (n = r)) : n = e = 0, xt(i)) r = xu(), r !== i.anchor.key && r !== i.focus.key || Pi(s), i.setTextNodeRange(
      this,
      e,
      this,
      n
    );
    else return WF(s, e, s, n, "text", "text");
    return i;
  }
  selectStart() {
    return this.select(0, 0);
  }
  selectEnd() {
    let e = this.getTextContentSize();
    return this.select(e, e);
  }
  spliceText(e, n, i, r) {
    let s = this.getWritable(), o = s.__text, a = i.length, l = e;
    0 > l && (l = a + l, 0 > l && (l = 0));
    let u = pn();
    return r && xt(u) && (e += a, u.setTextNodeRange(s, e, s, e)), n = o.slice(0, l) + i + o.slice(l + n), s.__text = n, s;
  }
  canInsertTextBefore() {
    return !0;
  }
  canInsertTextAfter() {
    return !0;
  }
  splitText(...e) {
    qr();
    var n = this.getLatest(), i = n.getTextContent(), r = n.__key, s = xu(), o = new Set(e);
    e = [];
    for (var a = i.length, l = "", u = 0; u < a; u++) l !== "" && o.has(u) && (e.push(l), l = ""), l += i[u];
    if (l !== "" && e.push(l), o = e.length, o === 0) return [];
    if (e[0] === i) return [n];
    var f = e[0];
    i = n.getParentOrThrow(), u = n.getFormat();
    let d = n.getStyle(), h = n.__detail;
    a = !1, n.isSegmented() ? (l = rr(f), l.__format = u, l.__style = d, l.__detail = h, a = !0) : (l = n.getWritable(), l.__text = f), n = pn(), l = [l], f = f.length;
    for (let w = 1; w < o; w++) {
      var m = e[w], g = m.length;
      m = rr(m).getWritable(), m.__format = u, m.__style = d, m.__detail = h;
      let x = m.__key;
      if (g = f + g, xt(n)) {
        let _ = n.anchor, S = n.focus;
        _.key === r && _.type === "text" && _.offset > f && _.offset <= g && (_.key = x, _.offset -= f, n.dirty = !0), S.key === r && S.type === "text" && S.offset > f && S.offset <= g && (S.key = x, S.offset -= f, n.dirty = !0);
      }
      s === r && Pi(x), f = g, l.push(m);
    }
    return r = this.getPreviousSibling(), s = this.getNextSibling(), r !== null && Uy(r), s !== null && Uy(s), r = i.getWritable(), s = this.getIndexWithinParent(), a ? (r.splice(s, 0, l), this.remove()) : r.splice(s, 1, l), xt(n) && Xy(n, i, s, o - 1), l;
  }
  mergeWithSibling(e) {
    var n = e === this.getPreviousSibling();
    n || e === this.getNextSibling() || Le(50);
    var i = this.__key;
    let r = e.__key, s = this.__text, o = s.length;
    xu() === r && Pi(i);
    let a = pn();
    if (xt(a)) {
      let l = a.anchor, u = a.focus;
      l !== null && l.key === r && (aM(l, n, i, e, o), a.dirty = !0), u !== null && u.key === r && (aM(u, n, i, e, o), a.dirty = !0);
    }
    return i = e.__text, this.setTextContent(n ? i + s : s + i), n = this.getWritable(), e.remove(), n;
  }
  isTextEntity() {
    return !1;
  }
}
function eie(t) {
  let e = t.style.fontWeight === "700", n = t.style.textDecoration === "line-through", i = t.style.fontStyle === "italic", r = t.style.textDecoration === "underline", s = t.style.verticalAlign;
  return { forChild: (o) => (Ze(o) && (e && o.toggleFormat("bold"), n && o.toggleFormat("strikethrough"), i && o.toggleFormat("italic"), r && o.toggleFormat("underline"), s === "sub" && o.toggleFormat("subscript"), s === "super" && o.toggleFormat("superscript")), o), node: null };
}
function tie(t) {
  let e = t.style.fontWeight === "normal";
  return { forChild: (n) => (Ze(n) && !e && n.toggleFormat("bold"), n), node: null };
}
let K$ = /* @__PURE__ */ new WeakMap();
function nie(t) {
  t.parentElement === null && Le(129);
  for (var e = t.textContent || "", n, i = t.parentNode, r = [t]; i !== null && (n = K$.get(i)) === void 0 && !(i.nodeName === "PRE" || i.nodeType === 1 && i.style !== void 0 && i.style.whiteSpace !== void 0 && i.style.whiteSpace.startsWith("pre")); ) r.push(i), i = i.parentNode;
  for (n = n === void 0 ? i : n, i = 0; i < r.length; i++) K$.set(r[i], n);
  if (n !== null) {
    for (e = e.split(/(\r?\n|\t)/), t = [], r = e.length, n = 0; n < r; n++) i = e[n], i === `
` || i === `\r
` ? t.push(Sh()) : i === "	" ? t.push(Rk()) : i !== "" && t.push(rr(i));
    return { node: t };
  }
  if (e = e.replace(/\r/g, "").replace(/[ \t\n]+/g, " "), e === "") return { node: null };
  if (e[0] === " ") {
    for (r = t, n = !0; r !== null && (r = J$(r, !1)) !== null; ) if (i = r.textContent || "", 0 < i.length) {
      /[ \t\n]$/.test(i) && (e = e.slice(1)), n = !1;
      break;
    }
    n && (e = e.slice(1));
  }
  if (e[e.length - 1] === " ") {
    for (r = !0; t !== null && (t = J$(t, !0)) !== null; ) if (0 < (t.textContent || "").replace(/^( |\t|\r?\n)+/, "").length) {
      r = !1;
      break;
    }
    r && (e = e.slice(0, e.length - 1));
  }
  return e === "" ? { node: null } : { node: rr(e) };
}
let iie = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/, "i");
function J$(t, e) {
  for (; ; ) {
    for (var n = void 0; (n = e ? t.nextSibling : t.previousSibling) === null; ) if (t = t.parentElement, t === null) return null;
    if (t = n, t.nodeType === 1 && (n = t.style.display, n === "" && t.nodeName.match(iie) === null || n !== "" && !n.startsWith("inline"))) return null;
    for (; (n = e ? t.firstChild : t.lastChild) !== null; ) t = n;
    if (t.nodeType === 3) return t;
    if (t.nodeName === "BR") return null;
  }
}
let rie = { code: "code", em: "italic", i: "italic", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
function nu(t) {
  let e = rie[t.nodeName.toLowerCase()];
  return e === void 0 ? { node: null } : { forChild: (n) => (Ze(n) && !n.hasFormat(e) && n.toggleFormat(e), n), node: null };
}
function rr(t = "") {
  return i1(new Mf(t));
}
function Ze(t) {
  return t instanceof Mf;
}
let Lk = class IF extends Mf {
  static getType() {
    return "tab";
  }
  static clone(e) {
    let n = new IF(e.__key);
    return n.__text = e.__text, n.__format = e.__format, n.__style = e.__style, n;
  }
  constructor(e) {
    super("	", e), this.__detail = 2;
  }
  static importDOM() {
    return null;
  }
  static importJSON(e) {
    let n = Rk();
    return n.setFormat(e.format), n.setStyle(e.style), n;
  }
  exportJSON() {
    return { ...super.exportJSON(), type: "tab", version: 1 };
  }
  setTextContent() {
    Le(126);
  }
  setDetail() {
    Le(127);
  }
  setMode() {
    Le(128);
  }
  canInsertTextBefore() {
    return !1;
  }
  canInsertTextAfter() {
    return !1;
  }
};
function Rk() {
  return i1(new Lk());
}
function LF(t) {
  return t instanceof Lk;
}
class sie {
  constructor(e, n, i) {
    this._selection = null, this.key = e, this.offset = n, this.type = i;
  }
  is(e) {
    return this.key === e.key && this.offset === e.offset && this.type === e.type;
  }
  isBefore(e) {
    let n = this.getNode(), i = e.getNode(), r = this.offset;
    if (e = e.offset, xe(n)) {
      var s = n.getDescendantByIndex(r);
      n = s ?? n;
    }
    return xe(i) && (s = i.getDescendantByIndex(e), i = s ?? i), n === i ? r < e : n.isBefore(i);
  }
  getNode() {
    let e = Tr(this.key);
    return e === null && Le(20), e;
  }
  set(e, n, i) {
    let r = this._selection, s = this.key;
    this.key = e, this.offset = n, this.type = i, Vh() || (xu() === s && Pi(e), r !== null && (r.setCachedNodes(null), r.dirty = !0));
  }
}
function Ro(t, e, n) {
  return new sie(t, e, n);
}
function f3(t, e) {
  let n = e.__key, i = t.offset, r = "element";
  if (Ze(e)) r = "text", e = e.getTextContentSize(), i > e && (i = e);
  else if (!xe(e)) {
    var s = e.getNextSibling();
    Ze(s) ? (n = s.__key, i = 0, r = "text") : (s = e.getParent()) && (n = s.__key, i = e.getIndexWithinParent() + 1);
  }
  t.set(n, i, r);
}
function eM(t, e) {
  if (xe(e)) {
    let n = e.getLastDescendant();
    xe(n) || Ze(n) ? f3(t, n) : f3(t, e);
  } else f3(t, e);
}
function tM(t, e, n, i) {
  let r = t.getNode(), s = r.getChildAtIndex(t.offset), o = rr(), a = Ws(r) ? kl().append(o) : o;
  o.setFormat(n), o.setStyle(i), s === null ? r.append(a) : s.insertBefore(a), t.is(e) && e.set(o.__key, 0, "text"), t.set(o.__key, 0, "text");
}
function fu(t, e, n, i) {
  t.key = e, t.offset = n, t.type = i;
}
let RF = class jF {
  constructor(e) {
    this._cachedNodes = null, this._nodes = e, this.dirty = !1;
  }
  getCachedNodes() {
    return this._cachedNodes;
  }
  setCachedNodes(e) {
    this._cachedNodes = e;
  }
  is(e) {
    if (!r1(e)) return !1;
    let n = this._nodes, i = e._nodes;
    return n.size === i.size && Array.from(n).every((r) => i.has(r));
  }
  isCollapsed() {
    return !1;
  }
  isBackward() {
    return !1;
  }
  getStartEndPoints() {
    return null;
  }
  add(e) {
    this.dirty = !0, this._nodes.add(e), this._cachedNodes = null;
  }
  delete(e) {
    this.dirty = !0, this._nodes.delete(e), this._cachedNodes = null;
  }
  clear() {
    this.dirty = !0, this._nodes.clear(), this._cachedNodes = null;
  }
  has(e) {
    return this._nodes.has(e);
  }
  clone() {
    return new jF(new Set(this._nodes));
  }
  extract() {
    return this.getNodes();
  }
  insertRawText() {
  }
  insertText() {
  }
  insertNodes(e) {
    let n = this.getNodes(), i = n.length;
    var r = n[i - 1];
    if (Ze(r)) r = r.select();
    else {
      let s = r.getIndexWithinParent() + 1;
      r = r.getParentOrThrow().select(s, s);
    }
    for (r.insertNodes(e), e = 0; e < i; e++) n[e].remove();
  }
  getNodes() {
    var e = this._cachedNodes;
    if (e !== null) return e;
    var n = this._nodes;
    e = [];
    for (let i of n) n = Tr(i), n !== null && e.push(n);
    return Vh() || (this._cachedNodes = e), e;
  }
  getTextContent() {
    let e = this.getNodes(), n = "";
    for (let i = 0; i < e.length; i++) n += e[i].getTextContent();
    return n;
  }
};
function xt(t) {
  return t instanceof qh;
}
let qh = class FF {
  constructor(e, n, i, r) {
    this.anchor = e, this.focus = n, e._selection = this, n._selection = this, this._cachedNodes = null, this.format = i, this.style = r, this.dirty = !1;
  }
  getCachedNodes() {
    return this._cachedNodes;
  }
  setCachedNodes(e) {
    this._cachedNodes = e;
  }
  is(e) {
    return xt(e) ? this.anchor.is(e.anchor) && this.focus.is(e.focus) && this.format === e.format && this.style === e.style : !1;
  }
  isCollapsed() {
    return this.anchor.is(this.focus);
  }
  getNodes() {
    var e = this._cachedNodes;
    if (e !== null) return e;
    e = this.anchor;
    var n = this.focus, i = e.isBefore(n), r = i ? e : n;
    i = i ? n : e, e = r.getNode(), n = i.getNode();
    let s = r.offset;
    return r = i.offset, xe(e) && (i = e.getDescendantByIndex(s), e = i ?? e), xe(n) && (i = n.getDescendantByIndex(r), i !== null && i !== e && n.getChildAtIndex(r) === i && (i = i.getPreviousSibling()), n = i ?? n), e = e.is(n) ? xe(e) && 0 < e.getChildrenSize() ? [] : [e] : e.getNodesBetween(n), Vh() || (this._cachedNodes = e), e;
  }
  setTextNodeRange(e, n, i, r) {
    fu(this.anchor, e.__key, n, "text"), fu(this.focus, i.__key, r, "text"), this._cachedNodes = null, this.dirty = !0;
  }
  getTextContent() {
    let e = this.getNodes();
    if (e.length === 0) return "";
    let n = e[0], i = e[e.length - 1], r = this.anchor, s = this.focus, o = r.isBefore(s), [a, l] = s4(this), u = "", f = !0;
    for (let d = 0; d < e.length; d++) {
      let h = e[d];
      if (xe(h) && !h.isInline()) f || (u += `
`), f = !h.isEmpty();
      else if (f = !1, Ze(h)) {
        let m = h.getTextContent();
        h === n ? h === i ? (r.type !== "element" || s.type !== "element" || s.offset === r.offset) && (m = a < l ? m.slice(a, l) : m.slice(l, a)) : m = o ? m.slice(a) : m.slice(l) : h === i && (m = o ? m.slice(0, l) : m.slice(0, a)), u += m;
      } else !ii(h) && !hf(h) || h === i && this.isCollapsed() || (u += h.getTextContent());
    }
    return u;
  }
  applyDOMRange(e) {
    let n = Ln(), i = n.getEditorState()._selection;
    if (e = zF(e.startContainer, e.startOffset, e.endContainer, e.endOffset, n, i), e !== null) {
      var [r, s] = e;
      fu(this.anchor, r.key, r.offset, r.type), fu(this.focus, s.key, s.offset, s.type), this._cachedNodes = null;
    }
  }
  clone() {
    let e = this.anchor, n = this.focus;
    return new FF(Ro(e.key, e.offset, e.type), Ro(n.key, n.offset, n.type), this.format, this.style);
  }
  toggleFormat(e) {
    this.format = US(this.format, e, null), this.dirty = !0;
  }
  setStyle(e) {
    this.style = e, this.dirty = !0;
  }
  hasFormat(e) {
    return (this.format & Oh[e]) !== 0;
  }
  insertRawText(e) {
    e = e.split(/(\r?\n|\t)/);
    let n = [], i = e.length;
    for (let r = 0; r < i; r++) {
      let s = e[r];
      s === `
` || s === `\r
` ? n.push(Sh()) : s === "	" ? n.push(Rk()) : n.push(rr(s));
    }
    this.insertNodes(n);
  }
  insertText(e) {
    var n = this.anchor, i = this.focus, r = this.isCollapsed() || n.isBefore(i), s = this.format, o = this.style;
    r && n.type === "element" ? tM(n, i, s, o) : r || i.type !== "element" || tM(i, n, s, o);
    var a = this.getNodes(), l = a.length, u = r ? i : n;
    i = (r ? n : i).offset;
    var f = u.offset;
    n = a[0], Ze(n) || Le(26), r = n.getTextContent().length;
    var d = n.getParentOrThrow(), h = a[l - 1];
    if (this.isCollapsed() && i === r && (n.isSegmented() || n.isToken() || !n.canInsertTextAfter() || !d.canInsertTextAfter() && n.getNextSibling() === null)) {
      var m = n.getNextSibling();
      if (Ze(m) && m.canInsertTextBefore() && !QS(m) || (m = rr(), m.setFormat(s), d.canInsertTextAfter() ? n.insertAfter(m) : d.insertAfter(m)), m.select(0, 0), n = m, e !== "") {
        this.insertText(e);
        return;
      }
    } else if (this.isCollapsed() && i === 0 && (n.isSegmented() || n.isToken() || !n.canInsertTextBefore() || !d.canInsertTextBefore() && n.getPreviousSibling() === null)) {
      if (m = n.getPreviousSibling(), (!Ze(m) || QS(m)) && (m = rr(), m.setFormat(s), d.canInsertTextBefore() ? n.insertBefore(m) : d.insertBefore(m)), m.select(), n = m, e !== "") {
        this.insertText(e);
        return;
      }
    } else if (n.isSegmented() && i !== r) d = rr(n.getTextContent()), d.setFormat(s), n.replace(d), n = d;
    else if (!(this.isCollapsed() || e === "" || (m = h.getParent(), d.canInsertTextBefore() && d.canInsertTextAfter() && (!xe(m) || m.canInsertTextBefore() && m.canInsertTextAfter())))) {
      this.insertText(""), BF(this.anchor, this.focus, null), this.insertText(e);
      return;
    }
    if (l === 1) if (n.isToken()) e = rr(e), e.select(), n.replace(e);
    else {
      if (a = n.getFormat(), l = n.getStyle(), i === f && (a !== s || l !== o)) if (n.getTextContent() === "") n.setFormat(s), n.setStyle(o);
      else {
        a = rr(e), a.setFormat(s), a.setStyle(o), a.select(), i === 0 ? n.insertBefore(a, !1) : ([l] = n.splitText(i), l.insertAfter(a, !1)), a.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
        return;
      }
      else if (LF(n)) {
        e = rr(e), e.setFormat(s), e.setStyle(o), e.select(), n.replace(e);
        return;
      }
      n = n.spliceText(i, f - i, e, !0), n.getTextContent() === "" ? n.remove() : this.anchor.type === "text" && (n.isComposing() ? this.anchor.offset -= e.length : (this.format = a, this.style = l));
    }
    else {
      if (s = /* @__PURE__ */ new Set([...n.getParentKeys(), ...h.getParentKeys()]), m = xe(n) ? n : n.getParentOrThrow(), o = xe(h) ? h : h.getParentOrThrow(), d = h, !m.is(o) && o.isInline())
        do
          d = o, o = o.getParentOrThrow();
        while (o.isInline());
      if (u.type === "text" && (f !== 0 || h.getTextContent() === "") || u.type === "element" && h.getIndexWithinParent() < f) if (Ze(h) && !h.isToken() && f !== h.getTextContentSize()) {
        if (h.isSegmented()) {
          var g = rr(h.getTextContent());
          h.replace(g), h = g;
        }
        Ws(u.getNode()) || u.type !== "text" || (h = h.spliceText(0, f, "")), s.add(h.__key);
      } else u = h.getParentOrThrow(), u.canBeEmpty() || u.getChildrenSize() !== 1 ? h.remove() : u.remove();
      else s.add(h.__key);
      for (u = o.getChildren(), f = new Set(a), h = m.is(o), m = m.isInline() && n.getNextSibling() === null ? m : n, g = u.length - 1; 0 <= g; g--) {
        let w = u[g];
        if (w.is(n) || xe(w) && w.isParentOf(n)) break;
        w.isAttached() && (!f.has(w) || w.is(d) ? h || m.insertAfter(w, !1) : w.remove());
      }
      if (!h) for (u = o, o = null; u !== null; )
        f = u.getChildren(), h = f.length, (h === 0 || f[h - 1].is(o)) && (s.delete(u.__key), o = u), u = u.getParent();
      for (n.isToken() ? i === r ? n.select() : (e = rr(e), e.select(), n.replace(e)) : (n = n.spliceText(i, r - i, e, !0), n.getTextContent() === "" ? n.remove() : n.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length)), e = 1; e < l; e++) n = a[e], s.has(n.__key) || n.remove();
    }
  }
  removeText() {
    this.insertText("");
  }
  formatText(e) {
    if (this.isCollapsed()) this.toggleFormat(e), Pi(null);
    else {
      var n = this.getNodes(), i = [];
      for (var r of n) Ze(r) && i.push(r);
      var s = i.length;
      if (s === 0) this.toggleFormat(e), Pi(null);
      else {
        r = this.anchor;
        var o = this.focus, a = this.isBackward();
        n = a ? o : r, r = a ? r : o;
        var l = 0, u = i[0];
        if (o = n.type === "element" ? 0 : n.offset, n.type === "text" && o === u.getTextContentSize() && (l = 1, u = i[1], o = 0), u != null) {
          a = u.getFormatFlags(e, null);
          var f = s - 1, d = i[f];
          if (s = r.type === "text" ? r.offset : d.getTextContentSize(), u.is(d)) o !== s && (o === 0 && s === u.getTextContentSize() ? u.setFormat(a) : (e = u.splitText(o, s), e = o === 0 ? e[0] : e[1], e.setFormat(a), n.type === "text" && n.set(e.__key, 0, "text"), r.type === "text" && r.set(e.__key, s - o, "text")), this.format = a);
          else {
            o !== 0 && ([, u] = u.splitText(o), o = 0), u.setFormat(a);
            var h = d.getFormatFlags(e, a);
            for (0 < s && (s !== d.getTextContentSize() && ([d] = d.splitText(s)), d.setFormat(h)), l += 1; l < f; l++) {
              let m = i[l];
              if (!m.isToken()) {
                let g = m.getFormatFlags(e, h);
                m.setFormat(g);
              }
            }
            n.type === "text" && n.set(u.__key, o, "text"), r.type === "text" && r.set(d.__key, s, "text"), this.format = a | h;
          }
        }
      }
    }
  }
  insertNodes(e) {
    if (e.length !== 0) {
      if (this.anchor.key === "root") {
        this.insertParagraph();
        var n = pn();
        return xt(n) || Le(134), n.insertNodes(e);
      }
      n = this.isBackward() ? this.focus : this.anchor;
      var i = s3(n.getNode(), jd);
      if (n = e[e.length - 1], "__language" in i && xe(i)) if ("__language" in e[0]) this.insertText(e[0].getTextContent());
      else {
        var r = d3(this);
        i.splice(r, 0, e), n.selectEnd();
      }
      else if (e.some((a) => (xe(a) || ii(a)) && !a.isInline())) {
        n = uie(e), e = n.getLastDescendant();
        var s = n.getChildren();
        n = xe(i) && i.isEmpty() ? null : this.insertParagraph(), r = s[s.length - 1];
        var o = s[0];
        ((a) => xe(a) && jd(a) && !a.isEmpty() && xe(i) && (!i.isEmpty() || "__value" in i && "__checked" in i))(o) && (xe(i) || Le(135), i.append(...o.getChildren()), o = s[1]), o && Kne(i, o), s = s3(e, jd), n && xe(s) && ("__value" in n && "__checked" in n || jd(r)) && (s.append(...n.getChildren()), n.remove()), xe(i) && i.isEmpty() && i.remove(), e.selectEnd(), e = xe(i) ? i.getLastChild() : null, hf(e) && s !== i && e.remove();
      } else xe(i) || Le(135), r = d3(this), i.splice(r, 0, e), n.selectEnd();
    }
  }
  insertParagraph() {
    if (this.anchor.key === "root") {
      var e = kl();
      return Zs().splice(this.anchor.offset, 0, [e]), e.select(), e;
    }
    var n = d3(this);
    return e = s3(this.anchor.getNode(), jd), xe(e) || Le(136), n = (n = e.getChildAtIndex(n)) ? [n, ...n.getNextSiblings()] : [], (e = e.insertNewAfter(this, !1)) ? (e.append(...n), e.selectStart(), e) : null;
  }
  insertLineBreak(e) {
    var n = Sh();
    this.insertNodes([n]), e && (e = n.getParentOrThrow(), n = n.getIndexWithinParent(), e.select(n, n));
  }
  extract() {
    var e = this.getNodes(), n = e.length, i = n - 1, r = this.anchor;
    let s = this.focus;
    var o = e[0];
    let a = e[i], [l, u] = s4(this);
    return n === 0 ? [] : n === 1 ? Ze(o) && !this.isCollapsed() ? (e = l > u ? u : l, i = o.splitText(e, l > u ? l : u), e = e === 0 ? i[0] : i[1], e != null ? [e] : []) : [o] : (n = r.isBefore(s), Ze(o) && (r = n ? l : u, r === o.getTextContentSize() ? e.shift() : r !== 0 && ([, o] = o.splitText(r), e[0] = o)), Ze(a) && (o = a.getTextContent().length, n = n ? u : l, n === 0 ? e.pop() : n !== o && ([a] = a.splitText(n), e[i] = a)), e);
  }
  modify(e, n, i) {
    var r = this.focus, s = this.anchor, o = e === "move", a = ZS(r, n);
    if (ii(a) && !a.isIsolated()) o && a.isKeyboardSelectable() ? (n = o4(), n.add(a.__key), $a(n)) : (e = n ? a.getPreviousSibling() : a.getNextSibling(), Ze(e) ? (a = e.__key, n = n ? e.getTextContent().length : 0, r.set(a, n, "text"), o && s.set(a, n, "text")) : (i = a.getParentOrThrow(), xe(e) ? (i = e.__key, a = n ? e.getChildrenSize() : 0) : (a = a.getIndexWithinParent(), i = i.__key, n || a++), r.set(i, a, "element"), o && s.set(i, a, "element")));
    else if (s = Ln(), r = La(s._window)) {
      var l = s._blockCursorElement, u = s._rootElement;
      if (u === null || l === null || !xe(a) || a.isInline() || a.canBeEmpty() || qS(l, s, u), r.modify(e, n ? "backward" : "forward", i), 0 < r.rangeCount && (a = r.getRangeAt(0), s = this.anchor.getNode(), s = Ws(s) ? s : yF(s), this.applyDOMRange(a), this.dirty = !0, !o)) {
        for (o = this.getNodes(), e = [], i = !1, l = 0; l < o.length; l++) u = o[l], Yy(u, s) ? e.push(u) : i = !0;
        i && 0 < e.length && (n ? (n = e[0], xe(n) ? n.selectStart() : n.getParentOrThrow().selectStart()) : (n = e[e.length - 1], xe(n) ? n.selectEnd() : n.getParentOrThrow().selectEnd())), (r.anchorNode !== a.startContainer || r.anchorOffset !== a.startOffset) && (n = this.focus, o = this.anchor, r = o.key, a = o.offset, s = o.type, fu(o, n.key, n.offset, n.type), fu(n, r, a, s), this._cachedNodes = null);
      }
    }
  }
  deleteCharacter(e) {
    let n = this.isCollapsed();
    if (this.isCollapsed()) {
      var i = this.anchor, r = this.focus, s = i.getNode();
      if (!e && (i.type === "element" && xe(s) && i.offset === s.getChildrenSize() || i.type === "text" && i.offset === s.getTextContentSize())) {
        var o = s.getParent();
        if (o = s.getNextSibling() || (o === null ? null : o.getNextSibling()), xe(o) && o.isShadowRoot()) return;
      }
      if (o = ZS(r, e), ii(o) && !o.isIsolated()) {
        o.isKeyboardSelectable() && xe(s) && s.getChildrenSize() === 0 ? (s.remove(), e = o4(), e.add(o.__key), $a(e)) : (o.remove(), Ln().dispatchCommand(Tk, void 0));
        return;
      }
      if (!e && xe(o) && xe(s) && s.isEmpty()) {
        s.remove(), o.selectStart();
        return;
      }
      if (this.modify("extend", e, "character"), this.isCollapsed()) {
        if (e && i.offset === 0 && (i.type === "element" ? i.getNode() : i.getNode().getParentOrThrow()).collapseAtStart(this)) return;
      } else {
        if (o = r.type === "text" ? r.getNode() : null, s = i.type === "text" ? i.getNode() : null, o !== null && o.isSegmented()) {
          if (i = r.offset, r = o.getTextContentSize(), o.is(s) || e && i !== r || !e && i !== 0) {
            iM(o, e, i);
            return;
          }
        } else if (s !== null && s.isSegmented() && (i = i.offset, r = s.getTextContentSize(), s.is(o) || e && i !== 0 || !e && i !== r)) {
          iM(s, e, i);
          return;
        }
        if (s = this.anchor, o = this.focus, i = s.getNode(), r = o.getNode(), i === r && s.type === "text" && o.type === "text") {
          var a = s.offset, l = o.offset;
          let u = a < l;
          r = u ? a : l, l = u ? l : a, a = l - 1, r !== a && (i = i.getTextContent().slice(r, l), gF(i) || (e ? o.offset = a : s.offset = a));
        }
      }
    }
    this.removeText(), e && !n && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (e = this.anchor.getNode(), e.isEmpty() && Ws(e.getParent()) && e.getIndexWithinParent() === 0 && e.collapseAtStart(this));
  }
  deleteLine(e) {
    this.isCollapsed() && (this.anchor.type === "text" && this.modify("extend", e, "lineboundary"), (e ? this.focus : this.anchor).offset === 0 && this.modify("extend", e, "character")), this.removeText();
  }
  deleteWord(e) {
    this.isCollapsed() && this.modify("extend", e, "word"), this.removeText();
  }
  isBackward() {
    return this.focus.isBefore(this.anchor);
  }
  getStartEndPoints() {
    return [this.anchor, this.focus];
  }
};
function r1(t) {
  return t instanceof RF;
}
function nM(t) {
  let e = t.offset;
  return t.type === "text" ? e : (t = t.getNode(), e === t.getChildrenSize() ? t.getTextContent().length : 0);
}
function s4(t) {
  if (t = t.getStartEndPoints(), t === null) return [0, 0];
  let [e, n] = t;
  return e.type === "element" && n.type === "element" && e.key === n.key && e.offset === n.offset ? [0, 0] : [nM(e), nM(n)];
}
function iM(t, e, n) {
  let i = t.getTextContent().split(/(?=\s)/g), r = i.length, s = 0, o = 0;
  for (let a = 0; a < r; a++) {
    let l = i[a], u = a === r - 1;
    if (o = s, s += l.length, e && s === n || s > n || u) {
      i.splice(a, 1), u && (o = void 0);
      break;
    }
  }
  e = i.join("").trim(), e === "" ? t.remove() : (t.setTextContent(e), t.select(o, o));
}
function rM(t, e, n, i) {
  var r = e;
  if (t.nodeType === 1) {
    let a = !1;
    var s = t.childNodes, o = s.length;
    r === o && (a = !0, r = o - 1);
    let l = s[r];
    if (o = !1, l === i._blockCursorElement ? (l = s[r + 1], o = !0) : i._blockCursorElement !== null && r--, i = Xd(l), Ze(i)) r = a ? i.getTextContentSize() : 0;
    else {
      if (s = Xd(t), s === null) return null;
      if (xe(s) ? (t = s.getChildAtIndex(r), (e = xe(t)) && (e = t.getParent(), e = n === null || e === null || !e.canBeEmpty() || e !== n.getNode()), e && (n = a ? t.getLastDescendant() : t.getFirstDescendant(), n === null ? (s = t, r = 0) : (t = n, s = xe(t) ? t : t.getParentOrThrow())), Ze(t) ? (i = t, s = null, r = a ? t.getTextContentSize() : 0) : t !== s && a && !o && r++) : (r = s.getIndexWithinParent(), r = e === 0 && ii(s) && Xd(t) === s ? r : r + 1, s = s.getParentOrThrow()), xe(s)) return Ro(s.__key, r, "element");
    }
  } else i = Xd(t);
  return Ze(i) ? Ro(i.__key, r, "text") : null;
}
function sM(t, e, n) {
  var i = t.offset, r = t.getNode();
  i === 0 ? (i = r.getPreviousSibling(), r = r.getParent(), e ? (n || !e) && i === null && xe(r) && r.isInline() && (e = r.getPreviousSibling(), Ze(e) && (t.key = e.__key, t.offset = e.getTextContent().length)) : xe(i) && !n && i.isInline() ? (t.key = i.__key, t.offset = i.getChildrenSize(), t.type = "element") : Ze(i) && (t.key = i.__key, t.offset = i.getTextContent().length)) : i === r.getTextContent().length && (i = r.getNextSibling(), r = r.getParent(), e && xe(i) && i.isInline() ? (t.key = i.__key, t.offset = 0, t.type = "element") : (n || e) && i === null && xe(r) && r.isInline() && !r.canInsertTextAfter() && (e = r.getNextSibling(), Ze(e) && (t.key = e.__key, t.offset = 0)));
}
function BF(t, e, n) {
  if (t.type === "text" && e.type === "text") {
    var i = t.isBefore(e);
    let r = t.is(e);
    sM(t, i, r), sM(e, !i, r), r && (e.key = t.key, e.offset = t.offset, e.type = t.type), i = Ln(), i.isComposing() && i._compositionKey !== t.key && xt(n) && (i = n.anchor, n = n.focus, fu(t, i.key, i.offset, i.type), fu(e, n.key, n.offset, n.type));
  }
}
function zF(t, e, n, i, r, s) {
  return t === null || n === null || !t1(r, t, n) || (e = rM(t, e, xt(s) ? s.anchor : null, r), e === null) || (i = rM(n, i, xt(s) ? s.focus : null, r), i === null || e.type === "element" && i.type === "element" && (t = Xd(t), n = Xd(n), ii(t) && ii(n))) ? null : (BF(e, i, s), [e, i]);
}
function WF(t, e, n, i, r, s) {
  let o = Ra();
  return t = new qh(Ro(t, e, r), Ro(n, i, s), 0, ""), t.dirty = !0, o._selection = t;
}
function o4() {
  return new RF(/* @__PURE__ */ new Set());
}
function oie(t) {
  let e = t.getEditorState()._selection, n = La(t._window);
  return xt(e) || e == null ? u5(e, n, t, null) : e.clone();
}
function u5(t, e, n, i) {
  var r = n._window;
  if (r === null) return null;
  var s = (r = i || r.event) ? r.type : void 0;
  i = s === "selectionchange", r = !HS && (i || s === "beforeinput" || s === "compositionstart" || s === "compositionend" || s === "click" && r && r.detail === 3 || s === "drop" || s === void 0);
  let o;
  if (!xt(t) || r) {
    if (e === null) return null;
    if (r = e.anchorNode, s = e.focusNode, o = e.anchorOffset, e = e.focusOffset, i && xt(t) && !t1(n, r, s)) return t.clone();
  } else return t.clone();
  if (n = zF(r, o, s, e, n, t), n === null) return null;
  let [a, l] = n;
  return new qh(a, l, xt(t) ? t.format : 0, xt(t) ? t.style : "");
}
function pn() {
  return Ra()._selection;
}
function Yh() {
  return Ln()._editorState._selection;
}
function Xy(t, e, n, i = 1) {
  var r = t.anchor, s = t.focus, o = r.getNode(), a = s.getNode();
  if (e.is(o) || e.is(a)) {
    if (o = e.__key, t.isCollapsed())
      e = r.offset, (n <= e && 0 < i || n < e && 0 > i) && (n = Math.max(0, e + i), r.set(o, n, "element"), s.set(o, n, "element"), oM(t));
    else {
      let u = t.isBackward();
      a = u ? s : r;
      var l = a.getNode();
      r = u ? r : s, s = r.getNode(), e.is(l) && (l = a.offset, (n <= l && 0 < i || n < l && 0 > i) && a.set(o, Math.max(0, l + i), "element")), e.is(s) && (e = r.offset, (n <= e && 0 < i || n < e && 0 > i) && r.set(o, Math.max(0, e + i), "element"));
    }
    oM(t);
  }
}
function oM(t) {
  var e = t.anchor, n = e.offset;
  let i = t.focus;
  var r = i.offset, s = e.getNode(), o = i.getNode();
  if (t.isCollapsed()) xe(s) && (o = s.getChildrenSize(), o = (r = n >= o) ? s.getChildAtIndex(o - 1) : s.getChildAtIndex(n), Ze(o) && (n = 0, r && (n = o.getTextContentSize()), e.set(o.__key, n, "text"), i.set(o.__key, n, "text")));
  else {
    if (xe(s)) {
      let a = s.getChildrenSize();
      n = (t = n >= a) ? s.getChildAtIndex(a - 1) : s.getChildAtIndex(n), Ze(n) && (s = 0, t && (s = n.getTextContentSize()), e.set(n.__key, s, "text"));
    }
    xe(o) && (n = o.getChildrenSize(), r = (e = r >= n) ? o.getChildAtIndex(n - 1) : o.getChildAtIndex(r), Ze(r) && (o = 0, e && (o = r.getTextContentSize()), i.set(r.__key, o, "text")));
  }
}
function aie(t, e) {
  if (e = e.getEditorState()._selection, t = t._selection, xt(t)) {
    var n = t.anchor;
    let i = t.focus, r;
    n.type === "text" && (r = n.getNode(), r.selectionTransform(e, t)), i.type === "text" && (n = i.getNode(), r !== n && n.selectionTransform(e, t));
  }
}
function Gy(t, e, n, i, r) {
  let s = null, o = 0, a = null;
  i !== null ? (s = i.__key, Ze(i) ? (o = i.getTextContentSize(), a = "text") : xe(i) && (o = i.getChildrenSize(), a = "element")) : r !== null && (s = r.__key, Ze(r) ? a = "text" : xe(r) && (a = "element")), s !== null && a !== null ? t.set(s, o, a) : (o = e.getIndexWithinParent(), o === -1 && (o = n.getChildrenSize()), t.set(n.__key, o, "element"));
}
function aM(t, e, n, i, r) {
  t.type === "text" ? (t.key = n, e || (t.offset += r)) : t.offset > i.getIndexWithinParent() && --t.offset;
}
function d3(t) {
  t.isCollapsed() || t.removeText();
  var e = t.anchor;
  for (t = e.getNode(), e = e.offset; !jd(t); ) [t, e] = lie(t, e);
  return e;
}
function lie(t, e) {
  var n = t.getParent();
  if (!n) return n = kl(), Zs().append(n), n.select(), [Zs(), 0];
  if (Ze(t)) {
    var i = t.splitText(e);
    return i.length === 0 ? [n, t.getIndexWithinParent()] : (t = e === 0 ? 0 : 1, t = i[0].getIndexWithinParent() + t, [n, t]);
  }
  return !xe(t) || e === 0 ? [n, t.getIndexWithinParent()] : ((i = t.getChildAtIndex(e)) && (e = new qh(Ro(t.__key, e, "element"), Ro(t.__key, e, "element"), 0, ""), (e = t.insertNewAfter(e)) && e.append(i, ...i.getNextSiblings())), [n, t.getIndexWithinParent() + 1]);
}
function uie(t) {
  let e = kl(), n = null;
  for (let i = 0; i < t.length; i++) {
    let r = t[i], s = hf(r);
    if (s || ii(r) && r.isInline() || xe(r) && r.isInline() || Ze(r) || r.isParentRequired()) {
      if (n === null && (n = r.createParentElementNode(), e.append(n), s)) continue;
      n !== null && n.append(r);
    } else e.append(r), n = null;
  }
  return e;
}
let Qi = null, Ui = null, ws = !1, h3 = !1, Gg = 0, lM = { characterData: !0, childList: !0, subtree: !0 };
function Vh() {
  return ws || Qi !== null && Qi._readOnly;
}
function qr() {
  ws && Le(13);
}
function Ra() {
  return Qi === null && Le(15), Qi;
}
function Ln() {
  return Ui === null && Le(16), Ui;
}
function uM(t, e, n) {
  var i = e.__type;
  let r = t._nodes.get(i);
  for (r === void 0 && Le(30, i), t = n.get(i), t === void 0 && (t = Array.from(r.transforms), n.set(i, t)), n = t.length, i = 0; i < n && (t[i](e), e.isAttached()); i++) ;
}
function cie(t, e) {
  e = e._dirtyLeaves, t = t._nodeMap;
  for (let n of e) e = t.get(n), Ze(e) && e.isAttached() && e.isSimpleText() && !e.isUnmergeable() && fF(e);
}
function fie(t, e) {
  let n = e._dirtyLeaves, i = e._dirtyElements;
  t = t._nodeMap;
  let r = xu(), s = /* @__PURE__ */ new Map();
  var o = n;
  let a = o.size;
  for (var l = i, u = l.size; 0 < a || 0 < u; ) {
    if (0 < a) {
      e._dirtyLeaves = /* @__PURE__ */ new Set();
      for (let f of o) o = t.get(f), Ze(o) && o.isAttached() && o.isSimpleText() && !o.isUnmergeable() && fF(o), o !== void 0 && o !== void 0 && o.__key !== r && o.isAttached() && uM(e, o, s), n.add(f);
      if (o = e._dirtyLeaves, a = o.size, 0 < a) {
        Gg++;
        continue;
      }
    }
    e._dirtyLeaves = /* @__PURE__ */ new Set(), e._dirtyElements = /* @__PURE__ */ new Map();
    for (let f of l) l = f[0], u = f[1], (l === "root" || u) && (o = t.get(l), o !== void 0 && o !== void 0 && o.__key !== r && o.isAttached() && uM(e, o, s), i.set(l, u));
    o = e._dirtyLeaves, a = o.size, l = e._dirtyElements, u = l.size, Gg++;
  }
  e._dirtyLeaves = n, e._dirtyElements = i;
}
function c5(t, e) {
  var n = t.type, i = e.get(n);
  if (i === void 0 && Le(17, n), n = i.klass, t.type !== n.getType() && Le(18, n.name), n = n.importJSON(t), t = t.children, xe(n) && Array.isArray(t)) for (i = 0; i < t.length; i++) {
    let r = c5(t[i], e);
    n.append(r);
  }
  return n;
}
function cM(t, e) {
  let n = Qi, i = ws, r = Ui;
  Qi = t, ws = !0, Ui = null;
  try {
    return e();
  } finally {
    Qi = n, ws = i, Ui = r;
  }
}
function af(t, e) {
  let n = t._pendingEditorState, i = t._rootElement, r = t._headless || i === null;
  if (n !== null) {
    var s = t._editorState, o = s._selection, a = n._selection, l = t._dirtyType !== 0, u = Qi, f = ws, d = Ui, h = t._updating, m = t._observer, g = null;
    if (t._pendingEditorState = null, t._editorState = n, !r && l && m !== null) {
      Ui = t, Qi = n, ws = !1, t._updating = !0;
      try {
        let He = t._dirtyType, Ct = t._dirtyElements, Lt = t._dirtyLeaves;
        m.disconnect();
        var w = He, x = Ct, _ = Lt;
        Zr = dl = Ni = "", xF = w === 2, Kb = null, Ar = t, Hu = t._config, Yg = t._nodes, Pk = Ar._listeners.mutation, YS = x, VS = _, df = s._nodeMap, Qu = n._nodeMap, l5 = n._readOnly, XS = new Map(t._keyToDOMMap);
        let Be = /* @__PURE__ */ new Map();
        Vg = Be, Xm("root", null), Vg = XS = Hu = Qu = df = VS = YS = Yg = Ar = void 0, g = Be;
      } catch (He) {
        if (He instanceof Error && t._onError(He), h3) throw He;
        ZF(t, null, i, n), cF(t), t._dirtyType = 2, h3 = !0, af(t, s), h3 = !1;
        return;
      } finally {
        m.observe(i, lM), t._updating = h, Qi = u, ws = f, Ui = d;
      }
    }
    n._readOnly || (n._readOnly = !0);
    var S = t._dirtyLeaves, C = t._dirtyElements, E = t._normalizedNodes, M = t._updateTags, $ = t._deferred;
    l && (t._dirtyType = 0, t._cloneNotNeeded.clear(), t._dirtyLeaves = /* @__PURE__ */ new Set(), t._dirtyElements = /* @__PURE__ */ new Map(), t._normalizedNodes = /* @__PURE__ */ new Set(), t._updateTags = /* @__PURE__ */ new Set());
    var P = t._decorators, W = t._pendingDecorators || P, z = n._nodeMap, Z;
    for (Z in W) z.has(Z) || (W === P && (W = mF(t)), delete W[Z]);
    var L = r ? null : La(t._window);
    if (t._editable && L !== null && (l || a === null || a.dirty)) {
      Ui = t, Qi = n;
      try {
        if (m !== null && m.disconnect(), l || a === null || a.dirty) {
          let He = t._blockCursorElement;
          He !== null && qS(He, t, i);
          e: {
            let Ct = L.anchorNode, Lt = L.focusNode, Be = L.anchorOffset, Ie = L.focusOffset, ae = document.activeElement;
            if (!(M.has("collaboration") && ae !== i || ae !== null && n5(ae))) if (xt(a)) {
              var Q = a.anchor, V = a.focus, H = Q.key, R = V.key, q = qy(t, H), Y = qy(t, R), K = Q.offset, te = V.offset, se = a.format, ce = a.style, U = a.isCollapsed(), F = q, oe = Y, le = !1;
              if (Q.type === "text") {
                F = Qy(q);
                let Ue = Q.getNode();
                le = Ue.getFormat() !== se || Ue.getStyle() !== ce;
              } else xt(o) && o.anchor.type === "text" && (le = !0);
              if (V.type === "text" && (oe = Qy(Y)), F !== null && oe !== null) {
                if (U && (o === null || le || xt(o) && (o.format !== se || o.style !== ce))) {
                  var pe = performance.now();
                  MF = [se, ce, K, H, pe];
                }
                if (Be === K && Ie === te && Ct === F && Lt === oe && (L.type !== "Range" || !U) && (ae !== null && i.contains(ae) || i.focus({ preventScroll: !0 }), Q.type !== "element")) break e;
                try {
                  L.setBaseAndExtent(F, K, oe, te);
                } catch {
                }
                if (!M.has("skip-scroll-into-view") && a.isCollapsed() && i !== null && i === document.activeElement) {
                  let Ue = a instanceof qh && a.anchor.type === "element" ? F.childNodes[K] || null : 0 < L.rangeCount ? L.getRangeAt(0) : null;
                  if (Ue !== null) {
                    let qt;
                    if (Ue instanceof Text) {
                      let vn = document.createRange();
                      vn.selectNode(Ue), qt = vn.getBoundingClientRect();
                    } else qt = Ue.getBoundingClientRect();
                    let Xn = i.ownerDocument, Dt = Xn.defaultView;
                    if (Dt !== null) for (var { top: Re, bottom: ze } = qt, rt, pt, ge = i; ge !== null; ) {
                      let vn = ge === Xn.body;
                      if (vn) rt = 0, pt = Ak(t).innerHeight;
                      else {
                        let Za = ge.getBoundingClientRect();
                        rt = Za.top, pt = Za.bottom;
                      }
                      let Os = 0;
                      if (Re < rt ? Os = -(rt - Re) : ze > pt && (Os = ze - pt), Os !== 0) if (vn) Dt.scrollBy(0, Os);
                      else {
                        let Za = ge.scrollTop;
                        ge.scrollTop += Os;
                        let qa = ge.scrollTop - Za;
                        Re -= qa, ze -= qa;
                      }
                      if (vn) break;
                      ge = Nk(ge);
                    }
                  }
                }
                t4 = !0;
              }
            } else o !== null && t1(t, Ct, Lt) && L.removeAllRanges();
          }
        }
        e: {
          let He = t._blockCursorElement;
          if (xt(a) && a.isCollapsed() && a.anchor.type === "element" && i.contains(document.activeElement)) {
            let Ct = a.anchor, Lt = Ct.getNode(), Be = Ct.offset, Ie = Lt.getChildrenSize(), ae = !1, Ue = null;
            if (Be === Ie) {
              let qt = Lt.getChildAtIndex(Be - 1);
              r3(qt) && (ae = !0);
            } else {
              let qt = Lt.getChildAtIndex(Be);
              if (r3(qt)) {
                let Xn = qt.getPreviousSibling();
                (Xn === null || r3(Xn)) && (ae = !0, Ue = t.getElementByKey(qt.__key));
              }
            }
            if (ae) {
              let qt = t.getElementByKey(Lt.__key);
              if (He === null) {
                let Xn = t._config.theme, Dt = document.createElement("div");
                Dt.contentEditable = "false", Dt.setAttribute("data-lexical-cursor", "true");
                let vn = Xn.blockCursor;
                if (vn !== void 0) {
                  if (typeof vn == "string") {
                    let Os = vn.split(" ");
                    vn = Xn.blockCursor = Os;
                  }
                  vn !== void 0 && Dt.classList.add(...vn);
                }
                t._blockCursorElement = He = Dt;
              }
              i.style.caretColor = "transparent", Ue === null ? qt.appendChild(He) : qt.insertBefore(He, Ue);
              break e;
            }
          }
          He !== null && qS(He, t, i);
        }
        m !== null && m.observe(i, lM);
      } finally {
        Ui = d, Qi = u;
      }
    }
    if (g !== null) {
      var De = g;
      let He = Array.from(t._listeners.mutation), Ct = He.length;
      for (let Lt = 0; Lt < Ct; Lt++) {
        let [Be, Ie] = He[Lt], ae = De.get(Ie);
        ae !== void 0 && Be(ae, { dirtyLeaves: S, prevEditorState: s, updateTags: M });
      }
    }
    xt(a) || a === null || o !== null && o.is(a) || t.dispatchCommand(Tk, void 0);
    var st = t._pendingDecorators;
    st !== null && (t._decorators = st, t._pendingDecorators = null, _g("decorator", t, !0, st));
    var It = Z$(e || s), At = Z$(n);
    if (It !== At && _g("textcontent", t, !0, At), _g("update", t, !0, { dirtyElements: C, dirtyLeaves: S, editorState: n, normalizedNodes: E, prevEditorState: e || s, tags: M }), t._deferred = [], $.length !== 0) {
      let He = t._updating;
      t._updating = !0;
      try {
        for (let Ct = 0; Ct < $.length; Ct++) $[Ct]();
      } finally {
        t._updating = He;
      }
    }
    var Ut = t._updates;
    if (Ut.length !== 0) {
      let He = Ut.shift();
      if (He) {
        let [Ct, Lt] = He;
        HF(t, Ct, Lt);
      }
    }
  }
}
function _g(t, e, n, ...i) {
  let r = e._updating;
  e._updating = n;
  try {
    let s = Array.from(e._listeners[t]);
    for (t = 0; t < s.length; t++) s[t].apply(null, i);
  } finally {
    e._updating = r;
  }
}
function Pe(t, e, n) {
  if (t._updating === !1 || Ui !== t) {
    let s = !1;
    return t.update(() => {
      s = Pe(t, e, n);
    }), s;
  }
  let i = r5(t);
  for (let s = 4; 0 <= s; s--) for (let o = 0; o < i.length; o++) {
    var r = i[o]._commands.get(e);
    if (r !== void 0 && (r = r[s], r !== void 0)) {
      r = Array.from(r);
      let a = r.length;
      for (let l = 0; l < a; l++) if (r[l](n, t) === !0) return !0;
    }
  }
  return !1;
}
function fM(t, e) {
  let n = t._updates;
  for (e = e || !1; n.length !== 0; ) {
    var i = n.shift();
    if (i) {
      let [r, s] = i, o;
      s !== void 0 && (i = s.onUpdate, o = s.tag, s.skipTransforms && (e = !0), i && t._deferred.push(i), o && t._updateTags.add(o)), r();
    }
  }
  return e;
}
function HF(t, e, n) {
  let i = t._updateTags;
  var r, s = r = !1;
  if (n !== void 0) {
    var o = n.onUpdate;
    r = n.tag, r != null && i.add(r), r = n.skipTransforms || !1, s = n.discrete || !1;
  }
  o && t._deferred.push(o), n = t._editorState, o = t._pendingEditorState;
  let a = !1;
  (o === null || o._readOnly) && (o = t._pendingEditorState = new Fk(new Map((o || n)._nodeMap)), a = !0), o._flushSync = s, s = Qi;
  let l = ws, u = Ui, f = t._updating;
  Qi = o, ws = !1, t._updating = !0, Ui = t;
  try {
    a && (t._headless ? n._selection !== null && (o._selection = n._selection.clone()) : o._selection = oie(t));
    let d = t._compositionKey;
    e(), r = fM(t, r), aie(o, t), t._dirtyType !== 0 && (r ? cie(o, t) : fie(o, t), fM(t), Wne(n, o, t._dirtyLeaves, t._dirtyElements)), d !== t._compositionKey && (o._flushSync = !0);
    let h = o._selection;
    if (xt(h)) {
      let m = o._nodeMap, g = h.focus.key;
      m.get(h.anchor.key) !== void 0 && m.get(g) !== void 0 || Le(19);
    } else r1(h) && h._nodes.size === 0 && (o._selection = null);
  } catch (d) {
    d instanceof Error && t._onError(d), t._pendingEditorState = n, t._dirtyType = 2, t._cloneNotNeeded.clear(), t._dirtyLeaves = /* @__PURE__ */ new Set(), t._dirtyElements.clear(), af(t);
    return;
  } finally {
    Qi = s, ws = l, Ui = u, t._updating = f, Gg = 0;
  }
  t._dirtyType !== 0 || die(o, t) ? o._flushSync ? (o._flushSync = !1, af(t)) : a && Fne(() => {
    af(t);
  }) : (o._flushSync = !1, a && (i.clear(), t._deferred = [], t._pendingEditorState = null));
}
function qs(t, e, n) {
  t._updating ? t._updates.push([e, n]) : HF(t, e, n);
}
class QF extends Ik {
  constructor(e) {
    super(e);
  }
  decorate() {
    Le(47);
  }
  isIsolated() {
    return !1;
  }
  isInline() {
    return !0;
  }
  isKeyboardSelectable() {
    return !0;
  }
}
function ii(t) {
  return t instanceof QF;
}
class jk extends Ik {
  constructor(e) {
    super(e), this.__last = this.__first = null, this.__indent = this.__format = this.__size = 0, this.__dir = null;
  }
  getFormat() {
    return this.getLatest().__format;
  }
  getFormatType() {
    let e = this.getFormat();
    return Dne[e] || "";
  }
  getIndent() {
    return this.getLatest().__indent;
  }
  getChildren() {
    let e = [], n = this.getFirstChild();
    for (; n !== null; ) e.push(n), n = n.getNextSibling();
    return e;
  }
  getChildrenKeys() {
    let e = [], n = this.getFirstChild();
    for (; n !== null; ) e.push(n.__key), n = n.getNextSibling();
    return e;
  }
  getChildrenSize() {
    return this.getLatest().__size;
  }
  isEmpty() {
    return this.getChildrenSize() === 0;
  }
  isDirty() {
    let e = Ln()._dirtyElements;
    return e !== null && e.has(this.__key);
  }
  isLastChild() {
    let e = this.getLatest(), n = this.getParentOrThrow().getLastChild();
    return n !== null && n.is(e);
  }
  getAllTextNodes() {
    let e = [], n = this.getFirstChild();
    for (; n !== null; ) {
      if (Ze(n) && e.push(n), xe(n)) {
        let i = n.getAllTextNodes();
        e.push(...i);
      }
      n = n.getNextSibling();
    }
    return e;
  }
  getFirstDescendant() {
    let e = this.getFirstChild();
    for (; e !== null; ) {
      if (xe(e)) {
        let n = e.getFirstChild();
        if (n !== null) {
          e = n;
          continue;
        }
      }
      break;
    }
    return e;
  }
  getLastDescendant() {
    let e = this.getLastChild();
    for (; e !== null; ) {
      if (xe(e)) {
        let n = e.getLastChild();
        if (n !== null) {
          e = n;
          continue;
        }
      }
      break;
    }
    return e;
  }
  getDescendantByIndex(e) {
    let n = this.getChildren(), i = n.length;
    return e >= i ? (e = n[i - 1], xe(e) && e.getLastDescendant() || e || null) : (e = n[e], xe(e) && e.getFirstDescendant() || e || null);
  }
  getFirstChild() {
    let e = this.getLatest().__first;
    return e === null ? null : Tr(e);
  }
  getFirstChildOrThrow() {
    let e = this.getFirstChild();
    return e === null && Le(45, this.__key), e;
  }
  getLastChild() {
    let e = this.getLatest().__last;
    return e === null ? null : Tr(e);
  }
  getLastChildOrThrow() {
    let e = this.getLastChild();
    return e === null && Le(96, this.__key), e;
  }
  getChildAtIndex(e) {
    var n = this.getChildrenSize();
    let i;
    if (e < n / 2) {
      for (i = this.getFirstChild(), n = 0; i !== null && n <= e; ) {
        if (n === e) return i;
        i = i.getNextSibling(), n++;
      }
      return null;
    }
    for (i = this.getLastChild(), --n; i !== null && n >= e; ) {
      if (n === e) return i;
      i = i.getPreviousSibling(), n--;
    }
    return null;
  }
  getTextContent() {
    let e = "", n = this.getChildren(), i = n.length;
    for (let r = 0; r < i; r++) {
      let s = n[r];
      e += s.getTextContent(), xe(s) && r !== i - 1 && !s.isInline() && (e += `

`);
    }
    return e;
  }
  getTextContentSize() {
    let e = 0, n = this.getChildren(), i = n.length;
    for (let r = 0; r < i; r++) {
      let s = n[r];
      e += s.getTextContentSize(), xe(s) && r !== i - 1 && !s.isInline() && (e += 2);
    }
    return e;
  }
  getDirection() {
    return this.getLatest().__dir;
  }
  hasFormat(e) {
    return e !== "" ? (e = W$[e], (this.getFormat() & e) !== 0) : !1;
  }
  select(e, n) {
    qr();
    let i = pn(), r = e, s = n;
    var o = this.getChildrenSize();
    if (!this.canBeEmpty()) {
      if (e === 0 && n === 0) {
        if (e = this.getFirstChild(), Ze(e) || xe(e)) return e.select(0, 0);
      } else if (!(e !== void 0 && e !== o || n !== void 0 && n !== o) && (e = this.getLastChild(), Ze(e) || xe(e))) return e.select();
    }
    if (r === void 0 && (r = o), s === void 0 && (s = o), o = this.__key, xt(i)) i.anchor.set(o, r, "element"), i.focus.set(o, s, "element"), i.dirty = !0;
    else return WF(o, r, o, s, "element", "element");
    return i;
  }
  selectStart() {
    let e = this.getFirstDescendant();
    return e ? e.selectStart() : this.select();
  }
  selectEnd() {
    let e = this.getLastDescendant();
    return e ? e.selectEnd() : this.select();
  }
  clear() {
    let e = this.getWritable();
    return this.getChildren().forEach((n) => n.remove()), e;
  }
  append(...e) {
    return this.splice(
      this.getChildrenSize(),
      0,
      e
    );
  }
  setDirection(e) {
    let n = this.getWritable();
    return n.__dir = e, n;
  }
  setFormat(e) {
    return this.getWritable().__format = e !== "" ? W$[e] : 0, this;
  }
  setIndent(e) {
    return this.getWritable().__indent = e, this;
  }
  splice(e, n, i) {
    let r = i.length, s = this.getChildrenSize(), o = this.getWritable(), a = o.__key;
    var l = [], u = [];
    let f = this.getChildAtIndex(e + n), d = null, h = s - n + r;
    if (e !== 0) if (e === s) d = this.getLastChild();
    else {
      var m = this.getChildAtIndex(e);
      m !== null && (d = m.getPreviousSibling());
    }
    if (0 < n) {
      var g = d === null ? this.getFirstChild() : d.getNextSibling();
      for (m = 0; m < n; m++) {
        g === null && Le(100);
        var w = g.getNextSibling(), x = g.__key;
        g = g.getWritable(), of(g), u.push(x), g = w;
      }
    }
    for (m = d, w = 0; w < r; w++) {
      x = i[w], m !== null && x.is(m) && (d = m = m.getPreviousSibling()), g = x.getWritable(), g.__parent === a && h--, of(g);
      let _ = x.__key;
      m === null ? (o.__first = _, g.__prev = null) : (m = m.getWritable(), m.__next = _, g.__prev = m.__key), x.__key === a && Le(76), g.__parent = a, l.push(_), m = x;
    }
    if (e + n === s ? m !== null && (m.getWritable().__next = null, o.__last = m.__key) : f !== null && (e = f.getWritable(), m !== null ? (n = m.getWritable(), e.__prev = m.__key, n.__next = f.__key) : e.__prev = null), o.__size = h, u.length && (e = pn(), xt(e))) {
      u = new Set(u), l = new Set(l);
      let { anchor: _, focus: S } = e;
      dM(_, u, l) && Gy(_, _.getNode(), this, d, f), dM(S, u, l) && Gy(S, S.getNode(), this, d, f), h !== 0 || this.canBeEmpty() || Wu(this) || this.remove();
    }
    return o;
  }
  exportJSON() {
    return { children: [], direction: this.getDirection(), format: this.getFormatType(), indent: this.getIndent(), type: "element", version: 1 };
  }
  insertNewAfter() {
    return null;
  }
  canIndent() {
    return !0;
  }
  collapseAtStart() {
    return !1;
  }
  excludeFromCopy() {
    return !1;
  }
  canExtractContents() {
    return !0;
  }
  canReplaceWith() {
    return !0;
  }
  canInsertAfter() {
    return !0;
  }
  canBeEmpty() {
    return !0;
  }
  canInsertTextBefore() {
    return !0;
  }
  canInsertTextAfter() {
    return !0;
  }
  isInline() {
    return !1;
  }
  isShadowRoot() {
    return !1;
  }
  canMergeWith() {
    return !1;
  }
  extractWithChild() {
    return !1;
  }
}
function xe(t) {
  return t instanceof jk;
}
function dM(t, e, n) {
  for (t = t.getNode(); t; ) {
    let i = t.__key;
    if (e.has(i) && !n.has(i)) return !0;
    t = t.getParent();
  }
  return !1;
}
class Xh extends jk {
  static getType() {
    return "root";
  }
  static clone() {
    return new Xh();
  }
  constructor() {
    super("root"), this.__cachedText = null;
  }
  getTopLevelElementOrThrow() {
    Le(51);
  }
  getTextContent() {
    let e = this.__cachedText;
    return !Vh() && Ln()._dirtyType !== 0 || e === null ? super.getTextContent() : e;
  }
  remove() {
    Le(52);
  }
  replace() {
    Le(53);
  }
  insertBefore() {
    Le(54);
  }
  insertAfter() {
    Le(55);
  }
  updateDOM() {
    return !1;
  }
  append(...e) {
    for (let n = 0; n < e.length; n++) {
      let i = e[n];
      xe(i) || ii(i) || Le(56);
    }
    return super.append(...e);
  }
  static importJSON(e) {
    let n = Zs();
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  exportJSON() {
    return { children: [], direction: this.getDirection(), format: this.getFormatType(), indent: this.getIndent(), type: "root", version: 1 };
  }
  collapseAtStart() {
    return !0;
  }
}
function Ws(t) {
  return t instanceof Xh;
}
function die(t, e) {
  if (e = e.getEditorState()._selection, t = t._selection, t !== null) {
    if (t.dirty || !t.is(e)) return !0;
  } else if (e !== null) return !0;
  return !1;
}
function f5() {
  return new Fk(/* @__PURE__ */ new Map([["root", new Xh()]]));
}
function UF(t) {
  let e = t.exportJSON();
  var n = t.constructor;
  if (e.type !== n.getType() && Le(130, n.name), xe(t)) {
    let i = e.children;
    for (Array.isArray(i) || Le(59, n.name), t = t.getChildren(), n = 0; n < t.length; n++) {
      let r = UF(t[n]);
      i.push(r);
    }
  }
  return e;
}
class Fk {
  constructor(e, n) {
    this._nodeMap = e, this._selection = n || null, this._readOnly = this._flushSync = !1;
  }
  isEmpty() {
    return this._nodeMap.size === 1 && this._selection === null;
  }
  read(e) {
    return cM(this, e);
  }
  clone(e) {
    return e = new Fk(this._nodeMap, e === void 0 ? this._selection : e), e._readOnly = !0, e;
  }
  toJSON() {
    return cM(this, () => ({ root: UF(Zs()) }));
  }
}
class Gh extends jk {
  static getType() {
    return "paragraph";
  }
  static clone(e) {
    return new Gh(e.__key);
  }
  createDOM(e) {
    let n = document.createElement("p");
    return e = wg(e.theme, "paragraph"), e !== void 0 && n.classList.add(...e), n;
  }
  updateDOM() {
    return !1;
  }
  static importDOM() {
    return { p: () => ({ conversion: hie, priority: 0 }) };
  }
  exportDOM(e) {
    if ({ element: e } = super.exportDOM(e), e && Dk(e)) {
      this.isEmpty() && e.append(document.createElement("br"));
      var n = this.getFormatType();
      e.style.textAlign = n, (n = this.getDirection()) && (e.dir = n), n = this.getIndent(), 0 < n && (e.style.textIndent = `${20 * n}px`);
    }
    return { element: e };
  }
  static importJSON(e) {
    let n = kl();
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  exportJSON() {
    return { ...super.exportJSON(), type: "paragraph", version: 1 };
  }
  insertNewAfter(e, n) {
    e = kl();
    let i = this.getDirection();
    return e.setDirection(i), this.insertAfter(e, n), e;
  }
  collapseAtStart() {
    let e = this.getChildren();
    if (e.length === 0 || Ze(e[0]) && e[0].getTextContent().trim() === "") {
      if (this.getNextSibling() !== null) return this.selectNext(), this.remove(), !0;
      if (this.getPreviousSibling() !== null) return this.selectPrevious(), this.remove(), !0;
    }
    return !1;
  }
}
function hie(t) {
  let e = kl();
  return t.style && (e.setFormat(t.style.textAlign), t = parseInt(t.style.textIndent, 10) / 20, 0 < t && e.setIndent(t)), { node: e };
}
function kl() {
  return i1(new Gh());
}
function ZF(t, e, n, i) {
  let r = t._keyToDOMMap;
  r.clear(), t._editorState = f5(), t._pendingEditorState = i, t._compositionKey = null, t._dirtyType = 0, t._cloneNotNeeded.clear(), t._dirtyLeaves = /* @__PURE__ */ new Set(), t._dirtyElements.clear(), t._normalizedNodes = /* @__PURE__ */ new Set(), t._updateTags = /* @__PURE__ */ new Set(), t._updates = [], t._blockCursorElement = null, i = t._observer, i !== null && (i.disconnect(), t._observer = null), e !== null && (e.textContent = ""), n !== null && (n.textContent = "", r.set("root", n));
}
function pie(t, e) {
  let n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), r = (s) => {
    Object.keys(s).forEach((o) => {
      let a = n.get(o);
      a === void 0 && (a = [], n.set(o, a)), a.push(s[o]);
    });
  };
  return t.forEach((s) => {
    s = s.klass.importDOM != null ? s.klass.importDOM.bind(s.klass) : null, s == null || i.has(s) || (i.add(s), s = s(), s !== null && r(s));
  }), e && r(e), n;
}
class mie {
  constructor(e, n, i, r, s, o, a) {
    this._parentEditor = n, this._rootElement = null, this._editorState = e, this._compositionKey = this._pendingEditorState = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = r, this._nodes = i, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = 0, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = vF(), this._onError = s, this._htmlConversions = o, this._editable = a, this._headless = n !== null && n._headless, this._blockCursorElement = this._window = null;
  }
  isComposing() {
    return this._compositionKey != null;
  }
  registerUpdateListener(e) {
    let n = this._listeners.update;
    return n.add(e), () => {
      n.delete(e);
    };
  }
  registerEditableListener(e) {
    let n = this._listeners.editable;
    return n.add(e), () => {
      n.delete(e);
    };
  }
  registerDecoratorListener(e) {
    let n = this._listeners.decorator;
    return n.add(e), () => {
      n.delete(e);
    };
  }
  registerTextContentListener(e) {
    let n = this._listeners.textcontent;
    return n.add(e), () => {
      n.delete(e);
    };
  }
  registerRootListener(e) {
    let n = this._listeners.root;
    return e(this._rootElement, null), n.add(e), () => {
      e(null, this._rootElement), n.delete(e);
    };
  }
  registerCommand(e, n, i) {
    i === void 0 && Le(35);
    let r = this._commands;
    r.has(e) || r.set(e, [/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()]);
    let s = r.get(e);
    s === void 0 && Le(36, String(e));
    let o = s[i];
    return o.add(n), () => {
      o.delete(n), s.every((a) => a.size === 0) && r.delete(e);
    };
  }
  registerMutationListener(e, n) {
    this._nodes.get(e.getType()) === void 0 && Le(37, e.name);
    let i = this._listeners.mutation;
    return i.set(n, e), () => {
      i.delete(n);
    };
  }
  registerNodeTransformToKlass(e, n) {
    var i = e.getType();
    return i = this._nodes.get(i), i === void 0 && Le(37, e.name), i.transforms.add(n), i;
  }
  registerNodeTransform(e, n) {
    var i = this.registerNodeTransformToKlass(e, n);
    let r = [i];
    return i = i.replaceWithKlass, i != null && (i = this.registerNodeTransformToKlass(i, n), r.push(i)), Bne(this, e.getType()), () => {
      r.forEach((s) => s.transforms.delete(n));
    };
  }
  hasNode(e) {
    return this._nodes.has(e.getType());
  }
  hasNodes(e) {
    return e.every(this.hasNode.bind(this));
  }
  dispatchCommand(e, n) {
    return Pe(this, e, n);
  }
  getDecorators() {
    return this._decorators;
  }
  getRootElement() {
    return this._rootElement;
  }
  getKey() {
    return this._key;
  }
  setRootElement(e) {
    let n = this._rootElement;
    if (e !== n) {
      let o = wg(this._config.theme, "root");
      var i = this._pendingEditorState || this._editorState;
      if (this._rootElement = e, ZF(this, n, e, i), n !== null) {
        if (!this._config.disableEvents) {
          kg !== 0 && (kg--, kg === 0 && n.ownerDocument.removeEventListener("selectionchange", PF));
          var r = n.__lexicalEditor;
          if (r != null) {
            if (r._parentEditor !== null) {
              var s = r5(r);
              s = s[s.length - 1]._key, ah.get(s) === r && ah.delete(s);
            } else ah.delete(r._key);
            n.__lexicalEditor = null;
          }
          for (r = DF(n), s = 0; s < r.length; s++) r[s]();
          n.__lexicalEventHandles = [];
        }
        o != null && n.classList.remove(...o);
      }
      e !== null ? (i = (i = e.ownerDocument) && i.defaultView || null, r = e.style, r.userSelect = "text", r.whiteSpace = "pre-wrap", r.wordBreak = "break-word", e.setAttribute(
        "data-lexical-editor",
        "true"
      ), this._window = i, this._dirtyType = 2, cF(this), this._updateTags.add("history-merge"), af(this), this._config.disableEvents || Gne(e, this), o != null && e.classList.add(...o)) : (this._editorState = i, this._window = this._pendingEditorState = null), _g("root", this, !1, e, n);
    }
  }
  getElementByKey(e) {
    return this._keyToDOMMap.get(e) || null;
  }
  getEditorState() {
    return this._editorState;
  }
  setEditorState(e, n) {
    e.isEmpty() && Le(38), uF(this);
    let i = this._pendingEditorState, r = this._updateTags;
    n = n !== void 0 ? n.tag : null, i === null || i.isEmpty() || (n != null && r.add(n), af(this)), this._pendingEditorState = e, this._dirtyType = 2, this._dirtyElements.set("root", !1), this._compositionKey = null, n != null && r.add(n), af(this);
  }
  parseEditorState(e, n) {
    e = typeof e == "string" ? JSON.parse(e) : e;
    let i = f5(), r = Qi, s = ws, o = Ui, a = this._dirtyElements, l = this._dirtyLeaves, u = this._cloneNotNeeded, f = this._dirtyType;
    this._dirtyElements = /* @__PURE__ */ new Map(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyType = 0, Qi = i, ws = !1, Ui = this;
    try {
      c5(e.root, this._nodes), n && n(), i._readOnly = !0;
    } catch (d) {
      d instanceof Error && this._onError(d);
    } finally {
      this._dirtyElements = a, this._dirtyLeaves = l, this._cloneNotNeeded = u, this._dirtyType = f, Qi = r, ws = s, Ui = o;
    }
    return i;
  }
  update(e, n) {
    qs(this, e, n);
  }
  focus(e, n = {}) {
    let i = this._rootElement;
    i !== null && (i.setAttribute("autocapitalize", "off"), qs(this, () => {
      let r = pn(), s = Zs();
      r !== null ? r.dirty = !0 : s.getChildrenSize() !== 0 && (n.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd());
    }, { onUpdate: () => {
      i.removeAttribute("autocapitalize"), e && e();
    }, tag: "focus" }), this._pendingEditorState === null && i.removeAttribute("autocapitalize"));
  }
  blur() {
    var e = this._rootElement;
    e !== null && e.blur(), e = La(this._window), e !== null && e.removeAllRanges();
  }
  isEditable() {
    return this._editable;
  }
  setEditable(e) {
    this._editable !== e && (this._editable = e, _g("editable", this, !0, e));
  }
  toJSON() {
    return { editorState: this._editorState.toJSON() };
  }
}
me.$addUpdateTag = function(t) {
  qr(), Ln()._updateTags.add(t);
};
me.$applyNodeReplacement = i1;
me.$copyNode = wF;
me.$createLineBreakNode = Sh;
me.$createNodeSelection = o4;
me.$createParagraphNode = kl;
me.$createPoint = Ro;
me.$createRangeSelection = function() {
  let t = Ro("root", 0, "element"), e = Ro("root", 0, "element");
  return new qh(t, e, 0, "");
};
me.$createTabNode = Rk;
me.$createTextNode = rr;
me.$getAdjacentNode = ZS;
me.$getCharacterOffsets = s4;
me.$getEditor = function() {
  return Ln();
};
me.$getNearestNodeFromDOMNode = n1;
me.$getNearestRootOrShadowRoot = yF;
me.$getNodeByKey = Tr;
me.$getPreviousSelection = Yh;
me.$getRoot = Zs;
me.$getSelection = pn;
me.$getTextContent = function() {
  let t = pn();
  return t === null ? "" : t.getTextContent();
};
me.$hasAncestor = Yy;
me.$hasUpdateTag = function(t) {
  return Ln()._updateTags.has(t);
};
me.$insertNodes = function(t) {
  let e = pn() || Yh();
  e === null && (e = Zs().selectEnd()), e.insertNodes(t);
};
me.$isBlockElementNode = function(t) {
  return xe(t) && !t.isInline();
};
me.$isDecoratorNode = ii;
me.$isElementNode = xe;
me.$isInlineElementOrDecoratorNode = function(t) {
  return xe(t) && t.isInline() || ii(t) && t.isInline();
};
me.$isLeafNode = function(t) {
  return Ze(t) || hf(t) || ii(t);
};
me.$isLineBreakNode = hf;
me.$isNodeSelection = r1;
me.$isParagraphNode = function(t) {
  return t instanceof Gh;
};
me.$isRangeSelection = xt;
me.$isRootNode = Ws;
me.$isRootOrShadowRoot = Wu;
me.$isTabNode = LF;
me.$isTextNode = Ze;
me.$nodesOfType = function(t) {
  var e = Ra();
  let n = e._readOnly, i = t.getType();
  e = e._nodeMap;
  let r = [];
  for (let [, s] of e) s instanceof t && s.__type === i && (n || s.isAttached()) && r.push(s);
  return r;
};
me.$normalizeSelection__EXPERIMENTAL = dF;
me.$parseSerializedNode = function(t) {
  return c5(t, Ln()._nodes);
};
me.$selectAll = function() {
  var t = Zs();
  t = t.select(0, t.getChildrenSize()), $a(dF(t));
};
me.$setCompositionKey = Pi;
me.$setSelection = $a;
me.$splitNode = function(t, e) {
  let n = t.getChildAtIndex(e);
  n == null && (n = t), Wu(t) && Le(102);
  let i = (o) => {
    const a = o.getParentOrThrow(), l = Wu(a), u = o !== n || l ? wF(o) : o;
    if (l) return xe(o) && xe(u) || Le(133), o.insertAfter(u), [o, u, u];
    const [f, d, h] = i(a);
    return o = o.getNextSiblings(), h.append(u, ...o), [f, d, u];
  }, [r, s] = i(n);
  return [r, s];
};
me.BLUR_COMMAND = oF;
me.CAN_REDO_COMMAND = {};
me.CAN_UNDO_COMMAND = {};
me.CLEAR_EDITOR_COMMAND = {};
me.CLEAR_HISTORY_COMMAND = {};
me.CLICK_COMMAND = Wj;
me.COMMAND_PRIORITY_CRITICAL = 4;
me.COMMAND_PRIORITY_EDITOR = 0;
me.COMMAND_PRIORITY_HIGH = 3;
me.COMMAND_PRIORITY_LOW = 1;
me.COMMAND_PRIORITY_NORMAL = 2;
me.CONTROLLED_TEXT_INSERTION_COMMAND = oh;
me.COPY_COMMAND = G6;
me.CUT_COMMAND = K6;
me.DELETE_CHARACTER_COMMAND = sh;
me.DELETE_LINE_COMMAND = qg;
me.DELETE_WORD_COMMAND = Zg;
me.DRAGEND_COMMAND = rF;
me.DRAGOVER_COMMAND = iF;
me.DRAGSTART_COMMAND = nF;
me.DROP_COMMAND = tF;
me.DecoratorNode = QF;
me.ElementNode = jk;
me.FOCUS_COMMAND = sF;
me.FORMAT_ELEMENT_COMMAND = {};
me.FORMAT_TEXT_COMMAND = ku;
me.INDENT_CONTENT_COMMAND = {};
me.INSERT_LINE_BREAK_COMMAND = yg;
me.INSERT_PARAGRAPH_COMMAND = BS;
me.INSERT_TAB_COMMAND = {};
me.KEY_ARROW_DOWN_COMMAND = Vj;
me.KEY_ARROW_LEFT_COMMAND = Zj;
me.KEY_ARROW_RIGHT_COMMAND = Qj;
me.KEY_ARROW_UP_COMMAND = Yj;
me.KEY_BACKSPACE_COMMAND = Gj;
me.KEY_DELETE_COMMAND = Jj;
me.KEY_DOWN_COMMAND = Hj;
me.KEY_ENTER_COMMAND = Wy;
me.KEY_ESCAPE_COMMAND = Kj;
me.KEY_MODIFIER_COMMAND = aF;
me.KEY_SPACE_COMMAND = Xj;
me.KEY_TAB_COMMAND = eF;
me.LineBreakNode = Zh;
me.MOVE_TO_END = Uj;
me.MOVE_TO_START = qj;
me.OUTDENT_CONTENT_COMMAND = {};
me.PASTE_COMMAND = Y6;
me.ParagraphNode = Gh;
me.REDO_COMMAND = X6;
me.REMOVE_TEXT_COMMAND = zS;
me.RootNode = Xh;
me.SELECTION_CHANGE_COMMAND = Tk;
me.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND = {};
me.SELECT_ALL_COMMAND = WS;
me.TabNode = Lk;
me.TextNode = Mf;
me.UNDO_COMMAND = V6;
me.createCommand = function() {
  return {};
};
me.createEditor = function(t) {
  var e = t || {}, n = Ui, i = e.theme || {};
  let r = t === void 0 ? n : e.parentEditor || null, s = e.disableEvents || !1, o = f5(), a = e.namespace || (r !== null ? r._config.namespace : vF()), l = e.editorState, u = [Xh, Mf, Zh, Lk, Gh, ...e.nodes || []], { onError: f, html: d } = e;
  if (e = e.editable !== void 0 ? e.editable : !0, t === void 0 && n !== null) t = n._nodes;
  else for (t = /* @__PURE__ */ new Map(), n = 0; n < u.length; n++) {
    let m = u[n], g = null;
    var h = null;
    typeof m != "function" && (h = m, m = h.replace, g = h.with, h = h.withKlass || null);
    let w = m.getType(), x = m.transform(), _ = /* @__PURE__ */ new Set();
    x !== null && _.add(x), t.set(w, { exportDOM: d && d.export ? d.export.get(m) : void 0, klass: m, replace: g, replaceWithKlass: h, transforms: _ });
  }
  return i = new mie(o, r, t, { disableEvents: s, namespace: a, theme: i }, f || console.error, pie(t, d ? d.import : void 0), e), l !== void 0 && (i._pendingEditorState = l, i._dirtyType = 2), i;
};
me.getNearestEditorFromDOMNode = i5;
me.isCurrentlyReadOnlyMode = Vh;
me.isHTMLAnchorElement = function(t) {
  return Dk(t) && t.tagName === "A";
};
me.isHTMLElement = Dk;
me.isSelectionCapturedInDecoratorInput = n5;
me.isSelectionWithinEditor = t1;
const gie = me;
var N = gie, qF = { exports: {} }, vie = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", bie = vie, yie = bie;
function YF() {
}
function VF() {
}
VF.resetWarningCache = YF;
var wie = function() {
  function t(i, r, s, o, a, l) {
    if (l !== yie) {
      var u = new Error(
        "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
      );
      throw u.name = "Invariant Violation", u;
    }
  }
  t.isRequired = t;
  function e() {
    return t;
  }
  var n = {
    array: t,
    bigint: t,
    bool: t,
    func: t,
    number: t,
    object: t,
    string: t,
    symbol: t,
    any: t,
    arrayOf: e,
    element: t,
    elementType: t,
    instanceOf: e,
    node: t,
    objectOf: e,
    oneOf: e,
    oneOfType: e,
    shape: e,
    exact: e,
    checkPropTypes: VF,
    resetWarningCache: YF
  };
  return n.PropTypes = n, n;
};
qF.exports = wie();
var kie = qF.exports;
const A = /* @__PURE__ */ Gs(kie), xie = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M9 20.4214C9.93991 20.785 10.9427 21 12 21C17.1812 21 21.0543 15.8362 22.6273 13.3309C22.8699 12.9407 23 12.4761 23 12C23 11.5239 22.8699 11.0593 22.6273 10.6691C22.2278 10.0328 21.68 9.22509 21 8.37401M5.63183 18.3627C3.66995 16.7105 2.20181 14.6514 1.37268 13.3309C1.1301 12.9407 1 12.4761 1 12C1 11.5239 1.1301 11.0593 1.37268 10.6691C2.94573 8.16375 6.81884 3 12 3C14.4123 3 16.5411 4.11939 18.2862 5.56867", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M17 12C17 14.7614 14.7614 17 12 17M8.42928 15.5C7.54516 14.5981 7 13.3627 7 12C7 9.23858 9.23858 7 12 7C13.3627 7 14.5981 7.54516 15.5 8.42928", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M2 22L22 2", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), _ie = {
  wide: [
    "w-[calc(75vw-var(--kg-breakout-adjustment-with-fallback)+2px)] mx-[calc(50%-(50vw-var(--kg-breakout-adjustment-with-fallback))-.8rem)] min-w-[calc(100%+3.6rem)] translate-x-[calc(50vw-50%+.8rem-var(--kg-breakout-adjustment-with-fallback))]",
    "md:min-w-[calc(100%+10rem)]",
    "lg:min-w-[calc(100%+18rem)]"
  ].join(" "),
  full: "inset-x-[-1px] mx-[calc(50%-50vw)] w-[calc(100vw+2px)] lg:mx-[calc(50%-50vw+(var(--kg-breakout-adjustment-with-fallback)/2))] lg:w-[calc(100vw-var(--kg-breakout-adjustment-with-fallback)+2px)]"
}, hM = {
  top: ".6rem"
}, d5 = j.forwardRef(({
  cardType: t,
  cardWidth: e = "regular",
  feature: n,
  IndicatorIcon: i,
  indicatorPosition: r = hM,
  isDragging: s,
  isEditing: o,
  isSelected: a,
  isVisibilityActive: l,
  onIndicatorClick: u,
  wrapperStyle: f,
  children: d,
  ...h
}, m) => {
  const g = () => f === "wide" && (o || a) ? "!-mx-3 !px-3" : f === "code-card" && o ? "-mx-6" : f === "wide" ? "hover:-mx-3 hover:px-3" : "border", w = [
    "relative border-transparent caret-grey-800",
    a ? "z-20" : "z-10",
    // ensure setting panels sit above other cards
    a && !s ? "shadow-[0_0_0_2px] shadow-green" : "",
    !a && !s ? "hover:shadow-[0_0_0_1px] hover:shadow-green" : "",
    _ie[e] || "",
    g()
  ].join(" "), x = {
    ...hM,
    ...r || {},
    ...t === "call-to-action" && { top: "1.4rem" }
  };
  let _;
  return l ? _ = /* @__PURE__ */ y.jsx("div", { className: "sticky top-0 lg:top-8", children: /* @__PURE__ */ y.jsx(
    xie,
    {
      "aria-label": "Card is hidden for select audiences",
      className: "absolute left-[-6rem] size-5 cursor-pointer text-grey",
      "data-testid": "visibility-indicator",
      style: {
        left: x.left,
        top: x.top
      },
      onClick: u
    }
  ) }) : i && (_ = /* @__PURE__ */ y.jsx("div", { className: "sticky top-0 lg:top-8", children: /* @__PURE__ */ y.jsx(
    i,
    {
      "aria-label": `${t} indicator`,
      className: "absolute left-[-6rem] size-5 text-grey",
      style: {
        left: x.left,
        top: x.top
      }
    }
  ) })), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    _,
    /* @__PURE__ */ y.jsx(
      "div",
      {
        ref: m,
        className: w,
        "data-kg-card": t,
        "data-kg-card-editing": o,
        "data-kg-card-selected": a,
        ...h,
        children: d
      }
    )
  ] });
});
d5.displayName = "CardWrapper";
d5.propTypes = {
  isSelected: A.bool,
  isEditing: A.bool,
  cardWidth: A.oneOf(["regular", "wide", "full"]),
  icon: A.string,
  indicatorPosition: A.shape({
    left: A.string,
    top: A.string
  })
};
function Oie(t) {
  return t.replace(/<code\b[^>]*>((.*?){.*?}(.*?))<\/code>/gi, "$1");
}
function mi(t = "", e = {}) {
  const i = Object.assign({}, {}, e);
  if (!i.createDocument) {
    const s = typeof DOMParser < "u" && DOMParser || typeof window < "u" && window.DOMParser;
    if (!s)
      throw new Error("cleanBasicHtml() must be passed a `createDocument` function as an option when used in a non-browser environment");
    i.createDocument = function(o) {
      return new s().parseFromString(o, "text/html");
    };
  }
  let r = t;
  if ((!i.allowBr || r === "<br>") && (r = r.replace(/<br\s?\/?>/g, " ")), i.removeCodeWrappers && (r = Oie(r)), r = r.replace(/(\s|&nbsp;){2,}/g, " ").trim().replace(/^&nbsp;|&nbsp$/g, "").trim(), r) {
    let s = i.createDocument(r);
    if (s.body.textContent === "")
      return null;
    s.body.querySelectorAll("*").forEach((o) => {
      if (!o.textContent.trim().replace(/\u200c+/g, "")) {
        if (i.allowBr && o.tagName === "BR")
          return;
        if (i.allowBr && o.querySelector("br"))
          return o.replaceWith(s.createElement("br"));
        if (o.textContent.length > 0) {
          let a = s.createTextNode(" ");
          return o.replaceWith(a);
        }
        return o.remove();
      }
    }), i.firstChildInnerContent && s.body.firstElementChild ? r = s.body.firstElementChild.innerHTML.trim() : r = s.body.innerHTML.trim();
  }
  return r;
}
var s1 = {};
const pM = {};
function Sie(t) {
  let e = pM[t];
  if (e)
    return e;
  e = pM[t] = [];
  for (let n = 0; n < 128; n++) {
    const i = String.fromCharCode(n);
    e.push(i);
  }
  for (let n = 0; n < t.length; n++) {
    const i = t.charCodeAt(n);
    e[i] = "%" + ("0" + i.toString(16).toUpperCase()).slice(-2);
  }
  return e;
}
function Bk(t, e) {
  typeof e != "string" && (e = Bk.defaultChars);
  const n = Sie(e);
  return t.replace(/(%[a-f0-9]{2})+/gi, function(i) {
    let r = "";
    for (let s = 0, o = i.length; s < o; s += 3) {
      const a = parseInt(i.slice(s + 1, s + 3), 16);
      if (a < 128) {
        r += n[a];
        continue;
      }
      if ((a & 224) === 192 && s + 3 < o) {
        const l = parseInt(i.slice(s + 4, s + 6), 16);
        if ((l & 192) === 128) {
          const u = a << 6 & 1984 | l & 63;
          u < 128 ? r += "��" : r += String.fromCharCode(u), s += 3;
          continue;
        }
      }
      if ((a & 240) === 224 && s + 6 < o) {
        const l = parseInt(i.slice(s + 4, s + 6), 16), u = parseInt(i.slice(s + 7, s + 9), 16);
        if ((l & 192) === 128 && (u & 192) === 128) {
          const f = a << 12 & 61440 | l << 6 & 4032 | u & 63;
          f < 2048 || f >= 55296 && f <= 57343 ? r += "���" : r += String.fromCharCode(f), s += 6;
          continue;
        }
      }
      if ((a & 248) === 240 && s + 9 < o) {
        const l = parseInt(i.slice(s + 4, s + 6), 16), u = parseInt(i.slice(s + 7, s + 9), 16), f = parseInt(i.slice(s + 10, s + 12), 16);
        if ((l & 192) === 128 && (u & 192) === 128 && (f & 192) === 128) {
          let d = a << 18 & 1835008 | l << 12 & 258048 | u << 6 & 4032 | f & 63;
          d < 65536 || d > 1114111 ? r += "����" : (d -= 65536, r += String.fromCharCode(55296 + (d >> 10), 56320 + (d & 1023))), s += 9;
          continue;
        }
      }
      r += "�";
    }
    return r;
  });
}
Bk.defaultChars = ";/?:@&=+$,#";
Bk.componentChars = "";
const mM = {};
function Cie(t) {
  let e = mM[t];
  if (e)
    return e;
  e = mM[t] = [];
  for (let n = 0; n < 128; n++) {
    const i = String.fromCharCode(n);
    /^[0-9a-z]$/i.test(i) ? e.push(i) : e.push("%" + ("0" + n.toString(16).toUpperCase()).slice(-2));
  }
  for (let n = 0; n < t.length; n++)
    e[t.charCodeAt(n)] = t[n];
  return e;
}
function zk(t, e, n) {
  typeof e != "string" && (n = e, e = zk.defaultChars), typeof n > "u" && (n = !0);
  const i = Cie(e);
  let r = "";
  for (let s = 0, o = t.length; s < o; s++) {
    const a = t.charCodeAt(s);
    if (n && a === 37 && s + 2 < o && /^[0-9a-f]{2}$/i.test(t.slice(s + 1, s + 3))) {
      r += t.slice(s, s + 3), s += 2;
      continue;
    }
    if (a < 128) {
      r += i[a];
      continue;
    }
    if (a >= 55296 && a <= 57343) {
      if (a >= 55296 && a <= 56319 && s + 1 < o) {
        const l = t.charCodeAt(s + 1);
        if (l >= 56320 && l <= 57343) {
          r += encodeURIComponent(t[s] + t[s + 1]), s++;
          continue;
        }
      }
      r += "%EF%BF%BD";
      continue;
    }
    r += encodeURIComponent(t[s]);
  }
  return r;
}
zk.defaultChars = ";/?:@&=+$,-_.!~*'()#";
zk.componentChars = "-_.!~*'()";
function Eie(t) {
  let e = "";
  return e += t.protocol || "", e += t.slashes ? "//" : "", e += t.auth ? t.auth + "@" : "", t.hostname && t.hostname.indexOf(":") !== -1 ? e += "[" + t.hostname + "]" : e += t.hostname || "", e += t.port ? ":" + t.port : "", e += t.pathname || "", e += t.search || "", e += t.hash || "", e;
}
function Ky() {
  this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
}
const Tie = /^([a-z0-9.+-]+:)/i, $ie = /:[0-9]*$/, Mie = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Nie = ["<", ">", '"', "`", " ", "\r", `
`, "	"], Aie = ["{", "}", "|", "\\", "^", "`"].concat(Nie), Die = ["'"].concat(Aie), gM = ["%", "/", "?", ";", "#"].concat(Die), vM = ["/", "?", "#"], Pie = 255, bM = /^[+a-z0-9A-Z_-]{0,63}$/, Iie = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, yM = {
  javascript: !0,
  "javascript:": !0
}, wM = {
  http: !0,
  https: !0,
  ftp: !0,
  gopher: !0,
  file: !0,
  "http:": !0,
  "https:": !0,
  "ftp:": !0,
  "gopher:": !0,
  "file:": !0
};
function Lie(t, e) {
  if (t && t instanceof Ky) return t;
  const n = new Ky();
  return n.parse(t, e), n;
}
Ky.prototype.parse = function(t, e) {
  let n, i, r, s = t;
  if (s = s.trim(), !e && t.split("#").length === 1) {
    const u = Mie.exec(s);
    if (u)
      return this.pathname = u[1], u[2] && (this.search = u[2]), this;
  }
  let o = Tie.exec(s);
  if (o && (o = o[0], n = o.toLowerCase(), this.protocol = o, s = s.substr(o.length)), (e || o || s.match(/^\/\/[^@\/]+@[^@\/]+/)) && (r = s.substr(0, 2) === "//", r && !(o && yM[o]) && (s = s.substr(2), this.slashes = !0)), !yM[o] && (r || o && !wM[o])) {
    let u = -1;
    for (let g = 0; g < vM.length; g++)
      i = s.indexOf(vM[g]), i !== -1 && (u === -1 || i < u) && (u = i);
    let f, d;
    u === -1 ? d = s.lastIndexOf("@") : d = s.lastIndexOf("@", u), d !== -1 && (f = s.slice(0, d), s = s.slice(d + 1), this.auth = f), u = -1;
    for (let g = 0; g < gM.length; g++)
      i = s.indexOf(gM[g]), i !== -1 && (u === -1 || i < u) && (u = i);
    u === -1 && (u = s.length), s[u - 1] === ":" && u--;
    const h = s.slice(0, u);
    s = s.slice(u), this.parseHost(h), this.hostname = this.hostname || "";
    const m = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
    if (!m) {
      const g = this.hostname.split(/\./);
      for (let w = 0, x = g.length; w < x; w++) {
        const _ = g[w];
        if (_ && !_.match(bM)) {
          let S = "";
          for (let C = 0, E = _.length; C < E; C++)
            _.charCodeAt(C) > 127 ? S += "x" : S += _[C];
          if (!S.match(bM)) {
            const C = g.slice(0, w), E = g.slice(w + 1), M = _.match(Iie);
            M && (C.push(M[1]), E.unshift(M[2])), E.length && (s = E.join(".") + s), this.hostname = C.join(".");
            break;
          }
        }
      }
    }
    this.hostname.length > Pie && (this.hostname = ""), m && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
  }
  const a = s.indexOf("#");
  a !== -1 && (this.hash = s.substr(a), s = s.slice(0, a));
  const l = s.indexOf("?");
  return l !== -1 && (this.search = s.substr(l), s = s.slice(0, l)), s && (this.pathname = s), wM[n] && this.hostname && !this.pathname && (this.pathname = ""), this;
};
Ky.prototype.parseHost = function(t) {
  let e = $ie.exec(t);
  e && (e = e[0], e !== ":" && (this.port = e.substr(1)), t = t.substr(0, t.length - e.length)), t && (this.hostname = t);
};
s1.decode = Bk;
s1.encode = zk;
s1.format = Eie;
s1.parse = Lie;
var Nf = {}, Rie = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, jie = /[\0-\x1F\x7F-\x9F]/, Fie = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, Bie = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, zie = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
Nf.Any = Rie;
Nf.Cc = jie;
Nf.Cf = Fie;
Nf.P = Bie;
Nf.Z = zie;
var XF = {}, a4 = {}, h5 = {};
Object.defineProperty(h5, "__esModule", { value: !0 });
h5.default = new Uint16Array(
  // prettier-ignore
  'ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(t) {
    return t.charCodeAt(0);
  })
);
var p5 = {};
Object.defineProperty(p5, "__esModule", { value: !0 });
p5.default = new Uint16Array(
  // prettier-ignore
  "Ȁaglq	\x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(t) {
    return t.charCodeAt(0);
  })
);
var l4 = {};
(function(t) {
  var e;
  Object.defineProperty(t, "__esModule", { value: !0 }), t.replaceCodePoint = t.fromCodePoint = void 0;
  var n = /* @__PURE__ */ new Map([
    [0, 65533],
    // C1 Unicode control character reference replacements
    [128, 8364],
    [130, 8218],
    [131, 402],
    [132, 8222],
    [133, 8230],
    [134, 8224],
    [135, 8225],
    [136, 710],
    [137, 8240],
    [138, 352],
    [139, 8249],
    [140, 338],
    [142, 381],
    [145, 8216],
    [146, 8217],
    [147, 8220],
    [148, 8221],
    [149, 8226],
    [150, 8211],
    [151, 8212],
    [152, 732],
    [153, 8482],
    [154, 353],
    [155, 8250],
    [156, 339],
    [158, 382],
    [159, 376]
  ]);
  t.fromCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
  (e = String.fromCodePoint) !== null && e !== void 0 ? e : function(s) {
    var o = "";
    return s > 65535 && (s -= 65536, o += String.fromCharCode(s >>> 10 & 1023 | 55296), s = 56320 | s & 1023), o += String.fromCharCode(s), o;
  };
  function i(s) {
    var o;
    return s >= 55296 && s <= 57343 || s > 1114111 ? 65533 : (o = n.get(s)) !== null && o !== void 0 ? o : s;
  }
  t.replaceCodePoint = i;
  function r(s) {
    return (0, t.fromCodePoint)(i(s));
  }
  t.default = r;
})(l4);
(function(t) {
  var e = on && on.__createBinding || (Object.create ? function(L, Q, V, H) {
    H === void 0 && (H = V);
    var R = Object.getOwnPropertyDescriptor(Q, V);
    (!R || ("get" in R ? !Q.__esModule : R.writable || R.configurable)) && (R = { enumerable: !0, get: function() {
      return Q[V];
    } }), Object.defineProperty(L, H, R);
  } : function(L, Q, V, H) {
    H === void 0 && (H = V), L[H] = Q[V];
  }), n = on && on.__setModuleDefault || (Object.create ? function(L, Q) {
    Object.defineProperty(L, "default", { enumerable: !0, value: Q });
  } : function(L, Q) {
    L.default = Q;
  }), i = on && on.__importStar || function(L) {
    if (L && L.__esModule) return L;
    var Q = {};
    if (L != null) for (var V in L) V !== "default" && Object.prototype.hasOwnProperty.call(L, V) && e(Q, L, V);
    return n(Q, L), Q;
  }, r = on && on.__importDefault || function(L) {
    return L && L.__esModule ? L : { default: L };
  };
  Object.defineProperty(t, "__esModule", { value: !0 }), t.decodeXML = t.decodeHTMLStrict = t.decodeHTMLAttribute = t.decodeHTML = t.determineBranch = t.EntityDecoder = t.DecodingMode = t.BinTrieFlags = t.fromCodePoint = t.replaceCodePoint = t.decodeCodePoint = t.xmlDecodeTree = t.htmlDecodeTree = void 0;
  var s = r(h5);
  t.htmlDecodeTree = s.default;
  var o = r(p5);
  t.xmlDecodeTree = o.default;
  var a = i(l4);
  t.decodeCodePoint = a.default;
  var l = l4;
  Object.defineProperty(t, "replaceCodePoint", { enumerable: !0, get: function() {
    return l.replaceCodePoint;
  } }), Object.defineProperty(t, "fromCodePoint", { enumerable: !0, get: function() {
    return l.fromCodePoint;
  } });
  var u;
  (function(L) {
    L[L.NUM = 35] = "NUM", L[L.SEMI = 59] = "SEMI", L[L.EQUALS = 61] = "EQUALS", L[L.ZERO = 48] = "ZERO", L[L.NINE = 57] = "NINE", L[L.LOWER_A = 97] = "LOWER_A", L[L.LOWER_F = 102] = "LOWER_F", L[L.LOWER_X = 120] = "LOWER_X", L[L.LOWER_Z = 122] = "LOWER_Z", L[L.UPPER_A = 65] = "UPPER_A", L[L.UPPER_F = 70] = "UPPER_F", L[L.UPPER_Z = 90] = "UPPER_Z";
  })(u || (u = {}));
  var f = 32, d;
  (function(L) {
    L[L.VALUE_LENGTH = 49152] = "VALUE_LENGTH", L[L.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", L[L.JUMP_TABLE = 127] = "JUMP_TABLE";
  })(d = t.BinTrieFlags || (t.BinTrieFlags = {}));
  function h(L) {
    return L >= u.ZERO && L <= u.NINE;
  }
  function m(L) {
    return L >= u.UPPER_A && L <= u.UPPER_F || L >= u.LOWER_A && L <= u.LOWER_F;
  }
  function g(L) {
    return L >= u.UPPER_A && L <= u.UPPER_Z || L >= u.LOWER_A && L <= u.LOWER_Z || h(L);
  }
  function w(L) {
    return L === u.EQUALS || g(L);
  }
  var x;
  (function(L) {
    L[L.EntityStart = 0] = "EntityStart", L[L.NumericStart = 1] = "NumericStart", L[L.NumericDecimal = 2] = "NumericDecimal", L[L.NumericHex = 3] = "NumericHex", L[L.NamedEntity = 4] = "NamedEntity";
  })(x || (x = {}));
  var _;
  (function(L) {
    L[L.Legacy = 0] = "Legacy", L[L.Strict = 1] = "Strict", L[L.Attribute = 2] = "Attribute";
  })(_ = t.DecodingMode || (t.DecodingMode = {}));
  var S = (
    /** @class */
    function() {
      function L(Q, V, H) {
        this.decodeTree = Q, this.emitCodePoint = V, this.errors = H, this.state = x.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = _.Strict;
      }
      return L.prototype.startEntity = function(Q) {
        this.decodeMode = Q, this.state = x.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
      }, L.prototype.write = function(Q, V) {
        switch (this.state) {
          case x.EntityStart:
            return Q.charCodeAt(V) === u.NUM ? (this.state = x.NumericStart, this.consumed += 1, this.stateNumericStart(Q, V + 1)) : (this.state = x.NamedEntity, this.stateNamedEntity(Q, V));
          case x.NumericStart:
            return this.stateNumericStart(Q, V);
          case x.NumericDecimal:
            return this.stateNumericDecimal(Q, V);
          case x.NumericHex:
            return this.stateNumericHex(Q, V);
          case x.NamedEntity:
            return this.stateNamedEntity(Q, V);
        }
      }, L.prototype.stateNumericStart = function(Q, V) {
        return V >= Q.length ? -1 : (Q.charCodeAt(V) | f) === u.LOWER_X ? (this.state = x.NumericHex, this.consumed += 1, this.stateNumericHex(Q, V + 1)) : (this.state = x.NumericDecimal, this.stateNumericDecimal(Q, V));
      }, L.prototype.addToNumericResult = function(Q, V, H, R) {
        if (V !== H) {
          var q = H - V;
          this.result = this.result * Math.pow(R, q) + parseInt(Q.substr(V, q), R), this.consumed += q;
        }
      }, L.prototype.stateNumericHex = function(Q, V) {
        for (var H = V; V < Q.length; ) {
          var R = Q.charCodeAt(V);
          if (h(R) || m(R))
            V += 1;
          else
            return this.addToNumericResult(Q, H, V, 16), this.emitNumericEntity(R, 3);
        }
        return this.addToNumericResult(Q, H, V, 16), -1;
      }, L.prototype.stateNumericDecimal = function(Q, V) {
        for (var H = V; V < Q.length; ) {
          var R = Q.charCodeAt(V);
          if (h(R))
            V += 1;
          else
            return this.addToNumericResult(Q, H, V, 10), this.emitNumericEntity(R, 2);
        }
        return this.addToNumericResult(Q, H, V, 10), -1;
      }, L.prototype.emitNumericEntity = function(Q, V) {
        var H;
        if (this.consumed <= V)
          return (H = this.errors) === null || H === void 0 || H.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
        if (Q === u.SEMI)
          this.consumed += 1;
        else if (this.decodeMode === _.Strict)
          return 0;
        return this.emitCodePoint((0, a.replaceCodePoint)(this.result), this.consumed), this.errors && (Q !== u.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
      }, L.prototype.stateNamedEntity = function(Q, V) {
        for (var H = this.decodeTree, R = H[this.treeIndex], q = (R & d.VALUE_LENGTH) >> 14; V < Q.length; V++, this.excess++) {
          var Y = Q.charCodeAt(V);
          if (this.treeIndex = E(H, R, this.treeIndex + Math.max(1, q), Y), this.treeIndex < 0)
            return this.result === 0 || // If we are parsing an attribute
            this.decodeMode === _.Attribute && // We shouldn't have consumed any characters after the entity,
            (q === 0 || // And there should be no invalid characters.
            w(Y)) ? 0 : this.emitNotTerminatedNamedEntity();
          if (R = H[this.treeIndex], q = (R & d.VALUE_LENGTH) >> 14, q !== 0) {
            if (Y === u.SEMI)
              return this.emitNamedEntityData(this.treeIndex, q, this.consumed + this.excess);
            this.decodeMode !== _.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
          }
        }
        return -1;
      }, L.prototype.emitNotTerminatedNamedEntity = function() {
        var Q, V = this, H = V.result, R = V.decodeTree, q = (R[H] & d.VALUE_LENGTH) >> 14;
        return this.emitNamedEntityData(H, q, this.consumed), (Q = this.errors) === null || Q === void 0 || Q.missingSemicolonAfterCharacterReference(), this.consumed;
      }, L.prototype.emitNamedEntityData = function(Q, V, H) {
        var R = this.decodeTree;
        return this.emitCodePoint(V === 1 ? R[Q] & ~d.VALUE_LENGTH : R[Q + 1], H), V === 3 && this.emitCodePoint(R[Q + 2], H), H;
      }, L.prototype.end = function() {
        var Q;
        switch (this.state) {
          case x.NamedEntity:
            return this.result !== 0 && (this.decodeMode !== _.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
          case x.NumericDecimal:
            return this.emitNumericEntity(0, 2);
          case x.NumericHex:
            return this.emitNumericEntity(0, 3);
          case x.NumericStart:
            return (Q = this.errors) === null || Q === void 0 || Q.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
          case x.EntityStart:
            return 0;
        }
      }, L;
    }()
  );
  t.EntityDecoder = S;
  function C(L) {
    var Q = "", V = new S(L, function(H) {
      return Q += (0, a.fromCodePoint)(H);
    });
    return function(R, q) {
      for (var Y = 0, K = 0; (K = R.indexOf("&", K)) >= 0; ) {
        Q += R.slice(Y, K), V.startEntity(q);
        var te = V.write(
          R,
          // Skip the "&"
          K + 1
        );
        if (te < 0) {
          Y = K + V.end();
          break;
        }
        Y = K + te, K = te === 0 ? Y + 1 : Y;
      }
      var se = Q + R.slice(Y);
      return Q = "", se;
    };
  }
  function E(L, Q, V, H) {
    var R = (Q & d.BRANCH_LENGTH) >> 7, q = Q & d.JUMP_TABLE;
    if (R === 0)
      return q !== 0 && H === q ? V : -1;
    if (q) {
      var Y = H - q;
      return Y < 0 || Y >= R ? -1 : L[V + Y] - 1;
    }
    for (var K = V, te = K + R - 1; K <= te; ) {
      var se = K + te >>> 1, ce = L[se];
      if (ce < H)
        K = se + 1;
      else if (ce > H)
        te = se - 1;
      else
        return L[se + R];
    }
    return -1;
  }
  t.determineBranch = E;
  var M = C(s.default), $ = C(o.default);
  function P(L, Q) {
    return Q === void 0 && (Q = _.Legacy), M(L, Q);
  }
  t.decodeHTML = P;
  function W(L) {
    return M(L, _.Attribute);
  }
  t.decodeHTMLAttribute = W;
  function z(L) {
    return M(L, _.Strict);
  }
  t.decodeHTMLStrict = z;
  function Z(L) {
    return $(L, _.Strict);
  }
  t.decodeXML = Z;
})(a4);
var pf = {}, m5 = {};
Object.defineProperty(m5, "__esModule", { value: !0 });
function zv(t) {
  for (var e = 1; e < t.length; e++)
    t[e][0] += t[e - 1][0] + 1;
  return t;
}
m5.default = new Map(/* @__PURE__ */ zv([[9, "&Tab;"], [0, "&NewLine;"], [22, "&excl;"], [0, "&quot;"], [0, "&num;"], [0, "&dollar;"], [0, "&percnt;"], [0, "&amp;"], [0, "&apos;"], [0, "&lpar;"], [0, "&rpar;"], [0, "&ast;"], [0, "&plus;"], [0, "&comma;"], [1, "&period;"], [0, "&sol;"], [10, "&colon;"], [0, "&semi;"], [0, { v: "&lt;", n: 8402, o: "&nvlt;" }], [0, { v: "&equals;", n: 8421, o: "&bne;" }], [0, { v: "&gt;", n: 8402, o: "&nvgt;" }], [0, "&quest;"], [0, "&commat;"], [26, "&lbrack;"], [0, "&bsol;"], [0, "&rbrack;"], [0, "&Hat;"], [0, "&lowbar;"], [0, "&DiacriticalGrave;"], [5, { n: 106, o: "&fjlig;" }], [20, "&lbrace;"], [0, "&verbar;"], [0, "&rbrace;"], [34, "&nbsp;"], [0, "&iexcl;"], [0, "&cent;"], [0, "&pound;"], [0, "&curren;"], [0, "&yen;"], [0, "&brvbar;"], [0, "&sect;"], [0, "&die;"], [0, "&copy;"], [0, "&ordf;"], [0, "&laquo;"], [0, "&not;"], [0, "&shy;"], [0, "&circledR;"], [0, "&macr;"], [0, "&deg;"], [0, "&PlusMinus;"], [0, "&sup2;"], [0, "&sup3;"], [0, "&acute;"], [0, "&micro;"], [0, "&para;"], [0, "&centerdot;"], [0, "&cedil;"], [0, "&sup1;"], [0, "&ordm;"], [0, "&raquo;"], [0, "&frac14;"], [0, "&frac12;"], [0, "&frac34;"], [0, "&iquest;"], [0, "&Agrave;"], [0, "&Aacute;"], [0, "&Acirc;"], [0, "&Atilde;"], [0, "&Auml;"], [0, "&angst;"], [0, "&AElig;"], [0, "&Ccedil;"], [0, "&Egrave;"], [0, "&Eacute;"], [0, "&Ecirc;"], [0, "&Euml;"], [0, "&Igrave;"], [0, "&Iacute;"], [0, "&Icirc;"], [0, "&Iuml;"], [0, "&ETH;"], [0, "&Ntilde;"], [0, "&Ograve;"], [0, "&Oacute;"], [0, "&Ocirc;"], [0, "&Otilde;"], [0, "&Ouml;"], [0, "&times;"], [0, "&Oslash;"], [0, "&Ugrave;"], [0, "&Uacute;"], [0, "&Ucirc;"], [0, "&Uuml;"], [0, "&Yacute;"], [0, "&THORN;"], [0, "&szlig;"], [0, "&agrave;"], [0, "&aacute;"], [0, "&acirc;"], [0, "&atilde;"], [0, "&auml;"], [0, "&aring;"], [0, "&aelig;"], [0, "&ccedil;"], [0, "&egrave;"], [0, "&eacute;"], [0, "&ecirc;"], [0, "&euml;"], [0, "&igrave;"], [0, "&iacute;"], [0, "&icirc;"], [0, "&iuml;"], [0, "&eth;"], [0, "&ntilde;"], [0, "&ograve;"], [0, "&oacute;"], [0, "&ocirc;"], [0, "&otilde;"], [0, "&ouml;"], [0, "&div;"], [0, "&oslash;"], [0, "&ugrave;"], [0, "&uacute;"], [0, "&ucirc;"], [0, "&uuml;"], [0, "&yacute;"], [0, "&thorn;"], [0, "&yuml;"], [0, "&Amacr;"], [0, "&amacr;"], [0, "&Abreve;"], [0, "&abreve;"], [0, "&Aogon;"], [0, "&aogon;"], [0, "&Cacute;"], [0, "&cacute;"], [0, "&Ccirc;"], [0, "&ccirc;"], [0, "&Cdot;"], [0, "&cdot;"], [0, "&Ccaron;"], [0, "&ccaron;"], [0, "&Dcaron;"], [0, "&dcaron;"], [0, "&Dstrok;"], [0, "&dstrok;"], [0, "&Emacr;"], [0, "&emacr;"], [2, "&Edot;"], [0, "&edot;"], [0, "&Eogon;"], [0, "&eogon;"], [0, "&Ecaron;"], [0, "&ecaron;"], [0, "&Gcirc;"], [0, "&gcirc;"], [0, "&Gbreve;"], [0, "&gbreve;"], [0, "&Gdot;"], [0, "&gdot;"], [0, "&Gcedil;"], [1, "&Hcirc;"], [0, "&hcirc;"], [0, "&Hstrok;"], [0, "&hstrok;"], [0, "&Itilde;"], [0, "&itilde;"], [0, "&Imacr;"], [0, "&imacr;"], [2, "&Iogon;"], [0, "&iogon;"], [0, "&Idot;"], [0, "&imath;"], [0, "&IJlig;"], [0, "&ijlig;"], [0, "&Jcirc;"], [0, "&jcirc;"], [0, "&Kcedil;"], [0, "&kcedil;"], [0, "&kgreen;"], [0, "&Lacute;"], [0, "&lacute;"], [0, "&Lcedil;"], [0, "&lcedil;"], [0, "&Lcaron;"], [0, "&lcaron;"], [0, "&Lmidot;"], [0, "&lmidot;"], [0, "&Lstrok;"], [0, "&lstrok;"], [0, "&Nacute;"], [0, "&nacute;"], [0, "&Ncedil;"], [0, "&ncedil;"], [0, "&Ncaron;"], [0, "&ncaron;"], [0, "&napos;"], [0, "&ENG;"], [0, "&eng;"], [0, "&Omacr;"], [0, "&omacr;"], [2, "&Odblac;"], [0, "&odblac;"], [0, "&OElig;"], [0, "&oelig;"], [0, "&Racute;"], [0, "&racute;"], [0, "&Rcedil;"], [0, "&rcedil;"], [0, "&Rcaron;"], [0, "&rcaron;"], [0, "&Sacute;"], [0, "&sacute;"], [0, "&Scirc;"], [0, "&scirc;"], [0, "&Scedil;"], [0, "&scedil;"], [0, "&Scaron;"], [0, "&scaron;"], [0, "&Tcedil;"], [0, "&tcedil;"], [0, "&Tcaron;"], [0, "&tcaron;"], [0, "&Tstrok;"], [0, "&tstrok;"], [0, "&Utilde;"], [0, "&utilde;"], [0, "&Umacr;"], [0, "&umacr;"], [0, "&Ubreve;"], [0, "&ubreve;"], [0, "&Uring;"], [0, "&uring;"], [0, "&Udblac;"], [0, "&udblac;"], [0, "&Uogon;"], [0, "&uogon;"], [0, "&Wcirc;"], [0, "&wcirc;"], [0, "&Ycirc;"], [0, "&ycirc;"], [0, "&Yuml;"], [0, "&Zacute;"], [0, "&zacute;"], [0, "&Zdot;"], [0, "&zdot;"], [0, "&Zcaron;"], [0, "&zcaron;"], [19, "&fnof;"], [34, "&imped;"], [63, "&gacute;"], [65, "&jmath;"], [142, "&circ;"], [0, "&caron;"], [16, "&breve;"], [0, "&DiacriticalDot;"], [0, "&ring;"], [0, "&ogon;"], [0, "&DiacriticalTilde;"], [0, "&dblac;"], [51, "&DownBreve;"], [127, "&Alpha;"], [0, "&Beta;"], [0, "&Gamma;"], [0, "&Delta;"], [0, "&Epsilon;"], [0, "&Zeta;"], [0, "&Eta;"], [0, "&Theta;"], [0, "&Iota;"], [0, "&Kappa;"], [0, "&Lambda;"], [0, "&Mu;"], [0, "&Nu;"], [0, "&Xi;"], [0, "&Omicron;"], [0, "&Pi;"], [0, "&Rho;"], [1, "&Sigma;"], [0, "&Tau;"], [0, "&Upsilon;"], [0, "&Phi;"], [0, "&Chi;"], [0, "&Psi;"], [0, "&ohm;"], [7, "&alpha;"], [0, "&beta;"], [0, "&gamma;"], [0, "&delta;"], [0, "&epsi;"], [0, "&zeta;"], [0, "&eta;"], [0, "&theta;"], [0, "&iota;"], [0, "&kappa;"], [0, "&lambda;"], [0, "&mu;"], [0, "&nu;"], [0, "&xi;"], [0, "&omicron;"], [0, "&pi;"], [0, "&rho;"], [0, "&sigmaf;"], [0, "&sigma;"], [0, "&tau;"], [0, "&upsi;"], [0, "&phi;"], [0, "&chi;"], [0, "&psi;"], [0, "&omega;"], [7, "&thetasym;"], [0, "&Upsi;"], [2, "&phiv;"], [0, "&piv;"], [5, "&Gammad;"], [0, "&digamma;"], [18, "&kappav;"], [0, "&rhov;"], [3, "&epsiv;"], [0, "&backepsilon;"], [10, "&IOcy;"], [0, "&DJcy;"], [0, "&GJcy;"], [0, "&Jukcy;"], [0, "&DScy;"], [0, "&Iukcy;"], [0, "&YIcy;"], [0, "&Jsercy;"], [0, "&LJcy;"], [0, "&NJcy;"], [0, "&TSHcy;"], [0, "&KJcy;"], [1, "&Ubrcy;"], [0, "&DZcy;"], [0, "&Acy;"], [0, "&Bcy;"], [0, "&Vcy;"], [0, "&Gcy;"], [0, "&Dcy;"], [0, "&IEcy;"], [0, "&ZHcy;"], [0, "&Zcy;"], [0, "&Icy;"], [0, "&Jcy;"], [0, "&Kcy;"], [0, "&Lcy;"], [0, "&Mcy;"], [0, "&Ncy;"], [0, "&Ocy;"], [0, "&Pcy;"], [0, "&Rcy;"], [0, "&Scy;"], [0, "&Tcy;"], [0, "&Ucy;"], [0, "&Fcy;"], [0, "&KHcy;"], [0, "&TScy;"], [0, "&CHcy;"], [0, "&SHcy;"], [0, "&SHCHcy;"], [0, "&HARDcy;"], [0, "&Ycy;"], [0, "&SOFTcy;"], [0, "&Ecy;"], [0, "&YUcy;"], [0, "&YAcy;"], [0, "&acy;"], [0, "&bcy;"], [0, "&vcy;"], [0, "&gcy;"], [0, "&dcy;"], [0, "&iecy;"], [0, "&zhcy;"], [0, "&zcy;"], [0, "&icy;"], [0, "&jcy;"], [0, "&kcy;"], [0, "&lcy;"], [0, "&mcy;"], [0, "&ncy;"], [0, "&ocy;"], [0, "&pcy;"], [0, "&rcy;"], [0, "&scy;"], [0, "&tcy;"], [0, "&ucy;"], [0, "&fcy;"], [0, "&khcy;"], [0, "&tscy;"], [0, "&chcy;"], [0, "&shcy;"], [0, "&shchcy;"], [0, "&hardcy;"], [0, "&ycy;"], [0, "&softcy;"], [0, "&ecy;"], [0, "&yucy;"], [0, "&yacy;"], [1, "&iocy;"], [0, "&djcy;"], [0, "&gjcy;"], [0, "&jukcy;"], [0, "&dscy;"], [0, "&iukcy;"], [0, "&yicy;"], [0, "&jsercy;"], [0, "&ljcy;"], [0, "&njcy;"], [0, "&tshcy;"], [0, "&kjcy;"], [1, "&ubrcy;"], [0, "&dzcy;"], [7074, "&ensp;"], [0, "&emsp;"], [0, "&emsp13;"], [0, "&emsp14;"], [1, "&numsp;"], [0, "&puncsp;"], [0, "&ThinSpace;"], [0, "&hairsp;"], [0, "&NegativeMediumSpace;"], [0, "&zwnj;"], [0, "&zwj;"], [0, "&lrm;"], [0, "&rlm;"], [0, "&dash;"], [2, "&ndash;"], [0, "&mdash;"], [0, "&horbar;"], [0, "&Verbar;"], [1, "&lsquo;"], [0, "&CloseCurlyQuote;"], [0, "&lsquor;"], [1, "&ldquo;"], [0, "&CloseCurlyDoubleQuote;"], [0, "&bdquo;"], [1, "&dagger;"], [0, "&Dagger;"], [0, "&bull;"], [2, "&nldr;"], [0, "&hellip;"], [9, "&permil;"], [0, "&pertenk;"], [0, "&prime;"], [0, "&Prime;"], [0, "&tprime;"], [0, "&backprime;"], [3, "&lsaquo;"], [0, "&rsaquo;"], [3, "&oline;"], [2, "&caret;"], [1, "&hybull;"], [0, "&frasl;"], [10, "&bsemi;"], [7, "&qprime;"], [7, { v: "&MediumSpace;", n: 8202, o: "&ThickSpace;" }], [0, "&NoBreak;"], [0, "&af;"], [0, "&InvisibleTimes;"], [0, "&ic;"], [72, "&euro;"], [46, "&tdot;"], [0, "&DotDot;"], [37, "&complexes;"], [2, "&incare;"], [4, "&gscr;"], [0, "&hamilt;"], [0, "&Hfr;"], [0, "&Hopf;"], [0, "&planckh;"], [0, "&hbar;"], [0, "&imagline;"], [0, "&Ifr;"], [0, "&lagran;"], [0, "&ell;"], [1, "&naturals;"], [0, "&numero;"], [0, "&copysr;"], [0, "&weierp;"], [0, "&Popf;"], [0, "&Qopf;"], [0, "&realine;"], [0, "&real;"], [0, "&reals;"], [0, "&rx;"], [3, "&trade;"], [1, "&integers;"], [2, "&mho;"], [0, "&zeetrf;"], [0, "&iiota;"], [2, "&bernou;"], [0, "&Cayleys;"], [1, "&escr;"], [0, "&Escr;"], [0, "&Fouriertrf;"], [1, "&Mellintrf;"], [0, "&order;"], [0, "&alefsym;"], [0, "&beth;"], [0, "&gimel;"], [0, "&daleth;"], [12, "&CapitalDifferentialD;"], [0, "&dd;"], [0, "&ee;"], [0, "&ii;"], [10, "&frac13;"], [0, "&frac23;"], [0, "&frac15;"], [0, "&frac25;"], [0, "&frac35;"], [0, "&frac45;"], [0, "&frac16;"], [0, "&frac56;"], [0, "&frac18;"], [0, "&frac38;"], [0, "&frac58;"], [0, "&frac78;"], [49, "&larr;"], [0, "&ShortUpArrow;"], [0, "&rarr;"], [0, "&darr;"], [0, "&harr;"], [0, "&updownarrow;"], [0, "&nwarr;"], [0, "&nearr;"], [0, "&LowerRightArrow;"], [0, "&LowerLeftArrow;"], [0, "&nlarr;"], [0, "&nrarr;"], [1, { v: "&rarrw;", n: 824, o: "&nrarrw;" }], [0, "&Larr;"], [0, "&Uarr;"], [0, "&Rarr;"], [0, "&Darr;"], [0, "&larrtl;"], [0, "&rarrtl;"], [0, "&LeftTeeArrow;"], [0, "&mapstoup;"], [0, "&map;"], [0, "&DownTeeArrow;"], [1, "&hookleftarrow;"], [0, "&hookrightarrow;"], [0, "&larrlp;"], [0, "&looparrowright;"], [0, "&harrw;"], [0, "&nharr;"], [1, "&lsh;"], [0, "&rsh;"], [0, "&ldsh;"], [0, "&rdsh;"], [1, "&crarr;"], [0, "&cularr;"], [0, "&curarr;"], [2, "&circlearrowleft;"], [0, "&circlearrowright;"], [0, "&leftharpoonup;"], [0, "&DownLeftVector;"], [0, "&RightUpVector;"], [0, "&LeftUpVector;"], [0, "&rharu;"], [0, "&DownRightVector;"], [0, "&dharr;"], [0, "&dharl;"], [0, "&RightArrowLeftArrow;"], [0, "&udarr;"], [0, "&LeftArrowRightArrow;"], [0, "&leftleftarrows;"], [0, "&upuparrows;"], [0, "&rightrightarrows;"], [0, "&ddarr;"], [0, "&leftrightharpoons;"], [0, "&Equilibrium;"], [0, "&nlArr;"], [0, "&nhArr;"], [0, "&nrArr;"], [0, "&DoubleLeftArrow;"], [0, "&DoubleUpArrow;"], [0, "&DoubleRightArrow;"], [0, "&dArr;"], [0, "&DoubleLeftRightArrow;"], [0, "&DoubleUpDownArrow;"], [0, "&nwArr;"], [0, "&neArr;"], [0, "&seArr;"], [0, "&swArr;"], [0, "&lAarr;"], [0, "&rAarr;"], [1, "&zigrarr;"], [6, "&larrb;"], [0, "&rarrb;"], [15, "&DownArrowUpArrow;"], [7, "&loarr;"], [0, "&roarr;"], [0, "&hoarr;"], [0, "&forall;"], [0, "&comp;"], [0, { v: "&part;", n: 824, o: "&npart;" }], [0, "&exist;"], [0, "&nexist;"], [0, "&empty;"], [1, "&Del;"], [0, "&Element;"], [0, "&NotElement;"], [1, "&ni;"], [0, "&notni;"], [2, "&prod;"], [0, "&coprod;"], [0, "&sum;"], [0, "&minus;"], [0, "&MinusPlus;"], [0, "&dotplus;"], [1, "&Backslash;"], [0, "&lowast;"], [0, "&compfn;"], [1, "&radic;"], [2, "&prop;"], [0, "&infin;"], [0, "&angrt;"], [0, { v: "&ang;", n: 8402, o: "&nang;" }], [0, "&angmsd;"], [0, "&angsph;"], [0, "&mid;"], [0, "&nmid;"], [0, "&DoubleVerticalBar;"], [0, "&NotDoubleVerticalBar;"], [0, "&and;"], [0, "&or;"], [0, { v: "&cap;", n: 65024, o: "&caps;" }], [0, { v: "&cup;", n: 65024, o: "&cups;" }], [0, "&int;"], [0, "&Int;"], [0, "&iiint;"], [0, "&conint;"], [0, "&Conint;"], [0, "&Cconint;"], [0, "&cwint;"], [0, "&ClockwiseContourIntegral;"], [0, "&awconint;"], [0, "&there4;"], [0, "&becaus;"], [0, "&ratio;"], [0, "&Colon;"], [0, "&dotminus;"], [1, "&mDDot;"], [0, "&homtht;"], [0, { v: "&sim;", n: 8402, o: "&nvsim;" }], [0, { v: "&backsim;", n: 817, o: "&race;" }], [0, { v: "&ac;", n: 819, o: "&acE;" }], [0, "&acd;"], [0, "&VerticalTilde;"], [0, "&NotTilde;"], [0, { v: "&eqsim;", n: 824, o: "&nesim;" }], [0, "&sime;"], [0, "&NotTildeEqual;"], [0, "&cong;"], [0, "&simne;"], [0, "&ncong;"], [0, "&ap;"], [0, "&nap;"], [0, "&ape;"], [0, { v: "&apid;", n: 824, o: "&napid;" }], [0, "&backcong;"], [0, { v: "&asympeq;", n: 8402, o: "&nvap;" }], [0, { v: "&bump;", n: 824, o: "&nbump;" }], [0, { v: "&bumpe;", n: 824, o: "&nbumpe;" }], [0, { v: "&doteq;", n: 824, o: "&nedot;" }], [0, "&doteqdot;"], [0, "&efDot;"], [0, "&erDot;"], [0, "&Assign;"], [0, "&ecolon;"], [0, "&ecir;"], [0, "&circeq;"], [1, "&wedgeq;"], [0, "&veeeq;"], [1, "&triangleq;"], [2, "&equest;"], [0, "&ne;"], [0, { v: "&Congruent;", n: 8421, o: "&bnequiv;" }], [0, "&nequiv;"], [1, { v: "&le;", n: 8402, o: "&nvle;" }], [0, { v: "&ge;", n: 8402, o: "&nvge;" }], [0, { v: "&lE;", n: 824, o: "&nlE;" }], [0, { v: "&gE;", n: 824, o: "&ngE;" }], [0, { v: "&lnE;", n: 65024, o: "&lvertneqq;" }], [0, { v: "&gnE;", n: 65024, o: "&gvertneqq;" }], [0, { v: "&ll;", n: new Map(/* @__PURE__ */ zv([[824, "&nLtv;"], [7577, "&nLt;"]])) }], [0, { v: "&gg;", n: new Map(/* @__PURE__ */ zv([[824, "&nGtv;"], [7577, "&nGt;"]])) }], [0, "&between;"], [0, "&NotCupCap;"], [0, "&nless;"], [0, "&ngt;"], [0, "&nle;"], [0, "&nge;"], [0, "&lesssim;"], [0, "&GreaterTilde;"], [0, "&nlsim;"], [0, "&ngsim;"], [0, "&LessGreater;"], [0, "&gl;"], [0, "&NotLessGreater;"], [0, "&NotGreaterLess;"], [0, "&pr;"], [0, "&sc;"], [0, "&prcue;"], [0, "&sccue;"], [0, "&PrecedesTilde;"], [0, { v: "&scsim;", n: 824, o: "&NotSucceedsTilde;" }], [0, "&NotPrecedes;"], [0, "&NotSucceeds;"], [0, { v: "&sub;", n: 8402, o: "&NotSubset;" }], [0, { v: "&sup;", n: 8402, o: "&NotSuperset;" }], [0, "&nsub;"], [0, "&nsup;"], [0, "&sube;"], [0, "&supe;"], [0, "&NotSubsetEqual;"], [0, "&NotSupersetEqual;"], [0, { v: "&subne;", n: 65024, o: "&varsubsetneq;" }], [0, { v: "&supne;", n: 65024, o: "&varsupsetneq;" }], [1, "&cupdot;"], [0, "&UnionPlus;"], [0, { v: "&sqsub;", n: 824, o: "&NotSquareSubset;" }], [0, { v: "&sqsup;", n: 824, o: "&NotSquareSuperset;" }], [0, "&sqsube;"], [0, "&sqsupe;"], [0, { v: "&sqcap;", n: 65024, o: "&sqcaps;" }], [0, { v: "&sqcup;", n: 65024, o: "&sqcups;" }], [0, "&CirclePlus;"], [0, "&CircleMinus;"], [0, "&CircleTimes;"], [0, "&osol;"], [0, "&CircleDot;"], [0, "&circledcirc;"], [0, "&circledast;"], [1, "&circleddash;"], [0, "&boxplus;"], [0, "&boxminus;"], [0, "&boxtimes;"], [0, "&dotsquare;"], [0, "&RightTee;"], [0, "&dashv;"], [0, "&DownTee;"], [0, "&bot;"], [1, "&models;"], [0, "&DoubleRightTee;"], [0, "&Vdash;"], [0, "&Vvdash;"], [0, "&VDash;"], [0, "&nvdash;"], [0, "&nvDash;"], [0, "&nVdash;"], [0, "&nVDash;"], [0, "&prurel;"], [1, "&LeftTriangle;"], [0, "&RightTriangle;"], [0, { v: "&LeftTriangleEqual;", n: 8402, o: "&nvltrie;" }], [0, { v: "&RightTriangleEqual;", n: 8402, o: "&nvrtrie;" }], [0, "&origof;"], [0, "&imof;"], [0, "&multimap;"], [0, "&hercon;"], [0, "&intcal;"], [0, "&veebar;"], [1, "&barvee;"], [0, "&angrtvb;"], [0, "&lrtri;"], [0, "&bigwedge;"], [0, "&bigvee;"], [0, "&bigcap;"], [0, "&bigcup;"], [0, "&diam;"], [0, "&sdot;"], [0, "&sstarf;"], [0, "&divideontimes;"], [0, "&bowtie;"], [0, "&ltimes;"], [0, "&rtimes;"], [0, "&leftthreetimes;"], [0, "&rightthreetimes;"], [0, "&backsimeq;"], [0, "&curlyvee;"], [0, "&curlywedge;"], [0, "&Sub;"], [0, "&Sup;"], [0, "&Cap;"], [0, "&Cup;"], [0, "&fork;"], [0, "&epar;"], [0, "&lessdot;"], [0, "&gtdot;"], [0, { v: "&Ll;", n: 824, o: "&nLl;" }], [0, { v: "&Gg;", n: 824, o: "&nGg;" }], [0, { v: "&leg;", n: 65024, o: "&lesg;" }], [0, { v: "&gel;", n: 65024, o: "&gesl;" }], [2, "&cuepr;"], [0, "&cuesc;"], [0, "&NotPrecedesSlantEqual;"], [0, "&NotSucceedsSlantEqual;"], [0, "&NotSquareSubsetEqual;"], [0, "&NotSquareSupersetEqual;"], [2, "&lnsim;"], [0, "&gnsim;"], [0, "&precnsim;"], [0, "&scnsim;"], [0, "&nltri;"], [0, "&NotRightTriangle;"], [0, "&nltrie;"], [0, "&NotRightTriangleEqual;"], [0, "&vellip;"], [0, "&ctdot;"], [0, "&utdot;"], [0, "&dtdot;"], [0, "&disin;"], [0, "&isinsv;"], [0, "&isins;"], [0, { v: "&isindot;", n: 824, o: "&notindot;" }], [0, "&notinvc;"], [0, "&notinvb;"], [1, { v: "&isinE;", n: 824, o: "&notinE;" }], [0, "&nisd;"], [0, "&xnis;"], [0, "&nis;"], [0, "&notnivc;"], [0, "&notnivb;"], [6, "&barwed;"], [0, "&Barwed;"], [1, "&lceil;"], [0, "&rceil;"], [0, "&LeftFloor;"], [0, "&rfloor;"], [0, "&drcrop;"], [0, "&dlcrop;"], [0, "&urcrop;"], [0, "&ulcrop;"], [0, "&bnot;"], [1, "&profline;"], [0, "&profsurf;"], [1, "&telrec;"], [0, "&target;"], [5, "&ulcorn;"], [0, "&urcorn;"], [0, "&dlcorn;"], [0, "&drcorn;"], [2, "&frown;"], [0, "&smile;"], [9, "&cylcty;"], [0, "&profalar;"], [7, "&topbot;"], [6, "&ovbar;"], [1, "&solbar;"], [60, "&angzarr;"], [51, "&lmoustache;"], [0, "&rmoustache;"], [2, "&OverBracket;"], [0, "&bbrk;"], [0, "&bbrktbrk;"], [37, "&OverParenthesis;"], [0, "&UnderParenthesis;"], [0, "&OverBrace;"], [0, "&UnderBrace;"], [2, "&trpezium;"], [4, "&elinters;"], [59, "&blank;"], [164, "&circledS;"], [55, "&boxh;"], [1, "&boxv;"], [9, "&boxdr;"], [3, "&boxdl;"], [3, "&boxur;"], [3, "&boxul;"], [3, "&boxvr;"], [7, "&boxvl;"], [7, "&boxhd;"], [7, "&boxhu;"], [7, "&boxvh;"], [19, "&boxH;"], [0, "&boxV;"], [0, "&boxdR;"], [0, "&boxDr;"], [0, "&boxDR;"], [0, "&boxdL;"], [0, "&boxDl;"], [0, "&boxDL;"], [0, "&boxuR;"], [0, "&boxUr;"], [0, "&boxUR;"], [0, "&boxuL;"], [0, "&boxUl;"], [0, "&boxUL;"], [0, "&boxvR;"], [0, "&boxVr;"], [0, "&boxVR;"], [0, "&boxvL;"], [0, "&boxVl;"], [0, "&boxVL;"], [0, "&boxHd;"], [0, "&boxhD;"], [0, "&boxHD;"], [0, "&boxHu;"], [0, "&boxhU;"], [0, "&boxHU;"], [0, "&boxvH;"], [0, "&boxVh;"], [0, "&boxVH;"], [19, "&uhblk;"], [3, "&lhblk;"], [3, "&block;"], [8, "&blk14;"], [0, "&blk12;"], [0, "&blk34;"], [13, "&square;"], [8, "&blacksquare;"], [0, "&EmptyVerySmallSquare;"], [1, "&rect;"], [0, "&marker;"], [2, "&fltns;"], [1, "&bigtriangleup;"], [0, "&blacktriangle;"], [0, "&triangle;"], [2, "&blacktriangleright;"], [0, "&rtri;"], [3, "&bigtriangledown;"], [0, "&blacktriangledown;"], [0, "&dtri;"], [2, "&blacktriangleleft;"], [0, "&ltri;"], [6, "&loz;"], [0, "&cir;"], [32, "&tridot;"], [2, "&bigcirc;"], [8, "&ultri;"], [0, "&urtri;"], [0, "&lltri;"], [0, "&EmptySmallSquare;"], [0, "&FilledSmallSquare;"], [8, "&bigstar;"], [0, "&star;"], [7, "&phone;"], [49, "&female;"], [1, "&male;"], [29, "&spades;"], [2, "&clubs;"], [1, "&hearts;"], [0, "&diamondsuit;"], [3, "&sung;"], [2, "&flat;"], [0, "&natural;"], [0, "&sharp;"], [163, "&check;"], [3, "&cross;"], [8, "&malt;"], [21, "&sext;"], [33, "&VerticalSeparator;"], [25, "&lbbrk;"], [0, "&rbbrk;"], [84, "&bsolhsub;"], [0, "&suphsol;"], [28, "&LeftDoubleBracket;"], [0, "&RightDoubleBracket;"], [0, "&lang;"], [0, "&rang;"], [0, "&Lang;"], [0, "&Rang;"], [0, "&loang;"], [0, "&roang;"], [7, "&longleftarrow;"], [0, "&longrightarrow;"], [0, "&longleftrightarrow;"], [0, "&DoubleLongLeftArrow;"], [0, "&DoubleLongRightArrow;"], [0, "&DoubleLongLeftRightArrow;"], [1, "&longmapsto;"], [2, "&dzigrarr;"], [258, "&nvlArr;"], [0, "&nvrArr;"], [0, "&nvHarr;"], [0, "&Map;"], [6, "&lbarr;"], [0, "&bkarow;"], [0, "&lBarr;"], [0, "&dbkarow;"], [0, "&drbkarow;"], [0, "&DDotrahd;"], [0, "&UpArrowBar;"], [0, "&DownArrowBar;"], [2, "&Rarrtl;"], [2, "&latail;"], [0, "&ratail;"], [0, "&lAtail;"], [0, "&rAtail;"], [0, "&larrfs;"], [0, "&rarrfs;"], [0, "&larrbfs;"], [0, "&rarrbfs;"], [2, "&nwarhk;"], [0, "&nearhk;"], [0, "&hksearow;"], [0, "&hkswarow;"], [0, "&nwnear;"], [0, "&nesear;"], [0, "&seswar;"], [0, "&swnwar;"], [8, { v: "&rarrc;", n: 824, o: "&nrarrc;" }], [1, "&cudarrr;"], [0, "&ldca;"], [0, "&rdca;"], [0, "&cudarrl;"], [0, "&larrpl;"], [2, "&curarrm;"], [0, "&cularrp;"], [7, "&rarrpl;"], [2, "&harrcir;"], [0, "&Uarrocir;"], [0, "&lurdshar;"], [0, "&ldrushar;"], [2, "&LeftRightVector;"], [0, "&RightUpDownVector;"], [0, "&DownLeftRightVector;"], [0, "&LeftUpDownVector;"], [0, "&LeftVectorBar;"], [0, "&RightVectorBar;"], [0, "&RightUpVectorBar;"], [0, "&RightDownVectorBar;"], [0, "&DownLeftVectorBar;"], [0, "&DownRightVectorBar;"], [0, "&LeftUpVectorBar;"], [0, "&LeftDownVectorBar;"], [0, "&LeftTeeVector;"], [0, "&RightTeeVector;"], [0, "&RightUpTeeVector;"], [0, "&RightDownTeeVector;"], [0, "&DownLeftTeeVector;"], [0, "&DownRightTeeVector;"], [0, "&LeftUpTeeVector;"], [0, "&LeftDownTeeVector;"], [0, "&lHar;"], [0, "&uHar;"], [0, "&rHar;"], [0, "&dHar;"], [0, "&luruhar;"], [0, "&ldrdhar;"], [0, "&ruluhar;"], [0, "&rdldhar;"], [0, "&lharul;"], [0, "&llhard;"], [0, "&rharul;"], [0, "&lrhard;"], [0, "&udhar;"], [0, "&duhar;"], [0, "&RoundImplies;"], [0, "&erarr;"], [0, "&simrarr;"], [0, "&larrsim;"], [0, "&rarrsim;"], [0, "&rarrap;"], [0, "&ltlarr;"], [1, "&gtrarr;"], [0, "&subrarr;"], [1, "&suplarr;"], [0, "&lfisht;"], [0, "&rfisht;"], [0, "&ufisht;"], [0, "&dfisht;"], [5, "&lopar;"], [0, "&ropar;"], [4, "&lbrke;"], [0, "&rbrke;"], [0, "&lbrkslu;"], [0, "&rbrksld;"], [0, "&lbrksld;"], [0, "&rbrkslu;"], [0, "&langd;"], [0, "&rangd;"], [0, "&lparlt;"], [0, "&rpargt;"], [0, "&gtlPar;"], [0, "&ltrPar;"], [3, "&vzigzag;"], [1, "&vangrt;"], [0, "&angrtvbd;"], [6, "&ange;"], [0, "&range;"], [0, "&dwangle;"], [0, "&uwangle;"], [0, "&angmsdaa;"], [0, "&angmsdab;"], [0, "&angmsdac;"], [0, "&angmsdad;"], [0, "&angmsdae;"], [0, "&angmsdaf;"], [0, "&angmsdag;"], [0, "&angmsdah;"], [0, "&bemptyv;"], [0, "&demptyv;"], [0, "&cemptyv;"], [0, "&raemptyv;"], [0, "&laemptyv;"], [0, "&ohbar;"], [0, "&omid;"], [0, "&opar;"], [1, "&operp;"], [1, "&olcross;"], [0, "&odsold;"], [1, "&olcir;"], [0, "&ofcir;"], [0, "&olt;"], [0, "&ogt;"], [0, "&cirscir;"], [0, "&cirE;"], [0, "&solb;"], [0, "&bsolb;"], [3, "&boxbox;"], [3, "&trisb;"], [0, "&rtriltri;"], [0, { v: "&LeftTriangleBar;", n: 824, o: "&NotLeftTriangleBar;" }], [0, { v: "&RightTriangleBar;", n: 824, o: "&NotRightTriangleBar;" }], [11, "&iinfin;"], [0, "&infintie;"], [0, "&nvinfin;"], [4, "&eparsl;"], [0, "&smeparsl;"], [0, "&eqvparsl;"], [5, "&blacklozenge;"], [8, "&RuleDelayed;"], [1, "&dsol;"], [9, "&bigodot;"], [0, "&bigoplus;"], [0, "&bigotimes;"], [1, "&biguplus;"], [1, "&bigsqcup;"], [5, "&iiiint;"], [0, "&fpartint;"], [2, "&cirfnint;"], [0, "&awint;"], [0, "&rppolint;"], [0, "&scpolint;"], [0, "&npolint;"], [0, "&pointint;"], [0, "&quatint;"], [0, "&intlarhk;"], [10, "&pluscir;"], [0, "&plusacir;"], [0, "&simplus;"], [0, "&plusdu;"], [0, "&plussim;"], [0, "&plustwo;"], [1, "&mcomma;"], [0, "&minusdu;"], [2, "&loplus;"], [0, "&roplus;"], [0, "&Cross;"], [0, "&timesd;"], [0, "&timesbar;"], [1, "&smashp;"], [0, "&lotimes;"], [0, "&rotimes;"], [0, "&otimesas;"], [0, "&Otimes;"], [0, "&odiv;"], [0, "&triplus;"], [0, "&triminus;"], [0, "&tritime;"], [0, "&intprod;"], [2, "&amalg;"], [0, "&capdot;"], [1, "&ncup;"], [0, "&ncap;"], [0, "&capand;"], [0, "&cupor;"], [0, "&cupcap;"], [0, "&capcup;"], [0, "&cupbrcap;"], [0, "&capbrcup;"], [0, "&cupcup;"], [0, "&capcap;"], [0, "&ccups;"], [0, "&ccaps;"], [2, "&ccupssm;"], [2, "&And;"], [0, "&Or;"], [0, "&andand;"], [0, "&oror;"], [0, "&orslope;"], [0, "&andslope;"], [1, "&andv;"], [0, "&orv;"], [0, "&andd;"], [0, "&ord;"], [1, "&wedbar;"], [6, "&sdote;"], [3, "&simdot;"], [2, { v: "&congdot;", n: 824, o: "&ncongdot;" }], [0, "&easter;"], [0, "&apacir;"], [0, { v: "&apE;", n: 824, o: "&napE;" }], [0, "&eplus;"], [0, "&pluse;"], [0, "&Esim;"], [0, "&Colone;"], [0, "&Equal;"], [1, "&ddotseq;"], [0, "&equivDD;"], [0, "&ltcir;"], [0, "&gtcir;"], [0, "&ltquest;"], [0, "&gtquest;"], [0, { v: "&leqslant;", n: 824, o: "&nleqslant;" }], [0, { v: "&geqslant;", n: 824, o: "&ngeqslant;" }], [0, "&lesdot;"], [0, "&gesdot;"], [0, "&lesdoto;"], [0, "&gesdoto;"], [0, "&lesdotor;"], [0, "&gesdotol;"], [0, "&lap;"], [0, "&gap;"], [0, "&lne;"], [0, "&gne;"], [0, "&lnap;"], [0, "&gnap;"], [0, "&lEg;"], [0, "&gEl;"], [0, "&lsime;"], [0, "&gsime;"], [0, "&lsimg;"], [0, "&gsiml;"], [0, "&lgE;"], [0, "&glE;"], [0, "&lesges;"], [0, "&gesles;"], [0, "&els;"], [0, "&egs;"], [0, "&elsdot;"], [0, "&egsdot;"], [0, "&el;"], [0, "&eg;"], [2, "&siml;"], [0, "&simg;"], [0, "&simlE;"], [0, "&simgE;"], [0, { v: "&LessLess;", n: 824, o: "&NotNestedLessLess;" }], [0, { v: "&GreaterGreater;", n: 824, o: "&NotNestedGreaterGreater;" }], [1, "&glj;"], [0, "&gla;"], [0, "&ltcc;"], [0, "&gtcc;"], [0, "&lescc;"], [0, "&gescc;"], [0, "&smt;"], [0, "&lat;"], [0, { v: "&smte;", n: 65024, o: "&smtes;" }], [0, { v: "&late;", n: 65024, o: "&lates;" }], [0, "&bumpE;"], [0, { v: "&PrecedesEqual;", n: 824, o: "&NotPrecedesEqual;" }], [0, { v: "&sce;", n: 824, o: "&NotSucceedsEqual;" }], [2, "&prE;"], [0, "&scE;"], [0, "&precneqq;"], [0, "&scnE;"], [0, "&prap;"], [0, "&scap;"], [0, "&precnapprox;"], [0, "&scnap;"], [0, "&Pr;"], [0, "&Sc;"], [0, "&subdot;"], [0, "&supdot;"], [0, "&subplus;"], [0, "&supplus;"], [0, "&submult;"], [0, "&supmult;"], [0, "&subedot;"], [0, "&supedot;"], [0, { v: "&subE;", n: 824, o: "&nsubE;" }], [0, { v: "&supE;", n: 824, o: "&nsupE;" }], [0, "&subsim;"], [0, "&supsim;"], [2, { v: "&subnE;", n: 65024, o: "&varsubsetneqq;" }], [0, { v: "&supnE;", n: 65024, o: "&varsupsetneqq;" }], [2, "&csub;"], [0, "&csup;"], [0, "&csube;"], [0, "&csupe;"], [0, "&subsup;"], [0, "&supsub;"], [0, "&subsub;"], [0, "&supsup;"], [0, "&suphsub;"], [0, "&supdsub;"], [0, "&forkv;"], [0, "&topfork;"], [0, "&mlcp;"], [8, "&Dashv;"], [1, "&Vdashl;"], [0, "&Barv;"], [0, "&vBar;"], [0, "&vBarv;"], [1, "&Vbar;"], [0, "&Not;"], [0, "&bNot;"], [0, "&rnmid;"], [0, "&cirmid;"], [0, "&midcir;"], [0, "&topcir;"], [0, "&nhpar;"], [0, "&parsim;"], [9, { v: "&parsl;", n: 8421, o: "&nparsl;" }], [44343, { n: new Map(/* @__PURE__ */ zv([[56476, "&Ascr;"], [1, "&Cscr;"], [0, "&Dscr;"], [2, "&Gscr;"], [2, "&Jscr;"], [0, "&Kscr;"], [2, "&Nscr;"], [0, "&Oscr;"], [0, "&Pscr;"], [0, "&Qscr;"], [1, "&Sscr;"], [0, "&Tscr;"], [0, "&Uscr;"], [0, "&Vscr;"], [0, "&Wscr;"], [0, "&Xscr;"], [0, "&Yscr;"], [0, "&Zscr;"], [0, "&ascr;"], [0, "&bscr;"], [0, "&cscr;"], [0, "&dscr;"], [1, "&fscr;"], [1, "&hscr;"], [0, "&iscr;"], [0, "&jscr;"], [0, "&kscr;"], [0, "&lscr;"], [0, "&mscr;"], [0, "&nscr;"], [1, "&pscr;"], [0, "&qscr;"], [0, "&rscr;"], [0, "&sscr;"], [0, "&tscr;"], [0, "&uscr;"], [0, "&vscr;"], [0, "&wscr;"], [0, "&xscr;"], [0, "&yscr;"], [0, "&zscr;"], [52, "&Afr;"], [0, "&Bfr;"], [1, "&Dfr;"], [0, "&Efr;"], [0, "&Ffr;"], [0, "&Gfr;"], [2, "&Jfr;"], [0, "&Kfr;"], [0, "&Lfr;"], [0, "&Mfr;"], [0, "&Nfr;"], [0, "&Ofr;"], [0, "&Pfr;"], [0, "&Qfr;"], [1, "&Sfr;"], [0, "&Tfr;"], [0, "&Ufr;"], [0, "&Vfr;"], [0, "&Wfr;"], [0, "&Xfr;"], [0, "&Yfr;"], [1, "&afr;"], [0, "&bfr;"], [0, "&cfr;"], [0, "&dfr;"], [0, "&efr;"], [0, "&ffr;"], [0, "&gfr;"], [0, "&hfr;"], [0, "&ifr;"], [0, "&jfr;"], [0, "&kfr;"], [0, "&lfr;"], [0, "&mfr;"], [0, "&nfr;"], [0, "&ofr;"], [0, "&pfr;"], [0, "&qfr;"], [0, "&rfr;"], [0, "&sfr;"], [0, "&tfr;"], [0, "&ufr;"], [0, "&vfr;"], [0, "&wfr;"], [0, "&xfr;"], [0, "&yfr;"], [0, "&zfr;"], [0, "&Aopf;"], [0, "&Bopf;"], [1, "&Dopf;"], [0, "&Eopf;"], [0, "&Fopf;"], [0, "&Gopf;"], [1, "&Iopf;"], [0, "&Jopf;"], [0, "&Kopf;"], [0, "&Lopf;"], [0, "&Mopf;"], [1, "&Oopf;"], [3, "&Sopf;"], [0, "&Topf;"], [0, "&Uopf;"], [0, "&Vopf;"], [0, "&Wopf;"], [0, "&Xopf;"], [0, "&Yopf;"], [1, "&aopf;"], [0, "&bopf;"], [0, "&copf;"], [0, "&dopf;"], [0, "&eopf;"], [0, "&fopf;"], [0, "&gopf;"], [0, "&hopf;"], [0, "&iopf;"], [0, "&jopf;"], [0, "&kopf;"], [0, "&lopf;"], [0, "&mopf;"], [0, "&nopf;"], [0, "&oopf;"], [0, "&popf;"], [0, "&qopf;"], [0, "&ropf;"], [0, "&sopf;"], [0, "&topf;"], [0, "&uopf;"], [0, "&vopf;"], [0, "&wopf;"], [0, "&xopf;"], [0, "&yopf;"], [0, "&zopf;"]])) }], [8906, "&fflig;"], [0, "&filig;"], [0, "&fllig;"], [0, "&ffilig;"], [0, "&ffllig;"]]));
var Jy = {};
(function(t) {
  Object.defineProperty(t, "__esModule", { value: !0 }), t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.getCodePoint = t.xmlReplacer = void 0, t.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
  var e = /* @__PURE__ */ new Map([
    [34, "&quot;"],
    [38, "&amp;"],
    [39, "&apos;"],
    [60, "&lt;"],
    [62, "&gt;"]
  ]);
  t.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
  String.prototype.codePointAt != null ? function(r, s) {
    return r.codePointAt(s);
  } : (
    // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
    function(r, s) {
      return (r.charCodeAt(s) & 64512) === 55296 ? (r.charCodeAt(s) - 55296) * 1024 + r.charCodeAt(s + 1) - 56320 + 65536 : r.charCodeAt(s);
    }
  );
  function n(r) {
    for (var s = "", o = 0, a; (a = t.xmlReplacer.exec(r)) !== null; ) {
      var l = a.index, u = r.charCodeAt(l), f = e.get(u);
      f !== void 0 ? (s += r.substring(o, l) + f, o = l + 1) : (s += "".concat(r.substring(o, l), "&#x").concat((0, t.getCodePoint)(r, l).toString(16), ";"), o = t.xmlReplacer.lastIndex += +((u & 64512) === 55296));
    }
    return s + r.substr(o);
  }
  t.encodeXML = n, t.escape = n;
  function i(r, s) {
    return function(a) {
      for (var l, u = 0, f = ""; l = r.exec(a); )
        u !== l.index && (f += a.substring(u, l.index)), f += s.get(l[0].charCodeAt(0)), u = l.index + 1;
      return f + a.substring(u);
    };
  }
  t.escapeUTF8 = i(/[&<>'"]/g, e), t.escapeAttribute = i(/["&\u00A0]/g, /* @__PURE__ */ new Map([
    [34, "&quot;"],
    [38, "&amp;"],
    [160, "&nbsp;"]
  ])), t.escapeText = i(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
    [38, "&amp;"],
    [60, "&lt;"],
    [62, "&gt;"],
    [160, "&nbsp;"]
  ]));
})(Jy);
var Wie = on && on.__importDefault || function(t) {
  return t && t.__esModule ? t : { default: t };
};
Object.defineProperty(pf, "__esModule", { value: !0 });
pf.encodeNonAsciiHTML = pf.encodeHTML = void 0;
var Hie = Wie(m5), GF = Jy, Qie = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
function Uie(t) {
  return KF(Qie, t);
}
pf.encodeHTML = Uie;
function Zie(t) {
  return KF(GF.xmlReplacer, t);
}
pf.encodeNonAsciiHTML = Zie;
function KF(t, e) {
  for (var n = "", i = 0, r; (r = t.exec(e)) !== null; ) {
    var s = r.index;
    n += e.substring(i, s);
    var o = e.charCodeAt(s), a = Hie.default.get(o);
    if (typeof a == "object") {
      if (s + 1 < e.length) {
        var l = e.charCodeAt(s + 1), u = typeof a.n == "number" ? a.n === l ? a.o : void 0 : a.n.get(l);
        if (u !== void 0) {
          n += u, i = t.lastIndex += 1;
          continue;
        }
      }
      a = a.v;
    }
    if (a !== void 0)
      n += a, i = s + 1;
    else {
      var f = (0, GF.getCodePoint)(e, s);
      n += "&#x".concat(f.toString(16), ";"), i = t.lastIndex += +(f !== o);
    }
  }
  return n + e.substr(i);
}
(function(t) {
  Object.defineProperty(t, "__esModule", { value: !0 }), t.decodeXMLStrict = t.decodeHTML5Strict = t.decodeHTML4Strict = t.decodeHTML5 = t.decodeHTML4 = t.decodeHTMLAttribute = t.decodeHTMLStrict = t.decodeHTML = t.decodeXML = t.DecodingMode = t.EntityDecoder = t.encodeHTML5 = t.encodeHTML4 = t.encodeNonAsciiHTML = t.encodeHTML = t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.encode = t.decodeStrict = t.decode = t.EncodingMode = t.EntityLevel = void 0;
  var e = a4, n = pf, i = Jy, r;
  (function(h) {
    h[h.XML = 0] = "XML", h[h.HTML = 1] = "HTML";
  })(r = t.EntityLevel || (t.EntityLevel = {}));
  var s;
  (function(h) {
    h[h.UTF8 = 0] = "UTF8", h[h.ASCII = 1] = "ASCII", h[h.Extensive = 2] = "Extensive", h[h.Attribute = 3] = "Attribute", h[h.Text = 4] = "Text";
  })(s = t.EncodingMode || (t.EncodingMode = {}));
  function o(h, m) {
    m === void 0 && (m = r.XML);
    var g = typeof m == "number" ? m : m.level;
    if (g === r.HTML) {
      var w = typeof m == "object" ? m.mode : void 0;
      return (0, e.decodeHTML)(h, w);
    }
    return (0, e.decodeXML)(h);
  }
  t.decode = o;
  function a(h, m) {
    var g;
    m === void 0 && (m = r.XML);
    var w = typeof m == "number" ? { level: m } : m;
    return (g = w.mode) !== null && g !== void 0 || (w.mode = e.DecodingMode.Strict), o(h, w);
  }
  t.decodeStrict = a;
  function l(h, m) {
    m === void 0 && (m = r.XML);
    var g = typeof m == "number" ? { level: m } : m;
    return g.mode === s.UTF8 ? (0, i.escapeUTF8)(h) : g.mode === s.Attribute ? (0, i.escapeAttribute)(h) : g.mode === s.Text ? (0, i.escapeText)(h) : g.level === r.HTML ? g.mode === s.ASCII ? (0, n.encodeNonAsciiHTML)(h) : (0, n.encodeHTML)(h) : (0, i.encodeXML)(h);
  }
  t.encode = l;
  var u = Jy;
  Object.defineProperty(t, "encodeXML", { enumerable: !0, get: function() {
    return u.encodeXML;
  } }), Object.defineProperty(t, "escape", { enumerable: !0, get: function() {
    return u.escape;
  } }), Object.defineProperty(t, "escapeUTF8", { enumerable: !0, get: function() {
    return u.escapeUTF8;
  } }), Object.defineProperty(t, "escapeAttribute", { enumerable: !0, get: function() {
    return u.escapeAttribute;
  } }), Object.defineProperty(t, "escapeText", { enumerable: !0, get: function() {
    return u.escapeText;
  } });
  var f = pf;
  Object.defineProperty(t, "encodeHTML", { enumerable: !0, get: function() {
    return f.encodeHTML;
  } }), Object.defineProperty(t, "encodeNonAsciiHTML", { enumerable: !0, get: function() {
    return f.encodeNonAsciiHTML;
  } }), Object.defineProperty(t, "encodeHTML4", { enumerable: !0, get: function() {
    return f.encodeHTML;
  } }), Object.defineProperty(t, "encodeHTML5", { enumerable: !0, get: function() {
    return f.encodeHTML;
  } });
  var d = a4;
  Object.defineProperty(t, "EntityDecoder", { enumerable: !0, get: function() {
    return d.EntityDecoder;
  } }), Object.defineProperty(t, "DecodingMode", { enumerable: !0, get: function() {
    return d.DecodingMode;
  } }), Object.defineProperty(t, "decodeXML", { enumerable: !0, get: function() {
    return d.decodeXML;
  } }), Object.defineProperty(t, "decodeHTML", { enumerable: !0, get: function() {
    return d.decodeHTML;
  } }), Object.defineProperty(t, "decodeHTMLStrict", { enumerable: !0, get: function() {
    return d.decodeHTMLStrict;
  } }), Object.defineProperty(t, "decodeHTMLAttribute", { enumerable: !0, get: function() {
    return d.decodeHTMLAttribute;
  } }), Object.defineProperty(t, "decodeHTML4", { enumerable: !0, get: function() {
    return d.decodeHTML;
  } }), Object.defineProperty(t, "decodeHTML5", { enumerable: !0, get: function() {
    return d.decodeHTML;
  } }), Object.defineProperty(t, "decodeHTML4Strict", { enumerable: !0, get: function() {
    return d.decodeHTMLStrict;
  } }), Object.defineProperty(t, "decodeHTML5Strict", { enumerable: !0, get: function() {
    return d.decodeHTMLStrict;
  } }), Object.defineProperty(t, "decodeXMLStrict", { enumerable: !0, get: function() {
    return d.decodeXML;
  } });
})(XF);
var Wv = Nf;
function qie(t) {
  const e = {};
  t = t || {}, e.src_Any = Wv.Any.source, e.src_Cc = Wv.Cc.source, e.src_Z = Wv.Z.source, e.src_P = Wv.P.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|");
  const n = "[><｜]";
  return e.src_pseudo_letter = "(?:(?!" + n + "|" + e.src_ZPCc + ")" + e.src_Any + ")", e.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", e.src_auth = "(?:(?:(?!" + e.src_ZCc + "|[@/\\[\\]()]).)+@)?", e.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", e.src_host_terminator = "(?=$|" + n + "|" + e.src_ZPCc + ")(?!" + (t["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + e.src_ZPCc + "))", e.src_path = "(?:[/?#](?:(?!" + e.src_ZCc + "|" + n + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + e.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + e.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + e.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + e.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + e.src_ZCc + "|[']).)+\\'|\\'(?=" + e.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + e.src_ZCc + "|[.]|$)|" + (t["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + // allow `,,,` in paths
  ",(?!" + e.src_ZCc + "|$)|;(?!" + e.src_ZCc + "|$)|\\!+(?!" + e.src_ZCc + "|[!]|$)|\\?(?!" + e.src_ZCc + "|[?]|$))+|\\/)?", e.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', e.src_xn = "xn--[a-z0-9\\-]{1,59}", e.src_domain_root = // Allow letters & digits (http://test1)
  "(?:" + e.src_xn + "|" + e.src_pseudo_letter + "{1,63})", e.src_domain = "(?:" + e.src_xn + "|(?:" + e.src_pseudo_letter + ")|(?:" + e.src_pseudo_letter + "(?:-|" + e.src_pseudo_letter + "){0,61}" + e.src_pseudo_letter + "))", e.src_host = "(?:(?:(?:(?:" + e.src_domain + ")\\.)*" + e.src_domain + "))", e.tpl_host_fuzzy = "(?:" + e.src_ip4 + "|(?:(?:(?:" + e.src_domain + ")\\.)+(?:%TLDS%)))", e.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + e.src_domain + ")\\.)+(?:%TLDS%))", e.src_host_strict = e.src_host + e.src_host_terminator, e.tpl_host_fuzzy_strict = e.tpl_host_fuzzy + e.src_host_terminator, e.src_host_port_strict = e.src_host + e.src_port + e.src_host_terminator, e.tpl_host_port_fuzzy_strict = e.tpl_host_fuzzy + e.src_port + e.src_host_terminator, e.tpl_host_port_no_ip_fuzzy_strict = e.tpl_host_no_ip_fuzzy + e.src_port + e.src_host_terminator, e.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + e.src_ZPCc + "|>|$))", e.tpl_email_fuzzy = "(^|" + n + '|"|\\(|' + e.src_ZCc + ")(" + e.src_email_name + "@" + e.tpl_host_fuzzy_strict + ")", e.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation.
  // but can start with > (markdown blockquote)
  "(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|" + e.src_ZPCc + "))((?![$+<=>^`|｜])" + e.tpl_host_port_fuzzy_strict + e.src_path + ")", e.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation.
  // but can start with > (markdown blockquote)
  "(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|" + e.src_ZPCc + "))((?![$+<=>^`|｜])" + e.tpl_host_port_no_ip_fuzzy_strict + e.src_path + ")", e;
}
function u4(t) {
  return Array.prototype.slice.call(arguments, 1).forEach(function(n) {
    n && Object.keys(n).forEach(function(i) {
      t[i] = n[i];
    });
  }), t;
}
function Wk(t) {
  return Object.prototype.toString.call(t);
}
function Yie(t) {
  return Wk(t) === "[object String]";
}
function Vie(t) {
  return Wk(t) === "[object Object]";
}
function Xie(t) {
  return Wk(t) === "[object RegExp]";
}
function kM(t) {
  return Wk(t) === "[object Function]";
}
function Gie(t) {
  return t.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
}
const JF = {
  fuzzyLink: !0,
  fuzzyEmail: !0,
  fuzzyIP: !1
};
function Kie(t) {
  return Object.keys(t || {}).reduce(function(e, n) {
    return e || JF.hasOwnProperty(n);
  }, !1);
}
const Jie = {
  "http:": {
    validate: function(t, e, n) {
      const i = t.slice(e);
      return n.re.http || (n.re.http = new RegExp(
        "^\\/\\/" + n.re.src_auth + n.re.src_host_port_strict + n.re.src_path,
        "i"
      )), n.re.http.test(i) ? i.match(n.re.http)[0].length : 0;
    }
  },
  "https:": "http:",
  "ftp:": "http:",
  "//": {
    validate: function(t, e, n) {
      const i = t.slice(e);
      return n.re.no_http || (n.re.no_http = new RegExp(
        "^" + n.re.src_auth + // Don't allow single-level domains, because of false positives like '//test'
        // with code comments
        "(?:localhost|(?:(?:" + n.re.src_domain + ")\\.)+" + n.re.src_domain_root + ")" + n.re.src_port + n.re.src_host_terminator + n.re.src_path,
        "i"
      )), n.re.no_http.test(i) ? e >= 3 && t[e - 3] === ":" || e >= 3 && t[e - 3] === "/" ? 0 : i.match(n.re.no_http)[0].length : 0;
    }
  },
  "mailto:": {
    validate: function(t, e, n) {
      const i = t.slice(e);
      return n.re.mailto || (n.re.mailto = new RegExp(
        "^" + n.re.src_email_name + "@" + n.re.src_host_strict,
        "i"
      )), n.re.mailto.test(i) ? i.match(n.re.mailto)[0].length : 0;
    }
  }
}, ere = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]", tre = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");
function nre(t) {
  t.__index__ = -1, t.__text_cache__ = "";
}
function ire(t) {
  return function(e, n) {
    const i = e.slice(n);
    return t.test(i) ? i.match(t)[0].length : 0;
  };
}
function xM() {
  return function(t, e) {
    e.normalize(t);
  };
}
function ew(t) {
  const e = t.re = qie(t.__opts__), n = t.__tlds__.slice();
  t.onCompile(), t.__tlds_replaced__ || n.push(ere), n.push(e.src_xn), e.src_tlds = n.join("|");
  function i(a) {
    return a.replace("%TLDS%", e.src_tlds);
  }
  e.email_fuzzy = RegExp(i(e.tpl_email_fuzzy), "i"), e.link_fuzzy = RegExp(i(e.tpl_link_fuzzy), "i"), e.link_no_ip_fuzzy = RegExp(i(e.tpl_link_no_ip_fuzzy), "i"), e.host_fuzzy_test = RegExp(i(e.tpl_host_fuzzy_test), "i");
  const r = [];
  t.__compiled__ = {};
  function s(a, l) {
    throw new Error('(LinkifyIt) Invalid schema "' + a + '": ' + l);
  }
  Object.keys(t.__schemas__).forEach(function(a) {
    const l = t.__schemas__[a];
    if (l === null)
      return;
    const u = { validate: null, link: null };
    if (t.__compiled__[a] = u, Vie(l)) {
      Xie(l.validate) ? u.validate = ire(l.validate) : kM(l.validate) ? u.validate = l.validate : s(a, l), kM(l.normalize) ? u.normalize = l.normalize : l.normalize ? s(a, l) : u.normalize = xM();
      return;
    }
    if (Yie(l)) {
      r.push(a);
      return;
    }
    s(a, l);
  }), r.forEach(function(a) {
    t.__compiled__[t.__schemas__[a]] && (t.__compiled__[a].validate = t.__compiled__[t.__schemas__[a]].validate, t.__compiled__[a].normalize = t.__compiled__[t.__schemas__[a]].normalize);
  }), t.__compiled__[""] = { validate: null, normalize: xM() };
  const o = Object.keys(t.__compiled__).filter(function(a) {
    return a.length > 0 && t.__compiled__[a];
  }).map(Gie).join("|");
  t.re.schema_test = RegExp("(^|(?!_)(?:[><｜]|" + e.src_ZPCc + "))(" + o + ")", "i"), t.re.schema_search = RegExp("(^|(?!_)(?:[><｜]|" + e.src_ZPCc + "))(" + o + ")", "ig"), t.re.schema_at_start = RegExp("^" + t.re.schema_search.source, "i"), t.re.pretest = RegExp(
    "(" + t.re.schema_test.source + ")|(" + t.re.host_fuzzy_test.source + ")|@",
    "i"
  ), nre(t);
}
function rre(t, e) {
  const n = t.__index__, i = t.__last_index__, r = t.__text_cache__.slice(n, i);
  this.schema = t.__schema__.toLowerCase(), this.index = n + e, this.lastIndex = i + e, this.raw = r, this.text = r, this.url = r;
}
function c4(t, e) {
  const n = new rre(t, e);
  return t.__compiled__[n.schema].normalize(n, t), n;
}
function Ys(t, e) {
  if (!(this instanceof Ys))
    return new Ys(t, e);
  e || Kie(t) && (e = t, t = {}), this.__opts__ = u4({}, JF, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = u4({}, Jie, t), this.__compiled__ = {}, this.__tlds__ = tre, this.__tlds_replaced__ = !1, this.re = {}, ew(this);
}
Ys.prototype.add = function(e, n) {
  return this.__schemas__[e] = n, ew(this), this;
};
Ys.prototype.set = function(e) {
  return this.__opts__ = u4(this.__opts__, e), this;
};
Ys.prototype.test = function(e) {
  if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
    return !1;
  let n, i, r, s, o, a, l, u, f;
  if (this.re.schema_test.test(e)) {
    for (l = this.re.schema_search, l.lastIndex = 0; (n = l.exec(e)) !== null; )
      if (s = this.testSchemaAt(e, n[2], l.lastIndex), s) {
        this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + s;
        break;
      }
  }
  return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (u = e.search(this.re.host_fuzzy_test), u >= 0 && (this.__index__ < 0 || u < this.__index__) && (i = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (o = i.index + i[1].length, (this.__index__ < 0 || o < this.__index__) && (this.__schema__ = "", this.__index__ = o, this.__last_index__ = i.index + i[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (f = e.indexOf("@"), f >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (o = r.index + r[1].length, a = r.index + r[0].length, (this.__index__ < 0 || o < this.__index__ || o === this.__index__ && a > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = o, this.__last_index__ = a))), this.__index__ >= 0;
};
Ys.prototype.pretest = function(e) {
  return this.re.pretest.test(e);
};
Ys.prototype.testSchemaAt = function(e, n, i) {
  return this.__compiled__[n.toLowerCase()] ? this.__compiled__[n.toLowerCase()].validate(e, i, this) : 0;
};
Ys.prototype.match = function(e) {
  const n = [];
  let i = 0;
  this.__index__ >= 0 && this.__text_cache__ === e && (n.push(c4(this, i)), i = this.__last_index__);
  let r = i ? e.slice(i) : e;
  for (; this.test(r); )
    n.push(c4(this, i)), r = r.slice(this.__last_index__), i += this.__last_index__;
  return n.length ? n : null;
};
Ys.prototype.matchAtStart = function(e) {
  if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return null;
  const n = this.re.schema_at_start.exec(e);
  if (!n) return null;
  const i = this.testSchemaAt(e, n[2], n[0].length);
  return i ? (this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + i, c4(this, 0)) : null;
};
Ys.prototype.tlds = function(e, n) {
  return e = Array.isArray(e) ? e : [e], n ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(i, r, s) {
    return i !== s[r - 1];
  }).reverse(), ew(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, ew(this), this);
};
Ys.prototype.normalize = function(e) {
  e.schema || (e.url = "http://" + e.url), e.schema === "mailto:" && !/^mailto:/i.test(e.url) && (e.url = "mailto:" + e.url);
};
Ys.prototype.onCompile = function() {
};
var sre = Ys;
const lh = 2147483647, ba = 36, g5 = 1, Kg = 26, ore = 38, are = 700, eB = 72, tB = 128, nB = "-", lre = /^xn--/, ure = /[^\0-\x7F]/, cre = /[\x2E\u3002\uFF0E\uFF61]/g, fre = {
  overflow: "Overflow: input needs wider integers to process",
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  "invalid-input": "Invalid input"
}, p3 = ba - g5, ya = Math.floor, m3 = String.fromCharCode;
function du(t) {
  throw new RangeError(fre[t]);
}
function dre(t, e) {
  const n = [];
  let i = t.length;
  for (; i--; )
    n[i] = e(t[i]);
  return n;
}
function iB(t, e) {
  const n = t.split("@");
  let i = "";
  n.length > 1 && (i = n[0] + "@", t = n[1]), t = t.replace(cre, ".");
  const r = t.split("."), s = dre(r, e).join(".");
  return i + s;
}
function v5(t) {
  const e = [];
  let n = 0;
  const i = t.length;
  for (; n < i; ) {
    const r = t.charCodeAt(n++);
    if (r >= 55296 && r <= 56319 && n < i) {
      const s = t.charCodeAt(n++);
      (s & 64512) == 56320 ? e.push(((r & 1023) << 10) + (s & 1023) + 65536) : (e.push(r), n--);
    } else
      e.push(r);
  }
  return e;
}
const rB = (t) => String.fromCodePoint(...t), hre = function(t) {
  return t >= 48 && t < 58 ? 26 + (t - 48) : t >= 65 && t < 91 ? t - 65 : t >= 97 && t < 123 ? t - 97 : ba;
}, _M = function(t, e) {
  return t + 22 + 75 * (t < 26) - ((e != 0) << 5);
}, sB = function(t, e, n) {
  let i = 0;
  for (t = n ? ya(t / are) : t >> 1, t += ya(t / e); t > p3 * Kg >> 1; i += ba)
    t = ya(t / p3);
  return ya(i + (p3 + 1) * t / (t + ore));
}, b5 = function(t) {
  const e = [], n = t.length;
  let i = 0, r = tB, s = eB, o = t.lastIndexOf(nB);
  o < 0 && (o = 0);
  for (let a = 0; a < o; ++a)
    t.charCodeAt(a) >= 128 && du("not-basic"), e.push(t.charCodeAt(a));
  for (let a = o > 0 ? o + 1 : 0; a < n; ) {
    const l = i;
    for (let f = 1, d = ba; ; d += ba) {
      a >= n && du("invalid-input");
      const h = hre(t.charCodeAt(a++));
      h >= ba && du("invalid-input"), h > ya((lh - i) / f) && du("overflow"), i += h * f;
      const m = d <= s ? g5 : d >= s + Kg ? Kg : d - s;
      if (h < m)
        break;
      const g = ba - m;
      f > ya(lh / g) && du("overflow"), f *= g;
    }
    const u = e.length + 1;
    s = sB(i - l, u, l == 0), ya(i / u) > lh - r && du("overflow"), r += ya(i / u), i %= u, e.splice(i++, 0, r);
  }
  return String.fromCodePoint(...e);
}, y5 = function(t) {
  const e = [];
  t = v5(t);
  const n = t.length;
  let i = tB, r = 0, s = eB;
  for (const l of t)
    l < 128 && e.push(m3(l));
  const o = e.length;
  let a = o;
  for (o && e.push(nB); a < n; ) {
    let l = lh;
    for (const f of t)
      f >= i && f < l && (l = f);
    const u = a + 1;
    l - i > ya((lh - r) / u) && du("overflow"), r += (l - i) * u, i = l;
    for (const f of t)
      if (f < i && ++r > lh && du("overflow"), f === i) {
        let d = r;
        for (let h = ba; ; h += ba) {
          const m = h <= s ? g5 : h >= s + Kg ? Kg : h - s;
          if (d < m)
            break;
          const g = d - m, w = ba - m;
          e.push(
            m3(_M(m + g % w, 0))
          ), d = ya(g / w);
        }
        e.push(m3(_M(d, 0))), s = sB(r, u, a === o), r = 0, ++a;
      }
    ++r, ++i;
  }
  return e.join("");
}, oB = function(t) {
  return iB(t, function(e) {
    return lre.test(e) ? b5(e.slice(4).toLowerCase()) : e;
  });
}, aB = function(t) {
  return iB(t, function(e) {
    return ure.test(e) ? "xn--" + y5(e) : e;
  });
}, pre = {
  /**
   * A string representing the current Punycode.js version number.
   * @memberOf punycode
   * @type String
   */
  version: "2.3.1",
  /**
   * An object of methods to convert from JavaScript's internal character
   * representation (UCS-2) to Unicode code points, and back.
   * @see <https://mathiasbynens.be/notes/javascript-encoding>
   * @memberOf punycode
   * @type Object
   */
  ucs2: {
    decode: v5,
    encode: rB
  },
  decode: b5,
  encode: y5,
  toASCII: aB,
  toUnicode: oB
}, mre = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  decode: b5,
  default: pre,
  encode: y5,
  toASCII: aB,
  toUnicode: oB,
  ucs2decode: v5,
  ucs2encode: rB
}, Symbol.toStringTag, { value: "Module" })), gre = /* @__PURE__ */ Sk(mre);
var vre = s1, bre = Nf, lB = XF, yre = sre, uB = gre;
function cB(t) {
  var e = /* @__PURE__ */ Object.create(null);
  return t && Object.keys(t).forEach(function(n) {
    if (n !== "default") {
      var i = Object.getOwnPropertyDescriptor(t, n);
      Object.defineProperty(e, n, i.get ? i : {
        enumerable: !0,
        get: function() {
          return t[n];
        }
      });
    }
  }), e.default = t, Object.freeze(e);
}
var _u = /* @__PURE__ */ cB(vre), fB = /* @__PURE__ */ cB(bre);
function wre(t) {
  return Object.prototype.toString.call(t);
}
function w5(t) {
  return wre(t) === "[object String]";
}
const kre = Object.prototype.hasOwnProperty;
function xre(t, e) {
  return kre.call(t, e);
}
function Hk(t) {
  return Array.prototype.slice.call(arguments, 1).forEach(function(n) {
    if (n) {
      if (typeof n != "object")
        throw new TypeError(n + "must be object");
      Object.keys(n).forEach(function(i) {
        t[i] = n[i];
      });
    }
  }), t;
}
function dB(t, e, n) {
  return [].concat(t.slice(0, e), n, t.slice(e + 1));
}
function k5(t) {
  return !(t >= 55296 && t <= 57343 || t >= 64976 && t <= 65007 || (t & 65535) === 65535 || (t & 65535) === 65534 || t >= 0 && t <= 8 || t === 11 || t >= 14 && t <= 31 || t >= 127 && t <= 159 || t > 1114111);
}
function tw(t) {
  if (t > 65535) {
    t -= 65536;
    const e = 55296 + (t >> 10), n = 56320 + (t & 1023);
    return String.fromCharCode(e, n);
  }
  return String.fromCharCode(t);
}
const hB = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, _re = /&([a-z#][a-z0-9]{1,31});/gi, Ore = new RegExp(hB.source + "|" + _re.source, "gi"), Sre = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
function Cre(t, e) {
  if (e.charCodeAt(0) === 35 && Sre.test(e)) {
    const i = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
    return k5(i) ? tw(i) : t;
  }
  const n = lB.decodeHTML(t);
  return n !== t ? n : t;
}
function Ere(t) {
  return t.indexOf("\\") < 0 ? t : t.replace(hB, "$1");
}
function Jg(t) {
  return t.indexOf("\\") < 0 && t.indexOf("&") < 0 ? t : t.replace(Ore, function(e, n, i) {
    return n || Cre(e, i);
  });
}
const Tre = /[&<>"]/, $re = /[&<>"]/g, Mre = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;"
};
function Nre(t) {
  return Mre[t];
}
function Uu(t) {
  return Tre.test(t) ? t.replace($re, Nre) : t;
}
const Are = /[.?*+^$[\]\\(){}|-]/g;
function Dre(t) {
  return t.replace(Are, "\\$&");
}
function mn(t) {
  switch (t) {
    case 9:
    case 32:
      return !0;
  }
  return !1;
}
function e0(t) {
  if (t >= 8192 && t <= 8202)
    return !0;
  switch (t) {
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 32:
    case 160:
    case 5760:
    case 8239:
    case 8287:
    case 12288:
      return !0;
  }
  return !1;
}
function t0(t) {
  return fB.P.test(t);
}
function n0(t) {
  switch (t) {
    case 33:
    case 34:
    case 35:
    case 36:
    case 37:
    case 38:
    case 39:
    case 40:
    case 41:
    case 42:
    case 43:
    case 44:
    case 45:
    case 46:
    case 47:
    case 58:
    case 59:
    case 60:
    case 61:
    case 62:
    case 63:
    case 64:
    case 91:
    case 92:
    case 93:
    case 94:
    case 95:
    case 96:
    case 123:
    case 124:
    case 125:
    case 126:
      return !0;
    default:
      return !1;
  }
}
function Qk(t) {
  return t = t.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (t = t.replace(/ẞ/g, "ß")), t.toLowerCase().toUpperCase();
}
const Pre = {
  mdurl: _u,
  ucmicro: fB
};
var Ire = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  arrayReplaceAt: dB,
  assign: Hk,
  escapeHtml: Uu,
  escapeRE: Dre,
  fromCodePoint: tw,
  has: xre,
  isMdAsciiPunct: n0,
  isPunctChar: t0,
  isSpace: mn,
  isString: w5,
  isValidEntityCode: k5,
  isWhiteSpace: e0,
  lib: Pre,
  normalizeReference: Qk,
  unescapeAll: Jg,
  unescapeMd: Ere
});
function Lre(t, e, n) {
  let i, r, s, o;
  const a = t.posMax, l = t.pos;
  for (t.pos = e + 1, i = 1; t.pos < a; ) {
    if (s = t.src.charCodeAt(t.pos), s === 93 && (i--, i === 0)) {
      r = !0;
      break;
    }
    if (o = t.pos, t.md.inline.skipToken(t), s === 91) {
      if (o === t.pos - 1)
        i++;
      else if (n)
        return t.pos = l, -1;
    }
  }
  let u = -1;
  return r && (u = t.pos), t.pos = l, u;
}
function Rre(t, e, n) {
  let i, r = e;
  const s = {
    ok: !1,
    pos: 0,
    lines: 0,
    str: ""
  };
  if (t.charCodeAt(r) === 60) {
    for (r++; r < n; ) {
      if (i = t.charCodeAt(r), i === 10 || i === 60)
        return s;
      if (i === 62)
        return s.pos = r + 1, s.str = Jg(t.slice(e + 1, r)), s.ok = !0, s;
      if (i === 92 && r + 1 < n) {
        r += 2;
        continue;
      }
      r++;
    }
    return s;
  }
  let o = 0;
  for (; r < n && (i = t.charCodeAt(r), !(i === 32 || i < 32 || i === 127)); ) {
    if (i === 92 && r + 1 < n) {
      if (t.charCodeAt(r + 1) === 32)
        break;
      r += 2;
      continue;
    }
    if (i === 40 && (o++, o > 32))
      return s;
    if (i === 41) {
      if (o === 0)
        break;
      o--;
    }
    r++;
  }
  return e === r || o !== 0 || (s.str = Jg(t.slice(e, r)), s.pos = r, s.ok = !0), s;
}
function jre(t, e, n) {
  let i, r, s = 0, o = e;
  const a = {
    ok: !1,
    pos: 0,
    lines: 0,
    str: ""
  };
  if (o >= n || (r = t.charCodeAt(o), r !== 34 && r !== 39 && r !== 40))
    return a;
  for (o++, r === 40 && (r = 41); o < n; ) {
    if (i = t.charCodeAt(o), i === r)
      return a.pos = o + 1, a.lines = s, a.str = Jg(t.slice(e + 1, o)), a.ok = !0, a;
    if (i === 40 && r === 41)
      return a;
    i === 10 ? s++ : i === 92 && o + 1 < n && (o++, t.charCodeAt(o) === 10 && s++), o++;
  }
  return a;
}
var Fre = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  parseLinkDestination: Rre,
  parseLinkLabel: Lre,
  parseLinkTitle: jre
});
const ja = {};
ja.code_inline = function(t, e, n, i, r) {
  const s = t[e];
  return "<code" + r.renderAttrs(s) + ">" + Uu(s.content) + "</code>";
};
ja.code_block = function(t, e, n, i, r) {
  const s = t[e];
  return "<pre" + r.renderAttrs(s) + "><code>" + Uu(t[e].content) + `</code></pre>
`;
};
ja.fence = function(t, e, n, i, r) {
  const s = t[e], o = s.info ? Jg(s.info).trim() : "";
  let a = "", l = "";
  if (o) {
    const f = o.split(/(\s+)/g);
    a = f[0], l = f.slice(2).join("");
  }
  let u;
  if (n.highlight ? u = n.highlight(s.content, a, l) || Uu(s.content) : u = Uu(s.content), u.indexOf("<pre") === 0)
    return u + `
`;
  if (o) {
    const f = s.attrIndex("class"), d = s.attrs ? s.attrs.slice() : [];
    f < 0 ? d.push(["class", n.langPrefix + a]) : (d[f] = d[f].slice(), d[f][1] += " " + n.langPrefix + a);
    const h = {
      attrs: d
    };
    return `<pre><code${r.renderAttrs(h)}>${u}</code></pre>
`;
  }
  return `<pre><code${r.renderAttrs(s)}>${u}</code></pre>
`;
};
ja.image = function(t, e, n, i, r) {
  const s = t[e];
  return s.attrs[s.attrIndex("alt")][1] = r.renderInlineAsText(s.children, n, i), r.renderToken(t, e, n);
};
ja.hardbreak = function(t, e, n) {
  return n.xhtmlOut ? `<br />
` : `<br>
`;
};
ja.softbreak = function(t, e, n) {
  return n.breaks ? n.xhtmlOut ? `<br />
` : `<br>
` : `
`;
};
ja.text = function(t, e) {
  return Uu(t[e].content);
};
ja.html_block = function(t, e) {
  return t[e].content;
};
ja.html_inline = function(t, e) {
  return t[e].content;
};
function Kh() {
  this.rules = Hk({}, ja);
}
Kh.prototype.renderAttrs = function(e) {
  let n, i, r;
  if (!e.attrs)
    return "";
  for (r = "", n = 0, i = e.attrs.length; n < i; n++)
    r += " " + Uu(e.attrs[n][0]) + '="' + Uu(e.attrs[n][1]) + '"';
  return r;
};
Kh.prototype.renderToken = function(e, n, i) {
  const r = e[n];
  let s = "";
  if (r.hidden)
    return "";
  r.block && r.nesting !== -1 && n && e[n - 1].hidden && (s += `
`), s += (r.nesting === -1 ? "</" : "<") + r.tag, s += this.renderAttrs(r), r.nesting === 0 && i.xhtmlOut && (s += " /");
  let o = !1;
  if (r.block && (o = !0, r.nesting === 1 && n + 1 < e.length)) {
    const a = e[n + 1];
    (a.type === "inline" || a.hidden || a.nesting === -1 && a.tag === r.tag) && (o = !1);
  }
  return s += o ? `>
` : ">", s;
};
Kh.prototype.renderInline = function(t, e, n) {
  let i = "";
  const r = this.rules;
  for (let s = 0, o = t.length; s < o; s++) {
    const a = t[s].type;
    typeof r[a] < "u" ? i += r[a](t, s, e, n, this) : i += this.renderToken(t, s, e);
  }
  return i;
};
Kh.prototype.renderInlineAsText = function(t, e, n) {
  let i = "";
  for (let r = 0, s = t.length; r < s; r++)
    switch (t[r].type) {
      case "text":
        i += t[r].content;
        break;
      case "image":
        i += this.renderInlineAsText(t[r].children, e, n);
        break;
      case "html_inline":
      case "html_block":
        i += t[r].content;
        break;
      case "softbreak":
      case "hardbreak":
        i += `
`;
        break;
    }
  return i;
};
Kh.prototype.render = function(t, e, n) {
  let i = "";
  const r = this.rules;
  for (let s = 0, o = t.length; s < o; s++) {
    const a = t[s].type;
    a === "inline" ? i += this.renderInline(t[s].children, e, n) : typeof r[a] < "u" ? i += r[a](t, s, e, n, this) : i += this.renderToken(t, s, e, n);
  }
  return i;
};
function xs() {
  this.__rules__ = [], this.__cache__ = null;
}
xs.prototype.__find__ = function(t) {
  for (let e = 0; e < this.__rules__.length; e++)
    if (this.__rules__[e].name === t)
      return e;
  return -1;
};
xs.prototype.__compile__ = function() {
  const t = this, e = [""];
  t.__rules__.forEach(function(n) {
    n.enabled && n.alt.forEach(function(i) {
      e.indexOf(i) < 0 && e.push(i);
    });
  }), t.__cache__ = {}, e.forEach(function(n) {
    t.__cache__[n] = [], t.__rules__.forEach(function(i) {
      i.enabled && (n && i.alt.indexOf(n) < 0 || t.__cache__[n].push(i.fn));
    });
  });
};
xs.prototype.at = function(t, e, n) {
  const i = this.__find__(t), r = n || {};
  if (i === -1)
    throw new Error("Parser rule not found: " + t);
  this.__rules__[i].fn = e, this.__rules__[i].alt = r.alt || [], this.__cache__ = null;
};
xs.prototype.before = function(t, e, n, i) {
  const r = this.__find__(t), s = i || {};
  if (r === -1)
    throw new Error("Parser rule not found: " + t);
  this.__rules__.splice(r, 0, {
    name: e,
    enabled: !0,
    fn: n,
    alt: s.alt || []
  }), this.__cache__ = null;
};
xs.prototype.after = function(t, e, n, i) {
  const r = this.__find__(t), s = i || {};
  if (r === -1)
    throw new Error("Parser rule not found: " + t);
  this.__rules__.splice(r + 1, 0, {
    name: e,
    enabled: !0,
    fn: n,
    alt: s.alt || []
  }), this.__cache__ = null;
};
xs.prototype.push = function(t, e, n) {
  const i = n || {};
  this.__rules__.push({
    name: t,
    enabled: !0,
    fn: e,
    alt: i.alt || []
  }), this.__cache__ = null;
};
xs.prototype.enable = function(t, e) {
  Array.isArray(t) || (t = [t]);
  const n = [];
  return t.forEach(function(i) {
    const r = this.__find__(i);
    if (r < 0) {
      if (e)
        return;
      throw new Error("Rules manager: invalid rule name " + i);
    }
    this.__rules__[r].enabled = !0, n.push(i);
  }, this), this.__cache__ = null, n;
};
xs.prototype.enableOnly = function(t, e) {
  Array.isArray(t) || (t = [t]), this.__rules__.forEach(function(n) {
    n.enabled = !1;
  }), this.enable(t, e);
};
xs.prototype.disable = function(t, e) {
  Array.isArray(t) || (t = [t]);
  const n = [];
  return t.forEach(function(i) {
    const r = this.__find__(i);
    if (r < 0) {
      if (e)
        return;
      throw new Error("Rules manager: invalid rule name " + i);
    }
    this.__rules__[r].enabled = !1, n.push(i);
  }, this), this.__cache__ = null, n;
};
xs.prototype.getRules = function(t) {
  return this.__cache__ === null && this.__compile__(), this.__cache__[t] || [];
};
function Qo(t, e, n) {
  this.type = t, this.tag = e, this.attrs = null, this.map = null, this.nesting = n, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1;
}
Qo.prototype.attrIndex = function(e) {
  if (!this.attrs)
    return -1;
  const n = this.attrs;
  for (let i = 0, r = n.length; i < r; i++)
    if (n[i][0] === e)
      return i;
  return -1;
};
Qo.prototype.attrPush = function(e) {
  this.attrs ? this.attrs.push(e) : this.attrs = [e];
};
Qo.prototype.attrSet = function(e, n) {
  const i = this.attrIndex(e), r = [e, n];
  i < 0 ? this.attrPush(r) : this.attrs[i] = r;
};
Qo.prototype.attrGet = function(e) {
  const n = this.attrIndex(e);
  let i = null;
  return n >= 0 && (i = this.attrs[n][1]), i;
};
Qo.prototype.attrJoin = function(e, n) {
  const i = this.attrIndex(e);
  i < 0 ? this.attrPush([e, n]) : this.attrs[i][1] = this.attrs[i][1] + " " + n;
};
function pB(t, e, n) {
  this.src = t, this.env = n, this.tokens = [], this.inlineMode = !1, this.md = e;
}
pB.prototype.Token = Qo;
const Bre = /\r\n?|\n/g, zre = /\0/g;
function Wre(t) {
  let e;
  e = t.src.replace(Bre, `
`), e = e.replace(zre, "�"), t.src = e;
}
function Hre(t) {
  let e;
  t.inlineMode ? (e = new t.Token("inline", "", 0), e.content = t.src, e.map = [0, 1], e.children = [], t.tokens.push(e)) : t.md.block.parse(t.src, t.md, t.env, t.tokens);
}
function Qre(t) {
  const e = t.tokens;
  for (let n = 0, i = e.length; n < i; n++) {
    const r = e[n];
    r.type === "inline" && t.md.inline.parse(r.content, t.md, t.env, r.children);
  }
}
function Ure(t) {
  return /^<a[>\s]/i.test(t);
}
function Zre(t) {
  return /^<\/a\s*>/i.test(t);
}
function qre(t) {
  const e = t.tokens;
  if (t.md.options.linkify)
    for (let n = 0, i = e.length; n < i; n++) {
      if (e[n].type !== "inline" || !t.md.linkify.pretest(e[n].content))
        continue;
      let r = e[n].children, s = 0;
      for (let o = r.length - 1; o >= 0; o--) {
        const a = r[o];
        if (a.type === "link_close") {
          for (o--; r[o].level !== a.level && r[o].type !== "link_open"; )
            o--;
          continue;
        }
        if (a.type === "html_inline" && (Ure(a.content) && s > 0 && s--, Zre(a.content) && s++), !(s > 0) && a.type === "text" && t.md.linkify.test(a.content)) {
          const l = a.content;
          let u = t.md.linkify.match(l);
          const f = [];
          let d = a.level, h = 0;
          u.length > 0 && u[0].index === 0 && o > 0 && r[o - 1].type === "text_special" && (u = u.slice(1));
          for (let m = 0; m < u.length; m++) {
            const g = u[m].url, w = t.md.normalizeLink(g);
            if (!t.md.validateLink(w))
              continue;
            let x = u[m].text;
            u[m].schema ? u[m].schema === "mailto:" && !/^mailto:/i.test(x) ? x = t.md.normalizeLinkText("mailto:" + x).replace(/^mailto:/, "") : x = t.md.normalizeLinkText(x) : x = t.md.normalizeLinkText("http://" + x).replace(/^http:\/\//, "");
            const _ = u[m].index;
            if (_ > h) {
              const M = new t.Token("text", "", 0);
              M.content = l.slice(h, _), M.level = d, f.push(M);
            }
            const S = new t.Token("link_open", "a", 1);
            S.attrs = [["href", w]], S.level = d++, S.markup = "linkify", S.info = "auto", f.push(S);
            const C = new t.Token("text", "", 0);
            C.content = x, C.level = d, f.push(C);
            const E = new t.Token("link_close", "a", -1);
            E.level = --d, E.markup = "linkify", E.info = "auto", f.push(E), h = u[m].lastIndex;
          }
          if (h < l.length) {
            const m = new t.Token("text", "", 0);
            m.content = l.slice(h), m.level = d, f.push(m);
          }
          e[n].children = r = dB(r, o, f);
        }
      }
    }
}
const mB = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Yre = /\((c|tm|r)\)/i, Vre = /\((c|tm|r)\)/ig, Xre = {
  c: "©",
  r: "®",
  tm: "™"
};
function Gre(t, e) {
  return Xre[e.toLowerCase()];
}
function Kre(t) {
  let e = 0;
  for (let n = t.length - 1; n >= 0; n--) {
    const i = t[n];
    i.type === "text" && !e && (i.content = i.content.replace(Vre, Gre)), i.type === "link_open" && i.info === "auto" && e--, i.type === "link_close" && i.info === "auto" && e++;
  }
}
function Jre(t) {
  let e = 0;
  for (let n = t.length - 1; n >= 0; n--) {
    const i = t[n];
    i.type === "text" && !e && mB.test(i.content) && (i.content = i.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/mg, "$1—").replace(/(^|\s)--(?=\s|$)/mg, "$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, "$1–")), i.type === "link_open" && i.info === "auto" && e--, i.type === "link_close" && i.info === "auto" && e++;
  }
}
function ese(t) {
  let e;
  if (t.md.options.typographer)
    for (e = t.tokens.length - 1; e >= 0; e--)
      t.tokens[e].type === "inline" && (Yre.test(t.tokens[e].content) && Kre(t.tokens[e].children), mB.test(t.tokens[e].content) && Jre(t.tokens[e].children));
}
const tse = /['"]/, OM = /['"]/g, SM = "’";
function Hv(t, e, n) {
  return t.slice(0, e) + n + t.slice(e + 1);
}
function nse(t, e) {
  let n;
  const i = [];
  for (let r = 0; r < t.length; r++) {
    const s = t[r], o = t[r].level;
    for (n = i.length - 1; n >= 0 && !(i[n].level <= o); n--)
      ;
    if (i.length = n + 1, s.type !== "text")
      continue;
    let a = s.content, l = 0, u = a.length;
    e: for (; l < u; ) {
      OM.lastIndex = l;
      const f = OM.exec(a);
      if (!f)
        break;
      let d = !0, h = !0;
      l = f.index + 1;
      const m = f[0] === "'";
      let g = 32;
      if (f.index - 1 >= 0)
        g = a.charCodeAt(f.index - 1);
      else
        for (n = r - 1; n >= 0 && !(t[n].type === "softbreak" || t[n].type === "hardbreak"); n--)
          if (t[n].content) {
            g = t[n].content.charCodeAt(t[n].content.length - 1);
            break;
          }
      let w = 32;
      if (l < u)
        w = a.charCodeAt(l);
      else
        for (n = r + 1; n < t.length && !(t[n].type === "softbreak" || t[n].type === "hardbreak"); n++)
          if (t[n].content) {
            w = t[n].content.charCodeAt(0);
            break;
          }
      const x = n0(g) || t0(String.fromCharCode(g)), _ = n0(w) || t0(String.fromCharCode(w)), S = e0(g), C = e0(w);
      if (C ? d = !1 : _ && (S || x || (d = !1)), S ? h = !1 : x && (C || _ || (h = !1)), w === 34 && f[0] === '"' && g >= 48 && g <= 57 && (h = d = !1), d && h && (d = x, h = _), !d && !h) {
        m && (s.content = Hv(s.content, f.index, SM));
        continue;
      }
      if (h)
        for (n = i.length - 1; n >= 0; n--) {
          let E = i[n];
          if (i[n].level < o)
            break;
          if (E.single === m && i[n].level === o) {
            E = i[n];
            let M, $;
            m ? (M = e.md.options.quotes[2], $ = e.md.options.quotes[3]) : (M = e.md.options.quotes[0], $ = e.md.options.quotes[1]), s.content = Hv(s.content, f.index, $), t[E.token].content = Hv(t[E.token].content, E.pos, M), l += $.length - 1, E.token === r && (l += M.length - 1), a = s.content, u = a.length, i.length = n;
            continue e;
          }
        }
      d ? i.push({
        token: r,
        pos: f.index,
        single: m,
        level: o
      }) : h && m && (s.content = Hv(s.content, f.index, SM));
    }
  }
}
function ise(t) {
  if (t.md.options.typographer)
    for (let e = t.tokens.length - 1; e >= 0; e--)
      t.tokens[e].type !== "inline" || !tse.test(t.tokens[e].content) || nse(t.tokens[e].children, t);
}
function rse(t) {
  let e, n;
  const i = t.tokens, r = i.length;
  for (let s = 0; s < r; s++) {
    if (i[s].type !== "inline") continue;
    const o = i[s].children, a = o.length;
    for (e = 0; e < a; e++)
      o[e].type === "text_special" && (o[e].type = "text");
    for (e = n = 0; e < a; e++)
      o[e].type === "text" && e + 1 < a && o[e + 1].type === "text" ? o[e + 1].content = o[e].content + o[e + 1].content : (e !== n && (o[n] = o[e]), n++);
    e !== n && (o.length = n);
  }
}
const g3 = [
  ["normalize", Wre],
  ["block", Hre],
  ["inline", Qre],
  ["linkify", qre],
  ["replacements", ese],
  ["smartquotes", ise],
  // `text_join` finds `text_special` tokens (for escape sequences)
  // and joins them with the rest of the text
  ["text_join", rse]
];
function x5() {
  this.ruler = new xs();
  for (let t = 0; t < g3.length; t++)
    this.ruler.push(g3[t][0], g3[t][1]);
}
x5.prototype.process = function(t) {
  const e = this.ruler.getRules("");
  for (let n = 0, i = e.length; n < i; n++)
    e[n](t);
};
x5.prototype.State = pB;
function Fa(t, e, n, i) {
  this.src = t, this.md = e, this.env = n, this.tokens = i, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
  const r = this.src;
  for (let s = 0, o = 0, a = 0, l = 0, u = r.length, f = !1; o < u; o++) {
    const d = r.charCodeAt(o);
    if (!f)
      if (mn(d)) {
        a++, d === 9 ? l += 4 - l % 4 : l++;
        continue;
      } else
        f = !0;
    (d === 10 || o === u - 1) && (d !== 10 && o++, this.bMarks.push(s), this.eMarks.push(o), this.tShift.push(a), this.sCount.push(l), this.bsCount.push(0), f = !1, a = 0, l = 0, s = o + 1);
  }
  this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
}
Fa.prototype.push = function(t, e, n) {
  const i = new Qo(t, e, n);
  return i.block = !0, n < 0 && this.level--, i.level = this.level, n > 0 && this.level++, this.tokens.push(i), i;
};
Fa.prototype.isEmpty = function(e) {
  return this.bMarks[e] + this.tShift[e] >= this.eMarks[e];
};
Fa.prototype.skipEmptyLines = function(e) {
  for (let n = this.lineMax; e < n && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++)
    ;
  return e;
};
Fa.prototype.skipSpaces = function(e) {
  for (let n = this.src.length; e < n; e++) {
    const i = this.src.charCodeAt(e);
    if (!mn(i))
      break;
  }
  return e;
};
Fa.prototype.skipSpacesBack = function(e, n) {
  if (e <= n)
    return e;
  for (; e > n; )
    if (!mn(this.src.charCodeAt(--e)))
      return e + 1;
  return e;
};
Fa.prototype.skipChars = function(e, n) {
  for (let i = this.src.length; e < i && this.src.charCodeAt(e) === n; e++)
    ;
  return e;
};
Fa.prototype.skipCharsBack = function(e, n, i) {
  if (e <= i)
    return e;
  for (; e > i; )
    if (n !== this.src.charCodeAt(--e))
      return e + 1;
  return e;
};
Fa.prototype.getLines = function(e, n, i, r) {
  if (e >= n)
    return "";
  const s = new Array(n - e);
  for (let o = 0, a = e; a < n; a++, o++) {
    let l = 0;
    const u = this.bMarks[a];
    let f = u, d;
    for (a + 1 < n || r ? d = this.eMarks[a] + 1 : d = this.eMarks[a]; f < d && l < i; ) {
      const h = this.src.charCodeAt(f);
      if (mn(h))
        h === 9 ? l += 4 - (l + this.bsCount[a]) % 4 : l++;
      else if (f - u < this.tShift[a])
        l++;
      else
        break;
      f++;
    }
    l > i ? s[o] = new Array(l - i + 1).join(" ") + this.src.slice(f, d) : s[o] = this.src.slice(f, d);
  }
  return s.join("");
};
Fa.prototype.Token = Qo;
function v3(t, e) {
  const n = t.bMarks[e] + t.tShift[e], i = t.eMarks[e];
  return t.src.slice(n, i);
}
function CM(t) {
  const e = [], n = t.length;
  let i = 0, r = t.charCodeAt(i), s = !1, o = 0, a = "";
  for (; i < n; )
    r === 124 && (s ? (a += t.substring(o, i - 1), o = i) : (e.push(a + t.substring(o, i)), a = "", o = i + 1)), s = r === 92, i++, r = t.charCodeAt(i);
  return e.push(a + t.substring(o)), e;
}
function sse(t, e, n, i) {
  if (e + 2 > n)
    return !1;
  let r = e + 1;
  if (t.sCount[r] < t.blkIndent || t.sCount[r] - t.blkIndent >= 4)
    return !1;
  let s = t.bMarks[r] + t.tShift[r];
  if (s >= t.eMarks[r])
    return !1;
  const o = t.src.charCodeAt(s++);
  if (o !== 124 && o !== 45 && o !== 58 || s >= t.eMarks[r])
    return !1;
  const a = t.src.charCodeAt(s++);
  if (a !== 124 && a !== 45 && a !== 58 && !mn(a) || o === 45 && mn(a))
    return !1;
  for (; s < t.eMarks[r]; ) {
    const C = t.src.charCodeAt(s);
    if (C !== 124 && C !== 45 && C !== 58 && !mn(C))
      return !1;
    s++;
  }
  let l = v3(t, e + 1), u = l.split("|");
  const f = [];
  for (let C = 0; C < u.length; C++) {
    const E = u[C].trim();
    if (!E) {
      if (C === 0 || C === u.length - 1)
        continue;
      return !1;
    }
    if (!/^:?-+:?$/.test(E))
      return !1;
    E.charCodeAt(E.length - 1) === 58 ? f.push(E.charCodeAt(0) === 58 ? "center" : "right") : E.charCodeAt(0) === 58 ? f.push("left") : f.push("");
  }
  if (l = v3(t, e).trim(), l.indexOf("|") === -1 || t.sCount[e] - t.blkIndent >= 4)
    return !1;
  u = CM(l), u.length && u[0] === "" && u.shift(), u.length && u[u.length - 1] === "" && u.pop();
  const d = u.length;
  if (d === 0 || d !== f.length)
    return !1;
  if (i)
    return !0;
  const h = t.parentType;
  t.parentType = "table";
  const m = t.md.block.ruler.getRules("blockquote"), g = t.push("table_open", "table", 1), w = [e, 0];
  g.map = w;
  const x = t.push("thead_open", "thead", 1);
  x.map = [e, e + 1];
  const _ = t.push("tr_open", "tr", 1);
  _.map = [e, e + 1];
  for (let C = 0; C < u.length; C++) {
    const E = t.push("th_open", "th", 1);
    f[C] && (E.attrs = [["style", "text-align:" + f[C]]]);
    const M = t.push("inline", "", 0);
    M.content = u[C].trim(), M.children = [], t.push("th_close", "th", -1);
  }
  t.push("tr_close", "tr", -1), t.push("thead_close", "thead", -1);
  let S;
  for (r = e + 2; r < n && !(t.sCount[r] < t.blkIndent); r++) {
    let C = !1;
    for (let M = 0, $ = m.length; M < $; M++)
      if (m[M](t, r, n, !0)) {
        C = !0;
        break;
      }
    if (C || (l = v3(t, r).trim(), !l) || t.sCount[r] - t.blkIndent >= 4)
      break;
    if (u = CM(l), u.length && u[0] === "" && u.shift(), u.length && u[u.length - 1] === "" && u.pop(), r === e + 2) {
      const M = t.push("tbody_open", "tbody", 1);
      M.map = S = [e + 2, 0];
    }
    const E = t.push("tr_open", "tr", 1);
    E.map = [r, r + 1];
    for (let M = 0; M < d; M++) {
      const $ = t.push("td_open", "td", 1);
      f[M] && ($.attrs = [["style", "text-align:" + f[M]]]);
      const P = t.push("inline", "", 0);
      P.content = u[M] ? u[M].trim() : "", P.children = [], t.push("td_close", "td", -1);
    }
    t.push("tr_close", "tr", -1);
  }
  return S && (t.push("tbody_close", "tbody", -1), S[1] = r), t.push("table_close", "table", -1), w[1] = r, t.parentType = h, t.line = r, !0;
}
function ose(t, e, n) {
  if (t.sCount[e] - t.blkIndent < 4)
    return !1;
  let i = e + 1, r = i;
  for (; i < n; ) {
    if (t.isEmpty(i)) {
      i++;
      continue;
    }
    if (t.sCount[i] - t.blkIndent >= 4) {
      i++, r = i;
      continue;
    }
    break;
  }
  t.line = r;
  const s = t.push("code_block", "code", 0);
  return s.content = t.getLines(e, r, 4 + t.blkIndent, !1) + `
`, s.map = [e, t.line], !0;
}
function ase(t, e, n, i) {
  let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e];
  if (t.sCount[e] - t.blkIndent >= 4 || r + 3 > s)
    return !1;
  const o = t.src.charCodeAt(r);
  if (o !== 126 && o !== 96)
    return !1;
  let a = r;
  r = t.skipChars(r, o);
  let l = r - a;
  if (l < 3)
    return !1;
  const u = t.src.slice(a, r), f = t.src.slice(r, s);
  if (o === 96 && f.indexOf(String.fromCharCode(o)) >= 0)
    return !1;
  if (i)
    return !0;
  let d = e, h = !1;
  for (; d++, !(d >= n || (r = a = t.bMarks[d] + t.tShift[d], s = t.eMarks[d], r < s && t.sCount[d] < t.blkIndent)); )
    if (t.src.charCodeAt(r) === o && !(t.sCount[d] - t.blkIndent >= 4) && (r = t.skipChars(r, o), !(r - a < l) && (r = t.skipSpaces(r), !(r < s)))) {
      h = !0;
      break;
    }
  l = t.sCount[e], t.line = d + (h ? 1 : 0);
  const m = t.push("fence", "code", 0);
  return m.info = f, m.content = t.getLines(e + 1, d, l, !0), m.markup = u, m.map = [e, t.line], !0;
}
function lse(t, e, n, i) {
  let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e];
  const o = t.lineMax;
  if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(r) !== 62)
    return !1;
  if (i)
    return !0;
  const a = [], l = [], u = [], f = [], d = t.md.block.ruler.getRules("blockquote"), h = t.parentType;
  t.parentType = "blockquote";
  let m = !1, g;
  for (g = e; g < n; g++) {
    const C = t.sCount[g] < t.blkIndent;
    if (r = t.bMarks[g] + t.tShift[g], s = t.eMarks[g], r >= s)
      break;
    if (t.src.charCodeAt(r++) === 62 && !C) {
      let M = t.sCount[g] + 1, $, P;
      t.src.charCodeAt(r) === 32 ? (r++, M++, P = !1, $ = !0) : t.src.charCodeAt(r) === 9 ? ($ = !0, (t.bsCount[g] + M) % 4 === 3 ? (r++, M++, P = !1) : P = !0) : $ = !1;
      let W = M;
      for (a.push(t.bMarks[g]), t.bMarks[g] = r; r < s; ) {
        const z = t.src.charCodeAt(r);
        if (mn(z))
          z === 9 ? W += 4 - (W + t.bsCount[g] + (P ? 1 : 0)) % 4 : W++;
        else
          break;
        r++;
      }
      m = r >= s, l.push(t.bsCount[g]), t.bsCount[g] = t.sCount[g] + 1 + ($ ? 1 : 0), u.push(t.sCount[g]), t.sCount[g] = W - M, f.push(t.tShift[g]), t.tShift[g] = r - t.bMarks[g];
      continue;
    }
    if (m)
      break;
    let E = !1;
    for (let M = 0, $ = d.length; M < $; M++)
      if (d[M](t, g, n, !0)) {
        E = !0;
        break;
      }
    if (E) {
      t.lineMax = g, t.blkIndent !== 0 && (a.push(t.bMarks[g]), l.push(t.bsCount[g]), f.push(t.tShift[g]), u.push(t.sCount[g]), t.sCount[g] -= t.blkIndent);
      break;
    }
    a.push(t.bMarks[g]), l.push(t.bsCount[g]), f.push(t.tShift[g]), u.push(t.sCount[g]), t.sCount[g] = -1;
  }
  const w = t.blkIndent;
  t.blkIndent = 0;
  const x = t.push("blockquote_open", "blockquote", 1);
  x.markup = ">";
  const _ = [e, 0];
  x.map = _, t.md.block.tokenize(t, e, g);
  const S = t.push("blockquote_close", "blockquote", -1);
  S.markup = ">", t.lineMax = o, t.parentType = h, _[1] = t.line;
  for (let C = 0; C < f.length; C++)
    t.bMarks[C + e] = a[C], t.tShift[C + e] = f[C], t.sCount[C + e] = u[C], t.bsCount[C + e] = l[C];
  return t.blkIndent = w, !0;
}
function use(t, e, n, i) {
  const r = t.eMarks[e];
  if (t.sCount[e] - t.blkIndent >= 4)
    return !1;
  let s = t.bMarks[e] + t.tShift[e];
  const o = t.src.charCodeAt(s++);
  if (o !== 42 && o !== 45 && o !== 95)
    return !1;
  let a = 1;
  for (; s < r; ) {
    const u = t.src.charCodeAt(s++);
    if (u !== o && !mn(u))
      return !1;
    u === o && a++;
  }
  if (a < 3)
    return !1;
  if (i)
    return !0;
  t.line = e + 1;
  const l = t.push("hr", "hr", 0);
  return l.map = [e, t.line], l.markup = Array(a + 1).join(String.fromCharCode(o)), !0;
}
function EM(t, e) {
  const n = t.eMarks[e];
  let i = t.bMarks[e] + t.tShift[e];
  const r = t.src.charCodeAt(i++);
  if (r !== 42 && r !== 45 && r !== 43)
    return -1;
  if (i < n) {
    const s = t.src.charCodeAt(i);
    if (!mn(s))
      return -1;
  }
  return i;
}
function TM(t, e) {
  const n = t.bMarks[e] + t.tShift[e], i = t.eMarks[e];
  let r = n;
  if (r + 1 >= i)
    return -1;
  let s = t.src.charCodeAt(r++);
  if (s < 48 || s > 57)
    return -1;
  for (; ; ) {
    if (r >= i)
      return -1;
    if (s = t.src.charCodeAt(r++), s >= 48 && s <= 57) {
      if (r - n >= 10)
        return -1;
      continue;
    }
    if (s === 41 || s === 46)
      break;
    return -1;
  }
  return r < i && (s = t.src.charCodeAt(r), !mn(s)) ? -1 : r;
}
function cse(t, e) {
  const n = t.level + 2;
  for (let i = e + 2, r = t.tokens.length - 2; i < r; i++)
    t.tokens[i].level === n && t.tokens[i].type === "paragraph_open" && (t.tokens[i + 2].hidden = !0, t.tokens[i].hidden = !0, i += 2);
}
function fse(t, e, n, i) {
  let r, s, o, a, l = e, u = !0;
  if (t.sCount[l] - t.blkIndent >= 4 || t.listIndent >= 0 && t.sCount[l] - t.listIndent >= 4 && t.sCount[l] < t.blkIndent)
    return !1;
  let f = !1;
  i && t.parentType === "paragraph" && t.sCount[l] >= t.blkIndent && (f = !0);
  let d, h, m;
  if ((m = TM(t, l)) >= 0) {
    if (d = !0, o = t.bMarks[l] + t.tShift[l], h = Number(t.src.slice(o, m - 1)), f && h !== 1) return !1;
  } else if ((m = EM(t, l)) >= 0)
    d = !1;
  else
    return !1;
  if (f && t.skipSpaces(m) >= t.eMarks[l])
    return !1;
  if (i)
    return !0;
  const g = t.src.charCodeAt(m - 1), w = t.tokens.length;
  d ? (a = t.push("ordered_list_open", "ol", 1), h !== 1 && (a.attrs = [["start", h]])) : a = t.push("bullet_list_open", "ul", 1);
  const x = [l, 0];
  a.map = x, a.markup = String.fromCharCode(g);
  let _ = !1;
  const S = t.md.block.ruler.getRules("list"), C = t.parentType;
  for (t.parentType = "list"; l < n; ) {
    s = m, r = t.eMarks[l];
    const E = t.sCount[l] + m - (t.bMarks[l] + t.tShift[l]);
    let M = E;
    for (; s < r; ) {
      const R = t.src.charCodeAt(s);
      if (R === 9)
        M += 4 - (M + t.bsCount[l]) % 4;
      else if (R === 32)
        M++;
      else
        break;
      s++;
    }
    const $ = s;
    let P;
    $ >= r ? P = 1 : P = M - E, P > 4 && (P = 1);
    const W = E + P;
    a = t.push("list_item_open", "li", 1), a.markup = String.fromCharCode(g);
    const z = [l, 0];
    a.map = z, d && (a.info = t.src.slice(o, m - 1));
    const Z = t.tight, L = t.tShift[l], Q = t.sCount[l], V = t.listIndent;
    if (t.listIndent = t.blkIndent, t.blkIndent = W, t.tight = !0, t.tShift[l] = $ - t.bMarks[l], t.sCount[l] = M, $ >= r && t.isEmpty(l + 1) ? t.line = Math.min(t.line + 2, n) : t.md.block.tokenize(t, l, n, !0), (!t.tight || _) && (u = !1), _ = t.line - l > 1 && t.isEmpty(t.line - 1), t.blkIndent = t.listIndent, t.listIndent = V, t.tShift[l] = L, t.sCount[l] = Q, t.tight = Z, a = t.push("list_item_close", "li", -1), a.markup = String.fromCharCode(g), l = t.line, z[1] = l, l >= n || t.sCount[l] < t.blkIndent || t.sCount[l] - t.blkIndent >= 4)
      break;
    let H = !1;
    for (let R = 0, q = S.length; R < q; R++)
      if (S[R](t, l, n, !0)) {
        H = !0;
        break;
      }
    if (H)
      break;
    if (d) {
      if (m = TM(t, l), m < 0)
        break;
      o = t.bMarks[l] + t.tShift[l];
    } else if (m = EM(t, l), m < 0)
      break;
    if (g !== t.src.charCodeAt(m - 1))
      break;
  }
  return d ? a = t.push("ordered_list_close", "ol", -1) : a = t.push("bullet_list_close", "ul", -1), a.markup = String.fromCharCode(g), x[1] = l, t.line = l, t.parentType = C, u && cse(t, w), !0;
}
function dse(t, e, n, i) {
  let r = 0, s = t.bMarks[e] + t.tShift[e], o = t.eMarks[e], a = e + 1;
  if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(s) !== 91)
    return !1;
  for (; ++s < o; )
    if (t.src.charCodeAt(s) === 93 && t.src.charCodeAt(s - 1) !== 92) {
      if (s + 1 === o || t.src.charCodeAt(s + 1) !== 58)
        return !1;
      break;
    }
  const l = t.lineMax, u = t.md.block.ruler.getRules("reference"), f = t.parentType;
  for (t.parentType = "reference"; a < l && !t.isEmpty(a); a++) {
    if (t.sCount[a] - t.blkIndent > 3 || t.sCount[a] < 0)
      continue;
    let M = !1;
    for (let $ = 0, P = u.length; $ < P; $++)
      if (u[$](t, a, l, !0)) {
        M = !0;
        break;
      }
    if (M)
      break;
  }
  const d = t.getLines(e, a, t.blkIndent, !1).trim();
  o = d.length;
  let h = -1;
  for (s = 1; s < o; s++) {
    const M = d.charCodeAt(s);
    if (M === 91)
      return !1;
    if (M === 93) {
      h = s;
      break;
    } else M === 10 ? r++ : M === 92 && (s++, s < o && d.charCodeAt(s) === 10 && r++);
  }
  if (h < 0 || d.charCodeAt(h + 1) !== 58)
    return !1;
  for (s = h + 2; s < o; s++) {
    const M = d.charCodeAt(s);
    if (M === 10)
      r++;
    else if (!mn(M)) break;
  }
  const m = t.md.helpers.parseLinkDestination(d, s, o);
  if (!m.ok)
    return !1;
  const g = t.md.normalizeLink(m.str);
  if (!t.md.validateLink(g))
    return !1;
  s = m.pos, r += m.lines;
  const w = s, x = r, _ = s;
  for (; s < o; s++) {
    const M = d.charCodeAt(s);
    if (M === 10)
      r++;
    else if (!mn(M)) break;
  }
  const S = t.md.helpers.parseLinkTitle(d, s, o);
  let C;
  for (s < o && _ !== s && S.ok ? (C = S.str, s = S.pos, r += S.lines) : (C = "", s = w, r = x); s < o; ) {
    const M = d.charCodeAt(s);
    if (!mn(M))
      break;
    s++;
  }
  if (s < o && d.charCodeAt(s) !== 10 && C)
    for (C = "", s = w, r = x; s < o; ) {
      const M = d.charCodeAt(s);
      if (!mn(M))
        break;
      s++;
    }
  if (s < o && d.charCodeAt(s) !== 10)
    return !1;
  const E = Qk(d.slice(1, h));
  return E ? (i || (typeof t.env.references > "u" && (t.env.references = {}), typeof t.env.references[E] > "u" && (t.env.references[E] = {
    title: C,
    href: g
  }), t.parentType = f, t.line = e + r + 1), !0) : !1;
}
var hse = ["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", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hr", "html", "iframe", "legend", "li", "link", "main", "menu", "menuitem", "nav", "noframes", "ol", "optgroup", "option", "p", "param", "section", "source", "summary", "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul"];
const pse = "[a-zA-Z_:][a-zA-Z0-9:._-]*", mse = "[^\"'=<>`\\x00-\\x20]+", gse = "'[^']*'", vse = '"[^"]*"', bse = "(?:" + mse + "|" + gse + "|" + vse + ")", yse = "(?:\\s+" + pse + "(?:\\s*=\\s*" + bse + ")?)", gB = "<[A-Za-z][A-Za-z0-9\\-]*" + yse + "*\\s*\\/?>", vB = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", wse = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->", kse = "<[?][\\s\\S]*?[?]>", xse = "<![A-Z]+\\s+[^>]*>", _se = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", Ose = new RegExp("^(?:" + gB + "|" + vB + "|" + wse + "|" + kse + "|" + xse + "|" + _se + ")"), Sse = new RegExp("^(?:" + gB + "|" + vB + ")"), _d = [[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0], [/^<!--/, /-->/, !0], [/^<\?/, /\?>/, !0], [/^<![A-Z]/, />/, !0], [/^<!\[CDATA\[/, /\]\]>/, !0], [new RegExp("^</?(" + hse.join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, !0], [new RegExp(Sse.source + "\\s*$"), /^$/, !1]];
function Cse(t, e, n, i) {
  let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e];
  if (t.sCount[e] - t.blkIndent >= 4 || !t.md.options.html || t.src.charCodeAt(r) !== 60)
    return !1;
  let o = t.src.slice(r, s), a = 0;
  for (; a < _d.length && !_d[a][0].test(o); a++)
    ;
  if (a === _d.length)
    return !1;
  if (i)
    return _d[a][2];
  let l = e + 1;
  if (!_d[a][1].test(o)) {
    for (; l < n && !(t.sCount[l] < t.blkIndent); l++)
      if (r = t.bMarks[l] + t.tShift[l], s = t.eMarks[l], o = t.src.slice(r, s), _d[a][1].test(o)) {
        o.length !== 0 && l++;
        break;
      }
  }
  t.line = l;
  const u = t.push("html_block", "", 0);
  return u.map = [e, l], u.content = t.getLines(e, l, t.blkIndent, !0), !0;
}
function Ese(t, e, n, i) {
  let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e];
  if (t.sCount[e] - t.blkIndent >= 4)
    return !1;
  let o = t.src.charCodeAt(r);
  if (o !== 35 || r >= s)
    return !1;
  let a = 1;
  for (o = t.src.charCodeAt(++r); o === 35 && r < s && a <= 6; )
    a++, o = t.src.charCodeAt(++r);
  if (a > 6 || r < s && !mn(o))
    return !1;
  if (i)
    return !0;
  s = t.skipSpacesBack(s, r);
  const l = t.skipCharsBack(s, 35, r);
  l > r && mn(t.src.charCodeAt(l - 1)) && (s = l), t.line = e + 1;
  const u = t.push("heading_open", "h" + String(a), 1);
  u.markup = "########".slice(0, a), u.map = [e, t.line];
  const f = t.push("inline", "", 0);
  f.content = t.src.slice(r, s).trim(), f.map = [e, t.line], f.children = [];
  const d = t.push("heading_close", "h" + String(a), -1);
  return d.markup = "########".slice(0, a), !0;
}
function Tse(t, e, n) {
  const i = t.md.block.ruler.getRules("paragraph");
  if (t.sCount[e] - t.blkIndent >= 4)
    return !1;
  const r = t.parentType;
  t.parentType = "paragraph";
  let s = 0, o, a = e + 1;
  for (; a < n && !t.isEmpty(a); a++) {
    if (t.sCount[a] - t.blkIndent > 3)
      continue;
    if (t.sCount[a] >= t.blkIndent) {
      let m = t.bMarks[a] + t.tShift[a];
      const g = t.eMarks[a];
      if (m < g && (o = t.src.charCodeAt(m), (o === 45 || o === 61) && (m = t.skipChars(m, o), m = t.skipSpaces(m), m >= g))) {
        s = o === 61 ? 1 : 2;
        break;
      }
    }
    if (t.sCount[a] < 0)
      continue;
    let h = !1;
    for (let m = 0, g = i.length; m < g; m++)
      if (i[m](t, a, n, !0)) {
        h = !0;
        break;
      }
    if (h)
      break;
  }
  if (!s)
    return !1;
  const l = t.getLines(e, a, t.blkIndent, !1).trim();
  t.line = a + 1;
  const u = t.push("heading_open", "h" + String(s), 1);
  u.markup = String.fromCharCode(o), u.map = [e, t.line];
  const f = t.push("inline", "", 0);
  f.content = l, f.map = [e, t.line - 1], f.children = [];
  const d = t.push("heading_close", "h" + String(s), -1);
  return d.markup = String.fromCharCode(o), t.parentType = r, !0;
}
function $se(t, e, n) {
  const i = t.md.block.ruler.getRules("paragraph"), r = t.parentType;
  let s = e + 1;
  for (t.parentType = "paragraph"; s < n && !t.isEmpty(s); s++) {
    if (t.sCount[s] - t.blkIndent > 3 || t.sCount[s] < 0)
      continue;
    let u = !1;
    for (let f = 0, d = i.length; f < d; f++)
      if (i[f](t, s, n, !0)) {
        u = !0;
        break;
      }
    if (u)
      break;
  }
  const o = t.getLines(e, s, t.blkIndent, !1).trim();
  t.line = s;
  const a = t.push("paragraph_open", "p", 1);
  a.map = [e, t.line];
  const l = t.push("inline", "", 0);
  return l.content = o, l.map = [e, t.line], l.children = [], t.push("paragraph_close", "p", -1), t.parentType = r, !0;
}
const Qv = [
  // First 2 params - rule name & source. Secondary array - list of rules,
  // which can be terminated by this one.
  ["table", sse, ["paragraph", "reference"]],
  ["code", ose],
  ["fence", ase, ["paragraph", "reference", "blockquote", "list"]],
  ["blockquote", lse, ["paragraph", "reference", "blockquote", "list"]],
  ["hr", use, ["paragraph", "reference", "blockquote", "list"]],
  ["list", fse, ["paragraph", "reference", "blockquote"]],
  ["reference", dse],
  ["html_block", Cse, ["paragraph", "reference", "blockquote"]],
  ["heading", Ese, ["paragraph", "reference", "blockquote"]],
  ["lheading", Tse],
  ["paragraph", $se]
];
function Uk() {
  this.ruler = new xs();
  for (let t = 0; t < Qv.length; t++)
    this.ruler.push(Qv[t][0], Qv[t][1], {
      alt: (Qv[t][2] || []).slice()
    });
}
Uk.prototype.tokenize = function(t, e, n) {
  const i = this.ruler.getRules(""), r = i.length, s = t.md.options.maxNesting;
  let o = e, a = !1;
  for (; o < n && (t.line = o = t.skipEmptyLines(o), !(o >= n || t.sCount[o] < t.blkIndent)); ) {
    if (t.level >= s) {
      t.line = n;
      break;
    }
    const l = t.line;
    let u = !1;
    for (let f = 0; f < r; f++)
      if (u = i[f](t, o, n, !1), u) {
        if (l >= t.line)
          throw new Error("block rule didn't increment state.line");
        break;
      }
    if (!u) throw new Error("none of the block rules matched");
    t.tight = !a, t.isEmpty(t.line - 1) && (a = !0), o = t.line, o < n && t.isEmpty(o) && (a = !0, o++, t.line = o);
  }
};
Uk.prototype.parse = function(t, e, n, i) {
  if (!t)
    return;
  const r = new this.State(t, e, n, i);
  this.tokenize(r, r.line, r.lineMax);
};
Uk.prototype.State = Fa;
function o1(t, e, n, i) {
  this.src = t, this.env = n, this.md = e, this.tokens = i, this.tokens_meta = Array(i.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
}
o1.prototype.pushPending = function() {
  const t = new Qo("text", "", 0);
  return t.content = this.pending, t.level = this.pendingLevel, this.tokens.push(t), this.pending = "", t;
};
o1.prototype.push = function(t, e, n) {
  this.pending && this.pushPending();
  const i = new Qo(t, e, n);
  let r = null;
  return n < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), i.level = this.level, n > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], r = {
    delimiters: this.delimiters
  }), this.pendingLevel = this.level, this.tokens.push(i), this.tokens_meta.push(r), i;
};
o1.prototype.scanDelims = function(t, e) {
  let n, i, r = !0, s = !0;
  const o = this.posMax, a = this.src.charCodeAt(t), l = t > 0 ? this.src.charCodeAt(t - 1) : 32;
  let u = t;
  for (; u < o && this.src.charCodeAt(u) === a; )
    u++;
  const f = u - t, d = u < o ? this.src.charCodeAt(u) : 32, h = n0(l) || t0(String.fromCharCode(l)), m = n0(d) || t0(String.fromCharCode(d)), g = e0(l), w = e0(d);
  return w ? r = !1 : m && (g || h || (r = !1)), g ? s = !1 : h && (w || m || (s = !1)), e ? (n = r, i = s) : (n = r && (!s || h), i = s && (!r || m)), {
    can_open: n,
    can_close: i,
    length: f
  };
};
o1.prototype.Token = Qo;
function Mse(t) {
  switch (t) {
    case 10:
    case 33:
    case 35:
    case 36:
    case 37:
    case 38:
    case 42:
    case 43:
    case 45:
    case 58:
    case 60:
    case 61:
    case 62:
    case 64:
    case 91:
    case 92:
    case 93:
    case 94:
    case 95:
    case 96:
    case 123:
    case 125:
    case 126:
      return !0;
    default:
      return !1;
  }
}
function Nse(t, e) {
  let n = t.pos;
  for (; n < t.posMax && !Mse(t.src.charCodeAt(n)); )
    n++;
  return n === t.pos ? !1 : (e || (t.pending += t.src.slice(t.pos, n)), t.pos = n, !0);
}
const Ase = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
function Dse(t, e) {
  if (!t.md.options.linkify || t.linkLevel > 0) return !1;
  const n = t.pos, i = t.posMax;
  if (n + 3 > i || t.src.charCodeAt(n) !== 58 || t.src.charCodeAt(n + 1) !== 47 || t.src.charCodeAt(n + 2) !== 47) return !1;
  const r = t.pending.match(Ase);
  if (!r) return !1;
  const s = r[1], o = t.md.linkify.matchAtStart(t.src.slice(n - s.length));
  if (!o) return !1;
  let a = o.url;
  if (a.length <= s.length) return !1;
  a = a.replace(/\*+$/, "");
  const l = t.md.normalizeLink(a);
  if (!t.md.validateLink(l)) return !1;
  if (!e) {
    t.pending = t.pending.slice(0, -s.length);
    const u = t.push("link_open", "a", 1);
    u.attrs = [["href", l]], u.markup = "linkify", u.info = "auto";
    const f = t.push("text", "", 0);
    f.content = t.md.normalizeLinkText(a);
    const d = t.push("link_close", "a", -1);
    d.markup = "linkify", d.info = "auto";
  }
  return t.pos += a.length - s.length, !0;
}
function Pse(t, e) {
  let n = t.pos;
  if (t.src.charCodeAt(n) !== 10)
    return !1;
  const i = t.pending.length - 1, r = t.posMax;
  if (!e)
    if (i >= 0 && t.pending.charCodeAt(i) === 32)
      if (i >= 1 && t.pending.charCodeAt(i - 1) === 32) {
        let s = i - 1;
        for (; s >= 1 && t.pending.charCodeAt(s - 1) === 32; ) s--;
        t.pending = t.pending.slice(0, s), t.push("hardbreak", "br", 0);
      } else
        t.pending = t.pending.slice(0, -1), t.push("softbreak", "br", 0);
    else
      t.push("softbreak", "br", 0);
  for (n++; n < r && mn(t.src.charCodeAt(n)); )
    n++;
  return t.pos = n, !0;
}
const _5 = [];
for (let t = 0; t < 256; t++)
  _5.push(0);
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t) {
  _5[t.charCodeAt(0)] = 1;
});
function Ise(t, e) {
  let n = t.pos;
  const i = t.posMax;
  if (t.src.charCodeAt(n) !== 92 || (n++, n >= i)) return !1;
  let r = t.src.charCodeAt(n);
  if (r === 10) {
    for (e || t.push("hardbreak", "br", 0), n++; n < i && (r = t.src.charCodeAt(n), !!mn(r)); )
      n++;
    return t.pos = n, !0;
  }
  let s = t.src[n];
  if (r >= 55296 && r <= 56319 && n + 1 < i) {
    const a = t.src.charCodeAt(n + 1);
    a >= 56320 && a <= 57343 && (s += t.src[n + 1], n++);
  }
  const o = "\\" + s;
  if (!e) {
    const a = t.push("text_special", "", 0);
    r < 256 && _5[r] !== 0 ? a.content = s : a.content = o, a.markup = o, a.info = "escape";
  }
  return t.pos = n + 1, !0;
}
function Lse(t, e) {
  let n = t.pos;
  if (t.src.charCodeAt(n) !== 96)
    return !1;
  const r = n;
  n++;
  const s = t.posMax;
  for (; n < s && t.src.charCodeAt(n) === 96; )
    n++;
  const o = t.src.slice(r, n), a = o.length;
  if (t.backticksScanned && (t.backticks[a] || 0) <= r)
    return e || (t.pending += o), t.pos += a, !0;
  let l = n, u;
  for (; (u = t.src.indexOf("`", l)) !== -1; ) {
    for (l = u + 1; l < s && t.src.charCodeAt(l) === 96; )
      l++;
    const f = l - u;
    if (f === a) {
      if (!e) {
        const d = t.push("code_inline", "code", 0);
        d.markup = o, d.content = t.src.slice(n, u).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
      }
      return t.pos = l, !0;
    }
    t.backticks[f] = u;
  }
  return t.backticksScanned = !0, e || (t.pending += o), t.pos += a, !0;
}
function Rse(t, e) {
  const n = t.pos, i = t.src.charCodeAt(n);
  if (e || i !== 126)
    return !1;
  const r = t.scanDelims(t.pos, !0);
  let s = r.length;
  const o = String.fromCharCode(i);
  if (s < 2)
    return !1;
  let a;
  s % 2 && (a = t.push("text", "", 0), a.content = o, s--);
  for (let l = 0; l < s; l += 2)
    a = t.push("text", "", 0), a.content = o + o, t.delimiters.push({
      marker: i,
      length: 0,
      // disable "rule of 3" length checks meant for emphasis
      token: t.tokens.length - 1,
      end: -1,
      open: r.can_open,
      close: r.can_close
    });
  return t.pos += r.length, !0;
}
function $M(t, e) {
  let n;
  const i = [], r = e.length;
  for (let s = 0; s < r; s++) {
    const o = e[s];
    if (o.marker !== 126 || o.end === -1)
      continue;
    const a = e[o.end];
    n = t.tokens[o.token], n.type = "s_open", n.tag = "s", n.nesting = 1, n.markup = "~~", n.content = "", n = t.tokens[a.token], n.type = "s_close", n.tag = "s", n.nesting = -1, n.markup = "~~", n.content = "", t.tokens[a.token - 1].type === "text" && t.tokens[a.token - 1].content === "~" && i.push(a.token - 1);
  }
  for (; i.length; ) {
    const s = i.pop();
    let o = s + 1;
    for (; o < t.tokens.length && t.tokens[o].type === "s_close"; )
      o++;
    o--, s !== o && (n = t.tokens[o], t.tokens[o] = t.tokens[s], t.tokens[s] = n);
  }
}
function jse(t) {
  const e = t.tokens_meta, n = t.tokens_meta.length;
  $M(t, t.delimiters);
  for (let i = 0; i < n; i++)
    e[i] && e[i].delimiters && $M(t, e[i].delimiters);
}
var bB = {
  tokenize: Rse,
  postProcess: jse
};
function Fse(t, e) {
  const n = t.pos, i = t.src.charCodeAt(n);
  if (e || i !== 95 && i !== 42)
    return !1;
  const r = t.scanDelims(t.pos, i === 42);
  for (let s = 0; s < r.length; s++) {
    const o = t.push("text", "", 0);
    o.content = String.fromCharCode(i), t.delimiters.push({
      // Char code of the starting marker (number).
      //
      marker: i,
      // Total length of these series of delimiters.
      //
      length: r.length,
      // A position of the token this delimiter corresponds to.
      //
      token: t.tokens.length - 1,
      // If this delimiter is matched as a valid opener, `end` will be
      // equal to its position, otherwise it's `-1`.
      //
      end: -1,
      // Boolean flags that determine if this delimiter could open or close
      // an emphasis.
      //
      open: r.can_open,
      close: r.can_close
    });
  }
  return t.pos += r.length, !0;
}
function MM(t, e) {
  const n = e.length;
  for (let i = n - 1; i >= 0; i--) {
    const r = e[i];
    if (r.marker !== 95 && r.marker !== 42 || r.end === -1)
      continue;
    const s = e[r.end], o = i > 0 && e[i - 1].end === r.end + 1 && // check that first two markers match and adjacent
    e[i - 1].marker === r.marker && e[i - 1].token === r.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
    e[r.end + 1].token === s.token + 1, a = String.fromCharCode(r.marker), l = t.tokens[r.token];
    l.type = o ? "strong_open" : "em_open", l.tag = o ? "strong" : "em", l.nesting = 1, l.markup = o ? a + a : a, l.content = "";
    const u = t.tokens[s.token];
    u.type = o ? "strong_close" : "em_close", u.tag = o ? "strong" : "em", u.nesting = -1, u.markup = o ? a + a : a, u.content = "", o && (t.tokens[e[i - 1].token].content = "", t.tokens[e[r.end + 1].token].content = "", i--);
  }
}
function Bse(t) {
  const e = t.tokens_meta, n = t.tokens_meta.length;
  MM(t, t.delimiters);
  for (let i = 0; i < n; i++)
    e[i] && e[i].delimiters && MM(t, e[i].delimiters);
}
var yB = {
  tokenize: Fse,
  postProcess: Bse
};
function zse(t, e) {
  let n, i, r, s, o = "", a = "", l = t.pos, u = !0;
  if (t.src.charCodeAt(t.pos) !== 91)
    return !1;
  const f = t.pos, d = t.posMax, h = t.pos + 1, m = t.md.helpers.parseLinkLabel(t, t.pos, !0);
  if (m < 0)
    return !1;
  let g = m + 1;
  if (g < d && t.src.charCodeAt(g) === 40) {
    for (u = !1, g++; g < d && (n = t.src.charCodeAt(g), !(!mn(n) && n !== 10)); g++)
      ;
    if (g >= d)
      return !1;
    if (l = g, r = t.md.helpers.parseLinkDestination(t.src, g, t.posMax), r.ok) {
      for (o = t.md.normalizeLink(r.str), t.md.validateLink(o) ? g = r.pos : o = "", l = g; g < d && (n = t.src.charCodeAt(g), !(!mn(n) && n !== 10)); g++)
        ;
      if (r = t.md.helpers.parseLinkTitle(t.src, g, t.posMax), g < d && l !== g && r.ok)
        for (a = r.str, g = r.pos; g < d && (n = t.src.charCodeAt(g), !(!mn(n) && n !== 10)); g++)
          ;
    }
    (g >= d || t.src.charCodeAt(g) !== 41) && (u = !0), g++;
  }
  if (u) {
    if (typeof t.env.references > "u")
      return !1;
    if (g < d && t.src.charCodeAt(g) === 91 ? (l = g + 1, g = t.md.helpers.parseLinkLabel(t, g), g >= 0 ? i = t.src.slice(l, g++) : g = m + 1) : g = m + 1, i || (i = t.src.slice(h, m)), s = t.env.references[Qk(i)], !s)
      return t.pos = f, !1;
    o = s.href, a = s.title;
  }
  if (!e) {
    t.pos = h, t.posMax = m;
    const w = t.push("link_open", "a", 1), x = [["href", o]];
    w.attrs = x, a && x.push(["title", a]), t.linkLevel++, t.md.inline.tokenize(t), t.linkLevel--, t.push("link_close", "a", -1);
  }
  return t.pos = g, t.posMax = d, !0;
}
function Wse(t, e) {
  let n, i, r, s, o, a, l, u, f = "";
  const d = t.pos, h = t.posMax;
  if (t.src.charCodeAt(t.pos) !== 33 || t.src.charCodeAt(t.pos + 1) !== 91)
    return !1;
  const m = t.pos + 2, g = t.md.helpers.parseLinkLabel(t, t.pos + 1, !1);
  if (g < 0)
    return !1;
  if (s = g + 1, s < h && t.src.charCodeAt(s) === 40) {
    for (s++; s < h && (n = t.src.charCodeAt(s), !(!mn(n) && n !== 10)); s++)
      ;
    if (s >= h)
      return !1;
    for (u = s, a = t.md.helpers.parseLinkDestination(t.src, s, t.posMax), a.ok && (f = t.md.normalizeLink(a.str), t.md.validateLink(f) ? s = a.pos : f = ""), u = s; s < h && (n = t.src.charCodeAt(s), !(!mn(n) && n !== 10)); s++)
      ;
    if (a = t.md.helpers.parseLinkTitle(t.src, s, t.posMax), s < h && u !== s && a.ok)
      for (l = a.str, s = a.pos; s < h && (n = t.src.charCodeAt(s), !(!mn(n) && n !== 10)); s++)
        ;
    else
      l = "";
    if (s >= h || t.src.charCodeAt(s) !== 41)
      return t.pos = d, !1;
    s++;
  } else {
    if (typeof t.env.references > "u")
      return !1;
    if (s < h && t.src.charCodeAt(s) === 91 ? (u = s + 1, s = t.md.helpers.parseLinkLabel(t, s), s >= 0 ? r = t.src.slice(u, s++) : s = g + 1) : s = g + 1, r || (r = t.src.slice(m, g)), o = t.env.references[Qk(r)], !o)
      return t.pos = d, !1;
    f = o.href, l = o.title;
  }
  if (!e) {
    i = t.src.slice(m, g);
    const w = [];
    t.md.inline.parse(i, t.md, t.env, w);
    const x = t.push("image", "img", 0), _ = [["src", f], ["alt", ""]];
    x.attrs = _, x.children = w, x.content = i, l && _.push(["title", l]);
  }
  return t.pos = s, t.posMax = h, !0;
}
const Hse = /^([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])?)*)$/, Qse = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
function Use(t, e) {
  let n = t.pos;
  if (t.src.charCodeAt(n) !== 60)
    return !1;
  const i = t.pos, r = t.posMax;
  for (; ; ) {
    if (++n >= r) return !1;
    const o = t.src.charCodeAt(n);
    if (o === 60) return !1;
    if (o === 62) break;
  }
  const s = t.src.slice(i + 1, n);
  if (Qse.test(s)) {
    const o = t.md.normalizeLink(s);
    if (!t.md.validateLink(o))
      return !1;
    if (!e) {
      const a = t.push("link_open", "a", 1);
      a.attrs = [["href", o]], a.markup = "autolink", a.info = "auto";
      const l = t.push("text", "", 0);
      l.content = t.md.normalizeLinkText(s);
      const u = t.push("link_close", "a", -1);
      u.markup = "autolink", u.info = "auto";
    }
    return t.pos += s.length + 2, !0;
  }
  if (Hse.test(s)) {
    const o = t.md.normalizeLink("mailto:" + s);
    if (!t.md.validateLink(o))
      return !1;
    if (!e) {
      const a = t.push("link_open", "a", 1);
      a.attrs = [["href", o]], a.markup = "autolink", a.info = "auto";
      const l = t.push("text", "", 0);
      l.content = t.md.normalizeLinkText(s);
      const u = t.push("link_close", "a", -1);
      u.markup = "autolink", u.info = "auto";
    }
    return t.pos += s.length + 2, !0;
  }
  return !1;
}
function Zse(t) {
  return /^<a[>\s]/i.test(t);
}
function qse(t) {
  return /^<\/a\s*>/i.test(t);
}
function Yse(t) {
  const e = t | 32;
  return e >= 97 && e <= 122;
}
function Vse(t, e) {
  if (!t.md.options.html)
    return !1;
  const n = t.posMax, i = t.pos;
  if (t.src.charCodeAt(i) !== 60 || i + 2 >= n)
    return !1;
  const r = t.src.charCodeAt(i + 1);
  if (r !== 33 && r !== 63 && r !== 47 && !Yse(r))
    return !1;
  const s = t.src.slice(i).match(Ose);
  if (!s)
    return !1;
  if (!e) {
    const o = t.push("html_inline", "", 0);
    o.content = s[0], Zse(o.content) && t.linkLevel++, qse(o.content) && t.linkLevel--;
  }
  return t.pos += s[0].length, !0;
}
const Xse = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Gse = /^&([a-z][a-z0-9]{1,31});/i;
function Kse(t, e) {
  const n = t.pos, i = t.posMax;
  if (t.src.charCodeAt(n) !== 38 || n + 1 >= i) return !1;
  if (t.src.charCodeAt(n + 1) === 35) {
    const s = t.src.slice(n).match(Xse);
    if (s) {
      if (!e) {
        const o = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), a = t.push("text_special", "", 0);
        a.content = k5(o) ? tw(o) : tw(65533), a.markup = s[0], a.info = "entity";
      }
      return t.pos += s[0].length, !0;
    }
  } else {
    const s = t.src.slice(n).match(Gse);
    if (s) {
      const o = lB.decodeHTML(s[0]);
      if (o !== s[0]) {
        if (!e) {
          const a = t.push("text_special", "", 0);
          a.content = o, a.markup = s[0], a.info = "entity";
        }
        return t.pos += s[0].length, !0;
      }
    }
  }
  return !1;
}
function NM(t) {
  const e = {}, n = t.length;
  if (!n) return;
  let i = 0, r = -2;
  const s = [];
  for (let o = 0; o < n; o++) {
    const a = t[o];
    if (s.push(0), (t[i].marker !== a.marker || r !== a.token - 1) && (i = o), r = a.token, a.length = a.length || 0, !a.close) continue;
    e.hasOwnProperty(a.marker) || (e[a.marker] = [-1, -1, -1, -1, -1, -1]);
    const l = e[a.marker][(a.open ? 3 : 0) + a.length % 3];
    let u = i - s[i] - 1, f = u;
    for (; u > l; u -= s[u] + 1) {
      const d = t[u];
      if (d.marker === a.marker && d.open && d.end < 0) {
        let h = !1;
        if ((d.close || a.open) && (d.length + a.length) % 3 === 0 && (d.length % 3 !== 0 || a.length % 3 !== 0) && (h = !0), !h) {
          const m = u > 0 && !t[u - 1].open ? s[u - 1] + 1 : 0;
          s[o] = o - u + m, s[u] = m, a.open = !1, d.end = o, d.close = !1, f = -1, r = -2;
          break;
        }
      }
    }
    f !== -1 && (e[a.marker][(a.open ? 3 : 0) + (a.length || 0) % 3] = f);
  }
}
function Jse(t) {
  const e = t.tokens_meta, n = t.tokens_meta.length;
  NM(t.delimiters);
  for (let i = 0; i < n; i++)
    e[i] && e[i].delimiters && NM(e[i].delimiters);
}
function eoe(t) {
  let e, n, i = 0;
  const r = t.tokens, s = t.tokens.length;
  for (e = n = 0; e < s; e++)
    r[e].nesting < 0 && i--, r[e].level = i, r[e].nesting > 0 && i++, r[e].type === "text" && e + 1 < s && r[e + 1].type === "text" ? r[e + 1].content = r[e].content + r[e + 1].content : (e !== n && (r[n] = r[e]), n++);
  e !== n && (r.length = n);
}
const b3 = [["text", Nse], ["linkify", Dse], ["newline", Pse], ["escape", Ise], ["backticks", Lse], ["strikethrough", bB.tokenize], ["emphasis", yB.tokenize], ["link", zse], ["image", Wse], ["autolink", Use], ["html_inline", Vse], ["entity", Kse]], y3 = [
  ["balance_pairs", Jse],
  ["strikethrough", bB.postProcess],
  ["emphasis", yB.postProcess],
  // rules for pairs separate '**' into its own text tokens, which may be left unused,
  // rule below merges unused segments back with the rest of the text
  ["fragments_join", eoe]
];
function a1() {
  this.ruler = new xs();
  for (let t = 0; t < b3.length; t++)
    this.ruler.push(b3[t][0], b3[t][1]);
  this.ruler2 = new xs();
  for (let t = 0; t < y3.length; t++)
    this.ruler2.push(y3[t][0], y3[t][1]);
}
a1.prototype.skipToken = function(t) {
  const e = t.pos, n = this.ruler.getRules(""), i = n.length, r = t.md.options.maxNesting, s = t.cache;
  if (typeof s[e] < "u") {
    t.pos = s[e];
    return;
  }
  let o = !1;
  if (t.level < r) {
    for (let a = 0; a < i; a++)
      if (t.level++, o = n[a](t, !0), t.level--, o) {
        if (e >= t.pos)
          throw new Error("inline rule didn't increment state.pos");
        break;
      }
  } else
    t.pos = t.posMax;
  o || t.pos++, s[e] = t.pos;
};
a1.prototype.tokenize = function(t) {
  const e = this.ruler.getRules(""), n = e.length, i = t.posMax, r = t.md.options.maxNesting;
  for (; t.pos < i; ) {
    const s = t.pos;
    let o = !1;
    if (t.level < r) {
      for (let a = 0; a < n; a++)
        if (o = e[a](t, !1), o) {
          if (s >= t.pos)
            throw new Error("inline rule didn't increment state.pos");
          break;
        }
    }
    if (o) {
      if (t.pos >= i)
        break;
      continue;
    }
    t.pending += t.src[t.pos++];
  }
  t.pending && t.pushPending();
};
a1.prototype.parse = function(t, e, n, i) {
  const r = new this.State(t, e, n, i);
  this.tokenize(r);
  const s = this.ruler2.getRules(""), o = s.length;
  for (let a = 0; a < o; a++)
    s[a](r);
};
a1.prototype.State = o1;
var toe = {
  options: {
    // Enable HTML tags in source
    html: !1,
    // Use '/' to close single tags (<br />)
    xhtmlOut: !1,
    // Convert '\n' in paragraphs into <br>
    breaks: !1,
    // CSS language prefix for fenced blocks
    langPrefix: "language-",
    // autoconvert URL-like texts to links
    linkify: !1,
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 100
  },
  components: {
    core: {},
    block: {},
    inline: {}
  }
}, noe = {
  options: {
    // Enable HTML tags in source
    html: !1,
    // Use '/' to close single tags (<br />)
    xhtmlOut: !1,
    // Convert '\n' in paragraphs into <br>
    breaks: !1,
    // CSS language prefix for fenced blocks
    langPrefix: "language-",
    // autoconvert URL-like texts to links
    linkify: !1,
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 20
  },
  components: {
    core: {
      rules: ["normalize", "block", "inline", "text_join"]
    },
    block: {
      rules: ["paragraph"]
    },
    inline: {
      rules: ["text"],
      rules2: ["balance_pairs", "fragments_join"]
    }
  }
}, ioe = {
  options: {
    // Enable HTML tags in source
    html: !0,
    // Use '/' to close single tags (<br />)
    xhtmlOut: !0,
    // Convert '\n' in paragraphs into <br>
    breaks: !1,
    // CSS language prefix for fenced blocks
    langPrefix: "language-",
    // autoconvert URL-like texts to links
    linkify: !1,
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 20
  },
  components: {
    core: {
      rules: ["normalize", "block", "inline", "text_join"]
    },
    block: {
      rules: ["blockquote", "code", "fence", "heading", "hr", "html_block", "lheading", "list", "reference", "paragraph"]
    },
    inline: {
      rules: ["autolink", "backticks", "emphasis", "entity", "escape", "html_inline", "image", "link", "newline", "text"],
      rules2: ["balance_pairs", "emphasis", "fragments_join"]
    }
  }
};
const roe = {
  default: toe,
  zero: noe,
  commonmark: ioe
}, soe = /^(vbscript|javascript|file|data):/, ooe = /^data:image\/(gif|png|jpeg|webp);/;
function aoe(t) {
  const e = t.trim().toLowerCase();
  return soe.test(e) ? ooe.test(e) : !0;
}
const wB = ["http:", "https:", "mailto:"];
function loe(t) {
  const e = _u.parse(t, !0);
  if (e.hostname && (!e.protocol || wB.indexOf(e.protocol) >= 0))
    try {
      e.hostname = uB.toASCII(e.hostname);
    } catch {
    }
  return _u.encode(_u.format(e));
}
function uoe(t) {
  const e = _u.parse(t, !0);
  if (e.hostname && (!e.protocol || wB.indexOf(e.protocol) >= 0))
    try {
      e.hostname = uB.toUnicode(e.hostname);
    } catch {
    }
  return _u.decode(_u.format(e), _u.decode.defaultChars + "%");
}
function mo(t, e) {
  if (!(this instanceof mo))
    return new mo(t, e);
  e || w5(t) || (e = t || {}, t = "default"), this.inline = new a1(), this.block = new Uk(), this.core = new x5(), this.renderer = new Kh(), this.linkify = new yre(), this.validateLink = aoe, this.normalizeLink = loe, this.normalizeLinkText = uoe, this.utils = Ire, this.helpers = Hk({}, Fre), this.options = {}, this.configure(t), e && this.set(e);
}
mo.prototype.set = function(t) {
  return Hk(this.options, t), this;
};
mo.prototype.configure = function(t) {
  const e = this;
  if (w5(t)) {
    const n = t;
    if (t = roe[n], !t)
      throw new Error('Wrong `markdown-it` preset "' + n + '", check name');
  }
  if (!t)
    throw new Error("Wrong `markdown-it` preset, can't be empty");
  return t.options && e.set(t.options), t.components && Object.keys(t.components).forEach(function(n) {
    t.components[n].rules && e[n].ruler.enableOnly(t.components[n].rules), t.components[n].rules2 && e[n].ruler2.enableOnly(t.components[n].rules2);
  }), this;
};
mo.prototype.enable = function(t, e) {
  let n = [];
  Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function(r) {
    n = n.concat(this[r].ruler.enable(t, !0));
  }, this), n = n.concat(this.inline.ruler2.enable(t, !0));
  const i = t.filter(function(r) {
    return n.indexOf(r) < 0;
  });
  if (i.length && !e)
    throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + i);
  return this;
};
mo.prototype.disable = function(t, e) {
  let n = [];
  Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function(r) {
    n = n.concat(this[r].ruler.disable(t, !0));
  }, this), n = n.concat(this.inline.ruler2.disable(t, !0));
  const i = t.filter(function(r) {
    return n.indexOf(r) < 0;
  });
  if (i.length && !e)
    throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + i);
  return this;
};
mo.prototype.use = function(t) {
  const e = [this].concat(Array.prototype.slice.call(arguments, 1));
  return t.apply(t, e), this;
};
mo.prototype.parse = function(t, e) {
  if (typeof t != "string")
    throw new Error("Input data should be a String");
  const n = new this.core.State(t, this, e);
  return this.core.process(n), n.tokens;
};
mo.prototype.render = function(t, e) {
  return e = e || {}, this.renderer.render(this.parse(t, e), this.options, e);
};
mo.prototype.parseInline = function(t, e) {
  const n = new this.core.State(t, this, e);
  return n.inlineMode = !0, this.core.process(n), n.tokens;
};
mo.prototype.renderInline = function(t, e) {
  return e = e || {}, this.renderer.render(this.parseInline(t, e), this.options, e);
};
var kB = mo, f4 = { exports: {} };
const coe = "2.0.0", xB = 256, foe = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
9007199254740991, doe = 16, hoe = xB - 6, poe = [
  "major",
  "premajor",
  "minor",
  "preminor",
  "patch",
  "prepatch",
  "prerelease"
];
var Zk = {
  MAX_LENGTH: xB,
  MAX_SAFE_COMPONENT_LENGTH: doe,
  MAX_SAFE_BUILD_LENGTH: hoe,
  MAX_SAFE_INTEGER: foe,
  RELEASE_TYPES: poe,
  SEMVER_SPEC_VERSION: coe,
  FLAG_INCLUDE_PRERELEASE: 1,
  FLAG_LOOSE: 2
};
const moe = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
};
var qk = moe;
(function(t, e) {
  const {
    MAX_SAFE_COMPONENT_LENGTH: n,
    MAX_SAFE_BUILD_LENGTH: i,
    MAX_LENGTH: r
  } = Zk, s = qk;
  e = t.exports = {};
  const o = e.re = [], a = e.safeRe = [], l = e.src = [], u = e.safeSrc = [], f = e.t = {};
  let d = 0;
  const h = "[a-zA-Z0-9-]", m = [
    ["\\s", 1],
    ["\\d", r],
    [h, i]
  ], g = (x) => {
    for (const [_, S] of m)
      x = x.split(`${_}*`).join(`${_}{0,${S}}`).split(`${_}+`).join(`${_}{1,${S}}`);
    return x;
  }, w = (x, _, S) => {
    const C = g(_), E = d++;
    s(x, E, _), f[x] = E, l[E] = _, u[E] = C, o[E] = new RegExp(_, S ? "g" : void 0), a[E] = new RegExp(C, S ? "g" : void 0);
  };
  w("NUMERICIDENTIFIER", "0|[1-9]\\d*"), w("NUMERICIDENTIFIERLOOSE", "\\d+"), w("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${h}*`), w("MAINVERSION", `(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})`), w("MAINVERSIONLOOSE", `(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})`), w("PRERELEASEIDENTIFIER", `(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIER]})`), w("PRERELEASEIDENTIFIERLOOSE", `(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIERLOOSE]})`), w("PRERELEASE", `(?:-(${l[f.PRERELEASEIDENTIFIER]}(?:\\.${l[f.PRERELEASEIDENTIFIER]})*))`), w("PRERELEASELOOSE", `(?:-?(${l[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[f.PRERELEASEIDENTIFIERLOOSE]})*))`), w("BUILDIDENTIFIER", `${h}+`), w("BUILD", `(?:\\+(${l[f.BUILDIDENTIFIER]}(?:\\.${l[f.BUILDIDENTIFIER]})*))`), w("FULLPLAIN", `v?${l[f.MAINVERSION]}${l[f.PRERELEASE]}?${l[f.BUILD]}?`), w("FULL", `^${l[f.FULLPLAIN]}$`), w("LOOSEPLAIN", `[v=\\s]*${l[f.MAINVERSIONLOOSE]}${l[f.PRERELEASELOOSE]}?${l[f.BUILD]}?`), w("LOOSE", `^${l[f.LOOSEPLAIN]}$`), w("GTLT", "((?:<|>)?=?)"), w("XRANGEIDENTIFIERLOOSE", `${l[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), w("XRANGEIDENTIFIER", `${l[f.NUMERICIDENTIFIER]}|x|X|\\*`), w("XRANGEPLAIN", `[v=\\s]*(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:${l[f.PRERELEASE]})?${l[f.BUILD]}?)?)?`), w("XRANGEPLAINLOOSE", `[v=\\s]*(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:${l[f.PRERELEASELOOSE]})?${l[f.BUILD]}?)?)?`), w("XRANGE", `^${l[f.GTLT]}\\s*${l[f.XRANGEPLAIN]}$`), w("XRANGELOOSE", `^${l[f.GTLT]}\\s*${l[f.XRANGEPLAINLOOSE]}$`), w("COERCEPLAIN", `(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`), w("COERCE", `${l[f.COERCEPLAIN]}(?:$|[^\\d])`), w("COERCEFULL", l[f.COERCEPLAIN] + `(?:${l[f.PRERELEASE]})?(?:${l[f.BUILD]})?(?:$|[^\\d])`), w("COERCERTL", l[f.COERCE], !0), w("COERCERTLFULL", l[f.COERCEFULL], !0), w("LONETILDE", "(?:~>?)"), w("TILDETRIM", `(\\s*)${l[f.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", w("TILDE", `^${l[f.LONETILDE]}${l[f.XRANGEPLAIN]}$`), w("TILDELOOSE", `^${l[f.LONETILDE]}${l[f.XRANGEPLAINLOOSE]}$`), w("LONECARET", "(?:\\^)"), w("CARETTRIM", `(\\s*)${l[f.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", w("CARET", `^${l[f.LONECARET]}${l[f.XRANGEPLAIN]}$`), w("CARETLOOSE", `^${l[f.LONECARET]}${l[f.XRANGEPLAINLOOSE]}$`), w("COMPARATORLOOSE", `^${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]})$|^$`), w("COMPARATOR", `^${l[f.GTLT]}\\s*(${l[f.FULLPLAIN]})$|^$`), w("COMPARATORTRIM", `(\\s*)${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]}|${l[f.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", w("HYPHENRANGE", `^\\s*(${l[f.XRANGEPLAIN]})\\s+-\\s+(${l[f.XRANGEPLAIN]})\\s*$`), w("HYPHENRANGELOOSE", `^\\s*(${l[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[f.XRANGEPLAINLOOSE]})\\s*$`), w("STAR", "(<|>)?=?\\s*\\*"), w("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), w("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
})(f4, f4.exports);
var l1 = f4.exports;
const goe = Object.freeze({ loose: !0 }), voe = Object.freeze({}), boe = (t) => t ? typeof t != "object" ? goe : t : voe;
var O5 = boe;
const AM = /^[0-9]+$/, _B = (t, e) => {
  if (typeof t == "number" && typeof e == "number")
    return t === e ? 0 : t < e ? -1 : 1;
  const n = AM.test(t), i = AM.test(e);
  return n && i && (t = +t, e = +e), t === e ? 0 : n && !i ? -1 : i && !n ? 1 : t < e ? -1 : 1;
}, yoe = (t, e) => _B(e, t);
var OB = {
  compareIdentifiers: _B,
  rcompareIdentifiers: yoe
};
const Uv = qk, { MAX_LENGTH: DM, MAX_SAFE_INTEGER: Zv } = Zk, { safeRe: qv, t: Yv } = l1, woe = O5, { compareIdentifiers: w3 } = OB;
let koe = class ua {
  constructor(e, n) {
    if (n = woe(n), e instanceof ua) {
      if (e.loose === !!n.loose && e.includePrerelease === !!n.includePrerelease)
        return e;
      e = e.version;
    } else if (typeof e != "string")
      throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
    if (e.length > DM)
      throw new TypeError(
        `version is longer than ${DM} characters`
      );
    Uv("SemVer", e, n), this.options = n, this.loose = !!n.loose, this.includePrerelease = !!n.includePrerelease;
    const i = e.trim().match(n.loose ? qv[Yv.LOOSE] : qv[Yv.FULL]);
    if (!i)
      throw new TypeError(`Invalid Version: ${e}`);
    if (this.raw = e, this.major = +i[1], this.minor = +i[2], this.patch = +i[3], this.major > Zv || this.major < 0)
      throw new TypeError("Invalid major version");
    if (this.minor > Zv || this.minor < 0)
      throw new TypeError("Invalid minor version");
    if (this.patch > Zv || this.patch < 0)
      throw new TypeError("Invalid patch version");
    i[4] ? this.prerelease = i[4].split(".").map((r) => {
      if (/^[0-9]+$/.test(r)) {
        const s = +r;
        if (s >= 0 && s < Zv)
          return s;
      }
      return r;
    }) : this.prerelease = [], this.build = i[5] ? i[5].split(".") : [], this.format();
  }
  format() {
    return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
  }
  toString() {
    return this.version;
  }
  compare(e) {
    if (Uv("SemVer.compare", this.version, this.options, e), !(e instanceof ua)) {
      if (typeof e == "string" && e === this.version)
        return 0;
      e = new ua(e, this.options);
    }
    return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
  }
  compareMain(e) {
    return e instanceof ua || (e = new ua(e, this.options)), this.major < e.major ? -1 : this.major > e.major ? 1 : this.minor < e.minor ? -1 : this.minor > e.minor ? 1 : this.patch < e.patch ? -1 : this.patch > e.patch ? 1 : 0;
  }
  comparePre(e) {
    if (e instanceof ua || (e = new ua(e, this.options)), this.prerelease.length && !e.prerelease.length)
      return -1;
    if (!this.prerelease.length && e.prerelease.length)
      return 1;
    if (!this.prerelease.length && !e.prerelease.length)
      return 0;
    let n = 0;
    do {
      const i = this.prerelease[n], r = e.prerelease[n];
      if (Uv("prerelease compare", n, i, r), i === void 0 && r === void 0)
        return 0;
      if (r === void 0)
        return 1;
      if (i === void 0)
        return -1;
      if (i === r)
        continue;
      return w3(i, r);
    } while (++n);
  }
  compareBuild(e) {
    e instanceof ua || (e = new ua(e, this.options));
    let n = 0;
    do {
      const i = this.build[n], r = e.build[n];
      if (Uv("build compare", n, i, r), i === void 0 && r === void 0)
        return 0;
      if (r === void 0)
        return 1;
      if (i === void 0)
        return -1;
      if (i === r)
        continue;
      return w3(i, r);
    } while (++n);
  }
  // preminor will bump the version up to the next minor release, and immediately
  // down to pre-release. premajor and prepatch work the same way.
  inc(e, n, i) {
    if (e.startsWith("pre")) {
      if (!n && i === !1)
        throw new Error("invalid increment argument: identifier is empty");
      if (n) {
        const r = `-${n}`.match(this.options.loose ? qv[Yv.PRERELEASELOOSE] : qv[Yv.PRERELEASE]);
        if (!r || r[1] !== n)
          throw new Error(`invalid identifier: ${n}`);
      }
    }
    switch (e) {
      case "premajor":
        this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", n, i);
        break;
      case "preminor":
        this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", n, i);
        break;
      case "prepatch":
        this.prerelease.length = 0, this.inc("patch", n, i), this.inc("pre", n, i);
        break;
      case "prerelease":
        this.prerelease.length === 0 && this.inc("patch", n, i), this.inc("pre", n, i);
        break;
      case "release":
        if (this.prerelease.length === 0)
          throw new Error(`version ${this.raw} is not a prerelease`);
        this.prerelease.length = 0;
        break;
      case "major":
        (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
        break;
      case "minor":
        (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
        break;
      case "patch":
        this.prerelease.length === 0 && this.patch++, this.prerelease = [];
        break;
      case "pre": {
        const r = Number(i) ? 1 : 0;
        if (this.prerelease.length === 0)
          this.prerelease = [r];
        else {
          let s = this.prerelease.length;
          for (; --s >= 0; )
            typeof this.prerelease[s] == "number" && (this.prerelease[s]++, s = -2);
          if (s === -1) {
            if (n === this.prerelease.join(".") && i === !1)
              throw new Error("invalid increment argument: identifier already exists");
            this.prerelease.push(r);
          }
        }
        if (n) {
          let s = [n, r];
          i === !1 && (s = [n]), w3(this.prerelease[0], n) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = s) : this.prerelease = s;
        }
        break;
      }
      default:
        throw new Error(`invalid increment argument: ${e}`);
    }
    return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
  }
};
var ss = koe;
const PM = ss, xoe = (t, e, n = !1) => {
  if (t instanceof PM)
    return t;
  try {
    return new PM(t, e);
  } catch (i) {
    if (!n)
      return null;
    throw i;
  }
};
var Jh = xoe;
const _oe = Jh, Ooe = (t, e) => {
  const n = _oe(t, e);
  return n ? n.version : null;
};
var Soe = Ooe;
const Coe = Jh, Eoe = (t, e) => {
  const n = Coe(t.trim().replace(/^[=v]+/, ""), e);
  return n ? n.version : null;
};
var Toe = Eoe;
const IM = ss, $oe = (t, e, n, i, r) => {
  typeof n == "string" && (r = i, i = n, n = void 0);
  try {
    return new IM(
      t instanceof IM ? t.version : t,
      n
    ).inc(e, i, r).version;
  } catch {
    return null;
  }
};
var Moe = $oe;
const LM = Jh, Noe = (t, e) => {
  const n = LM(t, null, !0), i = LM(e, null, !0), r = n.compare(i);
  if (r === 0)
    return null;
  const s = r > 0, o = s ? n : i, a = s ? i : n, l = !!o.prerelease.length;
  if (!!a.prerelease.length && !l) {
    if (!a.patch && !a.minor)
      return "major";
    if (a.compareMain(o) === 0)
      return a.minor && !a.patch ? "minor" : "patch";
  }
  const f = l ? "pre" : "";
  return n.major !== i.major ? f + "major" : n.minor !== i.minor ? f + "minor" : n.patch !== i.patch ? f + "patch" : "prerelease";
};
var Aoe = Noe;
const Doe = ss, Poe = (t, e) => new Doe(t, e).major;
var Ioe = Poe;
const Loe = ss, Roe = (t, e) => new Loe(t, e).minor;
var joe = Roe;
const Foe = ss, Boe = (t, e) => new Foe(t, e).patch;
var zoe = Boe;
const Woe = Jh, Hoe = (t, e) => {
  const n = Woe(t, e);
  return n && n.prerelease.length ? n.prerelease : null;
};
var Qoe = Hoe;
const RM = ss, Uoe = (t, e, n) => new RM(t, n).compare(new RM(e, n));
var Uo = Uoe;
const Zoe = Uo, qoe = (t, e, n) => Zoe(e, t, n);
var Yoe = qoe;
const Voe = Uo, Xoe = (t, e) => Voe(t, e, !0);
var Goe = Xoe;
const jM = ss, Koe = (t, e, n) => {
  const i = new jM(t, n), r = new jM(e, n);
  return i.compare(r) || i.compareBuild(r);
};
var S5 = Koe;
const Joe = S5, eae = (t, e) => t.sort((n, i) => Joe(n, i, e));
var tae = eae;
const nae = S5, iae = (t, e) => t.sort((n, i) => nae(i, n, e));
var rae = iae;
const sae = Uo, oae = (t, e, n) => sae(t, e, n) > 0;
var Yk = oae;
const aae = Uo, lae = (t, e, n) => aae(t, e, n) < 0;
var C5 = lae;
const uae = Uo, cae = (t, e, n) => uae(t, e, n) === 0;
var SB = cae;
const fae = Uo, dae = (t, e, n) => fae(t, e, n) !== 0;
var CB = dae;
const hae = Uo, pae = (t, e, n) => hae(t, e, n) >= 0;
var E5 = pae;
const mae = Uo, gae = (t, e, n) => mae(t, e, n) <= 0;
var T5 = gae;
const vae = SB, bae = CB, yae = Yk, wae = E5, kae = C5, xae = T5, _ae = (t, e, n, i) => {
  switch (e) {
    case "===":
      return typeof t == "object" && (t = t.version), typeof n == "object" && (n = n.version), t === n;
    case "!==":
      return typeof t == "object" && (t = t.version), typeof n == "object" && (n = n.version), t !== n;
    case "":
    case "=":
    case "==":
      return vae(t, n, i);
    case "!=":
      return bae(t, n, i);
    case ">":
      return yae(t, n, i);
    case ">=":
      return wae(t, n, i);
    case "<":
      return kae(t, n, i);
    case "<=":
      return xae(t, n, i);
    default:
      throw new TypeError(`Invalid operator: ${e}`);
  }
};
var EB = _ae;
const Oae = ss, Sae = Jh, { safeRe: Vv, t: Xv } = l1, Cae = (t, e) => {
  if (t instanceof Oae)
    return t;
  if (typeof t == "number" && (t = String(t)), typeof t != "string")
    return null;
  e = e || {};
  let n = null;
  if (!e.rtl)
    n = t.match(e.includePrerelease ? Vv[Xv.COERCEFULL] : Vv[Xv.COERCE]);
  else {
    const l = e.includePrerelease ? Vv[Xv.COERCERTLFULL] : Vv[Xv.COERCERTL];
    let u;
    for (; (u = l.exec(t)) && (!n || n.index + n[0].length !== t.length); )
      (!n || u.index + u[0].length !== n.index + n[0].length) && (n = u), l.lastIndex = u.index + u[1].length + u[2].length;
    l.lastIndex = -1;
  }
  if (n === null)
    return null;
  const i = n[2], r = n[3] || "0", s = n[4] || "0", o = e.includePrerelease && n[5] ? `-${n[5]}` : "", a = e.includePrerelease && n[6] ? `+${n[6]}` : "";
  return Sae(`${i}.${r}.${s}${o}${a}`, e);
};
var Eae = Cae;
class Tae {
  constructor() {
    this.max = 1e3, this.map = /* @__PURE__ */ new Map();
  }
  get(e) {
    const n = this.map.get(e);
    if (n !== void 0)
      return this.map.delete(e), this.map.set(e, n), n;
  }
  delete(e) {
    return this.map.delete(e);
  }
  set(e, n) {
    if (!this.delete(e) && n !== void 0) {
      if (this.map.size >= this.max) {
        const r = this.map.keys().next().value;
        this.delete(r);
      }
      this.map.set(e, n);
    }
    return this;
  }
}
var $ae = Tae, k3, FM;
function Zo() {
  if (FM) return k3;
  FM = 1;
  const t = /\s+/g;
  class e {
    constructor(R, q) {
      if (q = r(q), R instanceof e)
        return R.loose === !!q.loose && R.includePrerelease === !!q.includePrerelease ? R : new e(R.raw, q);
      if (R instanceof s)
        return this.raw = R.value, this.set = [[R]], this.formatted = void 0, this;
      if (this.options = q, this.loose = !!q.loose, this.includePrerelease = !!q.includePrerelease, this.raw = R.trim().replace(t, " "), this.set = this.raw.split("||").map((Y) => this.parseRange(Y.trim())).filter((Y) => Y.length), !this.set.length)
        throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
      if (this.set.length > 1) {
        const Y = this.set[0];
        if (this.set = this.set.filter((K) => !w(K[0])), this.set.length === 0)
          this.set = [Y];
        else if (this.set.length > 1) {
          for (const K of this.set)
            if (K.length === 1 && x(K[0])) {
              this.set = [K];
              break;
            }
        }
      }
      this.formatted = void 0;
    }
    get range() {
      if (this.formatted === void 0) {
        this.formatted = "";
        for (let R = 0; R < this.set.length; R++) {
          R > 0 && (this.formatted += "||");
          const q = this.set[R];
          for (let Y = 0; Y < q.length; Y++)
            Y > 0 && (this.formatted += " "), this.formatted += q[Y].toString().trim();
        }
      }
      return this.formatted;
    }
    format() {
      return this.range;
    }
    toString() {
      return this.range;
    }
    parseRange(R) {
      const Y = ((this.options.includePrerelease && m) | (this.options.loose && g)) + ":" + R, K = i.get(Y);
      if (K)
        return K;
      const te = this.options.loose, se = te ? l[u.HYPHENRANGELOOSE] : l[u.HYPHENRANGE];
      R = R.replace(se, Q(this.options.includePrerelease)), o("hyphen replace", R), R = R.replace(l[u.COMPARATORTRIM], f), o("comparator trim", R), R = R.replace(l[u.TILDETRIM], d), o("tilde trim", R), R = R.replace(l[u.CARETTRIM], h), o("caret trim", R);
      let ce = R.split(" ").map((le) => S(le, this.options)).join(" ").split(/\s+/).map((le) => L(le, this.options));
      te && (ce = ce.filter((le) => (o("loose invalid filter", le, this.options), !!le.match(l[u.COMPARATORLOOSE])))), o("range list", ce);
      const U = /* @__PURE__ */ new Map(), F = ce.map((le) => new s(le, this.options));
      for (const le of F) {
        if (w(le))
          return [le];
        U.set(le.value, le);
      }
      U.size > 1 && U.has("") && U.delete("");
      const oe = [...U.values()];
      return i.set(Y, oe), oe;
    }
    intersects(R, q) {
      if (!(R instanceof e))
        throw new TypeError("a Range is required");
      return this.set.some((Y) => _(Y, q) && R.set.some((K) => _(K, q) && Y.every((te) => K.every((se) => te.intersects(se, q)))));
    }
    // if ANY of the sets match ALL of its comparators, then pass
    test(R) {
      if (!R)
        return !1;
      if (typeof R == "string")
        try {
          R = new a(R, this.options);
        } catch {
          return !1;
        }
      for (let q = 0; q < this.set.length; q++)
        if (V(this.set[q], R, this.options))
          return !0;
      return !1;
    }
  }
  k3 = e;
  const n = $ae, i = new n(), r = O5, s = Vk(), o = qk, a = ss, {
    safeRe: l,
    t: u,
    comparatorTrimReplace: f,
    tildeTrimReplace: d,
    caretTrimReplace: h
  } = l1, { FLAG_INCLUDE_PRERELEASE: m, FLAG_LOOSE: g } = Zk, w = (H) => H.value === "<0.0.0-0", x = (H) => H.value === "", _ = (H, R) => {
    let q = !0;
    const Y = H.slice();
    let K = Y.pop();
    for (; q && Y.length; )
      q = Y.every((te) => K.intersects(te, R)), K = Y.pop();
    return q;
  }, S = (H, R) => (H = H.replace(l[u.BUILD], ""), o("comp", H, R), H = $(H, R), o("caret", H), H = E(H, R), o("tildes", H), H = W(H, R), o("xrange", H), H = Z(H, R), o("stars", H), H), C = (H) => !H || H.toLowerCase() === "x" || H === "*", E = (H, R) => H.trim().split(/\s+/).map((q) => M(q, R)).join(" "), M = (H, R) => {
    const q = R.loose ? l[u.TILDELOOSE] : l[u.TILDE];
    return H.replace(q, (Y, K, te, se, ce) => {
      o("tilde", H, Y, K, te, se, ce);
      let U;
      return C(K) ? U = "" : C(te) ? U = `>=${K}.0.0 <${+K + 1}.0.0-0` : C(se) ? U = `>=${K}.${te}.0 <${K}.${+te + 1}.0-0` : ce ? (o("replaceTilde pr", ce), U = `>=${K}.${te}.${se}-${ce} <${K}.${+te + 1}.0-0`) : U = `>=${K}.${te}.${se} <${K}.${+te + 1}.0-0`, o("tilde return", U), U;
    });
  }, $ = (H, R) => H.trim().split(/\s+/).map((q) => P(q, R)).join(" "), P = (H, R) => {
    o("caret", H, R);
    const q = R.loose ? l[u.CARETLOOSE] : l[u.CARET], Y = R.includePrerelease ? "-0" : "";
    return H.replace(q, (K, te, se, ce, U) => {
      o("caret", H, K, te, se, ce, U);
      let F;
      return C(te) ? F = "" : C(se) ? F = `>=${te}.0.0${Y} <${+te + 1}.0.0-0` : C(ce) ? te === "0" ? F = `>=${te}.${se}.0${Y} <${te}.${+se + 1}.0-0` : F = `>=${te}.${se}.0${Y} <${+te + 1}.0.0-0` : U ? (o("replaceCaret pr", U), te === "0" ? se === "0" ? F = `>=${te}.${se}.${ce}-${U} <${te}.${se}.${+ce + 1}-0` : F = `>=${te}.${se}.${ce}-${U} <${te}.${+se + 1}.0-0` : F = `>=${te}.${se}.${ce}-${U} <${+te + 1}.0.0-0`) : (o("no pr"), te === "0" ? se === "0" ? F = `>=${te}.${se}.${ce}${Y} <${te}.${se}.${+ce + 1}-0` : F = `>=${te}.${se}.${ce}${Y} <${te}.${+se + 1}.0-0` : F = `>=${te}.${se}.${ce} <${+te + 1}.0.0-0`), o("caret return", F), F;
    });
  }, W = (H, R) => (o("replaceXRanges", H, R), H.split(/\s+/).map((q) => z(q, R)).join(" ")), z = (H, R) => {
    H = H.trim();
    const q = R.loose ? l[u.XRANGELOOSE] : l[u.XRANGE];
    return H.replace(q, (Y, K, te, se, ce, U) => {
      o("xRange", H, Y, K, te, se, ce, U);
      const F = C(te), oe = F || C(se), le = oe || C(ce), pe = le;
      return K === "=" && pe && (K = ""), U = R.includePrerelease ? "-0" : "", F ? K === ">" || K === "<" ? Y = "<0.0.0-0" : Y = "*" : K && pe ? (oe && (se = 0), ce = 0, K === ">" ? (K = ">=", oe ? (te = +te + 1, se = 0, ce = 0) : (se = +se + 1, ce = 0)) : K === "<=" && (K = "<", oe ? te = +te + 1 : se = +se + 1), K === "<" && (U = "-0"), Y = `${K + te}.${se}.${ce}${U}`) : oe ? Y = `>=${te}.0.0${U} <${+te + 1}.0.0-0` : le && (Y = `>=${te}.${se}.0${U} <${te}.${+se + 1}.0-0`), o("xRange return", Y), Y;
    });
  }, Z = (H, R) => (o("replaceStars", H, R), H.trim().replace(l[u.STAR], "")), L = (H, R) => (o("replaceGTE0", H, R), H.trim().replace(l[R.includePrerelease ? u.GTE0PRE : u.GTE0], "")), Q = (H) => (R, q, Y, K, te, se, ce, U, F, oe, le, pe) => (C(Y) ? q = "" : C(K) ? q = `>=${Y}.0.0${H ? "-0" : ""}` : C(te) ? q = `>=${Y}.${K}.0${H ? "-0" : ""}` : se ? q = `>=${q}` : q = `>=${q}${H ? "-0" : ""}`, C(F) ? U = "" : C(oe) ? U = `<${+F + 1}.0.0-0` : C(le) ? U = `<${F}.${+oe + 1}.0-0` : pe ? U = `<=${F}.${oe}.${le}-${pe}` : H ? U = `<${F}.${oe}.${+le + 1}-0` : U = `<=${U}`, `${q} ${U}`.trim()), V = (H, R, q) => {
    for (let Y = 0; Y < H.length; Y++)
      if (!H[Y].test(R))
        return !1;
    if (R.prerelease.length && !q.includePrerelease) {
      for (let Y = 0; Y < H.length; Y++)
        if (o(H[Y].semver), H[Y].semver !== s.ANY && H[Y].semver.prerelease.length > 0) {
          const K = H[Y].semver;
          if (K.major === R.major && K.minor === R.minor && K.patch === R.patch)
            return !0;
        }
      return !1;
    }
    return !0;
  };
  return k3;
}
var x3, BM;
function Vk() {
  if (BM) return x3;
  BM = 1;
  const t = Symbol("SemVer ANY");
  class e {
    static get ANY() {
      return t;
    }
    constructor(f, d) {
      if (d = n(d), f instanceof e) {
        if (f.loose === !!d.loose)
          return f;
        f = f.value;
      }
      f = f.trim().split(/\s+/).join(" "), o("comparator", f, d), this.options = d, this.loose = !!d.loose, this.parse(f), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, o("comp", this);
    }
    parse(f) {
      const d = this.options.loose ? i[r.COMPARATORLOOSE] : i[r.COMPARATOR], h = f.match(d);
      if (!h)
        throw new TypeError(`Invalid comparator: ${f}`);
      this.operator = h[1] !== void 0 ? h[1] : "", this.operator === "=" && (this.operator = ""), h[2] ? this.semver = new a(h[2], this.options.loose) : this.semver = t;
    }
    toString() {
      return this.value;
    }
    test(f) {
      if (o("Comparator.test", f, this.options.loose), this.semver === t || f === t)
        return !0;
      if (typeof f == "string")
        try {
          f = new a(f, this.options);
        } catch {
          return !1;
        }
      return s(f, this.operator, this.semver, this.options);
    }
    intersects(f, d) {
      if (!(f instanceof e))
        throw new TypeError("a Comparator is required");
      return this.operator === "" ? this.value === "" ? !0 : new l(f.value, d).test(this.value) : f.operator === "" ? f.value === "" ? !0 : new l(this.value, d).test(f.semver) : (d = n(d), d.includePrerelease && (this.value === "<0.0.0-0" || f.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || f.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && f.operator.startsWith(">") || this.operator.startsWith("<") && f.operator.startsWith("<") || this.semver.version === f.semver.version && this.operator.includes("=") && f.operator.includes("=") || s(this.semver, "<", f.semver, d) && this.operator.startsWith(">") && f.operator.startsWith("<") || s(this.semver, ">", f.semver, d) && this.operator.startsWith("<") && f.operator.startsWith(">")));
    }
  }
  x3 = e;
  const n = O5, { safeRe: i, t: r } = l1, s = EB, o = qk, a = ss, l = Zo();
  return x3;
}
const Mae = Zo(), Nae = (t, e, n) => {
  try {
    e = new Mae(e, n);
  } catch {
    return !1;
  }
  return e.test(t);
};
var Xk = Nae;
const Aae = Zo(), Dae = (t, e) => new Aae(t, e).set.map((n) => n.map((i) => i.value).join(" ").trim().split(" "));
var Pae = Dae;
const Iae = ss, Lae = Zo(), Rae = (t, e, n) => {
  let i = null, r = null, s = null;
  try {
    s = new Lae(e, n);
  } catch {
    return null;
  }
  return t.forEach((o) => {
    s.test(o) && (!i || r.compare(o) === -1) && (i = o, r = new Iae(i, n));
  }), i;
};
var jae = Rae;
const Fae = ss, Bae = Zo(), zae = (t, e, n) => {
  let i = null, r = null, s = null;
  try {
    s = new Bae(e, n);
  } catch {
    return null;
  }
  return t.forEach((o) => {
    s.test(o) && (!i || r.compare(o) === 1) && (i = o, r = new Fae(i, n));
  }), i;
};
var Wae = zae;
const _3 = ss, Hae = Zo(), zM = Yk, Qae = (t, e) => {
  t = new Hae(t, e);
  let n = new _3("0.0.0");
  if (t.test(n) || (n = new _3("0.0.0-0"), t.test(n)))
    return n;
  n = null;
  for (let i = 0; i < t.set.length; ++i) {
    const r = t.set[i];
    let s = null;
    r.forEach((o) => {
      const a = new _3(o.semver.version);
      switch (o.operator) {
        case ">":
          a.prerelease.length === 0 ? a.patch++ : a.prerelease.push(0), a.raw = a.format();
        case "":
        case ">=":
          (!s || zM(a, s)) && (s = a);
          break;
        case "<":
        case "<=":
          break;
        default:
          throw new Error(`Unexpected operation: ${o.operator}`);
      }
    }), s && (!n || zM(n, s)) && (n = s);
  }
  return n && t.test(n) ? n : null;
};
var Uae = Qae;
const Zae = Zo(), qae = (t, e) => {
  try {
    return new Zae(t, e).range || "*";
  } catch {
    return null;
  }
};
var Yae = qae;
const Vae = ss, TB = Vk(), { ANY: Xae } = TB, Gae = Zo(), Kae = Xk, WM = Yk, HM = C5, Jae = T5, ele = E5, tle = (t, e, n, i) => {
  t = new Vae(t, i), e = new Gae(e, i);
  let r, s, o, a, l;
  switch (n) {
    case ">":
      r = WM, s = Jae, o = HM, a = ">", l = ">=";
      break;
    case "<":
      r = HM, s = ele, o = WM, a = "<", l = "<=";
      break;
    default:
      throw new TypeError('Must provide a hilo val of "<" or ">"');
  }
  if (Kae(t, e, i))
    return !1;
  for (let u = 0; u < e.set.length; ++u) {
    const f = e.set[u];
    let d = null, h = null;
    if (f.forEach((m) => {
      m.semver === Xae && (m = new TB(">=0.0.0")), d = d || m, h = h || m, r(m.semver, d.semver, i) ? d = m : o(m.semver, h.semver, i) && (h = m);
    }), d.operator === a || d.operator === l || (!h.operator || h.operator === a) && s(t, h.semver))
      return !1;
    if (h.operator === l && o(t, h.semver))
      return !1;
  }
  return !0;
};
var $5 = tle;
const nle = $5, ile = (t, e, n) => nle(t, e, ">", n);
var rle = ile;
const sle = $5, ole = (t, e, n) => sle(t, e, "<", n);
var ale = ole;
const QM = Zo(), lle = (t, e, n) => (t = new QM(t, n), e = new QM(e, n), t.intersects(e, n));
var ule = lle;
const cle = Xk, fle = Uo;
var dle = (t, e, n) => {
  const i = [];
  let r = null, s = null;
  const o = t.sort((f, d) => fle(f, d, n));
  for (const f of o)
    cle(f, e, n) ? (s = f, r || (r = f)) : (s && i.push([r, s]), s = null, r = null);
  r && i.push([r, null]);
  const a = [];
  for (const [f, d] of i)
    f === d ? a.push(f) : !d && f === o[0] ? a.push("*") : d ? f === o[0] ? a.push(`<=${d}`) : a.push(`${f} - ${d}`) : a.push(`>=${f}`);
  const l = a.join(" || "), u = typeof e.raw == "string" ? e.raw : String(e);
  return l.length < u.length ? l : e;
};
const UM = Zo(), M5 = Vk(), { ANY: O3 } = M5, sm = Xk, N5 = Uo, hle = (t, e, n = {}) => {
  if (t === e)
    return !0;
  t = new UM(t, n), e = new UM(e, n);
  let i = !1;
  e: for (const r of t.set) {
    for (const s of e.set) {
      const o = mle(r, s, n);
      if (i = i || o !== null, o)
        continue e;
    }
    if (i)
      return !1;
  }
  return !0;
}, ple = [new M5(">=0.0.0-0")], ZM = [new M5(">=0.0.0")], mle = (t, e, n) => {
  if (t === e)
    return !0;
  if (t.length === 1 && t[0].semver === O3) {
    if (e.length === 1 && e[0].semver === O3)
      return !0;
    n.includePrerelease ? t = ple : t = ZM;
  }
  if (e.length === 1 && e[0].semver === O3) {
    if (n.includePrerelease)
      return !0;
    e = ZM;
  }
  const i = /* @__PURE__ */ new Set();
  let r, s;
  for (const m of t)
    m.operator === ">" || m.operator === ">=" ? r = qM(r, m, n) : m.operator === "<" || m.operator === "<=" ? s = YM(s, m, n) : i.add(m.semver);
  if (i.size > 1)
    return null;
  let o;
  if (r && s) {
    if (o = N5(r.semver, s.semver, n), o > 0)
      return null;
    if (o === 0 && (r.operator !== ">=" || s.operator !== "<="))
      return null;
  }
  for (const m of i) {
    if (r && !sm(m, String(r), n) || s && !sm(m, String(s), n))
      return null;
    for (const g of e)
      if (!sm(m, String(g), n))
        return !1;
    return !0;
  }
  let a, l, u, f, d = s && !n.includePrerelease && s.semver.prerelease.length ? s.semver : !1, h = r && !n.includePrerelease && r.semver.prerelease.length ? r.semver : !1;
  d && d.prerelease.length === 1 && s.operator === "<" && d.prerelease[0] === 0 && (d = !1);
  for (const m of e) {
    if (f = f || m.operator === ">" || m.operator === ">=", u = u || m.operator === "<" || m.operator === "<=", r) {
      if (h && m.semver.prerelease && m.semver.prerelease.length && m.semver.major === h.major && m.semver.minor === h.minor && m.semver.patch === h.patch && (h = !1), m.operator === ">" || m.operator === ">=") {
        if (a = qM(r, m, n), a === m && a !== r)
          return !1;
      } else if (r.operator === ">=" && !sm(r.semver, String(m), n))
        return !1;
    }
    if (s) {
      if (d && m.semver.prerelease && m.semver.prerelease.length && m.semver.major === d.major && m.semver.minor === d.minor && m.semver.patch === d.patch && (d = !1), m.operator === "<" || m.operator === "<=") {
        if (l = YM(s, m, n), l === m && l !== s)
          return !1;
      } else if (s.operator === "<=" && !sm(s.semver, String(m), n))
        return !1;
    }
    if (!m.operator && (s || r) && o !== 0)
      return !1;
  }
  return !(r && u && !s && o !== 0 || s && f && !r && o !== 0 || h || d);
}, qM = (t, e, n) => {
  if (!t)
    return e;
  const i = N5(t.semver, e.semver, n);
  return i > 0 ? t : i < 0 || e.operator === ">" && t.operator === ">=" ? e : t;
}, YM = (t, e, n) => {
  if (!t)
    return e;
  const i = N5(t.semver, e.semver, n);
  return i < 0 ? t : i > 0 || e.operator === "<" && t.operator === "<=" ? e : t;
};
var gle = hle;
const S3 = l1, VM = Zk, vle = ss, XM = OB, ble = Jh, yle = Soe, wle = Toe, kle = Moe, xle = Aoe, _le = Ioe, Ole = joe, Sle = zoe, Cle = Qoe, Ele = Uo, Tle = Yoe, $le = Goe, Mle = S5, Nle = tae, Ale = rae, Dle = Yk, Ple = C5, Ile = SB, Lle = CB, Rle = E5, jle = T5, Fle = EB, Ble = Eae, zle = Vk(), Wle = Zo(), Hle = Xk, Qle = Pae, Ule = jae, Zle = Wae, qle = Uae, Yle = Yae, Vle = $5, Xle = rle, Gle = ale, Kle = ule, Jle = dle, eue = gle;
var Gk = {
  parse: ble,
  valid: yle,
  clean: wle,
  inc: kle,
  diff: xle,
  major: _le,
  minor: Ole,
  patch: Sle,
  prerelease: Cle,
  compare: Ele,
  rcompare: Tle,
  compareLoose: $le,
  compareBuild: Mle,
  sort: Nle,
  rsort: Ale,
  gt: Dle,
  lt: Ple,
  eq: Ile,
  neq: Lle,
  gte: Rle,
  lte: jle,
  cmp: Fle,
  coerce: Ble,
  Comparator: zle,
  Range: Wle,
  satisfies: Hle,
  toComparators: Qle,
  maxSatisfying: Ule,
  minSatisfying: Zle,
  minVersion: qle,
  validRange: Yle,
  outside: Vle,
  gtr: Xle,
  ltr: Gle,
  intersects: Kle,
  simplifyRange: Jle,
  subset: eue,
  SemVer: vle,
  re: S3.re,
  src: S3.src,
  tokens: S3.t,
  SEMVER_SPEC_VERSION: VM.SEMVER_SPEC_VERSION,
  RELEASE_TYPES: VM.RELEASE_TYPES,
  compareIdentifiers: XM.compareIdentifiers,
  rcompareIdentifiers: XM.rcompareIdentifiers
};
const GM = Gk;
var tue = function(t = "", { ghostVersion: e = "4.0", type: n = "mobiledoc" } = {}) {
  const i = GM.coerce(e);
  return typeof t != "string" || (t || "").trim() === "" ? "" : GM.satisfies(i, "<4.x") ? n === "markdown" ? t.replace(/[^\w]/g, "").toLowerCase() : t.replace(/[<>&"?]/g, "").trim().replace(/[^\w]/g, "-").replace(/-{2,}/g, "-").toLowerCase() : encodeURIComponent(
    t.trim().toLowerCase().replace(/[\][!"#$%&'()*+,./:;<=>?@\\^_{|}~]/g, "").replace(/\s+/g, "-").replace(/^-|-{2,}|-$/g, "")
  );
}, nue = {
  slugify: tue
}, iue = nue, C3, KM;
function nw() {
  if (KM) return C3;
  KM = 1;
  function t(u, f, d, h) {
    const m = Number(u[f].meta.id + 1).toString();
    let g = "";
    return typeof h.docId == "string" && (g = `-${h.docId}-`), g + m;
  }
  function e(u, f) {
    let d = Number(u[f].meta.id + 1).toString();
    return u[f].meta.subId > 0 && (d += `:${u[f].meta.subId}`), `[${d}]`;
  }
  function n(u, f, d, h, m) {
    const g = m.rules.footnote_anchor_name(u, f, d, h, m), w = m.rules.footnote_caption(u, f, d, h, m);
    let x = g;
    return u[f].meta.subId > 0 && (x += `:${u[f].meta.subId}`), `<sup class="footnote-ref"><a href="#fn${g}" id="fnref${x}">${w}</a></sup>`;
  }
  function i(u, f, d) {
    return (d.xhtmlOut ? `<hr class="footnotes-sep" />
` : `<hr class="footnotes-sep">
`) + `<section class="footnotes">
<ol class="footnotes-list">
`;
  }
  function r() {
    return `</ol>
</section>
`;
  }
  function s(u, f, d, h, m) {
    let g = m.rules.footnote_anchor_name(u, f, d, h, m);
    return u[f].meta.subId > 0 && (g += `:${u[f].meta.subId}`), `<li id="fn${g}" class="footnote-item">`;
  }
  function o() {
    return `</li>
`;
  }
  function a(u, f, d, h, m) {
    let g = m.rules.footnote_anchor_name(u, f, d, h, m);
    return u[f].meta.subId > 0 && (g += `:${u[f].meta.subId}`), ` <a href="#fnref${g}" class="footnote-backref">↩︎</a>`;
  }
  function l(u) {
    const f = u.helpers.parseLinkLabel, d = u.utils.isSpace;
    u.renderer.rules.footnote_ref = n, u.renderer.rules.footnote_block_open = i, u.renderer.rules.footnote_block_close = r, u.renderer.rules.footnote_open = s, u.renderer.rules.footnote_close = o, u.renderer.rules.footnote_anchor = a, u.renderer.rules.footnote_caption = e, u.renderer.rules.footnote_anchor_name = t;
    function h(x, _, S, C) {
      const E = x.bMarks[_] + x.tShift[_], M = x.eMarks[_];
      if (E + 4 > M || x.src.charCodeAt(E) !== 91 || x.src.charCodeAt(E + 1) !== 94) return !1;
      let $;
      for ($ = E + 2; $ < M; $++) {
        if (x.src.charCodeAt($) === 32) return !1;
        if (x.src.charCodeAt($) === 93)
          break;
      }
      if ($ === E + 2 || $ + 1 >= M || x.src.charCodeAt(++$) !== 58) return !1;
      if (C) return !0;
      $++, x.env.footnotes || (x.env.footnotes = {}), x.env.footnotes.refs || (x.env.footnotes.refs = {});
      const P = x.src.slice(E + 2, $ - 2);
      x.env.footnotes.refs[`:${P}`] = -1;
      const W = new x.Token("footnote_reference_open", "", 1);
      W.meta = {
        label: P
      }, W.level = x.level++, x.tokens.push(W);
      const z = x.bMarks[_], Z = x.tShift[_], L = x.sCount[_], Q = x.parentType, V = $, H = x.sCount[_] + $ - (x.bMarks[_] + x.tShift[_]);
      let R = H;
      for (; $ < M; ) {
        const Y = x.src.charCodeAt($);
        if (d(Y))
          Y === 9 ? R += 4 - R % 4 : R++;
        else
          break;
        $++;
      }
      x.tShift[_] = $ - V, x.sCount[_] = R - H, x.bMarks[_] = V, x.blkIndent += 4, x.parentType = "footnote", x.sCount[_] < x.blkIndent && (x.sCount[_] += x.blkIndent), x.md.block.tokenize(x, _, S, !0), x.parentType = Q, x.blkIndent -= 4, x.tShift[_] = Z, x.sCount[_] = L, x.bMarks[_] = z;
      const q = new x.Token("footnote_reference_close", "", -1);
      return q.level = --x.level, x.tokens.push(q), !0;
    }
    function m(x, _) {
      const S = x.posMax, C = x.pos;
      if (C + 2 >= S || x.src.charCodeAt(C) !== 94 || x.src.charCodeAt(C + 1) !== 91) return !1;
      const E = C + 2, M = f(x, C + 1);
      if (M < 0) return !1;
      if (!_) {
        x.env.footnotes || (x.env.footnotes = {}), x.env.footnotes.list || (x.env.footnotes.list = []);
        const $ = x.env.footnotes.list.length, P = [];
        x.md.inline.parse(x.src.slice(E, M), x.md, x.env, P);
        const W = x.push("footnote_ref", "", 0);
        W.meta = {
          id: $
        }, x.env.footnotes.list[$] = {
          content: x.src.slice(E, M),
          tokens: P
        };
      }
      return x.pos = M + 1, x.posMax = S, !0;
    }
    function g(x, _) {
      const S = x.posMax, C = x.pos;
      if (C + 3 > S || !x.env.footnotes || !x.env.footnotes.refs || x.src.charCodeAt(C) !== 91 || x.src.charCodeAt(C + 1) !== 94) return !1;
      let E;
      for (E = C + 2; E < S; E++) {
        if (x.src.charCodeAt(E) === 32 || x.src.charCodeAt(E) === 10) return !1;
        if (x.src.charCodeAt(E) === 93)
          break;
      }
      if (E === C + 2 || E >= S) return !1;
      E++;
      const M = x.src.slice(C + 2, E - 1);
      if (typeof x.env.footnotes.refs[`:${M}`] > "u") return !1;
      if (!_) {
        x.env.footnotes.list || (x.env.footnotes.list = []);
        let $;
        x.env.footnotes.refs[`:${M}`] < 0 ? ($ = x.env.footnotes.list.length, x.env.footnotes.list[$] = {
          label: M,
          count: 0
        }, x.env.footnotes.refs[`:${M}`] = $) : $ = x.env.footnotes.refs[`:${M}`];
        const P = x.env.footnotes.list[$].count;
        x.env.footnotes.list[$].count++;
        const W = x.push("footnote_ref", "", 0);
        W.meta = {
          id: $,
          subId: P,
          label: M
        };
      }
      return x.pos = E, x.posMax = S, !0;
    }
    function w(x) {
      let _, S, C, E = !1;
      const M = {};
      if (!x.env.footnotes || (x.tokens = x.tokens.filter(function(P) {
        return P.type === "footnote_reference_open" ? (E = !0, S = [], C = P.meta.label, !1) : P.type === "footnote_reference_close" ? (E = !1, M[":" + C] = S, !1) : (E && S.push(P), !E);
      }), !x.env.footnotes.list))
        return;
      const $ = x.env.footnotes.list;
      x.tokens.push(new x.Token("footnote_block_open", "", 1));
      for (let P = 0, W = $.length; P < W; P++) {
        const z = new x.Token("footnote_open", "", 1);
        if (z.meta = {
          id: P,
          label: $[P].label
        }, x.tokens.push(z), $[P].tokens) {
          _ = [];
          const Q = new x.Token("paragraph_open", "p", 1);
          Q.block = !0, _.push(Q);
          const V = new x.Token("inline", "", 0);
          V.children = $[P].tokens, V.content = $[P].content, _.push(V);
          const H = new x.Token("paragraph_close", "p", -1);
          H.block = !0, _.push(H);
        } else $[P].label && (_ = M[`:${$[P].label}`]);
        _ && (x.tokens = x.tokens.concat(_));
        let Z;
        x.tokens[x.tokens.length - 1].type === "paragraph_close" ? Z = x.tokens.pop() : Z = null;
        const L = $[P].count > 0 ? $[P].count : 1;
        for (let Q = 0; Q < L; Q++) {
          const V = new x.Token("footnote_anchor", "", 0);
          V.meta = {
            id: P,
            subId: Q,
            label: $[P].label
          }, x.tokens.push(V);
        }
        Z && x.tokens.push(Z), x.tokens.push(new x.Token("footnote_close", "", -1));
      }
      x.tokens.push(new x.Token("footnote_block_close", "", -1));
    }
    u.block.ruler.before("reference", "footnote_def", h, {
      alt: ["paragraph", "reference"]
    }), u.inline.ruler.after("image", "footnote_inline", m), u.inline.ruler.after("footnote_inline", "footnote_ref", g), u.core.ruler.after("inline", "footnote_tail", w);
  }
  return C3 = l, C3;
}
var E3, JM;
function iw() {
  return JM || (JM = 1, E3 = function(e) {
    function n(i, r, s, o) {
      var a, l, u, f, d = i.bMarks[r] + i.tShift[r], h = i.eMarks[r];
      if (a = i.src.charCodeAt(d), a !== 35 || d >= h)
        return !1;
      for (l = 1, a = i.src.charCodeAt(++d); a === 35 && d < h && l <= 6; )
        l++, a = i.src.charCodeAt(++d);
      return l > 6 ? !1 : (o || (h = i.skipCharsBack(h, 32, d), u = i.skipCharsBack(h, 35, d), u > d && i.src.charCodeAt(u - 1) === 32 && (h = u), i.line = r + 1, f = i.push("heading_open", "h" + String(l), 1), f.markup = "########".slice(0, l), f.map = [r, i.line], f = i.push("inline", "", 0), f.content = i.src.slice(d, h).trim(), f.map = [r, i.line], f.children = [], f = i.push("heading_close", "h" + String(l), -1), f.markup = "########".slice(0, l)), !0);
    }
    e.block.ruler.at("heading", n, {
      alt: ["paragraph", "reference", "blockquote"]
    });
  }), E3;
}
var T3, e7;
function rw() {
  if (e7) return T3;
  e7 = 1;
  function t(e) {
    function n(r, s) {
      const o = r.pos, a = r.src.charCodeAt(o);
      if (s || a !== 61)
        return !1;
      const l = r.scanDelims(r.pos, !0);
      let u = l.length;
      const f = String.fromCharCode(a);
      if (u < 2)
        return !1;
      if (u % 2) {
        const d = r.push("text", "", 0);
        d.content = f, u--;
      }
      for (let d = 0; d < u; d += 2) {
        const h = r.push("text", "", 0);
        h.content = f + f, !(!l.can_open && !l.can_close) && r.delimiters.push({
          marker: a,
          length: 0,
          // disable "rule of 3" length checks meant for emphasis
          jump: d / 2,
          // 1 delimiter = 2 characters
          token: r.tokens.length - 1,
          end: -1,
          open: l.can_open,
          close: l.can_close
        });
      }
      return r.pos += l.length, !0;
    }
    function i(r, s) {
      const o = [], a = s.length;
      for (let l = 0; l < a; l++) {
        const u = s[l];
        if (u.marker !== 61 || u.end === -1)
          continue;
        const f = s[u.end], d = r.tokens[u.token];
        d.type = "mark_open", d.tag = "mark", d.nesting = 1, d.markup = "==", d.content = "";
        const h = r.tokens[f.token];
        h.type = "mark_close", h.tag = "mark", h.nesting = -1, h.markup = "==", h.content = "", r.tokens[f.token - 1].type === "text" && r.tokens[f.token - 1].content === "=" && o.push(f.token - 1);
      }
      for (; o.length; ) {
        const l = o.pop();
        let u = l + 1;
        for (; u < r.tokens.length && r.tokens[u].type === "mark_close"; )
          u++;
        if (u--, l !== u) {
          const f = r.tokens[u];
          r.tokens[u] = r.tokens[l], r.tokens[l] = f;
        }
      }
    }
    e.inline.ruler.before("emphasis", "mark", n), e.inline.ruler2.before("emphasis", "mark", function(r) {
      let s;
      const o = r.tokens_meta, a = (r.tokens_meta || []).length;
      for (i(r, r.delimiters), s = 0; s < a; s++)
        o[s] && o[s].delimiters && i(r, o[s].delimiters);
    });
  }
  return T3 = t, T3;
}
var Gv = { exports: {} };
const rue = {}, sue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: rue
}, Symbol.toStringTag, { value: "Module" })), i0 = /* @__PURE__ */ Sk(sue);
var Kv = { exports: {} }, Jv = { exports: {} }, t7;
function oue() {
  return t7 || (t7 = 1, typeof Object.create == "function" ? Jv.exports = function(e, n) {
    n && (e.super_ = n, e.prototype = Object.create(n.prototype, {
      constructor: {
        value: e,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }));
  } : Jv.exports = function(e, n) {
    if (n) {
      e.super_ = n;
      var i = function() {
      };
      i.prototype = n.prototype, e.prototype = new i(), e.prototype.constructor = e;
    }
  }), Jv.exports;
}
var eb = { exports: {} }, n7;
function aue() {
  if (n7) return eb.exports;
  n7 = 1;
  var t = typeof Reflect == "object" ? Reflect : null, e = t && typeof t.apply == "function" ? t.apply : function(M, $, P) {
    return Function.prototype.apply.call(M, $, P);
  }, n;
  t && typeof t.ownKeys == "function" ? n = t.ownKeys : Object.getOwnPropertySymbols ? n = function(M) {
    return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M));
  } : n = function(M) {
    return Object.getOwnPropertyNames(M);
  };
  function i(E) {
    console && console.warn && console.warn(E);
  }
  var r = Number.isNaN || function(M) {
    return M !== M;
  };
  function s() {
    s.init.call(this);
  }
  eb.exports = s, eb.exports.once = _, s.EventEmitter = s, s.prototype._events = void 0, s.prototype._eventsCount = 0, s.prototype._maxListeners = void 0;
  var o = 10;
  function a(E) {
    if (typeof E != "function")
      throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof E);
  }
  Object.defineProperty(s, "defaultMaxListeners", {
    enumerable: !0,
    get: function() {
      return o;
    },
    set: function(E) {
      if (typeof E != "number" || E < 0 || r(E))
        throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + E + ".");
      o = E;
    }
  }), s.init = function() {
    (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
  }, s.prototype.setMaxListeners = function(M) {
    if (typeof M != "number" || M < 0 || r(M))
      throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + M + ".");
    return this._maxListeners = M, this;
  };
  function l(E) {
    return E._maxListeners === void 0 ? s.defaultMaxListeners : E._maxListeners;
  }
  s.prototype.getMaxListeners = function() {
    return l(this);
  }, s.prototype.emit = function(M) {
    for (var $ = [], P = 1; P < arguments.length; P++) $.push(arguments[P]);
    var W = M === "error", z = this._events;
    if (z !== void 0)
      W = W && z.error === void 0;
    else if (!W)
      return !1;
    if (W) {
      var Z;
      if ($.length > 0 && (Z = $[0]), Z instanceof Error)
        throw Z;
      var L = new Error("Unhandled error." + (Z ? " (" + Z.message + ")" : ""));
      throw L.context = Z, L;
    }
    var Q = z[M];
    if (Q === void 0)
      return !1;
    if (typeof Q == "function")
      e(Q, this, $);
    else
      for (var V = Q.length, H = g(Q, V), P = 0; P < V; ++P)
        e(H[P], this, $);
    return !0;
  };
  function u(E, M, $, P) {
    var W, z, Z;
    if (a($), z = E._events, z === void 0 ? (z = E._events = /* @__PURE__ */ Object.create(null), E._eventsCount = 0) : (z.newListener !== void 0 && (E.emit(
      "newListener",
      M,
      $.listener ? $.listener : $
    ), z = E._events), Z = z[M]), Z === void 0)
      Z = z[M] = $, ++E._eventsCount;
    else if (typeof Z == "function" ? Z = z[M] = P ? [$, Z] : [Z, $] : P ? Z.unshift($) : Z.push($), W = l(E), W > 0 && Z.length > W && !Z.warned) {
      Z.warned = !0;
      var L = new Error("Possible EventEmitter memory leak detected. " + Z.length + " " + String(M) + " listeners added. Use emitter.setMaxListeners() to increase limit");
      L.name = "MaxListenersExceededWarning", L.emitter = E, L.type = M, L.count = Z.length, i(L);
    }
    return E;
  }
  s.prototype.addListener = function(M, $) {
    return u(this, M, $, !1);
  }, s.prototype.on = s.prototype.addListener, s.prototype.prependListener = function(M, $) {
    return u(this, M, $, !0);
  };
  function f() {
    if (!this.fired)
      return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
  }
  function d(E, M, $) {
    var P = { fired: !1, wrapFn: void 0, target: E, type: M, listener: $ }, W = f.bind(P);
    return W.listener = $, P.wrapFn = W, W;
  }
  s.prototype.once = function(M, $) {
    return a($), this.on(M, d(this, M, $)), this;
  }, s.prototype.prependOnceListener = function(M, $) {
    return a($), this.prependListener(M, d(this, M, $)), this;
  }, s.prototype.removeListener = function(M, $) {
    var P, W, z, Z, L;
    if (a($), W = this._events, W === void 0)
      return this;
    if (P = W[M], P === void 0)
      return this;
    if (P === $ || P.listener === $)
      --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete W[M], W.removeListener && this.emit("removeListener", M, P.listener || $));
    else if (typeof P != "function") {
      for (z = -1, Z = P.length - 1; Z >= 0; Z--)
        if (P[Z] === $ || P[Z].listener === $) {
          L = P[Z].listener, z = Z;
          break;
        }
      if (z < 0)
        return this;
      z === 0 ? P.shift() : w(P, z), P.length === 1 && (W[M] = P[0]), W.removeListener !== void 0 && this.emit("removeListener", M, L || $);
    }
    return this;
  }, s.prototype.off = s.prototype.removeListener, s.prototype.removeAllListeners = function(M) {
    var $, P, W;
    if (P = this._events, P === void 0)
      return this;
    if (P.removeListener === void 0)
      return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : P[M] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete P[M]), this;
    if (arguments.length === 0) {
      var z = Object.keys(P), Z;
      for (W = 0; W < z.length; ++W)
        Z = z[W], Z !== "removeListener" && this.removeAllListeners(Z);
      return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
    }
    if ($ = P[M], typeof $ == "function")
      this.removeListener(M, $);
    else if ($ !== void 0)
      for (W = $.length - 1; W >= 0; W--)
        this.removeListener(M, $[W]);
    return this;
  };
  function h(E, M, $) {
    var P = E._events;
    if (P === void 0)
      return [];
    var W = P[M];
    return W === void 0 ? [] : typeof W == "function" ? $ ? [W.listener || W] : [W] : $ ? x(W) : g(W, W.length);
  }
  s.prototype.listeners = function(M) {
    return h(this, M, !0);
  }, s.prototype.rawListeners = function(M) {
    return h(this, M, !1);
  }, s.listenerCount = function(E, M) {
    return typeof E.listenerCount == "function" ? E.listenerCount(M) : m.call(E, M);
  }, s.prototype.listenerCount = m;
  function m(E) {
    var M = this._events;
    if (M !== void 0) {
      var $ = M[E];
      if (typeof $ == "function")
        return 1;
      if ($ !== void 0)
        return $.length;
    }
    return 0;
  }
  s.prototype.eventNames = function() {
    return this._eventsCount > 0 ? n(this._events) : [];
  };
  function g(E, M) {
    for (var $ = new Array(M), P = 0; P < M; ++P)
      $[P] = E[P];
    return $;
  }
  function w(E, M) {
    for (; M + 1 < E.length; M++)
      E[M] = E[M + 1];
    E.pop();
  }
  function x(E) {
    for (var M = new Array(E.length), $ = 0; $ < M.length; ++$)
      M[$] = E[$].listener || E[$];
    return M;
  }
  function _(E, M) {
    return new Promise(function($, P) {
      function W(Z) {
        E.removeListener(M, z), P(Z);
      }
      function z() {
        typeof E.removeListener == "function" && E.removeListener("error", W), $([].slice.call(arguments));
      }
      C(E, M, z, { once: !0 }), M !== "error" && S(E, W, { once: !0 });
    });
  }
  function S(E, M, $) {
    typeof E.on == "function" && C(E, "error", M, $);
  }
  function C(E, M, $, P) {
    if (typeof E.on == "function")
      P.once ? E.once(M, $) : E.on(M, $);
    else if (typeof E.addEventListener == "function")
      E.addEventListener(M, function W(z) {
        P.once && E.removeEventListener(M, W), $(z);
      });
    else
      throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof E);
  }
  return eb.exports;
}
var i7;
function lue() {
  if (i7) return Kv.exports;
  i7 = 1;
  var t = oue(), e = aue().EventEmitter;
  Kv.exports = n, Kv.exports.default = n;
  function n(l) {
    if (!(this instanceof n))
      return new n(l);
    e.call(this), l = l || {}, this.concurrency = l.concurrency || 1 / 0, this.timeout = l.timeout || 0, this.autostart = l.autostart || !1, this.results = l.results || null, this.pending = 0, this.session = 0, this.running = !1, this.jobs = [], this.timers = {};
  }
  t(n, e);
  var i = [
    "pop",
    "shift",
    "indexOf",
    "lastIndexOf"
  ];
  i.forEach(function(l) {
    n.prototype[l] = function() {
      return Array.prototype[l].apply(this.jobs, arguments);
    };
  }), n.prototype.slice = function(l, u) {
    return this.jobs = this.jobs.slice(l, u), this;
  }, n.prototype.reverse = function() {
    return this.jobs.reverse(), this;
  };
  var r = [
    "push",
    "unshift",
    "splice"
  ];
  r.forEach(function(l) {
    n.prototype[l] = function() {
      var u = Array.prototype[l].apply(this.jobs, arguments);
      return this.autostart && this.start(), u;
    };
  }), Object.defineProperty(n.prototype, "length", {
    get: function() {
      return this.pending + this.jobs.length;
    }
  }), n.prototype.start = function(l) {
    if (l && o.call(this, l), this.running = !0, this.pending >= this.concurrency)
      return;
    if (this.jobs.length === 0) {
      this.pending === 0 && a.call(this);
      return;
    }
    var u = this, f = this.jobs.shift(), d = !0, h = this.session, m = null, g = !1, w = null, x = f.hasOwnProperty("timeout") ? f.timeout : this.timeout;
    function _(C, E) {
      d && u.session === h && (d = !1, u.pending--, m !== null && (delete u.timers[m], clearTimeout(m)), C ? u.emit("error", C, f) : g === !1 && (w !== null && (u.results[w] = Array.prototype.slice.call(arguments, 1)), u.emit("success", E, f)), u.session === h && (u.pending === 0 && u.jobs.length === 0 ? a.call(u) : u.running && u.start()));
    }
    x && (m = setTimeout(function() {
      g = !0, u.listeners("timeout").length > 0 ? u.emit("timeout", _, f) : _();
    }, x), this.timers[m] = m), this.results && (w = this.results.length, this.results[w] = null), this.pending++, u.emit("start", f);
    var S = f(_);
    S && S.then && typeof S.then == "function" && S.then(function(C) {
      return _(null, C);
    }).catch(function(C) {
      return _(C || !0);
    }), this.running && this.jobs.length > 0 && this.start();
  }, n.prototype.stop = function() {
    this.running = !1;
  }, n.prototype.end = function(l) {
    s.call(this), this.jobs.length = 0, this.pending = 0, a.call(this, l);
  };
  function s() {
    for (var l in this.timers) {
      var u = this.timers[l];
      delete this.timers[l], clearTimeout(u);
    }
  }
  function o(l) {
    var u = this;
    this.on("error", f), this.on("end", d);
    function f(h) {
      u.end(h);
    }
    function d(h) {
      u.removeListener("error", f), u.removeListener("end", d), l(h, this.results);
    }
  }
  function a(l) {
    this.session++, this.running = !1, this.emit("end", l);
  }
  return Kv.exports;
}
var om = {}, am = {}, $3 = {}, r7;
function Xi() {
  return r7 || (r7 = 1, function(t) {
    Object.defineProperty(t, "__esModule", { value: !0 }), t.findBox = t.readUInt = t.readUInt32LE = t.readUInt32BE = t.readInt32LE = t.readUInt24LE = t.readUInt16LE = t.readUInt16BE = t.readInt16LE = t.toHexString = t.toUTF8String = void 0;
    const e = new TextDecoder(), n = (w, x = 0, _ = w.length) => e.decode(w.slice(x, _));
    t.toUTF8String = n;
    const i = (w, x = 0, _ = w.length) => w.slice(x, _).reduce((S, C) => S + ("0" + C.toString(16)).slice(-2), "");
    t.toHexString = i;
    const r = (w, x = 0) => {
      const _ = w[x] + w[x + 1] * 256;
      return _ | (_ & 2 ** 15) * 131070;
    };
    t.readInt16LE = r;
    const s = (w, x = 0) => w[x] * 2 ** 8 + w[x + 1];
    t.readUInt16BE = s;
    const o = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8;
    t.readUInt16LE = o;
    const a = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8 + w[x + 2] * 2 ** 16;
    t.readUInt24LE = a;
    const l = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8 + w[x + 2] * 2 ** 16 + (w[x + 3] << 24);
    t.readInt32LE = l;
    const u = (w, x = 0) => w[x] * 2 ** 24 + w[x + 1] * 2 ** 16 + w[x + 2] * 2 ** 8 + w[x + 3];
    t.readUInt32BE = u;
    const f = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8 + w[x + 2] * 2 ** 16 + w[x + 3] * 2 ** 24;
    t.readUInt32LE = f;
    const d = {
      readUInt16BE: t.readUInt16BE,
      readUInt16LE: t.readUInt16LE,
      readUInt32BE: t.readUInt32BE,
      readUInt32LE: t.readUInt32LE
    };
    function h(w, x, _, S) {
      _ = _ || 0;
      const C = S ? "BE" : "LE", E = "readUInt" + x + C;
      return d[E](w, _);
    }
    t.readUInt = h;
    function m(w, x) {
      if (w.length - x < 4)
        return;
      const _ = (0, t.readUInt32BE)(w, x);
      if (!(w.length - x < _))
        return {
          name: (0, t.toUTF8String)(w, 4 + x, 8 + x),
          offset: x,
          size: _
        };
    }
    function g(w, x, _) {
      for (; _ < w.length; ) {
        const S = m(w, _);
        if (!S)
          break;
        if (S.name === x)
          return S;
        _ += S.size;
      }
    }
    t.findBox = g;
  }($3)), $3;
}
var s7;
function uue() {
  if (s7) return am;
  s7 = 1, Object.defineProperty(am, "__esModule", { value: !0 }), am.BMP = void 0;
  const t = Xi();
  return am.BMP = {
    validate: (e) => (0, t.toUTF8String)(e, 0, 2) === "BM",
    calculate: (e) => ({
      height: Math.abs((0, t.readInt32LE)(e, 22)),
      width: (0, t.readUInt32LE)(e, 18)
    })
  }, am;
}
var lm = {}, um = {}, o7;
function $B() {
  if (o7) return um;
  o7 = 1, Object.defineProperty(um, "__esModule", { value: !0 }), um.ICO = void 0;
  const t = Xi(), e = 1, n = 6, i = 16;
  function r(o, a) {
    const l = o[a];
    return l === 0 ? 256 : l;
  }
  function s(o, a) {
    const l = n + a * i;
    return {
      height: r(o, l + 1),
      width: r(o, l)
    };
  }
  return um.ICO = {
    validate(o) {
      const a = (0, t.readUInt16LE)(o, 0), l = (0, t.readUInt16LE)(o, 4);
      return a !== 0 || l === 0 ? !1 : (0, t.readUInt16LE)(o, 2) === e;
    },
    calculate(o) {
      const a = (0, t.readUInt16LE)(o, 4), l = s(o, 0);
      if (a === 1)
        return l;
      const u = [l];
      for (let f = 1; f < a; f += 1)
        u.push(s(o, f));
      return {
        height: l.height,
        images: u,
        width: l.width
      };
    }
  }, um;
}
var a7;
function cue() {
  if (a7) return lm;
  a7 = 1, Object.defineProperty(lm, "__esModule", { value: !0 }), lm.CUR = void 0;
  const t = $B(), e = Xi(), n = 2;
  return lm.CUR = {
    validate(i) {
      const r = (0, e.readUInt16LE)(i, 0), s = (0, e.readUInt16LE)(i, 4);
      return r !== 0 || s === 0 ? !1 : (0, e.readUInt16LE)(i, 2) === n;
    },
    calculate: (i) => t.ICO.calculate(i)
  }, lm;
}
var cm = {}, l7;
function fue() {
  if (l7) return cm;
  l7 = 1, Object.defineProperty(cm, "__esModule", { value: !0 }), cm.DDS = void 0;
  const t = Xi();
  return cm.DDS = {
    validate: (e) => (0, t.readUInt32LE)(e, 0) === 542327876,
    calculate: (e) => ({
      height: (0, t.readUInt32LE)(e, 12),
      width: (0, t.readUInt32LE)(e, 16)
    })
  }, cm;
}
var fm = {}, u7;
function due() {
  if (u7) return fm;
  u7 = 1, Object.defineProperty(fm, "__esModule", { value: !0 }), fm.GIF = void 0;
  const t = Xi(), e = /^GIF8[79]a/;
  return fm.GIF = {
    validate: (n) => e.test((0, t.toUTF8String)(n, 0, 6)),
    calculate: (n) => ({
      height: (0, t.readUInt16LE)(n, 8),
      width: (0, t.readUInt16LE)(n, 6)
    })
  }, fm;
}
var dm = {}, c7;
function hue() {
  if (c7) return dm;
  c7 = 1, Object.defineProperty(dm, "__esModule", { value: !0 }), dm.HEIF = void 0;
  const t = Xi(), e = {
    avif: "avif",
    mif1: "heif",
    msf1: "heif",
    // hief-sequence
    heic: "heic",
    heix: "heic",
    hevc: "heic",
    // heic-sequence
    hevx: "heic"
    // heic-sequence
  };
  return dm.HEIF = {
    validate(n) {
      const i = (0, t.toUTF8String)(n, 4, 8), r = (0, t.toUTF8String)(n, 8, 12);
      return i === "ftyp" && r in e;
    },
    calculate(n) {
      const i = (0, t.findBox)(n, "meta", 0), r = i && (0, t.findBox)(n, "iprp", i.offset + 12), s = r && (0, t.findBox)(n, "ipco", r.offset + 8), o = s && (0, t.findBox)(n, "ispe", s.offset + 8);
      if (o)
        return {
          height: (0, t.readUInt32BE)(n, o.offset + 16),
          width: (0, t.readUInt32BE)(n, o.offset + 12),
          type: (0, t.toUTF8String)(n, 8, 12)
        };
      throw new TypeError("Invalid HEIF, no size found");
    }
  }, dm;
}
var hm = {}, f7;
function pue() {
  if (f7) return hm;
  f7 = 1, Object.defineProperty(hm, "__esModule", { value: !0 }), hm.ICNS = void 0;
  const t = Xi(), e = 8, n = 4, i = 4, r = {
    ICON: 32,
    "ICN#": 32,
    // m => 16 x 16
    "icm#": 16,
    icm4: 16,
    icm8: 16,
    // s => 16 x 16
    "ics#": 16,
    ics4: 16,
    ics8: 16,
    is32: 16,
    s8mk: 16,
    icp4: 16,
    // l => 32 x 32
    icl4: 32,
    icl8: 32,
    il32: 32,
    l8mk: 32,
    icp5: 32,
    ic11: 32,
    // h => 48 x 48
    ich4: 48,
    ich8: 48,
    ih32: 48,
    h8mk: 48,
    // . => 64 x 64
    icp6: 64,
    ic12: 32,
    // t => 128 x 128
    it32: 128,
    t8mk: 128,
    ic07: 128,
    // . => 256 x 256
    ic08: 256,
    ic13: 256,
    // . => 512 x 512
    ic09: 512,
    ic14: 512,
    // . => 1024 x 1024
    ic10: 1024
  };
  function s(a, l) {
    const u = l + i;
    return [
      (0, t.toUTF8String)(a, l, u),
      (0, t.readUInt32BE)(a, u)
    ];
  }
  function o(a) {
    const l = r[a];
    return { width: l, height: l, type: a };
  }
  return hm.ICNS = {
    validate: (a) => (0, t.toUTF8String)(a, 0, 4) === "icns",
    calculate(a) {
      const l = a.length, u = (0, t.readUInt32BE)(a, n);
      let f = e, d = s(a, f), h = o(d[0]);
      if (f += d[1], f === u)
        return h;
      const m = {
        height: h.height,
        images: [h],
        width: h.width
      };
      for (; f < u && f < l; )
        d = s(a, f), h = o(d[0]), f += d[1], m.images.push(h);
      return m;
    }
  }, hm;
}
var pm = {}, d7;
function mue() {
  if (d7) return pm;
  d7 = 1, Object.defineProperty(pm, "__esModule", { value: !0 }), pm.J2C = void 0;
  const t = Xi();
  return pm.J2C = {
    // TODO: this doesn't seem right. SIZ marker doesn't have to be right after the SOC
    validate: (e) => (0, t.toHexString)(e, 0, 4) === "ff4fff51",
    calculate: (e) => ({
      height: (0, t.readUInt32BE)(e, 12),
      width: (0, t.readUInt32BE)(e, 8)
    })
  }, pm;
}
var mm = {}, h7;
function gue() {
  if (h7) return mm;
  h7 = 1, Object.defineProperty(mm, "__esModule", { value: !0 }), mm.JP2 = void 0;
  const t = Xi();
  return mm.JP2 = {
    validate(e) {
      if ((0, t.readUInt32BE)(e, 4) !== 1783636e3 || (0, t.readUInt32BE)(e, 0) < 1)
        return !1;
      const n = (0, t.findBox)(e, "ftyp", 0);
      return n ? (0, t.readUInt32BE)(e, n.offset + 4) === 1718909296 : !1;
    },
    calculate(e) {
      const n = (0, t.findBox)(e, "jp2h", 0), i = n && (0, t.findBox)(e, "ihdr", n.offset + 8);
      if (i)
        return {
          height: (0, t.readUInt32BE)(e, i.offset + 8),
          width: (0, t.readUInt32BE)(e, i.offset + 12)
        };
      throw new TypeError("Unsupported JPEG 2000 format");
    }
  }, mm;
}
var gm = {}, p7;
function vue() {
  if (p7) return gm;
  p7 = 1, Object.defineProperty(gm, "__esModule", { value: !0 }), gm.JPG = void 0;
  const t = Xi(), e = "45786966", n = 2, i = 6, r = 2, s = "4d4d", o = "4949", a = 12, l = 2;
  function u(g) {
    return (0, t.toHexString)(g, 2, 6) === e;
  }
  function f(g, w) {
    return {
      height: (0, t.readUInt16BE)(g, w),
      width: (0, t.readUInt16BE)(g, w + 2)
    };
  }
  function d(g, w) {
    const _ = i + 8, S = (0, t.readUInt)(g, 16, _, w);
    for (let C = 0; C < S; C++) {
      const E = _ + l + C * a, M = E + a;
      if (E > g.length)
        return;
      const $ = g.slice(E, M);
      if ((0, t.readUInt)($, 16, 0, w) === 274)
        return (0, t.readUInt)($, 16, 2, w) !== 3 || (0, t.readUInt)($, 32, 4, w) !== 1 ? void 0 : (0, t.readUInt)($, 16, 8, w);
    }
  }
  function h(g, w) {
    const x = g.slice(n, w), _ = (0, t.toHexString)(x, i, i + r), S = _ === s;
    if (S || _ === o)
      return d(x, S);
  }
  function m(g, w) {
    if (w > g.length)
      throw new TypeError("Corrupt JPG, exceeded buffer limits");
  }
  return gm.JPG = {
    validate: (g) => (0, t.toHexString)(g, 0, 2) === "ffd8",
    calculate(g) {
      g = g.slice(4);
      let w, x;
      for (; g.length; ) {
        const _ = (0, t.readUInt16BE)(g, 0);
        if (g[_] !== 255) {
          g = g.slice(1);
          continue;
        }
        if (u(g) && (w = h(g, _)), m(g, _), x = g[_ + 1], x === 192 || x === 193 || x === 194) {
          const S = f(g, _ + 5);
          return w ? {
            height: S.height,
            orientation: w,
            width: S.width
          } : S;
        }
        g = g.slice(_ + 2);
      }
      throw new TypeError("Invalid JPG, no size found");
    }
  }, gm;
}
var vm = {}, m7;
function bue() {
  if (m7) return vm;
  m7 = 1, Object.defineProperty(vm, "__esModule", { value: !0 }), vm.KTX = void 0;
  const t = Xi();
  return vm.KTX = {
    validate: (e) => {
      const n = (0, t.toUTF8String)(e, 1, 7);
      return ["KTX 11", "KTX 20"].includes(n);
    },
    calculate: (e) => {
      const n = e[5] === 49 ? "ktx" : "ktx2", i = n === "ktx" ? 36 : 20;
      return {
        height: (0, t.readUInt32LE)(e, i + 4),
        width: (0, t.readUInt32LE)(e, i),
        type: n
      };
    }
  }, vm;
}
var bm = {}, g7;
function yue() {
  if (g7) return bm;
  g7 = 1, Object.defineProperty(bm, "__esModule", { value: !0 }), bm.PNG = void 0;
  const t = Xi(), e = `PNG\r

`, n = "IHDR", i = "CgBI";
  return bm.PNG = {
    validate(r) {
      if (e === (0, t.toUTF8String)(r, 1, 8)) {
        let s = (0, t.toUTF8String)(r, 12, 16);
        if (s === i && (s = (0, t.toUTF8String)(r, 28, 32)), s !== n)
          throw new TypeError("Invalid PNG");
        return !0;
      }
      return !1;
    },
    calculate(r) {
      return (0, t.toUTF8String)(r, 12, 16) === i ? {
        height: (0, t.readUInt32BE)(r, 36),
        width: (0, t.readUInt32BE)(r, 32)
      } : {
        height: (0, t.readUInt32BE)(r, 20),
        width: (0, t.readUInt32BE)(r, 16)
      };
    }
  }, bm;
}
var ym = {}, v7;
function wue() {
  if (v7) return ym;
  v7 = 1, Object.defineProperty(ym, "__esModule", { value: !0 }), ym.PNM = void 0;
  const t = Xi(), e = {
    P1: "pbm/ascii",
    P2: "pgm/ascii",
    P3: "ppm/ascii",
    P4: "pbm",
    P5: "pgm",
    P6: "ppm",
    P7: "pam",
    PF: "pfm"
  }, n = {
    default: (i) => {
      let r = [];
      for (; i.length > 0; ) {
        const s = i.shift();
        if (s[0] !== "#") {
          r = s.split(" ");
          break;
        }
      }
      if (r.length === 2)
        return {
          height: parseInt(r[1], 10),
          width: parseInt(r[0], 10)
        };
      throw new TypeError("Invalid PNM");
    },
    pam: (i) => {
      const r = {};
      for (; i.length > 0; ) {
        const s = i.shift();
        if (s.length > 16 || s.charCodeAt(0) > 128)
          continue;
        const [o, a] = s.split(" ");
        if (o && a && (r[o.toLowerCase()] = parseInt(a, 10)), r.height && r.width)
          break;
      }
      if (r.height && r.width)
        return {
          height: r.height,
          width: r.width
        };
      throw new TypeError("Invalid PAM");
    }
  };
  return ym.PNM = {
    validate: (i) => (0, t.toUTF8String)(i, 0, 2) in e,
    calculate(i) {
      const r = (0, t.toUTF8String)(i, 0, 2), s = e[r], o = (0, t.toUTF8String)(i, 3).split(/[\r\n]+/);
      return (n[s] || n.default)(o);
    }
  }, ym;
}
var wm = {}, b7;
function kue() {
  if (b7) return wm;
  b7 = 1, Object.defineProperty(wm, "__esModule", { value: !0 }), wm.PSD = void 0;
  const t = Xi();
  return wm.PSD = {
    validate: (e) => (0, t.toUTF8String)(e, 0, 4) === "8BPS",
    calculate: (e) => ({
      height: (0, t.readUInt32BE)(e, 14),
      width: (0, t.readUInt32BE)(e, 18)
    })
  }, wm;
}
var km = {}, y7;
function xue() {
  if (y7) return km;
  y7 = 1, Object.defineProperty(km, "__esModule", { value: !0 }), km.SVG = void 0;
  const t = Xi(), e = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/, n = {
    height: /\sheight=(['"])([^%]+?)\1/,
    root: e,
    viewbox: /\sviewBox=(['"])(.+?)\1/i,
    width: /\swidth=(['"])([^%]+?)\1/
  }, i = 2.54, r = {
    in: 96,
    cm: 96 / i,
    em: 16,
    ex: 8,
    m: 96 / i * 100,
    mm: 96 / i / 10,
    pc: 96 / 72 / 12,
    pt: 96 / 72,
    px: 1
  }, s = new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(r).join("|")})?$`);
  function o(d) {
    const h = s.exec(d);
    if (h)
      return Math.round(Number(h[1]) * (r[h[2]] || 1));
  }
  function a(d) {
    const h = d.split(" ");
    return {
      height: o(h[3]),
      width: o(h[2])
    };
  }
  function l(d) {
    const h = d.match(n.width), m = d.match(n.height), g = d.match(n.viewbox);
    return {
      height: m && o(m[2]),
      viewbox: g && a(g[2]),
      width: h && o(h[2])
    };
  }
  function u(d) {
    return {
      height: d.height,
      width: d.width
    };
  }
  function f(d, h) {
    const m = h.width / h.height;
    return d.width ? {
      height: Math.floor(d.width / m),
      width: d.width
    } : d.height ? {
      height: d.height,
      width: Math.floor(d.height * m)
    } : {
      height: h.height,
      width: h.width
    };
  }
  return km.SVG = {
    // Scan only the first kilo-byte to speed up the check on larger files
    validate: (d) => e.test((0, t.toUTF8String)(d, 0, 1e3)),
    calculate(d) {
      const h = (0, t.toUTF8String)(d).match(n.root);
      if (h) {
        const m = l(h[0]);
        if (m.width && m.height)
          return u(m);
        if (m.viewbox)
          return f(m, m.viewbox);
      }
      throw new TypeError("Invalid SVG");
    }
  }, km;
}
var xm = {}, w7;
function _ue() {
  if (w7) return xm;
  w7 = 1, Object.defineProperty(xm, "__esModule", { value: !0 }), xm.TGA = void 0;
  const t = Xi();
  return xm.TGA = {
    validate(e) {
      return (0, t.readUInt16LE)(e, 0) === 0 && (0, t.readUInt16LE)(e, 4) === 0;
    },
    calculate(e) {
      return {
        height: (0, t.readUInt16LE)(e, 14),
        width: (0, t.readUInt16LE)(e, 12)
      };
    }
  }, xm;
}
var _m = {}, k7;
function Oue() {
  if (k7) return _m;
  k7 = 1, Object.defineProperty(_m, "__esModule", { value: !0 }), _m.TIFF = void 0;
  const t = i0, e = Xi();
  function n(l, u, f) {
    const d = (0, e.readUInt)(l, 32, 4, f);
    let h = 1024;
    const m = t.statSync(u).size;
    d + h > m && (h = m - d - 10);
    const g = new Uint8Array(h), w = t.openSync(u, "r");
    return t.readSync(w, g, 0, h, d), t.closeSync(w), g.slice(2);
  }
  function i(l, u) {
    const f = (0, e.readUInt)(l, 16, 8, u);
    return ((0, e.readUInt)(l, 16, 10, u) << 16) + f;
  }
  function r(l) {
    if (l.length > 24)
      return l.slice(12);
  }
  function s(l, u) {
    const f = {};
    let d = l;
    for (; d && d.length; ) {
      const h = (0, e.readUInt)(d, 16, 0, u), m = (0, e.readUInt)(d, 16, 2, u), g = (0, e.readUInt)(d, 32, 4, u);
      if (h === 0)
        break;
      g === 1 && (m === 3 || m === 4) && (f[h] = i(d, u)), d = r(d);
    }
    return f;
  }
  function o(l) {
    const u = (0, e.toUTF8String)(l, 0, 2);
    if (u === "II")
      return "LE";
    if (u === "MM")
      return "BE";
  }
  const a = [
    // '492049', // currently not supported
    "49492a00",
    // Little endian
    "4d4d002a"
    // Big Endian
    // '4d4d002a', // BigTIFF > 4GB. currently not supported
  ];
  return _m.TIFF = {
    validate: (l) => a.includes((0, e.toHexString)(l, 0, 4)),
    calculate(l, u) {
      if (!u)
        throw new TypeError("Tiff doesn't support buffer");
      const f = o(l) === "BE", d = n(l, u, f), h = s(d, f), m = h[256], g = h[257];
      if (!m || !g)
        throw new TypeError("Invalid Tiff. Missing tags");
      return { height: g, width: m };
    }
  }, _m;
}
var Om = {}, x7;
function Sue() {
  if (x7) return Om;
  x7 = 1, Object.defineProperty(Om, "__esModule", { value: !0 }), Om.WEBP = void 0;
  const t = Xi();
  function e(r) {
    return {
      height: 1 + (0, t.readUInt24LE)(r, 7),
      width: 1 + (0, t.readUInt24LE)(r, 4)
    };
  }
  function n(r) {
    return {
      height: 1 + ((r[4] & 15) << 10 | r[3] << 2 | (r[2] & 192) >> 6),
      width: 1 + ((r[2] & 63) << 8 | r[1])
    };
  }
  function i(r) {
    return {
      height: (0, t.readInt16LE)(r, 8) & 16383,
      width: (0, t.readInt16LE)(r, 6) & 16383
    };
  }
  return Om.WEBP = {
    validate(r) {
      const s = (0, t.toUTF8String)(r, 0, 4) === "RIFF", o = (0, t.toUTF8String)(r, 8, 12) === "WEBP", a = (0, t.toUTF8String)(r, 12, 15) === "VP8";
      return s && o && a;
    },
    calculate(r) {
      const s = (0, t.toUTF8String)(r, 12, 16);
      if (r = r.slice(20, 30), s === "VP8X") {
        const a = r[0], l = (a & 192) === 0, u = (a & 1) === 0;
        if (l && u)
          return e(r);
        throw new TypeError("Invalid WebP");
      }
      if (s === "VP8 " && r[0] !== 47)
        return i(r);
      const o = (0, t.toHexString)(r, 3, 6);
      if (s === "VP8L" && o !== "9d012a")
        return n(r);
      throw new TypeError("Invalid WebP");
    }
  }, Om;
}
var _7;
function MB() {
  if (_7) return om;
  _7 = 1, Object.defineProperty(om, "__esModule", { value: !0 }), om.typeHandlers = void 0;
  const t = uue(), e = cue(), n = fue(), i = due(), r = hue(), s = pue(), o = $B(), a = mue(), l = gue(), u = vue(), f = bue(), d = yue(), h = wue(), m = kue(), g = xue(), w = _ue(), x = Oue(), _ = Sue();
  return om.typeHandlers = {
    bmp: t.BMP,
    cur: e.CUR,
    dds: n.DDS,
    gif: i.GIF,
    heif: r.HEIF,
    icns: s.ICNS,
    ico: o.ICO,
    j2c: a.J2C,
    jp2: l.JP2,
    jpg: u.JPG,
    ktx: f.KTX,
    png: d.PNG,
    pnm: h.PNM,
    psd: m.PSD,
    svg: g.SVG,
    tga: w.TGA,
    tiff: x.TIFF,
    webp: _.WEBP
  }, om;
}
var Sm = {}, O7;
function Cue() {
  if (O7) return Sm;
  O7 = 1, Object.defineProperty(Sm, "__esModule", { value: !0 }), Sm.detector = void 0;
  const t = MB(), e = Object.keys(t.typeHandlers), n = {
    56: "psd",
    66: "bmp",
    68: "dds",
    71: "gif",
    73: "tiff",
    77: "tiff",
    82: "webp",
    105: "icns",
    137: "png",
    255: "jpg"
  };
  function i(r) {
    const s = r[0];
    if (s in n) {
      const a = n[s];
      if (a && t.typeHandlers[a].validate(r))
        return a;
    }
    const o = (a) => t.typeHandlers[a].validate(r);
    return e.find(o);
  }
  return Sm.detector = i, Sm;
}
var S7;
function Eue() {
  return S7 || (S7 = 1, function(t, e) {
    Object.defineProperty(e, "__esModule", { value: !0 }), e.types = e.setConcurrency = e.disableTypes = e.disableFS = e.imageSize = void 0;
    const n = i0, i = i0, r = lue(), s = MB(), o = Cue(), a = 512 * 1024, l = new r.default({ concurrency: 100, autostart: !0 }), u = {
      disabledFS: !1,
      disabledTypes: []
    };
    function f(_, S) {
      const C = (0, o.detector)(_);
      if (typeof C < "u") {
        if (u.disabledTypes.indexOf(C) > -1)
          throw new TypeError("disabled file type: " + C);
        if (C in s.typeHandlers) {
          const E = s.typeHandlers[C].calculate(_, S);
          if (E !== void 0)
            return E.type = E.type ?? C, E;
        }
      }
      throw new TypeError("unsupported file type: " + C + " (file: " + S + ")");
    }
    async function d(_) {
      const S = await n.promises.open(_, "r");
      try {
        const { size: C } = await S.stat();
        if (C <= 0)
          throw new Error("Empty file");
        const E = Math.min(C, a), M = new Uint8Array(E);
        return await S.read(M, 0, E, 0), M;
      } finally {
        await S.close();
      }
    }
    function h(_) {
      const S = n.openSync(_, "r");
      try {
        const { size: C } = n.fstatSync(S);
        if (C <= 0)
          throw new Error("Empty file");
        const E = Math.min(C, a), M = new Uint8Array(E);
        return n.readSync(S, M, 0, E, 0), M;
      } finally {
        n.closeSync(S);
      }
    }
    t.exports = e = m, e.default = m;
    function m(_, S) {
      if (_ instanceof Uint8Array)
        return f(_);
      if (typeof _ != "string" || u.disabledFS)
        throw new TypeError("invalid invocation. input should be a Uint8Array");
      const C = i.resolve(_);
      if (typeof S == "function")
        l.push(() => d(C).then((E) => process.nextTick(S, null, f(E, C))).catch(S));
      else {
        const E = h(C);
        return f(E, C);
      }
    }
    e.imageSize = m;
    const g = (_) => {
      u.disabledFS = _;
    };
    e.disableFS = g;
    const w = (_) => {
      u.disabledTypes = _;
    };
    e.disableTypes = w;
    const x = (_) => {
      l.concurrency = _;
    };
    e.setConcurrency = x, e.types = Object.keys(s.typeHandlers);
  }(Gv, Gv.exports)), Gv.exports;
}
var M3, C7;
function sw() {
  if (C7) return M3;
  C7 = 1;
  var t = Eue(), e = i0;
  function n(i, r) {
    var s = i.renderer.rules.image;
    i.renderer.rules.image = function(o, a, l, u, f) {
      var d = o[a];
      if (d.attrSet("loading", "lazy"), r && r.decoding === !0 && d.attrSet("decoding", "async"), r && r.base_path && r.image_size === !0) {
        const h = d.attrGet("src"), m = e.join(r.base_path, h), g = t(m);
        d.attrSet("width", g.width), d.attrSet("height", g.height);
      }
      return s(o, a, l, u, f);
    };
  }
  return M3 = n, M3;
}
var N3, E7;
function ow() {
  if (E7) return N3;
  E7 = 1;
  const t = /\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;
  function e(i, r) {
    const s = i.posMax, o = i.pos;
    if (i.src.charCodeAt(o) !== 126 || r || o + 2 >= s)
      return !1;
    i.pos = o + 1;
    let a = !1;
    for (; i.pos < s; ) {
      if (i.src.charCodeAt(i.pos) === 126) {
        a = !0;
        break;
      }
      i.md.inline.skipToken(i);
    }
    if (!a || o + 1 === i.pos)
      return i.pos = o, !1;
    const l = i.src.slice(o + 1, i.pos);
    if (l.match(/(^|[^\\])(\\\\)*\s/))
      return i.pos = o, !1;
    i.posMax = i.pos, i.pos = o + 1;
    const u = i.push("sub_open", "sub", 1);
    u.markup = "~";
    const f = i.push("text", "", 0);
    f.content = l.replace(t, "$1");
    const d = i.push("sub_close", "sub", -1);
    return d.markup = "~", i.pos = i.posMax + 1, i.posMax = s, !0;
  }
  function n(i) {
    i.inline.ruler.after("emphasis", "sub", e);
  }
  return N3 = n, N3;
}
var A3, T7;
function aw() {
  if (T7) return A3;
  T7 = 1;
  const t = /\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;
  function e(i, r) {
    const s = i.posMax, o = i.pos;
    if (i.src.charCodeAt(o) !== 94 || r || o + 2 >= s)
      return !1;
    i.pos = o + 1;
    let a = !1;
    for (; i.pos < s; ) {
      if (i.src.charCodeAt(i.pos) === 94) {
        a = !0;
        break;
      }
      i.md.inline.skipToken(i);
    }
    if (!a || o + 1 === i.pos)
      return i.pos = o, !1;
    const l = i.src.slice(o + 1, i.pos);
    if (l.match(/(^|[^\\])(\\\\)*\s/))
      return i.pos = o, !1;
    i.posMax = i.pos, i.pos = o + 1;
    const u = i.push("sup_open", "sup", 1);
    u.markup = "^";
    const f = i.push("text", "", 0);
    f.content = l.replace(t, "$1");
    const d = i.push("sup_close", "sup", -1);
    return d.markup = "^", i.pos = i.posMax + 1, i.posMax = s, !0;
  }
  function n(i) {
    i.inline.ruler.after("emphasis", "sup", e);
  }
  return A3 = n, A3;
}
const $7 = kB, M7 = Gk, { slugify: Tue } = iue, Od = {}, N7 = function({ ghostVersion: t } = {}) {
  const e = function(n, i = {}) {
    let r = Tue(n, { ghostVersion: t, type: "markdown" });
    return i[r] && (i[r] += 1, r += i[r]), r;
  };
  return function(n) {
    const i = n.renderer.rules.heading_open;
    n.renderer.rules.heading_open = function(r, s, o, a, l) {
      const u = {};
      r[s].attrs = r[s].attrs || [];
      const f = r[s + 1].children.reduce(function(h, m) {
        return h + m.content;
      }, ""), d = e(f, u);
      return r[s].attrs.push(["id", d]), i ? i.apply(this, arguments) : l.renderToken.apply(l, arguments);
    };
  };
}, $ue = function(t) {
  const e = M7.coerce(t.ghostVersion || "4.0");
  if (M7.satisfies(e, "<4.x")) {
    if (Od["<4.x"])
      return Od["<4.x"];
    const n = new $7({ html: !0, breaks: !0, linkify: !0 }).use(nw()).use(iw()).use(rw()).use(sw()).use(N7(t)).use(ow()).use(aw());
    return n.linkify.set({
      fuzzyLink: !1
    }), Od["<4.x"] = n, n;
  } else {
    if (Od.latest)
      return Od.latest;
    const n = new $7({ html: !0, breaks: !0, linkify: !0 }).use(nw()).use(iw()).use(rw()).use(sw()).use(N7(t)).use(ow()).use(aw());
    return n.linkify.set({
      fuzzyLink: !1
    }), Od.latest = n, n;
  }
};
var Mue = {
  render: function(t, e = {}) {
    return $ue(e).render(t);
  }
}, Nue = Mue;
const Aue = /* @__PURE__ */ Gs(Nue);
function NB(t) {
  var e, n, i = "";
  if (typeof t == "string" || typeof t == "number") i += t;
  else if (typeof t == "object") if (Array.isArray(t)) {
    var r = t.length;
    for (e = 0; e < r; e++) t[e] && (n = NB(t[e])) && (i && (i += " "), i += n);
  } else for (n in t) t[n] && (i && (i += " "), i += n);
  return i;
}
function nt() {
  for (var t, e, n = 0, i = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e = NB(t)) && (i && (i += " "), i += e);
  return i;
}
class Af extends Error {
}
class Due extends Af {
  constructor(e) {
    super(`Invalid DateTime: ${e.toMessage()}`);
  }
}
class Pue extends Af {
  constructor(e) {
    super(`Invalid Interval: ${e.toMessage()}`);
  }
}
class Iue extends Af {
  constructor(e) {
    super(`Invalid Duration: ${e.toMessage()}`);
  }
}
class Gd extends Af {
}
class AB extends Af {
  constructor(e) {
    super(`Invalid unit ${e}`);
  }
}
class Sr extends Af {
}
class iu extends Af {
  constructor() {
    super("Zone is an abstract class");
  }
}
const Me = "numeric", jo = "short", Hs = "long", lw = {
  year: Me,
  month: Me,
  day: Me
}, DB = {
  year: Me,
  month: jo,
  day: Me
}, Lue = {
  year: Me,
  month: jo,
  day: Me,
  weekday: jo
}, PB = {
  year: Me,
  month: Hs,
  day: Me
}, IB = {
  year: Me,
  month: Hs,
  day: Me,
  weekday: Hs
}, LB = {
  hour: Me,
  minute: Me
}, RB = {
  hour: Me,
  minute: Me,
  second: Me
}, jB = {
  hour: Me,
  minute: Me,
  second: Me,
  timeZoneName: jo
}, FB = {
  hour: Me,
  minute: Me,
  second: Me,
  timeZoneName: Hs
}, BB = {
  hour: Me,
  minute: Me,
  hourCycle: "h23"
}, zB = {
  hour: Me,
  minute: Me,
  second: Me,
  hourCycle: "h23"
}, WB = {
  hour: Me,
  minute: Me,
  second: Me,
  hourCycle: "h23",
  timeZoneName: jo
}, HB = {
  hour: Me,
  minute: Me,
  second: Me,
  hourCycle: "h23",
  timeZoneName: Hs
}, QB = {
  year: Me,
  month: Me,
  day: Me,
  hour: Me,
  minute: Me
}, UB = {
  year: Me,
  month: Me,
  day: Me,
  hour: Me,
  minute: Me,
  second: Me
}, ZB = {
  year: Me,
  month: jo,
  day: Me,
  hour: Me,
  minute: Me
}, qB = {
  year: Me,
  month: jo,
  day: Me,
  hour: Me,
  minute: Me,
  second: Me
}, Rue = {
  year: Me,
  month: jo,
  day: Me,
  weekday: jo,
  hour: Me,
  minute: Me
}, YB = {
  year: Me,
  month: Hs,
  day: Me,
  hour: Me,
  minute: Me,
  timeZoneName: jo
}, VB = {
  year: Me,
  month: Hs,
  day: Me,
  hour: Me,
  minute: Me,
  second: Me,
  timeZoneName: jo
}, XB = {
  year: Me,
  month: Hs,
  day: Me,
  weekday: Hs,
  hour: Me,
  minute: Me,
  timeZoneName: Hs
}, GB = {
  year: Me,
  month: Hs,
  day: Me,
  weekday: Hs,
  hour: Me,
  minute: Me,
  second: Me,
  timeZoneName: Hs
};
class u1 {
  /**
   * The type of zone
   * @abstract
   * @type {string}
   */
  get type() {
    throw new iu();
  }
  /**
   * The name of this zone.
   * @abstract
   * @type {string}
   */
  get name() {
    throw new iu();
  }
  /**
   * The IANA name of this zone.
   * Defaults to `name` if not overwritten by a subclass.
   * @abstract
   * @type {string}
   */
  get ianaName() {
    return this.name;
  }
  /**
   * Returns whether the offset is known to be fixed for the whole year.
   * @abstract
   * @type {boolean}
   */
  get isUniversal() {
    throw new iu();
  }
  /**
   * Returns the offset's common name (such as EST) at the specified timestamp
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to get the name
   * @param {Object} opts - Options to affect the format
   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
   * @param {string} opts.locale - What locale to return the offset name in.
   * @return {string}
   */
  offsetName(e, n) {
    throw new iu();
  }
  /**
   * Returns the offset's value as a string
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */
  formatOffset(e, n) {
    throw new iu();
  }
  /**
   * Return the offset in minutes for this zone at the specified timestamp.
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to compute the offset
   * @return {number}
   */
  offset(e) {
    throw new iu();
  }
  /**
   * Return whether this Zone is equal to another zone
   * @abstract
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */
  equals(e) {
    throw new iu();
  }
  /**
   * Return whether this Zone is valid.
   * @abstract
   * @type {boolean}
   */
  get isValid() {
    throw new iu();
  }
}
let D3 = null;
class Kk extends u1 {
  /**
   * Get a singleton instance of the local zone
   * @return {SystemZone}
   */
  static get instance() {
    return D3 === null && (D3 = new Kk()), D3;
  }
  /** @override **/
  get type() {
    return "system";
  }
  /** @override **/
  get name() {
    return new Intl.DateTimeFormat().resolvedOptions().timeZone;
  }
  /** @override **/
  get isUniversal() {
    return !1;
  }
  /** @override **/
  offsetName(e, { format: n, locale: i }) {
    return oz(e, n, i);
  }
  /** @override **/
  formatOffset(e, n) {
    return Og(this.offset(e), n);
  }
  /** @override **/
  offset(e) {
    return -new Date(e).getTimezoneOffset();
  }
  /** @override **/
  equals(e) {
    return e.type === "system";
  }
  /** @override **/
  get isValid() {
    return !0;
  }
}
let ty = {};
function jue(t) {
  return ty[t] || (ty[t] = new Intl.DateTimeFormat("en-US", {
    hour12: !1,
    timeZone: t,
    year: "numeric",
    month: "2-digit",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit",
    second: "2-digit",
    era: "short"
  })), ty[t];
}
const Fue = {
  year: 0,
  month: 1,
  day: 2,
  era: 3,
  hour: 4,
  minute: 5,
  second: 6
};
function Bue(t, e) {
  const n = t.format(e).replace(/\u200E/g, ""), i = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, r, s, o, a, l, u, f] = i;
  return [o, r, s, a, l, u, f];
}
function zue(t, e) {
  const n = t.formatToParts(e), i = [];
  for (let r = 0; r < n.length; r++) {
    const { type: s, value: o } = n[r], a = Fue[s];
    s === "era" ? i[a] = o : yt(a) || (i[a] = parseInt(o, 10));
  }
  return i;
}
let tb = {};
class xl extends u1 {
  /**
   * @param {string} name - Zone name
   * @return {IANAZone}
   */
  static create(e) {
    return tb[e] || (tb[e] = new xl(e)), tb[e];
  }
  /**
   * Reset local caches. Should only be necessary in testing scenarios.
   * @return {void}
   */
  static resetCache() {
    tb = {}, ty = {};
  }
  /**
   * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
   * @param {string} s - The string to check validity on
   * @example IANAZone.isValidSpecifier("America/New_York") //=> true
   * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false
   * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.
   * @return {boolean}
   */
  static isValidSpecifier(e) {
    return this.isValidZone(e);
  }
  /**
   * Returns whether the provided string identifies a real zone
   * @param {string} zone - The string to check
   * @example IANAZone.isValidZone("America/New_York") //=> true
   * @example IANAZone.isValidZone("Fantasia/Castle") //=> false
   * @example IANAZone.isValidZone("Sport~~blorp") //=> false
   * @return {boolean}
   */
  static isValidZone(e) {
    if (!e)
      return !1;
    try {
      return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0;
    } catch {
      return !1;
    }
  }
  constructor(e) {
    super(), this.zoneName = e, this.valid = xl.isValidZone(e);
  }
  /**
   * The type of zone. `iana` for all instances of `IANAZone`.
   * @override
   * @type {string}
   */
  get type() {
    return "iana";
  }
  /**
   * The name of this zone (i.e. the IANA zone name).
   * @override
   * @type {string}
   */
  get name() {
    return this.zoneName;
  }
  /**
   * Returns whether the offset is known to be fixed for the whole year:
   * Always returns false for all IANA zones.
   * @override
   * @type {boolean}
   */
  get isUniversal() {
    return !1;
  }
  /**
   * Returns the offset's common name (such as EST) at the specified timestamp
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the name
   * @param {Object} opts - Options to affect the format
   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
   * @param {string} opts.locale - What locale to return the offset name in.
   * @return {string}
   */
  offsetName(e, { format: n, locale: i }) {
    return oz(e, n, i, this.name);
  }
  /**
   * Returns the offset's value as a string
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */
  formatOffset(e, n) {
    return Og(this.offset(e), n);
  }
  /**
   * Return the offset in minutes for this zone at the specified timestamp.
   * @override
   * @param {number} ts - Epoch milliseconds for which to compute the offset
   * @return {number}
   */
  offset(e) {
    const n = new Date(e);
    if (isNaN(n)) return NaN;
    const i = jue(this.name);
    let [r, s, o, a, l, u, f] = i.formatToParts ? zue(i, n) : Bue(i, n);
    a === "BC" && (r = -Math.abs(r) + 1);
    const h = e2({
      year: r,
      month: s,
      day: o,
      hour: l === 24 ? 0 : l,
      minute: u,
      second: f,
      millisecond: 0
    });
    let m = +n;
    const g = m % 1e3;
    return m -= g >= 0 ? g : 1e3 + g, (h - m) / (60 * 1e3);
  }
  /**
   * Return whether this Zone is equal to another zone
   * @override
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */
  equals(e) {
    return e.type === "iana" && e.name === this.name;
  }
  /**
   * Return whether this Zone is valid.
   * @override
   * @type {boolean}
   */
  get isValid() {
    return this.valid;
  }
}
let A7 = {};
function Wue(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let i = A7[n];
  return i || (i = new Intl.ListFormat(t, e), A7[n] = i), i;
}
let d4 = {};
function h4(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let i = d4[n];
  return i || (i = new Intl.DateTimeFormat(t, e), d4[n] = i), i;
}
let p4 = {};
function Hue(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let i = p4[n];
  return i || (i = new Intl.NumberFormat(t, e), p4[n] = i), i;
}
let m4 = {};
function Que(t, e = {}) {
  const { base: n, ...i } = e, r = JSON.stringify([t, i]);
  let s = m4[r];
  return s || (s = new Intl.RelativeTimeFormat(t, e), m4[r] = s), s;
}
let Km = null;
function Uue() {
  return Km || (Km = new Intl.DateTimeFormat().resolvedOptions().locale, Km);
}
let D7 = {};
function Zue(t) {
  let e = D7[t];
  if (!e) {
    const n = new Intl.Locale(t);
    e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo, D7[t] = e;
  }
  return e;
}
function que(t) {
  const e = t.indexOf("-x-");
  e !== -1 && (t = t.substring(0, e));
  const n = t.indexOf("-u-");
  if (n === -1)
    return [t];
  {
    let i, r;
    try {
      i = h4(t).resolvedOptions(), r = t;
    } catch {
      const l = t.substring(0, n);
      i = h4(l).resolvedOptions(), r = l;
    }
    const { numberingSystem: s, calendar: o } = i;
    return [r, s, o];
  }
}
function Yue(t, e, n) {
  return (n || e) && (t.includes("-u-") || (t += "-u"), n && (t += `-ca-${n}`), e && (t += `-nu-${e}`)), t;
}
function Vue(t) {
  const e = [];
  for (let n = 1; n <= 12; n++) {
    const i = ht.utc(2009, n, 1);
    e.push(t(i));
  }
  return e;
}
function Xue(t) {
  const e = [];
  for (let n = 1; n <= 7; n++) {
    const i = ht.utc(2016, 11, 13 + n);
    e.push(t(i));
  }
  return e;
}
function nb(t, e, n, i) {
  const r = t.listingMode();
  return r === "error" ? null : r === "en" ? n(e) : i(e);
}
function Gue(t) {
  return t.numberingSystem && t.numberingSystem !== "latn" ? !1 : t.numberingSystem === "latn" || !t.locale || t.locale.startsWith("en") || new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem === "latn";
}
class Kue {
  constructor(e, n, i) {
    this.padTo = i.padTo || 0, this.floor = i.floor || !1;
    const { padTo: r, floor: s, ...o } = i;
    if (!n || Object.keys(o).length > 0) {
      const a = { useGrouping: !1, ...i };
      i.padTo > 0 && (a.minimumIntegerDigits = i.padTo), this.inf = Hue(e, a);
    }
  }
  format(e) {
    if (this.inf) {
      const n = this.floor ? Math.floor(e) : e;
      return this.inf.format(n);
    } else {
      const n = this.floor ? Math.floor(e) : L5(e, 3);
      return yi(n, this.padTo);
    }
  }
}
class Jue {
  constructor(e, n, i) {
    this.opts = i, this.originalZone = void 0;
    let r;
    if (this.opts.timeZone)
      this.dt = e;
    else if (e.zone.type === "fixed") {
      const o = -1 * (e.offset / 60), a = o >= 0 ? `Etc/GMT+${o}` : `Etc/GMT${o}`;
      e.offset !== 0 && xl.create(a).valid ? (r = a, this.dt = e) : (r = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
    } else e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, r = e.zone.name) : (r = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
    const s = { ...this.opts };
    s.timeZone = s.timeZone || r, this.dtf = h4(n, s);
  }
  format() {
    return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate());
  }
  formatToParts() {
    const e = this.dtf.formatToParts(this.dt.toJSDate());
    return this.originalZone ? e.map((n) => {
      if (n.type === "timeZoneName") {
        const i = this.originalZone.offsetName(this.dt.ts, {
          locale: this.dt.locale,
          format: this.opts.timeZoneName
        });
        return {
          ...n,
          value: i
        };
      } else
        return n;
    }) : e;
  }
  resolvedOptions() {
    return this.dtf.resolvedOptions();
  }
}
class ece {
  constructor(e, n, i) {
    this.opts = { style: "long", ...i }, !n && rz() && (this.rtf = Que(e, i));
  }
  format(e, n) {
    return this.rtf ? this.rtf.format(e, n) : _ce(n, e, this.opts.numeric, this.opts.style !== "long");
  }
  formatToParts(e, n) {
    return this.rtf ? this.rtf.formatToParts(e, n) : [];
  }
}
const tce = {
  firstDay: 1,
  minimalDays: 4,
  weekend: [6, 7]
};
class Gt {
  static fromOpts(e) {
    return Gt.create(
      e.locale,
      e.numberingSystem,
      e.outputCalendar,
      e.weekSettings,
      e.defaultToEN
    );
  }
  static create(e, n, i, r, s = !1) {
    const o = e || ti.defaultLocale, a = o || (s ? "en-US" : Uue()), l = n || ti.defaultNumberingSystem, u = i || ti.defaultOutputCalendar, f = g4(r) || ti.defaultWeekSettings;
    return new Gt(a, l, u, f, o);
  }
  static resetCache() {
    Km = null, d4 = {}, p4 = {}, m4 = {};
  }
  static fromObject({ locale: e, numberingSystem: n, outputCalendar: i, weekSettings: r } = {}) {
    return Gt.create(e, n, i, r);
  }
  constructor(e, n, i, r, s) {
    const [o, a, l] = que(e);
    this.locale = o, this.numberingSystem = n || a || null, this.outputCalendar = i || l || null, this.weekSettings = r, this.intl = Yue(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = s, this.fastNumbersCached = null;
  }
  get fastNumbers() {
    return this.fastNumbersCached == null && (this.fastNumbersCached = Gue(this)), this.fastNumbersCached;
  }
  listingMode() {
    const e = this.isEnglish(), n = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
    return e && n ? "en" : "intl";
  }
  clone(e) {
    return !e || Object.getOwnPropertyNames(e).length === 0 ? this : Gt.create(
      e.locale || this.specifiedLocale,
      e.numberingSystem || this.numberingSystem,
      e.outputCalendar || this.outputCalendar,
      g4(e.weekSettings) || this.weekSettings,
      e.defaultToEN || !1
    );
  }
  redefaultToEN(e = {}) {
    return this.clone({ ...e, defaultToEN: !0 });
  }
  redefaultToSystem(e = {}) {
    return this.clone({ ...e, defaultToEN: !1 });
  }
  months(e, n = !1) {
    return nb(this, e, uz, () => {
      const i = n ? { month: e, day: "numeric" } : { month: e }, r = n ? "format" : "standalone";
      return this.monthsCache[r][e] || (this.monthsCache[r][e] = Vue((s) => this.extract(s, i, "month"))), this.monthsCache[r][e];
    });
  }
  weekdays(e, n = !1) {
    return nb(this, e, dz, () => {
      const i = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, r = n ? "format" : "standalone";
      return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = Xue(
        (s) => this.extract(s, i, "weekday")
      )), this.weekdaysCache[r][e];
    });
  }
  meridiems() {
    return nb(
      this,
      void 0,
      () => hz,
      () => {
        if (!this.meridiemCache) {
          const e = { hour: "numeric", hourCycle: "h12" };
          this.meridiemCache = [ht.utc(2016, 11, 13, 9), ht.utc(2016, 11, 13, 19)].map(
            (n) => this.extract(n, e, "dayperiod")
          );
        }
        return this.meridiemCache;
      }
    );
  }
  eras(e) {
    return nb(this, e, pz, () => {
      const n = { era: e };
      return this.eraCache[e] || (this.eraCache[e] = [ht.utc(-40, 1, 1), ht.utc(2017, 1, 1)].map(
        (i) => this.extract(i, n, "era")
      )), this.eraCache[e];
    });
  }
  extract(e, n, i) {
    const r = this.dtFormatter(e, n), s = r.formatToParts(), o = s.find((a) => a.type.toLowerCase() === i);
    return o ? o.value : null;
  }
  numberFormatter(e = {}) {
    return new Kue(this.intl, e.forceSimple || this.fastNumbers, e);
  }
  dtFormatter(e, n = {}) {
    return new Jue(e, this.intl, n);
  }
  relFormatter(e = {}) {
    return new ece(this.intl, this.isEnglish(), e);
  }
  listFormatter(e = {}) {
    return Wue(this.intl, e);
  }
  isEnglish() {
    return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
  }
  getWeekSettings() {
    return this.weekSettings ? this.weekSettings : sz() ? Zue(this.locale) : tce;
  }
  getStartOfWeek() {
    return this.getWeekSettings().firstDay;
  }
  getMinDaysInFirstWeek() {
    return this.getWeekSettings().minimalDays;
  }
  getWeekendDays() {
    return this.getWeekSettings().weekend;
  }
  equals(e) {
    return this.locale === e.locale && this.numberingSystem === e.numberingSystem && this.outputCalendar === e.outputCalendar;
  }
  toString() {
    return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;
  }
}
let P3 = null;
class Gr extends u1 {
  /**
   * Get a singleton instance of UTC
   * @return {FixedOffsetZone}
   */
  static get utcInstance() {
    return P3 === null && (P3 = new Gr(0)), P3;
  }
  /**
   * Get an instance with a specified offset
   * @param {number} offset - The offset in minutes
   * @return {FixedOffsetZone}
   */
  static instance(e) {
    return e === 0 ? Gr.utcInstance : new Gr(e);
  }
  /**
   * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
   * @param {string} s - The offset string to parse
   * @example FixedOffsetZone.parseSpecifier("UTC+6")
   * @example FixedOffsetZone.parseSpecifier("UTC+06")
   * @example FixedOffsetZone.parseSpecifier("UTC-6:00")
   * @return {FixedOffsetZone}
   */
  static parseSpecifier(e) {
    if (e) {
      const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
      if (n)
        return new Gr(t2(n[1], n[2]));
    }
    return null;
  }
  constructor(e) {
    super(), this.fixed = e;
  }
  /**
   * The type of zone. `fixed` for all instances of `FixedOffsetZone`.
   * @override
   * @type {string}
   */
  get type() {
    return "fixed";
  }
  /**
   * The name of this zone.
   * All fixed zones' names always start with "UTC" (plus optional offset)
   * @override
   * @type {string}
   */
  get name() {
    return this.fixed === 0 ? "UTC" : `UTC${Og(this.fixed, "narrow")}`;
  }
  /**
   * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
   *
   * @override
   * @type {string}
   */
  get ianaName() {
    return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${Og(-this.fixed, "narrow")}`;
  }
  /**
   * Returns the offset's common name at the specified timestamp.
   *
   * For fixed offset zones this equals to the zone name.
   * @override
   */
  offsetName() {
    return this.name;
  }
  /**
   * Returns the offset's value as a string
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */
  formatOffset(e, n) {
    return Og(this.fixed, n);
  }
  /**
   * Returns whether the offset is known to be fixed for the whole year:
   * Always returns true for all fixed offset zones.
   * @override
   * @type {boolean}
   */
  get isUniversal() {
    return !0;
  }
  /**
   * Return the offset in minutes for this zone at the specified timestamp.
   *
   * For fixed offset zones, this is constant and does not depend on a timestamp.
   * @override
   * @return {number}
   */
  offset() {
    return this.fixed;
  }
  /**
   * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)
   * @override
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */
  equals(e) {
    return e.type === "fixed" && e.fixed === this.fixed;
  }
  /**
   * Return whether this Zone is valid:
   * All fixed offset zones are valid.
   * @override
   * @type {boolean}
   */
  get isValid() {
    return !0;
  }
}
class nce extends u1 {
  constructor(e) {
    super(), this.zoneName = e;
  }
  /** @override **/
  get type() {
    return "invalid";
  }
  /** @override **/
  get name() {
    return this.zoneName;
  }
  /** @override **/
  get isUniversal() {
    return !1;
  }
  /** @override **/
  offsetName() {
    return null;
  }
  /** @override **/
  formatOffset() {
    return "";
  }
  /** @override **/
  offset() {
    return NaN;
  }
  /** @override **/
  equals() {
    return !1;
  }
  /** @override **/
  get isValid() {
    return !1;
  }
}
function vu(t, e) {
  if (yt(t) || t === null)
    return e;
  if (t instanceof u1)
    return t;
  if (lce(t)) {
    const n = t.toLowerCase();
    return n === "default" ? e : n === "local" || n === "system" ? Kk.instance : n === "utc" || n === "gmt" ? Gr.utcInstance : Gr.parseSpecifier(n) || xl.create(t);
  } else return Du(t) ? Gr.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new nce(t);
}
const A5 = {
  arab: "[٠-٩]",
  arabext: "[۰-۹]",
  bali: "[᭐-᭙]",
  beng: "[০-৯]",
  deva: "[०-९]",
  fullwide: "[０-９]",
  gujr: "[૦-૯]",
  hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
  khmr: "[០-៩]",
  knda: "[೦-೯]",
  laoo: "[໐-໙]",
  limb: "[᥆-᥏]",
  mlym: "[൦-൯]",
  mong: "[᠐-᠙]",
  mymr: "[၀-၉]",
  orya: "[୦-୯]",
  tamldec: "[௦-௯]",
  telu: "[౦-౯]",
  thai: "[๐-๙]",
  tibt: "[༠-༩]",
  latn: "\\d"
}, P7 = {
  arab: [1632, 1641],
  arabext: [1776, 1785],
  bali: [6992, 7001],
  beng: [2534, 2543],
  deva: [2406, 2415],
  fullwide: [65296, 65303],
  gujr: [2790, 2799],
  khmr: [6112, 6121],
  knda: [3302, 3311],
  laoo: [3792, 3801],
  limb: [6470, 6479],
  mlym: [3430, 3439],
  mong: [6160, 6169],
  mymr: [4160, 4169],
  orya: [2918, 2927],
  tamldec: [3046, 3055],
  telu: [3174, 3183],
  thai: [3664, 3673],
  tibt: [3872, 3881]
}, ice = A5.hanidec.replace(/[\[|\]]/g, "").split("");
function rce(t) {
  let e = parseInt(t, 10);
  if (isNaN(e)) {
    e = "";
    for (let n = 0; n < t.length; n++) {
      const i = t.charCodeAt(n);
      if (t[n].search(A5.hanidec) !== -1)
        e += ice.indexOf(t[n]);
      else
        for (const r in P7) {
          const [s, o] = P7[r];
          i >= s && i <= o && (e += i - s);
        }
    }
    return parseInt(e, 10);
  } else
    return e;
}
let Bd = {};
function sce() {
  Bd = {};
}
function Mo({ numberingSystem: t }, e = "") {
  const n = t || "latn";
  return Bd[n] || (Bd[n] = {}), Bd[n][e] || (Bd[n][e] = new RegExp(`${A5[n]}${e}`)), Bd[n][e];
}
let I7 = () => Date.now(), L7 = "system", R7 = null, j7 = null, F7 = null, B7 = 60, z7, W7 = null;
class ti {
  /**
   * Get the callback for returning the current timestamp.
   * @type {function}
   */
  static get now() {
    return I7;
  }
  /**
   * Set the callback for returning the current timestamp.
   * The function should return a number, which will be interpreted as an Epoch millisecond count
   * @type {function}
   * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
   * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
   */
  static set now(e) {
    I7 = e;
  }
  /**
   * Set the default time zone to create DateTimes in. Does not affect existing instances.
   * Use the value "system" to reset this value to the system's time zone.
   * @type {string}
   */
  static set defaultZone(e) {
    L7 = e;
  }
  /**
   * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
   * The default value is the system's time zone (the one set on the machine that runs this code).
   * @type {Zone}
   */
  static get defaultZone() {
    return vu(L7, Kk.instance);
  }
  /**
   * Get the default locale to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static get defaultLocale() {
    return R7;
  }
  /**
   * Set the default locale to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static set defaultLocale(e) {
    R7 = e;
  }
  /**
   * Get the default numbering system to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static get defaultNumberingSystem() {
    return j7;
  }
  /**
   * Set the default numbering system to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static set defaultNumberingSystem(e) {
    j7 = e;
  }
  /**
   * Get the default output calendar to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static get defaultOutputCalendar() {
    return F7;
  }
  /**
   * Set the default output calendar to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */
  static set defaultOutputCalendar(e) {
    F7 = e;
  }
  /**
   * @typedef {Object} WeekSettings
   * @property {number} firstDay
   * @property {number} minimalDays
   * @property {number[]} weekend
   */
  /**
   * @return {WeekSettings|null}
   */
  static get defaultWeekSettings() {
    return W7;
  }
  /**
   * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
   * how many days are required in the first week of a year.
   * Does not affect existing instances.
   *
   * @param {WeekSettings|null} weekSettings
   */
  static set defaultWeekSettings(e) {
    W7 = g4(e);
  }
  /**
   * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
   * @type {number}
   */
  static get twoDigitCutoffYear() {
    return B7;
  }
  /**
   * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
   * @type {number}
   * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century
   * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century
   * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950
   * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
   * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
   */
  static set twoDigitCutoffYear(e) {
    B7 = e % 100;
  }
  /**
   * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
   * @type {boolean}
   */
  static get throwOnInvalid() {
    return z7;
  }
  /**
   * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
   * @type {boolean}
   */
  static set throwOnInvalid(e) {
    z7 = e;
  }
  /**
   * Reset Luxon's global caches. Should only be necessary in testing scenarios.
   * @return {void}
   */
  static resetCaches() {
    Gt.resetCache(), xl.resetCache(), ht.resetCache(), sce();
  }
}
class Po {
  constructor(e, n) {
    this.reason = e, this.explanation = n;
  }
  toMessage() {
    return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
  }
}
const KB = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], JB = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
function ro(t, e) {
  return new Po(
    "unit out of range",
    `you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
  );
}
function D5(t, e, n) {
  const i = new Date(Date.UTC(t, e - 1, n));
  t < 100 && t >= 0 && i.setUTCFullYear(i.getUTCFullYear() - 1900);
  const r = i.getUTCDay();
  return r === 0 ? 7 : r;
}
function ez(t, e, n) {
  return n + (c1(t) ? JB : KB)[e - 1];
}
function tz(t, e) {
  const n = c1(t) ? JB : KB, i = n.findIndex((s) => s < e), r = e - n[i];
  return { month: i + 1, day: r };
}
function P5(t, e) {
  return (t - e + 7) % 7 + 1;
}
function uw(t, e = 4, n = 1) {
  const { year: i, month: r, day: s } = t, o = ez(i, r, s), a = P5(D5(i, r, s), n);
  let l = Math.floor((o - a + 14 - e) / 7), u;
  return l < 1 ? (u = i - 1, l = r0(u, e, n)) : l > r0(i, e, n) ? (u = i + 1, l = 1) : u = i, { weekYear: u, weekNumber: l, weekday: a, ...n2(t) };
}
function H7(t, e = 4, n = 1) {
  const { weekYear: i, weekNumber: r, weekday: s } = t, o = P5(D5(i, 1, e), n), a = uh(i);
  let l = r * 7 + s - o - 7 + e, u;
  l < 1 ? (u = i - 1, l += uh(u)) : l > a ? (u = i + 1, l -= uh(i)) : u = i;
  const { month: f, day: d } = tz(u, l);
  return { year: u, month: f, day: d, ...n2(t) };
}
function I3(t) {
  const { year: e, month: n, day: i } = t, r = ez(e, n, i);
  return { year: e, ordinal: r, ...n2(t) };
}
function Q7(t) {
  const { year: e, ordinal: n } = t, { month: i, day: r } = tz(e, n);
  return { year: e, month: i, day: r, ...n2(t) };
}
function U7(t, e) {
  if (!yt(t.localWeekday) || !yt(t.localWeekNumber) || !yt(t.localWeekYear)) {
    if (!yt(t.weekday) || !yt(t.weekNumber) || !yt(t.weekYear))
      throw new Gd(
        "Cannot mix locale-based week fields with ISO-based week fields"
      );
    return yt(t.localWeekday) || (t.weekday = t.localWeekday), yt(t.localWeekNumber) || (t.weekNumber = t.localWeekNumber), yt(t.localWeekYear) || (t.weekYear = t.localWeekYear), delete t.localWeekday, delete t.localWeekNumber, delete t.localWeekYear, {
      minDaysInFirstWeek: e.getMinDaysInFirstWeek(),
      startOfWeek: e.getStartOfWeek()
    };
  } else
    return { minDaysInFirstWeek: 4, startOfWeek: 1 };
}
function oce(t, e = 4, n = 1) {
  const i = Jk(t.weekYear), r = so(
    t.weekNumber,
    1,
    r0(t.weekYear, e, n)
  ), s = so(t.weekday, 1, 7);
  return i ? r ? s ? !1 : ro("weekday", t.weekday) : ro("week", t.weekNumber) : ro("weekYear", t.weekYear);
}
function ace(t) {
  const e = Jk(t.year), n = so(t.ordinal, 1, uh(t.year));
  return e ? n ? !1 : ro("ordinal", t.ordinal) : ro("year", t.year);
}
function nz(t) {
  const e = Jk(t.year), n = so(t.month, 1, 12), i = so(t.day, 1, cw(t.year, t.month));
  return e ? n ? i ? !1 : ro("day", t.day) : ro("month", t.month) : ro("year", t.year);
}
function iz(t) {
  const { hour: e, minute: n, second: i, millisecond: r } = t, s = so(e, 0, 23) || e === 24 && n === 0 && i === 0 && r === 0, o = so(n, 0, 59), a = so(i, 0, 59), l = so(r, 0, 999);
  return s ? o ? a ? l ? !1 : ro("millisecond", r) : ro("second", i) : ro("minute", n) : ro("hour", e);
}
function yt(t) {
  return typeof t > "u";
}
function Du(t) {
  return typeof t == "number";
}
function Jk(t) {
  return typeof t == "number" && t % 1 === 0;
}
function lce(t) {
  return typeof t == "string";
}
function uce(t) {
  return Object.prototype.toString.call(t) === "[object Date]";
}
function rz() {
  try {
    return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
  } catch {
    return !1;
  }
}
function sz() {
  try {
    return typeof Intl < "u" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
  } catch {
    return !1;
  }
}
function cce(t) {
  return Array.isArray(t) ? t : [t];
}
function Z7(t, e, n) {
  if (t.length !== 0)
    return t.reduce((i, r) => {
      const s = [e(r), r];
      return i && n(i[0], s[0]) === i[0] ? i : s;
    }, null)[1];
}
function fce(t, e) {
  return e.reduce((n, i) => (n[i] = t[i], n), {});
}
function Ch(t, e) {
  return Object.prototype.hasOwnProperty.call(t, e);
}
function g4(t) {
  if (t == null)
    return null;
  if (typeof t != "object")
    throw new Sr("Week settings must be an object");
  if (!so(t.firstDay, 1, 7) || !so(t.minimalDays, 1, 7) || !Array.isArray(t.weekend) || t.weekend.some((e) => !so(e, 1, 7)))
    throw new Sr("Invalid week settings");
  return {
    firstDay: t.firstDay,
    minimalDays: t.minimalDays,
    weekend: Array.from(t.weekend)
  };
}
function so(t, e, n) {
  return Jk(t) && t >= e && t <= n;
}
function dce(t, e) {
  return t - e * Math.floor(t / e);
}
function yi(t, e = 2) {
  const n = t < 0;
  let i;
  return n ? i = "-" + ("" + -t).padStart(e, "0") : i = ("" + t).padStart(e, "0"), i;
}
function hu(t) {
  if (!(yt(t) || t === null || t === ""))
    return parseInt(t, 10);
}
function Ac(t) {
  if (!(yt(t) || t === null || t === ""))
    return parseFloat(t);
}
function I5(t) {
  if (!(yt(t) || t === null || t === "")) {
    const e = parseFloat("0." + t) * 1e3;
    return Math.floor(e);
  }
}
function L5(t, e, n = !1) {
  const i = 10 ** e;
  return (n ? Math.trunc : Math.round)(t * i) / i;
}
function c1(t) {
  return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
}
function uh(t) {
  return c1(t) ? 366 : 365;
}
function cw(t, e) {
  const n = dce(e - 1, 12) + 1, i = t + (e - n) / 12;
  return n === 2 ? c1(i) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
}
function e2(t) {
  let e = Date.UTC(
    t.year,
    t.month - 1,
    t.day,
    t.hour,
    t.minute,
    t.second,
    t.millisecond
  );
  return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e;
}
function q7(t, e, n) {
  return -P5(D5(t, 1, e), n) + e - 1;
}
function r0(t, e = 4, n = 1) {
  const i = q7(t, e, n), r = q7(t + 1, e, n);
  return (uh(t) - i + r) / 7;
}
function v4(t) {
  return t > 99 ? t : t > ti.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
}
function oz(t, e, n, i = null) {
  const r = new Date(t), s = {
    hourCycle: "h23",
    year: "numeric",
    month: "2-digit",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit"
  };
  i && (s.timeZone = i);
  const o = { timeZoneName: e, ...s }, a = new Intl.DateTimeFormat(n, o).formatToParts(r).find((l) => l.type.toLowerCase() === "timezonename");
  return a ? a.value : null;
}
function t2(t, e) {
  let n = parseInt(t, 10);
  Number.isNaN(n) && (n = 0);
  const i = parseInt(e, 10) || 0, r = n < 0 || Object.is(n, -0) ? -i : i;
  return n * 60 + r;
}
function az(t) {
  const e = Number(t);
  if (typeof t == "boolean" || t === "" || Number.isNaN(e))
    throw new Sr(`Invalid unit value ${t}`);
  return e;
}
function fw(t, e) {
  const n = {};
  for (const i in t)
    if (Ch(t, i)) {
      const r = t[i];
      if (r == null) continue;
      n[e(i)] = az(r);
    }
  return n;
}
function Og(t, e) {
  const n = Math.trunc(Math.abs(t / 60)), i = Math.trunc(Math.abs(t % 60)), r = t >= 0 ? "+" : "-";
  switch (e) {
    case "short":
      return `${r}${yi(n, 2)}:${yi(i, 2)}`;
    case "narrow":
      return `${r}${n}${i > 0 ? `:${i}` : ""}`;
    case "techie":
      return `${r}${yi(n, 2)}${yi(i, 2)}`;
    default:
      throw new RangeError(`Value format ${e} is out of range for property format`);
  }
}
function n2(t) {
  return fce(t, ["hour", "minute", "second", "millisecond"]);
}
const hce = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], lz = [
  "Jan",
  "Feb",
  "Mar",
  "Apr",
  "May",
  "Jun",
  "Jul",
  "Aug",
  "Sep",
  "Oct",
  "Nov",
  "Dec"
], pce = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
function uz(t) {
  switch (t) {
    case "narrow":
      return [...pce];
    case "short":
      return [...lz];
    case "long":
      return [...hce];
    case "numeric":
      return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
    case "2-digit":
      return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
    default:
      return null;
  }
}
const cz = [
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday",
  "Sunday"
], fz = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], mce = ["M", "T", "W", "T", "F", "S", "S"];
function dz(t) {
  switch (t) {
    case "narrow":
      return [...mce];
    case "short":
      return [...fz];
    case "long":
      return [...cz];
    case "numeric":
      return ["1", "2", "3", "4", "5", "6", "7"];
    default:
      return null;
  }
}
const hz = ["AM", "PM"], gce = ["Before Christ", "Anno Domini"], vce = ["BC", "AD"], bce = ["B", "A"];
function pz(t) {
  switch (t) {
    case "narrow":
      return [...bce];
    case "short":
      return [...vce];
    case "long":
      return [...gce];
    default:
      return null;
  }
}
function yce(t) {
  return hz[t.hour < 12 ? 0 : 1];
}
function wce(t, e) {
  return dz(e)[t.weekday - 1];
}
function kce(t, e) {
  return uz(e)[t.month - 1];
}
function xce(t, e) {
  return pz(e)[t.year < 0 ? 0 : 1];
}
function _ce(t, e, n = "always", i = !1) {
  const r = {
    years: ["year", "yr."],
    quarters: ["quarter", "qtr."],
    months: ["month", "mo."],
    weeks: ["week", "wk."],
    days: ["day", "day", "days"],
    hours: ["hour", "hr."],
    minutes: ["minute", "min."],
    seconds: ["second", "sec."]
  }, s = ["hours", "minutes", "seconds"].indexOf(t) === -1;
  if (n === "auto" && s) {
    const d = t === "days";
    switch (e) {
      case 1:
        return d ? "tomorrow" : `next ${r[t][0]}`;
      case -1:
        return d ? "yesterday" : `last ${r[t][0]}`;
      case 0:
        return d ? "today" : `this ${r[t][0]}`;
    }
  }
  const o = Object.is(e, -0) || e < 0, a = Math.abs(e), l = a === 1, u = r[t], f = i ? l ? u[1] : u[2] || u[1] : l ? r[t][0] : t;
  return o ? `${a} ${f} ago` : `in ${a} ${f}`;
}
function Y7(t, e) {
  let n = "";
  for (const i of t)
    i.literal ? n += i.val : n += e(i.val);
  return n;
}
const Oce = {
  D: lw,
  DD: DB,
  DDD: PB,
  DDDD: IB,
  t: LB,
  tt: RB,
  ttt: jB,
  tttt: FB,
  T: BB,
  TT: zB,
  TTT: WB,
  TTTT: HB,
  f: QB,
  ff: ZB,
  fff: YB,
  ffff: XB,
  F: UB,
  FF: qB,
  FFF: VB,
  FFFF: GB
};
class $r {
  static create(e, n = {}) {
    return new $r(e, n);
  }
  static parseFormat(e) {
    let n = null, i = "", r = !1;
    const s = [];
    for (let o = 0; o < e.length; o++) {
      const a = e.charAt(o);
      a === "'" ? (i.length > 0 && s.push({ literal: r || /^\s+$/.test(i), val: i }), n = null, i = "", r = !r) : r || a === n ? i += a : (i.length > 0 && s.push({ literal: /^\s+$/.test(i), val: i }), i = a, n = a);
    }
    return i.length > 0 && s.push({ literal: r || /^\s+$/.test(i), val: i }), s;
  }
  static macroTokenToFormatOpts(e) {
    return Oce[e];
  }
  constructor(e, n) {
    this.opts = n, this.loc = e, this.systemLoc = null;
  }
  formatWithSystemDefault(e, n) {
    return this.systemLoc === null && (this.systemLoc = this.loc.redefaultToSystem()), this.systemLoc.dtFormatter(e, { ...this.opts, ...n }).format();
  }
  dtFormatter(e, n = {}) {
    return this.loc.dtFormatter(e, { ...this.opts, ...n });
  }
  formatDateTime(e, n) {
    return this.dtFormatter(e, n).format();
  }
  formatDateTimeParts(e, n) {
    return this.dtFormatter(e, n).formatToParts();
  }
  formatInterval(e, n) {
    return this.dtFormatter(e.start, n).dtf.formatRange(e.start.toJSDate(), e.end.toJSDate());
  }
  resolvedOptions(e, n) {
    return this.dtFormatter(e, n).resolvedOptions();
  }
  num(e, n = 0) {
    if (this.opts.forceSimple)
      return yi(e, n);
    const i = { ...this.opts };
    return n > 0 && (i.padTo = n), this.loc.numberFormatter(i).format(e);
  }
  formatDateTimeFromString(e, n) {
    const i = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", s = (m, g) => this.loc.extract(e, m, g), o = (m) => e.isOffsetFixed && e.offset === 0 && m.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, m.format) : "", a = () => i ? yce(e) : s({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (m, g) => i ? kce(e, m) : s(g ? { month: m } : { month: m, day: "numeric" }, "month"), u = (m, g) => i ? wce(e, m) : s(
      g ? { weekday: m } : { weekday: m, month: "long", day: "numeric" },
      "weekday"
    ), f = (m) => {
      const g = $r.macroTokenToFormatOpts(m);
      return g ? this.formatWithSystemDefault(e, g) : m;
    }, d = (m) => i ? xce(e, m) : s({ era: m }, "era"), h = (m) => {
      switch (m) {
        case "S":
          return this.num(e.millisecond);
        case "u":
        case "SSS":
          return this.num(e.millisecond, 3);
        case "s":
          return this.num(e.second);
        case "ss":
          return this.num(e.second, 2);
        case "uu":
          return this.num(Math.floor(e.millisecond / 10), 2);
        case "uuu":
          return this.num(Math.floor(e.millisecond / 100));
        case "m":
          return this.num(e.minute);
        case "mm":
          return this.num(e.minute, 2);
        case "h":
          return this.num(e.hour % 12 === 0 ? 12 : e.hour % 12);
        case "hh":
          return this.num(e.hour % 12 === 0 ? 12 : e.hour % 12, 2);
        case "H":
          return this.num(e.hour);
        case "HH":
          return this.num(e.hour, 2);
        case "Z":
          return o({ format: "narrow", allowZ: this.opts.allowZ });
        case "ZZ":
          return o({ format: "short", allowZ: this.opts.allowZ });
        case "ZZZ":
          return o({ format: "techie", allowZ: this.opts.allowZ });
        case "ZZZZ":
          return e.zone.offsetName(e.ts, { format: "short", locale: this.loc.locale });
        case "ZZZZZ":
          return e.zone.offsetName(e.ts, { format: "long", locale: this.loc.locale });
        case "z":
          return e.zoneName;
        case "a":
          return a();
        case "d":
          return r ? s({ day: "numeric" }, "day") : this.num(e.day);
        case "dd":
          return r ? s({ day: "2-digit" }, "day") : this.num(e.day, 2);
        case "c":
          return this.num(e.weekday);
        case "ccc":
          return u("short", !0);
        case "cccc":
          return u("long", !0);
        case "ccccc":
          return u("narrow", !0);
        case "E":
          return this.num(e.weekday);
        case "EEE":
          return u("short", !1);
        case "EEEE":
          return u("long", !1);
        case "EEEEE":
          return u("narrow", !1);
        case "L":
          return r ? s({ month: "numeric", day: "numeric" }, "month") : this.num(e.month);
        case "LL":
          return r ? s({ month: "2-digit", day: "numeric" }, "month") : this.num(e.month, 2);
        case "LLL":
          return l("short", !0);
        case "LLLL":
          return l("long", !0);
        case "LLLLL":
          return l("narrow", !0);
        case "M":
          return r ? s({ month: "numeric" }, "month") : this.num(e.month);
        case "MM":
          return r ? s({ month: "2-digit" }, "month") : this.num(e.month, 2);
        case "MMM":
          return l("short", !1);
        case "MMMM":
          return l("long", !1);
        case "MMMMM":
          return l("narrow", !1);
        case "y":
          return r ? s({ year: "numeric" }, "year") : this.num(e.year);
        case "yy":
          return r ? s({ year: "2-digit" }, "year") : this.num(e.year.toString().slice(-2), 2);
        case "yyyy":
          return r ? s({ year: "numeric" }, "year") : this.num(e.year, 4);
        case "yyyyyy":
          return r ? s({ year: "numeric" }, "year") : this.num(e.year, 6);
        case "G":
          return d("short");
        case "GG":
          return d("long");
        case "GGGGG":
          return d("narrow");
        case "kk":
          return this.num(e.weekYear.toString().slice(-2), 2);
        case "kkkk":
          return this.num(e.weekYear, 4);
        case "W":
          return this.num(e.weekNumber);
        case "WW":
          return this.num(e.weekNumber, 2);
        case "n":
          return this.num(e.localWeekNumber);
        case "nn":
          return this.num(e.localWeekNumber, 2);
        case "ii":
          return this.num(e.localWeekYear.toString().slice(-2), 2);
        case "iiii":
          return this.num(e.localWeekYear, 4);
        case "o":
          return this.num(e.ordinal);
        case "ooo":
          return this.num(e.ordinal, 3);
        case "q":
          return this.num(e.quarter);
        case "qq":
          return this.num(e.quarter, 2);
        case "X":
          return this.num(Math.floor(e.ts / 1e3));
        case "x":
          return this.num(e.ts);
        default:
          return f(m);
      }
    };
    return Y7($r.parseFormat(n), h);
  }
  formatDurationFromString(e, n) {
    const i = (l) => {
      switch (l[0]) {
        case "S":
          return "millisecond";
        case "s":
          return "second";
        case "m":
          return "minute";
        case "h":
          return "hour";
        case "d":
          return "day";
        case "w":
          return "week";
        case "M":
          return "month";
        case "y":
          return "year";
        default:
          return null;
      }
    }, r = (l) => (u) => {
      const f = i(u);
      return f ? this.num(l.get(f), u.length) : u;
    }, s = $r.parseFormat(n), o = s.reduce(
      (l, { literal: u, val: f }) => u ? l : l.concat(f),
      []
    ), a = e.shiftTo(...o.map(i).filter((l) => l));
    return Y7(s, r(a));
  }
}
const mz = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
function ep(...t) {
  const e = t.reduce((n, i) => n + i.source, "");
  return RegExp(`^${e}$`);
}
function tp(...t) {
  return (e) => t.reduce(
    ([n, i, r], s) => {
      const [o, a, l] = s(e, r);
      return [{ ...n, ...o }, a || i, l];
    },
    [{}, null, 1]
  ).slice(0, 2);
}
function np(t, ...e) {
  if (t == null)
    return [null, null];
  for (const [n, i] of e) {
    const r = n.exec(t);
    if (r)
      return i(r);
  }
  return [null, null];
}
function gz(...t) {
  return (e, n) => {
    const i = {};
    let r;
    for (r = 0; r < t.length; r++)
      i[t[r]] = hu(e[n + r]);
    return [i, null, n + r];
  };
}
const vz = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Sce = `(?:${vz.source}?(?:\\[(${mz.source})\\])?)?`, R5 = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, bz = RegExp(`${R5.source}${Sce}`), j5 = RegExp(`(?:T${bz.source})?`), Cce = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Ece = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Tce = /(\d{4})-?(\d{3})/, $ce = gz("weekYear", "weekNumber", "weekDay"), Mce = gz("year", "ordinal"), Nce = /(\d{4})-(\d\d)-(\d\d)/, yz = RegExp(
  `${R5.source} ?(?:${vz.source}|(${mz.source}))?`
), Ace = RegExp(`(?: ${yz.source})?`);
function ch(t, e, n) {
  const i = t[e];
  return yt(i) ? n : hu(i);
}
function Dce(t, e) {
  return [{
    year: ch(t, e),
    month: ch(t, e + 1, 1),
    day: ch(t, e + 2, 1)
  }, null, e + 3];
}
function ip(t, e) {
  return [{
    hours: ch(t, e, 0),
    minutes: ch(t, e + 1, 0),
    seconds: ch(t, e + 2, 0),
    milliseconds: I5(t[e + 3])
  }, null, e + 4];
}
function f1(t, e) {
  const n = !t[e] && !t[e + 1], i = t2(t[e + 1], t[e + 2]), r = n ? null : Gr.instance(i);
  return [{}, r, e + 3];
}
function d1(t, e) {
  const n = t[e] ? xl.create(t[e]) : null;
  return [{}, n, e + 1];
}
const Pce = RegExp(`^T?${R5.source}$`), Ice = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
function Lce(t) {
  const [e, n, i, r, s, o, a, l, u] = t, f = e[0] === "-", d = l && l[0] === "-", h = (m, g = !1) => m !== void 0 && (g || m && f) ? -m : m;
  return [
    {
      years: h(Ac(n)),
      months: h(Ac(i)),
      weeks: h(Ac(r)),
      days: h(Ac(s)),
      hours: h(Ac(o)),
      minutes: h(Ac(a)),
      seconds: h(Ac(l), l === "-0"),
      milliseconds: h(I5(u), d)
    }
  ];
}
const Rce = {
  GMT: 0,
  EDT: -4 * 60,
  EST: -5 * 60,
  CDT: -5 * 60,
  CST: -6 * 60,
  MDT: -6 * 60,
  MST: -7 * 60,
  PDT: -7 * 60,
  PST: -8 * 60
};
function F5(t, e, n, i, r, s, o) {
  const a = {
    year: e.length === 2 ? v4(hu(e)) : hu(e),
    month: lz.indexOf(n) + 1,
    day: hu(i),
    hour: hu(r),
    minute: hu(s)
  };
  return o && (a.second = hu(o)), t && (a.weekday = t.length > 3 ? cz.indexOf(t) + 1 : fz.indexOf(t) + 1), a;
}
const jce = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
function Fce(t) {
  const [
    ,
    e,
    n,
    i,
    r,
    s,
    o,
    a,
    l,
    u,
    f,
    d
  ] = t, h = F5(e, r, i, n, s, o, a);
  let m;
  return l ? m = Rce[l] : u ? m = 0 : m = t2(f, d), [h, new Gr(m)];
}
function Bce(t) {
  return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
}
const zce = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, Wce = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, Hce = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
function V7(t) {
  const [, e, n, i, r, s, o, a] = t;
  return [F5(e, r, i, n, s, o, a), Gr.utcInstance];
}
function Qce(t) {
  const [, e, n, i, r, s, o, a] = t;
  return [F5(e, a, n, i, r, s, o), Gr.utcInstance];
}
const Uce = ep(Cce, j5), Zce = ep(Ece, j5), qce = ep(Tce, j5), Yce = ep(bz), wz = tp(
  Dce,
  ip,
  f1,
  d1
), Vce = tp(
  $ce,
  ip,
  f1,
  d1
), Xce = tp(
  Mce,
  ip,
  f1,
  d1
), Gce = tp(
  ip,
  f1,
  d1
);
function Kce(t) {
  return np(
    t,
    [Uce, wz],
    [Zce, Vce],
    [qce, Xce],
    [Yce, Gce]
  );
}
function Jce(t) {
  return np(Bce(t), [jce, Fce]);
}
function efe(t) {
  return np(
    t,
    [zce, V7],
    [Wce, V7],
    [Hce, Qce]
  );
}
function tfe(t) {
  return np(t, [Ice, Lce]);
}
const nfe = tp(ip);
function ife(t) {
  return np(t, [Pce, nfe]);
}
const rfe = ep(Nce, Ace), sfe = ep(yz), ofe = tp(
  ip,
  f1,
  d1
);
function afe(t) {
  return np(
    t,
    [rfe, wz],
    [sfe, ofe]
  );
}
const X7 = "Invalid Duration", kz = {
  weeks: {
    days: 7,
    hours: 7 * 24,
    minutes: 7 * 24 * 60,
    seconds: 7 * 24 * 60 * 60,
    milliseconds: 7 * 24 * 60 * 60 * 1e3
  },
  days: {
    hours: 24,
    minutes: 24 * 60,
    seconds: 24 * 60 * 60,
    milliseconds: 24 * 60 * 60 * 1e3
  },
  hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1e3 },
  minutes: { seconds: 60, milliseconds: 60 * 1e3 },
  seconds: { milliseconds: 1e3 }
}, lfe = {
  years: {
    quarters: 4,
    months: 12,
    weeks: 52,
    days: 365,
    hours: 365 * 24,
    minutes: 365 * 24 * 60,
    seconds: 365 * 24 * 60 * 60,
    milliseconds: 365 * 24 * 60 * 60 * 1e3
  },
  quarters: {
    months: 3,
    weeks: 13,
    days: 91,
    hours: 91 * 24,
    minutes: 91 * 24 * 60,
    seconds: 91 * 24 * 60 * 60,
    milliseconds: 91 * 24 * 60 * 60 * 1e3
  },
  months: {
    weeks: 4,
    days: 30,
    hours: 30 * 24,
    minutes: 30 * 24 * 60,
    seconds: 30 * 24 * 60 * 60,
    milliseconds: 30 * 24 * 60 * 60 * 1e3
  },
  ...kz
}, Ks = 146097 / 400, Sd = 146097 / 4800, ufe = {
  years: {
    quarters: 4,
    months: 12,
    weeks: Ks / 7,
    days: Ks,
    hours: Ks * 24,
    minutes: Ks * 24 * 60,
    seconds: Ks * 24 * 60 * 60,
    milliseconds: Ks * 24 * 60 * 60 * 1e3
  },
  quarters: {
    months: 3,
    weeks: Ks / 28,
    days: Ks / 4,
    hours: Ks * 24 / 4,
    minutes: Ks * 24 * 60 / 4,
    seconds: Ks * 24 * 60 * 60 / 4,
    milliseconds: Ks * 24 * 60 * 60 * 1e3 / 4
  },
  months: {
    weeks: Sd / 7,
    days: Sd,
    hours: Sd * 24,
    minutes: Sd * 24 * 60,
    seconds: Sd * 24 * 60 * 60,
    milliseconds: Sd * 24 * 60 * 60 * 1e3
  },
  ...kz
}, Zc = [
  "years",
  "quarters",
  "months",
  "weeks",
  "days",
  "hours",
  "minutes",
  "seconds",
  "milliseconds"
], cfe = Zc.slice(0).reverse();
function ru(t, e, n = !1) {
  const i = {
    values: n ? e.values : { ...t.values, ...e.values || {} },
    loc: t.loc.clone(e.loc),
    conversionAccuracy: e.conversionAccuracy || t.conversionAccuracy,
    matrix: e.matrix || t.matrix
  };
  return new Ht(i);
}
function xz(t, e) {
  let n = e.milliseconds ?? 0;
  for (const i of cfe.slice(1))
    e[i] && (n += e[i] * t[i].milliseconds);
  return n;
}
function G7(t, e) {
  const n = xz(t, e) < 0 ? -1 : 1;
  Zc.reduceRight((i, r) => {
    if (yt(e[r]))
      return i;
    if (i) {
      const s = e[i] * n, o = t[r][i], a = Math.floor(s / o);
      e[r] += a * n, e[i] -= a * o * n;
    }
    return r;
  }, null), Zc.reduce((i, r) => {
    if (yt(e[r]))
      return i;
    if (i) {
      const s = e[i] % 1;
      e[i] -= s, e[r] += s * t[i][r];
    }
    return r;
  }, null);
}
function ffe(t) {
  const e = {};
  for (const [n, i] of Object.entries(t))
    i !== 0 && (e[n] = i);
  return e;
}
class Ht {
  /**
   * @private
   */
  constructor(e) {
    const n = e.conversionAccuracy === "longterm" || !1;
    let i = n ? ufe : lfe;
    e.matrix && (i = e.matrix), this.values = e.values, this.loc = e.loc || Gt.create(), this.conversionAccuracy = n ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = i, this.isLuxonDuration = !0;
  }
  /**
   * Create Duration from a number of milliseconds.
   * @param {number} count of milliseconds
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @return {Duration}
   */
  static fromMillis(e, n) {
    return Ht.fromObject({ milliseconds: e }, n);
  }
  /**
   * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
   * If this object is empty then a zero milliseconds duration is returned.
   * @param {Object} obj - the object to create the DateTime from
   * @param {number} obj.years
   * @param {number} obj.quarters
   * @param {number} obj.months
   * @param {number} obj.weeks
   * @param {number} obj.days
   * @param {number} obj.hours
   * @param {number} obj.minutes
   * @param {number} obj.seconds
   * @param {number} obj.milliseconds
   * @param {Object} [opts=[]] - options for creating this Duration
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the custom conversion system to use
   * @return {Duration}
   */
  static fromObject(e, n = {}) {
    if (e == null || typeof e != "object")
      throw new Sr(
        `Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
      );
    return new Ht({
      values: fw(e, Ht.normalizeUnit),
      loc: Gt.fromObject(n),
      conversionAccuracy: n.conversionAccuracy,
      matrix: n.matrix
    });
  }
  /**
   * Create a Duration from DurationLike.
   *
   * @param {Object | number | Duration} durationLike
   * One of:
   * - object with keys like 'years' and 'hours'.
   * - number representing milliseconds
   * - Duration instance
   * @return {Duration}
   */
  static fromDurationLike(e) {
    if (Du(e))
      return Ht.fromMillis(e);
    if (Ht.isDuration(e))
      return e;
    if (typeof e == "object")
      return Ht.fromObject(e);
    throw new Sr(
      `Unknown duration argument ${e} of type ${typeof e}`
    );
  }
  /**
   * Create a Duration from an ISO 8601 duration string.
   * @param {string} text - text to parse
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the preset conversion system to use
   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations
   * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }
   * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }
   * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }
   * @return {Duration}
   */
  static fromISO(e, n) {
    const [i] = tfe(e);
    return i ? Ht.fromObject(i, n) : Ht.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  /**
   * Create a Duration from an ISO 8601 time string.
   * @param {string} text - text to parse
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the conversion system to use
   * @see https://en.wikipedia.org/wiki/ISO_8601#Times
   * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }
   * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @return {Duration}
   */
  static fromISOTime(e, n) {
    const [i] = ife(e);
    return i ? Ht.fromObject(i, n) : Ht.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  /**
   * Create an invalid Duration.
   * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {Duration}
   */
  static invalid(e, n = null) {
    if (!e)
      throw new Sr("need to specify a reason the Duration is invalid");
    const i = e instanceof Po ? e : new Po(e, n);
    if (ti.throwOnInvalid)
      throw new Iue(i);
    return new Ht({ invalid: i });
  }
  /**
   * @private
   */
  static normalizeUnit(e) {
    const n = {
      year: "years",
      years: "years",
      quarter: "quarters",
      quarters: "quarters",
      month: "months",
      months: "months",
      week: "weeks",
      weeks: "weeks",
      day: "days",
      days: "days",
      hour: "hours",
      hours: "hours",
      minute: "minutes",
      minutes: "minutes",
      second: "seconds",
      seconds: "seconds",
      millisecond: "milliseconds",
      milliseconds: "milliseconds"
    }[e && e.toLowerCase()];
    if (!n) throw new AB(e);
    return n;
  }
  /**
   * Check if an object is a Duration. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */
  static isDuration(e) {
    return e && e.isLuxonDuration || !1;
  }
  /**
   * Get  the locale of a Duration, such 'en-GB'
   * @type {string}
   */
  get locale() {
    return this.isValid ? this.loc.locale : null;
  }
  /**
   * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration
   *
   * @type {string}
   */
  get numberingSystem() {
    return this.isValid ? this.loc.numberingSystem : null;
  }
  /**
   * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:
   * * `S` for milliseconds
   * * `s` for seconds
   * * `m` for minutes
   * * `h` for hours
   * * `d` for days
   * * `w` for weeks
   * * `M` for months
   * * `y` for years
   * Notes:
   * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
   * * Tokens can be escaped by wrapping with single quotes.
   * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
   * @param {string} fmt - the format string
   * @param {Object} opts - options
   * @param {boolean} [opts.floor=true] - floor numerical values
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2"
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002"
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000"
   * @return {string}
   */
  toFormat(e, n = {}) {
    const i = {
      ...n,
      floor: n.round !== !1 && n.floor !== !1
    };
    return this.isValid ? $r.create(this.loc, i).formatDurationFromString(this, e) : X7;
  }
  /**
   * Returns a string representation of a Duration with all units included.
   * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
   * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.
   * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.
   * @example
   * ```js
   * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
   * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'
   * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes'
   * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min'
   * ```
   */
  toHuman(e = {}) {
    if (!this.isValid) return X7;
    const n = Zc.map((i) => {
      const r = this.values[i];
      return yt(r) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: i.slice(0, -1) }).format(r);
    }).filter((i) => i);
    return this.loc.listFormatter({ type: "conjunction", style: e.listStyle || "narrow", ...e }).format(n);
  }
  /**
   * Returns a JavaScript object with this Duration's values.
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }
   * @return {Object}
   */
  toObject() {
    return this.isValid ? { ...this.values } : {};
  }
  /**
   * Returns an ISO 8601-compliant string representation of this Duration.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations
   * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'
   * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'
   * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'
   * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'
   * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'
   * @return {string}
   */
  toISO() {
    if (!this.isValid) return null;
    let e = "P";
    return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += L5(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
  }
  /**
   * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
   * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Times
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'
   * @return {string}
   */
  toISOTime(e = {}) {
    if (!this.isValid) return null;
    const n = this.toMillis();
    return n < 0 || n >= 864e5 ? null : (e = {
      suppressMilliseconds: !1,
      suppressSeconds: !1,
      includePrefix: !1,
      format: "extended",
      ...e,
      includeOffset: !1
    }, ht.fromMillis(n, { zone: "UTC" }).toISOTime(e));
  }
  /**
   * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.
   * @return {string}
   */
  toJSON() {
    return this.toISO();
  }
  /**
   * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.
   * @return {string}
   */
  toString() {
    return this.toISO();
  }
  /**
   * Returns a string representation of this Duration appropriate for the REPL.
   * @return {string}
   */
  [Symbol.for("nodejs.util.inspect.custom")]() {
    return this.isValid ? `Duration { values: ${JSON.stringify(this.values)} }` : `Duration { Invalid, reason: ${this.invalidReason} }`;
  }
  /**
   * Returns an milliseconds value of this Duration.
   * @return {number}
   */
  toMillis() {
    return this.isValid ? xz(this.matrix, this.values) : NaN;
  }
  /**
   * Returns an milliseconds value of this Duration. Alias of {@link toMillis}
   * @return {number}
   */
  valueOf() {
    return this.toMillis();
  }
  /**
   * Make this Duration longer by the specified amount. Return a newly-constructed Duration.
   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @return {Duration}
   */
  plus(e) {
    if (!this.isValid) return this;
    const n = Ht.fromDurationLike(e), i = {};
    for (const r of Zc)
      (Ch(n.values, r) || Ch(this.values, r)) && (i[r] = n.get(r) + this.get(r));
    return ru(this, { values: i }, !0);
  }
  /**
   * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.
   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @return {Duration}
   */
  minus(e) {
    if (!this.isValid) return this;
    const n = Ht.fromDurationLike(e);
    return this.plus(n.negate());
  }
  /**
   * Scale this Duration by the specified amount. Return a newly-constructed Duration.
   * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.
   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }
   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 }
   * @return {Duration}
   */
  mapUnits(e) {
    if (!this.isValid) return this;
    const n = {};
    for (const i of Object.keys(this.values))
      n[i] = az(e(this.values[i], i));
    return ru(this, { values: n }, !0);
  }
  /**
   * Get the value of unit.
   * @param {string} unit - a unit such as 'minute' or 'day'
   * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2
   * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0
   * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3
   * @return {number}
   */
  get(e) {
    return this[Ht.normalizeUnit(e)];
  }
  /**
   * "Set" the values of specified units. Return a newly-constructed Duration.
   * @param {Object} values - a mapping of units to numbers
   * @example dur.set({ years: 2017 })
   * @example dur.set({ hours: 8, minutes: 30 })
   * @return {Duration}
   */
  set(e) {
    if (!this.isValid) return this;
    const n = { ...this.values, ...fw(e, Ht.normalizeUnit) };
    return ru(this, { values: n });
  }
  /**
   * "Set" the locale and/or numberingSystem.  Returns a newly-constructed Duration.
   * @example dur.reconfigure({ locale: 'en-GB' })
   * @return {Duration}
   */
  reconfigure({ locale: e, numberingSystem: n, conversionAccuracy: i, matrix: r } = {}) {
    const o = { loc: this.loc.clone({ locale: e, numberingSystem: n }), matrix: r, conversionAccuracy: i };
    return ru(this, o);
  }
  /**
   * Return the length of the duration in the specified unit.
   * @param {string} unit - a unit such as 'minutes' or 'days'
   * @example Duration.fromObject({years: 1}).as('days') //=> 365
   * @example Duration.fromObject({years: 1}).as('months') //=> 12
   * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5
   * @return {number}
   */
  as(e) {
    return this.isValid ? this.shiftTo(e).get(e) : NaN;
  }
  /**
   * Reduce this Duration to its canonical representation in its current units.
   * Assuming the overall value of the Duration is positive, this means:
   * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)
   * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise
   *   the overall value would be negative, see third example)
   * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)
   *
   * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.
   * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }
   * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }
   * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }
   * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }
   * @return {Duration}
   */
  normalize() {
    if (!this.isValid) return this;
    const e = this.toObject();
    return G7(this.matrix, e), ru(this, { values: e }, !0);
  }
  /**
   * Rescale units to its largest representation
   * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }
   * @return {Duration}
   */
  rescale() {
    if (!this.isValid) return this;
    const e = ffe(this.normalize().shiftToAll().toObject());
    return ru(this, { values: e }, !0);
  }
  /**
   * Convert this Duration into its representation in a different set of units.
   * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }
   * @return {Duration}
   */
  shiftTo(...e) {
    if (!this.isValid) return this;
    if (e.length === 0)
      return this;
    e = e.map((o) => Ht.normalizeUnit(o));
    const n = {}, i = {}, r = this.toObject();
    let s;
    for (const o of Zc)
      if (e.indexOf(o) >= 0) {
        s = o;
        let a = 0;
        for (const u in i)
          a += this.matrix[u][o] * i[u], i[u] = 0;
        Du(r[o]) && (a += r[o]);
        const l = Math.trunc(a);
        n[o] = l, i[o] = (a * 1e3 - l * 1e3) / 1e3;
      } else Du(r[o]) && (i[o] = r[o]);
    for (const o in i)
      i[o] !== 0 && (n[s] += o === s ? i[o] : i[o] / this.matrix[s][o]);
    return G7(this.matrix, n), ru(this, { values: n }, !0);
  }
  /**
   * Shift this Duration to all available units.
   * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds")
   * @return {Duration}
   */
  shiftToAll() {
    return this.isValid ? this.shiftTo(
      "years",
      "months",
      "weeks",
      "days",
      "hours",
      "minutes",
      "seconds",
      "milliseconds"
    ) : this;
  }
  /**
   * Return the negative of this Duration.
   * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }
   * @return {Duration}
   */
  negate() {
    if (!this.isValid) return this;
    const e = {};
    for (const n of Object.keys(this.values))
      e[n] = this.values[n] === 0 ? 0 : -this.values[n];
    return ru(this, { values: e }, !0);
  }
  /**
   * Get the years.
   * @type {number}
   */
  get years() {
    return this.isValid ? this.values.years || 0 : NaN;
  }
  /**
   * Get the quarters.
   * @type {number}
   */
  get quarters() {
    return this.isValid ? this.values.quarters || 0 : NaN;
  }
  /**
   * Get the months.
   * @type {number}
   */
  get months() {
    return this.isValid ? this.values.months || 0 : NaN;
  }
  /**
   * Get the weeks
   * @type {number}
   */
  get weeks() {
    return this.isValid ? this.values.weeks || 0 : NaN;
  }
  /**
   * Get the days.
   * @type {number}
   */
  get days() {
    return this.isValid ? this.values.days || 0 : NaN;
  }
  /**
   * Get the hours.
   * @type {number}
   */
  get hours() {
    return this.isValid ? this.values.hours || 0 : NaN;
  }
  /**
   * Get the minutes.
   * @type {number}
   */
  get minutes() {
    return this.isValid ? this.values.minutes || 0 : NaN;
  }
  /**
   * Get the seconds.
   * @return {number}
   */
  get seconds() {
    return this.isValid ? this.values.seconds || 0 : NaN;
  }
  /**
   * Get the milliseconds.
   * @return {number}
   */
  get milliseconds() {
    return this.isValid ? this.values.milliseconds || 0 : NaN;
  }
  /**
   * Returns whether the Duration is invalid. Invalid durations are returned by diff operations
   * on invalid DateTimes or Intervals.
   * @return {boolean}
   */
  get isValid() {
    return this.invalid === null;
  }
  /**
   * Returns an error code if this Duration became invalid, or null if the Duration is valid
   * @return {string}
   */
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  /**
   * Returns an explanation of why this Duration became invalid, or null if the Duration is valid
   * @type {string}
   */
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  /**
   * Equality check
   * Two Durations are equal iff they have the same units and the same values for each unit.
   * @param {Duration} other
   * @return {boolean}
   */
  equals(e) {
    if (!this.isValid || !e.isValid || !this.loc.equals(e.loc))
      return !1;
    function n(i, r) {
      return i === void 0 || i === 0 ? r === void 0 || r === 0 : i === r;
    }
    for (const i of Zc)
      if (!n(this.values[i], e.values[i]))
        return !1;
    return !0;
  }
}
const Cd = "Invalid Interval";
function dfe(t, e) {
  return !t || !t.isValid ? ei.invalid("missing or invalid start") : !e || !e.isValid ? ei.invalid("missing or invalid end") : e < t ? ei.invalid(
    "end before start",
    `The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`
  ) : null;
}
class ei {
  /**
   * @private
   */
  constructor(e) {
    this.s = e.start, this.e = e.end, this.invalid = e.invalid || null, this.isLuxonInterval = !0;
  }
  /**
   * Create an invalid Interval.
   * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {Interval}
   */
  static invalid(e, n = null) {
    if (!e)
      throw new Sr("need to specify a reason the Interval is invalid");
    const i = e instanceof Po ? e : new Po(e, n);
    if (ti.throwOnInvalid)
      throw new Pue(i);
    return new ei({ invalid: i });
  }
  /**
   * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.
   * @param {DateTime|Date|Object} start
   * @param {DateTime|Date|Object} end
   * @return {Interval}
   */
  static fromDateTimes(e, n) {
    const i = Cm(e), r = Cm(n), s = dfe(i, r);
    return s ?? new ei({
      start: i,
      end: r
    });
  }
  /**
   * Create an Interval from a start DateTime and a Duration to extend to.
   * @param {DateTime|Date|Object} start
   * @param {Duration|Object|number} duration - the length of the Interval.
   * @return {Interval}
   */
  static after(e, n) {
    const i = Ht.fromDurationLike(n), r = Cm(e);
    return ei.fromDateTimes(r, r.plus(i));
  }
  /**
   * Create an Interval from an end DateTime and a Duration to extend backwards to.
   * @param {DateTime|Date|Object} end
   * @param {Duration|Object|number} duration - the length of the Interval.
   * @return {Interval}
   */
  static before(e, n) {
    const i = Ht.fromDurationLike(n), r = Cm(e);
    return ei.fromDateTimes(r.minus(i), r);
  }
  /**
   * Create an Interval from an ISO 8601 string.
   * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
   * @param {string} text - the ISO string to parse
   * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @return {Interval}
   */
  static fromISO(e, n) {
    const [i, r] = (e || "").split("/", 2);
    if (i && r) {
      let s, o;
      try {
        s = ht.fromISO(i, n), o = s.isValid;
      } catch {
        o = !1;
      }
      let a, l;
      try {
        a = ht.fromISO(r, n), l = a.isValid;
      } catch {
        l = !1;
      }
      if (o && l)
        return ei.fromDateTimes(s, a);
      if (o) {
        const u = Ht.fromISO(r, n);
        if (u.isValid)
          return ei.after(s, u);
      } else if (l) {
        const u = Ht.fromISO(i, n);
        if (u.isValid)
          return ei.before(a, u);
      }
    }
    return ei.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  /**
   * Check if an object is an Interval. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */
  static isInterval(e) {
    return e && e.isLuxonInterval || !1;
  }
  /**
   * Returns the start of the Interval
   * @type {DateTime}
   */
  get start() {
    return this.isValid ? this.s : null;
  }
  /**
   * Returns the end of the Interval
   * @type {DateTime}
   */
  get end() {
    return this.isValid ? this.e : null;
  }
  /**
   * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.
   * @type {boolean}
   */
  get isValid() {
    return this.invalidReason === null;
  }
  /**
   * Returns an error code if this Interval is invalid, or null if the Interval is valid
   * @type {string}
   */
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  /**
   * Returns an explanation of why this Interval became invalid, or null if the Interval is valid
   * @type {string}
   */
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  /**
   * Returns the length of the Interval in the specified unit.
   * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.
   * @return {number}
   */
  length(e = "milliseconds") {
    return this.isValid ? this.toDuration(e).get(e) : NaN;
  }
  /**
   * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.
   * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'
   * asks 'what dates are included in this interval?', not 'how many days long is this interval?'
   * @param {string} [unit='milliseconds'] - the unit of time to count.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime
   * @return {number}
   */
  count(e = "milliseconds", n) {
    if (!this.isValid) return NaN;
    const i = this.start.startOf(e, n);
    let r;
    return n != null && n.useLocaleWeeks ? r = this.end.reconfigure({ locale: i.locale }) : r = this.end, r = r.startOf(e, n), Math.floor(r.diff(i, e).get(e)) + (r.valueOf() !== this.end.valueOf());
  }
  /**
   * Returns whether this Interval's start and end are both in the same unit of time
   * @param {string} unit - the unit of time to check sameness on
   * @return {boolean}
   */
  hasSame(e) {
    return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, e) : !1;
  }
  /**
   * Return whether this Interval has the same start and end DateTimes.
   * @return {boolean}
   */
  isEmpty() {
    return this.s.valueOf() === this.e.valueOf();
  }
  /**
   * Return whether this Interval's start is after the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */
  isAfter(e) {
    return this.isValid ? this.s > e : !1;
  }
  /**
   * Return whether this Interval's end is before the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */
  isBefore(e) {
    return this.isValid ? this.e <= e : !1;
  }
  /**
   * Return whether this Interval contains the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */
  contains(e) {
    return this.isValid ? this.s <= e && this.e > e : !1;
  }
  /**
   * "Sets" the start and/or end dates. Returns a newly-constructed Interval.
   * @param {Object} values - the values to set
   * @param {DateTime} values.start - the starting DateTime
   * @param {DateTime} values.end - the ending DateTime
   * @return {Interval}
   */
  set({ start: e, end: n } = {}) {
    return this.isValid ? ei.fromDateTimes(e || this.s, n || this.e) : this;
  }
  /**
   * Split this Interval at each of the specified DateTimes
   * @param {...DateTime} dateTimes - the unit of time to count.
   * @return {Array}
   */
  splitAt(...e) {
    if (!this.isValid) return [];
    const n = e.map(Cm).filter((o) => this.contains(o)).sort((o, a) => o.toMillis() - a.toMillis()), i = [];
    let { s: r } = this, s = 0;
    for (; r < this.e; ) {
      const o = n[s] || this.e, a = +o > +this.e ? this.e : o;
      i.push(ei.fromDateTimes(r, a)), r = a, s += 1;
    }
    return i;
  }
  /**
   * Split this Interval into smaller Intervals, each of the specified length.
   * Left over time is grouped into a smaller interval
   * @param {Duration|Object|number} duration - The length of each resulting interval.
   * @return {Array}
   */
  splitBy(e) {
    const n = Ht.fromDurationLike(e);
    if (!this.isValid || !n.isValid || n.as("milliseconds") === 0)
      return [];
    let { s: i } = this, r = 1, s;
    const o = [];
    for (; i < this.e; ) {
      const a = this.start.plus(n.mapUnits((l) => l * r));
      s = +a > +this.e ? this.e : a, o.push(ei.fromDateTimes(i, s)), i = s, r += 1;
    }
    return o;
  }
  /**
   * Split this Interval into the specified number of smaller intervals.
   * @param {number} numberOfParts - The number of Intervals to divide the Interval into.
   * @return {Array}
   */
  divideEqually(e) {
    return this.isValid ? this.splitBy(this.length() / e).slice(0, e) : [];
  }
  /**
   * Return whether this Interval overlaps with the specified Interval
   * @param {Interval} other
   * @return {boolean}
   */
  overlaps(e) {
    return this.e > e.s && this.s < e.e;
  }
  /**
   * Return whether this Interval's end is adjacent to the specified Interval's start.
   * @param {Interval} other
   * @return {boolean}
   */
  abutsStart(e) {
    return this.isValid ? +this.e == +e.s : !1;
  }
  /**
   * Return whether this Interval's start is adjacent to the specified Interval's end.
   * @param {Interval} other
   * @return {boolean}
   */
  abutsEnd(e) {
    return this.isValid ? +e.e == +this.s : !1;
  }
  /**
   * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.
   * @param {Interval} other
   * @return {boolean}
   */
  engulfs(e) {
    return this.isValid ? this.s <= e.s && this.e >= e.e : !1;
  }
  /**
   * Return whether this Interval has the same start and end as the specified Interval.
   * @param {Interval} other
   * @return {boolean}
   */
  equals(e) {
    return !this.isValid || !e.isValid ? !1 : this.s.equals(e.s) && this.e.equals(e.e);
  }
  /**
   * Return an Interval representing the intersection of this Interval and the specified Interval.
   * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.
   * Returns null if the intersection is empty, meaning, the intervals don't intersect.
   * @param {Interval} other
   * @return {Interval}
   */
  intersection(e) {
    if (!this.isValid) return this;
    const n = this.s > e.s ? this.s : e.s, i = this.e < e.e ? this.e : e.e;
    return n >= i ? null : ei.fromDateTimes(n, i);
  }
  /**
   * Return an Interval representing the union of this Interval and the specified Interval.
   * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.
   * @param {Interval} other
   * @return {Interval}
   */
  union(e) {
    if (!this.isValid) return this;
    const n = this.s < e.s ? this.s : e.s, i = this.e > e.e ? this.e : e.e;
    return ei.fromDateTimes(n, i);
  }
  /**
   * Merge an array of Intervals into a equivalent minimal set of Intervals.
   * Combines overlapping and adjacent Intervals.
   * @param {Array} intervals
   * @return {Array}
   */
  static merge(e) {
    const [n, i] = e.sort((r, s) => r.s - s.s).reduce(
      ([r, s], o) => s ? s.overlaps(o) || s.abutsStart(o) ? [r, s.union(o)] : [r.concat([s]), o] : [r, o],
      [[], null]
    );
    return i && n.push(i), n;
  }
  /**
   * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.
   * @param {Array} intervals
   * @return {Array}
   */
  static xor(e) {
    let n = null, i = 0;
    const r = [], s = e.map((l) => [
      { time: l.s, type: "s" },
      { time: l.e, type: "e" }
    ]), o = Array.prototype.concat(...s), a = o.sort((l, u) => l.time - u.time);
    for (const l of a)
      i += l.type === "s" ? 1 : -1, i === 1 ? n = l.time : (n && +n != +l.time && r.push(ei.fromDateTimes(n, l.time)), n = null);
    return ei.merge(r);
  }
  /**
   * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
   * @param {...Interval} intervals
   * @return {Array}
   */
  difference(...e) {
    return ei.xor([this].concat(e)).map((n) => this.intersection(n)).filter((n) => n && !n.isEmpty());
  }
  /**
   * Returns a string representation of this Interval appropriate for debugging.
   * @return {string}
   */
  toString() {
    return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` : Cd;
  }
  /**
   * Returns a string representation of this Interval appropriate for the REPL.
   * @return {string}
   */
  [Symbol.for("nodejs.util.inspect.custom")]() {
    return this.isValid ? `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }` : `Interval { Invalid, reason: ${this.invalidReason} }`;
  }
  /**
   * Returns a localized string representing this Interval. Accepts the same options as the
   * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as
   * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method
   * is browser-specific, but in general it will return an appropriate representation of the
   * Interval in the assigned locale. Defaults to the system's locale if no locale has been
   * specified.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or
   * Intl.DateTimeFormat constructor options.
   * @param {Object} opts - Options to override the configuration of the start DateTime.
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022
   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM
   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p
   * @return {string}
   */
  toLocaleString(e = lw, n = {}) {
    return this.isValid ? $r.create(this.s.loc.clone(n), e).formatInterval(this) : Cd;
  }
  /**
   * Returns an ISO 8601-compliant string representation of this Interval.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @param {Object} opts - The same options as {@link DateTime#toISO}
   * @return {string}
   */
  toISO(e) {
    return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` : Cd;
  }
  /**
   * Returns an ISO 8601-compliant string representation of date of this Interval.
   * The time components are ignored.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @return {string}
   */
  toISODate() {
    return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : Cd;
  }
  /**
   * Returns an ISO 8601-compliant string representation of time of this Interval.
   * The date components are ignored.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @param {Object} opts - The same options as {@link DateTime#toISO}
   * @return {string}
   */
  toISOTime(e) {
    return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` : Cd;
  }
  /**
   * Returns a string representation of this Interval formatted according to the specified format
   * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible
   * formatting tool.
   * @param {string} dateFormat - The format string. This string formats the start and end time.
   * See {@link DateTime#toFormat} for details.
   * @param {Object} opts - Options.
   * @param {string} [opts.separator =  ' – '] - A separator to place between the start and end
   * representations.
   * @return {string}
   */
  toFormat(e, { separator: n = " – " } = {}) {
    return this.isValid ? `${this.s.toFormat(e)}${n}${this.e.toFormat(e)}` : Cd;
  }
  /**
   * Return a Duration representing the time spanned by this interval.
   * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }
   * @return {Duration}
   */
  toDuration(e, n) {
    return this.isValid ? this.e.diff(this.s, e, n) : Ht.invalid(this.invalidReason);
  }
  /**
   * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes
   * @param {function} mapFn
   * @return {Interval}
   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())
   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
   */
  mapEndpoints(e) {
    return ei.fromDateTimes(e(this.s), e(this.e));
  }
}
class ib {
  /**
   * Return whether the specified zone contains a DST.
   * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
   * @return {boolean}
   */
  static hasDST(e = ti.defaultZone) {
    const n = ht.now().setZone(e).set({ month: 12 });
    return !e.isUniversal && n.offset !== n.set({ month: 6 }).offset;
  }
  /**
   * Return whether the specified zone is a valid IANA specifier.
   * @param {string} zone - Zone to check
   * @return {boolean}
   */
  static isValidIANAZone(e) {
    return xl.isValidZone(e);
  }
  /**
   * Converts the input into a {@link Zone} instance.
   *
   * * If `input` is already a Zone instance, it is returned unchanged.
   * * If `input` is a string containing a valid time zone name, a Zone instance
   *   with that name is returned.
   * * If `input` is a string that doesn't refer to a known time zone, a Zone
   *   instance with {@link Zone#isValid} == false is returned.
   * * If `input is a number, a Zone instance with the specified fixed offset
   *   in minutes is returned.
   * * If `input` is `null` or `undefined`, the default zone is returned.
   * @param {string|Zone|number} [input] - the value to be converted
   * @return {Zone}
   */
  static normalizeZone(e) {
    return vu(e, ti.defaultZone);
  }
  /**
   * Get the weekday on which the week starts according to the given locale.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number} the start of the week, 1 for Monday through 7 for Sunday
   */
  static getStartOfWeek({ locale: e = null, locObj: n = null } = {}) {
    return (n || Gt.create(e)).getStartOfWeek();
  }
  /**
   * Get the minimum number of days necessary in a week before it is considered part of the next year according
   * to the given locale.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number}
   */
  static getMinimumDaysInFirstWeek({ locale: e = null, locObj: n = null } = {}) {
    return (n || Gt.create(e)).getMinDaysInFirstWeek();
  }
  /**
   * Get the weekdays, which are considered the weekend according to the given locale
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday
   */
  static getWeekendWeekdays({ locale: e = null, locObj: n = null } = {}) {
    return (n || Gt.create(e)).getWeekendDays().slice();
  }
  /**
   * Return an array of standalone month names.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @param {string} [opts.outputCalendar='gregory'] - the calendar
   * @example Info.months()[0] //=> 'January'
   * @example Info.months('short')[0] //=> 'Jan'
   * @example Info.months('numeric')[0] //=> '1'
   * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'
   * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'
   * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'
   * @return {Array}
   */
  static months(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null, outputCalendar: s = "gregory" } = {}) {
    return (r || Gt.create(n, i, s)).months(e);
  }
  /**
   * Return an array of format month names.
   * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that
   * changes the string.
   * See {@link Info#months}
   * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @param {string} [opts.outputCalendar='gregory'] - the calendar
   * @return {Array}
   */
  static monthsFormat(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null, outputCalendar: s = "gregory" } = {}) {
    return (r || Gt.create(n, i, s)).months(e, !0);
  }
  /**
   * Return an array of standalone week names.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @example Info.weekdays()[0] //=> 'Monday'
   * @example Info.weekdays('short')[0] //=> 'Mon'
   * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'
   * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'
   * @return {Array}
   */
  static weekdays(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null } = {}) {
    return (r || Gt.create(n, i, null)).weekdays(e);
  }
  /**
   * Return an array of format week names.
   * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that
   * changes the string.
   * See {@link Info#weekdays}
   * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale=null] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @return {Array}
   */
  static weekdaysFormat(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null } = {}) {
    return (r || Gt.create(n, i, null)).weekdays(e, !0);
  }
  /**
   * Return an array of meridiems.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @example Info.meridiems() //=> [ 'AM', 'PM' ]
   * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]
   * @return {Array}
   */
  static meridiems({ locale: e = null } = {}) {
    return Gt.create(e).meridiems();
  }
  /**
   * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.
   * @param {string} [length='short'] - the length of the era representation, such as "short" or "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @example Info.eras() //=> [ 'BC', 'AD' ]
   * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]
   * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]
   * @return {Array}
   */
  static eras(e = "short", { locale: n = null } = {}) {
    return Gt.create(n, null, "gregory").eras(e);
  }
  /**
   * Return the set of available features in this environment.
   * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
   * Keys:
   * * `relative`: whether this environment supports relative time formatting
   * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale
   * @example Info.features() //=> { relative: false, localeWeek: true }
   * @return {Object}
   */
  static features() {
    return { relative: rz(), localeWeek: sz() };
  }
}
function K7(t, e) {
  const n = (r) => r.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), i = n(e) - n(t);
  return Math.floor(Ht.fromMillis(i).as("days"));
}
function hfe(t, e, n) {
  const i = [
    ["years", (l, u) => u.year - l.year],
    ["quarters", (l, u) => u.quarter - l.quarter + (u.year - l.year) * 4],
    ["months", (l, u) => u.month - l.month + (u.year - l.year) * 12],
    [
      "weeks",
      (l, u) => {
        const f = K7(l, u);
        return (f - f % 7) / 7;
      }
    ],
    ["days", K7]
  ], r = {}, s = t;
  let o, a;
  for (const [l, u] of i)
    n.indexOf(l) >= 0 && (o = l, r[l] = u(t, e), a = s.plus(r), a > e ? (r[l]--, t = s.plus(r), t > e && (a = t, r[l]--, t = s.plus(r))) : t = a);
  return [t, r, a, o];
}
function pfe(t, e, n, i) {
  let [r, s, o, a] = hfe(t, e, n);
  const l = e - r, u = n.filter(
    (d) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(d) >= 0
  );
  u.length === 0 && (o < e && (o = r.plus({ [a]: 1 })), o !== r && (s[a] = (s[a] || 0) + l / (o - r)));
  const f = Ht.fromObject(s, i);
  return u.length > 0 ? Ht.fromMillis(l, i).shiftTo(...u).plus(f) : f;
}
const mfe = "missing Intl.DateTimeFormat.formatToParts support";
function Vt(t, e = (n) => n) {
  return { regex: t, deser: ([n]) => e(rce(n)) };
}
const gfe = " ", _z = `[ ${gfe}]`, Oz = new RegExp(_z, "g");
function vfe(t) {
  return t.replace(/\./g, "\\.?").replace(Oz, _z);
}
function J7(t) {
  return t.replace(/\./g, "").replace(Oz, " ").toLowerCase();
}
function No(t, e) {
  return t === null ? null : {
    regex: RegExp(t.map(vfe).join("|")),
    deser: ([n]) => t.findIndex((i) => J7(n) === J7(i)) + e
  };
}
function eN(t, e) {
  return { regex: t, deser: ([, n, i]) => t2(n, i), groups: e };
}
function rb(t) {
  return { regex: t, deser: ([e]) => e };
}
function bfe(t) {
  return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function yfe(t, e) {
  const n = Mo(e), i = Mo(e, "{2}"), r = Mo(e, "{3}"), s = Mo(e, "{4}"), o = Mo(e, "{6}"), a = Mo(e, "{1,2}"), l = Mo(e, "{1,3}"), u = Mo(e, "{1,6}"), f = Mo(e, "{1,9}"), d = Mo(e, "{2,4}"), h = Mo(e, "{4,6}"), m = (x) => ({ regex: RegExp(bfe(x.val)), deser: ([_]) => _, literal: !0 }), w = ((x) => {
    if (t.literal)
      return m(x);
    switch (x.val) {
      case "G":
        return No(e.eras("short"), 0);
      case "GG":
        return No(e.eras("long"), 0);
      case "y":
        return Vt(u);
      case "yy":
        return Vt(d, v4);
      case "yyyy":
        return Vt(s);
      case "yyyyy":
        return Vt(h);
      case "yyyyyy":
        return Vt(o);
      case "M":
        return Vt(a);
      case "MM":
        return Vt(i);
      case "MMM":
        return No(e.months("short", !0), 1);
      case "MMMM":
        return No(e.months("long", !0), 1);
      case "L":
        return Vt(a);
      case "LL":
        return Vt(i);
      case "LLL":
        return No(e.months("short", !1), 1);
      case "LLLL":
        return No(e.months("long", !1), 1);
      case "d":
        return Vt(a);
      case "dd":
        return Vt(i);
      case "o":
        return Vt(l);
      case "ooo":
        return Vt(r);
      case "HH":
        return Vt(i);
      case "H":
        return Vt(a);
      case "hh":
        return Vt(i);
      case "h":
        return Vt(a);
      case "mm":
        return Vt(i);
      case "m":
        return Vt(a);
      case "q":
        return Vt(a);
      case "qq":
        return Vt(i);
      case "s":
        return Vt(a);
      case "ss":
        return Vt(i);
      case "S":
        return Vt(l);
      case "SSS":
        return Vt(r);
      case "u":
        return rb(f);
      case "uu":
        return rb(a);
      case "uuu":
        return Vt(n);
      case "a":
        return No(e.meridiems(), 0);
      case "kkkk":
        return Vt(s);
      case "kk":
        return Vt(d, v4);
      case "W":
        return Vt(a);
      case "WW":
        return Vt(i);
      case "E":
      case "c":
        return Vt(n);
      case "EEE":
        return No(e.weekdays("short", !1), 1);
      case "EEEE":
        return No(e.weekdays("long", !1), 1);
      case "ccc":
        return No(e.weekdays("short", !0), 1);
      case "cccc":
        return No(e.weekdays("long", !0), 1);
      case "Z":
      case "ZZ":
        return eN(new RegExp(`([+-]${a.source})(?::(${i.source}))?`), 2);
      case "ZZZ":
        return eN(new RegExp(`([+-]${a.source})(${i.source})?`), 2);
      case "z":
        return rb(/[a-z_+-/]{1,256}?/i);
      case " ":
        return rb(/[^\S\n\r]/);
      default:
        return m(x);
    }
  })(t) || {
    invalidReason: mfe
  };
  return w.token = t, w;
}
const wfe = {
  year: {
    "2-digit": "yy",
    numeric: "yyyyy"
  },
  month: {
    numeric: "M",
    "2-digit": "MM",
    short: "MMM",
    long: "MMMM"
  },
  day: {
    numeric: "d",
    "2-digit": "dd"
  },
  weekday: {
    short: "EEE",
    long: "EEEE"
  },
  dayperiod: "a",
  dayPeriod: "a",
  hour12: {
    numeric: "h",
    "2-digit": "hh"
  },
  hour24: {
    numeric: "H",
    "2-digit": "HH"
  },
  minute: {
    numeric: "m",
    "2-digit": "mm"
  },
  second: {
    numeric: "s",
    "2-digit": "ss"
  },
  timeZoneName: {
    long: "ZZZZZ",
    short: "ZZZ"
  }
};
function kfe(t, e, n) {
  const { type: i, value: r } = t;
  if (i === "literal") {
    const l = /^\s+$/.test(r);
    return {
      literal: !l,
      val: l ? " " : r
    };
  }
  const s = e[i];
  let o = i;
  i === "hour" && (e.hour12 != null ? o = e.hour12 ? "hour12" : "hour24" : e.hourCycle != null ? e.hourCycle === "h11" || e.hourCycle === "h12" ? o = "hour12" : o = "hour24" : o = n.hour12 ? "hour12" : "hour24");
  let a = wfe[o];
  if (typeof a == "object" && (a = a[s]), a)
    return {
      literal: !1,
      val: a
    };
}
function xfe(t) {
  return [`^${t.map((n) => n.regex).reduce((n, i) => `${n}(${i.source})`, "")}$`, t];
}
function _fe(t, e, n) {
  const i = t.match(e);
  if (i) {
    const r = {};
    let s = 1;
    for (const o in n)
      if (Ch(n, o)) {
        const a = n[o], l = a.groups ? a.groups + 1 : 1;
        !a.literal && a.token && (r[a.token.val[0]] = a.deser(i.slice(s, s + l))), s += l;
      }
    return [i, r];
  } else
    return [i, {}];
}
function Ofe(t) {
  const e = (s) => {
    switch (s) {
      case "S":
        return "millisecond";
      case "s":
        return "second";
      case "m":
        return "minute";
      case "h":
      case "H":
        return "hour";
      case "d":
        return "day";
      case "o":
        return "ordinal";
      case "L":
      case "M":
        return "month";
      case "y":
        return "year";
      case "E":
      case "c":
        return "weekday";
      case "W":
        return "weekNumber";
      case "k":
        return "weekYear";
      case "q":
        return "quarter";
      default:
        return null;
    }
  };
  let n = null, i;
  return yt(t.z) || (n = xl.create(t.z)), yt(t.Z) || (n || (n = new Gr(t.Z)), i = t.Z), yt(t.q) || (t.M = (t.q - 1) * 3 + 1), yt(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), yt(t.u) || (t.S = I5(t.u)), [Object.keys(t).reduce((s, o) => {
    const a = e(o);
    return a && (s[a] = t[o]), s;
  }, {}), n, i];
}
let L3 = null;
function Sfe() {
  return L3 || (L3 = ht.fromMillis(1555555555555)), L3;
}
function Cfe(t, e) {
  if (t.literal)
    return t;
  const n = $r.macroTokenToFormatOpts(t.val), i = Tz(n, e);
  return i == null || i.includes(void 0) ? t : i;
}
function Sz(t, e) {
  return Array.prototype.concat(...t.map((n) => Cfe(n, e)));
}
class Cz {
  constructor(e, n) {
    if (this.locale = e, this.format = n, this.tokens = Sz($r.parseFormat(n), e), this.units = this.tokens.map((i) => yfe(i, e)), this.disqualifyingUnit = this.units.find((i) => i.invalidReason), !this.disqualifyingUnit) {
      const [i, r] = xfe(this.units);
      this.regex = RegExp(i, "i"), this.handlers = r;
    }
  }
  explainFromTokens(e) {
    if (this.isValid) {
      const [n, i] = _fe(e, this.regex, this.handlers), [r, s, o] = i ? Ofe(i) : [null, null, void 0];
      if (Ch(i, "a") && Ch(i, "H"))
        throw new Gd(
          "Can't include meridiem when specifying 24-hour format"
        );
      return {
        input: e,
        tokens: this.tokens,
        regex: this.regex,
        rawMatches: n,
        matches: i,
        result: r,
        zone: s,
        specificOffset: o
      };
    } else
      return { input: e, tokens: this.tokens, invalidReason: this.invalidReason };
  }
  get isValid() {
    return !this.disqualifyingUnit;
  }
  get invalidReason() {
    return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
  }
}
function Ez(t, e, n) {
  return new Cz(t, n).explainFromTokens(e);
}
function Efe(t, e, n) {
  const { result: i, zone: r, specificOffset: s, invalidReason: o } = Ez(t, e, n);
  return [i, r, s, o];
}
function Tz(t, e) {
  if (!t)
    return null;
  const i = $r.create(e, t).dtFormatter(Sfe()), r = i.formatToParts(), s = i.resolvedOptions();
  return r.map((o) => kfe(o, t, s));
}
const R3 = "Invalid DateTime", tN = 864e13;
function Jm(t) {
  return new Po("unsupported zone", `the zone "${t.name}" is not supported`);
}
function j3(t) {
  return t.weekData === null && (t.weekData = uw(t.c)), t.weekData;
}
function F3(t) {
  return t.localWeekData === null && (t.localWeekData = uw(
    t.c,
    t.loc.getMinDaysInFirstWeek(),
    t.loc.getStartOfWeek()
  )), t.localWeekData;
}
function Dc(t, e) {
  const n = {
    ts: t.ts,
    zone: t.zone,
    c: t.c,
    o: t.o,
    loc: t.loc,
    invalid: t.invalid
  };
  return new ht({ ...n, ...e, old: n });
}
function $z(t, e, n) {
  let i = t - e * 60 * 1e3;
  const r = n.offset(i);
  if (e === r)
    return [i, e];
  i -= (r - e) * 60 * 1e3;
  const s = n.offset(i);
  return r === s ? [i, r] : [t - Math.min(r, s) * 60 * 1e3, Math.max(r, s)];
}
function sb(t, e) {
  t += e * 60 * 1e3;
  const n = new Date(t);
  return {
    year: n.getUTCFullYear(),
    month: n.getUTCMonth() + 1,
    day: n.getUTCDate(),
    hour: n.getUTCHours(),
    minute: n.getUTCMinutes(),
    second: n.getUTCSeconds(),
    millisecond: n.getUTCMilliseconds()
  };
}
function ny(t, e, n) {
  return $z(e2(t), e, n);
}
function nN(t, e) {
  const n = t.o, i = t.c.year + Math.trunc(e.years), r = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, s = {
    ...t.c,
    year: i,
    month: r,
    day: Math.min(t.c.day, cw(i, r)) + Math.trunc(e.days) + Math.trunc(e.weeks) * 7
  }, o = Ht.fromObject({
    years: e.years - Math.trunc(e.years),
    quarters: e.quarters - Math.trunc(e.quarters),
    months: e.months - Math.trunc(e.months),
    weeks: e.weeks - Math.trunc(e.weeks),
    days: e.days - Math.trunc(e.days),
    hours: e.hours,
    minutes: e.minutes,
    seconds: e.seconds,
    milliseconds: e.milliseconds
  }).as("milliseconds"), a = e2(s);
  let [l, u] = $z(a, n, t.zone);
  return o !== 0 && (l += o, u = t.zone.offset(l)), { ts: l, o: u };
}
function Ed(t, e, n, i, r, s) {
  const { setZone: o, zone: a } = n;
  if (t && Object.keys(t).length !== 0 || e) {
    const l = e || a, u = ht.fromObject(t, {
      ...n,
      zone: l,
      specificOffset: s
    });
    return o ? u : u.setZone(a);
  } else
    return ht.invalid(
      new Po("unparsable", `the input "${r}" can't be parsed as ${i}`)
    );
}
function ob(t, e, n = !0) {
  return t.isValid ? $r.create(Gt.create("en-US"), {
    allowZ: n,
    forceSimple: !0
  }).formatDateTimeFromString(t, e) : null;
}
function B3(t, e) {
  const n = t.c.year > 9999 || t.c.year < 0;
  let i = "";
  return n && t.c.year >= 0 && (i += "+"), i += yi(t.c.year, n ? 6 : 4), e ? (i += "-", i += yi(t.c.month), i += "-", i += yi(t.c.day)) : (i += yi(t.c.month), i += yi(t.c.day)), i;
}
function iN(t, e, n, i, r, s) {
  let o = yi(t.c.hour);
  return e ? (o += ":", o += yi(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += ":")) : o += yi(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += yi(t.c.second), (t.c.millisecond !== 0 || !i) && (o += ".", o += yi(t.c.millisecond, 3))), r && (t.isOffsetFixed && t.offset === 0 && !s ? o += "Z" : t.o < 0 ? (o += "-", o += yi(Math.trunc(-t.o / 60)), o += ":", o += yi(Math.trunc(-t.o % 60))) : (o += "+", o += yi(Math.trunc(t.o / 60)), o += ":", o += yi(Math.trunc(t.o % 60)))), s && (o += "[" + t.zone.ianaName + "]"), o;
}
const Mz = {
  month: 1,
  day: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, Tfe = {
  weekNumber: 1,
  weekday: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, $fe = {
  ordinal: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, Nz = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Mfe = [
  "weekYear",
  "weekNumber",
  "weekday",
  "hour",
  "minute",
  "second",
  "millisecond"
], Nfe = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
function Afe(t) {
  const e = {
    year: "year",
    years: "year",
    month: "month",
    months: "month",
    day: "day",
    days: "day",
    hour: "hour",
    hours: "hour",
    minute: "minute",
    minutes: "minute",
    quarter: "quarter",
    quarters: "quarter",
    second: "second",
    seconds: "second",
    millisecond: "millisecond",
    milliseconds: "millisecond",
    weekday: "weekday",
    weekdays: "weekday",
    weeknumber: "weekNumber",
    weeksnumber: "weekNumber",
    weeknumbers: "weekNumber",
    weekyear: "weekYear",
    weekyears: "weekYear",
    ordinal: "ordinal"
  }[t.toLowerCase()];
  if (!e) throw new AB(t);
  return e;
}
function rN(t) {
  switch (t.toLowerCase()) {
    case "localweekday":
    case "localweekdays":
      return "localWeekday";
    case "localweeknumber":
    case "localweeknumbers":
      return "localWeekNumber";
    case "localweekyear":
    case "localweekyears":
      return "localWeekYear";
    default:
      return Afe(t);
  }
}
function Dfe(t) {
  return ry[t] || (iy === void 0 && (iy = ti.now()), ry[t] = t.offset(iy)), ry[t];
}
function sN(t, e) {
  const n = vu(e.zone, ti.defaultZone);
  if (!n.isValid)
    return ht.invalid(Jm(n));
  const i = Gt.fromObject(e);
  let r, s;
  if (yt(t.year))
    r = ti.now();
  else {
    for (const l of Nz)
      yt(t[l]) && (t[l] = Mz[l]);
    const o = nz(t) || iz(t);
    if (o)
      return ht.invalid(o);
    const a = Dfe(n);
    [r, s] = ny(t, a, n);
  }
  return new ht({ ts: r, zone: n, loc: i, o: s });
}
function oN(t, e, n) {
  const i = yt(n.round) ? !0 : n.round, r = (o, a) => (o = L5(o, i || n.calendary ? 0 : 2, !0), e.loc.clone(n).relFormatter(n).format(o, a)), s = (o) => n.calendary ? e.hasSame(t, o) ? 0 : e.startOf(o).diff(t.startOf(o), o).get(o) : e.diff(t, o).get(o);
  if (n.unit)
    return r(s(n.unit), n.unit);
  for (const o of n.units) {
    const a = s(o);
    if (Math.abs(a) >= 1)
      return r(a, o);
  }
  return r(t > e ? -0 : 0, n.units[n.units.length - 1]);
}
function aN(t) {
  let e = {}, n;
  return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
}
let iy, ry = {};
class ht {
  /**
   * @access private
   */
  constructor(e) {
    const n = e.zone || ti.defaultZone;
    let i = e.invalid || (Number.isNaN(e.ts) ? new Po("invalid input") : null) || (n.isValid ? null : Jm(n));
    this.ts = yt(e.ts) ? ti.now() : e.ts;
    let r = null, s = null;
    if (!i)
      if (e.old && e.old.ts === this.ts && e.old.zone.equals(n))
        [r, s] = [e.old.c, e.old.o];
      else {
        const a = Du(e.o) && !e.old ? e.o : n.offset(this.ts);
        r = sb(this.ts, a), i = Number.isNaN(r.year) ? new Po("invalid input") : null, r = i ? null : r, s = i ? null : a;
      }
    this._zone = n, this.loc = e.loc || Gt.create(), this.invalid = i, this.weekData = null, this.localWeekData = null, this.c = r, this.o = s, this.isLuxonDateTime = !0;
  }
  // CONSTRUCT
  /**
   * Create a DateTime for the current instant, in the system's time zone.
   *
   * Use Settings to override these default values if needed.
   * @example DateTime.now().toISO() //~> now in the ISO format
   * @return {DateTime}
   */
  static now() {
    return new ht({});
  }
  /**
   * Create a local DateTime
   * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used
   * @param {number} [month=1] - The month, 1-indexed
   * @param {number} [day=1] - The day of the month, 1-indexed
   * @param {number} [hour=0] - The hour of the day, in 24-hour time
   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
   * @example DateTime.local()                                  //~> now
   * @example DateTime.local({ zone: "America/New_York" })      //~> now, in US east coast time
   * @example DateTime.local(2017)                              //~> 2017-01-01T00:00:00
   * @example DateTime.local(2017, 3)                           //~> 2017-03-01T00:00:00
   * @example DateTime.local(2017, 3, 12, { locale: "fr" })     //~> 2017-03-12T00:00:00, with a French locale
   * @example DateTime.local(2017, 3, 12, 5)                    //~> 2017-03-12T05:00:00
   * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" })   //~> 2017-03-12T05:00:00, in UTC
   * @example DateTime.local(2017, 3, 12, 5, 45)                //~> 2017-03-12T05:45:00
   * @example DateTime.local(2017, 3, 12, 5, 45, 10)            //~> 2017-03-12T05:45:10
   * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765)       //~> 2017-03-12T05:45:10.765
   * @return {DateTime}
   */
  static local() {
    const [e, n] = aN(arguments), [i, r, s, o, a, l, u] = n;
    return sN({ year: i, month: r, day: s, hour: o, minute: a, second: l, millisecond: u }, e);
  }
  /**
   * Create a DateTime in UTC
   * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used
   * @param {number} [month=1] - The month, 1-indexed
   * @param {number} [day=1] - The day of the month
   * @param {number} [hour=0] - The hour of the day, in 24-hour time
   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
   * @param {Object} options - configuration options for the DateTime
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
   * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
   * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance
   * @example DateTime.utc()                                              //~> now
   * @example DateTime.utc(2017)                                          //~> 2017-01-01T00:00:00Z
   * @example DateTime.utc(2017, 3)                                       //~> 2017-03-01T00:00:00Z
   * @example DateTime.utc(2017, 3, 12)                                   //~> 2017-03-12T00:00:00Z
   * @example DateTime.utc(2017, 3, 12, 5)                                //~> 2017-03-12T05:00:00Z
   * @example DateTime.utc(2017, 3, 12, 5, 45)                            //~> 2017-03-12T05:45:00Z
   * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" })          //~> 2017-03-12T05:45:00Z with a French locale
   * @example DateTime.utc(2017, 3, 12, 5, 45, 10)                        //~> 2017-03-12T05:45:10Z
   * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale
   * @return {DateTime}
   */
  static utc() {
    const [e, n] = aN(arguments), [i, r, s, o, a, l, u] = n;
    return e.zone = Gr.utcInstance, sN({ year: i, month: r, day: s, hour: o, minute: a, second: l, millisecond: u }, e);
  }
  /**
   * Create a DateTime from a JavaScript Date object. Uses the default zone.
   * @param {Date} date - a JavaScript Date object
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @return {DateTime}
   */
  static fromJSDate(e, n = {}) {
    const i = uce(e) ? e.valueOf() : NaN;
    if (Number.isNaN(i))
      return ht.invalid("invalid input");
    const r = vu(n.zone, ti.defaultZone);
    return r.isValid ? new ht({
      ts: i,
      zone: r,
      loc: Gt.fromObject(n)
    }) : ht.invalid(Jm(r));
  }
  /**
   * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
   * @param {number} milliseconds - a number of milliseconds since 1970 UTC
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
   * @return {DateTime}
   */
  static fromMillis(e, n = {}) {
    if (Du(e))
      return e < -tN || e > tN ? ht.invalid("Timestamp out of range") : new ht({
        ts: e,
        zone: vu(n.zone, ti.defaultZone),
        loc: Gt.fromObject(n)
      });
    throw new Sr(
      `fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
    );
  }
  /**
   * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
   * @param {number} seconds - a number of seconds since 1970 UTC
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
   * @return {DateTime}
   */
  static fromSeconds(e, n = {}) {
    if (Du(e))
      return new ht({
        ts: e * 1e3,
        zone: vu(n.zone, ti.defaultZone),
        loc: Gt.fromObject(n)
      });
    throw new Sr("fromSeconds requires a numerical input");
  }
  /**
   * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
   * @param {Object} obj - the object to create the DateTime from
   * @param {number} obj.year - a year, such as 1987
   * @param {number} obj.month - a month, 1-12
   * @param {number} obj.day - a day of the month, 1-31, depending on the month
   * @param {number} obj.ordinal - day of the year, 1-365 or 366
   * @param {number} obj.weekYear - an ISO week year
   * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year
   * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday
   * @param {number} obj.localWeekYear - a week year, according to the locale
   * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale
   * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale
   * @param {number} obj.hour - hour of the day, 0-23
   * @param {number} obj.minute - minute of the hour, 0-59
   * @param {number} obj.second - second of the minute, 0-59
   * @param {number} obj.millisecond - millisecond of the second, 0-999
   * @param {Object} opts - options for creating this DateTime
   * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()
   * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
   * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })
   * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'
   * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26'
   * @return {DateTime}
   */
  static fromObject(e, n = {}) {
    e = e || {};
    const i = vu(n.zone, ti.defaultZone);
    if (!i.isValid)
      return ht.invalid(Jm(i));
    const r = Gt.fromObject(n), s = fw(e, rN), { minDaysInFirstWeek: o, startOfWeek: a } = U7(s, r), l = ti.now(), u = yt(n.specificOffset) ? i.offset(l) : n.specificOffset, f = !yt(s.ordinal), d = !yt(s.year), h = !yt(s.month) || !yt(s.day), m = d || h, g = s.weekYear || s.weekNumber;
    if ((m || f) && g)
      throw new Gd(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    if (h && f)
      throw new Gd("Can't mix ordinal dates with month/day");
    const w = g || s.weekday && !m;
    let x, _, S = sb(l, u);
    w ? (x = Mfe, _ = Tfe, S = uw(S, o, a)) : f ? (x = Nfe, _ = $fe, S = I3(S)) : (x = Nz, _ = Mz);
    let C = !1;
    for (const Z of x) {
      const L = s[Z];
      yt(L) ? C ? s[Z] = _[Z] : s[Z] = S[Z] : C = !0;
    }
    const E = w ? oce(s, o, a) : f ? ace(s) : nz(s), M = E || iz(s);
    if (M)
      return ht.invalid(M);
    const $ = w ? H7(s, o, a) : f ? Q7(s) : s, [P, W] = ny($, u, i), z = new ht({
      ts: P,
      zone: i,
      o: W,
      loc: r
    });
    return s.weekday && m && e.weekday !== z.weekday ? ht.invalid(
      "mismatched weekday",
      `you can't specify both a weekday of ${s.weekday} and a date of ${z.toISO()}`
    ) : z.isValid ? z : ht.invalid(z.invalid);
  }
  /**
   * Create a DateTime from an ISO 8601 string
   * @param {string} text - the ISO string
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
   * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
   * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromISO('2016-05-25T09:08:34.123')
   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
   * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})
   * @example DateTime.fromISO('2016-W05-4')
   * @return {DateTime}
   */
  static fromISO(e, n = {}) {
    const [i, r] = Kce(e);
    return Ed(i, r, n, "ISO 8601", e);
  }
  /**
   * Create a DateTime from an RFC 2822 string
   * @param {string} text - the RFC 2822 string
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
   * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
   * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
   * @return {DateTime}
   */
  static fromRFC2822(e, n = {}) {
    const [i, r] = Jce(e);
    return Ed(i, r, n, "RFC 2822", e);
  }
  /**
   * Create a DateTime from an HTTP header date
   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
   * @param {string} text - the HTTP header date
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
   * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
   * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
   * @example DateTime.fromHTTP('Sun Nov  6 08:49:37 1994')
   * @return {DateTime}
   */
  static fromHTTP(e, n = {}) {
    const [i, r] = efe(e);
    return Ed(i, r, n, "HTTP", n);
  }
  /**
   * Create a DateTime from an input string and format string.
   * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).
   * @param {string} text - the string to parse
   * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @return {DateTime}
   */
  static fromFormat(e, n, i = {}) {
    if (yt(e) || yt(n))
      throw new Sr("fromFormat requires an input string and a format");
    const { locale: r = null, numberingSystem: s = null } = i, o = Gt.fromOpts({
      locale: r,
      numberingSystem: s,
      defaultToEN: !0
    }), [a, l, u, f] = Efe(o, e, n);
    return f ? ht.invalid(f) : Ed(a, l, i, `format ${n}`, e, u);
  }
  /**
   * @deprecated use fromFormat instead
   */
  static fromString(e, n, i = {}) {
    return ht.fromFormat(e, n, i);
  }
  /**
   * Create a DateTime from a SQL date, time, or datetime
   * Defaults to en-US if no locale has been specified, regardless of the system's locale
   * @param {string} text - the string to parse
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @example DateTime.fromSQL('2017-05-15')
   * @example DateTime.fromSQL('2017-05-15 09:12:34')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })
   * @example DateTime.fromSQL('09:12:34.342')
   * @return {DateTime}
   */
  static fromSQL(e, n = {}) {
    const [i, r] = afe(e);
    return Ed(i, r, n, "SQL", e);
  }
  /**
   * Create an invalid DateTime.
   * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {DateTime}
   */
  static invalid(e, n = null) {
    if (!e)
      throw new Sr("need to specify a reason the DateTime is invalid");
    const i = e instanceof Po ? e : new Po(e, n);
    if (ti.throwOnInvalid)
      throw new Due(i);
    return new ht({ invalid: i });
  }
  /**
   * Check if an object is an instance of DateTime. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */
  static isDateTime(e) {
    return e && e.isLuxonDateTime || !1;
  }
  /**
   * Produce the format string for a set of options
   * @param formatOpts
   * @param localeOpts
   * @returns {string}
   */
  static parseFormatForOpts(e, n = {}) {
    const i = Tz(e, Gt.fromObject(n));
    return i ? i.map((r) => r ? r.val : null).join("") : null;
  }
  /**
   * Produce the the fully expanded format token for the locale
   * Does NOT quote characters, so quoted tokens will not round trip correctly
   * @param fmt
   * @param localeOpts
   * @returns {string}
   */
  static expandFormat(e, n = {}) {
    return Sz($r.parseFormat(e), Gt.fromObject(n)).map((r) => r.val).join("");
  }
  static resetCache() {
    iy = void 0, ry = {};
  }
  // INFO
  /**
   * Get the value of unit.
   * @param {string} unit - a unit such as 'minute' or 'day'
   * @example DateTime.local(2017, 7, 4).get('month'); //=> 7
   * @example DateTime.local(2017, 7, 4).get('day'); //=> 4
   * @return {number}
   */
  get(e) {
    return this[e];
  }
  /**
   * Returns whether the DateTime is valid. Invalid DateTimes occur when:
   * * The DateTime was created from invalid calendar information, such as the 13th month or February 30
   * * The DateTime was created by an operation on another invalid date
   * @type {boolean}
   */
  get isValid() {
    return this.invalid === null;
  }
  /**
   * Returns an error code if this DateTime is invalid, or null if the DateTime is valid
   * @type {string}
   */
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  /**
   * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid
   * @type {string}
   */
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  /**
   * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime
   *
   * @type {string}
   */
  get locale() {
    return this.isValid ? this.loc.locale : null;
  }
  /**
   * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime
   *
   * @type {string}
   */
  get numberingSystem() {
    return this.isValid ? this.loc.numberingSystem : null;
  }
  /**
   * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime
   *
   * @type {string}
   */
  get outputCalendar() {
    return this.isValid ? this.loc.outputCalendar : null;
  }
  /**
   * Get the time zone associated with this DateTime.
   * @type {Zone}
   */
  get zone() {
    return this._zone;
  }
  /**
   * Get the name of the time zone.
   * @type {string}
   */
  get zoneName() {
    return this.isValid ? this.zone.name : null;
  }
  /**
   * Get the year
   * @example DateTime.local(2017, 5, 25).year //=> 2017
   * @type {number}
   */
  get year() {
    return this.isValid ? this.c.year : NaN;
  }
  /**
   * Get the quarter
   * @example DateTime.local(2017, 5, 25).quarter //=> 2
   * @type {number}
   */
  get quarter() {
    return this.isValid ? Math.ceil(this.c.month / 3) : NaN;
  }
  /**
   * Get the month (1-12).
   * @example DateTime.local(2017, 5, 25).month //=> 5
   * @type {number}
   */
  get month() {
    return this.isValid ? this.c.month : NaN;
  }
  /**
   * Get the day of the month (1-30ish).
   * @example DateTime.local(2017, 5, 25).day //=> 25
   * @type {number}
   */
  get day() {
    return this.isValid ? this.c.day : NaN;
  }
  /**
   * Get the hour of the day (0-23).
   * @example DateTime.local(2017, 5, 25, 9).hour //=> 9
   * @type {number}
   */
  get hour() {
    return this.isValid ? this.c.hour : NaN;
  }
  /**
   * Get the minute of the hour (0-59).
   * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30
   * @type {number}
   */
  get minute() {
    return this.isValid ? this.c.minute : NaN;
  }
  /**
   * Get the second of the minute (0-59).
   * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52
   * @type {number}
   */
  get second() {
    return this.isValid ? this.c.second : NaN;
  }
  /**
   * Get the millisecond of the second (0-999).
   * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654
   * @type {number}
   */
  get millisecond() {
    return this.isValid ? this.c.millisecond : NaN;
  }
  /**
   * Get the week year
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2014, 12, 31).weekYear //=> 2015
   * @type {number}
   */
  get weekYear() {
    return this.isValid ? j3(this).weekYear : NaN;
  }
  /**
   * Get the week number of the week year (1-52ish).
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2017, 5, 25).weekNumber //=> 21
   * @type {number}
   */
  get weekNumber() {
    return this.isValid ? j3(this).weekNumber : NaN;
  }
  /**
   * Get the day of the week.
   * 1 is Monday and 7 is Sunday
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2014, 11, 31).weekday //=> 4
   * @type {number}
   */
  get weekday() {
    return this.isValid ? j3(this).weekday : NaN;
  }
  /**
   * Returns true if this date is on a weekend according to the locale, false otherwise
   * @returns {boolean}
   */
  get isWeekend() {
    return this.isValid && this.loc.getWeekendDays().includes(this.weekday);
  }
  /**
   * Get the day of the week according to the locale.
   * 1 is the first day of the week and 7 is the last day of the week.
   * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,
   * @returns {number}
   */
  get localWeekday() {
    return this.isValid ? F3(this).weekday : NaN;
  }
  /**
   * Get the week number of the week year according to the locale. Different locales assign week numbers differently,
   * because the week can start on different days of the week (see localWeekday) and because a different number of days
   * is required for a week to count as the first week of a year.
   * @returns {number}
   */
  get localWeekNumber() {
    return this.isValid ? F3(this).weekNumber : NaN;
  }
  /**
   * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)
   * differently, see localWeekNumber.
   * @returns {number}
   */
  get localWeekYear() {
    return this.isValid ? F3(this).weekYear : NaN;
  }
  /**
   * Get the ordinal (meaning the day of the year)
   * @example DateTime.local(2017, 5, 25).ordinal //=> 145
   * @type {number|DateTime}
   */
  get ordinal() {
    return this.isValid ? I3(this.c).ordinal : NaN;
  }
  /**
   * Get the human readable short month name, such as 'Oct'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).monthShort //=> Oct
   * @type {string}
   */
  get monthShort() {
    return this.isValid ? ib.months("short", { locObj: this.loc })[this.month - 1] : null;
  }
  /**
   * Get the human readable long month name, such as 'October'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).monthLong //=> October
   * @type {string}
   */
  get monthLong() {
    return this.isValid ? ib.months("long", { locObj: this.loc })[this.month - 1] : null;
  }
  /**
   * Get the human readable short weekday, such as 'Mon'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon
   * @type {string}
   */
  get weekdayShort() {
    return this.isValid ? ib.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
  }
  /**
   * Get the human readable long weekday, such as 'Monday'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday
   * @type {string}
   */
  get weekdayLong() {
    return this.isValid ? ib.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
  }
  /**
   * Get the UTC offset of this DateTime in minutes
   * @example DateTime.now().offset //=> -240
   * @example DateTime.utc().offset //=> 0
   * @type {number}
   */
  get offset() {
    return this.isValid ? +this.o : NaN;
  }
  /**
   * Get the short human name for the zone's current offset, for example "EST" or "EDT".
   * Defaults to the system's locale if no locale has been specified
   * @type {string}
   */
  get offsetNameShort() {
    return this.isValid ? this.zone.offsetName(this.ts, {
      format: "short",
      locale: this.locale
    }) : null;
  }
  /**
   * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time".
   * Defaults to the system's locale if no locale has been specified
   * @type {string}
   */
  get offsetNameLong() {
    return this.isValid ? this.zone.offsetName(this.ts, {
      format: "long",
      locale: this.locale
    }) : null;
  }
  /**
   * Get whether this zone's offset ever changes, as in a DST.
   * @type {boolean}
   */
  get isOffsetFixed() {
    return this.isValid ? this.zone.isUniversal : null;
  }
  /**
   * Get whether the DateTime is in a DST.
   * @type {boolean}
   */
  get isInDST() {
    return this.isOffsetFixed ? !1 : this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset;
  }
  /**
   * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC
   * in this DateTime's zone. During DST changes local time can be ambiguous, for example
   * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.
   * This method will return both possible DateTimes if this DateTime's local time is ambiguous.
   * @returns {DateTime[]}
   */
  getPossibleOffsets() {
    if (!this.isValid || this.isOffsetFixed)
      return [this];
    const e = 864e5, n = 6e4, i = e2(this.c), r = this.zone.offset(i - e), s = this.zone.offset(i + e), o = this.zone.offset(i - r * n), a = this.zone.offset(i - s * n);
    if (o === a)
      return [this];
    const l = i - o * n, u = i - a * n, f = sb(l, o), d = sb(u, a);
    return f.hour === d.hour && f.minute === d.minute && f.second === d.second && f.millisecond === d.millisecond ? [Dc(this, { ts: l }), Dc(this, { ts: u })] : [this];
  }
  /**
   * Returns true if this DateTime is in a leap year, false otherwise
   * @example DateTime.local(2016).isInLeapYear //=> true
   * @example DateTime.local(2013).isInLeapYear //=> false
   * @type {boolean}
   */
  get isInLeapYear() {
    return c1(this.year);
  }
  /**
   * Returns the number of days in this DateTime's month
   * @example DateTime.local(2016, 2).daysInMonth //=> 29
   * @example DateTime.local(2016, 3).daysInMonth //=> 31
   * @type {number}
   */
  get daysInMonth() {
    return cw(this.year, this.month);
  }
  /**
   * Returns the number of days in this DateTime's year
   * @example DateTime.local(2016).daysInYear //=> 366
   * @example DateTime.local(2013).daysInYear //=> 365
   * @type {number}
   */
  get daysInYear() {
    return this.isValid ? uh(this.year) : NaN;
  }
  /**
   * Returns the number of weeks in this DateTime's year
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2004).weeksInWeekYear //=> 53
   * @example DateTime.local(2013).weeksInWeekYear //=> 52
   * @type {number}
   */
  get weeksInWeekYear() {
    return this.isValid ? r0(this.weekYear) : NaN;
  }
  /**
   * Returns the number of weeks in this DateTime's local week year
   * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52
   * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53
   * @type {number}
   */
  get weeksInLocalWeekYear() {
    return this.isValid ? r0(
      this.localWeekYear,
      this.loc.getMinDaysInFirstWeek(),
      this.loc.getStartOfWeek()
    ) : NaN;
  }
  /**
   * Returns the resolved Intl options for this DateTime.
   * This is useful in understanding the behavior of formatting methods
   * @param {Object} opts - the same options as toLocaleString
   * @return {Object}
   */
  resolvedLocaleOptions(e = {}) {
    const { locale: n, numberingSystem: i, calendar: r } = $r.create(
      this.loc.clone(e),
      e
    ).resolvedOptions(this);
    return { locale: n, numberingSystem: i, outputCalendar: r };
  }
  // TRANSFORM
  /**
   * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
   *
   * Equivalent to {@link DateTime#setZone}('utc')
   * @param {number} [offset=0] - optionally, an offset from UTC in minutes
   * @param {Object} [opts={}] - options to pass to `setZone()`
   * @return {DateTime}
   */
  toUTC(e = 0, n = {}) {
    return this.setZone(Gr.instance(e), n);
  }
  /**
   * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
   *
   * Equivalent to `setZone('local')`
   * @return {DateTime}
   */
  toLocal() {
    return this.setZone(ti.defaultZone);
  }
  /**
   * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
   *
   * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
   * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
   * @param {Object} opts - options
   * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
   * @return {DateTime}
   */
  setZone(e, { keepLocalTime: n = !1, keepCalendarTime: i = !1 } = {}) {
    if (e = vu(e, ti.defaultZone), e.equals(this.zone))
      return this;
    if (e.isValid) {
      let r = this.ts;
      if (n || i) {
        const s = e.offset(this.ts), o = this.toObject();
        [r] = ny(o, s, e);
      }
      return Dc(this, { ts: r, zone: e });
    } else
      return ht.invalid(Jm(e));
  }
  /**
   * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
   * @param {Object} properties - the properties to set
   * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })
   * @return {DateTime}
   */
  reconfigure({ locale: e, numberingSystem: n, outputCalendar: i } = {}) {
    const r = this.loc.clone({ locale: e, numberingSystem: n, outputCalendar: i });
    return Dc(this, { loc: r });
  }
  /**
   * "Set" the locale. Returns a newly-constructed DateTime.
   * Just a convenient alias for reconfigure({ locale })
   * @example DateTime.local(2017, 5, 25).setLocale('en-GB')
   * @return {DateTime}
   */
  setLocale(e) {
    return this.reconfigure({ locale: e });
  }
  /**
   * "Set" the values of specified units. Returns a newly-constructed DateTime.
   * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
   *
   * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.
   * They cannot be mixed with ISO-week units like `weekday`.
   * @param {Object} values - a mapping of units to numbers
   * @example dt.set({ year: 2017 })
   * @example dt.set({ hour: 8, minute: 30 })
   * @example dt.set({ weekday: 5 })
   * @example dt.set({ year: 2005, ordinal: 234 })
   * @return {DateTime}
   */
  set(e) {
    if (!this.isValid) return this;
    const n = fw(e, rN), { minDaysInFirstWeek: i, startOfWeek: r } = U7(n, this.loc), s = !yt(n.weekYear) || !yt(n.weekNumber) || !yt(n.weekday), o = !yt(n.ordinal), a = !yt(n.year), l = !yt(n.month) || !yt(n.day), u = a || l, f = n.weekYear || n.weekNumber;
    if ((u || o) && f)
      throw new Gd(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    if (l && o)
      throw new Gd("Can't mix ordinal dates with month/day");
    let d;
    s ? d = H7(
      { ...uw(this.c, i, r), ...n },
      i,
      r
    ) : yt(n.ordinal) ? (d = { ...this.toObject(), ...n }, yt(n.day) && (d.day = Math.min(cw(d.year, d.month), d.day))) : d = Q7({ ...I3(this.c), ...n });
    const [h, m] = ny(d, this.o, this.zone);
    return Dc(this, { ts: h, o: m });
  }
  /**
   * Add a period of time to this DateTime and return the resulting DateTime
   *
   * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.
   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @example DateTime.now().plus(123) //~> in 123 milliseconds
   * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes
   * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow
   * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday
   * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min
   * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min
   * @return {DateTime}
   */
  plus(e) {
    if (!this.isValid) return this;
    const n = Ht.fromDurationLike(e);
    return Dc(this, nN(this, n));
  }
  /**
   * Subtract a period of time to this DateTime and return the resulting DateTime
   * See {@link DateTime#plus}
   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   @return {DateTime}
   */
  minus(e) {
    if (!this.isValid) return this;
    const n = Ht.fromDurationLike(e).negate();
    return Dc(this, nN(this, n));
  }
  /**
   * "Set" this DateTime to the beginning of a unit of time.
   * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
   * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'
   * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'
   * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays
   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'
   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'
   * @return {DateTime}
   */
  startOf(e, { useLocaleWeeks: n = !1 } = {}) {
    if (!this.isValid) return this;
    const i = {}, r = Ht.normalizeUnit(e);
    switch (r) {
      case "years":
        i.month = 1;
      case "quarters":
      case "months":
        i.day = 1;
      case "weeks":
      case "days":
        i.hour = 0;
      case "hours":
        i.minute = 0;
      case "minutes":
        i.second = 0;
      case "seconds":
        i.millisecond = 0;
        break;
    }
    if (r === "weeks")
      if (n) {
        const s = this.loc.getStartOfWeek(), { weekday: o } = this;
        o < s && (i.weekNumber = this.weekNumber - 1), i.weekday = s;
      } else
        i.weekday = 1;
    if (r === "quarters") {
      const s = Math.ceil(this.month / 3);
      i.month = (s - 1) * 3 + 1;
    }
    return this.set(i);
  }
  /**
   * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time
   * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
   * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays
   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'
   * @return {DateTime}
   */
  endOf(e, n) {
    return this.isValid ? this.plus({ [e]: 1 }).startOf(e, n).minus(1) : this;
  }
  // OUTPUT
  /**
   * Returns a string representation of this DateTime formatted according to the specified format string.
   * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
   * Defaults to en-US if no locale has been specified, regardless of the system's locale.
   * @param {string} fmt - the format string
   * @param {Object} opts - opts to override the configuration options on this DateTime
   * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'
   * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'
   * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22'
   * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes'
   * @return {string}
   */
  toFormat(e, n = {}) {
    return this.isValid ? $r.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) : R3;
  }
  /**
   * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
   * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation
   * of the DateTime in the assigned locale.
   * Defaults to the system's locale if no locale has been specified
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options
   * @param {Object} opts - opts to override the configuration options on this DateTime
   * @example DateTime.now().toLocaleString(); //=> 4/20/2017
   * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'
   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'
   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'
   * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'
   * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'
   * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'
   * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'
   * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
   * @return {string}
   */
  toLocaleString(e = lw, n = {}) {
    return this.isValid ? $r.create(this.loc.clone(n), e).formatDateTime(this) : R3;
  }
  /**
   * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
   * Defaults to the system's locale if no locale has been specified
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts
   * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.
   * @example DateTime.now().toLocaleParts(); //=> [
   *                                   //=>   { type: 'day', value: '25' },
   *                                   //=>   { type: 'literal', value: '/' },
   *                                   //=>   { type: 'month', value: '05' },
   *                                   //=>   { type: 'literal', value: '/' },
   *                                   //=>   { type: 'year', value: '1982' }
   *                                   //=> ]
   */
  toLocaleParts(e = {}) {
    return this.isValid ? $r.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.extendedZone=false] - add the time zone format extension
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
   * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
   * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
   * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
   * @return {string}
   */
  toISO({
    format: e = "extended",
    suppressSeconds: n = !1,
    suppressMilliseconds: i = !1,
    includeOffset: r = !0,
    extendedZone: s = !1
  } = {}) {
    if (!this.isValid)
      return null;
    const o = e === "extended";
    let a = B3(this, o);
    return a += "T", a += iN(this, o, n, i, r, s), a;
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime's date component
   * @param {Object} opts - options
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'
   * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'
   * @return {string}
   */
  toISODate({ format: e = "extended" } = {}) {
    return this.isValid ? B3(this, e === "extended") : null;
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime's week date
   * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'
   * @return {string}
   */
  toISOWeekDate() {
    return ob(this, "kkkk-'W'WW-c");
  }
  /**
   * Returns an ISO 8601-compliant string representation of this DateTime's time component
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.extendedZone=true] - add the time zone format extension
   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'
   * @return {string}
   */
  toISOTime({
    suppressMilliseconds: e = !1,
    suppressSeconds: n = !1,
    includeOffset: i = !0,
    includePrefix: r = !1,
    extendedZone: s = !1,
    format: o = "extended"
  } = {}) {
    return this.isValid ? (r ? "T" : "") + iN(
      this,
      o === "extended",
      n,
      e,
      i,
      s
    ) : null;
  }
  /**
   * Returns an RFC 2822-compatible string representation of this DateTime
   * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
   * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
   * @return {string}
   */
  toRFC2822() {
    return ob(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
   * Specifically, the string conforms to RFC 1123.
   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
   * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
   * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'
   * @return {string}
   */
  toHTTP() {
    return ob(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in SQL Date
   * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'
   * @return {string}
   */
  toSQLDate() {
    return this.isValid ? B3(this, !0) : null;
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in SQL Time
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
   * @example DateTime.utc().toSQL() //=> '05:15:16.345'
   * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'
   * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'
   * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'
   * @return {string}
   */
  toSQLTime({ includeOffset: e = !0, includeZone: n = !1, includeOffsetSpace: i = !0 } = {}) {
    let r = "HH:mm:ss.SSS";
    return (n || e) && (i && (r += " "), n ? r += "z" : e && (r += "ZZ")), ob(this, r, !0);
  }
  /**
   * Returns a string representation of this DateTime appropriate for use in SQL DateTime
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
   * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'
   * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'
   * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'
   * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'
   * @return {string}
   */
  toSQL(e = {}) {
    return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null;
  }
  /**
   * Returns a string representation of this DateTime appropriate for debugging
   * @return {string}
   */
  toString() {
    return this.isValid ? this.toISO() : R3;
  }
  /**
   * Returns a string representation of this DateTime appropriate for the REPL.
   * @return {string}
   */
  [Symbol.for("nodejs.util.inspect.custom")]() {
    return this.isValid ? `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }` : `DateTime { Invalid, reason: ${this.invalidReason} }`;
  }
  /**
   * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
   * @return {number}
   */
  valueOf() {
    return this.toMillis();
  }
  /**
   * Returns the epoch milliseconds of this DateTime.
   * @return {number}
   */
  toMillis() {
    return this.isValid ? this.ts : NaN;
  }
  /**
   * Returns the epoch seconds of this DateTime.
   * @return {number}
   */
  toSeconds() {
    return this.isValid ? this.ts / 1e3 : NaN;
  }
  /**
   * Returns the epoch seconds (as a whole number) of this DateTime.
   * @return {number}
   */
  toUnixInteger() {
    return this.isValid ? Math.floor(this.ts / 1e3) : NaN;
  }
  /**
   * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.
   * @return {string}
   */
  toJSON() {
    return this.toISO();
  }
  /**
   * Returns a BSON serializable equivalent to this DateTime.
   * @return {Date}
   */
  toBSON() {
    return this.toJSDate();
  }
  /**
   * Returns a JavaScript object with this DateTime's year, month, day, and so on.
   * @param opts - options for generating the object
   * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output
   * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }
   * @return {Object}
   */
  toObject(e = {}) {
    if (!this.isValid) return {};
    const n = { ...this.c };
    return e.includeConfig && (n.outputCalendar = this.outputCalendar, n.numberingSystem = this.loc.numberingSystem, n.locale = this.loc.locale), n;
  }
  /**
   * Returns a JavaScript Date equivalent to this DateTime.
   * @return {Date}
   */
  toJSDate() {
    return new Date(this.isValid ? this.ts : NaN);
  }
  // COMPARE
  /**
   * Return the difference between two DateTimes as a Duration.
   * @param {DateTime} otherDateTime - the DateTime to compare this one to
   * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @example
   * var i1 = DateTime.fromISO('1982-05-25T09:45'),
   *     i2 = DateTime.fromISO('1983-10-14T10:30');
   * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }
   * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }
   * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }
   * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }
   * @return {Duration}
   */
  diff(e, n = "milliseconds", i = {}) {
    if (!this.isValid || !e.isValid)
      return Ht.invalid("created by diffing an invalid DateTime");
    const r = { locale: this.locale, numberingSystem: this.numberingSystem, ...i }, s = cce(n).map(Ht.normalizeUnit), o = e.valueOf() > this.valueOf(), a = o ? this : e, l = o ? e : this, u = pfe(a, l, s, r);
    return o ? u.negate() : u;
  }
  /**
   * Return the difference between this DateTime and right now.
   * See {@link DateTime#diff}
   * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @return {Duration}
   */
  diffNow(e = "milliseconds", n = {}) {
    return this.diff(ht.now(), e, n);
  }
  /**
   * Return an Interval spanning between this DateTime and another DateTime
   * @param {DateTime} otherDateTime - the other end point of the Interval
   * @return {Interval}
   */
  until(e) {
    return this.isValid ? ei.fromDateTimes(this, e) : this;
  }
  /**
   * Return whether this DateTime is in the same unit of time as another DateTime.
   * Higher-order units must also be identical for this function to return `true`.
   * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
   * @param {DateTime} otherDateTime - the other DateTime
   * @param {string} unit - the unit of time to check sameness on
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used
   * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
   * @return {boolean}
   */
  hasSame(e, n, i) {
    if (!this.isValid) return !1;
    const r = e.valueOf(), s = this.setZone(e.zone, { keepLocalTime: !0 });
    return s.startOf(n, i) <= r && r <= s.endOf(n, i);
  }
  /**
   * Equality check
   * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.
   * To compare just the millisecond values, use `+dt1 === +dt2`.
   * @param {DateTime} other - the other DateTime
   * @return {boolean}
   */
  equals(e) {
    return this.isValid && e.isValid && this.valueOf() === e.valueOf() && this.zone.equals(e.zone) && this.loc.equals(e.loc);
  }
  /**
   * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your
   * platform supports Intl.RelativeTimeFormat. Rounds down by default.
   * @param {Object} options - options that affect the output
   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
   * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow"
   * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds"
   * @param {boolean} [options.round=true] - whether to round the numbers in the output.
   * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.
   * @param {string} options.locale - override the locale of this DateTime
   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
   * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day"
   * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día"
   * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures"
   * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago"
   * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago"
   * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago"
   */
  toRelative(e = {}) {
    if (!this.isValid) return null;
    const n = e.base || ht.fromObject({}, { zone: this.zone }), i = e.padding ? this < n ? -e.padding : e.padding : 0;
    let r = ["years", "months", "days", "hours", "minutes", "seconds"], s = e.unit;
    return Array.isArray(e.unit) && (r = e.unit, s = void 0), oN(n, this.plus(i), {
      ...e,
      numeric: "always",
      units: r,
      unit: s
    });
  }
  /**
   * Returns a string representation of this date relative to today, such as "yesterday" or "next month".
   * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.
   * @param {Object} options - options that affect the output
   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
   * @param {string} options.locale - override the locale of this DateTime
   * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days"
   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow"
   * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana"
   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain"
   * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
   */
  toRelativeCalendar(e = {}) {
    return this.isValid ? oN(e.base || ht.fromObject({}, { zone: this.zone }), this, {
      ...e,
      numeric: "auto",
      units: ["years", "months", "days"],
      calendary: !0
    }) : null;
  }
  /**
   * Return the min of several date times
   * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum
   * @return {DateTime} the min DateTime, or undefined if called with no argument
   */
  static min(...e) {
    if (!e.every(ht.isDateTime))
      throw new Sr("min requires all arguments be DateTimes");
    return Z7(e, (n) => n.valueOf(), Math.min);
  }
  /**
   * Return the max of several date times
   * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum
   * @return {DateTime} the max DateTime, or undefined if called with no argument
   */
  static max(...e) {
    if (!e.every(ht.isDateTime))
      throw new Sr("max requires all arguments be DateTimes");
    return Z7(e, (n) => n.valueOf(), Math.max);
  }
  // MISC
  /**
   * Explain how a string would be parsed by fromFormat()
   * @param {string} text - the string to parse
   * @param {string} fmt - the format the string is expected to be in (see description)
   * @param {Object} options - options taken by fromFormat()
   * @return {Object}
   */
  static fromFormatExplain(e, n, i = {}) {
    const { locale: r = null, numberingSystem: s = null } = i, o = Gt.fromOpts({
      locale: r,
      numberingSystem: s,
      defaultToEN: !0
    });
    return Ez(o, e, n);
  }
  /**
   * @deprecated use fromFormatExplain instead
   */
  static fromStringExplain(e, n, i = {}) {
    return ht.fromFormatExplain(e, n, i);
  }
  /**
   * Build a parser for `fmt` using the given locale. This parser can be passed
   * to {@link DateTime.fromFormatParser} to a parse a date in this format. This
   * can be used to optimize cases where many dates need to be parsed in a
   * specific format.
   *
   * @param {String} fmt - the format the string is expected to be in (see
   * description)
   * @param {Object} options - options used to set locale and numberingSystem
   * for parser
   * @returns {TokenParser} - opaque object to be used
   */
  static buildFormatParser(e, n = {}) {
    const { locale: i = null, numberingSystem: r = null } = n, s = Gt.fromOpts({
      locale: i,
      numberingSystem: r,
      defaultToEN: !0
    });
    return new Cz(s, e);
  }
  /**
   * Create a DateTime from an input string and format parser.
   *
   * The format parser must have been created with the same locale as this call.
   *
   * @param {String} text - the string to parse
   * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}
   * @param {Object} opts - options taken by fromFormat()
   * @returns {DateTime}
   */
  static fromFormatParser(e, n, i = {}) {
    if (yt(e) || yt(n))
      throw new Sr(
        "fromFormatParser requires an input string and a format parser"
      );
    const { locale: r = null, numberingSystem: s = null } = i, o = Gt.fromOpts({
      locale: r,
      numberingSystem: s,
      defaultToEN: !0
    });
    if (!o.equals(n.locale))
      throw new Sr(
        `fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`
      );
    const { result: a, zone: l, specificOffset: u, invalidReason: f } = n.explainFromTokens(e);
    return f ? ht.invalid(f) : Ed(
      a,
      l,
      i,
      `format ${n.format}`,
      e,
      u
    );
  }
  // FORMAT PRESETS
  /**
   * {@link DateTime#toLocaleString} format like 10/14/1983
   * @type {Object}
   */
  static get DATE_SHORT() {
    return lw;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
   * @type {Object}
   */
  static get DATE_MED() {
    return DB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
   * @type {Object}
   */
  static get DATE_MED_WITH_WEEKDAY() {
    return Lue;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983'
   * @type {Object}
   */
  static get DATE_FULL() {
    return PB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
   * @type {Object}
   */
  static get DATE_HUGE() {
    return IB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_SIMPLE() {
    return LB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_WITH_SECONDS() {
    return RB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_WITH_SHORT_OFFSET() {
    return jB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get TIME_WITH_LONG_OFFSET() {
    return FB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_SIMPLE() {
    return BB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_WITH_SECONDS() {
    return zB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_WITH_SHORT_OFFSET() {
    return WB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
   * @type {Object}
   */
  static get TIME_24_WITH_LONG_OFFSET() {
    return HB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_SHORT() {
    return QB;
  }
  /**
   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_SHORT_WITH_SECONDS() {
    return UB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_MED() {
    return ZB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_MED_WITH_SECONDS() {
    return qB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_MED_WITH_WEEKDAY() {
    return Rue;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_FULL() {
    return YB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_FULL_WITH_SECONDS() {
    return VB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_HUGE() {
    return XB;
  }
  /**
   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */
  static get DATETIME_HUGE_WITH_SECONDS() {
    return GB;
  }
}
function Cm(t) {
  if (ht.isDateTime(t))
    return t;
  if (t && t.valueOf && Du(t.valueOf()))
    return ht.fromJSDate(t);
  if (t && typeof t == "object")
    return ht.fromObject(t);
  throw new Sr(
    `Unknown datetime argument: ${t}, of type ${typeof t}`
  );
}
var Pfe = typeof on == "object" && on && on.Object === Object && on, Az = Pfe, Ife = Az, Lfe = typeof self == "object" && self && self.Object === Object && self, Rfe = Ife || Lfe || Function("return this")(), qo = Rfe, jfe = qo, Ffe = jfe.Symbol, rp = Ffe;
function Bfe(t, e) {
  var n = -1, i = t.length;
  for (e || (e = Array(i)); ++n < i; )
    e[n] = t[n];
  return e;
}
var Dz = Bfe, lN = rp, Pz = Object.prototype, zfe = Pz.hasOwnProperty, Wfe = Pz.toString, Em = lN ? lN.toStringTag : void 0;
function Hfe(t) {
  var e = zfe.call(t, Em), n = t[Em];
  try {
    t[Em] = void 0;
    var i = !0;
  } catch {
  }
  var r = Wfe.call(t);
  return i && (e ? t[Em] = n : delete t[Em]), r;
}
var Qfe = Hfe, Ufe = Object.prototype, Zfe = Ufe.toString;
function qfe(t) {
  return Zfe.call(t);
}
var Yfe = qfe, uN = rp, Vfe = Qfe, Xfe = Yfe, Gfe = "[object Null]", Kfe = "[object Undefined]", cN = uN ? uN.toStringTag : void 0;
function Jfe(t) {
  return t == null ? t === void 0 ? Kfe : Gfe : cN && cN in Object(t) ? Vfe(t) : Xfe(t);
}
var sp = Jfe;
function ede(t) {
  var e = typeof t;
  return t != null && (e == "object" || e == "function");
}
var Ll = ede, tde = sp, nde = Ll, ide = "[object AsyncFunction]", rde = "[object Function]", sde = "[object GeneratorFunction]", ode = "[object Proxy]";
function ade(t) {
  if (!nde(t))
    return !1;
  var e = tde(t);
  return e == rde || e == sde || e == ide || e == ode;
}
var Iz = ade, lde = qo, ude = lde["__core-js_shared__"], cde = ude, z3 = cde, fN = function() {
  var t = /[^.]+$/.exec(z3 && z3.keys && z3.keys.IE_PROTO || "");
  return t ? "Symbol(src)_1." + t : "";
}();
function fde(t) {
  return !!fN && fN in t;
}
var dde = fde, hde = Function.prototype, pde = hde.toString;
function mde(t) {
  if (t != null) {
    try {
      return pde.call(t);
    } catch {
    }
    try {
      return t + "";
    } catch {
    }
  }
  return "";
}
var Lz = mde, gde = Iz, vde = dde, bde = Ll, yde = Lz, wde = /[\\^$.*+?()[\]{}|]/g, kde = /^\[object .+?Constructor\]$/, xde = Function.prototype, _de = Object.prototype, Ode = xde.toString, Sde = _de.hasOwnProperty, Cde = RegExp(
  "^" + Ode.call(Sde).replace(wde, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Ede(t) {
  if (!bde(t) || vde(t))
    return !1;
  var e = gde(t) ? Cde : kde;
  return e.test(yde(t));
}
var Tde = Ede;
function $de(t, e) {
  return t == null ? void 0 : t[e];
}
var Mde = $de, Nde = Tde, Ade = Mde;
function Dde(t, e) {
  var n = Ade(t, e);
  return Nde(n) ? n : void 0;
}
var Df = Dde, Pde = Df, Ide = qo, Lde = Pde(Ide, "DataView"), Rde = Lde, jde = Df, Fde = qo, Bde = jde(Fde, "Map"), B5 = Bde, zde = Df, Wde = qo, Hde = zde(Wde, "Promise"), Qde = Hde, Ude = Df, Zde = qo, qde = Ude(Zde, "Set"), Yde = qde, Vde = Df, Xde = qo, Gde = Vde(Xde, "WeakMap"), Kde = Gde, b4 = Rde, y4 = B5, w4 = Qde, k4 = Yde, x4 = Kde, Rz = sp, op = Lz, dN = "[object Map]", Jde = "[object Object]", hN = "[object Promise]", pN = "[object Set]", mN = "[object WeakMap]", gN = "[object DataView]", ehe = op(b4), the = op(y4), nhe = op(w4), ihe = op(k4), rhe = op(x4), Rc = Rz;
(b4 && Rc(new b4(new ArrayBuffer(1))) != gN || y4 && Rc(new y4()) != dN || w4 && Rc(w4.resolve()) != hN || k4 && Rc(new k4()) != pN || x4 && Rc(new x4()) != mN) && (Rc = function(t) {
  var e = Rz(t), n = e == Jde ? t.constructor : void 0, i = n ? op(n) : "";
  if (i)
    switch (i) {
      case ehe:
        return gN;
      case the:
        return dN;
      case nhe:
        return hN;
      case ihe:
        return pN;
      case rhe:
        return mN;
    }
  return e;
});
var i2 = Rc, she = 9007199254740991;
function ohe(t) {
  return typeof t == "number" && t > -1 && t % 1 == 0 && t <= she;
}
var z5 = ohe, ahe = Iz, lhe = z5;
function uhe(t) {
  return t != null && lhe(t.length) && !ahe(t);
}
var W5 = uhe, che = Array.isArray, Rl = che;
function fhe(t) {
  return t != null && typeof t == "object";
}
var Pf = fhe, dhe = sp, hhe = Rl, phe = Pf, mhe = "[object String]";
function ghe(t) {
  return typeof t == "string" || !hhe(t) && phe(t) && dhe(t) == mhe;
}
var vhe = ghe;
function bhe(t) {
  for (var e, n = []; !(e = t.next()).done; )
    n.push(e.value);
  return n;
}
var yhe = bhe;
function whe(t) {
  var e = -1, n = Array(t.size);
  return t.forEach(function(i, r) {
    n[++e] = [r, i];
  }), n;
}
var khe = whe;
function xhe(t) {
  var e = -1, n = Array(t.size);
  return t.forEach(function(i) {
    n[++e] = i;
  }), n;
}
var _he = xhe;
function Ohe(t) {
  return t.split("");
}
var She = Ohe, Che = "\\ud800-\\udfff", Ehe = "\\u0300-\\u036f", The = "\\ufe20-\\ufe2f", $he = "\\u20d0-\\u20ff", Mhe = Ehe + The + $he, Nhe = "\\ufe0e\\ufe0f", Ahe = "\\u200d", Dhe = RegExp("[" + Ahe + Che + Mhe + Nhe + "]");
function Phe(t) {
  return Dhe.test(t);
}
var Ihe = Phe, jz = "\\ud800-\\udfff", Lhe = "\\u0300-\\u036f", Rhe = "\\ufe20-\\ufe2f", jhe = "\\u20d0-\\u20ff", Fhe = Lhe + Rhe + jhe, Bhe = "\\ufe0e\\ufe0f", zhe = "[" + jz + "]", _4 = "[" + Fhe + "]", O4 = "\\ud83c[\\udffb-\\udfff]", Whe = "(?:" + _4 + "|" + O4 + ")", Fz = "[^" + jz + "]", Bz = "(?:\\ud83c[\\udde6-\\uddff]){2}", zz = "[\\ud800-\\udbff][\\udc00-\\udfff]", Hhe = "\\u200d", Wz = Whe + "?", Hz = "[" + Bhe + "]?", Qhe = "(?:" + Hhe + "(?:" + [Fz, Bz, zz].join("|") + ")" + Hz + Wz + ")*", Uhe = Hz + Wz + Qhe, Zhe = "(?:" + [Fz + _4 + "?", _4, Bz, zz, zhe].join("|") + ")", qhe = RegExp(O4 + "(?=" + O4 + ")|" + Zhe + Uhe, "g");
function Yhe(t) {
  return t.match(qhe) || [];
}
var Vhe = Yhe, Xhe = She, Ghe = Ihe, Khe = Vhe;
function Jhe(t) {
  return Ghe(t) ? Khe(t) : Xhe(t);
}
var epe = Jhe;
function tpe(t, e) {
  for (var n = -1, i = t == null ? 0 : t.length, r = Array(i); ++n < i; )
    r[n] = e(t[n], n, t);
  return r;
}
var Qz = tpe, npe = Qz;
function ipe(t, e) {
  return npe(e, function(n) {
    return t[n];
  });
}
var rpe = ipe;
function spe(t, e) {
  for (var n = -1, i = Array(t); ++n < t; )
    i[n] = e(n);
  return i;
}
var ope = spe, ape = sp, lpe = Pf, upe = "[object Arguments]";
function cpe(t) {
  return lpe(t) && ape(t) == upe;
}
var fpe = cpe, vN = fpe, dpe = Pf, Uz = Object.prototype, hpe = Uz.hasOwnProperty, ppe = Uz.propertyIsEnumerable, mpe = vN(/* @__PURE__ */ function() {
  return arguments;
}()) ? vN : function(t) {
  return dpe(t) && hpe.call(t, "callee") && !ppe.call(t, "callee");
}, H5 = mpe, dw = { exports: {} };
function gpe() {
  return !1;
}
var vpe = gpe;
dw.exports;
(function(t, e) {
  var n = qo, i = vpe, r = e && !e.nodeType && e, s = r && !0 && t && !t.nodeType && t, o = s && s.exports === r, a = o ? n.Buffer : void 0, l = a ? a.isBuffer : void 0, u = l || i;
  t.exports = u;
})(dw, dw.exports);
var Zz = dw.exports, bpe = 9007199254740991, ype = /^(?:0|[1-9]\d*)$/;
function wpe(t, e) {
  var n = typeof t;
  return e = e ?? bpe, !!e && (n == "number" || n != "symbol" && ype.test(t)) && t > -1 && t % 1 == 0 && t < e;
}
var Q5 = wpe, kpe = sp, xpe = z5, _pe = Pf, Ope = "[object Arguments]", Spe = "[object Array]", Cpe = "[object Boolean]", Epe = "[object Date]", Tpe = "[object Error]", $pe = "[object Function]", Mpe = "[object Map]", Npe = "[object Number]", Ape = "[object Object]", Dpe = "[object RegExp]", Ppe = "[object Set]", Ipe = "[object String]", Lpe = "[object WeakMap]", Rpe = "[object ArrayBuffer]", jpe = "[object DataView]", Fpe = "[object Float32Array]", Bpe = "[object Float64Array]", zpe = "[object Int8Array]", Wpe = "[object Int16Array]", Hpe = "[object Int32Array]", Qpe = "[object Uint8Array]", Upe = "[object Uint8ClampedArray]", Zpe = "[object Uint16Array]", qpe = "[object Uint32Array]", xn = {};
xn[Fpe] = xn[Bpe] = xn[zpe] = xn[Wpe] = xn[Hpe] = xn[Qpe] = xn[Upe] = xn[Zpe] = xn[qpe] = !0;
xn[Ope] = xn[Spe] = xn[Rpe] = xn[Cpe] = xn[jpe] = xn[Epe] = xn[Tpe] = xn[$pe] = xn[Mpe] = xn[Npe] = xn[Ape] = xn[Dpe] = xn[Ppe] = xn[Ipe] = xn[Lpe] = !1;
function Ype(t) {
  return _pe(t) && xpe(t.length) && !!xn[kpe(t)];
}
var Vpe = Ype;
function Xpe(t) {
  return function(e) {
    return t(e);
  };
}
var U5 = Xpe, hw = { exports: {} };
hw.exports;
(function(t, e) {
  var n = Az, i = e && !e.nodeType && e, r = i && !0 && t && !t.nodeType && t, s = r && r.exports === i, o = s && n.process, a = function() {
    try {
      var l = r && r.require && r.require("util").types;
      return l || o && o.binding && o.binding("util");
    } catch {
    }
  }();
  t.exports = a;
})(hw, hw.exports);
var Z5 = hw.exports, Gpe = Vpe, Kpe = U5, bN = Z5, yN = bN && bN.isTypedArray, Jpe = yN ? Kpe(yN) : Gpe, eme = Jpe, tme = ope, nme = H5, ime = Rl, rme = Zz, sme = Q5, ome = eme, ame = Object.prototype, lme = ame.hasOwnProperty;
function ume(t, e) {
  var n = ime(t), i = !n && nme(t), r = !n && !i && rme(t), s = !n && !i && !r && ome(t), o = n || i || r || s, a = o ? tme(t.length, String) : [], l = a.length;
  for (var u in t)
    (e || lme.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    r && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    s && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
    sme(u, l))) && a.push(u);
  return a;
}
var qz = ume, cme = Object.prototype;
function fme(t) {
  var e = t && t.constructor, n = typeof e == "function" && e.prototype || cme;
  return t === n;
}
var q5 = fme;
function dme(t, e) {
  return function(n) {
    return t(e(n));
  };
}
var Yz = dme, hme = Yz, pme = hme(Object.keys, Object), mme = pme, gme = q5, vme = mme, bme = Object.prototype, yme = bme.hasOwnProperty;
function wme(t) {
  if (!gme(t))
    return vme(t);
  var e = [];
  for (var n in Object(t))
    yme.call(t, n) && n != "constructor" && e.push(n);
  return e;
}
var kme = wme, xme = qz, _me = kme, Ome = W5;
function Sme(t) {
  return Ome(t) ? xme(t) : _me(t);
}
var r2 = Sme, Cme = rpe, Eme = r2;
function Tme(t) {
  return t == null ? [] : Cme(t, Eme(t));
}
var $me = Tme, wN = rp, Mme = Dz, Nme = i2, Ame = W5, Dme = vhe, Pme = yhe, Ime = khe, Lme = _he, Rme = epe, jme = $me, Fme = "[object Map]", Bme = "[object Set]", W3 = wN ? wN.iterator : void 0;
function zme(t) {
  if (!t)
    return [];
  if (Ame(t))
    return Dme(t) ? Rme(t) : Mme(t);
  if (W3 && t[W3])
    return Pme(t[W3]());
  var e = Nme(t), n = e == Fme ? Ime : e == Bme ? Lme : jme;
  return n(t);
}
var Wme = zme;
const Hme = /* @__PURE__ */ Gs(Wme);
function Qme() {
  this.__data__ = [], this.size = 0;
}
var Ume = Qme;
function Zme(t, e) {
  return t === e || t !== t && e !== e;
}
var Vz = Zme, qme = Vz;
function Yme(t, e) {
  for (var n = t.length; n--; )
    if (qme(t[n][0], e))
      return n;
  return -1;
}
var s2 = Yme, Vme = s2, Xme = Array.prototype, Gme = Xme.splice;
function Kme(t) {
  var e = this.__data__, n = Vme(e, t);
  if (n < 0)
    return !1;
  var i = e.length - 1;
  return n == i ? e.pop() : Gme.call(e, n, 1), --this.size, !0;
}
var Jme = Kme, ege = s2;
function tge(t) {
  var e = this.__data__, n = ege(e, t);
  return n < 0 ? void 0 : e[n][1];
}
var nge = tge, ige = s2;
function rge(t) {
  return ige(this.__data__, t) > -1;
}
var sge = rge, oge = s2;
function age(t, e) {
  var n = this.__data__, i = oge(n, t);
  return i < 0 ? (++this.size, n.push([t, e])) : n[i][1] = e, this;
}
var lge = age, uge = Ume, cge = Jme, fge = nge, dge = sge, hge = lge;
function ap(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var i = t[e];
    this.set(i[0], i[1]);
  }
}
ap.prototype.clear = uge;
ap.prototype.delete = cge;
ap.prototype.get = fge;
ap.prototype.has = dge;
ap.prototype.set = hge;
var o2 = ap, pge = o2;
function mge() {
  this.__data__ = new pge(), this.size = 0;
}
var gge = mge;
function vge(t) {
  var e = this.__data__, n = e.delete(t);
  return this.size = e.size, n;
}
var bge = vge;
function yge(t) {
  return this.__data__.get(t);
}
var wge = yge;
function kge(t) {
  return this.__data__.has(t);
}
var xge = kge, _ge = Df, Oge = _ge(Object, "create"), a2 = Oge, kN = a2;
function Sge() {
  this.__data__ = kN ? kN(null) : {}, this.size = 0;
}
var Cge = Sge;
function Ege(t) {
  var e = this.has(t) && delete this.__data__[t];
  return this.size -= e ? 1 : 0, e;
}
var Tge = Ege, $ge = a2, Mge = "__lodash_hash_undefined__", Nge = Object.prototype, Age = Nge.hasOwnProperty;
function Dge(t) {
  var e = this.__data__;
  if ($ge) {
    var n = e[t];
    return n === Mge ? void 0 : n;
  }
  return Age.call(e, t) ? e[t] : void 0;
}
var Pge = Dge, Ige = a2, Lge = Object.prototype, Rge = Lge.hasOwnProperty;
function jge(t) {
  var e = this.__data__;
  return Ige ? e[t] !== void 0 : Rge.call(e, t);
}
var Fge = jge, Bge = a2, zge = "__lodash_hash_undefined__";
function Wge(t, e) {
  var n = this.__data__;
  return this.size += this.has(t) ? 0 : 1, n[t] = Bge && e === void 0 ? zge : e, this;
}
var Hge = Wge, Qge = Cge, Uge = Tge, Zge = Pge, qge = Fge, Yge = Hge;
function lp(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var i = t[e];
    this.set(i[0], i[1]);
  }
}
lp.prototype.clear = Qge;
lp.prototype.delete = Uge;
lp.prototype.get = Zge;
lp.prototype.has = qge;
lp.prototype.set = Yge;
var Vge = lp, xN = Vge, Xge = o2, Gge = B5;
function Kge() {
  this.size = 0, this.__data__ = {
    hash: new xN(),
    map: new (Gge || Xge)(),
    string: new xN()
  };
}
var Jge = Kge;
function e0e(t) {
  var e = typeof t;
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
var t0e = e0e, n0e = t0e;
function i0e(t, e) {
  var n = t.__data__;
  return n0e(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
}
var l2 = i0e, r0e = l2;
function s0e(t) {
  var e = r0e(this, t).delete(t);
  return this.size -= e ? 1 : 0, e;
}
var o0e = s0e, a0e = l2;
function l0e(t) {
  return a0e(this, t).get(t);
}
var u0e = l0e, c0e = l2;
function f0e(t) {
  return c0e(this, t).has(t);
}
var d0e = f0e, h0e = l2;
function p0e(t, e) {
  var n = h0e(this, t), i = n.size;
  return n.set(t, e), this.size += n.size == i ? 0 : 1, this;
}
var m0e = p0e, g0e = Jge, v0e = o0e, b0e = u0e, y0e = d0e, w0e = m0e;
function up(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var i = t[e];
    this.set(i[0], i[1]);
  }
}
up.prototype.clear = g0e;
up.prototype.delete = v0e;
up.prototype.get = b0e;
up.prototype.has = y0e;
up.prototype.set = w0e;
var Xz = up, k0e = o2, x0e = B5, _0e = Xz, O0e = 200;
function S0e(t, e) {
  var n = this.__data__;
  if (n instanceof k0e) {
    var i = n.__data__;
    if (!x0e || i.length < O0e - 1)
      return i.push([t, e]), this.size = ++n.size, this;
    n = this.__data__ = new _0e(i);
  }
  return n.set(t, e), this.size = n.size, this;
}
var C0e = S0e, E0e = o2, T0e = gge, $0e = bge, M0e = wge, N0e = xge, A0e = C0e;
function cp(t) {
  var e = this.__data__ = new E0e(t);
  this.size = e.size;
}
cp.prototype.clear = T0e;
cp.prototype.delete = $0e;
cp.prototype.get = M0e;
cp.prototype.has = N0e;
cp.prototype.set = A0e;
var D0e = cp;
function P0e(t, e) {
  for (var n = -1, i = t == null ? 0 : t.length; ++n < i && e(t[n], n, t) !== !1; )
    ;
  return t;
}
var I0e = P0e, L0e = Df, R0e = function() {
  try {
    var t = L0e(Object, "defineProperty");
    return t({}, "", {}), t;
  } catch {
  }
}(), Gz = R0e, _N = Gz;
function j0e(t, e, n) {
  e == "__proto__" && _N ? _N(t, e, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : t[e] = n;
}
var Kz = j0e, F0e = Kz, B0e = Vz, z0e = Object.prototype, W0e = z0e.hasOwnProperty;
function H0e(t, e, n) {
  var i = t[e];
  (!(W0e.call(t, e) && B0e(i, n)) || n === void 0 && !(e in t)) && F0e(t, e, n);
}
var Y5 = H0e, Q0e = Y5, U0e = Kz;
function Z0e(t, e, n, i) {
  var r = !n;
  n || (n = {});
  for (var s = -1, o = e.length; ++s < o; ) {
    var a = e[s], l = i ? i(n[a], t[a], a, n, t) : void 0;
    l === void 0 && (l = t[a]), r ? U0e(n, a, l) : Q0e(n, a, l);
  }
  return n;
}
var u2 = Z0e, q0e = u2, Y0e = r2;
function V0e(t, e) {
  return t && q0e(e, Y0e(e), t);
}
var X0e = V0e;
function G0e(t) {
  var e = [];
  if (t != null)
    for (var n in Object(t))
      e.push(n);
  return e;
}
var K0e = G0e, J0e = Ll, e1e = q5, t1e = K0e, n1e = Object.prototype, i1e = n1e.hasOwnProperty;
function r1e(t) {
  if (!J0e(t))
    return t1e(t);
  var e = e1e(t), n = [];
  for (var i in t)
    i == "constructor" && (e || !i1e.call(t, i)) || n.push(i);
  return n;
}
var s1e = r1e, o1e = qz, a1e = s1e, l1e = W5;
function u1e(t) {
  return l1e(t) ? o1e(t, !0) : a1e(t);
}
var V5 = u1e, c1e = u2, f1e = V5;
function d1e(t, e) {
  return t && c1e(e, f1e(e), t);
}
var h1e = d1e, pw = { exports: {} };
pw.exports;
(function(t, e) {
  var n = qo, i = e && !e.nodeType && e, r = i && !0 && t && !t.nodeType && t, s = r && r.exports === i, o = s ? n.Buffer : void 0, a = o ? o.allocUnsafe : void 0;
  function l(u, f) {
    if (f)
      return u.slice();
    var d = u.length, h = a ? a(d) : new u.constructor(d);
    return u.copy(h), h;
  }
  t.exports = l;
})(pw, pw.exports);
var p1e = pw.exports;
function m1e(t, e) {
  for (var n = -1, i = t == null ? 0 : t.length, r = 0, s = []; ++n < i; ) {
    var o = t[n];
    e(o, n, t) && (s[r++] = o);
  }
  return s;
}
var g1e = m1e;
function v1e() {
  return [];
}
var Jz = v1e, b1e = g1e, y1e = Jz, w1e = Object.prototype, k1e = w1e.propertyIsEnumerable, ON = Object.getOwnPropertySymbols, x1e = ON ? function(t) {
  return t == null ? [] : (t = Object(t), b1e(ON(t), function(e) {
    return k1e.call(t, e);
  }));
} : y1e, X5 = x1e, _1e = u2, O1e = X5;
function S1e(t, e) {
  return _1e(t, O1e(t), e);
}
var C1e = S1e;
function E1e(t, e) {
  for (var n = -1, i = e.length, r = t.length; ++n < i; )
    t[r + n] = e[n];
  return t;
}
var G5 = E1e, T1e = Yz, $1e = T1e(Object.getPrototypeOf, Object), eW = $1e, M1e = G5, N1e = eW, A1e = X5, D1e = Jz, P1e = Object.getOwnPropertySymbols, I1e = P1e ? function(t) {
  for (var e = []; t; )
    M1e(e, A1e(t)), t = N1e(t);
  return e;
} : D1e, tW = I1e, L1e = u2, R1e = tW;
function j1e(t, e) {
  return L1e(t, R1e(t), e);
}
var F1e = j1e, B1e = G5, z1e = Rl;
function W1e(t, e, n) {
  var i = e(t);
  return z1e(t) ? i : B1e(i, n(t));
}
var nW = W1e, H1e = nW, Q1e = X5, U1e = r2;
function Z1e(t) {
  return H1e(t, U1e, Q1e);
}
var q1e = Z1e, Y1e = nW, V1e = tW, X1e = V5;
function G1e(t) {
  return Y1e(t, X1e, V1e);
}
var K1e = G1e, J1e = Object.prototype, eve = J1e.hasOwnProperty;
function tve(t) {
  var e = t.length, n = new t.constructor(e);
  return e && typeof t[0] == "string" && eve.call(t, "index") && (n.index = t.index, n.input = t.input), n;
}
var nve = tve, ive = qo, rve = ive.Uint8Array, sve = rve, SN = sve;
function ove(t) {
  var e = new t.constructor(t.byteLength);
  return new SN(e).set(new SN(t)), e;
}
var K5 = ove, ave = K5;
function lve(t, e) {
  var n = e ? ave(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.byteLength);
}
var uve = lve, cve = /\w*$/;
function fve(t) {
  var e = new t.constructor(t.source, cve.exec(t));
  return e.lastIndex = t.lastIndex, e;
}
var dve = fve, CN = rp, EN = CN ? CN.prototype : void 0, TN = EN ? EN.valueOf : void 0;
function hve(t) {
  return TN ? Object(TN.call(t)) : {};
}
var pve = hve, mve = K5;
function gve(t, e) {
  var n = e ? mve(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.length);
}
var vve = gve, bve = K5, yve = uve, wve = dve, kve = pve, xve = vve, _ve = "[object Boolean]", Ove = "[object Date]", Sve = "[object Map]", Cve = "[object Number]", Eve = "[object RegExp]", Tve = "[object Set]", $ve = "[object String]", Mve = "[object Symbol]", Nve = "[object ArrayBuffer]", Ave = "[object DataView]", Dve = "[object Float32Array]", Pve = "[object Float64Array]", Ive = "[object Int8Array]", Lve = "[object Int16Array]", Rve = "[object Int32Array]", jve = "[object Uint8Array]", Fve = "[object Uint8ClampedArray]", Bve = "[object Uint16Array]", zve = "[object Uint32Array]";
function Wve(t, e, n) {
  var i = t.constructor;
  switch (e) {
    case Nve:
      return bve(t);
    case _ve:
    case Ove:
      return new i(+t);
    case Ave:
      return yve(t, n);
    case Dve:
    case Pve:
    case Ive:
    case Lve:
    case Rve:
    case jve:
    case Fve:
    case Bve:
    case zve:
      return xve(t, n);
    case Sve:
      return new i();
    case Cve:
    case $ve:
      return new i(t);
    case Eve:
      return wve(t);
    case Tve:
      return new i();
    case Mve:
      return kve(t);
  }
}
var Hve = Wve, Qve = Ll, $N = Object.create, Uve = /* @__PURE__ */ function() {
  function t() {
  }
  return function(e) {
    if (!Qve(e))
      return {};
    if ($N)
      return $N(e);
    t.prototype = e;
    var n = new t();
    return t.prototype = void 0, n;
  };
}(), Zve = Uve, qve = Zve, Yve = eW, Vve = q5;
function Xve(t) {
  return typeof t.constructor == "function" && !Vve(t) ? qve(Yve(t)) : {};
}
var Gve = Xve, Kve = i2, Jve = Pf, ebe = "[object Map]";
function tbe(t) {
  return Jve(t) && Kve(t) == ebe;
}
var nbe = tbe, ibe = nbe, rbe = U5, MN = Z5, NN = MN && MN.isMap, sbe = NN ? rbe(NN) : ibe, obe = sbe, abe = i2, lbe = Pf, ube = "[object Set]";
function cbe(t) {
  return lbe(t) && abe(t) == ube;
}
var fbe = cbe, dbe = fbe, hbe = U5, AN = Z5, DN = AN && AN.isSet, pbe = DN ? hbe(DN) : dbe, mbe = pbe, gbe = D0e, vbe = I0e, bbe = Y5, ybe = X0e, wbe = h1e, kbe = p1e, xbe = Dz, _be = C1e, Obe = F1e, Sbe = q1e, Cbe = K1e, Ebe = i2, Tbe = nve, $be = Hve, Mbe = Gve, Nbe = Rl, Abe = Zz, Dbe = obe, Pbe = Ll, Ibe = mbe, Lbe = r2, Rbe = V5, jbe = 1, Fbe = 2, Bbe = 4, iW = "[object Arguments]", zbe = "[object Array]", Wbe = "[object Boolean]", Hbe = "[object Date]", Qbe = "[object Error]", rW = "[object Function]", Ube = "[object GeneratorFunction]", Zbe = "[object Map]", qbe = "[object Number]", sW = "[object Object]", Ybe = "[object RegExp]", Vbe = "[object Set]", Xbe = "[object String]", Gbe = "[object Symbol]", Kbe = "[object WeakMap]", Jbe = "[object ArrayBuffer]", eye = "[object DataView]", tye = "[object Float32Array]", nye = "[object Float64Array]", iye = "[object Int8Array]", rye = "[object Int16Array]", sye = "[object Int32Array]", oye = "[object Uint8Array]", aye = "[object Uint8ClampedArray]", lye = "[object Uint16Array]", uye = "[object Uint32Array]", ln = {};
ln[iW] = ln[zbe] = ln[Jbe] = ln[eye] = ln[Wbe] = ln[Hbe] = ln[tye] = ln[nye] = ln[iye] = ln[rye] = ln[sye] = ln[Zbe] = ln[qbe] = ln[sW] = ln[Ybe] = ln[Vbe] = ln[Xbe] = ln[Gbe] = ln[oye] = ln[aye] = ln[lye] = ln[uye] = !0;
ln[Qbe] = ln[rW] = ln[Kbe] = !1;
function sy(t, e, n, i, r, s) {
  var o, a = e & jbe, l = e & Fbe, u = e & Bbe;
  if (n && (o = r ? n(t, i, r, s) : n(t)), o !== void 0)
    return o;
  if (!Pbe(t))
    return t;
  var f = Nbe(t);
  if (f) {
    if (o = Tbe(t), !a)
      return xbe(t, o);
  } else {
    var d = Ebe(t), h = d == rW || d == Ube;
    if (Abe(t))
      return kbe(t, a);
    if (d == sW || d == iW || h && !r) {
      if (o = l || h ? {} : Mbe(t), !a)
        return l ? Obe(t, wbe(o, t)) : _be(t, ybe(o, t));
    } else {
      if (!ln[d])
        return r ? t : {};
      o = $be(t, d, a);
    }
  }
  s || (s = new gbe());
  var m = s.get(t);
  if (m)
    return m;
  s.set(t, o), Ibe(t) ? t.forEach(function(x) {
    o.add(sy(x, e, n, x, t, s));
  }) : Dbe(t) && t.forEach(function(x, _) {
    o.set(_, sy(x, e, n, _, t, s));
  });
  var g = u ? l ? Cbe : Sbe : l ? Rbe : Lbe, w = f ? void 0 : g(t);
  return vbe(w || t, function(x, _) {
    w && (_ = x, x = t[_]), bbe(o, _, sy(x, e, n, _, t, s));
  }), o;
}
var cye = sy, fye = cye, dye = 1, hye = 4;
function pye(t) {
  return fye(t, dye | hye);
}
var mye = pye;
const PN = /* @__PURE__ */ Gs(mye);
var Ba = {}, jl = {}, J5 = {}, Gi = {}, et = N;
let mw = /* @__PURE__ */ new Map();
function IN(t) {
  for (; t != null; ) {
    if (t.nodeType === Node.TEXT_NODE) return t;
    t = t.firstChild;
  }
  return null;
}
function LN(t) {
  let e = t.parentNode;
  if (e == null) throw Error("Should never happen");
  return [e, Array.from(e.childNodes).indexOf(t)];
}
function oW(t) {
  let e = {};
  t = t.split(";");
  for (let n of t) if (n !== "") {
    let [i, r] = n.split(/:([^]+)/);
    i && r && (e[i.trim()] = r.trim());
  }
  return e;
}
function gw(t) {
  let e = mw.get(t);
  return e === void 0 && (e = oW(t), mw.set(t, e)), e;
}
function gye(t) {
  let e = "";
  for (let n in t) n && (e += `${n}: ${t[n]};`);
  return e;
}
function Td(t, e) {
  let n = gw("getStyle" in t ? t.getStyle() : t.style);
  e = Object.entries(e).reduce((r, [s, o]) => (o instanceof Function ? r[s] = o(n[s]) : o === null ? delete r[s] : r[s] = o, r), { ...n });
  let i = gye(e);
  t.setStyle(i), mw.set(i, e);
}
function vye(t) {
  for (; t !== null && !et.$isRootOrShadowRoot(t); ) {
    let e = t.getLatest(), n = t.getParent();
    e.getChildrenSize() === 0 && t.remove(!0), t = n;
  }
}
function H3(t, e, n, i, r = null) {
  if (e.length !== 0) {
    var s = e[0], o = /* @__PURE__ */ new Map(), a = [];
    s = et.$isElementNode(s) ? s : s.getParentOrThrow(), s.isInline() && (s = s.getParentOrThrow());
    for (var l = !1; s !== null; ) {
      var u = s.getPreviousSibling();
      if (u !== null) {
        s = u, l = !0;
        break;
      }
      if (s = s.getParentOrThrow(), et.$isRootOrShadowRoot(s)) break;
    }
    u = /* @__PURE__ */ new Set();
    for (var f = 0; f < n; f++) {
      var d = e[f];
      et.$isElementNode(d) && d.getChildrenSize() === 0 && u.add(d.getKey());
    }
    var h = /* @__PURE__ */ new Set();
    for (f = 0; f < n; f++) {
      d = e[f];
      var m = d.getParent();
      if (m !== null && m.isInline() && (m = m.getParent()), m !== null && et.$isLeafNode(d) && !h.has(d.getKey())) {
        if (d = m.getKey(), o.get(d) === void 0) {
          let g = i();
          g.setFormat(m.getFormatType()), g.setIndent(m.getIndent()), a.push(g), o.set(d, g), m.getChildren().forEach((w) => {
            g.append(w), h.add(w.getKey()), et.$isElementNode(w) && w.getChildrenKeys().forEach((x) => h.add(x));
          }), vye(m);
        }
      } else if (u.has(d.getKey())) {
        if (!et.$isElementNode(d)) throw Error("Expected node in emptyElements to be an ElementNode");
        m = i(), m.setFormat(d.getFormatType()), m.setIndent(d.getIndent()), a.push(m), d.remove(!0);
      }
    }
    if (r !== null) for (e = 0; e < a.length; e++) r.append(a[e]);
    if (e = null, et.$isRootOrShadowRoot(s)) if (l) if (r !== null) s.insertAfter(r);
    else for (r = a.length - 1; 0 <= r; r--) s.insertAfter(a[r]);
    else if (l = s.getFirstChild(), et.$isElementNode(l) && (s = l), l === null) if (r) s.append(r);
    else for (r = 0; r < a.length; r++) l = a[r], s.append(l), e = l;
    else if (r !== null) l.insertBefore(r);
    else for (s = 0; s < a.length; s++) r = a[s], l.insertBefore(r), e = r;
    else if (r) s.insertAfter(r);
    else for (r = a.length - 1; 0 <= r; r--) l = a[r], s.insertAfter(l), e = l;
    a = et.$getPreviousSelection(), et.$isRangeSelection(a) && a.anchor.getNode().isAttached() && a.focus.getNode().isAttached() ? et.$setSelection(a.clone()) : e !== null ? e.selectEnd() : t.dirty = !0;
  }
}
function aW(t, e, n, i) {
  t.modify(e ? "extend" : "move", n, i);
}
function lW(t) {
  return t = t.anchor.getNode(), (et.$isRootNode(t) ? t : t.getParentOrThrow()).getDirection() === "rtl";
}
function Q3(t) {
  if (et.$isDecoratorNode(t) || !et.$isElementNode(t) || et.$isRootOrShadowRoot(t)) return !1;
  var e = t.getFirstChild();
  return e = e === null || et.$isLineBreakNode(e) || et.$isTextNode(e) || e.isInline(), !t.isInline() && t.canBeEmpty() !== !1 && e;
}
Gi.$addNodeStyle = function(t) {
  t = t.getStyle();
  let e = oW(t);
  mw.set(t, e);
};
Gi.$cloneWithProperties = function(t) {
  let e = t.constructor.clone(t);
  return e.__parent = t.__parent, e.__next = t.__next, e.__prev = t.__prev, et.$isElementNode(t) && et.$isElementNode(e) ? (e.__first = t.__first, e.__last = t.__last, e.__size = t.__size, e.__format = t.__format, e.__indent = t.__indent, e.__dir = t.__dir, e) : (et.$isTextNode(t) && et.$isTextNode(e) && (e.__format = t.__format, e.__style = t.__style, e.__mode = t.__mode, e.__detail = t.__detail), e);
};
Gi.$getSelectionStyleValueForProperty = function(t, e, n = "") {
  let i = null, r = t.getNodes();
  var s = t.anchor, o = t.focus, a = t.isBackward();
  let l = a ? o.offset : s.offset;
  if (s = a ? o.getNode() : s.getNode(), t.isCollapsed() && t.style !== "" && (t = gw(t.style), t !== null && e in t)) return t[e];
  for (t = 0; t < r.length; t++) {
    var u = r[t];
    if ((t === 0 || l !== 0 || !u.is(s)) && et.$isTextNode(u)) {
      if (o = e, a = n, u = u.getStyle(), u = gw(u), o = u !== null && u[o] || a, i === null) i = o;
      else if (i !== o) {
        i = "";
        break;
      }
    }
  }
  return i === null ? n : i;
};
Gi.$isAtNodeEnd = function(t) {
  if (t.type === "text") return t.offset === t.getNode().getTextContentSize();
  let e = t.getNode();
  if (!et.$isElementNode(e)) throw Error("isAtNodeEnd: node must be a TextNode or ElementNode");
  return t.offset === e.getChildrenSize();
};
Gi.$isParentElementRTL = lW;
Gi.$moveCaretSelection = aW;
Gi.$moveCharacter = function(t, e, n) {
  let i = lW(t);
  aW(t, e, n ? !i : i, "character");
};
Gi.$patchStyleText = function(t, e) {
  var n = t.getNodes(), i = n.length, r = t.getStartEndPoints();
  if (r !== null) {
    var [s, o] = r;
    --i, r = n[0];
    var a = n[i];
    if (t.isCollapsed() && et.$isRangeSelection(t)) Td(t, e);
    else {
      var l = r.getTextContent().length, u = o.offset, f = s.offset, d = s.isBefore(o), h = d ? f : u;
      t = d ? u : f;
      var m = d ? s.type : o.type, g = d ? o.type : s.type;
      if (d = d ? o.key : s.key, et.$isTextNode(r) && h === l) {
        let w = r.getNextSibling();
        et.$isTextNode(w) && (h = f = 0, r = w);
      }
      if (n.length === 1) et.$isTextNode(r) && r.canHaveFormat() && (h = m === "element" ? 0 : f > u ? u : f, t = g === "element" ? l : f > u ? f : u, h !== t && (h === 0 && t === l ? (Td(r, e), r.select(h, t)) : (n = r.splitText(h, t), n = h === 0 ? n[0] : n[1], Td(n, e), n.select(0, t - h))));
      else for (et.$isTextNode(r) && h < r.getTextContentSize() && r.canHaveFormat() && (h !== 0 && (r = r.splitText(h)[1], h = 0, s.set(r.getKey(), h, "text")), Td(r, e)), et.$isTextNode(a) && a.canHaveFormat() && (h = a.getTextContent().length, a.__key !== d && t !== 0 && (t = h), t !== h && ([a] = a.splitText(t)), t === 0 && g !== "element" || Td(a, e)), t = 1; t < i; t++) h = n[t], g = h.getKey(), et.$isTextNode(h) && h.canHaveFormat() && g !== r.getKey() && g !== a.getKey() && !h.isToken() && Td(h, e);
    }
  }
};
Gi.$selectAll = function(t) {
  let e = t.anchor;
  t = t.focus;
  var n = e.getNode().getTopLevelElementOrThrow().getParentOrThrow();
  let i = n.getFirstDescendant();
  n = n.getLastDescendant();
  let r = "element", s = "element", o = 0;
  et.$isTextNode(i) ? r = "text" : et.$isElementNode(i) || i === null || (i = i.getParentOrThrow()), et.$isTextNode(n) ? (s = "text", o = n.getTextContentSize()) : et.$isElementNode(n) || n === null || (n = n.getParentOrThrow()), i && n && (e.set(i.getKey(), 0, r), t.set(n.getKey(), o, s));
};
Gi.$setBlocksType = function(t, e) {
  if (t !== null) {
    var n = t.getStartEndPoints();
    if (n = n ? n[0] : null, n !== null && n.key === "root") e = e(), t = et.$getRoot(), (n = t.getFirstChild()) ? n.replace(e, !0) : t.append(e);
    else {
      if (t = t.getNodes(), n !== null) {
        for (n = n.getNode(); n !== null && n.getParent() !== null && !Q3(n); ) n = n.getParentOrThrow();
        n = Q3(n) ? n : null;
      } else n = !1;
      for (n && t.indexOf(n) === -1 && t.push(n), n = 0; n < t.length; n++) {
        let i = t[n];
        if (!Q3(i)) continue;
        if (!et.$isElementNode(i)) throw Error("Expected block node to be an ElementNode");
        let r = e();
        r.setFormat(i.getFormatType()), r.setIndent(i.getIndent()), i.replace(r, !0);
      }
    }
  }
};
Gi.$shouldOverrideDefaultCharacterSelection = function(t, e) {
  return t = et.$getAdjacentNode(t.focus, e), et.$isDecoratorNode(t) && !t.isIsolated() || et.$isElementNode(t) && !t.isInline() && !t.canBeEmpty();
};
Gi.$sliceSelectedTextNodeContent = function(t, e) {
  var n = t.getStartEndPoints();
  if (e.isSelected(t) && !e.isSegmented() && !e.isToken() && n !== null) {
    let [a, l] = n;
    n = t.isBackward();
    var i = a.getNode(), r = l.getNode(), s = e.is(i), o = e.is(r);
    if (s || o) {
      let [u, f] = et.$getCharacterOffsets(t);
      t = i.is(r), s = e.is(n ? r : i), r = e.is(n ? i : r), i = 0, o = void 0, t ? (i = u > f ? f : u, o = u > f ? u : f) : s ? (i = n ? f : u, o = void 0) : r && (n = n ? u : f, i = 0, o = n), e.__text = e.__text.slice(i, o);
    }
  }
  return e;
};
Gi.$wrapNodes = function(t, e, n = null) {
  var i = t.getStartEndPoints(), r = i ? i[0] : null;
  i = t.getNodes();
  let s = i.length;
  if (r !== null && (s === 0 || s === 1 && r.type === "element" && r.getNode().getChildrenSize() === 0)) {
    t = r.type === "text" ? r.getNode().getParentOrThrow() : r.getNode(), i = t.getChildren();
    let a = e();
    a.setFormat(t.getFormatType()), a.setIndent(t.getIndent()), i.forEach((l) => a.append(l)), n && (a = n.append(a)), t.replace(a);
  } else {
    r = null;
    var o = [];
    for (let a = 0; a < s; a++) {
      let l = i[a];
      et.$isRootOrShadowRoot(l) ? (H3(t, o, o.length, e, n), o = [], r = l) : r === null || r !== null && et.$hasAncestor(l, r) ? o.push(l) : (H3(t, o, o.length, e, n), o = [l]);
    }
    H3(t, o, o.length, e, n);
  }
};
Gi.createDOMRange = function(t, e, n, i, r) {
  let s = e.getKey(), o = i.getKey(), a = document.createRange(), l = t.getElementByKey(s);
  if (t = t.getElementByKey(o), et.$isTextNode(e) && (l = IN(l)), et.$isTextNode(i) && (t = IN(t)), e === void 0 || i === void 0 || l === null || t === null) return null;
  l.nodeName === "BR" && ([l, n] = LN(l)), t.nodeName === "BR" && ([t, r] = LN(t)), e = l.firstChild, l === t && e != null && e.nodeName === "BR" && n === 0 && r === 0 && (r = 1);
  try {
    a.setStart(l, n), a.setEnd(t, r);
  } catch {
    return null;
  }
  return !a.collapsed || n === r && s === o || (a.setStart(t, r), a.setEnd(
    l,
    n
  )), a;
};
Gi.createRectsFromDOMRange = function(t, e) {
  var n = t.getRootElement();
  if (n === null) return [];
  t = n.getBoundingClientRect(), n = getComputedStyle(n), n = parseFloat(n.paddingLeft) + parseFloat(n.paddingRight), e = Array.from(e.getClientRects());
  let i = e.length;
  e.sort((s, o) => {
    let a = s.top - o.top;
    return 3 >= Math.abs(a) ? s.left - o.left : a;
  });
  let r;
  for (let s = 0; s < i; s++) {
    let o = e[s], a = o.width + n === t.width;
    r && r.top <= o.top && r.top + r.height > o.top && r.left + r.width > o.left || a ? (e.splice(s--, 1), i--) : r = o;
  }
  return e;
};
Gi.getStyleObjectFromCSS = gw;
Gi.trimTextContentFromAnchor = function(t, e, n) {
  let i = e.getNode();
  if (et.$isElementNode(i)) {
    var r = i.getDescendantByIndex(e.offset);
    r !== null && (i = r);
  }
  for (; 0 < n && i !== null; ) {
    et.$isElementNode(i) && (r = i.getLastDescendant(), r !== null && (i = r));
    var s = i.getPreviousSibling(), o = 0;
    if (s === null) {
      r = i.getParentOrThrow();
      for (var a = r.getPreviousSibling(); a === null; ) {
        if (r = r.getParent(), r === null) {
          s = null;
          break;
        }
        a = r.getPreviousSibling();
      }
      r !== null && (o = r.isInline() ? 0 : 2, s = a);
    }
    if (a = i.getTextContent(), a === "" && et.$isElementNode(i) && !i.isInline() && (a = `

`), r = a.length, !et.$isTextNode(i) || n >= r) a = i.getParent(), i.remove(), a == null || a.getChildrenSize() !== 0 || et.$isRootNode(a) || a.remove(), n -= r + o, i = s;
    else {
      let l = i.getKey();
      o = t.getEditorState().read(() => {
        const f = et.$getNodeByKey(l);
        return et.$isTextNode(f) && f.isSimpleText() ? f.getTextContent() : null;
      }), s = r - n;
      let u = a.slice(0, s);
      o !== null && o !== a ? (n = et.$getPreviousSelection(), r = i, i.isSimpleText() ? i.setTextContent(o) : (r = et.$createTextNode(o), i.replace(r)), et.$isRangeSelection(n) && n.isCollapsed() && (n = n.anchor.offset, r.select(n, n))) : i.isSimpleText() ? (o = e.key === l, a = e.offset, a < n && (a = r), n = o ? a - n : 0, r = o ? a : s, o && n === 0 ? ([n] = i.splitText(n, r), n.remove()) : ([, n] = i.splitText(n, r), n.remove())) : (n = et.$createTextNode(u), i.replace(n)), n = 0;
    }
  }
};
const bye = Gi;
var Ri = bye, oi = {}, uW = Ri, Pn = N;
function yye(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
function cW(...t) {
  return () => {
    t.forEach((e) => e());
  };
}
let wye = { attributes: !0, characterData: !0, childList: !0, subtree: !0 };
function fW(t, e, n) {
  function i() {
    if (o === null) throw Error("Unexpected null rootDOMNode");
    if (a === null) throw Error("Unexpected null parentDOMNode");
    let { left: h, top: m } = o.getBoundingClientRect();
    var g = a;
    let w = uW.createRectsFromDOMRange(t, e);
    f.isConnected || g.append(f), g = !1;
    for (let S = 0; S < w.length; S++) {
      var x = w[S];
      let C = u[S] || document.createElement("div"), E = C.style;
      E.position !== "absolute" && (E.position = "absolute", g = !0);
      var _ = `${x.left - h}px`;
      E.left !== _ && (E.left = _, g = !0), _ = `${x.top - m}px`, E.top !== _ && (C.style.top = _, g = !0), _ = `${x.width}px`, E.width !== _ && (C.style.width = _, g = !0), x = `${x.height}px`, E.height !== x && (C.style.height = x, g = !0), C.parentNode !== f && (f.append(C), g = !0), u[S] = C;
    }
    for (; u.length > w.length; ) u.pop();
    g && n(u);
  }
  function r() {
    o = a = null, l !== null && l.disconnect(), l = null, f.remove();
    for (let h of u) h.remove();
    u = [];
  }
  function s() {
    let h = t.getRootElement();
    if (h === null) return r();
    let m = h.parentElement;
    if (!(m instanceof HTMLElement)) return r();
    r(), o = h, a = m, l = new MutationObserver((g) => {
      let w = t.getRootElement(), x = w && w.parentElement;
      if (w !== o || x !== a) return s();
      for (let _ of g) if (!f.contains(_.target)) return i();
    }), l.observe(m, wye), i();
  }
  let o = null, a = null, l = null, u = [], f = document.createElement("div"), d = t.registerRootListener(s);
  return () => {
    d(), r();
  };
}
function dW(t, e) {
  for (let n of e) if (t.type.startsWith(n)) return !0;
  return !1;
}
let hW = (t, e) => {
  for (; t !== Pn.$getRoot() && t != null; ) {
    if (e(t)) return t;
    t = t.getParent();
  }
  return null;
};
oi.$splitNode = Pn.$splitNode;
oi.isHTMLAnchorElement = Pn.isHTMLAnchorElement;
oi.isHTMLElement = Pn.isHTMLElement;
oi.$dfs = function(t, e) {
  let n = [];
  t = (t || Pn.$getRoot()).getLatest(), e = e || (Pn.$isElementNode(t) ? t.getLastDescendant() : t);
  for (var i = t, r = 0; (i = i.getParent()) !== null; ) r++;
  for (i = r; t !== null && !t.is(e); ) if (n.push({ depth: i, node: t }), Pn.$isElementNode(t) && 0 < t.getChildrenSize()) t = t.getFirstChild(), i++;
  else for (r = null; r === null && t !== null; ) r = t.getNextSibling(), r === null ? (t = t.getParent(), i--) : t = r;
  return t !== null && t.is(e) && n.push({ depth: i, node: t }), n;
};
oi.$filter = function(t, e) {
  let n = [];
  for (let i = 0; i < t.length; i++) {
    let r = e(t[i]);
    r !== null && n.push(r);
  }
  return n;
};
oi.$findMatchingParent = hW;
oi.$getNearestBlockElementAncestorOrThrow = function(t) {
  let e = hW(t, (n) => Pn.$isElementNode(n) && !n.isInline());
  return Pn.$isElementNode(e) || yye(4, t.__key), e;
};
oi.$getNearestNodeOfType = function(t, e) {
  for (; t != null; ) {
    if (t instanceof e) return t;
    t = t.getParent();
  }
  return null;
};
oi.$insertFirst = function(t, e) {
  let n = t.getFirstChild();
  n !== null ? n.insertBefore(e) : t.append(e);
};
oi.$insertNodeToNearestRoot = function(t) {
  var e = Pn.$getSelection() || Pn.$getPreviousSelection();
  if (Pn.$isRangeSelection(e)) {
    var { focus: n } = e;
    if (e = n.getNode(), n = n.offset, Pn.$isRootOrShadowRoot(e)) n = e.getChildAtIndex(n), n == null ? e.append(t) : n.insertBefore(t), t.selectNext();
    else {
      let i, r;
      Pn.$isTextNode(e) ? (i = e.getParentOrThrow(), r = e.getIndexWithinParent(), 0 < n && (r += 1, e.splitText(n))) : (i = e, r = n), [, e] = Pn.$splitNode(i, r), e.insertBefore(t), e.selectStart();
    }
  } else e != null ? (e = e.getNodes(), e[e.length - 1].getTopLevelElementOrThrow().insertAfter(t)) : Pn.$getRoot().append(t), e = Pn.$createParagraphNode(), t.insertAfter(e), e.select();
  return t.getLatest();
};
oi.$restoreEditorState = function(t, e) {
  let n = /* @__PURE__ */ new Map(), i = t._pendingEditorState;
  for (let [r, s] of e._nodeMap) {
    let o = uW.$cloneWithProperties(s);
    if (Pn.$isTextNode(o)) {
      if (!Pn.$isTextNode(s)) throw Error("Expected node be a TextNode");
      o.__text = s.__text;
    }
    n.set(r, o);
  }
  i && (i._nodeMap = n), t._dirtyType = 2, t = e._selection, Pn.$setSelection(t === null ? null : t.clone());
};
oi.$wrapNodeInElement = function(t, e) {
  return e = e(), t.replace(e), e.append(t), e;
};
oi.addClassNamesToElement = function(t, ...e) {
  e.forEach((n) => {
    typeof n == "string" && (n = n.split(" ").filter((i) => i !== ""), t.classList.add(...n));
  });
};
oi.isMimeType = dW;
oi.markSelection = function(t, e) {
  function n(l) {
    l.read(() => {
      var u = Pn.$getSelection();
      if (Pn.$isRangeSelection(u)) {
        var { anchor: f, focus: d } = u;
        u = f.getNode();
        var h = u.getKey(), m = f.offset, g = d.getNode(), w = g.getKey(), x = d.offset, _ = t.getElementByKey(h), S = t.getElementByKey(w);
        if (h = i === null || _ === null || m !== r || h !== i.getKey() || u !== i && (!(i instanceof Pn.TextNode) || u.updateDOM(i, _, t._config)), w = s === null || S === null || x !== o || w !== s.getKey() || g !== s && (!(s instanceof Pn.TextNode) || g.updateDOM(s, S, t._config)), h || w) {
          _ = t.getElementByKey(f.getNode().getKey());
          var C = t.getElementByKey(d.getNode().getKey());
          if (_ !== null && C !== null && _.tagName === "SPAN" && C.tagName === "SPAN") {
            if (w = document.createRange(), d.isBefore(f) ? (h = C, S = d.offset, C = _, _ = f.offset) : (h = _, S = f.offset, _ = d.offset), h = h.firstChild, h === null || (C = C.firstChild, C === null)) throw Error("Expected text node to be first child of span");
            w.setStart(h, S), w.setEnd(C, _), a(), a = fW(t, w, (E) => {
              for (let M of E) {
                let $ = M.style;
                $.background !== "Highlight" && ($.background = "Highlight"), $.color !== "HighlightText" && ($.color = "HighlightText"), $.zIndex !== "-1" && ($.zIndex = "-1"), $.pointerEvents !== "none" && ($.pointerEvents = "none"), $.marginTop !== "-1.5px" && ($.marginTop = "-1.5px"), $.paddingTop !== "4px" && ($.paddingTop = "4px"), $.paddingBottom !== "0px" && ($.paddingBottom = "0px");
              }
              e !== void 0 && e(E);
            });
          }
        }
        i = u, r = m, s = g, o = x;
      } else o = s = r = i = null, a(), a = () => {
      };
    });
  }
  let i = null, r = null, s = null, o = null, a = () => {
  };
  return n(t.getEditorState()), cW(t.registerUpdateListener(({ editorState: l }) => n(l)), a, () => {
    a();
  });
};
oi.mediaFileReader = function(t, e) {
  let n = t[Symbol.iterator]();
  return new Promise((i, r) => {
    let s = [], o = () => {
      const { done: a, value: l } = n.next();
      if (a) return i(s);
      const u = new FileReader();
      u.addEventListener("error", r), u.addEventListener("load", () => {
        const f = u.result;
        typeof f == "string" && s.push({ file: l, result: f }), o();
      }), dW(l, e) ? u.readAsDataURL(l) : o();
    };
    o();
  });
};
oi.mergeRegister = cW;
oi.objectKlassEquals = function(t, e) {
  return t !== null ? Object.getPrototypeOf(t).constructor.name === e.name : !1;
};
oi.positionNodeOnRange = fW;
oi.registerNestedElementResolver = function(t, e, n, i) {
  return t.registerNodeTransform(e, (r) => {
    e: {
      for (var s = r.getChildren(), o = 0; o < s.length; o++) if (s[o] instanceof e) {
        s = null;
        break e;
      }
      for (s = r; s !== null; ) if (o = s, s = s.getParent(), s instanceof e) {
        s = { child: o, parent: s };
        break e;
      }
      s = null;
    }
    if (s !== null) {
      const { child: a, parent: l } = s;
      if (a.is(r)) {
        if (i(l, r), r = a.getNextSiblings(), s = r.length, l.insertAfter(a), s !== 0) {
          o = n(l), a.insertAfter(o);
          for (let u = 0; u < s; u++) o.append(r[u]);
        }
        l.canBeEmpty() || l.getChildrenSize() !== 0 || l.remove();
      }
    }
  });
};
oi.removeClassNamesFromElement = function(t, ...e) {
  e.forEach((n) => {
    typeof n == "string" && t.classList.remove(...n.split(" "));
  });
};
const kye = oi;
var lt = kye, RN = Ri, xye = lt, Kd = N;
function pW(t, e, n, i = null) {
  let r = i !== null ? e.isSelected(i) : !0, s = Kd.$isElementNode(e) && e.excludeFromCopy("html");
  var o = e;
  i !== null && (o = RN.$cloneWithProperties(e), o = Kd.$isTextNode(o) && i !== null ? RN.$sliceSelectedTextNodeContent(i, o) : o);
  let a = Kd.$isElementNode(o) ? o.getChildren() : [];
  var l = t._nodes.get(o.getType());
  l = l && l.exportDOM !== void 0 ? l.exportDOM(t, o) : o.exportDOM(t);
  let { element: u, after: f } = l;
  if (!u) return !1;
  l = document.createDocumentFragment();
  for (let d = 0; d < a.length; d++) {
    let h = a[d], m = pW(t, h, l, i);
    !r && Kd.$isElementNode(e) && m && e.extractWithChild(h, i, "html") && (r = !0);
  }
  return r && !s ? (xye.isHTMLElement(u) && u.append(l), n.append(u), f && (t = f.call(o, u)) && u.replaceWith(t)) : n.append(l), r;
}
let mW = /* @__PURE__ */ new Set(["STYLE", "SCRIPT"]);
function gW(t, e, n = /* @__PURE__ */ new Map(), i) {
  let r = [];
  if (mW.has(t.nodeName)) return r;
  let s = null;
  var o, { nodeName: a } = t, l = e._htmlConversions.get(a.toLowerCase());
  if (a = null, l !== void 0) for (o of l) l = o(t), l !== null && (a === null || (a.priority || 0) < (l.priority || 0)) && (a = l);
  if (a = (o = a !== null ? a.conversion : null) ? o(t) : null, o = null, a !== null) {
    if (o = a.after, l = a.node, s = Array.isArray(l) ? l[l.length - 1] : l, s !== null) {
      for (var [, u] of n) if (s = u(s, i), !s) break;
      s && r.push(...Array.isArray(l) ? l : [s]);
    }
    a.forChild != null && n.set(t.nodeName, a.forChild);
  }
  for (t = t.childNodes, i = [], u = 0; u < t.length; u++) i.push(...gW(t[u], e, new Map(n), s));
  return o != null && (i = o(i)), s == null ? r = r.concat(i) : Kd.$isElementNode(s) && s.append(...i), r;
}
J5.$generateHtmlFromNodes = function(t, e) {
  if (typeof document > "u" || typeof window > "u" && typeof on.window > "u") throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");
  let n = document.createElement("div"), i = Kd.$getRoot().getChildren();
  for (let r = 0; r < i.length; r++) pW(t, i[r], n, e);
  return n.innerHTML;
};
J5.$generateNodesFromDOM = function(t, e) {
  e = e.body ? e.body.childNodes : [];
  let n = [];
  for (let r = 0; r < e.length; r++) {
    var i = e[r];
    mW.has(i.nodeName) || (i = gW(i, t), i !== null && (n = n.concat(i)));
  }
  return n;
};
const _ye = J5;
var Rn = _ye, vW = Rn, S4 = Ri, Oye = lt, wi = N;
function jN(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
let bW = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
function yW(t) {
  let e = wi.$getSelection();
  if (e == null) throw Error("Expected valid LexicalSelection");
  return wi.$isRangeSelection(e) && e.isCollapsed() || e.getNodes().length === 0 ? "" : vW.$generateHtmlFromNodes(t, e);
}
function wW(t) {
  let e = wi.$getSelection();
  if (e == null) throw Error("Expected valid LexicalSelection");
  return wi.$isRangeSelection(e) && e.isCollapsed() || e.getNodes().length === 0 ? null : JSON.stringify(xW(t, e));
}
function C4(t, e, n) {
  t.dispatchCommand(wi.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, { nodes: e, selection: n }) || n.insertNodes(e);
}
function kW(t, e, n, i = []) {
  let r = e !== null ? n.isSelected(e) : !0, s = wi.$isElementNode(n) && n.excludeFromCopy("html");
  var o = n;
  if (e !== null) {
    var a = S4.$cloneWithProperties(n);
    o = a = wi.$isTextNode(a) && e !== null ? S4.$sliceSelectedTextNodeContent(e, a) : a;
  }
  let l = wi.$isElementNode(o) ? o.getChildren() : [];
  var u = o;
  a = u.exportJSON();
  var f = u.constructor;
  for (a.type !== f.getType() && jN(58, f.name), wi.$isElementNode(u) && (Array.isArray(a.children) || jN(59, f.name)), wi.$isTextNode(o) && (o = o.__text, 0 < o.length ? a.text = o : r = !1), o = 0; o < l.length; o++) u = l[o], f = kW(t, e, u, a.children), !r && wi.$isElementNode(n) && f && n.extractWithChild(u, e, "clone") && (r = !0);
  if (r && !s) i.push(a);
  else if (Array.isArray(a.children)) for (t = 0; t < a.children.length; t++) i.push(a.children[t]);
  return r;
}
function xW(t, e) {
  let n = [], i = wi.$getRoot().getChildren();
  for (let r = 0; r < i.length; r++) kW(t, e, i[r], n);
  return { namespace: t._config.namespace, nodes: n };
}
function _W(t) {
  let e = [];
  for (let n = 0; n < t.length; n++) {
    let i = wi.$parseSerializedNode(t[n]);
    wi.$isTextNode(i) && S4.$addNodeStyle(i), e.push(i);
  }
  return e;
}
let $d = null;
function FN(t, e) {
  var n = bW ? (t._window || window).getSelection() : null;
  if (!n) return !1;
  var i = n.anchorNode;
  if (n = n.focusNode, i !== null && n !== null && !wi.isSelectionWithinEditor(t, i, n) || (e.preventDefault(), e = e.clipboardData, i = wi.$getSelection(), e === null || i === null)) return !1;
  n = yW(t), t = wW(t);
  let r = "";
  return i !== null && (r = i.getTextContent()), n !== null && e.setData("text/html", n), t !== null && e.setData("application/x-lexical-editor", t), e.setData("text/plain", r), !0;
}
jl.$generateJSONFromSelectedNodes = xW;
jl.$generateNodesFromSerializedNodes = _W;
jl.$getHtmlContent = yW;
jl.$getLexicalContent = wW;
jl.$insertDataTransferForPlainText = function(t, e) {
  t = t.getData("text/plain") || t.getData("text/uri-list"), t != null && e.insertRawText(t);
};
jl.$insertDataTransferForRichText = function(t, e, n) {
  var i = t.getData("application/x-lexical-editor");
  if (i) try {
    let s = JSON.parse(i);
    if (s.namespace === n._config.namespace && Array.isArray(s.nodes)) {
      let o = _W(s.nodes);
      return C4(n, o, e);
    }
  } catch {
  }
  if (i = t.getData("text/html")) try {
    var r = new DOMParser().parseFromString(i, "text/html");
    let s = vW.$generateNodesFromDOM(n, r);
    return C4(n, s, e);
  } catch {
  }
  if (t = t.getData("text/plain") || t.getData("text/uri-list"), t != null) if (wi.$isRangeSelection(e)) for (t = t.split(/(\r?\n|\t)/), t[t.length - 1] === "" && t.pop(), n = 0; n < t.length; n++) r = t[n], r === `
` || r === `\r
` ? e.insertParagraph() : r === "	" ? e.insertNodes([wi.$createTabNode()]) : e.insertText(r);
  else e.insertRawText(t);
};
jl.$insertGeneratedNodes = C4;
jl.copyToClipboard = async function(t, e) {
  if ($d !== null) return !1;
  if (e !== null) return new Promise((o) => {
    t.update(() => {
      o(FN(t, e));
    });
  });
  var n = t.getRootElement();
  let i = t._window == null ? window.document : t._window.document, r = bW ? (t._window || window).getSelection() : null;
  if (n === null || r === null) return !1;
  let s = i.createElement("span");
  return s.style.cssText = "position: fixed; top: -1000px;", s.append(i.createTextNode("#")), n.append(s), n = new Range(), n.setStart(s, 0), n.setEnd(s, 1), r.removeAllRanges(), r.addRange(n), new Promise((o) => {
    let a = t.registerCommand(wi.COPY_COMMAND, (l) => (Oye.objectKlassEquals(l, ClipboardEvent) && (a(), $d !== null && (window.clearTimeout($d), $d = null), o(FN(t, l))), !0), wi.COMMAND_PRIORITY_CRITICAL);
    $d = window.setTimeout(() => {
      a(), $d = null, o(!1);
    }, 50), i.execCommand("copy"), s.remove();
  });
};
const Sye = jl;
var mf = Sye, vw = mf, ab = Ri, wa = lt, ue = N;
function BN(t, e) {
  return typeof document.caretRangeFromPoint < "u" ? (t = document.caretRangeFromPoint(t, e), t === null ? null : { node: t.startContainer, offset: t.startOffset }) : document.caretPositionFromPoint !== "undefined" ? (t = document.caretPositionFromPoint(t, e), t === null ? null : { node: t.offsetNode, offset: t.offset }) : null;
}
let fp = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Cye = fp && "documentMode" in document ? document.documentMode : null, Eye = fp && "InputEvent" in window && !Cye ? "getTargetRanges" in new window.InputEvent("input") : !1, Tye = fp && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), $ye = fp && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Mye = fp && /^(?=.*Chrome).*/i.test(navigator.userAgent), Nye = fp && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Mye, E4 = ue.createCommand("DRAG_DROP_PASTE_FILE"), eE = class OW extends ue.ElementNode {
  static getType() {
    return "quote";
  }
  static clone(e) {
    return new OW(e.__key);
  }
  constructor(e) {
    super(e);
  }
  createDOM(e) {
    let n = document.createElement("blockquote");
    return wa.addClassNamesToElement(n, e.theme.quote), n;
  }
  updateDOM() {
    return !1;
  }
  static importDOM() {
    return { blockquote: () => ({ conversion: Aye, priority: 0 }) };
  }
  exportDOM(e) {
    if ({ element: e } = super.exportDOM(e), e && wa.isHTMLElement(e)) {
      this.isEmpty() && e.append(document.createElement("br"));
      var n = this.getFormatType();
      e.style.textAlign = n, (n = this.getDirection()) && (e.dir = n);
    }
    return { element: e };
  }
  static importJSON(e) {
    let n = tE();
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  exportJSON() {
    return { ...super.exportJSON(), type: "quote" };
  }
  insertNewAfter(e, n) {
    e = ue.$createParagraphNode();
    let i = this.getDirection();
    return e.setDirection(i), this.insertAfter(e, n), e;
  }
  collapseAtStart() {
    let e = ue.$createParagraphNode();
    return this.getChildren().forEach((n) => e.append(n)), this.replace(e), !0;
  }
};
function tE() {
  return ue.$applyNodeReplacement(new eE());
}
let nE = class SW extends ue.ElementNode {
  static getType() {
    return "heading";
  }
  static clone(e) {
    return new SW(e.__tag, e.__key);
  }
  constructor(e, n) {
    super(n), this.__tag = e;
  }
  getTag() {
    return this.__tag;
  }
  createDOM(e) {
    let n = this.__tag, i = document.createElement(n);
    return e = e.theme.heading, e !== void 0 && wa.addClassNamesToElement(i, e[n]), i;
  }
  updateDOM() {
    return !1;
  }
  static importDOM() {
    return { h1: () => ({ conversion: Md, priority: 0 }), h2: () => ({ conversion: Md, priority: 0 }), h3: () => ({ conversion: Md, priority: 0 }), h4: () => ({ conversion: Md, priority: 0 }), h5: () => ({
      conversion: Md,
      priority: 0
    }), h6: () => ({ conversion: Md, priority: 0 }), p: (e) => (e = e.firstChild, e !== null && zN(e) ? { conversion: () => ({ node: null }), priority: 3 } : null), span: (e) => zN(e) ? { conversion: () => ({ node: Jd("h1") }), priority: 3 } : null };
  }
  exportDOM(e) {
    if ({ element: e } = super.exportDOM(e), e && wa.isHTMLElement(e)) {
      this.isEmpty() && e.append(document.createElement("br"));
      var n = this.getFormatType();
      e.style.textAlign = n, (n = this.getDirection()) && (e.dir = n);
    }
    return { element: e };
  }
  static importJSON(e) {
    let n = Jd(e.tag);
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  exportJSON() {
    return { ...super.exportJSON(), tag: this.getTag(), type: "heading", version: 1 };
  }
  insertNewAfter(e, n = !0) {
    let i = e ? e.anchor.offset : 0, r = i !== this.getTextContentSize() && e ? Jd(this.getTag()) : ue.$createParagraphNode(), s = this.getDirection();
    return r.setDirection(s), this.insertAfter(r, n), i === 0 && !this.isEmpty() && e && (e = ue.$createParagraphNode(), e.select(), this.replace(e, !0)), r;
  }
  collapseAtStart() {
    let e = this.isEmpty() ? ue.$createParagraphNode() : Jd(this.getTag());
    return this.getChildren().forEach((n) => e.append(n)), this.replace(e), !0;
  }
  extractWithChild() {
    return !0;
  }
};
function zN(t) {
  return t.nodeName.toLowerCase() === "span" ? t.style.fontSize === "26pt" : !1;
}
function Md(t) {
  let e = t.nodeName.toLowerCase(), n = null;
  return (e === "h1" || e === "h2" || e === "h3" || e === "h4" || e === "h5" || e === "h6") && (n = Jd(e), t.style !== null && n.setFormat(t.style.textAlign)), { node: n };
}
function Aye(t) {
  let e = tE();
  return t.style !== null && e.setFormat(t.style.textAlign), { node: e };
}
function Jd(t) {
  return ue.$applyNodeReplacement(new nE(t));
}
function Dye(t, e) {
  t.preventDefault(), e.update(() => {
    let n = ue.$getSelection(), i = t instanceof InputEvent || t instanceof KeyboardEvent ? null : t.clipboardData;
    i != null && n !== null && vw.$insertDataTransferForRichText(i, n, e);
  }, { tag: "paste" });
}
async function Pye(t, e) {
  await vw.copyToClipboard(e, wa.objectKlassEquals(t, ClipboardEvent) ? t : null), e.update(() => {
    let n = ue.$getSelection();
    ue.$isRangeSelection(n) ? n.removeText() : ue.$isNodeSelection(n) && n.getNodes().forEach((i) => i.remove());
  });
}
function eg(t) {
  let e = null;
  if (t instanceof DragEvent ? e = t.dataTransfer : t instanceof ClipboardEvent && (e = t.clipboardData), e === null) return [!1, [], !1];
  var n = e.types;
  return t = n.includes("Files"), n = n.includes("text/html") || n.includes("text/plain"), [t, Array.from(e.files), n];
}
function WN(t) {
  var e = ue.$getSelection();
  if (!ue.$isRangeSelection(e)) return !1;
  let n = /* @__PURE__ */ new Set();
  e = e.getNodes();
  for (let s = 0; s < e.length; s++) {
    var i = e[s], r = i.getKey();
    n.has(r) || (i = wa.$getNearestBlockElementAncestorOrThrow(i), r = i.getKey(), i.canIndent() && !n.has(r) && (n.add(r), t(i)));
  }
  return 0 < n.size;
}
function lb(t) {
  return t = ue.$getNearestNodeFromDOMNode(t), ue.$isDecoratorNode(t);
}
Ba.$createHeadingNode = Jd;
Ba.$createQuoteNode = tE;
Ba.$isHeadingNode = function(t) {
  return t instanceof nE;
};
Ba.$isQuoteNode = function(t) {
  return t instanceof eE;
};
Ba.DRAG_DROP_PASTE = E4;
Ba.HeadingNode = nE;
Ba.QuoteNode = eE;
Ba.eventFiles = eg;
Ba.registerRichText = function(t) {
  return wa.mergeRegister(
    t.registerCommand(ue.CLICK_COMMAND, () => {
      const e = ue.$getSelection();
      return ue.$isNodeSelection(e) ? (e.clear(), !0) : !1;
    }, 0),
    t.registerCommand(ue.DELETE_CHARACTER_COMMAND, (e) => {
      const n = ue.$getSelection();
      return ue.$isRangeSelection(n) ? (n.deleteCharacter(e), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.DELETE_WORD_COMMAND, (e) => {
      const n = ue.$getSelection();
      return ue.$isRangeSelection(n) ? (n.deleteWord(e), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.DELETE_LINE_COMMAND, (e) => {
      const n = ue.$getSelection();
      return ue.$isRangeSelection(n) ? (n.deleteLine(e), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.CONTROLLED_TEXT_INSERTION_COMMAND, (e) => {
      const n = ue.$getSelection();
      if (typeof e == "string") n !== null && n.insertText(e);
      else {
        if (n === null) return !1;
        const i = e.dataTransfer;
        i != null ? vw.$insertDataTransferForRichText(i, n, t) : ue.$isRangeSelection(n) && (e = e.data) && n.insertText(e);
      }
      return !0;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(
      ue.REMOVE_TEXT_COMMAND,
      () => {
        const e = ue.$getSelection();
        return ue.$isRangeSelection(e) ? (e.removeText(), !0) : !1;
      },
      ue.COMMAND_PRIORITY_EDITOR
    ),
    t.registerCommand(ue.FORMAT_TEXT_COMMAND, (e) => {
      const n = ue.$getSelection();
      return ue.$isRangeSelection(n) ? (n.formatText(e), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.FORMAT_ELEMENT_COMMAND, (e) => {
      var n = ue.$getSelection();
      if (!ue.$isRangeSelection(n) && !ue.$isNodeSelection(n)) return !1;
      n = n.getNodes();
      for (const i of n) n = wa.$findMatchingParent(i, (r) => ue.$isElementNode(r) && !r.isInline()), n !== null && n.setFormat(e);
      return !0;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.INSERT_LINE_BREAK_COMMAND, (e) => {
      const n = ue.$getSelection();
      return ue.$isRangeSelection(n) ? (n.insertLineBreak(e), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.INSERT_PARAGRAPH_COMMAND, () => {
      const e = ue.$getSelection();
      return ue.$isRangeSelection(e) ? (e.insertParagraph(), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.INSERT_TAB_COMMAND, () => (ue.$insertNodes([ue.$createTabNode()]), !0), ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.INDENT_CONTENT_COMMAND, () => WN((e) => {
      const n = e.getIndent();
      e.setIndent(n + 1);
    }), ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.OUTDENT_CONTENT_COMMAND, () => WN((e) => {
      const n = e.getIndent();
      0 < n && e.setIndent(n - 1);
    }), ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_ARROW_UP_COMMAND, (e) => {
      var n = ue.$getSelection();
      if (ue.$isNodeSelection(n) && !lb(e.target)) {
        if (e = n.getNodes(), 0 < e.length) return e[0].selectPrevious(), !0;
      } else if (ue.$isRangeSelection(n) && (n = ue.$getAdjacentNode(n.focus, !0), !e.shiftKey && ue.$isDecoratorNode(n) && !n.isIsolated() && !n.isInline())) return n.selectPrevious(), e.preventDefault(), !0;
      return !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_ARROW_DOWN_COMMAND, (e) => {
      var n = ue.$getSelection();
      if (ue.$isNodeSelection(n)) {
        if (e = n.getNodes(), 0 < e.length) return e[0].selectNext(0, 0), !0;
      } else if (ue.$isRangeSelection(n)) {
        let i = n.focus;
        if (i.key === "root" && i.offset === ue.$getRoot().getChildrenSize()) return e.preventDefault(), !0;
        if (n = ue.$getAdjacentNode(n.focus, !1), !e.shiftKey && ue.$isDecoratorNode(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
      }
      return !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_ARROW_LEFT_COMMAND, (e) => {
      const n = ue.$getSelection();
      if (ue.$isNodeSelection(n)) {
        var i = n.getNodes();
        if (0 < i.length) return e.preventDefault(), i[0].selectPrevious(), !0;
      }
      return ue.$isRangeSelection(n) && ab.$shouldOverrideDefaultCharacterSelection(n, !0) ? (i = e.shiftKey, e.preventDefault(), ab.$moveCharacter(n, i, !0), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_ARROW_RIGHT_COMMAND, (e) => {
      const n = ue.$getSelection();
      if (ue.$isNodeSelection(n) && !lb(e.target)) {
        var i = n.getNodes();
        if (0 < i.length) return e.preventDefault(), i[0].selectNext(0, 0), !0;
      }
      return ue.$isRangeSelection(n) ? (i = e.shiftKey, ab.$shouldOverrideDefaultCharacterSelection(n, !1) ? (e.preventDefault(), ab.$moveCharacter(n, i, !1), !0) : !1) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_BACKSPACE_COMMAND, (e) => {
      if (lb(e.target)) return !1;
      const n = ue.$getSelection();
      if (!ue.$isRangeSelection(n)) return !1;
      e.preventDefault(), { anchor: e } = n;
      const i = e.getNode();
      return n.isCollapsed() && e.offset === 0 && !ue.$isRootNode(i) && 0 < wa.$getNearestBlockElementAncestorOrThrow(i).getIndent() ? t.dispatchCommand(ue.OUTDENT_CONTENT_COMMAND, void 0) : t.dispatchCommand(ue.DELETE_CHARACTER_COMMAND, !0);
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_DELETE_COMMAND, (e) => {
      if (lb(e.target)) return !1;
      const n = ue.$getSelection();
      return ue.$isRangeSelection(n) ? (e.preventDefault(), t.dispatchCommand(ue.DELETE_CHARACTER_COMMAND, !1)) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_ENTER_COMMAND, (e) => {
      const n = ue.$getSelection();
      if (!ue.$isRangeSelection(n)) return !1;
      if (e !== null) {
        if (($ye || Tye || Nye) && Eye) return !1;
        if (e.preventDefault(), e.shiftKey) return t.dispatchCommand(ue.INSERT_LINE_BREAK_COMMAND, !1);
      }
      return t.dispatchCommand(ue.INSERT_PARAGRAPH_COMMAND, void 0);
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.KEY_ESCAPE_COMMAND, () => {
      const e = ue.$getSelection();
      return ue.$isRangeSelection(e) ? (t.blur(), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.DROP_COMMAND, (e) => {
      const [, n] = eg(e);
      if (0 < n.length) {
        var i = BN(e.clientX, e.clientY);
        if (i !== null) {
          const { offset: s, node: o } = i;
          var r = ue.$getNearestNodeFromDOMNode(o);
          if (r !== null) {
            if (i = ue.$createRangeSelection(), ue.$isTextNode(r)) i.anchor.set(r.getKey(), s, "text"), i.focus.set(r.getKey(), s, "text");
            else {
              const a = r.getParentOrThrow().getKey();
              r = r.getIndexWithinParent() + 1, i.anchor.set(a, r, "element"), i.focus.set(a, r, "element");
            }
            i = ue.$normalizeSelection__EXPERIMENTAL(i), ue.$setSelection(i);
          }
          t.dispatchCommand(E4, n);
        }
        return e.preventDefault(), !0;
      }
      return e = ue.$getSelection(), !!ue.$isRangeSelection(e);
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.DRAGSTART_COMMAND, (e) => {
      [e] = eg(e);
      const n = ue.$getSelection();
      return !(e && !ue.$isRangeSelection(n));
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.DRAGOVER_COMMAND, (e) => {
      var [n] = eg(e);
      const i = ue.$getSelection();
      return n && !ue.$isRangeSelection(i) ? !1 : (n = BN(e.clientX, e.clientY), n !== null && (n = ue.$getNearestNodeFromDOMNode(n.node), ue.$isDecoratorNode(n) && e.preventDefault()), !0);
    }, ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.SELECT_ALL_COMMAND, () => (ue.$selectAll(), !0), ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.COPY_COMMAND, (e) => (vw.copyToClipboard(t, wa.objectKlassEquals(e, ClipboardEvent) ? e : null), !0), ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.CUT_COMMAND, (e) => (Pye(e, t), !0), ue.COMMAND_PRIORITY_EDITOR),
    t.registerCommand(ue.PASTE_COMMAND, (e) => {
      const [, n, i] = eg(e);
      return 0 < n.length && !i ? (t.dispatchCommand(E4, n), !0) : ue.isSelectionCapturedInDecoratorInput(e.target) ? !1 : ue.$getSelection() !== null ? (Dye(e, t), !0) : !1;
    }, ue.COMMAND_PRIORITY_EDITOR)
  );
};
const Iye = Ba;
var rn = Iye;
class iE extends N.DecoratorNode {
}
function qc(t) {
  return t instanceof iE;
}
function Lye(t, e) {
  const n = `__${e}`, i = `${n}Editor`, r = t[i] || t[n];
  if (!r)
    return "";
  if (typeof r == "string")
    return r;
  if (typeof r == "number")
    return r.toString();
  if (typeof r.getEditorState == "function") {
    let s = "";
    return r.getEditorState().read(() => {
      s = N.$getRoot().getTextContent();
    }), s;
  }
  return "";
}
function Ir(t) {
  return {
    element: t.createElement("span"),
    type: "inner"
  };
}
const lo = "status:free,status:-free", CW = "status:-free", EW = "status:free", Yc = "", Rye = {
  web: {
    nonMember: !0,
    memberSegment: lo
  },
  email: {
    memberSegment: lo
  }
};
function Fc(t) {
  return t == null;
}
function bw() {
  return JSON.parse(JSON.stringify(Rye));
}
function rE(t) {
  return !Object.prototype.hasOwnProperty.call(t, "web") || !Object.prototype.hasOwnProperty.call(t, "email") || !Object.prototype.hasOwnProperty.call(t.web, "nonMember") || Fc(t.web.memberSegment) || Fc(t.email.memberSegment);
}
function TW(t) {
  return rE(t) ? t.showOnEmail === !1 || t.showOnWeb === !1 || t.emailOnly === !0 || t.segment !== "" : t.web.nonMember === !1 || t.web.memberSegment !== lo || t.email.memberSegment !== lo;
}
function sE(t) {
  if (!t || !rE(t))
    return t;
  const e = JSON.parse(JSON.stringify(t));
  return e.web ?? (e.web = {}), e.email ?? (e.email = {}), Fc(t.showOnWeb) && Fc(t.emailOnly) ? e.web = bw().web : Fc(t.emailOnly) ? (e.web.nonMember = t.showOnWeb, e.web.memberSegment = t.showOnWeb ? lo : Yc) : (e.web.nonMember = !t.emailOnly, e.web.memberSegment = t.emailOnly ? Yc : lo), Fc(t.showOnEmail) && Fc(t.emailOnly) ? e.email = bw().email : t.showOnEmail === !1 || t.segment === "status:-free+status:-paid" ? e.email.memberSegment = Yc : t.segment === "status:free" ? e.email.memberSegment = EW : t.segment === "status:paid" || t.segment === "status:-free" ? e.email.memberSegment = CW : t.segment || (e.email.memberSegment = lo), e;
}
function s0(t, e, n) {
  const i = t.element.ownerDocument, r = jye(t);
  return e = sE(e), n.target === "email" ? e.email.memberSegment === Yc ? Ir(i) : e.email.memberSegment === lo ? t : Fye(i, r, e.email) : e.web.nonMember === !1 && e.web.memberSegment === Yc ? Ir(i) : e.web.nonMember !== !0 || e.web.memberSegment !== lo ? Bye(i, r, e.web) : t;
}
function jye({
  element: t,
  type: e
}) {
  return e === "inner" ? t.innerHTML : e === "value" ? "value" in t ? t.value : "" : t.outerHTML;
}
function Fye(t, e, n) {
  const {
    memberSegment: i
  } = n, r = t.createElement("div");
  return r.innerHTML = e, r.setAttribute("data-gh-segment", i), r.classList.add("kg-visibility-wrapper"), {
    element: r,
    type: "html"
  };
}
function Bye(t, e, n) {
  const {
    nonMember: i,
    memberSegment: r
  } = n, s = `
<!--kg-gated-block:begin nonMember:${i} memberSegment:"${r}" -->${e}<!--kg-gated-block:end-->
`, o = t.createElement("textarea");
  return o.value = s, {
    element: o,
    type: "value"
  };
}
var zye = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  ALL_MEMBERS_SEGMENT: lo,
  FREE_MEMBERS_SEGMENT: EW,
  NO_MEMBERS_SEGMENT: Yc,
  PAID_MEMBERS_SEGMENT: CW,
  buildDefaultVisibility: bw,
  isOldVisibilityFormat: rE,
  isVisibilityRestricted: TW,
  migrateOldVisibilityFormat: sE,
  renderWithVisibility: s0
});
function Wye(t, e) {
  if (!t)
    throw new Error({
      message: '[generateDecoratorNode] A unique "nodeType" should be provided'
    });
  e.forEach((n) => {
    if (!("name" in n) || !("default" in n))
      throw new Error({
        message: '[generateDecoratorNode] Properties should have both "name" and "default" attributes.'
      });
    if (n.urlType && !["url", "html", "markdown"].includes(n.urlType))
      throw new Error({
        message: '[generateDecoratorNode] "urlType" should be either "url", "html" or "markdown"'
      });
    if ("wordCount" in n && typeof n.wordCount != "boolean")
      throw new Error({
        message: '[generateDecoratorNode] "wordCount" should be of boolean type.'
      });
  });
}
function Yn({
  nodeType: t,
  properties: e = [],
  defaultRenderFn: n,
  version: i = 1,
  hasVisibility: r = !1
}) {
  Wye(t, e), e = e.map((o) => ({
    ...o,
    privateName: `__${o.name}`
  })), r && e.push({
    name: "visibility",
    get default() {
      return bw();
    },
    privateName: "__visibility"
  });
  class s extends iE {
    constructor(a = {}, l) {
      super(l), e.forEach((u) => {
        typeof u.default == "boolean" ? this[u.privateName] = a[u.name] ?? u.default : this[u.privateName] = a[u.name] || u.default;
      });
    }
    /**
     * Returns the node's unique type
     * @extends DecoratorNode
     * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode
     * @returns {string}
     */
    static getType() {
      return t;
    }
    /**
     * Creates a copy of an existing node with all its properties
     * @extends DecoratorNode
     * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode
     */
    static clone(a) {
      return new this(a.getDataset(), a.__key);
    }
    /**
     * Returns default values for any properties, allowing our editor code
     * to detect when a property has been changed
     */
    static getPropertyDefaults() {
      return e.reduce((a, l) => (a[l.name] = l.default, a), {});
    }
    /**
     * Transforms URLs contained in the payload to relative paths (`__GHOST_URL__/relative/path/`),
     * so that URLs to be changed without having to update the database
     * @see https://github.com/TryGhost/SDK/tree/main/packages/url-utils
     */
    static get urlTransformMap() {
      let a = {};
      return e.forEach((l) => {
        l.urlType && (l.urlPath ? a[l.urlPath] = l.urlType : a[l.name] = l.urlType);
      }), a;
    }
    /**
     * Convenience method to get all properties of the node
     * @returns {Object} - The node's properties
     */
    getDataset() {
      const a = this.getLatest();
      let l = {};
      return e.forEach((u) => {
        l[u.name] = a[u.privateName];
      }), l;
    }
    /**
     * Converts JSON to a Lexical node
     * @see https://lexical.dev/docs/concepts/serialization#lexicalnodeimportjson
     * @extends DecoratorNode
     * @param {Object} serializedNode - Lexical's representation of the node, in JSON format
     */
    static importJSON(a) {
      const l = {};
      return a.visibility = sE(a.visibility), e.forEach((u) => {
        l[u.name] = a[u.name];
      }), new this(l);
    }
    /**
     * Serializes a Lexical node to JSON. The JSON content is then saved to the database.
     * @extends DecoratorNode
     * @see https://lexical.dev/docs/concepts/serialization#lexicalnodeexportjson
     */
    exportJSON() {
      return {
        type: t,
        version: i,
        ...e.reduce((l, u) => (l[u.name] = this[u.name], l), {})
      };
    }
    exportDOM(a = {}) {
      var f;
      const l = this.__version || i;
      if ((f = a.nodeRenderers) != null && f[t]) {
        const d = a.nodeRenderers[t];
        if (typeof d == "object") {
          const h = d[l];
          if (!h)
            throw new Error(`[generateDecoratorNode] ${t}: options.nodeRenderers['${t}'] for version ${l} is required`);
          return h(this, a);
        } else
          return d(this, a);
      }
      if (typeof n == "object") {
        const d = n[l];
        if (!d)
          throw new Error(`[generateDecoratorNode] ${t}: "defaultRenderFn" for version ${l} is required`);
        return d(this, a);
      }
      if (!n)
        throw new Error(`[generateDecoratorNode] ${t}: "defaultRenderFn" is required`);
      return n(this, a);
    }
    /* c8 ignore start */
    /**
     * Inserts node in the DOM. Required when extending the DecoratorNode.
     * @extends DecoratorNode
     * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode
     */
    createDOM() {
      return document.createElement("div");
    }
    /**
     * Required when extending the DecoratorNode
     * @extends DecoratorNode
     * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode
     */
    updateDOM() {
      return !1;
    }
    /**
     * Defines whether a node is a top-level block.
     * @see https://lexical.dev/docs/api/classes/lexical.DecoratorNode#isinline
     */
    isInline() {
      return !1;
    }
    /* c8 ignore stop */
    /**
     * Defines whether a node has dynamic data that needs to be fetched from the server when rendering
     */
    hasDynamicData() {
      return !1;
    }
    /**
     * Defines whether a node has an edit mode in the editor UI
     */
    hasEditMode() {
      return !0;
    }
    /*
    * Returns the text content of the node, used by the editor to calculate the word count
    * This method filters out properties without `wordCount: true`
    */
    getTextContent() {
      const a = this.getLatest(), u = e.filter((f) => !!f.wordCount).map((f) => Lye(a, f.name)).filter(Boolean).join(`
`);
      return u ? `${u}

` : "";
    }
    /**
     * Returns true/false for whether the node's visibility property
     * is active or not. Always false if a node has no visibility property
     * @returns {boolean}
     */
    getIsVisibilityActive() {
      if (!e.some((u) => u.name === "visibility"))
        return !1;
      const l = this.getLatest().__visibility;
      return TW(l);
    }
  }
  return e.forEach((o) => {
    Object.defineProperty(s.prototype, o.name, {
      get: function() {
        return this.getLatest()[o.privateName];
      },
      set: function(a) {
        const l = this.getWritable();
        l[o.privateName] = a;
      }
    });
  }), s;
}
function $W(t) {
  return function(n, i = {}) {
    return mi(n, {
      createDocument: (s) => {
        const o = t.ownerDocument.implementation.createHTMLDocument();
        return o.body.innerHTML = s, o;
      },
      ...i
    });
  };
}
function Io(t, {
  selector: e = "figcaption"
} = {}) {
  const n = $W(t);
  let i;
  const r = Array.from(t.querySelectorAll(e));
  return r.length && r.forEach((s) => {
    const o = n(s.innerHTML);
    i = i ? `${i} / ${o}` : o;
  }), i;
}
function yw(t) {
  const e = {};
  if (t.src && (e.src = t.src), t.width ? e.width = t.width : t.dataset && t.dataset.width && (e.width = parseInt(t.dataset.width, 10)), t.height ? e.height = t.height : t.dataset && t.dataset.height && (e.height = parseInt(t.dataset.height, 10)), !t.width && !t.height && t.getAttribute("data-image-dimensions")) {
    const [, n, i] = /^(\d*)x(\d*)$/gi.exec(t.getAttribute("data-image-dimensions"));
    e.width = parseInt(n, 10), e.height = parseInt(i, 10);
  }
  if (t.alt && (e.alt = t.alt), t.title && (e.title = t.title), t.parentNode.tagName === "A") {
    const n = t.parentNode.href;
    n !== e.src && (e.href = n);
  }
  return e;
}
function Hye(t) {
  return {
    img: () => ({
      conversion(e) {
        if (e.tagName === "IMG") {
          const {
            src: n,
            width: i,
            height: r,
            alt: s,
            title: o,
            href: a
          } = yw(e);
          return {
            node: new t({
              alt: s,
              src: n,
              title: o,
              width: i,
              height: r,
              href: a
            })
          };
        }
        return null;
      },
      priority: 1
    }),
    figure: (e) => {
      const n = e.querySelector("img");
      return n ? {
        conversion(i) {
          const r = i.className.match(/kg-width-(wide|full)/), s = i.className.match(/graf--layout(FillWidth|OutsetCenter)/);
          if (!n)
            return null;
          const o = yw(n);
          r ? o.cardWidth = r[1] : s && (o.cardWidth = s[1] === "FillWidth" ? "full" : "wide"), o.caption = Io(i);
          const {
            src: a,
            width: l,
            height: u,
            alt: f,
            title: d,
            caption: h,
            cardWidth: m,
            href: g
          } = o;
          return {
            node: new t({
              alt: f,
              src: a,
              title: d,
              width: l,
              height: u,
              caption: h,
              cardWidth: m,
              href: g
            })
          };
        },
        priority: 0
        // since we are generically parsing figure elements, we want this to run after others (like the gallery)
      } : null;
    }
  };
}
const oE = function(t, e) {
  const n = Object.values(e).map(({
    width: r
  }) => r).sort((r, s) => r - s), i = n.filter((r) => r <= t.width);
  return t.width > i[i.length - 1] && t.width < n[n.length - 1] && i.push(t.width), i;
}, gf = function(t, e = "") {
  const n = e.replace(/\/$/, ""), i = t.replace(n, "");
  return /^(\/.*|__GHOST_URL__)\/?content\/images\//.test(i);
}, MW = function(t) {
  return /images\.unsplash\.com/.test(t);
}, NW = function({
  src: t,
  width: e,
  options: n
}) {
  if (!n.imageOptimization || n.imageOptimization.srcsets === !1 || !e || !n.imageOptimization.contentImageSizes || gf(t, n.siteUrl) && n.canTransformImage && !n.canTransformImage(t))
    return;
  const i = oE({
    width: e
  }, n.imageOptimization.contentImageSizes);
  if (gf(t, n.siteUrl)) {
    const [, r, s] = t.match(/(.*\/content\/images)\/(.*)/), o = [];
    if (i.forEach((a) => {
      a === e ? o.push(`${t} ${a}w`) : a <= e && o.push(`${r}/size/w${a}/${s} ${a}w`);
    }), o.length)
      return o.join(", ");
  }
  if (MW(t)) {
    const r = new URL(t), s = [];
    return i.forEach((o) => {
      r.searchParams.set("w", o), s.push(`${r.href} ${o}w`);
    }), s.join(", ");
  }
}, AW = function(t, e, n) {
  if (!t || !["IMG", "SOURCE"].includes(t.tagName) || !t.getAttribute("src") || !e)
    return;
  const {
    src: i,
    width: r
  } = e, s = NW({
    src: i,
    width: r,
    options: n
  });
  s && t.setAttribute("srcset", s);
}, Eh = function(t, {
  width: e,
  height: n
} = {}) {
  const {
    width: i,
    height: r
  } = t, s = i / r;
  if (e) {
    const o = Math.round(e / s);
    return {
      width: e,
      height: o
    };
  }
  if (n)
    return {
      width: Math.round(n * s),
      height: n
    };
};
function Vn(t) {
  if (!t.createDocument && t.dom && (t.createDocument = function() {
    return t.dom.window.document;
  }), !t.createDocument) {
    let e = typeof window < "u" && window.document;
    if (!e)
      throw new Error("Must be passed a `createDocument` function as an option when used in a non-browser environment");
    t.createDocument = function() {
      return e;
    };
  }
}
function Qye(t, e = {}) {
  var l;
  Vn(e);
  const n = e.createDocument();
  if (!t.src || t.src.trim() === "")
    return Ir(n);
  const i = n.createElement("figure");
  let r = "kg-card kg-image-card";
  t.cardWidth !== "regular" && (r += ` kg-width-${t.cardWidth}`), t.caption && (r += " kg-card-hascaption"), i.setAttribute("class", r);
  const s = n.createElement("img");
  s.setAttribute("src", t.src), s.setAttribute("class", "kg-image"), s.setAttribute("alt", t.alt), s.setAttribute("loading", "lazy"), t.title && s.setAttribute("title", t.title), t.width && t.height && (s.setAttribute("width", t.width), s.setAttribute("height", t.height));
  const {
    canTransformImage: o
  } = e, {
    defaultMaxWidth: a
  } = e.imageOptimization || {};
  if (a && t.width > a && gf(t.src, e.siteUrl) && o && o(t.src)) {
    const u = {
      width: t.width,
      height: t.height
    }, {
      width: f,
      height: d
    } = Eh(u, {
      width: a
    });
    s.setAttribute("width", f), s.setAttribute("height", d);
  }
  if (e.target !== "email") {
    const u = {
      src: t.src,
      width: t.width,
      height: t.height
    };
    AW(s, u, e), s.getAttribute("srcset") && t.width && t.width >= 720 && ((!t.cardWidth || t.cardWidth === "regular") && s.setAttribute("sizes", "(min-width: 720px) 720px"), t.cardWidth === "wide" && t.width >= 1200 && s.setAttribute("sizes", "(min-width: 1200px) 1200px"));
  }
  if (e.target === "email" && t.width && t.height) {
    let u = {
      width: t.width,
      height: t.height
    };
    if (t.width >= 600 && (u = Eh(u, {
      width: 600
    })), s.setAttribute("width", u.width), s.setAttribute("height", u.height), gf(t.src, e.siteUrl) && ((l = e.canTransformImage) != null && l.call(e, t.src))) {
      const d = oE(t, e.imageOptimization.contentImageSizes).find((h) => h >= 1200);
      if (!(!d || d === t.width)) {
        const [, h, m] = t.src.match(/(.*\/content\/images)\/(.*)/);
        s.setAttribute("src", `${h}/size/w${d}/${m}`);
      }
    }
  }
  if (t.href) {
    const u = n.createElement("a");
    u.setAttribute("href", t.href), u.appendChild(s), i.appendChild(u);
  } else
    i.appendChild(s);
  if (t.caption) {
    const u = n.createElement("figcaption");
    u.innerHTML = t.caption, i.appendChild(u);
  }
  return {
    element: i
  };
}
let h1 = class extends Yn({
  nodeType: "image",
  properties: [{
    name: "src",
    default: "",
    urlType: "url"
  }, {
    name: "caption",
    default: "",
    urlType: "html",
    wordCount: !0
  }, {
    name: "title",
    default: ""
  }, {
    name: "alt",
    default: ""
  }, {
    name: "cardWidth",
    default: "regular"
  }, {
    name: "width",
    default: null
  }, {
    name: "height",
    default: null
  }, {
    name: "href",
    default: "",
    urlType: "url"
  }],
  defaultRenderFn: Qye
}) {
  /* @override */
  exportJSON() {
    const {
      src: e,
      width: n,
      height: i,
      title: r,
      alt: s,
      caption: o,
      cardWidth: a,
      href: l
    } = this;
    return {
      type: "image",
      version: 1,
      src: e && e.startsWith("data:") ? "<base64String>" : e,
      width: n,
      height: i,
      title: r,
      alt: s,
      caption: o,
      cardWidth: a,
      href: l
    };
  }
  static importDOM() {
    return Hye(this);
  }
  hasEditMode() {
    return !1;
  }
};
const Uye = (t) => new h1(t);
function Zye(t) {
  return t instanceof h1;
}
function qye(t) {
  return {
    figure: (e) => {
      const n = e.querySelector("pre");
      return e.tagName === "FIGURE" && n ? {
        conversion(i) {
          let r = n.querySelector("code"), s = i.querySelector("figcaption");
          if (!r || !s)
            return null;
          let o = {
            code: r.textContent,
            caption: Io(i)
          }, a = n.getAttribute("class") || "", l = r.getAttribute("class") || "", u = /lang(?:uage)?-(.*?)(?:\s|$)/i, f = a.match(u) || l.match(u);
          return f && (o.language = f[1].toLowerCase()), {
            node: new t(o)
          };
        },
        priority: 2
        // falls back to pre if no caption
      } : null;
    },
    pre: () => ({
      conversion(e) {
        if (e.tagName === "PRE") {
          let [n] = e.children;
          if (n && n.tagName === "CODE") {
            let i = {
              code: n.textContent
            }, r = e.getAttribute("class") || "", s = n.getAttribute("class") || "", o = /lang(?:uage)?-(.*?)(?:\s|$)/i, a = r.match(o) || s.match(o);
            return a && (i.language = a[1].toLowerCase()), {
              node: new t(i)
            };
          }
        }
        return null;
      },
      priority: 1
    })
  };
}
function Yye(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  if (!t.code || t.code.trim() === "")
    return Ir(n);
  const i = n.createElement("pre"), r = n.createElement("code");
  if (t.language && r.setAttribute("class", `language-${t.language}`), r.appendChild(n.createTextNode(t.code)), i.appendChild(r), t.caption) {
    let s = n.createElement("figure");
    s.setAttribute("class", "kg-card kg-code-card"), s.appendChild(i);
    let o = n.createElement("figcaption");
    return o.innerHTML = t.caption, s.appendChild(o), {
      element: s
    };
  } else
    return {
      element: i
    };
}
let p1 = class extends Yn({
  nodeType: "codeblock",
  properties: [{
    name: "code",
    default: "",
    wordCount: !0
  }, {
    name: "language",
    default: ""
  }, {
    name: "caption",
    default: "",
    urlType: "html",
    wordCount: !0
  }],
  defaultRenderFn: Yye
}) {
  static importDOM() {
    return qye(this);
  }
  isEmpty() {
    return !this.__code;
  }
};
function Vye(t) {
  return new p1(t);
}
function Xye(t) {
  return t instanceof p1;
}
function Gye(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = Aue.render(t.markdown || "", e), r = n.createElement("div");
  return r.innerHTML = i, {
    element: r,
    type: "inner"
  };
}
let m1 = class extends Yn({
  nodeType: "markdown",
  properties: [{
    name: "markdown",
    default: "",
    urlType: "markdown",
    wordCount: !0
  }],
  defaultRenderFn: Gye
}) {
  isEmpty() {
    return !this.__markdown;
  }
};
function Kye(t) {
  return new m1(t);
}
function Jye(t) {
  return t instanceof m1;
}
function ewe(t) {
  return {
    figure: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-video-card");
      return e.tagName === "FIGURE" && n ? {
        conversion(r) {
          const s = r.querySelector(".kg-video-container video"), o = r.querySelector(".kg-video-duration"), a = s && s.src, l = s && s.width, u = s && s.height, f = o && o.innerHTML.trim(), d = Io(r);
          if (!a)
            return null;
          const h = {
            src: a,
            loop: !!s.loop,
            cardWidth: twe(s)
          };
          if (f) {
            const [g, w] = f.split(":");
            try {
              h.duration = parseInt(g) * 60 + parseInt(w);
            } catch {
            }
          }
          return r.dataset.kgThumbnail && (h.thumbnailSrc = r.dataset.kgThumbnail), r.dataset.kgCustomThumbnail && (h.customThumbnailSrc = r.dataset.kgCustomThumbnail), d && (h.caption = d), l && (h.width = l), u && (h.height = u), {
            node: new t(h)
          };
        },
        priority: 1
      } : null;
    }
  };
}
function twe(t) {
  return t.classList.contains("kg-width-full") ? "full" : t.classList.contains("kg-width-wide") ? "wide" : "regular";
}
function nwe(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  if (!t.src || t.src.trim() === "")
    return Ir(n);
  const i = swe(t).join(" "), r = e.target === "email" ? rwe({
    node: t,
    options: e,
    cardClasses: i
  }) : iwe({
    node: t,
    cardClasses: i
  }), s = n.createElement("div");
  return s.innerHTML = r.trim(), {
    element: s.firstElementChild
  };
}
function iwe({
  node: t,
  cardClasses: e
}) {
  const n = t.width, i = t.height, r = `https://img.spacergif.org/v1/${n}x${i}/0a/spacer.png`, s = t.loop ? "loop autoplay muted" : "", o = t.customThumbnailSrc || t.thumbnailSrc, a = t.loop ? " kg-video-hide" : "";
  return `
        <figure class="${e}" data-kg-thumbnail=${t.thumbnailSrc} data-kg-custom-thumbnail=${t.customThumbnailSrc}>
            <div class="kg-video-container">
                <video
                    src="${t.src}"
                    poster="${r}"
                    width="${n}"
                    height="${i}"
                    ${s}
                    playsinline
                    preload="metadata"
                    style="background: transparent url('${o}') 50% 50% / cover no-repeat;"
                ></video>
                <div class="kg-video-overlay">
                    <button class="kg-video-large-play-icon" aria-label="Play video">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                            <path d="M23.14 10.608 2.253.164A1.559 1.559 0 0 0 0 1.557v20.887a1.558 1.558 0 0 0 2.253 1.392L23.14 13.393a1.557 1.557 0 0 0 0-2.785Z"/>
                        </svg>
                    </button>
                </div>
                <div class="kg-video-player-container${a}">
                    <div class="kg-video-player">
                        <button class="kg-video-play-icon" aria-label="Play video">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                                <path d="M23.14 10.608 2.253.164A1.559 1.559 0 0 0 0 1.557v20.887a1.558 1.558 0 0 0 2.253 1.392L23.14 13.393a1.557 1.557 0 0 0 0-2.785Z"></path>
                            </svg>
                        </button>
                        <button class="kg-video-pause-icon kg-video-hide" aria-label="Pause video">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                                <rect x="3" y="1" width="7" height="22" rx="1.5" ry="1.5"></rect>
                                <rect x="14" y="1" width="7" height="22" rx="1.5" ry="1.5"></rect>
                            </svg>
                        </button>
                        <span class="kg-video-current-time">0:00</span>
                        <div class="kg-video-time">
                            /<span class="kg-video-duration">${t.formattedDuration}</span>
                        </div>
                        <input type="range" class="kg-video-seek-slider" max="100" value="0">
                        <button class="kg-video-playback-rate" aria-label="Adjust playback speed">1&#215;</button>
                        <button class="kg-video-unmute-icon" aria-label="Unmute">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                                <path d="M15.189 2.021a9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h1.794a.249.249 0 0 1 .221.133 9.73 9.73 0 0 0 7.924 4.85h.06a1 1 0 0 0 1-1V3.02a1 1 0 0 0-1.06-.998Z"></path>
                            </svg>
                        </button>
                        <button class="kg-video-mute-icon kg-video-hide" aria-label="Mute">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                                <path d="M16.177 4.3a.248.248 0 0 0 .073-.176v-1.1a1 1 0 0 0-1.061-1 9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h.114a.251.251 0 0 0 .177-.073ZM23.707 1.706A1 1 0 0 0 22.293.292l-22 22a1 1 0 0 0 0 1.414l.009.009a1 1 0 0 0 1.405-.009l6.63-6.631A.251.251 0 0 1 8.515 17a.245.245 0 0 1 .177.075 10.081 10.081 0 0 0 6.5 2.92 1 1 0 0 0 1.061-1V9.266a.247.247 0 0 1 .073-.176Z"></path>
                            </svg>
                        </button>
                        <input type="range" class="kg-video-volume-slider" max="100" value="100"/>
                    </div>
                </div>
            </div>
            ${t.caption ? `<figcaption>${t.caption}</figcaption>` : ""}
        </figure>
    `;
}
function rwe({
  node: t,
  options: e,
  cardClasses: n
}) {
  const i = t.customThumbnailSrc || t.thumbnailSrc, r = 600, s = t.width / t.height, o = Math.round(r / 4), a = Math.round(r / s), l = `https://img.spacergif.org/v1/${o}x${a}/0a/spacer.png`, u = Math.round(r / 2 - 39), f = Math.round(a / 2 - 39), d = Math.round(r / 2 - 11), h = Math.round(a / 2 - 17);
  return `
         <figure class="${n}">
            <!--[if !mso !vml]-->
            <a class="kg-video-preview" href="${e.postUrl}" aria-label="Play video" style="mso-hide: all">
                <table
                    cellpadding="0"
                    cellspacing="0"
                    border="0"
                    width="100%"
                    background="${i}"
                    role="presentation"
                    style="background: url('${i}') left top / cover; mso-hide: all"
                >
                    <tr style="mso-hide: all">
                        <td width="25%" style="visibility: hidden; mso-hide: all">
                            <img src="${l}" alt="" width="100%" border="0" style="display:block; height: auto; opacity: 0; visibility: hidden; mso-hide: all;">
                        </td>
                        <td width="50%" align="center" valign="middle" style="vertical-align: middle; mso-hide: all;">
                            <div class="kg-video-play-button" style="mso-hide: all"><div style="mso-hide: all"></div></div>
                        </td>
                        <td width="25%" style="mso-hide: all">&nbsp;</td>
                    </tr>
                </table>
            </a>
            <!--[endif]-->

            <!--[if vml]>
            <v:group xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" coordsize="${r},${a}" coordorigin="0,0" href="${e.postUrl}" style="width:${r}px;height:${a}px;">
                <v:rect fill="t" stroked="f" style="position:absolute;width:${r};height:${a};"><v:fill src="${i}" type="frame"/></v:rect>
                <v:oval fill="t" strokecolor="white" strokeweight="4px" style="position:absolute;left:${u};top:${f};width:78;height:78"><v:fill color="black" opacity="30%" /></v:oval>
                <v:shape coordsize="24,32" path="m,l,32,24,16,xe" fillcolor="white" stroked="f" style="position:absolute;left:${d};top:${h};width:30;height:34;" />
            </v:group>
            <![endif]-->

            ${t.caption ? `<figcaption>${t.caption}</figcaption>` : ""}
        </figure>
        `;
}
function swe(t) {
  let e = ["kg-card kg-video-card"];
  return t.cardWidth && e.push(`kg-width-${t.cardWidth}`), t.caption && e.push("kg-card-hascaption"), e;
}
let g1 = class extends Yn({
  nodeType: "video",
  properties: [{
    name: "src",
    default: "",
    urlType: "url"
  }, {
    name: "caption",
    default: "",
    urlType: "html",
    wordCount: !0
  }, {
    name: "fileName",
    default: ""
  }, {
    name: "mimeType",
    default: ""
  }, {
    name: "width",
    default: null
  }, {
    name: "height",
    default: null
  }, {
    name: "duration",
    default: 0
  }, {
    name: "thumbnailSrc",
    default: "",
    urlType: "url"
  }, {
    name: "customThumbnailSrc",
    default: "",
    urlType: "url"
  }, {
    name: "thumbnailWidth",
    default: null
  }, {
    name: "thumbnailHeight",
    default: null
  }, {
    name: "cardWidth",
    default: "regular"
  }, {
    name: "loop",
    default: !1
  }],
  defaultRenderFn: nwe
}) {
  /* override */
  exportJSON() {
    const {
      src: e,
      caption: n,
      fileName: i,
      mimeType: r,
      width: s,
      height: o,
      duration: a,
      thumbnailSrc: l,
      customThumbnailSrc: u,
      thumbnailWidth: f,
      thumbnailHeight: d,
      cardWidth: h,
      loop: m
    } = this;
    return {
      type: "video",
      version: 1,
      src: e && e.startsWith("data:") ? "<base64String>" : e,
      caption: n,
      fileName: i,
      mimeType: r,
      width: s,
      height: o,
      duration: a,
      thumbnailSrc: l,
      customThumbnailSrc: u,
      thumbnailWidth: f,
      thumbnailHeight: d,
      cardWidth: h,
      loop: m
    };
  }
  static importDOM() {
    return ewe(this);
  }
  get formattedDuration() {
    const e = Math.floor(this.duration / 60), n = Math.floor(this.duration - e * 60), i = String(n).padStart(2, "0");
    return `${e}:${i}`;
  }
};
const owe = (t) => new g1(t);
function awe(t) {
  return t instanceof g1;
}
function lwe(t) {
  return {
    div: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-audio-card");
      return e.tagName === "DIV" && n ? {
        conversion(r) {
          const s = r == null ? void 0 : r.querySelector(".kg-audio-title"), o = r == null ? void 0 : r.querySelector(".kg-audio-player-container audio"), a = r == null ? void 0 : r.querySelector(".kg-audio-duration"), l = r == null ? void 0 : r.querySelector(".kg-audio-thumbnail"), u = s && s.innerHTML.trim(), f = o && o.src, d = l && l.src, h = a && a.innerHTML.trim(), m = {
            src: f,
            title: u
          };
          if (d && (m.thumbnailSrc = d), h) {
            const [w, x = 0] = h.split(":");
            try {
              m.duration = parseInt(w) * 60 + parseInt(x);
            } catch {
            }
          }
          return {
            node: new t(m)
          };
        },
        priority: 1
      } : null;
    }
  };
}
function uwe(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  if (!t.src || t.src.trim() === "")
    return Ir(n);
  const i = dwe(t), r = hwe(t);
  return e.target === "email" ? fwe(t, n, e, i, r) : cwe(t, n, i, r);
}
function cwe(t, e, n, i) {
  const r = e.createElement("div");
  r.setAttribute("class", "kg-card kg-audio-card");
  const s = e.createElement("img");
  s.src = t.thumbnailSrc, s.alt = "audio-thumbnail", s.setAttribute("class", n), r.appendChild(s);
  const o = e.createElement("div");
  o.setAttribute("class", i);
  const a = e.createElementNS("http://www.w3.org/2000/svg", "svg");
  a.setAttribute("width", "24"), a.setAttribute("height", "24"), a.setAttribute("fill", "none");
  const l = e.createElementNS("http://www.w3.org/2000/svg", "path");
  l.setAttribute("fill-rule", "evenodd"), l.setAttribute("clip-rule", "evenodd"), l.setAttribute("d", "M7.5 15.33a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm-2.25.75a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0ZM15 13.83a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm-2.25.75a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0Z"), a.appendChild(l);
  const u = e.createElementNS("http://www.w3.org/2000/svg", "path");
  u.setAttribute("fill-rule", "evenodd"), u.setAttribute("clip-rule", "evenodd"), u.setAttribute("d", "M14.486 6.81A2.25 2.25 0 0 1 17.25 9v5.579a.75.75 0 0 1-1.5 0v-5.58a.75.75 0 0 0-.932-.727.755.755 0 0 1-.059.013l-4.465.744a.75.75 0 0 0-.544.72v6.33a.75.75 0 0 1-1.5 0v-6.33a2.25 2.25 0 0 1 1.763-2.194l4.473-.746Z"), a.appendChild(u);
  const f = e.createElementNS("http://www.w3.org/2000/svg", "path");
  f.setAttribute("fill-rule", "evenodd"), f.setAttribute("clip-rule", "evenodd"), f.setAttribute("d", "M3 1.5a.75.75 0 0 0-.75.75v19.5a.75.75 0 0 0 .75.75h18a.75.75 0 0 0 .75-.75V5.133a.75.75 0 0 0-.225-.535l-.002-.002-3-2.883A.75.75 0 0 0 18 1.5H3ZM1.409.659A2.25 2.25 0 0 1 3 0h15a2.25 2.25 0 0 1 1.568.637l.003.002 3 2.883a2.25 2.25 0 0 1 .679 1.61V21.75A2.25 2.25 0 0 1 21 24H3a2.25 2.25 0 0 1-2.25-2.25V2.25c0-.597.237-1.169.659-1.591Z"), a.appendChild(f), o.appendChild(a), r.appendChild(o);
  const d = e.createElement("div");
  d.setAttribute("class", "kg-audio-player-container");
  const h = e.createElement("audio");
  h.setAttribute("src", t.src), h.setAttribute("preload", "metadata"), d.appendChild(h);
  const m = e.createElement("div");
  m.setAttribute("class", "kg-audio-title"), m.textContent = t.title, d.appendChild(m);
  const g = e.createElement("div");
  g.setAttribute("class", "kg-audio-player");
  const w = e.createElement("button");
  w.setAttribute("class", "kg-audio-play-icon"), w.setAttribute("aria-label", "Play audio");
  const x = e.createElementNS("http://www.w3.org/2000/svg", "svg");
  x.setAttribute("viewBox", "0 0 24 24");
  const _ = e.createElementNS("http://www.w3.org/2000/svg", "path");
  _.setAttribute("d", "M23.14 10.608 2.253.164A1.559 1.559 0 0 0 0 1.557v20.887a1.558 1.558 0 0 0 2.253 1.392L23.14 13.393a1.557 1.557 0 0 0 0-2.785Z"), x.appendChild(_), w.appendChild(x), g.appendChild(w);
  const S = e.createElement("button");
  S.setAttribute("class", "kg-audio-pause-icon kg-audio-hide"), S.setAttribute("aria-label", "Pause audio");
  const C = e.createElementNS("http://www.w3.org/2000/svg", "svg");
  C.setAttribute("viewBox", "0 0 24 24");
  const E = e.createElementNS("http://www.w3.org/2000/svg", "rect");
  E.setAttribute("x", "3"), E.setAttribute("y", "1"), E.setAttribute("width", "7"), E.setAttribute("height", "22"), E.setAttribute("rx", "1.5"), E.setAttribute("ry", "1.5"), C.appendChild(E);
  const M = e.createElementNS("http://www.w3.org/2000/svg", "rect");
  M.setAttribute("x", "14"), M.setAttribute("y", "1"), M.setAttribute("width", "7"), M.setAttribute("height", "22"), M.setAttribute("rx", "1.5"), M.setAttribute("ry", "1.5"), C.appendChild(M), S.appendChild(C), g.appendChild(S);
  const $ = e.createElement("span");
  $.setAttribute("class", "kg-audio-current-time"), $.textContent = "0:00", g.appendChild($);
  const P = e.createElement("div");
  P.setAttribute("class", "kg-audio-time"), P.textContent = "/";
  const W = e.createElement("span");
  W.setAttribute("class", "kg-audio-duration"), W.textContent = t.duration, P.appendChild(W), g.appendChild(P);
  const z = e.createElement("input");
  z.setAttribute("type", "range"), z.setAttribute("class", "kg-audio-seek-slider"), z.setAttribute("max", "100"), z.setAttribute("value", "0"), g.appendChild(z);
  const Z = e.createElement("button");
  Z.setAttribute("class", "kg-audio-playback-rate"), Z.setAttribute("aria-label", "Adjust playback speed"), Z.innerHTML = "1&#215;", g.appendChild(Z);
  const L = e.createElement("button");
  L.setAttribute("class", "kg-audio-unmute-icon"), L.setAttribute("aria-label", "Unmute");
  const Q = e.createElementNS("http://www.w3.org/2000/svg", "svg");
  Q.setAttribute("viewBox", "0 0 24 24");
  const V = e.createElementNS("http://www.w3.org/2000/svg", "path");
  V.setAttribute("d", "M15.189 2.021a9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h1.794a.249.249 0 0 1 .221.133 9.73 9.73 0 0 0 7.924 4.85h.06a1 1 0 0 0 1-1V3.02a1 1 0 0 0-1.06-.998Z"), Q.appendChild(V), L.appendChild(Q), g.appendChild(L);
  const H = e.createElement("button");
  H.setAttribute("class", "kg-audio-mute-icon kg-audio-hide"), H.setAttribute("aria-label", "Mute");
  const R = e.createElementNS("http://www.w3.org/2000/svg", "svg");
  R.setAttribute("viewBox", "0 0 24 24");
  const q = e.createElementNS("http://www.w3.org/2000/svg", "path");
  q.setAttribute("d", "M16.177 4.3a.248.248 0 0 0 .073-.176v-1.1a1 1 0 0 0-1.061-1 9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h.114a.251.251 0 0 0 .177-.073ZM23.707 1.706A1 1 0 0 0 22.293.292l-22 22a1 1 0 0 0 0 1.414l.009.009a1 1 0 0 0 1.405-.009l6.63-6.631A.251.251 0 0 1 8.515 17a.245.245 0 0 1 .177.075 10.081 10.081 0 0 0 6.5 2.92 1 1 0 0 0 1.061-1V9.266a.247.247 0 0 1 .073-.176Z"), R.appendChild(q), H.appendChild(R), g.appendChild(H);
  const Y = e.createElement("input");
  return Y.setAttribute("type", "range"), Y.setAttribute("class", "kg-audio-volume-slider"), Y.setAttribute("max", "100"), Y.setAttribute("value", "100"), g.appendChild(Y), d.appendChild(g), r.appendChild(d), {
    element: r
  };
}
function fwe(t, e, n, i, r) {
  const s = `
        <table cellspacing="0" cellpadding="0" border="0" class="kg-audio-card">
                <tr>
                    <td>
                        <table cellspacing="0" cellpadding="0" border="0" width="100%">
                            <tr>
                                <td width="60">
                                    <a href="${n.postUrl}" style="display: block; width: 60px; height: 60px; padding-top: 4px; padding-right: 16px; padding-bottom: 4px; padding-left: 4px; border-radius: 2px;">
                                        ${t.thumbnailSrc ? `
                                        <img src="${t.thumbnailSrc}" class="${i}" style="width: 60px; height: 60px; object-fit: cover; border: 0; border-radius: 2px;">
                                        ` : `
                                        <img src="https://static.ghost.org/v4.0.0/images/audio-file-icon.png" class="${r}" style="width: 24px; height: 24px; padding: 18px; border-radius: 2px;">
                                        `}
                                    </a>
                                </td>
                                <td style="position: relative; vertical-align: center;" valign="middle">
                                    <a href="${n.postUrl}" style="position: absolute; display: block; top: 0; right: 0; bottom: 0; left: 0;"></a>
                                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                        <tr>
                                            <td>
                                                <a href="${n.postUrl}" class="kg-audio-title">${t.title}</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                                    <tr>
                                                        <td width="24" style="vertical-align: middle;" valign="middle">
                                                            <a href="${n.postUrl}" class="kg-audio-play-button"></a>
                                                        </td>
                                                        <td style="vertical-align: middle;" valign="middle">
                                                            <a href="${n.postUrl}" class="kg-audio-duration">${pwe(t.duration)}<span class="kg-audio-link"> • Click to play audio</span></a>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            `, o = e.createElement("div");
  return o.innerHTML = s.trim(), {
    element: o.firstElementChild
  };
}
function dwe(t) {
  let e = "kg-audio-thumbnail";
  return t.thumbnailSrc || (e += " kg-audio-hide"), e;
}
function hwe(t) {
  let e = "kg-audio-thumbnail placeholder";
  return t.thumbnailSrc && (e += " kg-audio-hide"), e;
}
function pwe(t = 200) {
  const e = Math.floor(t / 60), n = Math.floor(t - e * 60), i = String(n).padStart(2, "0");
  return `${e}:${i}`;
}
let v1 = class extends Yn({
  nodeType: "audio",
  properties: [{
    name: "duration",
    default: 0
  }, {
    name: "mimeType",
    default: ""
  }, {
    name: "src",
    default: "",
    urlType: "url"
  }, {
    name: "title",
    default: ""
  }, {
    name: "thumbnailSrc",
    default: ""
  }],
  defaultRenderFn: uwe
}) {
  static importDOM() {
    return lwe(this);
  }
};
const mwe = (t) => new v1(t);
function gwe(t) {
  return t instanceof v1;
}
function DW(t, e) {
  for (let n = 0; n < t.childNodes.length; n++) {
    let i = t.childNodes[n];
    if (i.nodeType === 1 && !e.includes(i.tagName)) {
      for (; i.firstChild; )
        t.insertBefore(i.firstChild, i);
      t.removeChild(i), n -= 1;
    } else i.nodeType === 1 && DW(i, e);
  }
}
function vwe(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = n.createElement("div");
  if ((!t.backgroundColor || !t.backgroundColor.match(/^[a-zA-Z\d-]+$/)) && (t.backgroundColor = "white"), i.classList.add("kg-card", "kg-callout-card", `kg-callout-card-${t.backgroundColor}`), t.calloutEmoji) {
    const a = n.createElement("div");
    a.classList.add("kg-callout-emoji"), a.textContent = t.calloutEmoji, i.appendChild(a);
  }
  const r = n.createElement("div");
  r.classList.add("kg-callout-text");
  const s = n.createElement("div");
  return s.innerHTML = t.calloutText, DW(s, ["A", "STRONG", "EM", "B", "I", "BR", "CODE", "MARK", "S", "DEL", "U", "SUP", "SUB"]), r.innerHTML = s.innerHTML, i.appendChild(r), {
    element: i
  };
}
const bwe = (t) => {
  var n, i;
  const e = (i = (n = t.classList) == null ? void 0 : n.value) == null ? void 0 : i.match(/kg-callout-card-(\w+)/);
  return e && e[1];
};
function ywe(t) {
  return {
    div: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-callout-card");
      return e.tagName === "DIV" && n ? {
        conversion(r) {
          const s = r == null ? void 0 : r.querySelector(".kg-callout-text"), o = r == null ? void 0 : r.querySelector(".kg-callout-emoji"), a = bwe(r), l = {
            calloutText: s && s.innerHTML.trim() || "",
            calloutEmoji: o && o.innerHTML.trim() || "",
            backgroundColor: a
          };
          return {
            node: new t(l)
          };
        },
        priority: 1
      } : null;
    }
  };
}
let b1 = class extends Yn({
  nodeType: "callout",
  properties: [{
    name: "calloutText",
    default: "",
    wordCount: !0
  }, {
    name: "calloutEmoji",
    default: "💡"
  }, {
    name: "backgroundColor",
    default: "blue"
  }],
  defaultRenderFn: vwe
}) {
  /* override */
  constructor({
    calloutText: e,
    calloutEmoji: n,
    backgroundColor: i
  } = {}, r) {
    super(r), this.__calloutText = e || "", this.__calloutEmoji = n !== void 0 ? n : "💡", this.__backgroundColor = i || "blue";
  }
  static importDOM() {
    return ywe(this);
  }
};
function wwe(t) {
  return t instanceof b1;
}
const kwe = (t) => new b1(t), eh = (t) => t.showButton && t.buttonUrl && t.buttonText, tg = (t, e) => eh(t) ? `<a href="${t.buttonUrl}">${e}</a>` : e;
function xwe(t) {
  (!t.buttonColor || !t.buttonColor.match(/^[a-zA-Z\d-]+|#([a-fA-F\d]{3}|[a-fA-F\d]{6})$/)) && (t.buttonColor = "accent");
  const e = t.buttonColor === "accent" ? "kg-style-accent" : "", n = t.buttonColor === "accent" ? `style="color: ${t.buttonTextColor};"` : `style="background-color: ${t.buttonColor}; color: ${t.buttonTextColor};"`;
  return `
        <div class="kg-card kg-cta-card kg-cta-bg-${t.backgroundColor} kg-cta-${t.layout} ${t.showDividers ? "" : "kg-cta-no-dividers"} ${t.imageUrl ? "kg-cta-has-img" : ""} ${t.linkColor === "accent" ? "kg-cta-link-accent" : ""} ${t.alignment === "center" ? "kg-cta-centered" : ""}" data-layout="${t.layout}">
            ${t.hasSponsorLabel ? `
                <div class="kg-cta-sponsor-label-wrapper">
                    <div class="kg-cta-sponsor-label">
                        ${t.sponsorLabel}
                    </div>
                </div>
            ` : ""}
            <div class="kg-cta-content">
                ${t.imageUrl ? `
                    <div class="kg-cta-image-container">
                        ${tg(t, `<img src="${t.imageUrl}" alt="CTA Image" ${t != null && t.imageWidth && t.imageHeight ? `data-image-dimensions="${t.imageWidth}x${t.imageHeight}"` : ""}>`)}
                    </div>
                ` : ""}
                ${t.textValue || t.showButton ? `
                    <div class="kg-cta-content-inner">
                    ${t.textValue ? `
                        <div class="kg-cta-text">
                            ${t.textValue}
                        </div>
                    ` : ""}
                    ${eh(t) ? `
                        <a href="${t.buttonUrl}" class="kg-cta-button ${e}" ${n}>
                            ${t.buttonText}
                        </a>
                        ` : ""}
                    </div>
                ` : ""}
            </div>
        </div>
    `;
}
function _we(t, e = {}) {
  var s, o, a, l, u, f, d, h;
  let n = t.buttonColor === "accent" ? `color: ${t.buttonTextColor};` : `background-color: ${t.buttonColor}; color: ${t.buttonTextColor};`, i = n;
  ((s = e == null ? void 0 : e.feature) != null && s.emailCustomization || (o = e == null ? void 0 : e.feature) != null && o.emailCustomizationAlpha) && ((a = e == null ? void 0 : e.design) == null ? void 0 : a.buttonStyle) === "outline" && // accent buttons are fully handled by main template CSS
  t.buttonColor !== "accent" && (n = `
            border: 1px solid ${t.buttonColor};
            background-color: transparent;
            color: ${t.buttonColor};
        `, i = `
            background-color: transparent;
            color: ${t.buttonColor};
        `);
  let r;
  if (t.imageUrl && t.imageWidth && t.imageHeight && (r = {
    width: t.imageWidth,
    height: t.imageHeight
  }, t.imageWidth >= 560 && (r = Eh(r, {
    width: 560
  }))), t.layout === "minimal" && t.imageUrl && gf(t.imageUrl, e.siteUrl) && (l = e.canTransformImage) != null && l.call(e, t.imageUrl)) {
    const [, m, g] = t.imageUrl.match(/(.*\/content\/images)\/(.*)/), w = ((f = (u = e == null ? void 0 : e.imageOptimization) == null ? void 0 : u.internalImageSizes) == null ? void 0 : f["email-cta-minimal-image"]) || {
      width: 256,
      height: 256
    };
    t.imageUrl = `${m}/size/w${w.width}h${w.height}/${g}`;
  }
  if ((d = e.feature) != null && d.emailCustomization || (h = e.feature) != null && h.emailCustomizationAlpha) {
    const m = () => t.layout === "minimal" ? `
                    <tr>
                        <td class="kg-cta-content">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="kg-cta-content-wrapper">
                                <tr>
                                    ${t.imageUrl ? `
                                        <td class="kg-cta-image-container" width="64">
                                            ${tg(t, `<img src="${t.imageUrl}" alt="CTA Image" class="kg-cta-image" width="64" height="64">`)}
                                        </td>
                                    ` : ""}
                                    <td class="kg-cta-content-inner">
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            ${t.textValue ? `
                                                <tr>
                                                    <td class="kg-cta-text">
                                                        ${t.textValue}
                                                    </td>
                                                </tr>
                                            ` : ""}
                                            ${eh(t) ? `
                                            <tr>
                                                <td class="kg-cta-button-container">
                                                    <table border="0" cellpadding="0" cellspacing="0" class="btn">
                                                        <tr>
                                                            <td class="${t.buttonColor === "accent" ? "kg-style-accent" : ""}" style="${n}">
                                                                <a href="${t.buttonUrl}"
                                                                   class="${t.buttonColor === "accent" ? "kg-style-accent" : ""}"
                                                                   style="${i}"
                                                                >
                                                                    ${t.buttonText}
                                                                </a>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            ` : ""}
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                ` : `
                <tr>
                    <td class="kg-cta-content">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="kg-cta-content-wrapper">
                            ${t.imageUrl ? `
                                <tr>
                                    <td class="kg-cta-image-container">
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            <tr>
                                                <td>
                                                    ${tg(t, `<img src="${t.imageUrl}" alt="CTA Image" class="kg-cta-image" ${r ? `width="${r.width}"` : ""} ${r ? `height="${r.height}"` : ""}>`)}
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            ` : ""}
                            <tr>
                                <td class="kg-cta-text">
                                    ${t.textValue}
                                </td>
                            </tr>
                            ${eh(t) ? `
                                <tr>
                                    <td class="kg-cta-button-container" align="${t.alignment}">
                                        <table class="btn" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td class="${t.buttonColor === "accent" ? "kg-style-accent" : ""}" style="${n}" align="${t.alignment}">
                                                    <a href="${t.buttonUrl}"
                                                       class="${t.buttonColor === "accent" ? "kg-style-accent" : ""}"
                                                       style="${i}"
                                                    >
                                                        ${t.buttonText}
                                                    </a>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            ` : ""}
                        </table>
                    </td>
                </tr>
            `;
    return `
            <table class="kg-card kg-cta-card kg-cta-bg-${t.backgroundColor} ${t.showDividers ? "" : "kg-cta-no-dividers"} kg-cta-${t.layout} ${t.hasSponsorLabel ? "" : "kg-cta-no-label"} ${t.textValue ? "" : "kg-cta-no-text"} ${t.imageUrl ? "kg-cta-has-img" : ""} ${t.linkColor === "accent" ? "kg-cta-link-accent" : ""} ${t.alignment === "center" ? "kg-cta-centered" : ""}" border="0" cellpadding="0" cellspacing="0" width="100%">
                ${t.hasSponsorLabel ? `
                    <tr>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td class="kg-cta-sponsor-label">
                                        ${t.sponsorLabel}
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                ` : ""}
                ${m()}
            </table>
        `;
  } else {
    const m = () => t.layout === "minimal" ? `
                    <tr>
                        <td class="kg-cta-content">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="kg-cta-content-wrapper">
                                <tr>
                                    ${t.imageUrl ? `
                                        <td class="kg-cta-image-container" width="64">
                                            ${tg(t, `<img src="${t.imageUrl}" alt="CTA Image" class="kg-cta-image" width="64" height="64">`)}
                                        </td>
                                    ` : ""}
                                    <td class="kg-cta-content-inner">
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            ${t.textValue ? `
                                                <tr>
                                                    <td class="kg-cta-text">
                                                        ${t.textValue}
                                                    </td>
                                                </tr>
                                            ` : ""}
                                            ${eh(t) ? `
                                            <tr>
                                                <td class="kg-cta-button-container">
                                                    <table border="0" cellpadding="0" cellspacing="0" class="kg-cta-button-wrapper">
                                                        <tr>
                                                            <td class="${t.buttonColor === "accent" ? "kg-style-accent" : ""}" style="${n}">
                                                                <a href="${t.buttonUrl}"
                                                                   class="kg-cta-button ${t.buttonColor === "accent" ? "kg-style-accent" : ""}"
                                                                   style="${n}"
                                                                >
                                                                    ${t.buttonText}
                                                                </a>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            ` : ""}
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                ` : `
                <tr>
                    <td class="kg-cta-content">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="kg-cta-content-wrapper">
                            ${t.imageUrl ? `
                                <tr>
                                    <td class="kg-cta-image-container">
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            <tr>
                                                <td>
                                                    ${tg(t, `<img src="${t.imageUrl}" alt="CTA Image" class="kg-cta-image" ${r ? `width="${r.width}"` : ""} ${r ? `height="${r.height}"` : ""}>`)}
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            ` : ""}
                            <tr>
                                <td class="kg-cta-text">
                                    ${t.textValue}
                                </td>
                            </tr>
                            ${eh(t) ? `
                                <tr>
                                    <td class="kg-cta-button-container">
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td class="kg-cta-button-wrapper ${t.buttonColor === "accent" ? "kg-style-accent" : ""}" style="${n}">
                                                    <a href="${t.buttonUrl}"
                                                       class="kg-cta-button ${t.buttonColor === "accent" ? "kg-style-accent" : ""}"
                                                       style="${n}"
                                                    >
                                                        ${t.buttonText}
                                                    </a>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            ` : ""}
                        </table>
                    </td>
                </tr>
            `;
    return `
            <table class="kg-card kg-cta-card kg-cta-bg-${t.backgroundColor} ${t.showDividers ? "" : "kg-cta-no-dividers"} kg-cta-${t.layout} ${t.hasSponsorLabel ? "" : "kg-cta-no-label"} ${t.textValue ? "" : "kg-cta-no-text"} ${t.imageUrl ? "kg-cta-has-img" : ""} ${t.linkColor === "accent" ? "kg-cta-link-accent" : ""} ${t.alignment === "center" ? "kg-cta-centered" : ""}" border="0" cellpadding="0" cellspacing="0" width="100%">
                ${t.hasSponsorLabel ? `
                    <tr>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td class="kg-cta-sponsor-label">
                                        ${t.sponsorLabel}
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                ` : ""}
                ${m()}
            </table>
        `;
  }
}
function Owe(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = {
    layout: t.layout,
    alignment: t.alignment,
    textValue: t.textValue,
    showButton: t.showButton,
    showDividers: t.showDividers,
    buttonText: t.buttonText,
    buttonUrl: t.buttonUrl,
    buttonColor: t.buttonColor,
    buttonTextColor: t.buttonTextColor,
    hasSponsorLabel: t.hasSponsorLabel,
    backgroundColor: t.backgroundColor,
    sponsorLabel: t.sponsorLabel,
    imageUrl: t.imageUrl,
    imageWidth: t.imageWidth,
    imageHeight: t.imageHeight,
    linkColor: t.linkColor
  };
  if ((!i.backgroundColor || !i.backgroundColor.match(/^[a-zA-Z\d-]+|#([a-fA-F\d]{3}|[a-fA-F\d]{6})$/)) && (i.backgroundColor = "white"), e.target === "email") {
    const a = e.createDocument().createElement("div");
    return a.innerHTML = _we(i, e), s0({
      element: a.firstElementChild
    }, t.visibility, e);
  }
  const r = n.createElement("div");
  if (i.hasSponsorLabel) {
    const a = $W(r)(i.sponsorLabel, {
      firstChildInnerContent: !0
    });
    i.sponsorLabel = a;
  }
  const s = xwe(i);
  return r.innerHTML = s == null ? void 0 : s.trim(), s0({
    element: r.firstElementChild
  }, t.visibility, e);
}
const Vc = (t) => {
  if (t === "transparent")
    return t;
  try {
    const [e, n, i] = t.match(/\d+/g), r = parseInt(e, 10).toString(16).padStart(2, "0"), s = parseInt(n, 10).toString(16).padStart(2, "0"), o = parseInt(i, 10).toString(16).padStart(2, "0");
    return `#${r}${s}${o}`;
  } catch {
    return null;
  }
};
function Swe(t) {
  return {
    div: (e) => {
      var i;
      return ((i = e.classList) == null ? void 0 : i.contains("kg-cta-card")) ? {
        conversion(r) {
          const s = r, o = s.getAttribute("data-layout") || "minimal", a = s.getAttribute("data-alignment") || "left", l = r.querySelector(".kg-cta-text"), u = r.querySelector(".kg-cta-button"), f = (u == null ? void 0 : u.style) || {}, d = f.backgroundColor || "#000000", h = f.color || "#ffffff", m = r.querySelector(".kg-cta-sponsor-label"), g = s.className.match(/kg-cta-bg-(\w+)/), w = g ? g[1] : "grey", x = s.classList.contains("kg-cta-has-dividers"), _ = r.querySelector(".kg-cta-image-container"), S = _ == null ? void 0 : _.querySelector("img");
          let C = {
            imageUrl: "",
            imageWidth: null,
            imageHeight: null
          };
          if (S) {
            const {
              src: $,
              width: P,
              height: W
            } = yw(S);
            C.imageUrl = $, C.imageWidth = P || null, C.imageHeight = W || null;
          }
          m && (m.innerHTML = `<p>${m.innerHTML.trim()}</p>`);
          const E = {
            layout: o,
            alignment: a,
            textValue: l.textContent.trim() || "",
            showButton: !!u,
            showDividers: x,
            buttonText: (u == null ? void 0 : u.textContent.trim()) || "",
            buttonUrl: u == null ? void 0 : u.getAttribute("href"),
            buttonColor: Vc(d),
            buttonTextColor: Vc(h),
            hasSponsorLabel: !!m,
            sponsorLabel: (m == null ? void 0 : m.innerHTML) || "",
            backgroundColor: w,
            imageUrl: C.imageUrl,
            imageWidth: C.imageWidth,
            imageHeight: C.imageHeight
          };
          return {
            node: new t(E)
          };
        },
        priority: 1
      } : null;
    }
  };
}
let y1 = class extends Yn({
  nodeType: "call-to-action",
  hasVisibility: !0,
  properties: [
    {
      name: "layout",
      default: "minimal"
    },
    {
      name: "alignment",
      default: "left"
    },
    {
      name: "textValue",
      default: "",
      wordCount: !0
    },
    {
      name: "showButton",
      default: !0
    },
    {
      name: "showDividers",
      default: !0
    },
    {
      name: "buttonText",
      default: "Learn more"
    },
    {
      name: "buttonUrl",
      default: ""
    },
    {
      name: "buttonColor",
      default: "#000000"
    },
    // Where colour is customisable, we should use hex values
    {
      name: "buttonTextColor",
      default: "#ffffff"
    },
    {
      name: "hasSponsorLabel",
      default: !0
    },
    {
      name: "sponsorLabel",
      default: '<p><span style="white-space: pre-wrap;">SPONSORED</span></p>'
    },
    {
      name: "backgroundColor",
      default: "grey"
    },
    // Since this is one of a few fixed options, we stick to colour names.
    {
      name: "linkColor",
      default: "text"
    },
    {
      name: "imageUrl",
      default: ""
    },
    {
      name: "imageWidth",
      default: null
    },
    {
      name: "imageHeight",
      default: null
    }
  ],
  defaultRenderFn: Owe
}) {
  static importDOM() {
    return Swe(this);
  }
};
const Cwe = (t) => new y1(t), Ewe = (t) => t instanceof y1;
class Twe {
  constructor(e) {
    this.NodeClass = e;
  }
  get DOMConversionMap() {
    const e = this;
    return {
      blockquote: () => ({
        conversion(n) {
          var r;
          const i = (r = n.classList) == null ? void 0 : r.contains("kg-blockquote-alt");
          return n.tagName === "BLOCKQUOTE" && i ? {
            node: new e.NodeClass()
          } : null;
        },
        priority: 0
      })
    };
  }
}
let w1 = class extends N.ElementNode {
  static getType() {
    return "aside";
  }
  static clone(e) {
    return new this(e.__key);
  }
  static get urlTransformMap() {
    return {};
  }
  constructor(e) {
    super(e);
  }
  static importJSON(e) {
    const n = new this();
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  exportJSON() {
    return {
      ...super.exportJSON(),
      type: "aside",
      version: 1
    };
  }
  static importDOM() {
    return new Twe(this).DOMConversionMap;
  }
  /* c8 ignore start */
  createDOM() {
    return document.createElement("div");
  }
  updateDOM() {
    return !1;
  }
  isInline() {
    return !1;
  }
  extractWithChild() {
    return !0;
  }
  /* c8 ignore stop */
};
function $we() {
  return new w1();
}
function Mwe(t) {
  return t instanceof w1;
}
function Nwe(t, e = {}) {
  return Vn(e), {
    element: e.createDocument().createElement("hr")
  };
}
function Awe(t) {
  return {
    hr: () => ({
      conversion() {
        return {
          node: new t()
        };
      },
      priority: 0
    })
  };
}
let k1 = class extends Yn({
  nodeType: "horizontalrule",
  defaultRenderFn: Nwe
}) {
  static importDOM() {
    return Awe(this);
  }
  getTextContent() {
    return `---

`;
  }
  hasEditMode() {
    return !1;
  }
};
function Dwe() {
  return new k1();
}
function Pwe(t) {
  return t instanceof k1;
}
function Iwe(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = t.html;
  if (!i)
    return Ir(n);
  const r = `
<!--kg-card-begin: html-->
${i}
<!--kg-card-end: html-->
`, s = n.createElement("textarea");
  return s.value = r, t.visibility ? s0({
    element: s,
    type: "value"
  }, t.visibility, e) : {
    element: s,
    type: "value"
  };
}
function Lwe(t) {
  return {
    "#comment": (e) => e.nodeType === 8 && e.nodeValue.trim().match(/^kg-card-begin:\s?html$/) ? {
      conversion(n) {
        let i = [], r = n.nextSibling;
        for (; r && !Rwe(r); ) {
          let a = r;
          i.push(a.outerHTML), r = a.nextSibling, a.remove();
        }
        let s = {
          html: i.join(`
`).trim()
        };
        return {
          node: new t(s)
        };
      },
      priority: 0
    } : null,
    table: (e) => e.nodeType === 1 && e.tagName === "TABLE" && e.parentNode.tagName !== "TABLE" ? {
      conversion(n) {
        const i = {
          html: n.outerHTML
        };
        return {
          node: new t(i)
        };
      },
      priority: 0
    } : null
  };
}
function Rwe(t) {
  return t && t.nodeType === 8 && t.nodeValue.trim().match(/^kg-card-end:\s?html$/);
}
let x1 = class extends Yn({
  nodeType: "html",
  hasVisibility: !0,
  properties: [{
    name: "html",
    default: "",
    urlType: "html",
    wordCount: !0
  }],
  defaultRenderFn: Iwe
}) {
  static importDOM() {
    return Lwe(this);
  }
  isEmpty() {
    return !this.__html;
  }
};
function jwe(t) {
  return new x1(t);
}
function Fwe(t) {
  return t instanceof x1;
}
function Bwe(t) {
  return {
    div: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-toggle-card");
      return e.tagName === "DIV" && n ? {
        conversion(r) {
          const o = r.querySelector(".kg-toggle-heading-text").textContent, l = r.querySelector(".kg-toggle-content").textContent, u = {
            heading: o,
            content: l
          };
          return {
            node: new t(u)
          };
        },
        priority: 1
      } : null;
    }
  };
}
const PW = function(t, ...e) {
  return typeof t == "string" ? t.replace(/\n\s+/g, "").trim() : t.reduce((i, r, s) => i + r + (e[s] || ""), "").replace(/\n\s+/g, "").trim();
}, fh = PW;
var zwe = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  html: fh,
  oneline: PW
});
function Wwe({
  node: t
}) {
  return `
        <div class="kg-card kg-toggle-card" data-kg-toggle-state="close">
            <div class="kg-toggle-heading">
                <h4 class="kg-toggle-heading-text">${t.heading}</h4>
                <button class="kg-toggle-card-icon" aria-label="Expand toggle to read content">
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                        <path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>
            </div>
            <div class="kg-toggle-content">${t.content}</div>
        </div>
        `;
}
function Hwe({
  node: t
}, e = {}) {
  var n, i;
  return (n = e.feature) != null && n.emailCustomization || (i = e.feature) != null && i.emailCustomizationAlpha ? fh`
            <table cellspacing="0" cellpadding="0" border="0" width="100%" class="kg-toggle-card">
                <tbody>
                    <tr>
                        <td class="kg-toggle-heading">
                            <h4>${t.heading}</h4>
                        </td>
                    </tr>
                    <tr>
                        <td class="kg-toggle-content">
                            ${t.content}
                        </td>
                    </tr>
                </tbody>
            </table>
            ` : `
        <div style="background: transparent;
        border: 1px solid rgba(124, 139, 154, 0.25); border-radius: 4px; padding: 20px; margin-bottom: 1.5em;">
            <h4 style="font-size: 1.375rem; font-weight: 600; margin-bottom: 8px; margin-top:0px">${t.heading}</h4>
            <div style="font-size: 1rem; line-height: 1.5; margin-bottom: -1.5em;">${t.content}</div>
        </div>
        `;
}
function Qwe(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = e.target === "email" ? Hwe({
    node: t
  }, e) : Wwe({
    node: t
  }), r = n.createElement("div");
  return r.innerHTML = i.trim(), {
    element: r.firstElementChild
  };
}
let _1 = class extends Yn({
  nodeType: "toggle",
  properties: [{
    name: "heading",
    default: "",
    urlType: "html",
    wordCount: !0
  }, {
    name: "content",
    default: "",
    urlType: "html",
    wordCount: !0
  }],
  defaultRenderFn: Qwe
}) {
  static importDOM() {
    return Bwe(this);
  }
};
const Uwe = (t) => new _1(t);
function Zwe(t) {
  return t instanceof _1;
}
function qwe(t) {
  return {
    div: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-button-card");
      return e.tagName === "DIV" && n ? {
        conversion(r) {
          const s = e.className.match(/kg-align-(left|center)/);
          let o;
          s && (o = s[1]);
          const a = r == null ? void 0 : r.querySelector(".kg-btn"), l = a.getAttribute("href"), f = {
            buttonText: a.textContent,
            alignment: o,
            buttonUrl: l
          };
          return {
            node: new t(f)
          };
        },
        priority: 1
      } : null;
    }
  };
}
function Ywe({
  alignment: t = "",
  color: e = "accent",
  text: n = "",
  url: i = ""
} = {}) {
  const r = nt("btn", e === "accent" && "btn-accent");
  return fh`
        <table class="${r}" border="0" cellspacing="0" cellpadding="0" align="${t}">
            <tbody>
                <tr>
                    <td align="center">
                        <a href="${i}">${n}</a>
                    </td>
                </tr>
            </tbody>
        </table>
    `;
}
function Vwe(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  return !t.buttonUrl || t.buttonUrl.trim() === "" ? Ir(n) : e.target === "email" ? Gwe(t, e, n) : Xwe(t, n);
}
function Xwe(t, e) {
  const n = Kwe(t), i = e.createElement("div");
  i.setAttribute("class", n);
  const r = e.createElement("a");
  return r.setAttribute("href", t.buttonUrl), r.setAttribute("class", "kg-btn kg-btn-accent"), r.textContent = t.buttonText || "Button Title", i.appendChild(r), {
    element: i
  };
}
function Gwe(t, e, n) {
  var o, a;
  const {
    buttonUrl: i,
    buttonText: r
  } = t;
  let s;
  if ((o = e.feature) != null && o.emailCustomization) {
    s = fh`
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <table class="btn btn-accent" border="0" cellspacing="0" cellpadding="0" align="${t.alignment}">
                        <tr>
                            <td align="center">
                                <a href="${i}">${r}</a>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>`;
    const l = n.createElement("p");
    return l.innerHTML = s, {
      element: l
    };
  } else if ((a = e.feature) != null && a.emailCustomizationAlpha) {
    const l = Ywe({
      alignment: t.alignment,
      color: "accent",
      url: i,
      text: r
    });
    s = fh`
        <table border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        ${l}
                    </td>
                </tr>
            </tbody>
        </table>
        `;
    const u = n.createElement("div");
    return u.innerHTML = s, {
      element: u,
      type: "inner"
    };
  } else {
    s = fh`
        <div class="btn btn-accent">
            <table border="0" cellspacing="0" cellpadding="0" align="${t.alignment}">
                <tr>
                    <td align="center">
                        <a href="${i}">${r}</a>
                    </td>
                </tr>
            </table>
        </div>
        `;
    const l = n.createElement("p");
    return l.innerHTML = s, {
      element: l
    };
  }
}
function Kwe(t) {
  let e = ["kg-card kg-button-card"];
  return t.alignment && e.push(`kg-align-${t.alignment}`), e.join(" ");
}
let O1 = class extends Yn({
  nodeType: "button",
  properties: [{
    name: "buttonText",
    default: ""
  }, {
    name: "alignment",
    default: "center"
  }, {
    name: "buttonUrl",
    default: "",
    urlType: "url"
  }],
  defaultRenderFn: Vwe
}) {
  static importDOM() {
    return qwe(this);
  }
};
const Jwe = (t) => new O1(t);
function eke(t) {
  return t instanceof O1;
}
function tke(t) {
  return {
    figure: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-bookmark-card");
      return e.tagName === "FIGURE" && n ? {
        conversion(r) {
          var w, x, _, S, C, E, M, $;
          const s = (w = r == null ? void 0 : r.querySelector(".kg-bookmark-container")) == null ? void 0 : w.getAttribute("href"), o = (x = r == null ? void 0 : r.querySelector(".kg-bookmark-icon")) == null ? void 0 : x.src, a = (_ = r == null ? void 0 : r.querySelector(".kg-bookmark-title")) == null ? void 0 : _.textContent, l = (S = r == null ? void 0 : r.querySelector(".kg-bookmark-description")) == null ? void 0 : S.textContent, u = (C = r == null ? void 0 : r.querySelector(".kg-bookmark-publisher")) == null ? void 0 : C.textContent, f = (E = r == null ? void 0 : r.querySelector(".kg-bookmark-author")) == null ? void 0 : E.textContent, d = (M = r == null ? void 0 : r.querySelector(".kg-bookmark-thumbnail img")) == null ? void 0 : M.src, h = ($ = r == null ? void 0 : r.querySelector("figure.kg-bookmark-card figcaption")) == null ? void 0 : $.textContent, m = {
            url: s,
            metadata: {
              icon: o,
              title: a,
              description: l,
              author: u,
              publisher: f,
              thumbnail: d
            },
            caption: h
          };
          return {
            node: new t(m)
          };
        },
        priority: 1
      } : null;
    },
    div: (e) => e.nodeType === 1 && e.tagName === "DIV" && e.className.match(/graf--mixtapeEmbed/) ? {
      conversion(n) {
        const i = n.querySelector(".markup--mixtapeEmbed-anchor"), r = i.querySelector(".markup--mixtapeEmbed-strong"), s = i.querySelector(".markup--mixtapeEmbed-em"), o = n.querySelector(".mixtapeImage");
        n.querySelector("br").remove();
        const a = i.getAttribute("href");
        let l = "", u = "", f = "";
        r && r.innerHTML && (l = r.innerHTML.trim(), i.removeChild(r)), s && s.innerHTML && (u = s.innerHTML.trim(), i.removeChild(s));
        let d = i.innerHTML.trim();
        o && o.style["background-image"] && (f = o.style["background-image"].match(/url\(([^)]*?)\)/)[1]);
        let h = {
          url: a,
          metadata: {
            title: l,
            description: u,
            publisher: d,
            thumbnail: f
          }
        };
        return {
          node: new t(h)
        };
      },
      priority: 1
    } : null
  };
}
function Di(t) {
  return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
}
function HN(t, e, n) {
  if (t.length <= n)
    return Di(t);
  if (t && t.length > n) {
    let i = "";
    return t.length > n && t.length <= e ? i = '<span class="hide-desktop">…</span>' : t.length > e && (i = "…"), Di(t.substring(0, n - 1)) + '<span class="desktop-only">' + Di(t.substring(n - 1, e - 1)) + "</span>" + i;
  } else
    return Di(t ?? "");
}
function nke(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  return !t.url || t.url.trim() === "" ? Ir(n) : e.target === "email" ? ike(t, n) : rke(t, n);
}
function ike(t, e) {
  const n = Di(t.title), i = Di(t.publisher), r = Di(t.author), s = Di(t.description), o = t.icon, a = t.url, l = t.thumbnail, u = t.caption, f = e.createElement("div"), d = `
        <!--[if !mso !vml]-->
            <figure class="kg-card kg-bookmark-card ${u ? "kg-card-hascaption" : ""}">
                <a class="kg-bookmark-container" href="${a}">
                    <div class="kg-bookmark-content">
                        <div class="kg-bookmark-title">${n}</div>
                        <div class="kg-bookmark-description">${HN(s, 120, 90)}</div>
                        <div class="kg-bookmark-metadata">
                            ${o ? `<img class="kg-bookmark-icon" src="${o}" alt="">` : ""}
                            ${i ? `<span class="kg-bookmark-author" src="${i}">${i}</span>` : ""}
                            ${r ? `<span class="kg-bookmark-publisher" src="${r}">${r}</span>` : ""}
                        </div>
                    </div>
                    ${l ? `<div class="kg-bookmark-thumbnail" style="background-image: url('${l}')">
                        <img src="${l}" alt="" onerror="this.style.display='none'"></div>` : ""}
                </a>
                ${u ? `<figcaption>${u}</figcaption>` : ""}
            </figure>
        <!--[endif]-->
        <!--[if vml]>
            <table class="kg-card kg-bookmark-card--outlook" style="margin: 0; padding: 0; width: 100%; border: 1px solid #e5eff5; background: #ffffff; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; border-collapse: collapse; border-spacing: 0;" width="100%">
                <tr>
                    <td width="100%" style="padding: 20px;">
                        <table style="margin: 0; padding: 0; border-collapse: collapse; border-spacing: 0;">
                            <tr>
                                <td class="kg-bookmark-title--outlook">
                                    <a href="${a}" style="text-decoration: none; color: #15212A; font-size: 15px; line-height: 1.5em; font-weight: 600;">
                                        ${n}
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="kg-bookmark-description--outlook">
                                        <a href="${a}" style="text-decoration: none; margin-top: 12px; color: #738a94; font-size: 13px; line-height: 1.5em; font-weight: 400;">
                                            ${HN(s, 120, 90)}
                                        </a>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="kg-bookmark-metadata--outlook" style="padding-top: 14px; color: #15212A; font-size: 13px; font-weight: 400; line-height: 1.5em;">
                                    <table style="margin: 0; padding: 0; border-collapse: collapse; border-spacing: 0;">
                                        <tr>
                                            ${o ? `
                                                <td valign="middle" class="kg-bookmark-icon--outlook" style="padding-right: 8px; font-size: 0; line-height: 1.5em;">
                                                    <a href="${a}" style="text-decoration: none; color: #15212A;">
                                                        <img src="${o}" width="22" height="22" alt=" ">
                                                    </a>
                                                </td>
                                            ` : ""}
                                            <td valign="middle" class="kg-bookmark-byline--outlook">
                                                <a href="${a}" style="text-decoration: none; color: #15212A;">
                                                    ${i}
                                                    ${r ? "&nbsp;&#x2022;&nbsp;" : ""}
                                                    ${r}
                                                </a>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <div class="kg-bookmark-spacer--outlook" style="height: 1.5em;">&nbsp;</div>
        <![endif]-->`;
  return f.innerHTML = d, {
    element: f
  };
}
function rke(t, e) {
  const n = e.createElement("figure"), i = t.caption;
  let r = "kg-card kg-bookmark-card";
  i && (r += " kg-card-hascaption"), n.setAttribute("class", r);
  const s = e.createElement("a");
  s.setAttribute("class", "kg-bookmark-container"), s.href = t.url, n.appendChild(s);
  const o = e.createElement("div");
  o.setAttribute("class", "kg-bookmark-content"), s.appendChild(o);
  const a = e.createElement("div");
  a.setAttribute("class", "kg-bookmark-title"), a.textContent = t.title, o.appendChild(a);
  const l = e.createElement("div");
  l.setAttribute("class", "kg-bookmark-description"), l.textContent = t.description, o.appendChild(l);
  const u = e.createElement("div");
  if (u.setAttribute("class", "kg-bookmark-metadata"), o.appendChild(u), u.icon = t.icon, u.icon) {
    const f = e.createElement("img");
    f.setAttribute("class", "kg-bookmark-icon"), f.src = u.icon, f.alt = "", u.appendChild(f);
  }
  if (u.publisher = t.publisher, u.publisher) {
    const f = e.createElement("span");
    f.setAttribute("class", "kg-bookmark-author"), f.textContent = u.publisher, u.appendChild(f);
  }
  if (u.author = t.author, u.author) {
    const f = e.createElement("span");
    f.setAttribute("class", "kg-bookmark-publisher"), f.textContent = u.author, u.appendChild(f);
  }
  if (u.thumbnail = t.thumbnail, u.thumbnail) {
    const f = e.createElement("div");
    f.setAttribute("class", "kg-bookmark-thumbnail"), s.appendChild(f);
    const d = e.createElement("img");
    d.src = u.thumbnail, d.alt = "", d.setAttribute("onerror", "this.style.display = 'none'"), f.appendChild(d);
  }
  if (i) {
    const f = e.createElement("figcaption");
    f.innerHTML = i, n.appendChild(f);
  }
  return {
    element: n
  };
}
let S1 = class extends Yn({
  nodeType: "bookmark",
  properties: [{
    name: "title",
    default: "",
    wordCount: !0
  }, {
    name: "description",
    default: "",
    wordCount: !0
  }, {
    name: "url",
    default: "",
    urlType: "url",
    wordCount: !0
  }, {
    name: "caption",
    default: "",
    wordCount: !0
  }, {
    name: "author",
    default: ""
  }, {
    name: "publisher",
    default: ""
  }, {
    name: "icon",
    urlPath: "metadata.icon",
    default: "",
    urlType: "url"
  }, {
    name: "thumbnail",
    urlPath: "metadata.thumbnail",
    default: "",
    urlType: "url"
  }],
  defaultRenderFn: nke
}) {
  static importDOM() {
    return tke(this);
  }
  /* override */
  constructor({
    url: e,
    metadata: n,
    caption: i
  } = {}, r) {
    super(r), this.__url = e || "", this.__icon = (n == null ? void 0 : n.icon) || "", this.__title = (n == null ? void 0 : n.title) || "", this.__description = (n == null ? void 0 : n.description) || "", this.__author = (n == null ? void 0 : n.author) || "", this.__publisher = (n == null ? void 0 : n.publisher) || "", this.__thumbnail = (n == null ? void 0 : n.thumbnail) || "", this.__caption = i || "";
  }
  /* @override */
  getDataset() {
    const e = this.getLatest();
    return {
      url: e.__url,
      metadata: {
        icon: e.__icon,
        title: e.__title,
        description: e.__description,
        author: e.__author,
        publisher: e.__publisher,
        thumbnail: e.__thumbnail
      },
      caption: e.__caption
    };
  }
  /* @override */
  static importJSON(e) {
    const {
      url: n,
      metadata: i,
      caption: r
    } = e;
    return new this({
      url: n,
      metadata: i,
      caption: r
    });
  }
  /* @override */
  exportJSON() {
    return {
      type: "bookmark",
      version: 1,
      url: this.url,
      metadata: {
        icon: this.icon,
        title: this.title,
        description: this.description,
        author: this.author,
        publisher: this.publisher,
        thumbnail: this.thumbnail
      },
      caption: this.caption
    };
  }
  isEmpty() {
    return !this.url;
  }
};
const ske = (t) => new S1(t);
function oke(t) {
  return t instanceof S1;
}
function ake(t) {
  if (!t)
    return 0;
  const e = ["Bytes", "KB", "MB", "GB", "TB"], n = t.split(" "), i = parseFloat(n[0]), r = n[1], s = e.indexOf(r);
  return s === -1 ? 0 : Math.round(i * Math.pow(1024, s));
}
function IW(t) {
  if (!t)
    return "0 Byte";
  const e = ["Bytes", "KB", "MB", "GB", "TB"];
  if (t === 0)
    return "0 Byte";
  const n = parseInt(Math.floor(Math.log(t) / Math.log(1024)));
  return Math.round(t / Math.pow(1024, n)) + " " + e[n];
}
function lke(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  return !t.src || t.src.trim() === "" ? Ir(n) : e.target === "email" ? uke(t, n, e) : cke(t, n);
}
function uke(t, e, n) {
  let i;
  !t.fileTitle && !t.fileCaption ? i = "margin-top: 6px; height: 20px; width: 20px; max-width: 20px; padding-top: 4px; padding-bottom: 4px;" : i = "margin-top: 6px; height: 24px; width: 24px; max-width: 24px;";
  const r = `
        <table cellspacing="0" cellpadding="4" border="0" class="kg-file-card" width="100%">
            <tr>
                <td>
                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tr>
                            <td valign="middle" style="vertical-align: middle;">
                                ${t.fileTitle ? `
                                <table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td>
                                    <a href="${Di(n.postUrl)}" class="kg-file-title">${Di(t.fileTitle)}</a>
                                </td></tr></table>
                                ` : ""}
                                ${t.fileCaption ? `
                                <table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td>
                                    <a href="${Di(n.postUrl)}" class="kg-file-description">${Di(t.fileCaption)}</a>
                                </td></tr></table>
                                ` : ""}
                                <table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td>
                                    <a href="${Di(n.postUrl)}" class="kg-file-meta"><span class="kg-file-name">${Di(t.fileName)}</span> &bull; ${IW(t.fileSize)}</a>
                                </td></tr></table>
                            </td>
                            <td width="80" valign="middle" class="kg-file-thumbnail">
                                <a href="${Di(n.postUrl)}" style="display: block; top: 0; right: 0; bottom: 0; left: 0;">
                                    <img src="https://static.ghost.org/v4.0.0/images/download-icon-darkmode.png" style="${Di(i)}">
                                </a>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    `, s = e.createElement("div");
  return s.innerHTML = r.trim(), {
    element: s.firstElementChild
  };
}
function cke(t, e) {
  const n = e.createElement("div");
  n.setAttribute("class", "kg-card kg-file-card");
  const i = e.createElement("a");
  i.setAttribute("class", "kg-file-card-container"), i.setAttribute("href", t.src), i.setAttribute("title", "Download"), i.setAttribute("download", "");
  const r = e.createElement("div");
  r.setAttribute("class", "kg-file-card-contents");
  const s = e.createElement("div");
  s.setAttribute("class", "kg-file-card-title"), s.textContent = t.fileTitle || "";
  const o = e.createElement("div");
  o.setAttribute("class", "kg-file-card-caption"), o.textContent = t.fileCaption || "";
  const a = e.createElement("div");
  a.setAttribute("class", "kg-file-card-metadata");
  const l = e.createElement("div");
  l.setAttribute("class", "kg-file-card-filename"), l.textContent = t.fileName || "";
  const u = e.createElement("div");
  u.setAttribute("class", "kg-file-card-filesize"), u.textContent = t.formattedFileSize || "", a.appendChild(l), a.appendChild(u), r.appendChild(s), r.appendChild(o), r.appendChild(a), i.appendChild(r);
  const f = e.createElement("div");
  f.setAttribute("class", "kg-file-card-icon");
  const d = e.createElementNS("http://www.w3.org/2000/svg", "svg");
  d.setAttribute("viewBox", "0 0 24 24");
  const h = e.createElementNS("http://www.w3.org/2000/svg", "defs"), m = e.createElementNS("http://www.w3.org/2000/svg", "style");
  m.textContent = ".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}", h.appendChild(m);
  const g = e.createElementNS("http://www.w3.org/2000/svg", "title");
  g.textContent = "download-circle";
  const w = e.createElementNS("http://www.w3.org/2000/svg", "polyline");
  w.setAttribute("class", "a"), w.setAttribute("points", "8.25 14.25 12 18 15.75 14.25");
  const x = e.createElementNS("http://www.w3.org/2000/svg", "line");
  x.setAttribute("class", "a"), x.setAttribute("x1", "12"), x.setAttribute("y1", "6.75"), x.setAttribute("x2", "12"), x.setAttribute("y2", "18");
  const _ = e.createElementNS("http://www.w3.org/2000/svg", "circle");
  return _.setAttribute("class", "a"), _.setAttribute("cx", "12"), _.setAttribute("cy", "12"), _.setAttribute("r", "11.25"), d.appendChild(h), d.appendChild(g), d.appendChild(w), d.appendChild(x), d.appendChild(_), f.appendChild(d), i.appendChild(f), n.appendChild(i), {
    element: n
  };
}
function fke(t) {
  return {
    div: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-file-card");
      return e.tagName === "DIV" && n ? {
        conversion(r) {
          var m, g, w, x;
          const o = r.querySelector("a").getAttribute("href"), a = ((m = r.querySelector(".kg-file-card-title")) == null ? void 0 : m.textContent) || "", l = ((g = r.querySelector(".kg-file-card-caption")) == null ? void 0 : g.textContent) || "", u = ((w = r.querySelector(".kg-file-card-filename")) == null ? void 0 : w.textContent) || "";
          let f = ake(((x = r.querySelector(".kg-file-card-filesize")) == null ? void 0 : x.textContent) || "");
          const d = {
            src: o,
            fileTitle: a,
            fileCaption: l,
            fileName: u,
            fileSize: f
          };
          return {
            node: new t(d)
          };
        },
        priority: 1
      } : null;
    }
  };
}
let C1 = class extends Yn({
  nodeType: "file",
  properties: [{
    name: "src",
    default: "",
    urlType: "url"
  }, {
    name: "fileTitle",
    default: "",
    wordCount: !0
  }, {
    name: "fileCaption",
    default: "",
    wordCount: !0
  }, {
    name: "fileName",
    default: ""
  }, {
    name: "fileSize",
    default: ""
  }],
  defaultRenderFn: lke
}) {
  /* @override */
  exportJSON() {
    const {
      src: e,
      fileTitle: n,
      fileCaption: i,
      fileName: r,
      fileSize: s
    } = this;
    return {
      type: "file",
      src: e && e.startsWith("data:") ? "<base64String>" : e,
      fileTitle: n,
      fileCaption: i,
      fileName: r,
      fileSize: s
    };
  }
  static importDOM() {
    return fke(this);
  }
  get formattedFileSize() {
    return IW(this.fileSize);
  }
};
function dke(t) {
  return t instanceof C1;
}
const hke = (t) => new C1(t);
function ww(t) {
  return t = t.replace(/<[^>]*>?/gm, ""), t = t.replace(/[^\w\s]/gi, ""), t = t.replace(/\s+/g, "-"), t = t.toLowerCase(), t;
}
function pke(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  if (!t.header && !t.subheader && (!t.buttonEnabled || !t.buttonUrl || !t.buttonText))
    return Ir(n);
  const i = {
    size: t.size,
    style: t.style,
    buttonEnabled: t.buttonEnabled && !!t.buttonUrl && !!t.buttonText,
    buttonUrl: t.buttonUrl,
    buttonText: t.buttonText,
    header: t.header,
    headerSlug: ww(t.header),
    subheader: t.subheader,
    subheaderSlug: ww(t.subheader),
    hasHeader: !!t.header,
    hasSubheader: !!t.subheader && !!t.subheader.replace(/(<br>)+$/g).trim(),
    backgroundImageStyle: t.style === "image" ? `background-image: url(${t.backgroundImageSrc})` : "",
    backgroundImageSrc: t.backgroundImageSrc
  }, r = n.createElement("div");
  if (r.classList.add("kg-card", "kg-header-card", "kg-width-full", `kg-size-${i.size}`, `kg-style-${i.style}`), r.setAttribute("data-kg-background-image", i.backgroundImageSrc), r.setAttribute("style", i.backgroundImageStyle), i.hasHeader) {
    const s = n.createElement("h2");
    s.classList.add("kg-header-card-header"), s.setAttribute("id", i.headerSlug), s.innerHTML = i.header, r.appendChild(s);
  }
  if (i.hasSubheader) {
    const s = n.createElement("h3");
    s.classList.add("kg-header-card-subheader"), s.setAttribute("id", i.subheaderSlug), s.innerHTML = i.subheader, r.appendChild(s);
  }
  if (i.buttonEnabled) {
    const s = n.createElement("a");
    s.classList.add("kg-header-card-button"), s.setAttribute("href", i.buttonUrl), s.textContent = i.buttonText, r.appendChild(s);
  }
  return {
    element: r
  };
}
function mke(t) {
  return {
    div: (e) => {
      var r, s, o, a;
      const n = ((r = e.classList) == null ? void 0 : r.contains("kg-header-card")) && !((s = e.classList) != null && s.contains("kg-v2")), i = ((o = e.classList) == null ? void 0 : o.contains("kg-header-card")) && ((a = e.classList) == null ? void 0 : a.contains("kg-v2"));
      return e.tagName === "DIV" && n ? {
        conversion(l) {
          const u = l, f = l.querySelector(".kg-header-card-header"), d = l.querySelector(".kg-header-card-subheader"), h = l.querySelector(".kg-header-card-button"), m = u.classList.contains("kg-size-large") ? "large" : "small", g = u.classList.contains("kg-style-image") ? "image" : "text", w = u.getAttribute("data-kg-background-image"), _ = !!f ? f.textContent : "", C = !!d ? d.textContent : "", E = !!h, M = E ? h.getAttribute("href") : "", $ = E ? h.textContent : "", P = {
            size: m,
            style: g,
            backgroundImageSrc: w,
            header: _,
            subheader: C,
            buttonEnabled: E,
            buttonUrl: M,
            buttonText: $,
            version: 1
          };
          return {
            node: new t(P)
          };
        },
        priority: 1
      } : e.tagName === "DIV" && i ? {
        conversion(l) {
          var L;
          const u = l, f = u.querySelector(".kg-header-card-heading"), d = u.querySelector(".kg-header-card-subheading"), h = u.querySelector(".kg-header-card-button"), m = u.classList.contains("kg-align-center") ? "center" : "", g = (L = u.querySelector(".kg-header-card-image")) == null ? void 0 : L.getAttribute("src"), w = g ? "split" : "", x = u.classList.contains("kg-style-accent") ? "accent" : u.getAttribute("data-background-color"), _ = (h == null ? void 0 : h.getAttribute("data-button-color")) || "", S = (f == null ? void 0 : f.getAttribute("data-text-color")) || "", C = (h == null ? void 0 : h.getAttribute("data-button-text-color")) || "", E = (f == null ? void 0 : f.textContent) || "", M = (d == null ? void 0 : d.textContent) || "", $ = !!h, P = $ ? h.getAttribute("href") : "", W = $ ? h.textContent : "", z = {
            backgroundColor: x,
            buttonColor: _,
            alignment: m,
            backgroundImageSrc: g,
            layout: w,
            textColor: S,
            header: E,
            subheader: M,
            buttonEnabled: $,
            buttonUrl: P,
            buttonText: W,
            buttonTextColor: C,
            version: 2
          };
          return {
            node: new t(z)
          };
        },
        priority: 1
      } : null;
    }
  };
}
function gke(t, e = {}) {
  const n = yke(t).join(" "), i = t.backgroundColor === "accent" ? "kg-style-accent" : "", r = t.buttonColor === "accent" ? "kg-style-accent" : "", s = t.buttonColor !== "accent" ? `background-color: ${t.buttonColor};` : "", o = t.alignment === "center" ? "kg-align-center" : "", a = t.backgroundColor !== "accent" && (!t.backgroundImageSrc || t.layout === "split") ? `background-color: ${t.backgroundColor}` : "";
  let l = "";
  if (t.backgroundImageSrc) {
    const m = {
      src: t.backgroundImageSrc,
      width: t.backgroundImageWidth,
      height: t.backgroundImageHeight
    }, g = NW({
      ...m,
      options: e
    }), w = g ? `srcset="${g}"` : "";
    l = `
            <picture><img class="kg-header-card-image" src="${m.src}" ${w} loading="lazy" alt="" /></picture>
        `;
  }
  const u = () => t.header ? `<h2 id="${ww(t.header)}" class="kg-header-card-heading" style="color: ${t.textColor};" data-text-color="${t.textColor}">${t.header}</h2>` : "", f = () => t.subheader ? `<p id="${ww(t.subheader)}" class="kg-header-card-subheading" style="color: ${t.textColor};" data-text-color="${t.textColor}">${t.subheader}</p>` : "", d = () => t.buttonEnabled && t.buttonUrl && t.buttonUrl.trim() !== "" ? `<a href="${t.buttonUrl}" class="kg-header-card-button ${r}" style="${s}color: ${t.buttonTextColor};" data-button-color="${t.buttonColor}" data-button-text-color="${t.buttonTextColor}">${t.buttonText}</a>` : "", h = a ? `style="${a};"` : "";
  return `
        <div class="${n} ${i}" ${h} data-background-color="${t.backgroundColor}">
            ${t.layout !== "split" ? l : ""}
            <div class="kg-header-card-content">
                ${t.layout === "split" ? l : ""}
                <div class="kg-header-card-text ${o}">
                    ${u()}
                    ${f()}
                    ${d()}
                </div>
            </div>
        </div>
        `;
}
function vke(t, e) {
  var u, f, d, h, m;
  const n = t.backgroundColor === "accent" ? `background-color: ${t.accentColor};` : "";
  let i = t.buttonColor === "accent" ? `background-color: ${t.accentColor};` : t.buttonColor, r = t.buttonColor !== "accent" ? `background-color: ${t.buttonColor};` : "", s = t.buttonTextColor;
  const o = t.alignment === "center" ? "text-align: center;" : "", a = t.backgroundImageSrc ? t.layout !== "split" ? `background-image: url(${t.backgroundImageSrc}); background-size: cover; background-position: center center;` : `background-color: ${t.backgroundColor};` : `background-color: ${t.backgroundColor};`, l = `background-image: url(${t.backgroundImageSrc}); background-size: ${t.backgroundSize !== "contain" ? "cover" : "50%"}; background-position: center`;
  return ((u = e == null ? void 0 : e.feature) != null && u.emailCustomization || (f = e == null ? void 0 : e.feature) != null && f.emailCustomizationAlpha) && ((d = e == null ? void 0 : e.design) == null ? void 0 : d.buttonStyle) === "outline" && (t.buttonColor === "accent" ? (i = "", r = `
                border: 1px solid ${t.accentColor};
                background-color: transparent;
                color: ${t.accentColor} !important;
            `, s = t.accentColor) : (r = `
                border: 1px solid ${t.buttonColor};
                background-color: transparent;
                color: ${t.buttonColor} !important;
            `, s = t.buttonColor)), (h = e == null ? void 0 : e.feature) != null && h.emailCustomization || (m = e == null ? void 0 : e.feature) != null && m.emailCustomizationAlpha ? `
            <div class="kg-header-card kg-v2" style="color:${t.textColor}; ${o} ${a} ${n}">
                ${t.layout === "split" && t.backgroundImageSrc ? `
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td background="${t.backgroundImageSrc}" style="${l}" class="kg-header-card-image"></td>
                        </tr>
                    </table>
                ` : ""}
                <table border="0" cellpadding="0" cellspacing="0" width="100%" style="color:${t.textColor}; ${o} ${a} ${n}">
                    <tr>
                        <td class="kg-header-card-content" style="${t.layout === "split" && t.backgroundSize === "contain" ? "padding-top: 0;" : ""}">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td align="${t.alignment}">
                                        <h2 class="kg-header-card-heading" style="color:${t.textColor};">${t.header}</h2>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="kg-header-card-subheading-wrapper" align="${t.alignment}">
                                        <p class="kg-header-card-subheading" style="color:${t.textColor};">${t.subheader}</p>
                                    </td>
                                </tr>
                                <tr>
                                    ${t.buttonEnabled && t.buttonUrl && t.buttonUrl.trim() !== "" ? `
                                        <td class="kg-header-button-wrapper">
                                            <table class="btn" border="0" cellspacing="0" cellpadding="0" align="${t.alignment}">
                                                <tr>
                                                    <td align="center" style="${r} ${i}">
                                                        <a href="${t.buttonUrl}" style="color: ${s};">${t.buttonText}</a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    ` : ""}
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            ` : `
        <div class="kg-header-card kg-v2" style="color:${t.textColor}; ${o} ${a} ${n}">
            ${t.layout === "split" && t.backgroundImageSrc ? `
                <div class="kg-header-card-image" background="${t.backgroundImageSrc}" style="${l}"></div>
            ` : ""}
            <div class="kg-header-card-content" style="${t.layout === "split" && t.backgroundSize === "contain" ? "padding-top: 0;" : ""}">
                <h2 class="kg-header-card-heading" style="color:${t.textColor};">${t.header}</h2>
                <p class="kg-header-card-subheading" style="color:${t.textColor};">${t.subheader}</p>
                ${t.buttonEnabled && t.buttonUrl && t.buttonUrl.trim() !== "" ? `
                    <a class="kg-header-card-button" href="${t.buttonUrl}" style="color: ${t.buttonTextColor}; ${r} ${i}">${t.buttonText}</a>
                ` : ""}
            </div>
        </div>
        `;
}
function bke(t, e = {}) {
  var o;
  Vn(e);
  const n = e.createDocument(), i = {
    alignment: t.__alignment,
    buttonText: t.__buttonText,
    buttonEnabled: t.__buttonEnabled,
    buttonUrl: t.__buttonUrl,
    header: t.__header,
    subheader: t.__subheader,
    backgroundImageSrc: t.__backgroundImageSrc,
    backgroundImageWidth: t.__backgroundImageWidth,
    backgroundImageHeight: t.__backgroundImageHeight,
    backgroundSize: t.__backgroundSize,
    backgroundColor: t.__backgroundColor,
    buttonColor: t.__buttonColor,
    layout: t.__layout,
    textColor: t.__textColor,
    buttonTextColor: t.__buttonTextColor,
    swapped: t.__swapped,
    accentColor: t.__accentColor
  };
  if (e.target === "email") {
    const l = e.createDocument().createElement("div");
    return l.innerHTML = (o = vke(i, e)) == null ? void 0 : o.trim(), {
      element: l.firstElementChild
    };
  }
  const r = gke(i, e), s = n.createElement("div");
  if (s.innerHTML = r == null ? void 0 : r.trim(), i.header === "") {
    const a = s.querySelector(".kg-header-card-heading");
    a && a.remove();
  }
  if (i.subheader === "") {
    const a = s.querySelector(".kg-header-card-subheading");
    a && a.remove();
  }
  return {
    element: s.firstElementChild
  };
}
function yke(t) {
  let e = ["kg-card kg-header-card kg-v2"];
  return t.layout && t.layout !== "split" && e.push(`kg-width-${t.layout}`), t.layout === "split" && e.push("kg-layout-split kg-width-full"), t.swapped && t.layout === "split" && e.push("kg-swapped"), t.layout && t.layout === "full" && e.push("kg-content-wide"), t.layout === "split" && t.backgroundSize === "contain" && e.push("kg-content-wide"), e;
}
let E1 = class extends Yn({
  nodeType: "header",
  properties: [
    {
      name: "size",
      default: "small"
    },
    {
      name: "style",
      default: "dark"
    },
    {
      name: "buttonEnabled",
      default: !1
    },
    {
      name: "buttonUrl",
      default: "",
      urlType: "url"
    },
    {
      name: "buttonText",
      default: ""
    },
    {
      name: "header",
      default: "",
      urlType: "html",
      wordCount: !0
    },
    {
      name: "subheader",
      default: "",
      urlType: "html",
      wordCount: !0
    },
    {
      name: "backgroundImageSrc",
      default: "",
      urlType: "url"
    },
    // we need to initialize a new version property here so that we can separate v1 and v2
    // we should never remove old properties, only add new ones, as this could break & corrupt existing content
    // ref https://lexical.dev/docs/concepts/serialization#versioning--breaking-changes
    {
      name: "version",
      default: 1
    },
    {
      name: "accentColor",
      default: "#FF1A75"
    },
    // this is used to have the accent color hex for email
    // v2 properties
    {
      name: "alignment",
      default: "center"
    },
    {
      name: "backgroundColor",
      default: "#000000"
    },
    {
      name: "backgroundImageWidth",
      default: null
    },
    {
      name: "backgroundImageHeight",
      default: null
    },
    {
      name: "backgroundSize",
      default: "cover"
    },
    {
      name: "textColor",
      default: "#FFFFFF"
    },
    {
      name: "buttonColor",
      default: "#ffffff"
    },
    {
      name: "buttonTextColor",
      default: "#000000"
    },
    {
      name: "layout",
      default: "full"
    },
    // replaces size
    {
      name: "swapped",
      default: !1
    }
  ],
  defaultRenderFn: {
    1: pke,
    2: bke
  }
}) {
  static importDOM() {
    return mke(this);
  }
};
const wke = (t) => new E1(t);
function kke(t) {
  return t instanceof E1;
}
function xke(t) {
  return {
    "#comment": (e) => e.nodeType === 8 && e.nodeValue.trim() === "members-only" ? {
      conversion() {
        return {
          node: new t()
        };
      },
      priority: 0
    } : null
  };
}
function _ke(t, e = {}) {
  Vn(e);
  const i = e.createDocument().createElement("div");
  return i.innerHTML = "<!--members-only-->", {
    element: i,
    type: "inner"
  };
}
let T1 = class extends Yn({
  nodeType: "paywall",
  defaultRenderFn: _ke
}) {
  static importDOM() {
    return xke(this);
  }
};
const Oke = (t) => new T1(t);
function Ske(t) {
  return t instanceof T1;
}
function Cke(t) {
  return {
    div: (e) => {
      var i;
      const n = (i = e.classList) == null ? void 0 : i.contains("kg-product-card");
      return e.tagName === "DIV" && n ? {
        conversion(r) {
          const s = Io(r, {
            selector: ".kg-product-card-title"
          }), o = Io(r, {
            selector: ".kg-product-card-description"
          }), a = {
            productButtonEnabled: !1,
            productRatingEnabled: !1,
            productTitle: s,
            productDescription: o
          }, l = r.querySelector(".kg-product-card-image");
          l && l.getAttribute("src") && (a.productImageSrc = l.getAttribute("src"), l.getAttribute("width") && (a.productImageWidth = l.getAttribute("width")), l.getAttribute("height") && (a.productImageHeight = l.getAttribute("height")));
          const u = [...r.querySelectorAll(".kg-product-card-rating-active")].length;
          u && (a.productRatingEnabled = !0, a.productStarRating = u);
          const f = r.querySelector("a");
          if (f) {
            const h = f.getAttribute("href"), m = Eke(f);
            h && m && (a.productButtonEnabled = !0, a.productButton = m, a.productUrl = h);
          }
          return !s && !o && !l && !f ? null : {
            node: new t(a)
          };
        },
        priority: 1
      } : null;
    }
  };
}
function Eke(t) {
  let e = t.textContent;
  return e && (e = e.replace(/\n/g, " ").replace(/\s+/g, " ").trim()), e;
}
function Tke(t, e = {}) {
  var l, u, f;
  Vn(e);
  const n = e.createDocument();
  if (t.isEmpty())
    return Ir(n);
  let i = "5px";
  ((l = e.design) == null ? void 0 : l.buttonCorners) === "rounded" ? i = "6px" : ((u = e.design) == null ? void 0 : u.buttonCorners) === "square" ? i = "0px" : ((f = e.design) == null ? void 0 : f.buttonCorners) === "pill" && (i = "9999px");
  const r = {
    ...t.getDataset(),
    starIcon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.729,1.2l3.346,6.629,6.44.638a.805.805,0,0,1,.5,1.374l-5.3,5.253,1.965,7.138a.813.813,0,0,1-1.151.935L12,19.934,5.48,23.163a.813.813,0,0,1-1.151-.935L6.294,15.09.99,9.837a.805.805,0,0,1,.5-1.374l6.44-.638L11.271,1.2A.819.819,0,0,1,12.729,1.2Z"/></svg>',
    buttonBorderRadius: i
  }, s = "kg-product-card-rating-active";
  for (let d = 1; d <= 5; d++)
    r["star" + d] = "", t.productStarRating >= d && (r["star" + d] = s);
  const o = e.target === "email" ? Mke({
    data: r,
    feature: e.feature
  }) : $ke({
    data: r,
    feature: e.feature
  }), a = n.createElement("div");
  return a.innerHTML = o.trim(), {
    element: a.firstElementChild
  };
}
function $ke({
  data: t
}) {
  return `
        <div class="kg-card kg-product-card">
            <div class="kg-product-card-container">
                ${t.productImageSrc ? `<img src="${t.productImageSrc}" ${t.productImageWidth ? `width="${t.productImageWidth}"` : ""} ${t.productImageHeight ? `height="${t.productImageHeight}"` : ""} class="kg-product-card-image" loading="lazy" />` : ""}
                <div class="kg-product-card-title-container">
                    <h4 class="kg-product-card-title">${t.productTitle}</h4>
                </div>
                ${t.productRatingEnabled ? `
                    <div class="kg-product-card-rating">
                        <span class="${t.star1} kg-product-card-rating-star">${t.starIcon}</span>
                        <span class="${t.star2} kg-product-card-rating-star">${t.starIcon}</span>
                        <span class="${t.star3} kg-product-card-rating-star">${t.starIcon}</span>
                        <span class="${t.star4} kg-product-card-rating-star">${t.starIcon}</span>
                        <span class="${t.star5} kg-product-card-rating-star">${t.starIcon}</span>
                    </div>
                ` : ""}

                <div class="kg-product-card-description">${t.productDescription}</div>
                ${t.productButtonEnabled ? `
                    <a href="${t.productUrl}" class="kg-product-card-button kg-product-card-btn-accent" target="_blank" rel="noopener noreferrer"><span>${t.productButton}</span></a>
                ` : ""}
            </div>
        </div>
    `;
}
function Mke({
  data: t,
  feature: e
}) {
  let n;
  return t.productImageWidth && t.productImageHeight && (n = {
    width: t.productImageWidth,
    height: t.productImageHeight
  }, t.productImageWidth >= 560 && (n = Eh(n, {
    width: 560
  }))), e != null && e.emailCustomization || e != null && e.emailCustomizationAlpha ? `
            <table class="kg-product-card" cellspacing="0" cellpadding="0" border="0">
                <tr>
                    <td class="kg-product-card-container">
                        <table cellspacing="0" cellpadding="0" border="0">
                            ${t.productImageSrc ? `
                                <tr>
                                    <td class="kg-product-image" align="center">
                                        <img src="${t.productImageSrc}" ${n ? `width="${n.width}"` : ""} ${n ? `height="${n.height}"` : ""} border="0"/>
                                    </td>
                                </tr>
                            ` : ""}
                            <tr>
                                <td valign="top">
                                    <h4 class="kg-product-title">${t.productTitle}</h4>
                                </td>
                            </tr>
                            ${t.productRatingEnabled ? `
                                <tr class="kg-product-rating">
                                    <td valign="top">
                                        <img src="${`https://static.ghost.org/v4.0.0/images/star-rating-${t.productStarRating}.png`}" border="0" />
                                    </td>
                                </tr>
                            ` : ""}
                            <tr>
                                <td class="kg-product-description-wrapper">${t.productDescription}</td>
                            </tr>
                            ${t.productButtonEnabled ? `
                                <tr>
                                    <td class="kg-product-button-wrapper">
                                        <table class="btn btn-accent" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td align="center" width="100%">
                                                    <a href="${t.productUrl}">${t.productButton}</a>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            ` : ""}
                        </table>
                    </td>
                </tr>
            </table>
            ` : `
         <table cellspacing="0" cellpadding="0" border="0" style="width:100%; padding:20px; border:1px solid #E9E9E9; border-radius: 5px; margin: 0 0 1.5em; width: 100%;">
            ${t.productImageSrc ? `
                <tr>
                    <td align="center" style="padding-top:0; padding-bottom:0; margin-bottom:0; padding-bottom:0;">
                        <img src="${t.productImageSrc}" ${n ? `width="${n.width}"` : ""} ${n ? `height="${n.height}"` : ""} style="display: block; width: 100%; height: auto; max-width: 100%; border: none; padding-bottom: 16px;" border="0"/>
                    </td>
                </tr>
            ` : ""}
            <tr>
                <td valign="top">
                    <h4 style="font-size: 22px !important; margin-top: 0 !important; margin-bottom: 0 !important; font-weight: 700;">${t.productTitle}</h4>
                </td>
            </tr>
            ${t.productRatingEnabled ? `
                <tr style="padding-top:0; padding-bottom:0; margin-bottom:0; padding-bottom:0;">
                    <td valign="top">
                        <img src="${`https://static.ghost.org/v4.0.0/images/star-rating-${t.productStarRating}.png`}" style="border: none; width: 96px;" border="0" />
                    </td>
                </tr>
            ` : ""}
            <tr>
                <td style="padding-top:0; padding-bottom:0; margin-bottom:0; padding-bottom:0;">
                    <div style="padding-top: 8px; opacity: 0.7; font-size: 17px; line-height: 1.4; margin-bottom: -24px;">${t.productDescription}</div>
                </td>
            </tr>
            ${t.productButtonEnabled ? `
                <tr>
                    <td style="padding-top:0; padding-bottom:0; margin-bottom:0; padding-bottom:0;">
                        <div class="btn btn-accent" style="box-sizing: border-box;display: table;width: 100%;padding-top: 16px;">
                            <a href="${t.productUrl}" style="overflow-wrap: anywhere;border: solid 1px;border-radius: ${t.buttonBorderRadius};box-sizing: border-box;cursor: pointer;display: inline-block;font-size: 14px;font-weight: bold;margin: 0;padding: 0;text-decoration: none;color: #FFFFFF; width: 100%; text-align: center;"><span style="display: block;padding: 12px 25px;">${t.productButton}</span></a>
                        </div>
                    </td>
                </tr>
            ` : ""}
        </table>
        `;
}
let $1 = class extends Yn({
  nodeType: "product",
  properties: [{
    name: "productImageSrc",
    default: "",
    urlType: "url"
  }, {
    name: "productImageWidth",
    default: null
  }, {
    name: "productImageHeight",
    default: null
  }, {
    name: "productTitle",
    default: "",
    urlType: "html",
    wordCount: !0
  }, {
    name: "productDescription",
    default: "",
    urlType: "html",
    wordCount: !0
  }, {
    name: "productRatingEnabled",
    default: !1
  }, {
    name: "productStarRating",
    default: 5
  }, {
    name: "productButtonEnabled",
    default: !1
  }, {
    name: "productButton",
    default: ""
  }, {
    name: "productUrl",
    default: ""
  }],
  defaultRenderFn: Tke
}) {
  /* override */
  exportJSON() {
    const {
      productImageSrc: e,
      productImageWidth: n,
      productImageHeight: i,
      productTitle: r,
      productDescription: s,
      productRatingEnabled: o,
      productStarRating: a,
      productButtonEnabled: l,
      productButton: u,
      productUrl: f
    } = this;
    return {
      type: "product",
      version: 1,
      productImageSrc: e && e.startsWith("data:") ? "<base64String>" : e,
      productImageWidth: n,
      productImageHeight: i,
      productTitle: r,
      productDescription: s,
      productRatingEnabled: o,
      productStarRating: a,
      productButtonEnabled: l,
      productButton: u,
      productUrl: f
    };
  }
  static importDOM() {
    return Cke(this);
  }
  isEmpty() {
    const e = this.__productButtonEnabled && this.__productUrl && this.__productButton;
    return !this.__productTitle && !this.__productDescription && !e && !this.__productImageSrc && !this.__productRatingEnabled;
  }
};
const Nke = (t) => new $1(t);
function Ake(t) {
  return t instanceof $1;
}
function Dke(t) {
  return {
    figure: (e) => {
      if (e.nodeType === 1 && e.tagName === "FIGURE") {
        const n = e.querySelector("iframe");
        if (n)
          return {
            conversion(r) {
              const s = QN(n);
              return s ? (s.caption = Io(r), {
                node: new t(s)
              }) : null;
            },
            priority: 1
          };
        if (e.querySelector("blockquote"))
          return {
            conversion(r) {
              const s = r.querySelector("a");
              if (!s)
                return null;
              let o = s.getAttribute("href");
              if (!o || !o.match(/^https?:\/\//i))
                return null;
              let a = {
                url: o
              };
              a.caption = Io(r);
              let l = r.querySelector("figcaption");
              return l == null || l.remove(), a.html = r.innerHTML, {
                node: new t(a)
              };
            },
            priority: 1
          };
      }
      return null;
    },
    iframe: (e) => e.nodeType === 1 && e.tagName === "IFRAME" ? {
      conversion(n) {
        const i = QN(n);
        return i ? {
          node: new t(i)
        } : null;
      },
      priority: 1
    } : null
  };
}
function QN(t) {
  if (!t.src || !t.src.match(/^(https?:)?\/\//i))
    return;
  t.src.match(/^\/\//) && (t.src = `https:${t.src}`);
  let e = {
    url: t.src
  };
  return e.html = t.outerHTML, e;
}
function Pke(t, e, n) {
  const i = t.metadata, r = e.createElement("figure");
  r.setAttribute("class", "kg-card kg-embed-card");
  let s = t.html;
  const o = i && i.tweet_data, a = n.target === "email";
  if (o && a) {
    const u = o.id, f = new Intl.NumberFormat("en-US", {
      style: "decimal",
      notation: "compact",
      unitDisplay: "narrow",
      maximumFractionDigits: 1
    }), d = f.format(o.public_metrics.retweet_count), h = f.format(o.public_metrics.like_count), m = o.users && o.users.find((W) => W.id === o.author_id), g = ht.fromISO(o.created_at).toLocaleString(ht.TIME_SIMPLE), w = ht.fromISO(o.created_at).toLocaleString(ht.DATE_MED), x = o.entities && o.entities.mentions || [], _ = o.entities && o.entities.urls || [], S = o.entities && o.entities.hashtags || [], C = x.concat(_).concat(S).sort((W, z) => W.start - z.start);
    let E = o.text, M = null;
    const $ = o.attachments && o.attachments && o.attachments.media_keys;
    $ && (M = o.includes.media[0].preview_image_url || o.includes.media[0].url);
    const P = o.attachments && o.attachments && o.attachments.poll_ids;
    if (x) {
      let W = 0, z = [], Z = Hme(E);
      for (const L of C) {
        let Q = "text", V = Z.slice(L.start, L.end + 1).join("").replace(/\n/g, "<br>");
        L.url && (!L.display_url || L.display_url.startsWith("pic.twitter.com") ? Q = "img_url" : (Q = "url", V = V.replace(L.url, L.display_url))), L.username && (Q = "mention"), L.tag && (Q = "hashtag"), z.push({
          type: "text",
          data: Z.slice(W, L.start).join("").replace(/\n/g, "<br>")
        }), z.push({
          type: Q,
          data: V
        }), W = L.end + 1;
      }
      z.push({
        type: "text",
        data: Z.slice(W, Z.length).join("").replace(/\n/g, "<br>")
      }), E = z.reduce((L, Q) => Q.type === "text" ? L + Q.data : Q.type === "mention" ? L + `<span style="color: #1DA1F2;">${Q.data}</span>` : Q.type === "hashtag" ? L + `<span style="color: #1DA1F2;">${Q.data}</span>` : Q.type === "url" ? L + `<span style="color: #1DA1F2; word-break: break-all;">${Q.data}</span>` : L, "");
    }
    s = `
        <table cellspacing="0" cellpadding="0" border="0" class="kg-twitter-card">
            <tr>
                <td>
                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                        ${m ? `
                            <tr>
                                ${m.profile_image_url ? `<td width="48" style="width: 48px;">
                                    <a href="https://twitter.com/twitter/status/${u}" class="kg-twitter-link" style="padding-left: 16px; padding-top: 16px;"><img src="${m.profile_image_url}" style="max-width: 512px; border: none; width: 48px; height: 48px; border-radius: 999px;" border="0"></a>
                                </td>` : ""}
                                ${m.name ? `
                                <td style="line-height: 1.3em; width: 100%;">
                                    <a href="https://twitter.com/twitter/status/${u}" class="kg-twitter-link" style="font-size: 15px !important; font-weight: 600; width: 100%; padding-top: 20px; padding-bottom: 18px;">${m.name} <br> <span style="color: #ABB4BE; font-size: 14px; font-weight: 500;">@${m.username}</span></a>
                                </td>` : ""}
                                <td align="right" width="24" style="width: 24px;">
                                    <a href="https://twitter.com/twitter/status/${u}" class="kg-twitter-link" style="padding-right: 16px; padding-top: 20px; width: 24px; height: 38px;"><img src="https://static.ghost.org/v4.0.0/images/twitter-logo-small.png" width="24" border="0"></a>
                                </td>
                            </tr>
                        ` : ""}
                        <tr>
                            <td colspan="3">
                                <a href="https://twitter.com/twitter/status/${u}" class="kg-twitter-link" style="font-size: 15px; line-height: 1.4em; padding-top: 8px; padding-left: 16px; padding-right: 16px; padding-bottom: 16px;">${E}
                                ${P ? '<br><span style="color: #1DA1F2;">View poll &rarr;</span>' : ""}
                                </a>
                            </td>
                        </tr>
                        ${$ ? `<tr>
                            <td colspan="3" align="center" style="width: 100%;">
                                <a href="https://twitter.com/twitter/status/${u}" style="display: block; padding-top: 0; padding-left: 16px; padding-right: 16px; padding-bottom: 0;"><img src="${M}" style="width: 100%; border: 1px solid #E9E9E9; max-width: 528px; border-radius: 10px;" border="0"></a>
                            </td>
                        </tr>` : ""}
                        <tr>
                            <td colspan="3" style="width: 100%;">
                                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                    <tr>
                                        <td>
                                        <a href="https://twitter.com/twitter/status/${u}" class="kg-twitter-link" style="padding-top: 4px; padding-right: 16px; padding-bottom: 12px; padding-left: 16px;"><span style="color: #838383;">${g} &bull; ${w}</span></a>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" style="width: 100%;">
                                <table cellspacing="0" cellpadding="0" border="0" width="100%" style="border-top: 1px solid #E9E9E9;">
                                    <tr>
                                        <td>
                                            <a href="https://twitter.com/twitter/status/${u}" class="kg-twitter-link" style="padding-top: 12px; padding-right: 16px; padding-bottom: 12px; padding-left: 16px;">
                                                <span style="font-weight: 600;">${h}</span> <span style="color: #838383;">likes &bull;</span>
                                                <span style="font-weight: 600;">${d}</span> <span style="color: #838383;">retweets</span>
                                            </a>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        `;
  }
  r.innerHTML = s.trim();
  const l = t.caption;
  if (l) {
    const u = e.createElement("figcaption");
    u.innerHTML = l, r.appendChild(u), r.setAttribute("class", `${r.getAttribute("class")} kg-card-hascaption`);
  }
  return {
    element: r
  };
}
function Ike(t, e = {}) {
  Vn(e);
  const n = e.createDocument();
  return t.embedType === "twitter" ? Pke(t, n, e) : Lke(t, n, e);
}
function Lke(t, e, n) {
  if (t.isEmpty())
    return Ir(e);
  const i = n.target === "email", r = t.metadata, s = t.url, o = t.embedType === "video" && r && r.thumbnail_url, a = e.createElement("figure");
  if (a.setAttribute("class", "kg-card kg-embed-card"), i && o) {
    const f = r.thumbnail_width / r.thumbnail_height, d = Math.round(600 / 4), h = Math.round(600 / f), m = `
            <!--[if !mso !vml]-->
            <a class="kg-video-preview" href="${s}" aria-label="Play video" style="mso-hide: all">
                <table cellpadding="0" cellspacing="0" border="0" width="100%" background="${r.thumbnail_url}" role="presentation" style="background: url('${r.thumbnail_url}') left top / cover; mso-hide: all">
                    <tr style="mso-hide: all">
                        <td width="25%" style="visibility: hidden; mso-hide: all">
                            <img src="https://img.spacergif.org/v1/${d}x${h}/0a/spacer.png" alt="" width="100%" border="0" style="display:block; height: auto; opacity: 0; visibility: hidden; mso-hide: all;">
                        </td>
                        <td width="50%" align="center" valign="middle" style="vertical-align: middle; mso-hide: all;">
                            <div class="kg-video-play-button" style="mso-hide: all"><div style="mso-hide: all"></div></div>
                        </td>
                        <td width="25%" style="mso-hide: all">&nbsp;</td>
                    </tr>
                </table>
            </a>
            <!--[endif]-->

            <!--[if vml]>
            <v:group xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" coordsize="600,${h}" coordorigin="0,0" href="${s}" style="width:600px;height:${h}px;">
                <v:rect fill="t" stroked="f" style="position:absolute;width:600;height:${h};"><v:fill src="${r.thumbnail_url}" type="frame"/></v:rect>
                <v:oval fill="t" strokecolor="white" strokeweight="4px" style="position:absolute;left:${Math.round(600 / 2 - 39)};top:${Math.round(h / 2 - 39)};width:78;height:78"><v:fill color="black" opacity="30%" /></v:oval>
                <v:shape coordsize="24,32" path="m,l,32,24,16,xe" fillcolor="white" stroked="f" style="position:absolute;left:${Math.round(600 / 2 - 11)};top:${Math.round(h / 2 - 17)};width:30;height:34;" />
            </v:group>
            <![endif]-->
        `;
    a.innerHTML = m.trim();
  } else
    a.innerHTML = t.html;
  const l = t.caption;
  if (l) {
    const u = e.createElement("figcaption");
    u.innerHTML = l, a.appendChild(u), a.setAttribute("class", `${a.getAttribute("class")} kg-card-hascaption`);
  }
  return {
    element: a
  };
}
let M1 = class extends Yn({
  nodeType: "embed",
  properties: [{
    name: "url",
    default: "",
    urlType: "url"
  }, {
    name: "embedType",
    default: ""
  }, {
    name: "html",
    default: ""
  }, {
    name: "metadata",
    default: {}
  }, {
    name: "caption",
    default: "",
    wordCount: !0
  }],
  defaultRenderFn: Ike
}) {
  static importDOM() {
    return Dke(this);
  }
  isEmpty() {
    return !this.__url && !this.__html;
  }
};
const Rke = (t) => new M1(t);
function jke(t) {
  return t instanceof M1;
}
function T4(t) {
  return t.replace(/\n/g, " ").replace(/\s+/g, " ").trim();
}
function $4(t) {
  return t.replace(/\{(\w*?)(?:,? *"(.*?)")?\}/g, "%%$&%%");
}
function M4(t, e) {
  const n = e.createElement("div");
  return n.innerHTML = t, n.querySelectorAll("code").forEach((s) => {
    if (s.textContent.match(/((.*?){.*?}(.*?))/gi)) {
      const a = s.innerHTML;
      s.parentNode.replaceChild(e.createRange().createContextualFragment(a), s);
    }
  }), n.innerHTML;
}
function Fke(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = t.html;
  if (!i || e.target !== "email")
    return Ir(n);
  const r = $4(M4(T4(i), n)), s = n.createElement("div");
  return s.innerHTML = r, {
    element: s,
    type: "inner"
  };
}
let N1 = class extends Yn({
  nodeType: "email",
  properties: [{
    name: "html",
    default: "",
    urlType: "html"
  }],
  defaultRenderFn: Fke
}) {
};
const Bke = (t) => new N1(t);
function zke(t) {
  return t instanceof N1;
}
function U3(t, e) {
  const n = yw(t);
  return n.fileName = t.src.match(/[^/]*$/)[0], n.row = Math.floor(e / 3), n;
}
function Wke(t) {
  return {
    figure: (e) => {
      var n;
      return (n = e.classList) != null && n.contains("kg-gallery-card") ? {
        conversion(i) {
          const r = {}, s = Array.from(i.querySelectorAll("img"));
          return r.images = s.map(U3), r.caption = Io(i), {
            node: new t(r)
          };
        },
        priority: 1
      } : null;
    },
    div: (e) => {
      function n(r) {
        var s;
        return r.tagName === "DIV" && ((s = r.dataset) == null ? void 0 : s.paragraphCount) && r.querySelectorAll("img").length > 0;
      }
      if (n(e))
        return {
          conversion(r) {
            const s = {
              caption: Io(r)
            };
            let o = Array.from(r.querySelectorAll("img")), a = r.nextElementSibling;
            for (; a && n(a); ) {
              let u = a;
              o = o.concat(Array.from(u.querySelectorAll("img")));
              const f = Io(u);
              f && (s.caption = `${s.caption} / ${f}`), a = u.nextElementSibling, u.remove();
            }
            return s.images = o.map(U3), {
              node: new t(s)
            };
          },
          priority: 1
        };
      function i(r) {
        return r.tagName === "DIV" && r.className.match(/sqs-gallery-container/) && !r.className.match(/summary-/);
      }
      return i(e) ? {
        conversion(r) {
          const s = {};
          let o = Array.from(r.querySelectorAll("img.thumb-image"));
          return o = o.map((l) => {
            if (!l.getAttribute("src"))
              if (l.previousElementSibling.tagName === "NOSCRIPT" && l.previousElementSibling.getElementsByTagName("img").length) {
                const u = l.previousElementSibling;
                l.setAttribute("src", l.getAttribute("data-src")), u.remove();
              } else
                return;
            return l;
          }).filter((l) => l !== void 0), s.images = o.map(U3), s.caption = Io(r, {
            selector: ".meta-title"
          }), {
            node: new t(s)
          };
        },
        priority: 1
      } : null;
    }
  };
}
const Hke = 3;
function Qke(t) {
  return t.fileName && t.src && t.width && t.height;
}
function Uke(t) {
  const e = [], n = t.length;
  return t.forEach((i, r) => {
    let s = i.row;
    n > 1 && n % Hke === 1 && r === n - 2 && (s = s + 1), e[s] || (e[s] = []), e[s].push(i);
  }), e;
}
function Zke(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = t.images.filter(Qke);
  if (!i.length)
    return Ir(n);
  const r = n.createElement("figure");
  r.setAttribute("class", "kg-card kg-gallery-card kg-width-wide");
  const s = n.createElement("div");
  s.setAttribute("class", "kg-gallery-container"), r.appendChild(s);
  const o = Uke(i);
  if (o.forEach((a) => {
    const l = n.createElement("div");
    l.setAttribute("class", "kg-gallery-row"), a.forEach((u) => {
      const f = n.createElement("div");
      f.setAttribute("class", "kg-gallery-image");
      const d = n.createElement("img");
      d.setAttribute("src", u.src), d.setAttribute("width", u.width), d.setAttribute("height", u.height), d.setAttribute("loading", "lazy"), d.setAttribute("alt", u.alt || ""), u.title && d.setAttribute("title", u.title);
      const {
        canTransformImage: h
      } = e, {
        defaultMaxWidth: m
      } = e.imageOptimization || {};
      if (m && u.width > m && gf(u.src, e.siteUrl) && h && h(u.src)) {
        const {
          width: g,
          height: w
        } = Eh(u, {
          width: m
        });
        d.setAttribute("width", g), d.setAttribute("height", w);
      }
      if (e.target !== "email" && (AW(d, u, e), d.getAttribute("srcset") && u.width >= 720 && (o.length === 1 && a.length === 1 && u.width >= 1200 ? d.setAttribute("sizes", "(min-width: 1200px) 1200px") : d.setAttribute("sizes", "(min-width: 720px) 720px"))), e.target === "email") {
        if (u.width > 600) {
          const g = Eh(u, {
            width: 600
          });
          d.setAttribute("width", g.width), d.setAttribute("height", g.height);
        }
        if (gf(u.src, e.siteUrl) && e.canTransformImage && e.canTransformImage(u.src)) {
          const w = oE(u, e.imageOptimization.contentImageSizes).find((x) => x >= 1200);
          if (!(!w || w === u.width)) {
            const [, x, _] = u.src.match(/(.*\/content\/images)\/(.*)/);
            d.setAttribute("src", `${x}/size/w${w}/${_}`);
          }
        }
        if (MW(u.src)) {
          const g = new URL(u.src);
          g.searchParams.set("w", 1200), d.setAttribute("src", g.href);
        }
      }
      if (u.href) {
        const g = n.createElement("a");
        g.setAttribute("href", u.href), g.appendChild(d), f.appendChild(g);
      } else
        f.appendChild(d);
      l.appendChild(f);
    }), s.appendChild(l);
  }), t.caption) {
    let a = n.createElement("figcaption");
    a.innerHTML = t.caption, r.appendChild(a), r.setAttribute("class", `${r.getAttribute("class")} kg-card-hascaption`);
  }
  return {
    element: r
  };
}
let A1 = class extends Yn({
  nodeType: "gallery",
  properties: [{
    name: "images",
    default: []
  }, {
    name: "caption",
    default: "",
    wordCount: !0
  }],
  defaultRenderFn: Zke
}) {
  /* override */
  static get urlTransformMap() {
    return {
      caption: "html",
      images: {
        src: "url",
        caption: "html"
      }
    };
  }
  static importDOM() {
    return Wke(this);
  }
  hasEditMode() {
    return !1;
  }
};
const qke = (t) => new A1(t);
function Yke(t) {
  return t instanceof A1;
}
function Vke(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), {
    html: i,
    buttonText: r,
    buttonUrl: s,
    showButton: o,
    alignment: a,
    segment: l,
    showDividers: u
  } = t, f = o && !!r && !!s;
  if (!i && !f || e.target !== "email")
    return Ir(n);
  const d = n.createElement("div");
  l && d.setAttribute("data-gh-segment", l), a === "center" && d.setAttribute("class", "align-center"), u && d.appendChild(n.createElement("hr"));
  const h = $4(M4(T4(i), n));
  if (d.innerHTML = d.innerHTML + h, f) {
    const m = `
            <div class="btn btn-accent">
                <table border="0" cellspacing="0" cellpadding="0" align="${Di(a)}">
                    <tbody>
                        <tr>
                            <td align="center">
                                <a href="${Di(s)}">${Di(r)}</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <p></p>
        `, g = $4(M4(T4(m), n));
    d.innerHTML = d.innerHTML + g;
  }
  return u && d.appendChild(n.createElement("hr")), {
    element: d
  };
}
let D1 = class extends Yn({
  nodeType: "email-cta",
  properties: [{
    name: "alignment",
    default: "left"
  }, {
    name: "buttonText",
    default: ""
  }, {
    name: "buttonUrl",
    default: "",
    urlType: "url"
  }, {
    name: "html",
    default: "",
    urlType: "html"
  }, {
    name: "segment",
    default: "status:free"
  }, {
    name: "showButton",
    default: !1
  }, {
    name: "showDividers",
    default: !0
  }],
  defaultRenderFn: Vke
}) {
};
const Xke = (t) => new D1(t);
function Gke(t) {
  return t instanceof D1;
}
function Kke(t) {
  return t.classList.contains("kg-layout-split") ? "split" : t.classList.contains("kg-layout-full") ? "full" : t.classList.contains("kg-layout-wide") ? "wide" : "regular";
}
function Jke(t) {
  return {
    div: (e) => {
      var i;
      const n = ((i = e.dataset) == null ? void 0 : i.lexicalSignupForm) === "";
      return e.tagName === "DIV" && n ? {
        conversion(r) {
          var W, z, Z, L, Q, V, H, R, q, Y, K, te, se, ce, U;
          const s = Kke(r), o = ((W = r.querySelector("h2")) == null ? void 0 : W.textContent) || "", a = ((z = r.querySelector("h3")) == null ? void 0 : z.textContent) || "", l = ((Z = r.querySelector("p")) == null ? void 0 : Z.textContent) || "", u = (L = r.querySelector(".kg-signup-card-image")) == null ? void 0 : L.getAttribute("src"), f = r.style.backgroundColor || "", d = ((Q = r.querySelector(".kg-signup-card-button")) == null ? void 0 : Q.style.backgroundColor) || "", h = ((H = (V = r.querySelector(".kg-signup-card-button-default")) == null ? void 0 : V.textContent) == null ? void 0 : H.trim()) || "Subscribe", m = ((R = r.querySelector(".kg-signup-card-button")) == null ? void 0 : R.style.color) || "", g = ((q = r.querySelector(".kg-signup-card-success")) == null ? void 0 : q.style.color) || "", w = (Y = r.querySelector(".kg-signup-card-text")) != null && Y.classList.contains("kg-align-center") ? "center" : "left", x = ((te = (K = r.querySelector(".kg-signup-card-success")) == null ? void 0 : K.textContent) == null ? void 0 : te.trim()) || "", _ = [...r.querySelectorAll("input[data-members-label]")].map((F) => F.value), S = ((se = r.classList) == null ? void 0 : se.contains("kg-style-accent")) ?? !1, C = ((U = (ce = r.querySelector(".kg-signup-card-button")) == null ? void 0 : ce.classList) == null ? void 0 : U.contains("kg-style-accent")) ?? !1, E = r.classList.contains("kg-swapped"), M = r.classList.contains("kg-content-wide") ? "contain" : "cover", $ = {
            layout: s,
            buttonText: h,
            header: o,
            subheader: a,
            disclaimer: l,
            backgroundImageSrc: u,
            backgroundSize: M,
            backgroundColor: S ? "accent" : Vc(f) || "#ffffff",
            buttonColor: C ? "accent" : Vc(d) || "#ffffff",
            textColor: Vc(g) || "#ffffff",
            buttonTextColor: Vc(m) || "#000000",
            alignment: w,
            successMessage: x,
            labels: _,
            swapped: E
          };
          return {
            node: new t($)
          };
        },
        priority: 1
      } : null;
    }
  };
}
function e2e(t) {
  const e = i2e(t).join(" "), n = r2e(t), i = t.buttonColor === "accent" ? "kg-style-accent" : "", r = t.buttonColor !== "accent" ? `background-color: ${t.buttonColor};` : "", s = t.alignment === "center" ? "kg-align-center" : "", o = t.backgroundColor !== "accent" && (!t.backgroundImageSrc || t.layout === "split") ? `background-color: ${t.backgroundColor}` : "", a = t.backgroundImageSrc ? `
        <picture><img class="kg-signup-card-image" src="${t.backgroundImageSrc}" alt="" /></picture>
    ` : "", l = `
        <form class="kg-signup-card-form" data-members-form="signup">
            ${t.labels.map((u) => `<input data-members-label type="hidden" value="${u}" />`).join(`
`)}
            <div class="kg-signup-card-fields">
                <input class="kg-signup-card-input" id="email" data-members-email="" type="email" required="true" placeholder="Your email" />
                <button class="kg-signup-card-button ${i}" style="${r}color: ${t.buttonTextColor};" type="submit">
                    <span class="kg-signup-card-button-default">${t.buttonText || "Subscribe"}</span>
                    <span class="kg-signup-card-button-loading">${t2e()}</span>
                </button>
            </div>
            <div class="kg-signup-card-success" ${t.textColor ? `style="color: ${t.textColor};"` : ""}>
                ${t.successMessage || "Thanks! Now check your email to confirm."}
            </div>
            <div class="kg-signup-card-error" ${t.textColor ? `style="color: ${t.textColor};"` : ""} data-members-error></div>
        </form>
        `;
  return `
        <div class="${e} ${n}" data-lexical-signup-form style="${o}; display: none;">
            ${t.layout !== "split" ? a : ""}
            <div class="kg-signup-card-content">
                ${t.layout === "split" ? a : ""}
                <div class="kg-signup-card-text ${s}">
                    <h2 class="kg-signup-card-heading" ${t.textColor ? `style="color: ${t.textColor};"` : ""}>${t.header}</h2>
                    <p class="kg-signup-card-subheading" ${t.textColor ? `style="color: ${t.textColor};"` : ""}>${t.subheader}</p>
                    ${l}
                    <p class="kg-signup-card-disclaimer" ${t.textColor ? `style="color: ${t.textColor};"` : ""}>${t.disclaimer}</p>
                </div>
            </div>
        </div>
        `;
}
function t2e() {
  return `<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">
        <g stroke-linecap="round" stroke-width="2" fill="currentColor" stroke="none" stroke-linejoin="round" class="nc-icon-wrapper">
            <g class="nc-loop-dots-4-24-icon-o">
                <circle cx="4" cy="12" r="3"></circle>
                <circle cx="12" cy="12" r="3"></circle>
                <circle cx="20" cy="12" r="3"></circle>
            </g>
            <style data-cap="butt">
                .nc-loop-dots-4-24-icon-o{--animation-duration:0.8s}
                .nc-loop-dots-4-24-icon-o *{opacity:.4;transform:scale(.75);animation:nc-loop-dots-4-anim var(--animation-duration) infinite}
                .nc-loop-dots-4-24-icon-o :nth-child(1){transform-origin:4px 12px;animation-delay:-.3s;animation-delay:calc(var(--animation-duration)/-2.666)}
                .nc-loop-dots-4-24-icon-o :nth-child(2){transform-origin:12px 12px;animation-delay:-.15s;animation-delay:calc(var(--animation-duration)/-5.333)}
                .nc-loop-dots-4-24-icon-o :nth-child(3){transform-origin:20px 12px}
                @keyframes nc-loop-dots-4-anim{0%,100%{opacity:.4;transform:scale(.75)}50%{opacity:1;transform:scale(1)}}
            </style>
        </g>
    </svg>`;
}
function n2e(t, e = {}) {
  Vn(e);
  const n = e.createDocument(), i = {
    alignment: t.__alignment,
    buttonText: t.__buttonText,
    header: t.__header,
    subheader: t.__subheader,
    disclaimer: t.__disclaimer,
    backgroundImageSrc: t.__backgroundImageSrc,
    backgroundSize: t.__backgroundSize,
    backgroundColor: t.__backgroundColor,
    buttonColor: t.__buttonColor,
    labels: t.__labels,
    layout: t.__layout,
    textColor: t.__textColor,
    buttonTextColor: t.__buttonTextColor,
    successMessage: t.__successMessage,
    swapped: t.__swapped
  };
  if (e.target === "email")
    return {
      element: n.createElement("div")
    };
  const r = e2e(i), s = n.createElement("div");
  if (s.innerHTML = r == null ? void 0 : r.trim(), i.header === "") {
    const o = s.querySelector(".kg-signup-card-heading");
    o && o.remove();
  }
  if (i.subheader === "") {
    const o = s.querySelector(".kg-signup-card-subheading");
    o && o.remove();
  }
  if (i.disclaimer === "") {
    const o = s.querySelector(".kg-signup-card-disclaimer");
    o && o.remove();
  }
  return {
    element: s.firstElementChild
  };
}
function i2e(t) {
  let e = ["kg-card kg-signup-card"];
  return t.layout && t.layout !== "split" && e.push(`kg-width-${t.layout}`), t.layout === "split" && e.push("kg-layout-split kg-width-full"), t.swapped && t.layout === "split" && e.push("kg-swapped"), t.layout && t.layout === "full" && e.push("kg-content-wide"), t.layout === "split" && t.backgroundSize === "contain" && e.push("kg-content-wide"), e;
}
const r2e = (t) => t.layout === "split" && t.backgroundColor === "accent" || t.layout !== "split" && !t.backgroundImageSrc && t.backgroundColor === "accent" ? "kg-style-accent" : "";
let P1 = class extends Yn({
  nodeType: "signup",
  properties: [{
    name: "alignment",
    default: "left"
  }, {
    name: "backgroundColor",
    default: "#F0F0F0"
  }, {
    name: "backgroundImageSrc",
    default: ""
  }, {
    name: "backgroundSize",
    default: "cover"
  }, {
    name: "textColor",
    default: ""
  }, {
    name: "buttonColor",
    default: "accent"
  }, {
    name: "buttonTextColor",
    default: "#FFFFFF"
  }, {
    name: "buttonText",
    default: "Subscribe"
  }, {
    name: "disclaimer",
    default: "",
    wordCount: !0
  }, {
    name: "header",
    default: "",
    wordCount: !0
  }, {
    name: "labels",
    default: []
  }, {
    name: "layout",
    default: "wide"
  }, {
    name: "subheader",
    default: "",
    wordCount: !0
  }, {
    name: "successMessage",
    default: "Email sent! Check your inbox to complete your signup."
  }, {
    name: "swapped",
    default: !1
  }],
  defaultRenderFn: n2e
}) {
  /* override */
  constructor({
    alignment: e,
    backgroundColor: n,
    backgroundImageSrc: i,
    backgroundSize: r,
    textColor: s,
    buttonColor: o,
    buttonTextColor: a,
    buttonText: l,
    disclaimer: u,
    header: f,
    labels: d,
    layout: h,
    subheader: m,
    successMessage: g,
    swapped: w
  } = {}, x) {
    super(x), this.__alignment = e || "left", this.__backgroundColor = n || "#F0F0F0", this.__backgroundImageSrc = i || "", this.__backgroundSize = r || "cover", this.__textColor = n === "transparent" && (h === "split" || !i) ? "" : s || "#000000", this.__buttonColor = o || "accent", this.__buttonTextColor = a || "#FFFFFF", this.__buttonText = l || "Subscribe", this.__disclaimer = u || "", this.__header = f || "", this.__labels = d || [], this.__layout = h || "wide", this.__subheader = m || "", this.__successMessage = g || "Email sent! Check your inbox to complete your signup.", this.__swapped = w || !1;
  }
  static importDOM() {
    return Jke(this);
  }
  // keeping some custom methods for labels as it requires some special handling
  setLabels(e) {
    if (!Array.isArray(e) || !e.every((i) => typeof i == "string"))
      throw new Error("Invalid argument: Expected an array of strings.");
    const n = this.getWritable();
    n.__labels = e;
  }
  addLabel(e) {
    this.getWritable().__labels.push(e);
  }
  removeLabel(e) {
    const n = this.getWritable();
    n.__labels = n.__labels.filter((i) => i !== e);
  }
};
const s2e = (t) => new P1(t);
function o2e(t) {
  return t instanceof P1;
}
function a2e(t, e) {
  Vn(e);
  const n = e.createDocument(), i = t.accentColor, r = t.backgroundColor, s = "https://partner.transistor.fm/ghost/embed/{uuid}", o = new URLSearchParams();
  i && o.set("color", i.replace(/^#/, "")), r && o.set("background", r.replace(/^#/, ""));
  const a = o.toString(), l = a ? `${s}?${a}` : s, u = n.createElement("iframe");
  u.setAttribute("width", "100%"), u.setAttribute("height", "180"), u.setAttribute("frameborder", "no"), u.setAttribute("scrolling", "no"), u.setAttribute("seamless", ""), u.setAttribute("src", l);
  const f = n.createElement("figure");
  return f.setAttribute("class", "kg-card kg-transistor-card"), f.appendChild(u), s0({
    element: f,
    type: "inner"
  }, t.visibility, e);
}
const UN = {
  web: {
    nonMember: !1,
    // Hide from public visitors - requires member UUID
    memberSegment: lo
    // Show to all members (free + paid)
  },
  email: {
    memberSegment: lo
  }
};
let I1 = class extends Yn({
  nodeType: "transistor",
  hasVisibility: !0,
  properties: [
    {
      name: "accentColor",
      default: ""
    },
    // Player accent color (text/buttons) - hex value
    {
      name: "backgroundColor",
      default: ""
    }
    // Player background color - hex value
  ],
  defaultRenderFn: a2e
}) {
  constructor(e = {}, n) {
    super(e, n), e.visibility || (this.__visibility = PN(UN));
  }
  static getPropertyDefaults() {
    const e = super.getPropertyDefaults();
    return e.visibility = PN(UN), e;
  }
  isEmpty() {
    return !1;
  }
  hasEditMode() {
    return !0;
  }
};
const l2e = (t) => new I1(t), u2e = (t) => t instanceof I1, c2 = {
  replace: N.TextNode,
  with: (t) => new Fo(t.__text)
};
class Fo extends N.TextNode {
  constructor(e, n) {
    super(e, n);
  }
  static getType() {
    return "extended-text";
  }
  static clone(e) {
    return new Fo(e.__text, e.__key);
  }
  static importDOM() {
    const e = N.TextNode.importDOM();
    return {
      ...e,
      span: () => ({
        conversion: c2e(e == null ? void 0 : e.span, f2e),
        priority: 1
      })
    };
  }
  static importJSON(e) {
    return N.TextNode.importJSON(e);
  }
  exportJSON() {
    const e = super.exportJSON();
    return e.type = "extended-text", e;
  }
  isSimpleText() {
    return (this.__type === "text" || this.__type === "extended-text") && this.__mode === 0;
  }
  isInline() {
    return !0;
  }
}
function c2e(t, e) {
  return (n) => {
    const i = t == null ? void 0 : t(n);
    if (!i)
      return null;
    const r = i.conversion(n);
    return r && {
      ...r,
      forChild: (s, o) => {
        const l = ((r == null ? void 0 : r.forChild) ?? ((u) => u))(s, o);
        return N.$isTextNode(l) ? e(l, n) : l;
      }
    };
  };
}
function f2e(t, e) {
  var l, u, f, d, h;
  const n = e, i = n.style.fontWeight === "bold" || ((l = n.parentElement) == null ? void 0 : l.style.fontWeight) === "bold", r = n.style.fontStyle === "italic" || ((u = n.parentElement) == null ? void 0 : u.style.fontStyle) === "italic", s = n.style.textDecoration === "underline" || ((f = n.parentElement) == null ? void 0 : f.style.textDecoration) === "underline", o = n.classList.contains("Strikethrough") || ((d = n.parentElement) == null ? void 0 : d.classList.contains("Strikethrough")), a = n.classList.contains("Highlight") || ((h = n.parentElement) == null ? void 0 : h.classList.contains("Highlight"));
  return i && !t.hasFormat("bold") && (t = t.toggleFormat("bold")), r && !t.hasFormat("italic") && (t = t.toggleFormat("italic")), s && !t.hasFormat("underline") && (t = t.toggleFormat("underline")), o && !t.hasFormat("strikethrough") && (t = t.toggleFormat("strikethrough")), a && !t.hasFormat("highlight") && (t = t.toggleFormat("highlight")), t;
}
const f2 = {
  replace: rn.HeadingNode,
  with: (t) => new uc(t.__tag)
};
class uc extends rn.HeadingNode {
  constructor(e, n) {
    super(e, n);
  }
  static getType() {
    return "extended-heading";
  }
  static clone(e) {
    return new uc(e.__tag, e.__key);
  }
  static importDOM() {
    const e = rn.HeadingNode.importDOM();
    return {
      ...e,
      p: d2e(e == null ? void 0 : e.p)
    };
  }
  static importJSON(e) {
    return rn.HeadingNode.importJSON(e);
  }
  exportJSON() {
    const e = super.exportJSON();
    return e.type = "extended-heading", e;
  }
}
function d2e(t) {
  return (e) => {
    const n = t == null ? void 0 : t(e);
    if (n)
      return n;
    const i = e, r = i.getAttribute("role") === "heading", s = i.getAttribute("aria-level");
    if (r && s) {
      const o = parseInt(s, 10);
      if (o > 0 && o < 7)
        return {
          conversion: () => ({
            node: new uc(`h${o}`)
          }),
          priority: 1
        };
    }
    return null;
  };
}
const aE = {
  replace: rn.QuoteNode,
  with: () => new If()
};
class If extends rn.QuoteNode {
  constructor(e) {
    super(e);
  }
  static getType() {
    return "extended-quote";
  }
  static clone(e) {
    return new If(e.__key);
  }
  static importDOM() {
    return {
      ...rn.QuoteNode.importDOM(),
      blockquote: h2e
    };
  }
  static importJSON(e) {
    return rn.QuoteNode.importJSON(e);
  }
  exportJSON() {
    const e = super.exportJSON();
    return e.type = "extended-quote", e;
  }
  /* c8 ignore start */
  extractWithChild() {
    return !0;
  }
  /* c8 ignore end */
}
function h2e() {
  return {
    conversion: () => ({
      node: new If(),
      after: (e) => {
        const n = [];
        return e.forEach((i) => {
          N.$isParagraphNode(i) ? (n.length > 0 && (n.push(N.$createLineBreakNode()), n.push(N.$createLineBreakNode())), n.push(...i.getChildren())) : n.push(i);
        }), n;
      }
    }),
    priority: 1
  };
}
class uo extends N.TextNode {
  static getType() {
    return "tk";
  }
  static clone(e) {
    return new uo(e.__text, e.__key);
  }
  constructor(e, n) {
    super(e, n);
  }
  createDOM(e) {
    var r;
    const n = super.createDOM(e), i = ((r = e.theme.tk) == null ? void 0 : r.split(" ")) || [];
    return n.classList.add(...i), n.dataset.kgTk = !0, n;
  }
  static importJSON(e) {
    const n = lE(e.text);
    return n.setFormat(e.format), n.setDetail(e.detail), n.setMode(e.mode), n.setStyle(e.style), n;
  }
  exportJSON() {
    return {
      ...super.exportJSON(),
      type: "tk"
    };
  }
  canInsertTextBefore() {
    return !1;
  }
  isTextEntity() {
    return !0;
  }
}
function lE(t) {
  return N.$applyNodeReplacement(new uo(t));
}
function LW(t) {
  return t instanceof uo;
}
var p2e = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.54 10.46c2.2 2.2 2.2 5.61 0 7.81l-3.08 3.08c-2.2 2.2-5.61 2.2-7.81 0-2.2-2.2-2.2-5.61 0-7.81L5.4 10.9"/>
    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.46 13.54c-2.2-2.2-2.2-5.61 0-7.81l3.08-3.08c2.2-2.2 5.61-2.2 7.81 0 2.2 2.2 2.2 5.61 0 7.81L18.6 13.1"/>
</svg>`;
class Ma extends N.ElementNode {
  constructor(n, i) {
    super(i);
    // We keep track of the format that was applied to the original '@' character
    // so we can re-apply that when converting to a LinkNode
    we(this, "__linkFormat", null);
    this.__linkFormat = n;
  }
  static getType() {
    return "at-link";
  }
  static clone(n) {
    return new Ma(n.__linkFormat, n.__key);
  }
  // This is a temporary node, it should never be serialized but we need
  // to implement just in case and to match expected types. The AtLinkPlugin
  // should take care of replacing this node with it's children when needed.
  static importJSON({
    linkFormat: n
  }) {
    return uE(n);
  }
  exportJSON() {
    return {
      ...super.exportJSON(),
      type: "at-link",
      version: 1,
      linkFormat: this.__linkFormat
    };
  }
  createDOM(n) {
    const i = document.createElement("span"), r = (n.theme.atLink || "").split(" ").filter(Boolean), s = (n.theme.atLinkIcon || "").split(" ").filter(Boolean);
    i.classList.add(...r);
    const o = new DOMParser().parseFromString(p2e, "image/svg+xml").documentElement;
    return o.classList.add(...s), i.appendChild(o), i;
  }
  updateDOM() {
    return !1;
  }
  // should not render anything - this is a placeholder node
  exportDOM() {
    return null;
  }
  /* c8 ignore next 3 */
  static importDOM() {
    return null;
  }
  getTextContent() {
    return "";
  }
  isInline() {
    return !0;
  }
  canBeEmpty() {
    return !1;
  }
  setLinkFormat(n) {
    const i = this.getWritable();
    i.__linkFormat = n;
  }
  getLinkFormat() {
    return this.getLatest().__linkFormat;
  }
}
function uE(t) {
  return N.$applyNodeReplacement(new Ma(t));
}
function ul(t) {
  return t instanceof Ma;
}
class cc extends N.TextNode {
  constructor(n, i, r) {
    super(n, r);
    we(this, "__placeholder", null);
    we(this, "defaultPlaceholder", "Find a post, tag or author");
    this.__placeholder = i;
  }
  static getType() {
    return "at-link-search";
  }
  static clone(n) {
    return new cc(n.__text, n.__placeholder, n.__key);
  }
  // This is a temporary node, it should never be serialized but we need
  // to implement just in case and to match expected types. The AtLinkPlugin
  // should take care of replacing this node when needed.
  static importJSON({
    text: n,
    placeholder: i
  }) {
    return Sg(n, i);
  }
  exportJSON() {
    return {
      ...super.exportJSON(),
      type: "at-link-search",
      version: 1,
      placeholder: this.__placeholder
    };
  }
  createDOM(n) {
    const i = super.createDOM(n);
    return i.dataset.placeholder = "", this.__text ? i.dataset.placeholder = this.__placeholder || "" : i.dataset.placeholder = this.__placeholder ?? this.defaultPlaceholder, i.classList.add(...n.theme.atLinkSearch.split(" ")), i;
  }
  updateDOM(n, i) {
    return this.__text && (i.dataset.placeholder = this.__placeholder ?? ""), super.updateDOM(...arguments);
  }
  // should not render anything - this is a placeholder node
  exportDOM() {
    return null;
  }
  /* c8 ignore next 3 */
  static importDOM() {
    return null;
  }
  canHaveFormat() {
    return !1;
  }
  setPlaceholder(n) {
    const i = this.getWritable();
    i.__placeholder = n;
  }
  getPlaceholder() {
    return this.getLatest().__placeholder;
  }
  // Lexical will incorrectly pick up this node as an element node when the
  // cursor is placed by the SVG icon element in the parent AtLinkNode. We
  // need these methods to avoid throwing errors in that case but otherwise
  // behaviour is unaffected.
  getChildrenSize() {
    return 0;
  }
  getChildAtIndex() {
    return null;
  }
}
function Sg(t = "", e = null) {
  return N.$applyNodeReplacement(new cc(t, e));
}
function cl(t) {
  return t instanceof cc;
}
class Lf extends N.TextNode {
  static getType() {
    return "zwnj";
  }
  static clone(e) {
    return new Lf("", e.__key);
  }
  createDOM(e) {
    const n = super.createDOM(e);
    return n.innerHTML = "&zwnj;", n;
  }
  updateDOM() {
    return !1;
  }
  exportJSON() {
    return {
      ...super.exportJSON(),
      type: "zwnj",
      version: 1
    };
  }
  getTextContent() {
    return "";
  }
  isToken() {
    return !0;
  }
}
function N4() {
  return new Lf("");
}
function zd(t) {
  return t instanceof Lf;
}
var m2e = {
  import: {
    br: (t) => {
      var o, a;
      const e = !!t.closest('[id^="docs-internal-guid-"]'), n = (o = t.previousElementSibling) == null ? void 0 : o.nodeName, i = (a = t.nextElementSibling) == null ? void 0 : a.nodeName, r = ["H1", "H2", "H3", "H4", "H5", "H6"], s = ["UL", "OL", "DL"];
      return e && (n === "P" && i === "P" || n === "BR" || i === "BR" || [...r, ...s].includes(n) && i === "P" || n === "P" && [...r, ...s].includes(i)) ? {
        conversion: () => null,
        priority: 1
      } : null;
    }
  }
}, g2e = {
  import: {
    p: (t) => !!t.closest('[id^="docs-internal-guid-"]') && t.textContent === "" ? {
      conversion: () => null,
      priority: 1
    } : null
  }
};
const RW = {
  generateDecoratorNode: Yn,
  visibility: zye,
  rgbToHex: Vc,
  taggedTemplateFns: zwe
}, A4 = {
  linebreak: m2e,
  paragraph: g2e
}, jW = {
  html: {
    import: {
      ...A4.linebreak.import,
      ...A4.paragraph.import
    }
  }
}, v2e = [Fo, c2, uc, f2, If, aE, p1, h1, m1, g1, v1, b1, y1, w1, k1, x1, C1, _1, O1, E1, S1, T1, $1, M1, N1, A1, D1, P1, I1, uo, Ma, cc, Lf], b2e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  $createAsideNode: $we,
  $createAtLinkNode: uE,
  $createAtLinkSearchNode: Sg,
  $createAudioNode: mwe,
  $createBookmarkNode: ske,
  $createButtonNode: Jwe,
  $createCallToActionNode: Cwe,
  $createCalloutNode: kwe,
  $createCodeBlockNode: Vye,
  $createEmailCtaNode: Xke,
  $createEmailNode: Bke,
  $createEmbedNode: Rke,
  $createFileNode: hke,
  $createGalleryNode: qke,
  $createHeaderNode: wke,
  $createHorizontalRuleNode: Dwe,
  $createHtmlNode: jwe,
  $createImageNode: Uye,
  $createMarkdownNode: Kye,
  $createPaywallNode: Oke,
  $createProductNode: Nke,
  $createSignupNode: s2e,
  $createTKNode: lE,
  $createToggleNode: Uwe,
  $createTransistorNode: l2e,
  $createVideoNode: owe,
  $createZWNJNode: N4,
  $isAsideNode: Mwe,
  $isAtLinkNode: ul,
  $isAtLinkSearchNode: cl,
  $isAudioNode: gwe,
  $isBookmarkNode: oke,
  $isButtonNode: eke,
  $isCallToActionNode: Ewe,
  $isCalloutNode: wwe,
  $isCodeBlockNode: Xye,
  $isEmailCtaNode: Gke,
  $isEmailNode: zke,
  $isEmbedNode: jke,
  $isFileNode: dke,
  $isGalleryNode: Yke,
  $isHeaderNode: kke,
  $isHorizontalRuleNode: Pwe,
  $isHtmlNode: Fwe,
  $isImageNode: Zye,
  $isKoenigCard: qc,
  $isMarkdownNode: Jye,
  $isPaywallNode: Ske,
  $isProductNode: Ake,
  $isSignupNode: o2e,
  $isTKNode: LW,
  $isToggleNode: Zwe,
  $isTransistorNode: u2e,
  $isVideoNode: awe,
  $isZWNJNode: zd,
  AsideNode: w1,
  AtLinkNode: Ma,
  AtLinkSearchNode: cc,
  AudioNode: v1,
  BookmarkNode: S1,
  ButtonNode: O1,
  CallToActionNode: y1,
  CalloutNode: b1,
  CodeBlockNode: p1,
  DEFAULT_CONFIG: jW,
  DEFAULT_NODES: v2e,
  EmailCtaNode: D1,
  EmailNode: N1,
  EmbedNode: M1,
  ExtendedHeadingNode: uc,
  ExtendedQuoteNode: If,
  ExtendedTextNode: Fo,
  FileNode: C1,
  GalleryNode: A1,
  HeaderNode: E1,
  HorizontalRuleNode: k1,
  HtmlNode: x1,
  ImageNode: h1,
  KoenigDecoratorNode: iE,
  MarkdownNode: m1,
  PaywallNode: T1,
  ProductNode: $1,
  SignupNode: P1,
  TKNode: uo,
  ToggleNode: _1,
  TransistorNode: I1,
  VideoNode: g1,
  ZWNJNode: Lf,
  extendedHeadingNodeReplacement: f2,
  extendedQuoteNodeReplacement: aE,
  extendedTextNodeReplacement: c2,
  serializers: A4,
  utils: RW
}, Symbol.toStringTag, { value: "Module" }));
class cE extends w1 {
  createDOM(e) {
    const n = document.createElement("aside");
    return lt.addClassNamesToElement(n, e.theme.aside), n;
  }
  // Mutation
  insertNewAfter() {
    const e = N.$createParagraphNode(), n = this.getDirection();
    return e.setDirection(n), this.insertAfter(e), e;
  }
  collapseAtStart() {
    const e = N.$createParagraphNode();
    return this.getChildren().forEach((i) => e.append(i)), this.replace(e), !0;
  }
}
function FW() {
  return new cE();
}
function ZN(t) {
  return t instanceof cE;
}
const y2e = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M32 2.667C32 .889 31.111 0 29.333 0H2.667C1.93 0 1.302.26.78.781.261 1.301 0 1.931 0 2.667v26.666C0 31.111.889 32 2.667 32h26.666C31.111 32 32 31.111 32 29.333V2.667z", fill: "#465961", fillRule: "nonzero" }), /* @__PURE__ */ J.createElement("path", { stroke: "#FFF", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", d: "M10.5 12l-4 4.333 4 3.667M21.5 12l4 4.333-4 3.667M18 11l-4 10" }))), BW = j.createContext({}), w2e = ({ children: t }) => {
  const [e, n] = j.useState(null), [i, r] = j.useState(!1), [s, o] = j.useState(!1), [a, l] = j.useState(!1), u = j.useMemo(() => ({
    selectedCardKey: e,
    setSelectedCardKey: n,
    isEditingCard: i,
    setIsEditingCard: r,
    isDragging: s,
    setIsDragging: o,
    showVisibilitySettings: a,
    setShowVisibilitySettings: l
  }), [
    e,
    n,
    i,
    r,
    s,
    o,
    a,
    l
  ]);
  return /* @__PURE__ */ y.jsx(BW.Provider, { value: u, children: t });
}, Rf = () => j.useContext(BW);
function St({ isVisible: t, children: e, ...n }) {
  const { isDragging: i } = Rf();
  if (t && !i)
    return /* @__PURE__ */ y.jsx("div", { className: "not-kg-prose absolute left-1/2 top-[-46px] z-[1000] -translate-x-1/2", ...n, children: e });
}
function D4() {
  return D4 = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var i in n)
        Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
    }
    return t;
  }, D4.apply(this, arguments);
}
function k2e(t, e) {
  if (t == null) return {};
  var n = {}, i = Object.keys(t), r, s;
  for (s = 0; s < i.length; s++)
    r = i[s], !(e.indexOf(r) >= 0) && (n[r] = t[r]);
  return n;
}
let Kt = class zW {
  /**
  Get the line description around the given position.
  */
  lineAt(e) {
    if (e < 0 || e > this.length)
      throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
    return this.lineInner(e, !1, 1, 0);
  }
  /**
  Get the description for the given (1-based) line number.
  */
  line(e) {
    if (e < 1 || e > this.lines)
      throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
    return this.lineInner(e, !0, 1, 0);
  }
  /**
  Replace a range of the text with the given content.
  */
  replace(e, n, i) {
    [e, n] = Th(this, e, n);
    let r = [];
    return this.decompose(
      0,
      e,
      r,
      2
      /* Open.To */
    ), i.length && i.decompose(
      0,
      i.length,
      r,
      3
      /* Open.To */
    ), this.decompose(
      n,
      this.length,
      r,
      1
      /* Open.From */
    ), ga.from(r, this.length - (n - e) + i.length);
  }
  /**
  Append another document to this one.
  */
  append(e) {
    return this.replace(this.length, this.length, e);
  }
  /**
  Retrieve the text between the given points.
  */
  slice(e, n = this.length) {
    [e, n] = Th(this, e, n);
    let i = [];
    return this.decompose(e, n, i, 0), ga.from(i, n - e);
  }
  /**
  Test whether this text is equal to another instance.
  */
  eq(e) {
    if (e == this)
      return !0;
    if (e.length != this.length || e.lines != this.lines)
      return !1;
    let n = this.scanIdentical(e, 1), i = this.length - this.scanIdentical(e, -1), r = new Cg(this), s = new Cg(e);
    for (let o = n, a = n; ; ) {
      if (r.next(o), s.next(o), o = 0, r.lineBreak != s.lineBreak || r.done != s.done || r.value != s.value)
        return !1;
      if (a += r.value.length, r.done || a >= i)
        return !0;
    }
  }
  /**
  Iterate over the text. When `dir` is `-1`, iteration happens
  from end to start. This will return lines and the breaks between
  them as separate strings.
  */
  iter(e = 1) {
    return new Cg(this, e);
  }
  /**
  Iterate over a range of the text. When `from` > `to`, the
  iterator will run in reverse.
  */
  iterRange(e, n = this.length) {
    return new WW(this, e, n);
  }
  /**
  Return a cursor that iterates over the given range of lines,
  _without_ returning the line breaks between, and yielding empty
  strings for empty lines.
  
  When `from` and `to` are given, they should be 1-based line numbers.
  */
  iterLines(e, n) {
    let i;
    if (e == null)
      i = this.iter();
    else {
      n == null && (n = this.lines + 1);
      let r = this.line(e).from;
      i = this.iterRange(r, Math.max(r, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to));
    }
    return new HW(i);
  }
  /**
  Return the document as a string, using newline characters to
  separate lines.
  */
  toString() {
    return this.sliceString(0);
  }
  /**
  Convert the document to an array of lines (which can be
  deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
  */
  toJSON() {
    let e = [];
    return this.flatten(e), e;
  }
  /**
  @internal
  */
  constructor() {
  }
  /**
  Create a `Text` instance for the given array of lines.
  */
  static of(e) {
    if (e.length == 0)
      throw new RangeError("A document must have at least one line");
    return e.length == 1 && !e[0] ? zW.empty : e.length <= 32 ? new hi(e) : ga.from(hi.split(e, []));
  }
};
class hi extends Kt {
  constructor(e, n = x2e(e)) {
    super(), this.text = e, this.length = n;
  }
  get lines() {
    return this.text.length;
  }
  get children() {
    return null;
  }
  lineInner(e, n, i, r) {
    for (let s = 0; ; s++) {
      let o = this.text[s], a = r + o.length;
      if ((n ? i : a) >= e)
        return new _2e(r, a, i, o);
      r = a + 1, i++;
    }
  }
  decompose(e, n, i, r) {
    let s = e <= 0 && n >= this.length ? this : new hi(qN(this.text, e, n), Math.min(n, this.length) - Math.max(0, e));
    if (r & 1) {
      let o = i.pop(), a = oy(s.text, o.text.slice(), 0, s.length);
      if (a.length <= 32)
        i.push(new hi(a, o.length + s.length));
      else {
        let l = a.length >> 1;
        i.push(new hi(a.slice(0, l)), new hi(a.slice(l)));
      }
    } else
      i.push(s);
  }
  replace(e, n, i) {
    if (!(i instanceof hi))
      return super.replace(e, n, i);
    [e, n] = Th(this, e, n);
    let r = oy(this.text, oy(i.text, qN(this.text, 0, e)), n), s = this.length + i.length - (n - e);
    return r.length <= 32 ? new hi(r, s) : ga.from(hi.split(r, []), s);
  }
  sliceString(e, n = this.length, i = `
`) {
    [e, n] = Th(this, e, n);
    let r = "";
    for (let s = 0, o = 0; s <= n && o < this.text.length; o++) {
      let a = this.text[o], l = s + a.length;
      s > e && o && (r += i), e < l && n > s && (r += a.slice(Math.max(0, e - s), n - s)), s = l + 1;
    }
    return r;
  }
  flatten(e) {
    for (let n of this.text)
      e.push(n);
  }
  scanIdentical() {
    return 0;
  }
  static split(e, n) {
    let i = [], r = -1;
    for (let s of e)
      i.push(s), r += s.length + 1, i.length == 32 && (n.push(new hi(i, r)), i = [], r = -1);
    return r > -1 && n.push(new hi(i, r)), n;
  }
}
class ga extends Kt {
  constructor(e, n) {
    super(), this.children = e, this.length = n, this.lines = 0;
    for (let i of e)
      this.lines += i.lines;
  }
  lineInner(e, n, i, r) {
    for (let s = 0; ; s++) {
      let o = this.children[s], a = r + o.length, l = i + o.lines - 1;
      if ((n ? l : a) >= e)
        return o.lineInner(e, n, i, r);
      r = a + 1, i = l + 1;
    }
  }
  decompose(e, n, i, r) {
    for (let s = 0, o = 0; o <= n && s < this.children.length; s++) {
      let a = this.children[s], l = o + a.length;
      if (e <= l && n >= o) {
        let u = r & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0));
        o >= e && l <= n && !u ? i.push(a) : a.decompose(e - o, n - o, i, u);
      }
      o = l + 1;
    }
  }
  replace(e, n, i) {
    if ([e, n] = Th(this, e, n), i.lines < this.lines)
      for (let r = 0, s = 0; r < this.children.length; r++) {
        let o = this.children[r], a = s + o.length;
        if (e >= s && n <= a) {
          let l = o.replace(e - s, n - s, i), u = this.lines - o.lines + l.lines;
          if (l.lines < u >> 4 && l.lines > u >> 6) {
            let f = this.children.slice();
            return f[r] = l, new ga(f, this.length - (n - e) + i.length);
          }
          return super.replace(s, a, l);
        }
        s = a + 1;
      }
    return super.replace(e, n, i);
  }
  sliceString(e, n = this.length, i = `
`) {
    [e, n] = Th(this, e, n);
    let r = "";
    for (let s = 0, o = 0; s < this.children.length && o <= n; s++) {
      let a = this.children[s], l = o + a.length;
      o > e && s && (r += i), e < l && n > o && (r += a.sliceString(e - o, n - o, i)), o = l + 1;
    }
    return r;
  }
  flatten(e) {
    for (let n of this.children)
      n.flatten(e);
  }
  scanIdentical(e, n) {
    if (!(e instanceof ga))
      return 0;
    let i = 0, [r, s, o, a] = n > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1];
    for (; ; r += n, s += n) {
      if (r == o || s == a)
        return i;
      let l = this.children[r], u = e.children[s];
      if (l != u)
        return i + l.scanIdentical(u, n);
      i += l.length + 1;
    }
  }
  static from(e, n = e.reduce((i, r) => i + r.length + 1, -1)) {
    let i = 0;
    for (let m of e)
      i += m.lines;
    if (i < 32) {
      let m = [];
      for (let g of e)
        g.flatten(m);
      return new hi(m, n);
    }
    let r = Math.max(
      32,
      i >> 5
      /* Tree.BranchShift */
    ), s = r << 1, o = r >> 1, a = [], l = 0, u = -1, f = [];
    function d(m) {
      let g;
      if (m.lines > s && m instanceof ga)
        for (let w of m.children)
          d(w);
      else m.lines > o && (l > o || !l) ? (h(), a.push(m)) : m instanceof hi && l && (g = f[f.length - 1]) instanceof hi && m.lines + g.lines <= 32 ? (l += m.lines, u += m.length + 1, f[f.length - 1] = new hi(g.text.concat(m.text), g.length + 1 + m.length)) : (l + m.lines > r && h(), l += m.lines, u += m.length + 1, f.push(m));
    }
    function h() {
      l != 0 && (a.push(f.length == 1 ? f[0] : ga.from(f, u)), u = -1, l = f.length = 0);
    }
    for (let m of e)
      d(m);
    return h(), a.length == 1 ? a[0] : new ga(a, n);
  }
}
Kt.empty = /* @__PURE__ */ new hi([""], 0);
function x2e(t) {
  let e = -1;
  for (let n of t)
    e += n.length + 1;
  return e;
}
function oy(t, e, n = 0, i = 1e9) {
  for (let r = 0, s = 0, o = !0; s < t.length && r <= i; s++) {
    let a = t[s], l = r + a.length;
    l >= n && (l > i && (a = a.slice(0, i - r)), r < n && (a = a.slice(n - r)), o ? (e[e.length - 1] += a, o = !1) : e.push(a)), r = l + 1;
  }
  return e;
}
function qN(t, e, n) {
  return oy(t, [""], e, n);
}
class Cg {
  constructor(e, n = 1) {
    this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof hi ? e.text.length : e.children.length) << 1];
  }
  nextInner(e, n) {
    for (this.done = this.lineBreak = !1; ; ) {
      let i = this.nodes.length - 1, r = this.nodes[i], s = this.offsets[i], o = s >> 1, a = r instanceof hi ? r.text.length : r.children.length;
      if (o == (n > 0 ? a : 0)) {
        if (i == 0)
          return this.done = !0, this.value = "", this;
        n > 0 && this.offsets[i - 1]++, this.nodes.pop(), this.offsets.pop();
      } else if ((s & 1) == (n > 0 ? 0 : 1)) {
        if (this.offsets[i] += n, e == 0)
          return this.lineBreak = !0, this.value = `
`, this;
        e--;
      } else if (r instanceof hi) {
        let l = r.text[o + (n < 0 ? -1 : 0)];
        if (this.offsets[i] += n, l.length > Math.max(0, e))
          return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this;
        e -= l.length;
      } else {
        let l = r.children[o + (n < 0 ? -1 : 0)];
        e > l.length ? (e -= l.length, this.offsets[i] += n) : (n < 0 && this.offsets[i]--, this.nodes.push(l), this.offsets.push(n > 0 ? 1 : (l instanceof hi ? l.text.length : l.children.length) << 1));
      }
    }
  }
  next(e = 0) {
    return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
  }
}
class WW {
  constructor(e, n, i) {
    this.value = "", this.done = !1, this.cursor = new Cg(e, n > i ? -1 : 1), this.pos = n > i ? e.length : 0, this.from = Math.min(n, i), this.to = Math.max(n, i);
  }
  nextInner(e, n) {
    if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
      return this.value = "", this.done = !0, this;
    e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos);
    let i = n < 0 ? this.pos - this.from : this.to - this.pos;
    e > i && (e = i), i -= e;
    let { value: r } = this.cursor.next(e);
    return this.pos += (r.length + e) * n, this.value = r.length <= i ? r : n < 0 ? r.slice(r.length - i) : r.slice(0, i), this.done = !this.value, this;
  }
  next(e = 0) {
    return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir);
  }
  get lineBreak() {
    return this.cursor.lineBreak && this.value != "";
  }
}
class HW {
  constructor(e) {
    this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
  }
  next(e = 0) {
    let { done: n, lineBreak: i, value: r } = this.inner.next(e);
    return n && this.afterBreak ? (this.value = "", this.afterBreak = !1) : n ? (this.done = !0, this.value = "") : i ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = r, this.afterBreak = !1), this;
  }
  get lineBreak() {
    return !1;
  }
}
typeof Symbol < "u" && (Kt.prototype[Symbol.iterator] = function() {
  return this.iter();
}, Cg.prototype[Symbol.iterator] = WW.prototype[Symbol.iterator] = HW.prototype[Symbol.iterator] = function() {
  return this;
});
class _2e {
  /**
  @internal
  */
  constructor(e, n, i, r) {
    this.from = e, this.to = n, this.number = i, this.text = r;
  }
  /**
  The length of the line (not including any line break after it).
  */
  get length() {
    return this.to - this.from;
  }
}
function Th(t, e, n) {
  return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))];
}
let dh = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1);
for (let t = 1; t < dh.length; t++)
  dh[t] += dh[t - 1];
function O2e(t) {
  for (let e = 1; e < dh.length; e += 2)
    if (dh[e] > t)
      return dh[e - 1] <= t;
  return !1;
}
function YN(t) {
  return t >= 127462 && t <= 127487;
}
const VN = 8205;
function dr(t, e, n = !0, i = !0) {
  return (n ? QW : S2e)(t, e, i);
}
function QW(t, e, n) {
  if (e == t.length)
    return e;
  e && UW(t.charCodeAt(e)) && ZW(t.charCodeAt(e - 1)) && e--;
  let i = ar(t, e);
  for (e += io(i); e < t.length; ) {
    let r = ar(t, e);
    if (i == VN || r == VN || n && O2e(r))
      e += io(r), i = r;
    else if (YN(r)) {
      let s = 0, o = e - 2;
      for (; o >= 0 && YN(ar(t, o)); )
        s++, o -= 2;
      if (s % 2 == 0)
        break;
      e += 2;
    } else
      break;
  }
  return e;
}
function S2e(t, e, n) {
  for (; e > 0; ) {
    let i = QW(t, e - 2, n);
    if (i < e)
      return i;
    e--;
  }
  return 0;
}
function UW(t) {
  return t >= 56320 && t < 57344;
}
function ZW(t) {
  return t >= 55296 && t < 56320;
}
function ar(t, e) {
  let n = t.charCodeAt(e);
  if (!ZW(n) || e + 1 == t.length)
    return n;
  let i = t.charCodeAt(e + 1);
  return UW(i) ? (n - 55296 << 10) + (i - 56320) + 65536 : n;
}
function fE(t) {
  return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
}
function io(t) {
  return t < 65536 ? 1 : 2;
}
const P4 = /\r\n?|\n/;
var ur = /* @__PURE__ */ function(t) {
  return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t;
}(ur || (ur = {}));
class Sa {
  // Sections are encoded as pairs of integers. The first is the
  // length in the current document, and the second is -1 for
  // unaffected sections, and the length of the replacement content
  // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
  // 0), and a replacement two positive numbers.
  /**
  @internal
  */
  constructor(e) {
    this.sections = e;
  }
  /**
  The length of the document before the change.
  */
  get length() {
    let e = 0;
    for (let n = 0; n < this.sections.length; n += 2)
      e += this.sections[n];
    return e;
  }
  /**
  The length of the document after the change.
  */
  get newLength() {
    let e = 0;
    for (let n = 0; n < this.sections.length; n += 2) {
      let i = this.sections[n + 1];
      e += i < 0 ? this.sections[n] : i;
    }
    return e;
  }
  /**
  False when there are actual changes in this set.
  */
  get empty() {
    return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
  }
  /**
  Iterate over the unchanged parts left by these changes. `posA`
  provides the position of the range in the old document, `posB`
  the new position in the changed document.
  */
  iterGaps(e) {
    for (let n = 0, i = 0, r = 0; n < this.sections.length; ) {
      let s = this.sections[n++], o = this.sections[n++];
      o < 0 ? (e(i, r, s), r += s) : r += o, i += s;
    }
  }
  /**
  Iterate over the ranges changed by these changes. (See
  [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
  variant that also provides you with the inserted text.)
  `fromA`/`toA` provides the extent of the change in the starting
  document, `fromB`/`toB` the extent of the replacement in the
  changed document.
  
  When `individual` is true, adjacent changes (which are kept
  separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
  reported separately.
  */
  iterChangedRanges(e, n = !1) {
    I4(this, e, n);
  }
  /**
  Get a description of the inverted form of these changes.
  */
  get invertedDesc() {
    let e = [];
    for (let n = 0; n < this.sections.length; ) {
      let i = this.sections[n++], r = this.sections[n++];
      r < 0 ? e.push(i, r) : e.push(r, i);
    }
    return new Sa(e);
  }
  /**
  Compute the combined effect of applying another set of changes
  after this one. The length of the document after this set should
  match the length before `other`.
  */
  composeDesc(e) {
    return this.empty ? e : e.empty ? this : qW(this, e);
  }
  /**
  Map this description, which should start with the same document
  as `other`, over another set of changes, so that it can be
  applied after it. When `before` is true, map as if the changes
  in `other` happened before the ones in `this`.
  */
  mapDesc(e, n = !1) {
    return e.empty ? this : L4(this, e, n);
  }
  mapPos(e, n = -1, i = ur.Simple) {
    let r = 0, s = 0;
    for (let o = 0; o < this.sections.length; ) {
      let a = this.sections[o++], l = this.sections[o++], u = r + a;
      if (l < 0) {
        if (u > e)
          return s + (e - r);
        s += a;
      } else {
        if (i != ur.Simple && u >= e && (i == ur.TrackDel && r < e && u > e || i == ur.TrackBefore && r < e || i == ur.TrackAfter && u > e))
          return null;
        if (u > e || u == e && n < 0 && !a)
          return e == r || n < 0 ? s : s + l;
        s += l;
      }
      r = u;
    }
    if (e > r)
      throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);
    return s;
  }
  /**
  Check whether these changes touch a given range. When one of the
  changes entirely covers the range, the string `"cover"` is
  returned.
  */
  touchesRange(e, n = e) {
    for (let i = 0, r = 0; i < this.sections.length && r <= n; ) {
      let s = this.sections[i++], o = this.sections[i++], a = r + s;
      if (o >= 0 && r <= n && a >= e)
        return r < e && a > n ? "cover" : !0;
      r = a;
    }
    return !1;
  }
  /**
  @internal
  */
  toString() {
    let e = "";
    for (let n = 0; n < this.sections.length; ) {
      let i = this.sections[n++], r = this.sections[n++];
      e += (e ? " " : "") + i + (r >= 0 ? ":" + r : "");
    }
    return e;
  }
  /**
  Serialize this change desc to a JSON-representable value.
  */
  toJSON() {
    return this.sections;
  }
  /**
  Create a change desc from its JSON representation (as produced
  by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
  */
  static fromJSON(e) {
    if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number"))
      throw new RangeError("Invalid JSON representation of ChangeDesc");
    return new Sa(e);
  }
  /**
  @internal
  */
  static create(e) {
    return new Sa(e);
  }
}
class Ii extends Sa {
  constructor(e, n) {
    super(e), this.inserted = n;
  }
  /**
  Apply the changes to a document, returning the modified
  document.
  */
  apply(e) {
    if (this.length != e.length)
      throw new RangeError("Applying change set to a document with the wrong length");
    return I4(this, (n, i, r, s, o) => e = e.replace(r, r + (i - n), o), !1), e;
  }
  mapDesc(e, n = !1) {
    return L4(this, e, n, !0);
  }
  /**
  Given the document as it existed _before_ the changes, return a
  change set that represents the inverse of this set, which could
  be used to go from the document created by the changes back to
  the document as it existed before the changes.
  */
  invert(e) {
    let n = this.sections.slice(), i = [];
    for (let r = 0, s = 0; r < n.length; r += 2) {
      let o = n[r], a = n[r + 1];
      if (a >= 0) {
        n[r] = a, n[r + 1] = o;
        let l = r >> 1;
        for (; i.length < l; )
          i.push(Kt.empty);
        i.push(o ? e.slice(s, s + o) : Kt.empty);
      }
      s += o;
    }
    return new Ii(n, i);
  }
  /**
  Combine two subsequent change sets into a single set. `other`
  must start in the document produced by `this`. If `this` goes
  `docA` → `docB` and `other` represents `docB` → `docC`, the
  returned value will represent the change `docA` → `docC`.
  */
  compose(e) {
    return this.empty ? e : e.empty ? this : qW(this, e, !0);
  }
  /**
  Given another change set starting in the same document, maps this
  change set over the other, producing a new change set that can be
  applied to the document produced by applying `other`. When
  `before` is `true`, order changes as if `this` comes before
  `other`, otherwise (the default) treat `other` as coming first.
  
  Given two changes `A` and `B`, `A.compose(B.map(A))` and
  `B.compose(A.map(B, true))` will produce the same document. This
  provides a basic form of [operational
  transformation](https://en.wikipedia.org/wiki/Operational_transformation),
  and can be used for collaborative editing.
  */
  map(e, n = !1) {
    return e.empty ? this : L4(this, e, n, !0);
  }
  /**
  Iterate over the changed ranges in the document, calling `f` for
  each, with the range in the original document (`fromA`-`toA`)
  and the range that replaces it in the new document
  (`fromB`-`toB`).
  
  When `individual` is true, adjacent changes are reported
  separately.
  */
  iterChanges(e, n = !1) {
    I4(this, e, n);
  }
  /**
  Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
  set.
  */
  get desc() {
    return Sa.create(this.sections);
  }
  /**
  @internal
  */
  filter(e) {
    let n = [], i = [], r = [], s = new o0(this);
    e: for (let o = 0, a = 0; ; ) {
      let l = o == e.length ? 1e9 : e[o++];
      for (; a < l || a == l && s.len == 0; ) {
        if (s.done)
          break e;
        let f = Math.min(s.len, l - a);
        Cr(r, f, -1);
        let d = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0;
        Cr(n, f, d), d > 0 && Ou(i, n, s.text), s.forward(f), a += f;
      }
      let u = e[o++];
      for (; a < u; ) {
        if (s.done)
          break e;
        let f = Math.min(s.len, u - a);
        Cr(n, f, -1), Cr(r, f, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(f), a += f;
      }
    }
    return {
      changes: new Ii(n, i),
      filtered: Sa.create(r)
    };
  }
  /**
  Serialize this change set to a JSON-representable value.
  */
  toJSON() {
    let e = [];
    for (let n = 0; n < this.sections.length; n += 2) {
      let i = this.sections[n], r = this.sections[n + 1];
      r < 0 ? e.push(i) : r == 0 ? e.push([i]) : e.push([i].concat(this.inserted[n >> 1].toJSON()));
    }
    return e;
  }
  /**
  Create a change set for the given changes, for a document of the
  given length, using `lineSep` as line separator.
  */
  static of(e, n, i) {
    let r = [], s = [], o = 0, a = null;
    function l(f = !1) {
      if (!f && !r.length)
        return;
      o < n && Cr(r, n - o, -1);
      let d = new Ii(r, s);
      a = a ? a.compose(d.map(a)) : d, r = [], s = [], o = 0;
    }
    function u(f) {
      if (Array.isArray(f))
        for (let d of f)
          u(d);
      else if (f instanceof Ii) {
        if (f.length != n)
          throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);
        l(), a = a ? a.compose(f.map(a)) : f;
      } else {
        let { from: d, to: h = d, insert: m } = f;
        if (d > h || d < 0 || h > n)
          throw new RangeError(`Invalid change range ${d} to ${h} (in doc of length ${n})`);
        let g = m ? typeof m == "string" ? Kt.of(m.split(i || P4)) : m : Kt.empty, w = g.length;
        if (d == h && w == 0)
          return;
        d < o && l(), d > o && Cr(r, d - o, -1), Cr(r, h - d, w), Ou(s, r, g), o = h;
      }
    }
    return u(e), l(!a), a;
  }
  /**
  Create an empty changeset of the given length.
  */
  static empty(e) {
    return new Ii(e ? [e, -1] : [], []);
  }
  /**
  Create a changeset from its JSON representation (as produced by
  [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
  */
  static fromJSON(e) {
    if (!Array.isArray(e))
      throw new RangeError("Invalid JSON representation of ChangeSet");
    let n = [], i = [];
    for (let r = 0; r < e.length; r++) {
      let s = e[r];
      if (typeof s == "number")
        n.push(s, -1);
      else {
        if (!Array.isArray(s) || typeof s[0] != "number" || s.some((o, a) => a && typeof o != "string"))
          throw new RangeError("Invalid JSON representation of ChangeSet");
        if (s.length == 1)
          n.push(s[0], 0);
        else {
          for (; i.length < r; )
            i.push(Kt.empty);
          i[r] = Kt.of(s.slice(1)), n.push(s[0], i[r].length);
        }
      }
    }
    return new Ii(n, i);
  }
  /**
  @internal
  */
  static createSet(e, n) {
    return new Ii(e, n);
  }
}
function Cr(t, e, n, i = !1) {
  if (e == 0 && n <= 0)
    return;
  let r = t.length - 2;
  r >= 0 && n <= 0 && n == t[r + 1] ? t[r] += e : e == 0 && t[r] == 0 ? t[r + 1] += n : i ? (t[r] += e, t[r + 1] += n) : t.push(e, n);
}
function Ou(t, e, n) {
  if (n.length == 0)
    return;
  let i = e.length - 2 >> 1;
  if (i < t.length)
    t[t.length - 1] = t[t.length - 1].append(n);
  else {
    for (; t.length < i; )
      t.push(Kt.empty);
    t.push(n);
  }
}
function I4(t, e, n) {
  let i = t.inserted;
  for (let r = 0, s = 0, o = 0; o < t.sections.length; ) {
    let a = t.sections[o++], l = t.sections[o++];
    if (l < 0)
      r += a, s += a;
    else {
      let u = r, f = s, d = Kt.empty;
      for (; u += a, f += l, l && i && (d = d.append(i[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); )
        a = t.sections[o++], l = t.sections[o++];
      e(r, u, s, f, d), r = u, s = f;
    }
  }
}
function L4(t, e, n, i = !1) {
  let r = [], s = i ? [] : null, o = new o0(t), a = new o0(e);
  for (let l = -1; ; )
    if (o.ins == -1 && a.ins == -1) {
      let u = Math.min(o.len, a.len);
      Cr(r, u, -1), o.forward(u), a.forward(u);
    } else if (a.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (a.len < o.len || a.len == o.len && !n))) {
      let u = a.len;
      for (Cr(r, a.ins, -1); u; ) {
        let f = Math.min(o.len, u);
        o.ins >= 0 && l < o.i && o.len <= f && (Cr(r, 0, o.ins), s && Ou(s, r, o.text), l = o.i), o.forward(f), u -= f;
      }
      a.next();
    } else if (o.ins >= 0) {
      let u = 0, f = o.len;
      for (; f; )
        if (a.ins == -1) {
          let d = Math.min(f, a.len);
          u += d, f -= d, a.forward(d);
        } else if (a.ins == 0 && a.len < f)
          f -= a.len, a.next();
        else
          break;
      Cr(r, u, l < o.i ? o.ins : 0), s && l < o.i && Ou(s, r, o.text), l = o.i, o.forward(o.len - f);
    } else {
      if (o.done && a.done)
        return s ? Ii.createSet(r, s) : Sa.create(r);
      throw new Error("Mismatched change set lengths");
    }
}
function qW(t, e, n = !1) {
  let i = [], r = n ? [] : null, s = new o0(t), o = new o0(e);
  for (let a = !1; ; ) {
    if (s.done && o.done)
      return r ? Ii.createSet(i, r) : Sa.create(i);
    if (s.ins == 0)
      Cr(i, s.len, 0, a), s.next();
    else if (o.len == 0 && !o.done)
      Cr(i, 0, o.ins, a), r && Ou(r, i, o.text), o.next();
    else {
      if (s.done || o.done)
        throw new Error("Mismatched change set lengths");
      {
        let l = Math.min(s.len2, o.len), u = i.length;
        if (s.ins == -1) {
          let f = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
          Cr(i, l, f, a), r && f && Ou(r, i, o.text);
        } else o.ins == -1 ? (Cr(i, s.off ? 0 : s.len, l, a), r && Ou(r, i, s.textBit(l))) : (Cr(i, s.off ? 0 : s.len, o.off ? 0 : o.ins, a), r && !o.off && Ou(r, i, o.text));
        a = (s.ins > l || o.ins >= 0 && o.len > l) && (a || i.length > u), s.forward2(l), o.forward(l);
      }
    }
  }
}
class o0 {
  constructor(e) {
    this.set = e, this.i = 0, this.next();
  }
  next() {
    let { sections: e } = this.set;
    this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
  }
  get done() {
    return this.ins == -2;
  }
  get len2() {
    return this.ins < 0 ? this.len : this.ins;
  }
  get text() {
    let { inserted: e } = this.set, n = this.i - 2 >> 1;
    return n >= e.length ? Kt.empty : e[n];
  }
  textBit(e) {
    let { inserted: n } = this.set, i = this.i - 2 >> 1;
    return i >= n.length && !e ? Kt.empty : n[i].slice(this.off, e == null ? void 0 : this.off + e);
  }
  forward(e) {
    e == this.len ? this.next() : (this.len -= e, this.off += e);
  }
  forward2(e) {
    this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
  }
}
class Xc {
  constructor(e, n, i) {
    this.from = e, this.to = n, this.flags = i;
  }
  /**
  The anchor of the range—the side that doesn't move when you
  extend it.
  */
  get anchor() {
    return this.flags & 32 ? this.to : this.from;
  }
  /**
  The head of the range, which is moved when the range is
  [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
  */
  get head() {
    return this.flags & 32 ? this.from : this.to;
  }
  /**
  True when `anchor` and `head` are at the same position.
  */
  get empty() {
    return this.from == this.to;
  }
  /**
  If this is a cursor that is explicitly associated with the
  character on one of its sides, this returns the side. -1 means
  the character before its position, 1 the character after, and 0
  means no association.
  */
  get assoc() {
    return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
  }
  /**
  The bidirectional text level associated with this cursor, if
  any.
  */
  get bidiLevel() {
    let e = this.flags & 7;
    return e == 7 ? null : e;
  }
  /**
  The goal column (stored vertical offset) associated with a
  cursor. This is used to preserve the vertical position when
  [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
  lines of different length.
  */
  get goalColumn() {
    let e = this.flags >> 6;
    return e == 16777215 ? void 0 : e;
  }
  /**
  Map this range through a change, producing a valid range in the
  updated document.
  */
  map(e, n = -1) {
    let i, r;
    return this.empty ? i = r = e.mapPos(this.from, n) : (i = e.mapPos(this.from, 1), r = e.mapPos(this.to, -1)), i == this.from && r == this.to ? this : new Xc(i, r, this.flags);
  }
  /**
  Extend this range to cover at least `from` to `to`.
  */
  extend(e, n = e) {
    if (e <= this.anchor && n >= this.anchor)
      return he.range(e, n);
    let i = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n;
    return he.range(this.anchor, i);
  }
  /**
  Compare this range to another range.
  */
  eq(e, n = !1) {
    return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc);
  }
  /**
  Return a JSON-serializable object representing the range.
  */
  toJSON() {
    return { anchor: this.anchor, head: this.head };
  }
  /**
  Convert a JSON representation of a range to a `SelectionRange`
  instance.
  */
  static fromJSON(e) {
    if (!e || typeof e.anchor != "number" || typeof e.head != "number")
      throw new RangeError("Invalid JSON representation for SelectionRange");
    return he.range(e.anchor, e.head);
  }
  /**
  @internal
  */
  static create(e, n, i) {
    return new Xc(e, n, i);
  }
}
class he {
  constructor(e, n) {
    this.ranges = e, this.mainIndex = n;
  }
  /**
  Map a selection through a change. Used to adjust the selection
  position for changes.
  */
  map(e, n = -1) {
    return e.empty ? this : he.create(this.ranges.map((i) => i.map(e, n)), this.mainIndex);
  }
  /**
  Compare this selection to another selection. By default, ranges
  are compared only by position. When `includeAssoc` is true,
  cursor ranges must also have the same
  [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
  */
  eq(e, n = !1) {
    if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
      return !1;
    for (let i = 0; i < this.ranges.length; i++)
      if (!this.ranges[i].eq(e.ranges[i], n))
        return !1;
    return !0;
  }
  /**
  Get the primary selection range. Usually, you should make sure
  your code applies to _all_ ranges, by using methods like
  [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
  */
  get main() {
    return this.ranges[this.mainIndex];
  }
  /**
  Make sure the selection only has one range. Returns a selection
  holding only the main range from this selection.
  */
  asSingle() {
    return this.ranges.length == 1 ? this : new he([this.main], 0);
  }
  /**
  Extend this selection with an extra range.
  */
  addRange(e, n = !0) {
    return he.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1);
  }
  /**
  Replace a given range with another range, and then normalize the
  selection to merge and sort ranges if necessary.
  */
  replaceRange(e, n = this.mainIndex) {
    let i = this.ranges.slice();
    return i[n] = e, he.create(i, this.mainIndex);
  }
  /**
  Convert this selection to an object that can be serialized to
  JSON.
  */
  toJSON() {
    return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
  }
  /**
  Create a selection from a JSON representation.
  */
  static fromJSON(e) {
    if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
      throw new RangeError("Invalid JSON representation for EditorSelection");
    return new he(e.ranges.map((n) => Xc.fromJSON(n)), e.main);
  }
  /**
  Create a selection holding a single range.
  */
  static single(e, n = e) {
    return new he([he.range(e, n)], 0);
  }
  /**
  Sort and merge the given set of ranges, creating a valid
  selection.
  */
  static create(e, n = 0) {
    if (e.length == 0)
      throw new RangeError("A selection needs at least one range");
    for (let i = 0, r = 0; r < e.length; r++) {
      let s = e[r];
      if (s.empty ? s.from <= i : s.from < i)
        return he.normalized(e.slice(), n);
      i = s.to;
    }
    return new he(e, n);
  }
  /**
  Create a cursor selection range at the given position. You can
  safely ignore the optional arguments in most situations.
  */
  static cursor(e, n = 0, i, r) {
    return Xc.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (i == null ? 7 : Math.min(6, i)) | (r ?? 16777215) << 6);
  }
  /**
  Create a selection range.
  */
  static range(e, n, i, r) {
    let s = (i ?? 16777215) << 6 | (r == null ? 7 : Math.min(6, r));
    return n < e ? Xc.create(n, e, 48 | s) : Xc.create(e, n, (n > e ? 8 : 0) | s);
  }
  /**
  @internal
  */
  static normalized(e, n = 0) {
    let i = e[n];
    e.sort((r, s) => r.from - s.from), n = e.indexOf(i);
    for (let r = 1; r < e.length; r++) {
      let s = e[r], o = e[r - 1];
      if (s.empty ? s.from <= o.to : s.from < o.to) {
        let a = o.from, l = Math.max(s.to, o.to);
        r <= n && n--, e.splice(--r, 2, s.anchor > s.head ? he.range(l, a) : he.range(a, l));
      }
    }
    return new he(e, n);
  }
}
function YW(t, e) {
  for (let n of t.ranges)
    if (n.to > e)
      throw new RangeError("Selection points outside of document");
}
let dE = 0;
class Qe {
  constructor(e, n, i, r, s) {
    this.combine = e, this.compareInput = n, this.compare = i, this.isStatic = r, this.id = dE++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s;
  }
  /**
  Returns a facet reader for this facet, which can be used to
  [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
  */
  get reader() {
    return this;
  }
  /**
  Define a new facet.
  */
  static define(e = {}) {
    return new Qe(e.combine || ((n) => n), e.compareInput || ((n, i) => n === i), e.compare || (e.combine ? (n, i) => n === i : hE), !!e.static, e.enables);
  }
  /**
  Returns an extension that adds the given value to this facet.
  */
  of(e) {
    return new ay([], this, 0, e);
  }
  /**
  Create an extension that computes a value for the facet from a
  state. You must take care to declare the parts of the state that
  this value depends on, since your function is only called again
  for a new state when one of those parts changed.
  
  In cases where your value depends only on a single field, you'll
  want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
  */
  compute(e, n) {
    if (this.isStatic)
      throw new Error("Can't compute a static facet");
    return new ay(e, this, 1, n);
  }
  /**
  Create an extension that computes zero or more values for this
  facet from a state.
  */
  computeN(e, n) {
    if (this.isStatic)
      throw new Error("Can't compute a static facet");
    return new ay(e, this, 2, n);
  }
  from(e, n) {
    return n || (n = (i) => i), this.compute([e], (i) => n(i.field(e)));
  }
}
function hE(t, e) {
  return t == e || t.length == e.length && t.every((n, i) => n === e[i]);
}
class ay {
  constructor(e, n, i, r) {
    this.dependencies = e, this.facet = n, this.type = i, this.value = r, this.id = dE++;
  }
  dynamicSlot(e) {
    var n;
    let i = this.value, r = this.facet.compareInput, s = this.id, o = e[s] >> 1, a = this.type == 2, l = !1, u = !1, f = [];
    for (let d of this.dependencies)
      d == "doc" ? l = !0 : d == "selection" ? u = !0 : ((n = e[d.id]) !== null && n !== void 0 ? n : 1) & 1 || f.push(e[d.id]);
    return {
      create(d) {
        return d.values[o] = i(d), 1;
      },
      update(d, h) {
        if (l && h.docChanged || u && (h.docChanged || h.selection) || R4(d, f)) {
          let m = i(d);
          if (a ? !XN(m, d.values[o], r) : !r(m, d.values[o]))
            return d.values[o] = m, 1;
        }
        return 0;
      },
      reconfigure: (d, h) => {
        let m, g = h.config.address[s];
        if (g != null) {
          let w = xw(h, g);
          if (this.dependencies.every((x) => x instanceof Qe ? h.facet(x) === d.facet(x) : x instanceof Ki ? h.field(x, !1) == d.field(x, !1) : !0) || (a ? XN(m = i(d), w, r) : r(m = i(d), w)))
            return d.values[o] = w, 0;
        } else
          m = i(d);
        return d.values[o] = m, 1;
      }
    };
  }
}
function XN(t, e, n) {
  if (t.length != e.length)
    return !1;
  for (let i = 0; i < t.length; i++)
    if (!n(t[i], e[i]))
      return !1;
  return !0;
}
function R4(t, e) {
  let n = !1;
  for (let i of e)
    Eg(t, i) & 1 && (n = !0);
  return n;
}
function C2e(t, e, n) {
  let i = n.map((l) => t[l.id]), r = n.map((l) => l.type), s = i.filter((l) => !(l & 1)), o = t[e.id] >> 1;
  function a(l) {
    let u = [];
    for (let f = 0; f < i.length; f++) {
      let d = xw(l, i[f]);
      if (r[f] == 2)
        for (let h of d)
          u.push(h);
      else
        u.push(d);
    }
    return e.combine(u);
  }
  return {
    create(l) {
      for (let u of i)
        Eg(l, u);
      return l.values[o] = a(l), 1;
    },
    update(l, u) {
      if (!R4(l, s))
        return 0;
      let f = a(l);
      return e.compare(f, l.values[o]) ? 0 : (l.values[o] = f, 1);
    },
    reconfigure(l, u) {
      let f = R4(l, i), d = u.config.facets[e.id], h = u.facet(e);
      if (d && !f && hE(n, d))
        return l.values[o] = h, 0;
      let m = a(l);
      return e.compare(m, h) ? (l.values[o] = h, 0) : (l.values[o] = m, 1);
    }
  };
}
const GN = /* @__PURE__ */ Qe.define({ static: !0 });
class Ki {
  constructor(e, n, i, r, s) {
    this.id = e, this.createF = n, this.updateF = i, this.compareF = r, this.spec = s, this.provides = void 0;
  }
  /**
  Define a state field.
  */
  static define(e) {
    let n = new Ki(dE++, e.create, e.update, e.compare || ((i, r) => i === r), e);
    return e.provide && (n.provides = e.provide(n)), n;
  }
  create(e) {
    let n = e.facet(GN).find((i) => i.field == this);
    return ((n == null ? void 0 : n.create) || this.createF)(e);
  }
  /**
  @internal
  */
  slot(e) {
    let n = e[this.id] >> 1;
    return {
      create: (i) => (i.values[n] = this.create(i), 1),
      update: (i, r) => {
        let s = i.values[n], o = this.updateF(s, r);
        return this.compareF(s, o) ? 0 : (i.values[n] = o, 1);
      },
      reconfigure: (i, r) => r.config.address[this.id] != null ? (i.values[n] = r.field(this), 0) : (i.values[n] = this.create(i), 1)
    };
  }
  /**
  Returns an extension that enables this field and overrides the
  way it is initialized. Can be useful when you need to provide a
  non-default starting value for the field.
  */
  init(e) {
    return [this, GN.of({ field: this, create: e })];
  }
  /**
  State field instances can be used as
  [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
  given state.
  */
  get extension() {
    return this;
  }
}
const Bc = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
function Tm(t) {
  return (e) => new VW(e, t);
}
const jf = {
  /**
  The highest precedence level, for extensions that should end up
  near the start of the precedence ordering.
  */
  highest: /* @__PURE__ */ Tm(Bc.highest),
  /**
  A higher-than-default precedence, for extensions that should
  come before those with default precedence.
  */
  high: /* @__PURE__ */ Tm(Bc.high),
  /**
  The default precedence, which is also used for extensions
  without an explicit precedence.
  */
  default: /* @__PURE__ */ Tm(Bc.default),
  /**
  A lower-than-default precedence.
  */
  low: /* @__PURE__ */ Tm(Bc.low),
  /**
  The lowest precedence level. Meant for things that should end up
  near the end of the extension order.
  */
  lowest: /* @__PURE__ */ Tm(Bc.lowest)
};
class VW {
  constructor(e, n) {
    this.inner = e, this.prec = n;
  }
}
class d2 {
  /**
  Create an instance of this compartment to add to your [state
  configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
  */
  of(e) {
    return new j4(this, e);
  }
  /**
  Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
  reconfigures this compartment.
  */
  reconfigure(e) {
    return d2.reconfigure.of({ compartment: this, extension: e });
  }
  /**
  Get the current content of the compartment in the state, or
  `undefined` if it isn't present.
  */
  get(e) {
    return e.config.compartments.get(this);
  }
}
class j4 {
  constructor(e, n) {
    this.compartment = e, this.inner = n;
  }
}
class kw {
  constructor(e, n, i, r, s, o) {
    for (this.base = e, this.compartments = n, this.dynamicSlots = i, this.address = r, this.staticValues = s, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < i.length; )
      this.statusTemplate.push(
        0
        /* SlotStatus.Unresolved */
      );
  }
  staticFacet(e) {
    let n = this.address[e.id];
    return n == null ? e.default : this.staticValues[n >> 1];
  }
  static resolve(e, n, i) {
    let r = [], s = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
    for (let h of E2e(e, n, o))
      h instanceof Ki ? r.push(h) : (s[h.facet.id] || (s[h.facet.id] = [])).push(h);
    let a = /* @__PURE__ */ Object.create(null), l = [], u = [];
    for (let h of r)
      a[h.id] = u.length << 1, u.push((m) => h.slot(m));
    let f = i == null ? void 0 : i.config.facets;
    for (let h in s) {
      let m = s[h], g = m[0].facet, w = f && f[h] || [];
      if (m.every(
        (x) => x.type == 0
        /* Provider.Static */
      ))
        if (a[g.id] = l.length << 1 | 1, hE(w, m))
          l.push(i.facet(g));
        else {
          let x = g.combine(m.map((_) => _.value));
          l.push(i && g.compare(x, i.facet(g)) ? i.facet(g) : x);
        }
      else {
        for (let x of m)
          x.type == 0 ? (a[x.id] = l.length << 1 | 1, l.push(x.value)) : (a[x.id] = u.length << 1, u.push((_) => x.dynamicSlot(_)));
        a[g.id] = u.length << 1, u.push((x) => C2e(x, g, m));
      }
    }
    let d = u.map((h) => h(a));
    return new kw(e, o, d, a, l, s);
  }
}
function E2e(t, e, n) {
  let i = [[], [], [], [], []], r = /* @__PURE__ */ new Map();
  function s(o, a) {
    let l = r.get(o);
    if (l != null) {
      if (l <= a)
        return;
      let u = i[l].indexOf(o);
      u > -1 && i[l].splice(u, 1), o instanceof j4 && n.delete(o.compartment);
    }
    if (r.set(o, a), Array.isArray(o))
      for (let u of o)
        s(u, a);
    else if (o instanceof j4) {
      if (n.has(o.compartment))
        throw new RangeError("Duplicate use of compartment in extensions");
      let u = e.get(o.compartment) || o.inner;
      n.set(o.compartment, u), s(u, a);
    } else if (o instanceof VW)
      s(o.inner, o.prec);
    else if (o instanceof Ki)
      i[a].push(o), o.provides && s(o.provides, a);
    else if (o instanceof ay)
      i[a].push(o), o.facet.extensions && s(o.facet.extensions, Bc.default);
    else {
      let u = o.extension;
      if (!u)
        throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
      s(u, a);
    }
  }
  return s(t, Bc.default), i.reduce((o, a) => o.concat(a));
}
function Eg(t, e) {
  if (e & 1)
    return 2;
  let n = e >> 1, i = t.status[n];
  if (i == 4)
    throw new Error("Cyclic dependency between fields and/or facets");
  if (i & 2)
    return i;
  t.status[n] = 4;
  let r = t.computeSlot(t, t.config.dynamicSlots[n]);
  return t.status[n] = 2 | r;
}
function xw(t, e) {
  return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1];
}
const XW = /* @__PURE__ */ Qe.define(), F4 = /* @__PURE__ */ Qe.define({
  combine: (t) => t.some((e) => e),
  static: !0
}), GW = /* @__PURE__ */ Qe.define({
  combine: (t) => t.length ? t[0] : void 0,
  static: !0
}), KW = /* @__PURE__ */ Qe.define(), JW = /* @__PURE__ */ Qe.define(), eH = /* @__PURE__ */ Qe.define(), tH = /* @__PURE__ */ Qe.define({
  combine: (t) => t.length ? t[0] : !1
});
class za {
  /**
  @internal
  */
  constructor(e, n) {
    this.type = e, this.value = n;
  }
  /**
  Define a new type of annotation.
  */
  static define() {
    return new T2e();
  }
}
class T2e {
  /**
  Create an instance of this annotation.
  */
  of(e) {
    return new za(this, e);
  }
}
class $2e {
  /**
  @internal
  */
  constructor(e) {
    this.map = e;
  }
  /**
  Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
  type.
  */
  of(e) {
    return new Ot(this, e);
  }
}
class Ot {
  /**
  @internal
  */
  constructor(e, n) {
    this.type = e, this.value = n;
  }
  /**
  Map this effect through a position mapping. Will return
  `undefined` when that ends up deleting the effect.
  */
  map(e) {
    let n = this.type.map(this.value, e);
    return n === void 0 ? void 0 : n == this.value ? this : new Ot(this.type, n);
  }
  /**
  Tells you whether this effect object is of a given
  [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
  */
  is(e) {
    return this.type == e;
  }
  /**
  Define a new effect type. The type parameter indicates the type
  of values that his effect holds. It should be a type that
  doesn't include `undefined`, since that is used in
  [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
  removed.
  */
  static define(e = {}) {
    return new $2e(e.map || ((n) => n));
  }
  /**
  Map an array of effects through a change set.
  */
  static mapEffects(e, n) {
    if (!e.length)
      return e;
    let i = [];
    for (let r of e) {
      let s = r.map(n);
      s && i.push(s);
    }
    return i;
  }
}
Ot.reconfigure = /* @__PURE__ */ Ot.define();
Ot.appendConfig = /* @__PURE__ */ Ot.define();
let Jr = class ng {
  constructor(e, n, i, r, s, o) {
    this.startState = e, this.changes = n, this.selection = i, this.effects = r, this.annotations = s, this.scrollIntoView = o, this._doc = null, this._state = null, i && YW(i, n.newLength), s.some((a) => a.type == ng.time) || (this.annotations = s.concat(ng.time.of(Date.now())));
  }
  /**
  @internal
  */
  static create(e, n, i, r, s, o) {
    return new ng(e, n, i, r, s, o);
  }
  /**
  The new document produced by the transaction. Contrary to
  [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
  force the entire new state to be computed right away, so it is
  recommended that [transaction
  filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
  when they need to look at the new document.
  */
  get newDoc() {
    return this._doc || (this._doc = this.changes.apply(this.startState.doc));
  }
  /**
  The new selection produced by the transaction. If
  [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
  this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
  current selection through the changes made by the transaction.
  */
  get newSelection() {
    return this.selection || this.startState.selection.map(this.changes);
  }
  /**
  The new state created by the transaction. Computed on demand
  (but retained for subsequent access), so it is recommended not to
  access it in [transaction
  filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
  */
  get state() {
    return this._state || this.startState.applyTransaction(this), this._state;
  }
  /**
  Get the value of the given annotation type, if any.
  */
  annotation(e) {
    for (let n of this.annotations)
      if (n.type == e)
        return n.value;
  }
  /**
  Indicates whether the transaction changed the document.
  */
  get docChanged() {
    return !this.changes.empty;
  }
  /**
  Indicates whether this transaction reconfigures the state
  (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
  with a top-level configuration
  [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
  */
  get reconfigured() {
    return this.startState.config != this.state.config;
  }
  /**
  Returns true if the transaction has a [user
  event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
  or more specific than `event`. For example, if the transaction
  has `"select.pointer"` as user event, `"select"` and
  `"select.pointer"` will match it.
  */
  isUserEvent(e) {
    let n = this.annotation(ng.userEvent);
    return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == "."));
  }
};
Jr.time = /* @__PURE__ */ za.define();
Jr.userEvent = /* @__PURE__ */ za.define();
Jr.addToHistory = /* @__PURE__ */ za.define();
Jr.remote = /* @__PURE__ */ za.define();
function M2e(t, e) {
  let n = [];
  for (let i = 0, r = 0; ; ) {
    let s, o;
    if (i < t.length && (r == e.length || e[r] >= t[i]))
      s = t[i++], o = t[i++];
    else if (r < e.length)
      s = e[r++], o = e[r++];
    else
      return n;
    !n.length || n[n.length - 1] < s ? n.push(s, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
  }
}
function nH(t, e, n) {
  var i;
  let r, s, o;
  return n ? (r = e.changes, s = Ii.empty(e.changes.length), o = t.changes.compose(e.changes)) : (r = e.changes.map(t.changes), s = t.changes.mapDesc(e.changes, !0), o = t.changes.compose(r)), {
    changes: o,
    selection: e.selection ? e.selection.map(s) : (i = t.selection) === null || i === void 0 ? void 0 : i.map(r),
    effects: Ot.mapEffects(t.effects, r).concat(Ot.mapEffects(e.effects, s)),
    annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations,
    scrollIntoView: t.scrollIntoView || e.scrollIntoView
  };
}
function B4(t, e, n) {
  let i = e.selection, r = hh(e.annotations);
  return e.userEvent && (r = r.concat(Jr.userEvent.of(e.userEvent))), {
    changes: e.changes instanceof Ii ? e.changes : Ii.of(e.changes || [], n, t.facet(GW)),
    selection: i && (i instanceof he ? i : he.single(i.anchor, i.head)),
    effects: hh(e.effects),
    annotations: r,
    scrollIntoView: !!e.scrollIntoView
  };
}
function iH(t, e, n) {
  let i = B4(t, e.length ? e[0] : {}, t.doc.length);
  e.length && e[0].filter === !1 && (n = !1);
  for (let s = 1; s < e.length; s++) {
    e[s].filter === !1 && (n = !1);
    let o = !!e[s].sequential;
    i = nH(i, B4(t, e[s], o ? i.changes.newLength : t.doc.length), o);
  }
  let r = Jr.create(t, i.changes, i.selection, i.effects, i.annotations, i.scrollIntoView);
  return A2e(n ? N2e(r) : r);
}
function N2e(t) {
  let e = t.startState, n = !0;
  for (let r of e.facet(KW)) {
    let s = r(t);
    if (s === !1) {
      n = !1;
      break;
    }
    Array.isArray(s) && (n = n === !0 ? s : M2e(n, s));
  }
  if (n !== !0) {
    let r, s;
    if (n === !1)
      s = t.changes.invertedDesc, r = Ii.empty(e.doc.length);
    else {
      let o = t.changes.filter(n);
      r = o.changes, s = o.filtered.mapDesc(o.changes).invertedDesc;
    }
    t = Jr.create(e, r, t.selection && t.selection.map(s), Ot.mapEffects(t.effects, s), t.annotations, t.scrollIntoView);
  }
  let i = e.facet(JW);
  for (let r = i.length - 1; r >= 0; r--) {
    let s = i[r](t);
    s instanceof Jr ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof Jr ? t = s[0] : t = iH(e, hh(s), !1);
  }
  return t;
}
function A2e(t) {
  let e = t.startState, n = e.facet(eH), i = t;
  for (let r = n.length - 1; r >= 0; r--) {
    let s = n[r](t);
    s && Object.keys(s).length && (i = nH(i, B4(e, s, t.changes.newLength), !0));
  }
  return i == t ? t : Jr.create(e, t.changes, t.selection, i.effects, i.annotations, i.scrollIntoView);
}
const D2e = [];
function hh(t) {
  return t == null ? D2e : Array.isArray(t) ? t : [t];
}
var In = /* @__PURE__ */ function(t) {
  return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t;
}(In || (In = {}));
const P2e = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
let z4;
try {
  z4 = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
} catch {
}
function I2e(t) {
  if (z4)
    return z4.test(t);
  for (let e = 0; e < t.length; e++) {
    let n = t[e];
    if (/\w/.test(n) || n > "" && (n.toUpperCase() != n.toLowerCase() || P2e.test(n)))
      return !0;
  }
  return !1;
}
function L2e(t) {
  return (e) => {
    if (!/\S/.test(e))
      return In.Space;
    if (I2e(e))
      return In.Word;
    for (let n = 0; n < t.length; n++)
      if (e.indexOf(t[n]) > -1)
        return In.Word;
    return In.Other;
  };
}
class zt {
  constructor(e, n, i, r, s, o) {
    this.config = e, this.doc = n, this.selection = i, this.values = r, this.status = e.statusTemplate.slice(), this.computeSlot = s, o && (o._state = this);
    for (let a = 0; a < this.config.dynamicSlots.length; a++)
      Eg(this, a << 1);
    this.computeSlot = null;
  }
  field(e, n = !0) {
    let i = this.config.address[e.id];
    if (i == null) {
      if (n)
        throw new RangeError("Field is not present in this state");
      return;
    }
    return Eg(this, i), xw(this, i);
  }
  /**
  Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
  state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
  can be passed. Unless
  [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
  [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
  are assumed to start in the _current_ document (not the document
  produced by previous specs), and its
  [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
  [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
  to the document created by its _own_ changes. The resulting
  transaction contains the combined effect of all the different
  specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
  specs take precedence over earlier ones.
  */
  update(...e) {
    return iH(this, e, !0);
  }
  /**
  @internal
  */
  applyTransaction(e) {
    let n = this.config, { base: i, compartments: r } = n;
    for (let a of e.effects)
      a.is(d2.reconfigure) ? (n && (r = /* @__PURE__ */ new Map(), n.compartments.forEach((l, u) => r.set(u, l)), n = null), r.set(a.value.compartment, a.value.extension)) : a.is(Ot.reconfigure) ? (n = null, i = a.value) : a.is(Ot.appendConfig) && (n = null, i = hh(i).concat(a.value));
    let s;
    n ? s = e.startState.values.slice() : (n = kw.resolve(i, r, this), s = new zt(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values);
    let o = e.startState.facet(F4) ? e.newSelection : e.newSelection.asSingle();
    new zt(n, e.newDoc, o, s, (a, l) => l.update(a, e), e);
  }
  /**
  Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
  replaces every selection range with the given content.
  */
  replaceSelection(e) {
    return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({
      changes: { from: n.from, to: n.to, insert: e },
      range: he.cursor(n.from + e.length)
    }));
  }
  /**
  Create a set of changes and a new selection by running the given
  function for each range in the active selection. The function
  can return an optional set of changes (in the coordinate space
  of the start document), plus an updated range (in the coordinate
  space of the document produced by the call's own changes). This
  method will merge all the changes and ranges into a single
  changeset and selection, and return it as a [transaction
  spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
  [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
  */
  changeByRange(e) {
    let n = this.selection, i = e(n.ranges[0]), r = this.changes(i.changes), s = [i.range], o = hh(i.effects);
    for (let a = 1; a < n.ranges.length; a++) {
      let l = e(n.ranges[a]), u = this.changes(l.changes), f = u.map(r);
      for (let h = 0; h < a; h++)
        s[h] = s[h].map(f);
      let d = r.mapDesc(u, !0);
      s.push(l.range.map(d)), r = r.compose(f), o = Ot.mapEffects(o, f).concat(Ot.mapEffects(hh(l.effects), d));
    }
    return {
      changes: r,
      selection: he.create(s, n.mainIndex),
      effects: o
    };
  }
  /**
  Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
  description, taking the state's document length and line
  separator into account.
  */
  changes(e = []) {
    return e instanceof Ii ? e : Ii.of(e, this.doc.length, this.facet(zt.lineSeparator));
  }
  /**
  Using the state's [line
  separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
  [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
  */
  toText(e) {
    return Kt.of(e.split(this.facet(zt.lineSeparator) || P4));
  }
  /**
  Return the given range of the document as a string.
  */
  sliceDoc(e = 0, n = this.doc.length) {
    return this.doc.sliceString(e, n, this.lineBreak);
  }
  /**
  Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
  */
  facet(e) {
    let n = this.config.address[e.id];
    return n == null ? e.default : (Eg(this, n), xw(this, n));
  }
  /**
  Convert this state to a JSON-serializable object. When custom
  fields should be serialized, you can pass them in as an object
  mapping property names (in the resulting object, which should
  not use `doc` or `selection`) to fields.
  */
  toJSON(e) {
    let n = {
      doc: this.sliceDoc(),
      selection: this.selection.toJSON()
    };
    if (e)
      for (let i in e) {
        let r = e[i];
        r instanceof Ki && this.config.address[r.id] != null && (n[i] = r.spec.toJSON(this.field(e[i]), this));
      }
    return n;
  }
  /**
  Deserialize a state from its JSON representation. When custom
  fields should be deserialized, pass the same object you passed
  to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
  third argument.
  */
  static fromJSON(e, n = {}, i) {
    if (!e || typeof e.doc != "string")
      throw new RangeError("Invalid JSON representation for EditorState");
    let r = [];
    if (i) {
      for (let s in i)
        if (Object.prototype.hasOwnProperty.call(e, s)) {
          let o = i[s], a = e[s];
          r.push(o.init((l) => o.spec.fromJSON(a, l)));
        }
    }
    return zt.create({
      doc: e.doc,
      selection: he.fromJSON(e.selection),
      extensions: n.extensions ? r.concat([n.extensions]) : r
    });
  }
  /**
  Create a new state. You'll usually only need this when
  initializing an editor—updated states are created by applying
  transactions.
  */
  static create(e = {}) {
    let n = kw.resolve(e.extensions || [], /* @__PURE__ */ new Map()), i = e.doc instanceof Kt ? e.doc : Kt.of((e.doc || "").split(n.staticFacet(zt.lineSeparator) || P4)), r = e.selection ? e.selection instanceof he ? e.selection : he.single(e.selection.anchor, e.selection.head) : he.single(0);
    return YW(r, i.length), n.staticFacet(F4) || (r = r.asSingle()), new zt(n, i, r, n.dynamicSlots.map(() => null), (s, o) => o.create(s), null);
  }
  /**
  The size (in columns) of a tab in the document, determined by
  the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
  */
  get tabSize() {
    return this.facet(zt.tabSize);
  }
  /**
  Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
  string for this state.
  */
  get lineBreak() {
    return this.facet(zt.lineSeparator) || `
`;
  }
  /**
  Returns true when the editor is
  [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
  */
  get readOnly() {
    return this.facet(tH);
  }
  /**
  Look up a translation for the given phrase (via the
  [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
  original string if no translation is found.
  
  If additional arguments are passed, they will be inserted in
  place of markers like `$1` (for the first value) and `$2`, etc.
  A single `$` is equivalent to `$1`, and `$$` will produce a
  literal dollar sign.
  */
  phrase(e, ...n) {
    for (let i of this.facet(zt.phrases))
      if (Object.prototype.hasOwnProperty.call(i, e)) {
        e = i[e];
        break;
      }
    return n.length && (e = e.replace(/\$(\$|\d*)/g, (i, r) => {
      if (r == "$")
        return "$";
      let s = +(r || 1);
      return !s || s > n.length ? i : n[s - 1];
    })), e;
  }
  /**
  Find the values for a given language data field, provided by the
  the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
  
  Examples of language data fields are...
  
  - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
    comment syntax.
  - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
    for providing language-specific completion sources.
  - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
    characters that should be considered part of words in this
    language.
  - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
    bracket closing behavior.
  */
  languageDataAt(e, n, i = -1) {
    let r = [];
    for (let s of this.facet(XW))
      for (let o of s(this, n, i))
        Object.prototype.hasOwnProperty.call(o, e) && r.push(o[e]);
    return r;
  }
  /**
  Return a function that can categorize strings (expected to
  represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
  into one of:
  
   - Word (contains an alphanumeric character or a character
     explicitly listed in the local language's `"wordChars"`
     language data, which should be a string)
   - Space (contains only whitespace)
   - Other (anything else)
  */
  charCategorizer(e) {
    return L2e(this.languageDataAt("wordChars", e).join(""));
  }
  /**
  Find the word at the given position, meaning the range
  containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
  around it. If no word characters are adjacent to the position,
  this returns null.
  */
  wordAt(e) {
    let { text: n, from: i, length: r } = this.doc.lineAt(e), s = this.charCategorizer(e), o = e - i, a = e - i;
    for (; o > 0; ) {
      let l = dr(n, o, !1);
      if (s(n.slice(l, o)) != In.Word)
        break;
      o = l;
    }
    for (; a < r; ) {
      let l = dr(n, a);
      if (s(n.slice(a, l)) != In.Word)
        break;
      a = l;
    }
    return o == a ? null : he.range(o + i, a + i);
  }
}
zt.allowMultipleSelections = F4;
zt.tabSize = /* @__PURE__ */ Qe.define({
  combine: (t) => t.length ? t[0] : 4
});
zt.lineSeparator = GW;
zt.readOnly = tH;
zt.phrases = /* @__PURE__ */ Qe.define({
  compare(t, e) {
    let n = Object.keys(t), i = Object.keys(e);
    return n.length == i.length && n.every((r) => t[r] == e[r]);
  }
});
zt.languageData = XW;
zt.changeFilter = KW;
zt.transactionFilter = JW;
zt.transactionExtender = eH;
d2.reconfigure = /* @__PURE__ */ Ot.define();
function Wa(t, e, n = {}) {
  let i = {};
  for (let r of t)
    for (let s of Object.keys(r)) {
      let o = r[s], a = i[s];
      if (a === void 0)
        i[s] = o;
      else if (!(a === o || o === void 0)) if (Object.hasOwnProperty.call(n, s))
        i[s] = n[s](a, o);
      else
        throw new Error("Config merge conflict for field " + s);
    }
  for (let r in e)
    i[r] === void 0 && (i[r] = e[r]);
  return i;
}
class vf {
  /**
  Compare this value with another value. Used when comparing
  rangesets. The default implementation compares by identity.
  Unless you are only creating a fixed number of unique instances
  of your value type, it is a good idea to implement this
  properly.
  */
  eq(e) {
    return this == e;
  }
  /**
  Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
  */
  range(e, n = e) {
    return W4.create(e, n, this);
  }
}
vf.prototype.startSide = vf.prototype.endSide = 0;
vf.prototype.point = !1;
vf.prototype.mapMode = ur.TrackDel;
let W4 = class rH {
  constructor(e, n, i) {
    this.from = e, this.to = n, this.value = i;
  }
  /**
  @internal
  */
  static create(e, n, i) {
    return new rH(e, n, i);
  }
};
function H4(t, e) {
  return t.from - e.from || t.value.startSide - e.value.startSide;
}
class pE {
  constructor(e, n, i, r) {
    this.from = e, this.to = n, this.value = i, this.maxPoint = r;
  }
  get length() {
    return this.to[this.to.length - 1];
  }
  // Find the index of the given position and side. Use the ranges'
  // `from` pos when `end == false`, `to` when `end == true`.
  findIndex(e, n, i, r = 0) {
    let s = i ? this.to : this.from;
    for (let o = r, a = s.length; ; ) {
      if (o == a)
        return o;
      let l = o + a >> 1, u = s[l] - e || (i ? this.value[l].endSide : this.value[l].startSide) - n;
      if (l == o)
        return u >= 0 ? o : a;
      u >= 0 ? a = l : o = l + 1;
    }
  }
  between(e, n, i, r) {
    for (let s = this.findIndex(n, -1e9, !0), o = this.findIndex(i, 1e9, !1, s); s < o; s++)
      if (r(this.from[s] + e, this.to[s] + e, this.value[s]) === !1)
        return !1;
  }
  map(e, n) {
    let i = [], r = [], s = [], o = -1, a = -1;
    for (let l = 0; l < this.value.length; l++) {
      let u = this.value[l], f = this.from[l] + e, d = this.to[l] + e, h, m;
      if (f == d) {
        let g = n.mapPos(f, u.startSide, u.mapMode);
        if (g == null || (h = m = g, u.startSide != u.endSide && (m = n.mapPos(f, u.endSide), m < h)))
          continue;
      } else if (h = n.mapPos(f, u.startSide), m = n.mapPos(d, u.endSide), h > m || h == m && u.startSide > 0 && u.endSide <= 0)
        continue;
      (m - h || u.endSide - u.startSide) < 0 || (o < 0 && (o = h), u.point && (a = Math.max(a, m - h)), i.push(u), r.push(h - o), s.push(m - o));
    }
    return { mapped: i.length ? new pE(r, s, i, a) : null, pos: o };
  }
}
class Qt {
  constructor(e, n, i, r) {
    this.chunkPos = e, this.chunk = n, this.nextLayer = i, this.maxPoint = r;
  }
  /**
  @internal
  */
  static create(e, n, i, r) {
    return new Qt(e, n, i, r);
  }
  /**
  @internal
  */
  get length() {
    let e = this.chunk.length - 1;
    return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
  }
  /**
  The number of ranges in the set.
  */
  get size() {
    if (this.isEmpty)
      return 0;
    let e = this.nextLayer.size;
    for (let n of this.chunk)
      e += n.value.length;
    return e;
  }
  /**
  @internal
  */
  chunkEnd(e) {
    return this.chunkPos[e] + this.chunk[e].length;
  }
  /**
  Update the range set, optionally adding new ranges or filtering
  out existing ones.
  
  (Note: The type parameter is just there as a kludge to work
  around TypeScript variance issues that prevented `RangeSet<X>`
  from being a subtype of `RangeSet<Y>` when `X` is a subtype of
  `Y`.)
  */
  update(e) {
    let { add: n = [], sort: i = !1, filterFrom: r = 0, filterTo: s = this.length } = e, o = e.filter;
    if (n.length == 0 && !o)
      return this;
    if (i && (n = n.slice().sort(H4)), this.isEmpty)
      return n.length ? Qt.of(n) : this;
    let a = new sH(this, null, -1).goto(0), l = 0, u = [], f = new Zu();
    for (; a.value || l < n.length; )
      if (l < n.length && (a.from - n[l].from || a.startSide - n[l].value.startSide) >= 0) {
        let d = n[l++];
        f.addInner(d.from, d.to, d.value) || u.push(d);
      } else a.rangeIndex == 1 && a.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(a.chunkIndex) < n[l].from) && (!o || r > this.chunkEnd(a.chunkIndex) || s < this.chunkPos[a.chunkIndex]) && f.addChunk(this.chunkPos[a.chunkIndex], this.chunk[a.chunkIndex]) ? a.nextChunk() : ((!o || r > a.to || s < a.from || o(a.from, a.to, a.value)) && (f.addInner(a.from, a.to, a.value) || u.push(W4.create(a.from, a.to, a.value))), a.next());
    return f.finishInner(this.nextLayer.isEmpty && !u.length ? Qt.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: r, filterTo: s }));
  }
  /**
  Map this range set through a set of changes, return the new set.
  */
  map(e) {
    if (e.empty || this.isEmpty)
      return this;
    let n = [], i = [], r = -1;
    for (let o = 0; o < this.chunk.length; o++) {
      let a = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(a, a + l.length);
      if (u === !1)
        r = Math.max(r, l.maxPoint), n.push(l), i.push(e.mapPos(a));
      else if (u === !0) {
        let { mapped: f, pos: d } = l.map(a, e);
        f && (r = Math.max(r, f.maxPoint), n.push(f), i.push(d));
      }
    }
    let s = this.nextLayer.map(e);
    return n.length == 0 ? s : new Qt(i, n, s || Qt.empty, r);
  }
  /**
  Iterate over the ranges that touch the region `from` to `to`,
  calling `f` for each. There is no guarantee that the ranges will
  be reported in any specific order. When the callback returns
  `false`, iteration stops.
  */
  between(e, n, i) {
    if (!this.isEmpty) {
      for (let r = 0; r < this.chunk.length; r++) {
        let s = this.chunkPos[r], o = this.chunk[r];
        if (n >= s && e <= s + o.length && o.between(s, e - s, n - s, i) === !1)
          return;
      }
      this.nextLayer.between(e, n, i);
    }
  }
  /**
  Iterate over the ranges in this set, in order, including all
  ranges that end at or after `from`.
  */
  iter(e = 0) {
    return a0.from([this]).goto(e);
  }
  /**
  @internal
  */
  get isEmpty() {
    return this.nextLayer == this;
  }
  /**
  Iterate over the ranges in a collection of sets, in order,
  starting from `from`.
  */
  static iter(e, n = 0) {
    return a0.from(e).goto(n);
  }
  /**
  Iterate over two groups of sets, calling methods on `comparator`
  to notify it of possible differences.
  */
  static compare(e, n, i, r, s = -1) {
    let o = e.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= s), a = n.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= s), l = KN(o, a, i), u = new $m(o, l, s), f = new $m(a, l, s);
    i.iterGaps((d, h, m) => JN(u, d, f, h, m, r)), i.empty && i.length == 0 && JN(u, 0, f, 0, 0, r);
  }
  /**
  Compare the contents of two groups of range sets, returning true
  if they are equivalent in the given range.
  */
  static eq(e, n, i = 0, r) {
    r == null && (r = 999999999);
    let s = e.filter((f) => !f.isEmpty && n.indexOf(f) < 0), o = n.filter((f) => !f.isEmpty && e.indexOf(f) < 0);
    if (s.length != o.length)
      return !1;
    if (!s.length)
      return !0;
    let a = KN(s, o), l = new $m(s, a, 0).goto(i), u = new $m(o, a, 0).goto(i);
    for (; ; ) {
      if (l.to != u.to || !Q4(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point)))
        return !1;
      if (l.to > r)
        return !0;
      l.next(), u.next();
    }
  }
  /**
  Iterate over a group of range sets at the same time, notifying
  the iterator about the ranges covering every given piece of
  content. Returns the open count (see
  [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
  of the iteration.
  */
  static spans(e, n, i, r, s = -1) {
    let o = new $m(e, null, s).goto(n), a = n, l = o.openStart;
    for (; ; ) {
      let u = Math.min(o.to, i);
      if (o.point) {
        let f = o.activeForPoint(o.to), d = o.pointFrom < n ? f.length + 1 : Math.min(f.length, l);
        r.point(a, u, o.point, f, d, o.pointRank), l = Math.min(o.openEnd(u), f.length);
      } else u > a && (r.span(a, u, o.active, l), l = o.openEnd(u));
      if (o.to > i)
        return l + (o.point && o.to > i ? 1 : 0);
      a = o.to, o.next();
    }
  }
  /**
  Create a range set for the given range or array of ranges. By
  default, this expects the ranges to be _sorted_ (by start
  position and, if two start at the same position,
  `value.startSide`). You can pass `true` as second argument to
  cause the method to sort them.
  */
  static of(e, n = !1) {
    let i = new Zu();
    for (let r of e instanceof W4 ? [e] : n ? R2e(e) : e)
      i.add(r.from, r.to, r.value);
    return i.finish();
  }
  /**
  Join an array of range sets into a single set.
  */
  static join(e) {
    if (!e.length)
      return Qt.empty;
    let n = e[e.length - 1];
    for (let i = e.length - 2; i >= 0; i--)
      for (let r = e[i]; r != Qt.empty; r = r.nextLayer)
        n = new Qt(r.chunkPos, r.chunk, n, Math.max(r.maxPoint, n.maxPoint));
    return n;
  }
}
Qt.empty = /* @__PURE__ */ new Qt([], [], null, -1);
function R2e(t) {
  if (t.length > 1)
    for (let e = t[0], n = 1; n < t.length; n++) {
      let i = t[n];
      if (H4(e, i) > 0)
        return t.slice().sort(H4);
      e = i;
    }
  return t;
}
Qt.empty.nextLayer = Qt.empty;
class Zu {
  finishChunk(e) {
    this.chunks.push(new pE(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
  }
  /**
  Create an empty builder.
  */
  constructor() {
    this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
  }
  /**
  Add a range. Ranges should be added in sorted (by `from` and
  `value.startSide`) order.
  */
  add(e, n, i) {
    this.addInner(e, n, i) || (this.nextLayer || (this.nextLayer = new Zu())).add(e, n, i);
  }
  /**
  @internal
  */
  addInner(e, n, i) {
    let r = e - this.lastTo || i.startSide - this.last.endSide;
    if (r <= 0 && (e - this.lastFrom || i.startSide - this.last.startSide) < 0)
      throw new Error("Ranges must be added sorted by `from` position and `startSide`");
    return r < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(n - this.chunkStart), this.last = i, this.lastFrom = e, this.lastTo = n, this.value.push(i), i.point && (this.maxPoint = Math.max(this.maxPoint, n - e)), !0);
  }
  /**
  @internal
  */
  addChunk(e, n) {
    if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0)
      return !1;
    this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e);
    let i = n.value.length - 1;
    return this.last = n.value[i], this.lastFrom = n.from[i] + e, this.lastTo = n.to[i] + e, !0;
  }
  /**
  Finish the range set. Returns the new set. The builder can't be
  used anymore after this has been called.
  */
  finish() {
    return this.finishInner(Qt.empty);
  }
  /**
  @internal
  */
  finishInner(e) {
    if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
      return e;
    let n = Qt.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
    return this.from = null, n;
  }
}
function KN(t, e, n) {
  let i = /* @__PURE__ */ new Map();
  for (let s of t)
    for (let o = 0; o < s.chunk.length; o++)
      s.chunk[o].maxPoint <= 0 && i.set(s.chunk[o], s.chunkPos[o]);
  let r = /* @__PURE__ */ new Set();
  for (let s of e)
    for (let o = 0; o < s.chunk.length; o++) {
      let a = i.get(s.chunk[o]);
      a != null && (n ? n.mapPos(a) : a) == s.chunkPos[o] && !(n != null && n.touchesRange(a, a + s.chunk[o].length)) && r.add(s.chunk[o]);
    }
  return r;
}
class sH {
  constructor(e, n, i, r = 0) {
    this.layer = e, this.skip = n, this.minPoint = i, this.rank = r;
  }
  get startSide() {
    return this.value ? this.value.startSide : 0;
  }
  get endSide() {
    return this.value ? this.value.endSide : 0;
  }
  goto(e, n = -1e9) {
    return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this;
  }
  gotoInner(e, n, i) {
    for (; this.chunkIndex < this.layer.chunk.length; ) {
      let r = this.layer.chunk[this.chunkIndex];
      if (!(this.skip && this.skip.has(r) || this.layer.chunkEnd(this.chunkIndex) < e || r.maxPoint < this.minPoint))
        break;
      this.chunkIndex++, i = !1;
    }
    if (this.chunkIndex < this.layer.chunk.length) {
      let r = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0);
      (!i || this.rangeIndex < r) && this.setRangeIndex(r);
    }
    this.next();
  }
  forward(e, n) {
    (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0);
  }
  next() {
    for (; ; )
      if (this.chunkIndex == this.layer.chunk.length) {
        this.from = this.to = 1e9, this.value = null;
        break;
      } else {
        let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], i = e + n.from[this.rangeIndex];
        if (this.from = i, this.to = e + n.to[this.rangeIndex], this.value = n.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
          break;
      }
  }
  setRangeIndex(e) {
    if (e == this.layer.chunk[this.chunkIndex].value.length) {
      if (this.chunkIndex++, this.skip)
        for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
          this.chunkIndex++;
      this.rangeIndex = 0;
    } else
      this.rangeIndex = e;
  }
  nextChunk() {
    this.chunkIndex++, this.rangeIndex = 0, this.next();
  }
  compare(e) {
    return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
  }
}
class a0 {
  constructor(e) {
    this.heap = e;
  }
  static from(e, n = null, i = -1) {
    let r = [];
    for (let s = 0; s < e.length; s++)
      for (let o = e[s]; !o.isEmpty; o = o.nextLayer)
        o.maxPoint >= i && r.push(new sH(o, n, i, s));
    return r.length == 1 ? r[0] : new a0(r);
  }
  get startSide() {
    return this.value ? this.value.startSide : 0;
  }
  goto(e, n = -1e9) {
    for (let i of this.heap)
      i.goto(e, n);
    for (let i = this.heap.length >> 1; i >= 0; i--)
      Z3(this.heap, i);
    return this.next(), this;
  }
  forward(e, n) {
    for (let i of this.heap)
      i.forward(e, n);
    for (let i = this.heap.length >> 1; i >= 0; i--)
      Z3(this.heap, i);
    (this.to - e || this.value.endSide - n) < 0 && this.next();
  }
  next() {
    if (this.heap.length == 0)
      this.from = this.to = 1e9, this.value = null, this.rank = -1;
    else {
      let e = this.heap[0];
      this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), Z3(this.heap, 0);
    }
  }
}
function Z3(t, e) {
  for (let n = t[e]; ; ) {
    let i = (e << 1) + 1;
    if (i >= t.length)
      break;
    let r = t[i];
    if (i + 1 < t.length && r.compare(t[i + 1]) >= 0 && (r = t[i + 1], i++), n.compare(r) < 0)
      break;
    t[i] = n, t[e] = r, e = i;
  }
}
class $m {
  constructor(e, n, i) {
    this.minPoint = i, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = a0.from(e, n, i);
  }
  goto(e, n = -1e9) {
    return this.cursor.goto(e, n), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = n, this.openStart = -1, this.next(), this;
  }
  forward(e, n) {
    for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; )
      this.removeActive(this.minActive);
    this.cursor.forward(e, n);
  }
  removeActive(e) {
    ub(this.active, e), ub(this.activeTo, e), ub(this.activeRank, e), this.minActive = eA(this.active, this.activeTo);
  }
  addActive(e) {
    let n = 0, { value: i, to: r, rank: s } = this.cursor;
    for (; n < this.activeRank.length && (s - this.activeRank[n] || r - this.activeTo[n]) > 0; )
      n++;
    cb(this.active, n, i), cb(this.activeTo, n, r), cb(this.activeRank, n, s), e && cb(e, n, this.cursor.from), this.minActive = eA(this.active, this.activeTo);
  }
  // After calling this, if `this.point` != null, the next range is a
  // point. Otherwise, it's a regular range, covered by `this.active`.
  next() {
    let e = this.to, n = this.point;
    this.point = null;
    let i = this.openStart < 0 ? [] : null;
    for (; ; ) {
      let r = this.minActive;
      if (r > -1 && (this.activeTo[r] - this.cursor.from || this.active[r].endSide - this.cursor.startSide) < 0) {
        if (this.activeTo[r] > e) {
          this.to = this.activeTo[r], this.endSide = this.active[r].endSide;
          break;
        }
        this.removeActive(r), i && ub(i, r);
      } else if (this.cursor.value)
        if (this.cursor.from > e) {
          this.to = this.cursor.from, this.endSide = this.cursor.startSide;
          break;
        } else {
          let s = this.cursor.value;
          if (!s.point)
            this.addActive(i), this.cursor.next();
          else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
            this.cursor.next();
          else {
            this.point = s, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = s.endSide, this.cursor.next(), this.forward(this.to, this.endSide);
            break;
          }
        }
      else {
        this.to = this.endSide = 1e9;
        break;
      }
    }
    if (i) {
      this.openStart = 0;
      for (let r = i.length - 1; r >= 0 && i[r] < e; r--)
        this.openStart++;
    }
  }
  activeForPoint(e) {
    if (!this.active.length)
      return this.active;
    let n = [];
    for (let i = this.active.length - 1; i >= 0 && !(this.activeRank[i] < this.pointRank); i--)
      (this.activeTo[i] > e || this.activeTo[i] == e && this.active[i].endSide >= this.point.endSide) && n.push(this.active[i]);
    return n.reverse();
  }
  openEnd(e) {
    let n = 0;
    for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > e; i--)
      n++;
    return n;
  }
}
function JN(t, e, n, i, r, s) {
  t.goto(e), n.goto(i);
  let o = i + r, a = i, l = i - e;
  for (; ; ) {
    let u = t.to + l - n.to || t.endSide - n.endSide, f = u < 0 ? t.to + l : n.to, d = Math.min(f, o);
    if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && Q4(t.activeForPoint(t.to), n.activeForPoint(n.to)) || s.comparePoint(a, d, t.point, n.point) : d > a && !Q4(t.active, n.active) && s.compareRange(a, d, t.active, n.active), f > o)
      break;
    a = f, u <= 0 && t.next(), u >= 0 && n.next();
  }
}
function Q4(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (t[n] != e[n] && !t[n].eq(e[n]))
      return !1;
  return !0;
}
function ub(t, e) {
  for (let n = e, i = t.length - 1; n < i; n++)
    t[n] = t[n + 1];
  t.pop();
}
function cb(t, e, n) {
  for (let i = t.length - 1; i >= e; i--)
    t[i + 1] = t[i];
  t[e] = n;
}
function eA(t, e) {
  let n = -1, i = 1e9;
  for (let r = 0; r < e.length; r++)
    (e[r] - i || t[r].endSide - t[n].endSide) < 0 && (n = r, i = e[r]);
  return n;
}
function dp(t, e, n = t.length) {
  let i = 0;
  for (let r = 0; r < n; )
    t.charCodeAt(r) == 9 ? (i += e - i % e, r++) : (i++, r = dr(t, r));
  return i;
}
function U4(t, e, n, i) {
  for (let r = 0, s = 0; ; ) {
    if (s >= e)
      return r;
    if (r == t.length)
      break;
    s += t.charCodeAt(r) == 9 ? n - s % n : 1, r = dr(t, r);
  }
  return i === !0 ? -1 : t.length;
}
const Z4 = "ͼ", tA = typeof Symbol > "u" ? "__" + Z4 : Symbol.for(Z4), q4 = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), nA = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {};
class qu {
  // :: (Object<Style>, ?{finish: ?(string) → string})
  // Create a style module from the given spec.
  //
  // When `finish` is given, it is called on regular (non-`@`)
  // selectors (after `&` expansion) to compute the final selector.
  constructor(e, n) {
    this.rules = [];
    let { finish: i } = n || {};
    function r(o) {
      return /^@/.test(o) ? [o] : o.split(/,\s*/);
    }
    function s(o, a, l, u) {
      let f = [], d = /^@(\w+)\b/.exec(o[0]), h = d && d[1] == "keyframes";
      if (d && a == null) return l.push(o[0] + ";");
      for (let m in a) {
        let g = a[m];
        if (/&/.test(m))
          s(
            m.split(/,\s*/).map((w) => o.map((x) => w.replace(/&/, x))).reduce((w, x) => w.concat(x)),
            g,
            l
          );
        else if (g && typeof g == "object") {
          if (!d) throw new RangeError("The value of a property (" + m + ") should be a primitive value.");
          s(r(m), g, f, h);
        } else g != null && f.push(m.replace(/_.*/, "").replace(/[A-Z]/g, (w) => "-" + w.toLowerCase()) + ": " + g + ";");
      }
      (f.length || h) && l.push((i && !d && !u ? o.map(i) : o).join(", ") + " {" + f.join(" ") + "}");
    }
    for (let o in e) s(r(o), e[o], this.rules);
  }
  // :: () → string
  // Returns a string containing the module's CSS rules.
  getRules() {
    return this.rules.join(`
`);
  }
  // :: () → string
  // Generate a new unique CSS class name.
  static newName() {
    let e = nA[tA] || 1;
    return nA[tA] = e + 1, Z4 + e.toString(36);
  }
  // :: (union<Document, ShadowRoot>, union<[StyleModule], StyleModule>, ?{nonce: ?string})
  //
  // Mount the given set of modules in the given DOM root, which ensures
  // that the CSS rules defined by the module are available in that
  // context.
  //
  // Rules are only added to the document once per root.
  //
  // Rule order will follow the order of the modules, so that rules from
  // modules later in the array take precedence of those from earlier
  // modules. If you call this function multiple times for the same root
  // in a way that changes the order of already mounted modules, the old
  // order will be changed.
  //
  // If a Content Security Policy nonce is provided, it is added to
  // the `<style>` tag generated by the library.
  static mount(e, n, i) {
    let r = e[q4], s = i && i.nonce;
    r ? s && r.setNonce(s) : r = new j2e(e, s), r.mount(Array.isArray(n) ? n : [n]);
  }
}
let iA = /* @__PURE__ */ new Map();
class j2e {
  constructor(e, n) {
    let i = e.ownerDocument || e, r = i.defaultView;
    if (!e.head && e.adoptedStyleSheets && r.CSSStyleSheet) {
      let s = iA.get(i);
      if (s)
        return e.adoptedStyleSheets = [s.sheet, ...e.adoptedStyleSheets], e[q4] = s;
      this.sheet = new r.CSSStyleSheet(), e.adoptedStyleSheets = [this.sheet, ...e.adoptedStyleSheets], iA.set(i, this);
    } else {
      this.styleTag = i.createElement("style"), n && this.styleTag.setAttribute("nonce", n);
      let s = e.head || e;
      s.insertBefore(this.styleTag, s.firstChild);
    }
    this.modules = [], e[q4] = this;
  }
  mount(e) {
    let n = this.sheet, i = 0, r = 0;
    for (let s = 0; s < e.length; s++) {
      let o = e[s], a = this.modules.indexOf(o);
      if (a < r && a > -1 && (this.modules.splice(a, 1), r--, a = -1), a == -1) {
        if (this.modules.splice(r++, 0, o), n) for (let l = 0; l < o.rules.length; l++)
          n.insertRule(o.rules[l], i++);
      } else {
        for (; r < a; ) i += this.modules[r++].rules.length;
        i += o.rules.length, r++;
      }
    }
    if (!n) {
      let s = "";
      for (let o = 0; o < this.modules.length; o++)
        s += this.modules[o].getRules() + `
`;
      this.styleTag.textContent = s;
    }
  }
  setNonce(e) {
    this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
  }
}
var Yu = {
  8: "Backspace",
  9: "Tab",
  10: "Enter",
  12: "NumLock",
  13: "Enter",
  16: "Shift",
  17: "Control",
  18: "Alt",
  20: "CapsLock",
  27: "Escape",
  32: " ",
  33: "PageUp",
  34: "PageDown",
  35: "End",
  36: "Home",
  37: "ArrowLeft",
  38: "ArrowUp",
  39: "ArrowRight",
  40: "ArrowDown",
  44: "PrintScreen",
  45: "Insert",
  46: "Delete",
  59: ";",
  61: "=",
  91: "Meta",
  92: "Meta",
  106: "*",
  107: "+",
  108: ",",
  109: "-",
  110: ".",
  111: "/",
  144: "NumLock",
  145: "ScrollLock",
  160: "Shift",
  161: "Shift",
  162: "Control",
  163: "Control",
  164: "Alt",
  165: "Alt",
  173: "-",
  186: ";",
  187: "=",
  188: ",",
  189: "-",
  190: ".",
  191: "/",
  192: "`",
  219: "[",
  220: "\\",
  221: "]",
  222: "'"
}, l0 = {
  48: ")",
  49: "!",
  50: "@",
  51: "#",
  52: "$",
  53: "%",
  54: "^",
  55: "&",
  56: "*",
  57: "(",
  59: ":",
  61: "+",
  173: "_",
  186: ":",
  187: "+",
  188: "<",
  189: "_",
  190: ">",
  191: "?",
  192: "~",
  219: "{",
  220: "|",
  221: "}",
  222: '"'
}, F2e = typeof navigator < "u" && /Mac/.test(navigator.platform), B2e = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
for (var lr = 0; lr < 10; lr++) Yu[48 + lr] = Yu[96 + lr] = String(lr);
for (var lr = 1; lr <= 24; lr++) Yu[lr + 111] = "F" + lr;
for (var lr = 65; lr <= 90; lr++)
  Yu[lr] = String.fromCharCode(lr + 32), l0[lr] = String.fromCharCode(lr);
for (var q3 in Yu) l0.hasOwnProperty(q3) || (l0[q3] = Yu[q3]);
function z2e(t) {
  var e = F2e && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || B2e && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? l0 : Yu)[t.keyCode] || t.key || "Unidentified";
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
}
function _w(t) {
  let e;
  return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
}
function Y4(t, e) {
  return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
}
function W2e(t) {
  let e = t.activeElement;
  for (; e && e.shadowRoot; )
    e = e.shadowRoot.activeElement;
  return e;
}
function ly(t, e) {
  if (!e.anchorNode)
    return !1;
  try {
    return Y4(t, e.anchorNode);
  } catch {
    return !1;
  }
}
function $h(t) {
  return t.nodeType == 3 ? bf(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
}
function Tg(t, e, n, i) {
  return n ? rA(t, e, n, i, -1) || rA(t, e, n, i, 1) : !1;
}
function u0(t) {
  for (var e = 0; ; e++)
    if (t = t.previousSibling, !t)
      return e;
}
function rA(t, e, n, i, r) {
  for (; ; ) {
    if (t == n && e == i)
      return !0;
    if (e == (r < 0 ? 0 : _l(t))) {
      if (t.nodeName == "DIV")
        return !1;
      let s = t.parentNode;
      if (!s || s.nodeType != 1)
        return !1;
      e = u0(t) + (r < 0 ? 0 : 1), t = s;
    } else if (t.nodeType == 1) {
      if (t = t.childNodes[e + (r < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false")
        return !1;
      e = r < 0 ? _l(t) : 0;
    } else
      return !1;
  }
}
function _l(t) {
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
}
function h2(t, e) {
  let n = e ? t.left : t.right;
  return { left: n, right: n, top: t.top, bottom: t.bottom };
}
function H2e(t) {
  return {
    left: 0,
    right: t.innerWidth,
    top: 0,
    bottom: t.innerHeight
  };
}
function oH(t, e) {
  let n = e.width / t.offsetWidth, i = e.height / t.offsetHeight;
  return (n > 0.995 && n < 1.005 || !isFinite(n) || Math.abs(e.width - t.offsetWidth) < 1) && (n = 1), (i > 0.995 && i < 1.005 || !isFinite(i) || Math.abs(e.height - t.offsetHeight) < 1) && (i = 1), { scaleX: n, scaleY: i };
}
function Q2e(t, e, n, i, r, s, o, a) {
  let l = t.ownerDocument, u = l.defaultView || window;
  for (let f = t, d = !1; f && !d; )
    if (f.nodeType == 1) {
      let h, m = f == l.body, g = 1, w = 1;
      if (m)
        h = H2e(u);
      else {
        if (/^(fixed|sticky)$/.test(getComputedStyle(f).position) && (d = !0), f.scrollHeight <= f.clientHeight && f.scrollWidth <= f.clientWidth) {
          f = f.assignedSlot || f.parentNode;
          continue;
        }
        let S = f.getBoundingClientRect();
        ({ scaleX: g, scaleY: w } = oH(f, S)), h = {
          left: S.left,
          right: S.left + f.clientWidth * g,
          top: S.top,
          bottom: S.top + f.clientHeight * w
        };
      }
      let x = 0, _ = 0;
      if (r == "nearest")
        e.top < h.top ? (_ = -(h.top - e.top + o), n > 0 && e.bottom > h.bottom + _ && (_ = e.bottom - h.bottom + _ + o)) : e.bottom > h.bottom && (_ = e.bottom - h.bottom + o, n < 0 && e.top - _ < h.top && (_ = -(h.top + _ - e.top + o)));
      else {
        let S = e.bottom - e.top, C = h.bottom - h.top;
        _ = (r == "center" && S <= C ? e.top + S / 2 - C / 2 : r == "start" || r == "center" && n < 0 ? e.top - o : e.bottom - C + o) - h.top;
      }
      if (i == "nearest" ? e.left < h.left ? (x = -(h.left - e.left + s), n > 0 && e.right > h.right + x && (x = e.right - h.right + x + s)) : e.right > h.right && (x = e.right - h.right + s, n < 0 && e.left < h.left + x && (x = -(h.left + x - e.left + s))) : x = (i == "center" ? e.left + (e.right - e.left) / 2 - (h.right - h.left) / 2 : i == "start" == a ? e.left - s : e.right - (h.right - h.left) + s) - h.left, x || _)
        if (m)
          u.scrollBy(x, _);
        else {
          let S = 0, C = 0;
          if (_) {
            let E = f.scrollTop;
            f.scrollTop += _ / w, C = (f.scrollTop - E) * w;
          }
          if (x) {
            let E = f.scrollLeft;
            f.scrollLeft += x / g, S = (f.scrollLeft - E) * g;
          }
          e = {
            left: e.left - S,
            top: e.top - C,
            right: e.right - S,
            bottom: e.bottom - C
          }, S && Math.abs(S - x) < 1 && (i = "nearest"), C && Math.abs(C - _) < 1 && (r = "nearest");
        }
      if (m)
        break;
      f = f.assignedSlot || f.parentNode;
    } else if (f.nodeType == 11)
      f = f.host;
    else
      break;
}
function U2e(t) {
  let e = t.ownerDocument;
  for (let n = t.parentNode; n && n != e.body; )
    if (n.nodeType == 1) {
      if (n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth)
        return n;
      n = n.assignedSlot || n.parentNode;
    } else if (n.nodeType == 11)
      n = n.host;
    else
      break;
  return null;
}
class Z2e {
  constructor() {
    this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
  }
  eq(e) {
    return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset;
  }
  setRange(e) {
    let { anchorNode: n, focusNode: i } = e;
    this.set(n, Math.min(e.anchorOffset, n ? _l(n) : 0), i, Math.min(e.focusOffset, i ? _l(i) : 0));
  }
  set(e, n, i, r) {
    this.anchorNode = e, this.anchorOffset = n, this.focusNode = i, this.focusOffset = r;
  }
}
let Nd = null;
function aH(t) {
  if (t.setActive)
    return t.setActive();
  if (Nd)
    return t.focus(Nd);
  let e = [];
  for (let n = t; n && (e.push(n, n.scrollTop, n.scrollLeft), n != n.ownerDocument); n = n.parentNode)
    ;
  if (t.focus(Nd == null ? {
    get preventScroll() {
      return Nd = { preventScroll: !0 }, !0;
    }
  } : void 0), !Nd) {
    Nd = !1;
    for (let n = 0; n < e.length; ) {
      let i = e[n++], r = e[n++], s = e[n++];
      i.scrollTop != r && (i.scrollTop = r), i.scrollLeft != s && (i.scrollLeft = s);
    }
  }
}
let sA;
function bf(t, e, n = e) {
  let i = sA || (sA = document.createRange());
  return i.setEnd(t, n), i.setStart(t, e), i;
}
function ph(t, e, n) {
  let i = { key: e, code: e, keyCode: n, which: n, cancelable: !0 }, r = new KeyboardEvent("keydown", i);
  r.synthetic = !0, t.dispatchEvent(r);
  let s = new KeyboardEvent("keyup", i);
  return s.synthetic = !0, t.dispatchEvent(s), r.defaultPrevented || s.defaultPrevented;
}
function q2e(t) {
  for (; t; ) {
    if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host))
      return t;
    t = t.assignedSlot || t.parentNode;
  }
  return null;
}
function lH(t) {
  for (; t.attributes.length; )
    t.removeAttributeNode(t.attributes[0]);
}
function Y2e(t, e) {
  let n = e.focusNode, i = e.focusOffset;
  if (!n || e.anchorNode != n || e.anchorOffset != i)
    return !1;
  for (i = Math.min(i, _l(n)); ; )
    if (i) {
      if (n.nodeType != 1)
        return !1;
      let r = n.childNodes[i - 1];
      r.contentEditable == "false" ? i-- : (n = r, i = _l(n));
    } else {
      if (n == t)
        return !0;
      i = u0(n), n = n.parentNode;
    }
}
function uH(t) {
  return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4);
}
class Mr {
  constructor(e, n, i = !0) {
    this.node = e, this.offset = n, this.precise = i;
  }
  static before(e, n) {
    return new Mr(e.parentNode, u0(e), n);
  }
  static after(e, n) {
    return new Mr(e.parentNode, u0(e) + 1, n);
  }
}
const mE = [];
class En {
  constructor() {
    this.parent = null, this.dom = null, this.flags = 2;
  }
  get overrideDOMText() {
    return null;
  }
  get posAtStart() {
    return this.parent ? this.parent.posBefore(this) : 0;
  }
  get posAtEnd() {
    return this.posAtStart + this.length;
  }
  posBefore(e) {
    let n = this.posAtStart;
    for (let i of this.children) {
      if (i == e)
        return n;
      n += i.length + i.breakAfter;
    }
    throw new RangeError("Invalid child in posBefore");
  }
  posAfter(e) {
    return this.posBefore(e) + e.length;
  }
  sync(e, n) {
    if (this.flags & 2) {
      let i = this.dom, r = null, s;
      for (let o of this.children) {
        if (o.flags & 7) {
          if (!o.dom && (s = r ? r.nextSibling : i.firstChild)) {
            let a = En.get(s);
            (!a || !a.parent && a.canReuseDOM(o)) && o.reuseDOM(s);
          }
          o.sync(e, n), o.flags &= -8;
        }
        if (s = r ? r.nextSibling : i.firstChild, n && !n.written && n.node == i && s != o.dom && (n.written = !0), o.dom.parentNode == i)
          for (; s && s != o.dom; )
            s = oA(s);
        else
          i.insertBefore(o.dom, s);
        r = o.dom;
      }
      for (s = r ? r.nextSibling : i.firstChild, s && n && n.node == i && (n.written = !0); s; )
        s = oA(s);
    } else if (this.flags & 1)
      for (let i of this.children)
        i.flags & 7 && (i.sync(e, n), i.flags &= -8);
  }
  reuseDOM(e) {
  }
  localPosFromDOM(e, n) {
    let i;
    if (e == this.dom)
      i = this.dom.childNodes[n];
    else {
      let r = _l(e) == 0 ? 0 : n == 0 ? -1 : 1;
      for (; ; ) {
        let s = e.parentNode;
        if (s == this.dom)
          break;
        r == 0 && s.firstChild != s.lastChild && (e == s.firstChild ? r = -1 : r = 1), e = s;
      }
      r < 0 ? i = e : i = e.nextSibling;
    }
    if (i == this.dom.firstChild)
      return 0;
    for (; i && !En.get(i); )
      i = i.nextSibling;
    if (!i)
      return this.length;
    for (let r = 0, s = 0; ; r++) {
      let o = this.children[r];
      if (o.dom == i)
        return s;
      s += o.length + o.breakAfter;
    }
  }
  domBoundsAround(e, n, i = 0) {
    let r = -1, s = -1, o = -1, a = -1;
    for (let l = 0, u = i, f = i; l < this.children.length; l++) {
      let d = this.children[l], h = u + d.length;
      if (u < e && h > n)
        return d.domBoundsAround(e, n, u);
      if (h >= e && r == -1 && (r = l, s = u), u > n && d.dom.parentNode == this.dom) {
        o = l, a = f;
        break;
      }
      f = h, u = h + d.breakAfter;
    }
    return {
      from: s,
      to: a < 0 ? i + this.length : a,
      startDOM: (r ? this.children[r - 1].dom.nextSibling : null) || this.dom.firstChild,
      endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null
    };
  }
  markDirty(e = !1) {
    this.flags |= 2, this.markParentsDirty(e);
  }
  markParentsDirty(e) {
    for (let n = this.parent; n; n = n.parent) {
      if (e && (n.flags |= 2), n.flags & 1)
        return;
      n.flags |= 1, e = !1;
    }
  }
  setParent(e) {
    this.parent != e && (this.parent = e, this.flags & 7 && this.markParentsDirty(!0));
  }
  setDOM(e) {
    this.dom != e && (this.dom && (this.dom.cmView = null), this.dom = e, e.cmView = this);
  }
  get rootView() {
    for (let e = this; ; ) {
      let n = e.parent;
      if (!n)
        return e;
      e = n;
    }
  }
  replaceChildren(e, n, i = mE) {
    this.markDirty();
    for (let r = e; r < n; r++) {
      let s = this.children[r];
      s.parent == this && i.indexOf(s) < 0 && s.destroy();
    }
    this.children.splice(e, n - e, ...i);
    for (let r = 0; r < i.length; r++)
      i[r].setParent(this);
  }
  ignoreMutation(e) {
    return !1;
  }
  ignoreEvent(e) {
    return !1;
  }
  childCursor(e = this.length) {
    return new cH(this.children, e, this.children.length);
  }
  childPos(e, n = 1) {
    return this.childCursor().findPos(e, n);
  }
  toString() {
    let e = this.constructor.name.replace("View", "");
    return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
  }
  static get(e) {
    return e.cmView;
  }
  get isEditable() {
    return !0;
  }
  get isWidget() {
    return !1;
  }
  get isHidden() {
    return !1;
  }
  merge(e, n, i, r, s, o) {
    return !1;
  }
  become(e) {
    return !1;
  }
  canReuseDOM(e) {
    return e.constructor == this.constructor && !((this.flags | e.flags) & 8);
  }
  // When this is a zero-length view with a side, this should return a
  // number <= 0 to indicate it is before its position, or a
  // number > 0 when after its position.
  getSide() {
    return 0;
  }
  destroy() {
    for (let e of this.children)
      e.parent == this && e.destroy();
    this.parent = null;
  }
}
En.prototype.breakAfter = 0;
function oA(t) {
  let e = t.nextSibling;
  return t.parentNode.removeChild(t), e;
}
class cH {
  constructor(e, n, i) {
    this.children = e, this.pos = n, this.i = i, this.off = 0;
  }
  findPos(e, n = 1) {
    for (; ; ) {
      if (e > this.pos || e == this.pos && (n > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))
        return this.off = e - this.pos, this;
      let i = this.children[--this.i];
      this.pos -= i.length + i.breakAfter;
    }
  }
}
function fH(t, e, n, i, r, s, o, a, l) {
  let { children: u } = t, f = u.length ? u[e] : null, d = s.length ? s[s.length - 1] : null, h = d ? d.breakAfter : o;
  if (!(e == i && f && !o && !h && s.length < 2 && f.merge(n, r, s.length ? d : null, n == 0, a, l))) {
    if (i < u.length) {
      let m = u[i];
      m && (r < m.length || m.breakAfter && (d != null && d.breakAfter)) ? (e == i && (m = m.split(r), r = 0), !h && d && m.merge(0, r, d, !0, 0, l) ? s[s.length - 1] = m : ((r || m.children.length && !m.children[0].length) && m.merge(0, r, null, !1, 0, l), s.push(m))) : m != null && m.breakAfter && (d ? d.breakAfter = 1 : o = 1), i++;
    }
    for (f && (f.breakAfter = o, n > 0 && (!o && s.length && f.merge(n, f.length, s[0], !1, a, 0) ? f.breakAfter = s.shift().breakAfter : (n < f.length || f.children.length && f.children[f.children.length - 1].length == 0) && f.merge(n, f.length, null, !1, a, 0), e++)); e < i && s.length; )
      if (u[i - 1].become(s[s.length - 1]))
        i--, s.pop(), l = s.length ? 0 : a;
      else if (u[e].become(s[0]))
        e++, s.shift(), a = s.length ? 0 : l;
      else
        break;
    !s.length && e && i < u.length && !u[e - 1].breakAfter && u[i].merge(0, 0, u[e - 1], !1, a, l) && e--, (e < i || s.length) && t.replaceChildren(e, i, s);
  }
}
function dH(t, e, n, i, r, s) {
  let o = t.childCursor(), { i: a, off: l } = o.findPos(n, 1), { i: u, off: f } = o.findPos(e, -1), d = e - n;
  for (let h of i)
    d += h.length;
  t.length += d, fH(t, u, f, a, l, i, 0, r, s);
}
let Fs = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, V4 = typeof document < "u" ? document : { documentElement: { style: {} } };
const X4 = /* @__PURE__ */ /Edge\/(\d+)/.exec(Fs.userAgent), hH = /* @__PURE__ */ /MSIE \d/.test(Fs.userAgent), G4 = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Fs.userAgent), p2 = !!(hH || G4 || X4), aA = !p2 && /* @__PURE__ */ /gecko\/(\d+)/i.test(Fs.userAgent), Y3 = !p2 && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Fs.userAgent), V2e = "webkitFontSmoothing" in V4.documentElement.style, pH = !p2 && /* @__PURE__ */ /Apple Computer/.test(Fs.vendor), lA = pH && (/* @__PURE__ */ /Mobile\/\w+/.test(Fs.userAgent) || Fs.maxTouchPoints > 2);
var qe = {
  mac: lA || /* @__PURE__ */ /Mac/.test(Fs.platform),
  windows: /* @__PURE__ */ /Win/.test(Fs.platform),
  linux: /* @__PURE__ */ /Linux|X11/.test(Fs.platform),
  ie: p2,
  ie_version: hH ? V4.documentMode || 6 : G4 ? +G4[1] : X4 ? +X4[1] : 0,
  gecko: aA,
  gecko_version: aA ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Fs.userAgent) || [0, 0])[1] : 0,
  chrome: !!Y3,
  chrome_version: Y3 ? +Y3[1] : 0,
  ios: lA,
  android: /* @__PURE__ */ /Android\b/.test(Fs.userAgent),
  safari: pH,
  webkit_version: V2e ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0,
  tabSize: V4.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
};
const X2e = 256;
class Ol extends En {
  constructor(e) {
    super(), this.text = e;
  }
  get length() {
    return this.text.length;
  }
  createDOM(e) {
    this.setDOM(e || document.createTextNode(this.text));
  }
  sync(e, n) {
    this.dom || this.createDOM(), this.dom.nodeValue != this.text && (n && n.node == this.dom && (n.written = !0), this.dom.nodeValue = this.text);
  }
  reuseDOM(e) {
    e.nodeType == 3 && this.createDOM(e);
  }
  merge(e, n, i) {
    return this.flags & 8 || i && (!(i instanceof Ol) || this.length - (n - e) + i.length > X2e || i.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (i ? i.text : "") + this.text.slice(n), this.markDirty(), !0);
  }
  split(e) {
    let n = new Ol(this.text.slice(e));
    return this.text = this.text.slice(0, e), this.markDirty(), n.flags |= this.flags & 8, n;
  }
  localPosFromDOM(e, n) {
    return e == this.dom ? n : n ? this.text.length : 0;
  }
  domAtPos(e) {
    return new Mr(this.dom, e);
  }
  domBoundsAround(e, n, i) {
    return { from: i, to: i + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling };
  }
  coordsAt(e, n) {
    return G2e(this.dom, e, n);
  }
}
class Sl extends En {
  constructor(e, n = [], i = 0) {
    super(), this.mark = e, this.children = n, this.length = i;
    for (let r of n)
      r.setParent(this);
  }
  setAttrs(e) {
    if (lH(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)
      for (let n in this.mark.attrs)
        e.setAttribute(n, this.mark.attrs[n]);
    return e;
  }
  canReuseDOM(e) {
    return super.canReuseDOM(e) && !((this.flags | e.flags) & 8);
  }
  reuseDOM(e) {
    e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), this.flags |= 6);
  }
  sync(e, n) {
    this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, n);
  }
  merge(e, n, i, r, s, o) {
    return i && (!(i instanceof Sl && i.mark.eq(this.mark)) || e && s <= 0 || n < this.length && o <= 0) ? !1 : (dH(this, e, n, i ? i.children.slice() : [], s - 1, o - 1), this.markDirty(), !0);
  }
  split(e) {
    let n = [], i = 0, r = -1, s = 0;
    for (let a of this.children) {
      let l = i + a.length;
      l > e && n.push(i < e ? a.split(e - i) : a), r < 0 && i >= e && (r = s), i = l, s++;
    }
    let o = this.length - e;
    return this.length = e, r > -1 && (this.children.length = r, this.markDirty()), new Sl(this.mark, n, o);
  }
  domAtPos(e) {
    return mH(this, e);
  }
  coordsAt(e, n) {
    return vH(this, e, n);
  }
}
function G2e(t, e, n) {
  let i = t.nodeValue.length;
  e > i && (e = i);
  let r = e, s = e, o = 0;
  e == 0 && n < 0 || e == i && n >= 0 ? qe.chrome || qe.gecko || (e ? (r--, o = 1) : s < i && (s++, o = -1)) : n < 0 ? r-- : s < i && s++;
  let a = bf(t, r, s).getClientRects();
  if (!a.length)
    return null;
  let l = a[(o ? o < 0 : n >= 0) ? 0 : a.length - 1];
  return qe.safari && !o && l.width == 0 && (l = Array.prototype.find.call(a, (u) => u.width) || l), o ? h2(l, o < 0) : l || null;
}
class Su extends En {
  static create(e, n, i) {
    return new Su(e, n, i);
  }
  constructor(e, n, i) {
    super(), this.widget = e, this.length = n, this.side = i, this.prevWidget = null;
  }
  split(e) {
    let n = Su.create(this.widget, this.length - e, this.side);
    return this.length -= e, n;
  }
  sync(e) {
    (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  }
  getSide() {
    return this.side;
  }
  merge(e, n, i, r, s, o) {
    return i && (!(i instanceof Su) || !this.widget.compare(i.widget) || e > 0 && s <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (i ? i.length : 0) + (this.length - n), !0);
  }
  become(e) {
    return e instanceof Su && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1;
  }
  ignoreMutation() {
    return !0;
  }
  ignoreEvent(e) {
    return this.widget.ignoreEvent(e);
  }
  get overrideDOMText() {
    if (this.length == 0)
      return Kt.empty;
    let e = this;
    for (; e.parent; )
      e = e.parent;
    let { view: n } = e, i = n && n.state.doc, r = this.posAtStart;
    return i ? i.slice(r, r + this.length) : Kt.empty;
  }
  domAtPos(e) {
    return (this.length ? e == 0 : this.side > 0) ? Mr.before(this.dom) : Mr.after(this.dom, e == this.length);
  }
  domBoundsAround() {
    return null;
  }
  coordsAt(e, n) {
    let i = this.widget.coordsAt(this.dom, e, n);
    if (i)
      return i;
    let r = this.dom.getClientRects(), s = null;
    if (!r.length)
      return null;
    let o = this.side ? this.side < 0 : e > 0;
    for (let a = o ? r.length - 1 : 0; s = r[a], !(e > 0 ? a == 0 : a == r.length - 1 || s.top < s.bottom); a += o ? -1 : 1)
      ;
    return h2(s, !o);
  }
  get isEditable() {
    return !1;
  }
  get isWidget() {
    return !0;
  }
  get isHidden() {
    return this.widget.isHidden;
  }
  destroy() {
    super.destroy(), this.dom && this.widget.destroy(this.dom);
  }
}
class Mh extends En {
  constructor(e) {
    super(), this.side = e;
  }
  get length() {
    return 0;
  }
  merge() {
    return !1;
  }
  become(e) {
    return e instanceof Mh && e.side == this.side;
  }
  split() {
    return new Mh(this.side);
  }
  sync() {
    if (!this.dom) {
      let e = document.createElement("img");
      e.className = "cm-widgetBuffer", e.setAttribute("aria-hidden", "true"), this.setDOM(e);
    }
  }
  getSide() {
    return this.side;
  }
  domAtPos(e) {
    return this.side > 0 ? Mr.before(this.dom) : Mr.after(this.dom);
  }
  localPosFromDOM() {
    return 0;
  }
  domBoundsAround() {
    return null;
  }
  coordsAt(e) {
    return this.dom.getBoundingClientRect();
  }
  get overrideDOMText() {
    return Kt.empty;
  }
  get isHidden() {
    return !0;
  }
}
Ol.prototype.children = Su.prototype.children = Mh.prototype.children = mE;
function mH(t, e) {
  let n = t.dom, { children: i } = t, r = 0;
  for (let s = 0; r < i.length; r++) {
    let o = i[r], a = s + o.length;
    if (!(a == s && o.getSide() <= 0)) {
      if (e > s && e < a && o.dom.parentNode == n)
        return o.domAtPos(e - s);
      if (e <= s)
        break;
      s = a;
    }
  }
  for (let s = r; s > 0; s--) {
    let o = i[s - 1];
    if (o.dom.parentNode == n)
      return o.domAtPos(o.length);
  }
  for (let s = r; s < i.length; s++) {
    let o = i[s];
    if (o.dom.parentNode == n)
      return o.domAtPos(0);
  }
  return new Mr(n, 0);
}
function gH(t, e, n) {
  let i, { children: r } = t;
  n > 0 && e instanceof Sl && r.length && (i = r[r.length - 1]) instanceof Sl && i.mark.eq(e.mark) ? gH(i, e.children[0], n - 1) : (r.push(e), e.setParent(t)), t.length += e.length;
}
function vH(t, e, n) {
  let i = null, r = -1, s = null, o = -1;
  function a(u, f) {
    for (let d = 0, h = 0; d < u.children.length && h <= f; d++) {
      let m = u.children[d], g = h + m.length;
      g >= f && (m.children.length ? a(m, f - h) : (!s || s.isHidden && n > 0) && (g > f || h == g && m.getSide() > 0) ? (s = m, o = f - h) : (h < f || h == g && m.getSide() < 0 && !m.isHidden) && (i = m, r = f - h)), h = g;
    }
  }
  a(t, e);
  let l = (n < 0 ? i : s) || i || s;
  return l ? l.coordsAt(Math.max(0, l == i ? r : o), n) : K2e(t);
}
function K2e(t) {
  let e = t.dom.lastChild;
  if (!e)
    return t.dom.getBoundingClientRect();
  let n = $h(e);
  return n[n.length - 1] || null;
}
function K4(t, e) {
  for (let n in t)
    n == "class" && e.class ? e.class += " " + t.class : n == "style" && e.style ? e.style += ";" + t.style : e[n] = t[n];
  return e;
}
const uA = /* @__PURE__ */ Object.create(null);
function gE(t, e, n) {
  if (t == e)
    return !0;
  t || (t = uA), e || (e = uA);
  let i = Object.keys(t), r = Object.keys(e);
  if (i.length - (n && i.indexOf(n) > -1 ? 1 : 0) != r.length - (n && r.indexOf(n) > -1 ? 1 : 0))
    return !1;
  for (let s of i)
    if (s != n && (r.indexOf(s) == -1 || t[s] !== e[s]))
      return !1;
  return !0;
}
function J4(t, e, n) {
  let i = !1;
  if (e)
    for (let r in e)
      n && r in n || (i = !0, r == "style" ? t.style.cssText = "" : t.removeAttribute(r));
  if (n)
    for (let r in n)
      e && e[r] == n[r] || (i = !0, r == "style" ? t.style.cssText = n[r] : t.setAttribute(r, n[r]));
  return i;
}
function J2e(t) {
  let e = /* @__PURE__ */ Object.create(null);
  for (let n = 0; n < t.attributes.length; n++) {
    let i = t.attributes[n];
    e[i.name] = i.value;
  }
  return e;
}
class Ai extends En {
  constructor() {
    super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0;
  }
  // Consumes source
  merge(e, n, i, r, s, o) {
    if (i) {
      if (!(i instanceof Ai))
        return !1;
      this.dom || i.transferDOM(this);
    }
    return r && this.setDeco(i ? i.attrs : null), dH(this, e, n, i ? i.children.slice() : [], s, o), !0;
  }
  split(e) {
    let n = new Ai();
    if (n.breakAfter = this.breakAfter, this.length == 0)
      return n;
    let { i, off: r } = this.childPos(e);
    r && (n.append(this.children[i].split(r), 0), this.children[i].merge(r, this.children[i].length, null, !1, 0, 0), i++);
    for (let s = i; s < this.children.length; s++)
      n.append(this.children[s], 0);
    for (; i > 0 && this.children[i - 1].length == 0; )
      this.children[--i].destroy();
    return this.children.length = i, this.markDirty(), this.length = e, n;
  }
  transferDOM(e) {
    this.dom && (this.markDirty(), e.setDOM(this.dom), e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null);
  }
  setDeco(e) {
    gE(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e);
  }
  append(e, n) {
    gH(this, e, n);
  }
  // Only called when building a line view in ContentBuilder
  addLineDeco(e) {
    let n = e.spec.attributes, i = e.spec.class;
    n && (this.attrs = K4(n, this.attrs || {})), i && (this.attrs = K4({ class: i }, this.attrs || {}));
  }
  domAtPos(e) {
    return mH(this, e);
  }
  reuseDOM(e) {
    e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6);
  }
  sync(e, n) {
    var i;
    this.dom ? this.flags & 4 && (lH(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (J4(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, n);
    let r = this.dom.lastChild;
    for (; r && En.get(r) instanceof Sl; )
      r = r.lastChild;
    if (!r || !this.length || r.nodeName != "BR" && ((i = En.get(r)) === null || i === void 0 ? void 0 : i.isEditable) == !1 && (!qe.ios || !this.children.some((s) => s instanceof Ol))) {
      let s = document.createElement("BR");
      s.cmIgnore = !0, this.dom.appendChild(s);
    }
  }
  measureTextSize() {
    if (this.children.length == 0 || this.length > 20)
      return null;
    let e = 0, n;
    for (let i of this.children) {
      if (!(i instanceof Ol) || /[^ -~]/.test(i.text))
        return null;
      let r = $h(i.dom);
      if (r.length != 1)
        return null;
      e += r[0].width, n = r[0].height;
    }
    return e ? {
      lineHeight: this.dom.getBoundingClientRect().height,
      charWidth: e / this.length,
      textHeight: n
    } : null;
  }
  coordsAt(e, n) {
    let i = vH(this, e, n);
    if (!this.children.length && i && this.parent) {
      let { heightOracle: r } = this.parent.view.viewState, s = i.bottom - i.top;
      if (Math.abs(s - r.lineHeight) < 2 && r.textHeight < s) {
        let o = (s - r.textHeight) / 2;
        return { top: i.top + o, bottom: i.bottom - o, left: i.left, right: i.left };
      }
    }
    return i;
  }
  become(e) {
    return !1;
  }
  covers() {
    return !0;
  }
  static find(e, n) {
    for (let i = 0, r = 0; i < e.children.length; i++) {
      let s = e.children[i], o = r + s.length;
      if (o >= n) {
        if (s instanceof Ai)
          return s;
        if (o > n)
          break;
      }
      r = o + s.breakAfter;
    }
    return null;
  }
}
class Pu extends En {
  constructor(e, n, i) {
    super(), this.widget = e, this.length = n, this.deco = i, this.breakAfter = 0, this.prevWidget = null;
  }
  merge(e, n, i, r, s, o) {
    return i && (!(i instanceof Pu) || !this.widget.compare(i.widget) || e > 0 && s <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (i ? i.length : 0) + (this.length - n), !0);
  }
  domAtPos(e) {
    return e == 0 ? Mr.before(this.dom) : Mr.after(this.dom, e == this.length);
  }
  split(e) {
    let n = this.length - e;
    this.length = e;
    let i = new Pu(this.widget, n, this.deco);
    return i.breakAfter = this.breakAfter, i;
  }
  get children() {
    return mE;
  }
  sync(e) {
    (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  }
  get overrideDOMText() {
    return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : Kt.empty;
  }
  domBoundsAround() {
    return null;
  }
  become(e) {
    return e instanceof Pu && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1;
  }
  ignoreMutation() {
    return !0;
  }
  ignoreEvent(e) {
    return this.widget.ignoreEvent(e);
  }
  get isEditable() {
    return !1;
  }
  get isWidget() {
    return !0;
  }
  coordsAt(e, n) {
    return this.widget.coordsAt(this.dom, e, n);
  }
  destroy() {
    super.destroy(), this.dom && this.widget.destroy(this.dom);
  }
  covers(e) {
    let { startSide: n, endSide: i } = this.deco;
    return n == i ? !1 : e < 0 ? n < 0 : i > 0;
  }
}
class Ha {
  /**
  Compare this instance to another instance of the same type.
  (TypeScript can't express this, but only instances of the same
  specific class will be passed to this method.) This is used to
  avoid redrawing widgets when they are replaced by a new
  decoration of the same type. The default implementation just
  returns `false`, which will cause new instances of the widget to
  always be redrawn.
  */
  eq(e) {
    return !1;
  }
  /**
  Update a DOM element created by a widget of the same type (but
  different, non-`eq` content) to reflect this widget. May return
  true to indicate that it could update, false to indicate it
  couldn't (in which case the widget will be redrawn). The default
  implementation just returns false.
  */
  updateDOM(e, n) {
    return !1;
  }
  /**
  @internal
  */
  compare(e) {
    return this == e || this.constructor == e.constructor && this.eq(e);
  }
  /**
  The estimated height this widget will have, to be used when
  estimating the height of content that hasn't been drawn. May
  return -1 to indicate you don't know. The default implementation
  returns -1.
  */
  get estimatedHeight() {
    return -1;
  }
  /**
  For inline widgets that are displayed inline (as opposed to
  `inline-block`) and introduce line breaks (through `<br>` tags
  or textual newlines), this must indicate the amount of line
  breaks they introduce. Defaults to 0.
  */
  get lineBreaks() {
    return 0;
  }
  /**
  Can be used to configure which kinds of events inside the widget
  should be ignored by the editor. The default is to ignore all
  events.
  */
  ignoreEvent(e) {
    return !0;
  }
  /**
  Override the way screen coordinates for positions at/in the
  widget are found. `pos` will be the offset into the widget, and
  `side` the side of the position that is being queried—less than
  zero for before, greater than zero for after, and zero for
  directly at that position.
  */
  coordsAt(e, n, i) {
    return null;
  }
  /**
  @internal
  */
  get isHidden() {
    return !1;
  }
  /**
  @internal
  */
  get editable() {
    return !1;
  }
  /**
  This is called when the an instance of the widget is removed
  from the editor view.
  */
  destroy(e) {
  }
}
var es = /* @__PURE__ */ function(t) {
  return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t;
}(es || (es = {}));
class it extends vf {
  constructor(e, n, i, r) {
    super(), this.startSide = e, this.endSide = n, this.widget = i, this.spec = r;
  }
  /**
  @internal
  */
  get heightRelevant() {
    return !1;
  }
  /**
  Create a mark decoration, which influences the styling of the
  content in its range. Nested mark decorations will cause nested
  DOM elements to be created. Nesting order is determined by
  precedence of the [facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), with
  the higher-precedence decorations creating the inner DOM nodes.
  Such elements are split on line boundaries and on the boundaries
  of lower-precedence decorations.
  */
  static mark(e) {
    return new L1(e);
  }
  /**
  Create a widget decoration, which displays a DOM element at the
  given position.
  */
  static widget(e) {
    let n = Math.max(-1e4, Math.min(1e4, e.side || 0)), i = !!e.block;
    return n += i && !e.inlineOrder ? n > 0 ? 3e8 : -4e8 : n > 0 ? 1e8 : -1e8, new Vu(e, n, n, i, e.widget || null, !1);
  }
  /**
  Create a replace decoration which replaces the given range with
  a widget, or simply hides it.
  */
  static replace(e) {
    let n = !!e.block, i, r;
    if (e.isBlockGap)
      i = -5e8, r = 4e8;
    else {
      let { start: s, end: o } = bH(e, n);
      i = (s ? n ? -3e8 : -1 : 5e8) - 1, r = (o ? n ? 2e8 : 1 : -6e8) + 1;
    }
    return new Vu(e, i, r, n, e.widget || null, !0);
  }
  /**
  Create a line decoration, which can add DOM attributes to the
  line starting at the given position.
  */
  static line(e) {
    return new R1(e);
  }
  /**
  Build a [`DecorationSet`](https://codemirror.net/6/docs/ref/#view.DecorationSet) from the given
  decorated range or ranges. If the ranges aren't already sorted,
  pass `true` for `sort` to make the library sort them for you.
  */
  static set(e, n = !1) {
    return Qt.of(e, n);
  }
  /**
  @internal
  */
  hasHeight() {
    return this.widget ? this.widget.estimatedHeight > -1 : !1;
  }
}
it.none = Qt.empty;
class L1 extends it {
  constructor(e) {
    let { start: n, end: i } = bH(e);
    super(n ? -1 : 5e8, i ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null;
  }
  eq(e) {
    var n, i;
    return this == e || e instanceof L1 && this.tagName == e.tagName && (this.class || ((n = this.attrs) === null || n === void 0 ? void 0 : n.class)) == (e.class || ((i = e.attrs) === null || i === void 0 ? void 0 : i.class)) && gE(this.attrs, e.attrs, "class");
  }
  range(e, n = e) {
    if (e >= n)
      throw new RangeError("Mark decorations may not be empty");
    return super.range(e, n);
  }
}
L1.prototype.point = !1;
class R1 extends it {
  constructor(e) {
    super(-2e8, -2e8, null, e);
  }
  eq(e) {
    return e instanceof R1 && this.spec.class == e.spec.class && gE(this.spec.attributes, e.spec.attributes);
  }
  range(e, n = e) {
    if (n != e)
      throw new RangeError("Line decoration ranges must be zero-length");
    return super.range(e, n);
  }
}
R1.prototype.mapMode = ur.TrackBefore;
R1.prototype.point = !0;
class Vu extends it {
  constructor(e, n, i, r, s, o) {
    super(n, i, s, e), this.block = r, this.isReplace = o, this.mapMode = r ? n <= 0 ? ur.TrackBefore : ur.TrackAfter : ur.TrackDel;
  }
  // Only relevant when this.block == true
  get type() {
    return this.startSide != this.endSide ? es.WidgetRange : this.startSide <= 0 ? es.WidgetBefore : es.WidgetAfter;
  }
  get heightRelevant() {
    return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
  }
  eq(e) {
    return e instanceof Vu && exe(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide;
  }
  range(e, n = e) {
    if (this.isReplace && (e > n || e == n && this.startSide > 0 && this.endSide <= 0))
      throw new RangeError("Invalid range for replacement decoration");
    if (!this.isReplace && n != e)
      throw new RangeError("Widget decorations can only have zero-length ranges");
    return super.range(e, n);
  }
}
Vu.prototype.point = !0;
function bH(t, e = !1) {
  let { inclusiveStart: n, inclusiveEnd: i } = t;
  return n == null && (n = t.inclusive), i == null && (i = t.inclusive), { start: n ?? e, end: i ?? e };
}
function exe(t, e) {
  return t == e || !!(t && e && t.compare(e));
}
function eC(t, e, n, i = 0) {
  let r = n.length - 1;
  r >= 0 && n[r] + i >= t ? n[r] = Math.max(n[r], e) : n.push(t, e);
}
class $g {
  constructor(e, n, i, r) {
    this.doc = e, this.pos = n, this.end = i, this.disallowBlockEffectsFor = r, this.content = [], this.curLine = null, this.breakAtStart = 0, this.pendingBuffer = 0, this.bufferMarks = [], this.atCursorPos = !0, this.openStart = -1, this.openEnd = -1, this.text = "", this.textOff = 0, this.cursor = e.iter(), this.skip = n;
  }
  posCovered() {
    if (this.content.length == 0)
      return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos;
    let e = this.content[this.content.length - 1];
    return !(e.breakAfter || e instanceof Pu && e.deco.endSide < 0);
  }
  getLine() {
    return this.curLine || (this.content.push(this.curLine = new Ai()), this.atCursorPos = !0), this.curLine;
  }
  flushBuffer(e = this.bufferMarks) {
    this.pendingBuffer && (this.curLine.append(fb(new Mh(-1), e), e.length), this.pendingBuffer = 0);
  }
  addBlockWidget(e) {
    this.flushBuffer(), this.curLine = null, this.content.push(e);
  }
  finish(e) {
    this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof Pu) && this.getLine();
  }
  buildText(e, n, i) {
    for (; e > 0; ) {
      if (this.textOff == this.text.length) {
        let { value: s, lineBreak: o, done: a } = this.cursor.next(this.skip);
        if (this.skip = 0, a)
          throw new Error("Ran out of text content when drawing inline views");
        if (o) {
          this.posCovered() || this.getLine(), this.content.length ? this.content[this.content.length - 1].breakAfter = 1 : this.breakAtStart = 1, this.flushBuffer(), this.curLine = null, this.atCursorPos = !0, e--;
          continue;
        } else
          this.text = s, this.textOff = 0;
      }
      let r = Math.min(
        this.text.length - this.textOff,
        e,
        512
        /* T.Chunk */
      );
      this.flushBuffer(n.slice(n.length - i)), this.getLine().append(fb(new Ol(this.text.slice(this.textOff, this.textOff + r)), n), i), this.atCursorPos = !0, this.textOff += r, e -= r, i = 0;
    }
  }
  span(e, n, i, r) {
    this.buildText(n - e, i, r), this.pos = n, this.openStart < 0 && (this.openStart = r);
  }
  point(e, n, i, r, s, o) {
    if (this.disallowBlockEffectsFor[o] && i instanceof Vu) {
      if (i.block)
        throw new RangeError("Block decorations may not be specified via plugins");
      if (n > this.doc.lineAt(this.pos).to)
        throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
    }
    let a = n - e;
    if (i instanceof Vu)
      if (i.block)
        i.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Pu(i.widget || new cA("div"), a, i));
      else {
        let l = Su.create(i.widget || new cA("span"), a, a ? 0 : i.startSide), u = this.atCursorPos && !l.isEditable && s <= r.length && (e < n || i.startSide > 0), f = !l.isEditable && (e < n || s > r.length || i.startSide <= 0), d = this.getLine();
        this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(r), u && (d.append(fb(new Mh(1), r), s), s = r.length + Math.max(0, s - r.length)), d.append(fb(l, r), s), this.atCursorPos = f, this.pendingBuffer = f ? e < n || s > r.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = r.slice());
      }
    else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(i);
    a && (this.textOff + a <= this.text.length ? this.textOff += a : (this.skip += a - (this.text.length - this.textOff), this.text = "", this.textOff = 0), this.pos = n), this.openStart < 0 && (this.openStart = s);
  }
  static build(e, n, i, r, s) {
    let o = new $g(e, n, i, s);
    return o.openEnd = Qt.spans(r, n, i, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
  }
}
function fb(t, e) {
  for (let n of e)
    t = new Sl(n, [t], t.length);
  return t;
}
class cA extends Ha {
  constructor(e) {
    super(), this.tag = e;
  }
  eq(e) {
    return e.tag == this.tag;
  }
  toDOM() {
    return document.createElement(this.tag);
  }
  updateDOM(e) {
    return e.nodeName.toLowerCase() == this.tag;
  }
  get isHidden() {
    return !0;
  }
}
var Tn = /* @__PURE__ */ function(t) {
  return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t;
}(Tn || (Tn = {}));
const yf = Tn.LTR, vE = Tn.RTL;
function yH(t) {
  let e = [];
  for (let n = 0; n < t.length; n++)
    e.push(1 << +t[n]);
  return e;
}
const txe = /* @__PURE__ */ yH("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), nxe = /* @__PURE__ */ yH("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), tC = /* @__PURE__ */ Object.create(null), ra = [];
for (let t of ["()", "[]", "{}"]) {
  let e = /* @__PURE__ */ t.charCodeAt(0), n = /* @__PURE__ */ t.charCodeAt(1);
  tC[e] = n, tC[n] = -e;
}
function wH(t) {
  return t <= 247 ? txe[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? nxe[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1;
}
const ixe = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
class Cu {
  /**
  The direction of this span.
  */
  get dir() {
    return this.level % 2 ? vE : yf;
  }
  /**
  @internal
  */
  constructor(e, n, i) {
    this.from = e, this.to = n, this.level = i;
  }
  /**
  @internal
  */
  side(e, n) {
    return this.dir == n == e ? this.to : this.from;
  }
  /**
  @internal
  */
  forward(e, n) {
    return e == (this.dir == n);
  }
  /**
  @internal
  */
  static find(e, n, i, r) {
    let s = -1;
    for (let o = 0; o < e.length; o++) {
      let a = e[o];
      if (a.from <= n && a.to >= n) {
        if (a.level == i)
          return o;
        (s < 0 || (r != 0 ? r < 0 ? a.from < n : a.to > n : e[s].level > a.level)) && (s = o);
      }
    }
    if (s < 0)
      throw new RangeError("Index out of range");
    return s;
  }
}
function kH(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++) {
    let i = t[n], r = e[n];
    if (i.from != r.from || i.to != r.to || i.direction != r.direction || !kH(i.inner, r.inner))
      return !1;
  }
  return !0;
}
const sn = [];
function rxe(t, e, n, i, r) {
  for (let s = 0; s <= i.length; s++) {
    let o = s ? i[s - 1].to : e, a = s < i.length ? i[s].from : n, l = s ? 256 : r;
    for (let u = o, f = l, d = l; u < a; u++) {
      let h = wH(t.charCodeAt(u));
      h == 512 ? h = f : h == 8 && d == 4 && (h = 16), sn[u] = h == 4 ? 2 : h, h & 7 && (d = h), f = h;
    }
    for (let u = o, f = l, d = l; u < a; u++) {
      let h = sn[u];
      if (h == 128)
        u < a - 1 && f == sn[u + 1] && f & 24 ? h = sn[u] = f : sn[u] = 256;
      else if (h == 64) {
        let m = u + 1;
        for (; m < a && sn[m] == 64; )
          m++;
        let g = u && f == 8 || m < n && sn[m] == 8 ? d == 1 ? 1 : 8 : 256;
        for (let w = u; w < m; w++)
          sn[w] = g;
        u = m - 1;
      } else h == 8 && d == 1 && (sn[u] = 1);
      f = h, h & 7 && (d = h);
    }
  }
}
function sxe(t, e, n, i, r) {
  let s = r == 1 ? 2 : 1;
  for (let o = 0, a = 0, l = 0; o <= i.length; o++) {
    let u = o ? i[o - 1].to : e, f = o < i.length ? i[o].from : n;
    for (let d = u, h, m, g; d < f; d++)
      if (m = tC[h = t.charCodeAt(d)])
        if (m < 0) {
          for (let w = a - 3; w >= 0; w -= 3)
            if (ra[w + 1] == -m) {
              let x = ra[w + 2], _ = x & 2 ? r : x & 4 ? x & 1 ? s : r : 0;
              _ && (sn[d] = sn[ra[w]] = _), a = w;
              break;
            }
        } else {
          if (ra.length == 189)
            break;
          ra[a++] = d, ra[a++] = h, ra[a++] = l;
        }
      else if ((g = sn[d]) == 2 || g == 1) {
        let w = g == r;
        l = w ? 0 : 1;
        for (let x = a - 3; x >= 0; x -= 3) {
          let _ = ra[x + 2];
          if (_ & 2)
            break;
          if (w)
            ra[x + 2] |= 2;
          else {
            if (_ & 4)
              break;
            ra[x + 2] |= 4;
          }
        }
      }
  }
}
function oxe(t, e, n, i) {
  for (let r = 0, s = i; r <= n.length; r++) {
    let o = r ? n[r - 1].to : t, a = r < n.length ? n[r].from : e;
    for (let l = o; l < a; ) {
      let u = sn[l];
      if (u == 256) {
        let f = l + 1;
        for (; ; )
          if (f == a) {
            if (r == n.length)
              break;
            f = n[r++].to, a = r < n.length ? n[r].from : e;
          } else if (sn[f] == 256)
            f++;
          else
            break;
        let d = s == 1, h = (f < e ? sn[f] : i) == 1, m = d == h ? d ? 1 : 2 : i;
        for (let g = f, w = r, x = w ? n[w - 1].to : t; g > l; )
          g == x && (g = n[--w].from, x = w ? n[w - 1].to : t), sn[--g] = m;
        l = f;
      } else
        s = u, l++;
    }
  }
}
function nC(t, e, n, i, r, s, o) {
  let a = i % 2 ? 2 : 1;
  if (i % 2 == r % 2)
    for (let l = e, u = 0; l < n; ) {
      let f = !0, d = !1;
      if (u == s.length || l < s[u].from) {
        let w = sn[l];
        w != a && (f = !1, d = w == 16);
      }
      let h = !f && a == 1 ? [] : null, m = f ? i : i + 1, g = l;
      e: for (; ; )
        if (u < s.length && g == s[u].from) {
          if (d)
            break e;
          let w = s[u];
          if (!f)
            for (let x = w.to, _ = u + 1; ; ) {
              if (x == n)
                break e;
              if (_ < s.length && s[_].from == x)
                x = s[_++].to;
              else {
                if (sn[x] == a)
                  break e;
                break;
              }
            }
          if (u++, h)
            h.push(w);
          else {
            w.from > l && o.push(new Cu(l, w.from, m));
            let x = w.direction == yf != !(m % 2);
            iC(t, x ? i + 1 : i, r, w.inner, w.from, w.to, o), l = w.to;
          }
          g = w.to;
        } else {
          if (g == n || (f ? sn[g] != a : sn[g] == a))
            break;
          g++;
        }
      h ? nC(t, l, g, i + 1, r, h, o) : l < g && o.push(new Cu(l, g, m)), l = g;
    }
  else
    for (let l = n, u = s.length; l > e; ) {
      let f = !0, d = !1;
      if (!u || l > s[u - 1].to) {
        let w = sn[l - 1];
        w != a && (f = !1, d = w == 16);
      }
      let h = !f && a == 1 ? [] : null, m = f ? i : i + 1, g = l;
      e: for (; ; )
        if (u && g == s[u - 1].to) {
          if (d)
            break e;
          let w = s[--u];
          if (!f)
            for (let x = w.from, _ = u; ; ) {
              if (x == e)
                break e;
              if (_ && s[_ - 1].to == x)
                x = s[--_].from;
              else {
                if (sn[x - 1] == a)
                  break e;
                break;
              }
            }
          if (h)
            h.push(w);
          else {
            w.to < l && o.push(new Cu(w.to, l, m));
            let x = w.direction == yf != !(m % 2);
            iC(t, x ? i + 1 : i, r, w.inner, w.from, w.to, o), l = w.from;
          }
          g = w.from;
        } else {
          if (g == e || (f ? sn[g - 1] != a : sn[g - 1] == a))
            break;
          g--;
        }
      h ? nC(t, g, l, i + 1, r, h, o) : g < l && o.push(new Cu(g, l, m)), l = g;
    }
}
function iC(t, e, n, i, r, s, o) {
  let a = e % 2 ? 2 : 1;
  rxe(t, r, s, i, a), sxe(t, r, s, i, a), oxe(r, s, i, a), nC(t, r, s, e, n, i, o);
}
function axe(t, e, n) {
  if (!t)
    return [new Cu(0, 0, e == vE ? 1 : 0)];
  if (e == yf && !n.length && !ixe.test(t))
    return xH(t.length);
  if (n.length)
    for (; t.length > sn.length; )
      sn[sn.length] = 256;
  let i = [], r = e == yf ? 0 : 1;
  return iC(t, r, r, n, 0, t.length, i), i;
}
function xH(t) {
  return [new Cu(0, t, 0)];
}
let _H = "";
function lxe(t, e, n, i, r) {
  var s;
  let o = i.head - t.from, a = Cu.find(e, o, (s = i.bidiLevel) !== null && s !== void 0 ? s : -1, i.assoc), l = e[a], u = l.side(r, n);
  if (o == u) {
    let h = a += r ? 1 : -1;
    if (h < 0 || h >= e.length)
      return null;
    l = e[a = h], o = l.side(!r, n), u = l.side(r, n);
  }
  let f = dr(t.text, o, l.forward(r, n));
  (f < l.from || f > l.to) && (f = u), _H = t.text.slice(Math.min(o, f), Math.max(o, f));
  let d = a == (r ? e.length - 1 : 0) ? null : e[a + (r ? 1 : -1)];
  return d && f == u && d.level + (r ? 0 : 1) < l.level ? he.cursor(d.side(!r, n) + t.from, d.forward(r, n) ? 1 : -1, d.level) : he.cursor(f + t.from, l.forward(r, n) ? -1 : 1, l.level);
}
function uxe(t, e, n) {
  for (let i = e; i < n; i++) {
    let r = wH(t.charCodeAt(i));
    if (r == 1)
      return yf;
    if (r == 2 || r == 4)
      return vE;
  }
  return yf;
}
const OH = /* @__PURE__ */ Qe.define(), SH = /* @__PURE__ */ Qe.define(), CH = /* @__PURE__ */ Qe.define(), EH = /* @__PURE__ */ Qe.define(), rC = /* @__PURE__ */ Qe.define(), TH = /* @__PURE__ */ Qe.define(), $H = /* @__PURE__ */ Qe.define(), MH = /* @__PURE__ */ Qe.define({
  combine: (t) => t.some((e) => e)
}), NH = /* @__PURE__ */ Qe.define({
  combine: (t) => t.some((e) => e)
});
class mh {
  constructor(e, n = "nearest", i = "nearest", r = 5, s = 5, o = !1) {
    this.range = e, this.y = n, this.x = i, this.yMargin = r, this.xMargin = s, this.isSnapshot = o;
  }
  map(e) {
    return e.empty ? this : new mh(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  }
  clip(e) {
    return this.range.to <= e.doc.length ? this : new mh(he.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  }
}
const db = /* @__PURE__ */ Ot.define({ map: (t, e) => t.map(e) });
function co(t, e, n) {
  let i = t.facet(EH);
  i.length ? i[0](e) : window.onerror ? window.onerror(String(e), n, void 0, void 0, e) : n ? console.error(n + ":", e) : console.error(e);
}
const m2 = /* @__PURE__ */ Qe.define({ combine: (t) => t.length ? t[0] : !0 });
let cxe = 0;
const ig = /* @__PURE__ */ Qe.define();
class gi {
  constructor(e, n, i, r, s) {
    this.id = e, this.create = n, this.domEventHandlers = i, this.domEventObservers = r, this.extension = s(this);
  }
  /**
  Define a plugin from a constructor function that creates the
  plugin's value, given an editor view.
  */
  static define(e, n) {
    const { eventHandlers: i, eventObservers: r, provide: s, decorations: o } = n || {};
    return new gi(cxe++, e, i, r, (a) => {
      let l = [ig.of(a)];
      return o && l.push(c0.of((u) => {
        let f = u.plugin(a);
        return f ? o(f) : it.none;
      })), s && l.push(s(a)), l;
    });
  }
  /**
  Create a plugin for a class whose constructor takes a single
  editor view as argument.
  */
  static fromClass(e, n) {
    return gi.define((i) => new e(i), n);
  }
}
class V3 {
  constructor(e) {
    this.spec = e, this.mustUpdate = null, this.value = null;
  }
  update(e) {
    if (this.value) {
      if (this.mustUpdate) {
        let n = this.mustUpdate;
        if (this.mustUpdate = null, this.value.update)
          try {
            this.value.update(n);
          } catch (i) {
            if (co(n.state, i, "CodeMirror plugin crashed"), this.value.destroy)
              try {
                this.value.destroy();
              } catch {
              }
            this.deactivate();
          }
      }
    } else if (this.spec)
      try {
        this.value = this.spec.create(e);
      } catch (n) {
        co(e.state, n, "CodeMirror plugin crashed"), this.deactivate();
      }
    return this;
  }
  destroy(e) {
    var n;
    if (!((n = this.value) === null || n === void 0) && n.destroy)
      try {
        this.value.destroy();
      } catch (i) {
        co(e.state, i, "CodeMirror plugin crashed");
      }
  }
  deactivate() {
    this.spec = this.value = null;
  }
}
const AH = /* @__PURE__ */ Qe.define(), bE = /* @__PURE__ */ Qe.define(), c0 = /* @__PURE__ */ Qe.define(), DH = /* @__PURE__ */ Qe.define(), yE = /* @__PURE__ */ Qe.define(), PH = /* @__PURE__ */ Qe.define();
function fA(t, e) {
  let n = t.state.facet(PH);
  if (!n.length)
    return n;
  let i = n.map((s) => s instanceof Function ? s(t) : s), r = [];
  return Qt.spans(i, e.from, e.to, {
    point() {
    },
    span(s, o, a, l) {
      let u = s - e.from, f = o - e.from, d = r;
      for (let h = a.length - 1; h >= 0; h--, l--) {
        let m = a[h].spec.bidiIsolate, g;
        if (m == null && (m = uxe(e.text, u, f)), l > 0 && d.length && (g = d[d.length - 1]).to == u && g.direction == m)
          g.to = f, d = g.inner;
        else {
          let w = { from: u, to: f, direction: m, inner: [] };
          d.push(w), d = w.inner;
        }
      }
    }
  }), r;
}
const IH = /* @__PURE__ */ Qe.define();
function LH(t) {
  let e = 0, n = 0, i = 0, r = 0;
  for (let s of t.state.facet(IH)) {
    let o = s(t);
    o && (o.left != null && (e = Math.max(e, o.left)), o.right != null && (n = Math.max(n, o.right)), o.top != null && (i = Math.max(i, o.top)), o.bottom != null && (r = Math.max(r, o.bottom)));
  }
  return { left: e, right: n, top: i, bottom: r };
}
const rg = /* @__PURE__ */ Qe.define();
class fo {
  constructor(e, n, i, r) {
    this.fromA = e, this.toA = n, this.fromB = i, this.toB = r;
  }
  join(e) {
    return new fo(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
  }
  addToSet(e) {
    let n = e.length, i = this;
    for (; n > 0; n--) {
      let r = e[n - 1];
      if (!(r.fromA > i.toA)) {
        if (r.toA < i.fromA)
          break;
        i = i.join(r), e.splice(n - 1, 1);
      }
    }
    return e.splice(n, 0, i), e;
  }
  static extendWithRanges(e, n) {
    if (n.length == 0)
      return e;
    let i = [];
    for (let r = 0, s = 0, o = 0, a = 0; ; r++) {
      let l = r == e.length ? null : e[r], u = o - a, f = l ? l.fromB : 1e9;
      for (; s < n.length && n[s] < f; ) {
        let d = n[s], h = n[s + 1], m = Math.max(a, d), g = Math.min(f, h);
        if (m <= g && new fo(m + u, g + u, m, g).addToSet(i), h > f)
          break;
        s += 2;
      }
      if (!l)
        return i;
      new fo(l.fromA, l.toA, l.fromB, l.toB).addToSet(i), o = l.toA, a = l.toB;
    }
  }
}
class Ow {
  constructor(e, n, i) {
    this.view = e, this.state = n, this.transactions = i, this.flags = 0, this.startState = e.state, this.changes = Ii.empty(this.startState.doc.length);
    for (let s of i)
      this.changes = this.changes.compose(s.changes);
    let r = [];
    this.changes.iterChangedRanges((s, o, a, l) => r.push(new fo(s, o, a, l))), this.changedRanges = r;
  }
  /**
  @internal
  */
  static create(e, n, i) {
    return new Ow(e, n, i);
  }
  /**
  Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
  [visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
  update.
  */
  get viewportChanged() {
    return (this.flags & 4) > 0;
  }
  /**
  Indicates whether the height of a block element in the editor
  changed in this update.
  */
  get heightChanged() {
    return (this.flags & 2) > 0;
  }
  /**
  Returns true when the document was modified or the size of the
  editor, or elements within the editor, changed.
  */
  get geometryChanged() {
    return this.docChanged || (this.flags & 10) > 0;
  }
  /**
  True when this update indicates a focus change.
  */
  get focusChanged() {
    return (this.flags & 1) > 0;
  }
  /**
  Whether the document changed in this update.
  */
  get docChanged() {
    return !this.changes.empty;
  }
  /**
  Whether the selection was explicitly set in this update.
  */
  get selectionSet() {
    return this.transactions.some((e) => e.selection);
  }
  /**
  @internal
  */
  get empty() {
    return this.flags == 0 && this.transactions.length == 0;
  }
}
class dA extends En {
  get length() {
    return this.view.state.doc.length;
  }
  constructor(e) {
    super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Ai()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new fo(0, 0, 0, e.state.doc.length)], 0, null);
  }
  // Update the document view to a given state.
  update(e) {
    var n;
    let i = e.changedRanges;
    this.minWidth > 0 && i.length && (i.every(({ fromA: u, toA: f }) => f < this.minWidthFrom || u > this.minWidthTo) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0);
    let r = -1;
    this.view.inputState.composing >= 0 && (!((n = this.domChanged) === null || n === void 0) && n.newSel ? r = this.domChanged.newSel.head : !vxe(e.changes, this.hasComposition) && !e.selectionSet && (r = e.state.selection.main.head));
    let s = r > -1 ? dxe(this.view, e.changes, r) : null;
    if (this.domChanged = null, this.hasComposition) {
      this.markedForComposition.clear();
      let { from: u, to: f } = this.hasComposition;
      i = new fo(u, f, e.changes.mapPos(u, -1), e.changes.mapPos(f, 1)).addToSet(i.slice());
    }
    this.hasComposition = s ? { from: s.range.fromB, to: s.range.toB } : null, (qe.ie || qe.chrome) && !s && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
    let o = this.decorations, a = this.updateDeco(), l = mxe(o, a, e.changes);
    return i = fo.extendWithRanges(i, l), !(this.flags & 7) && i.length == 0 ? !1 : (this.updateInner(i, e.startState.doc.length, s), e.transactions.length && (this.lastUpdate = Date.now()), !0);
  }
  // Used by update and the constructor do perform the actual DOM
  // update
  updateInner(e, n, i) {
    this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, n, i);
    let { observer: r } = this.view;
    r.ignore(() => {
      this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
      let o = qe.chrome || qe.ios ? { node: r.selectionRange.focusNode, written: !1 } : void 0;
      this.sync(this.view, o), this.flags &= -8, o && (o.written || r.selectionRange.focusNode != o.node) && (this.forceSelection = !0), this.dom.style.height = "";
    }), this.markedForComposition.forEach(
      (o) => o.flags &= -9
      /* ViewFlag.Composition */
    );
    let s = [];
    if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
      for (let o of this.children)
        o instanceof Pu && o.widget instanceof hA && s.push(o.dom);
    r.updateGaps(s);
  }
  updateChildren(e, n, i) {
    let r = i ? i.range.addToSet(e.slice()) : e, s = this.childCursor(n);
    for (let o = r.length - 1; ; o--) {
      let a = o >= 0 ? r[o] : null;
      if (!a)
        break;
      let { fromA: l, toA: u, fromB: f, toB: d } = a, h, m, g, w;
      if (i && i.range.fromB < d && i.range.toB > f) {
        let E = $g.build(this.view.state.doc, f, i.range.fromB, this.decorations, this.dynamicDecorationMap), M = $g.build(this.view.state.doc, i.range.toB, d, this.decorations, this.dynamicDecorationMap);
        m = E.breakAtStart, g = E.openStart, w = M.openEnd;
        let $ = this.compositionView(i);
        M.breakAtStart ? $.breakAfter = 1 : M.content.length && $.merge($.length, $.length, M.content[0], !1, M.openStart, 0) && ($.breakAfter = M.content[0].breakAfter, M.content.shift()), E.content.length && $.merge(0, 0, E.content[E.content.length - 1], !0, 0, E.openEnd) && E.content.pop(), h = E.content.concat($).concat(M.content);
      } else
        ({ content: h, breakAtStart: m, openStart: g, openEnd: w } = $g.build(this.view.state.doc, f, d, this.decorations, this.dynamicDecorationMap));
      let { i: x, off: _ } = s.findPos(u, 1), { i: S, off: C } = s.findPos(l, -1);
      fH(this, S, C, x, _, h, m, g, w);
    }
    i && this.fixCompositionDOM(i);
  }
  compositionView(e) {
    let n = new Ol(e.text.nodeValue);
    n.flags |= 8;
    for (let { deco: r } of e.marks)
      n = new Sl(r, [n], n.length);
    let i = new Ai();
    return i.append(n, 0), i;
  }
  fixCompositionDOM(e) {
    let n = (s, o) => {
      o.flags |= 8 | (o.children.some(
        (l) => l.flags & 7
        /* ViewFlag.Dirty */
      ) ? 1 : 0), this.markedForComposition.add(o);
      let a = En.get(s);
      a && a != o && (a.dom = null), o.setDOM(s);
    }, i = this.childPos(e.range.fromB, 1), r = this.children[i.i];
    n(e.line, r);
    for (let s = e.marks.length - 1; s >= -1; s--)
      i = r.childPos(i.off, 1), r = r.children[i.i], n(s >= 0 ? e.marks[s].node : e.text, r);
  }
  // Sync the DOM selection to this.state.selection
  updateSelection(e = !1, n = !1) {
    (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
    let i = this.view.root.activeElement, r = i == this.dom, s = !r && ly(this.dom, this.view.observer.selectionRange) && !(i && this.dom.contains(i));
    if (!(r || n || s))
      return;
    let o = this.forceSelection;
    this.forceSelection = !1;
    let a = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(a.anchor)), u = a.empty ? l : this.moveToLine(this.domAtPos(a.head));
    if (qe.gecko && a.empty && !this.hasComposition && fxe(l)) {
      let d = document.createTextNode("");
      this.view.observer.ignore(() => l.node.insertBefore(d, l.node.childNodes[l.offset] || null)), l = u = new Mr(d, 0), o = !0;
    }
    let f = this.view.observer.selectionRange;
    (o || !f.focusNode || (!Tg(l.node, l.offset, f.anchorNode, f.anchorOffset) || !Tg(u.node, u.offset, f.focusNode, f.focusOffset)) && !this.suppressWidgetCursorChange(f, a)) && (this.view.observer.ignore(() => {
      qe.android && qe.chrome && this.dom.contains(f.focusNode) && gxe(f.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 }));
      let d = _w(this.view.root);
      if (d) if (a.empty) {
        if (qe.gecko) {
          let h = hxe(l.node, l.offset);
          if (h && h != 3) {
            let m = jH(l.node, l.offset, h == 1 ? 1 : -1);
            m && (l = new Mr(m.node, m.offset));
          }
        }
        d.collapse(l.node, l.offset), a.bidiLevel != null && d.caretBidiLevel !== void 0 && (d.caretBidiLevel = a.bidiLevel);
      } else if (d.extend) {
        d.collapse(l.node, l.offset);
        try {
          d.extend(u.node, u.offset);
        } catch {
        }
      } else {
        let h = document.createRange();
        a.anchor > a.head && ([l, u] = [u, l]), h.setEnd(u.node, u.offset), h.setStart(l.node, l.offset), d.removeAllRanges(), d.addRange(h);
      }
      s && this.view.root.activeElement == this.dom && (this.dom.blur(), i && i.focus());
    }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new Mr(f.anchorNode, f.anchorOffset), this.impreciseHead = u.precise ? null : new Mr(f.focusNode, f.focusOffset);
  }
  // If a zero-length widget is inserted next to the cursor during
  // composition, avoid moving it across it and disrupting the
  // composition.
  suppressWidgetCursorChange(e, n) {
    return this.hasComposition && n.empty && Tg(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
  }
  enforceCursorAssoc() {
    if (this.hasComposition)
      return;
    let { view: e } = this, n = e.state.selection.main, i = _w(e.root), { anchorNode: r, anchorOffset: s } = e.observer.selectionRange;
    if (!i || !n.empty || !n.assoc || !i.modify)
      return;
    let o = Ai.find(this, n.head);
    if (!o)
      return;
    let a = o.posAtStart;
    if (n.head == a || n.head == a + o.length)
      return;
    let l = this.coordsAt(n.head, -1), u = this.coordsAt(n.head, 1);
    if (!l || !u || l.bottom > u.top)
      return;
    let f = this.domAtPos(n.head + n.assoc);
    i.collapse(f.node, f.offset), i.modify("move", n.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange();
    let d = e.observer.selectionRange;
    e.docView.posFromDOM(d.anchorNode, d.anchorOffset) != n.from && i.collapse(r, s);
  }
  // If a position is in/near a block widget, move it to a nearby text
  // line, since we don't want the cursor inside a block widget.
  moveToLine(e) {
    let n = this.dom, i;
    if (e.node != n)
      return e;
    for (let r = e.offset; !i && r < n.childNodes.length; r++) {
      let s = En.get(n.childNodes[r]);
      s instanceof Ai && (i = s.domAtPos(0));
    }
    for (let r = e.offset - 1; !i && r >= 0; r--) {
      let s = En.get(n.childNodes[r]);
      s instanceof Ai && (i = s.domAtPos(s.length));
    }
    return i ? new Mr(i.node, i.offset, !0) : e;
  }
  nearest(e) {
    for (let n = e; n; ) {
      let i = En.get(n);
      if (i && i.rootView == this)
        return i;
      n = n.parentNode;
    }
    return null;
  }
  posFromDOM(e, n) {
    let i = this.nearest(e);
    if (!i)
      throw new RangeError("Trying to find position for a DOM position outside of the document");
    return i.localPosFromDOM(e, n) + i.posAtStart;
  }
  domAtPos(e) {
    let { i: n, off: i } = this.childCursor().findPos(e, -1);
    for (; n < this.children.length - 1; ) {
      let r = this.children[n];
      if (i < r.length || r instanceof Ai)
        break;
      n++, i = 0;
    }
    return this.children[n].domAtPos(i);
  }
  coordsAt(e, n) {
    let i = null, r = 0;
    for (let s = this.length, o = this.children.length - 1; o >= 0; o--) {
      let a = this.children[o], l = s - a.breakAfter, u = l - a.length;
      if (l < e)
        break;
      u <= e && (u < e || a.covers(-1)) && (l > e || a.covers(1)) && (!i || a instanceof Ai && !(i instanceof Ai && n >= 0)) && (i = a, r = u), s = u;
    }
    return i ? i.coordsAt(e - r, n) : null;
  }
  coordsForChar(e) {
    let { i: n, off: i } = this.childPos(e, 1), r = this.children[n];
    if (!(r instanceof Ai))
      return null;
    for (; r.children.length; ) {
      let { i: a, off: l } = r.childPos(i, 1);
      for (; ; a++) {
        if (a == r.children.length)
          return null;
        if ((r = r.children[a]).length)
          break;
      }
      i = l;
    }
    if (!(r instanceof Ol))
      return null;
    let s = dr(r.text, i);
    if (s == i)
      return null;
    let o = bf(r.dom, i, s).getClientRects();
    for (let a = 0; a < o.length; a++) {
      let l = o[a];
      if (a == o.length - 1 || l.top < l.bottom && l.left < l.right)
        return l;
    }
    return null;
  }
  measureVisibleLineHeights(e) {
    let n = [], { from: i, to: r } = e, s = this.view.contentDOM.clientWidth, o = s > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, a = -1, l = this.view.textDirection == Tn.LTR;
    for (let u = 0, f = 0; f < this.children.length; f++) {
      let d = this.children[f], h = u + d.length;
      if (h > r)
        break;
      if (u >= i) {
        let m = d.dom.getBoundingClientRect();
        if (n.push(m.height), o) {
          let g = d.dom.lastChild, w = g ? $h(g) : [];
          if (w.length) {
            let x = w[w.length - 1], _ = l ? x.right - m.left : m.right - x.left;
            _ > a && (a = _, this.minWidth = s, this.minWidthFrom = u, this.minWidthTo = h);
          }
        }
      }
      u = h + d.breakAfter;
    }
    return n;
  }
  textDirectionAt(e) {
    let { i: n } = this.childPos(e, 1);
    return getComputedStyle(this.children[n].dom).direction == "rtl" ? Tn.RTL : Tn.LTR;
  }
  measureTextSize() {
    for (let s of this.children)
      if (s instanceof Ai) {
        let o = s.measureTextSize();
        if (o)
          return o;
      }
    let e = document.createElement("div"), n, i, r;
    return e.className = "cm-line", e.style.width = "99999px", e.style.position = "absolute", e.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(() => {
      this.dom.appendChild(e);
      let s = $h(e.firstChild)[0];
      n = e.getBoundingClientRect().height, i = s ? s.width / 27 : 7, r = s ? s.height : n, e.remove();
    }), { lineHeight: n, charWidth: i, textHeight: r };
  }
  childCursor(e = this.length) {
    let n = this.children.length;
    return n && (e -= this.children[--n].length), new cH(this.children, e, n);
  }
  computeBlockGapDeco() {
    let e = [], n = this.view.viewState;
    for (let i = 0, r = 0; ; r++) {
      let s = r == n.viewports.length ? null : n.viewports[r], o = s ? s.from - 1 : this.length;
      if (o > i) {
        let a = (n.lineBlockAt(o).bottom - n.lineBlockAt(i).top) / this.view.scaleY;
        e.push(it.replace({
          widget: new hA(a),
          block: !0,
          inclusive: !0,
          isBlockGap: !0
        }).range(i, o));
      }
      if (!s)
        break;
      i = s.to + 1;
    }
    return it.set(e);
  }
  updateDeco() {
    let e = this.view.state.facet(c0).map((r, s) => (this.dynamicDecorationMap[s] = typeof r == "function") ? r(this.view) : r), n = !1, i = this.view.state.facet(DH).map((r, s) => {
      let o = typeof r == "function";
      return o && (n = !0), o ? r(this.view) : r;
    });
    i.length && (this.dynamicDecorationMap[e.length] = n, e.push(Qt.join(i)));
    for (let r = e.length; r < e.length + 3; r++)
      this.dynamicDecorationMap[r] = !1;
    return this.decorations = [
      ...e,
      this.computeBlockGapDeco(),
      this.view.viewState.lineGapDeco
    ];
  }
  scrollIntoView(e) {
    if (e.isSnapshot) {
      let u = this.view.viewState.lineBlockAt(e.range.head);
      this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin;
      return;
    }
    let { range: n } = e, i = this.coordsAt(n.head, n.empty ? n.assoc : n.head > n.anchor ? -1 : 1), r;
    if (!i)
      return;
    !n.empty && (r = this.coordsAt(n.anchor, n.anchor > n.head ? -1 : 1)) && (i = {
      left: Math.min(i.left, r.left),
      top: Math.min(i.top, r.top),
      right: Math.max(i.right, r.right),
      bottom: Math.max(i.bottom, r.bottom)
    });
    let s = LH(this.view), o = {
      left: i.left - s.left,
      top: i.top - s.top,
      right: i.right + s.right,
      bottom: i.bottom + s.bottom
    }, { offsetWidth: a, offsetHeight: l } = this.view.scrollDOM;
    Q2e(this.view.scrollDOM, o, n.head < n.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, a), -a), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == Tn.LTR);
  }
}
function fxe(t) {
  return t.node.nodeType == 1 && t.node.firstChild && (t.offset == 0 || t.node.childNodes[t.offset - 1].contentEditable == "false") && (t.offset == t.node.childNodes.length || t.node.childNodes[t.offset].contentEditable == "false");
}
class hA extends Ha {
  constructor(e) {
    super(), this.height = e;
  }
  toDOM() {
    let e = document.createElement("div");
    return e.className = "cm-gap", this.updateDOM(e), e;
  }
  eq(e) {
    return e.height == this.height;
  }
  updateDOM(e) {
    return e.style.height = this.height + "px", !0;
  }
  get editable() {
    return !0;
  }
  get estimatedHeight() {
    return this.height;
  }
}
function RH(t, e) {
  let n = t.observer.selectionRange, i = n.focusNode && jH(n.focusNode, n.focusOffset, 0);
  if (!i)
    return null;
  let r = e - i.offset;
  return { from: r, to: r + i.node.nodeValue.length, node: i.node };
}
function dxe(t, e, n) {
  let i = RH(t, n);
  if (!i)
    return null;
  let { node: r, from: s, to: o } = i, a = r.nodeValue;
  if (/[\n\r]/.test(a) || t.state.doc.sliceString(i.from, i.to) != a)
    return null;
  let l = e.invertedDesc, u = new fo(l.mapPos(s), l.mapPos(o), s, o), f = [];
  for (let d = r.parentNode; ; d = d.parentNode) {
    let h = En.get(d);
    if (h instanceof Sl)
      f.push({ node: d, deco: h.mark });
    else {
      if (h instanceof Ai || d.nodeName == "DIV" && d.parentNode == t.contentDOM)
        return { range: u, text: r, marks: f, line: d };
      if (d != t.contentDOM)
        f.push({ node: d, deco: new L1({
          inclusive: !0,
          attributes: J2e(d),
          tagName: d.tagName.toLowerCase()
        }) });
      else
        return null;
    }
  }
}
function jH(t, e, n) {
  if (n <= 0)
    for (let i = t, r = e; ; ) {
      if (i.nodeType == 3)
        return { node: i, offset: r };
      if (i.nodeType == 1 && r > 0)
        i = i.childNodes[r - 1], r = _l(i);
      else
        break;
    }
  if (n >= 0)
    for (let i = t, r = e; ; ) {
      if (i.nodeType == 3)
        return { node: i, offset: r };
      if (i.nodeType == 1 && r < i.childNodes.length && n >= 0)
        i = i.childNodes[r], r = 0;
      else
        break;
    }
  return null;
}
function hxe(t, e) {
  return t.nodeType != 1 ? 0 : (e && t.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < t.childNodes.length && t.childNodes[e].contentEditable == "false" ? 2 : 0);
}
let pxe = class {
  constructor() {
    this.changes = [];
  }
  compareRange(e, n) {
    eC(e, n, this.changes);
  }
  comparePoint(e, n) {
    eC(e, n, this.changes);
  }
};
function mxe(t, e, n) {
  let i = new pxe();
  return Qt.compare(t, e, n, i), i.changes;
}
function gxe(t, e) {
  for (let n = t; n && n != e; n = n.assignedSlot || n.parentNode)
    if (n.nodeType == 1 && n.contentEditable == "false")
      return !0;
  return !1;
}
function vxe(t, e) {
  let n = !1;
  return e && t.iterChangedRanges((i, r) => {
    i < e.to && r > e.from && (n = !0);
  }), n;
}
function bxe(t, e, n = 1) {
  let i = t.charCategorizer(e), r = t.doc.lineAt(e), s = e - r.from;
  if (r.length == 0)
    return he.cursor(e);
  s == 0 ? n = 1 : s == r.length && (n = -1);
  let o = s, a = s;
  n < 0 ? o = dr(r.text, s, !1) : a = dr(r.text, s);
  let l = i(r.text.slice(o, a));
  for (; o > 0; ) {
    let u = dr(r.text, o, !1);
    if (i(r.text.slice(u, o)) != l)
      break;
    o = u;
  }
  for (; a < r.length; ) {
    let u = dr(r.text, a);
    if (i(r.text.slice(a, u)) != l)
      break;
    a = u;
  }
  return he.range(o + r.from, a + r.from);
}
function yxe(t, e) {
  return e.left > t ? e.left - t : Math.max(0, t - e.right);
}
function wxe(t, e) {
  return e.top > t ? e.top - t : Math.max(0, t - e.bottom);
}
function X3(t, e) {
  return t.top < e.bottom - 1 && t.bottom > e.top + 1;
}
function pA(t, e) {
  return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t;
}
function mA(t, e) {
  return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t;
}
function sC(t, e, n) {
  let i, r, s, o, a = !1, l, u, f, d;
  for (let g = t.firstChild; g; g = g.nextSibling) {
    let w = $h(g);
    for (let x = 0; x < w.length; x++) {
      let _ = w[x];
      r && X3(r, _) && (_ = pA(mA(_, r.bottom), r.top));
      let S = yxe(e, _), C = wxe(n, _);
      if (S == 0 && C == 0)
        return g.nodeType == 3 ? gA(g, e, n) : sC(g, e, n);
      if (!i || o > C || o == C && s > S) {
        i = g, r = _, s = S, o = C;
        let E = C ? n < _.top ? -1 : 1 : S ? e < _.left ? -1 : 1 : 0;
        a = !E || (E > 0 ? x < w.length - 1 : x > 0);
      }
      S == 0 ? n > _.bottom && (!f || f.bottom < _.bottom) ? (l = g, f = _) : n < _.top && (!d || d.top > _.top) && (u = g, d = _) : f && X3(f, _) ? f = mA(f, _.bottom) : d && X3(d, _) && (d = pA(d, _.top));
    }
  }
  if (f && f.bottom >= n ? (i = l, r = f) : d && d.top <= n && (i = u, r = d), !i)
    return { node: t, offset: 0 };
  let h = Math.max(r.left, Math.min(r.right, e));
  if (i.nodeType == 3)
    return gA(i, h, n);
  if (a && i.contentEditable != "false")
    return sC(i, h, n);
  let m = Array.prototype.indexOf.call(t.childNodes, i) + (e >= (r.left + r.right) / 2 ? 1 : 0);
  return { node: t, offset: m };
}
function gA(t, e, n) {
  let i = t.nodeValue.length, r = -1, s = 1e9, o = 0;
  for (let a = 0; a < i; a++) {
    let l = bf(t, a, a + 1).getClientRects();
    for (let u = 0; u < l.length; u++) {
      let f = l[u];
      if (f.top == f.bottom)
        continue;
      o || (o = e - f.left);
      let d = (f.top > n ? f.top - n : n - f.bottom) - 1;
      if (f.left - 1 <= e && f.right + 1 >= e && d < s) {
        let h = e >= (f.left + f.right) / 2, m = h;
        if ((qe.chrome || qe.gecko) && bf(t, a).getBoundingClientRect().left == f.right && (m = !h), d <= 0)
          return { node: t, offset: a + (m ? 1 : 0) };
        r = a + (m ? 1 : 0), s = d;
      }
    }
  }
  return { node: t, offset: r > -1 ? r : o > 0 ? t.nodeValue.length : 0 };
}
function FH(t, e, n, i = -1) {
  var r, s;
  let o = t.contentDOM.getBoundingClientRect(), a = o.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: f, y: d } = e, h = d - a;
  if (h < 0)
    return 0;
  if (h > u)
    return t.state.doc.length;
  for (let E = t.viewState.heightOracle.textHeight / 2, M = !1; l = t.elementAtHeight(h), l.type != es.Text; )
    for (; h = i > 0 ? l.bottom + E : l.top - E, !(h >= 0 && h <= u); ) {
      if (M)
        return n ? null : 0;
      M = !0, i = -i;
    }
  d = a + h;
  let m = l.from;
  if (m < t.viewport.from)
    return t.viewport.from == 0 ? 0 : n ? null : vA(t, o, l, f, d);
  if (m > t.viewport.to)
    return t.viewport.to == t.state.doc.length ? t.state.doc.length : n ? null : vA(t, o, l, f, d);
  let g = t.dom.ownerDocument, w = t.root.elementFromPoint ? t.root : g, x = w.elementFromPoint(f, d);
  x && !t.contentDOM.contains(x) && (x = null), x || (f = Math.max(o.left + 1, Math.min(o.right - 1, f)), x = w.elementFromPoint(f, d), x && !t.contentDOM.contains(x) && (x = null));
  let _, S = -1;
  if (x && ((r = t.docView.nearest(x)) === null || r === void 0 ? void 0 : r.isEditable) != !1) {
    if (g.caretPositionFromPoint) {
      let E = g.caretPositionFromPoint(f, d);
      E && ({ offsetNode: _, offset: S } = E);
    } else if (g.caretRangeFromPoint) {
      let E = g.caretRangeFromPoint(f, d);
      E && ({ startContainer: _, startOffset: S } = E, (!t.contentDOM.contains(_) || qe.safari && kxe(_, S, f) || qe.chrome && xxe(_, S, f)) && (_ = void 0));
    }
  }
  if (!_ || !t.docView.dom.contains(_)) {
    let E = Ai.find(t.docView, m);
    if (!E)
      return h > l.top + l.height / 2 ? l.to : l.from;
    ({ node: _, offset: S } = sC(E.dom, f, d));
  }
  let C = t.docView.nearest(_);
  if (!C)
    return null;
  if (C.isWidget && ((s = C.dom) === null || s === void 0 ? void 0 : s.nodeType) == 1) {
    let E = C.dom.getBoundingClientRect();
    return e.y < E.top || e.y <= E.bottom && e.x <= (E.left + E.right) / 2 ? C.posAtStart : C.posAtEnd;
  } else
    return C.localPosFromDOM(_, S) + C.posAtStart;
}
function vA(t, e, n, i, r) {
  let s = Math.round((i - e.left) * t.defaultCharacterWidth);
  if (t.lineWrapping && n.height > t.defaultLineHeight * 1.5) {
    let a = t.viewState.heightOracle.textHeight, l = Math.floor((r - n.top - (t.defaultLineHeight - a) * 0.5) / a);
    s += l * t.viewState.heightOracle.lineLength;
  }
  let o = t.state.sliceDoc(n.from, n.to);
  return n.from + U4(o, s, t.state.tabSize);
}
function kxe(t, e, n) {
  let i;
  if (t.nodeType != 3 || e != (i = t.nodeValue.length))
    return !1;
  for (let r = t.nextSibling; r; r = r.nextSibling)
    if (r.nodeType != 1 || r.nodeName != "BR")
      return !1;
  return bf(t, i - 1, i).getBoundingClientRect().left > n;
}
function xxe(t, e, n) {
  if (e != 0)
    return !1;
  for (let r = t; ; ) {
    let s = r.parentNode;
    if (!s || s.nodeType != 1 || s.firstChild != r)
      return !1;
    if (s.classList.contains("cm-line"))
      break;
    r = s;
  }
  let i = t.nodeType == 1 ? t.getBoundingClientRect() : bf(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect();
  return n - i.left > 5;
}
function oC(t, e) {
  let n = t.lineBlockAt(e);
  if (Array.isArray(n.type)) {
    for (let i of n.type)
      if (i.to > e || i.to == e && (i.to == n.to || i.type == es.Text))
        return i;
  }
  return n;
}
function _xe(t, e, n, i) {
  let r = oC(t, e.head), s = !i || r.type != es.Text || !(t.lineWrapping || r.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > r.from ? e.head - 1 : e.head);
  if (s) {
    let o = t.dom.getBoundingClientRect(), a = t.textDirectionAt(r.from), l = t.posAtCoords({
      x: n == (a == Tn.LTR) ? o.right - 1 : o.left + 1,
      y: (s.top + s.bottom) / 2
    });
    if (l != null)
      return he.cursor(l, n ? -1 : 1);
  }
  return he.cursor(n ? r.to : r.from, n ? -1 : 1);
}
function bA(t, e, n, i) {
  let r = t.state.doc.lineAt(e.head), s = t.bidiSpans(r), o = t.textDirectionAt(r.from);
  for (let a = e, l = null; ; ) {
    let u = lxe(r, s, o, a, n), f = _H;
    if (!u) {
      if (r.number == (n ? t.state.doc.lines : 1))
        return a;
      f = `
`, r = t.state.doc.line(r.number + (n ? 1 : -1)), s = t.bidiSpans(r), u = t.visualLineSide(r, !n);
    }
    if (l) {
      if (!l(f))
        return a;
    } else {
      if (!i)
        return u;
      l = i(f);
    }
    a = u;
  }
}
function Oxe(t, e, n) {
  let i = t.state.charCategorizer(e), r = i(n);
  return (s) => {
    let o = i(s);
    return r == In.Space && (r = o), r == o;
  };
}
function Sxe(t, e, n, i) {
  let r = e.head, s = n ? 1 : -1;
  if (r == (n ? t.state.doc.length : 0))
    return he.cursor(r, e.assoc);
  let o = e.goalColumn, a, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(r, e.assoc || -1), f = t.documentTop;
  if (u)
    o == null && (o = u.left - l.left), a = s < 0 ? u.top : u.bottom;
  else {
    let m = t.viewState.lineBlockAt(r);
    o == null && (o = Math.min(l.right - l.left, t.defaultCharacterWidth * (r - m.from))), a = (s < 0 ? m.top : m.bottom) + f;
  }
  let d = l.left + o, h = i ?? t.viewState.heightOracle.textHeight >> 1;
  for (let m = 0; ; m += 10) {
    let g = a + (h + m) * s, w = FH(t, { x: d, y: g }, !1, s);
    if (g < l.top || g > l.bottom || (s < 0 ? w < r : w > r)) {
      let x = t.docView.coordsForChar(w), _ = !x || g < x.top ? -1 : 1;
      return he.cursor(w, _, void 0, o);
    }
  }
}
function uy(t, e, n) {
  for (; ; ) {
    let i = 0;
    for (let r of t)
      r.between(e - 1, e + 1, (s, o, a) => {
        if (e > s && e < o) {
          let l = i || n || (e - s < o - e ? -1 : 1);
          e = l < 0 ? s : o, i = l;
        }
      });
    if (!i)
      return e;
  }
}
function G3(t, e, n) {
  let i = uy(t.state.facet(yE).map((r) => r(t)), n.from, e.head > n.from ? -1 : 1);
  return i == n.from ? n : he.cursor(i, i < n.from ? 1 : -1);
}
class Cxe {
  setSelectionOrigin(e) {
    this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
  }
  constructor(e) {
    this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastEscPress = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, qe.safari && e.contentDOM.addEventListener("input", () => null), qe.gecko && Wxe(e.contentDOM.ownerDocument);
  }
  handleEvent(e) {
    !Pxe(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e);
  }
  runHandlers(e, n) {
    let i = this.handlers[e];
    if (i) {
      for (let r of i.observers)
        r(this.view, n);
      for (let r of i.handlers) {
        if (n.defaultPrevented)
          break;
        if (r(this.view, n)) {
          n.preventDefault();
          break;
        }
      }
    }
  }
  ensureHandlers(e) {
    let n = Exe(e), i = this.handlers, r = this.view.contentDOM;
    for (let s in n)
      if (s != "scroll") {
        let o = !n[s].handlers.length, a = i[s];
        a && o != !a.handlers.length && (r.removeEventListener(s, this.handleEvent), a = null), a || r.addEventListener(s, this.handleEvent, { passive: o });
      }
    for (let s in i)
      s != "scroll" && !n[s] && r.removeEventListener(s, this.handleEvent);
    this.handlers = n;
  }
  keydown(e) {
    if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && Date.now() < this.lastEscPress + 2e3)
      return !0;
    if (e.keyCode != 27 && zH.indexOf(e.keyCode) < 0 && (this.view.inputState.lastEscPress = 0), qe.android && qe.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))
      return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
    let n;
    return qe.ios && !e.synthetic && !e.altKey && !e.metaKey && ((n = BH.find((i) => i.keyCode == e.keyCode)) && !e.ctrlKey || Txe.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = n || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1);
  }
  flushIOSKey() {
    let e = this.pendingIOSKey;
    return e ? (this.pendingIOSKey = void 0, ph(this.view.contentDOM, e.key, e.keyCode)) : !1;
  }
  ignoreDuringComposition(e) {
    return /^key/.test(e.type) ? this.composing > 0 ? !0 : qe.safari && !qe.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1;
  }
  startMouseSelection(e) {
    this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
  }
  update(e) {
    this.mouseSelection && this.mouseSelection.update(e), this.draggedContent && e.docChanged && (this.draggedContent = this.draggedContent.map(e.changes)), e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0);
  }
  destroy() {
    this.mouseSelection && this.mouseSelection.destroy();
  }
}
function yA(t, e) {
  return (n, i) => {
    try {
      return e.call(t, i, n);
    } catch (r) {
      co(n.state, r);
    }
  };
}
function Exe(t) {
  let e = /* @__PURE__ */ Object.create(null);
  function n(i) {
    return e[i] || (e[i] = { observers: [], handlers: [] });
  }
  for (let i of t) {
    let r = i.spec;
    if (r && r.domEventHandlers)
      for (let s in r.domEventHandlers) {
        let o = r.domEventHandlers[s];
        o && n(s).handlers.push(yA(i.value, o));
      }
    if (r && r.domEventObservers)
      for (let s in r.domEventObservers) {
        let o = r.domEventObservers[s];
        o && n(s).observers.push(yA(i.value, o));
      }
  }
  for (let i in Bo)
    n(i).handlers.push(Bo[i]);
  for (let i in zo)
    n(i).observers.push(zo[i]);
  return e;
}
const BH = [
  { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
  { key: "Enter", keyCode: 13, inputType: "insertParagraph" },
  { key: "Enter", keyCode: 13, inputType: "insertLineBreak" },
  { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }
], Txe = "dthko", zH = [16, 17, 18, 20, 91, 92, 224, 225], hb = 6;
function pb(t) {
  return Math.max(0, t) * 0.7 + 8;
}
function $xe(t, e) {
  return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY));
}
class Mxe {
  constructor(e, n, i, r) {
    this.view = e, this.startEvent = n, this.style = i, this.mustSelect = r, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = n, this.scrollParent = U2e(e.contentDOM), this.atoms = e.state.facet(yE).map((o) => o(e));
    let s = e.contentDOM.ownerDocument;
    s.addEventListener("mousemove", this.move = this.move.bind(this)), s.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = n.shiftKey, this.multiple = e.state.facet(zt.allowMultipleSelections) && Nxe(e, n), this.dragging = Dxe(e, n) && UH(n) == 1 ? null : !1;
  }
  start(e) {
    this.dragging === !1 && this.select(e);
  }
  move(e) {
    var n;
    if (e.buttons == 0)
      return this.destroy();
    if (this.dragging || this.dragging == null && $xe(this.startEvent, e) < 10)
      return;
    this.select(this.lastEvent = e);
    let i = 0, r = 0, s = ((n = this.scrollParent) === null || n === void 0 ? void 0 : n.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, o = LH(this.view);
    e.clientX - o.left <= s.left + hb ? i = -pb(s.left - e.clientX) : e.clientX + o.right >= s.right - hb && (i = pb(e.clientX - s.right)), e.clientY - o.top <= s.top + hb ? r = -pb(s.top - e.clientY) : e.clientY + o.bottom >= s.bottom - hb && (r = pb(e.clientY - s.bottom)), this.setScrollSpeed(i, r);
  }
  up(e) {
    this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy();
  }
  destroy() {
    this.setScrollSpeed(0, 0);
    let e = this.view.contentDOM.ownerDocument;
    e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null;
  }
  setScrollSpeed(e, n) {
    this.scrollSpeed = { x: e, y: n }, e || n ? this.scrolling < 0 && (this.scrolling = setInterval(() => this.scroll(), 50)) : this.scrolling > -1 && (clearInterval(this.scrolling), this.scrolling = -1);
  }
  scroll() {
    this.scrollParent ? (this.scrollParent.scrollLeft += this.scrollSpeed.x, this.scrollParent.scrollTop += this.scrollSpeed.y) : this.view.win.scrollBy(this.scrollSpeed.x, this.scrollSpeed.y), this.dragging === !1 && this.select(this.lastEvent);
  }
  skipAtoms(e) {
    let n = null;
    for (let i = 0; i < e.ranges.length; i++) {
      let r = e.ranges[i], s = null;
      if (r.empty) {
        let o = uy(this.atoms, r.from, 0);
        o != r.from && (s = he.cursor(o, -1));
      } else {
        let o = uy(this.atoms, r.from, -1), a = uy(this.atoms, r.to, 1);
        (o != r.from || a != r.to) && (s = he.range(r.from == r.anchor ? o : a, r.from == r.head ? o : a));
      }
      s && (n || (n = e.ranges.slice()), n[i] = s);
    }
    return n ? he.create(n, e.mainIndex) : e;
  }
  select(e) {
    let { view: n } = this, i = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
    (this.mustSelect || !i.eq(n.state.selection, this.dragging === !1)) && this.view.dispatch({
      selection: i,
      userEvent: "select.pointer"
    }), this.mustSelect = !1;
  }
  update(e) {
    this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20);
  }
}
function Nxe(t, e) {
  let n = t.state.facet(OH);
  return n.length ? n[0](e) : qe.mac ? e.metaKey : e.ctrlKey;
}
function Axe(t, e) {
  let n = t.state.facet(SH);
  return n.length ? n[0](e) : qe.mac ? !e.altKey : !e.ctrlKey;
}
function Dxe(t, e) {
  let { main: n } = t.state.selection;
  if (n.empty)
    return !1;
  let i = _w(t.root);
  if (!i || i.rangeCount == 0)
    return !0;
  let r = i.getRangeAt(0).getClientRects();
  for (let s = 0; s < r.length; s++) {
    let o = r[s];
    if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY)
      return !0;
  }
  return !1;
}
function Pxe(t, e) {
  if (!e.bubbles)
    return !0;
  if (e.defaultPrevented)
    return !1;
  for (let n = e.target, i; n != t.contentDOM; n = n.parentNode)
    if (!n || n.nodeType == 11 || (i = En.get(n)) && i.ignoreEvent(e))
      return !1;
  return !0;
}
const Bo = /* @__PURE__ */ Object.create(null), zo = /* @__PURE__ */ Object.create(null), WH = qe.ie && qe.ie_version < 15 || qe.ios && qe.webkit_version < 604;
function Ixe(t) {
  let e = t.dom.parentNode;
  if (!e)
    return;
  let n = e.appendChild(document.createElement("textarea"));
  n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus(), setTimeout(() => {
    t.focus(), n.remove(), HH(t, n.value);
  }, 50);
}
function HH(t, e) {
  let { state: n } = t, i, r = 1, s = n.toText(e), o = s.lines == n.selection.ranges.length;
  if (aC != null && n.selection.ranges.every((l) => l.empty) && aC == s.toString()) {
    let l = -1;
    i = n.changeByRange((u) => {
      let f = n.doc.lineAt(u.from);
      if (f.from == l)
        return { range: u };
      l = f.from;
      let d = n.toText((o ? s.line(r++).text : e) + n.lineBreak);
      return {
        changes: { from: f.from, insert: d },
        range: he.cursor(u.from + d.length)
      };
    });
  } else o ? i = n.changeByRange((l) => {
    let u = s.line(r++);
    return {
      changes: { from: l.from, to: l.to, insert: u.text },
      range: he.cursor(l.from + u.length)
    };
  }) : i = n.replaceSelection(s);
  t.dispatch(i, {
    userEvent: "input.paste",
    scrollIntoView: !0
  });
}
zo.scroll = (t) => {
  t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft;
};
Bo.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && (t.inputState.lastEscPress = Date.now()), !1);
zo.touchstart = (t, e) => {
  t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer");
};
zo.touchmove = (t) => {
  t.inputState.setSelectionOrigin("select.pointer");
};
Bo.mousedown = (t, e) => {
  if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3)
    return !1;
  let n = null;
  for (let i of t.state.facet(CH))
    if (n = i(t, e), n)
      break;
  if (!n && e.button == 0 && (n = jxe(t, e)), n) {
    let i = !t.hasFocus;
    t.inputState.startMouseSelection(new Mxe(t, e, n, i)), i && t.observer.ignore(() => aH(t.contentDOM));
    let r = t.inputState.mouseSelection;
    if (r)
      return r.start(e), r.dragging === !1;
  }
  return !1;
};
function wA(t, e, n, i) {
  if (i == 1)
    return he.cursor(e, n);
  if (i == 2)
    return bxe(t.state, e, n);
  {
    let r = Ai.find(t.docView, e), s = t.state.doc.lineAt(r ? r.posAtEnd : e), o = r ? r.posAtStart : s.from, a = r ? r.posAtEnd : s.to;
    return a < t.state.doc.length && a == s.to && a++, he.range(o, a);
  }
}
let QH = (t, e) => t >= e.top && t <= e.bottom, kA = (t, e, n) => QH(e, n) && t >= n.left && t <= n.right;
function Lxe(t, e, n, i) {
  let r = Ai.find(t.docView, e);
  if (!r)
    return 1;
  let s = e - r.posAtStart;
  if (s == 0)
    return 1;
  if (s == r.length)
    return -1;
  let o = r.coordsAt(s, -1);
  if (o && kA(n, i, o))
    return -1;
  let a = r.coordsAt(s, 1);
  return a && kA(n, i, a) ? 1 : o && QH(i, o) ? -1 : 1;
}
function xA(t, e) {
  let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1);
  return { pos: n, bias: Lxe(t, n, e.clientX, e.clientY) };
}
const Rxe = qe.ie && qe.ie_version <= 11;
let _A = null, OA = 0, SA = 0;
function UH(t) {
  if (!Rxe)
    return t.detail;
  let e = _A, n = SA;
  return _A = t, SA = Date.now(), OA = !e || n > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (OA + 1) % 3 : 1;
}
function jxe(t, e) {
  let n = xA(t, e), i = UH(e), r = t.state.selection;
  return {
    update(s) {
      s.docChanged && (n.pos = s.changes.mapPos(n.pos), r = r.map(s.changes));
    },
    get(s, o, a) {
      let l = xA(t, s), u, f = wA(t, l.pos, l.bias, i);
      if (n.pos != l.pos && !o) {
        let d = wA(t, n.pos, n.bias, i), h = Math.min(d.from, f.from), m = Math.max(d.to, f.to);
        f = h < f.from ? he.range(h, m) : he.range(m, h);
      }
      return o ? r.replaceRange(r.main.extend(f.from, f.to)) : a && i == 1 && r.ranges.length > 1 && (u = Fxe(r, l.pos)) ? u : a ? r.addRange(f) : he.create([f]);
    }
  };
}
function Fxe(t, e) {
  for (let n = 0; n < t.ranges.length; n++) {
    let { from: i, to: r } = t.ranges[n];
    if (i <= e && r >= e)
      return he.create(t.ranges.slice(0, n).concat(t.ranges.slice(n + 1)), t.mainIndex == n ? 0 : t.mainIndex - (t.mainIndex > n ? 1 : 0));
  }
  return null;
}
Bo.dragstart = (t, e) => {
  let { selection: { main: n } } = t.state;
  if (e.target.draggable) {
    let r = t.docView.nearest(e.target);
    if (r && r.isWidget) {
      let s = r.posAtStart, o = s + r.length;
      (s >= n.to || o <= n.from) && (n = he.range(s, o));
    }
  }
  let { inputState: i } = t;
  return i.mouseSelection && (i.mouseSelection.dragging = !0), i.draggedContent = n, e.dataTransfer && (e.dataTransfer.setData("Text", t.state.sliceDoc(n.from, n.to)), e.dataTransfer.effectAllowed = "copyMove"), !1;
};
Bo.dragend = (t) => (t.inputState.draggedContent = null, !1);
function CA(t, e, n, i) {
  if (!n)
    return;
  let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: s } = t.inputState, o = i && s && Axe(t, e) ? { from: s.from, to: s.to } : null, a = { from: r, insert: n }, l = t.state.changes(o ? [o, a] : a);
  t.focus(), t.dispatch({
    changes: l,
    selection: { anchor: l.mapPos(r, -1), head: l.mapPos(r, 1) },
    userEvent: o ? "move.drop" : "input.drop"
  }), t.inputState.draggedContent = null;
}
Bo.drop = (t, e) => {
  if (!e.dataTransfer)
    return !1;
  if (t.state.readOnly)
    return !0;
  let n = e.dataTransfer.files;
  if (n && n.length) {
    let i = Array(n.length), r = 0, s = () => {
      ++r == n.length && CA(t, e, i.filter((o) => o != null).join(t.state.lineBreak), !1);
    };
    for (let o = 0; o < n.length; o++) {
      let a = new FileReader();
      a.onerror = s, a.onload = () => {
        /[\x00-\x08\x0e-\x1f]{2}/.test(a.result) || (i[o] = a.result), s();
      }, a.readAsText(n[o]);
    }
    return !0;
  } else {
    let i = e.dataTransfer.getData("Text");
    if (i)
      return CA(t, e, i, !0), !0;
  }
  return !1;
};
Bo.paste = (t, e) => {
  if (t.state.readOnly)
    return !0;
  t.observer.flush();
  let n = WH ? null : e.clipboardData;
  return n ? (HH(t, n.getData("text/plain") || n.getData("text/uri-text")), !0) : (Ixe(t), !1);
};
function Bxe(t, e) {
  let n = t.dom.parentNode;
  if (!n)
    return;
  let i = n.appendChild(document.createElement("textarea"));
  i.style.cssText = "position: fixed; left: -10000px; top: 10px", i.value = e, i.focus(), i.selectionEnd = e.length, i.selectionStart = 0, setTimeout(() => {
    i.remove(), t.focus();
  }, 50);
}
function zxe(t) {
  let e = [], n = [], i = !1;
  for (let r of t.selection.ranges)
    r.empty || (e.push(t.sliceDoc(r.from, r.to)), n.push(r));
  if (!e.length) {
    let r = -1;
    for (let { from: s } of t.selection.ranges) {
      let o = t.doc.lineAt(s);
      o.number > r && (e.push(o.text), n.push({ from: o.from, to: Math.min(t.doc.length, o.to + 1) })), r = o.number;
    }
    i = !0;
  }
  return { text: e.join(t.lineBreak), ranges: n, linewise: i };
}
let aC = null;
Bo.copy = Bo.cut = (t, e) => {
  let { text: n, ranges: i, linewise: r } = zxe(t.state);
  if (!n && !r)
    return !1;
  aC = r ? n : null, e.type == "cut" && !t.state.readOnly && t.dispatch({
    changes: i,
    scrollIntoView: !0,
    userEvent: "delete.cut"
  });
  let s = WH ? null : e.clipboardData;
  return s ? (s.clearData(), s.setData("text/plain", n), !0) : (Bxe(t, n), !1);
};
const ZH = /* @__PURE__ */ za.define();
function qH(t, e) {
  let n = [];
  for (let i of t.facet($H)) {
    let r = i(t, e);
    r && n.push(r);
  }
  return n ? t.update({ effects: n, annotations: ZH.of(!0) }) : null;
}
function YH(t) {
  setTimeout(() => {
    let e = t.hasFocus;
    if (e != t.inputState.notifiedFocused) {
      let n = qH(t.state, e);
      n ? t.dispatch(n) : t.update([]);
    }
  }, 10);
}
zo.focus = (t) => {
  t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), YH(t);
};
zo.blur = (t) => {
  t.observer.clearSelectionRange(), YH(t);
};
zo.compositionstart = zo.compositionupdate = (t) => {
  t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0);
};
zo.compositionend = (t) => {
  t.inputState.composing = -1, t.inputState.compositionEndedAt = Date.now(), t.inputState.compositionPendingKey = !0, t.inputState.compositionPendingChange = t.observer.pendingRecords().length > 0, t.inputState.compositionFirstChange = null, qe.chrome && qe.android ? t.observer.flushSoon() : t.inputState.compositionPendingChange ? Promise.resolve().then(() => t.observer.flush()) : setTimeout(() => {
    t.inputState.composing < 0 && t.docView.hasComposition && t.update([]);
  }, 50);
};
zo.contextmenu = (t) => {
  t.inputState.lastContextMenu = Date.now();
};
Bo.beforeinput = (t, e) => {
  var n;
  let i;
  if (qe.chrome && qe.android && (i = BH.find((r) => r.inputType == e.inputType)) && (t.observer.delayAndroidKey(i.key, i.keyCode), i.key == "Backspace" || i.key == "Delete")) {
    let r = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0;
    setTimeout(() => {
      var s;
      (((s = window.visualViewport) === null || s === void 0 ? void 0 : s.height) || 0) > r + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus());
    }, 100);
  }
  return !1;
};
const EA = /* @__PURE__ */ new Set();
function Wxe(t) {
  EA.has(t) || (EA.add(t), t.addEventListener("copy", () => {
  }), t.addEventListener("cut", () => {
  }));
}
const TA = ["pre-wrap", "normal", "pre-line", "break-spaces"];
class Hxe {
  constructor(e) {
    this.lineWrapping = e, this.doc = Kt.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1;
  }
  heightForGap(e, n) {
    let i = this.doc.lineAt(n).number - this.doc.lineAt(e).number + 1;
    return this.lineWrapping && (i += Math.max(0, Math.ceil((n - e - i * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * i;
  }
  heightForLine(e) {
    return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight;
  }
  setDoc(e) {
    return this.doc = e, this;
  }
  mustRefreshForWrapping(e) {
    return TA.indexOf(e) > -1 != this.lineWrapping;
  }
  mustRefreshForHeights(e) {
    let n = !1;
    for (let i = 0; i < e.length; i++) {
      let r = e[i];
      r < 0 ? i++ : this.heightSamples[Math.floor(r * 10)] || (n = !0, this.heightSamples[Math.floor(r * 10)] = !0);
    }
    return n;
  }
  refresh(e, n, i, r, s, o) {
    let a = TA.indexOf(e) > -1, l = Math.round(n) != Math.round(this.lineHeight) || this.lineWrapping != a;
    if (this.lineWrapping = a, this.lineHeight = n, this.charWidth = i, this.textHeight = r, this.lineLength = s, l) {
      this.heightSamples = {};
      for (let u = 0; u < o.length; u++) {
        let f = o[u];
        f < 0 ? u++ : this.heightSamples[Math.floor(f * 10)] = !0;
      }
    }
    return l;
  }
}
class Qxe {
  constructor(e, n) {
    this.from = e, this.heights = n, this.index = 0;
  }
  get more() {
    return this.index < this.heights.length;
  }
}
class va {
  /**
  @internal
  */
  constructor(e, n, i, r, s) {
    this.from = e, this.length = n, this.top = i, this.height = r, this._content = s;
  }
  /**
  The type of element this is. When querying lines, this may be
  an array of all the blocks that make up the line.
  */
  get type() {
    return typeof this._content == "number" ? es.Text : Array.isArray(this._content) ? this._content : this._content.type;
  }
  /**
  The end of the element as a document position.
  */
  get to() {
    return this.from + this.length;
  }
  /**
  The bottom position of the element.
  */
  get bottom() {
    return this.top + this.height;
  }
  /**
  If this is a widget block, this will return the widget
  associated with it.
  */
  get widget() {
    return this._content instanceof Vu ? this._content.widget : null;
  }
  /**
  If this is a textblock, this holds the number of line breaks
  that appear in widgets inside the block.
  */
  get widgetLineBreaks() {
    return typeof this._content == "number" ? this._content : 0;
  }
  /**
  @internal
  */
  join(e) {
    let n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]);
    return new va(this.from, this.length + e.length, this.top, this.height + e.height, n);
  }
}
var _n = /* @__PURE__ */ function(t) {
  return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t;
}(_n || (_n = {}));
const cy = 1e-3;
class ts {
  constructor(e, n, i = 2) {
    this.length = e, this.height = n, this.flags = i;
  }
  get outdated() {
    return (this.flags & 2) > 0;
  }
  set outdated(e) {
    this.flags = (e ? 2 : 0) | this.flags & -3;
  }
  setHeight(e, n) {
    this.height != n && (Math.abs(this.height - n) > cy && (e.heightChanged = !0), this.height = n);
  }
  // Base case is to replace a leaf node, which simply builds a tree
  // from the new nodes and returns that (HeightMapBranch and
  // HeightMapGap override this to actually use from/to)
  replace(e, n, i) {
    return ts.of(i);
  }
  // Again, these are base cases, and are overridden for branch and gap nodes.
  decomposeLeft(e, n) {
    n.push(this);
  }
  decomposeRight(e, n) {
    n.push(this);
  }
  applyChanges(e, n, i, r) {
    let s = this, o = i.doc;
    for (let a = r.length - 1; a >= 0; a--) {
      let { fromA: l, toA: u, fromB: f, toB: d } = r[a], h = s.lineAt(l, _n.ByPosNoHeight, i.setDoc(n), 0, 0), m = h.to >= u ? h : s.lineAt(u, _n.ByPosNoHeight, i, 0, 0);
      for (d += m.to - u, u = m.to; a > 0 && h.from <= r[a - 1].toA; )
        l = r[a - 1].fromA, f = r[a - 1].fromB, a--, l < h.from && (h = s.lineAt(l, _n.ByPosNoHeight, i, 0, 0));
      f += h.from - l, l = h.from;
      let g = wE.build(i.setDoc(o), e, f, d);
      s = s.replace(l, u, g);
    }
    return s.updateHeight(i, 0);
  }
  static empty() {
    return new Ds(0, 0);
  }
  // nodes uses null values to indicate the position of line breaks.
  // There are never line breaks at the start or end of the array, or
  // two line breaks next to each other, and the array isn't allowed
  // to be empty (same restrictions as return value from the builder).
  static of(e) {
    if (e.length == 1)
      return e[0];
    let n = 0, i = e.length, r = 0, s = 0;
    for (; ; )
      if (n == i)
        if (r > s * 2) {
          let a = e[n - 1];
          a.break ? e.splice(--n, 1, a.left, null, a.right) : e.splice(--n, 1, a.left, a.right), i += 1 + a.break, r -= a.size;
        } else if (s > r * 2) {
          let a = e[i];
          a.break ? e.splice(i, 1, a.left, null, a.right) : e.splice(i, 1, a.left, a.right), i += 2 + a.break, s -= a.size;
        } else
          break;
      else if (r < s) {
        let a = e[n++];
        a && (r += a.size);
      } else {
        let a = e[--i];
        a && (s += a.size);
      }
    let o = 0;
    return e[n - 1] == null ? (o = 1, n--) : e[n] == null && (o = 1, i++), new Uxe(ts.of(e.slice(0, n)), o, ts.of(e.slice(i)));
  }
}
ts.prototype.size = 1;
class VH extends ts {
  constructor(e, n, i) {
    super(e, n), this.deco = i;
  }
  blockAt(e, n, i, r) {
    return new va(r, this.length, i, this.height, this.deco || 0);
  }
  lineAt(e, n, i, r, s) {
    return this.blockAt(0, i, r, s);
  }
  forEachLine(e, n, i, r, s, o) {
    e <= s + this.length && n >= s && o(this.blockAt(0, i, r, s));
  }
  updateHeight(e, n = 0, i = !1, r) {
    return r && r.from <= n && r.more && this.setHeight(e, r.heights[r.index++]), this.outdated = !1, this;
  }
  toString() {
    return `block(${this.length})`;
  }
}
class Ds extends VH {
  constructor(e, n) {
    super(e, n, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0;
  }
  blockAt(e, n, i, r) {
    return new va(r, this.length, i, this.height, this.breaks);
  }
  replace(e, n, i) {
    let r = i[0];
    return i.length == 1 && (r instanceof Ds || r instanceof ir && r.flags & 4) && Math.abs(this.length - r.length) < 10 ? (r instanceof ir ? r = new Ds(r.length, this.height) : r.height = this.height, this.outdated || (r.outdated = !1), r) : ts.of(i);
  }
  updateHeight(e, n = 0, i = !1, r) {
    return r && r.from <= n && r.more ? this.setHeight(e, r.heights[r.index++]) : (i || this.outdated) && this.setHeight(e, Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), this.outdated = !1, this;
  }
  toString() {
    return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`;
  }
}
class ir extends ts {
  constructor(e) {
    super(e, 0);
  }
  heightMetrics(e, n) {
    let i = e.doc.lineAt(n).number, r = e.doc.lineAt(n + this.length).number, s = r - i + 1, o, a = 0;
    if (e.lineWrapping) {
      let l = Math.min(this.height, e.lineHeight * s);
      o = l / s, this.length > s + 1 && (a = (this.height - l) / (this.length - s - 1));
    } else
      o = this.height / s;
    return { firstLine: i, lastLine: r, perLine: o, perChar: a };
  }
  blockAt(e, n, i, r) {
    let { firstLine: s, lastLine: o, perLine: a, perChar: l } = this.heightMetrics(n, r);
    if (n.lineWrapping) {
      let u = r + Math.round(Math.max(0, Math.min(1, (e - i) / this.height)) * this.length), f = n.doc.lineAt(u), d = a + f.length * l, h = Math.max(i, e - d / 2);
      return new va(f.from, f.length, h, d, 0);
    } else {
      let u = Math.max(0, Math.min(o - s, Math.floor((e - i) / a))), { from: f, length: d } = n.doc.line(s + u);
      return new va(f, d, i + a * u, a, 0);
    }
  }
  lineAt(e, n, i, r, s) {
    if (n == _n.ByHeight)
      return this.blockAt(e, i, r, s);
    if (n == _n.ByPosNoHeight) {
      let { from: m, to: g } = i.doc.lineAt(e);
      return new va(m, g - m, 0, 0, 0);
    }
    let { firstLine: o, perLine: a, perChar: l } = this.heightMetrics(i, s), u = i.doc.lineAt(e), f = a + u.length * l, d = u.number - o, h = r + a * d + l * (u.from - s - d);
    return new va(u.from, u.length, Math.max(r, Math.min(h, r + this.height - f)), f, 0);
  }
  forEachLine(e, n, i, r, s, o) {
    e = Math.max(e, s), n = Math.min(n, s + this.length);
    let { firstLine: a, perLine: l, perChar: u } = this.heightMetrics(i, s);
    for (let f = e, d = r; f <= n; ) {
      let h = i.doc.lineAt(f);
      if (f == e) {
        let g = h.number - a;
        d += l * g + u * (e - s - g);
      }
      let m = l + u * h.length;
      o(new va(h.from, h.length, d, m, 0)), d += m, f = h.to + 1;
    }
  }
  replace(e, n, i) {
    let r = this.length - n;
    if (r > 0) {
      let s = i[i.length - 1];
      s instanceof ir ? i[i.length - 1] = new ir(s.length + r) : i.push(null, new ir(r - 1));
    }
    if (e > 0) {
      let s = i[0];
      s instanceof ir ? i[0] = new ir(e + s.length) : i.unshift(new ir(e - 1), null);
    }
    return ts.of(i);
  }
  decomposeLeft(e, n) {
    n.push(new ir(e - 1), null);
  }
  decomposeRight(e, n) {
    n.push(null, new ir(this.length - e - 1));
  }
  updateHeight(e, n = 0, i = !1, r) {
    let s = n + this.length;
    if (r && r.from <= n + this.length && r.more) {
      let o = [], a = Math.max(n, r.from), l = -1;
      for (r.from > n && o.push(new ir(r.from - n - 1).updateHeight(e, n)); a <= s && r.more; ) {
        let f = e.doc.lineAt(a).length;
        o.length && o.push(null);
        let d = r.heights[r.index++];
        l == -1 ? l = d : Math.abs(d - l) >= cy && (l = -2);
        let h = new Ds(f, d);
        h.outdated = !1, o.push(h), a += f + 1;
      }
      a <= s && o.push(null, new ir(s - a).updateHeight(e, a));
      let u = ts.of(o);
      return (l < 0 || Math.abs(u.height - this.height) >= cy || Math.abs(l - this.heightMetrics(e, n).perLine) >= cy) && (e.heightChanged = !0), u;
    } else (i || this.outdated) && (this.setHeight(e, e.heightForGap(n, n + this.length)), this.outdated = !1);
    return this;
  }
  toString() {
    return `gap(${this.length})`;
  }
}
class Uxe extends ts {
  constructor(e, n, i) {
    super(e.length + n + i.length, e.height + i.height, n | (e.outdated || i.outdated ? 2 : 0)), this.left = e, this.right = i, this.size = e.size + i.size;
  }
  get break() {
    return this.flags & 1;
  }
  blockAt(e, n, i, r) {
    let s = i + this.left.height;
    return e < s ? this.left.blockAt(e, n, i, r) : this.right.blockAt(e, n, s, r + this.left.length + this.break);
  }
  lineAt(e, n, i, r, s) {
    let o = r + this.left.height, a = s + this.left.length + this.break, l = n == _n.ByHeight ? e < o : e < a, u = l ? this.left.lineAt(e, n, i, r, s) : this.right.lineAt(e, n, i, o, a);
    if (this.break || (l ? u.to < a : u.from > a))
      return u;
    let f = n == _n.ByPosNoHeight ? _n.ByPosNoHeight : _n.ByPos;
    return l ? u.join(this.right.lineAt(a, f, i, o, a)) : this.left.lineAt(a, f, i, r, s).join(u);
  }
  forEachLine(e, n, i, r, s, o) {
    let a = r + this.left.height, l = s + this.left.length + this.break;
    if (this.break)
      e < l && this.left.forEachLine(e, n, i, r, s, o), n >= l && this.right.forEachLine(e, n, i, a, l, o);
    else {
      let u = this.lineAt(l, _n.ByPos, i, r, s);
      e < u.from && this.left.forEachLine(e, u.from - 1, i, r, s, o), u.to >= e && u.from <= n && o(u), n > u.to && this.right.forEachLine(u.to + 1, n, i, a, l, o);
    }
  }
  replace(e, n, i) {
    let r = this.left.length + this.break;
    if (n < r)
      return this.balanced(this.left.replace(e, n, i), this.right);
    if (e > this.left.length)
      return this.balanced(this.left, this.right.replace(e - r, n - r, i));
    let s = [];
    e > 0 && this.decomposeLeft(e, s);
    let o = s.length;
    for (let a of i)
      s.push(a);
    if (e > 0 && $A(s, o - 1), n < this.length) {
      let a = s.length;
      this.decomposeRight(n, s), $A(s, a);
    }
    return ts.of(s);
  }
  decomposeLeft(e, n) {
    let i = this.left.length;
    if (e <= i)
      return this.left.decomposeLeft(e, n);
    n.push(this.left), this.break && (i++, e >= i && n.push(null)), e > i && this.right.decomposeLeft(e - i, n);
  }
  decomposeRight(e, n) {
    let i = this.left.length, r = i + this.break;
    if (e >= r)
      return this.right.decomposeRight(e - r, n);
    e < i && this.left.decomposeRight(e, n), this.break && e < r && n.push(null), n.push(this.right);
  }
  balanced(e, n) {
    return e.size > 2 * n.size || n.size > 2 * e.size ? ts.of(this.break ? [e, null, n] : [e, n]) : (this.left = e, this.right = n, this.height = e.height + n.height, this.outdated = e.outdated || n.outdated, this.size = e.size + n.size, this.length = e.length + this.break + n.length, this);
  }
  updateHeight(e, n = 0, i = !1, r) {
    let { left: s, right: o } = this, a = n + s.length + this.break, l = null;
    return r && r.from <= n + s.length && r.more ? l = s = s.updateHeight(e, n, i, r) : s.updateHeight(e, n, i), r && r.from <= a + o.length && r.more ? l = o = o.updateHeight(e, a, i, r) : o.updateHeight(e, a, i), l ? this.balanced(s, o) : (this.height = this.left.height + this.right.height, this.outdated = !1, this);
  }
  toString() {
    return this.left + (this.break ? " " : "-") + this.right;
  }
}
function $A(t, e) {
  let n, i;
  t[e] == null && (n = t[e - 1]) instanceof ir && (i = t[e + 1]) instanceof ir && t.splice(e - 1, 3, new ir(n.length + 1 + i.length));
}
const Zxe = 5;
class wE {
  constructor(e, n) {
    this.pos = e, this.oracle = n, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e;
  }
  get isCovered() {
    return this.covering && this.nodes[this.nodes.length - 1] == this.covering;
  }
  span(e, n) {
    if (this.lineStart > -1) {
      let i = Math.min(n, this.lineEnd), r = this.nodes[this.nodes.length - 1];
      r instanceof Ds ? r.length += i - this.pos : (i > this.pos || !this.isCovered) && this.nodes.push(new Ds(i - this.pos, -1)), this.writtenTo = i, n > i && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1);
    }
    this.pos = n;
  }
  point(e, n, i) {
    if (e < n || i.heightRelevant) {
      let r = i.widget ? i.widget.estimatedHeight : 0, s = i.widget ? i.widget.lineBreaks : 0;
      r < 0 && (r = this.oracle.lineHeight);
      let o = n - e;
      i.block ? this.addBlock(new VH(o, r, i)) : (o || s || r >= Zxe) && this.addLineDeco(r, s, o);
    } else n > e && this.span(e, n);
    this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to);
  }
  enterLine() {
    if (this.lineStart > -1)
      return;
    let { from: e, to: n } = this.oracle.doc.lineAt(this.pos);
    this.lineStart = e, this.lineEnd = n, this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new Ds(this.pos - e, -1)), this.writtenTo = this.pos;
  }
  blankContent(e, n) {
    let i = new ir(n - e);
    return this.oracle.doc.lineAt(e).to == n && (i.flags |= 4), i;
  }
  ensureLine() {
    this.enterLine();
    let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null;
    if (e instanceof Ds)
      return e;
    let n = new Ds(0, -1);
    return this.nodes.push(n), n;
  }
  addBlock(e) {
    this.enterLine();
    let n = e.deco;
    n && n.startSide > 0 && !this.isCovered && this.ensureLine(), this.nodes.push(e), this.writtenTo = this.pos = this.pos + e.length, n && n.endSide > 0 && (this.covering = e);
  }
  addLineDeco(e, n, i) {
    let r = this.ensureLine();
    r.length += i, r.collapsed += i, r.widgetHeight = Math.max(r.widgetHeight, e), r.breaks += n, this.writtenTo = this.pos = this.pos + i;
  }
  finish(e) {
    let n = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1];
    this.lineStart > -1 && !(n instanceof Ds) && !this.isCovered ? this.nodes.push(new Ds(0, -1)) : (this.writtenTo < this.pos || n == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos));
    let i = e;
    for (let r of this.nodes)
      r instanceof Ds && r.updateHeight(this.oracle, i), i += r ? r.length : 1;
    return this.nodes;
  }
  // Always called with a region that on both sides either stretches
  // to a line break or the end of the document.
  // The returned array uses null to indicate line breaks, but never
  // starts or ends in a line break, or has multiple line breaks next
  // to each other.
  static build(e, n, i, r) {
    let s = new wE(i, e);
    return Qt.spans(n, i, r, s, 0), s.finish(i);
  }
}
function qxe(t, e, n) {
  let i = new Yxe();
  return Qt.compare(t, e, n, i, 0), i.changes;
}
class Yxe {
  constructor() {
    this.changes = [];
  }
  compareRange() {
  }
  comparePoint(e, n, i, r) {
    (e < n || i && i.heightRelevant || r && r.heightRelevant) && eC(e, n, this.changes, 5);
  }
}
function Vxe(t, e) {
  let n = t.getBoundingClientRect(), i = t.ownerDocument, r = i.defaultView || window, s = Math.max(0, n.left), o = Math.min(r.innerWidth, n.right), a = Math.max(0, n.top), l = Math.min(r.innerHeight, n.bottom);
  for (let u = t.parentNode; u && u != i.body; )
    if (u.nodeType == 1) {
      let f = u, d = window.getComputedStyle(f);
      if ((f.scrollHeight > f.clientHeight || f.scrollWidth > f.clientWidth) && d.overflow != "visible") {
        let h = f.getBoundingClientRect();
        s = Math.max(s, h.left), o = Math.min(o, h.right), a = Math.max(a, h.top), l = u == t.parentNode ? h.bottom : Math.min(l, h.bottom);
      }
      u = d.position == "absolute" || d.position == "fixed" ? f.offsetParent : f.parentNode;
    } else if (u.nodeType == 11)
      u = u.host;
    else
      break;
  return {
    left: s - n.left,
    right: Math.max(s, o) - n.left,
    top: a - (n.top + e),
    bottom: Math.max(a, l) - (n.top + e)
  };
}
function Xxe(t, e) {
  let n = t.getBoundingClientRect();
  return {
    left: 0,
    right: n.right - n.left,
    top: e,
    bottom: n.bottom - (n.top + e)
  };
}
class K3 {
  constructor(e, n, i) {
    this.from = e, this.to = n, this.size = i;
  }
  static same(e, n) {
    if (e.length != n.length)
      return !1;
    for (let i = 0; i < e.length; i++) {
      let r = e[i], s = n[i];
      if (r.from != s.from || r.to != s.to || r.size != s.size)
        return !1;
    }
    return !0;
  }
  draw(e, n) {
    return it.replace({
      widget: new Gxe(this.size * (n ? e.scaleY : e.scaleX), n)
    }).range(this.from, this.to);
  }
}
class Gxe extends Ha {
  constructor(e, n) {
    super(), this.size = e, this.vertical = n;
  }
  eq(e) {
    return e.size == this.size && e.vertical == this.vertical;
  }
  toDOM() {
    let e = document.createElement("div");
    return this.vertical ? e.style.height = this.size + "px" : (e.style.width = this.size + "px", e.style.height = "2px", e.style.display = "inline-block"), e;
  }
  get estimatedHeight() {
    return this.vertical ? this.size : -1;
  }
}
class MA {
  constructor(e) {
    this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !0, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = NA, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = Tn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
    let n = e.facet(bE).some((i) => typeof i != "function" && i.class == "cm-lineWrapping");
    this.heightOracle = new Hxe(n), this.stateDeco = e.facet(c0).filter((i) => typeof i != "function"), this.heightMap = ts.empty().applyChanges(this.stateDeco, Kt.empty, this.heightOracle.setDoc(e.doc), [new fo(0, 0, 0, e.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = it.set(this.lineGaps.map((i) => i.draw(this, !1))), this.computeVisibleRanges();
  }
  updateForViewport() {
    let e = [this.viewport], { main: n } = this.state.selection;
    for (let i = 0; i <= 1; i++) {
      let r = i ? n.head : n.anchor;
      if (!e.some(({ from: s, to: o }) => r >= s && r <= o)) {
        let { from: s, to: o } = this.lineBlockAt(r);
        e.push(new mb(s, o));
      }
    }
    this.viewports = e.sort((i, r) => i.from - r.from), this.scaler = this.heightMap.height <= 7e6 ? NA : new e_e(this.heightOracle, this.heightMap, this.viewports);
  }
  updateViewportLines() {
    this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
      this.viewportLines.push(this.scaler.scale == 1 ? e : sg(e, this.scaler));
    });
  }
  update(e, n = null) {
    this.state = e.state;
    let i = this.stateDeco;
    this.stateDeco = this.state.facet(c0).filter((f) => typeof f != "function");
    let r = e.changedRanges, s = fo.extendWithRanges(r, qxe(i, this.stateDeco, e ? e.changes : Ii.empty(this.state.doc.length))), o = this.heightMap.height, a = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
    this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), s), this.heightMap.height != o && (e.flags |= 2), a ? (this.scrollAnchorPos = e.changes.mapPos(a.from, -1), this.scrollAnchorHeight = a.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height);
    let l = s.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
    (n && (n.range.head < l.from || n.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, n));
    let u = !e.changes.empty || e.flags & 2 || l.from != this.viewport.from || l.to != this.viewport.to;
    this.viewport = l, this.updateForViewport(), u && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(), n && (this.scrollTarget = n), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(NH) && (this.mustEnforceCursorAssoc = !0);
  }
  measure(e) {
    let n = e.contentDOM, i = window.getComputedStyle(n), r = this.heightOracle, s = i.whiteSpace;
    this.defaultTextDirection = i.direction == "rtl" ? Tn.RTL : Tn.LTR;
    let o = this.heightOracle.mustRefreshForWrapping(s), a = n.getBoundingClientRect(), l = o || this.mustMeasureContent || this.contentDOMHeight != a.height;
    this.contentDOMHeight = a.height, this.mustMeasureContent = !1;
    let u = 0, f = 0;
    if (a.width && a.height) {
      let { scaleX: E, scaleY: M } = oH(n, a);
      (this.scaleX != E || this.scaleY != M) && (this.scaleX = E, this.scaleY = M, u |= 8, o = l = !0);
    }
    let d = (parseInt(i.paddingTop) || 0) * this.scaleY, h = (parseInt(i.paddingBottom) || 0) * this.scaleY;
    (this.paddingTop != d || this.paddingBottom != h) && (this.paddingTop = d, this.paddingBottom = h, u |= 10), this.editorWidth != e.scrollDOM.clientWidth && (r.lineWrapping && (l = !0), this.editorWidth = e.scrollDOM.clientWidth, u |= 8);
    let m = e.scrollDOM.scrollTop * this.scaleY;
    this.scrollTop != m && (this.scrollAnchorHeight = -1, this.scrollTop = m), this.scrolledToBottom = uH(e.scrollDOM);
    let g = (this.printing ? Xxe : Vxe)(n, this.paddingTop), w = g.top - this.pixelViewport.top, x = g.bottom - this.pixelViewport.bottom;
    this.pixelViewport = g;
    let _ = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
    if (_ != this.inView && (this.inView = _, _ && (l = !0)), !this.inView && !this.scrollTarget)
      return 0;
    let S = a.width;
    if ((this.contentDOMWidth != S || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = a.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 8), l) {
      let E = e.docView.measureVisibleLineHeights(this.viewport);
      if (r.mustRefreshForHeights(E) && (o = !0), o || r.lineWrapping && Math.abs(S - this.contentDOMWidth) > r.charWidth) {
        let { lineHeight: M, charWidth: $, textHeight: P } = e.docView.measureTextSize();
        o = M > 0 && r.refresh(s, M, $, P, S / $, E), o && (e.docView.minWidth = 0, u |= 8);
      }
      w > 0 && x > 0 ? f = Math.max(w, x) : w < 0 && x < 0 && (f = Math.min(w, x)), r.heightChanged = !1;
      for (let M of this.viewports) {
        let $ = M.from == this.viewport.from ? E : e.docView.measureVisibleLineHeights(M);
        this.heightMap = (o ? ts.empty().applyChanges(this.stateDeco, Kt.empty, this.heightOracle, [new fo(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(r, 0, o, new Qxe(M.from, $));
      }
      r.heightChanged && (u |= 2);
    }
    let C = !this.viewportIsAppropriate(this.viewport, f) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
    return C && (this.viewport = this.getViewport(f, this.scrollTarget)), this.updateForViewport(), (u & 2 || C) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), u |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), u;
  }
  get visibleTop() {
    return this.scaler.fromDOM(this.pixelViewport.top);
  }
  get visibleBottom() {
    return this.scaler.fromDOM(this.pixelViewport.bottom);
  }
  getViewport(e, n) {
    let i = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), r = this.heightMap, s = this.heightOracle, { visibleTop: o, visibleBottom: a } = this, l = new mb(r.lineAt(o - i * 1e3, _n.ByHeight, s, 0, 0).from, r.lineAt(a + (1 - i) * 1e3, _n.ByHeight, s, 0, 0).to);
    if (n) {
      let { head: u } = n.range;
      if (u < l.from || u > l.to) {
        let f = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), d = r.lineAt(u, _n.ByPos, s, 0, 0), h;
        n.y == "center" ? h = (d.top + d.bottom) / 2 - f / 2 : n.y == "start" || n.y == "nearest" && u < l.from ? h = d.top : h = d.bottom - f, l = new mb(r.lineAt(h - 1e3 / 2, _n.ByHeight, s, 0, 0).from, r.lineAt(h + f + 1e3 / 2, _n.ByHeight, s, 0, 0).to);
      }
    }
    return l;
  }
  mapViewport(e, n) {
    let i = n.mapPos(e.from, -1), r = n.mapPos(e.to, 1);
    return new mb(this.heightMap.lineAt(i, _n.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(r, _n.ByPos, this.heightOracle, 0, 0).to);
  }
  // Checks if a given viewport covers the visible part of the
  // document and not too much beyond that.
  viewportIsAppropriate({ from: e, to: n }, i = 0) {
    if (!this.inView)
      return !0;
    let { top: r } = this.heightMap.lineAt(e, _n.ByPos, this.heightOracle, 0, 0), { bottom: s } = this.heightMap.lineAt(n, _n.ByPos, this.heightOracle, 0, 0), { visibleTop: o, visibleBottom: a } = this;
    return (e == 0 || r <= o - Math.max(10, Math.min(
      -i,
      250
      /* VP.MaxCoverMargin */
    ))) && (n == this.state.doc.length || s >= a + Math.max(10, Math.min(
      i,
      250
      /* VP.MaxCoverMargin */
    ))) && r > o - 2 * 1e3 && s < a + 2 * 1e3;
  }
  mapLineGaps(e, n) {
    if (!e.length || n.empty)
      return e;
    let i = [];
    for (let r of e)
      n.touchesRange(r.from, r.to) || i.push(new K3(n.mapPos(r.from), n.mapPos(r.to), r.size));
    return i;
  }
  // Computes positions in the viewport where the start or end of a
  // line should be hidden, trying to reuse existing line gaps when
  // appropriate to avoid unneccesary redraws.
  // Uses crude character-counting for the positioning and sizing,
  // since actual DOM coordinates aren't always available and
  // predictable. Relies on generous margins (see LG.Margin) to hide
  // the artifacts this might produce from the user.
  ensureLineGaps(e, n) {
    let i = this.heightOracle.lineWrapping, r = i ? 1e4 : 2e3, s = r >> 1, o = r << 1;
    if (this.defaultTextDirection != Tn.LTR && !i)
      return [];
    let a = [], l = (u, f, d, h) => {
      if (f - u < s)
        return;
      let m = this.state.selection.main, g = [m.from];
      m.empty || g.push(m.to);
      for (let x of g)
        if (x > u && x < f) {
          l(u, x - 10, d, h), l(x + 10, f, d, h);
          return;
        }
      let w = Jxe(e, (x) => x.from >= d.from && x.to <= d.to && Math.abs(x.from - u) < s && Math.abs(x.to - f) < s && !g.some((_) => x.from < _ && x.to > _));
      if (!w) {
        if (f < d.to && n && i && n.visibleRanges.some((x) => x.from <= f && x.to >= f)) {
          let x = n.moveToLineBoundary(he.cursor(f), !1, !0).head;
          x > u && (f = x);
        }
        w = new K3(u, f, this.gapSize(d, u, f, h));
      }
      a.push(w);
    };
    for (let u of this.viewportLines) {
      if (u.length < o)
        continue;
      let f = Kxe(u.from, u.to, this.stateDeco);
      if (f.total < o)
        continue;
      let d = this.scrollTarget ? this.scrollTarget.range.head : null, h, m;
      if (i) {
        let g = r / this.heightOracle.lineLength * this.heightOracle.lineHeight, w, x;
        if (d != null) {
          let _ = vb(f, d), S = ((this.visibleBottom - this.visibleTop) / 2 + g) / u.height;
          w = _ - S, x = _ + S;
        } else
          w = (this.visibleTop - u.top - g) / u.height, x = (this.visibleBottom - u.top + g) / u.height;
        h = gb(f, w), m = gb(f, x);
      } else {
        let g = f.total * this.heightOracle.charWidth, w = r * this.heightOracle.charWidth, x, _;
        if (d != null) {
          let S = vb(f, d), C = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + w) / g;
          x = S - C, _ = S + C;
        } else
          x = (this.pixelViewport.left - w) / g, _ = (this.pixelViewport.right + w) / g;
        h = gb(f, x), m = gb(f, _);
      }
      h > u.from && l(u.from, h, u, f), m < u.to && l(m, u.to, u, f);
    }
    return a;
  }
  gapSize(e, n, i, r) {
    let s = vb(r, i) - vb(r, n);
    return this.heightOracle.lineWrapping ? e.height * s : r.total * this.heightOracle.charWidth * s;
  }
  updateLineGaps(e) {
    K3.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = it.set(e.map((n) => n.draw(this, this.heightOracle.lineWrapping))));
  }
  computeVisibleRanges() {
    let e = this.stateDeco;
    this.lineGaps.length && (e = e.concat(this.lineGapDeco));
    let n = [];
    Qt.spans(e, this.viewport.from, this.viewport.to, {
      span(r, s) {
        n.push({ from: r, to: s });
      },
      point() {
      }
    }, 20);
    let i = n.length != this.visibleRanges.length || this.visibleRanges.some((r, s) => r.from != n[s].from || r.to != n[s].to);
    return this.visibleRanges = n, i ? 4 : 0;
  }
  lineBlockAt(e) {
    return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || sg(this.heightMap.lineAt(e, _n.ByPos, this.heightOracle, 0, 0), this.scaler);
  }
  lineBlockAtHeight(e) {
    return sg(this.heightMap.lineAt(this.scaler.fromDOM(e), _n.ByHeight, this.heightOracle, 0, 0), this.scaler);
  }
  scrollAnchorAt(e) {
    let n = this.lineBlockAtHeight(e + 8);
    return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
  }
  elementAtHeight(e) {
    return sg(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
  }
  get docHeight() {
    return this.scaler.toDOM(this.heightMap.height);
  }
  get contentHeight() {
    return this.docHeight + this.paddingTop + this.paddingBottom;
  }
}
class mb {
  constructor(e, n) {
    this.from = e, this.to = n;
  }
}
function Kxe(t, e, n) {
  let i = [], r = t, s = 0;
  return Qt.spans(n, t, e, {
    span() {
    },
    point(o, a) {
      o > r && (i.push({ from: r, to: o }), s += o - r), r = a;
    }
  }, 20), r < e && (i.push({ from: r, to: e }), s += e - r), { total: s, ranges: i };
}
function gb({ total: t, ranges: e }, n) {
  if (n <= 0)
    return e[0].from;
  if (n >= 1)
    return e[e.length - 1].to;
  let i = Math.floor(t * n);
  for (let r = 0; ; r++) {
    let { from: s, to: o } = e[r], a = o - s;
    if (i <= a)
      return s + i;
    i -= a;
  }
}
function vb(t, e) {
  let n = 0;
  for (let { from: i, to: r } of t.ranges) {
    if (e <= r) {
      n += e - i;
      break;
    }
    n += r - i;
  }
  return n / t.total;
}
function Jxe(t, e) {
  for (let n of t)
    if (e(n))
      return n;
}
const NA = {
  toDOM(t) {
    return t;
  },
  fromDOM(t) {
    return t;
  },
  scale: 1
};
class e_e {
  constructor(e, n, i) {
    let r = 0, s = 0, o = 0;
    this.viewports = i.map(({ from: a, to: l }) => {
      let u = n.lineAt(a, _n.ByPos, e, 0, 0).top, f = n.lineAt(l, _n.ByPos, e, 0, 0).bottom;
      return r += f - u, { from: a, to: l, top: u, bottom: f, domTop: 0, domBottom: 0 };
    }), this.scale = (7e6 - r) / (n.height - r);
    for (let a of this.viewports)
      a.domTop = o + (a.top - s) * this.scale, o = a.domBottom = a.domTop + (a.bottom - a.top), s = a.bottom;
  }
  toDOM(e) {
    for (let n = 0, i = 0, r = 0; ; n++) {
      let s = n < this.viewports.length ? this.viewports[n] : null;
      if (!s || e < s.top)
        return r + (e - i) * this.scale;
      if (e <= s.bottom)
        return s.domTop + (e - s.top);
      i = s.bottom, r = s.domBottom;
    }
  }
  fromDOM(e) {
    for (let n = 0, i = 0, r = 0; ; n++) {
      let s = n < this.viewports.length ? this.viewports[n] : null;
      if (!s || e < s.domTop)
        return i + (e - r) / this.scale;
      if (e <= s.domBottom)
        return s.top + (e - s.domTop);
      i = s.bottom, r = s.domBottom;
    }
  }
}
function sg(t, e) {
  if (e.scale == 1)
    return t;
  let n = e.toDOM(t.top), i = e.toDOM(t.bottom);
  return new va(t.from, t.length, n, i - n, Array.isArray(t._content) ? t._content.map((r) => sg(r, e)) : t._content);
}
const bb = /* @__PURE__ */ Qe.define({ combine: (t) => t.join(" ") }), lC = /* @__PURE__ */ Qe.define({ combine: (t) => t.indexOf(!0) > -1 }), uC = /* @__PURE__ */ qu.newName(), XH = /* @__PURE__ */ qu.newName(), GH = /* @__PURE__ */ qu.newName(), KH = { "&light": "." + XH, "&dark": "." + GH };
function cC(t, e, n) {
  return new qu(e, {
    finish(i) {
      return /&/.test(i) ? i.replace(/&\w*/, (r) => {
        if (r == "&")
          return t;
        if (!n || !n[r])
          throw new RangeError(`Unsupported selector: ${r}`);
        return n[r];
      }) : t + " " + i;
    }
  });
}
const t_e = /* @__PURE__ */ cC("." + uC, {
  "&": {
    position: "relative !important",
    boxSizing: "border-box",
    "&.cm-focused": {
      // Provide a simple default outline to make sure a focused
      // editor is visually distinct. Can't leave the default behavior
      // because that will apply to the content element, which is
      // inside the scrollable container and doesn't include the
      // gutters. We also can't use an 'auto' outline, since those
      // are, for some reason, drawn behind the element content, which
      // will cause things like the active line background to cover
      // the outline (#297).
      outline: "1px dotted #212121"
    },
    display: "flex !important",
    flexDirection: "column"
  },
  ".cm-scroller": {
    display: "flex !important",
    alignItems: "flex-start !important",
    fontFamily: "monospace",
    lineHeight: 1.4,
    height: "100%",
    overflowX: "auto",
    position: "relative",
    zIndex: 0
  },
  ".cm-content": {
    margin: 0,
    flexGrow: 2,
    flexShrink: 0,
    display: "block",
    whiteSpace: "pre",
    wordWrap: "normal",
    // https://github.com/codemirror/dev/issues/456
    boxSizing: "border-box",
    minHeight: "100%",
    padding: "4px 0",
    outline: "none",
    "&[contenteditable=true]": {
      WebkitUserModify: "read-write-plaintext-only"
    }
  },
  ".cm-lineWrapping": {
    whiteSpace_fallback: "pre-wrap",
    // For IE
    whiteSpace: "break-spaces",
    wordBreak: "break-word",
    // For Safari, which doesn't support overflow-wrap: anywhere
    overflowWrap: "anywhere",
    flexShrink: 1
  },
  "&light .cm-content": { caretColor: "black" },
  "&dark .cm-content": { caretColor: "white" },
  ".cm-line": {
    display: "block",
    padding: "0 2px 0 6px"
  },
  ".cm-layer": {
    position: "absolute",
    left: 0,
    top: 0,
    contain: "size style",
    "& > *": {
      position: "absolute"
    }
  },
  "&light .cm-selectionBackground": {
    background: "#d9d9d9"
  },
  "&dark .cm-selectionBackground": {
    background: "#222"
  },
  "&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
    background: "#d7d4f0"
  },
  "&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
    background: "#233"
  },
  ".cm-cursorLayer": {
    pointerEvents: "none"
  },
  "&.cm-focused > .cm-scroller > .cm-cursorLayer": {
    animation: "steps(1) cm-blink 1.2s infinite"
  },
  // Two animations defined so that we can switch between them to
  // restart the animation without forcing another style
  // recomputation.
  "@keyframes cm-blink": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  "@keyframes cm-blink2": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  ".cm-cursor, .cm-dropCursor": {
    borderLeft: "1.2px solid black",
    marginLeft: "-0.6px",
    pointerEvents: "none"
  },
  ".cm-cursor": {
    display: "none"
  },
  "&dark .cm-cursor": {
    borderLeftColor: "#444"
  },
  ".cm-dropCursor": {
    position: "absolute"
  },
  "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": {
    display: "block"
  },
  ".cm-iso": {
    unicodeBidi: "isolate"
  },
  ".cm-announced": {
    position: "fixed",
    top: "-10000px"
  },
  "@media print": {
    ".cm-announced": { display: "none" }
  },
  "&light .cm-activeLine": { backgroundColor: "#cceeff44" },
  "&dark .cm-activeLine": { backgroundColor: "#99eeff33" },
  "&light .cm-specialChar": { color: "red" },
  "&dark .cm-specialChar": { color: "#f78" },
  ".cm-gutters": {
    flexShrink: 0,
    display: "flex",
    height: "100%",
    boxSizing: "border-box",
    insetInlineStart: 0,
    zIndex: 200
  },
  "&light .cm-gutters": {
    backgroundColor: "#f5f5f5",
    color: "#6c6c6c",
    borderRight: "1px solid #ddd"
  },
  "&dark .cm-gutters": {
    backgroundColor: "#333338",
    color: "#ccc"
  },
  ".cm-gutter": {
    display: "flex !important",
    // Necessary -- prevents margin collapsing
    flexDirection: "column",
    flexShrink: 0,
    boxSizing: "border-box",
    minHeight: "100%",
    overflow: "hidden"
  },
  ".cm-gutterElement": {
    boxSizing: "border-box"
  },
  ".cm-lineNumbers .cm-gutterElement": {
    padding: "0 3px 0 5px",
    minWidth: "20px",
    textAlign: "right",
    whiteSpace: "nowrap"
  },
  "&light .cm-activeLineGutter": {
    backgroundColor: "#e2f2ff"
  },
  "&dark .cm-activeLineGutter": {
    backgroundColor: "#222227"
  },
  ".cm-panels": {
    boxSizing: "border-box",
    position: "sticky",
    left: 0,
    right: 0
  },
  "&light .cm-panels": {
    backgroundColor: "#f5f5f5",
    color: "black"
  },
  "&light .cm-panels-top": {
    borderBottom: "1px solid #ddd"
  },
  "&light .cm-panels-bottom": {
    borderTop: "1px solid #ddd"
  },
  "&dark .cm-panels": {
    backgroundColor: "#333338",
    color: "white"
  },
  ".cm-tab": {
    display: "inline-block",
    overflow: "hidden",
    verticalAlign: "bottom"
  },
  ".cm-widgetBuffer": {
    verticalAlign: "text-top",
    height: "1em",
    width: 0,
    display: "inline"
  },
  ".cm-placeholder": {
    color: "#888",
    display: "inline-block",
    verticalAlign: "top"
  },
  ".cm-highlightSpace:before": {
    content: "attr(data-display)",
    position: "absolute",
    pointerEvents: "none",
    color: "#888"
  },
  ".cm-highlightTab": {
    backgroundImage: `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,
    backgroundSize: "auto 100%",
    backgroundPosition: "right 90%",
    backgroundRepeat: "no-repeat"
  },
  ".cm-trailingSpace": {
    backgroundColor: "#ff332255"
  },
  ".cm-button": {
    verticalAlign: "middle",
    color: "inherit",
    fontSize: "70%",
    padding: ".2em 1em",
    borderRadius: "1px"
  },
  "&light .cm-button": {
    backgroundImage: "linear-gradient(#eff1f5, #d9d9df)",
    border: "1px solid #888",
    "&:active": {
      backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)"
    }
  },
  "&dark .cm-button": {
    backgroundImage: "linear-gradient(#393939, #111)",
    border: "1px solid #888",
    "&:active": {
      backgroundImage: "linear-gradient(#111, #333)"
    }
  },
  ".cm-textfield": {
    verticalAlign: "middle",
    color: "inherit",
    fontSize: "70%",
    border: "1px solid silver",
    padding: ".2em .5em"
  },
  "&light .cm-textfield": {
    backgroundColor: "white"
  },
  "&dark .cm-textfield": {
    border: "1px solid #555",
    backgroundColor: "inherit"
  }
}, KH), og = "";
class n_e {
  constructor(e, n) {
    this.points = e, this.text = "", this.lineSeparator = n.facet(zt.lineSeparator);
  }
  append(e) {
    this.text += e;
  }
  lineBreak() {
    this.text += og;
  }
  readRange(e, n) {
    if (!e)
      return this;
    let i = e.parentNode;
    for (let r = e; ; ) {
      this.findPointBefore(i, r);
      let s = this.text.length;
      this.readNode(r);
      let o = r.nextSibling;
      if (o == n)
        break;
      let a = En.get(r), l = En.get(o);
      (a && l ? a.breakAfter : (a ? a.breakAfter : AA(r)) || AA(o) && (r.nodeName != "BR" || r.cmIgnore) && this.text.length > s) && this.lineBreak(), r = o;
    }
    return this.findPointBefore(i, n), this;
  }
  readTextNode(e) {
    let n = e.nodeValue;
    for (let i of this.points)
      i.node == e && (i.pos = this.text.length + Math.min(i.offset, n.length));
    for (let i = 0, r = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
      let s = -1, o = 1, a;
      if (this.lineSeparator ? (s = n.indexOf(this.lineSeparator, i), o = this.lineSeparator.length) : (a = r.exec(n)) && (s = a.index, o = a[0].length), this.append(n.slice(i, s < 0 ? n.length : s)), s < 0)
        break;
      if (this.lineBreak(), o > 1)
        for (let l of this.points)
          l.node == e && l.pos > this.text.length && (l.pos -= o - 1);
      i = s + o;
    }
  }
  readNode(e) {
    if (e.cmIgnore)
      return;
    let n = En.get(e), i = n && n.overrideDOMText;
    if (i != null) {
      this.findPointInside(e, i.length);
      for (let r = i.iter(); !r.next().done; )
        r.lineBreak ? this.lineBreak() : this.append(r.value);
    } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null);
  }
  findPointBefore(e, n) {
    for (let i of this.points)
      i.node == e && e.childNodes[i.offset] == n && (i.pos = this.text.length);
  }
  findPointInside(e, n) {
    for (let i of this.points)
      (e.nodeType == 3 ? i.node == e : e.contains(i.node)) && (i.pos = this.text.length + (i_e(e, i.node, i.offset) ? n : 0));
  }
}
function i_e(t, e, n) {
  for (; ; ) {
    if (!e || n < _l(e))
      return !1;
    if (e == t)
      return !0;
    n = u0(e) + 1, e = e.parentNode;
  }
}
function AA(t) {
  return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName);
}
class DA {
  constructor(e, n) {
    this.node = e, this.offset = n, this.pos = -1;
  }
}
class r_e {
  constructor(e, n, i, r) {
    this.typeOver = r, this.bounds = null, this.text = "";
    let { impreciseHead: s, impreciseAnchor: o } = e.docView;
    if (e.state.readOnly && n > -1)
      this.newSel = null;
    else if (n > -1 && (this.bounds = e.docView.domBoundsAround(n, i, 0))) {
      let a = s || o ? [] : a_e(e), l = new n_e(a, e.state);
      l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = l_e(a, this.bounds.from);
    } else {
      let a = e.observer.selectionRange, l = s && s.node == a.focusNode && s.offset == a.focusOffset || !Y4(e.contentDOM, a.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(a.focusNode, a.focusOffset), u = o && o.node == a.anchorNode && o.offset == a.anchorOffset || !Y4(e.contentDOM, a.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(a.anchorNode, a.anchorOffset), f = e.viewport;
      if (qe.ios && e.state.selection.main.empty && l != u && (f.from > 0 || f.to < e.state.doc.length)) {
        let d = f.from - Math.min(l, u), h = f.to - Math.max(l, u);
        (d == 0 || d == 1) && (h == 0 || h == -1) && (l = 0, u = e.state.doc.length);
      }
      this.newSel = he.single(u, l);
    }
  }
}
function JH(t, e) {
  let n, { newSel: i } = e, r = t.state.selection.main, s = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1;
  if (e.bounds) {
    let { from: o, to: a } = e.bounds, l = r.from, u = null;
    (s === 8 || qe.android && e.text.length < a - o) && (l = r.to, u = "end");
    let f = o_e(t.state.doc.sliceString(o, a, og), e.text, l - o, u);
    f && (qe.chrome && s == 13 && f.toB == f.from + 2 && e.text.slice(f.from, f.toB) == og + og && f.toB--, n = {
      from: o + f.from,
      to: o + f.toA,
      insert: Kt.of(e.text.slice(f.from, f.toB).split(og))
    });
  } else i && (!t.hasFocus && t.state.facet(m2) || i.main.eq(r)) && (i = null);
  if (!n && !i)
    return !1;
  if (!n && e.typeOver && !r.empty && i && i.main.empty ? n = { from: r.from, to: r.to, insert: t.state.doc.slice(r.from, r.to) } : n && n.from >= r.from && n.to <= r.to && (n.from != r.from || n.to != r.to) && r.to - r.from - (n.to - n.from) <= 4 ? n = {
    from: r.from,
    to: r.to,
    insert: t.state.doc.slice(r.from, n.from).append(n.insert).append(t.state.doc.slice(n.to, r.to))
  } : (qe.mac || qe.android) && n && n.from == n.to && n.from == r.head - 1 && /^\. ?$/.test(n.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (i && n.insert.length == 2 && (i = he.single(i.main.anchor - 1, i.main.head - 1)), n = { from: r.from, to: r.to, insert: Kt.of([" "]) }) : qe.chrome && n && n.from == n.to && n.from == r.head && n.insert.toString() == `
 ` && t.lineWrapping && (i && (i = he.single(i.main.anchor - 1, i.main.head - 1)), n = { from: r.from, to: r.to, insert: Kt.of([" "]) }), n) {
    if (qe.ios && t.inputState.flushIOSKey() || qe.android && (n.from == r.from && n.to == r.to && n.insert.length == 1 && n.insert.lines == 2 && ph(t.contentDOM, "Enter", 13) || (n.from == r.from - 1 && n.to == r.to && n.insert.length == 0 || s == 8 && n.insert.length < n.to - n.from && n.to > r.head) && ph(t.contentDOM, "Backspace", 8) || n.from == r.from && n.to == r.to + 1 && n.insert.length == 0 && ph(t.contentDOM, "Delete", 46)))
      return !0;
    let o = n.insert.toString();
    t.inputState.composing >= 0 && t.inputState.composing++;
    let a, l = () => a || (a = s_e(t, n, i));
    return t.state.facet(TH).some((u) => u(t, n.from, n.to, o, l)) || t.dispatch(l()), !0;
  } else if (i && !i.main.eq(r)) {
    let o = !1, a = "select";
    return t.inputState.lastSelectionTime > Date.now() - 50 && (t.inputState.lastSelectionOrigin == "select" && (o = !0), a = t.inputState.lastSelectionOrigin), t.dispatch({ selection: i, scrollIntoView: o, userEvent: a }), !0;
  } else
    return !1;
}
function s_e(t, e, n) {
  let i, r = t.state, s = r.selection.main;
  if (e.from >= s.from && e.to <= s.to && e.to - e.from >= (s.to - s.from) / 3 && (!n || n.main.empty && n.main.from == e.from + e.insert.length) && t.inputState.composing < 0) {
    let a = s.from < e.from ? r.sliceDoc(s.from, e.from) : "", l = s.to > e.to ? r.sliceDoc(e.to, s.to) : "";
    i = r.replaceSelection(t.state.toText(a + e.insert.sliceString(0, void 0, t.state.lineBreak) + l));
  } else {
    let a = r.changes(e), l = n && n.main.to <= a.newLength ? n.main : void 0;
    if (r.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= s.to && e.to >= s.to - 10) {
      let u = t.state.sliceDoc(e.from, e.to), f, d = n && RH(t, n.main.head);
      if (d) {
        let g = e.insert.length - (e.to - e.from);
        f = { from: d.from, to: d.to - g };
      } else
        f = t.state.doc.lineAt(s.head);
      let h = s.to - e.to, m = s.to - s.from;
      i = r.changeByRange((g) => {
        if (g.from == s.from && g.to == s.to)
          return { changes: a, range: l || g.map(a) };
        let w = g.to - h, x = w - u.length;
        if (g.to - g.from != m || t.state.sliceDoc(x, w) != u || // Unfortunately, there's no way to make multiple
        // changes in the same node work without aborting
        // composition, so cursors in the composition range are
        // ignored.
        g.to >= f.from && g.from <= f.to)
          return { range: g };
        let _ = r.changes({ from: x, to: w, insert: e.insert }), S = g.to - s.to;
        return {
          changes: _,
          range: l ? he.range(Math.max(0, l.anchor + S), Math.max(0, l.head + S)) : g.map(_)
        };
      });
    } else
      i = {
        changes: a,
        selection: l && r.selection.replaceRange(l)
      };
  }
  let o = "input.type";
  return (t.composing || t.inputState.compositionPendingChange && t.inputState.compositionEndedAt > Date.now() - 50) && (t.inputState.compositionPendingChange = !1, o += ".compose", t.inputState.compositionFirstChange && (o += ".start", t.inputState.compositionFirstChange = !1)), r.update(i, { userEvent: o, scrollIntoView: !0 });
}
function o_e(t, e, n, i) {
  let r = Math.min(t.length, e.length), s = 0;
  for (; s < r && t.charCodeAt(s) == e.charCodeAt(s); )
    s++;
  if (s == r && t.length == e.length)
    return null;
  let o = t.length, a = e.length;
  for (; o > 0 && a > 0 && t.charCodeAt(o - 1) == e.charCodeAt(a - 1); )
    o--, a--;
  if (i == "end") {
    let l = Math.max(0, s - Math.min(o, a));
    n -= o + l - s;
  }
  if (o < s && t.length < e.length) {
    let l = n <= s && n >= o ? s - n : 0;
    s -= l, a = s + (a - o), o = s;
  } else if (a < s) {
    let l = n <= s && n >= a ? s - n : 0;
    s -= l, o = s + (o - a), a = s;
  }
  return { from: s, toA: o, toB: a };
}
function a_e(t) {
  let e = [];
  if (t.root.activeElement != t.contentDOM)
    return e;
  let { anchorNode: n, anchorOffset: i, focusNode: r, focusOffset: s } = t.observer.selectionRange;
  return n && (e.push(new DA(n, i)), (r != n || s != i) && e.push(new DA(r, s))), e;
}
function l_e(t, e) {
  if (t.length == 0)
    return null;
  let n = t[0].pos, i = t.length == 2 ? t[1].pos : n;
  return n > -1 && i > -1 ? he.single(n + e, i + e) : null;
}
const u_e = {
  childList: !0,
  characterData: !0,
  subtree: !0,
  attributes: !0,
  characterDataOldValue: !0
}, J3 = qe.ie && qe.ie_version <= 11;
class c_e {
  constructor(e) {
    this.view = e, this.active = !1, this.selectionRange = new Z2e(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((n) => {
      for (let i of n)
        this.queue.push(i);
      (qe.ie && qe.ie_version <= 11 || qe.ios && e.composing) && n.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
    }), J3 && (this.onCharData = (n) => {
      this.queue.push({
        target: n.target,
        type: "characterData",
        oldValue: n.prevValue
      }), this.flushSoon();
    }), this.onSelectionChange = this.onSelectionChange.bind(this), this.onResize = this.onResize.bind(this), this.onPrint = this.onPrint.bind(this), this.onScroll = this.onScroll.bind(this), typeof ResizeObserver == "function" && (this.resizeScroll = new ResizeObserver(() => {
      var n;
      ((n = this.view.docView) === null || n === void 0 ? void 0 : n.lastUpdate) < Date.now() - 75 && this.onResize();
    }), this.resizeScroll.observe(e.scrollDOM)), this.addWindowListeners(this.win = e.win), this.start(), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver((n) => {
      this.parentCheck < 0 && (this.parentCheck = setTimeout(this.listenForScroll.bind(this), 1e3)), n.length > 0 && n[n.length - 1].intersectionRatio > 0 != this.intersecting && (this.intersecting = !this.intersecting, this.intersecting != this.view.inView && this.onScrollChanged(document.createEvent("Event")));
    }, { threshold: [0, 1e-3] }), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver((n) => {
      n.length > 0 && n[n.length - 1].intersectionRatio > 0 && this.onScrollChanged(document.createEvent("Event"));
    }, {})), this.listenForScroll(), this.readSelectionRange();
  }
  onScrollChanged(e) {
    this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure();
  }
  onScroll(e) {
    this.intersecting && this.flush(!1), this.onScrollChanged(e);
  }
  onResize() {
    this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(() => {
      this.resizeTimeout = -1, this.view.requestMeasure();
    }, 50));
  }
  onPrint() {
    this.view.viewState.printing = !0, this.view.measure(), setTimeout(() => {
      this.view.viewState.printing = !1, this.view.requestMeasure();
    }, 500);
  }
  updateGaps(e) {
    if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((n, i) => n != e[i]))) {
      this.gapIntersection.disconnect();
      for (let n of e)
        this.gapIntersection.observe(n);
      this.gaps = e;
    }
  }
  onSelectionChange(e) {
    let n = this.selectionChanged;
    if (!this.readSelectionRange() || this.delayedAndroidKey)
      return;
    let { view: i } = this, r = this.selectionRange;
    if (i.state.facet(m2) ? i.root.activeElement != this.dom : !ly(i.dom, r))
      return;
    let s = r.anchorNode && i.docView.nearest(r.anchorNode);
    if (s && s.ignoreEvent(e)) {
      n || (this.selectionChanged = !1);
      return;
    }
    (qe.ie && qe.ie_version <= 11 || qe.android && qe.chrome) && !i.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
    r.focusNode && Tg(r.focusNode, r.focusOffset, r.anchorNode, r.anchorOffset) ? this.flushSoon() : this.flush(!1);
  }
  readSelectionRange() {
    let { view: e } = this, n = qe.safari && e.root.nodeType == 11 && W2e(this.dom.ownerDocument) == this.dom && f_e(this.view) || _w(e.root);
    if (!n || this.selectionRange.eq(n))
      return !1;
    let i = ly(this.dom, n);
    return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Y2e(this.dom, n) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(n), i && (this.selectionChanged = !0), !0);
  }
  setSelectionRange(e, n) {
    this.selectionRange.set(e.node, e.offset, n.node, n.offset), this.selectionChanged = !1;
  }
  clearSelectionRange() {
    this.selectionRange.set(null, 0, null, 0);
  }
  listenForScroll() {
    this.parentCheck = -1;
    let e = 0, n = null;
    for (let i = this.dom; i; )
      if (i.nodeType == 1)
        !n && e < this.scrollTargets.length && this.scrollTargets[e] == i ? e++ : n || (n = this.scrollTargets.slice(0, e)), n && n.push(i), i = i.assignedSlot || i.parentNode;
      else if (i.nodeType == 11)
        i = i.host;
      else
        break;
    if (e < this.scrollTargets.length && !n && (n = this.scrollTargets.slice(0, e)), n) {
      for (let i of this.scrollTargets)
        i.removeEventListener("scroll", this.onScroll);
      for (let i of this.scrollTargets = n)
        i.addEventListener("scroll", this.onScroll);
    }
  }
  ignore(e) {
    if (!this.active)
      return e();
    try {
      return this.stop(), e();
    } finally {
      this.start(), this.clear();
    }
  }
  start() {
    this.active || (this.observer.observe(this.dom, u_e), J3 && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0);
  }
  stop() {
    this.active && (this.active = !1, this.observer.disconnect(), J3 && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData));
  }
  // Throw away any pending changes
  clear() {
    this.processRecords(), this.queue.length = 0, this.selectionChanged = !1;
  }
  // Chrome Android, especially in combination with GBoard, not only
  // doesn't reliably fire regular key events, but also often
  // surrounds the effect of enter or backspace with a bunch of
  // composition events that, when interrupted, cause text duplication
  // or other kinds of corruption. This hack makes the editor back off
  // from handling DOM changes for a moment when such a key is
  // detected (via beforeinput or keydown), and then tries to flush
  // them or, if that has no effect, dispatches the given key.
  delayAndroidKey(e, n) {
    var i;
    if (!this.delayedAndroidKey) {
      let r = () => {
        let s = this.delayedAndroidKey;
        s && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = s.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && s.force && ph(this.dom, s.key, s.keyCode));
      };
      this.flushingAndroidKey = this.view.win.requestAnimationFrame(r);
    }
    (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = {
      key: e,
      keyCode: n,
      // Only run the key handler when no changes are detected if
      // this isn't coming right after another change, in which case
      // it is probably part of a weird chain of updates, and should
      // be ignored if it returns the DOM to its previous state.
      force: this.lastChange < Date.now() - 50 || !!(!((i = this.delayedAndroidKey) === null || i === void 0) && i.force)
    });
  }
  clearDelayedAndroidKey() {
    this.win.cancelAnimationFrame(this.flushingAndroidKey), this.delayedAndroidKey = null, this.flushingAndroidKey = -1;
  }
  flushSoon() {
    this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame(() => {
      this.delayedFlush = -1, this.flush();
    }));
  }
  forceFlush() {
    this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), this.delayedFlush = -1), this.flush();
  }
  pendingRecords() {
    for (let e of this.observer.takeRecords())
      this.queue.push(e);
    return this.queue;
  }
  processRecords() {
    let e = this.pendingRecords();
    e.length && (this.queue = []);
    let n = -1, i = -1, r = !1;
    for (let s of e) {
      let o = this.readMutation(s);
      o && (o.typeOver && (r = !0), n == -1 ? { from: n, to: i } = o : (n = Math.min(o.from, n), i = Math.max(o.to, i)));
    }
    return { from: n, to: i, typeOver: r };
  }
  readChange() {
    let { from: e, to: n, typeOver: i } = this.processRecords(), r = this.selectionChanged && ly(this.dom, this.selectionRange);
    if (e < 0 && !r)
      return null;
    e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
    let s = new r_e(this.view, e, n, i);
    return this.view.docView.domChanged = { newSel: s.newSel ? s.newSel.main : null }, s;
  }
  // Apply pending changes, if any
  flush(e = !0) {
    if (this.delayedFlush >= 0 || this.delayedAndroidKey)
      return !1;
    e && this.readSelectionRange();
    let n = this.readChange();
    if (!n)
      return this.view.requestMeasure(), !1;
    let i = this.view.state, r = JH(this.view, n);
    return this.view.state == i && this.view.update([]), r;
  }
  readMutation(e) {
    let n = this.view.docView.nearest(e.target);
    if (!n || n.ignoreMutation(e))
      return null;
    if (n.markDirty(e.type == "attributes"), e.type == "attributes" && (n.flags |= 4), e.type == "childList") {
      let i = PA(n, e.previousSibling || e.target.previousSibling, -1), r = PA(n, e.nextSibling || e.target.nextSibling, 1);
      return {
        from: i ? n.posAfter(i) : n.posAtStart,
        to: r ? n.posBefore(r) : n.posAtEnd,
        typeOver: !1
      };
    } else return e.type == "characterData" ? { from: n.posAtStart, to: n.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null;
  }
  setWindow(e) {
    e != this.win && (this.removeWindowListeners(this.win), this.win = e, this.addWindowListeners(this.win));
  }
  addWindowListeners(e) {
    e.addEventListener("resize", this.onResize), e.addEventListener("beforeprint", this.onPrint), e.addEventListener("scroll", this.onScroll), e.document.addEventListener("selectionchange", this.onSelectionChange);
  }
  removeWindowListeners(e) {
    e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange);
  }
  destroy() {
    var e, n, i;
    this.stop(), (e = this.intersection) === null || e === void 0 || e.disconnect(), (n = this.gapIntersection) === null || n === void 0 || n.disconnect(), (i = this.resizeScroll) === null || i === void 0 || i.disconnect();
    for (let r of this.scrollTargets)
      r.removeEventListener("scroll", this.onScroll);
    this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey);
  }
}
function PA(t, e, n) {
  for (; e; ) {
    let i = En.get(e);
    if (i && i.parent == t)
      return i;
    let r = e.parentNode;
    e = r != t.dom ? r : n > 0 ? e.nextSibling : e.previousSibling;
  }
  return null;
}
function f_e(t) {
  let e = null;
  function n(l) {
    l.preventDefault(), l.stopImmediatePropagation(), e = l.getTargetRanges()[0];
  }
  if (t.contentDOM.addEventListener("beforeinput", n, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", n, !0), !e)
    return null;
  let i = e.startContainer, r = e.startOffset, s = e.endContainer, o = e.endOffset, a = t.docView.domAtPos(t.state.selection.main.anchor);
  return Tg(a.node, a.offset, s, o) && ([i, r, s, o] = [s, o, i, r]), { anchorNode: i, anchorOffset: r, focusNode: s, focusOffset: o };
}
class Te {
  /**
  The current editor state.
  */
  get state() {
    return this.viewState.state;
  }
  /**
  To be able to display large documents without consuming too much
  memory or overloading the browser, CodeMirror only draws the
  code that is visible (plus a margin around it) to the DOM. This
  property tells you the extent of the current drawn viewport, in
  document positions.
  */
  get viewport() {
    return this.viewState.viewport;
  }
  /**
  When there are, for example, large collapsed ranges in the
  viewport, its size can be a lot bigger than the actual visible
  content. Thus, if you are doing something like styling the
  content in the viewport, it is preferable to only do so for
  these ranges, which are the subset of the viewport that is
  actually drawn.
  */
  get visibleRanges() {
    return this.viewState.visibleRanges;
  }
  /**
  Returns false when the editor is entirely scrolled out of view
  or otherwise hidden.
  */
  get inView() {
    return this.viewState.inView;
  }
  /**
  Indicates whether the user is currently composing text via
  [IME](https://en.wikipedia.org/wiki/Input_method), and at least
  one change has been made in the current composition.
  */
  get composing() {
    return this.inputState.composing > 0;
  }
  /**
  Indicates whether the user is currently in composing state. Note
  that on some platforms, like Android, this will be the case a
  lot, since just putting the cursor on a word starts a
  composition there.
  */
  get compositionStarted() {
    return this.inputState.composing >= 0;
  }
  /**
  The document or shadow root that the view lives in.
  */
  get root() {
    return this._root;
  }
  /**
  @internal
  */
  get win() {
    return this.dom.ownerDocument.defaultView || window;
  }
  /**
  Construct a new view. You'll want to either provide a `parent`
  option, or put `view.dom` into your document after creating a
  view, so that the user can see the editor.
  */
  constructor(e = {}) {
    this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom);
    let { dispatch: n } = e;
    this.dispatchTransactions = e.dispatchTransactions || n && ((i) => i.forEach((r) => n(r, this))) || ((i) => this.update(i)), this.dispatch = this.dispatch.bind(this), this._root = e.root || q2e(e.parent) || document, this.viewState = new MA(e.state || zt.create(e)), e.scrollTo && e.scrollTo.is(db) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(ig).map((i) => new V3(i));
    for (let i of this.plugins)
      i.update(this);
    this.observer = new c_e(this), this.inputState = new Cxe(this), this.inputState.ensureHandlers(this.plugins), this.docView = new dA(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure();
  }
  dispatch(...e) {
    let n = e.length == 1 && e[0] instanceof Jr ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
    this.dispatchTransactions(n, this);
  }
  /**
  Update the view for the given array of transactions. This will
  update the visible document and selection to match the state
  produced by the transactions, and notify view plugins of the
  change. You should usually call
  [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
  as a primitive.
  */
  update(e) {
    if (this.updateState != 0)
      throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
    let n = !1, i = !1, r, s = this.state;
    for (let h of e) {
      if (h.startState != s)
        throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");
      s = h.state;
    }
    if (this.destroyed) {
      this.viewState.state = s;
      return;
    }
    let o = this.hasFocus, a = 0, l = null;
    e.some((h) => h.annotation(ZH)) ? (this.inputState.notifiedFocused = o, a = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, l = qH(s, o), l || (a = 1));
    let u = this.observer.delayedAndroidKey, f = null;
    if (u ? (this.observer.clearDelayedAndroidKey(), f = this.observer.readChange(), (f && !this.state.doc.eq(s.doc) || !this.state.selection.eq(s.selection)) && (f = null)) : this.observer.clear(), s.facet(zt.phrases) != this.state.facet(zt.phrases))
      return this.setState(s);
    r = Ow.create(this, s, e), r.flags |= a;
    let d = this.viewState.scrollTarget;
    try {
      this.updateState = 2;
      for (let h of e) {
        if (d && (d = d.map(h.changes)), h.scrollIntoView) {
          let { main: m } = h.state.selection;
          d = new mh(m.empty ? m : he.cursor(m.head, m.head > m.anchor ? -1 : 1));
        }
        for (let m of h.effects)
          m.is(db) && (d = m.value.clip(this.state));
      }
      this.viewState.update(r, d), this.bidiCache = Sw.update(this.bidiCache, r.changes), r.empty || (this.updatePlugins(r), this.inputState.update(r)), n = this.docView.update(r), this.state.facet(rg) != this.styleModules && this.mountStyles(), i = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((h) => h.isUserEvent("select.pointer")));
    } finally {
      this.updateState = 0;
    }
    if (r.startState.facet(bb) != r.state.facet(bb) && (this.viewState.mustMeasureContent = !0), (n || i || d || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), !r.empty)
      for (let h of this.state.facet(rC))
        try {
          h(r);
        } catch (m) {
          co(this.state, m, "update listener");
        }
    (l || f) && Promise.resolve().then(() => {
      l && this.state == l.startState && this.dispatch(l), f && !JH(this, f) && u.force && ph(this.contentDOM, u.key, u.keyCode);
    });
  }
  /**
  Reset the view to the given state. (This will cause the entire
  document to be redrawn and all view plugins to be reinitialized,
  so you should probably only use it when the new state isn't
  derived from the old state. Otherwise, use
  [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
  */
  setState(e) {
    if (this.updateState != 0)
      throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
    if (this.destroyed) {
      this.viewState.state = e;
      return;
    }
    this.updateState = 2;
    let n = this.hasFocus;
    try {
      for (let i of this.plugins)
        i.destroy(this);
      this.viewState = new MA(e), this.plugins = e.facet(ig).map((i) => new V3(i)), this.pluginMap.clear();
      for (let i of this.plugins)
        i.update(this);
      this.docView.destroy(), this.docView = new dA(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
    } finally {
      this.updateState = 0;
    }
    n && this.focus(), this.requestMeasure();
  }
  updatePlugins(e) {
    let n = e.startState.facet(ig), i = e.state.facet(ig);
    if (n != i) {
      let r = [];
      for (let s of i) {
        let o = n.indexOf(s);
        if (o < 0)
          r.push(new V3(s));
        else {
          let a = this.plugins[o];
          a.mustUpdate = e, r.push(a);
        }
      }
      for (let s of this.plugins)
        s.mustUpdate != e && s.destroy(this);
      this.plugins = r, this.pluginMap.clear();
    } else
      for (let r of this.plugins)
        r.mustUpdate = e;
    for (let r = 0; r < this.plugins.length; r++)
      this.plugins[r].update(this);
    n != i && this.inputState.ensureHandlers(this.plugins);
  }
  /**
  @internal
  */
  measure(e = !0) {
    if (this.destroyed)
      return;
    if (this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey) {
      this.measureScheduled = -1, this.requestMeasure();
      return;
    }
    this.measureScheduled = 0, e && this.observer.forceFlush();
    let n = null, i = this.scrollDOM, r = i.scrollTop * this.scaleY, { scrollAnchorPos: s, scrollAnchorHeight: o } = this.viewState;
    Math.abs(r - this.viewState.scrollTop) > 1 && (o = -1), this.viewState.scrollAnchorHeight = -1;
    try {
      for (let a = 0; ; a++) {
        if (o < 0)
          if (uH(i))
            s = -1, o = this.viewState.heightMap.height;
          else {
            let m = this.viewState.scrollAnchorAt(r);
            s = m.from, o = m.top;
          }
        this.updateState = 1;
        let l = this.viewState.measure(this);
        if (!l && !this.measureRequests.length && this.viewState.scrollTarget == null)
          break;
        if (a > 5) {
          console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
          break;
        }
        let u = [];
        l & 4 || ([this.measureRequests, u] = [u, this.measureRequests]);
        let f = u.map((m) => {
          try {
            return m.read(this);
          } catch (g) {
            return co(this.state, g), IA;
          }
        }), d = Ow.create(this, this.state, []), h = !1;
        d.flags |= l, n ? n.flags |= l : n = d, this.updateState = 2, d.empty || (this.updatePlugins(d), this.inputState.update(d), this.updateAttrs(), h = this.docView.update(d));
        for (let m = 0; m < u.length; m++)
          if (f[m] != IA)
            try {
              let g = u[m];
              g.write && g.write(f[m], this);
            } catch (g) {
              co(this.state, g);
            }
        if (h && this.docView.updateSelection(!0), !d.viewportChanged && this.measureRequests.length == 0) {
          if (this.viewState.editorHeight)
            if (this.viewState.scrollTarget) {
              this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, o = -1;
              continue;
            } else {
              let g = (s < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(s).top) - o;
              if (g > 1 || g < -1) {
                r = r + g, i.scrollTop = r / this.scaleY, o = -1;
                continue;
              }
            }
          break;
        }
      }
    } finally {
      this.updateState = 0, this.measureScheduled = -1;
    }
    if (n && !n.empty)
      for (let a of this.state.facet(rC))
        a(n);
  }
  /**
  Get the CSS classes for the currently active editor themes.
  */
  get themeClasses() {
    return uC + " " + (this.state.facet(lC) ? GH : XH) + " " + this.state.facet(bb);
  }
  updateAttrs() {
    let e = LA(this, AH, {
      class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
    }), n = {
      spellcheck: "false",
      autocorrect: "off",
      autocapitalize: "off",
      translate: "no",
      contenteditable: this.state.facet(m2) ? "true" : "false",
      class: "cm-content",
      style: `${qe.tabSize}: ${this.state.tabSize}`,
      role: "textbox",
      "aria-multiline": "true"
    };
    this.state.readOnly && (n["aria-readonly"] = "true"), LA(this, bE, n);
    let i = this.observer.ignore(() => {
      let r = J4(this.contentDOM, this.contentAttrs, n), s = J4(this.dom, this.editorAttrs, e);
      return r || s;
    });
    return this.editorAttrs = e, this.contentAttrs = n, i;
  }
  showAnnouncements(e) {
    let n = !0;
    for (let i of e)
      for (let r of i.effects)
        if (r.is(Te.announce)) {
          n && (this.announceDOM.textContent = ""), n = !1;
          let s = this.announceDOM.appendChild(document.createElement("div"));
          s.textContent = r.value;
        }
  }
  mountStyles() {
    this.styleModules = this.state.facet(rg);
    let e = this.state.facet(Te.cspNonce);
    qu.mount(this.root, this.styleModules.concat(t_e).reverse(), e ? { nonce: e } : void 0);
  }
  readMeasured() {
    if (this.updateState == 2)
      throw new Error("Reading the editor layout isn't allowed during an update");
    this.updateState == 0 && this.measureScheduled > -1 && this.measure(!1);
  }
  /**
  Schedule a layout measurement, optionally providing callbacks to
  do custom DOM measuring followed by a DOM write phase. Using
  this is preferable reading DOM layout directly from, for
  example, an event handler, because it'll make sure measuring and
  drawing done by other components is synchronized, avoiding
  unnecessary DOM layout computations.
  */
  requestMeasure(e) {
    if (this.measureScheduled < 0 && (this.measureScheduled = this.win.requestAnimationFrame(() => this.measure())), e) {
      if (this.measureRequests.indexOf(e) > -1)
        return;
      if (e.key != null) {
        for (let n = 0; n < this.measureRequests.length; n++)
          if (this.measureRequests[n].key === e.key) {
            this.measureRequests[n] = e;
            return;
          }
      }
      this.measureRequests.push(e);
    }
  }
  /**
  Get the value of a specific plugin, if present. Note that
  plugins that crash can be dropped from a view, so even when you
  know you registered a given plugin, it is recommended to check
  the return value of this method.
  */
  plugin(e) {
    let n = this.pluginMap.get(e);
    return (n === void 0 || n && n.spec != e) && this.pluginMap.set(e, n = this.plugins.find((i) => i.spec == e) || null), n && n.update(this).value;
  }
  /**
  The top position of the document, in screen coordinates. This
  may be negative when the editor is scrolled down. Points
  directly to the top of the first line, not above the padding.
  */
  get documentTop() {
    return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop;
  }
  /**
  Reports the padding above and below the document.
  */
  get documentPadding() {
    return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom };
  }
  /**
  If the editor is transformed with CSS, this provides the scale
  along the X axis. Otherwise, it will just be 1. Note that
  transforms other than translation and scaling are not supported.
  */
  get scaleX() {
    return this.viewState.scaleX;
  }
  /**
  Provide the CSS transformed scale along the Y axis.
  */
  get scaleY() {
    return this.viewState.scaleY;
  }
  /**
  Find the text line or block widget at the given vertical
  position (which is interpreted as relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
  */
  elementAtHeight(e) {
    return this.readMeasured(), this.viewState.elementAtHeight(e);
  }
  /**
  Find the line block (see
  [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
  height, again interpreted relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
  */
  lineBlockAtHeight(e) {
    return this.readMeasured(), this.viewState.lineBlockAtHeight(e);
  }
  /**
  Get the extent and vertical position of all [line
  blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
  are relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
  */
  get viewportLineBlocks() {
    return this.viewState.viewportLines;
  }
  /**
  Find the line block around the given document position. A line
  block is a range delimited on both sides by either a
  non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line breaks, or the
  start/end of the document. It will usually just hold a line of
  text, but may be broken into multiple textblocks by block
  widgets.
  */
  lineBlockAt(e) {
    return this.viewState.lineBlockAt(e);
  }
  /**
  The editor's total content height.
  */
  get contentHeight() {
    return this.viewState.contentHeight;
  }
  /**
  Move a cursor position by [grapheme
  cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
  the motion is away from the line start, or towards it. In
  bidirectional text, the line is traversed in visual order, using
  the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
  When the start position was the last one on the line, the
  returned position will be across the line break. If there is no
  further line, the original position is returned.
  
  By default, this method moves over a single cluster. The
  optional `by` argument can be used to move across more. It will
  be called with the first cluster as argument, and should return
  a predicate that determines, for each subsequent cluster,
  whether it should also be moved over.
  */
  moveByChar(e, n, i) {
    return G3(this, e, bA(this, e, n, i));
  }
  /**
  Move a cursor position across the next group of either
  [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
  non-whitespace characters.
  */
  moveByGroup(e, n) {
    return G3(this, e, bA(this, e, n, (i) => Oxe(this, e.head, i)));
  }
  /**
  Get the cursor position visually at the start or end of a line.
  Note that this may differ from the _logical_ position at its
  start or end (which is simply at `line.from`/`line.to`) if text
  at the start or end goes against the line's base text direction.
  */
  visualLineSide(e, n) {
    let i = this.bidiSpans(e), r = this.textDirectionAt(e.from), s = i[n ? i.length - 1 : 0];
    return he.cursor(s.side(n, r) + e.from, s.forward(!n, r) ? 1 : -1);
  }
  /**
  Move to the next line boundary in the given direction. If
  `includeWrap` is true, line wrapping is on, and there is a
  further wrap point on the current line, the wrap point will be
  returned. Otherwise this function will return the start or end
  of the line.
  */
  moveToLineBoundary(e, n, i = !0) {
    return _xe(this, e, n, i);
  }
  /**
  Move a cursor position vertically. When `distance` isn't given,
  it defaults to moving to the next line (including wrapped
  lines). Otherwise, `distance` should provide a positive distance
  in pixels.
  
  When `start` has a
  [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
  motion will use that as a target horizontal position. Otherwise,
  the cursor's own horizontal position is used. The returned
  cursor will have its goal column set to whichever column was
  used.
  */
  moveVertically(e, n, i) {
    return G3(this, e, Sxe(this, e, n, i));
  }
  /**
  Find the DOM parent node and offset (child offset if `node` is
  an element, character offset when it is a text node) at the
  given document position.
  
  Note that for positions that aren't currently in
  `visibleRanges`, the resulting DOM position isn't necessarily
  meaningful (it may just point before or after a placeholder
  element).
  */
  domAtPos(e) {
    return this.docView.domAtPos(e);
  }
  /**
  Find the document position at the given DOM node. Can be useful
  for associating positions with DOM events. Will raise an error
  when `node` isn't part of the editor content.
  */
  posAtDOM(e, n = 0) {
    return this.docView.posFromDOM(e, n);
  }
  posAtCoords(e, n = !0) {
    return this.readMeasured(), FH(this, e, n);
  }
  /**
  Get the screen coordinates at the given document position.
  `side` determines whether the coordinates are based on the
  element before (-1) or after (1) the position (if no element is
  available on the given side, the method will transparently use
  another strategy to get reasonable coordinates).
  */
  coordsAtPos(e, n = 1) {
    this.readMeasured();
    let i = this.docView.coordsAt(e, n);
    if (!i || i.left == i.right)
      return i;
    let r = this.state.doc.lineAt(e), s = this.bidiSpans(r), o = s[Cu.find(s, e - r.from, -1, n)];
    return h2(i, o.dir == Tn.LTR == n > 0);
  }
  /**
  Return the rectangle around a given character. If `pos` does not
  point in front of a character that is in the viewport and
  rendered (i.e. not replaced, not a line break), this will return
  null. For space characters that are a line wrap point, this will
  return the position before the line break.
  */
  coordsForChar(e) {
    return this.readMeasured(), this.docView.coordsForChar(e);
  }
  /**
  The default width of a character in the editor. May not
  accurately reflect the width of all characters (given variable
  width fonts or styling of invididual ranges).
  */
  get defaultCharacterWidth() {
    return this.viewState.heightOracle.charWidth;
  }
  /**
  The default height of a line in the editor. May not be accurate
  for all lines.
  */
  get defaultLineHeight() {
    return this.viewState.heightOracle.lineHeight;
  }
  /**
  The text direction
  ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
  CSS property) of the editor's content element.
  */
  get textDirection() {
    return this.viewState.defaultTextDirection;
  }
  /**
  Find the text direction of the block at the given position, as
  assigned by CSS. If
  [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
  isn't enabled, or the given position is outside of the viewport,
  this will always return the same as
  [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
  this may trigger a DOM layout.
  */
  textDirectionAt(e) {
    return !this.state.facet(MH) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e));
  }
  /**
  Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
  (as determined by the
  [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
  CSS property of its content element).
  */
  get lineWrapping() {
    return this.viewState.heightOracle.lineWrapping;
  }
  /**
  Returns the bidirectional text structure of the given line
  (which should be in the current document) as an array of span
  objects. The order of these spans matches the [text
  direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
  left-to-right, the leftmost spans come first, otherwise the
  rightmost spans come first.
  */
  bidiSpans(e) {
    if (e.length > d_e)
      return xH(e.length);
    let n = this.textDirectionAt(e.from), i;
    for (let s of this.bidiCache)
      if (s.from == e.from && s.dir == n && (s.fresh || kH(s.isolates, i = fA(this, e))))
        return s.order;
    i || (i = fA(this, e));
    let r = axe(e.text, n, i);
    return this.bidiCache.push(new Sw(e.from, e.to, n, i, !0, r)), r;
  }
  /**
  Check whether the editor has focus.
  */
  get hasFocus() {
    var e;
    return (this.dom.ownerDocument.hasFocus() || qe.safari && ((e = this.inputState) === null || e === void 0 ? void 0 : e.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
  }
  /**
  Put focus on the editor.
  */
  focus() {
    this.observer.ignore(() => {
      aH(this.contentDOM), this.docView.updateSelection();
    });
  }
  /**
  Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
  necessary when moving the editor's existing DOM to a new window or shadow root.
  */
  setRoot(e) {
    this._root != e && (this._root = e, this.observer.setWindow((e.nodeType == 9 ? e : e.ownerDocument).defaultView || window), this.mountStyles());
  }
  /**
  Clean up this editor view, removing its element from the
  document, unregistering event handlers, and notifying
  plugins. The view instance can no longer be used after
  calling this.
  */
  destroy() {
    for (let e of this.plugins)
      e.destroy(this);
    this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0;
  }
  /**
  Returns an effect that can be
  [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
  cause it to scroll the given position or range into view.
  */
  static scrollIntoView(e, n = {}) {
    return db.of(new mh(typeof e == "number" ? he.cursor(e) : e, n.y, n.x, n.yMargin, n.xMargin));
  }
  /**
  Return an effect that resets the editor to its current (at the
  time this method was called) scroll position. Note that this
  only affects the editor's own scrollable element, not parents.
  See also
  [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
  
  The effect should be used with a document identical to the one
  it was created for. Failing to do so is not an error, but may
  not scroll to the expected position. You can
  [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
  */
  scrollSnapshot() {
    let { scrollTop: e, scrollLeft: n } = this.scrollDOM, i = this.viewState.scrollAnchorAt(e);
    return db.of(new mh(he.cursor(i.from), "start", "start", i.top - e, n, !0));
  }
  /**
  Returns an extension that can be used to add DOM event handlers.
  The value should be an object mapping event names to handler
  functions. For any given event, such functions are ordered by
  extension precedence, and the first handler to return true will
  be assumed to have handled that event, and no other handlers or
  built-in behavior will be activated for it. These are registered
  on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
  for `scroll` handlers, which will be called any time the
  editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
  its parent nodes is scrolled.
  */
  static domEventHandlers(e) {
    return gi.define(() => ({}), { eventHandlers: e });
  }
  /**
  Create an extension that registers DOM event observers. Contrary
  to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
  observers can't be prevented from running by a higher-precedence
  handler returning true. They also don't prevent other handlers
  and observers from running when they return true, and should not
  call `preventDefault`.
  */
  static domEventObservers(e) {
    return gi.define(() => ({}), { eventObservers: e });
  }
  /**
  Create a theme extension. The first argument can be a
  [`style-mod`](https://github.com/marijnh/style-mod#documentation)
  style spec providing the styles for the theme. These will be
  prefixed with a generated class for the style.
  
  Because the selectors will be prefixed with a scope class, rule
  that directly match the editor's [wrapper
  element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
  added—need to be explicitly differentiated by adding an `&` to
  the selector for that element—for example
  `&.cm-focused`.
  
  When `dark` is set to true, the theme will be marked as dark,
  which will cause the `&dark` rules from [base
  themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
  `&light` when a light theme is active).
  */
  static theme(e, n) {
    let i = qu.newName(), r = [bb.of(i), rg.of(cC(`.${i}`, e))];
    return n && n.dark && r.push(lC.of(!0)), r;
  }
  /**
  Create an extension that adds styles to the base theme. Like
  with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
  place of the editor wrapper element when directly targeting
  that. You can also use `&dark` or `&light` instead to only
  target editors with a dark or light theme.
  */
  static baseTheme(e) {
    return jf.lowest(rg.of(cC("." + uC, e, KH)));
  }
  /**
  Retrieve an editor view instance from the view's DOM
  representation.
  */
  static findFromDOM(e) {
    var n;
    let i = e.querySelector(".cm-content"), r = i && En.get(i) || En.get(e);
    return ((n = r == null ? void 0 : r.rootView) === null || n === void 0 ? void 0 : n.view) || null;
  }
}
Te.styleModule = rg;
Te.inputHandler = TH;
Te.focusChangeEffect = $H;
Te.perLineTextDirection = MH;
Te.exceptionSink = EH;
Te.updateListener = rC;
Te.editable = m2;
Te.mouseSelectionStyle = CH;
Te.dragMovesSelection = SH;
Te.clickAddsSelectionRange = OH;
Te.decorations = c0;
Te.outerDecorations = DH;
Te.atomicRanges = yE;
Te.bidiIsolatedRanges = PH;
Te.scrollMargins = IH;
Te.darkTheme = lC;
Te.cspNonce = /* @__PURE__ */ Qe.define({ combine: (t) => t.length ? t[0] : "" });
Te.contentAttributes = bE;
Te.editorAttributes = AH;
Te.lineWrapping = /* @__PURE__ */ Te.contentAttributes.of({ class: "cm-lineWrapping" });
Te.announce = /* @__PURE__ */ Ot.define();
const d_e = 4096, IA = {};
class Sw {
  constructor(e, n, i, r, s, o) {
    this.from = e, this.to = n, this.dir = i, this.isolates = r, this.fresh = s, this.order = o;
  }
  static update(e, n) {
    if (n.empty && !e.some((s) => s.fresh))
      return e;
    let i = [], r = e.length ? e[e.length - 1].dir : Tn.LTR;
    for (let s = Math.max(0, e.length - 10); s < e.length; s++) {
      let o = e[s];
      o.dir == r && !n.touchesRange(o.from, o.to) && i.push(new Sw(n.mapPos(o.from, 1), n.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order));
    }
    return i;
  }
}
function LA(t, e, n) {
  for (let i = t.state.facet(e), r = i.length - 1; r >= 0; r--) {
    let s = i[r], o = typeof s == "function" ? s(t) : s;
    o && K4(o, n);
  }
  return n;
}
const h_e = qe.mac ? "mac" : qe.windows ? "win" : qe.linux ? "linux" : "key";
function p_e(t, e) {
  const n = t.split(/-(?!$)/);
  let i = n[n.length - 1];
  i == "Space" && (i = " ");
  let r, s, o, a;
  for (let l = 0; l < n.length - 1; ++l) {
    const u = n[l];
    if (/^(cmd|meta|m)$/i.test(u))
      a = !0;
    else if (/^a(lt)?$/i.test(u))
      r = !0;
    else if (/^(c|ctrl|control)$/i.test(u))
      s = !0;
    else if (/^s(hift)?$/i.test(u))
      o = !0;
    else if (/^mod$/i.test(u))
      e == "mac" ? a = !0 : s = !0;
    else
      throw new Error("Unrecognized modifier name: " + u);
  }
  return r && (i = "Alt-" + i), s && (i = "Ctrl-" + i), a && (i = "Meta-" + i), o && (i = "Shift-" + i), i;
}
function yb(t, e, n) {
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n !== !1 && e.shiftKey && (t = "Shift-" + t), t;
}
const m_e = /* @__PURE__ */ jf.default(/* @__PURE__ */ Te.domEventHandlers({
  keydown(t, e) {
    return tQ(eQ(e.state), t, e, "editor");
  }
})), Cl = /* @__PURE__ */ Qe.define({ enables: m_e }), RA = /* @__PURE__ */ new WeakMap();
function eQ(t) {
  let e = t.facet(Cl), n = RA.get(e);
  return n || RA.set(e, n = b_e(e.reduce((i, r) => i.concat(r), []))), n;
}
function g_e(t, e, n) {
  return tQ(eQ(t.state), e, t, n);
}
let bu = null;
const v_e = 4e3;
function b_e(t, e = h_e) {
  let n = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null), r = (o, a) => {
    let l = i[o];
    if (l == null)
      i[o] = a;
    else if (l != a)
      throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix");
  }, s = (o, a, l, u, f) => {
    var d, h;
    let m = n[o] || (n[o] = /* @__PURE__ */ Object.create(null)), g = a.split(/ (?!$)/).map((_) => p_e(_, e));
    for (let _ = 1; _ < g.length; _++) {
      let S = g.slice(0, _).join(" ");
      r(S, !0), m[S] || (m[S] = {
        preventDefault: !0,
        stopPropagation: !1,
        run: [(C) => {
          let E = bu = { view: C, prefix: S, scope: o };
          return setTimeout(() => {
            bu == E && (bu = null);
          }, v_e), !0;
        }]
      });
    }
    let w = g.join(" ");
    r(w, !1);
    let x = m[w] || (m[w] = {
      preventDefault: !1,
      stopPropagation: !1,
      run: ((h = (d = m._any) === null || d === void 0 ? void 0 : d.run) === null || h === void 0 ? void 0 : h.slice()) || []
    });
    l && x.run.push(l), u && (x.preventDefault = !0), f && (x.stopPropagation = !0);
  };
  for (let o of t) {
    let a = o.scope ? o.scope.split(" ") : ["editor"];
    if (o.any)
      for (let u of a) {
        let f = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
        f._any || (f._any = { preventDefault: !1, stopPropagation: !1, run: [] });
        for (let d in f)
          f[d].run.push(o.any);
      }
    let l = o[e] || o.key;
    if (l)
      for (let u of a)
        s(u, l, o.run, o.preventDefault, o.stopPropagation), o.shift && s(u, "Shift-" + l, o.shift, o.preventDefault, o.stopPropagation);
  }
  return n;
}
function tQ(t, e, n, i) {
  let r = z2e(e), s = ar(r, 0), o = io(s) == r.length && r != " ", a = "", l = !1, u = !1, f = !1;
  bu && bu.view == n && bu.scope == i && (a = bu.prefix + " ", zH.indexOf(e.keyCode) < 0 && (u = !0, bu = null));
  let d = /* @__PURE__ */ new Set(), h = (x) => {
    if (x) {
      for (let _ of x.run)
        if (!d.has(_) && (d.add(_), _(n, e)))
          return x.stopPropagation && (f = !0), !0;
      x.preventDefault && (x.stopPropagation && (f = !0), u = !0);
    }
    return !1;
  }, m = t[i], g, w;
  return m && (h(m[a + yb(r, e, !o)]) ? l = !0 : o && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
  !(qe.windows && e.ctrlKey && e.altKey) && (g = Yu[e.keyCode]) && g != r ? (h(m[a + yb(g, e, !0)]) || e.shiftKey && (w = l0[e.keyCode]) != r && w != g && h(m[a + yb(w, e, !1)])) && (l = !0) : o && e.shiftKey && h(m[a + yb(r, e, !0)]) && (l = !0), !l && h(m._any) && (l = !0)), u && (l = !0), l && f && e.stopPropagation(), l;
}
class j1 {
  /**
  Create a marker with the given class and dimensions. If `width`
  is null, the DOM element will get no width style.
  */
  constructor(e, n, i, r, s) {
    this.className = e, this.left = n, this.top = i, this.width = r, this.height = s;
  }
  draw() {
    let e = document.createElement("div");
    return e.className = this.className, this.adjust(e), e;
  }
  update(e, n) {
    return n.className != this.className ? !1 : (this.adjust(e), !0);
  }
  adjust(e) {
    e.style.left = this.left + "px", e.style.top = this.top + "px", this.width != null && (e.style.width = this.width + "px"), e.style.height = this.height + "px";
  }
  eq(e) {
    return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className;
  }
  /**
  Create a set of rectangles for the given selection range,
  assigning them theclass`className`. Will create a single
  rectangle for empty ranges, and a set of selection-style
  rectangles covering the range's content (in a bidi-aware
  way) for non-empty ones.
  */
  static forRange(e, n, i) {
    if (i.empty) {
      let r = e.coordsAtPos(i.head, i.assoc || 1);
      if (!r)
        return [];
      let s = nQ(e);
      return [new j1(n, r.left - s.left, r.top - s.top, null, r.bottom - r.top)];
    } else
      return y_e(e, n, i);
  }
}
function nQ(t) {
  let e = t.scrollDOM.getBoundingClientRect();
  return { left: (t.textDirection == Tn.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY };
}
function jA(t, e, n) {
  let i = he.cursor(e);
  return {
    from: Math.max(n.from, t.moveToLineBoundary(i, !1, !0).from),
    to: Math.min(n.to, t.moveToLineBoundary(i, !0, !0).from),
    type: es.Text
  };
}
function y_e(t, e, n) {
  if (n.to <= t.viewport.from || n.from >= t.viewport.to)
    return [];
  let i = Math.max(n.from, t.viewport.from), r = Math.min(n.to, t.viewport.to), s = t.textDirection == Tn.LTR, o = t.contentDOM, a = o.getBoundingClientRect(), l = nQ(t), u = o.querySelector(".cm-line"), f = u && window.getComputedStyle(u), d = a.left + (f ? parseInt(f.paddingLeft) + Math.min(0, parseInt(f.textIndent)) : 0), h = a.right - (f ? parseInt(f.paddingRight) : 0), m = oC(t, i), g = oC(t, r), w = m.type == es.Text ? m : null, x = g.type == es.Text ? g : null;
  if (w && (t.lineWrapping || m.widgetLineBreaks) && (w = jA(t, i, w)), x && (t.lineWrapping || g.widgetLineBreaks) && (x = jA(t, r, x)), w && x && w.from == x.from)
    return S(C(n.from, n.to, w));
  {
    let M = w ? C(n.from, null, w) : E(m, !1), $ = x ? C(null, n.to, x) : E(g, !0), P = [];
    return (w || m).to < (x || g).from - (w && x ? 1 : 0) || m.widgetLineBreaks > 1 && M.bottom + t.defaultLineHeight / 2 < $.top ? P.push(_(d, M.bottom, h, $.top)) : M.bottom < $.top && t.elementAtHeight((M.bottom + $.top) / 2).type == es.Text && (M.bottom = $.top = (M.bottom + $.top) / 2), S(M).concat(P).concat(S($));
  }
  function _(M, $, P, W) {
    return new j1(
      e,
      M - l.left,
      $ - l.top - 0.01,
      P - M,
      W - $ + 0.01
      /* C.Epsilon */
    );
  }
  function S({ top: M, bottom: $, horizontal: P }) {
    let W = [];
    for (let z = 0; z < P.length; z += 2)
      W.push(_(P[z], M, P[z + 1], $));
    return W;
  }
  function C(M, $, P) {
    let W = 1e9, z = -1e9, Z = [];
    function L(H, R, q, Y, K) {
      let te = t.coordsAtPos(H, H == P.to ? -2 : 2), se = t.coordsAtPos(q, q == P.from ? 2 : -2);
      !te || !se || (W = Math.min(te.top, se.top, W), z = Math.max(te.bottom, se.bottom, z), K == Tn.LTR ? Z.push(s && R ? d : te.left, s && Y ? h : se.right) : Z.push(!s && Y ? d : se.left, !s && R ? h : te.right));
    }
    let Q = M ?? P.from, V = $ ?? P.to;
    for (let H of t.visibleRanges)
      if (H.to > Q && H.from < V)
        for (let R = Math.max(H.from, Q), q = Math.min(H.to, V); ; ) {
          let Y = t.state.doc.lineAt(R);
          for (let K of t.bidiSpans(Y)) {
            let te = K.from + Y.from, se = K.to + Y.from;
            if (te >= q)
              break;
            se > R && L(Math.max(te, R), M == null && te <= Q, Math.min(se, q), $ == null && se >= V, K.dir);
          }
          if (R = Y.to + 1, R >= q)
            break;
        }
    return Z.length == 0 && L(Q, M == null, V, $ == null, t.textDirection), { top: W, bottom: z, horizontal: Z };
  }
  function E(M, $) {
    let P = a.top + ($ ? M.top : M.bottom);
    return { top: P, bottom: P, horizontal: [] };
  }
}
function w_e(t, e) {
  return t.constructor == e.constructor && t.eq(e);
}
class k_e {
  constructor(e, n) {
    this.view = e, this.layer = n, this.drawn = [], this.scaleX = 1, this.scaleY = 1, this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }, this.dom = e.scrollDOM.appendChild(document.createElement("div")), this.dom.classList.add("cm-layer"), n.above && this.dom.classList.add("cm-layer-above"), n.class && this.dom.classList.add(n.class), this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), n.mount && n.mount(this.dom, e);
  }
  update(e) {
    e.startState.facet(fy) != e.state.facet(fy) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq));
  }
  setOrder(e) {
    let n = 0, i = e.facet(fy);
    for (; n < i.length && i[n] != this.layer; )
      n++;
    this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - n);
  }
  measure() {
    return this.layer.markers(this.view);
  }
  scale() {
    let { scaleX: e, scaleY: n } = this.view;
    (e != this.scaleX || n != this.scaleY) && (this.scaleX = e, this.scaleY = n, this.dom.style.transform = `scale(${1 / e}, ${1 / n})`);
  }
  draw(e) {
    if (e.length != this.drawn.length || e.some((n, i) => !w_e(n, this.drawn[i]))) {
      let n = this.dom.firstChild, i = 0;
      for (let r of e)
        r.update && n && r.constructor && this.drawn[i].constructor && r.update(n, this.drawn[i]) ? (n = n.nextSibling, i++) : this.dom.insertBefore(r.draw(), n);
      for (; n; ) {
        let r = n.nextSibling;
        n.remove(), n = r;
      }
      this.drawn = e;
    }
  }
  destroy() {
    this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
  }
}
const fy = /* @__PURE__ */ Qe.define();
function iQ(t) {
  return [
    gi.define((e) => new k_e(e, t)),
    fy.of(t)
  ];
}
const rQ = !qe.ios, f0 = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, {
      cursorBlinkRate: 1200,
      drawRangeCursor: !0
    }, {
      cursorBlinkRate: (e, n) => Math.min(e, n),
      drawRangeCursor: (e, n) => e || n
    });
  }
});
function sQ(t = {}) {
  return [
    f0.of(t),
    x_e,
    __e,
    O_e,
    NH.of(!0)
  ];
}
function oQ(t) {
  return t.startState.facet(f0) != t.state.facet(f0);
}
const x_e = /* @__PURE__ */ iQ({
  above: !0,
  markers(t) {
    let { state: e } = t, n = e.facet(f0), i = [];
    for (let r of e.selection.ranges) {
      let s = r == e.selection.main;
      if (r.empty ? !s || rQ : n.drawRangeCursor) {
        let o = s ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", a = r.empty ? r : he.cursor(r.head, r.head > r.anchor ? -1 : 1);
        for (let l of j1.forRange(t, o, a))
          i.push(l);
      }
    }
    return i;
  },
  update(t, e) {
    t.transactions.some((i) => i.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink");
    let n = oQ(t);
    return n && FA(t.state, e), t.docChanged || t.selectionSet || n;
  },
  mount(t, e) {
    FA(e.state, t);
  },
  class: "cm-cursorLayer"
});
function FA(t, e) {
  e.style.animationDuration = t.facet(f0).cursorBlinkRate + "ms";
}
const __e = /* @__PURE__ */ iQ({
  above: !1,
  markers(t) {
    return t.state.selection.ranges.map((e) => e.empty ? [] : j1.forRange(t, "cm-selectionBackground", e)).reduce((e, n) => e.concat(n));
  },
  update(t, e) {
    return t.docChanged || t.selectionSet || t.viewportChanged || oQ(t);
  },
  class: "cm-selectionLayer"
}), fC = {
  ".cm-line": {
    "& ::selection": { backgroundColor: "transparent !important" },
    "&::selection": { backgroundColor: "transparent !important" }
  }
};
rQ && (fC[".cm-line"].caretColor = "transparent !important", fC[".cm-content"] = { caretColor: "transparent !important" });
const O_e = /* @__PURE__ */ jf.highest(/* @__PURE__ */ Te.theme(fC)), aQ = /* @__PURE__ */ Ot.define({
  map(t, e) {
    return t == null ? null : e.mapPos(t);
  }
}), ag = /* @__PURE__ */ Ki.define({
  create() {
    return null;
  },
  update(t, e) {
    return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((n, i) => i.is(aQ) ? i.value : n, t);
  }
}), S_e = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
  }
  update(t) {
    var e;
    let n = t.state.field(ag);
    n == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(ag) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
  }
  readPos() {
    let { view: t } = this, e = t.state.field(ag), n = e != null && t.coordsAtPos(e);
    if (!n)
      return null;
    let i = t.scrollDOM.getBoundingClientRect();
    return {
      left: n.left - i.left + t.scrollDOM.scrollLeft * t.scaleX,
      top: n.top - i.top + t.scrollDOM.scrollTop * t.scaleY,
      height: n.bottom - n.top
    };
  }
  drawCursor(t) {
    if (this.cursor) {
      let { scaleX: e, scaleY: n } = this.view;
      t ? (this.cursor.style.left = t.left / e + "px", this.cursor.style.top = t.top / n + "px", this.cursor.style.height = t.height / n + "px") : this.cursor.style.left = "-100000px";
    }
  }
  destroy() {
    this.cursor && this.cursor.remove();
  }
  setDropPos(t) {
    this.view.state.field(ag) != t && this.view.dispatch({ effects: aQ.of(t) });
  }
}, {
  eventObservers: {
    dragover(t) {
      this.setDropPos(this.view.posAtCoords({ x: t.clientX, y: t.clientY }));
    },
    dragleave(t) {
      (t.target == this.view.contentDOM || !this.view.contentDOM.contains(t.relatedTarget)) && this.setDropPos(null);
    },
    dragend() {
      this.setDropPos(null);
    },
    drop() {
      this.setDropPos(null);
    }
  }
});
function C_e() {
  return [ag, S_e];
}
function BA(t, e, n, i, r) {
  e.lastIndex = 0;
  for (let s = t.iterRange(n, i), o = n, a; !s.next().done; o += s.value.length)
    if (!s.lineBreak)
      for (; a = e.exec(s.value); )
        r(o + a.index, a);
}
function E_e(t, e) {
  let n = t.visibleRanges;
  if (n.length == 1 && n[0].from == t.viewport.from && n[0].to == t.viewport.to)
    return n;
  let i = [];
  for (let { from: r, to: s } of n)
    r = Math.max(t.state.doc.lineAt(r).from, r - e), s = Math.min(t.state.doc.lineAt(s).to, s + e), i.length && i[i.length - 1].to >= r ? i[i.length - 1].to = s : i.push({ from: r, to: s });
  return i;
}
class T_e {
  /**
  Create a decorator.
  */
  constructor(e) {
    const { regexp: n, decoration: i, decorate: r, boundary: s, maxLength: o = 1e3 } = e;
    if (!n.global)
      throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
    if (this.regexp = n, r)
      this.addMatch = (a, l, u, f) => r(f, u, u + a[0].length, a, l);
    else if (typeof i == "function")
      this.addMatch = (a, l, u, f) => {
        let d = i(a, l, u);
        d && f(u, u + a[0].length, d);
      };
    else if (i)
      this.addMatch = (a, l, u, f) => f(u, u + a[0].length, i);
    else
      throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
    this.boundary = s, this.maxLength = o;
  }
  /**
  Compute the full set of decorations for matches in the given
  view's viewport. You'll want to call this when initializing your
  plugin.
  */
  createDeco(e) {
    let n = new Zu(), i = n.add.bind(n);
    for (let { from: r, to: s } of E_e(e, this.maxLength))
      BA(e.state.doc, this.regexp, r, s, (o, a) => this.addMatch(a, e, o, i));
    return n.finish();
  }
  /**
  Update a set of decorations for a view update. `deco` _must_ be
  the set of decorations produced by _this_ `MatchDecorator` for
  the view state before the update.
  */
  updateDeco(e, n) {
    let i = 1e9, r = -1;
    return e.docChanged && e.changes.iterChanges((s, o, a, l) => {
      l > e.view.viewport.from && a < e.view.viewport.to && (i = Math.min(a, i), r = Math.max(l, r));
    }), e.viewportChanged || r - i > 1e3 ? this.createDeco(e.view) : r > -1 ? this.updateRange(e.view, n.map(e.changes), i, r) : n;
  }
  updateRange(e, n, i, r) {
    for (let s of e.visibleRanges) {
      let o = Math.max(s.from, i), a = Math.min(s.to, r);
      if (a > o) {
        let l = e.state.doc.lineAt(o), u = l.to < a ? e.state.doc.lineAt(a) : l, f = Math.max(s.from, l.from), d = Math.min(s.to, u.to);
        if (this.boundary) {
          for (; o > l.from; o--)
            if (this.boundary.test(l.text[o - 1 - l.from])) {
              f = o;
              break;
            }
          for (; a < u.to; a++)
            if (this.boundary.test(u.text[a - u.from])) {
              d = a;
              break;
            }
        }
        let h = [], m, g = (w, x, _) => h.push(_.range(w, x));
        if (l == u)
          for (this.regexp.lastIndex = f - l.from; (m = this.regexp.exec(l.text)) && m.index < d - l.from; )
            this.addMatch(m, e, m.index + l.from, g);
        else
          BA(e.state.doc, this.regexp, f, d, (w, x) => this.addMatch(x, e, w, g));
        n = n.update({ filterFrom: f, filterTo: d, filter: (w, x) => w < f || x > d, add: h });
      }
    }
    return n;
  }
}
const dC = /x/.unicode != null ? "gu" : "g", $_e = /* @__PURE__ */ new RegExp(`[\0-\b
--­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF￹-￼]`, dC), M_e = {
  0: "null",
  7: "bell",
  8: "backspace",
  10: "newline",
  11: "vertical tab",
  13: "carriage return",
  27: "escape",
  8203: "zero width space",
  8204: "zero width non-joiner",
  8205: "zero width joiner",
  8206: "left-to-right mark",
  8207: "right-to-left mark",
  8232: "line separator",
  8237: "left-to-right override",
  8238: "right-to-left override",
  8294: "left-to-right isolate",
  8295: "right-to-left isolate",
  8297: "pop directional isolate",
  8233: "paragraph separator",
  65279: "zero width no-break space",
  65532: "object replacement"
};
let eO = null;
function N_e() {
  var t;
  if (eO == null && typeof document < "u" && document.body) {
    let e = document.body.style;
    eO = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null;
  }
  return eO || !1;
}
const dy = /* @__PURE__ */ Qe.define({
  combine(t) {
    let e = Wa(t, {
      render: null,
      specialChars: $_e,
      addSpecialChars: null
    });
    return (e.replaceTabs = !N_e()) && (e.specialChars = new RegExp("	|" + e.specialChars.source, dC)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, dC)), e;
  }
});
function lQ(t = {}) {
  return [dy.of(t), A_e()];
}
let zA = null;
function A_e() {
  return zA || (zA = gi.fromClass(class {
    constructor(t) {
      this.view = t, this.decorations = it.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(dy)), this.decorations = this.decorator.createDeco(t);
    }
    makeDecorator(t) {
      return new T_e({
        regexp: t.specialChars,
        decoration: (e, n, i) => {
          let { doc: r } = n.state, s = ar(e[0], 0);
          if (s == 9) {
            let o = r.lineAt(i), a = n.state.tabSize, l = dp(o.text, a, i - o.from);
            return it.replace({
              widget: new L_e((a - l % a) * this.view.defaultCharacterWidth / this.view.scaleX)
            });
          }
          return this.decorationCache[s] || (this.decorationCache[s] = it.replace({ widget: new I_e(t, s) }));
        },
        boundary: t.replaceTabs ? void 0 : /[^]/
      });
    }
    update(t) {
      let e = t.state.facet(dy);
      t.startState.facet(dy) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations);
    }
  }, {
    decorations: (t) => t.decorations
  }));
}
const D_e = "•";
function P_e(t) {
  return t >= 32 ? D_e : t == 10 ? "␤" : String.fromCharCode(9216 + t);
}
class I_e extends Ha {
  constructor(e, n) {
    super(), this.options = e, this.code = n;
  }
  eq(e) {
    return e.code == this.code;
  }
  toDOM(e) {
    let n = P_e(this.code), i = e.state.phrase("Control character") + " " + (M_e[this.code] || "0x" + this.code.toString(16)), r = this.options.render && this.options.render(this.code, i, n);
    if (r)
      return r;
    let s = document.createElement("span");
    return s.textContent = n, s.title = i, s.setAttribute("aria-label", i), s.className = "cm-specialChar", s;
  }
  ignoreEvent() {
    return !1;
  }
}
class L_e extends Ha {
  constructor(e) {
    super(), this.width = e;
  }
  eq(e) {
    return e.width == this.width;
  }
  toDOM() {
    let e = document.createElement("span");
    return e.textContent = "	", e.className = "cm-tab", e.style.width = this.width + "px", e;
  }
  ignoreEvent() {
    return !1;
  }
}
function R_e() {
  return F_e;
}
const j_e = /* @__PURE__ */ it.line({ class: "cm-activeLine" }), F_e = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.decorations = this.getDeco(t);
  }
  update(t) {
    (t.docChanged || t.selectionSet) && (this.decorations = this.getDeco(t.view));
  }
  getDeco(t) {
    let e = -1, n = [];
    for (let i of t.state.selection.ranges) {
      let r = t.lineBlockAt(i.head);
      r.from > e && (n.push(j_e.range(r.from)), e = r.from);
    }
    return it.set(n);
  }
}, {
  decorations: (t) => t.decorations
});
let B_e = class extends Ha {
  constructor(e) {
    super(), this.content = e;
  }
  toDOM() {
    let e = document.createElement("span");
    return e.className = "cm-placeholder", e.style.pointerEvents = "none", e.appendChild(typeof this.content == "string" ? document.createTextNode(this.content) : this.content), typeof this.content == "string" ? e.setAttribute("aria-label", "placeholder " + this.content) : e.setAttribute("aria-hidden", "true"), e;
  }
  coordsAt(e) {
    let n = e.firstChild ? $h(e.firstChild) : [];
    if (!n.length)
      return null;
    let i = window.getComputedStyle(e.parentNode), r = h2(n[0], i.direction != "rtl"), s = parseInt(i.lineHeight);
    return r.bottom - r.top > s * 1.5 ? { left: r.left, right: r.right, top: r.top, bottom: r.top + s } : r;
  }
  ignoreEvent() {
    return !1;
  }
};
function z_e(t) {
  return gi.fromClass(class {
    constructor(e) {
      this.view = e, this.placeholder = t ? it.set([it.widget({ widget: new B_e(t), side: 1 }).range(0)]) : it.none;
    }
    get decorations() {
      return this.view.state.doc.length ? it.none : this.placeholder;
    }
  }, { decorations: (e) => e.decorations });
}
const hC = 2e3;
function W_e(t, e, n) {
  let i = Math.min(e.line, n.line), r = Math.max(e.line, n.line), s = [];
  if (e.off > hC || n.off > hC || e.col < 0 || n.col < 0) {
    let o = Math.min(e.off, n.off), a = Math.max(e.off, n.off);
    for (let l = i; l <= r; l++) {
      let u = t.doc.line(l);
      u.length <= a && s.push(he.range(u.from + o, u.to + a));
    }
  } else {
    let o = Math.min(e.col, n.col), a = Math.max(e.col, n.col);
    for (let l = i; l <= r; l++) {
      let u = t.doc.line(l), f = U4(u.text, o, t.tabSize, !0);
      if (f < 0)
        s.push(he.cursor(u.to));
      else {
        let d = U4(u.text, a, t.tabSize);
        s.push(he.range(u.from + f, u.from + d));
      }
    }
  }
  return s;
}
function H_e(t, e) {
  let n = t.coordsAtPos(t.viewport.from);
  return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
}
function WA(t, e) {
  let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), i = t.state.doc.lineAt(n), r = n - i.from, s = r > hC ? -1 : r == i.length ? H_e(t, e.clientX) : dp(i.text, t.state.tabSize, n - i.from);
  return { line: i.number, col: s, off: r };
}
function Q_e(t, e) {
  let n = WA(t, e), i = t.state.selection;
  return n ? {
    update(r) {
      if (r.docChanged) {
        let s = r.changes.mapPos(r.startState.doc.line(n.line).from), o = r.state.doc.lineAt(s);
        n = { line: o.number, col: n.col, off: Math.min(n.off, o.length) }, i = i.map(r.changes);
      }
    },
    get(r, s, o) {
      let a = WA(t, r);
      if (!a)
        return i;
      let l = W_e(t.state, n, a);
      return l.length ? o ? he.create(l.concat(i.ranges)) : he.create(l) : i;
    }
  } : null;
}
function U_e(t) {
  let e = (n) => n.altKey && n.button == 0;
  return Te.mouseSelectionStyle.of((n, i) => e(i) ? Q_e(n, i) : null);
}
const Z_e = {
  Alt: [18, (t) => !!t.altKey],
  Control: [17, (t) => !!t.ctrlKey],
  Shift: [16, (t) => !!t.shiftKey],
  Meta: [91, (t) => !!t.metaKey]
}, q_e = { style: "cursor: crosshair" };
function Y_e(t = {}) {
  let [e, n] = Z_e[t.key || "Alt"], i = gi.fromClass(class {
    constructor(r) {
      this.view = r, this.isDown = !1;
    }
    set(r) {
      this.isDown != r && (this.isDown = r, this.view.update([]));
    }
  }, {
    eventObservers: {
      keydown(r) {
        this.set(r.keyCode == e || n(r));
      },
      keyup(r) {
        (r.keyCode == e || !n(r)) && this.set(!1);
      },
      mousemove(r) {
        this.set(n(r));
      }
    }
  });
  return [
    i,
    Te.contentAttributes.of((r) => {
      var s;
      return !((s = r.plugin(i)) === null || s === void 0) && s.isDown ? q_e : null;
    })
  ];
}
const Mm = "-10000px";
class uQ {
  constructor(e, n, i) {
    this.facet = n, this.createTooltipView = i, this.input = e.state.facet(n), this.tooltips = this.input.filter((r) => r), this.tooltipViews = this.tooltips.map(i);
  }
  update(e, n) {
    var i;
    let r = e.state.facet(this.facet), s = r.filter((l) => l);
    if (r === this.input) {
      for (let l of this.tooltipViews)
        l.update && l.update(e);
      return !1;
    }
    let o = [], a = n ? [] : null;
    for (let l = 0; l < s.length; l++) {
      let u = s[l], f = -1;
      if (u) {
        for (let d = 0; d < this.tooltips.length; d++) {
          let h = this.tooltips[d];
          h && h.create == u.create && (f = d);
        }
        if (f < 0)
          o[l] = this.createTooltipView(u), a && (a[l] = !!u.above);
        else {
          let d = o[l] = this.tooltipViews[f];
          a && (a[l] = n[f]), d.update && d.update(e);
        }
      }
    }
    for (let l of this.tooltipViews)
      o.indexOf(l) < 0 && (l.dom.remove(), (i = l.destroy) === null || i === void 0 || i.call(l));
    return n && (a.forEach((l, u) => n[u] = l), n.length = a.length), this.input = r, this.tooltips = s, this.tooltipViews = o, !0;
  }
}
function V_e(t) {
  let { win: e } = t;
  return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth };
}
const tO = /* @__PURE__ */ Qe.define({
  combine: (t) => {
    var e, n, i;
    return {
      position: qe.ios ? "absolute" : ((e = t.find((r) => r.position)) === null || e === void 0 ? void 0 : e.position) || "fixed",
      parent: ((n = t.find((r) => r.parent)) === null || n === void 0 ? void 0 : n.parent) || null,
      tooltipSpace: ((i = t.find((r) => r.tooltipSpace)) === null || i === void 0 ? void 0 : i.tooltipSpace) || V_e
    };
  }
}), HA = /* @__PURE__ */ new WeakMap(), kE = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1;
    let e = t.state.facet(tO);
    this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.manager = new uQ(t, xE, (n) => this.createTooltip(n)), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((n) => {
      Date.now() > this.lastTransaction - 50 && n.length > 0 && n[n.length - 1].intersectionRatio < 1 && this.measureSoon();
    }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure();
  }
  createContainer() {
    this.parent ? (this.container = document.createElement("div"), this.container.style.position = "relative", this.container.className = this.view.themeClasses, this.parent.appendChild(this.container)) : this.container = this.view.dom;
  }
  observeIntersection() {
    if (this.intersectionObserver) {
      this.intersectionObserver.disconnect();
      for (let t of this.manager.tooltipViews)
        this.intersectionObserver.observe(t.dom);
    }
  }
  measureSoon() {
    this.measureTimeout < 0 && (this.measureTimeout = setTimeout(() => {
      this.measureTimeout = -1, this.maybeMeasure();
    }, 50));
  }
  update(t) {
    t.transactions.length && (this.lastTransaction = Date.now());
    let e = this.manager.update(t, this.above);
    e && this.observeIntersection();
    let n = e || t.geometryChanged, i = t.state.facet(tO);
    if (i.position != this.position && !this.madeAbsolute) {
      this.position = i.position;
      for (let r of this.manager.tooltipViews)
        r.dom.style.position = this.position;
      n = !0;
    }
    if (i.parent != this.parent) {
      this.parent && this.container.remove(), this.parent = i.parent, this.createContainer();
      for (let r of this.manager.tooltipViews)
        this.container.appendChild(r.dom);
      n = !0;
    } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses);
    n && this.maybeMeasure();
  }
  createTooltip(t) {
    let e = t.create(this.view);
    if (e.dom.classList.add("cm-tooltip"), t.arrow && !e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
      let n = document.createElement("div");
      n.className = "cm-tooltip-arrow", e.dom.appendChild(n);
    }
    return e.dom.style.position = this.position, e.dom.style.top = Mm, e.dom.style.left = "0px", this.container.appendChild(e.dom), e.mount && e.mount(this.view), e;
  }
  destroy() {
    var t, e;
    this.view.win.removeEventListener("resize", this.measureSoon);
    for (let n of this.manager.tooltipViews)
      n.dom.remove(), (t = n.destroy) === null || t === void 0 || t.call(n);
    this.parent && this.container.remove(), (e = this.intersectionObserver) === null || e === void 0 || e.disconnect(), clearTimeout(this.measureTimeout);
  }
  readMeasure() {
    let t = this.view.dom.getBoundingClientRect(), e = 1, n = 1, i = !1;
    if (this.position == "fixed" && this.manager.tooltipViews.length) {
      let { dom: r } = this.manager.tooltipViews[0];
      if (qe.gecko)
        i = r.offsetParent != this.container.ownerDocument.body;
      else if (r.style.top == Mm && r.style.left == "0px") {
        let s = r.getBoundingClientRect();
        i = Math.abs(s.top + 1e4) > 1 || Math.abs(s.left) > 1;
      }
    }
    if (i || this.position == "absolute")
      if (this.parent) {
        let r = this.parent.getBoundingClientRect();
        r.width && r.height && (e = r.width / this.parent.offsetWidth, n = r.height / this.parent.offsetHeight);
      } else
        ({ scaleX: e, scaleY: n } = this.view.viewState);
    return {
      editor: t,
      parent: this.parent ? this.container.getBoundingClientRect() : t,
      pos: this.manager.tooltips.map((r, s) => {
        let o = this.manager.tooltipViews[s];
        return o.getCoords ? o.getCoords(r.pos) : this.view.coordsAtPos(r.pos);
      }),
      size: this.manager.tooltipViews.map(({ dom: r }) => r.getBoundingClientRect()),
      space: this.view.state.facet(tO).tooltipSpace(this.view),
      scaleX: e,
      scaleY: n,
      makeAbsolute: i
    };
  }
  writeMeasure(t) {
    var e;
    if (t.makeAbsolute) {
      this.madeAbsolute = !0, this.position = "absolute";
      for (let a of this.manager.tooltipViews)
        a.dom.style.position = "absolute";
    }
    let { editor: n, space: i, scaleX: r, scaleY: s } = t, o = [];
    for (let a = 0; a < this.manager.tooltips.length; a++) {
      let l = this.manager.tooltips[a], u = this.manager.tooltipViews[a], { dom: f } = u, d = t.pos[a], h = t.size[a];
      if (!d || d.bottom <= Math.max(n.top, i.top) || d.top >= Math.min(n.bottom, i.bottom) || d.right < Math.max(n.left, i.left) - 0.1 || d.left > Math.min(n.right, i.right) + 0.1) {
        f.style.top = Mm;
        continue;
      }
      let m = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, g = m ? 7 : 0, w = h.right - h.left, x = (e = HA.get(u)) !== null && e !== void 0 ? e : h.bottom - h.top, _ = u.offset || G_e, S = this.view.textDirection == Tn.LTR, C = h.width > i.right - i.left ? S ? i.left : i.right - h.width : S ? Math.min(d.left - (m ? 14 : 0) + _.x, i.right - w) : Math.max(i.left, d.left - w + (m ? 14 : 0) - _.x), E = this.above[a];
      !l.strictSide && (E ? d.top - (h.bottom - h.top) - _.y < i.top : d.bottom + (h.bottom - h.top) + _.y > i.bottom) && E == i.bottom - d.bottom > d.top - i.top && (E = this.above[a] = !E);
      let M = (E ? d.top - i.top : i.bottom - d.bottom) - g;
      if (M < x && u.resize !== !1) {
        if (M < this.view.defaultLineHeight) {
          f.style.top = Mm;
          continue;
        }
        HA.set(u, x), f.style.height = (x = M) / s + "px";
      } else f.style.height && (f.style.height = "");
      let $ = E ? d.top - x - g - _.y : d.bottom + g + _.y, P = C + w;
      if (u.overlap !== !0)
        for (let W of o)
          W.left < P && W.right > C && W.top < $ + x && W.bottom > $ && ($ = E ? W.top - x - 2 - g : W.bottom + g + 2);
      if (this.position == "absolute" ? (f.style.top = ($ - t.parent.top) / s + "px", f.style.left = (C - t.parent.left) / r + "px") : (f.style.top = $ / s + "px", f.style.left = C / r + "px"), m) {
        let W = d.left + (S ? _.x : -_.x) - (C + 14 - 7);
        m.style.left = W / r + "px";
      }
      u.overlap !== !0 && o.push({ left: C, top: $, right: P, bottom: $ + x }), f.classList.toggle("cm-tooltip-above", E), f.classList.toggle("cm-tooltip-below", !E), u.positioned && u.positioned(t.space);
    }
  }
  maybeMeasure() {
    if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && (this.inView = this.view.inView, !this.inView)))
      for (let t of this.manager.tooltipViews)
        t.dom.style.top = Mm;
  }
}, {
  eventObservers: {
    scroll() {
      this.maybeMeasure();
    }
  }
}), X_e = /* @__PURE__ */ Te.baseTheme({
  ".cm-tooltip": {
    zIndex: 100,
    boxSizing: "border-box"
  },
  "&light .cm-tooltip": {
    border: "1px solid #bbb",
    backgroundColor: "#f5f5f5"
  },
  "&light .cm-tooltip-section:not(:first-child)": {
    borderTop: "1px solid #bbb"
  },
  "&dark .cm-tooltip": {
    backgroundColor: "#333338",
    color: "white"
  },
  ".cm-tooltip-arrow": {
    height: "7px",
    width: `${7 * 2}px`,
    position: "absolute",
    zIndex: -1,
    overflow: "hidden",
    "&:before, &:after": {
      content: "''",
      position: "absolute",
      width: 0,
      height: 0,
      borderLeft: "7px solid transparent",
      borderRight: "7px solid transparent"
    },
    ".cm-tooltip-above &": {
      bottom: "-7px",
      "&:before": {
        borderTop: "7px solid #bbb"
      },
      "&:after": {
        borderTop: "7px solid #f5f5f5",
        bottom: "1px"
      }
    },
    ".cm-tooltip-below &": {
      top: "-7px",
      "&:before": {
        borderBottom: "7px solid #bbb"
      },
      "&:after": {
        borderBottom: "7px solid #f5f5f5",
        top: "1px"
      }
    }
  },
  "&dark .cm-tooltip .cm-tooltip-arrow": {
    "&:before": {
      borderTopColor: "#333338",
      borderBottomColor: "#333338"
    },
    "&:after": {
      borderTopColor: "transparent",
      borderBottomColor: "transparent"
    }
  }
}), G_e = { x: 0, y: 0 }, xE = /* @__PURE__ */ Qe.define({
  enables: [kE, X_e]
}), Cw = /* @__PURE__ */ Qe.define();
class g2 {
  // Needs to be static so that host tooltip instances always match
  static create(e) {
    return new g2(e);
  }
  constructor(e) {
    this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new uQ(e, Cw, (n) => this.createHostedView(n));
  }
  createHostedView(e) {
    let n = e.create(this.view);
    return n.dom.classList.add("cm-tooltip-section"), this.dom.appendChild(n.dom), this.mounted && n.mount && n.mount(this.view), n;
  }
  mount(e) {
    for (let n of this.manager.tooltipViews)
      n.mount && n.mount(e);
    this.mounted = !0;
  }
  positioned(e) {
    for (let n of this.manager.tooltipViews)
      n.positioned && n.positioned(e);
  }
  update(e) {
    this.manager.update(e);
  }
  destroy() {
    var e;
    for (let n of this.manager.tooltipViews)
      (e = n.destroy) === null || e === void 0 || e.call(n);
  }
  passProp(e) {
    let n;
    for (let i of this.manager.tooltipViews) {
      let r = i[e];
      if (r !== void 0) {
        if (n === void 0)
          n = r;
        else if (n !== r)
          return;
      }
    }
    return n;
  }
  get offset() {
    return this.passProp("offset");
  }
  get getCoords() {
    return this.passProp("getCoords");
  }
  get overlap() {
    return this.passProp("overlap");
  }
  get resize() {
    return this.passProp("resize");
  }
}
const K_e = /* @__PURE__ */ xE.compute([Cw], (t) => {
  let e = t.facet(Cw).filter((n) => n);
  return e.length === 0 ? null : {
    pos: Math.min(...e.map((n) => n.pos)),
    end: Math.max(...e.map((n) => {
      var i;
      return (i = n.end) !== null && i !== void 0 ? i : n.pos;
    })),
    create: g2.create,
    above: e[0].above,
    arrow: e.some((n) => n.arrow)
  };
});
class J_e {
  constructor(e, n, i, r, s) {
    this.view = e, this.source = n, this.field = i, this.setHover = r, this.hoverTime = s, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: e.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), e.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), e.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this));
  }
  update() {
    this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(() => this.startHover(), 20));
  }
  get active() {
    return this.view.state.field(this.field);
  }
  checkHover() {
    if (this.hoverTimeout = -1, this.active)
      return;
    let e = Date.now() - this.lastMove.time;
    e < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e) : this.startHover();
  }
  startHover() {
    clearTimeout(this.restartTimeout);
    let { view: e, lastMove: n } = this, i = e.docView.nearest(n.target);
    if (!i)
      return;
    let r, s = 1;
    if (i instanceof Su)
      r = i.posAtStart;
    else {
      if (r = e.posAtCoords(n), r == null)
        return;
      let a = e.coordsAtPos(r);
      if (!a || n.y < a.top || n.y > a.bottom || n.x < a.left - e.defaultCharacterWidth || n.x > a.right + e.defaultCharacterWidth)
        return;
      let l = e.bidiSpans(e.state.doc.lineAt(r)).find((f) => f.from <= r && f.to >= r), u = l && l.dir == Tn.RTL ? -1 : 1;
      s = n.x < a.left ? -u : u;
    }
    let o = this.source(e, r, s);
    if (o != null && o.then) {
      let a = this.pending = { pos: r };
      o.then((l) => {
        this.pending == a && (this.pending = null, l && e.dispatch({ effects: this.setHover.of(l) }));
      }, (l) => co(e.state, l, "hover tooltip"));
    } else o && e.dispatch({ effects: this.setHover.of(o) });
  }
  get tooltip() {
    let e = this.view.plugin(kE), n = e ? e.manager.tooltips.findIndex((i) => i.create == g2.create) : -1;
    return n > -1 ? e.manager.tooltipViews[n] : null;
  }
  mousemove(e) {
    var n;
    this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime));
    let { active: i, tooltip: r } = this;
    if (i && r && !e3e(r.dom, e) || this.pending) {
      let { pos: s } = i || this.pending, o = (n = i == null ? void 0 : i.end) !== null && n !== void 0 ? n : s;
      (s == o ? this.view.posAtCoords(this.lastMove) != s : !t3e(this.view, s, o, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of(null) }), this.pending = null);
    }
  }
  mouseleave(e) {
    clearTimeout(this.hoverTimeout), this.hoverTimeout = -1;
    let { active: n } = this;
    if (n) {
      let { tooltip: i } = this;
      i && i.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(i.dom) : this.view.dispatch({ effects: this.setHover.of(null) });
    }
  }
  watchTooltipLeave(e) {
    let n = (i) => {
      e.removeEventListener("mouseleave", n), this.active && !this.view.dom.contains(i.relatedTarget) && this.view.dispatch({ effects: this.setHover.of(null) });
    };
    e.addEventListener("mouseleave", n);
  }
  destroy() {
    clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove);
  }
}
const wb = 4;
function e3e(t, e) {
  let n = t.getBoundingClientRect();
  return e.clientX >= n.left - wb && e.clientX <= n.right + wb && e.clientY >= n.top - wb && e.clientY <= n.bottom + wb;
}
function t3e(t, e, n, i, r, s) {
  let o = t.scrollDOM.getBoundingClientRect(), a = t.documentTop + t.documentPadding.top + t.contentHeight;
  if (o.left > i || o.right < i || o.top > r || Math.min(o.bottom, a) < r)
    return !1;
  let l = t.posAtCoords({ x: i, y: r }, !1);
  return l >= e && l <= n;
}
function n3e(t, e = {}) {
  let n = Ot.define(), i = Ki.define({
    create() {
      return null;
    },
    update(r, s) {
      if (r && (e.hideOnChange && (s.docChanged || s.selection) || e.hideOn && e.hideOn(s, r)))
        return null;
      if (r && s.docChanged) {
        let o = s.changes.mapPos(r.pos, -1, ur.TrackDel);
        if (o == null)
          return null;
        let a = Object.assign(/* @__PURE__ */ Object.create(null), r);
        a.pos = o, r.end != null && (a.end = s.changes.mapPos(r.end)), r = a;
      }
      for (let o of s.effects)
        o.is(n) && (r = o.value), o.is(i3e) && (r = null);
      return r;
    },
    provide: (r) => Cw.from(r)
  });
  return [
    i,
    gi.define((r) => new J_e(
      r,
      t,
      i,
      n,
      e.hoverTime || 300
      /* Hover.Time */
    )),
    K_e
  ];
}
function cQ(t, e) {
  let n = t.plugin(kE);
  if (!n)
    return null;
  let i = n.manager.tooltips.indexOf(e);
  return i < 0 ? null : n.manager.tooltipViews[i];
}
const i3e = /* @__PURE__ */ Ot.define(), QA = /* @__PURE__ */ Qe.define({
  combine(t) {
    let e, n;
    for (let i of t)
      e = e || i.topContainer, n = n || i.bottomContainer;
    return { topContainer: e, bottomContainer: n };
  }
});
function d0(t, e) {
  let n = t.plugin(fQ), i = n ? n.specs.indexOf(e) : -1;
  return i > -1 ? n.panels[i] : null;
}
const fQ = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.input = t.state.facet(h0), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
    let e = t.state.facet(QA);
    this.top = new kb(t, !0, e.topContainer), this.bottom = new kb(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
    for (let n of this.panels)
      n.dom.classList.add("cm-panel"), n.mount && n.mount();
  }
  update(t) {
    let e = t.state.facet(QA);
    this.top.container != e.topContainer && (this.top.sync([]), this.top = new kb(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new kb(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
    let n = t.state.facet(h0);
    if (n != this.input) {
      let i = n.filter((l) => l), r = [], s = [], o = [], a = [];
      for (let l of i) {
        let u = this.specs.indexOf(l), f;
        u < 0 ? (f = l(t.view), a.push(f)) : (f = this.panels[u], f.update && f.update(t)), r.push(f), (f.top ? s : o).push(f);
      }
      this.specs = i, this.panels = r, this.top.sync(s), this.bottom.sync(o);
      for (let l of a)
        l.dom.classList.add("cm-panel"), l.mount && l.mount();
    } else
      for (let i of this.panels)
        i.update && i.update(t);
  }
  destroy() {
    this.top.sync([]), this.bottom.sync([]);
  }
}, {
  provide: (t) => Te.scrollMargins.of((e) => {
    let n = e.plugin(t);
    return n && { top: n.top.scrollMargin(), bottom: n.bottom.scrollMargin() };
  })
});
class kb {
  constructor(e, n, i) {
    this.view = e, this.top = n, this.container = i, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses();
  }
  sync(e) {
    for (let n of this.panels)
      n.destroy && e.indexOf(n) < 0 && n.destroy();
    this.panels = e, this.syncDOM();
  }
  syncDOM() {
    if (this.panels.length == 0) {
      this.dom && (this.dom.remove(), this.dom = void 0);
      return;
    }
    if (!this.dom) {
      this.dom = document.createElement("div"), this.dom.className = this.top ? "cm-panels cm-panels-top" : "cm-panels cm-panels-bottom", this.dom.style[this.top ? "top" : "bottom"] = "0";
      let n = this.container || this.view.dom;
      n.insertBefore(this.dom, this.top ? n.firstChild : null);
    }
    let e = this.dom.firstChild;
    for (let n of this.panels)
      if (n.dom.parentNode == this.dom) {
        for (; e != n.dom; )
          e = UA(e);
        e = e.nextSibling;
      } else
        this.dom.insertBefore(n.dom, e);
    for (; e; )
      e = UA(e);
  }
  scrollMargin() {
    return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top);
  }
  syncClasses() {
    if (!(!this.container || this.classes == this.view.themeClasses)) {
      for (let e of this.classes.split(" "))
        e && this.container.classList.remove(e);
      for (let e of (this.classes = this.view.themeClasses).split(" "))
        e && this.container.classList.add(e);
    }
  }
}
function UA(t) {
  let e = t.nextSibling;
  return t.remove(), e;
}
const h0 = /* @__PURE__ */ Qe.define({
  enables: fQ
});
class El extends vf {
  /**
  @internal
  */
  compare(e) {
    return this == e || this.constructor == e.constructor && this.eq(e);
  }
  /**
  Compare this marker to another marker of the same type.
  */
  eq(e) {
    return !1;
  }
  /**
  Called if the marker has a `toDOM` method and its representation
  was removed from a gutter.
  */
  destroy(e) {
  }
}
El.prototype.elementClass = "";
El.prototype.toDOM = void 0;
El.prototype.mapMode = ur.TrackBefore;
El.prototype.startSide = El.prototype.endSide = -1;
El.prototype.point = !0;
const hy = /* @__PURE__ */ Qe.define(), r3e = {
  class: "",
  renderEmptyElements: !1,
  elementStyle: "",
  markers: () => Qt.empty,
  lineMarker: () => null,
  widgetMarker: () => null,
  lineMarkerChange: null,
  initialSpacer: null,
  updateSpacer: null,
  domEventHandlers: {}
}, Mg = /* @__PURE__ */ Qe.define();
function s3e(t) {
  return [dQ(), Mg.of(Object.assign(Object.assign({}, r3e), t))];
}
const ZA = /* @__PURE__ */ Qe.define({
  combine: (t) => t.some((e) => e)
});
function dQ(t) {
  return [
    o3e
  ];
}
const o3e = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(Mg).map((e) => new YA(t, e));
    for (let e of this.gutters)
      this.dom.appendChild(e.dom);
    this.fixed = !t.state.facet(ZA), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
  }
  update(t) {
    if (this.updateGutters(t)) {
      let e = this.prevViewport, n = t.view.viewport, i = Math.min(e.to, n.to) - Math.max(e.from, n.from);
      this.syncGutters(i < (n.to - n.from) * 0.8);
    }
    t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight + "px"), this.view.state.facet(ZA) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport;
  }
  syncGutters(t) {
    let e = this.dom.nextSibling;
    t && this.dom.remove();
    let n = Qt.iter(this.view.state.facet(hy), this.view.viewport.from), i = [], r = this.gutters.map((s) => new a3e(s, this.view.viewport, -this.view.documentPadding.top));
    for (let s of this.view.viewportLineBlocks)
      if (i.length && (i = []), Array.isArray(s.type)) {
        let o = !0;
        for (let a of s.type)
          if (a.type == es.Text && o) {
            pC(n, i, a.from);
            for (let l of r)
              l.line(this.view, a, i);
            o = !1;
          } else if (a.widget)
            for (let l of r)
              l.widget(this.view, a);
      } else if (s.type == es.Text) {
        pC(n, i, s.from);
        for (let o of r)
          o.line(this.view, s, i);
      } else if (s.widget)
        for (let o of r)
          o.widget(this.view, s);
    for (let s of r)
      s.finish();
    t && this.view.scrollDOM.insertBefore(this.dom, e);
  }
  updateGutters(t) {
    let e = t.startState.facet(Mg), n = t.state.facet(Mg), i = t.docChanged || t.heightChanged || t.viewportChanged || !Qt.eq(t.startState.facet(hy), t.state.facet(hy), t.view.viewport.from, t.view.viewport.to);
    if (e == n)
      for (let r of this.gutters)
        r.update(t) && (i = !0);
    else {
      i = !0;
      let r = [];
      for (let s of n) {
        let o = e.indexOf(s);
        o < 0 ? r.push(new YA(this.view, s)) : (this.gutters[o].update(t), r.push(this.gutters[o]));
      }
      for (let s of this.gutters)
        s.dom.remove(), r.indexOf(s) < 0 && s.destroy();
      for (let s of r)
        this.dom.appendChild(s.dom);
      this.gutters = r;
    }
    return i;
  }
  destroy() {
    for (let t of this.gutters)
      t.destroy();
    this.dom.remove();
  }
}, {
  provide: (t) => Te.scrollMargins.of((e) => {
    let n = e.plugin(t);
    return !n || n.gutters.length == 0 || !n.fixed ? null : e.textDirection == Tn.LTR ? { left: n.dom.offsetWidth * e.scaleX } : { right: n.dom.offsetWidth * e.scaleX };
  })
});
function qA(t) {
  return Array.isArray(t) ? t : [t];
}
function pC(t, e, n) {
  for (; t.value && t.from <= n; )
    t.from == n && e.push(t.value), t.next();
}
class a3e {
  constructor(e, n, i) {
    this.gutter = e, this.height = i, this.i = 0, this.cursor = Qt.iter(e.markers, n.from);
  }
  addElement(e, n, i) {
    let { gutter: r } = this, s = (n.top - this.height) / e.scaleY, o = n.height / e.scaleY;
    if (this.i == r.elements.length) {
      let a = new hQ(e, o, s, i);
      r.elements.push(a), r.dom.appendChild(a.dom);
    } else
      r.elements[this.i].update(e, o, s, i);
    this.height = n.bottom, this.i++;
  }
  line(e, n, i) {
    let r = [];
    pC(this.cursor, r, n.from), i.length && (r = r.concat(i));
    let s = this.gutter.config.lineMarker(e, n, r);
    s && r.unshift(s);
    let o = this.gutter;
    r.length == 0 && !o.config.renderEmptyElements || this.addElement(e, n, r);
  }
  widget(e, n) {
    let i = this.gutter.config.widgetMarker(e, n.widget, n);
    i && this.addElement(e, n, [i]);
  }
  finish() {
    let e = this.gutter;
    for (; e.elements.length > this.i; ) {
      let n = e.elements.pop();
      e.dom.removeChild(n.dom), n.destroy();
    }
  }
}
class YA {
  constructor(e, n) {
    this.view = e, this.config = n, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : "");
    for (let i in n.domEventHandlers)
      this.dom.addEventListener(i, (r) => {
        let s = r.target, o;
        if (s != this.dom && this.dom.contains(s)) {
          for (; s.parentNode != this.dom; )
            s = s.parentNode;
          let l = s.getBoundingClientRect();
          o = (l.top + l.bottom) / 2;
        } else
          o = r.clientY;
        let a = e.lineBlockAtHeight(o - e.documentTop);
        n.domEventHandlers[i](e, a, r) && r.preventDefault();
      });
    this.markers = qA(n.markers(e)), n.initialSpacer && (this.spacer = new hQ(e, 0, 0, [n.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
  }
  update(e) {
    let n = this.markers;
    if (this.markers = qA(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) {
      let r = this.config.updateSpacer(this.spacer.markers[0], e);
      r != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [r]);
    }
    let i = e.view.viewport;
    return !Qt.eq(this.markers, n, i.from, i.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
  }
  destroy() {
    for (let e of this.elements)
      e.destroy();
  }
}
class hQ {
  constructor(e, n, i, r) {
    this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, n, i, r);
  }
  update(e, n, i, r) {
    this.height != n && (this.height = n, this.dom.style.height = n + "px"), this.above != i && (this.dom.style.marginTop = (this.above = i) ? i + "px" : ""), l3e(this.markers, r) || this.setMarkers(e, r);
  }
  setMarkers(e, n) {
    let i = "cm-gutterElement", r = this.dom.firstChild;
    for (let s = 0, o = 0; ; ) {
      let a = o, l = s < n.length ? n[s++] : null, u = !1;
      if (l) {
        let f = l.elementClass;
        f && (i += " " + f);
        for (let d = o; d < this.markers.length; d++)
          if (this.markers[d].compare(l)) {
            a = d, u = !0;
            break;
          }
      } else
        a = this.markers.length;
      for (; o < a; ) {
        let f = this.markers[o++];
        if (f.toDOM) {
          f.destroy(r);
          let d = r.nextSibling;
          r.remove(), r = d;
        }
      }
      if (!l)
        break;
      l.toDOM && (u ? r = r.nextSibling : this.dom.insertBefore(l.toDOM(e), r)), u && o++;
    }
    this.dom.className = i, this.markers = n;
  }
  destroy() {
    this.setMarkers(null, []);
  }
}
function l3e(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (!t[n].compare(e[n]))
      return !1;
  return !0;
}
const u3e = /* @__PURE__ */ Qe.define(), th = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, { formatNumber: String, domEventHandlers: {} }, {
      domEventHandlers(e, n) {
        let i = Object.assign({}, e);
        for (let r in n) {
          let s = i[r], o = n[r];
          i[r] = s ? (a, l, u) => s(a, l, u) || o(a, l, u) : o;
        }
        return i;
      }
    });
  }
});
class nO extends El {
  constructor(e) {
    super(), this.number = e;
  }
  eq(e) {
    return this.number == e.number;
  }
  toDOM() {
    return document.createTextNode(this.number);
  }
}
function iO(t, e) {
  return t.state.facet(th).formatNumber(e, t.state);
}
const c3e = /* @__PURE__ */ Mg.compute([th], (t) => ({
  class: "cm-lineNumbers",
  renderEmptyElements: !1,
  markers(e) {
    return e.state.facet(u3e);
  },
  lineMarker(e, n, i) {
    return i.some((r) => r.toDOM) ? null : new nO(iO(e, e.state.doc.lineAt(n.from).number));
  },
  widgetMarker: () => null,
  lineMarkerChange: (e) => e.startState.facet(th) != e.state.facet(th),
  initialSpacer(e) {
    return new nO(iO(e, VA(e.state.doc.lines)));
  },
  updateSpacer(e, n) {
    let i = iO(n.view, VA(n.view.state.doc.lines));
    return i == e.number ? e : new nO(i);
  },
  domEventHandlers: t.facet(th).domEventHandlers
}));
function _E(t = {}) {
  return [
    th.of(t),
    dQ(),
    c3e
  ];
}
function VA(t) {
  let e = 9;
  for (; e < t; )
    e = e * 10 + 9;
  return e;
}
const f3e = /* @__PURE__ */ new class extends El {
  constructor() {
    super(...arguments), this.elementClass = "cm-activeLineGutter";
  }
}(), d3e = /* @__PURE__ */ hy.compute(["selection"], (t) => {
  let e = [], n = -1;
  for (let i of t.selection.ranges) {
    let r = t.doc.lineAt(i.head).from;
    r > n && (n = r, e.push(f3e.range(r)));
  }
  return Qt.of(e);
});
function h3e() {
  return d3e;
}
const pQ = 1024;
let p3e = 0, oo = class {
  constructor(e, n) {
    this.from = e, this.to = n;
  }
};
class Mt {
  /**
  Create a new node prop type.
  */
  constructor(e = {}) {
    this.id = p3e++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
      throw new Error("This node type doesn't define a deserialize function");
    }), this.combine = e.combine || null;
  }
  /**
  This is meant to be used with
  [`NodeSet.extend`](#common.NodeSet.extend) or
  [`LRParser.configure`](#lr.ParserConfig.props) to compute
  prop values for each node type in the set. Takes a [match
  object](#common.NodeType^match) or function that returns undefined
  if the node type doesn't get this prop, and the prop's value if
  it does.
  */
  add(e) {
    if (this.perNode)
      throw new RangeError("Can't add per-node props to node types");
    return typeof e != "function" && (e = ns.match(e)), (n) => {
      let i = e(n);
      return i === void 0 ? null : [this, i];
    };
  }
}
Mt.closedBy = new Mt({ deserialize: (t) => t.split(" ") });
Mt.openedBy = new Mt({ deserialize: (t) => t.split(" ") });
Mt.group = new Mt({ deserialize: (t) => t.split(" ") });
Mt.isolate = new Mt({ deserialize: (t) => {
  if (t && t != "rtl" && t != "ltr" && t != "auto")
    throw new RangeError("Invalid value for isolate: " + t);
  return t || "auto";
} });
Mt.contextHash = new Mt({ perNode: !0 });
Mt.lookAhead = new Mt({ perNode: !0 });
Mt.mounted = new Mt({ perNode: !0 });
class p0 {
  constructor(e, n, i) {
    this.tree = e, this.overlay = n, this.parser = i;
  }
  /**
  @internal
  */
  static get(e) {
    return e && e.props && e.props[Mt.mounted.id];
  }
}
const m3e = /* @__PURE__ */ Object.create(null);
class ns {
  /**
  @internal
  */
  constructor(e, n, i, r = 0) {
    this.name = e, this.props = n, this.id = i, this.flags = r;
  }
  /**
  Define a node type.
  */
  static define(e) {
    let n = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : m3e, i = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), r = new ns(e.name || "", n, e.id, i);
    if (e.props) {
      for (let s of e.props)
        if (Array.isArray(s) || (s = s(r)), s) {
          if (s[0].perNode)
            throw new RangeError("Can't store a per-node prop on a node type");
          n[s[0].id] = s[1];
        }
    }
    return r;
  }
  /**
  Retrieves a node prop for this type. Will return `undefined` if
  the prop isn't present on this node.
  */
  prop(e) {
    return this.props[e.id];
  }
  /**
  True when this is the top node of a grammar.
  */
  get isTop() {
    return (this.flags & 1) > 0;
  }
  /**
  True when this node is produced by a skip rule.
  */
  get isSkipped() {
    return (this.flags & 2) > 0;
  }
  /**
  Indicates whether this is an error node.
  */
  get isError() {
    return (this.flags & 4) > 0;
  }
  /**
  When true, this node type doesn't correspond to a user-declared
  named node, for example because it is used to cache repetition.
  */
  get isAnonymous() {
    return (this.flags & 8) > 0;
  }
  /**
  Returns true when this node's name or one of its
  [groups](#common.NodeProp^group) matches the given string.
  */
  is(e) {
    if (typeof e == "string") {
      if (this.name == e)
        return !0;
      let n = this.prop(Mt.group);
      return n ? n.indexOf(e) > -1 : !1;
    }
    return this.id == e;
  }
  /**
  Create a function from node types to arbitrary values by
  specifying an object whose property names are node or
  [group](#common.NodeProp^group) names. Often useful with
  [`NodeProp.add`](#common.NodeProp.add). You can put multiple
  names, separated by spaces, in a single property name to map
  multiple node names to a single value.
  */
  static match(e) {
    let n = /* @__PURE__ */ Object.create(null);
    for (let i in e)
      for (let r of i.split(" "))
        n[r] = e[i];
    return (i) => {
      for (let r = i.prop(Mt.group), s = -1; s < (r ? r.length : 0); s++) {
        let o = n[s < 0 ? i.name : r[s]];
        if (o)
          return o;
      }
    };
  }
}
ns.none = new ns(
  "",
  /* @__PURE__ */ Object.create(null),
  0,
  8
  /* NodeFlag.Anonymous */
);
class OE {
  /**
  Create a set with the given types. The `id` property of each
  type should correspond to its position within the array.
  */
  constructor(e) {
    this.types = e;
    for (let n = 0; n < e.length; n++)
      if (e[n].id != n)
        throw new RangeError("Node type ids should correspond to array positions when creating a node set");
  }
  /**
  Create a copy of this set with some node properties added. The
  arguments to this method can be created with
  [`NodeProp.add`](#common.NodeProp.add).
  */
  extend(...e) {
    let n = [];
    for (let i of this.types) {
      let r = null;
      for (let s of e) {
        let o = s(i);
        if (o) {
          r || (r = Object.assign({}, i.props));
          let a = o[1], l = o[0];
          l.combine && l.id in r && (a = l.combine(r[l.id], a)), r[l.id] = a;
        }
      }
      n.push(r ? new ns(i.name, r, i.id, i.flags) : i);
    }
    return new OE(n);
  }
}
const xb = /* @__PURE__ */ new WeakMap(), XA = /* @__PURE__ */ new WeakMap();
var hn;
(function(t) {
  t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays";
})(hn || (hn = {}));
class Qn {
  /**
  Construct a new tree. See also [`Tree.build`](#common.Tree^build).
  */
  constructor(e, n, i, r, s) {
    if (this.type = e, this.children = n, this.positions = i, this.length = r, this.props = null, s && s.length) {
      this.props = /* @__PURE__ */ Object.create(null);
      for (let [o, a] of s)
        this.props[typeof o == "number" ? o : o.id] = a;
    }
  }
  /**
  @internal
  */
  toString() {
    let e = p0.get(this);
    if (e && !e.overlay)
      return e.tree.toString();
    let n = "";
    for (let i of this.children) {
      let r = i.toString();
      r && (n && (n += ","), n += r);
    }
    return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n.length ? "(" + n + ")" : "") : n;
  }
  /**
  Get a [tree cursor](#common.TreeCursor) positioned at the top of
  the tree. Mode can be used to [control](#common.IterMode) which
  nodes the cursor visits.
  */
  cursor(e = 0) {
    return new Ew(this.topNode, e);
  }
  /**
  Get a [tree cursor](#common.TreeCursor) pointing into this tree
  at the given position and side (see
  [`moveTo`](#common.TreeCursor.moveTo).
  */
  cursorAt(e, n = 0, i = 0) {
    let r = xb.get(this) || this.topNode, s = new Ew(r);
    return s.moveTo(e, n), xb.set(this, s._tree), s;
  }
  /**
  Get a [syntax node](#common.SyntaxNode) object for the top of the
  tree.
  */
  get topNode() {
    return new Dr(this, 0, 0, null);
  }
  /**
  Get the [syntax node](#common.SyntaxNode) at the given position.
  If `side` is -1, this will move into nodes that end at the
  position. If 1, it'll move into nodes that start at the
  position. With 0, it'll only enter nodes that cover the position
  from both sides.
  
  Note that this will not enter
  [overlays](#common.MountedTree.overlay), and you often want
  [`resolveInner`](#common.Tree.resolveInner) instead.
  */
  resolve(e, n = 0) {
    let i = m0(xb.get(this) || this.topNode, e, n, !1);
    return xb.set(this, i), i;
  }
  /**
  Like [`resolve`](#common.Tree.resolve), but will enter
  [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
  pointing into the innermost overlaid tree at the given position
  (with parent links going through all parent structure, including
  the host trees).
  */
  resolveInner(e, n = 0) {
    let i = m0(XA.get(this) || this.topNode, e, n, !0);
    return XA.set(this, i), i;
  }
  /**
  In some situations, it can be useful to iterate through all
  nodes around a position, including those in overlays that don't
  directly cover the position. This method gives you an iterator
  that will produce all nodes, from small to big, around the given
  position.
  */
  resolveStack(e, n = 0) {
    return b3e(this, e, n);
  }
  /**
  Iterate over the tree and its children, calling `enter` for any
  node that touches the `from`/`to` region (if given) before
  running over such a node's children, and `leave` (if given) when
  leaving the node. When `enter` returns `false`, that node will
  not have its children iterated over (or `leave` called).
  */
  iterate(e) {
    let { enter: n, leave: i, from: r = 0, to: s = this.length } = e, o = e.mode || 0, a = (o & hn.IncludeAnonymous) > 0;
    for (let l = this.cursor(o | hn.IncludeAnonymous); ; ) {
      let u = !1;
      if (l.from <= s && l.to >= r && (!a && l.type.isAnonymous || n(l) !== !1)) {
        if (l.firstChild())
          continue;
        u = !0;
      }
      for (; u && i && (a || !l.type.isAnonymous) && i(l), !l.nextSibling(); ) {
        if (!l.parent())
          return;
        u = !0;
      }
    }
  }
  /**
  Get the value of the given [node prop](#common.NodeProp) for this
  node. Works with both per-node and per-type props.
  */
  prop(e) {
    return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
  }
  /**
  Returns the node's [per-node props](#common.NodeProp.perNode) in a
  format that can be passed to the [`Tree`](#common.Tree)
  constructor.
  */
  get propValues() {
    let e = [];
    if (this.props)
      for (let n in this.props)
        e.push([+n, this.props[n]]);
    return e;
  }
  /**
  Balance the direct children of this tree, producing a copy of
  which may have children grouped into subtrees with type
  [`NodeType.none`](#common.NodeType^none).
  */
  balance(e = {}) {
    return this.children.length <= 8 ? this : EE(ns.none, this.children, this.positions, 0, this.children.length, 0, this.length, (n, i, r) => new Qn(this.type, n, i, r, this.propValues), e.makeTree || ((n, i, r) => new Qn(ns.none, n, i, r)));
  }
  /**
  Build a tree from a postfix-ordered buffer of node information,
  or a cursor over such a buffer.
  */
  static build(e) {
    return y3e(e);
  }
}
Qn.empty = new Qn(ns.none, [], [], 0);
class SE {
  constructor(e, n) {
    this.buffer = e, this.index = n;
  }
  get id() {
    return this.buffer[this.index - 4];
  }
  get start() {
    return this.buffer[this.index - 3];
  }
  get end() {
    return this.buffer[this.index - 2];
  }
  get size() {
    return this.buffer[this.index - 1];
  }
  get pos() {
    return this.index;
  }
  next() {
    this.index -= 4;
  }
  fork() {
    return new SE(this.buffer, this.index);
  }
}
class Xu {
  /**
  Create a tree buffer.
  */
  constructor(e, n, i) {
    this.buffer = e, this.length = n, this.set = i;
  }
  /**
  @internal
  */
  get type() {
    return ns.none;
  }
  /**
  @internal
  */
  toString() {
    let e = [];
    for (let n = 0; n < this.buffer.length; )
      e.push(this.childString(n)), n = this.buffer[n + 3];
    return e.join(",");
  }
  /**
  @internal
  */
  childString(e) {
    let n = this.buffer[e], i = this.buffer[e + 3], r = this.set.types[n], s = r.name;
    if (/\W/.test(s) && !r.isError && (s = JSON.stringify(s)), e += 4, i == e)
      return s;
    let o = [];
    for (; e < i; )
      o.push(this.childString(e)), e = this.buffer[e + 3];
    return s + "(" + o.join(",") + ")";
  }
  /**
  @internal
  */
  findChild(e, n, i, r, s) {
    let { buffer: o } = this, a = -1;
    for (let l = e; l != n && !(mQ(s, r, o[l + 1], o[l + 2]) && (a = l, i > 0)); l = o[l + 3])
      ;
    return a;
  }
  /**
  @internal
  */
  slice(e, n, i) {
    let r = this.buffer, s = new Uint16Array(n - e), o = 0;
    for (let a = e, l = 0; a < n; ) {
      s[l++] = r[a++], s[l++] = r[a++] - i;
      let u = s[l++] = r[a++] - i;
      s[l++] = r[a++] - e, o = Math.max(o, u);
    }
    return new Xu(s, o, this.set);
  }
}
function mQ(t, e, n, i) {
  switch (t) {
    case -2:
      return n < e;
    case -1:
      return i >= e && n < e;
    case 0:
      return n < e && i > e;
    case 1:
      return n <= e && i > e;
    case 2:
      return i > e;
    case 4:
      return !0;
  }
}
function m0(t, e, n, i) {
  for (var r; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
    let o = !i && t instanceof Dr && t.index < 0 ? null : t.parent;
    if (!o)
      return t;
    t = o;
  }
  let s = i ? 0 : hn.IgnoreOverlays;
  if (i)
    for (let o = t, a = o.parent; a; o = a, a = o.parent)
      o instanceof Dr && o.index < 0 && ((r = a.enter(e, n, s)) === null || r === void 0 ? void 0 : r.from) != o.from && (t = a);
  for (; ; ) {
    let o = t.enter(e, n, s);
    if (!o)
      return t;
    t = o;
  }
}
class gQ {
  cursor(e = 0) {
    return new Ew(this, e);
  }
  getChild(e, n = null, i = null) {
    let r = GA(this, e, n, i);
    return r.length ? r[0] : null;
  }
  getChildren(e, n = null, i = null) {
    return GA(this, e, n, i);
  }
  resolve(e, n = 0) {
    return m0(this, e, n, !1);
  }
  resolveInner(e, n = 0) {
    return m0(this, e, n, !0);
  }
  matchContext(e) {
    return mC(this.parent, e);
  }
  enterUnfinishedNodesBefore(e) {
    let n = this.childBefore(e), i = this;
    for (; n; ) {
      let r = n.lastChild;
      if (!r || r.to != n.to)
        break;
      r.type.isError && r.from == r.to ? (i = n, n = r.prevSibling) : n = r;
    }
    return i;
  }
  get node() {
    return this;
  }
  get next() {
    return this.parent;
  }
}
class Dr extends gQ {
  constructor(e, n, i, r) {
    super(), this._tree = e, this.from = n, this.index = i, this._parent = r;
  }
  get type() {
    return this._tree.type;
  }
  get name() {
    return this._tree.type.name;
  }
  get to() {
    return this.from + this._tree.length;
  }
  nextChild(e, n, i, r, s = 0) {
    for (let o = this; ; ) {
      for (let { children: a, positions: l } = o._tree, u = n > 0 ? a.length : -1; e != u; e += n) {
        let f = a[e], d = l[e] + o.from;
        if (mQ(r, i, d, d + f.length)) {
          if (f instanceof Xu) {
            if (s & hn.ExcludeBuffers)
              continue;
            let h = f.findChild(0, f.buffer.length, n, i - d, r);
            if (h > -1)
              return new ka(new g3e(o, f, e, d), null, h);
          } else if (s & hn.IncludeAnonymous || !f.type.isAnonymous || CE(f)) {
            let h;
            if (!(s & hn.IgnoreMounts) && (h = p0.get(f)) && !h.overlay)
              return new Dr(h.tree, d, e, o);
            let m = new Dr(f, d, e, o);
            return s & hn.IncludeAnonymous || !m.type.isAnonymous ? m : m.nextChild(n < 0 ? f.children.length - 1 : 0, n, i, r);
          }
        }
      }
      if (s & hn.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? e = o.index + n : e = n < 0 ? -1 : o._parent._tree.children.length, o = o._parent, !o))
        return null;
    }
  }
  get firstChild() {
    return this.nextChild(
      0,
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  get lastChild() {
    return this.nextChild(
      this._tree.children.length - 1,
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  childAfter(e) {
    return this.nextChild(
      0,
      1,
      e,
      2
      /* Side.After */
    );
  }
  childBefore(e) {
    return this.nextChild(
      this._tree.children.length - 1,
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  enter(e, n, i = 0) {
    let r;
    if (!(i & hn.IgnoreOverlays) && (r = p0.get(this._tree)) && r.overlay) {
      let s = e - this.from;
      for (let { from: o, to: a } of r.overlay)
        if ((n > 0 ? o <= s : o < s) && (n < 0 ? a >= s : a > s))
          return new Dr(r.tree, r.overlay[0].from + this.from, -1, this);
    }
    return this.nextChild(0, 1, e, n, i);
  }
  nextSignificantParent() {
    let e = this;
    for (; e.type.isAnonymous && e._parent; )
      e = e._parent;
    return e;
  }
  get parent() {
    return this._parent ? this._parent.nextSignificantParent() : null;
  }
  get nextSibling() {
    return this._parent && this.index >= 0 ? this._parent.nextChild(
      this.index + 1,
      1,
      0,
      4
      /* Side.DontCare */
    ) : null;
  }
  get prevSibling() {
    return this._parent && this.index >= 0 ? this._parent.nextChild(
      this.index - 1,
      -1,
      0,
      4
      /* Side.DontCare */
    ) : null;
  }
  get tree() {
    return this._tree;
  }
  toTree() {
    return this._tree;
  }
  /**
  @internal
  */
  toString() {
    return this._tree.toString();
  }
}
function GA(t, e, n, i) {
  let r = t.cursor(), s = [];
  if (!r.firstChild())
    return s;
  if (n != null) {
    for (let o = !1; !o; )
      if (o = r.type.is(n), !r.nextSibling())
        return s;
  }
  for (; ; ) {
    if (i != null && r.type.is(i))
      return s;
    if (r.type.is(e) && s.push(r.node), !r.nextSibling())
      return i == null ? s : [];
  }
}
function mC(t, e, n = e.length - 1) {
  for (let i = t; n >= 0; i = i.parent) {
    if (!i)
      return !1;
    if (!i.type.isAnonymous) {
      if (e[n] && e[n] != i.name)
        return !1;
      n--;
    }
  }
  return !0;
}
class g3e {
  constructor(e, n, i, r) {
    this.parent = e, this.buffer = n, this.index = i, this.start = r;
  }
}
class ka extends gQ {
  get name() {
    return this.type.name;
  }
  get from() {
    return this.context.start + this.context.buffer.buffer[this.index + 1];
  }
  get to() {
    return this.context.start + this.context.buffer.buffer[this.index + 2];
  }
  constructor(e, n, i) {
    super(), this.context = e, this._parent = n, this.index = i, this.type = e.buffer.set.types[e.buffer.buffer[i]];
  }
  child(e, n, i) {
    let { buffer: r } = this.context, s = r.findChild(this.index + 4, r.buffer[this.index + 3], e, n - this.context.start, i);
    return s < 0 ? null : new ka(this.context, this, s);
  }
  get firstChild() {
    return this.child(
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  get lastChild() {
    return this.child(
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  childAfter(e) {
    return this.child(
      1,
      e,
      2
      /* Side.After */
    );
  }
  childBefore(e) {
    return this.child(
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  enter(e, n, i = 0) {
    if (i & hn.ExcludeBuffers)
      return null;
    let { buffer: r } = this.context, s = r.findChild(this.index + 4, r.buffer[this.index + 3], n > 0 ? 1 : -1, e - this.context.start, n);
    return s < 0 ? null : new ka(this.context, this, s);
  }
  get parent() {
    return this._parent || this.context.parent.nextSignificantParent();
  }
  externalSibling(e) {
    return this._parent ? null : this.context.parent.nextChild(
      this.context.index + e,
      e,
      0,
      4
      /* Side.DontCare */
    );
  }
  get nextSibling() {
    let { buffer: e } = this.context, n = e.buffer[this.index + 3];
    return n < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new ka(this.context, this._parent, n) : this.externalSibling(1);
  }
  get prevSibling() {
    let { buffer: e } = this.context, n = this._parent ? this._parent.index + 4 : 0;
    return this.index == n ? this.externalSibling(-1) : new ka(this.context, this._parent, e.findChild(
      n,
      this.index,
      -1,
      0,
      4
      /* Side.DontCare */
    ));
  }
  get tree() {
    return null;
  }
  toTree() {
    let e = [], n = [], { buffer: i } = this.context, r = this.index + 4, s = i.buffer[this.index + 3];
    if (s > r) {
      let o = i.buffer[this.index + 1];
      e.push(i.slice(r, s, o)), n.push(0);
    }
    return new Qn(this.type, e, n, this.to - this.from);
  }
  /**
  @internal
  */
  toString() {
    return this.context.buffer.childString(this.index);
  }
}
function vQ(t) {
  if (!t.length)
    return null;
  let e = 0, n = t[0];
  for (let s = 1; s < t.length; s++) {
    let o = t[s];
    (o.from > n.from || o.to < n.to) && (n = o, e = s);
  }
  let i = n instanceof Dr && n.index < 0 ? null : n.parent, r = t.slice();
  return i ? r[e] = i : r.splice(e, 1), new v3e(r, n);
}
class v3e {
  constructor(e, n) {
    this.heads = e, this.node = n;
  }
  get next() {
    return vQ(this.heads);
  }
}
function b3e(t, e, n) {
  let i = t.resolveInner(e, n), r = null;
  for (let s = i instanceof Dr ? i : i.context.parent; s; s = s.parent)
    if (s.index < 0) {
      let o = s.parent;
      (r || (r = [i])).push(o.resolve(e, n)), s = o;
    } else {
      let o = p0.get(s.tree);
      if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
        let a = new Dr(o.tree, o.overlay[0].from + s.from, -1, s);
        (r || (r = [i])).push(m0(a, e, n, !1));
      }
    }
  return r ? vQ(r) : i;
}
class Ew {
  /**
  Shorthand for `.type.name`.
  */
  get name() {
    return this.type.name;
  }
  /**
  @internal
  */
  constructor(e, n = 0) {
    if (this.mode = n, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof Dr)
      this.yieldNode(e);
    else {
      this._tree = e.context.parent, this.buffer = e.context;
      for (let i = e._parent; i; i = i._parent)
        this.stack.unshift(i.index);
      this.bufferNode = e, this.yieldBuf(e.index);
    }
  }
  yieldNode(e) {
    return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
  }
  yieldBuf(e, n) {
    this.index = e;
    let { start: i, buffer: r } = this.buffer;
    return this.type = n || r.set.types[r.buffer[e]], this.from = i + r.buffer[e + 1], this.to = i + r.buffer[e + 2], !0;
  }
  /**
  @internal
  */
  yield(e) {
    return e ? e instanceof Dr ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
  }
  /**
  @internal
  */
  toString() {
    return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
  }
  /**
  @internal
  */
  enterChild(e, n, i) {
    if (!this.buffer)
      return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, n, i, this.mode));
    let { buffer: r } = this.buffer, s = r.findChild(this.index + 4, r.buffer[this.index + 3], e, n - this.buffer.start, i);
    return s < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(s));
  }
  /**
  Move the cursor to this node's first child. When this returns
  false, the node has no child, and the cursor has not been moved.
  */
  firstChild() {
    return this.enterChild(
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  /**
  Move the cursor to this node's last child.
  */
  lastChild() {
    return this.enterChild(
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  /**
  Move the cursor to the first child that ends after `pos`.
  */
  childAfter(e) {
    return this.enterChild(
      1,
      e,
      2
      /* Side.After */
    );
  }
  /**
  Move to the last child that starts before `pos`.
  */
  childBefore(e) {
    return this.enterChild(
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  /**
  Move the cursor to the child around `pos`. If side is -1 the
  child may end at that position, when 1 it may start there. This
  will also enter [overlaid](#common.MountedTree.overlay)
  [mounted](#common.NodeProp^mounted) trees unless `overlays` is
  set to false.
  */
  enter(e, n, i = this.mode) {
    return this.buffer ? i & hn.ExcludeBuffers ? !1 : this.enterChild(1, e, n) : this.yield(this._tree.enter(e, n, i));
  }
  /**
  Move to the node's parent node, if this isn't the top node.
  */
  parent() {
    if (!this.buffer)
      return this.yieldNode(this.mode & hn.IncludeAnonymous ? this._tree._parent : this._tree.parent);
    if (this.stack.length)
      return this.yieldBuf(this.stack.pop());
    let e = this.mode & hn.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
    return this.buffer = null, this.yieldNode(e);
  }
  /**
  @internal
  */
  sibling(e) {
    if (!this.buffer)
      return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1;
    let { buffer: n } = this.buffer, i = this.stack.length - 1;
    if (e < 0) {
      let r = i < 0 ? 0 : this.stack[i] + 4;
      if (this.index != r)
        return this.yieldBuf(n.findChild(
          r,
          this.index,
          -1,
          0,
          4
          /* Side.DontCare */
        ));
    } else {
      let r = n.buffer[this.index + 3];
      if (r < (i < 0 ? n.buffer.length : n.buffer[this.stack[i] + 3]))
        return this.yieldBuf(r);
    }
    return i < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
  }
  /**
  Move to this node's next sibling, if any.
  */
  nextSibling() {
    return this.sibling(1);
  }
  /**
  Move to this node's previous sibling, if any.
  */
  prevSibling() {
    return this.sibling(-1);
  }
  atLastNode(e) {
    let n, i, { buffer: r } = this;
    if (r) {
      if (e > 0) {
        if (this.index < r.buffer.buffer.length)
          return !1;
      } else
        for (let s = 0; s < this.index; s++)
          if (r.buffer.buffer[s + 3] < this.index)
            return !1;
      ({ index: n, parent: i } = r);
    } else
      ({ index: n, _parent: i } = this._tree);
    for (; i; { index: n, _parent: i } = i)
      if (n > -1)
        for (let s = n + e, o = e < 0 ? -1 : i._tree.children.length; s != o; s += e) {
          let a = i._tree.children[s];
          if (this.mode & hn.IncludeAnonymous || a instanceof Xu || !a.type.isAnonymous || CE(a))
            return !1;
        }
    return !0;
  }
  move(e, n) {
    if (n && this.enterChild(
      e,
      0,
      4
      /* Side.DontCare */
    ))
      return !0;
    for (; ; ) {
      if (this.sibling(e))
        return !0;
      if (this.atLastNode(e) || !this.parent())
        return !1;
    }
  }
  /**
  Move to the next node in a
  [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
  traversal, going from a node to its first child or, if the
  current node is empty or `enter` is false, its next sibling or
  the next sibling of the first parent node that has one.
  */
  next(e = !0) {
    return this.move(1, e);
  }
  /**
  Move to the next node in a last-to-first pre-order traversal. A
  node is followed by its last child or, if it has none, its
  previous sibling or the previous sibling of the first parent
  node that has one.
  */
  prev(e = !0) {
    return this.move(-1, e);
  }
  /**
  Move the cursor to the innermost node that covers `pos`. If
  `side` is -1, it will enter nodes that end at `pos`. If it is 1,
  it will enter nodes that start at `pos`.
  */
  moveTo(e, n = 0) {
    for (; (this.from == this.to || (n < 1 ? this.from >= e : this.from > e) || (n > -1 ? this.to <= e : this.to < e)) && this.parent(); )
      ;
    for (; this.enterChild(1, e, n); )
      ;
    return this;
  }
  /**
  Get a [syntax node](#common.SyntaxNode) at the cursor's current
  position.
  */
  get node() {
    if (!this.buffer)
      return this._tree;
    let e = this.bufferNode, n = null, i = 0;
    if (e && e.context == this.buffer)
      e: for (let r = this.index, s = this.stack.length; s >= 0; ) {
        for (let o = e; o; o = o._parent)
          if (o.index == r) {
            if (r == this.index)
              return o;
            n = o, i = s + 1;
            break e;
          }
        r = this.stack[--s];
      }
    for (let r = i; r < this.stack.length; r++)
      n = new ka(this.buffer, n, this.stack[r]);
    return this.bufferNode = new ka(this.buffer, n, this.index);
  }
  /**
  Get the [tree](#common.Tree) that represents the current node, if
  any. Will return null when the node is in a [tree
  buffer](#common.TreeBuffer).
  */
  get tree() {
    return this.buffer ? null : this._tree._tree;
  }
  /**
  Iterate over the current node and all its descendants, calling
  `enter` when entering a node and `leave`, if given, when leaving
  one. When `enter` returns `false`, any children of that node are
  skipped, and `leave` isn't called for it.
  */
  iterate(e, n) {
    for (let i = 0; ; ) {
      let r = !1;
      if (this.type.isAnonymous || e(this) !== !1) {
        if (this.firstChild()) {
          i++;
          continue;
        }
        this.type.isAnonymous || (r = !0);
      }
      for (; ; ) {
        if (r && n && n(this), r = this.type.isAnonymous, !i)
          return;
        if (this.nextSibling())
          break;
        this.parent(), i--, r = !0;
      }
    }
  }
  /**
  Test whether the current node matches a given context—a sequence
  of direct parent node names. Empty strings in the context array
  are treated as wildcards.
  */
  matchContext(e) {
    if (!this.buffer)
      return mC(this.node.parent, e);
    let { buffer: n } = this.buffer, { types: i } = n.set;
    for (let r = e.length - 1, s = this.stack.length - 1; r >= 0; s--) {
      if (s < 0)
        return mC(this._tree, e, r);
      let o = i[n.buffer[this.stack[s]]];
      if (!o.isAnonymous) {
        if (e[r] && e[r] != o.name)
          return !1;
        r--;
      }
    }
    return !0;
  }
}
function CE(t) {
  return t.children.some((e) => e instanceof Xu || !e.type.isAnonymous || CE(e));
}
function y3e(t) {
  var e;
  let { buffer: n, nodeSet: i, maxBufferLength: r = pQ, reused: s = [], minRepeatType: o = i.types.length } = t, a = Array.isArray(n) ? new SE(n, n.length) : n, l = i.types, u = 0, f = 0;
  function d(M, $, P, W, z, Z) {
    let { id: L, start: Q, end: V, size: H } = a, R = f, q = u;
    if (H < 0)
      if (a.next(), H == -1) {
        let ce = s[L];
        P.push(ce), W.push(Q - M);
        return;
      } else if (H == -3) {
        u = L;
        return;
      } else if (H == -4) {
        f = L;
        return;
      } else
        throw new RangeError(`Unrecognized record size: ${H}`);
    let Y = l[L], K, te, se = Q - M;
    if (V - Q <= r && (te = x(a.pos - $, z))) {
      let ce = new Uint16Array(te.size - te.skip), U = a.pos - te.size, F = ce.length;
      for (; a.pos > U; )
        F = _(te.start, ce, F);
      K = new Xu(ce, V - te.start, i), se = te.start - M;
    } else {
      let ce = a.pos - H;
      a.next();
      let U = [], F = [], oe = L >= o ? L : -1, le = 0, pe = V;
      for (; a.pos > ce; )
        oe >= 0 && a.id == oe && a.size >= 0 ? (a.end <= pe - r && (g(U, F, Q, le, a.end, pe, oe, R, q), le = U.length, pe = a.end), a.next()) : Z > 2500 ? h(Q, ce, U, F) : d(Q, ce, U, F, oe, Z + 1);
      if (oe >= 0 && le > 0 && le < U.length && g(U, F, Q, le, Q, pe, oe, R, q), U.reverse(), F.reverse(), oe > -1 && le > 0) {
        let Re = m(Y, q);
        K = EE(Y, U, F, 0, U.length, 0, V - Q, Re, Re);
      } else
        K = w(Y, U, F, V - Q, R - V, q);
    }
    P.push(K), W.push(se);
  }
  function h(M, $, P, W) {
    let z = [], Z = 0, L = -1;
    for (; a.pos > $; ) {
      let { id: Q, start: V, end: H, size: R } = a;
      if (R > 4)
        a.next();
      else {
        if (L > -1 && V < L)
          break;
        L < 0 && (L = H - r), z.push(Q, V, H), Z++, a.next();
      }
    }
    if (Z) {
      let Q = new Uint16Array(Z * 4), V = z[z.length - 2];
      for (let H = z.length - 3, R = 0; H >= 0; H -= 3)
        Q[R++] = z[H], Q[R++] = z[H + 1] - V, Q[R++] = z[H + 2] - V, Q[R++] = R;
      P.push(new Xu(Q, z[2] - V, i)), W.push(V - M);
    }
  }
  function m(M, $) {
    return (P, W, z) => {
      let Z = 0, L = P.length - 1, Q, V;
      if (L >= 0 && (Q = P[L]) instanceof Qn) {
        if (!L && Q.type == M && Q.length == z)
          return Q;
        (V = Q.prop(Mt.lookAhead)) && (Z = W[L] + Q.length + V);
      }
      return w(M, P, W, z, Z, $);
    };
  }
  function g(M, $, P, W, z, Z, L, Q, V) {
    let H = [], R = [];
    for (; M.length > W; )
      H.push(M.pop()), R.push($.pop() + P - z);
    M.push(w(i.types[L], H, R, Z - z, Q - Z, V)), $.push(z - P);
  }
  function w(M, $, P, W, z, Z, L) {
    if (Z) {
      let Q = [Mt.contextHash, Z];
      L = L ? [Q].concat(L) : [Q];
    }
    if (z > 25) {
      let Q = [Mt.lookAhead, z];
      L = L ? [Q].concat(L) : [Q];
    }
    return new Qn(M, $, P, W, L);
  }
  function x(M, $) {
    let P = a.fork(), W = 0, z = 0, Z = 0, L = P.end - r, Q = { size: 0, start: 0, skip: 0 };
    e: for (let V = P.pos - M; P.pos > V; ) {
      let H = P.size;
      if (P.id == $ && H >= 0) {
        Q.size = W, Q.start = z, Q.skip = Z, Z += 4, W += 4, P.next();
        continue;
      }
      let R = P.pos - H;
      if (H < 0 || R < V || P.start < L)
        break;
      let q = P.id >= o ? 4 : 0, Y = P.start;
      for (P.next(); P.pos > R; ) {
        if (P.size < 0)
          if (P.size == -3)
            q += 4;
          else
            break e;
        else P.id >= o && (q += 4);
        P.next();
      }
      z = Y, W += H, Z += q;
    }
    return ($ < 0 || W == M) && (Q.size = W, Q.start = z, Q.skip = Z), Q.size > 4 ? Q : void 0;
  }
  function _(M, $, P) {
    let { id: W, start: z, end: Z, size: L } = a;
    if (a.next(), L >= 0 && W < o) {
      let Q = P;
      if (L > 4) {
        let V = a.pos - (L - 4);
        for (; a.pos > V; )
          P = _(M, $, P);
      }
      $[--P] = Q, $[--P] = Z - M, $[--P] = z - M, $[--P] = W;
    } else L == -3 ? u = W : L == -4 && (f = W);
    return P;
  }
  let S = [], C = [];
  for (; a.pos > 0; )
    d(t.start || 0, t.bufferStart || 0, S, C, -1, 0);
  let E = (e = t.length) !== null && e !== void 0 ? e : S.length ? C[0] + S[0].length : 0;
  return new Qn(l[t.topID], S.reverse(), C.reverse(), E);
}
const KA = /* @__PURE__ */ new WeakMap();
function py(t, e) {
  if (!t.isAnonymous || e instanceof Xu || e.type != t)
    return 1;
  let n = KA.get(e);
  if (n == null) {
    n = 1;
    for (let i of e.children) {
      if (i.type != t || !(i instanceof Qn)) {
        n = 1;
        break;
      }
      n += py(t, i);
    }
    KA.set(e, n);
  }
  return n;
}
function EE(t, e, n, i, r, s, o, a, l) {
  let u = 0;
  for (let g = i; g < r; g++)
    u += py(t, e[g]);
  let f = Math.ceil(
    u * 1.5 / 8
    /* Balance.BranchFactor */
  ), d = [], h = [];
  function m(g, w, x, _, S) {
    for (let C = x; C < _; ) {
      let E = C, M = w[C], $ = py(t, g[C]);
      for (C++; C < _; C++) {
        let P = py(t, g[C]);
        if ($ + P >= f)
          break;
        $ += P;
      }
      if (C == E + 1) {
        if ($ > f) {
          let P = g[E];
          m(P.children, P.positions, 0, P.children.length, w[E] + S);
          continue;
        }
        d.push(g[E]);
      } else {
        let P = w[C - 1] + g[C - 1].length - M;
        d.push(EE(t, g, w, E, C, M, P, null, l));
      }
      h.push(M + S - s);
    }
  }
  return m(e, n, i, r, 0), (a || l)(d, h, o);
}
class bQ {
  constructor() {
    this.map = /* @__PURE__ */ new WeakMap();
  }
  setBuffer(e, n, i) {
    let r = this.map.get(e);
    r || this.map.set(e, r = /* @__PURE__ */ new Map()), r.set(n, i);
  }
  getBuffer(e, n) {
    let i = this.map.get(e);
    return i && i.get(n);
  }
  /**
  Set the value for this syntax node.
  */
  set(e, n) {
    e instanceof ka ? this.setBuffer(e.context.buffer, e.index, n) : e instanceof Dr && this.map.set(e.tree, n);
  }
  /**
  Retrieve value for this syntax node, if it exists in the map.
  */
  get(e) {
    return e instanceof ka ? this.getBuffer(e.context.buffer, e.index) : e instanceof Dr ? this.map.get(e.tree) : void 0;
  }
  /**
  Set the value for the node that a cursor currently points to.
  */
  cursorSet(e, n) {
    e.buffer ? this.setBuffer(e.buffer.buffer, e.index, n) : this.map.set(e.tree, n);
  }
  /**
  Retrieve the value for the node that a cursor currently points
  to.
  */
  cursorGet(e) {
    return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree);
  }
}
class gl {
  /**
  Construct a tree fragment. You'll usually want to use
  [`addTree`](#common.TreeFragment^addTree) and
  [`applyChanges`](#common.TreeFragment^applyChanges) instead of
  calling this directly.
  */
  constructor(e, n, i, r, s = !1, o = !1) {
    this.from = e, this.to = n, this.tree = i, this.offset = r, this.open = (s ? 1 : 0) | (o ? 2 : 0);
  }
  /**
  Whether the start of the fragment represents the start of a
  parse, or the end of a change. (In the second case, it may not
  be safe to reuse some nodes at the start, depending on the
  parsing algorithm.)
  */
  get openStart() {
    return (this.open & 1) > 0;
  }
  /**
  Whether the end of the fragment represents the end of a
  full-document parse, or the start of a change.
  */
  get openEnd() {
    return (this.open & 2) > 0;
  }
  /**
  Create a set of fragments from a freshly parsed tree, or update
  an existing set of fragments by replacing the ones that overlap
  with a tree with content from the new tree. When `partial` is
  true, the parse is treated as incomplete, and the resulting
  fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
  true.
  */
  static addTree(e, n = [], i = !1) {
    let r = [new gl(0, e.length, e, 0, !1, i)];
    for (let s of n)
      s.to > e.length && r.push(s);
    return r;
  }
  /**
  Apply a set of edits to an array of fragments, removing or
  splitting fragments as necessary to remove edited ranges, and
  adjusting offsets for fragments that moved.
  */
  static applyChanges(e, n, i = 128) {
    if (!n.length)
      return e;
    let r = [], s = 1, o = e.length ? e[0] : null;
    for (let a = 0, l = 0, u = 0; ; a++) {
      let f = a < n.length ? n[a] : null, d = f ? f.fromA : 1e9;
      if (d - l >= i)
        for (; o && o.from < d; ) {
          let h = o;
          if (l >= h.from || d <= h.to || u) {
            let m = Math.max(h.from, l) - u, g = Math.min(h.to, d) - u;
            h = m >= g ? null : new gl(m, g, h.tree, h.offset + u, a > 0, !!f);
          }
          if (h && r.push(h), o.to > d)
            break;
          o = s < e.length ? e[s++] : null;
        }
      if (!f)
        break;
      l = f.toA, u = f.toA - f.toB;
    }
    return r;
  }
}
class yQ {
  /**
  Start a parse, returning a [partial parse](#common.PartialParse)
  object. [`fragments`](#common.TreeFragment) can be passed in to
  make the parse incremental.
  
  By default, the entire input is parsed. You can pass `ranges`,
  which should be a sorted array of non-empty, non-overlapping
  ranges, to parse only those ranges. The tree returned in that
  case will start at `ranges[0].from`.
  */
  startParse(e, n, i) {
    return typeof e == "string" && (e = new w3e(e)), i = i ? i.length ? i.map((r) => new oo(r.from, r.to)) : [new oo(0, 0)] : [new oo(0, e.length)], this.createParse(e, n || [], i);
  }
  /**
  Run a full parse, returning the resulting tree.
  */
  parse(e, n, i) {
    let r = this.startParse(e, n, i);
    for (; ; ) {
      let s = r.advance();
      if (s)
        return s;
    }
  }
}
class w3e {
  constructor(e) {
    this.string = e;
  }
  get length() {
    return this.string.length;
  }
  chunk(e) {
    return this.string.slice(e);
  }
  get lineChunks() {
    return !1;
  }
  read(e, n) {
    return this.string.slice(e, n);
  }
}
function k3e(t) {
  return (e, n, i, r) => new _3e(e, t, n, i, r);
}
class JA {
  constructor(e, n, i, r, s) {
    this.parser = e, this.parse = n, this.overlay = i, this.target = r, this.from = s;
  }
}
function eD(t) {
  if (!t.length || t.some((e) => e.from >= e.to))
    throw new RangeError("Invalid inner parse ranges given: " + JSON.stringify(t));
}
class x3e {
  constructor(e, n, i, r, s, o, a) {
    this.parser = e, this.predicate = n, this.mounts = i, this.index = r, this.start = s, this.target = o, this.prev = a, this.depth = 0, this.ranges = [];
  }
}
const gC = new Mt({ perNode: !0 });
class _3e {
  constructor(e, n, i, r, s) {
    this.nest = n, this.input = i, this.fragments = r, this.ranges = s, this.inner = [], this.innerDone = 0, this.baseTree = null, this.stoppedAt = null, this.baseParse = e;
  }
  advance() {
    if (this.baseParse) {
      let i = this.baseParse.advance();
      if (!i)
        return null;
      if (this.baseParse = null, this.baseTree = i, this.startInner(), this.stoppedAt != null)
        for (let r of this.inner)
          r.parse.stopAt(this.stoppedAt);
    }
    if (this.innerDone == this.inner.length) {
      let i = this.baseTree;
      return this.stoppedAt != null && (i = new Qn(i.type, i.children, i.positions, i.length, i.propValues.concat([[gC, this.stoppedAt]]))), i;
    }
    let e = this.inner[this.innerDone], n = e.parse.advance();
    if (n) {
      this.innerDone++;
      let i = Object.assign(/* @__PURE__ */ Object.create(null), e.target.props);
      i[Mt.mounted.id] = new p0(n, e.overlay, e.parser), e.target.props = i;
    }
    return null;
  }
  get parsedPos() {
    if (this.baseParse)
      return 0;
    let e = this.input.length;
    for (let n = this.innerDone; n < this.inner.length; n++)
      this.inner[n].from < e && (e = Math.min(e, this.inner[n].parse.parsedPos));
    return e;
  }
  stopAt(e) {
    if (this.stoppedAt = e, this.baseParse)
      this.baseParse.stopAt(e);
    else
      for (let n = this.innerDone; n < this.inner.length; n++)
        this.inner[n].parse.stopAt(e);
  }
  startInner() {
    let e = new C3e(this.fragments), n = null, i = null, r = new Ew(new Dr(this.baseTree, this.ranges[0].from, 0, null), hn.IncludeAnonymous | hn.IgnoreMounts);
    e: for (let s, o; ; ) {
      let a = !0, l;
      if (this.stoppedAt != null && r.from >= this.stoppedAt)
        a = !1;
      else if (e.hasNode(r)) {
        if (n) {
          let u = n.mounts.find((f) => f.frag.from <= r.from && f.frag.to >= r.to && f.mount.overlay);
          if (u)
            for (let f of u.mount.overlay) {
              let d = f.from + u.pos, h = f.to + u.pos;
              d >= r.from && h <= r.to && !n.ranges.some((m) => m.from < h && m.to > d) && n.ranges.push({ from: d, to: h });
            }
        }
        a = !1;
      } else if (i && (o = O3e(i.ranges, r.from, r.to)))
        a = o != 2;
      else if (!r.type.isAnonymous && (s = this.nest(r, this.input)) && (r.from < r.to || !s.overlay)) {
        r.tree || (S3e(r), n && n.depth++, i && i.depth++);
        let u = e.findMounts(r.from, s.parser);
        if (typeof s.overlay == "function")
          n = new x3e(s.parser, s.overlay, u, this.inner.length, r.from, r.tree, n);
        else {
          let f = iD(this.ranges, s.overlay || (r.from < r.to ? [new oo(r.from, r.to)] : []));
          f.length && eD(f), (f.length || !s.overlay) && this.inner.push(new JA(s.parser, f.length ? s.parser.startParse(this.input, rD(u, f), f) : s.parser.startParse(""), s.overlay ? s.overlay.map((d) => new oo(d.from - r.from, d.to - r.from)) : null, r.tree, f.length ? f[0].from : r.from)), s.overlay ? f.length && (i = { ranges: f, depth: 0, prev: i }) : a = !1;
        }
      } else if (n && (l = n.predicate(r)) && (l === !0 && (l = new oo(r.from, r.to)), l.from < l.to)) {
        let u = n.ranges.length - 1;
        u >= 0 && n.ranges[u].to == l.from ? n.ranges[u] = { from: n.ranges[u].from, to: l.to } : n.ranges.push(l);
      }
      if (a && r.firstChild())
        n && n.depth++, i && i.depth++;
      else
        for (; !r.nextSibling(); ) {
          if (!r.parent())
            break e;
          if (n && !--n.depth) {
            let u = iD(this.ranges, n.ranges);
            u.length && (eD(u), this.inner.splice(n.index, 0, new JA(n.parser, n.parser.startParse(this.input, rD(n.mounts, u), u), n.ranges.map((f) => new oo(f.from - n.start, f.to - n.start)), n.target, u[0].from))), n = n.prev;
          }
          i && !--i.depth && (i = i.prev);
        }
    }
  }
}
function O3e(t, e, n) {
  for (let i of t) {
    if (i.from >= n)
      break;
    if (i.to > e)
      return i.from <= e && i.to >= n ? 2 : 1;
  }
  return 0;
}
function tD(t, e, n, i, r, s) {
  if (e < n) {
    let o = t.buffer[e + 1];
    i.push(t.slice(e, n, o)), r.push(o - s);
  }
}
function S3e(t) {
  let { node: e } = t, n = [], i = e.context.buffer;
  do
    n.push(t.index), t.parent();
  while (!t.tree);
  let r = t.tree, s = r.children.indexOf(i), o = r.children[s], a = o.buffer, l = [s];
  function u(f, d, h, m, g, w) {
    let x = n[w], _ = [], S = [];
    tD(o, f, x, _, S, m);
    let C = a[x + 1], E = a[x + 2];
    l.push(_.length);
    let M = w ? u(x + 4, a[x + 3], o.set.types[a[x]], C, E - C, w - 1) : e.toTree();
    return _.push(M), S.push(C - m), tD(o, a[x + 3], d, _, S, m), new Qn(h, _, S, g);
  }
  r.children[s] = u(0, a.length, ns.none, 0, o.length, n.length - 1);
  for (let f of l) {
    let d = t.tree.children[f], h = t.tree.positions[f];
    t.yield(new Dr(d, h + t.from, f, t._tree));
  }
}
class nD {
  constructor(e, n) {
    this.offset = n, this.done = !1, this.cursor = e.cursor(hn.IncludeAnonymous | hn.IgnoreMounts);
  }
  // Move to the first node (in pre-order) that starts at or after `pos`.
  moveTo(e) {
    let { cursor: n } = this, i = e - this.offset;
    for (; !this.done && n.from < i; )
      n.to >= e && n.enter(i, 1, hn.IgnoreOverlays | hn.ExcludeBuffers) || n.next(!1) || (this.done = !0);
  }
  hasNode(e) {
    if (this.moveTo(e.from), !this.done && this.cursor.from + this.offset == e.from && this.cursor.tree)
      for (let n = this.cursor.tree; ; ) {
        if (n == e.tree)
          return !0;
        if (n.children.length && n.positions[0] == 0 && n.children[0] instanceof Qn)
          n = n.children[0];
        else
          break;
      }
    return !1;
  }
}
let C3e = class {
  constructor(e) {
    var n;
    if (this.fragments = e, this.curTo = 0, this.fragI = 0, e.length) {
      let i = this.curFrag = e[0];
      this.curTo = (n = i.tree.prop(gC)) !== null && n !== void 0 ? n : i.to, this.inner = new nD(i.tree, -i.offset);
    } else
      this.curFrag = this.inner = null;
  }
  hasNode(e) {
    for (; this.curFrag && e.from >= this.curTo; )
      this.nextFrag();
    return this.curFrag && this.curFrag.from <= e.from && this.curTo >= e.to && this.inner.hasNode(e);
  }
  nextFrag() {
    var e;
    if (this.fragI++, this.fragI == this.fragments.length)
      this.curFrag = this.inner = null;
    else {
      let n = this.curFrag = this.fragments[this.fragI];
      this.curTo = (e = n.tree.prop(gC)) !== null && e !== void 0 ? e : n.to, this.inner = new nD(n.tree, -n.offset);
    }
  }
  findMounts(e, n) {
    var i;
    let r = [];
    if (this.inner) {
      this.inner.cursor.moveTo(e, 1);
      for (let s = this.inner.cursor.node; s; s = s.parent) {
        let o = (i = s.tree) === null || i === void 0 ? void 0 : i.prop(Mt.mounted);
        if (o && o.parser == n)
          for (let a = this.fragI; a < this.fragments.length; a++) {
            let l = this.fragments[a];
            if (l.from >= s.to)
              break;
            l.tree == this.curFrag.tree && r.push({
              frag: l,
              pos: s.from - l.offset,
              mount: o
            });
          }
      }
    }
    return r;
  }
};
function iD(t, e) {
  let n = null, i = e;
  for (let r = 1, s = 0; r < t.length; r++) {
    let o = t[r - 1].to, a = t[r].from;
    for (; s < i.length; s++) {
      let l = i[s];
      if (l.from >= a)
        break;
      l.to <= o || (n || (i = n = e.slice()), l.from < o ? (n[s] = new oo(l.from, o), l.to > a && n.splice(s + 1, 0, new oo(a, l.to))) : l.to > a ? n[s--] = new oo(a, l.to) : n.splice(s--, 1));
    }
  }
  return i;
}
function E3e(t, e, n, i) {
  let r = 0, s = 0, o = !1, a = !1, l = -1e9, u = [];
  for (; ; ) {
    let f = r == t.length ? 1e9 : o ? t[r].to : t[r].from, d = s == e.length ? 1e9 : a ? e[s].to : e[s].from;
    if (o != a) {
      let h = Math.max(l, n), m = Math.min(f, d, i);
      h < m && u.push(new oo(h, m));
    }
    if (l = Math.min(f, d), l == 1e9)
      break;
    f == l && (o ? (o = !1, r++) : o = !0), d == l && (a ? (a = !1, s++) : a = !0);
  }
  return u;
}
function rD(t, e) {
  let n = [];
  for (let { pos: i, mount: r, frag: s } of t) {
    let o = i + (r.overlay ? r.overlay[0].from : 0), a = o + r.tree.length, l = Math.max(s.from, o), u = Math.min(s.to, a);
    if (r.overlay) {
      let f = r.overlay.map((h) => new oo(h.from + i, h.to + i)), d = E3e(e, f, l, u);
      for (let h = 0, m = l; ; h++) {
        let g = h == d.length, w = g ? u : d[h].from;
        if (w > m && n.push(new gl(m, w, r.tree, -o, s.from >= m || s.openStart, s.to <= w || s.openEnd)), g)
          break;
        m = d[h].to;
      }
    } else
      n.push(new gl(l, u, r.tree, -o, s.from >= o || s.openStart, s.to <= a || s.openEnd));
  }
  return n;
}
let T3e = 0;
class to {
  /**
  @internal
  */
  constructor(e, n, i, r) {
    this.name = e, this.set = n, this.base = i, this.modified = r, this.id = T3e++;
  }
  toString() {
    let { name: e } = this;
    for (let n of this.modified)
      n.name && (e = `${n.name}(${e})`);
    return e;
  }
  static define(e, n) {
    let i = typeof e == "string" ? e : "?";
    if (e instanceof to && (n = e), n != null && n.base)
      throw new Error("Can not derive from a modified tag");
    let r = new to(i, [], null, []);
    if (r.set.push(r), n)
      for (let s of n.set)
        r.set.push(s);
    return r;
  }
  /**
  Define a tag _modifier_, which is a function that, given a tag,
  will return a tag that is a subtag of the original. Applying the
  same modifier to a twice tag will return the same value (`m1(t1)
  == m1(t1)`) and applying multiple modifiers will, regardless or
  order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
  
  When multiple modifiers are applied to a given base tag, each
  smaller set of modifiers is registered as a parent, so that for
  example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
  `m1(m3(t1)`, and so on.
  */
  static defineModifier(e) {
    let n = new Tw(e);
    return (i) => i.modified.indexOf(n) > -1 ? i : Tw.get(i.base || i, i.modified.concat(n).sort((r, s) => r.id - s.id));
  }
}
let $3e = 0;
class Tw {
  constructor(e) {
    this.name = e, this.instances = [], this.id = $3e++;
  }
  static get(e, n) {
    if (!n.length)
      return e;
    let i = n[0].instances.find((a) => a.base == e && M3e(n, a.modified));
    if (i)
      return i;
    let r = [], s = new to(e.name, r, e, n);
    for (let a of n)
      a.instances.push(s);
    let o = N3e(n);
    for (let a of e.set)
      if (!a.modified.length)
        for (let l of o)
          r.push(Tw.get(a, l));
    return s;
  }
}
function M3e(t, e) {
  return t.length == e.length && t.every((n, i) => n == e[i]);
}
function N3e(t) {
  let e = [[]];
  for (let n = 0; n < t.length; n++)
    for (let i = 0, r = e.length; i < r; i++)
      e.push(e[i].concat(t[n]));
  return e.sort((n, i) => i.length - n.length);
}
function v2(t) {
  let e = /* @__PURE__ */ Object.create(null);
  for (let n in t) {
    let i = t[n];
    Array.isArray(i) || (i = [i]);
    for (let r of n.split(" "))
      if (r) {
        let s = [], o = 2, a = r;
        for (let d = 0; ; ) {
          if (a == "..." && d > 0 && d + 3 == r.length) {
            o = 1;
            break;
          }
          let h = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);
          if (!h)
            throw new RangeError("Invalid path: " + r);
          if (s.push(h[0] == "*" ? "" : h[0][0] == '"' ? JSON.parse(h[0]) : h[0]), d += h[0].length, d == r.length)
            break;
          let m = r[d++];
          if (d == r.length && m == "!") {
            o = 0;
            break;
          }
          if (m != "/")
            throw new RangeError("Invalid path: " + r);
          a = r.slice(d);
        }
        let l = s.length - 1, u = s[l];
        if (!u)
          throw new RangeError("Invalid path: " + r);
        let f = new g0(i, o, l > 0 ? s.slice(0, l) : null);
        e[u] = f.sort(e[u]);
      }
  }
  return wQ.add(e);
}
const wQ = new Mt({
  combine(t, e) {
    let n, i, r;
    for (; t || e; ) {
      if (!t || e && t.depth >= e.depth ? (r = e, e = e.next) : (r = t, t = t.next), n && n.mode == r.mode && !r.context && !n.context)
        continue;
      let s = new g0(r.tags, r.mode, r.context);
      n ? n.next = s : i = s, n = s;
    }
    return i;
  }
});
class g0 {
  constructor(e, n, i, r) {
    this.tags = e, this.mode = n, this.context = i, this.next = r;
  }
  get opaque() {
    return this.mode == 0;
  }
  get inherit() {
    return this.mode == 1;
  }
  sort(e) {
    return !e || e.depth < this.depth ? (this.next = e, this) : (e.next = this.sort(e.next), e);
  }
  get depth() {
    return this.context ? this.context.length : 0;
  }
}
g0.empty = new g0([], 2, null);
function kQ(t, e) {
  let n = /* @__PURE__ */ Object.create(null);
  for (let s of t)
    if (!Array.isArray(s.tag))
      n[s.tag.id] = s.class;
    else
      for (let o of s.tag)
        n[o.id] = s.class;
  let { scope: i, all: r = null } = e || {};
  return {
    style: (s) => {
      let o = r;
      for (let a of s)
        for (let l of a.set) {
          let u = n[l.id];
          if (u) {
            o = o ? o + " " + u : u;
            break;
          }
        }
      return o;
    },
    scope: i
  };
}
function A3e(t, e) {
  let n = null;
  for (let i of t) {
    let r = i.style(e);
    r && (n = n ? n + " " + r : r);
  }
  return n;
}
function D3e(t, e, n, i = 0, r = t.length) {
  let s = new P3e(i, Array.isArray(e) ? e : [e], n);
  s.highlightRange(t.cursor(), i, r, "", s.highlighters), s.flush(r);
}
class P3e {
  constructor(e, n, i) {
    this.at = e, this.highlighters = n, this.span = i, this.class = "";
  }
  startSpan(e, n) {
    n != this.class && (this.flush(e), e > this.at && (this.at = e), this.class = n);
  }
  flush(e) {
    e > this.at && this.class && this.span(this.at, e, this.class);
  }
  highlightRange(e, n, i, r, s) {
    let { type: o, from: a, to: l } = e;
    if (a >= i || l <= n)
      return;
    o.isTop && (s = this.highlighters.filter((m) => !m.scope || m.scope(o)));
    let u = r, f = I3e(e) || g0.empty, d = A3e(s, f.tags);
    if (d && (u && (u += " "), u += d, f.mode == 1 && (r += (r ? " " : "") + d)), this.startSpan(Math.max(n, a), u), f.opaque)
      return;
    let h = e.tree && e.tree.prop(Mt.mounted);
    if (h && h.overlay) {
      let m = e.node.enter(h.overlay[0].from + a, 1), g = this.highlighters.filter((x) => !x.scope || x.scope(h.tree.type)), w = e.firstChild();
      for (let x = 0, _ = a; ; x++) {
        let S = x < h.overlay.length ? h.overlay[x] : null, C = S ? S.from + a : l, E = Math.max(n, _), M = Math.min(i, C);
        if (E < M && w)
          for (; e.from < M && (this.highlightRange(e, E, M, r, s), this.startSpan(Math.min(M, e.to), u), !(e.to >= C || !e.nextSibling())); )
            ;
        if (!S || C > i)
          break;
        _ = S.to + a, _ > n && (this.highlightRange(m.cursor(), Math.max(n, S.from + a), Math.min(i, _), "", g), this.startSpan(Math.min(i, _), u));
      }
      w && e.parent();
    } else if (e.firstChild()) {
      h && (r = "");
      do
        if (!(e.to <= n)) {
          if (e.from >= i)
            break;
          this.highlightRange(e, n, i, r, s), this.startSpan(Math.min(i, e.to), u);
        }
      while (e.nextSibling());
      e.parent();
    }
  }
}
function I3e(t) {
  let e = t.type.prop(wQ);
  for (; e && e.context && !t.matchContext(e.context); )
    e = e.next;
  return e || null;
}
const $e = to.define, _b = $e(), pu = $e(), sD = $e(pu), oD = $e(pu), mu = $e(), Ob = $e(mu), rO = $e(mu), ca = $e(), Pc = $e(ca), sa = $e(), oa = $e(), vC = $e(), Nm = $e(vC), Sb = $e(), X = {
  /**
  A comment.
  */
  comment: _b,
  /**
  A line [comment](#highlight.tags.comment).
  */
  lineComment: $e(_b),
  /**
  A block [comment](#highlight.tags.comment).
  */
  blockComment: $e(_b),
  /**
  A documentation [comment](#highlight.tags.comment).
  */
  docComment: $e(_b),
  /**
  Any kind of identifier.
  */
  name: pu,
  /**
  The [name](#highlight.tags.name) of a variable.
  */
  variableName: $e(pu),
  /**
  A type [name](#highlight.tags.name).
  */
  typeName: sD,
  /**
  A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
  */
  tagName: $e(sD),
  /**
  A property or field [name](#highlight.tags.name).
  */
  propertyName: oD,
  /**
  An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
  */
  attributeName: $e(oD),
  /**
  The [name](#highlight.tags.name) of a class.
  */
  className: $e(pu),
  /**
  A label [name](#highlight.tags.name).
  */
  labelName: $e(pu),
  /**
  A namespace [name](#highlight.tags.name).
  */
  namespace: $e(pu),
  /**
  The [name](#highlight.tags.name) of a macro.
  */
  macroName: $e(pu),
  /**
  A literal value.
  */
  literal: mu,
  /**
  A string [literal](#highlight.tags.literal).
  */
  string: Ob,
  /**
  A documentation [string](#highlight.tags.string).
  */
  docString: $e(Ob),
  /**
  A character literal (subtag of [string](#highlight.tags.string)).
  */
  character: $e(Ob),
  /**
  An attribute value (subtag of [string](#highlight.tags.string)).
  */
  attributeValue: $e(Ob),
  /**
  A number [literal](#highlight.tags.literal).
  */
  number: rO,
  /**
  An integer [number](#highlight.tags.number) literal.
  */
  integer: $e(rO),
  /**
  A floating-point [number](#highlight.tags.number) literal.
  */
  float: $e(rO),
  /**
  A boolean [literal](#highlight.tags.literal).
  */
  bool: $e(mu),
  /**
  Regular expression [literal](#highlight.tags.literal).
  */
  regexp: $e(mu),
  /**
  An escape [literal](#highlight.tags.literal), for example a
  backslash escape in a string.
  */
  escape: $e(mu),
  /**
  A color [literal](#highlight.tags.literal).
  */
  color: $e(mu),
  /**
  A URL [literal](#highlight.tags.literal).
  */
  url: $e(mu),
  /**
  A language keyword.
  */
  keyword: sa,
  /**
  The [keyword](#highlight.tags.keyword) for the self or this
  object.
  */
  self: $e(sa),
  /**
  The [keyword](#highlight.tags.keyword) for null.
  */
  null: $e(sa),
  /**
  A [keyword](#highlight.tags.keyword) denoting some atomic value.
  */
  atom: $e(sa),
  /**
  A [keyword](#highlight.tags.keyword) that represents a unit.
  */
  unit: $e(sa),
  /**
  A modifier [keyword](#highlight.tags.keyword).
  */
  modifier: $e(sa),
  /**
  A [keyword](#highlight.tags.keyword) that acts as an operator.
  */
  operatorKeyword: $e(sa),
  /**
  A control-flow related [keyword](#highlight.tags.keyword).
  */
  controlKeyword: $e(sa),
  /**
  A [keyword](#highlight.tags.keyword) that defines something.
  */
  definitionKeyword: $e(sa),
  /**
  A [keyword](#highlight.tags.keyword) related to defining or
  interfacing with modules.
  */
  moduleKeyword: $e(sa),
  /**
  An operator.
  */
  operator: oa,
  /**
  An [operator](#highlight.tags.operator) that dereferences something.
  */
  derefOperator: $e(oa),
  /**
  Arithmetic-related [operator](#highlight.tags.operator).
  */
  arithmeticOperator: $e(oa),
  /**
  Logical [operator](#highlight.tags.operator).
  */
  logicOperator: $e(oa),
  /**
  Bit [operator](#highlight.tags.operator).
  */
  bitwiseOperator: $e(oa),
  /**
  Comparison [operator](#highlight.tags.operator).
  */
  compareOperator: $e(oa),
  /**
  [Operator](#highlight.tags.operator) that updates its operand.
  */
  updateOperator: $e(oa),
  /**
  [Operator](#highlight.tags.operator) that defines something.
  */
  definitionOperator: $e(oa),
  /**
  Type-related [operator](#highlight.tags.operator).
  */
  typeOperator: $e(oa),
  /**
  Control-flow [operator](#highlight.tags.operator).
  */
  controlOperator: $e(oa),
  /**
  Program or markup punctuation.
  */
  punctuation: vC,
  /**
  [Punctuation](#highlight.tags.punctuation) that separates
  things.
  */
  separator: $e(vC),
  /**
  Bracket-style [punctuation](#highlight.tags.punctuation).
  */
  bracket: Nm,
  /**
  Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
  tokens).
  */
  angleBracket: $e(Nm),
  /**
  Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
  tokens).
  */
  squareBracket: $e(Nm),
  /**
  Parentheses (usually `(` and `)` tokens). Subtag of
  [bracket](#highlight.tags.bracket).
  */
  paren: $e(Nm),
  /**
  Braces (usually `{` and `}` tokens). Subtag of
  [bracket](#highlight.tags.bracket).
  */
  brace: $e(Nm),
  /**
  Content, for example plain text in XML or markup documents.
  */
  content: ca,
  /**
  [Content](#highlight.tags.content) that represents a heading.
  */
  heading: Pc,
  /**
  A level 1 [heading](#highlight.tags.heading).
  */
  heading1: $e(Pc),
  /**
  A level 2 [heading](#highlight.tags.heading).
  */
  heading2: $e(Pc),
  /**
  A level 3 [heading](#highlight.tags.heading).
  */
  heading3: $e(Pc),
  /**
  A level 4 [heading](#highlight.tags.heading).
  */
  heading4: $e(Pc),
  /**
  A level 5 [heading](#highlight.tags.heading).
  */
  heading5: $e(Pc),
  /**
  A level 6 [heading](#highlight.tags.heading).
  */
  heading6: $e(Pc),
  /**
  A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
  */
  contentSeparator: $e(ca),
  /**
  [Content](#highlight.tags.content) that represents a list.
  */
  list: $e(ca),
  /**
  [Content](#highlight.tags.content) that represents a quote.
  */
  quote: $e(ca),
  /**
  [Content](#highlight.tags.content) that is emphasized.
  */
  emphasis: $e(ca),
  /**
  [Content](#highlight.tags.content) that is styled strong.
  */
  strong: $e(ca),
  /**
  [Content](#highlight.tags.content) that is part of a link.
  */
  link: $e(ca),
  /**
  [Content](#highlight.tags.content) that is styled as code or
  monospace.
  */
  monospace: $e(ca),
  /**
  [Content](#highlight.tags.content) that has a strike-through
  style.
  */
  strikethrough: $e(ca),
  /**
  Inserted text in a change-tracking format.
  */
  inserted: $e(),
  /**
  Deleted text.
  */
  deleted: $e(),
  /**
  Changed text.
  */
  changed: $e(),
  /**
  An invalid or unsyntactic element.
  */
  invalid: $e(),
  /**
  Metadata or meta-instruction.
  */
  meta: Sb,
  /**
  [Metadata](#highlight.tags.meta) that applies to the entire
  document.
  */
  documentMeta: $e(Sb),
  /**
  [Metadata](#highlight.tags.meta) that annotates or adds
  attributes to a given syntactic element.
  */
  annotation: $e(Sb),
  /**
  Processing instruction or preprocessor directive. Subtag of
  [meta](#highlight.tags.meta).
  */
  processingInstruction: $e(Sb),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates that a
  given element is being defined. Expected to be used with the
  various [name](#highlight.tags.name) tags.
  */
  definition: to.defineModifier("definition"),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates that
  something is constant. Mostly expected to be used with
  [variable names](#highlight.tags.variableName).
  */
  constant: to.defineModifier("constant"),
  /**
  [Modifier](#highlight.Tag^defineModifier) used to indicate that
  a [variable](#highlight.tags.variableName) or [property
  name](#highlight.tags.propertyName) is being called or defined
  as a function.
  */
  function: to.defineModifier("function"),
  /**
  [Modifier](#highlight.Tag^defineModifier) that can be applied to
  [names](#highlight.tags.name) to indicate that they belong to
  the language's standard environment.
  */
  standard: to.defineModifier("standard"),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates a given
  [names](#highlight.tags.name) is local to some scope.
  */
  local: to.defineModifier("local"),
  /**
  A generic variant [modifier](#highlight.Tag^defineModifier) that
  can be used to tag language-specific alternative variants of
  some common tag. It is recommended for themes to define special
  forms of at least the [string](#highlight.tags.string) and
  [variable name](#highlight.tags.variableName) tags, since those
  come up a lot.
  */
  special: to.defineModifier("special")
};
for (let t in X) {
  let e = X[t];
  e instanceof to && (e.name = t);
}
kQ([
  { tag: X.link, class: "tok-link" },
  { tag: X.heading, class: "tok-heading" },
  { tag: X.emphasis, class: "tok-emphasis" },
  { tag: X.strong, class: "tok-strong" },
  { tag: X.keyword, class: "tok-keyword" },
  { tag: X.atom, class: "tok-atom" },
  { tag: X.bool, class: "tok-bool" },
  { tag: X.url, class: "tok-url" },
  { tag: X.labelName, class: "tok-labelName" },
  { tag: X.inserted, class: "tok-inserted" },
  { tag: X.deleted, class: "tok-deleted" },
  { tag: X.literal, class: "tok-literal" },
  { tag: X.string, class: "tok-string" },
  { tag: X.number, class: "tok-number" },
  { tag: [X.regexp, X.escape, X.special(X.string)], class: "tok-string2" },
  { tag: X.variableName, class: "tok-variableName" },
  { tag: X.local(X.variableName), class: "tok-variableName tok-local" },
  { tag: X.definition(X.variableName), class: "tok-variableName tok-definition" },
  { tag: X.special(X.variableName), class: "tok-variableName2" },
  { tag: X.definition(X.propertyName), class: "tok-propertyName tok-definition" },
  { tag: X.typeName, class: "tok-typeName" },
  { tag: X.namespace, class: "tok-namespace" },
  { tag: X.className, class: "tok-className" },
  { tag: X.macroName, class: "tok-macroName" },
  { tag: X.propertyName, class: "tok-propertyName" },
  { tag: X.operator, class: "tok-operator" },
  { tag: X.comment, class: "tok-comment" },
  { tag: X.meta, class: "tok-meta" },
  { tag: X.invalid, class: "tok-invalid" },
  { tag: X.punctuation, class: "tok-punctuation" }
]);
var sO;
const nh = /* @__PURE__ */ new Mt();
function xQ(t) {
  return Qe.define({
    combine: t ? (e) => e.concat(t) : void 0
  });
}
const TE = /* @__PURE__ */ new Mt();
class Lo {
  /**
  Construct a language object. If you need to invoke this
  directly, first define a data facet with
  [`defineLanguageFacet`](https://codemirror.net/6/docs/ref/#language.defineLanguageFacet), and then
  configure your parser to [attach](https://codemirror.net/6/docs/ref/#language.languageDataProp) it
  to the language's outer syntax node.
  */
  constructor(e, n, i = [], r = "") {
    this.data = e, this.name = r, zt.prototype.hasOwnProperty("tree") || Object.defineProperty(zt.prototype, "tree", { get() {
      return ri(this);
    } }), this.parser = n, this.extension = [
      Gu.of(this),
      zt.languageData.of((s, o, a) => {
        let l = aD(s, o, a), u = l.type.prop(nh);
        if (!u)
          return [];
        let f = s.facet(u), d = l.type.prop(TE);
        if (d) {
          let h = l.resolve(o - l.from, a);
          for (let m of d)
            if (m.test(h, s)) {
              let g = s.facet(m.facet);
              return m.type == "replace" ? g : g.concat(f);
            }
        }
        return f;
      })
    ].concat(i);
  }
  /**
  Query whether this language is active at the given position.
  */
  isActiveAt(e, n, i = -1) {
    return aD(e, n, i).type.prop(nh) == this.data;
  }
  /**
  Find the document regions that were parsed using this language.
  The returned regions will _include_ any nested languages rooted
  in this language, when those exist.
  */
  findRegions(e) {
    let n = e.facet(Gu);
    if ((n == null ? void 0 : n.data) == this.data)
      return [{ from: 0, to: e.doc.length }];
    if (!n || !n.allowsNesting)
      return [];
    let i = [], r = (s, o) => {
      if (s.prop(nh) == this.data) {
        i.push({ from: o, to: o + s.length });
        return;
      }
      let a = s.prop(Mt.mounted);
      if (a) {
        if (a.tree.prop(nh) == this.data) {
          if (a.overlay)
            for (let l of a.overlay)
              i.push({ from: l.from + o, to: l.to + o });
          else
            i.push({ from: o, to: o + s.length });
          return;
        } else if (a.overlay) {
          let l = i.length;
          if (r(a.tree, a.overlay[0].from + o), i.length > l)
            return;
        }
      }
      for (let l = 0; l < s.children.length; l++) {
        let u = s.children[l];
        u instanceof Qn && r(u, s.positions[l] + o);
      }
    };
    return r(ri(e), 0), i;
  }
  /**
  Indicates whether this language allows nested languages. The
  default implementation returns true.
  */
  get allowsNesting() {
    return !0;
  }
}
Lo.setState = /* @__PURE__ */ Ot.define();
function aD(t, e, n) {
  let i = t.facet(Gu), r = ri(t).topNode;
  if (!i || i.allowsNesting)
    for (let s = r; s; s = s.enter(e, n, hn.ExcludeBuffers))
      s.type.isTop && (r = s);
  return r;
}
class Nh extends Lo {
  constructor(e, n, i) {
    super(e, n, [], i), this.parser = n;
  }
  /**
  Define a language from a parser.
  */
  static define(e) {
    let n = xQ(e.languageData);
    return new Nh(n, e.parser.configure({
      props: [nh.add((i) => i.isTop ? n : void 0)]
    }), e.name);
  }
  /**
  Create a new instance of this language with a reconfigured
  version of its parser and optionally a new name.
  */
  configure(e, n) {
    return new Nh(this.data, this.parser.configure(e), n || this.name);
  }
  get allowsNesting() {
    return this.parser.hasWrappers();
  }
}
function ri(t) {
  let e = t.field(Lo.state, !1);
  return e ? e.tree : Qn.empty;
}
class L3e {
  /**
  Create an input object for the given document.
  */
  constructor(e) {
    this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter();
  }
  get length() {
    return this.doc.length;
  }
  syncTo(e) {
    return this.string = this.cursor.next(e - this.cursorPos).value, this.cursorPos = e + this.string.length, this.cursorPos - this.string.length;
  }
  chunk(e) {
    return this.syncTo(e), this.string;
  }
  get lineChunks() {
    return !0;
  }
  read(e, n) {
    let i = this.cursorPos - this.string.length;
    return e < i || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - i, n - i);
  }
}
let Am = null;
class $w {
  constructor(e, n, i = [], r, s, o, a, l) {
    this.parser = e, this.state = n, this.fragments = i, this.tree = r, this.treeLen = s, this.viewport = o, this.skipped = a, this.scheduleOn = l, this.parse = null, this.tempSkipped = [];
  }
  /**
  @internal
  */
  static create(e, n, i) {
    return new $w(e, n, [], Qn.empty, 0, i, [], null);
  }
  startParse() {
    return this.parser.startParse(new L3e(this.state.doc), this.fragments);
  }
  /**
  @internal
  */
  work(e, n) {
    return n != null && n >= this.state.doc.length && (n = void 0), this.tree != Qn.empty && this.isDone(n ?? this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => {
      var i;
      if (typeof e == "number") {
        let r = Date.now() + e;
        e = () => Date.now() > r;
      }
      for (this.parse || (this.parse = this.startParse()), n != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > n) && n < this.state.doc.length && this.parse.stopAt(n); ; ) {
        let r = this.parse.advance();
        if (r)
          if (this.fragments = this.withoutTempSkipped(gl.addTree(r, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (i = this.parse.stoppedAt) !== null && i !== void 0 ? i : this.state.doc.length, this.tree = r, this.parse = null, this.treeLen < (n ?? this.state.doc.length))
            this.parse = this.startParse();
          else
            return !0;
        if (e())
          return !1;
      }
    });
  }
  /**
  @internal
  */
  takeTree() {
    let e, n;
    this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => {
      for (; !(n = this.parse.advance()); )
        ;
    }), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(gl.addTree(this.tree, this.fragments, !0)), this.parse = null);
  }
  withContext(e) {
    let n = Am;
    Am = this;
    try {
      return e();
    } finally {
      Am = n;
    }
  }
  withoutTempSkipped(e) {
    for (let n; n = this.tempSkipped.pop(); )
      e = lD(e, n.from, n.to);
    return e;
  }
  /**
  @internal
  */
  changes(e, n) {
    let { fragments: i, tree: r, treeLen: s, viewport: o, skipped: a } = this;
    if (this.takeTree(), !e.empty) {
      let l = [];
      if (e.iterChangedRanges((u, f, d, h) => l.push({ fromA: u, toA: f, fromB: d, toB: h })), i = gl.applyChanges(i, l), r = Qn.empty, s = 0, o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }, this.skipped.length) {
        a = [];
        for (let u of this.skipped) {
          let f = e.mapPos(u.from, 1), d = e.mapPos(u.to, -1);
          f < d && a.push({ from: f, to: d });
        }
      }
    }
    return new $w(this.parser, n, i, r, s, o, a, this.scheduleOn);
  }
  /**
  @internal
  */
  updateViewport(e) {
    if (this.viewport.from == e.from && this.viewport.to == e.to)
      return !1;
    this.viewport = e;
    let n = this.skipped.length;
    for (let i = 0; i < this.skipped.length; i++) {
      let { from: r, to: s } = this.skipped[i];
      r < e.to && s > e.from && (this.fragments = lD(this.fragments, r, s), this.skipped.splice(i--, 1));
    }
    return this.skipped.length >= n ? !1 : (this.reset(), !0);
  }
  /**
  @internal
  */
  reset() {
    this.parse && (this.takeTree(), this.parse = null);
  }
  /**
  Notify the parse scheduler that the given region was skipped
  because it wasn't in view, and the parse should be restarted
  when it comes into view.
  */
  skipUntilInView(e, n) {
    this.skipped.push({ from: e, to: n });
  }
  /**
  Returns a parser intended to be used as placeholder when
  asynchronously loading a nested parser. It'll skip its input and
  mark it as not-really-parsed, so that the next update will parse
  it again.
  
  When `until` is given, a reparse will be scheduled when that
  promise resolves.
  */
  static getSkippingParser(e) {
    return new class extends yQ {
      createParse(n, i, r) {
        let s = r[0].from, o = r[r.length - 1].to;
        return {
          parsedPos: s,
          advance() {
            let l = Am;
            if (l) {
              for (let u of r)
                l.tempSkipped.push(u);
              e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e);
            }
            return this.parsedPos = o, new Qn(ns.none, [], [], o - s);
          },
          stoppedAt: null,
          stopAt() {
          }
        };
      }
    }();
  }
  /**
  @internal
  */
  isDone(e) {
    e = Math.min(e, this.state.doc.length);
    let n = this.fragments;
    return this.treeLen >= e && n.length && n[0].from == 0 && n[0].to >= e;
  }
  /**
  Get the context for the current parse, or `null` if no editor
  parse is in progress.
  */
  static get() {
    return Am;
  }
}
function lD(t, e, n) {
  return gl.applyChanges(t, [{ fromA: e, toA: n, fromB: e, toB: n }]);
}
class Ah {
  constructor(e) {
    this.context = e, this.tree = e.tree;
  }
  apply(e) {
    if (!e.docChanged && this.tree == this.context.tree)
      return this;
    let n = this.context.changes(e.changes, e.state), i = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), n.viewport.to);
    return n.work(20, i) || n.takeTree(), new Ah(n);
  }
  static init(e) {
    let n = Math.min(3e3, e.doc.length), i = $w.create(e.facet(Gu).parser, e, { from: 0, to: n });
    return i.work(20, n) || i.takeTree(), new Ah(i);
  }
}
Lo.state = /* @__PURE__ */ Ki.define({
  create: Ah.init,
  update(t, e) {
    for (let n of e.effects)
      if (n.is(Lo.setState))
        return n.value;
    return e.startState.facet(Gu) != e.state.facet(Gu) ? Ah.init(e.state) : t.apply(e);
  }
});
let _Q = (t) => {
  let e = setTimeout(
    () => t(),
    500
    /* Work.MaxPause */
  );
  return () => clearTimeout(e);
};
typeof requestIdleCallback < "u" && (_Q = (t) => {
  let e = -1, n = setTimeout(
    () => {
      e = requestIdleCallback(t, {
        timeout: 400
        /* Work.MinPause */
      });
    },
    100
    /* Work.MinPause */
  );
  return () => e < 0 ? clearTimeout(n) : cancelIdleCallback(e);
});
const oO = typeof navigator < "u" && (!((sO = navigator.scheduling) === null || sO === void 0) && sO.isInputPending) ? () => navigator.scheduling.isInputPending() : null, R3e = /* @__PURE__ */ gi.fromClass(class {
  constructor(e) {
    this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
  }
  update(e) {
    let n = this.view.state.field(Lo.state).context;
    (n.updateViewport(e.view.viewport) || this.view.viewport.to > n.treeLen) && this.scheduleWork(), (e.docChanged || e.selectionSet) && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(n);
  }
  scheduleWork() {
    if (this.working)
      return;
    let { state: e } = this.view, n = e.field(Lo.state);
    (n.tree != n.context.tree || !n.context.isDone(e.doc.length)) && (this.working = _Q(this.work));
  }
  work(e) {
    this.working = null;
    let n = Date.now();
    if (this.chunkEnd < n && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = n + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
      return;
    let { state: i, viewport: { to: r } } = this.view, s = i.field(Lo.state);
    if (s.tree == s.context.tree && s.context.isDone(
      r + 1e5
      /* Work.MaxParseAhead */
    ))
      return;
    let o = Date.now() + Math.min(this.chunkBudget, 100, e && !oO ? Math.max(25, e.timeRemaining() - 5) : 1e9), a = s.context.treeLen < r && i.doc.length > r + 1e3, l = s.context.work(() => oO && oO() || Date.now() > o, r + (a ? 0 : 1e5));
    this.chunkBudget -= Date.now() - n, (l || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: Lo.setState.of(new Ah(s.context)) })), this.chunkBudget > 0 && !(l && !a) && this.scheduleWork(), this.checkAsyncSchedule(s.context);
  }
  checkAsyncSchedule(e) {
    e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((n) => co(this.view.state, n)).then(() => this.workScheduled--), e.scheduleOn = null);
  }
  destroy() {
    this.working && this.working();
  }
  isWorking() {
    return !!(this.working || this.workScheduled > 0);
  }
}, {
  eventHandlers: { focus() {
    this.scheduleWork();
  } }
}), Gu = /* @__PURE__ */ Qe.define({
  combine(t) {
    return t.length ? t[0] : null;
  },
  enables: (t) => [
    Lo.state,
    R3e,
    Te.contentAttributes.compute([t], (e) => {
      let n = e.facet(t);
      return n && n.name ? { "data-language": n.name } : {};
    })
  ]
});
class $E {
  /**
  Create a language support object.
  */
  constructor(e, n = []) {
    this.language = e, this.support = n, this.extension = [e, n];
  }
}
const j3e = /* @__PURE__ */ Qe.define(), F1 = /* @__PURE__ */ Qe.define({
  combine: (t) => {
    if (!t.length)
      return "  ";
    let e = t[0];
    if (!e || /\S/.test(e) || Array.from(e).some((n) => n != e[0]))
      throw new Error("Invalid indent unit: " + JSON.stringify(t[0]));
    return e;
  }
});
function Mw(t) {
  let e = t.facet(F1);
  return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
}
function v0(t, e) {
  let n = "", i = t.tabSize, r = t.facet(F1)[0];
  if (r == "	") {
    for (; e >= i; )
      n += "	", e -= i;
    r = " ";
  }
  for (let s = 0; s < e; s++)
    n += r;
  return n;
}
function ME(t, e) {
  t instanceof zt && (t = new b2(t));
  for (let i of t.state.facet(j3e)) {
    let r = i(t, e);
    if (r !== void 0)
      return r;
  }
  let n = ri(t.state);
  return n.length >= e ? F3e(t, n, e) : null;
}
class b2 {
  /**
  Create an indent context.
  */
  constructor(e, n = {}) {
    this.state = e, this.options = n, this.unit = Mw(e);
  }
  /**
  Get a description of the line at the given position, taking
  [simulated line
  breaks](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  into account. If there is such a break at `pos`, the `bias`
  argument determines whether the part of the line line before or
  after the break is used.
  */
  lineAt(e, n = 1) {
    let i = this.state.doc.lineAt(e), { simulateBreak: r, simulateDoubleBreak: s } = this.options;
    return r != null && r >= i.from && r <= i.to ? s && r == e ? { text: "", from: e } : (n < 0 ? r < e : r <= e) ? { text: i.text.slice(r - i.from), from: r } : { text: i.text.slice(0, r - i.from), from: i.from } : i;
  }
  /**
  Get the text directly after `pos`, either the entire line
  or the next 100 characters, whichever is shorter.
  */
  textAfterPos(e, n = 1) {
    if (this.options.simulateDoubleBreak && e == this.options.simulateBreak)
      return "";
    let { text: i, from: r } = this.lineAt(e, n);
    return i.slice(e - r, Math.min(i.length, e + 100 - r));
  }
  /**
  Find the column for the given position.
  */
  column(e, n = 1) {
    let { text: i, from: r } = this.lineAt(e, n), s = this.countColumn(i, e - r), o = this.options.overrideIndentation ? this.options.overrideIndentation(r) : -1;
    return o > -1 && (s += o - this.countColumn(i, i.search(/\S|$/))), s;
  }
  /**
  Find the column position (taking tabs into account) of the given
  position in the given string.
  */
  countColumn(e, n = e.length) {
    return dp(e, this.state.tabSize, n);
  }
  /**
  Find the indentation column of the line at the given point.
  */
  lineIndent(e, n = 1) {
    let { text: i, from: r } = this.lineAt(e, n), s = this.options.overrideIndentation;
    if (s) {
      let o = s(r);
      if (o > -1)
        return o;
    }
    return this.countColumn(i, i.search(/\S|$/));
  }
  /**
  Returns the [simulated line
  break](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  for this context, if any.
  */
  get simulatedBreak() {
    return this.options.simulateBreak || null;
  }
}
const y2 = /* @__PURE__ */ new Mt();
function F3e(t, e, n) {
  let i = e.resolveStack(n), r = i.node.enterUnfinishedNodesBefore(n);
  if (r != i.node) {
    let s = [];
    for (let o = r; o != i.node; o = o.parent)
      s.push(o);
    for (let o = s.length - 1; o >= 0; o--)
      i = { node: s[o], next: i };
  }
  return OQ(i, t, n);
}
function OQ(t, e, n) {
  for (let i = t; i; i = i.next) {
    let r = z3e(i.node);
    if (r)
      return r(NE.create(e, n, i));
  }
  return 0;
}
function B3e(t) {
  return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak;
}
function z3e(t) {
  let e = t.type.prop(y2);
  if (e)
    return e;
  let n = t.firstChild, i;
  if (n && (i = n.type.prop(Mt.closedBy))) {
    let r = t.lastChild, s = r && i.indexOf(r.name) > -1;
    return (o) => SQ(o, !0, 1, void 0, s && !B3e(o) ? r.from : void 0);
  }
  return t.parent == null ? W3e : null;
}
function W3e() {
  return 0;
}
class NE extends b2 {
  constructor(e, n, i) {
    super(e.state, e.options), this.base = e, this.pos = n, this.context = i;
  }
  /**
  The syntax tree node to which the indentation strategy
  applies.
  */
  get node() {
    return this.context.node;
  }
  /**
  @internal
  */
  static create(e, n, i) {
    return new NE(e, n, i);
  }
  /**
  Get the text directly after `this.pos`, either the entire line
  or the next 100 characters, whichever is shorter.
  */
  get textAfter() {
    return this.textAfterPos(this.pos);
  }
  /**
  Get the indentation at the reference line for `this.node`, which
  is the line on which it starts, unless there is a node that is
  _not_ a parent of this node covering the start of that line. If
  so, the line at the start of that node is tried, again skipping
  on if it is covered by another such node.
  */
  get baseIndent() {
    return this.baseIndentFor(this.node);
  }
  /**
  Get the indentation for the reference line of the given node
  (see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
  */
  baseIndentFor(e) {
    let n = this.state.doc.lineAt(e.from);
    for (; ; ) {
      let i = e.resolve(n.from);
      for (; i.parent && i.parent.from == i.from; )
        i = i.parent;
      if (H3e(i, e))
        break;
      n = this.state.doc.lineAt(i.from);
    }
    return this.lineIndent(n.from);
  }
  /**
  Continue looking for indentations in the node's parent nodes,
  and return the result of that.
  */
  continue() {
    return OQ(this.context.next, this.base, this.pos);
  }
}
function H3e(t, e) {
  for (let n = e; n; n = n.parent)
    if (t == n)
      return !0;
  return !1;
}
function Q3e(t) {
  let e = t.node, n = e.childAfter(e.from), i = e.lastChild;
  if (!n)
    return null;
  let r = t.options.simulateBreak, s = t.state.doc.lineAt(n.from), o = r == null || r <= s.from ? s.to : Math.min(s.to, r);
  for (let a = n.to; ; ) {
    let l = e.childAfter(a);
    if (!l || l == i)
      return null;
    if (!l.type.isSkipped)
      return l.from < o ? n : null;
    a = l.to;
  }
}
function U3e({ closing: t, align: e = !0, units: n = 1 }) {
  return (i) => SQ(i, e, n, t);
}
function SQ(t, e, n, i, r) {
  let s = t.textAfter, o = s.match(/^\s*/)[0].length, a = i && s.slice(o, o + i.length) == i || r == t.pos + o, l = e ? Q3e(t) : null;
  return l ? a ? t.column(l.from) : t.column(l.to) : t.baseIndent + (a ? 0 : t.unit * n);
}
const Z3e = (t) => t.baseIndent;
function my({ except: t, units: e = 1 } = {}) {
  return (n) => {
    let i = t && t.test(n.textAfter);
    return n.baseIndent + (i ? 0 : e * n.unit);
  };
}
const q3e = 200;
function Y3e() {
  return zt.transactionFilter.of((t) => {
    if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete"))
      return t;
    let e = t.startState.languageDataAt("indentOnInput", t.startState.selection.main.head);
    if (!e.length)
      return t;
    let n = t.newDoc, { head: i } = t.newSelection.main, r = n.lineAt(i);
    if (i > r.from + q3e)
      return t;
    let s = n.sliceString(r.from, i);
    if (!e.some((u) => u.test(s)))
      return t;
    let { state: o } = t, a = -1, l = [];
    for (let { head: u } of o.selection.ranges) {
      let f = o.doc.lineAt(u);
      if (f.from == a)
        continue;
      a = f.from;
      let d = ME(o, f.from);
      if (d == null)
        continue;
      let h = /^\s*/.exec(f.text)[0], m = v0(o, d);
      h != m && l.push({ from: f.from, to: f.from + h.length, insert: m });
    }
    return l.length ? [t, { changes: l, sequential: !0 }] : t;
  });
}
const V3e = /* @__PURE__ */ Qe.define(), w2 = /* @__PURE__ */ new Mt();
function CQ(t) {
  let e = t.firstChild, n = t.lastChild;
  return e && e.to < n.from ? { from: e.to, to: n.type.isError ? t.to : n.from } : null;
}
function X3e(t, e, n) {
  let i = ri(t);
  if (i.length < n)
    return null;
  let r = i.resolveStack(n, 1), s = null;
  for (let o = r; o; o = o.next) {
    let a = o.node;
    if (a.to <= n || a.from > n)
      continue;
    if (s && a.from < e)
      break;
    let l = a.type.prop(w2);
    if (l && (a.to < i.length - 50 || i.length == t.doc.length || !G3e(a))) {
      let u = l(a, t);
      u && u.from <= n && u.from >= e && u.to > n && (s = u);
    }
  }
  return s;
}
function G3e(t) {
  let e = t.lastChild;
  return e && e.to == t.to && e.type.isError;
}
function Nw(t, e, n) {
  for (let i of t.facet(V3e)) {
    let r = i(t, e, n);
    if (r)
      return r;
  }
  return X3e(t, e, n);
}
function EQ(t, e) {
  let n = e.mapPos(t.from, 1), i = e.mapPos(t.to, -1);
  return n >= i ? void 0 : { from: n, to: i };
}
const k2 = /* @__PURE__ */ Ot.define({ map: EQ }), B1 = /* @__PURE__ */ Ot.define({ map: EQ });
function TQ(t) {
  let e = [];
  for (let { head: n } of t.state.selection.ranges)
    e.some((i) => i.from <= n && i.to >= n) || e.push(t.lineBlockAt(n));
  return e;
}
const wf = /* @__PURE__ */ Ki.define({
  create() {
    return it.none;
  },
  update(t, e) {
    t = t.map(e.changes);
    for (let n of e.effects)
      if (n.is(k2) && !K3e(t, n.value.from, n.value.to)) {
        let { preparePlaceholder: i } = e.state.facet(NQ), r = i ? it.replace({ widget: new sOe(i(e.state, n.value)) }) : uD;
        t = t.update({ add: [r.range(n.value.from, n.value.to)] });
      } else n.is(B1) && (t = t.update({
        filter: (i, r) => n.value.from != i || n.value.to != r,
        filterFrom: n.value.from,
        filterTo: n.value.to
      }));
    if (e.selection) {
      let n = !1, { head: i } = e.selection.main;
      t.between(i, i, (r, s) => {
        r < i && s > i && (n = !0);
      }), n && (t = t.update({
        filterFrom: i,
        filterTo: i,
        filter: (r, s) => s <= i || r >= i
      }));
    }
    return t;
  },
  provide: (t) => Te.decorations.from(t),
  toJSON(t, e) {
    let n = [];
    return t.between(0, e.doc.length, (i, r) => {
      n.push(i, r);
    }), n;
  },
  fromJSON(t) {
    if (!Array.isArray(t) || t.length % 2)
      throw new RangeError("Invalid JSON for fold state");
    let e = [];
    for (let n = 0; n < t.length; ) {
      let i = t[n++], r = t[n++];
      if (typeof i != "number" || typeof r != "number")
        throw new RangeError("Invalid JSON for fold state");
      e.push(uD.range(i, r));
    }
    return it.set(e, !0);
  }
});
function Aw(t, e, n) {
  var i;
  let r = null;
  return (i = t.field(wf, !1)) === null || i === void 0 || i.between(e, n, (s, o) => {
    (!r || r.from > s) && (r = { from: s, to: o });
  }), r;
}
function K3e(t, e, n) {
  let i = !1;
  return t.between(e, e, (r, s) => {
    r == e && s == n && (i = !0);
  }), i;
}
function $Q(t, e) {
  return t.field(wf, !1) ? e : e.concat(Ot.appendConfig.of(AQ()));
}
const J3e = (t) => {
  for (let e of TQ(t)) {
    let n = Nw(t.state, e.from, e.to);
    if (n)
      return t.dispatch({ effects: $Q(t.state, [k2.of(n), MQ(t, n)]) }), !0;
  }
  return !1;
}, eOe = (t) => {
  if (!t.state.field(wf, !1))
    return !1;
  let e = [];
  for (let n of TQ(t)) {
    let i = Aw(t.state, n.from, n.to);
    i && e.push(B1.of(i), MQ(t, i, !1));
  }
  return e.length && t.dispatch({ effects: e }), e.length > 0;
};
function MQ(t, e, n = !0) {
  let i = t.state.doc.lineAt(e.from).number, r = t.state.doc.lineAt(e.to).number;
  return Te.announce.of(`${t.state.phrase(n ? "Folded lines" : "Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`);
}
const tOe = (t) => {
  let { state: e } = t, n = [];
  for (let i = 0; i < e.doc.length; ) {
    let r = t.lineBlockAt(i), s = Nw(e, r.from, r.to);
    s && n.push(k2.of(s)), i = (s ? t.lineBlockAt(s.to) : r).to + 1;
  }
  return n.length && t.dispatch({ effects: $Q(t.state, n) }), !!n.length;
}, nOe = (t) => {
  let e = t.state.field(wf, !1);
  if (!e || !e.size)
    return !1;
  let n = [];
  return e.between(0, t.state.doc.length, (i, r) => {
    n.push(B1.of({ from: i, to: r }));
  }), t.dispatch({ effects: n }), !0;
}, iOe = [
  { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: J3e },
  { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: eOe },
  { key: "Ctrl-Alt-[", run: tOe },
  { key: "Ctrl-Alt-]", run: nOe }
], rOe = {
  placeholderDOM: null,
  preparePlaceholder: null,
  placeholderText: "…"
}, NQ = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, rOe);
  }
});
function AQ(t) {
  return [wf, lOe];
}
function DQ(t, e) {
  let { state: n } = t, i = n.facet(NQ), r = (o) => {
    let a = t.lineBlockAt(t.posAtDOM(o.target)), l = Aw(t.state, a.from, a.to);
    l && t.dispatch({ effects: B1.of(l) }), o.preventDefault();
  };
  if (i.placeholderDOM)
    return i.placeholderDOM(t, r, e);
  let s = document.createElement("span");
  return s.textContent = i.placeholderText, s.setAttribute("aria-label", n.phrase("folded code")), s.title = n.phrase("unfold"), s.className = "cm-foldPlaceholder", s.onclick = r, s;
}
const uD = /* @__PURE__ */ it.replace({ widget: /* @__PURE__ */ new class extends Ha {
  toDOM(t) {
    return DQ(t, null);
  }
}() });
class sOe extends Ha {
  constructor(e) {
    super(), this.value = e;
  }
  eq(e) {
    return this.value == e.value;
  }
  toDOM(e) {
    return DQ(e, this.value);
  }
}
const oOe = {
  openText: "⌄",
  closedText: "›",
  markerDOM: null,
  domEventHandlers: {},
  foldingChanged: () => !1
};
class aO extends El {
  constructor(e, n) {
    super(), this.config = e, this.open = n;
  }
  eq(e) {
    return this.config == e.config && this.open == e.open;
  }
  toDOM(e) {
    if (this.config.markerDOM)
      return this.config.markerDOM(this.open);
    let n = document.createElement("span");
    return n.textContent = this.open ? this.config.openText : this.config.closedText, n.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), n;
  }
}
function aOe(t = {}) {
  let e = Object.assign(Object.assign({}, oOe), t), n = new aO(e, !0), i = new aO(e, !1), r = gi.fromClass(class {
    constructor(o) {
      this.from = o.viewport.from, this.markers = this.buildMarkers(o);
    }
    update(o) {
      (o.docChanged || o.viewportChanged || o.startState.facet(Gu) != o.state.facet(Gu) || o.startState.field(wf, !1) != o.state.field(wf, !1) || ri(o.startState) != ri(o.state) || e.foldingChanged(o)) && (this.markers = this.buildMarkers(o.view));
    }
    buildMarkers(o) {
      let a = new Zu();
      for (let l of o.viewportLineBlocks) {
        let u = Aw(o.state, l.from, l.to) ? i : Nw(o.state, l.from, l.to) ? n : null;
        u && a.add(l.from, l.from, u);
      }
      return a.finish();
    }
  }), { domEventHandlers: s } = e;
  return [
    r,
    s3e({
      class: "cm-foldGutter",
      markers(o) {
        var a;
        return ((a = o.plugin(r)) === null || a === void 0 ? void 0 : a.markers) || Qt.empty;
      },
      initialSpacer() {
        return new aO(e, !1);
      },
      domEventHandlers: Object.assign(Object.assign({}, s), { click: (o, a, l) => {
        if (s.click && s.click(o, a, l))
          return !0;
        let u = Aw(o.state, a.from, a.to);
        if (u)
          return o.dispatch({ effects: B1.of(u) }), !0;
        let f = Nw(o.state, a.from, a.to);
        return f ? (o.dispatch({ effects: k2.of(f) }), !0) : !1;
      } })
    }),
    AQ()
  ];
}
const lOe = /* @__PURE__ */ Te.baseTheme({
  ".cm-foldPlaceholder": {
    backgroundColor: "#eee",
    border: "1px solid #ddd",
    color: "#888",
    borderRadius: ".2em",
    margin: "0 1px",
    padding: "0 1px",
    cursor: "pointer"
  },
  ".cm-foldGutter span": {
    padding: "0 1px",
    cursor: "pointer"
  }
});
class Tl {
  constructor(e, n) {
    this.specs = e;
    let i;
    function r(a) {
      let l = qu.newName();
      return (i || (i = /* @__PURE__ */ Object.create(null)))["." + l] = a, l;
    }
    const s = typeof n.all == "string" ? n.all : n.all ? r(n.all) : void 0, o = n.scope;
    this.scope = o instanceof Lo ? (a) => a.prop(nh) == o.data : o ? (a) => a == o : void 0, this.style = kQ(e.map((a) => ({
      tag: a.tag,
      class: a.class || r(Object.assign({}, a, { tag: null }))
    })), {
      all: s
    }).style, this.module = i ? new qu(i) : null, this.themeType = n.themeType;
  }
  /**
  Create a highlighter style that associates the given styles to
  the given tags. The specs must be objects that hold a style tag
  or array of tags in their `tag` property, and either a single
  `class` property providing a static CSS class (for highlighter
  that rely on external styling), or a
  [`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
  set of CSS properties (which define the styling for those tags).
  
  The CSS rules created for a highlighter will be emitted in the
  order of the spec's properties. That means that for elements that
  have multiple tags associated with them, styles defined further
  down in the list will have a higher CSS precedence than styles
  defined earlier.
  */
  static define(e, n) {
    return new Tl(e, n || {});
  }
}
const bC = /* @__PURE__ */ Qe.define(), PQ = /* @__PURE__ */ Qe.define({
  combine(t) {
    return t.length ? [t[0]] : null;
  }
});
function lO(t) {
  let e = t.facet(bC);
  return e.length ? e : t.facet(PQ);
}
function z1(t, e) {
  let n = [cOe], i;
  return t instanceof Tl && (t.module && n.push(Te.styleModule.of(t.module)), i = t.themeType), e != null && e.fallback ? n.push(PQ.of(t)) : i ? n.push(bC.computeN([Te.darkTheme], (r) => r.facet(Te.darkTheme) == (i == "dark") ? [t] : [])) : n.push(bC.of(t)), n;
}
class uOe {
  constructor(e) {
    this.markCache = /* @__PURE__ */ Object.create(null), this.tree = ri(e.state), this.decorations = this.buildDeco(e, lO(e.state));
  }
  update(e) {
    let n = ri(e.state), i = lO(e.state), r = i != lO(e.startState);
    n.length < e.view.viewport.to && !r && n.type == this.tree.type ? this.decorations = this.decorations.map(e.changes) : (n != this.tree || e.viewportChanged || r) && (this.tree = n, this.decorations = this.buildDeco(e.view, i));
  }
  buildDeco(e, n) {
    if (!n || !this.tree.length)
      return it.none;
    let i = new Zu();
    for (let { from: r, to: s } of e.visibleRanges)
      D3e(this.tree, n, (o, a, l) => {
        i.add(o, a, this.markCache[l] || (this.markCache[l] = it.mark({ class: l })));
      }, r, s);
    return i.finish();
  }
}
const cOe = /* @__PURE__ */ jf.high(/* @__PURE__ */ gi.fromClass(uOe, {
  decorations: (t) => t.decorations
})), IQ = /* @__PURE__ */ Tl.define([
  {
    tag: X.meta,
    color: "#404740"
  },
  {
    tag: X.link,
    textDecoration: "underline"
  },
  {
    tag: X.heading,
    textDecoration: "underline",
    fontWeight: "bold"
  },
  {
    tag: X.emphasis,
    fontStyle: "italic"
  },
  {
    tag: X.strong,
    fontWeight: "bold"
  },
  {
    tag: X.strikethrough,
    textDecoration: "line-through"
  },
  {
    tag: X.keyword,
    color: "#708"
  },
  {
    tag: [X.atom, X.bool, X.url, X.contentSeparator, X.labelName],
    color: "#219"
  },
  {
    tag: [X.literal, X.inserted],
    color: "#164"
  },
  {
    tag: [X.string, X.deleted],
    color: "#a11"
  },
  {
    tag: [X.regexp, X.escape, /* @__PURE__ */ X.special(X.string)],
    color: "#e40"
  },
  {
    tag: /* @__PURE__ */ X.definition(X.variableName),
    color: "#00f"
  },
  {
    tag: /* @__PURE__ */ X.local(X.variableName),
    color: "#30a"
  },
  {
    tag: [X.typeName, X.namespace],
    color: "#085"
  },
  {
    tag: X.className,
    color: "#167"
  },
  {
    tag: [/* @__PURE__ */ X.special(X.variableName), X.macroName],
    color: "#256"
  },
  {
    tag: /* @__PURE__ */ X.definition(X.propertyName),
    color: "#00c"
  },
  {
    tag: X.comment,
    color: "#940"
  },
  {
    tag: X.invalid,
    color: "#f00"
  }
]), fOe = /* @__PURE__ */ Te.baseTheme({
  "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
  "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
}), LQ = 1e4, RQ = "()[]{}", jQ = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, {
      afterCursor: !0,
      brackets: RQ,
      maxScanDistance: LQ,
      renderMatch: pOe
    });
  }
}), dOe = /* @__PURE__ */ it.mark({ class: "cm-matchingBracket" }), hOe = /* @__PURE__ */ it.mark({ class: "cm-nonmatchingBracket" });
function pOe(t) {
  let e = [], n = t.matched ? dOe : hOe;
  return e.push(n.range(t.start.from, t.start.to)), t.end && e.push(n.range(t.end.from, t.end.to)), e;
}
const mOe = /* @__PURE__ */ Ki.define({
  create() {
    return it.none;
  },
  update(t, e) {
    if (!e.docChanged && !e.selection)
      return t;
    let n = [], i = e.state.facet(jQ);
    for (let r of e.state.selection.ranges) {
      if (!r.empty)
        continue;
      let s = xa(e.state, r.head, -1, i) || r.head > 0 && xa(e.state, r.head - 1, 1, i) || i.afterCursor && (xa(e.state, r.head, 1, i) || r.head < e.state.doc.length && xa(e.state, r.head + 1, -1, i));
      s && (n = n.concat(i.renderMatch(s, e.state)));
    }
    return it.set(n, !0);
  },
  provide: (t) => Te.decorations.from(t)
}), gOe = [
  mOe,
  fOe
];
function vOe(t = {}) {
  return [jQ.of(t), gOe];
}
const FQ = /* @__PURE__ */ new Mt();
function yC(t, e, n) {
  let i = t.prop(e < 0 ? Mt.openedBy : Mt.closedBy);
  if (i)
    return i;
  if (t.name.length == 1) {
    let r = n.indexOf(t.name);
    if (r > -1 && r % 2 == (e < 0 ? 1 : 0))
      return [n[r + e]];
  }
  return null;
}
function wC(t) {
  let e = t.type.prop(FQ);
  return e ? e(t.node) : t;
}
function xa(t, e, n, i = {}) {
  let r = i.maxScanDistance || LQ, s = i.brackets || RQ, o = ri(t), a = o.resolveInner(e, n);
  for (let l = a; l; l = l.parent) {
    let u = yC(l.type, n, s);
    if (u && l.from < l.to) {
      let f = wC(l);
      if (f && (n > 0 ? e >= f.from && e < f.to : e > f.from && e <= f.to))
        return bOe(t, e, n, l, f, u, s);
    }
  }
  return yOe(t, e, n, o, a.type, r, s);
}
function bOe(t, e, n, i, r, s, o) {
  let a = i.parent, l = { from: r.from, to: r.to }, u = 0, f = a == null ? void 0 : a.cursor();
  if (f && (n < 0 ? f.childBefore(i.from) : f.childAfter(i.to)))
    do
      if (n < 0 ? f.to <= i.from : f.from >= i.to) {
        if (u == 0 && s.indexOf(f.type.name) > -1 && f.from < f.to) {
          let d = wC(f);
          return { start: l, end: d ? { from: d.from, to: d.to } : void 0, matched: !0 };
        } else if (yC(f.type, n, o))
          u++;
        else if (yC(f.type, -n, o)) {
          if (u == 0) {
            let d = wC(f);
            return {
              start: l,
              end: d && d.from < d.to ? { from: d.from, to: d.to } : void 0,
              matched: !1
            };
          }
          u--;
        }
      }
    while (n < 0 ? f.prevSibling() : f.nextSibling());
  return { start: l, matched: !1 };
}
function yOe(t, e, n, i, r, s, o) {
  let a = n < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = o.indexOf(a);
  if (l < 0 || l % 2 == 0 != n > 0)
    return null;
  let u = { from: n < 0 ? e - 1 : e, to: n > 0 ? e + 1 : e }, f = t.doc.iterRange(e, n > 0 ? t.doc.length : 0), d = 0;
  for (let h = 0; !f.next().done && h <= s; ) {
    let m = f.value;
    n < 0 && (h += m.length);
    let g = e + h * n;
    for (let w = n > 0 ? 0 : m.length - 1, x = n > 0 ? m.length : -1; w != x; w += n) {
      let _ = o.indexOf(m[w]);
      if (!(_ < 0 || i.resolveInner(g + w, 1).type != r))
        if (_ % 2 == 0 == n > 0)
          d++;
        else {
          if (d == 1)
            return { start: u, end: { from: g + w, to: g + w + 1 }, matched: _ >> 1 == l >> 1 };
          d--;
        }
    }
    n > 0 && (h += m.length);
  }
  return f.done ? { start: u, matched: !1 } : null;
}
const wOe = /* @__PURE__ */ Object.create(null), cD = [ns.none], fD = [], dD = /* @__PURE__ */ Object.create(null), kOe = /* @__PURE__ */ Object.create(null);
for (let [t, e] of [
  ["variable", "variableName"],
  ["variable-2", "variableName.special"],
  ["string-2", "string.special"],
  ["def", "variableName.definition"],
  ["tag", "tagName"],
  ["attribute", "attributeName"],
  ["type", "typeName"],
  ["builtin", "variableName.standard"],
  ["qualifier", "modifier"],
  ["error", "invalid"],
  ["header", "heading"],
  ["property", "propertyName"]
])
  kOe[t] = /* @__PURE__ */ xOe(wOe, e);
function uO(t, e) {
  fD.indexOf(t) > -1 || (fD.push(t), console.warn(e));
}
function xOe(t, e) {
  let n = [];
  for (let a of e.split(" ")) {
    let l = [];
    for (let u of a.split(".")) {
      let f = t[u] || X[u];
      f ? typeof f == "function" ? l.length ? l = l.map(f) : uO(u, `Modifier ${u} used at start of tag`) : l.length ? uO(u, `Tag ${u} used as modifier`) : l = Array.isArray(f) ? f : [f] : uO(u, `Unknown highlighting tag ${u}`);
    }
    for (let u of l)
      n.push(u);
  }
  if (!n.length)
    return 0;
  let i = e.replace(/ /g, "_"), r = i + " " + n.map((a) => a.id), s = dD[r];
  if (s)
    return s.id;
  let o = dD[r] = ns.define({
    id: cD.length,
    name: i,
    props: [v2({ [i]: n })]
  });
  return cD.push(o), o.id;
}
Tn.RTL, Tn.LTR;
const _Oe = (t) => {
  let { state: e } = t, n = e.doc.lineAt(e.selection.main.from), i = DE(t.state, n.from);
  return i.line ? OOe(t) : i.block ? COe(t) : !1;
};
function AE(t, e) {
  return ({ state: n, dispatch: i }) => {
    if (n.readOnly)
      return !1;
    let r = t(e, n);
    return r ? (i(n.update(r)), !0) : !1;
  };
}
const OOe = /* @__PURE__ */ AE(
  $Oe,
  0
  /* CommentOption.Toggle */
), SOe = /* @__PURE__ */ AE(
  BQ,
  0
  /* CommentOption.Toggle */
), COe = /* @__PURE__ */ AE(
  (t, e) => BQ(t, e, TOe(e)),
  0
  /* CommentOption.Toggle */
);
function DE(t, e) {
  let n = t.languageDataAt("commentTokens", e);
  return n.length ? n[0] : {};
}
const Dm = 50;
function EOe(t, { open: e, close: n }, i, r) {
  let s = t.sliceDoc(i - Dm, i), o = t.sliceDoc(r, r + Dm), a = /\s*$/.exec(s)[0].length, l = /^\s*/.exec(o)[0].length, u = s.length - a;
  if (s.slice(u - e.length, u) == e && o.slice(l, l + n.length) == n)
    return {
      open: { pos: i - a, margin: a && 1 },
      close: { pos: r + l, margin: l && 1 }
    };
  let f, d;
  r - i <= 2 * Dm ? f = d = t.sliceDoc(i, r) : (f = t.sliceDoc(i, i + Dm), d = t.sliceDoc(r - Dm, r));
  let h = /^\s*/.exec(f)[0].length, m = /\s*$/.exec(d)[0].length, g = d.length - m - n.length;
  return f.slice(h, h + e.length) == e && d.slice(g, g + n.length) == n ? {
    open: {
      pos: i + h + e.length,
      margin: /\s/.test(f.charAt(h + e.length)) ? 1 : 0
    },
    close: {
      pos: r - m - n.length,
      margin: /\s/.test(d.charAt(g - 1)) ? 1 : 0
    }
  } : null;
}
function TOe(t) {
  let e = [];
  for (let n of t.selection.ranges) {
    let i = t.doc.lineAt(n.from), r = n.to <= i.to ? i : t.doc.lineAt(n.to), s = e.length - 1;
    s >= 0 && e[s].to > i.from ? e[s].to = r.to : e.push({ from: i.from + /^\s*/.exec(i.text)[0].length, to: r.to });
  }
  return e;
}
function BQ(t, e, n = e.selection.ranges) {
  let i = n.map((s) => DE(e, s.from).block);
  if (!i.every((s) => s))
    return null;
  let r = n.map((s, o) => EOe(e, i[o], s.from, s.to));
  if (t != 2 && !r.every((s) => s))
    return { changes: e.changes(n.map((s, o) => r[o] ? [] : [{ from: s.from, insert: i[o].open + " " }, { from: s.to, insert: " " + i[o].close }])) };
  if (t != 1 && r.some((s) => s)) {
    let s = [];
    for (let o = 0, a; o < r.length; o++)
      if (a = r[o]) {
        let l = i[o], { open: u, close: f } = a;
        s.push({ from: u.pos - l.open.length, to: u.pos + u.margin }, { from: f.pos - f.margin, to: f.pos + l.close.length });
      }
    return { changes: s };
  }
  return null;
}
function $Oe(t, e, n = e.selection.ranges) {
  let i = [], r = -1;
  for (let { from: s, to: o } of n) {
    let a = i.length, l = 1e9, u = DE(e, s).line;
    if (u) {
      for (let f = s; f <= o; ) {
        let d = e.doc.lineAt(f);
        if (d.from > r && (s == o || o > d.from)) {
          r = d.from;
          let h = /^\s*/.exec(d.text)[0].length, m = h == d.length, g = d.text.slice(h, h + u.length) == u ? h : -1;
          h < d.text.length && h < l && (l = h), i.push({ line: d, comment: g, token: u, indent: h, empty: m, single: !1 });
        }
        f = d.to + 1;
      }
      if (l < 1e9)
        for (let f = a; f < i.length; f++)
          i[f].indent < i[f].line.text.length && (i[f].indent = l);
      i.length == a + 1 && (i[a].single = !0);
    }
  }
  if (t != 2 && i.some((s) => s.comment < 0 && (!s.empty || s.single))) {
    let s = [];
    for (let { line: a, token: l, indent: u, empty: f, single: d } of i)
      (d || !f) && s.push({ from: a.from + u, insert: l + " " });
    let o = e.changes(s);
    return { changes: o, selection: e.selection.map(o, 1) };
  } else if (t != 1 && i.some((s) => s.comment >= 0)) {
    let s = [];
    for (let { line: o, comment: a, token: l } of i)
      if (a >= 0) {
        let u = o.from + a, f = u + l.length;
        o.text[f - o.from] == " " && f++, s.push({ from: u, to: f });
      }
    return { changes: s };
  }
  return null;
}
const kC = /* @__PURE__ */ za.define(), MOe = /* @__PURE__ */ za.define(), NOe = /* @__PURE__ */ Qe.define(), zQ = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, {
      minDepth: 100,
      newGroupDelay: 500,
      joinToEvent: (e, n) => n
    }, {
      minDepth: Math.max,
      newGroupDelay: Math.min,
      joinToEvent: (e, n) => (i, r) => e(i, r) || n(i, r)
    });
  }
}), WQ = /* @__PURE__ */ Ki.define({
  create() {
    return _a.empty;
  },
  update(t, e) {
    let n = e.state.facet(zQ), i = e.annotation(kC);
    if (i) {
      let l = ys.fromTransaction(e, i.selection), u = i.side, f = u == 0 ? t.undone : t.done;
      return l ? f = Dw(f, f.length, n.minDepth, l) : f = UQ(f, e.startState.selection), new _a(u == 0 ? i.rest : f, u == 0 ? f : i.rest);
    }
    let r = e.annotation(MOe);
    if ((r == "full" || r == "before") && (t = t.isolate()), e.annotation(Jr.addToHistory) === !1)
      return e.changes.empty ? t : t.addMapping(e.changes.desc);
    let s = ys.fromTransaction(e), o = e.annotation(Jr.time), a = e.annotation(Jr.userEvent);
    return s ? t = t.addChanges(s, o, a, n, e) : e.selection && (t = t.addSelection(e.startState.selection, o, a, n.newGroupDelay)), (r == "full" || r == "after") && (t = t.isolate()), t;
  },
  toJSON(t) {
    return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
  },
  fromJSON(t) {
    return new _a(t.done.map(ys.fromJSON), t.undone.map(ys.fromJSON));
  }
});
function x2(t = {}) {
  return [
    WQ,
    zQ.of(t),
    Te.domEventHandlers({
      beforeinput(e, n) {
        let i = e.inputType == "historyUndo" ? HQ : e.inputType == "historyRedo" ? xC : null;
        return i ? (e.preventDefault(), i(n)) : !1;
      }
    })
  ];
}
function _2(t, e) {
  return function({ state: n, dispatch: i }) {
    if (!e && n.readOnly)
      return !1;
    let r = n.field(WQ, !1);
    if (!r)
      return !1;
    let s = r.pop(t, n, e);
    return s ? (i(s), !0) : !1;
  };
}
const HQ = /* @__PURE__ */ _2(0, !1), xC = /* @__PURE__ */ _2(1, !1), AOe = /* @__PURE__ */ _2(0, !0), DOe = /* @__PURE__ */ _2(1, !0);
class ys {
  constructor(e, n, i, r, s) {
    this.changes = e, this.effects = n, this.mapped = i, this.startSelection = r, this.selectionsAfter = s;
  }
  setSelAfter(e) {
    return new ys(this.changes, this.effects, this.mapped, this.startSelection, e);
  }
  toJSON() {
    var e, n, i;
    return {
      changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
      mapped: (n = this.mapped) === null || n === void 0 ? void 0 : n.toJSON(),
      startSelection: (i = this.startSelection) === null || i === void 0 ? void 0 : i.toJSON(),
      selectionsAfter: this.selectionsAfter.map((r) => r.toJSON())
    };
  }
  static fromJSON(e) {
    return new ys(e.changes && Ii.fromJSON(e.changes), [], e.mapped && Sa.fromJSON(e.mapped), e.startSelection && he.fromJSON(e.startSelection), e.selectionsAfter.map(he.fromJSON));
  }
  // This does not check `addToHistory` and such, it assumes the
  // transaction needs to be converted to an item. Returns null when
  // there are no changes or effects in the transaction.
  static fromTransaction(e, n) {
    let i = ao;
    for (let r of e.startState.facet(NOe)) {
      let s = r(e);
      s.length && (i = i.concat(s));
    }
    return !i.length && e.changes.empty ? null : new ys(e.changes.invert(e.startState.doc), i, void 0, n || e.startState.selection, ao);
  }
  static selection(e) {
    return new ys(void 0, ao, void 0, void 0, e);
  }
}
function Dw(t, e, n, i) {
  let r = e + 1 > n + 20 ? e - n - 1 : 0, s = t.slice(r, e);
  return s.push(i), s;
}
function POe(t, e) {
  let n = [], i = !1;
  return t.iterChangedRanges((r, s) => n.push(r, s)), e.iterChangedRanges((r, s, o, a) => {
    for (let l = 0; l < n.length; ) {
      let u = n[l++], f = n[l++];
      a >= u && o <= f && (i = !0);
    }
  }), i;
}
function IOe(t, e) {
  return t.ranges.length == e.ranges.length && t.ranges.filter((n, i) => n.empty != e.ranges[i].empty).length === 0;
}
function QQ(t, e) {
  return t.length ? e.length ? t.concat(e) : t : e;
}
const ao = [], LOe = 200;
function UQ(t, e) {
  if (t.length) {
    let n = t[t.length - 1], i = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - LOe));
    return i.length && i[i.length - 1].eq(e) ? t : (i.push(e), Dw(t, t.length - 1, 1e9, n.setSelAfter(i)));
  } else
    return [ys.selection([e])];
}
function ROe(t) {
  let e = t[t.length - 1], n = t.slice();
  return n[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), n;
}
function cO(t, e) {
  if (!t.length)
    return t;
  let n = t.length, i = ao;
  for (; n; ) {
    let r = jOe(t[n - 1], e, i);
    if (r.changes && !r.changes.empty || r.effects.length) {
      let s = t.slice(0, n);
      return s[n - 1] = r, s;
    } else
      e = r.mapped, n--, i = r.selectionsAfter;
  }
  return i.length ? [ys.selection(i)] : ao;
}
function jOe(t, e, n) {
  let i = QQ(t.selectionsAfter.length ? t.selectionsAfter.map((a) => a.map(e)) : ao, n);
  if (!t.changes)
    return ys.selection(i);
  let r = t.changes.map(e), s = e.mapDesc(t.changes, !0), o = t.mapped ? t.mapped.composeDesc(s) : s;
  return new ys(r, Ot.mapEffects(t.effects, e), o, t.startSelection.map(s), i);
}
const FOe = /^(input\.type|delete)($|\.)/;
class _a {
  constructor(e, n, i = 0, r = void 0) {
    this.done = e, this.undone = n, this.prevTime = i, this.prevUserEvent = r;
  }
  isolate() {
    return this.prevTime ? new _a(this.done, this.undone) : this;
  }
  addChanges(e, n, i, r, s) {
    let o = this.done, a = o[o.length - 1];
    return a && a.changes && !a.changes.empty && e.changes && (!i || FOe.test(i)) && (!a.selectionsAfter.length && n - this.prevTime < r.newGroupDelay && r.joinToEvent(s, POe(a.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
    i == "input.type.compose") ? o = Dw(o, o.length - 1, r.minDepth, new ys(e.changes.compose(a.changes), QQ(e.effects, a.effects), a.mapped, a.startSelection, ao)) : o = Dw(o, o.length, r.minDepth, e), new _a(o, ao, n, i);
  }
  addSelection(e, n, i, r) {
    let s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : ao;
    return s.length > 0 && n - this.prevTime < r && i == this.prevUserEvent && i && /^select($|\.)/.test(i) && IOe(s[s.length - 1], e) ? this : new _a(UQ(this.done, e), this.undone, n, i);
  }
  addMapping(e) {
    return new _a(cO(this.done, e), cO(this.undone, e), this.prevTime, this.prevUserEvent);
  }
  pop(e, n, i) {
    let r = e == 0 ? this.done : this.undone;
    if (r.length == 0)
      return null;
    let s = r[r.length - 1], o = s.selectionsAfter[0] || n.selection;
    if (i && s.selectionsAfter.length)
      return n.update({
        selection: s.selectionsAfter[s.selectionsAfter.length - 1],
        annotations: kC.of({ side: e, rest: ROe(r), selection: o }),
        userEvent: e == 0 ? "select.undo" : "select.redo",
        scrollIntoView: !0
      });
    if (s.changes) {
      let a = r.length == 1 ? ao : r.slice(0, r.length - 1);
      return s.mapped && (a = cO(a, s.mapped)), n.update({
        changes: s.changes,
        selection: s.startSelection,
        effects: s.effects,
        annotations: kC.of({ side: e, rest: a, selection: o }),
        filter: !1,
        userEvent: e == 0 ? "undo" : "redo",
        scrollIntoView: !0
      });
    } else
      return null;
  }
}
_a.empty = /* @__PURE__ */ new _a(ao, ao);
const ZQ = [
  { key: "Mod-z", run: HQ, preventDefault: !0 },
  { key: "Mod-y", mac: "Mod-Shift-z", run: xC, preventDefault: !0 },
  { linux: "Ctrl-Shift-z", run: xC, preventDefault: !0 },
  { key: "Mod-u", run: AOe, preventDefault: !0 },
  { key: "Alt-u", mac: "Mod-Shift-u", run: DOe, preventDefault: !0 }
];
function hp(t, e) {
  return he.create(t.ranges.map(e), t.mainIndex);
}
function Qa(t, e) {
  return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
}
function Yo({ state: t, dispatch: e }, n) {
  let i = hp(t.selection, n);
  return i.eq(t.selection, !0) ? !1 : (e(Qa(t, i)), !0);
}
function O2(t, e) {
  return he.cursor(e ? t.to : t.from);
}
function qQ(t, e) {
  return Yo(t, (n) => n.empty ? t.moveByChar(n, e) : O2(n, e));
}
function Lr(t) {
  return t.textDirectionAt(t.state.selection.main.head) == Tn.LTR;
}
const YQ = (t) => qQ(t, !Lr(t)), VQ = (t) => qQ(t, Lr(t));
function XQ(t, e) {
  return Yo(t, (n) => n.empty ? t.moveByGroup(n, e) : O2(n, e));
}
const BOe = (t) => XQ(t, !Lr(t)), zOe = (t) => XQ(t, Lr(t));
function WOe(t, e, n) {
  if (e.type.prop(n))
    return !0;
  let i = e.to - e.from;
  return i && (i > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
}
function S2(t, e, n) {
  let i = ri(t).resolveInner(e.head), r = n ? Mt.closedBy : Mt.openedBy;
  for (let l = e.head; ; ) {
    let u = n ? i.childAfter(l) : i.childBefore(l);
    if (!u)
      break;
    WOe(t, u, r) ? i = u : l = n ? u.to : u.from;
  }
  let s = i.type.prop(r), o, a;
  return s && (o = n ? xa(t, i.from, 1) : xa(t, i.to, -1)) && o.matched ? a = n ? o.end.to : o.end.from : a = n ? i.to : i.from, he.cursor(a, n ? -1 : 1);
}
const HOe = (t) => Yo(t, (e) => S2(t.state, e, !Lr(t))), QOe = (t) => Yo(t, (e) => S2(t.state, e, Lr(t)));
function GQ(t, e) {
  return Yo(t, (n) => {
    if (!n.empty)
      return O2(n, e);
    let i = t.moveVertically(n, e);
    return i.head != n.head ? i : t.moveToLineBoundary(n, e);
  });
}
const KQ = (t) => GQ(t, !1), JQ = (t) => GQ(t, !0);
function eU(t) {
  let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, n = 0, i = 0, r;
  if (e) {
    for (let s of t.state.facet(Te.scrollMargins)) {
      let o = s(t);
      o != null && o.top && (n = Math.max(o == null ? void 0 : o.top, n)), o != null && o.bottom && (i = Math.max(o == null ? void 0 : o.bottom, i));
    }
    r = t.scrollDOM.clientHeight - n - i;
  } else
    r = (t.dom.ownerDocument.defaultView || window).innerHeight;
  return {
    marginTop: n,
    marginBottom: i,
    selfScroll: e,
    height: Math.max(t.defaultLineHeight, r - 5)
  };
}
function tU(t, e) {
  let n = eU(t), { state: i } = t, r = hp(i.selection, (o) => o.empty ? t.moveVertically(o, e, n.height) : O2(o, e));
  if (r.eq(i.selection))
    return !1;
  let s;
  if (n.selfScroll) {
    let o = t.coordsAtPos(i.selection.main.head), a = t.scrollDOM.getBoundingClientRect(), l = a.top + n.marginTop, u = a.bottom - n.marginBottom;
    o && o.top > l && o.bottom < u && (s = Te.scrollIntoView(r.main.head, { y: "start", yMargin: o.top - l }));
  }
  return t.dispatch(Qa(i, r), { effects: s }), !0;
}
const hD = (t) => tU(t, !1), _C = (t) => tU(t, !0);
function fc(t, e, n) {
  let i = t.lineBlockAt(e.head), r = t.moveToLineBoundary(e, n);
  if (r.head == e.head && r.head != (n ? i.to : i.from) && (r = t.moveToLineBoundary(e, n, !1)), !n && r.head == i.from && i.length) {
    let s = /^\s*/.exec(t.state.sliceDoc(i.from, Math.min(i.from + 100, i.to)))[0].length;
    s && e.head != i.from + s && (r = he.cursor(i.from + s));
  }
  return r;
}
const UOe = (t) => Yo(t, (e) => fc(t, e, !0)), ZOe = (t) => Yo(t, (e) => fc(t, e, !1)), qOe = (t) => Yo(t, (e) => fc(t, e, !Lr(t))), YOe = (t) => Yo(t, (e) => fc(t, e, Lr(t))), VOe = (t) => Yo(t, (e) => he.cursor(t.lineBlockAt(e.head).from, 1)), XOe = (t) => Yo(t, (e) => he.cursor(t.lineBlockAt(e.head).to, -1));
function GOe(t, e, n) {
  let i = !1, r = hp(t.selection, (s) => {
    let o = xa(t, s.head, -1) || xa(t, s.head, 1) || s.head > 0 && xa(t, s.head - 1, 1) || s.head < t.doc.length && xa(t, s.head + 1, -1);
    if (!o || !o.end)
      return s;
    i = !0;
    let a = o.start.from == s.head ? o.end.to : o.end.from;
    return he.cursor(a);
  });
  return i ? (e(Qa(t, r)), !0) : !1;
}
const KOe = ({ state: t, dispatch: e }) => GOe(t, e);
function wo(t, e) {
  let n = hp(t.state.selection, (i) => {
    let r = e(i);
    return he.range(i.anchor, r.head, r.goalColumn, r.bidiLevel || void 0);
  });
  return n.eq(t.state.selection) ? !1 : (t.dispatch(Qa(t.state, n)), !0);
}
function nU(t, e) {
  return wo(t, (n) => t.moveByChar(n, e));
}
const iU = (t) => nU(t, !Lr(t)), rU = (t) => nU(t, Lr(t));
function sU(t, e) {
  return wo(t, (n) => t.moveByGroup(n, e));
}
const JOe = (t) => sU(t, !Lr(t)), eSe = (t) => sU(t, Lr(t)), tSe = (t) => wo(t, (e) => S2(t.state, e, !Lr(t))), nSe = (t) => wo(t, (e) => S2(t.state, e, Lr(t)));
function oU(t, e) {
  return wo(t, (n) => t.moveVertically(n, e));
}
const aU = (t) => oU(t, !1), lU = (t) => oU(t, !0);
function uU(t, e) {
  return wo(t, (n) => t.moveVertically(n, e, eU(t).height));
}
const pD = (t) => uU(t, !1), mD = (t) => uU(t, !0), iSe = (t) => wo(t, (e) => fc(t, e, !0)), rSe = (t) => wo(t, (e) => fc(t, e, !1)), sSe = (t) => wo(t, (e) => fc(t, e, !Lr(t))), oSe = (t) => wo(t, (e) => fc(t, e, Lr(t))), aSe = (t) => wo(t, (e) => he.cursor(t.lineBlockAt(e.head).from)), lSe = (t) => wo(t, (e) => he.cursor(t.lineBlockAt(e.head).to)), gD = ({ state: t, dispatch: e }) => (e(Qa(t, { anchor: 0 })), !0), vD = ({ state: t, dispatch: e }) => (e(Qa(t, { anchor: t.doc.length })), !0), bD = ({ state: t, dispatch: e }) => (e(Qa(t, { anchor: t.selection.main.anchor, head: 0 })), !0), yD = ({ state: t, dispatch: e }) => (e(Qa(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), uSe = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), cSe = ({ state: t, dispatch: e }) => {
  let n = C2(t).map(({ from: i, to: r }) => he.range(i, Math.min(r + 1, t.doc.length)));
  return e(t.update({ selection: he.create(n), userEvent: "select" })), !0;
}, fSe = ({ state: t, dispatch: e }) => {
  let n = hp(t.selection, (i) => {
    var r;
    let s = ri(t).resolveStack(i.from, 1);
    for (let o = s; o; o = o.next) {
      let { node: a } = o;
      if ((a.from < i.from && a.to >= i.to || a.to > i.to && a.from <= i.from) && (!((r = a.parent) === null || r === void 0) && r.parent))
        return he.range(a.to, a.from);
    }
    return i;
  });
  return e(Qa(t, n)), !0;
}, dSe = ({ state: t, dispatch: e }) => {
  let n = t.selection, i = null;
  return n.ranges.length > 1 ? i = he.create([n.main]) : n.main.empty || (i = he.create([he.cursor(n.main.head)])), i ? (e(Qa(t, i)), !0) : !1;
};
function W1(t, e) {
  if (t.state.readOnly)
    return !1;
  let n = "delete.selection", { state: i } = t, r = i.changeByRange((s) => {
    let { from: o, to: a } = s;
    if (o == a) {
      let l = e(s);
      l < o ? (n = "delete.backward", l = Cb(t, l, !1)) : l > o && (n = "delete.forward", l = Cb(t, l, !0)), o = Math.min(o, l), a = Math.max(a, l);
    } else
      o = Cb(t, o, !1), a = Cb(t, a, !0);
    return o == a ? { range: s } : { changes: { from: o, to: a }, range: he.cursor(o, o < s.head ? -1 : 1) };
  });
  return r.changes.empty ? !1 : (t.dispatch(i.update(r, {
    scrollIntoView: !0,
    userEvent: n,
    effects: n == "delete.selection" ? Te.announce.of(i.phrase("Selection deleted")) : void 0
  })), !0);
}
function Cb(t, e, n) {
  if (t instanceof Te)
    for (let i of t.state.facet(Te.atomicRanges).map((r) => r(t)))
      i.between(e, e, (r, s) => {
        r < e && s > e && (e = n ? s : r);
      });
  return e;
}
const cU = (t, e) => W1(t, (n) => {
  let i = n.from, { state: r } = t, s = r.doc.lineAt(i), o, a;
  if (!e && i > s.from && i < s.from + 200 && !/[^ \t]/.test(o = s.text.slice(0, i - s.from))) {
    if (o[o.length - 1] == "	")
      return i - 1;
    let l = dp(o, r.tabSize), u = l % Mw(r) || Mw(r);
    for (let f = 0; f < u && o[o.length - 1 - f] == " "; f++)
      i--;
    a = i;
  } else
    a = dr(s.text, i - s.from, e, e) + s.from, a == i && s.number != (e ? r.doc.lines : 1) ? a += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(s.text.slice(a - s.from, i - s.from)) && (a = dr(s.text, a - s.from, !1, !1) + s.from);
  return a;
}), OC = (t) => cU(t, !1), fU = (t) => cU(t, !0), dU = (t, e) => W1(t, (n) => {
  let i = n.head, { state: r } = t, s = r.doc.lineAt(i), o = r.charCategorizer(i);
  for (let a = null; ; ) {
    if (i == (e ? s.to : s.from)) {
      i == n.head && s.number != (e ? r.doc.lines : 1) && (i += e ? 1 : -1);
      break;
    }
    let l = dr(s.text, i - s.from, e) + s.from, u = s.text.slice(Math.min(i, l) - s.from, Math.max(i, l) - s.from), f = o(u);
    if (a != null && f != a)
      break;
    (u != " " || i != n.head) && (a = f), i = l;
  }
  return i;
}), hU = (t) => dU(t, !1), hSe = (t) => dU(t, !0), pSe = (t) => W1(t, (e) => {
  let n = t.lineBlockAt(e.head).to;
  return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
}), mSe = (t) => W1(t, (e) => {
  let n = t.moveToLineBoundary(e, !1).head;
  return e.head > n ? n : Math.max(0, e.head - 1);
}), gSe = (t) => W1(t, (e) => {
  let n = t.moveToLineBoundary(e, !0).head;
  return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
}), vSe = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = t.changeByRange((i) => ({
    changes: { from: i.from, to: i.to, insert: Kt.of(["", ""]) },
    range: he.cursor(i.from)
  }));
  return e(t.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
}, bSe = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = t.changeByRange((i) => {
    if (!i.empty || i.from == 0 || i.from == t.doc.length)
      return { range: i };
    let r = i.from, s = t.doc.lineAt(r), o = r == s.from ? r - 1 : dr(s.text, r - s.from, !1) + s.from, a = r == s.to ? r + 1 : dr(s.text, r - s.from, !0) + s.from;
    return {
      changes: { from: o, to: a, insert: t.doc.slice(r, a).append(t.doc.slice(o, r)) },
      range: he.cursor(a)
    };
  });
  return n.changes.empty ? !1 : (e(t.update(n, { scrollIntoView: !0, userEvent: "move.character" })), !0);
};
function C2(t) {
  let e = [], n = -1;
  for (let i of t.selection.ranges) {
    let r = t.doc.lineAt(i.from), s = t.doc.lineAt(i.to);
    if (!i.empty && i.to == s.from && (s = t.doc.lineAt(i.to - 1)), n >= r.number) {
      let o = e[e.length - 1];
      o.to = s.to, o.ranges.push(i);
    } else
      e.push({ from: r.from, to: s.to, ranges: [i] });
    n = s.number + 1;
  }
  return e;
}
function pU(t, e, n) {
  if (t.readOnly)
    return !1;
  let i = [], r = [];
  for (let s of C2(t)) {
    if (n ? s.to == t.doc.length : s.from == 0)
      continue;
    let o = t.doc.lineAt(n ? s.to + 1 : s.from - 1), a = o.length + 1;
    if (n) {
      i.push({ from: s.to, to: o.to }, { from: s.from, insert: o.text + t.lineBreak });
      for (let l of s.ranges)
        r.push(he.range(Math.min(t.doc.length, l.anchor + a), Math.min(t.doc.length, l.head + a)));
    } else {
      i.push({ from: o.from, to: s.from }, { from: s.to, insert: t.lineBreak + o.text });
      for (let l of s.ranges)
        r.push(he.range(l.anchor - a, l.head - a));
    }
  }
  return i.length ? (e(t.update({
    changes: i,
    scrollIntoView: !0,
    selection: he.create(r, t.selection.mainIndex),
    userEvent: "move.line"
  })), !0) : !1;
}
const ySe = ({ state: t, dispatch: e }) => pU(t, e, !1), wSe = ({ state: t, dispatch: e }) => pU(t, e, !0);
function mU(t, e, n) {
  if (t.readOnly)
    return !1;
  let i = [];
  for (let r of C2(t))
    n ? i.push({ from: r.from, insert: t.doc.slice(r.from, r.to) + t.lineBreak }) : i.push({ from: r.to, insert: t.lineBreak + t.doc.slice(r.from, r.to) });
  return e(t.update({ changes: i, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
}
const kSe = ({ state: t, dispatch: e }) => mU(t, e, !1), xSe = ({ state: t, dispatch: e }) => mU(t, e, !0), _Se = (t) => {
  if (t.state.readOnly)
    return !1;
  let { state: e } = t, n = e.changes(C2(e).map(({ from: r, to: s }) => (r > 0 ? r-- : s < e.doc.length && s++, { from: r, to: s }))), i = hp(e.selection, (r) => t.moveVertically(r, !0)).map(n);
  return t.dispatch({ changes: n, selection: i, scrollIntoView: !0, userEvent: "delete.line" }), !0;
};
function OSe(t, e) {
  if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
    return { from: e, to: e };
  let n = ri(t).resolveInner(e), i = n.childBefore(e), r = n.childAfter(e), s;
  return i && r && i.to <= e && r.from >= e && (s = i.type.prop(Mt.closedBy)) && s.indexOf(r.name) > -1 && t.doc.lineAt(i.to).from == t.doc.lineAt(r.from).from && !/\S/.test(t.sliceDoc(i.to, r.from)) ? { from: i.to, to: r.from } : null;
}
const SSe = /* @__PURE__ */ gU(!1), CSe = /* @__PURE__ */ gU(!0);
function gU(t) {
  return ({ state: e, dispatch: n }) => {
    if (e.readOnly)
      return !1;
    let i = e.changeByRange((r) => {
      let { from: s, to: o } = r, a = e.doc.lineAt(s), l = !t && s == o && OSe(e, s);
      t && (s = o = (o <= a.to ? a : e.doc.lineAt(o)).to);
      let u = new b2(e, { simulateBreak: s, simulateDoubleBreak: !!l }), f = ME(u, s);
      for (f == null && (f = dp(/^\s*/.exec(e.doc.lineAt(s).text)[0], e.tabSize)); o < a.to && /\s/.test(a.text[o - a.from]); )
        o++;
      l ? { from: s, to: o } = l : s > a.from && s < a.from + 100 && !/\S/.test(a.text.slice(0, s)) && (s = a.from);
      let d = ["", v0(e, f)];
      return l && d.push(v0(e, u.lineIndent(a.from, -1))), {
        changes: { from: s, to: o, insert: Kt.of(d) },
        range: he.cursor(s + 1 + d[1].length)
      };
    });
    return n(e.update(i, { scrollIntoView: !0, userEvent: "input" })), !0;
  };
}
function PE(t, e) {
  let n = -1;
  return t.changeByRange((i) => {
    let r = [];
    for (let o = i.from; o <= i.to; ) {
      let a = t.doc.lineAt(o);
      a.number > n && (i.empty || i.to > a.from) && (e(a, r, i), n = a.number), o = a.to + 1;
    }
    let s = t.changes(r);
    return {
      changes: r,
      range: he.range(s.mapPos(i.anchor, 1), s.mapPos(i.head, 1))
    };
  });
}
const ESe = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = /* @__PURE__ */ Object.create(null), i = new b2(t, { overrideIndentation: (s) => {
    let o = n[s];
    return o ?? -1;
  } }), r = PE(t, (s, o, a) => {
    let l = ME(i, s.from);
    if (l == null)
      return;
    /\S/.test(s.text) || (l = 0);
    let u = /^\s*/.exec(s.text)[0], f = v0(t, l);
    (u != f || a.from < s.from + u.length) && (n[s.from] = l, o.push({ from: s.from, to: s.from + u.length, insert: f }));
  });
  return r.changes.empty || e(t.update(r, { userEvent: "indent" })), !0;
}, vU = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(PE(t, (n, i) => {
  i.push({ from: n.from, insert: t.facet(F1) });
}), { userEvent: "input.indent" })), !0), bU = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(PE(t, (n, i) => {
  let r = /^\s*/.exec(n.text)[0];
  if (!r)
    return;
  let s = dp(r, t.tabSize), o = 0, a = v0(t, Math.max(0, s - Mw(t)));
  for (; o < r.length && o < a.length && r.charCodeAt(o) == a.charCodeAt(o); )
    o++;
  i.push({ from: n.from + o, to: n.from + r.length, insert: a.slice(o) });
}), { userEvent: "delete.dedent" })), !0), TSe = [
  { key: "Ctrl-b", run: YQ, shift: iU, preventDefault: !0 },
  { key: "Ctrl-f", run: VQ, shift: rU },
  { key: "Ctrl-p", run: KQ, shift: aU },
  { key: "Ctrl-n", run: JQ, shift: lU },
  { key: "Ctrl-a", run: VOe, shift: aSe },
  { key: "Ctrl-e", run: XOe, shift: lSe },
  { key: "Ctrl-d", run: fU },
  { key: "Ctrl-h", run: OC },
  { key: "Ctrl-k", run: pSe },
  { key: "Ctrl-Alt-h", run: hU },
  { key: "Ctrl-o", run: vSe },
  { key: "Ctrl-t", run: bSe },
  { key: "Ctrl-v", run: _C }
], IE = /* @__PURE__ */ [
  { key: "ArrowLeft", run: YQ, shift: iU, preventDefault: !0 },
  { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: BOe, shift: JOe, preventDefault: !0 },
  { mac: "Cmd-ArrowLeft", run: qOe, shift: sSe, preventDefault: !0 },
  { key: "ArrowRight", run: VQ, shift: rU, preventDefault: !0 },
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: zOe, shift: eSe, preventDefault: !0 },
  { mac: "Cmd-ArrowRight", run: YOe, shift: oSe, preventDefault: !0 },
  { key: "ArrowUp", run: KQ, shift: aU, preventDefault: !0 },
  { mac: "Cmd-ArrowUp", run: gD, shift: bD },
  { mac: "Ctrl-ArrowUp", run: hD, shift: pD },
  { key: "ArrowDown", run: JQ, shift: lU, preventDefault: !0 },
  { mac: "Cmd-ArrowDown", run: vD, shift: yD },
  { mac: "Ctrl-ArrowDown", run: _C, shift: mD },
  { key: "PageUp", run: hD, shift: pD },
  { key: "PageDown", run: _C, shift: mD },
  { key: "Home", run: ZOe, shift: rSe, preventDefault: !0 },
  { key: "Mod-Home", run: gD, shift: bD },
  { key: "End", run: UOe, shift: iSe, preventDefault: !0 },
  { key: "Mod-End", run: vD, shift: yD },
  { key: "Enter", run: SSe },
  { key: "Mod-a", run: uSe },
  { key: "Backspace", run: OC, shift: OC },
  { key: "Delete", run: fU },
  { key: "Mod-Backspace", mac: "Alt-Backspace", run: hU },
  { key: "Mod-Delete", mac: "Alt-Delete", run: hSe },
  { mac: "Mod-Backspace", run: mSe },
  { mac: "Mod-Delete", run: gSe }
].concat(/* @__PURE__ */ TSe.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), yU = /* @__PURE__ */ [
  { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: HOe, shift: tSe },
  { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: QOe, shift: nSe },
  { key: "Alt-ArrowUp", run: ySe },
  { key: "Shift-Alt-ArrowUp", run: kSe },
  { key: "Alt-ArrowDown", run: wSe },
  { key: "Shift-Alt-ArrowDown", run: xSe },
  { key: "Escape", run: dSe },
  { key: "Mod-Enter", run: CSe },
  { key: "Alt-l", mac: "Ctrl-l", run: cSe },
  { key: "Mod-i", run: fSe, preventDefault: !0 },
  { key: "Mod-[", run: bU },
  { key: "Mod-]", run: vU },
  { key: "Mod-Alt-\\", run: ESe },
  { key: "Shift-Mod-k", run: _Se },
  { key: "Shift-Mod-\\", run: KOe },
  { key: "Mod-/", run: _Oe },
  { key: "Alt-A", run: SOe }
].concat(IE), $Se = { key: "Tab", run: vU, shift: bU };
function cn() {
  var t = arguments[0];
  typeof t == "string" && (t = document.createElement(t));
  var e = 1, n = arguments[1];
  if (n && typeof n == "object" && n.nodeType == null && !Array.isArray(n)) {
    for (var i in n) if (Object.prototype.hasOwnProperty.call(n, i)) {
      var r = n[i];
      typeof r == "string" ? t.setAttribute(i, r) : r != null && (t[i] = r);
    }
    e++;
  }
  for (; e < arguments.length; e++) wU(t, arguments[e]);
  return t;
}
function wU(t, e) {
  if (typeof e == "string")
    t.appendChild(document.createTextNode(e));
  else if (e != null) if (e.nodeType != null)
    t.appendChild(e);
  else if (Array.isArray(e))
    for (var n = 0; n < e.length; n++) wU(t, e[n]);
  else
    throw new RangeError("Unsupported child node: " + e);
}
const wD = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t;
class Dh {
  /**
  Create a text cursor. The query is the search string, `from` to
  `to` provides the region to search.
  
  When `normalize` is given, it will be called, on both the query
  string and the content it is matched against, before comparing.
  You can, for example, create a case-insensitive search by
  passing `s => s.toLowerCase()`.
  
  Text is always normalized with
  [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
  (when supported).
  */
  constructor(e, n, i = 0, r = e.length, s, o) {
    this.test = o, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(i, r), this.bufferStart = i, this.normalize = s ? (a) => s(wD(a)) : wD, this.query = this.normalize(n);
  }
  peek() {
    if (this.bufferPos == this.buffer.length) {
      if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
        return -1;
      this.bufferPos = 0, this.buffer = this.iter.value;
    }
    return ar(this.buffer, this.bufferPos);
  }
  /**
  Look for the next match. Updates the iterator's
  [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
  [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
  at least once before using the cursor.
  */
  next() {
    for (; this.matches.length; )
      this.matches.pop();
    return this.nextOverlapping();
  }
  /**
  The `next` method will ignore matches that partially overlap a
  previous match. This method behaves like `next`, but includes
  such matches.
  */
  nextOverlapping() {
    for (; ; ) {
      let e = this.peek();
      if (e < 0)
        return this.done = !0, this;
      let n = fE(e), i = this.bufferStart + this.bufferPos;
      this.bufferPos += io(e);
      let r = this.normalize(n);
      for (let s = 0, o = i; ; s++) {
        let a = r.charCodeAt(s), l = this.match(a, o);
        if (s == r.length - 1) {
          if (l)
            return this.value = l, this;
          break;
        }
        o == i && s < n.length && n.charCodeAt(s) == a && o++;
      }
    }
  }
  match(e, n) {
    let i = null;
    for (let r = 0; r < this.matches.length; r += 2) {
      let s = this.matches[r], o = !1;
      this.query.charCodeAt(s) == e && (s == this.query.length - 1 ? i = { from: this.matches[r + 1], to: n + 1 } : (this.matches[r]++, o = !0)), o || (this.matches.splice(r, 2), r -= 2);
    }
    return this.query.charCodeAt(0) == e && (this.query.length == 1 ? i = { from: n, to: n + 1 } : this.matches.push(1, n)), i && this.test && !this.test(i.from, i.to, this.buffer, this.bufferStart) && (i = null), i;
  }
}
typeof Symbol < "u" && (Dh.prototype[Symbol.iterator] = function() {
  return this;
});
const kU = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, LE = "gm" + (/x/.unicode == null ? "" : "u");
class xU {
  /**
  Create a cursor that will search the given range in the given
  document. `query` should be the raw pattern (as you'd pass it to
  `new RegExp`).
  */
  constructor(e, n, i, r = 0, s = e.length) {
    if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = kU, /\\[sWDnr]|\n|\r|\[\^/.test(n))
      return new _U(e, n, i, r, s);
    this.re = new RegExp(n, LE + (i != null && i.ignoreCase ? "i" : "")), this.test = i == null ? void 0 : i.test, this.iter = e.iter();
    let o = e.lineAt(r);
    this.curLineStart = o.from, this.matchPos = Pw(e, r), this.getLine(this.curLineStart);
  }
  getLine(e) {
    this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
  }
  nextLine() {
    this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
  }
  /**
  Move to the next match, if there is one.
  */
  next() {
    for (let e = this.matchPos - this.curLineStart; ; ) {
      this.re.lastIndex = e;
      let n = this.matchPos <= this.to && this.re.exec(this.curLine);
      if (n) {
        let i = this.curLineStart + n.index, r = i + n[0].length;
        if (this.matchPos = Pw(this.text, r + (i == r ? 1 : 0)), i == this.curLineStart + this.curLine.length && this.nextLine(), (i < r || i > this.value.to) && (!this.test || this.test(i, r, n)))
          return this.value = { from: i, to: r, match: n }, this;
        e = this.matchPos - this.curLineStart;
      } else if (this.curLineStart + this.curLine.length < this.to)
        this.nextLine(), e = 0;
      else
        return this.done = !0, this;
    }
  }
}
const fO = /* @__PURE__ */ new WeakMap();
class gh {
  constructor(e, n) {
    this.from = e, this.text = n;
  }
  get to() {
    return this.from + this.text.length;
  }
  static get(e, n, i) {
    let r = fO.get(e);
    if (!r || r.from >= i || r.to <= n) {
      let a = new gh(n, e.sliceString(n, i));
      return fO.set(e, a), a;
    }
    if (r.from == n && r.to == i)
      return r;
    let { text: s, from: o } = r;
    return o > n && (s = e.sliceString(n, o) + s, o = n), r.to < i && (s += e.sliceString(r.to, i)), fO.set(e, new gh(o, s)), new gh(n, s.slice(n - o, i - o));
  }
}
class _U {
  constructor(e, n, i, r, s) {
    this.text = e, this.to = s, this.done = !1, this.value = kU, this.matchPos = Pw(e, r), this.re = new RegExp(n, LE + (i != null && i.ignoreCase ? "i" : "")), this.test = i == null ? void 0 : i.test, this.flat = gh.get(e, r, this.chunkEnd(
      r + 5e3
      /* Chunk.Base */
    ));
  }
  chunkEnd(e) {
    return e >= this.to ? this.to : this.text.lineAt(e).to;
  }
  next() {
    for (; ; ) {
      let e = this.re.lastIndex = this.matchPos - this.flat.from, n = this.re.exec(this.flat.text);
      if (n && !n[0] && n.index == e && (this.re.lastIndex = e + 1, n = this.re.exec(this.flat.text)), n) {
        let i = this.flat.from + n.index, r = i + n[0].length;
        if ((this.flat.to >= this.to || n.index + n[0].length <= this.flat.text.length - 10) && (!this.test || this.test(i, r, n)))
          return this.value = { from: i, to: r, match: n }, this.matchPos = Pw(this.text, r + (i == r ? 1 : 0)), this;
      }
      if (this.flat.to == this.to)
        return this.done = !0, this;
      this.flat = gh.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
    }
  }
}
typeof Symbol < "u" && (xU.prototype[Symbol.iterator] = _U.prototype[Symbol.iterator] = function() {
  return this;
});
function MSe(t) {
  try {
    return new RegExp(t, LE), !0;
  } catch {
    return !1;
  }
}
function Pw(t, e) {
  if (e >= t.length)
    return e;
  let n = t.lineAt(e), i;
  for (; e < n.to && (i = n.text.charCodeAt(e - n.from)) >= 56320 && i < 57344; )
    e++;
  return e;
}
function SC(t) {
  let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), n = cn("input", { class: "cm-textfield", name: "line", value: e }), i = cn("form", {
    class: "cm-gotoLine",
    onkeydown: (s) => {
      s.keyCode == 27 ? (s.preventDefault(), t.dispatch({ effects: Iw.of(!1) }), t.focus()) : s.keyCode == 13 && (s.preventDefault(), r());
    },
    onsubmit: (s) => {
      s.preventDefault(), r();
    }
  }, cn("label", t.state.phrase("Go to line"), ": ", n), " ", cn("button", { class: "cm-button", type: "submit" }, t.state.phrase("go")));
  function r() {
    let s = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);
    if (!s)
      return;
    let { state: o } = t, a = o.doc.lineAt(o.selection.main.head), [, l, u, f, d] = s, h = f ? +f.slice(1) : 0, m = u ? +u : a.number;
    if (u && d) {
      let x = m / 100;
      l && (x = x * (l == "-" ? -1 : 1) + a.number / o.doc.lines), m = Math.round(o.doc.lines * x);
    } else u && l && (m = m * (l == "-" ? -1 : 1) + a.number);
    let g = o.doc.line(Math.max(1, Math.min(o.doc.lines, m))), w = he.cursor(g.from + Math.max(0, Math.min(h, g.length)));
    t.dispatch({
      effects: [Iw.of(!1), Te.scrollIntoView(w.from, { y: "center" })],
      selection: w
    }), t.focus();
  }
  return { dom: i };
}
const Iw = /* @__PURE__ */ Ot.define(), kD = /* @__PURE__ */ Ki.define({
  create() {
    return !0;
  },
  update(t, e) {
    for (let n of e.effects)
      n.is(Iw) && (t = n.value);
    return t;
  },
  provide: (t) => h0.from(t, (e) => e ? SC : null)
}), NSe = (t) => {
  let e = d0(t, SC);
  if (!e) {
    let n = [Iw.of(!0)];
    t.state.field(kD, !1) == null && n.push(Ot.appendConfig.of([kD, ASe])), t.dispatch({ effects: n }), e = d0(t, SC);
  }
  return e && e.dom.querySelector("input").select(), !0;
}, ASe = /* @__PURE__ */ Te.baseTheme({
  ".cm-panel.cm-gotoLine": {
    padding: "2px 6px 4px",
    "& label": { fontSize: "80%" }
  }
}), DSe = {
  highlightWordAroundCursor: !1,
  minSelectionLength: 1,
  maxMatches: 100,
  wholeWords: !1
}, PSe = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, DSe, {
      highlightWordAroundCursor: (e, n) => e || n,
      minSelectionLength: Math.min,
      maxMatches: Math.min
    });
  }
});
function ISe(t) {
  return [BSe, FSe];
}
const LSe = /* @__PURE__ */ it.mark({ class: "cm-selectionMatch" }), RSe = /* @__PURE__ */ it.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
function xD(t, e, n, i) {
  return (n == 0 || t(e.sliceDoc(n - 1, n)) != In.Word) && (i == e.doc.length || t(e.sliceDoc(i, i + 1)) != In.Word);
}
function jSe(t, e, n, i) {
  return t(e.sliceDoc(n, n + 1)) == In.Word && t(e.sliceDoc(i - 1, i)) == In.Word;
}
const FSe = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.decorations = this.getDeco(t);
  }
  update(t) {
    (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view));
  }
  getDeco(t) {
    let e = t.state.facet(PSe), { state: n } = t, i = n.selection;
    if (i.ranges.length > 1)
      return it.none;
    let r = i.main, s, o = null;
    if (r.empty) {
      if (!e.highlightWordAroundCursor)
        return it.none;
      let l = n.wordAt(r.head);
      if (!l)
        return it.none;
      o = n.charCategorizer(r.head), s = n.sliceDoc(l.from, l.to);
    } else {
      let l = r.to - r.from;
      if (l < e.minSelectionLength || l > 200)
        return it.none;
      if (e.wholeWords) {
        if (s = n.sliceDoc(r.from, r.to), o = n.charCategorizer(r.head), !(xD(o, n, r.from, r.to) && jSe(o, n, r.from, r.to)))
          return it.none;
      } else if (s = n.sliceDoc(r.from, r.to).trim(), !s)
        return it.none;
    }
    let a = [];
    for (let l of t.visibleRanges) {
      let u = new Dh(n.doc, s, l.from, l.to);
      for (; !u.next().done; ) {
        let { from: f, to: d } = u.value;
        if ((!o || xD(o, n, f, d)) && (r.empty && f <= r.from && d >= r.to ? a.push(RSe.range(f, d)) : (f >= r.to || d <= r.from) && a.push(LSe.range(f, d)), a.length > e.maxMatches))
          return it.none;
      }
    }
    return it.set(a);
  }
}, {
  decorations: (t) => t.decorations
}), BSe = /* @__PURE__ */ Te.baseTheme({
  ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
  ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
}), zSe = ({ state: t, dispatch: e }) => {
  let { selection: n } = t, i = he.create(n.ranges.map((r) => t.wordAt(r.head) || he.cursor(r.head)), n.mainIndex);
  return i.eq(n) ? !1 : (e(t.update({ selection: i })), !0);
};
function WSe(t, e) {
  let { main: n, ranges: i } = t.selection, r = t.wordAt(n.head), s = r && r.from == n.from && r.to == n.to;
  for (let o = !1, a = new Dh(t.doc, e, i[i.length - 1].to); ; )
    if (a.next(), a.done) {
      if (o)
        return null;
      a = new Dh(t.doc, e, 0, Math.max(0, i[i.length - 1].from - 1)), o = !0;
    } else {
      if (o && i.some((l) => l.from == a.value.from))
        continue;
      if (s) {
        let l = t.wordAt(a.value.from);
        if (!l || l.from != a.value.from || l.to != a.value.to)
          continue;
      }
      return a.value;
    }
}
const HSe = ({ state: t, dispatch: e }) => {
  let { ranges: n } = t.selection;
  if (n.some((s) => s.from === s.to))
    return zSe({ state: t, dispatch: e });
  let i = t.sliceDoc(n[0].from, n[0].to);
  if (t.selection.ranges.some((s) => t.sliceDoc(s.from, s.to) != i))
    return !1;
  let r = WSe(t, i);
  return r ? (e(t.update({
    selection: t.selection.addRange(he.range(r.from, r.to), !1),
    effects: Te.scrollIntoView(r.to)
  })), !0) : !1;
}, pp = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, {
      top: !1,
      caseSensitive: !1,
      literal: !1,
      regexp: !1,
      wholeWord: !1,
      createPanel: (e) => new t4e(e),
      scrollToMatch: (e) => Te.scrollIntoView(e)
    });
  }
});
class OU {
  /**
  Create a query object.
  */
  constructor(e) {
    this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || MSe(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord;
  }
  /**
  @internal
  */
  unquote(e) {
    return this.literal ? e : e.replace(/\\([nrt\\])/g, (n, i) => i == "n" ? `
` : i == "r" ? "\r" : i == "t" ? "	" : "\\");
  }
  /**
  Compare this query to another query.
  */
  eq(e) {
    return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
  }
  /**
  @internal
  */
  create() {
    return this.regexp ? new qSe(this) : new USe(this);
  }
  /**
  Get a search cursor for this query, searching through the given
  range in the given state.
  */
  getCursor(e, n = 0, i) {
    let r = e.doc ? e : zt.create({ doc: e });
    return i == null && (i = r.doc.length), this.regexp ? Hd(this, r, n, i) : Wd(this, r, n, i);
  }
}
class SU {
  constructor(e) {
    this.spec = e;
  }
}
function Wd(t, e, n, i) {
  return new Dh(e.doc, t.unquoted, n, i, t.caseSensitive ? void 0 : (r) => r.toLowerCase(), t.wholeWord ? QSe(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
}
function QSe(t, e) {
  return (n, i, r, s) => ((s > n || s + r.length < i) && (s = Math.max(0, n - 2), r = t.sliceString(s, Math.min(t.length, i + 2))), (e(Lw(r, n - s)) != In.Word || e(Rw(r, n - s)) != In.Word) && (e(Rw(r, i - s)) != In.Word || e(Lw(r, i - s)) != In.Word));
}
class USe extends SU {
  constructor(e) {
    super(e);
  }
  nextMatch(e, n, i) {
    let r = Wd(this.spec, e, i, e.doc.length).nextOverlapping();
    return r.done && (r = Wd(this.spec, e, 0, n).nextOverlapping()), r.done ? null : r.value;
  }
  // Searching in reverse is, rather than implementing an inverted search
  // cursor, done by scanning chunk after chunk forward.
  prevMatchInRange(e, n, i) {
    for (let r = i; ; ) {
      let s = Math.max(n, r - 1e4 - this.spec.unquoted.length), o = Wd(this.spec, e, s, r), a = null;
      for (; !o.nextOverlapping().done; )
        a = o.value;
      if (a)
        return a;
      if (s == n)
        return null;
      r -= 1e4;
    }
  }
  prevMatch(e, n, i) {
    return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, i, e.doc.length);
  }
  getReplacement(e) {
    return this.spec.unquote(this.spec.replace);
  }
  matchAll(e, n) {
    let i = Wd(this.spec, e, 0, e.doc.length), r = [];
    for (; !i.next().done; ) {
      if (r.length >= n)
        return null;
      r.push(i.value);
    }
    return r;
  }
  highlight(e, n, i, r) {
    let s = Wd(this.spec, e, Math.max(0, n - this.spec.unquoted.length), Math.min(i + this.spec.unquoted.length, e.doc.length));
    for (; !s.next().done; )
      r(s.value.from, s.value.to);
  }
}
function Hd(t, e, n, i) {
  return new xU(e.doc, t.search, {
    ignoreCase: !t.caseSensitive,
    test: t.wholeWord ? ZSe(e.charCategorizer(e.selection.main.head)) : void 0
  }, n, i);
}
function Lw(t, e) {
  return t.slice(dr(t, e, !1), e);
}
function Rw(t, e) {
  return t.slice(e, dr(t, e));
}
function ZSe(t) {
  return (e, n, i) => !i[0].length || (t(Lw(i.input, i.index)) != In.Word || t(Rw(i.input, i.index)) != In.Word) && (t(Rw(i.input, i.index + i[0].length)) != In.Word || t(Lw(i.input, i.index + i[0].length)) != In.Word);
}
class qSe extends SU {
  nextMatch(e, n, i) {
    let r = Hd(this.spec, e, i, e.doc.length).next();
    return r.done && (r = Hd(this.spec, e, 0, n).next()), r.done ? null : r.value;
  }
  prevMatchInRange(e, n, i) {
    for (let r = 1; ; r++) {
      let s = Math.max(
        n,
        i - r * 1e4
        /* FindPrev.ChunkSize */
      ), o = Hd(this.spec, e, s, i), a = null;
      for (; !o.next().done; )
        a = o.value;
      if (a && (s == n || a.from > s + 10))
        return a;
      if (s == n)
        return null;
    }
  }
  prevMatch(e, n, i) {
    return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, i, e.doc.length);
  }
  getReplacement(e) {
    return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (n, i) => i == "$" ? "$" : i == "&" ? e.match[0] : i != "0" && +i < e.match.length ? e.match[i] : n);
  }
  matchAll(e, n) {
    let i = Hd(this.spec, e, 0, e.doc.length), r = [];
    for (; !i.next().done; ) {
      if (r.length >= n)
        return null;
      r.push(i.value);
    }
    return r;
  }
  highlight(e, n, i, r) {
    let s = Hd(this.spec, e, Math.max(
      0,
      n - 250
      /* RegExp.HighlightMargin */
    ), Math.min(i + 250, e.doc.length));
    for (; !s.next().done; )
      r(s.value.from, s.value.to);
  }
}
const b0 = /* @__PURE__ */ Ot.define(), RE = /* @__PURE__ */ Ot.define(), Iu = /* @__PURE__ */ Ki.define({
  create(t) {
    return new dO(CC(t).create(), null);
  },
  update(t, e) {
    for (let n of e.effects)
      n.is(b0) ? t = new dO(n.value.create(), t.panel) : n.is(RE) && (t = new dO(t.query, n.value ? jE : null));
    return t;
  },
  provide: (t) => h0.from(t, (e) => e.panel)
});
class dO {
  constructor(e, n) {
    this.query = e, this.panel = n;
  }
}
const YSe = /* @__PURE__ */ it.mark({ class: "cm-searchMatch" }), VSe = /* @__PURE__ */ it.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), XSe = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.view = t, this.decorations = this.highlight(t.state.field(Iu));
  }
  update(t) {
    let e = t.state.field(Iu);
    (e != t.startState.field(Iu) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
  }
  highlight({ query: t, panel: e }) {
    if (!e || !t.spec.valid)
      return it.none;
    let { view: n } = this, i = new Zu();
    for (let r = 0, s = n.visibleRanges, o = s.length; r < o; r++) {
      let { from: a, to: l } = s[r];
      for (; r < o - 1 && l > s[r + 1].from - 2 * 250; )
        l = s[++r].to;
      t.highlight(n.state, a, l, (u, f) => {
        let d = n.state.selection.ranges.some((h) => h.from == u && h.to == f);
        i.add(u, f, d ? VSe : YSe);
      });
    }
    return i.finish();
  }
}, {
  decorations: (t) => t.decorations
});
function H1(t) {
  return (e) => {
    let n = e.state.field(Iu, !1);
    return n && n.query.spec.valid ? t(e, n) : TU(e);
  };
}
const jw = /* @__PURE__ */ H1((t, { query: e }) => {
  let { to: n } = t.state.selection.main, i = e.nextMatch(t.state, n, n);
  if (!i)
    return !1;
  let r = he.single(i.from, i.to), s = t.state.facet(pp);
  return t.dispatch({
    selection: r,
    effects: [FE(t, i), s.scrollToMatch(r.main, t)],
    userEvent: "select.search"
  }), EU(t), !0;
}), Fw = /* @__PURE__ */ H1((t, { query: e }) => {
  let { state: n } = t, { from: i } = n.selection.main, r = e.prevMatch(n, i, i);
  if (!r)
    return !1;
  let s = he.single(r.from, r.to), o = t.state.facet(pp);
  return t.dispatch({
    selection: s,
    effects: [FE(t, r), o.scrollToMatch(s.main, t)],
    userEvent: "select.search"
  }), EU(t), !0;
}), GSe = /* @__PURE__ */ H1((t, { query: e }) => {
  let n = e.matchAll(t.state, 1e3);
  return !n || !n.length ? !1 : (t.dispatch({
    selection: he.create(n.map((i) => he.range(i.from, i.to))),
    userEvent: "select.search.matches"
  }), !0);
}), KSe = ({ state: t, dispatch: e }) => {
  let n = t.selection;
  if (n.ranges.length > 1 || n.main.empty)
    return !1;
  let { from: i, to: r } = n.main, s = [], o = 0;
  for (let a = new Dh(t.doc, t.sliceDoc(i, r)); !a.next().done; ) {
    if (s.length > 1e3)
      return !1;
    a.value.from == i && (o = s.length), s.push(he.range(a.value.from, a.value.to));
  }
  return e(t.update({
    selection: he.create(s, o),
    userEvent: "select.search.matches"
  })), !0;
}, _D = /* @__PURE__ */ H1((t, { query: e }) => {
  let { state: n } = t, { from: i, to: r } = n.selection.main;
  if (n.readOnly)
    return !1;
  let s = e.nextMatch(n, i, i);
  if (!s)
    return !1;
  let o = [], a, l, u = [];
  if (s.from == i && s.to == r && (l = n.toText(e.getReplacement(s)), o.push({ from: s.from, to: s.to, insert: l }), s = e.nextMatch(n, s.from, s.to), u.push(Te.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(i).number) + "."))), s) {
    let f = o.length == 0 || o[0].from >= s.to ? 0 : s.to - s.from - l.length;
    a = he.single(s.from - f, s.to - f), u.push(FE(t, s)), u.push(n.facet(pp).scrollToMatch(a.main, t));
  }
  return t.dispatch({
    changes: o,
    selection: a,
    effects: u,
    userEvent: "input.replace"
  }), !0;
}), JSe = /* @__PURE__ */ H1((t, { query: e }) => {
  if (t.state.readOnly)
    return !1;
  let n = e.matchAll(t.state, 1e9).map((r) => {
    let { from: s, to: o } = r;
    return { from: s, to: o, insert: e.getReplacement(r) };
  });
  if (!n.length)
    return !1;
  let i = t.state.phrase("replaced $ matches", n.length) + ".";
  return t.dispatch({
    changes: n,
    effects: Te.announce.of(i),
    userEvent: "input.replace.all"
  }), !0;
});
function jE(t) {
  return t.state.facet(pp).createPanel(t);
}
function CC(t, e) {
  var n, i, r, s, o;
  let a = t.selection.main, l = a.empty || a.to > a.from + 100 ? "" : t.sliceDoc(a.from, a.to);
  if (e && !l)
    return e;
  let u = t.facet(pp);
  return new OU({
    search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : u.literal) ? l : l.replace(/\n/g, "\\n"),
    caseSensitive: (i = e == null ? void 0 : e.caseSensitive) !== null && i !== void 0 ? i : u.caseSensitive,
    literal: (r = e == null ? void 0 : e.literal) !== null && r !== void 0 ? r : u.literal,
    regexp: (s = e == null ? void 0 : e.regexp) !== null && s !== void 0 ? s : u.regexp,
    wholeWord: (o = e == null ? void 0 : e.wholeWord) !== null && o !== void 0 ? o : u.wholeWord
  });
}
function CU(t) {
  let e = d0(t, jE);
  return e && e.dom.querySelector("[main-field]");
}
function EU(t) {
  let e = CU(t);
  e && e == t.root.activeElement && e.select();
}
const TU = (t) => {
  let e = t.state.field(Iu, !1);
  if (e && e.panel) {
    let n = CU(t);
    if (n && n != t.root.activeElement) {
      let i = CC(t.state, e.query.spec);
      i.valid && t.dispatch({ effects: b0.of(i) }), n.focus(), n.select();
    }
  } else
    t.dispatch({ effects: [
      RE.of(!0),
      e ? b0.of(CC(t.state, e.query.spec)) : Ot.appendConfig.of(i4e)
    ] });
  return !0;
}, $U = (t) => {
  let e = t.state.field(Iu, !1);
  if (!e || !e.panel)
    return !1;
  let n = d0(t, jE);
  return n && n.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: RE.of(!1) }), !0;
}, e4e = [
  { key: "Mod-f", run: TU, scope: "editor search-panel" },
  { key: "F3", run: jw, shift: Fw, scope: "editor search-panel", preventDefault: !0 },
  { key: "Mod-g", run: jw, shift: Fw, scope: "editor search-panel", preventDefault: !0 },
  { key: "Escape", run: $U, scope: "editor search-panel" },
  { key: "Mod-Shift-l", run: KSe },
  { key: "Mod-Alt-g", run: NSe },
  { key: "Mod-d", run: HSe, preventDefault: !0 }
];
class t4e {
  constructor(e) {
    this.view = e;
    let n = this.query = e.state.field(Iu).query.spec;
    this.commit = this.commit.bind(this), this.searchField = cn("input", {
      value: n.search,
      placeholder: Ts(e, "Find"),
      "aria-label": Ts(e, "Find"),
      class: "cm-textfield",
      name: "search",
      form: "",
      "main-field": "true",
      onchange: this.commit,
      onkeyup: this.commit
    }), this.replaceField = cn("input", {
      value: n.replace,
      placeholder: Ts(e, "Replace"),
      "aria-label": Ts(e, "Replace"),
      class: "cm-textfield",
      name: "replace",
      form: "",
      onchange: this.commit,
      onkeyup: this.commit
    }), this.caseField = cn("input", {
      type: "checkbox",
      name: "case",
      form: "",
      checked: n.caseSensitive,
      onchange: this.commit
    }), this.reField = cn("input", {
      type: "checkbox",
      name: "re",
      form: "",
      checked: n.regexp,
      onchange: this.commit
    }), this.wordField = cn("input", {
      type: "checkbox",
      name: "word",
      form: "",
      checked: n.wholeWord,
      onchange: this.commit
    });
    function i(r, s, o) {
      return cn("button", { class: "cm-button", name: r, onclick: s, type: "button" }, o);
    }
    this.dom = cn("div", { onkeydown: (r) => this.keydown(r), class: "cm-search" }, [
      this.searchField,
      i("next", () => jw(e), [Ts(e, "next")]),
      i("prev", () => Fw(e), [Ts(e, "previous")]),
      i("select", () => GSe(e), [Ts(e, "all")]),
      cn("label", null, [this.caseField, Ts(e, "match case")]),
      cn("label", null, [this.reField, Ts(e, "regexp")]),
      cn("label", null, [this.wordField, Ts(e, "by word")]),
      ...e.state.readOnly ? [] : [
        cn("br"),
        this.replaceField,
        i("replace", () => _D(e), [Ts(e, "replace")]),
        i("replaceAll", () => JSe(e), [Ts(e, "replace all")])
      ],
      cn("button", {
        name: "close",
        onclick: () => $U(e),
        "aria-label": Ts(e, "close"),
        type: "button"
      }, ["×"])
    ]);
  }
  commit() {
    let e = new OU({
      search: this.searchField.value,
      caseSensitive: this.caseField.checked,
      regexp: this.reField.checked,
      wholeWord: this.wordField.checked,
      replace: this.replaceField.value
    });
    e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: b0.of(e) }));
  }
  keydown(e) {
    g_e(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Fw : jw)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), _D(this.view));
  }
  update(e) {
    for (let n of e.transactions)
      for (let i of n.effects)
        i.is(b0) && !i.value.eq(this.query) && this.setQuery(i.value);
  }
  setQuery(e) {
    this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
  }
  mount() {
    this.searchField.select();
  }
  get pos() {
    return 80;
  }
  get top() {
    return this.view.state.facet(pp).top;
  }
}
function Ts(t, e) {
  return t.state.phrase(e);
}
const Eb = 30, Tb = /[\s\.,:;?!]/;
function FE(t, { from: e, to: n }) {
  let i = t.state.doc.lineAt(e), r = t.state.doc.lineAt(n).to, s = Math.max(i.from, e - Eb), o = Math.min(r, n + Eb), a = t.state.sliceDoc(s, o);
  if (s != i.from) {
    for (let l = 0; l < Eb; l++)
      if (!Tb.test(a[l + 1]) && Tb.test(a[l])) {
        a = a.slice(l);
        break;
      }
  }
  if (o != r) {
    for (let l = a.length - 1; l > a.length - Eb; l--)
      if (!Tb.test(a[l - 1]) && Tb.test(a[l])) {
        a = a.slice(0, l);
        break;
      }
  }
  return Te.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`);
}
const n4e = /* @__PURE__ */ Te.baseTheme({
  ".cm-panel.cm-search": {
    padding: "2px 6px 4px",
    position: "relative",
    "& [name=close]": {
      position: "absolute",
      top: "0",
      right: "4px",
      backgroundColor: "inherit",
      border: "none",
      font: "inherit",
      padding: 0,
      margin: 0
    },
    "& input, & button, & label": {
      margin: ".2em .6em .2em 0"
    },
    "& input[type=checkbox]": {
      marginRight: ".2em"
    },
    "& label": {
      fontSize: "80%",
      whiteSpace: "pre"
    }
  },
  "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
  "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
  "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
  "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
}), i4e = [
  Iu,
  /* @__PURE__ */ jf.low(XSe),
  n4e
];
class MU {
  /**
  Create a new completion context. (Mostly useful for testing
  completion sources—in the editor, the extension will create
  these for you.)
  */
  constructor(e, n, i) {
    this.state = e, this.pos = n, this.explicit = i, this.abortListeners = [];
  }
  /**
  Get the extent, content, and (if there is a token) type of the
  token before `this.pos`.
  */
  tokenBefore(e) {
    let n = ri(this.state).resolveInner(this.pos, -1);
    for (; n && e.indexOf(n.name) < 0; )
      n = n.parent;
    return n ? {
      from: n.from,
      to: this.pos,
      text: this.state.sliceDoc(n.from, this.pos),
      type: n.type
    } : null;
  }
  /**
  Get the match of the given expression directly before the
  cursor.
  */
  matchBefore(e) {
    let n = this.state.doc.lineAt(this.pos), i = Math.max(n.from, this.pos - 250), r = n.text.slice(i - n.from, this.pos - n.from), s = r.search(AU(e, !1));
    return s < 0 ? null : { from: i + s, to: this.pos, text: r.slice(s) };
  }
  /**
  Yields true when the query has been aborted. Can be useful in
  asynchronous queries to avoid doing work that will be ignored.
  */
  get aborted() {
    return this.abortListeners == null;
  }
  /**
  Allows you to register abort handlers, which will be called when
  the query is
  [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
  */
  addEventListener(e, n) {
    e == "abort" && this.abortListeners && this.abortListeners.push(n);
  }
}
function OD(t) {
  let e = Object.keys(t).join(""), n = /\w/.test(e);
  return n && (e = e.replace(/\w/g, "")), `[${n ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`;
}
function r4e(t) {
  let e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
  for (let { label: r } of t) {
    e[r[0]] = !0;
    for (let s = 1; s < r.length; s++)
      n[r[s]] = !0;
  }
  let i = OD(e) + OD(n) + "*$";
  return [new RegExp("^" + i), new RegExp(i)];
}
function NU(t) {
  let e = t.map((r) => typeof r == "string" ? { label: r } : r), [n, i] = e.every((r) => /^\w+$/.test(r.label)) ? [/\w*$/, /\w+$/] : r4e(e);
  return (r) => {
    let s = r.matchBefore(i);
    return s || r.explicit ? { from: s ? s.from : r.pos, options: e, validFor: n } : null;
  };
}
function s4e(t, e) {
  return (n) => {
    for (let i = ri(n.state).resolveInner(n.pos, -1); i; i = i.parent) {
      if (t.indexOf(i.name) > -1)
        return null;
      if (i.type.isTop)
        break;
    }
    return e(n);
  };
}
class SD {
  constructor(e, n, i, r) {
    this.completion = e, this.source = n, this.match = i, this.score = r;
  }
}
function Lu(t) {
  return t.selection.main.from;
}
function AU(t, e) {
  var n;
  let { source: i } = t, r = e && i[0] != "^", s = i[i.length - 1] != "$";
  return !r && !s ? t : new RegExp(`${r ? "^" : ""}(?:${i})${s ? "$" : ""}`, (n = t.flags) !== null && n !== void 0 ? n : t.ignoreCase ? "i" : "");
}
const DU = /* @__PURE__ */ za.define();
function o4e(t, e, n, i) {
  let { main: r } = t.selection, s = n - r.from, o = i - r.from;
  return Object.assign(Object.assign({}, t.changeByRange((a) => a != r && n != i && t.sliceDoc(a.from + s, a.from + o) != t.sliceDoc(n, i) ? { range: a } : {
    changes: { from: a.from + s, to: i == r.from ? a.to : a.from + o, insert: e },
    range: he.cursor(a.from + s + e.length)
  })), { scrollIntoView: !0, userEvent: "input.complete" });
}
const CD = /* @__PURE__ */ new WeakMap();
function a4e(t) {
  if (!Array.isArray(t))
    return t;
  let e = CD.get(t);
  return e || CD.set(t, e = NU(t)), e;
}
const Bw = /* @__PURE__ */ Ot.define(), y0 = /* @__PURE__ */ Ot.define();
class l4e {
  constructor(e) {
    this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
    for (let n = 0; n < e.length; ) {
      let i = ar(e, n), r = io(i);
      this.chars.push(i);
      let s = e.slice(n, n + r), o = s.toUpperCase();
      this.folded.push(ar(o == s ? s.toLowerCase() : o, 0)), n += r;
    }
    this.astral = e.length != this.chars.length;
  }
  ret(e, n) {
    return this.score = e, this.matched = n, !0;
  }
  // Matches a given word (completion) against the pattern (input).
  // Will return a boolean indicating whether there was a match and,
  // on success, set `this.score` to the score, `this.matched` to an
  // array of `from, to` pairs indicating the matched parts of `word`.
  //
  // The score is a number that is more negative the worse the match
  // is. See `Penalty` above.
  match(e) {
    if (this.pattern.length == 0)
      return this.ret(-100, []);
    if (e.length < this.pattern.length)
      return !1;
    let { chars: n, folded: i, any: r, precise: s, byWord: o } = this;
    if (n.length == 1) {
      let S = ar(e, 0), C = io(S), E = C == e.length ? 0 : -100;
      if (S != n[0]) if (S == i[0])
        E += -200;
      else
        return !1;
      return this.ret(E, [0, C]);
    }
    let a = e.indexOf(this.pattern);
    if (a == 0)
      return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
    let l = n.length, u = 0;
    if (a < 0) {
      for (let S = 0, C = Math.min(e.length, 200); S < C && u < l; ) {
        let E = ar(e, S);
        (E == n[u] || E == i[u]) && (r[u++] = S), S += io(E);
      }
      if (u < l)
        return !1;
    }
    let f = 0, d = 0, h = !1, m = 0, g = -1, w = -1, x = /[a-z]/.test(e), _ = !0;
    for (let S = 0, C = Math.min(e.length, 200), E = 0; S < C && d < l; ) {
      let M = ar(e, S);
      a < 0 && (f < l && M == n[f] && (s[f++] = S), m < l && (M == n[m] || M == i[m] ? (m == 0 && (g = S), w = S + 1, m++) : m = 0));
      let $, P = M < 255 ? M >= 48 && M <= 57 || M >= 97 && M <= 122 ? 2 : M >= 65 && M <= 90 ? 1 : 0 : ($ = fE(M)) != $.toLowerCase() ? 1 : $ != $.toUpperCase() ? 2 : 0;
      (!S || P == 1 && x || E == 0 && P != 0) && (n[d] == M || i[d] == M && (h = !0) ? o[d++] = S : o.length && (_ = !1)), E = P, S += io(M);
    }
    return d == l && o[0] == 0 && _ ? this.result(-100 + (h ? -200 : 0), o, e) : m == l && g == 0 ? this.ret(-200 - e.length + (w == e.length ? 0 : -100), [0, w]) : a > -1 ? this.ret(-700 - e.length, [a, a + this.pattern.length]) : m == l ? this.ret(-900 - e.length, [g, w]) : d == l ? this.result(-100 + (h ? -200 : 0) + -700 + (_ ? 0 : -1100), o, e) : n.length == 2 ? !1 : this.result((r[0] ? -700 : 0) + -200 + -1100, r, e);
  }
  result(e, n, i) {
    let r = [], s = 0;
    for (let o of n) {
      let a = o + (this.astral ? io(ar(i, o)) : 1);
      s && r[s - 1] == o ? r[s - 1] = a : (r[s++] = o, r[s++] = a);
    }
    return this.ret(e - i.length, r);
  }
}
const cr = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Wa(t, {
      activateOnTyping: !0,
      activateOnTypingDelay: 100,
      selectOnOpen: !0,
      override: null,
      closeOnBlur: !0,
      maxRenderedOptions: 100,
      defaultKeymap: !0,
      tooltipClass: () => "",
      optionClass: () => "",
      aboveCursor: !1,
      icons: !0,
      addToOptions: [],
      positionInfo: u4e,
      compareCompletions: (e, n) => e.label.localeCompare(n.label),
      interactionDelay: 75,
      updateSyncTime: 100
    }, {
      defaultKeymap: (e, n) => e && n,
      closeOnBlur: (e, n) => e && n,
      icons: (e, n) => e && n,
      tooltipClass: (e, n) => (i) => ED(e(i), n(i)),
      optionClass: (e, n) => (i) => ED(e(i), n(i)),
      addToOptions: (e, n) => e.concat(n)
    });
  }
});
function ED(t, e) {
  return t ? e ? t + " " + e : t : e;
}
function u4e(t, e, n, i, r, s) {
  let o = t.textDirection == Tn.RTL, a = o, l = !1, u = "top", f, d, h = e.left - r.left, m = r.right - e.right, g = i.right - i.left, w = i.bottom - i.top;
  if (a && h < Math.min(g, m) ? a = !1 : !a && m < Math.min(g, h) && (a = !0), g <= (a ? h : m))
    f = Math.max(r.top, Math.min(n.top, r.bottom - w)) - e.top, d = Math.min(400, a ? h : m);
  else {
    l = !0, d = Math.min(
      400,
      (o ? e.right : r.right - e.left) - 30
      /* Info.Margin */
    );
    let S = r.bottom - e.bottom;
    S >= w || S > e.top ? f = n.bottom - e.top : (u = "bottom", f = e.bottom - n.top);
  }
  let x = (e.bottom - e.top) / s.offsetHeight, _ = (e.right - e.left) / s.offsetWidth;
  return {
    style: `${u}: ${f / x}px; max-width: ${d / _}px`,
    class: "cm-completionInfo-" + (l ? o ? "left-narrow" : "right-narrow" : a ? "left" : "right")
  };
}
function c4e(t) {
  let e = t.addToOptions.slice();
  return t.icons && e.push({
    render(n) {
      let i = document.createElement("div");
      return i.classList.add("cm-completionIcon"), n.type && i.classList.add(...n.type.split(/\s+/g).map((r) => "cm-completionIcon-" + r)), i.setAttribute("aria-hidden", "true"), i;
    },
    position: 20
  }), e.push({
    render(n, i, r, s) {
      let o = document.createElement("span");
      o.className = "cm-completionLabel";
      let a = n.displayLabel || n.label, l = 0;
      for (let u = 0; u < s.length; ) {
        let f = s[u++], d = s[u++];
        f > l && o.appendChild(document.createTextNode(a.slice(l, f)));
        let h = o.appendChild(document.createElement("span"));
        h.appendChild(document.createTextNode(a.slice(f, d))), h.className = "cm-completionMatchedText", l = d;
      }
      return l < a.length && o.appendChild(document.createTextNode(a.slice(l))), o;
    },
    position: 50
  }, {
    render(n) {
      if (!n.detail)
        return null;
      let i = document.createElement("span");
      return i.className = "cm-completionDetail", i.textContent = n.detail, i;
    },
    position: 80
  }), e.sort((n, i) => n.position - i.position).map((n) => n.render);
}
function hO(t, e, n) {
  if (t <= n)
    return { from: 0, to: t };
  if (e < 0 && (e = 0), e <= t >> 1) {
    let r = Math.floor(e / n);
    return { from: r * n, to: (r + 1) * n };
  }
  let i = Math.floor((t - e) / n);
  return { from: t - (i + 1) * n, to: t - i * n };
}
class f4e {
  constructor(e, n, i) {
    this.view = e, this.stateField = n, this.applyCompletion = i, this.info = null, this.infoDestroy = null, this.placeInfoReq = {
      read: () => this.measureInfo(),
      write: (l) => this.placeInfo(l),
      key: this
    }, this.space = null, this.currentClass = "";
    let r = e.state.field(n), { options: s, selected: o } = r.open, a = e.state.facet(cr);
    this.optionContent = c4e(a), this.optionClass = a.optionClass, this.tooltipClass = a.tooltipClass, this.range = hO(s.length, o, a.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => {
      let { options: u } = e.state.field(n).open;
      for (let f = l.target, d; f && f != this.dom; f = f.parentNode)
        if (f.nodeName == "LI" && (d = /-(\d+)$/.exec(f.id)) && +d[1] < u.length) {
          this.applyCompletion(e, u[+d[1]]), l.preventDefault();
          return;
        }
    }), this.dom.addEventListener("focusout", (l) => {
      let u = e.state.field(this.stateField, !1);
      u && u.tooltip && e.state.facet(cr).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: y0.of(null) });
    }), this.showOptions(s, r.id);
  }
  mount() {
    this.updateSel();
  }
  showOptions(e, n) {
    this.list && this.list.remove(), this.list = this.dom.appendChild(this.createListBox(e, n, this.range)), this.list.addEventListener("scroll", () => {
      this.info && this.view.requestMeasure(this.placeInfoReq);
    });
  }
  update(e) {
    var n;
    let i = e.state.field(this.stateField), r = e.startState.field(this.stateField);
    if (this.updateTooltipClass(e.state), i != r) {
      let { options: s, selected: o, disabled: a } = i.open;
      (!r.open || r.open.options != s) && (this.range = hO(s.length, o, e.state.facet(cr).maxRenderedOptions), this.showOptions(s, i.id)), this.updateSel(), a != ((n = r.open) === null || n === void 0 ? void 0 : n.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!a);
    }
  }
  updateTooltipClass(e) {
    let n = this.tooltipClass(e);
    if (n != this.currentClass) {
      for (let i of this.currentClass.split(" "))
        i && this.dom.classList.remove(i);
      for (let i of n.split(" "))
        i && this.dom.classList.add(i);
      this.currentClass = n;
    }
  }
  positioned(e) {
    this.space = e, this.info && this.view.requestMeasure(this.placeInfoReq);
  }
  updateSel() {
    let e = this.view.state.field(this.stateField), n = e.open;
    if ((n.selected > -1 && n.selected < this.range.from || n.selected >= this.range.to) && (this.range = hO(n.options.length, n.selected, this.view.state.facet(cr).maxRenderedOptions), this.showOptions(n.options, e.id)), this.updateSelectedOption(n.selected)) {
      this.destroyInfo();
      let { completion: i } = n.options[n.selected], { info: r } = i;
      if (!r)
        return;
      let s = typeof r == "string" ? document.createTextNode(r) : r(i);
      if (!s)
        return;
      "then" in s ? s.then((o) => {
        o && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(o, i);
      }).catch((o) => co(this.view.state, o, "completion info")) : this.addInfoPane(s, i);
    }
  }
  addInfoPane(e, n) {
    this.destroyInfo();
    let i = this.info = document.createElement("div");
    if (i.className = "cm-tooltip cm-completionInfo", e.nodeType != null)
      i.appendChild(e), this.infoDestroy = null;
    else {
      let { dom: r, destroy: s } = e;
      i.appendChild(r), this.infoDestroy = s || null;
    }
    this.dom.appendChild(i), this.view.requestMeasure(this.placeInfoReq);
  }
  updateSelectedOption(e) {
    let n = null;
    for (let i = this.list.firstChild, r = this.range.from; i; i = i.nextSibling, r++)
      i.nodeName != "LI" || !i.id ? r-- : r == e ? i.hasAttribute("aria-selected") || (i.setAttribute("aria-selected", "true"), n = i) : i.hasAttribute("aria-selected") && i.removeAttribute("aria-selected");
    return n && h4e(this.list, n), n;
  }
  measureInfo() {
    let e = this.dom.querySelector("[aria-selected]");
    if (!e || !this.info)
      return null;
    let n = this.dom.getBoundingClientRect(), i = this.info.getBoundingClientRect(), r = e.getBoundingClientRect(), s = this.space;
    if (!s) {
      let o = this.dom.ownerDocument.defaultView || window;
      s = { left: 0, top: 0, right: o.innerWidth, bottom: o.innerHeight };
    }
    return r.top > Math.min(s.bottom, n.bottom) - 10 || r.bottom < Math.max(s.top, n.top) + 10 ? null : this.view.state.facet(cr).positionInfo(this.view, n, r, i, s, this.dom);
  }
  placeInfo(e) {
    this.info && (e ? (e.style && (this.info.style.cssText = e.style), this.info.className = "cm-tooltip cm-completionInfo " + (e.class || "")) : this.info.style.cssText = "top: -1e6px");
  }
  createListBox(e, n, i) {
    const r = document.createElement("ul");
    r.id = n, r.setAttribute("role", "listbox"), r.setAttribute("aria-expanded", "true"), r.setAttribute("aria-label", this.view.state.phrase("Completions"));
    let s = null;
    for (let o = i.from; o < i.to; o++) {
      let { completion: a, match: l } = e[o], { section: u } = a;
      if (u) {
        let h = typeof u == "string" ? u : u.name;
        if (h != s && (o > i.from || i.from == 0))
          if (s = h, typeof u != "string" && u.header)
            r.appendChild(u.header(u));
          else {
            let m = r.appendChild(document.createElement("completion-section"));
            m.textContent = h;
          }
      }
      const f = r.appendChild(document.createElement("li"));
      f.id = n + "-" + o, f.setAttribute("role", "option");
      let d = this.optionClass(a);
      d && (f.className = d);
      for (let h of this.optionContent) {
        let m = h(a, this.view.state, this.view, l);
        m && f.appendChild(m);
      }
    }
    return i.from && r.classList.add("cm-completionListIncompleteTop"), i.to < e.length && r.classList.add("cm-completionListIncompleteBottom"), r;
  }
  destroyInfo() {
    this.info && (this.infoDestroy && this.infoDestroy(), this.info.remove(), this.info = null);
  }
  destroy() {
    this.destroyInfo();
  }
}
function d4e(t, e) {
  return (n) => new f4e(n, t, e);
}
function h4e(t, e) {
  let n = t.getBoundingClientRect(), i = e.getBoundingClientRect(), r = n.height / t.offsetHeight;
  i.top < n.top ? t.scrollTop -= (n.top - i.top) / r : i.bottom > n.bottom && (t.scrollTop += (i.bottom - n.bottom) / r);
}
function TD(t) {
  return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0);
}
function p4e(t, e) {
  let n = [], i = null, r = (l) => {
    n.push(l);
    let { section: u } = l.completion;
    if (u) {
      i || (i = []);
      let f = typeof u == "string" ? u : u.name;
      i.some((d) => d.name == f) || i.push(typeof u == "string" ? { name: f } : u);
    }
  };
  for (let l of t)
    if (l.hasResult()) {
      let u = l.result.getMatch;
      if (l.result.filter === !1)
        for (let f of l.result.options)
          r(new SD(f, l.source, u ? u(f) : [], 1e9 - n.length));
      else {
        let f = new l4e(e.sliceDoc(l.from, l.to));
        for (let d of l.result.options)
          if (f.match(d.label)) {
            let h = d.displayLabel ? u ? u(d, f.matched) : [] : f.matched;
            r(new SD(d, l.source, h, f.score + (d.boost || 0)));
          }
      }
    }
  if (i) {
    let l = /* @__PURE__ */ Object.create(null), u = 0, f = (d, h) => {
      var m, g;
      return ((m = d.rank) !== null && m !== void 0 ? m : 1e9) - ((g = h.rank) !== null && g !== void 0 ? g : 1e9) || (d.name < h.name ? -1 : 1);
    };
    for (let d of i.sort(f))
      u -= 1e5, l[d.name] = u;
    for (let d of n) {
      let { section: h } = d.completion;
      h && (d.score += l[typeof h == "string" ? h : h.name]);
    }
  }
  let s = [], o = null, a = e.facet(cr).compareCompletions;
  for (let l of n.sort((u, f) => f.score - u.score || a(u.completion, f.completion))) {
    let u = l.completion;
    !o || o.label != u.label || o.detail != u.detail || o.type != null && u.type != null && o.type != u.type || o.apply != u.apply || o.boost != u.boost ? s.push(l) : TD(l.completion) > TD(o) && (s[s.length - 1] = l), o = l.completion;
  }
  return s;
}
class ih {
  constructor(e, n, i, r, s, o) {
    this.options = e, this.attrs = n, this.tooltip = i, this.timestamp = r, this.selected = s, this.disabled = o;
  }
  setSelected(e, n) {
    return e == this.selected || e >= this.options.length ? this : new ih(this.options, $D(n, e), this.tooltip, this.timestamp, e, this.disabled);
  }
  static build(e, n, i, r, s) {
    let o = p4e(e, n);
    if (!o.length)
      return r && e.some(
        (l) => l.state == 1
        /* State.Pending */
      ) ? new ih(r.options, r.attrs, r.tooltip, r.timestamp, r.selected, !0) : null;
    let a = n.facet(cr).selectOnOpen ? 0 : -1;
    if (r && r.selected != a && r.selected != -1) {
      let l = r.options[r.selected].completion;
      for (let u = 0; u < o.length; u++)
        if (o[u].completion == l) {
          a = u;
          break;
        }
    }
    return new ih(o, $D(i, a), {
      pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8),
      create: y4e,
      above: s.aboveCursor
    }, r ? r.timestamp : Date.now(), a, !1);
  }
  map(e) {
    return new ih(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
  }
}
class zw {
  constructor(e, n, i) {
    this.active = e, this.id = n, this.open = i;
  }
  static start() {
    return new zw(v4e, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
  }
  update(e) {
    let { state: n } = e, i = n.facet(cr), s = (i.override || n.languageDataAt("autocomplete", Lu(n)).map(a4e)).map((a) => (this.active.find((u) => u.source == a) || new vs(
      a,
      this.active.some(
        (u) => u.state != 0
        /* State.Inactive */
      ) ? 1 : 0
      /* State.Inactive */
    )).update(e, i));
    s.length == this.active.length && s.every((a, l) => a == this.active[l]) && (s = this.active);
    let o = this.open;
    o && e.docChanged && (o = o.map(e.changes)), e.selection || s.some((a) => a.hasResult() && e.changes.touchesRange(a.from, a.to)) || !m4e(s, this.active) ? o = ih.build(s, n, this.id, o, i) : o && o.disabled && !s.some(
      (a) => a.state == 1
      /* State.Pending */
    ) && (o = null), !o && s.every(
      (a) => a.state != 1
      /* State.Pending */
    ) && s.some((a) => a.hasResult()) && (s = s.map((a) => a.hasResult() ? new vs(
      a.source,
      0
      /* State.Inactive */
    ) : a));
    for (let a of e.effects)
      a.is(IU) && (o = o && o.setSelected(a.value, this.id));
    return s == this.active && o == this.open ? this : new zw(s, this.id, o);
  }
  get tooltip() {
    return this.open ? this.open.tooltip : null;
  }
  get attrs() {
    return this.open ? this.open.attrs : g4e;
  }
}
function m4e(t, e) {
  if (t == e)
    return !0;
  for (let n = 0, i = 0; ; ) {
    for (; n < t.length && !t[n].hasResult; )
      n++;
    for (; i < e.length && !e[i].hasResult; )
      i++;
    let r = n == t.length, s = i == e.length;
    if (r || s)
      return r == s;
    if (t[n++].result != e[i++].result)
      return !1;
  }
}
const g4e = {
  "aria-autocomplete": "list"
};
function $D(t, e) {
  let n = {
    "aria-autocomplete": "list",
    "aria-haspopup": "listbox",
    "aria-controls": t
  };
  return e > -1 && (n["aria-activedescendant"] = t + "-" + e), n;
}
const v4e = [];
function EC(t) {
  return t.isUserEvent("input.type") ? "input" : t.isUserEvent("delete.backward") ? "delete" : null;
}
class vs {
  constructor(e, n, i = -1) {
    this.source = e, this.state = n, this.explicitPos = i;
  }
  hasResult() {
    return !1;
  }
  update(e, n) {
    let i = EC(e), r = this;
    i ? r = r.handleUserEvent(e, i, n) : e.docChanged ? r = r.handleChange(e) : e.selection && r.state != 0 && (r = new vs(
      r.source,
      0
      /* State.Inactive */
    ));
    for (let s of e.effects)
      if (s.is(Bw))
        r = new vs(r.source, 1, s.value ? Lu(e.state) : -1);
      else if (s.is(y0))
        r = new vs(
          r.source,
          0
          /* State.Inactive */
        );
      else if (s.is(PU))
        for (let o of s.value)
          o.source == r.source && (r = o);
    return r;
  }
  handleUserEvent(e, n, i) {
    return n == "delete" || !i.activateOnTyping ? this.map(e.changes) : new vs(
      this.source,
      1
      /* State.Pending */
    );
  }
  handleChange(e) {
    return e.changes.touchesRange(Lu(e.startState)) ? new vs(
      this.source,
      0
      /* State.Inactive */
    ) : this.map(e.changes);
  }
  map(e) {
    return e.empty || this.explicitPos < 0 ? this : new vs(this.source, this.state, e.mapPos(this.explicitPos));
  }
}
class vh extends vs {
  constructor(e, n, i, r, s) {
    super(e, 2, n), this.result = i, this.from = r, this.to = s;
  }
  hasResult() {
    return !0;
  }
  handleUserEvent(e, n, i) {
    var r;
    let s = e.changes.mapPos(this.from), o = e.changes.mapPos(this.to, 1), a = Lu(e.state);
    if ((this.explicitPos < 0 ? a <= s : a < this.from) || a > o || n == "delete" && Lu(e.startState) == this.from)
      return new vs(
        this.source,
        n == "input" && i.activateOnTyping ? 1 : 0
        /* State.Inactive */
      );
    let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos), u;
    return b4e(this.result.validFor, e.state, s, o) ? new vh(this.source, l, this.result, s, o) : this.result.update && (u = this.result.update(this.result, s, o, new MU(e.state, a, l >= 0))) ? new vh(this.source, l, u, u.from, (r = u.to) !== null && r !== void 0 ? r : Lu(e.state)) : new vs(this.source, 1, l);
  }
  handleChange(e) {
    return e.changes.touchesRange(this.from, this.to) ? new vs(
      this.source,
      0
      /* State.Inactive */
    ) : this.map(e.changes);
  }
  map(e) {
    return e.empty ? this : new vh(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1));
  }
}
function b4e(t, e, n, i) {
  if (!t)
    return !1;
  let r = e.sliceDoc(n, i);
  return typeof t == "function" ? t(r, n, i, e) : AU(t, !0).test(r);
}
const PU = /* @__PURE__ */ Ot.define({
  map(t, e) {
    return t.map((n) => n.map(e));
  }
}), IU = /* @__PURE__ */ Ot.define(), js = /* @__PURE__ */ Ki.define({
  create() {
    return zw.start();
  },
  update(t, e) {
    return t.update(e);
  },
  provide: (t) => [
    xE.from(t, (e) => e.tooltip),
    Te.contentAttributes.from(t, (e) => e.attrs)
  ]
});
function LU(t, e) {
  const n = e.completion.apply || e.completion.label;
  let i = t.state.field(js).active.find((r) => r.source == e.source);
  return i instanceof vh ? (typeof n == "string" ? t.dispatch(Object.assign(Object.assign({}, o4e(t.state, n, i.from, i.to)), { annotations: DU.of(e.completion) })) : n(t, e.completion, i.from, i.to), !0) : !1;
}
const y4e = /* @__PURE__ */ d4e(js, LU);
function $b(t, e = "option") {
  return (n) => {
    let i = n.state.field(js, !1);
    if (!i || !i.open || i.open.disabled || Date.now() - i.open.timestamp < n.state.facet(cr).interactionDelay)
      return !1;
    let r = 1, s;
    e == "page" && (s = cQ(n, i.open.tooltip)) && (r = Math.max(2, Math.floor(s.dom.offsetHeight / s.dom.querySelector("li").offsetHeight) - 1));
    let { length: o } = i.open.options, a = i.open.selected > -1 ? i.open.selected + r * (t ? 1 : -1) : t ? 0 : o - 1;
    return a < 0 ? a = e == "page" ? 0 : o - 1 : a >= o && (a = e == "page" ? o - 1 : 0), n.dispatch({ effects: IU.of(a) }), !0;
  };
}
const w4e = (t) => {
  let e = t.state.field(js, !1);
  return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(cr).interactionDelay ? !1 : LU(t, e.open.options[e.open.selected]);
}, k4e = (t) => t.state.field(js, !1) ? (t.dispatch({ effects: Bw.of(!0) }), !0) : !1, x4e = (t) => {
  let e = t.state.field(js, !1);
  return !e || !e.active.some(
    (n) => n.state != 0
    /* State.Inactive */
  ) ? !1 : (t.dispatch({ effects: y0.of(null) }), !0);
};
class _4e {
  constructor(e, n) {
    this.active = e, this.context = n, this.time = Date.now(), this.updates = [], this.done = void 0;
  }
}
const O4e = 50, S4e = 1e3, C4e = /* @__PURE__ */ gi.fromClass(class {
  constructor(t) {
    this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
    for (let e of t.state.field(js).active)
      e.state == 1 && this.startQuery(e);
  }
  update(t) {
    let e = t.state.field(js);
    if (!t.selectionSet && !t.docChanged && t.startState.field(js) == e)
      return;
    let n = t.transactions.some((r) => (r.selection || r.docChanged) && !EC(r));
    for (let r = 0; r < this.running.length; r++) {
      let s = this.running[r];
      if (n || s.updates.length + t.transactions.length > O4e && Date.now() - s.time > S4e) {
        for (let o of s.context.abortListeners)
          try {
            o();
          } catch (a) {
            co(this.view.state, a);
          }
        s.context.abortListeners = null, this.running.splice(r--, 1);
      } else
        s.updates.push(...t.transactions);
    }
    this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((r) => r.effects.some((s) => s.is(Bw))) && (this.pendingStart = !0);
    let i = this.pendingStart ? 50 : t.state.facet(cr).activateOnTypingDelay;
    if (this.debounceUpdate = e.active.some((r) => r.state == 1 && !this.running.some((s) => s.active.source == r.source)) ? setTimeout(() => this.startUpdate(), i) : -1, this.composing != 0)
      for (let r of t.transactions)
        EC(r) == "input" ? this.composing = 2 : this.composing == 2 && r.selection && (this.composing = 3);
  }
  startUpdate() {
    this.debounceUpdate = -1, this.pendingStart = !1;
    let { state: t } = this.view, e = t.field(js);
    for (let n of e.active)
      n.state == 1 && !this.running.some((i) => i.active.source == n.source) && this.startQuery(n);
  }
  startQuery(t) {
    let { state: e } = this.view, n = Lu(e), i = new MU(e, n, t.explicitPos == n), r = new _4e(t, i);
    this.running.push(r), Promise.resolve(t.source(i)).then((s) => {
      r.context.aborted || (r.done = s || null, this.scheduleAccept());
    }, (s) => {
      this.view.dispatch({ effects: y0.of(null) }), co(this.view.state, s);
    });
  }
  scheduleAccept() {
    this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(cr).updateSyncTime));
  }
  // For each finished query in this.running, try to create a result
  // or, if appropriate, restart the query.
  accept() {
    var t;
    this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1;
    let e = [], n = this.view.state.facet(cr);
    for (let i = 0; i < this.running.length; i++) {
      let r = this.running[i];
      if (r.done === void 0)
        continue;
      if (this.running.splice(i--, 1), r.done) {
        let o = new vh(r.active.source, r.active.explicitPos, r.done, r.done.from, (t = r.done.to) !== null && t !== void 0 ? t : Lu(r.updates.length ? r.updates[0].startState : this.view.state));
        for (let a of r.updates)
          o = o.update(a, n);
        if (o.hasResult()) {
          e.push(o);
          continue;
        }
      }
      let s = this.view.state.field(js).active.find((o) => o.source == r.active.source);
      if (s && s.state == 1)
        if (r.done == null) {
          let o = new vs(
            r.active.source,
            0
            /* State.Inactive */
          );
          for (let a of r.updates)
            o = o.update(a, n);
          o.state != 1 && e.push(o);
        } else
          this.startQuery(s);
    }
    e.length && this.view.dispatch({ effects: PU.of(e) });
  }
}, {
  eventHandlers: {
    blur(t) {
      let e = this.view.state.field(js, !1);
      if (e && e.tooltip && this.view.state.facet(cr).closeOnBlur) {
        let n = e.open && cQ(this.view, e.open.tooltip);
        (!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: y0.of(null) }), 10);
      }
    },
    compositionstart() {
      this.composing = 1;
    },
    compositionend() {
      this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: Bw.of(!1) }), 20), this.composing = 0;
    }
  }
}), RU = /* @__PURE__ */ Te.baseTheme({
  ".cm-tooltip.cm-tooltip-autocomplete": {
    "& > ul": {
      fontFamily: "monospace",
      whiteSpace: "nowrap",
      overflow: "hidden auto",
      maxWidth_fallback: "700px",
      maxWidth: "min(700px, 95vw)",
      minWidth: "250px",
      maxHeight: "10em",
      height: "100%",
      listStyle: "none",
      margin: 0,
      padding: 0,
      "& > li, & > completion-section": {
        padding: "1px 3px",
        lineHeight: 1.2
      },
      "& > li": {
        overflowX: "hidden",
        textOverflow: "ellipsis",
        cursor: "pointer"
      },
      "& > completion-section": {
        display: "list-item",
        borderBottom: "1px solid silver",
        paddingLeft: "0.5em",
        opacity: 0.7
      }
    }
  },
  "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
    background: "#17c",
    color: "white"
  },
  "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
    background: "#777"
  },
  "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
    background: "#347",
    color: "white"
  },
  "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
    background: "#444"
  },
  ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
    content: '"···"',
    opacity: 0.5,
    display: "block",
    textAlign: "center"
  },
  ".cm-tooltip.cm-completionInfo": {
    position: "absolute",
    padding: "3px 9px",
    width: "max-content",
    maxWidth: "400px",
    boxSizing: "border-box"
  },
  ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
  ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
  ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
  ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
  "&light .cm-snippetField": { backgroundColor: "#00000022" },
  "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
  ".cm-snippetFieldPosition": {
    verticalAlign: "text-top",
    width: 0,
    height: "1.15em",
    display: "inline-block",
    margin: "0 -0.7px -.7em",
    borderLeft: "1.4px dotted #888"
  },
  ".cm-completionMatchedText": {
    textDecoration: "underline"
  },
  ".cm-completionDetail": {
    marginLeft: "0.5em",
    fontStyle: "italic"
  },
  ".cm-completionIcon": {
    fontSize: "90%",
    width: ".8em",
    display: "inline-block",
    textAlign: "center",
    paddingRight: ".6em",
    opacity: "0.6",
    boxSizing: "content-box"
  },
  ".cm-completionIcon-function, .cm-completionIcon-method": {
    "&:after": { content: "'ƒ'" }
  },
  ".cm-completionIcon-class": {
    "&:after": { content: "'○'" }
  },
  ".cm-completionIcon-interface": {
    "&:after": { content: "'◌'" }
  },
  ".cm-completionIcon-variable": {
    "&:after": { content: "'𝑥'" }
  },
  ".cm-completionIcon-constant": {
    "&:after": { content: "'𝐶'" }
  },
  ".cm-completionIcon-type": {
    "&:after": { content: "'𝑡'" }
  },
  ".cm-completionIcon-enum": {
    "&:after": { content: "'∪'" }
  },
  ".cm-completionIcon-property": {
    "&:after": { content: "'□'" }
  },
  ".cm-completionIcon-keyword": {
    "&:after": { content: "'🔑︎'" }
    // Disable emoji rendering
  },
  ".cm-completionIcon-namespace": {
    "&:after": { content: "'▢'" }
  },
  ".cm-completionIcon-text": {
    "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
  }
});
class E4e {
  constructor(e, n, i, r) {
    this.field = e, this.line = n, this.from = i, this.to = r;
  }
}
class BE {
  constructor(e, n, i) {
    this.field = e, this.from = n, this.to = i;
  }
  map(e) {
    let n = e.mapPos(this.from, -1, ur.TrackDel), i = e.mapPos(this.to, 1, ur.TrackDel);
    return n == null || i == null ? null : new BE(this.field, n, i);
  }
}
class zE {
  constructor(e, n) {
    this.lines = e, this.fieldPositions = n;
  }
  instantiate(e, n) {
    let i = [], r = [n], s = e.doc.lineAt(n), o = /^\s*/.exec(s.text)[0];
    for (let l of this.lines) {
      if (i.length) {
        let u = o, f = /^\t*/.exec(l)[0].length;
        for (let d = 0; d < f; d++)
          u += e.facet(F1);
        r.push(n + u.length - f), l = u + l.slice(f);
      }
      i.push(l), n += l.length + 1;
    }
    let a = this.fieldPositions.map((l) => new BE(l.field, r[l.line] + l.from, r[l.line] + l.to));
    return { text: i, ranges: a };
  }
  static parse(e) {
    let n = [], i = [], r = [], s;
    for (let o of e.split(/\r\n?|\n/)) {
      for (; s = /[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o); ) {
        let a = s[1] ? +s[1] : null, l = s[2] || s[3] || "", u = -1;
        for (let f = 0; f < n.length; f++)
          (a != null ? n[f].seq == a : l && n[f].name == l) && (u = f);
        if (u < 0) {
          let f = 0;
          for (; f < n.length && (a == null || n[f].seq != null && n[f].seq < a); )
            f++;
          n.splice(f, 0, { seq: a, name: l }), u = f;
          for (let d of r)
            d.field >= u && d.field++;
        }
        r.push(new E4e(u, i.length, s.index, s.index + l.length)), o = o.slice(0, s.index) + l + o.slice(s.index + s[0].length);
      }
      for (let a; a = /\\([{}])/.exec(o); ) {
        o = o.slice(0, a.index) + a[1] + o.slice(a.index + a[0].length);
        for (let l of r)
          l.line == i.length && l.from > a.index && (l.from--, l.to--);
      }
      i.push(o);
    }
    return new zE(i, r);
  }
}
let T4e = /* @__PURE__ */ it.widget({ widget: /* @__PURE__ */ new class extends Ha {
  toDOM() {
    let t = document.createElement("span");
    return t.className = "cm-snippetFieldPosition", t;
  }
  ignoreEvent() {
    return !1;
  }
}() }), $4e = /* @__PURE__ */ it.mark({ class: "cm-snippetField" });
class mp {
  constructor(e, n) {
    this.ranges = e, this.active = n, this.deco = it.set(e.map((i) => (i.from == i.to ? T4e : $4e).range(i.from, i.to)));
  }
  map(e) {
    let n = [];
    for (let i of this.ranges) {
      let r = i.map(e);
      if (!r)
        return null;
      n.push(r);
    }
    return new mp(n, this.active);
  }
  selectionInsideField(e) {
    return e.ranges.every((n) => this.ranges.some((i) => i.field == this.active && i.from <= n.from && i.to >= n.to));
  }
}
const Q1 = /* @__PURE__ */ Ot.define({
  map(t, e) {
    return t && t.map(e);
  }
}), M4e = /* @__PURE__ */ Ot.define(), w0 = /* @__PURE__ */ Ki.define({
  create() {
    return null;
  },
  update(t, e) {
    for (let n of e.effects) {
      if (n.is(Q1))
        return n.value;
      if (n.is(M4e) && t)
        return new mp(t.ranges, n.value);
    }
    return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
  },
  provide: (t) => Te.decorations.from(t, (e) => e ? e.deco : it.none)
});
function WE(t, e) {
  return he.create(t.filter((n) => n.field == e).map((n) => he.range(n.from, n.to)));
}
function N4e(t) {
  let e = zE.parse(t);
  return (n, i, r, s) => {
    let { text: o, ranges: a } = e.instantiate(n.state, r), l = {
      changes: { from: r, to: s, insert: Kt.of(o) },
      scrollIntoView: !0,
      annotations: i ? [DU.of(i), Jr.userEvent.of("input.complete")] : void 0
    };
    if (a.length && (l.selection = WE(a, 0)), a.some((u) => u.field > 0)) {
      let u = new mp(a, 0), f = l.effects = [Q1.of(u)];
      n.state.field(w0, !1) === void 0 && f.push(Ot.appendConfig.of([w0, L4e, R4e, RU]));
    }
    n.dispatch(n.state.update(l));
  };
}
function jU(t) {
  return ({ state: e, dispatch: n }) => {
    let i = e.field(w0, !1);
    if (!i || t < 0 && i.active == 0)
      return !1;
    let r = i.active + t, s = t > 0 && !i.ranges.some((o) => o.field == r + t);
    return n(e.update({
      selection: WE(i.ranges, r),
      effects: Q1.of(s ? null : new mp(i.ranges, r)),
      scrollIntoView: !0
    })), !0;
  };
}
const A4e = ({ state: t, dispatch: e }) => t.field(w0, !1) ? (e(t.update({ effects: Q1.of(null) })), !0) : !1, D4e = /* @__PURE__ */ jU(1), P4e = /* @__PURE__ */ jU(-1), I4e = [
  { key: "Tab", run: D4e, shift: P4e },
  { key: "Escape", run: A4e }
], MD = /* @__PURE__ */ Qe.define({
  combine(t) {
    return t.length ? t[0] : I4e;
  }
}), L4e = /* @__PURE__ */ jf.highest(/* @__PURE__ */ Cl.compute([MD], (t) => t.facet(MD)));
function hs(t, e) {
  return Object.assign(Object.assign({}, e), { apply: N4e(t) });
}
const R4e = /* @__PURE__ */ Te.domEventHandlers({
  mousedown(t, e) {
    let n = e.state.field(w0, !1), i;
    if (!n || (i = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
      return !1;
    let r = n.ranges.find((s) => s.from <= i && s.to >= i);
    return !r || r.field == n.active ? !1 : (e.dispatch({
      selection: WE(n.ranges, r.field),
      effects: Q1.of(n.ranges.some((s) => s.field > r.field) ? new mp(n.ranges, r.field) : null),
      scrollIntoView: !0
    }), !0);
  }
}), k0 = {
  brackets: ["(", "[", "{", "'", '"'],
  before: ")]}:;>",
  stringPrefixes: []
}, Gc = /* @__PURE__ */ Ot.define({
  map(t, e) {
    let n = e.mapPos(t, -1, ur.TrackAfter);
    return n ?? void 0;
  }
}), HE = /* @__PURE__ */ new class extends vf {
}();
HE.startSide = 1;
HE.endSide = -1;
const FU = /* @__PURE__ */ Ki.define({
  create() {
    return Qt.empty;
  },
  update(t, e) {
    if (t = t.map(e.changes), e.selection) {
      let n = e.state.doc.lineAt(e.selection.main.head);
      t = t.update({ filter: (i) => i >= n.from && i <= n.to });
    }
    for (let n of e.effects)
      n.is(Gc) && (t = t.update({ add: [HE.range(n.value, n.value + 1)] }));
    return t;
  }
});
function BU() {
  return [F4e, FU];
}
const pO = "()[]{}<>";
function zU(t) {
  for (let e = 0; e < pO.length; e += 2)
    if (pO.charCodeAt(e) == t)
      return pO.charAt(e + 1);
  return fE(t < 128 ? t : t + 1);
}
function WU(t, e) {
  return t.languageDataAt("closeBrackets", e)[0] || k0;
}
const j4e = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), F4e = /* @__PURE__ */ Te.inputHandler.of((t, e, n, i) => {
  if ((j4e ? t.composing : t.compositionStarted) || t.state.readOnly)
    return !1;
  let r = t.state.selection.main;
  if (i.length > 2 || i.length == 2 && io(ar(i, 0)) == 1 || e != r.from || n != r.to)
    return !1;
  let s = z4e(t.state, i);
  return s ? (t.dispatch(s), !0) : !1;
}), B4e = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let i = WU(t, t.selection.main.head).brackets || k0.brackets, r = null, s = t.changeByRange((o) => {
    if (o.empty) {
      let a = W4e(t.doc, o.head);
      for (let l of i)
        if (l == a && E2(t.doc, o.head) == zU(ar(l, 0)))
          return {
            changes: { from: o.head - l.length, to: o.head + l.length },
            range: he.cursor(o.head - l.length)
          };
    }
    return { range: r = o };
  });
  return r || e(t.update(s, { scrollIntoView: !0, userEvent: "delete.backward" })), !r;
}, HU = [
  { key: "Backspace", run: B4e }
];
function z4e(t, e) {
  let n = WU(t, t.selection.main.head), i = n.brackets || k0.brackets;
  for (let r of i) {
    let s = zU(ar(r, 0));
    if (e == r)
      return s == r ? U4e(t, r, i.indexOf(r + r + r) > -1, n) : H4e(t, r, s, n.before || k0.before);
    if (e == s && QU(t, t.selection.main.from))
      return Q4e(t, r, s);
  }
  return null;
}
function QU(t, e) {
  let n = !1;
  return t.field(FU).between(0, t.doc.length, (i) => {
    i == e && (n = !0);
  }), n;
}
function E2(t, e) {
  let n = t.sliceString(e, e + 2);
  return n.slice(0, io(ar(n, 0)));
}
function W4e(t, e) {
  let n = t.sliceString(e - 2, e);
  return io(ar(n, 0)) == n.length ? n : n.slice(1);
}
function H4e(t, e, n, i) {
  let r = null, s = t.changeByRange((o) => {
    if (!o.empty)
      return {
        changes: [{ insert: e, from: o.from }, { insert: n, from: o.to }],
        effects: Gc.of(o.to + e.length),
        range: he.range(o.anchor + e.length, o.head + e.length)
      };
    let a = E2(t.doc, o.head);
    return !a || /\s/.test(a) || i.indexOf(a) > -1 ? {
      changes: { insert: e + n, from: o.head },
      effects: Gc.of(o.head + e.length),
      range: he.cursor(o.head + e.length)
    } : { range: r = o };
  });
  return r ? null : t.update(s, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function Q4e(t, e, n) {
  let i = null, r = t.changeByRange((s) => s.empty && E2(t.doc, s.head) == n ? {
    changes: { from: s.head, to: s.head + n.length, insert: n },
    range: he.cursor(s.head + n.length)
  } : i = { range: s });
  return i ? null : t.update(r, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function U4e(t, e, n, i) {
  let r = i.stringPrefixes || k0.stringPrefixes, s = null, o = t.changeByRange((a) => {
    if (!a.empty)
      return {
        changes: [{ insert: e, from: a.from }, { insert: e, from: a.to }],
        effects: Gc.of(a.to + e.length),
        range: he.range(a.anchor + e.length, a.head + e.length)
      };
    let l = a.head, u = E2(t.doc, l), f;
    if (u == e) {
      if (ND(t, l))
        return {
          changes: { insert: e + e, from: l },
          effects: Gc.of(l + e.length),
          range: he.cursor(l + e.length)
        };
      if (QU(t, l)) {
        let h = n && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
        return {
          changes: { from: l, to: l + h.length, insert: h },
          range: he.cursor(l + h.length)
        };
      }
    } else {
      if (n && t.sliceDoc(l - 2 * e.length, l) == e + e && (f = AD(t, l - 2 * e.length, r)) > -1 && ND(t, f))
        return {
          changes: { insert: e + e + e + e, from: l },
          effects: Gc.of(l + e.length),
          range: he.cursor(l + e.length)
        };
      if (t.charCategorizer(l)(u) != In.Word && AD(t, l, r) > -1 && !Z4e(t, l, e, r))
        return {
          changes: { insert: e + e, from: l },
          effects: Gc.of(l + e.length),
          range: he.cursor(l + e.length)
        };
    }
    return { range: s = a };
  });
  return s ? null : t.update(o, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function ND(t, e) {
  let n = ri(t).resolveInner(e + 1);
  return n.parent && n.from == e;
}
function Z4e(t, e, n, i) {
  let r = ri(t).resolveInner(e, -1), s = i.reduce((o, a) => Math.max(o, a.length), 0);
  for (let o = 0; o < 5; o++) {
    let a = t.sliceDoc(r.from, Math.min(r.to, r.from + n.length + s)), l = a.indexOf(n);
    if (!l || l > -1 && i.indexOf(a.slice(0, l)) > -1) {
      let f = r.firstChild;
      for (; f && f.from == r.from && f.to - f.from > n.length + l; ) {
        if (t.sliceDoc(f.to - n.length, f.to) == n)
          return !1;
        f = f.firstChild;
      }
      return !0;
    }
    let u = r.to == e && r.parent;
    if (!u)
      break;
    r = u;
  }
  return !1;
}
function AD(t, e, n) {
  let i = t.charCategorizer(e);
  if (i(t.sliceDoc(e - 1, e)) != In.Word)
    return e;
  for (let r of n) {
    let s = e - r.length;
    if (t.sliceDoc(s, e) == r && i(t.sliceDoc(s - 1, s)) != In.Word)
      return s;
  }
  return -1;
}
function q4e(t = {}) {
  return [
    js,
    cr.of(t),
    C4e,
    Y4e,
    RU
  ];
}
const UU = [
  { key: "Ctrl-Space", run: k4e },
  { key: "Escape", run: x4e },
  { key: "ArrowDown", run: /* @__PURE__ */ $b(!0) },
  { key: "ArrowUp", run: /* @__PURE__ */ $b(!1) },
  { key: "PageDown", run: /* @__PURE__ */ $b(!0, "page") },
  { key: "PageUp", run: /* @__PURE__ */ $b(!1, "page") },
  { key: "Enter", run: w4e }
], Y4e = /* @__PURE__ */ jf.highest(/* @__PURE__ */ Cl.computeN([cr], (t) => t.facet(cr).defaultKeymap ? [UU] : []));
class V4e {
  constructor(e, n, i) {
    this.from = e, this.to = n, this.diagnostic = i;
  }
}
class zc {
  constructor(e, n, i) {
    this.diagnostics = e, this.panel = n, this.selected = i;
  }
  static init(e, n, i) {
    let r = e, s = i.facet(YU).markerFilter;
    s && (r = s(r));
    let o = it.set(r.map((a) => a.from == a.to || a.from == a.to - 1 && i.doc.lineAt(a.from).to == a.from ? it.widget({
      widget: new rCe(a),
      diagnostic: a
    }).range(a.from) : it.mark({
      attributes: { class: "cm-lintRange cm-lintRange-" + a.severity + (a.markClass ? " " + a.markClass : "") },
      diagnostic: a
    }).range(a.from, a.to)), !0);
    return new zc(o, n, Ph(o));
  }
}
function Ph(t, e = null, n = 0) {
  let i = null;
  return t.between(n, 1e9, (r, s, { spec: o }) => {
    if (!(e && o.diagnostic != e))
      return i = new V4e(r, s, o.diagnostic), !1;
  }), i;
}
function X4e(t, e) {
  let n = t.startState.doc.lineAt(e.pos);
  return !!(t.effects.some((i) => i.is(ZU)) || t.changes.touchesRange(n.from, n.to));
}
function G4e(t, e) {
  return t.field(zs, !1) ? e : e.concat(Ot.appendConfig.of(aCe));
}
const ZU = /* @__PURE__ */ Ot.define(), QE = /* @__PURE__ */ Ot.define(), qU = /* @__PURE__ */ Ot.define(), zs = /* @__PURE__ */ Ki.define({
  create() {
    return new zc(it.none, null, null);
  },
  update(t, e) {
    if (e.docChanged) {
      let n = t.diagnostics.map(e.changes), i = null;
      if (t.selected) {
        let r = e.changes.mapPos(t.selected.from, 1);
        i = Ph(n, t.selected.diagnostic, r) || Ph(n, null, r);
      }
      t = new zc(n, t.panel, i);
    }
    for (let n of e.effects)
      n.is(ZU) ? t = zc.init(n.value, t.panel, e.state) : n.is(QE) ? t = new zc(t.diagnostics, n.value ? T2.open : null, t.selected) : n.is(qU) && (t = new zc(t.diagnostics, t.panel, n.value));
    return t;
  },
  provide: (t) => [
    h0.from(t, (e) => e.panel),
    Te.decorations.from(t, (e) => e.diagnostics)
  ]
}), K4e = /* @__PURE__ */ it.mark({ class: "cm-lintRange cm-lintRange-active" });
function J4e(t, e, n) {
  let { diagnostics: i } = t.state.field(zs), r = [], s = 2e8, o = 0;
  i.between(e - (n < 0 ? 1 : 0), e + (n > 0 ? 1 : 0), (l, u, { spec: f }) => {
    e >= l && e <= u && (l == u || (e > l || n > 0) && (e < u || n < 0)) && (r.push(f.diagnostic), s = Math.min(l, s), o = Math.max(u, o));
  });
  let a = t.state.facet(YU).tooltipFilter;
  return a && (r = a(r)), r.length ? {
    pos: s,
    end: o,
    above: t.state.doc.lineAt(s).to < o,
    create() {
      return { dom: eCe(t, r) };
    }
  } : null;
}
function eCe(t, e) {
  return cn("ul", { class: "cm-tooltip-lint" }, e.map((n) => XU(t, n, !1)));
}
const tCe = (t) => {
  let e = t.state.field(zs, !1);
  (!e || !e.panel) && t.dispatch({ effects: G4e(t.state, [QE.of(!0)]) });
  let n = d0(t, T2.open);
  return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
}, DD = (t) => {
  let e = t.state.field(zs, !1);
  return !e || !e.panel ? !1 : (t.dispatch({ effects: QE.of(!1) }), !0);
}, nCe = (t) => {
  let e = t.state.field(zs, !1);
  if (!e)
    return !1;
  let n = t.state.selection.main, i = e.diagnostics.iter(n.to + 1);
  return !i.value && (i = e.diagnostics.iter(0), !i.value || i.from == n.from && i.to == n.to) ? !1 : (t.dispatch({ selection: { anchor: i.from, head: i.to }, scrollIntoView: !0 }), !0);
}, iCe = [
  { key: "Mod-Shift-m", run: tCe, preventDefault: !0 },
  { key: "F8", run: nCe }
], YU = /* @__PURE__ */ Qe.define({
  combine(t) {
    return Object.assign({ sources: t.map((e) => e.source) }, Wa(t.map((e) => e.config), {
      delay: 750,
      markerFilter: null,
      tooltipFilter: null,
      needsRefresh: null
    }, {
      needsRefresh: (e, n) => e ? n ? (i) => e(i) || n(i) : e : n
    }));
  }
});
function VU(t) {
  let e = [];
  if (t)
    e: for (let { name: n } of t) {
      for (let i = 0; i < n.length; i++) {
        let r = n[i];
        if (/[a-zA-Z]/.test(r) && !e.some((s) => s.toLowerCase() == r.toLowerCase())) {
          e.push(r);
          continue e;
        }
      }
      e.push("");
    }
  return e;
}
function XU(t, e, n) {
  var i;
  let r = n ? VU(e.actions) : [];
  return cn("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, cn("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage() : e.message), (i = e.actions) === null || i === void 0 ? void 0 : i.map((s, o) => {
    let a = !1, l = (h) => {
      if (h.preventDefault(), a)
        return;
      a = !0;
      let m = Ph(t.state.field(zs).diagnostics, e);
      m && s.apply(t, m.from, m.to);
    }, { name: u } = s, f = r[o] ? u.indexOf(r[o]) : -1, d = f < 0 ? u : [
      u.slice(0, f),
      cn("u", u.slice(f, f + 1)),
      u.slice(f + 1)
    ];
    return cn("button", {
      type: "button",
      class: "cm-diagnosticAction",
      onclick: l,
      onmousedown: l,
      "aria-label": ` Action: ${u}${f < 0 ? "" : ` (access key "${r[o]})"`}.`
    }, d);
  }), e.source && cn("div", { class: "cm-diagnosticSource" }, e.source));
}
class rCe extends Ha {
  constructor(e) {
    super(), this.diagnostic = e;
  }
  eq(e) {
    return e.diagnostic == this.diagnostic;
  }
  toDOM() {
    return cn("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity });
  }
}
class PD {
  constructor(e, n) {
    this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = XU(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
  }
}
class T2 {
  constructor(e) {
    this.view = e, this.items = [];
    let n = (r) => {
      if (r.keyCode == 27)
        DD(this.view), this.view.focus();
      else if (r.keyCode == 38 || r.keyCode == 33)
        this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
      else if (r.keyCode == 40 || r.keyCode == 34)
        this.moveSelection((this.selectedIndex + 1) % this.items.length);
      else if (r.keyCode == 36)
        this.moveSelection(0);
      else if (r.keyCode == 35)
        this.moveSelection(this.items.length - 1);
      else if (r.keyCode == 13)
        this.view.focus();
      else if (r.keyCode >= 65 && r.keyCode <= 90 && this.selectedIndex >= 0) {
        let { diagnostic: s } = this.items[this.selectedIndex], o = VU(s.actions);
        for (let a = 0; a < o.length; a++)
          if (o[a].toUpperCase().charCodeAt(0) == r.keyCode) {
            let l = Ph(this.view.state.field(zs).diagnostics, s);
            l && s.actions[a].apply(e, l.from, l.to);
          }
      } else
        return;
      r.preventDefault();
    }, i = (r) => {
      for (let s = 0; s < this.items.length; s++)
        this.items[s].dom.contains(r.target) && this.moveSelection(s);
    };
    this.list = cn("ul", {
      tabIndex: 0,
      role: "listbox",
      "aria-label": this.view.state.phrase("Diagnostics"),
      onkeydown: n,
      onclick: i
    }), this.dom = cn("div", { class: "cm-panel-lint" }, this.list, cn("button", {
      type: "button",
      name: "close",
      "aria-label": this.view.state.phrase("close"),
      onclick: () => DD(this.view)
    }, "×")), this.update();
  }
  get selectedIndex() {
    let e = this.view.state.field(zs).selected;
    if (!e)
      return -1;
    for (let n = 0; n < this.items.length; n++)
      if (this.items[n].diagnostic == e.diagnostic)
        return n;
    return -1;
  }
  update() {
    let { diagnostics: e, selected: n } = this.view.state.field(zs), i = 0, r = !1, s = null;
    for (e.between(0, this.view.state.doc.length, (o, a, { spec: l }) => {
      let u = -1, f;
      for (let d = i; d < this.items.length; d++)
        if (this.items[d].diagnostic == l.diagnostic) {
          u = d;
          break;
        }
      u < 0 ? (f = new PD(this.view, l.diagnostic), this.items.splice(i, 0, f), r = !0) : (f = this.items[u], u > i && (this.items.splice(i, u - i), r = !0)), n && f.diagnostic == n.diagnostic ? f.dom.hasAttribute("aria-selected") || (f.dom.setAttribute("aria-selected", "true"), s = f) : f.dom.hasAttribute("aria-selected") && f.dom.removeAttribute("aria-selected"), i++;
    }); i < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
      r = !0, this.items.pop();
    this.items.length == 0 && (this.items.push(new PD(this.view, {
      from: -1,
      to: -1,
      severity: "info",
      message: this.view.state.phrase("No diagnostics")
    })), r = !0), s ? (this.list.setAttribute("aria-activedescendant", s.id), this.view.requestMeasure({
      key: this,
      read: () => ({ sel: s.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
      write: ({ sel: o, panel: a }) => {
        let l = a.height / this.list.offsetHeight;
        o.top < a.top ? this.list.scrollTop -= (a.top - o.top) / l : o.bottom > a.bottom && (this.list.scrollTop += (o.bottom - a.bottom) / l);
      }
    })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), r && this.sync();
  }
  sync() {
    let e = this.list.firstChild;
    function n() {
      let i = e;
      e = i.nextSibling, i.remove();
    }
    for (let i of this.items)
      if (i.dom.parentNode == this.list) {
        for (; e != i.dom; )
          n();
        e = i.dom.nextSibling;
      } else
        this.list.insertBefore(i.dom, e);
    for (; e; )
      n();
  }
  moveSelection(e) {
    if (this.selectedIndex < 0)
      return;
    let n = this.view.state.field(zs), i = Ph(n.diagnostics, this.items[e].diagnostic);
    i && this.view.dispatch({
      selection: { anchor: i.from, head: i.to },
      scrollIntoView: !0,
      effects: qU.of(i)
    });
  }
  static open(e) {
    return new T2(e);
  }
}
function sCe(t, e = 'viewBox="0 0 40 40"') {
  return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
}
function Mb(t) {
  return sCe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
}
const oCe = /* @__PURE__ */ Te.baseTheme({
  ".cm-diagnostic": {
    padding: "3px 6px 3px 8px",
    marginLeft: "-1px",
    display: "block",
    whiteSpace: "pre-wrap"
  },
  ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
  ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
  ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
  ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
  ".cm-diagnosticAction": {
    font: "inherit",
    border: "none",
    padding: "2px 4px",
    backgroundColor: "#444",
    color: "white",
    borderRadius: "3px",
    marginLeft: "8px",
    cursor: "pointer"
  },
  ".cm-diagnosticSource": {
    fontSize: "70%",
    opacity: 0.7
  },
  ".cm-lintRange": {
    backgroundPosition: "left bottom",
    backgroundRepeat: "repeat-x",
    paddingBottom: "0.7px"
  },
  ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ Mb("#d11") },
  ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ Mb("orange") },
  ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ Mb("#999") },
  ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ Mb("#66d") },
  ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
  ".cm-tooltip-lint": {
    padding: 0,
    margin: 0
  },
  ".cm-lintPoint": {
    position: "relative",
    "&:after": {
      content: '""',
      position: "absolute",
      bottom: 0,
      left: "-2px",
      borderLeft: "3px solid transparent",
      borderRight: "3px solid transparent",
      borderBottom: "4px solid #d11"
    }
  },
  ".cm-lintPoint-warning": {
    "&:after": { borderBottomColor: "orange" }
  },
  ".cm-lintPoint-info": {
    "&:after": { borderBottomColor: "#999" }
  },
  ".cm-lintPoint-hint": {
    "&:after": { borderBottomColor: "#66d" }
  },
  ".cm-panel.cm-panel-lint": {
    position: "relative",
    "& ul": {
      maxHeight: "100px",
      overflowY: "auto",
      "& [aria-selected]": {
        backgroundColor: "#ddd",
        "& u": { textDecoration: "underline" }
      },
      "&:focus [aria-selected]": {
        background_fallback: "#bdf",
        backgroundColor: "Highlight",
        color_fallback: "white",
        color: "HighlightText"
      },
      "& u": { textDecoration: "none" },
      padding: 0,
      margin: 0
    },
    "& [name=close]": {
      position: "absolute",
      top: "0",
      right: "2px",
      background: "inherit",
      border: "none",
      font: "inherit",
      padding: 0,
      margin: 0
    }
  }
}), aCe = [
  zs,
  /* @__PURE__ */ Te.decorations.compute([zs], (t) => {
    let { selected: e, panel: n } = t.field(zs);
    return !e || !n || e.from == e.to ? it.none : it.set([
      K4e.range(e.from, e.to)
    ]);
  }),
  /* @__PURE__ */ n3e(J4e, { hideOn: X4e }),
  oCe
];
var ID = function(e) {
  e === void 0 && (e = {});
  var {
    crosshairCursor: n = !1
  } = e, i = [];
  e.closeBracketsKeymap !== !1 && (i = i.concat(HU)), e.defaultKeymap !== !1 && (i = i.concat(yU)), e.searchKeymap !== !1 && (i = i.concat(e4e)), e.historyKeymap !== !1 && (i = i.concat(ZQ)), e.foldKeymap !== !1 && (i = i.concat(iOe)), e.completionKeymap !== !1 && (i = i.concat(UU)), e.lintKeymap !== !1 && (i = i.concat(iCe));
  var r = [];
  return e.lineNumbers !== !1 && r.push(_E()), e.highlightActiveLineGutter !== !1 && r.push(h3e()), e.highlightSpecialChars !== !1 && r.push(lQ()), e.history !== !1 && r.push(x2()), e.foldGutter !== !1 && r.push(aOe()), e.drawSelection !== !1 && r.push(sQ()), e.dropCursor !== !1 && r.push(C_e()), e.allowMultipleSelections !== !1 && r.push(zt.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && r.push(Y3e()), e.syntaxHighlighting !== !1 && r.push(z1(IQ, {
    fallback: !0
  })), e.bracketMatching !== !1 && r.push(vOe()), e.closeBrackets !== !1 && r.push(BU()), e.autocompletion !== !1 && r.push(q4e()), e.rectangularSelection !== !1 && r.push(U_e()), n !== !1 && r.push(Y_e()), e.highlightActiveLine !== !1 && r.push(R_e()), e.highlightSelectionMatches !== !1 && r.push(ISe()), e.tabSize && typeof e.tabSize == "number" && r.push(F1.of(" ".repeat(e.tabSize))), r.concat([Cl.of(i.flat())]).filter(Boolean);
}, GU = function(e) {
  e === void 0 && (e = {});
  var n = [];
  e.defaultKeymap !== !1 && (n = n.concat(yU)), e.historyKeymap !== !1 && (n = n.concat(ZQ));
  var i = [];
  return e.highlightSpecialChars !== !1 && i.push(lQ()), e.history !== !1 && i.push(x2()), e.drawSelection !== !1 && i.push(sQ()), e.syntaxHighlighting !== !1 && i.push(z1(IQ, {
    fallback: !0
  })), i.concat([Cl.of(n.flat())]).filter(Boolean);
};
const lCe = "#e5c07b", LD = "#e06c75", uCe = "#56b6c2", cCe = "#ffffff", gy = "#abb2bf", TC = "#7d8799", fCe = "#61afef", dCe = "#98c379", RD = "#d19a66", hCe = "#c678dd", pCe = "#21252b", jD = "#2c313a", FD = "#282c34", mO = "#353a42", mCe = "#3E4451", BD = "#528bff", gCe = /* @__PURE__ */ Te.theme({
  "&": {
    color: gy,
    backgroundColor: FD
  },
  ".cm-content": {
    caretColor: BD
  },
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: BD },
  "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: mCe },
  ".cm-panels": { backgroundColor: pCe, color: gy },
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
  ".cm-searchMatch": {
    backgroundColor: "#72a1ff59",
    outline: "1px solid #457dff"
  },
  ".cm-searchMatch.cm-searchMatch-selected": {
    backgroundColor: "#6199ff2f"
  },
  ".cm-activeLine": { backgroundColor: "#6699ff0b" },
  ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
  "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
    backgroundColor: "#bad0f847"
  },
  ".cm-gutters": {
    backgroundColor: FD,
    color: TC,
    border: "none"
  },
  ".cm-activeLineGutter": {
    backgroundColor: jD
  },
  ".cm-foldPlaceholder": {
    backgroundColor: "transparent",
    border: "none",
    color: "#ddd"
  },
  ".cm-tooltip": {
    border: "none",
    backgroundColor: mO
  },
  ".cm-tooltip .cm-tooltip-arrow:before": {
    borderTopColor: "transparent",
    borderBottomColor: "transparent"
  },
  ".cm-tooltip .cm-tooltip-arrow:after": {
    borderTopColor: mO,
    borderBottomColor: mO
  },
  ".cm-tooltip-autocomplete": {
    "& > ul > li[aria-selected]": {
      backgroundColor: jD,
      color: gy
    }
  }
}, { dark: !0 }), vCe = /* @__PURE__ */ Tl.define([
  {
    tag: X.keyword,
    color: hCe
  },
  {
    tag: [X.name, X.deleted, X.character, X.propertyName, X.macroName],
    color: LD
  },
  {
    tag: [/* @__PURE__ */ X.function(X.variableName), X.labelName],
    color: fCe
  },
  {
    tag: [X.color, /* @__PURE__ */ X.constant(X.name), /* @__PURE__ */ X.standard(X.name)],
    color: RD
  },
  {
    tag: [/* @__PURE__ */ X.definition(X.name), X.separator],
    color: gy
  },
  {
    tag: [X.typeName, X.className, X.number, X.changed, X.annotation, X.modifier, X.self, X.namespace],
    color: lCe
  },
  {
    tag: [X.operator, X.operatorKeyword, X.url, X.escape, X.regexp, X.link, /* @__PURE__ */ X.special(X.string)],
    color: uCe
  },
  {
    tag: [X.meta, X.comment],
    color: TC
  },
  {
    tag: X.strong,
    fontWeight: "bold"
  },
  {
    tag: X.emphasis,
    fontStyle: "italic"
  },
  {
    tag: X.strikethrough,
    textDecoration: "line-through"
  },
  {
    tag: X.link,
    color: TC,
    textDecoration: "underline"
  },
  {
    tag: X.heading,
    fontWeight: "bold",
    color: LD
  },
  {
    tag: [X.atom, X.bool, /* @__PURE__ */ X.special(X.variableName)],
    color: RD
  },
  {
    tag: [X.processingInstruction, X.string, X.inserted],
    color: dCe
  },
  {
    tag: X.invalid,
    color: cCe
  }
]), bCe = [gCe, /* @__PURE__ */ z1(vCe)];
var yCe = Te.theme({
  "&": {
    backgroundColor: "#fff"
  }
}, {
  dark: !1
}), wCe = function(e) {
  e === void 0 && (e = {});
  var {
    indentWithTab: n = !0,
    editable: i = !0,
    readOnly: r = !1,
    theme: s = "light",
    placeholder: o = "",
    basicSetup: a = !0
  } = e, l = [];
  switch (n && l.unshift(Cl.of([$Se])), a && (typeof a == "boolean" ? l.unshift(ID()) : l.unshift(ID(a))), o && l.unshift(z_e(o)), s) {
    case "light":
      l.push(yCe);
      break;
    case "dark":
      l.push(bCe);
      break;
    case "none":
      break;
    default:
      l.push(s);
      break;
  }
  return i === !1 && l.push(Te.editable.of(!1)), r && l.push(zt.readOnly.of(!0)), [...l];
}, kCe = (t) => ({
  line: t.state.doc.lineAt(t.state.selection.main.from),
  lineCount: t.state.doc.lines,
  lineBreak: t.state.lineBreak,
  length: t.state.doc.length,
  readOnly: t.state.readOnly,
  tabSize: t.state.tabSize,
  selection: t.state.selection,
  selectionAsSingle: t.state.selection.asSingle().main,
  ranges: t.state.selection.ranges,
  selectionCode: t.state.sliceDoc(t.state.selection.main.from, t.state.selection.main.to),
  selections: t.state.selection.ranges.map((e) => t.state.sliceDoc(e.from, e.to)),
  selectedText: t.state.selection.ranges.some((e) => !e.empty)
}), zD = za.define(), xCe = [];
function _Ce(t) {
  var {
    value: e,
    selection: n,
    onChange: i,
    onStatistics: r,
    onCreateEditor: s,
    onUpdate: o,
    extensions: a = xCe,
    autoFocus: l,
    theme: u = "light",
    height: f = null,
    minHeight: d = null,
    maxHeight: h = null,
    width: m = null,
    minWidth: g = null,
    maxWidth: w = null,
    placeholder: x = "",
    editable: _ = !0,
    readOnly: S = !1,
    indentWithTab: C = !0,
    basicSetup: E = !0,
    root: M,
    initialState: $
  } = t, [P, W] = ft(), [z, Z] = ft(), [L, Q] = ft(), V = Te.theme({
    "&": {
      height: f,
      minHeight: d,
      maxHeight: h,
      width: m,
      minWidth: g,
      maxWidth: w
    },
    "& .cm-scroller": {
      height: "100% !important"
    }
  }), H = Te.updateListener.of((Y) => {
    if (Y.docChanged && typeof i == "function" && // Fix echoing of the remote changes:
    // If transaction is market as remote we don't have to call `onChange` handler again
    !Y.transactions.some((se) => se.annotation(zD))) {
      var K = Y.state.doc, te = K.toString();
      i(te, Y);
    }
    r && r(kCe(Y));
  }), R = wCe({
    theme: u,
    editable: _,
    readOnly: S,
    placeholder: x,
    indentWithTab: C,
    basicSetup: E
  }), q = [H, V, ...R];
  return o && typeof o == "function" && q.push(Te.updateListener.of(o)), q = q.concat(a), kt(() => {
    if (P && !L) {
      var Y = {
        doc: e,
        selection: n,
        extensions: q
      }, K = $ ? zt.fromJSON($.json, Y, $.fields) : zt.create(Y);
      if (Q(K), !z) {
        var te = new Te({
          state: K,
          parent: P,
          root: M
        });
        Z(te), s && s(te, K);
      }
    }
    return () => {
      z && (Q(void 0), Z(void 0));
    };
  }, [P, L]), kt(() => W(t.container), [t.container]), kt(() => () => {
    z && (z.destroy(), Z(void 0));
  }, [z]), kt(() => {
    l && z && z.focus();
  }, [l, z]), kt(() => {
    z && z.dispatch({
      effects: Ot.reconfigure.of(q)
    });
  }, [u, a, f, d, h, m, g, w, x, _, S, C, E, i, o]), kt(() => {
    if (e !== void 0) {
      var Y = z ? z.state.doc.toString() : "";
      z && e !== Y && z.dispatch({
        changes: {
          from: 0,
          to: Y.length,
          insert: e || ""
        },
        annotations: [zD.of(!0)]
      });
    }
  }, [e, z]), {
    state: L,
    setState: Q,
    view: z,
    setView: Z,
    container: P,
    setContainer: W
  };
}
var OCe = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], UE = /* @__PURE__ */ mne((t, e) => {
  var {
    className: n,
    value: i = "",
    selection: r,
    extensions: s = [],
    onChange: o,
    onStatistics: a,
    onCreateEditor: l,
    onUpdate: u,
    autoFocus: f,
    theme: d = "light",
    height: h,
    minHeight: m,
    maxHeight: g,
    width: w,
    minWidth: x,
    maxWidth: _,
    basicSetup: S,
    placeholder: C,
    indentWithTab: E,
    editable: M,
    readOnly: $,
    root: P,
    initialState: W
  } = t, z = k2e(t, OCe), Z = ct(null), {
    state: L,
    view: Q,
    container: V
  } = _Ce({
    container: Z.current,
    root: P,
    value: i,
    autoFocus: f,
    theme: d,
    height: h,
    minHeight: m,
    maxHeight: g,
    width: w,
    minWidth: x,
    maxWidth: _,
    basicSetup: S,
    placeholder: C,
    indentWithTab: E,
    editable: M,
    readOnly: $,
    selection: r,
    onChange: o,
    onStatistics: a,
    onCreateEditor: l,
    onUpdate: u,
    extensions: s,
    initialState: W
  });
  if (gne(e, () => ({
    editor: Z.current,
    state: L,
    view: Q
  }), [Z, V, L, Q]), typeof i != "string")
    throw new Error("value must be typeof string but got " + typeof i);
  var H = typeof d == "string" ? "cm-theme-" + d : "cm-theme";
  return /* @__PURE__ */ y.jsx("div", D4({
    ref: Z,
    className: "" + H + (n ? " " + n : "")
  }, z));
});
UE.displayName = "CodeMirror";
function Ff({ children: t, to: e, className: n, ...i }) {
  const { darkMode: r } = j.useContext(dt), s = e || document.body;
  if (!s)
    return t;
  function o(a) {
    a.stopPropagation();
  }
  return _j(
    /* @__PURE__ */ y.jsx("div", { className: "koenig-lexical", style: { width: "fit-content" }, "data-kg-portal": !0, onMouseDown: o, ...i, children: /* @__PURE__ */ y.jsx("div", { className: `${r ? "dark" : ""} ${n || ""}`, children: t }) }),
    s
  );
}
const SCe = [
  {
    id: "people",
    emojis: [
      "grinning",
      "smiley",
      "smile",
      "grin",
      "laughing",
      "sweat_smile",
      "rolling_on_the_floor_laughing",
      "joy",
      "slightly_smiling_face",
      "upside_down_face",
      "melting_face",
      "wink",
      "blush",
      "innocent",
      "smiling_face_with_3_hearts",
      "heart_eyes",
      "star-struck",
      "kissing_heart",
      "kissing",
      "relaxed",
      "kissing_closed_eyes",
      "kissing_smiling_eyes",
      "smiling_face_with_tear",
      "yum",
      "stuck_out_tongue",
      "stuck_out_tongue_winking_eye",
      "zany_face",
      "stuck_out_tongue_closed_eyes",
      "money_mouth_face",
      "hugging_face",
      "face_with_hand_over_mouth",
      "face_with_open_eyes_and_hand_over_mouth",
      "face_with_peeking_eye",
      "shushing_face",
      "thinking_face",
      "saluting_face",
      "zipper_mouth_face",
      "face_with_raised_eyebrow",
      "neutral_face",
      "expressionless",
      "no_mouth",
      "dotted_line_face",
      "face_in_clouds",
      "smirk",
      "unamused",
      "face_with_rolling_eyes",
      "grimacing",
      "face_exhaling",
      "lying_face",
      "shaking_face",
      "relieved",
      "pensive",
      "sleepy",
      "drooling_face",
      "sleeping",
      "mask",
      "face_with_thermometer",
      "face_with_head_bandage",
      "nauseated_face",
      "face_vomiting",
      "sneezing_face",
      "hot_face",
      "cold_face",
      "woozy_face",
      "dizzy_face",
      "face_with_spiral_eyes",
      "exploding_head",
      "face_with_cowboy_hat",
      "partying_face",
      "disguised_face",
      "sunglasses",
      "nerd_face",
      "face_with_monocle",
      "confused",
      "face_with_diagonal_mouth",
      "worried",
      "slightly_frowning_face",
      "white_frowning_face",
      "open_mouth",
      "hushed",
      "astonished",
      "flushed",
      "pleading_face",
      "face_holding_back_tears",
      "frowning",
      "anguished",
      "fearful",
      "cold_sweat",
      "disappointed_relieved",
      "cry",
      "sob",
      "scream",
      "confounded",
      "persevere",
      "disappointed",
      "sweat",
      "weary",
      "tired_face",
      "yawning_face",
      "triumph",
      "rage",
      "angry",
      "face_with_symbols_on_mouth",
      "smiling_imp",
      "imp",
      "skull",
      "skull_and_crossbones",
      "hankey",
      "clown_face",
      "japanese_ogre",
      "japanese_goblin",
      "ghost",
      "alien",
      "space_invader",
      "wave",
      "raised_back_of_hand",
      "raised_hand_with_fingers_splayed",
      "hand",
      "spock-hand",
      "rightwards_hand",
      "leftwards_hand",
      "palm_down_hand",
      "palm_up_hand",
      "leftwards_pushing_hand",
      "rightwards_pushing_hand",
      "ok_hand",
      "pinched_fingers",
      "pinching_hand",
      "v",
      "crossed_fingers",
      "hand_with_index_finger_and_thumb_crossed",
      "i_love_you_hand_sign",
      "the_horns",
      "call_me_hand",
      "point_left",
      "point_right",
      "point_up_2",
      "middle_finger",
      "point_down",
      "point_up",
      "index_pointing_at_the_viewer",
      "+1",
      "-1",
      "fist",
      "facepunch",
      "left-facing_fist",
      "right-facing_fist",
      "clap",
      "raised_hands",
      "heart_hands",
      "open_hands",
      "palms_up_together",
      "handshake",
      "pray",
      "writing_hand",
      "nail_care",
      "selfie",
      "muscle",
      "mechanical_arm",
      "mechanical_leg",
      "leg",
      "foot",
      "ear",
      "ear_with_hearing_aid",
      "nose",
      "brain",
      "anatomical_heart",
      "lungs",
      "tooth",
      "bone",
      "eyes",
      "eye",
      "tongue",
      "lips",
      "biting_lip",
      "baby",
      "child",
      "boy",
      "girl",
      "adult",
      "person_with_blond_hair",
      "man",
      "bearded_person",
      "man_with_beard",
      "woman_with_beard",
      "red_haired_man",
      "curly_haired_man",
      "white_haired_man",
      "bald_man",
      "woman",
      "red_haired_woman",
      "red_haired_person",
      "curly_haired_woman",
      "curly_haired_person",
      "white_haired_woman",
      "white_haired_person",
      "bald_woman",
      "bald_person",
      "blond-haired-woman",
      "blond-haired-man",
      "older_adult",
      "older_man",
      "older_woman",
      "person_frowning",
      "man-frowning",
      "woman-frowning",
      "person_with_pouting_face",
      "man-pouting",
      "woman-pouting",
      "no_good",
      "man-gesturing-no",
      "woman-gesturing-no",
      "ok_woman",
      "man-gesturing-ok",
      "woman-gesturing-ok",
      "information_desk_person",
      "man-tipping-hand",
      "woman-tipping-hand",
      "raising_hand",
      "man-raising-hand",
      "woman-raising-hand",
      "deaf_person",
      "deaf_man",
      "deaf_woman",
      "bow",
      "man-bowing",
      "woman-bowing",
      "face_palm",
      "man-facepalming",
      "woman-facepalming",
      "shrug",
      "man-shrugging",
      "woman-shrugging",
      "health_worker",
      "male-doctor",
      "female-doctor",
      "student",
      "male-student",
      "female-student",
      "teacher",
      "male-teacher",
      "female-teacher",
      "judge",
      "male-judge",
      "female-judge",
      "farmer",
      "male-farmer",
      "female-farmer",
      "cook",
      "male-cook",
      "female-cook",
      "mechanic",
      "male-mechanic",
      "female-mechanic",
      "factory_worker",
      "male-factory-worker",
      "female-factory-worker",
      "office_worker",
      "male-office-worker",
      "female-office-worker",
      "scientist",
      "male-scientist",
      "female-scientist",
      "technologist",
      "male-technologist",
      "female-technologist",
      "singer",
      "male-singer",
      "female-singer",
      "artist",
      "male-artist",
      "female-artist",
      "pilot",
      "male-pilot",
      "female-pilot",
      "astronaut",
      "male-astronaut",
      "female-astronaut",
      "firefighter",
      "male-firefighter",
      "female-firefighter",
      "cop",
      "male-police-officer",
      "female-police-officer",
      "sleuth_or_spy",
      "male-detective",
      "female-detective",
      "guardsman",
      "male-guard",
      "female-guard",
      "ninja",
      "construction_worker",
      "male-construction-worker",
      "female-construction-worker",
      "person_with_crown",
      "prince",
      "princess",
      "man_with_turban",
      "man-wearing-turban",
      "woman-wearing-turban",
      "man_with_gua_pi_mao",
      "person_with_headscarf",
      "person_in_tuxedo",
      "man_in_tuxedo",
      "woman_in_tuxedo",
      "bride_with_veil",
      "man_with_veil",
      "woman_with_veil",
      "pregnant_woman",
      "pregnant_man",
      "pregnant_person",
      "breast-feeding",
      "woman_feeding_baby",
      "man_feeding_baby",
      "person_feeding_baby",
      "angel",
      "santa",
      "mrs_claus",
      "mx_claus",
      "superhero",
      "male_superhero",
      "female_superhero",
      "supervillain",
      "male_supervillain",
      "female_supervillain",
      "mage",
      "male_mage",
      "female_mage",
      "fairy",
      "male_fairy",
      "female_fairy",
      "vampire",
      "male_vampire",
      "female_vampire",
      "merperson",
      "merman",
      "mermaid",
      "elf",
      "male_elf",
      "female_elf",
      "genie",
      "male_genie",
      "female_genie",
      "zombie",
      "male_zombie",
      "female_zombie",
      "troll",
      "massage",
      "man-getting-massage",
      "woman-getting-massage",
      "haircut",
      "man-getting-haircut",
      "woman-getting-haircut",
      "walking",
      "man-walking",
      "woman-walking",
      "standing_person",
      "man_standing",
      "woman_standing",
      "kneeling_person",
      "man_kneeling",
      "woman_kneeling",
      "person_with_probing_cane",
      "man_with_probing_cane",
      "woman_with_probing_cane",
      "person_in_motorized_wheelchair",
      "man_in_motorized_wheelchair",
      "woman_in_motorized_wheelchair",
      "person_in_manual_wheelchair",
      "man_in_manual_wheelchair",
      "woman_in_manual_wheelchair",
      "runner",
      "man-running",
      "woman-running",
      "dancer",
      "man_dancing",
      "man_in_business_suit_levitating",
      "dancers",
      "men-with-bunny-ears-partying",
      "women-with-bunny-ears-partying",
      "person_in_steamy_room",
      "man_in_steamy_room",
      "woman_in_steamy_room",
      "person_climbing",
      "man_climbing",
      "woman_climbing",
      "fencer",
      "horse_racing",
      "skier",
      "snowboarder",
      "golfer",
      "man-golfing",
      "woman-golfing",
      "surfer",
      "man-surfing",
      "woman-surfing",
      "rowboat",
      "man-rowing-boat",
      "woman-rowing-boat",
      "swimmer",
      "man-swimming",
      "woman-swimming",
      "person_with_ball",
      "man-bouncing-ball",
      "woman-bouncing-ball",
      "weight_lifter",
      "man-lifting-weights",
      "woman-lifting-weights",
      "bicyclist",
      "man-biking",
      "woman-biking",
      "mountain_bicyclist",
      "man-mountain-biking",
      "woman-mountain-biking",
      "person_doing_cartwheel",
      "man-cartwheeling",
      "woman-cartwheeling",
      "wrestlers",
      "man-wrestling",
      "woman-wrestling",
      "water_polo",
      "man-playing-water-polo",
      "woman-playing-water-polo",
      "handball",
      "man-playing-handball",
      "woman-playing-handball",
      "juggling",
      "man-juggling",
      "woman-juggling",
      "person_in_lotus_position",
      "man_in_lotus_position",
      "woman_in_lotus_position",
      "bath",
      "sleeping_accommodation",
      "people_holding_hands",
      "two_women_holding_hands",
      "man_and_woman_holding_hands",
      "two_men_holding_hands",
      "couplekiss",
      "woman-kiss-man",
      "man-kiss-man",
      "woman-kiss-woman",
      "couple_with_heart",
      "woman-heart-man",
      "man-heart-man",
      "woman-heart-woman",
      "family",
      "man-woman-boy",
      "man-woman-girl",
      "man-woman-girl-boy",
      "man-woman-boy-boy",
      "man-woman-girl-girl",
      "man-man-boy",
      "man-man-girl",
      "man-man-girl-boy",
      "man-man-boy-boy",
      "man-man-girl-girl",
      "woman-woman-boy",
      "woman-woman-girl",
      "woman-woman-girl-boy",
      "woman-woman-boy-boy",
      "woman-woman-girl-girl",
      "man-boy",
      "man-boy-boy",
      "man-girl",
      "man-girl-boy",
      "man-girl-girl",
      "woman-boy",
      "woman-boy-boy",
      "woman-girl",
      "woman-girl-boy",
      "woman-girl-girl",
      "speaking_head_in_silhouette",
      "bust_in_silhouette",
      "busts_in_silhouette",
      "people_hugging",
      "footprints",
      "robot_face",
      "smiley_cat",
      "smile_cat",
      "joy_cat",
      "heart_eyes_cat",
      "smirk_cat",
      "kissing_cat",
      "scream_cat",
      "crying_cat_face",
      "pouting_cat",
      "see_no_evil",
      "hear_no_evil",
      "speak_no_evil",
      "love_letter",
      "cupid",
      "gift_heart",
      "sparkling_heart",
      "heartpulse",
      "heartbeat",
      "revolving_hearts",
      "two_hearts",
      "heart_decoration",
      "heavy_heart_exclamation_mark_ornament",
      "broken_heart",
      "heart_on_fire",
      "mending_heart",
      "heart",
      "pink_heart",
      "orange_heart",
      "yellow_heart",
      "green_heart",
      "blue_heart",
      "light_blue_heart",
      "purple_heart",
      "brown_heart",
      "black_heart",
      "grey_heart",
      "white_heart",
      "kiss",
      "100",
      "anger",
      "boom",
      "dizzy",
      "sweat_drops",
      "dash",
      "hole",
      "speech_balloon",
      "eye-in-speech-bubble",
      "left_speech_bubble",
      "right_anger_bubble",
      "thought_balloon",
      "zzz"
    ]
  },
  {
    id: "nature",
    emojis: [
      "monkey_face",
      "monkey",
      "gorilla",
      "orangutan",
      "dog",
      "dog2",
      "guide_dog",
      "service_dog",
      "poodle",
      "wolf",
      "fox_face",
      "raccoon",
      "cat",
      "cat2",
      "black_cat",
      "lion_face",
      "tiger",
      "tiger2",
      "leopard",
      "horse",
      "moose",
      "donkey",
      "racehorse",
      "unicorn_face",
      "zebra_face",
      "deer",
      "bison",
      "cow",
      "ox",
      "water_buffalo",
      "cow2",
      "pig",
      "pig2",
      "boar",
      "pig_nose",
      "ram",
      "sheep",
      "goat",
      "dromedary_camel",
      "camel",
      "llama",
      "giraffe_face",
      "elephant",
      "mammoth",
      "rhinoceros",
      "hippopotamus",
      "mouse",
      "mouse2",
      "rat",
      "hamster",
      "rabbit",
      "rabbit2",
      "chipmunk",
      "beaver",
      "hedgehog",
      "bat",
      "bear",
      "polar_bear",
      "koala",
      "panda_face",
      "sloth",
      "otter",
      "skunk",
      "kangaroo",
      "badger",
      "feet",
      "turkey",
      "chicken",
      "rooster",
      "hatching_chick",
      "baby_chick",
      "hatched_chick",
      "bird",
      "penguin",
      "dove_of_peace",
      "eagle",
      "duck",
      "swan",
      "owl",
      "dodo",
      "feather",
      "flamingo",
      "peacock",
      "parrot",
      "wing",
      "black_bird",
      "goose",
      "frog",
      "crocodile",
      "turtle",
      "lizard",
      "snake",
      "dragon_face",
      "dragon",
      "sauropod",
      "t-rex",
      "whale",
      "whale2",
      "dolphin",
      "seal",
      "fish",
      "tropical_fish",
      "blowfish",
      "shark",
      "octopus",
      "shell",
      "coral",
      "jellyfish",
      "snail",
      "butterfly",
      "bug",
      "ant",
      "bee",
      "beetle",
      "ladybug",
      "cricket",
      "cockroach",
      "spider",
      "spider_web",
      "scorpion",
      "mosquito",
      "fly",
      "worm",
      "microbe",
      "bouquet",
      "cherry_blossom",
      "white_flower",
      "lotus",
      "rosette",
      "rose",
      "wilted_flower",
      "hibiscus",
      "sunflower",
      "blossom",
      "tulip",
      "hyacinth",
      "seedling",
      "potted_plant",
      "evergreen_tree",
      "deciduous_tree",
      "palm_tree",
      "cactus",
      "ear_of_rice",
      "herb",
      "shamrock",
      "four_leaf_clover",
      "maple_leaf",
      "fallen_leaf",
      "leaves",
      "empty_nest",
      "nest_with_eggs",
      "mushroom"
    ]
  },
  {
    id: "foods",
    emojis: [
      "grapes",
      "melon",
      "watermelon",
      "tangerine",
      "lemon",
      "banana",
      "pineapple",
      "mango",
      "apple",
      "green_apple",
      "pear",
      "peach",
      "cherries",
      "strawberry",
      "blueberries",
      "kiwifruit",
      "tomato",
      "olive",
      "coconut",
      "avocado",
      "eggplant",
      "potato",
      "carrot",
      "corn",
      "hot_pepper",
      "bell_pepper",
      "cucumber",
      "leafy_green",
      "broccoli",
      "garlic",
      "onion",
      "peanuts",
      "beans",
      "chestnut",
      "ginger_root",
      "pea_pod",
      "bread",
      "croissant",
      "baguette_bread",
      "flatbread",
      "pretzel",
      "bagel",
      "pancakes",
      "waffle",
      "cheese_wedge",
      "meat_on_bone",
      "poultry_leg",
      "cut_of_meat",
      "bacon",
      "hamburger",
      "fries",
      "pizza",
      "hotdog",
      "sandwich",
      "taco",
      "burrito",
      "tamale",
      "stuffed_flatbread",
      "falafel",
      "egg",
      "fried_egg",
      "shallow_pan_of_food",
      "stew",
      "fondue",
      "bowl_with_spoon",
      "green_salad",
      "popcorn",
      "butter",
      "salt",
      "canned_food",
      "bento",
      "rice_cracker",
      "rice_ball",
      "rice",
      "curry",
      "ramen",
      "spaghetti",
      "sweet_potato",
      "oden",
      "sushi",
      "fried_shrimp",
      "fish_cake",
      "moon_cake",
      "dango",
      "dumpling",
      "fortune_cookie",
      "takeout_box",
      "crab",
      "lobster",
      "shrimp",
      "squid",
      "oyster",
      "icecream",
      "shaved_ice",
      "ice_cream",
      "doughnut",
      "cookie",
      "birthday",
      "cake",
      "cupcake",
      "pie",
      "chocolate_bar",
      "candy",
      "lollipop",
      "custard",
      "honey_pot",
      "baby_bottle",
      "glass_of_milk",
      "coffee",
      "teapot",
      "tea",
      "sake",
      "champagne",
      "wine_glass",
      "cocktail",
      "tropical_drink",
      "beer",
      "beers",
      "clinking_glasses",
      "tumbler_glass",
      "pouring_liquid",
      "cup_with_straw",
      "bubble_tea",
      "beverage_box",
      "mate_drink",
      "ice_cube",
      "chopsticks",
      "knife_fork_plate",
      "fork_and_knife",
      "spoon",
      "hocho",
      "jar",
      "amphora"
    ]
  },
  {
    id: "activity",
    emojis: [
      "jack_o_lantern",
      "christmas_tree",
      "fireworks",
      "sparkler",
      "firecracker",
      "sparkles",
      "balloon",
      "tada",
      "confetti_ball",
      "tanabata_tree",
      "bamboo",
      "dolls",
      "flags",
      "wind_chime",
      "rice_scene",
      "red_envelope",
      "ribbon",
      "gift",
      "reminder_ribbon",
      "admission_tickets",
      "ticket",
      "medal",
      "trophy",
      "sports_medal",
      "first_place_medal",
      "second_place_medal",
      "third_place_medal",
      "soccer",
      "baseball",
      "softball",
      "basketball",
      "volleyball",
      "football",
      "rugby_football",
      "tennis",
      "flying_disc",
      "bowling",
      "cricket_bat_and_ball",
      "field_hockey_stick_and_ball",
      "ice_hockey_stick_and_puck",
      "lacrosse",
      "table_tennis_paddle_and_ball",
      "badminton_racquet_and_shuttlecock",
      "boxing_glove",
      "martial_arts_uniform",
      "goal_net",
      "golf",
      "ice_skate",
      "fishing_pole_and_fish",
      "diving_mask",
      "running_shirt_with_sash",
      "ski",
      "sled",
      "curling_stone",
      "dart",
      "yo-yo",
      "kite",
      "gun",
      "8ball",
      "crystal_ball",
      "magic_wand",
      "video_game",
      "joystick",
      "slot_machine",
      "game_die",
      "jigsaw",
      "teddy_bear",
      "pinata",
      "mirror_ball",
      "nesting_dolls",
      "spades",
      "hearts",
      "diamonds",
      "clubs",
      "chess_pawn",
      "black_joker",
      "mahjong",
      "flower_playing_cards",
      "performing_arts",
      "frame_with_picture",
      "art",
      "thread",
      "sewing_needle",
      "yarn",
      "knot"
    ]
  },
  {
    id: "places",
    emojis: [
      "earth_africa",
      "earth_americas",
      "earth_asia",
      "globe_with_meridians",
      "world_map",
      "japan",
      "compass",
      "snow_capped_mountain",
      "mountain",
      "volcano",
      "mount_fuji",
      "camping",
      "beach_with_umbrella",
      "desert",
      "desert_island",
      "national_park",
      "stadium",
      "classical_building",
      "building_construction",
      "bricks",
      "rock",
      "wood",
      "hut",
      "house_buildings",
      "derelict_house_building",
      "house",
      "house_with_garden",
      "office",
      "post_office",
      "european_post_office",
      "hospital",
      "bank",
      "hotel",
      "love_hotel",
      "convenience_store",
      "school",
      "department_store",
      "factory",
      "japanese_castle",
      "european_castle",
      "wedding",
      "tokyo_tower",
      "statue_of_liberty",
      "church",
      "mosque",
      "hindu_temple",
      "synagogue",
      "shinto_shrine",
      "kaaba",
      "fountain",
      "tent",
      "foggy",
      "night_with_stars",
      "cityscape",
      "sunrise_over_mountains",
      "sunrise",
      "city_sunset",
      "city_sunrise",
      "bridge_at_night",
      "hotsprings",
      "carousel_horse",
      "playground_slide",
      "ferris_wheel",
      "roller_coaster",
      "barber",
      "circus_tent",
      "steam_locomotive",
      "railway_car",
      "bullettrain_side",
      "bullettrain_front",
      "train2",
      "metro",
      "light_rail",
      "station",
      "tram",
      "monorail",
      "mountain_railway",
      "train",
      "bus",
      "oncoming_bus",
      "trolleybus",
      "minibus",
      "ambulance",
      "fire_engine",
      "police_car",
      "oncoming_police_car",
      "taxi",
      "oncoming_taxi",
      "car",
      "oncoming_automobile",
      "blue_car",
      "pickup_truck",
      "truck",
      "articulated_lorry",
      "tractor",
      "racing_car",
      "racing_motorcycle",
      "motor_scooter",
      "manual_wheelchair",
      "motorized_wheelchair",
      "auto_rickshaw",
      "bike",
      "scooter",
      "skateboard",
      "roller_skate",
      "busstop",
      "motorway",
      "railway_track",
      "oil_drum",
      "fuelpump",
      "wheel",
      "rotating_light",
      "traffic_light",
      "vertical_traffic_light",
      "octagonal_sign",
      "construction",
      "anchor",
      "ring_buoy",
      "boat",
      "canoe",
      "speedboat",
      "passenger_ship",
      "ferry",
      "motor_boat",
      "ship",
      "airplane",
      "small_airplane",
      "airplane_departure",
      "airplane_arriving",
      "parachute",
      "seat",
      "helicopter",
      "suspension_railway",
      "mountain_cableway",
      "aerial_tramway",
      "satellite",
      "rocket",
      "flying_saucer",
      "bellhop_bell",
      "luggage",
      "hourglass",
      "hourglass_flowing_sand",
      "watch",
      "alarm_clock",
      "stopwatch",
      "timer_clock",
      "mantelpiece_clock",
      "clock12",
      "clock1230",
      "clock1",
      "clock130",
      "clock2",
      "clock230",
      "clock3",
      "clock330",
      "clock4",
      "clock430",
      "clock5",
      "clock530",
      "clock6",
      "clock630",
      "clock7",
      "clock730",
      "clock8",
      "clock830",
      "clock9",
      "clock930",
      "clock10",
      "clock1030",
      "clock11",
      "clock1130",
      "new_moon",
      "waxing_crescent_moon",
      "first_quarter_moon",
      "moon",
      "full_moon",
      "waning_gibbous_moon",
      "last_quarter_moon",
      "waning_crescent_moon",
      "crescent_moon",
      "new_moon_with_face",
      "first_quarter_moon_with_face",
      "last_quarter_moon_with_face",
      "thermometer",
      "sunny",
      "full_moon_with_face",
      "sun_with_face",
      "ringed_planet",
      "star",
      "star2",
      "stars",
      "milky_way",
      "cloud",
      "partly_sunny",
      "thunder_cloud_and_rain",
      "mostly_sunny",
      "barely_sunny",
      "partly_sunny_rain",
      "rain_cloud",
      "snow_cloud",
      "lightning",
      "tornado",
      "fog",
      "wind_blowing_face",
      "cyclone",
      "rainbow",
      "closed_umbrella",
      "umbrella",
      "umbrella_with_rain_drops",
      "umbrella_on_ground",
      "zap",
      "snowflake",
      "snowman",
      "snowman_without_snow",
      "comet",
      "fire",
      "droplet",
      "ocean"
    ]
  },
  {
    id: "objects",
    emojis: [
      "eyeglasses",
      "dark_sunglasses",
      "goggles",
      "lab_coat",
      "safety_vest",
      "necktie",
      "shirt",
      "jeans",
      "scarf",
      "gloves",
      "coat",
      "socks",
      "dress",
      "kimono",
      "sari",
      "one-piece_swimsuit",
      "briefs",
      "shorts",
      "bikini",
      "womans_clothes",
      "folding_hand_fan",
      "purse",
      "handbag",
      "pouch",
      "shopping_bags",
      "school_satchel",
      "thong_sandal",
      "mans_shoe",
      "athletic_shoe",
      "hiking_boot",
      "womans_flat_shoe",
      "high_heel",
      "sandal",
      "ballet_shoes",
      "boot",
      "hair_pick",
      "crown",
      "womans_hat",
      "tophat",
      "mortar_board",
      "billed_cap",
      "military_helmet",
      "helmet_with_white_cross",
      "prayer_beads",
      "lipstick",
      "ring",
      "gem",
      "mute",
      "speaker",
      "sound",
      "loud_sound",
      "loudspeaker",
      "mega",
      "postal_horn",
      "bell",
      "no_bell",
      "musical_score",
      "musical_note",
      "notes",
      "studio_microphone",
      "level_slider",
      "control_knobs",
      "microphone",
      "headphones",
      "radio",
      "saxophone",
      "accordion",
      "guitar",
      "musical_keyboard",
      "trumpet",
      "violin",
      "banjo",
      "drum_with_drumsticks",
      "long_drum",
      "maracas",
      "flute",
      "iphone",
      "calling",
      "phone",
      "telephone_receiver",
      "pager",
      "fax",
      "battery",
      "low_battery",
      "electric_plug",
      "computer",
      "desktop_computer",
      "printer",
      "keyboard",
      "three_button_mouse",
      "trackball",
      "minidisc",
      "floppy_disk",
      "cd",
      "dvd",
      "abacus",
      "movie_camera",
      "film_frames",
      "film_projector",
      "clapper",
      "tv",
      "camera",
      "camera_with_flash",
      "video_camera",
      "vhs",
      "mag",
      "mag_right",
      "candle",
      "bulb",
      "flashlight",
      "izakaya_lantern",
      "diya_lamp",
      "notebook_with_decorative_cover",
      "closed_book",
      "book",
      "green_book",
      "blue_book",
      "orange_book",
      "books",
      "notebook",
      "ledger",
      "page_with_curl",
      "scroll",
      "page_facing_up",
      "newspaper",
      "rolled_up_newspaper",
      "bookmark_tabs",
      "bookmark",
      "label",
      "moneybag",
      "coin",
      "yen",
      "dollar",
      "euro",
      "pound",
      "money_with_wings",
      "credit_card",
      "receipt",
      "chart",
      "email",
      "e-mail",
      "incoming_envelope",
      "envelope_with_arrow",
      "outbox_tray",
      "inbox_tray",
      "package",
      "mailbox",
      "mailbox_closed",
      "mailbox_with_mail",
      "mailbox_with_no_mail",
      "postbox",
      "ballot_box_with_ballot",
      "pencil2",
      "black_nib",
      "lower_left_fountain_pen",
      "lower_left_ballpoint_pen",
      "lower_left_paintbrush",
      "lower_left_crayon",
      "memo",
      "briefcase",
      "file_folder",
      "open_file_folder",
      "card_index_dividers",
      "date",
      "calendar",
      "spiral_note_pad",
      "spiral_calendar_pad",
      "card_index",
      "chart_with_upwards_trend",
      "chart_with_downwards_trend",
      "bar_chart",
      "clipboard",
      "pushpin",
      "round_pushpin",
      "paperclip",
      "linked_paperclips",
      "straight_ruler",
      "triangular_ruler",
      "scissors",
      "card_file_box",
      "file_cabinet",
      "wastebasket",
      "lock",
      "unlock",
      "lock_with_ink_pen",
      "closed_lock_with_key",
      "key",
      "old_key",
      "hammer",
      "axe",
      "pick",
      "hammer_and_pick",
      "hammer_and_wrench",
      "dagger_knife",
      "crossed_swords",
      "bomb",
      "boomerang",
      "bow_and_arrow",
      "shield",
      "carpentry_saw",
      "wrench",
      "screwdriver",
      "nut_and_bolt",
      "gear",
      "compression",
      "scales",
      "probing_cane",
      "link",
      "chains",
      "hook",
      "toolbox",
      "magnet",
      "ladder",
      "alembic",
      "test_tube",
      "petri_dish",
      "dna",
      "microscope",
      "telescope",
      "satellite_antenna",
      "syringe",
      "drop_of_blood",
      "pill",
      "adhesive_bandage",
      "crutch",
      "stethoscope",
      "x-ray",
      "door",
      "elevator",
      "mirror",
      "window",
      "bed",
      "couch_and_lamp",
      "chair",
      "toilet",
      "plunger",
      "shower",
      "bathtub",
      "mouse_trap",
      "razor",
      "lotion_bottle",
      "safety_pin",
      "broom",
      "basket",
      "roll_of_paper",
      "bucket",
      "soap",
      "bubbles",
      "toothbrush",
      "sponge",
      "fire_extinguisher",
      "shopping_trolley",
      "smoking",
      "coffin",
      "headstone",
      "funeral_urn",
      "nazar_amulet",
      "hamsa",
      "moyai",
      "placard",
      "identification_card"
    ]
  },
  {
    id: "symbols",
    emojis: [
      "atm",
      "put_litter_in_its_place",
      "potable_water",
      "wheelchair",
      "mens",
      "womens",
      "restroom",
      "baby_symbol",
      "wc",
      "passport_control",
      "customs",
      "baggage_claim",
      "left_luggage",
      "warning",
      "children_crossing",
      "no_entry",
      "no_entry_sign",
      "no_bicycles",
      "no_smoking",
      "do_not_litter",
      "non-potable_water",
      "no_pedestrians",
      "no_mobile_phones",
      "underage",
      "radioactive_sign",
      "biohazard_sign",
      "arrow_up",
      "arrow_upper_right",
      "arrow_right",
      "arrow_lower_right",
      "arrow_down",
      "arrow_lower_left",
      "arrow_left",
      "arrow_upper_left",
      "arrow_up_down",
      "left_right_arrow",
      "leftwards_arrow_with_hook",
      "arrow_right_hook",
      "arrow_heading_up",
      "arrow_heading_down",
      "arrows_clockwise",
      "arrows_counterclockwise",
      "back",
      "end",
      "on",
      "soon",
      "top",
      "place_of_worship",
      "atom_symbol",
      "om_symbol",
      "star_of_david",
      "wheel_of_dharma",
      "yin_yang",
      "latin_cross",
      "orthodox_cross",
      "star_and_crescent",
      "peace_symbol",
      "menorah_with_nine_branches",
      "six_pointed_star",
      "khanda",
      "aries",
      "taurus",
      "gemini",
      "cancer",
      "leo",
      "virgo",
      "libra",
      "scorpius",
      "sagittarius",
      "capricorn",
      "aquarius",
      "pisces",
      "ophiuchus",
      "twisted_rightwards_arrows",
      "repeat",
      "repeat_one",
      "arrow_forward",
      "fast_forward",
      "black_right_pointing_double_triangle_with_vertical_bar",
      "black_right_pointing_triangle_with_double_vertical_bar",
      "arrow_backward",
      "rewind",
      "black_left_pointing_double_triangle_with_vertical_bar",
      "arrow_up_small",
      "arrow_double_up",
      "arrow_down_small",
      "arrow_double_down",
      "double_vertical_bar",
      "black_square_for_stop",
      "black_circle_for_record",
      "eject",
      "cinema",
      "low_brightness",
      "high_brightness",
      "signal_strength",
      "wireless",
      "vibration_mode",
      "mobile_phone_off",
      "female_sign",
      "male_sign",
      "transgender_symbol",
      "heavy_multiplication_x",
      "heavy_plus_sign",
      "heavy_minus_sign",
      "heavy_division_sign",
      "heavy_equals_sign",
      "infinity",
      "bangbang",
      "interrobang",
      "question",
      "grey_question",
      "grey_exclamation",
      "exclamation",
      "wavy_dash",
      "currency_exchange",
      "heavy_dollar_sign",
      "medical_symbol",
      "recycle",
      "fleur_de_lis",
      "trident",
      "name_badge",
      "beginner",
      "o",
      "white_check_mark",
      "ballot_box_with_check",
      "heavy_check_mark",
      "x",
      "negative_squared_cross_mark",
      "curly_loop",
      "loop",
      "part_alternation_mark",
      "eight_spoked_asterisk",
      "eight_pointed_black_star",
      "sparkle",
      "copyright",
      "registered",
      "tm",
      "hash",
      "keycap_star",
      "zero",
      "one",
      "two",
      "three",
      "four",
      "five",
      "six",
      "seven",
      "eight",
      "nine",
      "keycap_ten",
      "capital_abcd",
      "abcd",
      "1234",
      "symbols",
      "abc",
      "a",
      "ab",
      "b",
      "cl",
      "cool",
      "free",
      "information_source",
      "id",
      "m",
      "new",
      "ng",
      "o2",
      "ok",
      "parking",
      "sos",
      "up",
      "vs",
      "koko",
      "sa",
      "u6708",
      "u6709",
      "u6307",
      "ideograph_advantage",
      "u5272",
      "u7121",
      "u7981",
      "accept",
      "u7533",
      "u5408",
      "u7a7a",
      "congratulations",
      "secret",
      "u55b6",
      "u6e80",
      "red_circle",
      "large_orange_circle",
      "large_yellow_circle",
      "large_green_circle",
      "large_blue_circle",
      "large_purple_circle",
      "large_brown_circle",
      "black_circle",
      "white_circle",
      "large_red_square",
      "large_orange_square",
      "large_yellow_square",
      "large_green_square",
      "large_blue_square",
      "large_purple_square",
      "large_brown_square",
      "black_large_square",
      "white_large_square",
      "black_medium_square",
      "white_medium_square",
      "black_medium_small_square",
      "white_medium_small_square",
      "black_small_square",
      "white_small_square",
      "large_orange_diamond",
      "large_blue_diamond",
      "small_orange_diamond",
      "small_blue_diamond",
      "small_red_triangle",
      "small_red_triangle_down",
      "diamond_shape_with_a_dot_inside",
      "radio_button",
      "white_square_button",
      "black_square_button"
    ]
  },
  {
    id: "flags",
    emojis: [
      "checkered_flag",
      "cn",
      "crossed_flags",
      "de",
      "es",
      "flag-ac",
      "flag-ad",
      "flag-ae",
      "flag-af",
      "flag-ag",
      "flag-ai",
      "flag-al",
      "flag-am",
      "flag-ao",
      "flag-aq",
      "flag-ar",
      "flag-as",
      "flag-at",
      "flag-au",
      "flag-aw",
      "flag-ax",
      "flag-az",
      "flag-ba",
      "flag-bb",
      "flag-bd",
      "flag-be",
      "flag-bf",
      "flag-bg",
      "flag-bh",
      "flag-bi",
      "flag-bj",
      "flag-bl",
      "flag-bm",
      "flag-bn",
      "flag-bo",
      "flag-bq",
      "flag-br",
      "flag-bs",
      "flag-bt",
      "flag-bv",
      "flag-bw",
      "flag-by",
      "flag-bz",
      "flag-ca",
      "flag-cc",
      "flag-cd",
      "flag-cf",
      "flag-cg",
      "flag-ch",
      "flag-ci",
      "flag-ck",
      "flag-cl",
      "flag-cm",
      "flag-co",
      "flag-cp",
      "flag-cr",
      "flag-cu",
      "flag-cv",
      "flag-cw",
      "flag-cx",
      "flag-cy",
      "flag-cz",
      "flag-dg",
      "flag-dj",
      "flag-dk",
      "flag-dm",
      "flag-do",
      "flag-dz",
      "flag-ea",
      "flag-ec",
      "flag-ee",
      "flag-eg",
      "flag-eh",
      "flag-england",
      "flag-er",
      "flag-et",
      "flag-eu",
      "flag-fi",
      "flag-fj",
      "flag-fk",
      "flag-fm",
      "flag-fo",
      "flag-ga",
      "flag-gd",
      "flag-ge",
      "flag-gf",
      "flag-gg",
      "flag-gh",
      "flag-gi",
      "flag-gl",
      "flag-gm",
      "flag-gn",
      "flag-gp",
      "flag-gq",
      "flag-gr",
      "flag-gs",
      "flag-gt",
      "flag-gu",
      "flag-gw",
      "flag-gy",
      "flag-hk",
      "flag-hm",
      "flag-hn",
      "flag-hr",
      "flag-ht",
      "flag-hu",
      "flag-ic",
      "flag-id",
      "flag-ie",
      "flag-il",
      "flag-im",
      "flag-in",
      "flag-io",
      "flag-iq",
      "flag-ir",
      "flag-is",
      "flag-je",
      "flag-jm",
      "flag-jo",
      "flag-ke",
      "flag-kg",
      "flag-kh",
      "flag-ki",
      "flag-km",
      "flag-kn",
      "flag-kp",
      "flag-kw",
      "flag-ky",
      "flag-kz",
      "flag-la",
      "flag-lb",
      "flag-lc",
      "flag-li",
      "flag-lk",
      "flag-lr",
      "flag-ls",
      "flag-lt",
      "flag-lu",
      "flag-lv",
      "flag-ly",
      "flag-ma",
      "flag-mc",
      "flag-md",
      "flag-me",
      "flag-mf",
      "flag-mg",
      "flag-mh",
      "flag-mk",
      "flag-ml",
      "flag-mm",
      "flag-mn",
      "flag-mo",
      "flag-mp",
      "flag-mq",
      "flag-mr",
      "flag-ms",
      "flag-mt",
      "flag-mu",
      "flag-mv",
      "flag-mw",
      "flag-mx",
      "flag-my",
      "flag-mz",
      "flag-na",
      "flag-nc",
      "flag-ne",
      "flag-nf",
      "flag-ng",
      "flag-ni",
      "flag-nl",
      "flag-no",
      "flag-np",
      "flag-nr",
      "flag-nu",
      "flag-nz",
      "flag-om",
      "flag-pa",
      "flag-pe",
      "flag-pf",
      "flag-pg",
      "flag-ph",
      "flag-pk",
      "flag-pl",
      "flag-pm",
      "flag-pn",
      "flag-pr",
      "flag-ps",
      "flag-pt",
      "flag-pw",
      "flag-py",
      "flag-qa",
      "flag-re",
      "flag-ro",
      "flag-rs",
      "flag-rw",
      "flag-sa",
      "flag-sb",
      "flag-sc",
      "flag-scotland",
      "flag-sd",
      "flag-se",
      "flag-sg",
      "flag-sh",
      "flag-si",
      "flag-sj",
      "flag-sk",
      "flag-sl",
      "flag-sm",
      "flag-sn",
      "flag-so",
      "flag-sr",
      "flag-ss",
      "flag-st",
      "flag-sv",
      "flag-sx",
      "flag-sy",
      "flag-sz",
      "flag-ta",
      "flag-tc",
      "flag-td",
      "flag-tf",
      "flag-tg",
      "flag-th",
      "flag-tj",
      "flag-tk",
      "flag-tl",
      "flag-tm",
      "flag-tn",
      "flag-to",
      "flag-tr",
      "flag-tt",
      "flag-tv",
      "flag-tw",
      "flag-tz",
      "flag-ua",
      "flag-ug",
      "flag-um",
      "flag-un",
      "flag-uy",
      "flag-uz",
      "flag-va",
      "flag-vc",
      "flag-ve",
      "flag-vg",
      "flag-vi",
      "flag-vn",
      "flag-vu",
      "flag-wales",
      "flag-wf",
      "flag-ws",
      "flag-xk",
      "flag-ye",
      "flag-yt",
      "flag-za",
      "flag-zm",
      "flag-zw",
      "fr",
      "gb",
      "it",
      "jp",
      "kr",
      "pirate_flag",
      "rainbow-flag",
      "ru",
      "transgender_flag",
      "triangular_flag_on_post",
      "us",
      "waving_black_flag",
      "waving_white_flag"
    ]
  }
], CCe = {
  100: {
    id: "100",
    name: "Hundred Points",
    keywords: [
      "100",
      "score",
      "perfect",
      "numbers",
      "century",
      "exam",
      "quiz",
      "test",
      "pass"
    ],
    skins: [
      {
        unified: "1f4af",
        native: "💯"
      }
    ],
    version: 1
  },
  1234: {
    id: "1234",
    name: "Input Numbers",
    keywords: [
      "1234",
      "blue",
      "square",
      "1",
      "2",
      "3",
      "4"
    ],
    skins: [
      {
        unified: "1f522",
        native: "🔢"
      }
    ],
    version: 1
  },
  grinning: {
    id: "grinning",
    name: "Grinning Face",
    emoticons: [
      ":D"
    ],
    keywords: [
      "smile",
      "happy",
      "joy",
      ":D",
      "grin"
    ],
    skins: [
      {
        unified: "1f600",
        native: "😀"
      }
    ],
    version: 1
  },
  smiley: {
    id: "smiley",
    name: "Grinning Face with Big Eyes",
    emoticons: [
      ":)",
      "=)",
      "=-)"
    ],
    keywords: [
      "smiley",
      "happy",
      "joy",
      "haha",
      ":D",
      ":)",
      "smile",
      "funny"
    ],
    skins: [
      {
        unified: "1f603",
        native: "😃"
      }
    ],
    version: 1
  },
  smile: {
    id: "smile",
    name: "Grinning Face with Smiling Eyes",
    emoticons: [
      ":)",
      "C:",
      "c:",
      ":D",
      ":-D"
    ],
    keywords: [
      "smile",
      "happy",
      "joy",
      "funny",
      "haha",
      "laugh",
      "like",
      ":D",
      ":)"
    ],
    skins: [
      {
        unified: "1f604",
        native: "😄"
      }
    ],
    version: 1
  },
  grin: {
    id: "grin",
    name: "Beaming Face with Smiling Eyes",
    keywords: [
      "grin",
      "happy",
      "smile",
      "joy",
      "kawaii"
    ],
    skins: [
      {
        unified: "1f601",
        native: "😁"
      }
    ],
    version: 1
  },
  laughing: {
    id: "laughing",
    name: "Grinning Squinting Face",
    emoticons: [
      ":>",
      ":->"
    ],
    keywords: [
      "laughing",
      "satisfied",
      "happy",
      "joy",
      "lol",
      "haha",
      "glad",
      "XD",
      "laugh"
    ],
    skins: [
      {
        unified: "1f606",
        native: "😆"
      }
    ],
    version: 1
  },
  sweat_smile: {
    id: "sweat_smile",
    name: "Grinning Face with Sweat",
    keywords: [
      "smile",
      "hot",
      "happy",
      "laugh",
      "relief"
    ],
    skins: [
      {
        unified: "1f605",
        native: "😅"
      }
    ],
    version: 1
  },
  rolling_on_the_floor_laughing: {
    id: "rolling_on_the_floor_laughing",
    name: "Rolling on the Floor Laughing",
    keywords: [
      "face",
      "lol",
      "haha",
      "rofl"
    ],
    skins: [
      {
        unified: "1f923",
        native: "🤣"
      }
    ],
    version: 3
  },
  joy: {
    id: "joy",
    name: "Face with Tears of Joy",
    keywords: [
      "cry",
      "weep",
      "happy",
      "happytears",
      "haha"
    ],
    skins: [
      {
        unified: "1f602",
        native: "😂"
      }
    ],
    version: 1
  },
  slightly_smiling_face: {
    id: "slightly_smiling_face",
    name: "Slightly Smiling Face",
    emoticons: [
      ":)",
      "(:",
      ":-)"
    ],
    keywords: [
      "smile"
    ],
    skins: [
      {
        unified: "1f642",
        native: "🙂"
      }
    ],
    version: 1
  },
  upside_down_face: {
    id: "upside_down_face",
    name: "Upside-Down Face",
    keywords: [
      "upside",
      "down",
      "flipped",
      "silly",
      "smile"
    ],
    skins: [
      {
        unified: "1f643",
        native: "🙃"
      }
    ],
    version: 1
  },
  melting_face: {
    id: "melting_face",
    name: "Melting Face",
    keywords: [
      "hot",
      "heat"
    ],
    skins: [
      {
        unified: "1fae0",
        native: "🫠"
      }
    ],
    version: 14
  },
  wink: {
    id: "wink",
    name: "Winking Face",
    emoticons: [
      ";)",
      ";-)"
    ],
    keywords: [
      "wink",
      "happy",
      "mischievous",
      "secret",
      ";)",
      "smile",
      "eye"
    ],
    skins: [
      {
        unified: "1f609",
        native: "😉"
      }
    ],
    version: 1
  },
  blush: {
    id: "blush",
    name: "Smiling Face with Smiling Eyes",
    emoticons: [
      ":)"
    ],
    keywords: [
      "blush",
      "smile",
      "happy",
      "flushed",
      "crush",
      "embarrassed",
      "shy",
      "joy"
    ],
    skins: [
      {
        unified: "1f60a",
        native: "😊"
      }
    ],
    version: 1
  },
  innocent: {
    id: "innocent",
    name: "Smiling Face with Halo",
    keywords: [
      "innocent",
      "angel",
      "heaven"
    ],
    skins: [
      {
        unified: "1f607",
        native: "😇"
      }
    ],
    version: 1
  },
  smiling_face_with_3_hearts: {
    id: "smiling_face_with_3_hearts",
    name: "Smiling Face with Hearts",
    keywords: [
      "3",
      "love",
      "like",
      "affection",
      "valentines",
      "infatuation",
      "crush",
      "adore"
    ],
    skins: [
      {
        unified: "1f970",
        native: "🥰"
      }
    ],
    version: 11
  },
  heart_eyes: {
    id: "heart_eyes",
    name: "Smiling Face with Heart-Eyes",
    keywords: [
      "heart",
      "eyes",
      "love",
      "like",
      "affection",
      "valentines",
      "infatuation",
      "crush"
    ],
    skins: [
      {
        unified: "1f60d",
        native: "😍"
      }
    ],
    version: 1
  },
  "star-struck": {
    id: "star-struck",
    name: "Star-Struck",
    keywords: [
      "star",
      "struck",
      "grinning",
      "face",
      "with",
      "eyes",
      "smile",
      "starry"
    ],
    skins: [
      {
        unified: "1f929",
        native: "🤩"
      }
    ],
    version: 5
  },
  kissing_heart: {
    id: "kissing_heart",
    name: "Face Blowing a Kiss",
    emoticons: [
      ":*",
      ":-*"
    ],
    keywords: [
      "kissing",
      "heart",
      "love",
      "like",
      "affection",
      "valentines",
      "infatuation"
    ],
    skins: [
      {
        unified: "1f618",
        native: "😘"
      }
    ],
    version: 1
  },
  kissing: {
    id: "kissing",
    name: "Kissing Face",
    keywords: [
      "love",
      "like",
      "3",
      "valentines",
      "infatuation",
      "kiss"
    ],
    skins: [
      {
        unified: "1f617",
        native: "😗"
      }
    ],
    version: 1
  },
  relaxed: {
    id: "relaxed",
    name: "Smiling Face",
    keywords: [
      "relaxed",
      "blush",
      "massage",
      "happiness"
    ],
    skins: [
      {
        unified: "263a-fe0f",
        native: "☺️"
      }
    ],
    version: 1
  },
  kissing_closed_eyes: {
    id: "kissing_closed_eyes",
    name: "Kissing Face with Closed Eyes",
    keywords: [
      "love",
      "like",
      "affection",
      "valentines",
      "infatuation",
      "kiss"
    ],
    skins: [
      {
        unified: "1f61a",
        native: "😚"
      }
    ],
    version: 1
  },
  kissing_smiling_eyes: {
    id: "kissing_smiling_eyes",
    name: "Kissing Face with Smiling Eyes",
    keywords: [
      "affection",
      "valentines",
      "infatuation",
      "kiss"
    ],
    skins: [
      {
        unified: "1f619",
        native: "😙"
      }
    ],
    version: 1
  },
  smiling_face_with_tear: {
    id: "smiling_face_with_tear",
    name: "Smiling Face with Tear",
    keywords: [
      "sad",
      "cry",
      "pretend"
    ],
    skins: [
      {
        unified: "1f972",
        native: "🥲"
      }
    ],
    version: 13
  },
  yum: {
    id: "yum",
    name: "Face Savoring Food",
    keywords: [
      "yum",
      "happy",
      "joy",
      "tongue",
      "smile",
      "silly",
      "yummy",
      "nom",
      "delicious",
      "savouring"
    ],
    skins: [
      {
        unified: "1f60b",
        native: "😋"
      }
    ],
    version: 1
  },
  stuck_out_tongue: {
    id: "stuck_out_tongue",
    name: "Face with Tongue",
    emoticons: [
      ":p",
      ":-p",
      ":P",
      ":-P",
      ":b",
      ":-b"
    ],
    keywords: [
      "stuck",
      "out",
      "prank",
      "childish",
      "playful",
      "mischievous",
      "smile"
    ],
    skins: [
      {
        unified: "1f61b",
        native: "😛"
      }
    ],
    version: 1
  },
  stuck_out_tongue_winking_eye: {
    id: "stuck_out_tongue_winking_eye",
    name: "Winking Face with Tongue",
    emoticons: [
      ";p",
      ";-p",
      ";b",
      ";-b",
      ";P",
      ";-P"
    ],
    keywords: [
      "stuck",
      "out",
      "eye",
      "prank",
      "childish",
      "playful",
      "mischievous",
      "smile",
      "wink"
    ],
    skins: [
      {
        unified: "1f61c",
        native: "😜"
      }
    ],
    version: 1
  },
  zany_face: {
    id: "zany_face",
    name: "Zany Face",
    keywords: [
      "grinning",
      "with",
      "one",
      "large",
      "and",
      "small",
      "eye",
      "goofy",
      "crazy"
    ],
    skins: [
      {
        unified: "1f92a",
        native: "🤪"
      }
    ],
    version: 5
  },
  stuck_out_tongue_closed_eyes: {
    id: "stuck_out_tongue_closed_eyes",
    name: "Squinting Face with Tongue",
    keywords: [
      "stuck",
      "out",
      "closed",
      "eyes",
      "prank",
      "playful",
      "mischievous",
      "smile"
    ],
    skins: [
      {
        unified: "1f61d",
        native: "😝"
      }
    ],
    version: 1
  },
  money_mouth_face: {
    id: "money_mouth_face",
    name: "Money-Mouth Face",
    keywords: [
      "money",
      "mouth",
      "rich",
      "dollar"
    ],
    skins: [
      {
        unified: "1f911",
        native: "🤑"
      }
    ],
    version: 1
  },
  hugging_face: {
    id: "hugging_face",
    name: "Hugging Face",
    keywords: [
      "smile",
      "hug"
    ],
    skins: [
      {
        unified: "1f917",
        native: "🤗"
      }
    ],
    version: 1
  },
  face_with_hand_over_mouth: {
    id: "face_with_hand_over_mouth",
    name: "Face with Hand over Mouth",
    keywords: [
      "smiling",
      "eyes",
      "and",
      "covering",
      "whoops",
      "shock",
      "surprise"
    ],
    skins: [
      {
        unified: "1f92d",
        native: "🤭"
      }
    ],
    version: 5
  },
  face_with_open_eyes_and_hand_over_mouth: {
    id: "face_with_open_eyes_and_hand_over_mouth",
    name: "Face with Open Eyes and Hand over Mouth",
    keywords: [
      "silence",
      "secret",
      "shock",
      "surprise"
    ],
    skins: [
      {
        unified: "1fae2",
        native: "🫢"
      }
    ],
    version: 14
  },
  face_with_peeking_eye: {
    id: "face_with_peeking_eye",
    name: "Face with Peeking Eye",
    keywords: [
      "scared",
      "frightening",
      "embarrassing",
      "shy"
    ],
    skins: [
      {
        unified: "1fae3",
        native: "🫣"
      }
    ],
    version: 14
  },
  shushing_face: {
    id: "shushing_face",
    name: "Shushing Face",
    keywords: [
      "with",
      "finger",
      "covering",
      "closed",
      "lips",
      "quiet",
      "shhh"
    ],
    skins: [
      {
        unified: "1f92b",
        native: "🤫"
      }
    ],
    version: 5
  },
  thinking_face: {
    id: "thinking_face",
    name: "Thinking Face",
    keywords: [
      "hmmm",
      "think",
      "consider"
    ],
    skins: [
      {
        unified: "1f914",
        native: "🤔"
      }
    ],
    version: 1
  },
  saluting_face: {
    id: "saluting_face",
    name: "Saluting Face",
    keywords: [
      "respect",
      "salute"
    ],
    skins: [
      {
        unified: "1fae1",
        native: "🫡"
      }
    ],
    version: 14
  },
  zipper_mouth_face: {
    id: "zipper_mouth_face",
    name: "Zipper-Mouth Face",
    keywords: [
      "zipper",
      "mouth",
      "sealed",
      "secret"
    ],
    skins: [
      {
        unified: "1f910",
        native: "🤐"
      }
    ],
    version: 1
  },
  face_with_raised_eyebrow: {
    id: "face_with_raised_eyebrow",
    name: "Face with Raised Eyebrow",
    keywords: [
      "one",
      "distrust",
      "scepticism",
      "disapproval",
      "disbelief",
      "surprise"
    ],
    skins: [
      {
        unified: "1f928",
        native: "🤨"
      }
    ],
    version: 5
  },
  neutral_face: {
    id: "neutral_face",
    name: "Neutral Face",
    emoticons: [
      ":|",
      ":-|"
    ],
    keywords: [
      "indifference",
      "meh",
      ":",
      ""
    ],
    skins: [
      {
        unified: "1f610",
        native: "😐"
      }
    ],
    version: 1
  },
  expressionless: {
    id: "expressionless",
    name: "Expressionless Face",
    emoticons: [
      "-_-"
    ],
    keywords: [
      "indifferent",
      "-",
      "",
      "meh",
      "deadpan"
    ],
    skins: [
      {
        unified: "1f611",
        native: "😑"
      }
    ],
    version: 1
  },
  no_mouth: {
    id: "no_mouth",
    name: "Face Without Mouth",
    keywords: [
      "no",
      "hellokitty"
    ],
    skins: [
      {
        unified: "1f636",
        native: "😶"
      }
    ],
    version: 1
  },
  dotted_line_face: {
    id: "dotted_line_face",
    name: "Dotted Line Face",
    keywords: [
      "invisible",
      "lonely",
      "isolation",
      "depression"
    ],
    skins: [
      {
        unified: "1fae5",
        native: "🫥"
      }
    ],
    version: 14
  },
  face_in_clouds: {
    id: "face_in_clouds",
    name: "Face in Clouds",
    keywords: [
      "shower",
      "steam",
      "dream"
    ],
    skins: [
      {
        unified: "1f636-200d-1f32b-fe0f",
        native: "😶‍🌫️"
      }
    ],
    version: 13.1
  },
  smirk: {
    id: "smirk",
    name: "Smirking Face",
    keywords: [
      "smirk",
      "smile",
      "mean",
      "prank",
      "smug",
      "sarcasm"
    ],
    skins: [
      {
        unified: "1f60f",
        native: "😏"
      }
    ],
    version: 1
  },
  unamused: {
    id: "unamused",
    name: "Unamused Face",
    emoticons: [
      ":("
    ],
    keywords: [
      "indifference",
      "bored",
      "straight",
      "serious",
      "sarcasm",
      "unimpressed",
      "skeptical",
      "dubious",
      "side",
      "eye"
    ],
    skins: [
      {
        unified: "1f612",
        native: "😒"
      }
    ],
    version: 1
  },
  face_with_rolling_eyes: {
    id: "face_with_rolling_eyes",
    name: "Face with Rolling Eyes",
    keywords: [
      "eyeroll",
      "frustrated"
    ],
    skins: [
      {
        unified: "1f644",
        native: "🙄"
      }
    ],
    version: 1
  },
  grimacing: {
    id: "grimacing",
    name: "Grimacing Face",
    keywords: [
      "grimace",
      "teeth"
    ],
    skins: [
      {
        unified: "1f62c",
        native: "😬"
      }
    ],
    version: 1
  },
  face_exhaling: {
    id: "face_exhaling",
    name: "Face Exhaling",
    keywords: [
      "relieve",
      "relief",
      "tired",
      "sigh"
    ],
    skins: [
      {
        unified: "1f62e-200d-1f4a8",
        native: "😮‍💨"
      }
    ],
    version: 13.1
  },
  lying_face: {
    id: "lying_face",
    name: "Lying Face",
    keywords: [
      "lie",
      "pinocchio"
    ],
    skins: [
      {
        unified: "1f925",
        native: "🤥"
      }
    ],
    version: 3
  },
  shaking_face: {
    id: "shaking_face",
    name: "Shaking Face",
    keywords: [
      "dizzy",
      "shock",
      "blurry",
      "earthquake"
    ],
    skins: [
      {
        unified: "1fae8",
        native: "🫨"
      }
    ],
    version: 15
  },
  relieved: {
    id: "relieved",
    name: "Relieved Face",
    keywords: [
      "relaxed",
      "phew",
      "massage",
      "happiness"
    ],
    skins: [
      {
        unified: "1f60c",
        native: "😌"
      }
    ],
    version: 1
  },
  pensive: {
    id: "pensive",
    name: "Pensive Face",
    keywords: [
      "sad",
      "depressed",
      "upset"
    ],
    skins: [
      {
        unified: "1f614",
        native: "😔"
      }
    ],
    version: 1
  },
  sleepy: {
    id: "sleepy",
    name: "Sleepy Face",
    keywords: [
      "tired",
      "rest",
      "nap"
    ],
    skins: [
      {
        unified: "1f62a",
        native: "😪"
      }
    ],
    version: 1
  },
  drooling_face: {
    id: "drooling_face",
    name: "Drooling Face",
    keywords: [],
    skins: [
      {
        unified: "1f924",
        native: "🤤"
      }
    ],
    version: 3
  },
  sleeping: {
    id: "sleeping",
    name: "Sleeping Face",
    keywords: [
      "tired",
      "sleepy",
      "night",
      "zzz"
    ],
    skins: [
      {
        unified: "1f634",
        native: "😴"
      }
    ],
    version: 1
  },
  mask: {
    id: "mask",
    name: "Face with Medical Mask",
    keywords: [
      "sick",
      "ill",
      "disease",
      "covid"
    ],
    skins: [
      {
        unified: "1f637",
        native: "😷"
      }
    ],
    version: 1
  },
  face_with_thermometer: {
    id: "face_with_thermometer",
    name: "Face with Thermometer",
    keywords: [
      "sick",
      "temperature",
      "cold",
      "fever",
      "covid"
    ],
    skins: [
      {
        unified: "1f912",
        native: "🤒"
      }
    ],
    version: 1
  },
  face_with_head_bandage: {
    id: "face_with_head_bandage",
    name: "Face with Head-Bandage",
    keywords: [
      "head",
      "bandage",
      "injured",
      "clumsy",
      "hurt"
    ],
    skins: [
      {
        unified: "1f915",
        native: "🤕"
      }
    ],
    version: 1
  },
  nauseated_face: {
    id: "nauseated_face",
    name: "Nauseated Face",
    keywords: [
      "vomit",
      "gross",
      "green",
      "sick",
      "throw",
      "up",
      "ill"
    ],
    skins: [
      {
        unified: "1f922",
        native: "🤢"
      }
    ],
    version: 3
  },
  face_vomiting: {
    id: "face_vomiting",
    name: "Face Vomiting",
    keywords: [
      "with",
      "open",
      "mouth",
      "sick"
    ],
    skins: [
      {
        unified: "1f92e",
        native: "🤮"
      }
    ],
    version: 5
  },
  sneezing_face: {
    id: "sneezing_face",
    name: "Sneezing Face",
    keywords: [
      "gesundheit",
      "sneeze",
      "sick",
      "allergy"
    ],
    skins: [
      {
        unified: "1f927",
        native: "🤧"
      }
    ],
    version: 3
  },
  hot_face: {
    id: "hot_face",
    name: "Hot Face",
    keywords: [
      "feverish",
      "heat",
      "red",
      "sweating"
    ],
    skins: [
      {
        unified: "1f975",
        native: "🥵"
      }
    ],
    version: 11
  },
  cold_face: {
    id: "cold_face",
    name: "Cold Face",
    keywords: [
      "blue",
      "freezing",
      "frozen",
      "frostbite",
      "icicles"
    ],
    skins: [
      {
        unified: "1f976",
        native: "🥶"
      }
    ],
    version: 11
  },
  woozy_face: {
    id: "woozy_face",
    name: "Woozy Face",
    keywords: [
      "dizzy",
      "intoxicated",
      "tipsy",
      "wavy"
    ],
    skins: [
      {
        unified: "1f974",
        native: "🥴"
      }
    ],
    version: 11
  },
  dizzy_face: {
    id: "dizzy_face",
    name: "Dizzy Face",
    keywords: [
      "spent",
      "unconscious",
      "xox"
    ],
    skins: [
      {
        unified: "1f635",
        native: "😵"
      }
    ],
    version: 1
  },
  face_with_spiral_eyes: {
    id: "face_with_spiral_eyes",
    name: "Face with Spiral Eyes",
    keywords: [
      "sick",
      "ill",
      "confused",
      "nauseous",
      "nausea"
    ],
    skins: [
      {
        unified: "1f635-200d-1f4ab",
        native: "😵‍💫"
      }
    ],
    version: 13.1
  },
  exploding_head: {
    id: "exploding_head",
    name: "Exploding Head",
    keywords: [
      "shocked",
      "face",
      "with",
      "mind",
      "blown"
    ],
    skins: [
      {
        unified: "1f92f",
        native: "🤯"
      }
    ],
    version: 5
  },
  face_with_cowboy_hat: {
    id: "face_with_cowboy_hat",
    name: "Cowboy Hat Face",
    keywords: [
      "with",
      "cowgirl"
    ],
    skins: [
      {
        unified: "1f920",
        native: "🤠"
      }
    ],
    version: 3
  },
  partying_face: {
    id: "partying_face",
    name: "Partying Face",
    keywords: [
      "celebration",
      "woohoo"
    ],
    skins: [
      {
        unified: "1f973",
        native: "🥳"
      }
    ],
    version: 11
  },
  disguised_face: {
    id: "disguised_face",
    name: "Disguised Face",
    keywords: [
      "pretent",
      "brows",
      "glasses",
      "moustache"
    ],
    skins: [
      {
        unified: "1f978",
        native: "🥸"
      }
    ],
    version: 13
  },
  sunglasses: {
    id: "sunglasses",
    name: "Smiling Face with Sunglasses",
    emoticons: [
      "8)"
    ],
    keywords: [
      "cool",
      "smile",
      "summer",
      "beach",
      "sunglass"
    ],
    skins: [
      {
        unified: "1f60e",
        native: "😎"
      }
    ],
    version: 1
  },
  nerd_face: {
    id: "nerd_face",
    name: "Nerd Face",
    keywords: [
      "nerdy",
      "geek",
      "dork"
    ],
    skins: [
      {
        unified: "1f913",
        native: "🤓"
      }
    ],
    version: 1
  },
  face_with_monocle: {
    id: "face_with_monocle",
    name: "Face with Monocle",
    keywords: [
      "stuffy",
      "wealthy"
    ],
    skins: [
      {
        unified: "1f9d0",
        native: "🧐"
      }
    ],
    version: 5
  },
  confused: {
    id: "confused",
    name: "Confused Face",
    emoticons: [
      ":\\",
      ":-\\",
      ":/",
      ":-/"
    ],
    keywords: [
      "indifference",
      "huh",
      "weird",
      "hmmm",
      ":/"
    ],
    skins: [
      {
        unified: "1f615",
        native: "😕"
      }
    ],
    version: 1
  },
  face_with_diagonal_mouth: {
    id: "face_with_diagonal_mouth",
    name: "Face with Diagonal Mouth",
    keywords: [
      "skeptic",
      "confuse",
      "frustrated",
      "indifferent"
    ],
    skins: [
      {
        unified: "1fae4",
        native: "🫤"
      }
    ],
    version: 14
  },
  worried: {
    id: "worried",
    name: "Worried Face",
    keywords: [
      "concern",
      "nervous",
      ":("
    ],
    skins: [
      {
        unified: "1f61f",
        native: "😟"
      }
    ],
    version: 1
  },
  slightly_frowning_face: {
    id: "slightly_frowning_face",
    name: "Slightly Frowning Face",
    keywords: [
      "disappointed",
      "sad",
      "upset"
    ],
    skins: [
      {
        unified: "1f641",
        native: "🙁"
      }
    ],
    version: 1
  },
  white_frowning_face: {
    id: "white_frowning_face",
    name: "Frowning Face",
    keywords: [
      "white",
      "sad",
      "upset",
      "frown"
    ],
    skins: [
      {
        unified: "2639-fe0f",
        native: "☹️"
      }
    ],
    version: 1
  },
  open_mouth: {
    id: "open_mouth",
    name: "Face with Open Mouth",
    emoticons: [
      ":o",
      ":-o",
      ":O",
      ":-O"
    ],
    keywords: [
      "surprise",
      "impressed",
      "wow",
      "whoa",
      ":O"
    ],
    skins: [
      {
        unified: "1f62e",
        native: "😮"
      }
    ],
    version: 1
  },
  hushed: {
    id: "hushed",
    name: "Hushed Face",
    keywords: [
      "woo",
      "shh"
    ],
    skins: [
      {
        unified: "1f62f",
        native: "😯"
      }
    ],
    version: 1
  },
  astonished: {
    id: "astonished",
    name: "Astonished Face",
    keywords: [
      "xox",
      "surprised",
      "poisoned"
    ],
    skins: [
      {
        unified: "1f632",
        native: "😲"
      }
    ],
    version: 1
  },
  flushed: {
    id: "flushed",
    name: "Flushed Face",
    keywords: [
      "blush",
      "shy",
      "flattered"
    ],
    skins: [
      {
        unified: "1f633",
        native: "😳"
      }
    ],
    version: 1
  },
  pleading_face: {
    id: "pleading_face",
    name: "Pleading Face",
    keywords: [
      "begging",
      "mercy",
      "cry",
      "tears",
      "sad",
      "grievance"
    ],
    skins: [
      {
        unified: "1f97a",
        native: "🥺"
      }
    ],
    version: 11
  },
  face_holding_back_tears: {
    id: "face_holding_back_tears",
    name: "Face Holding Back Tears",
    keywords: [
      "touched",
      "gratitude",
      "cry"
    ],
    skins: [
      {
        unified: "1f979",
        native: "🥹"
      }
    ],
    version: 14
  },
  frowning: {
    id: "frowning",
    name: "Frowning Face with Open Mouth",
    keywords: [
      "aw",
      "what"
    ],
    skins: [
      {
        unified: "1f626",
        native: "😦"
      }
    ],
    version: 1
  },
  anguished: {
    id: "anguished",
    name: "Anguished Face",
    emoticons: [
      "D:"
    ],
    keywords: [
      "stunned",
      "nervous"
    ],
    skins: [
      {
        unified: "1f627",
        native: "😧"
      }
    ],
    version: 1
  },
  fearful: {
    id: "fearful",
    name: "Fearful Face",
    keywords: [
      "scared",
      "terrified",
      "nervous"
    ],
    skins: [
      {
        unified: "1f628",
        native: "😨"
      }
    ],
    version: 1
  },
  cold_sweat: {
    id: "cold_sweat",
    name: "Anxious Face with Sweat",
    keywords: [
      "cold",
      "nervous"
    ],
    skins: [
      {
        unified: "1f630",
        native: "😰"
      }
    ],
    version: 1
  },
  disappointed_relieved: {
    id: "disappointed_relieved",
    name: "Sad but Relieved Face",
    keywords: [
      "disappointed",
      "phew",
      "sweat",
      "nervous"
    ],
    skins: [
      {
        unified: "1f625",
        native: "😥"
      }
    ],
    version: 1
  },
  cry: {
    id: "cry",
    name: "Crying Face",
    emoticons: [
      ":'("
    ],
    keywords: [
      "cry",
      "tears",
      "sad",
      "depressed",
      "upset",
      ":'("
    ],
    skins: [
      {
        unified: "1f622",
        native: "😢"
      }
    ],
    version: 1
  },
  sob: {
    id: "sob",
    name: "Loudly Crying Face",
    emoticons: [
      ":'("
    ],
    keywords: [
      "sob",
      "cry",
      "tears",
      "sad",
      "upset",
      "depressed"
    ],
    skins: [
      {
        unified: "1f62d",
        native: "😭"
      }
    ],
    version: 1
  },
  scream: {
    id: "scream",
    name: "Face Screaming in Fear",
    keywords: [
      "scream",
      "munch",
      "scared",
      "omg"
    ],
    skins: [
      {
        unified: "1f631",
        native: "😱"
      }
    ],
    version: 1
  },
  confounded: {
    id: "confounded",
    name: "Confounded Face",
    keywords: [
      "confused",
      "sick",
      "unwell",
      "oops",
      ":S"
    ],
    skins: [
      {
        unified: "1f616",
        native: "😖"
      }
    ],
    version: 1
  },
  persevere: {
    id: "persevere",
    name: "Persevering Face",
    keywords: [
      "persevere",
      "sick",
      "no",
      "upset",
      "oops"
    ],
    skins: [
      {
        unified: "1f623",
        native: "😣"
      }
    ],
    version: 1
  },
  disappointed: {
    id: "disappointed",
    name: "Disappointed Face",
    emoticons: [
      "):",
      ":(",
      ":-("
    ],
    keywords: [
      "sad",
      "upset",
      "depressed",
      ":("
    ],
    skins: [
      {
        unified: "1f61e",
        native: "😞"
      }
    ],
    version: 1
  },
  sweat: {
    id: "sweat",
    name: "Face with Cold Sweat",
    keywords: [
      "downcast",
      "hot",
      "sad",
      "tired",
      "exercise"
    ],
    skins: [
      {
        unified: "1f613",
        native: "😓"
      }
    ],
    version: 1
  },
  weary: {
    id: "weary",
    name: "Weary Face",
    keywords: [
      "tired",
      "sleepy",
      "sad",
      "frustrated",
      "upset"
    ],
    skins: [
      {
        unified: "1f629",
        native: "😩"
      }
    ],
    version: 1
  },
  tired_face: {
    id: "tired_face",
    name: "Tired Face",
    keywords: [
      "sick",
      "whine",
      "upset",
      "frustrated"
    ],
    skins: [
      {
        unified: "1f62b",
        native: "😫"
      }
    ],
    version: 1
  },
  yawning_face: {
    id: "yawning_face",
    name: "Yawning Face",
    keywords: [
      "tired",
      "sleepy"
    ],
    skins: [
      {
        unified: "1f971",
        native: "🥱"
      }
    ],
    version: 12
  },
  triumph: {
    id: "triumph",
    name: "Face with Look of Triumph",
    keywords: [
      "steam",
      "from",
      "nose",
      "gas",
      "phew",
      "proud",
      "pride"
    ],
    skins: [
      {
        unified: "1f624",
        native: "😤"
      }
    ],
    version: 1
  },
  rage: {
    id: "rage",
    name: "Pouting Face",
    keywords: [
      "rage",
      "angry",
      "mad",
      "hate",
      "despise"
    ],
    skins: [
      {
        unified: "1f621",
        native: "😡"
      }
    ],
    version: 1
  },
  angry: {
    id: "angry",
    name: "Angry Face",
    emoticons: [
      ">:(",
      ">:-("
    ],
    keywords: [
      "mad",
      "annoyed",
      "frustrated"
    ],
    skins: [
      {
        unified: "1f620",
        native: "😠"
      }
    ],
    version: 1
  },
  face_with_symbols_on_mouth: {
    id: "face_with_symbols_on_mouth",
    name: "Face with Symbols on Mouth",
    keywords: [
      "serious",
      "covering",
      "swearing",
      "cursing",
      "cussing",
      "profanity",
      "expletive"
    ],
    skins: [
      {
        unified: "1f92c",
        native: "🤬"
      }
    ],
    version: 5
  },
  smiling_imp: {
    id: "smiling_imp",
    name: "Smiling Face with Horns",
    keywords: [
      "imp",
      "devil"
    ],
    skins: [
      {
        unified: "1f608",
        native: "😈"
      }
    ],
    version: 1
  },
  imp: {
    id: "imp",
    name: "Imp",
    keywords: [
      "angry",
      "face",
      "with",
      "horns",
      "devil"
    ],
    skins: [
      {
        unified: "1f47f",
        native: "👿"
      }
    ],
    version: 1
  },
  skull: {
    id: "skull",
    name: "Skull",
    keywords: [
      "dead",
      "skeleton",
      "creepy",
      "death"
    ],
    skins: [
      {
        unified: "1f480",
        native: "💀"
      }
    ],
    version: 1
  },
  skull_and_crossbones: {
    id: "skull_and_crossbones",
    name: "Skull and Crossbones",
    keywords: [
      "poison",
      "danger",
      "deadly",
      "scary",
      "death",
      "pirate",
      "evil"
    ],
    skins: [
      {
        unified: "2620-fe0f",
        native: "☠️"
      }
    ],
    version: 1
  },
  hankey: {
    id: "hankey",
    name: "Pile of Poo",
    keywords: [
      "hankey",
      "poop",
      "shit",
      "shitface",
      "fail",
      "turd"
    ],
    skins: [
      {
        unified: "1f4a9",
        native: "💩"
      }
    ],
    version: 1
  },
  clown_face: {
    id: "clown_face",
    name: "Clown Face",
    keywords: [],
    skins: [
      {
        unified: "1f921",
        native: "🤡"
      }
    ],
    version: 3
  },
  japanese_ogre: {
    id: "japanese_ogre",
    name: "Ogre",
    keywords: [
      "japanese",
      "monster",
      "red",
      "mask",
      "halloween",
      "scary",
      "creepy",
      "devil",
      "demon"
    ],
    skins: [
      {
        unified: "1f479",
        native: "👹"
      }
    ],
    version: 1
  },
  japanese_goblin: {
    id: "japanese_goblin",
    name: "Goblin",
    keywords: [
      "japanese",
      "red",
      "evil",
      "mask",
      "monster",
      "scary",
      "creepy"
    ],
    skins: [
      {
        unified: "1f47a",
        native: "👺"
      }
    ],
    version: 1
  },
  ghost: {
    id: "ghost",
    name: "Ghost",
    keywords: [
      "halloween",
      "spooky",
      "scary"
    ],
    skins: [
      {
        unified: "1f47b",
        native: "👻"
      }
    ],
    version: 1
  },
  alien: {
    id: "alien",
    name: "Alien",
    keywords: [
      "UFO",
      "paul",
      "weird",
      "outer",
      "space"
    ],
    skins: [
      {
        unified: "1f47d",
        native: "👽"
      }
    ],
    version: 1
  },
  space_invader: {
    id: "space_invader",
    name: "Alien Monster",
    keywords: [
      "space",
      "invader",
      "game",
      "arcade",
      "play"
    ],
    skins: [
      {
        unified: "1f47e",
        native: "👾"
      }
    ],
    version: 1
  },
  robot_face: {
    id: "robot_face",
    name: "Robot",
    keywords: [
      "face",
      "computer",
      "machine",
      "bot"
    ],
    skins: [
      {
        unified: "1f916",
        native: "🤖"
      }
    ],
    version: 1
  },
  smiley_cat: {
    id: "smiley_cat",
    name: "Grinning Cat",
    keywords: [
      "smiley",
      "animal",
      "cats",
      "happy",
      "smile"
    ],
    skins: [
      {
        unified: "1f63a",
        native: "😺"
      }
    ],
    version: 1
  },
  smile_cat: {
    id: "smile_cat",
    name: "Grinning Cat with Smiling Eyes",
    keywords: [
      "smile",
      "animal",
      "cats"
    ],
    skins: [
      {
        unified: "1f638",
        native: "😸"
      }
    ],
    version: 1
  },
  joy_cat: {
    id: "joy_cat",
    name: "Cat with Tears of Joy",
    keywords: [
      "animal",
      "cats",
      "haha",
      "happy"
    ],
    skins: [
      {
        unified: "1f639",
        native: "😹"
      }
    ],
    version: 1
  },
  heart_eyes_cat: {
    id: "heart_eyes_cat",
    name: "Smiling Cat with Heart-Eyes",
    keywords: [
      "heart",
      "eyes",
      "animal",
      "love",
      "like",
      "affection",
      "cats",
      "valentines"
    ],
    skins: [
      {
        unified: "1f63b",
        native: "😻"
      }
    ],
    version: 1
  },
  smirk_cat: {
    id: "smirk_cat",
    name: "Cat with Wry Smile",
    keywords: [
      "smirk",
      "animal",
      "cats"
    ],
    skins: [
      {
        unified: "1f63c",
        native: "😼"
      }
    ],
    version: 1
  },
  kissing_cat: {
    id: "kissing_cat",
    name: "Kissing Cat",
    keywords: [
      "animal",
      "cats",
      "kiss"
    ],
    skins: [
      {
        unified: "1f63d",
        native: "😽"
      }
    ],
    version: 1
  },
  scream_cat: {
    id: "scream_cat",
    name: "Weary Cat",
    keywords: [
      "scream",
      "animal",
      "cats",
      "munch",
      "scared"
    ],
    skins: [
      {
        unified: "1f640",
        native: "🙀"
      }
    ],
    version: 1
  },
  crying_cat_face: {
    id: "crying_cat_face",
    name: "Crying Cat",
    keywords: [
      "face",
      "animal",
      "tears",
      "weep",
      "sad",
      "cats",
      "upset",
      "cry"
    ],
    skins: [
      {
        unified: "1f63f",
        native: "😿"
      }
    ],
    version: 1
  },
  pouting_cat: {
    id: "pouting_cat",
    name: "Pouting Cat",
    keywords: [
      "animal",
      "cats"
    ],
    skins: [
      {
        unified: "1f63e",
        native: "😾"
      }
    ],
    version: 1
  },
  see_no_evil: {
    id: "see_no_evil",
    name: "See-No-Evil Monkey",
    keywords: [
      "see",
      "no",
      "evil",
      "animal",
      "nature",
      "haha"
    ],
    skins: [
      {
        unified: "1f648",
        native: "🙈"
      }
    ],
    version: 1
  },
  hear_no_evil: {
    id: "hear_no_evil",
    name: "Hear-No-Evil Monkey",
    keywords: [
      "hear",
      "no",
      "evil",
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f649",
        native: "🙉"
      }
    ],
    version: 1
  },
  speak_no_evil: {
    id: "speak_no_evil",
    name: "Speak-No-Evil Monkey",
    keywords: [
      "speak",
      "no",
      "evil",
      "animal",
      "nature",
      "omg"
    ],
    skins: [
      {
        unified: "1f64a",
        native: "🙊"
      }
    ],
    version: 1
  },
  love_letter: {
    id: "love_letter",
    name: "Love Letter",
    keywords: [
      "email",
      "like",
      "affection",
      "envelope",
      "valentines"
    ],
    skins: [
      {
        unified: "1f48c",
        native: "💌"
      }
    ],
    version: 1
  },
  cupid: {
    id: "cupid",
    name: "Heart with Arrow",
    keywords: [
      "cupid",
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f498",
        native: "💘"
      }
    ],
    version: 1
  },
  gift_heart: {
    id: "gift_heart",
    name: "Heart with Ribbon",
    keywords: [
      "gift",
      "love",
      "valentines"
    ],
    skins: [
      {
        unified: "1f49d",
        native: "💝"
      }
    ],
    version: 1
  },
  sparkling_heart: {
    id: "sparkling_heart",
    name: "Sparkling Heart",
    keywords: [
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f496",
        native: "💖"
      }
    ],
    version: 1
  },
  heartpulse: {
    id: "heartpulse",
    name: "Growing Heart",
    keywords: [
      "heartpulse",
      "like",
      "love",
      "affection",
      "valentines",
      "pink"
    ],
    skins: [
      {
        unified: "1f497",
        native: "💗"
      }
    ],
    version: 1
  },
  heartbeat: {
    id: "heartbeat",
    name: "Beating Heart",
    keywords: [
      "heartbeat",
      "love",
      "like",
      "affection",
      "valentines",
      "pink"
    ],
    skins: [
      {
        unified: "1f493",
        native: "💓"
      }
    ],
    version: 1
  },
  revolving_hearts: {
    id: "revolving_hearts",
    name: "Revolving Hearts",
    keywords: [
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f49e",
        native: "💞"
      }
    ],
    version: 1
  },
  two_hearts: {
    id: "two_hearts",
    name: "Two Hearts",
    keywords: [
      "love",
      "like",
      "affection",
      "valentines",
      "heart"
    ],
    skins: [
      {
        unified: "1f495",
        native: "💕"
      }
    ],
    version: 1
  },
  heart_decoration: {
    id: "heart_decoration",
    name: "Heart Decoration",
    keywords: [
      "purple",
      "square",
      "love",
      "like"
    ],
    skins: [
      {
        unified: "1f49f",
        native: "💟"
      }
    ],
    version: 1
  },
  heavy_heart_exclamation_mark_ornament: {
    id: "heavy_heart_exclamation_mark_ornament",
    name: "Heart Exclamation",
    keywords: [
      "heavy",
      "mark",
      "ornament",
      "decoration",
      "love"
    ],
    skins: [
      {
        unified: "2763-fe0f",
        native: "❣️"
      }
    ],
    version: 1
  },
  broken_heart: {
    id: "broken_heart",
    name: "Broken Heart",
    emoticons: [
      "</3"
    ],
    keywords: [
      "sad",
      "sorry",
      "break",
      "heartbreak"
    ],
    skins: [
      {
        unified: "1f494",
        native: "💔"
      }
    ],
    version: 1
  },
  heart_on_fire: {
    id: "heart_on_fire",
    name: "Heart on Fire",
    keywords: [
      "passionate",
      "enthusiastic"
    ],
    skins: [
      {
        unified: "2764-fe0f-200d-1f525",
        native: "❤️‍🔥"
      }
    ],
    version: 13.1
  },
  mending_heart: {
    id: "mending_heart",
    name: "Mending Heart",
    keywords: [
      "broken",
      "bandage",
      "wounded"
    ],
    skins: [
      {
        unified: "2764-fe0f-200d-1fa79",
        native: "❤️‍🩹"
      }
    ],
    version: 13.1
  },
  heart: {
    id: "heart",
    name: "Red Heart",
    emoticons: [
      "<3"
    ],
    keywords: [
      "love",
      "like",
      "valentines"
    ],
    skins: [
      {
        unified: "2764-fe0f",
        native: "❤️"
      }
    ],
    version: 1
  },
  pink_heart: {
    id: "pink_heart",
    name: "Pink Heart",
    keywords: [
      "valentines"
    ],
    skins: [
      {
        unified: "1fa77",
        native: "🩷"
      }
    ],
    version: 15
  },
  orange_heart: {
    id: "orange_heart",
    name: "Orange Heart",
    keywords: [
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f9e1",
        native: "🧡"
      }
    ],
    version: 5
  },
  yellow_heart: {
    id: "yellow_heart",
    name: "Yellow Heart",
    emoticons: [
      "<3"
    ],
    keywords: [
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f49b",
        native: "💛"
      }
    ],
    version: 1
  },
  green_heart: {
    id: "green_heart",
    name: "Green Heart",
    emoticons: [
      "<3"
    ],
    keywords: [
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f49a",
        native: "💚"
      }
    ],
    version: 1
  },
  blue_heart: {
    id: "blue_heart",
    name: "Blue Heart",
    emoticons: [
      "<3"
    ],
    keywords: [
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f499",
        native: "💙"
      }
    ],
    version: 1
  },
  light_blue_heart: {
    id: "light_blue_heart",
    name: "Light Blue Heart",
    keywords: [
      "ice",
      "baby"
    ],
    skins: [
      {
        unified: "1fa75",
        native: "🩵"
      }
    ],
    version: 15
  },
  purple_heart: {
    id: "purple_heart",
    name: "Purple Heart",
    emoticons: [
      "<3"
    ],
    keywords: [
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f49c",
        native: "💜"
      }
    ],
    version: 1
  },
  brown_heart: {
    id: "brown_heart",
    name: "Brown Heart",
    keywords: [
      "coffee"
    ],
    skins: [
      {
        unified: "1f90e",
        native: "🤎"
      }
    ],
    version: 12
  },
  black_heart: {
    id: "black_heart",
    name: "Black Heart",
    keywords: [
      "evil"
    ],
    skins: [
      {
        unified: "1f5a4",
        native: "🖤"
      }
    ],
    version: 3
  },
  grey_heart: {
    id: "grey_heart",
    name: "Grey Heart",
    keywords: [
      "silver",
      "monochrome"
    ],
    skins: [
      {
        unified: "1fa76",
        native: "🩶"
      }
    ],
    version: 15
  },
  white_heart: {
    id: "white_heart",
    name: "White Heart",
    keywords: [
      "pure"
    ],
    skins: [
      {
        unified: "1f90d",
        native: "🤍"
      }
    ],
    version: 12
  },
  kiss: {
    id: "kiss",
    name: "Kiss Mark",
    keywords: [
      "face",
      "lips",
      "love",
      "like",
      "affection",
      "valentines"
    ],
    skins: [
      {
        unified: "1f48b",
        native: "💋"
      }
    ],
    version: 1
  },
  anger: {
    id: "anger",
    name: "Anger Symbol",
    keywords: [
      "angry",
      "mad"
    ],
    skins: [
      {
        unified: "1f4a2",
        native: "💢"
      }
    ],
    version: 1
  },
  boom: {
    id: "boom",
    name: "Collision",
    keywords: [
      "boom",
      "bomb",
      "explode",
      "explosion",
      "blown"
    ],
    skins: [
      {
        unified: "1f4a5",
        native: "💥"
      }
    ],
    version: 1
  },
  dizzy: {
    id: "dizzy",
    name: "Dizzy",
    keywords: [
      "star",
      "sparkle",
      "shoot",
      "magic"
    ],
    skins: [
      {
        unified: "1f4ab",
        native: "💫"
      }
    ],
    version: 1
  },
  sweat_drops: {
    id: "sweat_drops",
    name: "Sweat Droplets",
    keywords: [
      "drops",
      "water",
      "drip",
      "oops"
    ],
    skins: [
      {
        unified: "1f4a6",
        native: "💦"
      }
    ],
    version: 1
  },
  dash: {
    id: "dash",
    name: "Dash Symbol",
    keywords: [
      "dashing",
      "away",
      "wind",
      "air",
      "fast",
      "shoo",
      "fart",
      "smoke",
      "puff"
    ],
    skins: [
      {
        unified: "1f4a8",
        native: "💨"
      }
    ],
    version: 1
  },
  hole: {
    id: "hole",
    name: "Hole",
    keywords: [
      "embarrassing"
    ],
    skins: [
      {
        unified: "1f573-fe0f",
        native: "🕳️"
      }
    ],
    version: 1
  },
  speech_balloon: {
    id: "speech_balloon",
    name: "Speech Balloon",
    keywords: [
      "bubble",
      "words",
      "message",
      "talk",
      "chatting"
    ],
    skins: [
      {
        unified: "1f4ac",
        native: "💬"
      }
    ],
    version: 1
  },
  "eye-in-speech-bubble": {
    id: "eye-in-speech-bubble",
    name: "Eye in Speech Bubble",
    keywords: [
      "in-speech-bubble",
      "info"
    ],
    skins: [
      {
        unified: "1f441-fe0f-200d-1f5e8-fe0f",
        native: "👁️‍🗨️"
      }
    ],
    version: 2
  },
  left_speech_bubble: {
    id: "left_speech_bubble",
    name: "Left Speech Bubble",
    keywords: [
      "words",
      "message",
      "talk",
      "chatting"
    ],
    skins: [
      {
        unified: "1f5e8-fe0f",
        native: "🗨️"
      }
    ],
    version: 2
  },
  right_anger_bubble: {
    id: "right_anger_bubble",
    name: "Right Anger Bubble",
    keywords: [
      "caption",
      "speech",
      "thinking",
      "mad"
    ],
    skins: [
      {
        unified: "1f5ef-fe0f",
        native: "🗯️"
      }
    ],
    version: 1
  },
  thought_balloon: {
    id: "thought_balloon",
    name: "Thought Balloon",
    keywords: [
      "bubble",
      "cloud",
      "speech",
      "thinking",
      "dream"
    ],
    skins: [
      {
        unified: "1f4ad",
        native: "💭"
      }
    ],
    version: 1
  },
  zzz: {
    id: "zzz",
    name: "Zzz",
    keywords: [
      "sleepy",
      "tired",
      "dream"
    ],
    skins: [
      {
        unified: "1f4a4",
        native: "💤"
      }
    ],
    version: 1
  },
  wave: {
    id: "wave",
    name: "Waving Hand",
    keywords: [
      "wave",
      "hands",
      "gesture",
      "goodbye",
      "solong",
      "farewell",
      "hello",
      "hi",
      "palm"
    ],
    skins: [
      {
        unified: "1f44b",
        native: "👋"
      },
      {
        unified: "1f44b-1f3fb",
        native: "👋🏻"
      },
      {
        unified: "1f44b-1f3fc",
        native: "👋🏼"
      },
      {
        unified: "1f44b-1f3fd",
        native: "👋🏽"
      },
      {
        unified: "1f44b-1f3fe",
        native: "👋🏾"
      },
      {
        unified: "1f44b-1f3ff",
        native: "👋🏿"
      }
    ],
    version: 1
  },
  raised_back_of_hand: {
    id: "raised_back_of_hand",
    name: "Raised Back of Hand",
    keywords: [
      "fingers",
      "backhand"
    ],
    skins: [
      {
        unified: "1f91a",
        native: "🤚"
      },
      {
        unified: "1f91a-1f3fb",
        native: "🤚🏻"
      },
      {
        unified: "1f91a-1f3fc",
        native: "🤚🏼"
      },
      {
        unified: "1f91a-1f3fd",
        native: "🤚🏽"
      },
      {
        unified: "1f91a-1f3fe",
        native: "🤚🏾"
      },
      {
        unified: "1f91a-1f3ff",
        native: "🤚🏿"
      }
    ],
    version: 3
  },
  raised_hand_with_fingers_splayed: {
    id: "raised_hand_with_fingers_splayed",
    name: "Hand with Fingers Splayed",
    keywords: [
      "raised",
      "palm"
    ],
    skins: [
      {
        unified: "1f590-fe0f",
        native: "🖐️"
      },
      {
        unified: "1f590-1f3fb",
        native: "🖐🏻"
      },
      {
        unified: "1f590-1f3fc",
        native: "🖐🏼"
      },
      {
        unified: "1f590-1f3fd",
        native: "🖐🏽"
      },
      {
        unified: "1f590-1f3fe",
        native: "🖐🏾"
      },
      {
        unified: "1f590-1f3ff",
        native: "🖐🏿"
      }
    ],
    version: 1
  },
  hand: {
    id: "hand",
    name: "Raised Hand",
    keywords: [
      "fingers",
      "stop",
      "highfive",
      "high",
      "five",
      "palm",
      "ban"
    ],
    skins: [
      {
        unified: "270b",
        native: "✋"
      },
      {
        unified: "270b-1f3fb",
        native: "✋🏻"
      },
      {
        unified: "270b-1f3fc",
        native: "✋🏼"
      },
      {
        unified: "270b-1f3fd",
        native: "✋🏽"
      },
      {
        unified: "270b-1f3fe",
        native: "✋🏾"
      },
      {
        unified: "270b-1f3ff",
        native: "✋🏿"
      }
    ],
    version: 1
  },
  "spock-hand": {
    id: "spock-hand",
    name: "Vulcan Salute",
    keywords: [
      "spock",
      "hand",
      "fingers",
      "star",
      "trek"
    ],
    skins: [
      {
        unified: "1f596",
        native: "🖖"
      },
      {
        unified: "1f596-1f3fb",
        native: "🖖🏻"
      },
      {
        unified: "1f596-1f3fc",
        native: "🖖🏼"
      },
      {
        unified: "1f596-1f3fd",
        native: "🖖🏽"
      },
      {
        unified: "1f596-1f3fe",
        native: "🖖🏾"
      },
      {
        unified: "1f596-1f3ff",
        native: "🖖🏿"
      }
    ],
    version: 1
  },
  rightwards_hand: {
    id: "rightwards_hand",
    name: "Rightwards Hand",
    keywords: [
      "palm",
      "offer"
    ],
    skins: [
      {
        unified: "1faf1",
        native: "🫱"
      },
      {
        unified: "1faf1-1f3fb",
        native: "🫱🏻"
      },
      {
        unified: "1faf1-1f3fc",
        native: "🫱🏼"
      },
      {
        unified: "1faf1-1f3fd",
        native: "🫱🏽"
      },
      {
        unified: "1faf1-1f3fe",
        native: "🫱🏾"
      },
      {
        unified: "1faf1-1f3ff",
        native: "🫱🏿"
      }
    ],
    version: 14
  },
  leftwards_hand: {
    id: "leftwards_hand",
    name: "Leftwards Hand",
    keywords: [
      "palm",
      "offer"
    ],
    skins: [
      {
        unified: "1faf2",
        native: "🫲"
      },
      {
        unified: "1faf2-1f3fb",
        native: "🫲🏻"
      },
      {
        unified: "1faf2-1f3fc",
        native: "🫲🏼"
      },
      {
        unified: "1faf2-1f3fd",
        native: "🫲🏽"
      },
      {
        unified: "1faf2-1f3fe",
        native: "🫲🏾"
      },
      {
        unified: "1faf2-1f3ff",
        native: "🫲🏿"
      }
    ],
    version: 14
  },
  palm_down_hand: {
    id: "palm_down_hand",
    name: "Palm Down Hand",
    keywords: [
      "drop"
    ],
    skins: [
      {
        unified: "1faf3",
        native: "🫳"
      },
      {
        unified: "1faf3-1f3fb",
        native: "🫳🏻"
      },
      {
        unified: "1faf3-1f3fc",
        native: "🫳🏼"
      },
      {
        unified: "1faf3-1f3fd",
        native: "🫳🏽"
      },
      {
        unified: "1faf3-1f3fe",
        native: "🫳🏾"
      },
      {
        unified: "1faf3-1f3ff",
        native: "🫳🏿"
      }
    ],
    version: 14
  },
  palm_up_hand: {
    id: "palm_up_hand",
    name: "Palm Up Hand",
    keywords: [
      "lift",
      "offer",
      "demand"
    ],
    skins: [
      {
        unified: "1faf4",
        native: "🫴"
      },
      {
        unified: "1faf4-1f3fb",
        native: "🫴🏻"
      },
      {
        unified: "1faf4-1f3fc",
        native: "🫴🏼"
      },
      {
        unified: "1faf4-1f3fd",
        native: "🫴🏽"
      },
      {
        unified: "1faf4-1f3fe",
        native: "🫴🏾"
      },
      {
        unified: "1faf4-1f3ff",
        native: "🫴🏿"
      }
    ],
    version: 14
  },
  leftwards_pushing_hand: {
    id: "leftwards_pushing_hand",
    name: "Leftwards Pushing Hand",
    keywords: [
      "highfive",
      "high",
      "five",
      "pressing",
      "stop"
    ],
    skins: [
      {
        unified: "1faf7",
        native: "🫷"
      },
      {
        unified: "1faf7-1f3fb",
        native: "🫷🏻"
      },
      {
        unified: "1faf7-1f3fc",
        native: "🫷🏼"
      },
      {
        unified: "1faf7-1f3fd",
        native: "🫷🏽"
      },
      {
        unified: "1faf7-1f3fe",
        native: "🫷🏾"
      },
      {
        unified: "1faf7-1f3ff",
        native: "🫷🏿"
      }
    ],
    version: 15
  },
  rightwards_pushing_hand: {
    id: "rightwards_pushing_hand",
    name: "Rightwards Pushing Hand",
    keywords: [
      "highfive",
      "high",
      "five",
      "pressing",
      "stop"
    ],
    skins: [
      {
        unified: "1faf8",
        native: "🫸"
      },
      {
        unified: "1faf8-1f3fb",
        native: "🫸🏻"
      },
      {
        unified: "1faf8-1f3fc",
        native: "🫸🏼"
      },
      {
        unified: "1faf8-1f3fd",
        native: "🫸🏽"
      },
      {
        unified: "1faf8-1f3fe",
        native: "🫸🏾"
      },
      {
        unified: "1faf8-1f3ff",
        native: "🫸🏿"
      }
    ],
    version: 15
  },
  ok_hand: {
    id: "ok_hand",
    name: "Ok Hand",
    keywords: [
      "fingers",
      "limbs",
      "perfect",
      "okay"
    ],
    skins: [
      {
        unified: "1f44c",
        native: "👌"
      },
      {
        unified: "1f44c-1f3fb",
        native: "👌🏻"
      },
      {
        unified: "1f44c-1f3fc",
        native: "👌🏼"
      },
      {
        unified: "1f44c-1f3fd",
        native: "👌🏽"
      },
      {
        unified: "1f44c-1f3fe",
        native: "👌🏾"
      },
      {
        unified: "1f44c-1f3ff",
        native: "👌🏿"
      }
    ],
    version: 1
  },
  pinched_fingers: {
    id: "pinched_fingers",
    name: "Pinched Fingers",
    keywords: [
      "size",
      "tiny",
      "small"
    ],
    skins: [
      {
        unified: "1f90c",
        native: "🤌"
      },
      {
        unified: "1f90c-1f3fb",
        native: "🤌🏻"
      },
      {
        unified: "1f90c-1f3fc",
        native: "🤌🏼"
      },
      {
        unified: "1f90c-1f3fd",
        native: "🤌🏽"
      },
      {
        unified: "1f90c-1f3fe",
        native: "🤌🏾"
      },
      {
        unified: "1f90c-1f3ff",
        native: "🤌🏿"
      }
    ],
    version: 13
  },
  pinching_hand: {
    id: "pinching_hand",
    name: "Pinching Hand",
    keywords: [
      "tiny",
      "small",
      "size"
    ],
    skins: [
      {
        unified: "1f90f",
        native: "🤏"
      },
      {
        unified: "1f90f-1f3fb",
        native: "🤏🏻"
      },
      {
        unified: "1f90f-1f3fc",
        native: "🤏🏼"
      },
      {
        unified: "1f90f-1f3fd",
        native: "🤏🏽"
      },
      {
        unified: "1f90f-1f3fe",
        native: "🤏🏾"
      },
      {
        unified: "1f90f-1f3ff",
        native: "🤏🏿"
      }
    ],
    version: 12
  },
  v: {
    id: "v",
    name: "Victory Hand",
    keywords: [
      "v",
      "fingers",
      "ohyeah",
      "peace",
      "two"
    ],
    skins: [
      {
        unified: "270c-fe0f",
        native: "✌️"
      },
      {
        unified: "270c-1f3fb",
        native: "✌🏻"
      },
      {
        unified: "270c-1f3fc",
        native: "✌🏼"
      },
      {
        unified: "270c-1f3fd",
        native: "✌🏽"
      },
      {
        unified: "270c-1f3fe",
        native: "✌🏾"
      },
      {
        unified: "270c-1f3ff",
        native: "✌🏿"
      }
    ],
    version: 1
  },
  crossed_fingers: {
    id: "crossed_fingers",
    name: "Crossed Fingers",
    keywords: [
      "hand",
      "with",
      "index",
      "and",
      "middle",
      "good",
      "lucky"
    ],
    skins: [
      {
        unified: "1f91e",
        native: "🤞"
      },
      {
        unified: "1f91e-1f3fb",
        native: "🤞🏻"
      },
      {
        unified: "1f91e-1f3fc",
        native: "🤞🏼"
      },
      {
        unified: "1f91e-1f3fd",
        native: "🤞🏽"
      },
      {
        unified: "1f91e-1f3fe",
        native: "🤞🏾"
      },
      {
        unified: "1f91e-1f3ff",
        native: "🤞🏿"
      }
    ],
    version: 3
  },
  hand_with_index_finger_and_thumb_crossed: {
    id: "hand_with_index_finger_and_thumb_crossed",
    name: "Hand with Index Finger and Thumb Crossed",
    keywords: [
      "heart",
      "love",
      "money",
      "expensive"
    ],
    skins: [
      {
        unified: "1faf0",
        native: "🫰"
      },
      {
        unified: "1faf0-1f3fb",
        native: "🫰🏻"
      },
      {
        unified: "1faf0-1f3fc",
        native: "🫰🏼"
      },
      {
        unified: "1faf0-1f3fd",
        native: "🫰🏽"
      },
      {
        unified: "1faf0-1f3fe",
        native: "🫰🏾"
      },
      {
        unified: "1faf0-1f3ff",
        native: "🫰🏿"
      }
    ],
    version: 14
  },
  i_love_you_hand_sign: {
    id: "i_love_you_hand_sign",
    name: "Love-You Gesture",
    keywords: [
      "i",
      "love",
      "you",
      "hand",
      "sign",
      "fingers"
    ],
    skins: [
      {
        unified: "1f91f",
        native: "🤟"
      },
      {
        unified: "1f91f-1f3fb",
        native: "🤟🏻"
      },
      {
        unified: "1f91f-1f3fc",
        native: "🤟🏼"
      },
      {
        unified: "1f91f-1f3fd",
        native: "🤟🏽"
      },
      {
        unified: "1f91f-1f3fe",
        native: "🤟🏾"
      },
      {
        unified: "1f91f-1f3ff",
        native: "🤟🏿"
      }
    ],
    version: 5
  },
  the_horns: {
    id: "the_horns",
    name: "Sign of the Horns",
    keywords: [
      "hand",
      "fingers",
      "evil",
      "eye",
      "rock",
      "on"
    ],
    skins: [
      {
        unified: "1f918",
        native: "🤘"
      },
      {
        unified: "1f918-1f3fb",
        native: "🤘🏻"
      },
      {
        unified: "1f918-1f3fc",
        native: "🤘🏼"
      },
      {
        unified: "1f918-1f3fd",
        native: "🤘🏽"
      },
      {
        unified: "1f918-1f3fe",
        native: "🤘🏾"
      },
      {
        unified: "1f918-1f3ff",
        native: "🤘🏿"
      }
    ],
    version: 1
  },
  call_me_hand: {
    id: "call_me_hand",
    name: "Call Me Hand",
    keywords: [
      "hands",
      "gesture",
      "shaka"
    ],
    skins: [
      {
        unified: "1f919",
        native: "🤙"
      },
      {
        unified: "1f919-1f3fb",
        native: "🤙🏻"
      },
      {
        unified: "1f919-1f3fc",
        native: "🤙🏼"
      },
      {
        unified: "1f919-1f3fd",
        native: "🤙🏽"
      },
      {
        unified: "1f919-1f3fe",
        native: "🤙🏾"
      },
      {
        unified: "1f919-1f3ff",
        native: "🤙🏿"
      }
    ],
    version: 3
  },
  point_left: {
    id: "point_left",
    name: "Backhand Index Pointing Left",
    keywords: [
      "point",
      "direction",
      "fingers",
      "hand"
    ],
    skins: [
      {
        unified: "1f448",
        native: "👈"
      },
      {
        unified: "1f448-1f3fb",
        native: "👈🏻"
      },
      {
        unified: "1f448-1f3fc",
        native: "👈🏼"
      },
      {
        unified: "1f448-1f3fd",
        native: "👈🏽"
      },
      {
        unified: "1f448-1f3fe",
        native: "👈🏾"
      },
      {
        unified: "1f448-1f3ff",
        native: "👈🏿"
      }
    ],
    version: 1
  },
  point_right: {
    id: "point_right",
    name: "Backhand Index Pointing Right",
    keywords: [
      "point",
      "fingers",
      "hand",
      "direction"
    ],
    skins: [
      {
        unified: "1f449",
        native: "👉"
      },
      {
        unified: "1f449-1f3fb",
        native: "👉🏻"
      },
      {
        unified: "1f449-1f3fc",
        native: "👉🏼"
      },
      {
        unified: "1f449-1f3fd",
        native: "👉🏽"
      },
      {
        unified: "1f449-1f3fe",
        native: "👉🏾"
      },
      {
        unified: "1f449-1f3ff",
        native: "👉🏿"
      }
    ],
    version: 1
  },
  point_up_2: {
    id: "point_up_2",
    name: "Backhand Index Pointing Up",
    keywords: [
      "point",
      "2",
      "fingers",
      "hand",
      "direction"
    ],
    skins: [
      {
        unified: "1f446",
        native: "👆"
      },
      {
        unified: "1f446-1f3fb",
        native: "👆🏻"
      },
      {
        unified: "1f446-1f3fc",
        native: "👆🏼"
      },
      {
        unified: "1f446-1f3fd",
        native: "👆🏽"
      },
      {
        unified: "1f446-1f3fe",
        native: "👆🏾"
      },
      {
        unified: "1f446-1f3ff",
        native: "👆🏿"
      }
    ],
    version: 1
  },
  middle_finger: {
    id: "middle_finger",
    name: "Middle Finger",
    keywords: [
      "reversed",
      "hand",
      "with",
      "extended",
      "fingers",
      "rude",
      "flipping"
    ],
    skins: [
      {
        unified: "1f595",
        native: "🖕"
      },
      {
        unified: "1f595-1f3fb",
        native: "🖕🏻"
      },
      {
        unified: "1f595-1f3fc",
        native: "🖕🏼"
      },
      {
        unified: "1f595-1f3fd",
        native: "🖕🏽"
      },
      {
        unified: "1f595-1f3fe",
        native: "🖕🏾"
      },
      {
        unified: "1f595-1f3ff",
        native: "🖕🏿"
      }
    ],
    version: 1
  },
  point_down: {
    id: "point_down",
    name: "Backhand Index Pointing Down",
    keywords: [
      "point",
      "fingers",
      "hand",
      "direction"
    ],
    skins: [
      {
        unified: "1f447",
        native: "👇"
      },
      {
        unified: "1f447-1f3fb",
        native: "👇🏻"
      },
      {
        unified: "1f447-1f3fc",
        native: "👇🏼"
      },
      {
        unified: "1f447-1f3fd",
        native: "👇🏽"
      },
      {
        unified: "1f447-1f3fe",
        native: "👇🏾"
      },
      {
        unified: "1f447-1f3ff",
        native: "👇🏿"
      }
    ],
    version: 1
  },
  point_up: {
    id: "point_up",
    name: "Index Pointing Up",
    keywords: [
      "point",
      "hand",
      "fingers",
      "direction"
    ],
    skins: [
      {
        unified: "261d-fe0f",
        native: "☝️"
      },
      {
        unified: "261d-1f3fb",
        native: "☝🏻"
      },
      {
        unified: "261d-1f3fc",
        native: "☝🏼"
      },
      {
        unified: "261d-1f3fd",
        native: "☝🏽"
      },
      {
        unified: "261d-1f3fe",
        native: "☝🏾"
      },
      {
        unified: "261d-1f3ff",
        native: "☝🏿"
      }
    ],
    version: 1
  },
  index_pointing_at_the_viewer: {
    id: "index_pointing_at_the_viewer",
    name: "Index Pointing at the Viewer",
    keywords: [
      "you",
      "recruit"
    ],
    skins: [
      {
        unified: "1faf5",
        native: "🫵"
      },
      {
        unified: "1faf5-1f3fb",
        native: "🫵🏻"
      },
      {
        unified: "1faf5-1f3fc",
        native: "🫵🏼"
      },
      {
        unified: "1faf5-1f3fd",
        native: "🫵🏽"
      },
      {
        unified: "1faf5-1f3fe",
        native: "🫵🏾"
      },
      {
        unified: "1faf5-1f3ff",
        native: "🫵🏿"
      }
    ],
    version: 14
  },
  "+1": {
    id: "+1",
    name: "Thumbs Up",
    keywords: [
      "+1",
      "thumbsup",
      "yes",
      "awesome",
      "good",
      "agree",
      "accept",
      "cool",
      "hand",
      "like"
    ],
    skins: [
      {
        unified: "1f44d",
        native: "👍"
      },
      {
        unified: "1f44d-1f3fb",
        native: "👍🏻"
      },
      {
        unified: "1f44d-1f3fc",
        native: "👍🏼"
      },
      {
        unified: "1f44d-1f3fd",
        native: "👍🏽"
      },
      {
        unified: "1f44d-1f3fe",
        native: "👍🏾"
      },
      {
        unified: "1f44d-1f3ff",
        native: "👍🏿"
      }
    ],
    version: 1
  },
  "-1": {
    id: "-1",
    name: "Thumbs Down",
    keywords: [
      "-1",
      "thumbsdown",
      "no",
      "dislike",
      "hand"
    ],
    skins: [
      {
        unified: "1f44e",
        native: "👎"
      },
      {
        unified: "1f44e-1f3fb",
        native: "👎🏻"
      },
      {
        unified: "1f44e-1f3fc",
        native: "👎🏼"
      },
      {
        unified: "1f44e-1f3fd",
        native: "👎🏽"
      },
      {
        unified: "1f44e-1f3fe",
        native: "👎🏾"
      },
      {
        unified: "1f44e-1f3ff",
        native: "👎🏿"
      }
    ],
    version: 1
  },
  fist: {
    id: "fist",
    name: "Raised Fist",
    keywords: [
      "fingers",
      "hand",
      "grasp"
    ],
    skins: [
      {
        unified: "270a",
        native: "✊"
      },
      {
        unified: "270a-1f3fb",
        native: "✊🏻"
      },
      {
        unified: "270a-1f3fc",
        native: "✊🏼"
      },
      {
        unified: "270a-1f3fd",
        native: "✊🏽"
      },
      {
        unified: "270a-1f3fe",
        native: "✊🏾"
      },
      {
        unified: "270a-1f3ff",
        native: "✊🏿"
      }
    ],
    version: 1
  },
  facepunch: {
    id: "facepunch",
    name: "Oncoming Fist",
    keywords: [
      "facepunch",
      "punch",
      "angry",
      "violence",
      "hit",
      "attack",
      "hand"
    ],
    skins: [
      {
        unified: "1f44a",
        native: "👊"
      },
      {
        unified: "1f44a-1f3fb",
        native: "👊🏻"
      },
      {
        unified: "1f44a-1f3fc",
        native: "👊🏼"
      },
      {
        unified: "1f44a-1f3fd",
        native: "👊🏽"
      },
      {
        unified: "1f44a-1f3fe",
        native: "👊🏾"
      },
      {
        unified: "1f44a-1f3ff",
        native: "👊🏿"
      }
    ],
    version: 1
  },
  "left-facing_fist": {
    id: "left-facing_fist",
    name: "Left-Facing Fist",
    keywords: [
      "left",
      "facing",
      "hand",
      "fistbump"
    ],
    skins: [
      {
        unified: "1f91b",
        native: "🤛"
      },
      {
        unified: "1f91b-1f3fb",
        native: "🤛🏻"
      },
      {
        unified: "1f91b-1f3fc",
        native: "🤛🏼"
      },
      {
        unified: "1f91b-1f3fd",
        native: "🤛🏽"
      },
      {
        unified: "1f91b-1f3fe",
        native: "🤛🏾"
      },
      {
        unified: "1f91b-1f3ff",
        native: "🤛🏿"
      }
    ],
    version: 3
  },
  "right-facing_fist": {
    id: "right-facing_fist",
    name: "Right-Facing Fist",
    keywords: [
      "right",
      "facing",
      "hand",
      "fistbump"
    ],
    skins: [
      {
        unified: "1f91c",
        native: "🤜"
      },
      {
        unified: "1f91c-1f3fb",
        native: "🤜🏻"
      },
      {
        unified: "1f91c-1f3fc",
        native: "🤜🏼"
      },
      {
        unified: "1f91c-1f3fd",
        native: "🤜🏽"
      },
      {
        unified: "1f91c-1f3fe",
        native: "🤜🏾"
      },
      {
        unified: "1f91c-1f3ff",
        native: "🤜🏿"
      }
    ],
    version: 3
  },
  clap: {
    id: "clap",
    name: "Clapping Hands",
    keywords: [
      "clap",
      "praise",
      "applause",
      "congrats",
      "yay"
    ],
    skins: [
      {
        unified: "1f44f",
        native: "👏"
      },
      {
        unified: "1f44f-1f3fb",
        native: "👏🏻"
      },
      {
        unified: "1f44f-1f3fc",
        native: "👏🏼"
      },
      {
        unified: "1f44f-1f3fd",
        native: "👏🏽"
      },
      {
        unified: "1f44f-1f3fe",
        native: "👏🏾"
      },
      {
        unified: "1f44f-1f3ff",
        native: "👏🏿"
      }
    ],
    version: 1
  },
  raised_hands: {
    id: "raised_hands",
    name: "Raising Hands",
    keywords: [
      "raised",
      "gesture",
      "hooray",
      "yea",
      "celebration"
    ],
    skins: [
      {
        unified: "1f64c",
        native: "🙌"
      },
      {
        unified: "1f64c-1f3fb",
        native: "🙌🏻"
      },
      {
        unified: "1f64c-1f3fc",
        native: "🙌🏼"
      },
      {
        unified: "1f64c-1f3fd",
        native: "🙌🏽"
      },
      {
        unified: "1f64c-1f3fe",
        native: "🙌🏾"
      },
      {
        unified: "1f64c-1f3ff",
        native: "🙌🏿"
      }
    ],
    version: 1
  },
  heart_hands: {
    id: "heart_hands",
    name: "Heart Hands",
    keywords: [
      "love",
      "appreciation",
      "support"
    ],
    skins: [
      {
        unified: "1faf6",
        native: "🫶"
      },
      {
        unified: "1faf6-1f3fb",
        native: "🫶🏻"
      },
      {
        unified: "1faf6-1f3fc",
        native: "🫶🏼"
      },
      {
        unified: "1faf6-1f3fd",
        native: "🫶🏽"
      },
      {
        unified: "1faf6-1f3fe",
        native: "🫶🏾"
      },
      {
        unified: "1faf6-1f3ff",
        native: "🫶🏿"
      }
    ],
    version: 14
  },
  open_hands: {
    id: "open_hands",
    name: "Open Hands",
    keywords: [
      "fingers",
      "butterfly"
    ],
    skins: [
      {
        unified: "1f450",
        native: "👐"
      },
      {
        unified: "1f450-1f3fb",
        native: "👐🏻"
      },
      {
        unified: "1f450-1f3fc",
        native: "👐🏼"
      },
      {
        unified: "1f450-1f3fd",
        native: "👐🏽"
      },
      {
        unified: "1f450-1f3fe",
        native: "👐🏾"
      },
      {
        unified: "1f450-1f3ff",
        native: "👐🏿"
      }
    ],
    version: 1
  },
  palms_up_together: {
    id: "palms_up_together",
    name: "Palms Up Together",
    keywords: [
      "hands",
      "gesture",
      "cupped",
      "prayer"
    ],
    skins: [
      {
        unified: "1f932",
        native: "🤲"
      },
      {
        unified: "1f932-1f3fb",
        native: "🤲🏻"
      },
      {
        unified: "1f932-1f3fc",
        native: "🤲🏼"
      },
      {
        unified: "1f932-1f3fd",
        native: "🤲🏽"
      },
      {
        unified: "1f932-1f3fe",
        native: "🤲🏾"
      },
      {
        unified: "1f932-1f3ff",
        native: "🤲🏿"
      }
    ],
    version: 5
  },
  handshake: {
    id: "handshake",
    name: "Handshake",
    keywords: [
      "agreement",
      "shake"
    ],
    skins: [
      {
        unified: "1f91d",
        native: "🤝"
      },
      {
        unified: "1f91d-1f3fb",
        native: "🤝🏻"
      },
      {
        unified: "1f91d-1f3fc",
        native: "🤝🏼"
      },
      {
        unified: "1f91d-1f3fd",
        native: "🤝🏽"
      },
      {
        unified: "1f91d-1f3fe",
        native: "🤝🏾"
      },
      {
        unified: "1f91d-1f3ff",
        native: "🤝🏿"
      }
    ],
    version: 3
  },
  pray: {
    id: "pray",
    name: "Folded Hands",
    keywords: [
      "pray",
      "please",
      "hope",
      "wish",
      "namaste",
      "highfive",
      "high",
      "five",
      "thank",
      "you",
      "thanks",
      "appreciate"
    ],
    skins: [
      {
        unified: "1f64f",
        native: "🙏"
      },
      {
        unified: "1f64f-1f3fb",
        native: "🙏🏻"
      },
      {
        unified: "1f64f-1f3fc",
        native: "🙏🏼"
      },
      {
        unified: "1f64f-1f3fd",
        native: "🙏🏽"
      },
      {
        unified: "1f64f-1f3fe",
        native: "🙏🏾"
      },
      {
        unified: "1f64f-1f3ff",
        native: "🙏🏿"
      }
    ],
    version: 1
  },
  writing_hand: {
    id: "writing_hand",
    name: "Writing Hand",
    keywords: [
      "lower",
      "left",
      "ballpoint",
      "pen",
      "stationery",
      "write",
      "compose"
    ],
    skins: [
      {
        unified: "270d-fe0f",
        native: "✍️"
      },
      {
        unified: "270d-1f3fb",
        native: "✍🏻"
      },
      {
        unified: "270d-1f3fc",
        native: "✍🏼"
      },
      {
        unified: "270d-1f3fd",
        native: "✍🏽"
      },
      {
        unified: "270d-1f3fe",
        native: "✍🏾"
      },
      {
        unified: "270d-1f3ff",
        native: "✍🏿"
      }
    ],
    version: 1
  },
  nail_care: {
    id: "nail_care",
    name: "Nail Polish",
    keywords: [
      "care",
      "beauty",
      "manicure",
      "finger",
      "fashion"
    ],
    skins: [
      {
        unified: "1f485",
        native: "💅"
      },
      {
        unified: "1f485-1f3fb",
        native: "💅🏻"
      },
      {
        unified: "1f485-1f3fc",
        native: "💅🏼"
      },
      {
        unified: "1f485-1f3fd",
        native: "💅🏽"
      },
      {
        unified: "1f485-1f3fe",
        native: "💅🏾"
      },
      {
        unified: "1f485-1f3ff",
        native: "💅🏿"
      }
    ],
    version: 1
  },
  selfie: {
    id: "selfie",
    name: "Selfie",
    keywords: [
      "camera",
      "phone"
    ],
    skins: [
      {
        unified: "1f933",
        native: "🤳"
      },
      {
        unified: "1f933-1f3fb",
        native: "🤳🏻"
      },
      {
        unified: "1f933-1f3fc",
        native: "🤳🏼"
      },
      {
        unified: "1f933-1f3fd",
        native: "🤳🏽"
      },
      {
        unified: "1f933-1f3fe",
        native: "🤳🏾"
      },
      {
        unified: "1f933-1f3ff",
        native: "🤳🏿"
      }
    ],
    version: 3
  },
  muscle: {
    id: "muscle",
    name: "Flexed Biceps",
    keywords: [
      "muscle",
      "arm",
      "flex",
      "hand",
      "summer",
      "strong"
    ],
    skins: [
      {
        unified: "1f4aa",
        native: "💪"
      },
      {
        unified: "1f4aa-1f3fb",
        native: "💪🏻"
      },
      {
        unified: "1f4aa-1f3fc",
        native: "💪🏼"
      },
      {
        unified: "1f4aa-1f3fd",
        native: "💪🏽"
      },
      {
        unified: "1f4aa-1f3fe",
        native: "💪🏾"
      },
      {
        unified: "1f4aa-1f3ff",
        native: "💪🏿"
      }
    ],
    version: 1
  },
  mechanical_arm: {
    id: "mechanical_arm",
    name: "Mechanical Arm",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9be",
        native: "🦾"
      }
    ],
    version: 12
  },
  mechanical_leg: {
    id: "mechanical_leg",
    name: "Mechanical Leg",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9bf",
        native: "🦿"
      }
    ],
    version: 12
  },
  leg: {
    id: "leg",
    name: "Leg",
    keywords: [
      "kick",
      "limb"
    ],
    skins: [
      {
        unified: "1f9b5",
        native: "🦵"
      },
      {
        unified: "1f9b5-1f3fb",
        native: "🦵🏻"
      },
      {
        unified: "1f9b5-1f3fc",
        native: "🦵🏼"
      },
      {
        unified: "1f9b5-1f3fd",
        native: "🦵🏽"
      },
      {
        unified: "1f9b5-1f3fe",
        native: "🦵🏾"
      },
      {
        unified: "1f9b5-1f3ff",
        native: "🦵🏿"
      }
    ],
    version: 11
  },
  foot: {
    id: "foot",
    name: "Foot",
    keywords: [
      "kick",
      "stomp"
    ],
    skins: [
      {
        unified: "1f9b6",
        native: "🦶"
      },
      {
        unified: "1f9b6-1f3fb",
        native: "🦶🏻"
      },
      {
        unified: "1f9b6-1f3fc",
        native: "🦶🏼"
      },
      {
        unified: "1f9b6-1f3fd",
        native: "🦶🏽"
      },
      {
        unified: "1f9b6-1f3fe",
        native: "🦶🏾"
      },
      {
        unified: "1f9b6-1f3ff",
        native: "🦶🏿"
      }
    ],
    version: 11
  },
  ear: {
    id: "ear",
    name: "Ear",
    keywords: [
      "face",
      "hear",
      "sound",
      "listen"
    ],
    skins: [
      {
        unified: "1f442",
        native: "👂"
      },
      {
        unified: "1f442-1f3fb",
        native: "👂🏻"
      },
      {
        unified: "1f442-1f3fc",
        native: "👂🏼"
      },
      {
        unified: "1f442-1f3fd",
        native: "👂🏽"
      },
      {
        unified: "1f442-1f3fe",
        native: "👂🏾"
      },
      {
        unified: "1f442-1f3ff",
        native: "👂🏿"
      }
    ],
    version: 1
  },
  ear_with_hearing_aid: {
    id: "ear_with_hearing_aid",
    name: "Ear with Hearing Aid",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9bb",
        native: "🦻"
      },
      {
        unified: "1f9bb-1f3fb",
        native: "🦻🏻"
      },
      {
        unified: "1f9bb-1f3fc",
        native: "🦻🏼"
      },
      {
        unified: "1f9bb-1f3fd",
        native: "🦻🏽"
      },
      {
        unified: "1f9bb-1f3fe",
        native: "🦻🏾"
      },
      {
        unified: "1f9bb-1f3ff",
        native: "🦻🏿"
      }
    ],
    version: 12
  },
  nose: {
    id: "nose",
    name: "Nose",
    keywords: [
      "smell",
      "sniff"
    ],
    skins: [
      {
        unified: "1f443",
        native: "👃"
      },
      {
        unified: "1f443-1f3fb",
        native: "👃🏻"
      },
      {
        unified: "1f443-1f3fc",
        native: "👃🏼"
      },
      {
        unified: "1f443-1f3fd",
        native: "👃🏽"
      },
      {
        unified: "1f443-1f3fe",
        native: "👃🏾"
      },
      {
        unified: "1f443-1f3ff",
        native: "👃🏿"
      }
    ],
    version: 1
  },
  brain: {
    id: "brain",
    name: "Brain",
    keywords: [
      "smart",
      "intelligent"
    ],
    skins: [
      {
        unified: "1f9e0",
        native: "🧠"
      }
    ],
    version: 5
  },
  anatomical_heart: {
    id: "anatomical_heart",
    name: "Anatomical Heart",
    keywords: [
      "health",
      "heartbeat"
    ],
    skins: [
      {
        unified: "1fac0",
        native: "🫀"
      }
    ],
    version: 13
  },
  lungs: {
    id: "lungs",
    name: "Lungs",
    keywords: [
      "breathe"
    ],
    skins: [
      {
        unified: "1fac1",
        native: "🫁"
      }
    ],
    version: 13
  },
  tooth: {
    id: "tooth",
    name: "Tooth",
    keywords: [
      "teeth",
      "dentist"
    ],
    skins: [
      {
        unified: "1f9b7",
        native: "🦷"
      }
    ],
    version: 11
  },
  bone: {
    id: "bone",
    name: "Bone",
    keywords: [
      "skeleton"
    ],
    skins: [
      {
        unified: "1f9b4",
        native: "🦴"
      }
    ],
    version: 11
  },
  eyes: {
    id: "eyes",
    name: "Eyes",
    keywords: [
      "look",
      "watch",
      "stalk",
      "peek",
      "see"
    ],
    skins: [
      {
        unified: "1f440",
        native: "👀"
      }
    ],
    version: 1
  },
  eye: {
    id: "eye",
    name: "Eye",
    keywords: [
      "face",
      "look",
      "see",
      "watch",
      "stare"
    ],
    skins: [
      {
        unified: "1f441-fe0f",
        native: "👁️"
      }
    ],
    version: 1
  },
  tongue: {
    id: "tongue",
    name: "Tongue",
    keywords: [
      "mouth",
      "playful"
    ],
    skins: [
      {
        unified: "1f445",
        native: "👅"
      }
    ],
    version: 1
  },
  lips: {
    id: "lips",
    name: "Mouth",
    keywords: [
      "lips",
      "kiss"
    ],
    skins: [
      {
        unified: "1f444",
        native: "👄"
      }
    ],
    version: 1
  },
  biting_lip: {
    id: "biting_lip",
    name: "Biting Lip",
    keywords: [
      "flirt",
      "sexy",
      "pain",
      "worry"
    ],
    skins: [
      {
        unified: "1fae6",
        native: "🫦"
      }
    ],
    version: 14
  },
  baby: {
    id: "baby",
    name: "Baby",
    keywords: [
      "child",
      "boy",
      "girl",
      "toddler"
    ],
    skins: [
      {
        unified: "1f476",
        native: "👶"
      },
      {
        unified: "1f476-1f3fb",
        native: "👶🏻"
      },
      {
        unified: "1f476-1f3fc",
        native: "👶🏼"
      },
      {
        unified: "1f476-1f3fd",
        native: "👶🏽"
      },
      {
        unified: "1f476-1f3fe",
        native: "👶🏾"
      },
      {
        unified: "1f476-1f3ff",
        native: "👶🏿"
      }
    ],
    version: 1
  },
  child: {
    id: "child",
    name: "Child",
    keywords: [
      "gender",
      "neutral",
      "young"
    ],
    skins: [
      {
        unified: "1f9d2",
        native: "🧒"
      },
      {
        unified: "1f9d2-1f3fb",
        native: "🧒🏻"
      },
      {
        unified: "1f9d2-1f3fc",
        native: "🧒🏼"
      },
      {
        unified: "1f9d2-1f3fd",
        native: "🧒🏽"
      },
      {
        unified: "1f9d2-1f3fe",
        native: "🧒🏾"
      },
      {
        unified: "1f9d2-1f3ff",
        native: "🧒🏿"
      }
    ],
    version: 5
  },
  boy: {
    id: "boy",
    name: "Boy",
    keywords: [
      "man",
      "male",
      "guy",
      "teenager"
    ],
    skins: [
      {
        unified: "1f466",
        native: "👦"
      },
      {
        unified: "1f466-1f3fb",
        native: "👦🏻"
      },
      {
        unified: "1f466-1f3fc",
        native: "👦🏼"
      },
      {
        unified: "1f466-1f3fd",
        native: "👦🏽"
      },
      {
        unified: "1f466-1f3fe",
        native: "👦🏾"
      },
      {
        unified: "1f466-1f3ff",
        native: "👦🏿"
      }
    ],
    version: 1
  },
  girl: {
    id: "girl",
    name: "Girl",
    keywords: [
      "female",
      "woman",
      "teenager"
    ],
    skins: [
      {
        unified: "1f467",
        native: "👧"
      },
      {
        unified: "1f467-1f3fb",
        native: "👧🏻"
      },
      {
        unified: "1f467-1f3fc",
        native: "👧🏼"
      },
      {
        unified: "1f467-1f3fd",
        native: "👧🏽"
      },
      {
        unified: "1f467-1f3fe",
        native: "👧🏾"
      },
      {
        unified: "1f467-1f3ff",
        native: "👧🏿"
      }
    ],
    version: 1
  },
  adult: {
    id: "adult",
    name: "Adult",
    keywords: [
      "person",
      "gender",
      "neutral"
    ],
    skins: [
      {
        unified: "1f9d1",
        native: "🧑"
      },
      {
        unified: "1f9d1-1f3fb",
        native: "🧑🏻"
      },
      {
        unified: "1f9d1-1f3fc",
        native: "🧑🏼"
      },
      {
        unified: "1f9d1-1f3fd",
        native: "🧑🏽"
      },
      {
        unified: "1f9d1-1f3fe",
        native: "🧑🏾"
      },
      {
        unified: "1f9d1-1f3ff",
        native: "🧑🏿"
      }
    ],
    version: 5
  },
  person_with_blond_hair: {
    id: "person_with_blond_hair",
    name: "Person Blond Hair",
    keywords: [
      "with",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f471",
        native: "👱"
      },
      {
        unified: "1f471-1f3fb",
        native: "👱🏻"
      },
      {
        unified: "1f471-1f3fc",
        native: "👱🏼"
      },
      {
        unified: "1f471-1f3fd",
        native: "👱🏽"
      },
      {
        unified: "1f471-1f3fe",
        native: "👱🏾"
      },
      {
        unified: "1f471-1f3ff",
        native: "👱🏿"
      }
    ],
    version: 1
  },
  man: {
    id: "man",
    name: "Man",
    keywords: [
      "mustache",
      "father",
      "dad",
      "guy",
      "classy",
      "sir",
      "moustache"
    ],
    skins: [
      {
        unified: "1f468",
        native: "👨"
      },
      {
        unified: "1f468-1f3fb",
        native: "👨🏻"
      },
      {
        unified: "1f468-1f3fc",
        native: "👨🏼"
      },
      {
        unified: "1f468-1f3fd",
        native: "👨🏽"
      },
      {
        unified: "1f468-1f3fe",
        native: "👨🏾"
      },
      {
        unified: "1f468-1f3ff",
        native: "👨🏿"
      }
    ],
    version: 1
  },
  bearded_person: {
    id: "bearded_person",
    name: "Person Beard",
    keywords: [
      "bearded",
      "man",
      "bewhiskered"
    ],
    skins: [
      {
        unified: "1f9d4",
        native: "🧔"
      },
      {
        unified: "1f9d4-1f3fb",
        native: "🧔🏻"
      },
      {
        unified: "1f9d4-1f3fc",
        native: "🧔🏼"
      },
      {
        unified: "1f9d4-1f3fd",
        native: "🧔🏽"
      },
      {
        unified: "1f9d4-1f3fe",
        native: "🧔🏾"
      },
      {
        unified: "1f9d4-1f3ff",
        native: "🧔🏿"
      }
    ],
    version: 5
  },
  man_with_beard: {
    id: "man_with_beard",
    name: "Man: Beard",
    keywords: [
      "man",
      "with",
      "facial",
      "hair"
    ],
    skins: [
      {
        unified: "1f9d4-200d-2642-fe0f",
        native: "🧔‍♂️"
      },
      {
        unified: "1f9d4-1f3fb-200d-2642-fe0f",
        native: "🧔🏻‍♂️"
      },
      {
        unified: "1f9d4-1f3fc-200d-2642-fe0f",
        native: "🧔🏼‍♂️"
      },
      {
        unified: "1f9d4-1f3fd-200d-2642-fe0f",
        native: "🧔🏽‍♂️"
      },
      {
        unified: "1f9d4-1f3fe-200d-2642-fe0f",
        native: "🧔🏾‍♂️"
      },
      {
        unified: "1f9d4-1f3ff-200d-2642-fe0f",
        native: "🧔🏿‍♂️"
      }
    ],
    version: 13.1
  },
  woman_with_beard: {
    id: "woman_with_beard",
    name: "Woman: Beard",
    keywords: [
      "woman",
      "with",
      "facial",
      "hair"
    ],
    skins: [
      {
        unified: "1f9d4-200d-2640-fe0f",
        native: "🧔‍♀️"
      },
      {
        unified: "1f9d4-1f3fb-200d-2640-fe0f",
        native: "🧔🏻‍♀️"
      },
      {
        unified: "1f9d4-1f3fc-200d-2640-fe0f",
        native: "🧔🏼‍♀️"
      },
      {
        unified: "1f9d4-1f3fd-200d-2640-fe0f",
        native: "🧔🏽‍♀️"
      },
      {
        unified: "1f9d4-1f3fe-200d-2640-fe0f",
        native: "🧔🏾‍♀️"
      },
      {
        unified: "1f9d4-1f3ff-200d-2640-fe0f",
        native: "🧔🏿‍♀️"
      }
    ],
    version: 13.1
  },
  red_haired_man: {
    id: "red_haired_man",
    name: "Man: Red Hair",
    keywords: [
      "haired",
      "man",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f468-200d-1f9b0",
        native: "👨‍🦰"
      },
      {
        unified: "1f468-1f3fb-200d-1f9b0",
        native: "👨🏻‍🦰"
      },
      {
        unified: "1f468-1f3fc-200d-1f9b0",
        native: "👨🏼‍🦰"
      },
      {
        unified: "1f468-1f3fd-200d-1f9b0",
        native: "👨🏽‍🦰"
      },
      {
        unified: "1f468-1f3fe-200d-1f9b0",
        native: "👨🏾‍🦰"
      },
      {
        unified: "1f468-1f3ff-200d-1f9b0",
        native: "👨🏿‍🦰"
      }
    ],
    version: 11
  },
  curly_haired_man: {
    id: "curly_haired_man",
    name: "Man: Curly Hair",
    keywords: [
      "haired",
      "man",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f468-200d-1f9b1",
        native: "👨‍🦱"
      },
      {
        unified: "1f468-1f3fb-200d-1f9b1",
        native: "👨🏻‍🦱"
      },
      {
        unified: "1f468-1f3fc-200d-1f9b1",
        native: "👨🏼‍🦱"
      },
      {
        unified: "1f468-1f3fd-200d-1f9b1",
        native: "👨🏽‍🦱"
      },
      {
        unified: "1f468-1f3fe-200d-1f9b1",
        native: "👨🏾‍🦱"
      },
      {
        unified: "1f468-1f3ff-200d-1f9b1",
        native: "👨🏿‍🦱"
      }
    ],
    version: 11
  },
  white_haired_man: {
    id: "white_haired_man",
    name: "Man: White Hair",
    keywords: [
      "haired",
      "man",
      "old",
      "elder"
    ],
    skins: [
      {
        unified: "1f468-200d-1f9b3",
        native: "👨‍🦳"
      },
      {
        unified: "1f468-1f3fb-200d-1f9b3",
        native: "👨🏻‍🦳"
      },
      {
        unified: "1f468-1f3fc-200d-1f9b3",
        native: "👨🏼‍🦳"
      },
      {
        unified: "1f468-1f3fd-200d-1f9b3",
        native: "👨🏽‍🦳"
      },
      {
        unified: "1f468-1f3fe-200d-1f9b3",
        native: "👨🏾‍🦳"
      },
      {
        unified: "1f468-1f3ff-200d-1f9b3",
        native: "👨🏿‍🦳"
      }
    ],
    version: 11
  },
  bald_man: {
    id: "bald_man",
    name: "Man: Bald",
    keywords: [
      "man",
      "hairless"
    ],
    skins: [
      {
        unified: "1f468-200d-1f9b2",
        native: "👨‍🦲"
      },
      {
        unified: "1f468-1f3fb-200d-1f9b2",
        native: "👨🏻‍🦲"
      },
      {
        unified: "1f468-1f3fc-200d-1f9b2",
        native: "👨🏼‍🦲"
      },
      {
        unified: "1f468-1f3fd-200d-1f9b2",
        native: "👨🏽‍🦲"
      },
      {
        unified: "1f468-1f3fe-200d-1f9b2",
        native: "👨🏾‍🦲"
      },
      {
        unified: "1f468-1f3ff-200d-1f9b2",
        native: "👨🏿‍🦲"
      }
    ],
    version: 11
  },
  woman: {
    id: "woman",
    name: "Woman",
    keywords: [
      "female",
      "girls",
      "lady"
    ],
    skins: [
      {
        unified: "1f469",
        native: "👩"
      },
      {
        unified: "1f469-1f3fb",
        native: "👩🏻"
      },
      {
        unified: "1f469-1f3fc",
        native: "👩🏼"
      },
      {
        unified: "1f469-1f3fd",
        native: "👩🏽"
      },
      {
        unified: "1f469-1f3fe",
        native: "👩🏾"
      },
      {
        unified: "1f469-1f3ff",
        native: "👩🏿"
      }
    ],
    version: 1
  },
  red_haired_woman: {
    id: "red_haired_woman",
    name: "Woman: Red Hair",
    keywords: [
      "haired",
      "woman",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f469-200d-1f9b0",
        native: "👩‍🦰"
      },
      {
        unified: "1f469-1f3fb-200d-1f9b0",
        native: "👩🏻‍🦰"
      },
      {
        unified: "1f469-1f3fc-200d-1f9b0",
        native: "👩🏼‍🦰"
      },
      {
        unified: "1f469-1f3fd-200d-1f9b0",
        native: "👩🏽‍🦰"
      },
      {
        unified: "1f469-1f3fe-200d-1f9b0",
        native: "👩🏾‍🦰"
      },
      {
        unified: "1f469-1f3ff-200d-1f9b0",
        native: "👩🏿‍🦰"
      }
    ],
    version: 11
  },
  red_haired_person: {
    id: "red_haired_person",
    name: "Person: Red Hair",
    keywords: [
      "haired",
      "person",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f9b0",
        native: "🧑‍🦰"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f9b0",
        native: "🧑🏻‍🦰"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f9b0",
        native: "🧑🏼‍🦰"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f9b0",
        native: "🧑🏽‍🦰"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f9b0",
        native: "🧑🏾‍🦰"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f9b0",
        native: "🧑🏿‍🦰"
      }
    ],
    version: 12.1
  },
  curly_haired_woman: {
    id: "curly_haired_woman",
    name: "Woman: Curly Hair",
    keywords: [
      "haired",
      "woman",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f469-200d-1f9b1",
        native: "👩‍🦱"
      },
      {
        unified: "1f469-1f3fb-200d-1f9b1",
        native: "👩🏻‍🦱"
      },
      {
        unified: "1f469-1f3fc-200d-1f9b1",
        native: "👩🏼‍🦱"
      },
      {
        unified: "1f469-1f3fd-200d-1f9b1",
        native: "👩🏽‍🦱"
      },
      {
        unified: "1f469-1f3fe-200d-1f9b1",
        native: "👩🏾‍🦱"
      },
      {
        unified: "1f469-1f3ff-200d-1f9b1",
        native: "👩🏿‍🦱"
      }
    ],
    version: 11
  },
  curly_haired_person: {
    id: "curly_haired_person",
    name: "Person: Curly Hair",
    keywords: [
      "haired",
      "person",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f9b1",
        native: "🧑‍🦱"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f9b1",
        native: "🧑🏻‍🦱"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f9b1",
        native: "🧑🏼‍🦱"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f9b1",
        native: "🧑🏽‍🦱"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f9b1",
        native: "🧑🏾‍🦱"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f9b1",
        native: "🧑🏿‍🦱"
      }
    ],
    version: 12.1
  },
  white_haired_woman: {
    id: "white_haired_woman",
    name: "Woman: White Hair",
    keywords: [
      "haired",
      "woman",
      "old",
      "elder"
    ],
    skins: [
      {
        unified: "1f469-200d-1f9b3",
        native: "👩‍🦳"
      },
      {
        unified: "1f469-1f3fb-200d-1f9b3",
        native: "👩🏻‍🦳"
      },
      {
        unified: "1f469-1f3fc-200d-1f9b3",
        native: "👩🏼‍🦳"
      },
      {
        unified: "1f469-1f3fd-200d-1f9b3",
        native: "👩🏽‍🦳"
      },
      {
        unified: "1f469-1f3fe-200d-1f9b3",
        native: "👩🏾‍🦳"
      },
      {
        unified: "1f469-1f3ff-200d-1f9b3",
        native: "👩🏿‍🦳"
      }
    ],
    version: 11
  },
  white_haired_person: {
    id: "white_haired_person",
    name: "Person: White Hair",
    keywords: [
      "haired",
      "person",
      "elder",
      "old"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f9b3",
        native: "🧑‍🦳"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f9b3",
        native: "🧑🏻‍🦳"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f9b3",
        native: "🧑🏼‍🦳"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f9b3",
        native: "🧑🏽‍🦳"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f9b3",
        native: "🧑🏾‍🦳"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f9b3",
        native: "🧑🏿‍🦳"
      }
    ],
    version: 12.1
  },
  bald_woman: {
    id: "bald_woman",
    name: "Woman: Bald",
    keywords: [
      "woman",
      "hairless"
    ],
    skins: [
      {
        unified: "1f469-200d-1f9b2",
        native: "👩‍🦲"
      },
      {
        unified: "1f469-1f3fb-200d-1f9b2",
        native: "👩🏻‍🦲"
      },
      {
        unified: "1f469-1f3fc-200d-1f9b2",
        native: "👩🏼‍🦲"
      },
      {
        unified: "1f469-1f3fd-200d-1f9b2",
        native: "👩🏽‍🦲"
      },
      {
        unified: "1f469-1f3fe-200d-1f9b2",
        native: "👩🏾‍🦲"
      },
      {
        unified: "1f469-1f3ff-200d-1f9b2",
        native: "👩🏿‍🦲"
      }
    ],
    version: 11
  },
  bald_person: {
    id: "bald_person",
    name: "Person: Bald",
    keywords: [
      "person",
      "hairless"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f9b2",
        native: "🧑‍🦲"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f9b2",
        native: "🧑🏻‍🦲"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f9b2",
        native: "🧑🏼‍🦲"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f9b2",
        native: "🧑🏽‍🦲"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f9b2",
        native: "🧑🏾‍🦲"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f9b2",
        native: "🧑🏿‍🦲"
      }
    ],
    version: 12.1
  },
  "blond-haired-woman": {
    id: "blond-haired-woman",
    name: "Woman: Blond Hair",
    keywords: [
      "haired-woman",
      "woman",
      "female",
      "girl",
      "blonde",
      "person"
    ],
    skins: [
      {
        unified: "1f471-200d-2640-fe0f",
        native: "👱‍♀️"
      },
      {
        unified: "1f471-1f3fb-200d-2640-fe0f",
        native: "👱🏻‍♀️"
      },
      {
        unified: "1f471-1f3fc-200d-2640-fe0f",
        native: "👱🏼‍♀️"
      },
      {
        unified: "1f471-1f3fd-200d-2640-fe0f",
        native: "👱🏽‍♀️"
      },
      {
        unified: "1f471-1f3fe-200d-2640-fe0f",
        native: "👱🏾‍♀️"
      },
      {
        unified: "1f471-1f3ff-200d-2640-fe0f",
        native: "👱🏿‍♀️"
      }
    ],
    version: 4
  },
  "blond-haired-man": {
    id: "blond-haired-man",
    name: "Man: Blond Hair",
    keywords: [
      "haired-man",
      "man",
      "male",
      "boy",
      "blonde",
      "guy",
      "person"
    ],
    skins: [
      {
        unified: "1f471-200d-2642-fe0f",
        native: "👱‍♂️"
      },
      {
        unified: "1f471-1f3fb-200d-2642-fe0f",
        native: "👱🏻‍♂️"
      },
      {
        unified: "1f471-1f3fc-200d-2642-fe0f",
        native: "👱🏼‍♂️"
      },
      {
        unified: "1f471-1f3fd-200d-2642-fe0f",
        native: "👱🏽‍♂️"
      },
      {
        unified: "1f471-1f3fe-200d-2642-fe0f",
        native: "👱🏾‍♂️"
      },
      {
        unified: "1f471-1f3ff-200d-2642-fe0f",
        native: "👱🏿‍♂️"
      }
    ],
    version: 4
  },
  older_adult: {
    id: "older_adult",
    name: "Older Adult",
    keywords: [
      "person",
      "human",
      "elder",
      "senior",
      "gender",
      "neutral"
    ],
    skins: [
      {
        unified: "1f9d3",
        native: "🧓"
      },
      {
        unified: "1f9d3-1f3fb",
        native: "🧓🏻"
      },
      {
        unified: "1f9d3-1f3fc",
        native: "🧓🏼"
      },
      {
        unified: "1f9d3-1f3fd",
        native: "🧓🏽"
      },
      {
        unified: "1f9d3-1f3fe",
        native: "🧓🏾"
      },
      {
        unified: "1f9d3-1f3ff",
        native: "🧓🏿"
      }
    ],
    version: 5
  },
  older_man: {
    id: "older_man",
    name: "Old Man",
    keywords: [
      "older",
      "human",
      "male",
      "men",
      "elder",
      "senior"
    ],
    skins: [
      {
        unified: "1f474",
        native: "👴"
      },
      {
        unified: "1f474-1f3fb",
        native: "👴🏻"
      },
      {
        unified: "1f474-1f3fc",
        native: "👴🏼"
      },
      {
        unified: "1f474-1f3fd",
        native: "👴🏽"
      },
      {
        unified: "1f474-1f3fe",
        native: "👴🏾"
      },
      {
        unified: "1f474-1f3ff",
        native: "👴🏿"
      }
    ],
    version: 1
  },
  older_woman: {
    id: "older_woman",
    name: "Old Woman",
    keywords: [
      "older",
      "human",
      "female",
      "women",
      "lady",
      "elder",
      "senior"
    ],
    skins: [
      {
        unified: "1f475",
        native: "👵"
      },
      {
        unified: "1f475-1f3fb",
        native: "👵🏻"
      },
      {
        unified: "1f475-1f3fc",
        native: "👵🏼"
      },
      {
        unified: "1f475-1f3fd",
        native: "👵🏽"
      },
      {
        unified: "1f475-1f3fe",
        native: "👵🏾"
      },
      {
        unified: "1f475-1f3ff",
        native: "👵🏿"
      }
    ],
    version: 1
  },
  person_frowning: {
    id: "person_frowning",
    name: "Person Frowning",
    keywords: [
      "worried"
    ],
    skins: [
      {
        unified: "1f64d",
        native: "🙍"
      },
      {
        unified: "1f64d-1f3fb",
        native: "🙍🏻"
      },
      {
        unified: "1f64d-1f3fc",
        native: "🙍🏼"
      },
      {
        unified: "1f64d-1f3fd",
        native: "🙍🏽"
      },
      {
        unified: "1f64d-1f3fe",
        native: "🙍🏾"
      },
      {
        unified: "1f64d-1f3ff",
        native: "🙍🏿"
      }
    ],
    version: 1
  },
  "man-frowning": {
    id: "man-frowning",
    name: "Man Frowning",
    keywords: [
      "male",
      "boy",
      "sad",
      "depressed",
      "discouraged",
      "unhappy"
    ],
    skins: [
      {
        unified: "1f64d-200d-2642-fe0f",
        native: "🙍‍♂️"
      },
      {
        unified: "1f64d-1f3fb-200d-2642-fe0f",
        native: "🙍🏻‍♂️"
      },
      {
        unified: "1f64d-1f3fc-200d-2642-fe0f",
        native: "🙍🏼‍♂️"
      },
      {
        unified: "1f64d-1f3fd-200d-2642-fe0f",
        native: "🙍🏽‍♂️"
      },
      {
        unified: "1f64d-1f3fe-200d-2642-fe0f",
        native: "🙍🏾‍♂️"
      },
      {
        unified: "1f64d-1f3ff-200d-2642-fe0f",
        native: "🙍🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-frowning": {
    id: "woman-frowning",
    name: "Woman Frowning",
    keywords: [
      "female",
      "girl",
      "sad",
      "depressed",
      "discouraged",
      "unhappy"
    ],
    skins: [
      {
        unified: "1f64d-200d-2640-fe0f",
        native: "🙍‍♀️"
      },
      {
        unified: "1f64d-1f3fb-200d-2640-fe0f",
        native: "🙍🏻‍♀️"
      },
      {
        unified: "1f64d-1f3fc-200d-2640-fe0f",
        native: "🙍🏼‍♀️"
      },
      {
        unified: "1f64d-1f3fd-200d-2640-fe0f",
        native: "🙍🏽‍♀️"
      },
      {
        unified: "1f64d-1f3fe-200d-2640-fe0f",
        native: "🙍🏾‍♀️"
      },
      {
        unified: "1f64d-1f3ff-200d-2640-fe0f",
        native: "🙍🏿‍♀️"
      }
    ],
    version: 4
  },
  person_with_pouting_face: {
    id: "person_with_pouting_face",
    name: "Person Pouting",
    keywords: [
      "with",
      "face",
      "upset"
    ],
    skins: [
      {
        unified: "1f64e",
        native: "🙎"
      },
      {
        unified: "1f64e-1f3fb",
        native: "🙎🏻"
      },
      {
        unified: "1f64e-1f3fc",
        native: "🙎🏼"
      },
      {
        unified: "1f64e-1f3fd",
        native: "🙎🏽"
      },
      {
        unified: "1f64e-1f3fe",
        native: "🙎🏾"
      },
      {
        unified: "1f64e-1f3ff",
        native: "🙎🏿"
      }
    ],
    version: 1
  },
  "man-pouting": {
    id: "man-pouting",
    name: "Man Pouting",
    keywords: [
      "male",
      "boy"
    ],
    skins: [
      {
        unified: "1f64e-200d-2642-fe0f",
        native: "🙎‍♂️"
      },
      {
        unified: "1f64e-1f3fb-200d-2642-fe0f",
        native: "🙎🏻‍♂️"
      },
      {
        unified: "1f64e-1f3fc-200d-2642-fe0f",
        native: "🙎🏼‍♂️"
      },
      {
        unified: "1f64e-1f3fd-200d-2642-fe0f",
        native: "🙎🏽‍♂️"
      },
      {
        unified: "1f64e-1f3fe-200d-2642-fe0f",
        native: "🙎🏾‍♂️"
      },
      {
        unified: "1f64e-1f3ff-200d-2642-fe0f",
        native: "🙎🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-pouting": {
    id: "woman-pouting",
    name: "Woman Pouting",
    keywords: [
      "female",
      "girl"
    ],
    skins: [
      {
        unified: "1f64e-200d-2640-fe0f",
        native: "🙎‍♀️"
      },
      {
        unified: "1f64e-1f3fb-200d-2640-fe0f",
        native: "🙎🏻‍♀️"
      },
      {
        unified: "1f64e-1f3fc-200d-2640-fe0f",
        native: "🙎🏼‍♀️"
      },
      {
        unified: "1f64e-1f3fd-200d-2640-fe0f",
        native: "🙎🏽‍♀️"
      },
      {
        unified: "1f64e-1f3fe-200d-2640-fe0f",
        native: "🙎🏾‍♀️"
      },
      {
        unified: "1f64e-1f3ff-200d-2640-fe0f",
        native: "🙎🏿‍♀️"
      }
    ],
    version: 4
  },
  no_good: {
    id: "no_good",
    name: "Person Gesturing No",
    keywords: [
      "good",
      "decline"
    ],
    skins: [
      {
        unified: "1f645",
        native: "🙅"
      },
      {
        unified: "1f645-1f3fb",
        native: "🙅🏻"
      },
      {
        unified: "1f645-1f3fc",
        native: "🙅🏼"
      },
      {
        unified: "1f645-1f3fd",
        native: "🙅🏽"
      },
      {
        unified: "1f645-1f3fe",
        native: "🙅🏾"
      },
      {
        unified: "1f645-1f3ff",
        native: "🙅🏿"
      }
    ],
    version: 1
  },
  "man-gesturing-no": {
    id: "man-gesturing-no",
    name: "Man Gesturing No",
    keywords: [
      "gesturing-no",
      "male",
      "boy",
      "nope"
    ],
    skins: [
      {
        unified: "1f645-200d-2642-fe0f",
        native: "🙅‍♂️"
      },
      {
        unified: "1f645-1f3fb-200d-2642-fe0f",
        native: "🙅🏻‍♂️"
      },
      {
        unified: "1f645-1f3fc-200d-2642-fe0f",
        native: "🙅🏼‍♂️"
      },
      {
        unified: "1f645-1f3fd-200d-2642-fe0f",
        native: "🙅🏽‍♂️"
      },
      {
        unified: "1f645-1f3fe-200d-2642-fe0f",
        native: "🙅🏾‍♂️"
      },
      {
        unified: "1f645-1f3ff-200d-2642-fe0f",
        native: "🙅🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-gesturing-no": {
    id: "woman-gesturing-no",
    name: "Woman Gesturing No",
    keywords: [
      "gesturing-no",
      "female",
      "girl",
      "nope"
    ],
    skins: [
      {
        unified: "1f645-200d-2640-fe0f",
        native: "🙅‍♀️"
      },
      {
        unified: "1f645-1f3fb-200d-2640-fe0f",
        native: "🙅🏻‍♀️"
      },
      {
        unified: "1f645-1f3fc-200d-2640-fe0f",
        native: "🙅🏼‍♀️"
      },
      {
        unified: "1f645-1f3fd-200d-2640-fe0f",
        native: "🙅🏽‍♀️"
      },
      {
        unified: "1f645-1f3fe-200d-2640-fe0f",
        native: "🙅🏾‍♀️"
      },
      {
        unified: "1f645-1f3ff-200d-2640-fe0f",
        native: "🙅🏿‍♀️"
      }
    ],
    version: 4
  },
  ok_woman: {
    id: "ok_woman",
    name: "Person Gesturing Ok",
    keywords: [
      "woman",
      "agree"
    ],
    skins: [
      {
        unified: "1f646",
        native: "🙆"
      },
      {
        unified: "1f646-1f3fb",
        native: "🙆🏻"
      },
      {
        unified: "1f646-1f3fc",
        native: "🙆🏼"
      },
      {
        unified: "1f646-1f3fd",
        native: "🙆🏽"
      },
      {
        unified: "1f646-1f3fe",
        native: "🙆🏾"
      },
      {
        unified: "1f646-1f3ff",
        native: "🙆🏿"
      }
    ],
    version: 1
  },
  "man-gesturing-ok": {
    id: "man-gesturing-ok",
    name: "Man Gesturing Ok",
    keywords: [
      "gesturing-ok",
      "men",
      "boy",
      "male",
      "blue",
      "human"
    ],
    skins: [
      {
        unified: "1f646-200d-2642-fe0f",
        native: "🙆‍♂️"
      },
      {
        unified: "1f646-1f3fb-200d-2642-fe0f",
        native: "🙆🏻‍♂️"
      },
      {
        unified: "1f646-1f3fc-200d-2642-fe0f",
        native: "🙆🏼‍♂️"
      },
      {
        unified: "1f646-1f3fd-200d-2642-fe0f",
        native: "🙆🏽‍♂️"
      },
      {
        unified: "1f646-1f3fe-200d-2642-fe0f",
        native: "🙆🏾‍♂️"
      },
      {
        unified: "1f646-1f3ff-200d-2642-fe0f",
        native: "🙆🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-gesturing-ok": {
    id: "woman-gesturing-ok",
    name: "Woman Gesturing Ok",
    keywords: [
      "gesturing-ok",
      "women",
      "girl",
      "female",
      "pink",
      "human"
    ],
    skins: [
      {
        unified: "1f646-200d-2640-fe0f",
        native: "🙆‍♀️"
      },
      {
        unified: "1f646-1f3fb-200d-2640-fe0f",
        native: "🙆🏻‍♀️"
      },
      {
        unified: "1f646-1f3fc-200d-2640-fe0f",
        native: "🙆🏼‍♀️"
      },
      {
        unified: "1f646-1f3fd-200d-2640-fe0f",
        native: "🙆🏽‍♀️"
      },
      {
        unified: "1f646-1f3fe-200d-2640-fe0f",
        native: "🙆🏾‍♀️"
      },
      {
        unified: "1f646-1f3ff-200d-2640-fe0f",
        native: "🙆🏿‍♀️"
      }
    ],
    version: 4
  },
  information_desk_person: {
    id: "information_desk_person",
    name: "Person Tipping Hand",
    keywords: [
      "information",
      "desk"
    ],
    skins: [
      {
        unified: "1f481",
        native: "💁"
      },
      {
        unified: "1f481-1f3fb",
        native: "💁🏻"
      },
      {
        unified: "1f481-1f3fc",
        native: "💁🏼"
      },
      {
        unified: "1f481-1f3fd",
        native: "💁🏽"
      },
      {
        unified: "1f481-1f3fe",
        native: "💁🏾"
      },
      {
        unified: "1f481-1f3ff",
        native: "💁🏿"
      }
    ],
    version: 1
  },
  "man-tipping-hand": {
    id: "man-tipping-hand",
    name: "Man Tipping Hand",
    keywords: [
      "tipping-hand",
      "male",
      "boy",
      "human",
      "information"
    ],
    skins: [
      {
        unified: "1f481-200d-2642-fe0f",
        native: "💁‍♂️"
      },
      {
        unified: "1f481-1f3fb-200d-2642-fe0f",
        native: "💁🏻‍♂️"
      },
      {
        unified: "1f481-1f3fc-200d-2642-fe0f",
        native: "💁🏼‍♂️"
      },
      {
        unified: "1f481-1f3fd-200d-2642-fe0f",
        native: "💁🏽‍♂️"
      },
      {
        unified: "1f481-1f3fe-200d-2642-fe0f",
        native: "💁🏾‍♂️"
      },
      {
        unified: "1f481-1f3ff-200d-2642-fe0f",
        native: "💁🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-tipping-hand": {
    id: "woman-tipping-hand",
    name: "Woman Tipping Hand",
    keywords: [
      "tipping-hand",
      "female",
      "girl",
      "human",
      "information"
    ],
    skins: [
      {
        unified: "1f481-200d-2640-fe0f",
        native: "💁‍♀️"
      },
      {
        unified: "1f481-1f3fb-200d-2640-fe0f",
        native: "💁🏻‍♀️"
      },
      {
        unified: "1f481-1f3fc-200d-2640-fe0f",
        native: "💁🏼‍♀️"
      },
      {
        unified: "1f481-1f3fd-200d-2640-fe0f",
        native: "💁🏽‍♀️"
      },
      {
        unified: "1f481-1f3fe-200d-2640-fe0f",
        native: "💁🏾‍♀️"
      },
      {
        unified: "1f481-1f3ff-200d-2640-fe0f",
        native: "💁🏿‍♀️"
      }
    ],
    version: 4
  },
  raising_hand: {
    id: "raising_hand",
    name: "Person Raising Hand",
    keywords: [
      "question"
    ],
    skins: [
      {
        unified: "1f64b",
        native: "🙋"
      },
      {
        unified: "1f64b-1f3fb",
        native: "🙋🏻"
      },
      {
        unified: "1f64b-1f3fc",
        native: "🙋🏼"
      },
      {
        unified: "1f64b-1f3fd",
        native: "🙋🏽"
      },
      {
        unified: "1f64b-1f3fe",
        native: "🙋🏾"
      },
      {
        unified: "1f64b-1f3ff",
        native: "🙋🏿"
      }
    ],
    version: 1
  },
  "man-raising-hand": {
    id: "man-raising-hand",
    name: "Man Raising Hand",
    keywords: [
      "raising-hand",
      "male",
      "boy"
    ],
    skins: [
      {
        unified: "1f64b-200d-2642-fe0f",
        native: "🙋‍♂️"
      },
      {
        unified: "1f64b-1f3fb-200d-2642-fe0f",
        native: "🙋🏻‍♂️"
      },
      {
        unified: "1f64b-1f3fc-200d-2642-fe0f",
        native: "🙋🏼‍♂️"
      },
      {
        unified: "1f64b-1f3fd-200d-2642-fe0f",
        native: "🙋🏽‍♂️"
      },
      {
        unified: "1f64b-1f3fe-200d-2642-fe0f",
        native: "🙋🏾‍♂️"
      },
      {
        unified: "1f64b-1f3ff-200d-2642-fe0f",
        native: "🙋🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-raising-hand": {
    id: "woman-raising-hand",
    name: "Woman Raising Hand",
    keywords: [
      "raising-hand",
      "female",
      "girl"
    ],
    skins: [
      {
        unified: "1f64b-200d-2640-fe0f",
        native: "🙋‍♀️"
      },
      {
        unified: "1f64b-1f3fb-200d-2640-fe0f",
        native: "🙋🏻‍♀️"
      },
      {
        unified: "1f64b-1f3fc-200d-2640-fe0f",
        native: "🙋🏼‍♀️"
      },
      {
        unified: "1f64b-1f3fd-200d-2640-fe0f",
        native: "🙋🏽‍♀️"
      },
      {
        unified: "1f64b-1f3fe-200d-2640-fe0f",
        native: "🙋🏾‍♀️"
      },
      {
        unified: "1f64b-1f3ff-200d-2640-fe0f",
        native: "🙋🏿‍♀️"
      }
    ],
    version: 4
  },
  deaf_person: {
    id: "deaf_person",
    name: "Deaf Person",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9cf",
        native: "🧏"
      },
      {
        unified: "1f9cf-1f3fb",
        native: "🧏🏻"
      },
      {
        unified: "1f9cf-1f3fc",
        native: "🧏🏼"
      },
      {
        unified: "1f9cf-1f3fd",
        native: "🧏🏽"
      },
      {
        unified: "1f9cf-1f3fe",
        native: "🧏🏾"
      },
      {
        unified: "1f9cf-1f3ff",
        native: "🧏🏿"
      }
    ],
    version: 12
  },
  deaf_man: {
    id: "deaf_man",
    name: "Deaf Man",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9cf-200d-2642-fe0f",
        native: "🧏‍♂️"
      },
      {
        unified: "1f9cf-1f3fb-200d-2642-fe0f",
        native: "🧏🏻‍♂️"
      },
      {
        unified: "1f9cf-1f3fc-200d-2642-fe0f",
        native: "🧏🏼‍♂️"
      },
      {
        unified: "1f9cf-1f3fd-200d-2642-fe0f",
        native: "🧏🏽‍♂️"
      },
      {
        unified: "1f9cf-1f3fe-200d-2642-fe0f",
        native: "🧏🏾‍♂️"
      },
      {
        unified: "1f9cf-1f3ff-200d-2642-fe0f",
        native: "🧏🏿‍♂️"
      }
    ],
    version: 12
  },
  deaf_woman: {
    id: "deaf_woman",
    name: "Deaf Woman",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9cf-200d-2640-fe0f",
        native: "🧏‍♀️"
      },
      {
        unified: "1f9cf-1f3fb-200d-2640-fe0f",
        native: "🧏🏻‍♀️"
      },
      {
        unified: "1f9cf-1f3fc-200d-2640-fe0f",
        native: "🧏🏼‍♀️"
      },
      {
        unified: "1f9cf-1f3fd-200d-2640-fe0f",
        native: "🧏🏽‍♀️"
      },
      {
        unified: "1f9cf-1f3fe-200d-2640-fe0f",
        native: "🧏🏾‍♀️"
      },
      {
        unified: "1f9cf-1f3ff-200d-2640-fe0f",
        native: "🧏🏿‍♀️"
      }
    ],
    version: 12
  },
  bow: {
    id: "bow",
    name: "Person Bowing",
    keywords: [
      "bow",
      "respectiful"
    ],
    skins: [
      {
        unified: "1f647",
        native: "🙇"
      },
      {
        unified: "1f647-1f3fb",
        native: "🙇🏻"
      },
      {
        unified: "1f647-1f3fc",
        native: "🙇🏼"
      },
      {
        unified: "1f647-1f3fd",
        native: "🙇🏽"
      },
      {
        unified: "1f647-1f3fe",
        native: "🙇🏾"
      },
      {
        unified: "1f647-1f3ff",
        native: "🙇🏿"
      }
    ],
    version: 1
  },
  "man-bowing": {
    id: "man-bowing",
    name: "Man Bowing",
    keywords: [
      "male",
      "boy"
    ],
    skins: [
      {
        unified: "1f647-200d-2642-fe0f",
        native: "🙇‍♂️"
      },
      {
        unified: "1f647-1f3fb-200d-2642-fe0f",
        native: "🙇🏻‍♂️"
      },
      {
        unified: "1f647-1f3fc-200d-2642-fe0f",
        native: "🙇🏼‍♂️"
      },
      {
        unified: "1f647-1f3fd-200d-2642-fe0f",
        native: "🙇🏽‍♂️"
      },
      {
        unified: "1f647-1f3fe-200d-2642-fe0f",
        native: "🙇🏾‍♂️"
      },
      {
        unified: "1f647-1f3ff-200d-2642-fe0f",
        native: "🙇🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-bowing": {
    id: "woman-bowing",
    name: "Woman Bowing",
    keywords: [
      "female",
      "girl"
    ],
    skins: [
      {
        unified: "1f647-200d-2640-fe0f",
        native: "🙇‍♀️"
      },
      {
        unified: "1f647-1f3fb-200d-2640-fe0f",
        native: "🙇🏻‍♀️"
      },
      {
        unified: "1f647-1f3fc-200d-2640-fe0f",
        native: "🙇🏼‍♀️"
      },
      {
        unified: "1f647-1f3fd-200d-2640-fe0f",
        native: "🙇🏽‍♀️"
      },
      {
        unified: "1f647-1f3fe-200d-2640-fe0f",
        native: "🙇🏾‍♀️"
      },
      {
        unified: "1f647-1f3ff-200d-2640-fe0f",
        native: "🙇🏿‍♀️"
      }
    ],
    version: 4
  },
  face_palm: {
    id: "face_palm",
    name: "Face Palm",
    keywords: [
      "person",
      "facepalming",
      "disappointed"
    ],
    skins: [
      {
        unified: "1f926",
        native: "🤦"
      },
      {
        unified: "1f926-1f3fb",
        native: "🤦🏻"
      },
      {
        unified: "1f926-1f3fc",
        native: "🤦🏼"
      },
      {
        unified: "1f926-1f3fd",
        native: "🤦🏽"
      },
      {
        unified: "1f926-1f3fe",
        native: "🤦🏾"
      },
      {
        unified: "1f926-1f3ff",
        native: "🤦🏿"
      }
    ],
    version: 3
  },
  "man-facepalming": {
    id: "man-facepalming",
    name: "Man Facepalming",
    keywords: [
      "male",
      "boy",
      "disbelief"
    ],
    skins: [
      {
        unified: "1f926-200d-2642-fe0f",
        native: "🤦‍♂️"
      },
      {
        unified: "1f926-1f3fb-200d-2642-fe0f",
        native: "🤦🏻‍♂️"
      },
      {
        unified: "1f926-1f3fc-200d-2642-fe0f",
        native: "🤦🏼‍♂️"
      },
      {
        unified: "1f926-1f3fd-200d-2642-fe0f",
        native: "🤦🏽‍♂️"
      },
      {
        unified: "1f926-1f3fe-200d-2642-fe0f",
        native: "🤦🏾‍♂️"
      },
      {
        unified: "1f926-1f3ff-200d-2642-fe0f",
        native: "🤦🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-facepalming": {
    id: "woman-facepalming",
    name: "Woman Facepalming",
    keywords: [
      "female",
      "girl",
      "disbelief"
    ],
    skins: [
      {
        unified: "1f926-200d-2640-fe0f",
        native: "🤦‍♀️"
      },
      {
        unified: "1f926-1f3fb-200d-2640-fe0f",
        native: "🤦🏻‍♀️"
      },
      {
        unified: "1f926-1f3fc-200d-2640-fe0f",
        native: "🤦🏼‍♀️"
      },
      {
        unified: "1f926-1f3fd-200d-2640-fe0f",
        native: "🤦🏽‍♀️"
      },
      {
        unified: "1f926-1f3fe-200d-2640-fe0f",
        native: "🤦🏾‍♀️"
      },
      {
        unified: "1f926-1f3ff-200d-2640-fe0f",
        native: "🤦🏿‍♀️"
      }
    ],
    version: 4
  },
  shrug: {
    id: "shrug",
    name: "Shrug",
    keywords: [
      "person",
      "shrugging",
      "regardless"
    ],
    skins: [
      {
        unified: "1f937",
        native: "🤷"
      },
      {
        unified: "1f937-1f3fb",
        native: "🤷🏻"
      },
      {
        unified: "1f937-1f3fc",
        native: "🤷🏼"
      },
      {
        unified: "1f937-1f3fd",
        native: "🤷🏽"
      },
      {
        unified: "1f937-1f3fe",
        native: "🤷🏾"
      },
      {
        unified: "1f937-1f3ff",
        native: "🤷🏿"
      }
    ],
    version: 3
  },
  "man-shrugging": {
    id: "man-shrugging",
    name: "Man Shrugging",
    keywords: [
      "male",
      "boy",
      "confused",
      "indifferent",
      "doubt"
    ],
    skins: [
      {
        unified: "1f937-200d-2642-fe0f",
        native: "🤷‍♂️"
      },
      {
        unified: "1f937-1f3fb-200d-2642-fe0f",
        native: "🤷🏻‍♂️"
      },
      {
        unified: "1f937-1f3fc-200d-2642-fe0f",
        native: "🤷🏼‍♂️"
      },
      {
        unified: "1f937-1f3fd-200d-2642-fe0f",
        native: "🤷🏽‍♂️"
      },
      {
        unified: "1f937-1f3fe-200d-2642-fe0f",
        native: "🤷🏾‍♂️"
      },
      {
        unified: "1f937-1f3ff-200d-2642-fe0f",
        native: "🤷🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-shrugging": {
    id: "woman-shrugging",
    name: "Woman Shrugging",
    keywords: [
      "female",
      "girl",
      "confused",
      "indifferent",
      "doubt"
    ],
    skins: [
      {
        unified: "1f937-200d-2640-fe0f",
        native: "🤷‍♀️"
      },
      {
        unified: "1f937-1f3fb-200d-2640-fe0f",
        native: "🤷🏻‍♀️"
      },
      {
        unified: "1f937-1f3fc-200d-2640-fe0f",
        native: "🤷🏼‍♀️"
      },
      {
        unified: "1f937-1f3fd-200d-2640-fe0f",
        native: "🤷🏽‍♀️"
      },
      {
        unified: "1f937-1f3fe-200d-2640-fe0f",
        native: "🤷🏾‍♀️"
      },
      {
        unified: "1f937-1f3ff-200d-2640-fe0f",
        native: "🤷🏿‍♀️"
      }
    ],
    version: 4
  },
  health_worker: {
    id: "health_worker",
    name: "Health Worker",
    keywords: [
      "hospital"
    ],
    skins: [
      {
        unified: "1f9d1-200d-2695-fe0f",
        native: "🧑‍⚕️"
      },
      {
        unified: "1f9d1-1f3fb-200d-2695-fe0f",
        native: "🧑🏻‍⚕️"
      },
      {
        unified: "1f9d1-1f3fc-200d-2695-fe0f",
        native: "🧑🏼‍⚕️"
      },
      {
        unified: "1f9d1-1f3fd-200d-2695-fe0f",
        native: "🧑🏽‍⚕️"
      },
      {
        unified: "1f9d1-1f3fe-200d-2695-fe0f",
        native: "🧑🏾‍⚕️"
      },
      {
        unified: "1f9d1-1f3ff-200d-2695-fe0f",
        native: "🧑🏿‍⚕️"
      }
    ],
    version: 12.1
  },
  "male-doctor": {
    id: "male-doctor",
    name: "Man Health Worker",
    keywords: [
      "male",
      "doctor",
      "nurse",
      "therapist",
      "healthcare",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-2695-fe0f",
        native: "👨‍⚕️"
      },
      {
        unified: "1f468-1f3fb-200d-2695-fe0f",
        native: "👨🏻‍⚕️"
      },
      {
        unified: "1f468-1f3fc-200d-2695-fe0f",
        native: "👨🏼‍⚕️"
      },
      {
        unified: "1f468-1f3fd-200d-2695-fe0f",
        native: "👨🏽‍⚕️"
      },
      {
        unified: "1f468-1f3fe-200d-2695-fe0f",
        native: "👨🏾‍⚕️"
      },
      {
        unified: "1f468-1f3ff-200d-2695-fe0f",
        native: "👨🏿‍⚕️"
      }
    ],
    version: 4
  },
  "female-doctor": {
    id: "female-doctor",
    name: "Woman Health Worker",
    keywords: [
      "female",
      "doctor",
      "nurse",
      "therapist",
      "healthcare",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-2695-fe0f",
        native: "👩‍⚕️"
      },
      {
        unified: "1f469-1f3fb-200d-2695-fe0f",
        native: "👩🏻‍⚕️"
      },
      {
        unified: "1f469-1f3fc-200d-2695-fe0f",
        native: "👩🏼‍⚕️"
      },
      {
        unified: "1f469-1f3fd-200d-2695-fe0f",
        native: "👩🏽‍⚕️"
      },
      {
        unified: "1f469-1f3fe-200d-2695-fe0f",
        native: "👩🏾‍⚕️"
      },
      {
        unified: "1f469-1f3ff-200d-2695-fe0f",
        native: "👩🏿‍⚕️"
      }
    ],
    version: 4
  },
  student: {
    id: "student",
    name: "Student",
    keywords: [
      "learn"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f393",
        native: "🧑‍🎓"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f393",
        native: "🧑🏻‍🎓"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f393",
        native: "🧑🏼‍🎓"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f393",
        native: "🧑🏽‍🎓"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f393",
        native: "🧑🏾‍🎓"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f393",
        native: "🧑🏿‍🎓"
      }
    ],
    version: 12.1
  },
  "male-student": {
    id: "male-student",
    name: "Man Student",
    keywords: [
      "male",
      "graduate",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f393",
        native: "👨‍🎓"
      },
      {
        unified: "1f468-1f3fb-200d-1f393",
        native: "👨🏻‍🎓"
      },
      {
        unified: "1f468-1f3fc-200d-1f393",
        native: "👨🏼‍🎓"
      },
      {
        unified: "1f468-1f3fd-200d-1f393",
        native: "👨🏽‍🎓"
      },
      {
        unified: "1f468-1f3fe-200d-1f393",
        native: "👨🏾‍🎓"
      },
      {
        unified: "1f468-1f3ff-200d-1f393",
        native: "👨🏿‍🎓"
      }
    ],
    version: 4
  },
  "female-student": {
    id: "female-student",
    name: "Woman Student",
    keywords: [
      "female",
      "graduate",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f393",
        native: "👩‍🎓"
      },
      {
        unified: "1f469-1f3fb-200d-1f393",
        native: "👩🏻‍🎓"
      },
      {
        unified: "1f469-1f3fc-200d-1f393",
        native: "👩🏼‍🎓"
      },
      {
        unified: "1f469-1f3fd-200d-1f393",
        native: "👩🏽‍🎓"
      },
      {
        unified: "1f469-1f3fe-200d-1f393",
        native: "👩🏾‍🎓"
      },
      {
        unified: "1f469-1f3ff-200d-1f393",
        native: "👩🏿‍🎓"
      }
    ],
    version: 4
  },
  teacher: {
    id: "teacher",
    name: "Teacher",
    keywords: [
      "professor"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f3eb",
        native: "🧑‍🏫"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f3eb",
        native: "🧑🏻‍🏫"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f3eb",
        native: "🧑🏼‍🏫"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f3eb",
        native: "🧑🏽‍🏫"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f3eb",
        native: "🧑🏾‍🏫"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f3eb",
        native: "🧑🏿‍🏫"
      }
    ],
    version: 12.1
  },
  "male-teacher": {
    id: "male-teacher",
    name: "Man Teacher",
    keywords: [
      "male",
      "instructor",
      "professor",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f3eb",
        native: "👨‍🏫"
      },
      {
        unified: "1f468-1f3fb-200d-1f3eb",
        native: "👨🏻‍🏫"
      },
      {
        unified: "1f468-1f3fc-200d-1f3eb",
        native: "👨🏼‍🏫"
      },
      {
        unified: "1f468-1f3fd-200d-1f3eb",
        native: "👨🏽‍🏫"
      },
      {
        unified: "1f468-1f3fe-200d-1f3eb",
        native: "👨🏾‍🏫"
      },
      {
        unified: "1f468-1f3ff-200d-1f3eb",
        native: "👨🏿‍🏫"
      }
    ],
    version: 4
  },
  "female-teacher": {
    id: "female-teacher",
    name: "Woman Teacher",
    keywords: [
      "female",
      "instructor",
      "professor",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f3eb",
        native: "👩‍🏫"
      },
      {
        unified: "1f469-1f3fb-200d-1f3eb",
        native: "👩🏻‍🏫"
      },
      {
        unified: "1f469-1f3fc-200d-1f3eb",
        native: "👩🏼‍🏫"
      },
      {
        unified: "1f469-1f3fd-200d-1f3eb",
        native: "👩🏽‍🏫"
      },
      {
        unified: "1f469-1f3fe-200d-1f3eb",
        native: "👩🏾‍🏫"
      },
      {
        unified: "1f469-1f3ff-200d-1f3eb",
        native: "👩🏿‍🏫"
      }
    ],
    version: 4
  },
  judge: {
    id: "judge",
    name: "Judge",
    keywords: [
      "law"
    ],
    skins: [
      {
        unified: "1f9d1-200d-2696-fe0f",
        native: "🧑‍⚖️"
      },
      {
        unified: "1f9d1-1f3fb-200d-2696-fe0f",
        native: "🧑🏻‍⚖️"
      },
      {
        unified: "1f9d1-1f3fc-200d-2696-fe0f",
        native: "🧑🏼‍⚖️"
      },
      {
        unified: "1f9d1-1f3fd-200d-2696-fe0f",
        native: "🧑🏽‍⚖️"
      },
      {
        unified: "1f9d1-1f3fe-200d-2696-fe0f",
        native: "🧑🏾‍⚖️"
      },
      {
        unified: "1f9d1-1f3ff-200d-2696-fe0f",
        native: "🧑🏿‍⚖️"
      }
    ],
    version: 12.1
  },
  "male-judge": {
    id: "male-judge",
    name: "Man Judge",
    keywords: [
      "male",
      "justice",
      "court",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-2696-fe0f",
        native: "👨‍⚖️"
      },
      {
        unified: "1f468-1f3fb-200d-2696-fe0f",
        native: "👨🏻‍⚖️"
      },
      {
        unified: "1f468-1f3fc-200d-2696-fe0f",
        native: "👨🏼‍⚖️"
      },
      {
        unified: "1f468-1f3fd-200d-2696-fe0f",
        native: "👨🏽‍⚖️"
      },
      {
        unified: "1f468-1f3fe-200d-2696-fe0f",
        native: "👨🏾‍⚖️"
      },
      {
        unified: "1f468-1f3ff-200d-2696-fe0f",
        native: "👨🏿‍⚖️"
      }
    ],
    version: 4
  },
  "female-judge": {
    id: "female-judge",
    name: "Woman Judge",
    keywords: [
      "female",
      "justice",
      "court",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-2696-fe0f",
        native: "👩‍⚖️"
      },
      {
        unified: "1f469-1f3fb-200d-2696-fe0f",
        native: "👩🏻‍⚖️"
      },
      {
        unified: "1f469-1f3fc-200d-2696-fe0f",
        native: "👩🏼‍⚖️"
      },
      {
        unified: "1f469-1f3fd-200d-2696-fe0f",
        native: "👩🏽‍⚖️"
      },
      {
        unified: "1f469-1f3fe-200d-2696-fe0f",
        native: "👩🏾‍⚖️"
      },
      {
        unified: "1f469-1f3ff-200d-2696-fe0f",
        native: "👩🏿‍⚖️"
      }
    ],
    version: 4
  },
  farmer: {
    id: "farmer",
    name: "Farmer",
    keywords: [
      "crops"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f33e",
        native: "🧑‍🌾"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f33e",
        native: "🧑🏻‍🌾"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f33e",
        native: "🧑🏼‍🌾"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f33e",
        native: "🧑🏽‍🌾"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f33e",
        native: "🧑🏾‍🌾"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f33e",
        native: "🧑🏿‍🌾"
      }
    ],
    version: 12.1
  },
  "male-farmer": {
    id: "male-farmer",
    name: "Man Farmer",
    keywords: [
      "male",
      "rancher",
      "gardener",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f33e",
        native: "👨‍🌾"
      },
      {
        unified: "1f468-1f3fb-200d-1f33e",
        native: "👨🏻‍🌾"
      },
      {
        unified: "1f468-1f3fc-200d-1f33e",
        native: "👨🏼‍🌾"
      },
      {
        unified: "1f468-1f3fd-200d-1f33e",
        native: "👨🏽‍🌾"
      },
      {
        unified: "1f468-1f3fe-200d-1f33e",
        native: "👨🏾‍🌾"
      },
      {
        unified: "1f468-1f3ff-200d-1f33e",
        native: "👨🏿‍🌾"
      }
    ],
    version: 4
  },
  "female-farmer": {
    id: "female-farmer",
    name: "Woman Farmer",
    keywords: [
      "female",
      "rancher",
      "gardener",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f33e",
        native: "👩‍🌾"
      },
      {
        unified: "1f469-1f3fb-200d-1f33e",
        native: "👩🏻‍🌾"
      },
      {
        unified: "1f469-1f3fc-200d-1f33e",
        native: "👩🏼‍🌾"
      },
      {
        unified: "1f469-1f3fd-200d-1f33e",
        native: "👩🏽‍🌾"
      },
      {
        unified: "1f469-1f3fe-200d-1f33e",
        native: "👩🏾‍🌾"
      },
      {
        unified: "1f469-1f3ff-200d-1f33e",
        native: "👩🏿‍🌾"
      }
    ],
    version: 4
  },
  cook: {
    id: "cook",
    name: "Cook",
    keywords: [
      "food",
      "kitchen",
      "culinary"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f373",
        native: "🧑‍🍳"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f373",
        native: "🧑🏻‍🍳"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f373",
        native: "🧑🏼‍🍳"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f373",
        native: "🧑🏽‍🍳"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f373",
        native: "🧑🏾‍🍳"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f373",
        native: "🧑🏿‍🍳"
      }
    ],
    version: 12.1
  },
  "male-cook": {
    id: "male-cook",
    name: "Man Cook",
    keywords: [
      "male",
      "chef",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f373",
        native: "👨‍🍳"
      },
      {
        unified: "1f468-1f3fb-200d-1f373",
        native: "👨🏻‍🍳"
      },
      {
        unified: "1f468-1f3fc-200d-1f373",
        native: "👨🏼‍🍳"
      },
      {
        unified: "1f468-1f3fd-200d-1f373",
        native: "👨🏽‍🍳"
      },
      {
        unified: "1f468-1f3fe-200d-1f373",
        native: "👨🏾‍🍳"
      },
      {
        unified: "1f468-1f3ff-200d-1f373",
        native: "👨🏿‍🍳"
      }
    ],
    version: 4
  },
  "female-cook": {
    id: "female-cook",
    name: "Woman Cook",
    keywords: [
      "female",
      "chef",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f373",
        native: "👩‍🍳"
      },
      {
        unified: "1f469-1f3fb-200d-1f373",
        native: "👩🏻‍🍳"
      },
      {
        unified: "1f469-1f3fc-200d-1f373",
        native: "👩🏼‍🍳"
      },
      {
        unified: "1f469-1f3fd-200d-1f373",
        native: "👩🏽‍🍳"
      },
      {
        unified: "1f469-1f3fe-200d-1f373",
        native: "👩🏾‍🍳"
      },
      {
        unified: "1f469-1f3ff-200d-1f373",
        native: "👩🏿‍🍳"
      }
    ],
    version: 4
  },
  mechanic: {
    id: "mechanic",
    name: "Mechanic",
    keywords: [
      "worker",
      "technician"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f527",
        native: "🧑‍🔧"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f527",
        native: "🧑🏻‍🔧"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f527",
        native: "🧑🏼‍🔧"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f527",
        native: "🧑🏽‍🔧"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f527",
        native: "🧑🏾‍🔧"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f527",
        native: "🧑🏿‍🔧"
      }
    ],
    version: 12.1
  },
  "male-mechanic": {
    id: "male-mechanic",
    name: "Man Mechanic",
    keywords: [
      "male",
      "plumber",
      "human",
      "wrench"
    ],
    skins: [
      {
        unified: "1f468-200d-1f527",
        native: "👨‍🔧"
      },
      {
        unified: "1f468-1f3fb-200d-1f527",
        native: "👨🏻‍🔧"
      },
      {
        unified: "1f468-1f3fc-200d-1f527",
        native: "👨🏼‍🔧"
      },
      {
        unified: "1f468-1f3fd-200d-1f527",
        native: "👨🏽‍🔧"
      },
      {
        unified: "1f468-1f3fe-200d-1f527",
        native: "👨🏾‍🔧"
      },
      {
        unified: "1f468-1f3ff-200d-1f527",
        native: "👨🏿‍🔧"
      }
    ],
    version: 4
  },
  "female-mechanic": {
    id: "female-mechanic",
    name: "Woman Mechanic",
    keywords: [
      "female",
      "plumber",
      "human",
      "wrench"
    ],
    skins: [
      {
        unified: "1f469-200d-1f527",
        native: "👩‍🔧"
      },
      {
        unified: "1f469-1f3fb-200d-1f527",
        native: "👩🏻‍🔧"
      },
      {
        unified: "1f469-1f3fc-200d-1f527",
        native: "👩🏼‍🔧"
      },
      {
        unified: "1f469-1f3fd-200d-1f527",
        native: "👩🏽‍🔧"
      },
      {
        unified: "1f469-1f3fe-200d-1f527",
        native: "👩🏾‍🔧"
      },
      {
        unified: "1f469-1f3ff-200d-1f527",
        native: "👩🏿‍🔧"
      }
    ],
    version: 4
  },
  factory_worker: {
    id: "factory_worker",
    name: "Factory Worker",
    keywords: [
      "labor"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f3ed",
        native: "🧑‍🏭"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f3ed",
        native: "🧑🏻‍🏭"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f3ed",
        native: "🧑🏼‍🏭"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f3ed",
        native: "🧑🏽‍🏭"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f3ed",
        native: "🧑🏾‍🏭"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f3ed",
        native: "🧑🏿‍🏭"
      }
    ],
    version: 12.1
  },
  "male-factory-worker": {
    id: "male-factory-worker",
    name: "Man Factory Worker",
    keywords: [
      "male",
      "factory-worker",
      "assembly",
      "industrial",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f3ed",
        native: "👨‍🏭"
      },
      {
        unified: "1f468-1f3fb-200d-1f3ed",
        native: "👨🏻‍🏭"
      },
      {
        unified: "1f468-1f3fc-200d-1f3ed",
        native: "👨🏼‍🏭"
      },
      {
        unified: "1f468-1f3fd-200d-1f3ed",
        native: "👨🏽‍🏭"
      },
      {
        unified: "1f468-1f3fe-200d-1f3ed",
        native: "👨🏾‍🏭"
      },
      {
        unified: "1f468-1f3ff-200d-1f3ed",
        native: "👨🏿‍🏭"
      }
    ],
    version: 4
  },
  "female-factory-worker": {
    id: "female-factory-worker",
    name: "Woman Factory Worker",
    keywords: [
      "female",
      "factory-worker",
      "assembly",
      "industrial",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f3ed",
        native: "👩‍🏭"
      },
      {
        unified: "1f469-1f3fb-200d-1f3ed",
        native: "👩🏻‍🏭"
      },
      {
        unified: "1f469-1f3fc-200d-1f3ed",
        native: "👩🏼‍🏭"
      },
      {
        unified: "1f469-1f3fd-200d-1f3ed",
        native: "👩🏽‍🏭"
      },
      {
        unified: "1f469-1f3fe-200d-1f3ed",
        native: "👩🏾‍🏭"
      },
      {
        unified: "1f469-1f3ff-200d-1f3ed",
        native: "👩🏿‍🏭"
      }
    ],
    version: 4
  },
  office_worker: {
    id: "office_worker",
    name: "Office Worker",
    keywords: [
      "business"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f4bc",
        native: "🧑‍💼"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f4bc",
        native: "🧑🏻‍💼"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f4bc",
        native: "🧑🏼‍💼"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f4bc",
        native: "🧑🏽‍💼"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f4bc",
        native: "🧑🏾‍💼"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f4bc",
        native: "🧑🏿‍💼"
      }
    ],
    version: 12.1
  },
  "male-office-worker": {
    id: "male-office-worker",
    name: "Man Office Worker",
    keywords: [
      "male",
      "office-worker",
      "business",
      "manager",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f4bc",
        native: "👨‍💼"
      },
      {
        unified: "1f468-1f3fb-200d-1f4bc",
        native: "👨🏻‍💼"
      },
      {
        unified: "1f468-1f3fc-200d-1f4bc",
        native: "👨🏼‍💼"
      },
      {
        unified: "1f468-1f3fd-200d-1f4bc",
        native: "👨🏽‍💼"
      },
      {
        unified: "1f468-1f3fe-200d-1f4bc",
        native: "👨🏾‍💼"
      },
      {
        unified: "1f468-1f3ff-200d-1f4bc",
        native: "👨🏿‍💼"
      }
    ],
    version: 4
  },
  "female-office-worker": {
    id: "female-office-worker",
    name: "Woman Office Worker",
    keywords: [
      "female",
      "office-worker",
      "business",
      "manager",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f4bc",
        native: "👩‍💼"
      },
      {
        unified: "1f469-1f3fb-200d-1f4bc",
        native: "👩🏻‍💼"
      },
      {
        unified: "1f469-1f3fc-200d-1f4bc",
        native: "👩🏼‍💼"
      },
      {
        unified: "1f469-1f3fd-200d-1f4bc",
        native: "👩🏽‍💼"
      },
      {
        unified: "1f469-1f3fe-200d-1f4bc",
        native: "👩🏾‍💼"
      },
      {
        unified: "1f469-1f3ff-200d-1f4bc",
        native: "👩🏿‍💼"
      }
    ],
    version: 4
  },
  scientist: {
    id: "scientist",
    name: "Scientist",
    keywords: [
      "chemistry"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f52c",
        native: "🧑‍🔬"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f52c",
        native: "🧑🏻‍🔬"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f52c",
        native: "🧑🏼‍🔬"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f52c",
        native: "🧑🏽‍🔬"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f52c",
        native: "🧑🏾‍🔬"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f52c",
        native: "🧑🏿‍🔬"
      }
    ],
    version: 12.1
  },
  "male-scientist": {
    id: "male-scientist",
    name: "Man Scientist",
    keywords: [
      "male",
      "biologist",
      "chemist",
      "engineer",
      "physicist",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f52c",
        native: "👨‍🔬"
      },
      {
        unified: "1f468-1f3fb-200d-1f52c",
        native: "👨🏻‍🔬"
      },
      {
        unified: "1f468-1f3fc-200d-1f52c",
        native: "👨🏼‍🔬"
      },
      {
        unified: "1f468-1f3fd-200d-1f52c",
        native: "👨🏽‍🔬"
      },
      {
        unified: "1f468-1f3fe-200d-1f52c",
        native: "👨🏾‍🔬"
      },
      {
        unified: "1f468-1f3ff-200d-1f52c",
        native: "👨🏿‍🔬"
      }
    ],
    version: 4
  },
  "female-scientist": {
    id: "female-scientist",
    name: "Woman Scientist",
    keywords: [
      "female",
      "biologist",
      "chemist",
      "engineer",
      "physicist",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f52c",
        native: "👩‍🔬"
      },
      {
        unified: "1f469-1f3fb-200d-1f52c",
        native: "👩🏻‍🔬"
      },
      {
        unified: "1f469-1f3fc-200d-1f52c",
        native: "👩🏼‍🔬"
      },
      {
        unified: "1f469-1f3fd-200d-1f52c",
        native: "👩🏽‍🔬"
      },
      {
        unified: "1f469-1f3fe-200d-1f52c",
        native: "👩🏾‍🔬"
      },
      {
        unified: "1f469-1f3ff-200d-1f52c",
        native: "👩🏿‍🔬"
      }
    ],
    version: 4
  },
  technologist: {
    id: "technologist",
    name: "Technologist",
    keywords: [
      "computer"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f4bb",
        native: "🧑‍💻"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f4bb",
        native: "🧑🏻‍💻"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f4bb",
        native: "🧑🏼‍💻"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f4bb",
        native: "🧑🏽‍💻"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f4bb",
        native: "🧑🏾‍💻"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f4bb",
        native: "🧑🏿‍💻"
      }
    ],
    version: 12.1
  },
  "male-technologist": {
    id: "male-technologist",
    name: "Man Technologist",
    keywords: [
      "male",
      "coder",
      "developer",
      "engineer",
      "programmer",
      "software",
      "human",
      "laptop",
      "computer"
    ],
    skins: [
      {
        unified: "1f468-200d-1f4bb",
        native: "👨‍💻"
      },
      {
        unified: "1f468-1f3fb-200d-1f4bb",
        native: "👨🏻‍💻"
      },
      {
        unified: "1f468-1f3fc-200d-1f4bb",
        native: "👨🏼‍💻"
      },
      {
        unified: "1f468-1f3fd-200d-1f4bb",
        native: "👨🏽‍💻"
      },
      {
        unified: "1f468-1f3fe-200d-1f4bb",
        native: "👨🏾‍💻"
      },
      {
        unified: "1f468-1f3ff-200d-1f4bb",
        native: "👨🏿‍💻"
      }
    ],
    version: 4
  },
  "female-technologist": {
    id: "female-technologist",
    name: "Woman Technologist",
    keywords: [
      "female",
      "coder",
      "developer",
      "engineer",
      "programmer",
      "software",
      "human",
      "laptop",
      "computer"
    ],
    skins: [
      {
        unified: "1f469-200d-1f4bb",
        native: "👩‍💻"
      },
      {
        unified: "1f469-1f3fb-200d-1f4bb",
        native: "👩🏻‍💻"
      },
      {
        unified: "1f469-1f3fc-200d-1f4bb",
        native: "👩🏼‍💻"
      },
      {
        unified: "1f469-1f3fd-200d-1f4bb",
        native: "👩🏽‍💻"
      },
      {
        unified: "1f469-1f3fe-200d-1f4bb",
        native: "👩🏾‍💻"
      },
      {
        unified: "1f469-1f3ff-200d-1f4bb",
        native: "👩🏿‍💻"
      }
    ],
    version: 4
  },
  singer: {
    id: "singer",
    name: "Singer",
    keywords: [
      "song",
      "artist",
      "performer"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f3a4",
        native: "🧑‍🎤"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f3a4",
        native: "🧑🏻‍🎤"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f3a4",
        native: "🧑🏼‍🎤"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f3a4",
        native: "🧑🏽‍🎤"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f3a4",
        native: "🧑🏾‍🎤"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f3a4",
        native: "🧑🏿‍🎤"
      }
    ],
    version: 12.1
  },
  "male-singer": {
    id: "male-singer",
    name: "Man Singer",
    keywords: [
      "male",
      "rockstar",
      "entertainer",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f3a4",
        native: "👨‍🎤"
      },
      {
        unified: "1f468-1f3fb-200d-1f3a4",
        native: "👨🏻‍🎤"
      },
      {
        unified: "1f468-1f3fc-200d-1f3a4",
        native: "👨🏼‍🎤"
      },
      {
        unified: "1f468-1f3fd-200d-1f3a4",
        native: "👨🏽‍🎤"
      },
      {
        unified: "1f468-1f3fe-200d-1f3a4",
        native: "👨🏾‍🎤"
      },
      {
        unified: "1f468-1f3ff-200d-1f3a4",
        native: "👨🏿‍🎤"
      }
    ],
    version: 4
  },
  "female-singer": {
    id: "female-singer",
    name: "Woman Singer",
    keywords: [
      "female",
      "rockstar",
      "entertainer",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f3a4",
        native: "👩‍🎤"
      },
      {
        unified: "1f469-1f3fb-200d-1f3a4",
        native: "👩🏻‍🎤"
      },
      {
        unified: "1f469-1f3fc-200d-1f3a4",
        native: "👩🏼‍🎤"
      },
      {
        unified: "1f469-1f3fd-200d-1f3a4",
        native: "👩🏽‍🎤"
      },
      {
        unified: "1f469-1f3fe-200d-1f3a4",
        native: "👩🏾‍🎤"
      },
      {
        unified: "1f469-1f3ff-200d-1f3a4",
        native: "👩🏿‍🎤"
      }
    ],
    version: 4
  },
  artist: {
    id: "artist",
    name: "Artist",
    keywords: [
      "painting",
      "draw",
      "creativity"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f3a8",
        native: "🧑‍🎨"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f3a8",
        native: "🧑🏻‍🎨"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f3a8",
        native: "🧑🏼‍🎨"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f3a8",
        native: "🧑🏽‍🎨"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f3a8",
        native: "🧑🏾‍🎨"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f3a8",
        native: "🧑🏿‍🎨"
      }
    ],
    version: 12.1
  },
  "male-artist": {
    id: "male-artist",
    name: "Man Artist",
    keywords: [
      "male",
      "painter",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f3a8",
        native: "👨‍🎨"
      },
      {
        unified: "1f468-1f3fb-200d-1f3a8",
        native: "👨🏻‍🎨"
      },
      {
        unified: "1f468-1f3fc-200d-1f3a8",
        native: "👨🏼‍🎨"
      },
      {
        unified: "1f468-1f3fd-200d-1f3a8",
        native: "👨🏽‍🎨"
      },
      {
        unified: "1f468-1f3fe-200d-1f3a8",
        native: "👨🏾‍🎨"
      },
      {
        unified: "1f468-1f3ff-200d-1f3a8",
        native: "👨🏿‍🎨"
      }
    ],
    version: 4
  },
  "female-artist": {
    id: "female-artist",
    name: "Woman Artist",
    keywords: [
      "female",
      "painter",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f3a8",
        native: "👩‍🎨"
      },
      {
        unified: "1f469-1f3fb-200d-1f3a8",
        native: "👩🏻‍🎨"
      },
      {
        unified: "1f469-1f3fc-200d-1f3a8",
        native: "👩🏼‍🎨"
      },
      {
        unified: "1f469-1f3fd-200d-1f3a8",
        native: "👩🏽‍🎨"
      },
      {
        unified: "1f469-1f3fe-200d-1f3a8",
        native: "👩🏾‍🎨"
      },
      {
        unified: "1f469-1f3ff-200d-1f3a8",
        native: "👩🏿‍🎨"
      }
    ],
    version: 4
  },
  pilot: {
    id: "pilot",
    name: "Pilot",
    keywords: [
      "fly",
      "plane",
      "airplane"
    ],
    skins: [
      {
        unified: "1f9d1-200d-2708-fe0f",
        native: "🧑‍✈️"
      },
      {
        unified: "1f9d1-1f3fb-200d-2708-fe0f",
        native: "🧑🏻‍✈️"
      },
      {
        unified: "1f9d1-1f3fc-200d-2708-fe0f",
        native: "🧑🏼‍✈️"
      },
      {
        unified: "1f9d1-1f3fd-200d-2708-fe0f",
        native: "🧑🏽‍✈️"
      },
      {
        unified: "1f9d1-1f3fe-200d-2708-fe0f",
        native: "🧑🏾‍✈️"
      },
      {
        unified: "1f9d1-1f3ff-200d-2708-fe0f",
        native: "🧑🏿‍✈️"
      }
    ],
    version: 12.1
  },
  "male-pilot": {
    id: "male-pilot",
    name: "Man Pilot",
    keywords: [
      "male",
      "aviator",
      "plane",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-2708-fe0f",
        native: "👨‍✈️"
      },
      {
        unified: "1f468-1f3fb-200d-2708-fe0f",
        native: "👨🏻‍✈️"
      },
      {
        unified: "1f468-1f3fc-200d-2708-fe0f",
        native: "👨🏼‍✈️"
      },
      {
        unified: "1f468-1f3fd-200d-2708-fe0f",
        native: "👨🏽‍✈️"
      },
      {
        unified: "1f468-1f3fe-200d-2708-fe0f",
        native: "👨🏾‍✈️"
      },
      {
        unified: "1f468-1f3ff-200d-2708-fe0f",
        native: "👨🏿‍✈️"
      }
    ],
    version: 4
  },
  "female-pilot": {
    id: "female-pilot",
    name: "Woman Pilot",
    keywords: [
      "female",
      "aviator",
      "plane",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-2708-fe0f",
        native: "👩‍✈️"
      },
      {
        unified: "1f469-1f3fb-200d-2708-fe0f",
        native: "👩🏻‍✈️"
      },
      {
        unified: "1f469-1f3fc-200d-2708-fe0f",
        native: "👩🏼‍✈️"
      },
      {
        unified: "1f469-1f3fd-200d-2708-fe0f",
        native: "👩🏽‍✈️"
      },
      {
        unified: "1f469-1f3fe-200d-2708-fe0f",
        native: "👩🏾‍✈️"
      },
      {
        unified: "1f469-1f3ff-200d-2708-fe0f",
        native: "👩🏿‍✈️"
      }
    ],
    version: 4
  },
  astronaut: {
    id: "astronaut",
    name: "Astronaut",
    keywords: [
      "outerspace"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f680",
        native: "🧑‍🚀"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f680",
        native: "🧑🏻‍🚀"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f680",
        native: "🧑🏼‍🚀"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f680",
        native: "🧑🏽‍🚀"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f680",
        native: "🧑🏾‍🚀"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f680",
        native: "🧑🏿‍🚀"
      }
    ],
    version: 12.1
  },
  "male-astronaut": {
    id: "male-astronaut",
    name: "Man Astronaut",
    keywords: [
      "male",
      "space",
      "rocket",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f680",
        native: "👨‍🚀"
      },
      {
        unified: "1f468-1f3fb-200d-1f680",
        native: "👨🏻‍🚀"
      },
      {
        unified: "1f468-1f3fc-200d-1f680",
        native: "👨🏼‍🚀"
      },
      {
        unified: "1f468-1f3fd-200d-1f680",
        native: "👨🏽‍🚀"
      },
      {
        unified: "1f468-1f3fe-200d-1f680",
        native: "👨🏾‍🚀"
      },
      {
        unified: "1f468-1f3ff-200d-1f680",
        native: "👨🏿‍🚀"
      }
    ],
    version: 4
  },
  "female-astronaut": {
    id: "female-astronaut",
    name: "Woman Astronaut",
    keywords: [
      "female",
      "space",
      "rocket",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f680",
        native: "👩‍🚀"
      },
      {
        unified: "1f469-1f3fb-200d-1f680",
        native: "👩🏻‍🚀"
      },
      {
        unified: "1f469-1f3fc-200d-1f680",
        native: "👩🏼‍🚀"
      },
      {
        unified: "1f469-1f3fd-200d-1f680",
        native: "👩🏽‍🚀"
      },
      {
        unified: "1f469-1f3fe-200d-1f680",
        native: "👩🏾‍🚀"
      },
      {
        unified: "1f469-1f3ff-200d-1f680",
        native: "👩🏿‍🚀"
      }
    ],
    version: 4
  },
  firefighter: {
    id: "firefighter",
    name: "Firefighter",
    keywords: [
      "fire"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f692",
        native: "🧑‍🚒"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f692",
        native: "🧑🏻‍🚒"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f692",
        native: "🧑🏼‍🚒"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f692",
        native: "🧑🏽‍🚒"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f692",
        native: "🧑🏾‍🚒"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f692",
        native: "🧑🏿‍🚒"
      }
    ],
    version: 12.1
  },
  "male-firefighter": {
    id: "male-firefighter",
    name: "Man Firefighter",
    keywords: [
      "male",
      "fireman",
      "human"
    ],
    skins: [
      {
        unified: "1f468-200d-1f692",
        native: "👨‍🚒"
      },
      {
        unified: "1f468-1f3fb-200d-1f692",
        native: "👨🏻‍🚒"
      },
      {
        unified: "1f468-1f3fc-200d-1f692",
        native: "👨🏼‍🚒"
      },
      {
        unified: "1f468-1f3fd-200d-1f692",
        native: "👨🏽‍🚒"
      },
      {
        unified: "1f468-1f3fe-200d-1f692",
        native: "👨🏾‍🚒"
      },
      {
        unified: "1f468-1f3ff-200d-1f692",
        native: "👨🏿‍🚒"
      }
    ],
    version: 4
  },
  "female-firefighter": {
    id: "female-firefighter",
    name: "Woman Firefighter",
    keywords: [
      "female",
      "fireman",
      "human"
    ],
    skins: [
      {
        unified: "1f469-200d-1f692",
        native: "👩‍🚒"
      },
      {
        unified: "1f469-1f3fb-200d-1f692",
        native: "👩🏻‍🚒"
      },
      {
        unified: "1f469-1f3fc-200d-1f692",
        native: "👩🏼‍🚒"
      },
      {
        unified: "1f469-1f3fd-200d-1f692",
        native: "👩🏽‍🚒"
      },
      {
        unified: "1f469-1f3fe-200d-1f692",
        native: "👩🏾‍🚒"
      },
      {
        unified: "1f469-1f3ff-200d-1f692",
        native: "👩🏿‍🚒"
      }
    ],
    version: 4
  },
  cop: {
    id: "cop",
    name: "Police Officer",
    keywords: [
      "cop"
    ],
    skins: [
      {
        unified: "1f46e",
        native: "👮"
      },
      {
        unified: "1f46e-1f3fb",
        native: "👮🏻"
      },
      {
        unified: "1f46e-1f3fc",
        native: "👮🏼"
      },
      {
        unified: "1f46e-1f3fd",
        native: "👮🏽"
      },
      {
        unified: "1f46e-1f3fe",
        native: "👮🏾"
      },
      {
        unified: "1f46e-1f3ff",
        native: "👮🏿"
      }
    ],
    version: 1
  },
  "male-police-officer": {
    id: "male-police-officer",
    name: "Man Police Officer",
    keywords: [
      "male",
      "police-officer",
      "law",
      "legal",
      "enforcement",
      "arrest",
      "911"
    ],
    skins: [
      {
        unified: "1f46e-200d-2642-fe0f",
        native: "👮‍♂️"
      },
      {
        unified: "1f46e-1f3fb-200d-2642-fe0f",
        native: "👮🏻‍♂️"
      },
      {
        unified: "1f46e-1f3fc-200d-2642-fe0f",
        native: "👮🏼‍♂️"
      },
      {
        unified: "1f46e-1f3fd-200d-2642-fe0f",
        native: "👮🏽‍♂️"
      },
      {
        unified: "1f46e-1f3fe-200d-2642-fe0f",
        native: "👮🏾‍♂️"
      },
      {
        unified: "1f46e-1f3ff-200d-2642-fe0f",
        native: "👮🏿‍♂️"
      }
    ],
    version: 4
  },
  "female-police-officer": {
    id: "female-police-officer",
    name: "Woman Police Officer",
    keywords: [
      "female",
      "police-officer",
      "law",
      "legal",
      "enforcement",
      "arrest",
      "911"
    ],
    skins: [
      {
        unified: "1f46e-200d-2640-fe0f",
        native: "👮‍♀️"
      },
      {
        unified: "1f46e-1f3fb-200d-2640-fe0f",
        native: "👮🏻‍♀️"
      },
      {
        unified: "1f46e-1f3fc-200d-2640-fe0f",
        native: "👮🏼‍♀️"
      },
      {
        unified: "1f46e-1f3fd-200d-2640-fe0f",
        native: "👮🏽‍♀️"
      },
      {
        unified: "1f46e-1f3fe-200d-2640-fe0f",
        native: "👮🏾‍♀️"
      },
      {
        unified: "1f46e-1f3ff-200d-2640-fe0f",
        native: "👮🏿‍♀️"
      }
    ],
    version: 4
  },
  sleuth_or_spy: {
    id: "sleuth_or_spy",
    name: "Detective",
    keywords: [
      "sleuth",
      "or",
      "spy",
      "human"
    ],
    skins: [
      {
        unified: "1f575-fe0f",
        native: "🕵️"
      },
      {
        unified: "1f575-1f3fb",
        native: "🕵🏻"
      },
      {
        unified: "1f575-1f3fc",
        native: "🕵🏼"
      },
      {
        unified: "1f575-1f3fd",
        native: "🕵🏽"
      },
      {
        unified: "1f575-1f3fe",
        native: "🕵🏾"
      },
      {
        unified: "1f575-1f3ff",
        native: "🕵🏿"
      }
    ],
    version: 1
  },
  "male-detective": {
    id: "male-detective",
    name: "Man Detective",
    keywords: [
      "male",
      "crime"
    ],
    skins: [
      {
        unified: "1f575-fe0f-200d-2642-fe0f",
        native: "🕵️‍♂️"
      },
      {
        unified: "1f575-1f3fb-200d-2642-fe0f",
        native: "🕵🏻‍♂️"
      },
      {
        unified: "1f575-1f3fc-200d-2642-fe0f",
        native: "🕵🏼‍♂️"
      },
      {
        unified: "1f575-1f3fd-200d-2642-fe0f",
        native: "🕵🏽‍♂️"
      },
      {
        unified: "1f575-1f3fe-200d-2642-fe0f",
        native: "🕵🏾‍♂️"
      },
      {
        unified: "1f575-1f3ff-200d-2642-fe0f",
        native: "🕵🏿‍♂️"
      }
    ],
    version: 4
  },
  "female-detective": {
    id: "female-detective",
    name: "Woman Detective",
    keywords: [
      "female",
      "human",
      "spy"
    ],
    skins: [
      {
        unified: "1f575-fe0f-200d-2640-fe0f",
        native: "🕵️‍♀️"
      },
      {
        unified: "1f575-1f3fb-200d-2640-fe0f",
        native: "🕵🏻‍♀️"
      },
      {
        unified: "1f575-1f3fc-200d-2640-fe0f",
        native: "🕵🏼‍♀️"
      },
      {
        unified: "1f575-1f3fd-200d-2640-fe0f",
        native: "🕵🏽‍♀️"
      },
      {
        unified: "1f575-1f3fe-200d-2640-fe0f",
        native: "🕵🏾‍♀️"
      },
      {
        unified: "1f575-1f3ff-200d-2640-fe0f",
        native: "🕵🏿‍♀️"
      }
    ],
    version: 4
  },
  guardsman: {
    id: "guardsman",
    name: "Guard",
    keywords: [
      "guardsman",
      "protect"
    ],
    skins: [
      {
        unified: "1f482",
        native: "💂"
      },
      {
        unified: "1f482-1f3fb",
        native: "💂🏻"
      },
      {
        unified: "1f482-1f3fc",
        native: "💂🏼"
      },
      {
        unified: "1f482-1f3fd",
        native: "💂🏽"
      },
      {
        unified: "1f482-1f3fe",
        native: "💂🏾"
      },
      {
        unified: "1f482-1f3ff",
        native: "💂🏿"
      }
    ],
    version: 1
  },
  "male-guard": {
    id: "male-guard",
    name: "Man Guard",
    keywords: [
      "male",
      "uk",
      "gb",
      "british",
      "guy",
      "royal"
    ],
    skins: [
      {
        unified: "1f482-200d-2642-fe0f",
        native: "💂‍♂️"
      },
      {
        unified: "1f482-1f3fb-200d-2642-fe0f",
        native: "💂🏻‍♂️"
      },
      {
        unified: "1f482-1f3fc-200d-2642-fe0f",
        native: "💂🏼‍♂️"
      },
      {
        unified: "1f482-1f3fd-200d-2642-fe0f",
        native: "💂🏽‍♂️"
      },
      {
        unified: "1f482-1f3fe-200d-2642-fe0f",
        native: "💂🏾‍♂️"
      },
      {
        unified: "1f482-1f3ff-200d-2642-fe0f",
        native: "💂🏿‍♂️"
      }
    ],
    version: 4
  },
  "female-guard": {
    id: "female-guard",
    name: "Woman Guard",
    keywords: [
      "female",
      "uk",
      "gb",
      "british",
      "royal"
    ],
    skins: [
      {
        unified: "1f482-200d-2640-fe0f",
        native: "💂‍♀️"
      },
      {
        unified: "1f482-1f3fb-200d-2640-fe0f",
        native: "💂🏻‍♀️"
      },
      {
        unified: "1f482-1f3fc-200d-2640-fe0f",
        native: "💂🏼‍♀️"
      },
      {
        unified: "1f482-1f3fd-200d-2640-fe0f",
        native: "💂🏽‍♀️"
      },
      {
        unified: "1f482-1f3fe-200d-2640-fe0f",
        native: "💂🏾‍♀️"
      },
      {
        unified: "1f482-1f3ff-200d-2640-fe0f",
        native: "💂🏿‍♀️"
      }
    ],
    version: 4
  },
  ninja: {
    id: "ninja",
    name: "Ninja",
    keywords: [
      "ninjutsu",
      "skills",
      "japanese"
    ],
    skins: [
      {
        unified: "1f977",
        native: "🥷"
      },
      {
        unified: "1f977-1f3fb",
        native: "🥷🏻"
      },
      {
        unified: "1f977-1f3fc",
        native: "🥷🏼"
      },
      {
        unified: "1f977-1f3fd",
        native: "🥷🏽"
      },
      {
        unified: "1f977-1f3fe",
        native: "🥷🏾"
      },
      {
        unified: "1f977-1f3ff",
        native: "🥷🏿"
      }
    ],
    version: 13
  },
  construction_worker: {
    id: "construction_worker",
    name: "Construction Worker",
    keywords: [
      "labor",
      "build"
    ],
    skins: [
      {
        unified: "1f477",
        native: "👷"
      },
      {
        unified: "1f477-1f3fb",
        native: "👷🏻"
      },
      {
        unified: "1f477-1f3fc",
        native: "👷🏼"
      },
      {
        unified: "1f477-1f3fd",
        native: "👷🏽"
      },
      {
        unified: "1f477-1f3fe",
        native: "👷🏾"
      },
      {
        unified: "1f477-1f3ff",
        native: "👷🏿"
      }
    ],
    version: 1
  },
  "male-construction-worker": {
    id: "male-construction-worker",
    name: "Man Construction Worker",
    keywords: [
      "male",
      "construction-worker",
      "human",
      "wip",
      "guy",
      "build",
      "labor"
    ],
    skins: [
      {
        unified: "1f477-200d-2642-fe0f",
        native: "👷‍♂️"
      },
      {
        unified: "1f477-1f3fb-200d-2642-fe0f",
        native: "👷🏻‍♂️"
      },
      {
        unified: "1f477-1f3fc-200d-2642-fe0f",
        native: "👷🏼‍♂️"
      },
      {
        unified: "1f477-1f3fd-200d-2642-fe0f",
        native: "👷🏽‍♂️"
      },
      {
        unified: "1f477-1f3fe-200d-2642-fe0f",
        native: "👷🏾‍♂️"
      },
      {
        unified: "1f477-1f3ff-200d-2642-fe0f",
        native: "👷🏿‍♂️"
      }
    ],
    version: 4
  },
  "female-construction-worker": {
    id: "female-construction-worker",
    name: "Woman Construction Worker",
    keywords: [
      "female",
      "construction-worker",
      "human",
      "wip",
      "build",
      "labor"
    ],
    skins: [
      {
        unified: "1f477-200d-2640-fe0f",
        native: "👷‍♀️"
      },
      {
        unified: "1f477-1f3fb-200d-2640-fe0f",
        native: "👷🏻‍♀️"
      },
      {
        unified: "1f477-1f3fc-200d-2640-fe0f",
        native: "👷🏼‍♀️"
      },
      {
        unified: "1f477-1f3fd-200d-2640-fe0f",
        native: "👷🏽‍♀️"
      },
      {
        unified: "1f477-1f3fe-200d-2640-fe0f",
        native: "👷🏾‍♀️"
      },
      {
        unified: "1f477-1f3ff-200d-2640-fe0f",
        native: "👷🏿‍♀️"
      }
    ],
    version: 4
  },
  person_with_crown: {
    id: "person_with_crown",
    name: "Person with Crown",
    keywords: [
      "royalty",
      "power"
    ],
    skins: [
      {
        unified: "1fac5",
        native: "🫅"
      },
      {
        unified: "1fac5-1f3fb",
        native: "🫅🏻"
      },
      {
        unified: "1fac5-1f3fc",
        native: "🫅🏼"
      },
      {
        unified: "1fac5-1f3fd",
        native: "🫅🏽"
      },
      {
        unified: "1fac5-1f3fe",
        native: "🫅🏾"
      },
      {
        unified: "1fac5-1f3ff",
        native: "🫅🏿"
      }
    ],
    version: 14
  },
  prince: {
    id: "prince",
    name: "Prince",
    keywords: [
      "boy",
      "man",
      "male",
      "crown",
      "royal",
      "king"
    ],
    skins: [
      {
        unified: "1f934",
        native: "🤴"
      },
      {
        unified: "1f934-1f3fb",
        native: "🤴🏻"
      },
      {
        unified: "1f934-1f3fc",
        native: "🤴🏼"
      },
      {
        unified: "1f934-1f3fd",
        native: "🤴🏽"
      },
      {
        unified: "1f934-1f3fe",
        native: "🤴🏾"
      },
      {
        unified: "1f934-1f3ff",
        native: "🤴🏿"
      }
    ],
    version: 3
  },
  princess: {
    id: "princess",
    name: "Princess",
    keywords: [
      "girl",
      "woman",
      "female",
      "blond",
      "crown",
      "royal",
      "queen"
    ],
    skins: [
      {
        unified: "1f478",
        native: "👸"
      },
      {
        unified: "1f478-1f3fb",
        native: "👸🏻"
      },
      {
        unified: "1f478-1f3fc",
        native: "👸🏼"
      },
      {
        unified: "1f478-1f3fd",
        native: "👸🏽"
      },
      {
        unified: "1f478-1f3fe",
        native: "👸🏾"
      },
      {
        unified: "1f478-1f3ff",
        native: "👸🏿"
      }
    ],
    version: 1
  },
  man_with_turban: {
    id: "man_with_turban",
    name: "Man with Turban",
    keywords: [
      "person",
      "wearing",
      "headdress"
    ],
    skins: [
      {
        unified: "1f473",
        native: "👳"
      },
      {
        unified: "1f473-1f3fb",
        native: "👳🏻"
      },
      {
        unified: "1f473-1f3fc",
        native: "👳🏼"
      },
      {
        unified: "1f473-1f3fd",
        native: "👳🏽"
      },
      {
        unified: "1f473-1f3fe",
        native: "👳🏾"
      },
      {
        unified: "1f473-1f3ff",
        native: "👳🏿"
      }
    ],
    version: 1
  },
  "man-wearing-turban": {
    id: "man-wearing-turban",
    name: "Man Wearing Turban",
    keywords: [
      "wearing-turban",
      "male",
      "indian",
      "hinduism",
      "arabs"
    ],
    skins: [
      {
        unified: "1f473-200d-2642-fe0f",
        native: "👳‍♂️"
      },
      {
        unified: "1f473-1f3fb-200d-2642-fe0f",
        native: "👳🏻‍♂️"
      },
      {
        unified: "1f473-1f3fc-200d-2642-fe0f",
        native: "👳🏼‍♂️"
      },
      {
        unified: "1f473-1f3fd-200d-2642-fe0f",
        native: "👳🏽‍♂️"
      },
      {
        unified: "1f473-1f3fe-200d-2642-fe0f",
        native: "👳🏾‍♂️"
      },
      {
        unified: "1f473-1f3ff-200d-2642-fe0f",
        native: "👳🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-wearing-turban": {
    id: "woman-wearing-turban",
    name: "Woman Wearing Turban",
    keywords: [
      "wearing-turban",
      "female",
      "indian",
      "hinduism",
      "arabs"
    ],
    skins: [
      {
        unified: "1f473-200d-2640-fe0f",
        native: "👳‍♀️"
      },
      {
        unified: "1f473-1f3fb-200d-2640-fe0f",
        native: "👳🏻‍♀️"
      },
      {
        unified: "1f473-1f3fc-200d-2640-fe0f",
        native: "👳🏼‍♀️"
      },
      {
        unified: "1f473-1f3fd-200d-2640-fe0f",
        native: "👳🏽‍♀️"
      },
      {
        unified: "1f473-1f3fe-200d-2640-fe0f",
        native: "👳🏾‍♀️"
      },
      {
        unified: "1f473-1f3ff-200d-2640-fe0f",
        native: "👳🏿‍♀️"
      }
    ],
    version: 4
  },
  man_with_gua_pi_mao: {
    id: "man_with_gua_pi_mao",
    name: "Man with Gua Pi Mao",
    keywords: [
      "skullcap",
      "male",
      "boy",
      "chinese"
    ],
    skins: [
      {
        unified: "1f472",
        native: "👲"
      },
      {
        unified: "1f472-1f3fb",
        native: "👲🏻"
      },
      {
        unified: "1f472-1f3fc",
        native: "👲🏼"
      },
      {
        unified: "1f472-1f3fd",
        native: "👲🏽"
      },
      {
        unified: "1f472-1f3fe",
        native: "👲🏾"
      },
      {
        unified: "1f472-1f3ff",
        native: "👲🏿"
      }
    ],
    version: 1
  },
  person_with_headscarf: {
    id: "person_with_headscarf",
    name: "Woman with Headscarf",
    keywords: [
      "person",
      "female",
      "hijab",
      "mantilla",
      "tichel"
    ],
    skins: [
      {
        unified: "1f9d5",
        native: "🧕"
      },
      {
        unified: "1f9d5-1f3fb",
        native: "🧕🏻"
      },
      {
        unified: "1f9d5-1f3fc",
        native: "🧕🏼"
      },
      {
        unified: "1f9d5-1f3fd",
        native: "🧕🏽"
      },
      {
        unified: "1f9d5-1f3fe",
        native: "🧕🏾"
      },
      {
        unified: "1f9d5-1f3ff",
        native: "🧕🏿"
      }
    ],
    version: 5
  },
  person_in_tuxedo: {
    id: "person_in_tuxedo",
    name: "Man in Tuxedo",
    keywords: [
      "person",
      "couple",
      "marriage",
      "wedding",
      "groom"
    ],
    skins: [
      {
        unified: "1f935",
        native: "🤵"
      },
      {
        unified: "1f935-1f3fb",
        native: "🤵🏻"
      },
      {
        unified: "1f935-1f3fc",
        native: "🤵🏼"
      },
      {
        unified: "1f935-1f3fd",
        native: "🤵🏽"
      },
      {
        unified: "1f935-1f3fe",
        native: "🤵🏾"
      },
      {
        unified: "1f935-1f3ff",
        native: "🤵🏿"
      }
    ],
    version: 3
  },
  man_in_tuxedo: {
    id: "man_in_tuxedo",
    name: "Man in Tuxedo",
    keywords: [
      "formal",
      "fashion"
    ],
    skins: [
      {
        unified: "1f935-200d-2642-fe0f",
        native: "🤵‍♂️"
      },
      {
        unified: "1f935-1f3fb-200d-2642-fe0f",
        native: "🤵🏻‍♂️"
      },
      {
        unified: "1f935-1f3fc-200d-2642-fe0f",
        native: "🤵🏼‍♂️"
      },
      {
        unified: "1f935-1f3fd-200d-2642-fe0f",
        native: "🤵🏽‍♂️"
      },
      {
        unified: "1f935-1f3fe-200d-2642-fe0f",
        native: "🤵🏾‍♂️"
      },
      {
        unified: "1f935-1f3ff-200d-2642-fe0f",
        native: "🤵🏿‍♂️"
      }
    ],
    version: 13
  },
  woman_in_tuxedo: {
    id: "woman_in_tuxedo",
    name: "Woman in Tuxedo",
    keywords: [
      "formal",
      "fashion"
    ],
    skins: [
      {
        unified: "1f935-200d-2640-fe0f",
        native: "🤵‍♀️"
      },
      {
        unified: "1f935-1f3fb-200d-2640-fe0f",
        native: "🤵🏻‍♀️"
      },
      {
        unified: "1f935-1f3fc-200d-2640-fe0f",
        native: "🤵🏼‍♀️"
      },
      {
        unified: "1f935-1f3fd-200d-2640-fe0f",
        native: "🤵🏽‍♀️"
      },
      {
        unified: "1f935-1f3fe-200d-2640-fe0f",
        native: "🤵🏾‍♀️"
      },
      {
        unified: "1f935-1f3ff-200d-2640-fe0f",
        native: "🤵🏿‍♀️"
      }
    ],
    version: 13
  },
  bride_with_veil: {
    id: "bride_with_veil",
    name: "Bride with Veil",
    keywords: [
      "couple",
      "marriage",
      "wedding",
      "woman"
    ],
    skins: [
      {
        unified: "1f470",
        native: "👰"
      },
      {
        unified: "1f470-1f3fb",
        native: "👰🏻"
      },
      {
        unified: "1f470-1f3fc",
        native: "👰🏼"
      },
      {
        unified: "1f470-1f3fd",
        native: "👰🏽"
      },
      {
        unified: "1f470-1f3fe",
        native: "👰🏾"
      },
      {
        unified: "1f470-1f3ff",
        native: "👰🏿"
      }
    ],
    version: 1
  },
  man_with_veil: {
    id: "man_with_veil",
    name: "Man with Veil",
    keywords: [
      "wedding",
      "marriage"
    ],
    skins: [
      {
        unified: "1f470-200d-2642-fe0f",
        native: "👰‍♂️"
      },
      {
        unified: "1f470-1f3fb-200d-2642-fe0f",
        native: "👰🏻‍♂️"
      },
      {
        unified: "1f470-1f3fc-200d-2642-fe0f",
        native: "👰🏼‍♂️"
      },
      {
        unified: "1f470-1f3fd-200d-2642-fe0f",
        native: "👰🏽‍♂️"
      },
      {
        unified: "1f470-1f3fe-200d-2642-fe0f",
        native: "👰🏾‍♂️"
      },
      {
        unified: "1f470-1f3ff-200d-2642-fe0f",
        native: "👰🏿‍♂️"
      }
    ],
    version: 13
  },
  woman_with_veil: {
    id: "woman_with_veil",
    name: "Woman with Veil",
    keywords: [
      "wedding",
      "marriage"
    ],
    skins: [
      {
        unified: "1f470-200d-2640-fe0f",
        native: "👰‍♀️"
      },
      {
        unified: "1f470-1f3fb-200d-2640-fe0f",
        native: "👰🏻‍♀️"
      },
      {
        unified: "1f470-1f3fc-200d-2640-fe0f",
        native: "👰🏼‍♀️"
      },
      {
        unified: "1f470-1f3fd-200d-2640-fe0f",
        native: "👰🏽‍♀️"
      },
      {
        unified: "1f470-1f3fe-200d-2640-fe0f",
        native: "👰🏾‍♀️"
      },
      {
        unified: "1f470-1f3ff-200d-2640-fe0f",
        native: "👰🏿‍♀️"
      }
    ],
    version: 13
  },
  pregnant_woman: {
    id: "pregnant_woman",
    name: "Pregnant Woman",
    keywords: [
      "baby"
    ],
    skins: [
      {
        unified: "1f930",
        native: "🤰"
      },
      {
        unified: "1f930-1f3fb",
        native: "🤰🏻"
      },
      {
        unified: "1f930-1f3fc",
        native: "🤰🏼"
      },
      {
        unified: "1f930-1f3fd",
        native: "🤰🏽"
      },
      {
        unified: "1f930-1f3fe",
        native: "🤰🏾"
      },
      {
        unified: "1f930-1f3ff",
        native: "🤰🏿"
      }
    ],
    version: 3
  },
  pregnant_man: {
    id: "pregnant_man",
    name: "Pregnant Man",
    keywords: [
      "baby",
      "belly"
    ],
    skins: [
      {
        unified: "1fac3",
        native: "🫃"
      },
      {
        unified: "1fac3-1f3fb",
        native: "🫃🏻"
      },
      {
        unified: "1fac3-1f3fc",
        native: "🫃🏼"
      },
      {
        unified: "1fac3-1f3fd",
        native: "🫃🏽"
      },
      {
        unified: "1fac3-1f3fe",
        native: "🫃🏾"
      },
      {
        unified: "1fac3-1f3ff",
        native: "🫃🏿"
      }
    ],
    version: 14
  },
  pregnant_person: {
    id: "pregnant_person",
    name: "Pregnant Person",
    keywords: [
      "baby",
      "belly"
    ],
    skins: [
      {
        unified: "1fac4",
        native: "🫄"
      },
      {
        unified: "1fac4-1f3fb",
        native: "🫄🏻"
      },
      {
        unified: "1fac4-1f3fc",
        native: "🫄🏼"
      },
      {
        unified: "1fac4-1f3fd",
        native: "🫄🏽"
      },
      {
        unified: "1fac4-1f3fe",
        native: "🫄🏾"
      },
      {
        unified: "1fac4-1f3ff",
        native: "🫄🏿"
      }
    ],
    version: 14
  },
  "breast-feeding": {
    id: "breast-feeding",
    name: "Breast-Feeding",
    keywords: [
      "breast",
      "feeding",
      "nursing",
      "baby"
    ],
    skins: [
      {
        unified: "1f931",
        native: "🤱"
      },
      {
        unified: "1f931-1f3fb",
        native: "🤱🏻"
      },
      {
        unified: "1f931-1f3fc",
        native: "🤱🏼"
      },
      {
        unified: "1f931-1f3fd",
        native: "🤱🏽"
      },
      {
        unified: "1f931-1f3fe",
        native: "🤱🏾"
      },
      {
        unified: "1f931-1f3ff",
        native: "🤱🏿"
      }
    ],
    version: 5
  },
  woman_feeding_baby: {
    id: "woman_feeding_baby",
    name: "Woman Feeding Baby",
    keywords: [
      "birth",
      "food"
    ],
    skins: [
      {
        unified: "1f469-200d-1f37c",
        native: "👩‍🍼"
      },
      {
        unified: "1f469-1f3fb-200d-1f37c",
        native: "👩🏻‍🍼"
      },
      {
        unified: "1f469-1f3fc-200d-1f37c",
        native: "👩🏼‍🍼"
      },
      {
        unified: "1f469-1f3fd-200d-1f37c",
        native: "👩🏽‍🍼"
      },
      {
        unified: "1f469-1f3fe-200d-1f37c",
        native: "👩🏾‍🍼"
      },
      {
        unified: "1f469-1f3ff-200d-1f37c",
        native: "👩🏿‍🍼"
      }
    ],
    version: 13
  },
  man_feeding_baby: {
    id: "man_feeding_baby",
    name: "Man Feeding Baby",
    keywords: [
      "birth",
      "food"
    ],
    skins: [
      {
        unified: "1f468-200d-1f37c",
        native: "👨‍🍼"
      },
      {
        unified: "1f468-1f3fb-200d-1f37c",
        native: "👨🏻‍🍼"
      },
      {
        unified: "1f468-1f3fc-200d-1f37c",
        native: "👨🏼‍🍼"
      },
      {
        unified: "1f468-1f3fd-200d-1f37c",
        native: "👨🏽‍🍼"
      },
      {
        unified: "1f468-1f3fe-200d-1f37c",
        native: "👨🏾‍🍼"
      },
      {
        unified: "1f468-1f3ff-200d-1f37c",
        native: "👨🏿‍🍼"
      }
    ],
    version: 13
  },
  person_feeding_baby: {
    id: "person_feeding_baby",
    name: "Person Feeding Baby",
    keywords: [
      "birth",
      "food"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f37c",
        native: "🧑‍🍼"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f37c",
        native: "🧑🏻‍🍼"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f37c",
        native: "🧑🏼‍🍼"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f37c",
        native: "🧑🏽‍🍼"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f37c",
        native: "🧑🏾‍🍼"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f37c",
        native: "🧑🏿‍🍼"
      }
    ],
    version: 13
  },
  angel: {
    id: "angel",
    name: "Baby Angel",
    keywords: [
      "heaven",
      "wings",
      "halo"
    ],
    skins: [
      {
        unified: "1f47c",
        native: "👼"
      },
      {
        unified: "1f47c-1f3fb",
        native: "👼🏻"
      },
      {
        unified: "1f47c-1f3fc",
        native: "👼🏼"
      },
      {
        unified: "1f47c-1f3fd",
        native: "👼🏽"
      },
      {
        unified: "1f47c-1f3fe",
        native: "👼🏾"
      },
      {
        unified: "1f47c-1f3ff",
        native: "👼🏿"
      }
    ],
    version: 1
  },
  santa: {
    id: "santa",
    name: "Santa Claus",
    keywords: [
      "festival",
      "man",
      "male",
      "xmas",
      "father",
      "christmas"
    ],
    skins: [
      {
        unified: "1f385",
        native: "🎅"
      },
      {
        unified: "1f385-1f3fb",
        native: "🎅🏻"
      },
      {
        unified: "1f385-1f3fc",
        native: "🎅🏼"
      },
      {
        unified: "1f385-1f3fd",
        native: "🎅🏽"
      },
      {
        unified: "1f385-1f3fe",
        native: "🎅🏾"
      },
      {
        unified: "1f385-1f3ff",
        native: "🎅🏿"
      }
    ],
    version: 1
  },
  mrs_claus: {
    id: "mrs_claus",
    name: "Mrs. Claus",
    keywords: [
      "mrs",
      "mother",
      "christmas",
      "woman",
      "female",
      "xmas"
    ],
    skins: [
      {
        unified: "1f936",
        native: "🤶"
      },
      {
        unified: "1f936-1f3fb",
        native: "🤶🏻"
      },
      {
        unified: "1f936-1f3fc",
        native: "🤶🏼"
      },
      {
        unified: "1f936-1f3fd",
        native: "🤶🏽"
      },
      {
        unified: "1f936-1f3fe",
        native: "🤶🏾"
      },
      {
        unified: "1f936-1f3ff",
        native: "🤶🏿"
      }
    ],
    version: 3
  },
  mx_claus: {
    id: "mx_claus",
    name: "Mx Claus",
    keywords: [
      "christmas"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f384",
        native: "🧑‍🎄"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f384",
        native: "🧑🏻‍🎄"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f384",
        native: "🧑🏼‍🎄"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f384",
        native: "🧑🏽‍🎄"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f384",
        native: "🧑🏾‍🎄"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f384",
        native: "🧑🏿‍🎄"
      }
    ],
    version: 13
  },
  superhero: {
    id: "superhero",
    name: "Superhero",
    keywords: [
      "marvel"
    ],
    skins: [
      {
        unified: "1f9b8",
        native: "🦸"
      },
      {
        unified: "1f9b8-1f3fb",
        native: "🦸🏻"
      },
      {
        unified: "1f9b8-1f3fc",
        native: "🦸🏼"
      },
      {
        unified: "1f9b8-1f3fd",
        native: "🦸🏽"
      },
      {
        unified: "1f9b8-1f3fe",
        native: "🦸🏾"
      },
      {
        unified: "1f9b8-1f3ff",
        native: "🦸🏿"
      }
    ],
    version: 11
  },
  male_superhero: {
    id: "male_superhero",
    name: "Man Superhero",
    keywords: [
      "male",
      "good",
      "hero",
      "superpowers"
    ],
    skins: [
      {
        unified: "1f9b8-200d-2642-fe0f",
        native: "🦸‍♂️"
      },
      {
        unified: "1f9b8-1f3fb-200d-2642-fe0f",
        native: "🦸🏻‍♂️"
      },
      {
        unified: "1f9b8-1f3fc-200d-2642-fe0f",
        native: "🦸🏼‍♂️"
      },
      {
        unified: "1f9b8-1f3fd-200d-2642-fe0f",
        native: "🦸🏽‍♂️"
      },
      {
        unified: "1f9b8-1f3fe-200d-2642-fe0f",
        native: "🦸🏾‍♂️"
      },
      {
        unified: "1f9b8-1f3ff-200d-2642-fe0f",
        native: "🦸🏿‍♂️"
      }
    ],
    version: 11
  },
  female_superhero: {
    id: "female_superhero",
    name: "Woman Superhero",
    keywords: [
      "female",
      "good",
      "heroine",
      "superpowers"
    ],
    skins: [
      {
        unified: "1f9b8-200d-2640-fe0f",
        native: "🦸‍♀️"
      },
      {
        unified: "1f9b8-1f3fb-200d-2640-fe0f",
        native: "🦸🏻‍♀️"
      },
      {
        unified: "1f9b8-1f3fc-200d-2640-fe0f",
        native: "🦸🏼‍♀️"
      },
      {
        unified: "1f9b8-1f3fd-200d-2640-fe0f",
        native: "🦸🏽‍♀️"
      },
      {
        unified: "1f9b8-1f3fe-200d-2640-fe0f",
        native: "🦸🏾‍♀️"
      },
      {
        unified: "1f9b8-1f3ff-200d-2640-fe0f",
        native: "🦸🏿‍♀️"
      }
    ],
    version: 11
  },
  supervillain: {
    id: "supervillain",
    name: "Supervillain",
    keywords: [
      "marvel"
    ],
    skins: [
      {
        unified: "1f9b9",
        native: "🦹"
      },
      {
        unified: "1f9b9-1f3fb",
        native: "🦹🏻"
      },
      {
        unified: "1f9b9-1f3fc",
        native: "🦹🏼"
      },
      {
        unified: "1f9b9-1f3fd",
        native: "🦹🏽"
      },
      {
        unified: "1f9b9-1f3fe",
        native: "🦹🏾"
      },
      {
        unified: "1f9b9-1f3ff",
        native: "🦹🏿"
      }
    ],
    version: 11
  },
  male_supervillain: {
    id: "male_supervillain",
    name: "Man Supervillain",
    keywords: [
      "male",
      "evil",
      "bad",
      "criminal",
      "hero",
      "superpowers"
    ],
    skins: [
      {
        unified: "1f9b9-200d-2642-fe0f",
        native: "🦹‍♂️"
      },
      {
        unified: "1f9b9-1f3fb-200d-2642-fe0f",
        native: "🦹🏻‍♂️"
      },
      {
        unified: "1f9b9-1f3fc-200d-2642-fe0f",
        native: "🦹🏼‍♂️"
      },
      {
        unified: "1f9b9-1f3fd-200d-2642-fe0f",
        native: "🦹🏽‍♂️"
      },
      {
        unified: "1f9b9-1f3fe-200d-2642-fe0f",
        native: "🦹🏾‍♂️"
      },
      {
        unified: "1f9b9-1f3ff-200d-2642-fe0f",
        native: "🦹🏿‍♂️"
      }
    ],
    version: 11
  },
  female_supervillain: {
    id: "female_supervillain",
    name: "Woman Supervillain",
    keywords: [
      "female",
      "evil",
      "bad",
      "criminal",
      "heroine",
      "superpowers"
    ],
    skins: [
      {
        unified: "1f9b9-200d-2640-fe0f",
        native: "🦹‍♀️"
      },
      {
        unified: "1f9b9-1f3fb-200d-2640-fe0f",
        native: "🦹🏻‍♀️"
      },
      {
        unified: "1f9b9-1f3fc-200d-2640-fe0f",
        native: "🦹🏼‍♀️"
      },
      {
        unified: "1f9b9-1f3fd-200d-2640-fe0f",
        native: "🦹🏽‍♀️"
      },
      {
        unified: "1f9b9-1f3fe-200d-2640-fe0f",
        native: "🦹🏾‍♀️"
      },
      {
        unified: "1f9b9-1f3ff-200d-2640-fe0f",
        native: "🦹🏿‍♀️"
      }
    ],
    version: 11
  },
  mage: {
    id: "mage",
    name: "Mage",
    keywords: [
      "magic"
    ],
    skins: [
      {
        unified: "1f9d9",
        native: "🧙"
      },
      {
        unified: "1f9d9-1f3fb",
        native: "🧙🏻"
      },
      {
        unified: "1f9d9-1f3fc",
        native: "🧙🏼"
      },
      {
        unified: "1f9d9-1f3fd",
        native: "🧙🏽"
      },
      {
        unified: "1f9d9-1f3fe",
        native: "🧙🏾"
      },
      {
        unified: "1f9d9-1f3ff",
        native: "🧙🏿"
      }
    ],
    version: 5
  },
  male_mage: {
    id: "male_mage",
    name: "Man Mage",
    keywords: [
      "male",
      "sorcerer"
    ],
    skins: [
      {
        unified: "1f9d9-200d-2642-fe0f",
        native: "🧙‍♂️"
      },
      {
        unified: "1f9d9-1f3fb-200d-2642-fe0f",
        native: "🧙🏻‍♂️"
      },
      {
        unified: "1f9d9-1f3fc-200d-2642-fe0f",
        native: "🧙🏼‍♂️"
      },
      {
        unified: "1f9d9-1f3fd-200d-2642-fe0f",
        native: "🧙🏽‍♂️"
      },
      {
        unified: "1f9d9-1f3fe-200d-2642-fe0f",
        native: "🧙🏾‍♂️"
      },
      {
        unified: "1f9d9-1f3ff-200d-2642-fe0f",
        native: "🧙🏿‍♂️"
      }
    ],
    version: 5
  },
  female_mage: {
    id: "female_mage",
    name: "Woman Mage",
    keywords: [
      "female",
      "witch"
    ],
    skins: [
      {
        unified: "1f9d9-200d-2640-fe0f",
        native: "🧙‍♀️"
      },
      {
        unified: "1f9d9-1f3fb-200d-2640-fe0f",
        native: "🧙🏻‍♀️"
      },
      {
        unified: "1f9d9-1f3fc-200d-2640-fe0f",
        native: "🧙🏼‍♀️"
      },
      {
        unified: "1f9d9-1f3fd-200d-2640-fe0f",
        native: "🧙🏽‍♀️"
      },
      {
        unified: "1f9d9-1f3fe-200d-2640-fe0f",
        native: "🧙🏾‍♀️"
      },
      {
        unified: "1f9d9-1f3ff-200d-2640-fe0f",
        native: "🧙🏿‍♀️"
      }
    ],
    version: 5
  },
  fairy: {
    id: "fairy",
    name: "Fairy",
    keywords: [
      "wings",
      "magical"
    ],
    skins: [
      {
        unified: "1f9da",
        native: "🧚"
      },
      {
        unified: "1f9da-1f3fb",
        native: "🧚🏻"
      },
      {
        unified: "1f9da-1f3fc",
        native: "🧚🏼"
      },
      {
        unified: "1f9da-1f3fd",
        native: "🧚🏽"
      },
      {
        unified: "1f9da-1f3fe",
        native: "🧚🏾"
      },
      {
        unified: "1f9da-1f3ff",
        native: "🧚🏿"
      }
    ],
    version: 5
  },
  male_fairy: {
    id: "male_fairy",
    name: "Man Fairy",
    keywords: [
      "male"
    ],
    skins: [
      {
        unified: "1f9da-200d-2642-fe0f",
        native: "🧚‍♂️"
      },
      {
        unified: "1f9da-1f3fb-200d-2642-fe0f",
        native: "🧚🏻‍♂️"
      },
      {
        unified: "1f9da-1f3fc-200d-2642-fe0f",
        native: "🧚🏼‍♂️"
      },
      {
        unified: "1f9da-1f3fd-200d-2642-fe0f",
        native: "🧚🏽‍♂️"
      },
      {
        unified: "1f9da-1f3fe-200d-2642-fe0f",
        native: "🧚🏾‍♂️"
      },
      {
        unified: "1f9da-1f3ff-200d-2642-fe0f",
        native: "🧚🏿‍♂️"
      }
    ],
    version: 5
  },
  female_fairy: {
    id: "female_fairy",
    name: "Woman Fairy",
    keywords: [
      "female"
    ],
    skins: [
      {
        unified: "1f9da-200d-2640-fe0f",
        native: "🧚‍♀️"
      },
      {
        unified: "1f9da-1f3fb-200d-2640-fe0f",
        native: "🧚🏻‍♀️"
      },
      {
        unified: "1f9da-1f3fc-200d-2640-fe0f",
        native: "🧚🏼‍♀️"
      },
      {
        unified: "1f9da-1f3fd-200d-2640-fe0f",
        native: "🧚🏽‍♀️"
      },
      {
        unified: "1f9da-1f3fe-200d-2640-fe0f",
        native: "🧚🏾‍♀️"
      },
      {
        unified: "1f9da-1f3ff-200d-2640-fe0f",
        native: "🧚🏿‍♀️"
      }
    ],
    version: 5
  },
  vampire: {
    id: "vampire",
    name: "Vampire",
    keywords: [
      "blood",
      "twilight"
    ],
    skins: [
      {
        unified: "1f9db",
        native: "🧛"
      },
      {
        unified: "1f9db-1f3fb",
        native: "🧛🏻"
      },
      {
        unified: "1f9db-1f3fc",
        native: "🧛🏼"
      },
      {
        unified: "1f9db-1f3fd",
        native: "🧛🏽"
      },
      {
        unified: "1f9db-1f3fe",
        native: "🧛🏾"
      },
      {
        unified: "1f9db-1f3ff",
        native: "🧛🏿"
      }
    ],
    version: 5
  },
  male_vampire: {
    id: "male_vampire",
    name: "Man Vampire",
    keywords: [
      "male",
      "dracula"
    ],
    skins: [
      {
        unified: "1f9db-200d-2642-fe0f",
        native: "🧛‍♂️"
      },
      {
        unified: "1f9db-1f3fb-200d-2642-fe0f",
        native: "🧛🏻‍♂️"
      },
      {
        unified: "1f9db-1f3fc-200d-2642-fe0f",
        native: "🧛🏼‍♂️"
      },
      {
        unified: "1f9db-1f3fd-200d-2642-fe0f",
        native: "🧛🏽‍♂️"
      },
      {
        unified: "1f9db-1f3fe-200d-2642-fe0f",
        native: "🧛🏾‍♂️"
      },
      {
        unified: "1f9db-1f3ff-200d-2642-fe0f",
        native: "🧛🏿‍♂️"
      }
    ],
    version: 5
  },
  female_vampire: {
    id: "female_vampire",
    name: "Woman Vampire",
    keywords: [
      "female"
    ],
    skins: [
      {
        unified: "1f9db-200d-2640-fe0f",
        native: "🧛‍♀️"
      },
      {
        unified: "1f9db-1f3fb-200d-2640-fe0f",
        native: "🧛🏻‍♀️"
      },
      {
        unified: "1f9db-1f3fc-200d-2640-fe0f",
        native: "🧛🏼‍♀️"
      },
      {
        unified: "1f9db-1f3fd-200d-2640-fe0f",
        native: "🧛🏽‍♀️"
      },
      {
        unified: "1f9db-1f3fe-200d-2640-fe0f",
        native: "🧛🏾‍♀️"
      },
      {
        unified: "1f9db-1f3ff-200d-2640-fe0f",
        native: "🧛🏿‍♀️"
      }
    ],
    version: 5
  },
  merperson: {
    id: "merperson",
    name: "Merperson",
    keywords: [
      "sea"
    ],
    skins: [
      {
        unified: "1f9dc",
        native: "🧜"
      },
      {
        unified: "1f9dc-1f3fb",
        native: "🧜🏻"
      },
      {
        unified: "1f9dc-1f3fc",
        native: "🧜🏼"
      },
      {
        unified: "1f9dc-1f3fd",
        native: "🧜🏽"
      },
      {
        unified: "1f9dc-1f3fe",
        native: "🧜🏾"
      },
      {
        unified: "1f9dc-1f3ff",
        native: "🧜🏿"
      }
    ],
    version: 5
  },
  merman: {
    id: "merman",
    name: "Merman",
    keywords: [
      "man",
      "male",
      "triton"
    ],
    skins: [
      {
        unified: "1f9dc-200d-2642-fe0f",
        native: "🧜‍♂️"
      },
      {
        unified: "1f9dc-1f3fb-200d-2642-fe0f",
        native: "🧜🏻‍♂️"
      },
      {
        unified: "1f9dc-1f3fc-200d-2642-fe0f",
        native: "🧜🏼‍♂️"
      },
      {
        unified: "1f9dc-1f3fd-200d-2642-fe0f",
        native: "🧜🏽‍♂️"
      },
      {
        unified: "1f9dc-1f3fe-200d-2642-fe0f",
        native: "🧜🏾‍♂️"
      },
      {
        unified: "1f9dc-1f3ff-200d-2642-fe0f",
        native: "🧜🏿‍♂️"
      }
    ],
    version: 5
  },
  mermaid: {
    id: "mermaid",
    name: "Mermaid",
    keywords: [
      "woman",
      "female",
      "merwoman",
      "ariel"
    ],
    skins: [
      {
        unified: "1f9dc-200d-2640-fe0f",
        native: "🧜‍♀️"
      },
      {
        unified: "1f9dc-1f3fb-200d-2640-fe0f",
        native: "🧜🏻‍♀️"
      },
      {
        unified: "1f9dc-1f3fc-200d-2640-fe0f",
        native: "🧜🏼‍♀️"
      },
      {
        unified: "1f9dc-1f3fd-200d-2640-fe0f",
        native: "🧜🏽‍♀️"
      },
      {
        unified: "1f9dc-1f3fe-200d-2640-fe0f",
        native: "🧜🏾‍♀️"
      },
      {
        unified: "1f9dc-1f3ff-200d-2640-fe0f",
        native: "🧜🏿‍♀️"
      }
    ],
    version: 5
  },
  elf: {
    id: "elf",
    name: "Elf",
    keywords: [
      "magical"
    ],
    skins: [
      {
        unified: "1f9dd",
        native: "🧝"
      },
      {
        unified: "1f9dd-1f3fb",
        native: "🧝🏻"
      },
      {
        unified: "1f9dd-1f3fc",
        native: "🧝🏼"
      },
      {
        unified: "1f9dd-1f3fd",
        native: "🧝🏽"
      },
      {
        unified: "1f9dd-1f3fe",
        native: "🧝🏾"
      },
      {
        unified: "1f9dd-1f3ff",
        native: "🧝🏿"
      }
    ],
    version: 5
  },
  male_elf: {
    id: "male_elf",
    name: "Man Elf",
    keywords: [
      "male"
    ],
    skins: [
      {
        unified: "1f9dd-200d-2642-fe0f",
        native: "🧝‍♂️"
      },
      {
        unified: "1f9dd-1f3fb-200d-2642-fe0f",
        native: "🧝🏻‍♂️"
      },
      {
        unified: "1f9dd-1f3fc-200d-2642-fe0f",
        native: "🧝🏼‍♂️"
      },
      {
        unified: "1f9dd-1f3fd-200d-2642-fe0f",
        native: "🧝🏽‍♂️"
      },
      {
        unified: "1f9dd-1f3fe-200d-2642-fe0f",
        native: "🧝🏾‍♂️"
      },
      {
        unified: "1f9dd-1f3ff-200d-2642-fe0f",
        native: "🧝🏿‍♂️"
      }
    ],
    version: 5
  },
  female_elf: {
    id: "female_elf",
    name: "Woman Elf",
    keywords: [
      "female"
    ],
    skins: [
      {
        unified: "1f9dd-200d-2640-fe0f",
        native: "🧝‍♀️"
      },
      {
        unified: "1f9dd-1f3fb-200d-2640-fe0f",
        native: "🧝🏻‍♀️"
      },
      {
        unified: "1f9dd-1f3fc-200d-2640-fe0f",
        native: "🧝🏼‍♀️"
      },
      {
        unified: "1f9dd-1f3fd-200d-2640-fe0f",
        native: "🧝🏽‍♀️"
      },
      {
        unified: "1f9dd-1f3fe-200d-2640-fe0f",
        native: "🧝🏾‍♀️"
      },
      {
        unified: "1f9dd-1f3ff-200d-2640-fe0f",
        native: "🧝🏿‍♀️"
      }
    ],
    version: 5
  },
  genie: {
    id: "genie",
    name: "Genie",
    keywords: [
      "magical",
      "wishes"
    ],
    skins: [
      {
        unified: "1f9de",
        native: "🧞"
      }
    ],
    version: 5
  },
  male_genie: {
    id: "male_genie",
    name: "Man Genie",
    keywords: [
      "male"
    ],
    skins: [
      {
        unified: "1f9de-200d-2642-fe0f",
        native: "🧞‍♂️"
      }
    ],
    version: 5
  },
  female_genie: {
    id: "female_genie",
    name: "Woman Genie",
    keywords: [
      "female"
    ],
    skins: [
      {
        unified: "1f9de-200d-2640-fe0f",
        native: "🧞‍♀️"
      }
    ],
    version: 5
  },
  zombie: {
    id: "zombie",
    name: "Zombie",
    keywords: [
      "dead"
    ],
    skins: [
      {
        unified: "1f9df",
        native: "🧟"
      }
    ],
    version: 5
  },
  male_zombie: {
    id: "male_zombie",
    name: "Man Zombie",
    keywords: [
      "male",
      "dracula",
      "undead",
      "walking",
      "dead"
    ],
    skins: [
      {
        unified: "1f9df-200d-2642-fe0f",
        native: "🧟‍♂️"
      }
    ],
    version: 5
  },
  female_zombie: {
    id: "female_zombie",
    name: "Woman Zombie",
    keywords: [
      "female",
      "undead",
      "walking",
      "dead"
    ],
    skins: [
      {
        unified: "1f9df-200d-2640-fe0f",
        native: "🧟‍♀️"
      }
    ],
    version: 5
  },
  troll: {
    id: "troll",
    name: "Troll",
    keywords: [
      "mystical",
      "monster"
    ],
    skins: [
      {
        unified: "1f9cc",
        native: "🧌"
      }
    ],
    version: 14
  },
  massage: {
    id: "massage",
    name: "Face Massage",
    keywords: [
      "person",
      "getting",
      "relax"
    ],
    skins: [
      {
        unified: "1f486",
        native: "💆"
      },
      {
        unified: "1f486-1f3fb",
        native: "💆🏻"
      },
      {
        unified: "1f486-1f3fc",
        native: "💆🏼"
      },
      {
        unified: "1f486-1f3fd",
        native: "💆🏽"
      },
      {
        unified: "1f486-1f3fe",
        native: "💆🏾"
      },
      {
        unified: "1f486-1f3ff",
        native: "💆🏿"
      }
    ],
    version: 1
  },
  "man-getting-massage": {
    id: "man-getting-massage",
    name: "Man Getting Massage",
    keywords: [
      "getting-massage",
      "male",
      "boy",
      "head"
    ],
    skins: [
      {
        unified: "1f486-200d-2642-fe0f",
        native: "💆‍♂️"
      },
      {
        unified: "1f486-1f3fb-200d-2642-fe0f",
        native: "💆🏻‍♂️"
      },
      {
        unified: "1f486-1f3fc-200d-2642-fe0f",
        native: "💆🏼‍♂️"
      },
      {
        unified: "1f486-1f3fd-200d-2642-fe0f",
        native: "💆🏽‍♂️"
      },
      {
        unified: "1f486-1f3fe-200d-2642-fe0f",
        native: "💆🏾‍♂️"
      },
      {
        unified: "1f486-1f3ff-200d-2642-fe0f",
        native: "💆🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-getting-massage": {
    id: "woman-getting-massage",
    name: "Woman Getting Massage",
    keywords: [
      "getting-massage",
      "female",
      "girl",
      "head"
    ],
    skins: [
      {
        unified: "1f486-200d-2640-fe0f",
        native: "💆‍♀️"
      },
      {
        unified: "1f486-1f3fb-200d-2640-fe0f",
        native: "💆🏻‍♀️"
      },
      {
        unified: "1f486-1f3fc-200d-2640-fe0f",
        native: "💆🏼‍♀️"
      },
      {
        unified: "1f486-1f3fd-200d-2640-fe0f",
        native: "💆🏽‍♀️"
      },
      {
        unified: "1f486-1f3fe-200d-2640-fe0f",
        native: "💆🏾‍♀️"
      },
      {
        unified: "1f486-1f3ff-200d-2640-fe0f",
        native: "💆🏿‍♀️"
      }
    ],
    version: 4
  },
  haircut: {
    id: "haircut",
    name: "Haircut",
    keywords: [
      "person",
      "getting",
      "hairstyle"
    ],
    skins: [
      {
        unified: "1f487",
        native: "💇"
      },
      {
        unified: "1f487-1f3fb",
        native: "💇🏻"
      },
      {
        unified: "1f487-1f3fc",
        native: "💇🏼"
      },
      {
        unified: "1f487-1f3fd",
        native: "💇🏽"
      },
      {
        unified: "1f487-1f3fe",
        native: "💇🏾"
      },
      {
        unified: "1f487-1f3ff",
        native: "💇🏿"
      }
    ],
    version: 1
  },
  "man-getting-haircut": {
    id: "man-getting-haircut",
    name: "Man Getting Haircut",
    keywords: [
      "getting-haircut",
      "male",
      "boy"
    ],
    skins: [
      {
        unified: "1f487-200d-2642-fe0f",
        native: "💇‍♂️"
      },
      {
        unified: "1f487-1f3fb-200d-2642-fe0f",
        native: "💇🏻‍♂️"
      },
      {
        unified: "1f487-1f3fc-200d-2642-fe0f",
        native: "💇🏼‍♂️"
      },
      {
        unified: "1f487-1f3fd-200d-2642-fe0f",
        native: "💇🏽‍♂️"
      },
      {
        unified: "1f487-1f3fe-200d-2642-fe0f",
        native: "💇🏾‍♂️"
      },
      {
        unified: "1f487-1f3ff-200d-2642-fe0f",
        native: "💇🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-getting-haircut": {
    id: "woman-getting-haircut",
    name: "Woman Getting Haircut",
    keywords: [
      "getting-haircut",
      "female",
      "girl"
    ],
    skins: [
      {
        unified: "1f487-200d-2640-fe0f",
        native: "💇‍♀️"
      },
      {
        unified: "1f487-1f3fb-200d-2640-fe0f",
        native: "💇🏻‍♀️"
      },
      {
        unified: "1f487-1f3fc-200d-2640-fe0f",
        native: "💇🏼‍♀️"
      },
      {
        unified: "1f487-1f3fd-200d-2640-fe0f",
        native: "💇🏽‍♀️"
      },
      {
        unified: "1f487-1f3fe-200d-2640-fe0f",
        native: "💇🏾‍♀️"
      },
      {
        unified: "1f487-1f3ff-200d-2640-fe0f",
        native: "💇🏿‍♀️"
      }
    ],
    version: 4
  },
  walking: {
    id: "walking",
    name: "Pedestrian",
    keywords: [
      "walking",
      "person",
      "move"
    ],
    skins: [
      {
        unified: "1f6b6",
        native: "🚶"
      },
      {
        unified: "1f6b6-1f3fb",
        native: "🚶🏻"
      },
      {
        unified: "1f6b6-1f3fc",
        native: "🚶🏼"
      },
      {
        unified: "1f6b6-1f3fd",
        native: "🚶🏽"
      },
      {
        unified: "1f6b6-1f3fe",
        native: "🚶🏾"
      },
      {
        unified: "1f6b6-1f3ff",
        native: "🚶🏿"
      }
    ],
    version: 1
  },
  "man-walking": {
    id: "man-walking",
    name: "Man Walking",
    keywords: [
      "human",
      "feet",
      "steps"
    ],
    skins: [
      {
        unified: "1f6b6-200d-2642-fe0f",
        native: "🚶‍♂️"
      },
      {
        unified: "1f6b6-1f3fb-200d-2642-fe0f",
        native: "🚶🏻‍♂️"
      },
      {
        unified: "1f6b6-1f3fc-200d-2642-fe0f",
        native: "🚶🏼‍♂️"
      },
      {
        unified: "1f6b6-1f3fd-200d-2642-fe0f",
        native: "🚶🏽‍♂️"
      },
      {
        unified: "1f6b6-1f3fe-200d-2642-fe0f",
        native: "🚶🏾‍♂️"
      },
      {
        unified: "1f6b6-1f3ff-200d-2642-fe0f",
        native: "🚶🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-walking": {
    id: "woman-walking",
    name: "Woman Walking",
    keywords: [
      "human",
      "feet",
      "steps",
      "female"
    ],
    skins: [
      {
        unified: "1f6b6-200d-2640-fe0f",
        native: "🚶‍♀️"
      },
      {
        unified: "1f6b6-1f3fb-200d-2640-fe0f",
        native: "🚶🏻‍♀️"
      },
      {
        unified: "1f6b6-1f3fc-200d-2640-fe0f",
        native: "🚶🏼‍♀️"
      },
      {
        unified: "1f6b6-1f3fd-200d-2640-fe0f",
        native: "🚶🏽‍♀️"
      },
      {
        unified: "1f6b6-1f3fe-200d-2640-fe0f",
        native: "🚶🏾‍♀️"
      },
      {
        unified: "1f6b6-1f3ff-200d-2640-fe0f",
        native: "🚶🏿‍♀️"
      }
    ],
    version: 4
  },
  standing_person: {
    id: "standing_person",
    name: "Standing Person",
    keywords: [
      "still"
    ],
    skins: [
      {
        unified: "1f9cd",
        native: "🧍"
      },
      {
        unified: "1f9cd-1f3fb",
        native: "🧍🏻"
      },
      {
        unified: "1f9cd-1f3fc",
        native: "🧍🏼"
      },
      {
        unified: "1f9cd-1f3fd",
        native: "🧍🏽"
      },
      {
        unified: "1f9cd-1f3fe",
        native: "🧍🏾"
      },
      {
        unified: "1f9cd-1f3ff",
        native: "🧍🏿"
      }
    ],
    version: 12
  },
  man_standing: {
    id: "man_standing",
    name: "Man Standing",
    keywords: [
      "still"
    ],
    skins: [
      {
        unified: "1f9cd-200d-2642-fe0f",
        native: "🧍‍♂️"
      },
      {
        unified: "1f9cd-1f3fb-200d-2642-fe0f",
        native: "🧍🏻‍♂️"
      },
      {
        unified: "1f9cd-1f3fc-200d-2642-fe0f",
        native: "🧍🏼‍♂️"
      },
      {
        unified: "1f9cd-1f3fd-200d-2642-fe0f",
        native: "🧍🏽‍♂️"
      },
      {
        unified: "1f9cd-1f3fe-200d-2642-fe0f",
        native: "🧍🏾‍♂️"
      },
      {
        unified: "1f9cd-1f3ff-200d-2642-fe0f",
        native: "🧍🏿‍♂️"
      }
    ],
    version: 12
  },
  woman_standing: {
    id: "woman_standing",
    name: "Woman Standing",
    keywords: [
      "still"
    ],
    skins: [
      {
        unified: "1f9cd-200d-2640-fe0f",
        native: "🧍‍♀️"
      },
      {
        unified: "1f9cd-1f3fb-200d-2640-fe0f",
        native: "🧍🏻‍♀️"
      },
      {
        unified: "1f9cd-1f3fc-200d-2640-fe0f",
        native: "🧍🏼‍♀️"
      },
      {
        unified: "1f9cd-1f3fd-200d-2640-fe0f",
        native: "🧍🏽‍♀️"
      },
      {
        unified: "1f9cd-1f3fe-200d-2640-fe0f",
        native: "🧍🏾‍♀️"
      },
      {
        unified: "1f9cd-1f3ff-200d-2640-fe0f",
        native: "🧍🏿‍♀️"
      }
    ],
    version: 12
  },
  kneeling_person: {
    id: "kneeling_person",
    name: "Kneeling Person",
    keywords: [
      "pray",
      "respectful"
    ],
    skins: [
      {
        unified: "1f9ce",
        native: "🧎"
      },
      {
        unified: "1f9ce-1f3fb",
        native: "🧎🏻"
      },
      {
        unified: "1f9ce-1f3fc",
        native: "🧎🏼"
      },
      {
        unified: "1f9ce-1f3fd",
        native: "🧎🏽"
      },
      {
        unified: "1f9ce-1f3fe",
        native: "🧎🏾"
      },
      {
        unified: "1f9ce-1f3ff",
        native: "🧎🏿"
      }
    ],
    version: 12
  },
  man_kneeling: {
    id: "man_kneeling",
    name: "Man Kneeling",
    keywords: [
      "pray",
      "respectful"
    ],
    skins: [
      {
        unified: "1f9ce-200d-2642-fe0f",
        native: "🧎‍♂️"
      },
      {
        unified: "1f9ce-1f3fb-200d-2642-fe0f",
        native: "🧎🏻‍♂️"
      },
      {
        unified: "1f9ce-1f3fc-200d-2642-fe0f",
        native: "🧎🏼‍♂️"
      },
      {
        unified: "1f9ce-1f3fd-200d-2642-fe0f",
        native: "🧎🏽‍♂️"
      },
      {
        unified: "1f9ce-1f3fe-200d-2642-fe0f",
        native: "🧎🏾‍♂️"
      },
      {
        unified: "1f9ce-1f3ff-200d-2642-fe0f",
        native: "🧎🏿‍♂️"
      }
    ],
    version: 12
  },
  woman_kneeling: {
    id: "woman_kneeling",
    name: "Woman Kneeling",
    keywords: [
      "respectful",
      "pray"
    ],
    skins: [
      {
        unified: "1f9ce-200d-2640-fe0f",
        native: "🧎‍♀️"
      },
      {
        unified: "1f9ce-1f3fb-200d-2640-fe0f",
        native: "🧎🏻‍♀️"
      },
      {
        unified: "1f9ce-1f3fc-200d-2640-fe0f",
        native: "🧎🏼‍♀️"
      },
      {
        unified: "1f9ce-1f3fd-200d-2640-fe0f",
        native: "🧎🏽‍♀️"
      },
      {
        unified: "1f9ce-1f3fe-200d-2640-fe0f",
        native: "🧎🏾‍♀️"
      },
      {
        unified: "1f9ce-1f3ff-200d-2640-fe0f",
        native: "🧎🏿‍♀️"
      }
    ],
    version: 12
  },
  person_with_probing_cane: {
    id: "person_with_probing_cane",
    name: "Person with White Cane",
    keywords: [
      "probing",
      "blind"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f9af",
        native: "🧑‍🦯"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f9af",
        native: "🧑🏻‍🦯"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f9af",
        native: "🧑🏼‍🦯"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f9af",
        native: "🧑🏽‍🦯"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f9af",
        native: "🧑🏾‍🦯"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f9af",
        native: "🧑🏿‍🦯"
      }
    ],
    version: 12.1
  },
  man_with_probing_cane: {
    id: "man_with_probing_cane",
    name: "Man with White Cane",
    keywords: [
      "probing",
      "blind"
    ],
    skins: [
      {
        unified: "1f468-200d-1f9af",
        native: "👨‍🦯"
      },
      {
        unified: "1f468-1f3fb-200d-1f9af",
        native: "👨🏻‍🦯"
      },
      {
        unified: "1f468-1f3fc-200d-1f9af",
        native: "👨🏼‍🦯"
      },
      {
        unified: "1f468-1f3fd-200d-1f9af",
        native: "👨🏽‍🦯"
      },
      {
        unified: "1f468-1f3fe-200d-1f9af",
        native: "👨🏾‍🦯"
      },
      {
        unified: "1f468-1f3ff-200d-1f9af",
        native: "👨🏿‍🦯"
      }
    ],
    version: 12
  },
  woman_with_probing_cane: {
    id: "woman_with_probing_cane",
    name: "Woman with White Cane",
    keywords: [
      "probing",
      "blind"
    ],
    skins: [
      {
        unified: "1f469-200d-1f9af",
        native: "👩‍🦯"
      },
      {
        unified: "1f469-1f3fb-200d-1f9af",
        native: "👩🏻‍🦯"
      },
      {
        unified: "1f469-1f3fc-200d-1f9af",
        native: "👩🏼‍🦯"
      },
      {
        unified: "1f469-1f3fd-200d-1f9af",
        native: "👩🏽‍🦯"
      },
      {
        unified: "1f469-1f3fe-200d-1f9af",
        native: "👩🏾‍🦯"
      },
      {
        unified: "1f469-1f3ff-200d-1f9af",
        native: "👩🏿‍🦯"
      }
    ],
    version: 12
  },
  person_in_motorized_wheelchair: {
    id: "person_in_motorized_wheelchair",
    name: "Person in Motorized Wheelchair",
    keywords: [
      "disability",
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f9bc",
        native: "🧑‍🦼"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f9bc",
        native: "🧑🏻‍🦼"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f9bc",
        native: "🧑🏼‍🦼"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f9bc",
        native: "🧑🏽‍🦼"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f9bc",
        native: "🧑🏾‍🦼"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f9bc",
        native: "🧑🏿‍🦼"
      }
    ],
    version: 12.1
  },
  man_in_motorized_wheelchair: {
    id: "man_in_motorized_wheelchair",
    name: "Man in Motorized Wheelchair",
    keywords: [
      "disability",
      "accessibility"
    ],
    skins: [
      {
        unified: "1f468-200d-1f9bc",
        native: "👨‍🦼"
      },
      {
        unified: "1f468-1f3fb-200d-1f9bc",
        native: "👨🏻‍🦼"
      },
      {
        unified: "1f468-1f3fc-200d-1f9bc",
        native: "👨🏼‍🦼"
      },
      {
        unified: "1f468-1f3fd-200d-1f9bc",
        native: "👨🏽‍🦼"
      },
      {
        unified: "1f468-1f3fe-200d-1f9bc",
        native: "👨🏾‍🦼"
      },
      {
        unified: "1f468-1f3ff-200d-1f9bc",
        native: "👨🏿‍🦼"
      }
    ],
    version: 12
  },
  woman_in_motorized_wheelchair: {
    id: "woman_in_motorized_wheelchair",
    name: "Woman in Motorized Wheelchair",
    keywords: [
      "disability",
      "accessibility"
    ],
    skins: [
      {
        unified: "1f469-200d-1f9bc",
        native: "👩‍🦼"
      },
      {
        unified: "1f469-1f3fb-200d-1f9bc",
        native: "👩🏻‍🦼"
      },
      {
        unified: "1f469-1f3fc-200d-1f9bc",
        native: "👩🏼‍🦼"
      },
      {
        unified: "1f469-1f3fd-200d-1f9bc",
        native: "👩🏽‍🦼"
      },
      {
        unified: "1f469-1f3fe-200d-1f9bc",
        native: "👩🏾‍🦼"
      },
      {
        unified: "1f469-1f3ff-200d-1f9bc",
        native: "👩🏿‍🦼"
      }
    ],
    version: 12
  },
  person_in_manual_wheelchair: {
    id: "person_in_manual_wheelchair",
    name: "Person in Manual Wheelchair",
    keywords: [
      "disability",
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f9bd",
        native: "🧑‍🦽"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f9bd",
        native: "🧑🏻‍🦽"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f9bd",
        native: "🧑🏼‍🦽"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f9bd",
        native: "🧑🏽‍🦽"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f9bd",
        native: "🧑🏾‍🦽"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f9bd",
        native: "🧑🏿‍🦽"
      }
    ],
    version: 12.1
  },
  man_in_manual_wheelchair: {
    id: "man_in_manual_wheelchair",
    name: "Man in Manual Wheelchair",
    keywords: [
      "disability",
      "accessibility"
    ],
    skins: [
      {
        unified: "1f468-200d-1f9bd",
        native: "👨‍🦽"
      },
      {
        unified: "1f468-1f3fb-200d-1f9bd",
        native: "👨🏻‍🦽"
      },
      {
        unified: "1f468-1f3fc-200d-1f9bd",
        native: "👨🏼‍🦽"
      },
      {
        unified: "1f468-1f3fd-200d-1f9bd",
        native: "👨🏽‍🦽"
      },
      {
        unified: "1f468-1f3fe-200d-1f9bd",
        native: "👨🏾‍🦽"
      },
      {
        unified: "1f468-1f3ff-200d-1f9bd",
        native: "👨🏿‍🦽"
      }
    ],
    version: 12
  },
  woman_in_manual_wheelchair: {
    id: "woman_in_manual_wheelchair",
    name: "Woman in Manual Wheelchair",
    keywords: [
      "disability",
      "accessibility"
    ],
    skins: [
      {
        unified: "1f469-200d-1f9bd",
        native: "👩‍🦽"
      },
      {
        unified: "1f469-1f3fb-200d-1f9bd",
        native: "👩🏻‍🦽"
      },
      {
        unified: "1f469-1f3fc-200d-1f9bd",
        native: "👩🏼‍🦽"
      },
      {
        unified: "1f469-1f3fd-200d-1f9bd",
        native: "👩🏽‍🦽"
      },
      {
        unified: "1f469-1f3fe-200d-1f9bd",
        native: "👩🏾‍🦽"
      },
      {
        unified: "1f469-1f3ff-200d-1f9bd",
        native: "👩🏿‍🦽"
      }
    ],
    version: 12
  },
  runner: {
    id: "runner",
    name: "Runner",
    keywords: [
      "running",
      "person",
      "move"
    ],
    skins: [
      {
        unified: "1f3c3",
        native: "🏃"
      },
      {
        unified: "1f3c3-1f3fb",
        native: "🏃🏻"
      },
      {
        unified: "1f3c3-1f3fc",
        native: "🏃🏼"
      },
      {
        unified: "1f3c3-1f3fd",
        native: "🏃🏽"
      },
      {
        unified: "1f3c3-1f3fe",
        native: "🏃🏾"
      },
      {
        unified: "1f3c3-1f3ff",
        native: "🏃🏿"
      }
    ],
    version: 1
  },
  "man-running": {
    id: "man-running",
    name: "Man Running",
    keywords: [
      "walking",
      "exercise",
      "race"
    ],
    skins: [
      {
        unified: "1f3c3-200d-2642-fe0f",
        native: "🏃‍♂️"
      },
      {
        unified: "1f3c3-1f3fb-200d-2642-fe0f",
        native: "🏃🏻‍♂️"
      },
      {
        unified: "1f3c3-1f3fc-200d-2642-fe0f",
        native: "🏃🏼‍♂️"
      },
      {
        unified: "1f3c3-1f3fd-200d-2642-fe0f",
        native: "🏃🏽‍♂️"
      },
      {
        unified: "1f3c3-1f3fe-200d-2642-fe0f",
        native: "🏃🏾‍♂️"
      },
      {
        unified: "1f3c3-1f3ff-200d-2642-fe0f",
        native: "🏃🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-running": {
    id: "woman-running",
    name: "Woman Running",
    keywords: [
      "walking",
      "exercise",
      "race",
      "female"
    ],
    skins: [
      {
        unified: "1f3c3-200d-2640-fe0f",
        native: "🏃‍♀️"
      },
      {
        unified: "1f3c3-1f3fb-200d-2640-fe0f",
        native: "🏃🏻‍♀️"
      },
      {
        unified: "1f3c3-1f3fc-200d-2640-fe0f",
        native: "🏃🏼‍♀️"
      },
      {
        unified: "1f3c3-1f3fd-200d-2640-fe0f",
        native: "🏃🏽‍♀️"
      },
      {
        unified: "1f3c3-1f3fe-200d-2640-fe0f",
        native: "🏃🏾‍♀️"
      },
      {
        unified: "1f3c3-1f3ff-200d-2640-fe0f",
        native: "🏃🏿‍♀️"
      }
    ],
    version: 4
  },
  dancer: {
    id: "dancer",
    name: "Dancer",
    keywords: [
      "woman",
      "dancing",
      "female",
      "girl",
      "fun"
    ],
    skins: [
      {
        unified: "1f483",
        native: "💃"
      },
      {
        unified: "1f483-1f3fb",
        native: "💃🏻"
      },
      {
        unified: "1f483-1f3fc",
        native: "💃🏼"
      },
      {
        unified: "1f483-1f3fd",
        native: "💃🏽"
      },
      {
        unified: "1f483-1f3fe",
        native: "💃🏾"
      },
      {
        unified: "1f483-1f3ff",
        native: "💃🏿"
      }
    ],
    version: 1
  },
  man_dancing: {
    id: "man_dancing",
    name: "Man Dancing",
    keywords: [
      "male",
      "boy",
      "fun",
      "dancer"
    ],
    skins: [
      {
        unified: "1f57a",
        native: "🕺"
      },
      {
        unified: "1f57a-1f3fb",
        native: "🕺🏻"
      },
      {
        unified: "1f57a-1f3fc",
        native: "🕺🏼"
      },
      {
        unified: "1f57a-1f3fd",
        native: "🕺🏽"
      },
      {
        unified: "1f57a-1f3fe",
        native: "🕺🏾"
      },
      {
        unified: "1f57a-1f3ff",
        native: "🕺🏿"
      }
    ],
    version: 3
  },
  man_in_business_suit_levitating: {
    id: "man_in_business_suit_levitating",
    name: "Person in Suit Levitating",
    keywords: [
      "man",
      "business",
      "levitate",
      "hover",
      "jump"
    ],
    skins: [
      {
        unified: "1f574-fe0f",
        native: "🕴️"
      },
      {
        unified: "1f574-1f3fb",
        native: "🕴🏻"
      },
      {
        unified: "1f574-1f3fc",
        native: "🕴🏼"
      },
      {
        unified: "1f574-1f3fd",
        native: "🕴🏽"
      },
      {
        unified: "1f574-1f3fe",
        native: "🕴🏾"
      },
      {
        unified: "1f574-1f3ff",
        native: "🕴🏿"
      }
    ],
    version: 1
  },
  dancers: {
    id: "dancers",
    name: "Woman with Bunny Ears",
    keywords: [
      "dancers",
      "people",
      "perform",
      "costume"
    ],
    skins: [
      {
        unified: "1f46f",
        native: "👯"
      }
    ],
    version: 1
  },
  "men-with-bunny-ears-partying": {
    id: "men-with-bunny-ears-partying",
    name: "Men with Bunny Ears",
    keywords: [
      "with-bunny-ears-partying",
      "man",
      "male",
      "boys"
    ],
    skins: [
      {
        unified: "1f46f-200d-2642-fe0f",
        native: "👯‍♂️"
      }
    ],
    version: 4
  },
  "women-with-bunny-ears-partying": {
    id: "women-with-bunny-ears-partying",
    name: "Women with Bunny Ears",
    keywords: [
      "with-bunny-ears-partying",
      "woman",
      "female",
      "girls"
    ],
    skins: [
      {
        unified: "1f46f-200d-2640-fe0f",
        native: "👯‍♀️"
      }
    ],
    version: 4
  },
  person_in_steamy_room: {
    id: "person_in_steamy_room",
    name: "Person in Steamy Room",
    keywords: [
      "relax",
      "spa"
    ],
    skins: [
      {
        unified: "1f9d6",
        native: "🧖"
      },
      {
        unified: "1f9d6-1f3fb",
        native: "🧖🏻"
      },
      {
        unified: "1f9d6-1f3fc",
        native: "🧖🏼"
      },
      {
        unified: "1f9d6-1f3fd",
        native: "🧖🏽"
      },
      {
        unified: "1f9d6-1f3fe",
        native: "🧖🏾"
      },
      {
        unified: "1f9d6-1f3ff",
        native: "🧖🏿"
      }
    ],
    version: 5
  },
  man_in_steamy_room: {
    id: "man_in_steamy_room",
    name: "Man in Steamy Room",
    keywords: [
      "male",
      "spa",
      "steamroom",
      "sauna"
    ],
    skins: [
      {
        unified: "1f9d6-200d-2642-fe0f",
        native: "🧖‍♂️"
      },
      {
        unified: "1f9d6-1f3fb-200d-2642-fe0f",
        native: "🧖🏻‍♂️"
      },
      {
        unified: "1f9d6-1f3fc-200d-2642-fe0f",
        native: "🧖🏼‍♂️"
      },
      {
        unified: "1f9d6-1f3fd-200d-2642-fe0f",
        native: "🧖🏽‍♂️"
      },
      {
        unified: "1f9d6-1f3fe-200d-2642-fe0f",
        native: "🧖🏾‍♂️"
      },
      {
        unified: "1f9d6-1f3ff-200d-2642-fe0f",
        native: "🧖🏿‍♂️"
      }
    ],
    version: 5
  },
  woman_in_steamy_room: {
    id: "woman_in_steamy_room",
    name: "Woman in Steamy Room",
    keywords: [
      "female",
      "spa",
      "steamroom",
      "sauna"
    ],
    skins: [
      {
        unified: "1f9d6-200d-2640-fe0f",
        native: "🧖‍♀️"
      },
      {
        unified: "1f9d6-1f3fb-200d-2640-fe0f",
        native: "🧖🏻‍♀️"
      },
      {
        unified: "1f9d6-1f3fc-200d-2640-fe0f",
        native: "🧖🏼‍♀️"
      },
      {
        unified: "1f9d6-1f3fd-200d-2640-fe0f",
        native: "🧖🏽‍♀️"
      },
      {
        unified: "1f9d6-1f3fe-200d-2640-fe0f",
        native: "🧖🏾‍♀️"
      },
      {
        unified: "1f9d6-1f3ff-200d-2640-fe0f",
        native: "🧖🏿‍♀️"
      }
    ],
    version: 5
  },
  person_climbing: {
    id: "person_climbing",
    name: "Person Climbing",
    keywords: [
      "sport"
    ],
    skins: [
      {
        unified: "1f9d7",
        native: "🧗"
      },
      {
        unified: "1f9d7-1f3fb",
        native: "🧗🏻"
      },
      {
        unified: "1f9d7-1f3fc",
        native: "🧗🏼"
      },
      {
        unified: "1f9d7-1f3fd",
        native: "🧗🏽"
      },
      {
        unified: "1f9d7-1f3fe",
        native: "🧗🏾"
      },
      {
        unified: "1f9d7-1f3ff",
        native: "🧗🏿"
      }
    ],
    version: 5
  },
  man_climbing: {
    id: "man_climbing",
    name: "Man Climbing",
    keywords: [
      "sports",
      "hobby",
      "male",
      "rock"
    ],
    skins: [
      {
        unified: "1f9d7-200d-2642-fe0f",
        native: "🧗‍♂️"
      },
      {
        unified: "1f9d7-1f3fb-200d-2642-fe0f",
        native: "🧗🏻‍♂️"
      },
      {
        unified: "1f9d7-1f3fc-200d-2642-fe0f",
        native: "🧗🏼‍♂️"
      },
      {
        unified: "1f9d7-1f3fd-200d-2642-fe0f",
        native: "🧗🏽‍♂️"
      },
      {
        unified: "1f9d7-1f3fe-200d-2642-fe0f",
        native: "🧗🏾‍♂️"
      },
      {
        unified: "1f9d7-1f3ff-200d-2642-fe0f",
        native: "🧗🏿‍♂️"
      }
    ],
    version: 5
  },
  woman_climbing: {
    id: "woman_climbing",
    name: "Woman Climbing",
    keywords: [
      "sports",
      "hobby",
      "female",
      "rock"
    ],
    skins: [
      {
        unified: "1f9d7-200d-2640-fe0f",
        native: "🧗‍♀️"
      },
      {
        unified: "1f9d7-1f3fb-200d-2640-fe0f",
        native: "🧗🏻‍♀️"
      },
      {
        unified: "1f9d7-1f3fc-200d-2640-fe0f",
        native: "🧗🏼‍♀️"
      },
      {
        unified: "1f9d7-1f3fd-200d-2640-fe0f",
        native: "🧗🏽‍♀️"
      },
      {
        unified: "1f9d7-1f3fe-200d-2640-fe0f",
        native: "🧗🏾‍♀️"
      },
      {
        unified: "1f9d7-1f3ff-200d-2640-fe0f",
        native: "🧗🏿‍♀️"
      }
    ],
    version: 5
  },
  fencer: {
    id: "fencer",
    name: "Fencer",
    keywords: [
      "person",
      "fencing",
      "sports",
      "sword"
    ],
    skins: [
      {
        unified: "1f93a",
        native: "🤺"
      }
    ],
    version: 3
  },
  horse_racing: {
    id: "horse_racing",
    name: "Horse Racing",
    keywords: [
      "animal",
      "betting",
      "competition",
      "gambling",
      "luck"
    ],
    skins: [
      {
        unified: "1f3c7",
        native: "🏇"
      },
      {
        unified: "1f3c7-1f3fb",
        native: "🏇🏻"
      },
      {
        unified: "1f3c7-1f3fc",
        native: "🏇🏼"
      },
      {
        unified: "1f3c7-1f3fd",
        native: "🏇🏽"
      },
      {
        unified: "1f3c7-1f3fe",
        native: "🏇🏾"
      },
      {
        unified: "1f3c7-1f3ff",
        native: "🏇🏿"
      }
    ],
    version: 1
  },
  skier: {
    id: "skier",
    name: "Skier",
    keywords: [
      "sports",
      "winter",
      "snow"
    ],
    skins: [
      {
        unified: "26f7-fe0f",
        native: "⛷️"
      }
    ],
    version: 1
  },
  snowboarder: {
    id: "snowboarder",
    name: "Snowboarder",
    keywords: [
      "sports",
      "winter"
    ],
    skins: [
      {
        unified: "1f3c2",
        native: "🏂"
      },
      {
        unified: "1f3c2-1f3fb",
        native: "🏂🏻"
      },
      {
        unified: "1f3c2-1f3fc",
        native: "🏂🏼"
      },
      {
        unified: "1f3c2-1f3fd",
        native: "🏂🏽"
      },
      {
        unified: "1f3c2-1f3fe",
        native: "🏂🏾"
      },
      {
        unified: "1f3c2-1f3ff",
        native: "🏂🏿"
      }
    ],
    version: 1
  },
  golfer: {
    id: "golfer",
    name: "Person Golfing",
    keywords: [
      "golfer",
      "sports",
      "business"
    ],
    skins: [
      {
        unified: "1f3cc-fe0f",
        native: "🏌️"
      },
      {
        unified: "1f3cc-1f3fb",
        native: "🏌🏻"
      },
      {
        unified: "1f3cc-1f3fc",
        native: "🏌🏼"
      },
      {
        unified: "1f3cc-1f3fd",
        native: "🏌🏽"
      },
      {
        unified: "1f3cc-1f3fe",
        native: "🏌🏾"
      },
      {
        unified: "1f3cc-1f3ff",
        native: "🏌🏿"
      }
    ],
    version: 1
  },
  "man-golfing": {
    id: "man-golfing",
    name: "Man Golfing",
    keywords: [
      "sport"
    ],
    skins: [
      {
        unified: "1f3cc-fe0f-200d-2642-fe0f",
        native: "🏌️‍♂️"
      },
      {
        unified: "1f3cc-1f3fb-200d-2642-fe0f",
        native: "🏌🏻‍♂️"
      },
      {
        unified: "1f3cc-1f3fc-200d-2642-fe0f",
        native: "🏌🏼‍♂️"
      },
      {
        unified: "1f3cc-1f3fd-200d-2642-fe0f",
        native: "🏌🏽‍♂️"
      },
      {
        unified: "1f3cc-1f3fe-200d-2642-fe0f",
        native: "🏌🏾‍♂️"
      },
      {
        unified: "1f3cc-1f3ff-200d-2642-fe0f",
        native: "🏌🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-golfing": {
    id: "woman-golfing",
    name: "Woman Golfing",
    keywords: [
      "sports",
      "business",
      "female"
    ],
    skins: [
      {
        unified: "1f3cc-fe0f-200d-2640-fe0f",
        native: "🏌️‍♀️"
      },
      {
        unified: "1f3cc-1f3fb-200d-2640-fe0f",
        native: "🏌🏻‍♀️"
      },
      {
        unified: "1f3cc-1f3fc-200d-2640-fe0f",
        native: "🏌🏼‍♀️"
      },
      {
        unified: "1f3cc-1f3fd-200d-2640-fe0f",
        native: "🏌🏽‍♀️"
      },
      {
        unified: "1f3cc-1f3fe-200d-2640-fe0f",
        native: "🏌🏾‍♀️"
      },
      {
        unified: "1f3cc-1f3ff-200d-2640-fe0f",
        native: "🏌🏿‍♀️"
      }
    ],
    version: 4
  },
  surfer: {
    id: "surfer",
    name: "Surfer",
    keywords: [
      "person",
      "surfing",
      "sport",
      "sea"
    ],
    skins: [
      {
        unified: "1f3c4",
        native: "🏄"
      },
      {
        unified: "1f3c4-1f3fb",
        native: "🏄🏻"
      },
      {
        unified: "1f3c4-1f3fc",
        native: "🏄🏼"
      },
      {
        unified: "1f3c4-1f3fd",
        native: "🏄🏽"
      },
      {
        unified: "1f3c4-1f3fe",
        native: "🏄🏾"
      },
      {
        unified: "1f3c4-1f3ff",
        native: "🏄🏿"
      }
    ],
    version: 1
  },
  "man-surfing": {
    id: "man-surfing",
    name: "Man Surfing",
    keywords: [
      "sports",
      "ocean",
      "sea",
      "summer",
      "beach"
    ],
    skins: [
      {
        unified: "1f3c4-200d-2642-fe0f",
        native: "🏄‍♂️"
      },
      {
        unified: "1f3c4-1f3fb-200d-2642-fe0f",
        native: "🏄🏻‍♂️"
      },
      {
        unified: "1f3c4-1f3fc-200d-2642-fe0f",
        native: "🏄🏼‍♂️"
      },
      {
        unified: "1f3c4-1f3fd-200d-2642-fe0f",
        native: "🏄🏽‍♂️"
      },
      {
        unified: "1f3c4-1f3fe-200d-2642-fe0f",
        native: "🏄🏾‍♂️"
      },
      {
        unified: "1f3c4-1f3ff-200d-2642-fe0f",
        native: "🏄🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-surfing": {
    id: "woman-surfing",
    name: "Woman Surfing",
    keywords: [
      "sports",
      "ocean",
      "sea",
      "summer",
      "beach",
      "female"
    ],
    skins: [
      {
        unified: "1f3c4-200d-2640-fe0f",
        native: "🏄‍♀️"
      },
      {
        unified: "1f3c4-1f3fb-200d-2640-fe0f",
        native: "🏄🏻‍♀️"
      },
      {
        unified: "1f3c4-1f3fc-200d-2640-fe0f",
        native: "🏄🏼‍♀️"
      },
      {
        unified: "1f3c4-1f3fd-200d-2640-fe0f",
        native: "🏄🏽‍♀️"
      },
      {
        unified: "1f3c4-1f3fe-200d-2640-fe0f",
        native: "🏄🏾‍♀️"
      },
      {
        unified: "1f3c4-1f3ff-200d-2640-fe0f",
        native: "🏄🏿‍♀️"
      }
    ],
    version: 4
  },
  rowboat: {
    id: "rowboat",
    name: "Rowboat",
    keywords: [
      "person",
      "rowing",
      "boat",
      "sport",
      "move"
    ],
    skins: [
      {
        unified: "1f6a3",
        native: "🚣"
      },
      {
        unified: "1f6a3-1f3fb",
        native: "🚣🏻"
      },
      {
        unified: "1f6a3-1f3fc",
        native: "🚣🏼"
      },
      {
        unified: "1f6a3-1f3fd",
        native: "🚣🏽"
      },
      {
        unified: "1f6a3-1f3fe",
        native: "🚣🏾"
      },
      {
        unified: "1f6a3-1f3ff",
        native: "🚣🏿"
      }
    ],
    version: 1
  },
  "man-rowing-boat": {
    id: "man-rowing-boat",
    name: "Man Rowing Boat",
    keywords: [
      "rowing-boat",
      "sports",
      "hobby",
      "water",
      "ship"
    ],
    skins: [
      {
        unified: "1f6a3-200d-2642-fe0f",
        native: "🚣‍♂️"
      },
      {
        unified: "1f6a3-1f3fb-200d-2642-fe0f",
        native: "🚣🏻‍♂️"
      },
      {
        unified: "1f6a3-1f3fc-200d-2642-fe0f",
        native: "🚣🏼‍♂️"
      },
      {
        unified: "1f6a3-1f3fd-200d-2642-fe0f",
        native: "🚣🏽‍♂️"
      },
      {
        unified: "1f6a3-1f3fe-200d-2642-fe0f",
        native: "🚣🏾‍♂️"
      },
      {
        unified: "1f6a3-1f3ff-200d-2642-fe0f",
        native: "🚣🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-rowing-boat": {
    id: "woman-rowing-boat",
    name: "Woman Rowing Boat",
    keywords: [
      "rowing-boat",
      "sports",
      "hobby",
      "water",
      "ship",
      "female"
    ],
    skins: [
      {
        unified: "1f6a3-200d-2640-fe0f",
        native: "🚣‍♀️"
      },
      {
        unified: "1f6a3-1f3fb-200d-2640-fe0f",
        native: "🚣🏻‍♀️"
      },
      {
        unified: "1f6a3-1f3fc-200d-2640-fe0f",
        native: "🚣🏼‍♀️"
      },
      {
        unified: "1f6a3-1f3fd-200d-2640-fe0f",
        native: "🚣🏽‍♀️"
      },
      {
        unified: "1f6a3-1f3fe-200d-2640-fe0f",
        native: "🚣🏾‍♀️"
      },
      {
        unified: "1f6a3-1f3ff-200d-2640-fe0f",
        native: "🚣🏿‍♀️"
      }
    ],
    version: 4
  },
  swimmer: {
    id: "swimmer",
    name: "Swimmer",
    keywords: [
      "person",
      "swimming",
      "sport",
      "pool"
    ],
    skins: [
      {
        unified: "1f3ca",
        native: "🏊"
      },
      {
        unified: "1f3ca-1f3fb",
        native: "🏊🏻"
      },
      {
        unified: "1f3ca-1f3fc",
        native: "🏊🏼"
      },
      {
        unified: "1f3ca-1f3fd",
        native: "🏊🏽"
      },
      {
        unified: "1f3ca-1f3fe",
        native: "🏊🏾"
      },
      {
        unified: "1f3ca-1f3ff",
        native: "🏊🏿"
      }
    ],
    version: 1
  },
  "man-swimming": {
    id: "man-swimming",
    name: "Man Swimming",
    keywords: [
      "sports",
      "exercise",
      "human",
      "athlete",
      "water",
      "summer"
    ],
    skins: [
      {
        unified: "1f3ca-200d-2642-fe0f",
        native: "🏊‍♂️"
      },
      {
        unified: "1f3ca-1f3fb-200d-2642-fe0f",
        native: "🏊🏻‍♂️"
      },
      {
        unified: "1f3ca-1f3fc-200d-2642-fe0f",
        native: "🏊🏼‍♂️"
      },
      {
        unified: "1f3ca-1f3fd-200d-2642-fe0f",
        native: "🏊🏽‍♂️"
      },
      {
        unified: "1f3ca-1f3fe-200d-2642-fe0f",
        native: "🏊🏾‍♂️"
      },
      {
        unified: "1f3ca-1f3ff-200d-2642-fe0f",
        native: "🏊🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-swimming": {
    id: "woman-swimming",
    name: "Woman Swimming",
    keywords: [
      "sports",
      "exercise",
      "human",
      "athlete",
      "water",
      "summer",
      "female"
    ],
    skins: [
      {
        unified: "1f3ca-200d-2640-fe0f",
        native: "🏊‍♀️"
      },
      {
        unified: "1f3ca-1f3fb-200d-2640-fe0f",
        native: "🏊🏻‍♀️"
      },
      {
        unified: "1f3ca-1f3fc-200d-2640-fe0f",
        native: "🏊🏼‍♀️"
      },
      {
        unified: "1f3ca-1f3fd-200d-2640-fe0f",
        native: "🏊🏽‍♀️"
      },
      {
        unified: "1f3ca-1f3fe-200d-2640-fe0f",
        native: "🏊🏾‍♀️"
      },
      {
        unified: "1f3ca-1f3ff-200d-2640-fe0f",
        native: "🏊🏿‍♀️"
      }
    ],
    version: 4
  },
  person_with_ball: {
    id: "person_with_ball",
    name: "Person Bouncing Ball",
    keywords: [
      "with",
      "sports",
      "human"
    ],
    skins: [
      {
        unified: "26f9-fe0f",
        native: "⛹️"
      },
      {
        unified: "26f9-1f3fb",
        native: "⛹🏻"
      },
      {
        unified: "26f9-1f3fc",
        native: "⛹🏼"
      },
      {
        unified: "26f9-1f3fd",
        native: "⛹🏽"
      },
      {
        unified: "26f9-1f3fe",
        native: "⛹🏾"
      },
      {
        unified: "26f9-1f3ff",
        native: "⛹🏿"
      }
    ],
    version: 1
  },
  "man-bouncing-ball": {
    id: "man-bouncing-ball",
    name: "Man Bouncing Ball",
    keywords: [
      "bouncing-ball",
      "sport"
    ],
    skins: [
      {
        unified: "26f9-fe0f-200d-2642-fe0f",
        native: "⛹️‍♂️"
      },
      {
        unified: "26f9-1f3fb-200d-2642-fe0f",
        native: "⛹🏻‍♂️"
      },
      {
        unified: "26f9-1f3fc-200d-2642-fe0f",
        native: "⛹🏼‍♂️"
      },
      {
        unified: "26f9-1f3fd-200d-2642-fe0f",
        native: "⛹🏽‍♂️"
      },
      {
        unified: "26f9-1f3fe-200d-2642-fe0f",
        native: "⛹🏾‍♂️"
      },
      {
        unified: "26f9-1f3ff-200d-2642-fe0f",
        native: "⛹🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-bouncing-ball": {
    id: "woman-bouncing-ball",
    name: "Woman Bouncing Ball",
    keywords: [
      "bouncing-ball",
      "sports",
      "human",
      "female"
    ],
    skins: [
      {
        unified: "26f9-fe0f-200d-2640-fe0f",
        native: "⛹️‍♀️"
      },
      {
        unified: "26f9-1f3fb-200d-2640-fe0f",
        native: "⛹🏻‍♀️"
      },
      {
        unified: "26f9-1f3fc-200d-2640-fe0f",
        native: "⛹🏼‍♀️"
      },
      {
        unified: "26f9-1f3fd-200d-2640-fe0f",
        native: "⛹🏽‍♀️"
      },
      {
        unified: "26f9-1f3fe-200d-2640-fe0f",
        native: "⛹🏾‍♀️"
      },
      {
        unified: "26f9-1f3ff-200d-2640-fe0f",
        native: "⛹🏿‍♀️"
      }
    ],
    version: 4
  },
  weight_lifter: {
    id: "weight_lifter",
    name: "Person Lifting Weights",
    keywords: [
      "weight",
      "lifter",
      "sports",
      "training",
      "exercise"
    ],
    skins: [
      {
        unified: "1f3cb-fe0f",
        native: "🏋️"
      },
      {
        unified: "1f3cb-1f3fb",
        native: "🏋🏻"
      },
      {
        unified: "1f3cb-1f3fc",
        native: "🏋🏼"
      },
      {
        unified: "1f3cb-1f3fd",
        native: "🏋🏽"
      },
      {
        unified: "1f3cb-1f3fe",
        native: "🏋🏾"
      },
      {
        unified: "1f3cb-1f3ff",
        native: "🏋🏿"
      }
    ],
    version: 1
  },
  "man-lifting-weights": {
    id: "man-lifting-weights",
    name: "Man Lifting Weights",
    keywords: [
      "lifting-weights",
      "sport"
    ],
    skins: [
      {
        unified: "1f3cb-fe0f-200d-2642-fe0f",
        native: "🏋️‍♂️"
      },
      {
        unified: "1f3cb-1f3fb-200d-2642-fe0f",
        native: "🏋🏻‍♂️"
      },
      {
        unified: "1f3cb-1f3fc-200d-2642-fe0f",
        native: "🏋🏼‍♂️"
      },
      {
        unified: "1f3cb-1f3fd-200d-2642-fe0f",
        native: "🏋🏽‍♂️"
      },
      {
        unified: "1f3cb-1f3fe-200d-2642-fe0f",
        native: "🏋🏾‍♂️"
      },
      {
        unified: "1f3cb-1f3ff-200d-2642-fe0f",
        native: "🏋🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-lifting-weights": {
    id: "woman-lifting-weights",
    name: "Woman Lifting Weights",
    keywords: [
      "lifting-weights",
      "sports",
      "training",
      "exercise",
      "female"
    ],
    skins: [
      {
        unified: "1f3cb-fe0f-200d-2640-fe0f",
        native: "🏋️‍♀️"
      },
      {
        unified: "1f3cb-1f3fb-200d-2640-fe0f",
        native: "🏋🏻‍♀️"
      },
      {
        unified: "1f3cb-1f3fc-200d-2640-fe0f",
        native: "🏋🏼‍♀️"
      },
      {
        unified: "1f3cb-1f3fd-200d-2640-fe0f",
        native: "🏋🏽‍♀️"
      },
      {
        unified: "1f3cb-1f3fe-200d-2640-fe0f",
        native: "🏋🏾‍♀️"
      },
      {
        unified: "1f3cb-1f3ff-200d-2640-fe0f",
        native: "🏋🏿‍♀️"
      }
    ],
    version: 4
  },
  bicyclist: {
    id: "bicyclist",
    name: "Bicyclist",
    keywords: [
      "person",
      "biking",
      "sport",
      "move"
    ],
    skins: [
      {
        unified: "1f6b4",
        native: "🚴"
      },
      {
        unified: "1f6b4-1f3fb",
        native: "🚴🏻"
      },
      {
        unified: "1f6b4-1f3fc",
        native: "🚴🏼"
      },
      {
        unified: "1f6b4-1f3fd",
        native: "🚴🏽"
      },
      {
        unified: "1f6b4-1f3fe",
        native: "🚴🏾"
      },
      {
        unified: "1f6b4-1f3ff",
        native: "🚴🏿"
      }
    ],
    version: 1
  },
  "man-biking": {
    id: "man-biking",
    name: "Man Biking",
    keywords: [
      "sports",
      "bike",
      "exercise",
      "hipster"
    ],
    skins: [
      {
        unified: "1f6b4-200d-2642-fe0f",
        native: "🚴‍♂️"
      },
      {
        unified: "1f6b4-1f3fb-200d-2642-fe0f",
        native: "🚴🏻‍♂️"
      },
      {
        unified: "1f6b4-1f3fc-200d-2642-fe0f",
        native: "🚴🏼‍♂️"
      },
      {
        unified: "1f6b4-1f3fd-200d-2642-fe0f",
        native: "🚴🏽‍♂️"
      },
      {
        unified: "1f6b4-1f3fe-200d-2642-fe0f",
        native: "🚴🏾‍♂️"
      },
      {
        unified: "1f6b4-1f3ff-200d-2642-fe0f",
        native: "🚴🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-biking": {
    id: "woman-biking",
    name: "Woman Biking",
    keywords: [
      "sports",
      "bike",
      "exercise",
      "hipster",
      "female"
    ],
    skins: [
      {
        unified: "1f6b4-200d-2640-fe0f",
        native: "🚴‍♀️"
      },
      {
        unified: "1f6b4-1f3fb-200d-2640-fe0f",
        native: "🚴🏻‍♀️"
      },
      {
        unified: "1f6b4-1f3fc-200d-2640-fe0f",
        native: "🚴🏼‍♀️"
      },
      {
        unified: "1f6b4-1f3fd-200d-2640-fe0f",
        native: "🚴🏽‍♀️"
      },
      {
        unified: "1f6b4-1f3fe-200d-2640-fe0f",
        native: "🚴🏾‍♀️"
      },
      {
        unified: "1f6b4-1f3ff-200d-2640-fe0f",
        native: "🚴🏿‍♀️"
      }
    ],
    version: 4
  },
  mountain_bicyclist: {
    id: "mountain_bicyclist",
    name: "Mountain Bicyclist",
    keywords: [
      "person",
      "biking",
      "sport",
      "move"
    ],
    skins: [
      {
        unified: "1f6b5",
        native: "🚵"
      },
      {
        unified: "1f6b5-1f3fb",
        native: "🚵🏻"
      },
      {
        unified: "1f6b5-1f3fc",
        native: "🚵🏼"
      },
      {
        unified: "1f6b5-1f3fd",
        native: "🚵🏽"
      },
      {
        unified: "1f6b5-1f3fe",
        native: "🚵🏾"
      },
      {
        unified: "1f6b5-1f3ff",
        native: "🚵🏿"
      }
    ],
    version: 1
  },
  "man-mountain-biking": {
    id: "man-mountain-biking",
    name: "Man Mountain Biking",
    keywords: [
      "mountain-biking",
      "transportation",
      "sports",
      "human",
      "race",
      "bike"
    ],
    skins: [
      {
        unified: "1f6b5-200d-2642-fe0f",
        native: "🚵‍♂️"
      },
      {
        unified: "1f6b5-1f3fb-200d-2642-fe0f",
        native: "🚵🏻‍♂️"
      },
      {
        unified: "1f6b5-1f3fc-200d-2642-fe0f",
        native: "🚵🏼‍♂️"
      },
      {
        unified: "1f6b5-1f3fd-200d-2642-fe0f",
        native: "🚵🏽‍♂️"
      },
      {
        unified: "1f6b5-1f3fe-200d-2642-fe0f",
        native: "🚵🏾‍♂️"
      },
      {
        unified: "1f6b5-1f3ff-200d-2642-fe0f",
        native: "🚵🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-mountain-biking": {
    id: "woman-mountain-biking",
    name: "Woman Mountain Biking",
    keywords: [
      "mountain-biking",
      "transportation",
      "sports",
      "human",
      "race",
      "bike",
      "female"
    ],
    skins: [
      {
        unified: "1f6b5-200d-2640-fe0f",
        native: "🚵‍♀️"
      },
      {
        unified: "1f6b5-1f3fb-200d-2640-fe0f",
        native: "🚵🏻‍♀️"
      },
      {
        unified: "1f6b5-1f3fc-200d-2640-fe0f",
        native: "🚵🏼‍♀️"
      },
      {
        unified: "1f6b5-1f3fd-200d-2640-fe0f",
        native: "🚵🏽‍♀️"
      },
      {
        unified: "1f6b5-1f3fe-200d-2640-fe0f",
        native: "🚵🏾‍♀️"
      },
      {
        unified: "1f6b5-1f3ff-200d-2640-fe0f",
        native: "🚵🏿‍♀️"
      }
    ],
    version: 4
  },
  person_doing_cartwheel: {
    id: "person_doing_cartwheel",
    name: "Person Cartwheeling",
    keywords: [
      "doing",
      "cartwheel",
      "sport",
      "gymnastic"
    ],
    skins: [
      {
        unified: "1f938",
        native: "🤸"
      },
      {
        unified: "1f938-1f3fb",
        native: "🤸🏻"
      },
      {
        unified: "1f938-1f3fc",
        native: "🤸🏼"
      },
      {
        unified: "1f938-1f3fd",
        native: "🤸🏽"
      },
      {
        unified: "1f938-1f3fe",
        native: "🤸🏾"
      },
      {
        unified: "1f938-1f3ff",
        native: "🤸🏿"
      }
    ],
    version: 3
  },
  "man-cartwheeling": {
    id: "man-cartwheeling",
    name: "Man Cartwheeling",
    keywords: [
      "gymnastics"
    ],
    skins: [
      {
        unified: "1f938-200d-2642-fe0f",
        native: "🤸‍♂️"
      },
      {
        unified: "1f938-1f3fb-200d-2642-fe0f",
        native: "🤸🏻‍♂️"
      },
      {
        unified: "1f938-1f3fc-200d-2642-fe0f",
        native: "🤸🏼‍♂️"
      },
      {
        unified: "1f938-1f3fd-200d-2642-fe0f",
        native: "🤸🏽‍♂️"
      },
      {
        unified: "1f938-1f3fe-200d-2642-fe0f",
        native: "🤸🏾‍♂️"
      },
      {
        unified: "1f938-1f3ff-200d-2642-fe0f",
        native: "🤸🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-cartwheeling": {
    id: "woman-cartwheeling",
    name: "Woman Cartwheeling",
    keywords: [
      "gymnastics"
    ],
    skins: [
      {
        unified: "1f938-200d-2640-fe0f",
        native: "🤸‍♀️"
      },
      {
        unified: "1f938-1f3fb-200d-2640-fe0f",
        native: "🤸🏻‍♀️"
      },
      {
        unified: "1f938-1f3fc-200d-2640-fe0f",
        native: "🤸🏼‍♀️"
      },
      {
        unified: "1f938-1f3fd-200d-2640-fe0f",
        native: "🤸🏽‍♀️"
      },
      {
        unified: "1f938-1f3fe-200d-2640-fe0f",
        native: "🤸🏾‍♀️"
      },
      {
        unified: "1f938-1f3ff-200d-2640-fe0f",
        native: "🤸🏿‍♀️"
      }
    ],
    version: 4
  },
  wrestlers: {
    id: "wrestlers",
    name: "Wrestlers",
    keywords: [
      "people",
      "wrestling",
      "sport"
    ],
    skins: [
      {
        unified: "1f93c",
        native: "🤼"
      }
    ],
    version: 3
  },
  "man-wrestling": {
    id: "man-wrestling",
    name: "Men Wrestling",
    keywords: [
      "man",
      "sports",
      "wrestlers"
    ],
    skins: [
      {
        unified: "1f93c-200d-2642-fe0f",
        native: "🤼‍♂️"
      }
    ],
    version: 4
  },
  "woman-wrestling": {
    id: "woman-wrestling",
    name: "Women Wrestling",
    keywords: [
      "woman",
      "sports",
      "wrestlers"
    ],
    skins: [
      {
        unified: "1f93c-200d-2640-fe0f",
        native: "🤼‍♀️"
      }
    ],
    version: 4
  },
  water_polo: {
    id: "water_polo",
    name: "Water Polo",
    keywords: [
      "person",
      "playing",
      "sport"
    ],
    skins: [
      {
        unified: "1f93d",
        native: "🤽"
      },
      {
        unified: "1f93d-1f3fb",
        native: "🤽🏻"
      },
      {
        unified: "1f93d-1f3fc",
        native: "🤽🏼"
      },
      {
        unified: "1f93d-1f3fd",
        native: "🤽🏽"
      },
      {
        unified: "1f93d-1f3fe",
        native: "🤽🏾"
      },
      {
        unified: "1f93d-1f3ff",
        native: "🤽🏿"
      }
    ],
    version: 3
  },
  "man-playing-water-polo": {
    id: "man-playing-water-polo",
    name: "Man Playing Water Polo",
    keywords: [
      "playing-water-polo",
      "sports",
      "pool"
    ],
    skins: [
      {
        unified: "1f93d-200d-2642-fe0f",
        native: "🤽‍♂️"
      },
      {
        unified: "1f93d-1f3fb-200d-2642-fe0f",
        native: "🤽🏻‍♂️"
      },
      {
        unified: "1f93d-1f3fc-200d-2642-fe0f",
        native: "🤽🏼‍♂️"
      },
      {
        unified: "1f93d-1f3fd-200d-2642-fe0f",
        native: "🤽🏽‍♂️"
      },
      {
        unified: "1f93d-1f3fe-200d-2642-fe0f",
        native: "🤽🏾‍♂️"
      },
      {
        unified: "1f93d-1f3ff-200d-2642-fe0f",
        native: "🤽🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-playing-water-polo": {
    id: "woman-playing-water-polo",
    name: "Woman Playing Water Polo",
    keywords: [
      "playing-water-polo",
      "sports",
      "pool"
    ],
    skins: [
      {
        unified: "1f93d-200d-2640-fe0f",
        native: "🤽‍♀️"
      },
      {
        unified: "1f93d-1f3fb-200d-2640-fe0f",
        native: "🤽🏻‍♀️"
      },
      {
        unified: "1f93d-1f3fc-200d-2640-fe0f",
        native: "🤽🏼‍♀️"
      },
      {
        unified: "1f93d-1f3fd-200d-2640-fe0f",
        native: "🤽🏽‍♀️"
      },
      {
        unified: "1f93d-1f3fe-200d-2640-fe0f",
        native: "🤽🏾‍♀️"
      },
      {
        unified: "1f93d-1f3ff-200d-2640-fe0f",
        native: "🤽🏿‍♀️"
      }
    ],
    version: 4
  },
  handball: {
    id: "handball",
    name: "Handball",
    keywords: [
      "person",
      "playing",
      "sport"
    ],
    skins: [
      {
        unified: "1f93e",
        native: "🤾"
      },
      {
        unified: "1f93e-1f3fb",
        native: "🤾🏻"
      },
      {
        unified: "1f93e-1f3fc",
        native: "🤾🏼"
      },
      {
        unified: "1f93e-1f3fd",
        native: "🤾🏽"
      },
      {
        unified: "1f93e-1f3fe",
        native: "🤾🏾"
      },
      {
        unified: "1f93e-1f3ff",
        native: "🤾🏿"
      }
    ],
    version: 3
  },
  "man-playing-handball": {
    id: "man-playing-handball",
    name: "Man Playing Handball",
    keywords: [
      "playing-handball",
      "sports"
    ],
    skins: [
      {
        unified: "1f93e-200d-2642-fe0f",
        native: "🤾‍♂️"
      },
      {
        unified: "1f93e-1f3fb-200d-2642-fe0f",
        native: "🤾🏻‍♂️"
      },
      {
        unified: "1f93e-1f3fc-200d-2642-fe0f",
        native: "🤾🏼‍♂️"
      },
      {
        unified: "1f93e-1f3fd-200d-2642-fe0f",
        native: "🤾🏽‍♂️"
      },
      {
        unified: "1f93e-1f3fe-200d-2642-fe0f",
        native: "🤾🏾‍♂️"
      },
      {
        unified: "1f93e-1f3ff-200d-2642-fe0f",
        native: "🤾🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-playing-handball": {
    id: "woman-playing-handball",
    name: "Woman Playing Handball",
    keywords: [
      "playing-handball",
      "sports"
    ],
    skins: [
      {
        unified: "1f93e-200d-2640-fe0f",
        native: "🤾‍♀️"
      },
      {
        unified: "1f93e-1f3fb-200d-2640-fe0f",
        native: "🤾🏻‍♀️"
      },
      {
        unified: "1f93e-1f3fc-200d-2640-fe0f",
        native: "🤾🏼‍♀️"
      },
      {
        unified: "1f93e-1f3fd-200d-2640-fe0f",
        native: "🤾🏽‍♀️"
      },
      {
        unified: "1f93e-1f3fe-200d-2640-fe0f",
        native: "🤾🏾‍♀️"
      },
      {
        unified: "1f93e-1f3ff-200d-2640-fe0f",
        native: "🤾🏿‍♀️"
      }
    ],
    version: 4
  },
  juggling: {
    id: "juggling",
    name: "Juggling",
    keywords: [
      "person",
      "performance",
      "balance"
    ],
    skins: [
      {
        unified: "1f939",
        native: "🤹"
      },
      {
        unified: "1f939-1f3fb",
        native: "🤹🏻"
      },
      {
        unified: "1f939-1f3fc",
        native: "🤹🏼"
      },
      {
        unified: "1f939-1f3fd",
        native: "🤹🏽"
      },
      {
        unified: "1f939-1f3fe",
        native: "🤹🏾"
      },
      {
        unified: "1f939-1f3ff",
        native: "🤹🏿"
      }
    ],
    version: 3
  },
  "man-juggling": {
    id: "man-juggling",
    name: "Man Juggling",
    keywords: [
      "juggle",
      "balance",
      "skill",
      "multitask"
    ],
    skins: [
      {
        unified: "1f939-200d-2642-fe0f",
        native: "🤹‍♂️"
      },
      {
        unified: "1f939-1f3fb-200d-2642-fe0f",
        native: "🤹🏻‍♂️"
      },
      {
        unified: "1f939-1f3fc-200d-2642-fe0f",
        native: "🤹🏼‍♂️"
      },
      {
        unified: "1f939-1f3fd-200d-2642-fe0f",
        native: "🤹🏽‍♂️"
      },
      {
        unified: "1f939-1f3fe-200d-2642-fe0f",
        native: "🤹🏾‍♂️"
      },
      {
        unified: "1f939-1f3ff-200d-2642-fe0f",
        native: "🤹🏿‍♂️"
      }
    ],
    version: 4
  },
  "woman-juggling": {
    id: "woman-juggling",
    name: "Woman Juggling",
    keywords: [
      "juggle",
      "balance",
      "skill",
      "multitask"
    ],
    skins: [
      {
        unified: "1f939-200d-2640-fe0f",
        native: "🤹‍♀️"
      },
      {
        unified: "1f939-1f3fb-200d-2640-fe0f",
        native: "🤹🏻‍♀️"
      },
      {
        unified: "1f939-1f3fc-200d-2640-fe0f",
        native: "🤹🏼‍♀️"
      },
      {
        unified: "1f939-1f3fd-200d-2640-fe0f",
        native: "🤹🏽‍♀️"
      },
      {
        unified: "1f939-1f3fe-200d-2640-fe0f",
        native: "🤹🏾‍♀️"
      },
      {
        unified: "1f939-1f3ff-200d-2640-fe0f",
        native: "🤹🏿‍♀️"
      }
    ],
    version: 4
  },
  person_in_lotus_position: {
    id: "person_in_lotus_position",
    name: "Person in Lotus Position",
    keywords: [
      "meditate"
    ],
    skins: [
      {
        unified: "1f9d8",
        native: "🧘"
      },
      {
        unified: "1f9d8-1f3fb",
        native: "🧘🏻"
      },
      {
        unified: "1f9d8-1f3fc",
        native: "🧘🏼"
      },
      {
        unified: "1f9d8-1f3fd",
        native: "🧘🏽"
      },
      {
        unified: "1f9d8-1f3fe",
        native: "🧘🏾"
      },
      {
        unified: "1f9d8-1f3ff",
        native: "🧘🏿"
      }
    ],
    version: 5
  },
  man_in_lotus_position: {
    id: "man_in_lotus_position",
    name: "Man in Lotus Position",
    keywords: [
      "male",
      "meditation",
      "yoga",
      "serenity",
      "zen",
      "mindfulness"
    ],
    skins: [
      {
        unified: "1f9d8-200d-2642-fe0f",
        native: "🧘‍♂️"
      },
      {
        unified: "1f9d8-1f3fb-200d-2642-fe0f",
        native: "🧘🏻‍♂️"
      },
      {
        unified: "1f9d8-1f3fc-200d-2642-fe0f",
        native: "🧘🏼‍♂️"
      },
      {
        unified: "1f9d8-1f3fd-200d-2642-fe0f",
        native: "🧘🏽‍♂️"
      },
      {
        unified: "1f9d8-1f3fe-200d-2642-fe0f",
        native: "🧘🏾‍♂️"
      },
      {
        unified: "1f9d8-1f3ff-200d-2642-fe0f",
        native: "🧘🏿‍♂️"
      }
    ],
    version: 5
  },
  woman_in_lotus_position: {
    id: "woman_in_lotus_position",
    name: "Woman in Lotus Position",
    keywords: [
      "female",
      "meditation",
      "yoga",
      "serenity",
      "zen",
      "mindfulness"
    ],
    skins: [
      {
        unified: "1f9d8-200d-2640-fe0f",
        native: "🧘‍♀️"
      },
      {
        unified: "1f9d8-1f3fb-200d-2640-fe0f",
        native: "🧘🏻‍♀️"
      },
      {
        unified: "1f9d8-1f3fc-200d-2640-fe0f",
        native: "🧘🏼‍♀️"
      },
      {
        unified: "1f9d8-1f3fd-200d-2640-fe0f",
        native: "🧘🏽‍♀️"
      },
      {
        unified: "1f9d8-1f3fe-200d-2640-fe0f",
        native: "🧘🏾‍♀️"
      },
      {
        unified: "1f9d8-1f3ff-200d-2640-fe0f",
        native: "🧘🏿‍♀️"
      }
    ],
    version: 5
  },
  bath: {
    id: "bath",
    name: "Bath",
    keywords: [
      "person",
      "taking",
      "clean",
      "shower",
      "bathroom"
    ],
    skins: [
      {
        unified: "1f6c0",
        native: "🛀"
      },
      {
        unified: "1f6c0-1f3fb",
        native: "🛀🏻"
      },
      {
        unified: "1f6c0-1f3fc",
        native: "🛀🏼"
      },
      {
        unified: "1f6c0-1f3fd",
        native: "🛀🏽"
      },
      {
        unified: "1f6c0-1f3fe",
        native: "🛀🏾"
      },
      {
        unified: "1f6c0-1f3ff",
        native: "🛀🏿"
      }
    ],
    version: 1
  },
  sleeping_accommodation: {
    id: "sleeping_accommodation",
    name: "Person in Bed",
    keywords: [
      "sleeping",
      "accommodation",
      "rest"
    ],
    skins: [
      {
        unified: "1f6cc",
        native: "🛌"
      },
      {
        unified: "1f6cc-1f3fb",
        native: "🛌🏻"
      },
      {
        unified: "1f6cc-1f3fc",
        native: "🛌🏼"
      },
      {
        unified: "1f6cc-1f3fd",
        native: "🛌🏽"
      },
      {
        unified: "1f6cc-1f3fe",
        native: "🛌🏾"
      },
      {
        unified: "1f6cc-1f3ff",
        native: "🛌🏿"
      }
    ],
    version: 1
  },
  people_holding_hands: {
    id: "people_holding_hands",
    name: "People Holding Hands",
    keywords: [
      "friendship"
    ],
    skins: [
      {
        unified: "1f9d1-200d-1f91d-200d-1f9d1",
        native: "🧑‍🤝‍🧑"
      },
      {
        unified: "1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb",
        native: "🧑🏻‍🤝‍🧑🏻"
      },
      {
        unified: "1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc",
        native: "🧑🏼‍🤝‍🧑🏼"
      },
      {
        unified: "1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd",
        native: "🧑🏽‍🤝‍🧑🏽"
      },
      {
        unified: "1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe",
        native: "🧑🏾‍🤝‍🧑🏾"
      },
      {
        unified: "1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff",
        native: "🧑🏿‍🤝‍🧑🏿"
      }
    ],
    version: 12
  },
  two_women_holding_hands: {
    id: "two_women_holding_hands",
    name: "Women Holding Hands",
    keywords: [
      "two",
      "pair",
      "friendship",
      "couple",
      "love",
      "like",
      "female",
      "people",
      "human"
    ],
    skins: [
      {
        unified: "1f46d",
        native: "👭"
      },
      {
        unified: "1f46d-1f3fb",
        native: "👭🏻"
      },
      {
        unified: "1f46d-1f3fc",
        native: "👭🏼"
      },
      {
        unified: "1f46d-1f3fd",
        native: "👭🏽"
      },
      {
        unified: "1f46d-1f3fe",
        native: "👭🏾"
      },
      {
        unified: "1f46d-1f3ff",
        native: "👭🏿"
      }
    ],
    version: 1
  },
  man_and_woman_holding_hands: {
    id: "man_and_woman_holding_hands",
    name: "Man and Woman Holding Hands",
    keywords: [
      "couple",
      "pair",
      "people",
      "human",
      "love",
      "date",
      "dating",
      "like",
      "affection",
      "valentines",
      "marriage"
    ],
    skins: [
      {
        unified: "1f46b",
        native: "👫"
      },
      {
        unified: "1f46b-1f3fb",
        native: "👫🏻"
      },
      {
        unified: "1f46b-1f3fc",
        native: "👫🏼"
      },
      {
        unified: "1f46b-1f3fd",
        native: "👫🏽"
      },
      {
        unified: "1f46b-1f3fe",
        native: "👫🏾"
      },
      {
        unified: "1f46b-1f3ff",
        native: "👫🏿"
      }
    ],
    version: 1
  },
  two_men_holding_hands: {
    id: "two_men_holding_hands",
    name: "Men Holding Hands",
    keywords: [
      "two",
      "pair",
      "couple",
      "love",
      "like",
      "bromance",
      "friendship",
      "people",
      "human"
    ],
    skins: [
      {
        unified: "1f46c",
        native: "👬"
      },
      {
        unified: "1f46c-1f3fb",
        native: "👬🏻"
      },
      {
        unified: "1f46c-1f3fc",
        native: "👬🏼"
      },
      {
        unified: "1f46c-1f3fd",
        native: "👬🏽"
      },
      {
        unified: "1f46c-1f3fe",
        native: "👬🏾"
      },
      {
        unified: "1f46c-1f3ff",
        native: "👬🏿"
      }
    ],
    version: 1
  },
  couplekiss: {
    id: "couplekiss",
    name: "Kiss",
    keywords: [
      "couplekiss",
      "pair",
      "valentines",
      "love",
      "like",
      "dating",
      "marriage"
    ],
    skins: [
      {
        unified: "1f48f",
        native: "💏"
      },
      {
        unified: "1f48f-1f3fb",
        native: "💏🏻"
      },
      {
        unified: "1f48f-1f3fc",
        native: "💏🏼"
      },
      {
        unified: "1f48f-1f3fd",
        native: "💏🏽"
      },
      {
        unified: "1f48f-1f3fe",
        native: "💏🏾"
      },
      {
        unified: "1f48f-1f3ff",
        native: "💏🏿"
      }
    ],
    version: 1
  },
  "woman-kiss-man": {
    id: "woman-kiss-man",
    name: "Kiss: Woman, Man",
    keywords: [
      "woman",
      "kiss-man",
      "kiss",
      "love"
    ],
    skins: [
      {
        unified: "1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",
        native: "👩‍❤️‍💋‍👨"
      },
      {
        unified: "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb",
        native: "👩🏻‍❤️‍💋‍👨🏻"
      },
      {
        unified: "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc",
        native: "👩🏼‍❤️‍💋‍👨🏼"
      },
      {
        unified: "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd",
        native: "👩🏽‍❤️‍💋‍👨🏽"
      },
      {
        unified: "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe",
        native: "👩🏾‍❤️‍💋‍👨🏾"
      },
      {
        unified: "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff",
        native: "👩🏿‍❤️‍💋‍👨🏿"
      }
    ],
    version: 2
  },
  "man-kiss-man": {
    id: "man-kiss-man",
    name: "Kiss: Man, Man",
    keywords: [
      "kiss-man",
      "kiss",
      "pair",
      "valentines",
      "love",
      "like",
      "dating",
      "marriage"
    ],
    skins: [
      {
        unified: "1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",
        native: "👨‍❤️‍💋‍👨"
      },
      {
        unified: "1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb",
        native: "👨🏻‍❤️‍💋‍👨🏻"
      },
      {
        unified: "1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc",
        native: "👨🏼‍❤️‍💋‍👨🏼"
      },
      {
        unified: "1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd",
        native: "👨🏽‍❤️‍💋‍👨🏽"
      },
      {
        unified: "1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe",
        native: "👨🏾‍❤️‍💋‍👨🏾"
      },
      {
        unified: "1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff",
        native: "👨🏿‍❤️‍💋‍👨🏿"
      }
    ],
    version: 2
  },
  "woman-kiss-woman": {
    id: "woman-kiss-woman",
    name: "Kiss: Woman, Woman",
    keywords: [
      "kiss-woman",
      "kiss",
      "pair",
      "valentines",
      "love",
      "like",
      "dating",
      "marriage"
    ],
    skins: [
      {
        unified: "1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",
        native: "👩‍❤️‍💋‍👩"
      },
      {
        unified: "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb",
        native: "👩🏻‍❤️‍💋‍👩🏻"
      },
      {
        unified: "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc",
        native: "👩🏼‍❤️‍💋‍👩🏼"
      },
      {
        unified: "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd",
        native: "👩🏽‍❤️‍💋‍👩🏽"
      },
      {
        unified: "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe",
        native: "👩🏾‍❤️‍💋‍👩🏾"
      },
      {
        unified: "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff",
        native: "👩🏿‍❤️‍💋‍👩🏿"
      }
    ],
    version: 2
  },
  couple_with_heart: {
    id: "couple_with_heart",
    name: "Couple with Heart",
    keywords: [
      "pair",
      "love",
      "like",
      "affection",
      "human",
      "dating",
      "valentines",
      "marriage"
    ],
    skins: [
      {
        unified: "1f491",
        native: "💑"
      },
      {
        unified: "1f491-1f3fb",
        native: "💑🏻"
      },
      {
        unified: "1f491-1f3fc",
        native: "💑🏼"
      },
      {
        unified: "1f491-1f3fd",
        native: "💑🏽"
      },
      {
        unified: "1f491-1f3fe",
        native: "💑🏾"
      },
      {
        unified: "1f491-1f3ff",
        native: "💑🏿"
      }
    ],
    version: 1
  },
  "woman-heart-man": {
    id: "woman-heart-man",
    name: "Couple with Heart: Woman, Man",
    keywords: [
      "woman",
      "heart-man",
      "heart",
      "love"
    ],
    skins: [
      {
        unified: "1f469-200d-2764-fe0f-200d-1f468",
        native: "👩‍❤️‍👨"
      },
      {
        unified: "1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb",
        native: "👩🏻‍❤️‍👨🏻"
      },
      {
        unified: "1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc",
        native: "👩🏼‍❤️‍👨🏼"
      },
      {
        unified: "1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd",
        native: "👩🏽‍❤️‍👨🏽"
      },
      {
        unified: "1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe",
        native: "👩🏾‍❤️‍👨🏾"
      },
      {
        unified: "1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff",
        native: "👩🏿‍❤️‍👨🏿"
      }
    ],
    version: 2
  },
  "man-heart-man": {
    id: "man-heart-man",
    name: "Couple with Heart: Man, Man",
    keywords: [
      "heart-man",
      "heart",
      "pair",
      "love",
      "like",
      "affection",
      "human",
      "dating",
      "valentines",
      "marriage"
    ],
    skins: [
      {
        unified: "1f468-200d-2764-fe0f-200d-1f468",
        native: "👨‍❤️‍👨"
      },
      {
        unified: "1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb",
        native: "👨🏻‍❤️‍👨🏻"
      },
      {
        unified: "1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc",
        native: "👨🏼‍❤️‍👨🏼"
      },
      {
        unified: "1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd",
        native: "👨🏽‍❤️‍👨🏽"
      },
      {
        unified: "1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe",
        native: "👨🏾‍❤️‍👨🏾"
      },
      {
        unified: "1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff",
        native: "👨🏿‍❤️‍👨🏿"
      }
    ],
    version: 2
  },
  "woman-heart-woman": {
    id: "woman-heart-woman",
    name: "Couple with Heart: Woman, Woman",
    keywords: [
      "heart-woman",
      "heart",
      "pair",
      "love",
      "like",
      "affection",
      "human",
      "dating",
      "valentines",
      "marriage"
    ],
    skins: [
      {
        unified: "1f469-200d-2764-fe0f-200d-1f469",
        native: "👩‍❤️‍👩"
      },
      {
        unified: "1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fb",
        native: "👩🏻‍❤️‍👩🏻"
      },
      {
        unified: "1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fc",
        native: "👩🏼‍❤️‍👩🏼"
      },
      {
        unified: "1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fd",
        native: "👩🏽‍❤️‍👩🏽"
      },
      {
        unified: "1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fe",
        native: "👩🏾‍❤️‍👩🏾"
      },
      {
        unified: "1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3ff",
        native: "👩🏿‍❤️‍👩🏿"
      }
    ],
    version: 2
  },
  family: {
    id: "family",
    name: "Family",
    keywords: [
      "home",
      "parents",
      "child",
      "mom",
      "dad",
      "father",
      "mother",
      "people",
      "human"
    ],
    skins: [
      {
        unified: "1f46a",
        native: "👪"
      }
    ],
    version: 1
  },
  "man-woman-boy": {
    id: "man-woman-boy",
    name: "Family: Man, Woman, Boy",
    keywords: [
      "man",
      "woman-boy",
      "family",
      "woman",
      "love"
    ],
    skins: [
      {
        unified: "1f468-200d-1f469-200d-1f466",
        native: "👨‍👩‍👦"
      }
    ],
    version: 2
  },
  "man-woman-girl": {
    id: "man-woman-girl",
    name: "Family: Man, Woman, Girl",
    keywords: [
      "man",
      "woman-girl",
      "family",
      "woman",
      "home",
      "parents",
      "people",
      "human",
      "child"
    ],
    skins: [
      {
        unified: "1f468-200d-1f469-200d-1f467",
        native: "👨‍👩‍👧"
      }
    ],
    version: 2
  },
  "man-woman-girl-boy": {
    id: "man-woman-girl-boy",
    name: "Family: Man, Woman, Girl, Boy",
    keywords: [
      "man",
      "woman-girl-boy",
      "family",
      "woman",
      "girl",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f469-200d-1f467-200d-1f466",
        native: "👨‍👩‍👧‍👦"
      }
    ],
    version: 2
  },
  "man-woman-boy-boy": {
    id: "man-woman-boy-boy",
    name: "Family: Man, Woman, Boy, Boy",
    keywords: [
      "man",
      "woman-boy-boy",
      "family",
      "woman",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f469-200d-1f466-200d-1f466",
        native: "👨‍👩‍👦‍👦"
      }
    ],
    version: 2
  },
  "man-woman-girl-girl": {
    id: "man-woman-girl-girl",
    name: "Family: Man, Woman, Girl, Girl",
    keywords: [
      "man",
      "woman-girl-girl",
      "family",
      "woman",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f469-200d-1f467-200d-1f467",
        native: "👨‍👩‍👧‍👧"
      }
    ],
    version: 2
  },
  "man-man-boy": {
    id: "man-man-boy",
    name: "Family: Man, Man, Boy",
    keywords: [
      "man",
      "man-boy",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f468-200d-1f466",
        native: "👨‍👨‍👦"
      }
    ],
    version: 2
  },
  "man-man-girl": {
    id: "man-man-girl",
    name: "Family: Man, Man, Girl",
    keywords: [
      "man",
      "man-girl",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f468-200d-1f467",
        native: "👨‍👨‍👧"
      }
    ],
    version: 2
  },
  "man-man-girl-boy": {
    id: "man-man-girl-boy",
    name: "Family: Man, Man, Girl, Boy",
    keywords: [
      "man",
      "man-girl-boy",
      "family",
      "girl",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f468-200d-1f467-200d-1f466",
        native: "👨‍👨‍👧‍👦"
      }
    ],
    version: 2
  },
  "man-man-boy-boy": {
    id: "man-man-boy-boy",
    name: "Family: Man, Man, Boy, Boy",
    keywords: [
      "man",
      "man-boy-boy",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f468-200d-1f466-200d-1f466",
        native: "👨‍👨‍👦‍👦"
      }
    ],
    version: 2
  },
  "man-man-girl-girl": {
    id: "man-man-girl-girl",
    name: "Family: Man, Man, Girl, Girl",
    keywords: [
      "man",
      "man-girl-girl",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f468-200d-1f467-200d-1f467",
        native: "👨‍👨‍👧‍👧"
      }
    ],
    version: 2
  },
  "woman-woman-boy": {
    id: "woman-woman-boy",
    name: "Family: Woman, Woman, Boy",
    keywords: [
      "woman",
      "woman-boy",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f469-200d-1f466",
        native: "👩‍👩‍👦"
      }
    ],
    version: 2
  },
  "woman-woman-girl": {
    id: "woman-woman-girl",
    name: "Family: Woman, Woman, Girl",
    keywords: [
      "woman",
      "woman-girl",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f469-200d-1f467",
        native: "👩‍👩‍👧"
      }
    ],
    version: 2
  },
  "woman-woman-girl-boy": {
    id: "woman-woman-girl-boy",
    name: "Family: Woman, Woman, Girl, Boy",
    keywords: [
      "woman",
      "woman-girl-boy",
      "family",
      "girl",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f469-200d-1f467-200d-1f466",
        native: "👩‍👩‍👧‍👦"
      }
    ],
    version: 2
  },
  "woman-woman-boy-boy": {
    id: "woman-woman-boy-boy",
    name: "Family: Woman, Woman, Boy, Boy",
    keywords: [
      "woman",
      "woman-boy-boy",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f469-200d-1f466-200d-1f466",
        native: "👩‍👩‍👦‍👦"
      }
    ],
    version: 2
  },
  "woman-woman-girl-girl": {
    id: "woman-woman-girl-girl",
    name: "Family: Woman, Woman, Girl, Girl",
    keywords: [
      "woman",
      "woman-girl-girl",
      "family",
      "home",
      "parents",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f469-200d-1f467-200d-1f467",
        native: "👩‍👩‍👧‍👧"
      }
    ],
    version: 2
  },
  "man-boy": {
    id: "man-boy",
    name: "Family: Man, Boy",
    keywords: [
      "man",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "child"
    ],
    skins: [
      {
        unified: "1f468-200d-1f466",
        native: "👨‍👦"
      }
    ],
    version: 4
  },
  "man-boy-boy": {
    id: "man-boy-boy",
    name: "Family: Man, Boy, Boy",
    keywords: [
      "man",
      "boy-boy",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f466-200d-1f466",
        native: "👨‍👦‍👦"
      }
    ],
    version: 4
  },
  "man-girl": {
    id: "man-girl",
    name: "Family: Man, Girl",
    keywords: [
      "man",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "child"
    ],
    skins: [
      {
        unified: "1f468-200d-1f467",
        native: "👨‍👧"
      }
    ],
    version: 4
  },
  "man-girl-boy": {
    id: "man-girl-boy",
    name: "Family: Man, Girl, Boy",
    keywords: [
      "man",
      "girl-boy",
      "family",
      "girl",
      "home",
      "parent",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f467-200d-1f466",
        native: "👨‍👧‍👦"
      }
    ],
    version: 4
  },
  "man-girl-girl": {
    id: "man-girl-girl",
    name: "Family: Man, Girl, Girl",
    keywords: [
      "man",
      "girl-girl",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f468-200d-1f467-200d-1f467",
        native: "👨‍👧‍👧"
      }
    ],
    version: 4
  },
  "woman-boy": {
    id: "woman-boy",
    name: "Family: Woman, Boy",
    keywords: [
      "woman",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "child"
    ],
    skins: [
      {
        unified: "1f469-200d-1f466",
        native: "👩‍👦"
      }
    ],
    version: 4
  },
  "woman-boy-boy": {
    id: "woman-boy-boy",
    name: "Family: Woman, Boy, Boy",
    keywords: [
      "woman",
      "boy-boy",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f466-200d-1f466",
        native: "👩‍👦‍👦"
      }
    ],
    version: 4
  },
  "woman-girl": {
    id: "woman-girl",
    name: "Family: Woman, Girl",
    keywords: [
      "woman",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "child"
    ],
    skins: [
      {
        unified: "1f469-200d-1f467",
        native: "👩‍👧"
      }
    ],
    version: 4
  },
  "woman-girl-boy": {
    id: "woman-girl-boy",
    name: "Family: Woman, Girl, Boy",
    keywords: [
      "woman",
      "girl-boy",
      "family",
      "girl",
      "home",
      "parent",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f467-200d-1f466",
        native: "👩‍👧‍👦"
      }
    ],
    version: 4
  },
  "woman-girl-girl": {
    id: "woman-girl-girl",
    name: "Family: Woman, Girl, Girl",
    keywords: [
      "woman",
      "girl-girl",
      "family",
      "home",
      "parent",
      "people",
      "human",
      "children"
    ],
    skins: [
      {
        unified: "1f469-200d-1f467-200d-1f467",
        native: "👩‍👧‍👧"
      }
    ],
    version: 4
  },
  speaking_head_in_silhouette: {
    id: "speaking_head_in_silhouette",
    name: "Speaking Head",
    keywords: [
      "in",
      "silhouette",
      "user",
      "person",
      "human",
      "sing",
      "say",
      "talk"
    ],
    skins: [
      {
        unified: "1f5e3-fe0f",
        native: "🗣️"
      }
    ],
    version: 1
  },
  bust_in_silhouette: {
    id: "bust_in_silhouette",
    name: "Bust in Silhouette",
    keywords: [
      "user",
      "person",
      "human"
    ],
    skins: [
      {
        unified: "1f464",
        native: "👤"
      }
    ],
    version: 1
  },
  busts_in_silhouette: {
    id: "busts_in_silhouette",
    name: "Busts in Silhouette",
    keywords: [
      "user",
      "person",
      "human",
      "group",
      "team"
    ],
    skins: [
      {
        unified: "1f465",
        native: "👥"
      }
    ],
    version: 1
  },
  people_hugging: {
    id: "people_hugging",
    name: "People Hugging",
    keywords: [
      "care"
    ],
    skins: [
      {
        unified: "1fac2",
        native: "🫂"
      }
    ],
    version: 13
  },
  footprints: {
    id: "footprints",
    name: "Footprints",
    keywords: [
      "feet",
      "tracking",
      "walking",
      "beach"
    ],
    skins: [
      {
        unified: "1f463",
        native: "👣"
      }
    ],
    version: 1
  },
  monkey_face: {
    id: "monkey_face",
    name: "Monkey Face",
    emoticons: [
      ":o)"
    ],
    keywords: [
      "animal",
      "nature",
      "circus"
    ],
    skins: [
      {
        unified: "1f435",
        native: "🐵"
      }
    ],
    version: 1
  },
  monkey: {
    id: "monkey",
    name: "Monkey",
    keywords: [
      "animal",
      "nature",
      "banana",
      "circus"
    ],
    skins: [
      {
        unified: "1f412",
        native: "🐒"
      }
    ],
    version: 1
  },
  gorilla: {
    id: "gorilla",
    name: "Gorilla",
    keywords: [
      "animal",
      "nature",
      "circus"
    ],
    skins: [
      {
        unified: "1f98d",
        native: "🦍"
      }
    ],
    version: 3
  },
  orangutan: {
    id: "orangutan",
    name: "Orangutan",
    keywords: [
      "animal"
    ],
    skins: [
      {
        unified: "1f9a7",
        native: "🦧"
      }
    ],
    version: 12
  },
  dog: {
    id: "dog",
    name: "Dog Face",
    keywords: [
      "animal",
      "friend",
      "nature",
      "woof",
      "puppy",
      "pet",
      "faithful"
    ],
    skins: [
      {
        unified: "1f436",
        native: "🐶"
      }
    ],
    version: 1
  },
  dog2: {
    id: "dog2",
    name: "Dog",
    keywords: [
      "dog2",
      "animal",
      "nature",
      "friend",
      "doge",
      "pet",
      "faithful"
    ],
    skins: [
      {
        unified: "1f415",
        native: "🐕"
      }
    ],
    version: 1
  },
  guide_dog: {
    id: "guide_dog",
    name: "Guide Dog",
    keywords: [
      "animal",
      "blind"
    ],
    skins: [
      {
        unified: "1f9ae",
        native: "🦮"
      }
    ],
    version: 12
  },
  service_dog: {
    id: "service_dog",
    name: "Service Dog",
    keywords: [
      "blind",
      "animal"
    ],
    skins: [
      {
        unified: "1f415-200d-1f9ba",
        native: "🐕‍🦺"
      }
    ],
    version: 12
  },
  poodle: {
    id: "poodle",
    name: "Poodle",
    keywords: [
      "dog",
      "animal",
      "101",
      "nature",
      "pet"
    ],
    skins: [
      {
        unified: "1f429",
        native: "🐩"
      }
    ],
    version: 1
  },
  wolf: {
    id: "wolf",
    name: "Wolf",
    keywords: [
      "animal",
      "nature",
      "wild"
    ],
    skins: [
      {
        unified: "1f43a",
        native: "🐺"
      }
    ],
    version: 1
  },
  fox_face: {
    id: "fox_face",
    name: "Fox",
    keywords: [
      "face",
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f98a",
        native: "🦊"
      }
    ],
    version: 3
  },
  raccoon: {
    id: "raccoon",
    name: "Raccoon",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f99d",
        native: "🦝"
      }
    ],
    version: 11
  },
  cat: {
    id: "cat",
    name: "Cat Face",
    keywords: [
      "animal",
      "meow",
      "nature",
      "pet",
      "kitten"
    ],
    skins: [
      {
        unified: "1f431",
        native: "🐱"
      }
    ],
    version: 1
  },
  cat2: {
    id: "cat2",
    name: "Cat",
    keywords: [
      "cat2",
      "animal",
      "meow",
      "pet",
      "cats"
    ],
    skins: [
      {
        unified: "1f408",
        native: "🐈"
      }
    ],
    version: 1
  },
  black_cat: {
    id: "black_cat",
    name: "Black Cat",
    keywords: [
      "superstition",
      "luck"
    ],
    skins: [
      {
        unified: "1f408-200d-2b1b",
        native: "🐈‍⬛"
      }
    ],
    version: 13
  },
  lion_face: {
    id: "lion_face",
    name: "Lion",
    keywords: [
      "face",
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f981",
        native: "🦁"
      }
    ],
    version: 1
  },
  tiger: {
    id: "tiger",
    name: "Tiger Face",
    keywords: [
      "animal",
      "cat",
      "danger",
      "wild",
      "nature",
      "roar"
    ],
    skins: [
      {
        unified: "1f42f",
        native: "🐯"
      }
    ],
    version: 1
  },
  tiger2: {
    id: "tiger2",
    name: "Tiger",
    keywords: [
      "tiger2",
      "animal",
      "nature",
      "roar"
    ],
    skins: [
      {
        unified: "1f405",
        native: "🐅"
      }
    ],
    version: 1
  },
  leopard: {
    id: "leopard",
    name: "Leopard",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f406",
        native: "🐆"
      }
    ],
    version: 1
  },
  horse: {
    id: "horse",
    name: "Horse Face",
    keywords: [
      "animal",
      "brown",
      "nature"
    ],
    skins: [
      {
        unified: "1f434",
        native: "🐴"
      }
    ],
    version: 1
  },
  moose: {
    id: "moose",
    name: "Moose",
    keywords: [
      "shrek",
      "canada",
      "sweden",
      "sven",
      "cool"
    ],
    skins: [
      {
        unified: "1face",
        native: "🫎"
      }
    ],
    version: 15
  },
  donkey: {
    id: "donkey",
    name: "Donkey",
    keywords: [
      "eeyore",
      "mule"
    ],
    skins: [
      {
        unified: "1facf",
        native: "🫏"
      }
    ],
    version: 15
  },
  racehorse: {
    id: "racehorse",
    name: "Horse",
    keywords: [
      "racehorse",
      "animal",
      "gamble",
      "luck"
    ],
    skins: [
      {
        unified: "1f40e",
        native: "🐎"
      }
    ],
    version: 1
  },
  unicorn_face: {
    id: "unicorn_face",
    name: "Unicorn",
    keywords: [
      "face",
      "animal",
      "nature",
      "mystical"
    ],
    skins: [
      {
        unified: "1f984",
        native: "🦄"
      }
    ],
    version: 1
  },
  zebra_face: {
    id: "zebra_face",
    name: "Zebra",
    keywords: [
      "face",
      "animal",
      "nature",
      "stripes",
      "safari"
    ],
    skins: [
      {
        unified: "1f993",
        native: "🦓"
      }
    ],
    version: 5
  },
  deer: {
    id: "deer",
    name: "Deer",
    keywords: [
      "animal",
      "nature",
      "horns",
      "venison"
    ],
    skins: [
      {
        unified: "1f98c",
        native: "🦌"
      }
    ],
    version: 3
  },
  bison: {
    id: "bison",
    name: "Bison",
    keywords: [
      "ox"
    ],
    skins: [
      {
        unified: "1f9ac",
        native: "🦬"
      }
    ],
    version: 13
  },
  cow: {
    id: "cow",
    name: "Cow Face",
    keywords: [
      "beef",
      "ox",
      "animal",
      "nature",
      "moo",
      "milk"
    ],
    skins: [
      {
        unified: "1f42e",
        native: "🐮"
      }
    ],
    version: 1
  },
  ox: {
    id: "ox",
    name: "Ox",
    keywords: [
      "animal",
      "cow",
      "beef"
    ],
    skins: [
      {
        unified: "1f402",
        native: "🐂"
      }
    ],
    version: 1
  },
  water_buffalo: {
    id: "water_buffalo",
    name: "Water Buffalo",
    keywords: [
      "animal",
      "nature",
      "ox",
      "cow"
    ],
    skins: [
      {
        unified: "1f403",
        native: "🐃"
      }
    ],
    version: 1
  },
  cow2: {
    id: "cow2",
    name: "Cow",
    keywords: [
      "cow2",
      "beef",
      "ox",
      "animal",
      "nature",
      "moo",
      "milk"
    ],
    skins: [
      {
        unified: "1f404",
        native: "🐄"
      }
    ],
    version: 1
  },
  pig: {
    id: "pig",
    name: "Pig Face",
    keywords: [
      "animal",
      "oink",
      "nature"
    ],
    skins: [
      {
        unified: "1f437",
        native: "🐷"
      }
    ],
    version: 1
  },
  pig2: {
    id: "pig2",
    name: "Pig",
    keywords: [
      "pig2",
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f416",
        native: "🐖"
      }
    ],
    version: 1
  },
  boar: {
    id: "boar",
    name: "Boar",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f417",
        native: "🐗"
      }
    ],
    version: 1
  },
  pig_nose: {
    id: "pig_nose",
    name: "Pig Nose",
    keywords: [
      "animal",
      "oink"
    ],
    skins: [
      {
        unified: "1f43d",
        native: "🐽"
      }
    ],
    version: 1
  },
  ram: {
    id: "ram",
    name: "Ram",
    keywords: [
      "animal",
      "sheep",
      "nature"
    ],
    skins: [
      {
        unified: "1f40f",
        native: "🐏"
      }
    ],
    version: 1
  },
  sheep: {
    id: "sheep",
    name: "Ewe",
    keywords: [
      "sheep",
      "animal",
      "nature",
      "wool",
      "shipit"
    ],
    skins: [
      {
        unified: "1f411",
        native: "🐑"
      }
    ],
    version: 1
  },
  goat: {
    id: "goat",
    name: "Goat",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f410",
        native: "🐐"
      }
    ],
    version: 1
  },
  dromedary_camel: {
    id: "dromedary_camel",
    name: "Camel",
    keywords: [
      "dromedary",
      "animal",
      "hot",
      "desert",
      "hump"
    ],
    skins: [
      {
        unified: "1f42a",
        native: "🐪"
      }
    ],
    version: 1
  },
  camel: {
    id: "camel",
    name: "Bactrian Camel",
    keywords: [
      "two",
      "hump",
      "animal",
      "nature",
      "hot",
      "desert"
    ],
    skins: [
      {
        unified: "1f42b",
        native: "🐫"
      }
    ],
    version: 1
  },
  llama: {
    id: "llama",
    name: "Llama",
    keywords: [
      "animal",
      "nature",
      "alpaca"
    ],
    skins: [
      {
        unified: "1f999",
        native: "🦙"
      }
    ],
    version: 11
  },
  giraffe_face: {
    id: "giraffe_face",
    name: "Giraffe",
    keywords: [
      "face",
      "animal",
      "nature",
      "spots",
      "safari"
    ],
    skins: [
      {
        unified: "1f992",
        native: "🦒"
      }
    ],
    version: 5
  },
  elephant: {
    id: "elephant",
    name: "Elephant",
    keywords: [
      "animal",
      "nature",
      "nose",
      "th",
      "circus"
    ],
    skins: [
      {
        unified: "1f418",
        native: "🐘"
      }
    ],
    version: 1
  },
  mammoth: {
    id: "mammoth",
    name: "Mammoth",
    keywords: [
      "elephant",
      "tusks"
    ],
    skins: [
      {
        unified: "1f9a3",
        native: "🦣"
      }
    ],
    version: 13
  },
  rhinoceros: {
    id: "rhinoceros",
    name: "Rhinoceros",
    keywords: [
      "animal",
      "nature",
      "horn"
    ],
    skins: [
      {
        unified: "1f98f",
        native: "🦏"
      }
    ],
    version: 3
  },
  hippopotamus: {
    id: "hippopotamus",
    name: "Hippopotamus",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f99b",
        native: "🦛"
      }
    ],
    version: 11
  },
  mouse: {
    id: "mouse",
    name: "Mouse Face",
    keywords: [
      "animal",
      "nature",
      "cheese",
      "wedge",
      "rodent"
    ],
    skins: [
      {
        unified: "1f42d",
        native: "🐭"
      }
    ],
    version: 1
  },
  mouse2: {
    id: "mouse2",
    name: "Mouse",
    keywords: [
      "mouse2",
      "animal",
      "nature",
      "rodent"
    ],
    skins: [
      {
        unified: "1f401",
        native: "🐁"
      }
    ],
    version: 1
  },
  rat: {
    id: "rat",
    name: "Rat",
    keywords: [
      "animal",
      "mouse",
      "rodent"
    ],
    skins: [
      {
        unified: "1f400",
        native: "🐀"
      }
    ],
    version: 1
  },
  hamster: {
    id: "hamster",
    name: "Hamster",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f439",
        native: "🐹"
      }
    ],
    version: 1
  },
  rabbit: {
    id: "rabbit",
    name: "Rabbit Face",
    keywords: [
      "animal",
      "nature",
      "pet",
      "spring",
      "magic",
      "bunny"
    ],
    skins: [
      {
        unified: "1f430",
        native: "🐰"
      }
    ],
    version: 1
  },
  rabbit2: {
    id: "rabbit2",
    name: "Rabbit",
    keywords: [
      "rabbit2",
      "animal",
      "nature",
      "pet",
      "magic",
      "spring"
    ],
    skins: [
      {
        unified: "1f407",
        native: "🐇"
      }
    ],
    version: 1
  },
  chipmunk: {
    id: "chipmunk",
    name: "Chipmunk",
    keywords: [
      "animal",
      "nature",
      "rodent",
      "squirrel"
    ],
    skins: [
      {
        unified: "1f43f-fe0f",
        native: "🐿️"
      }
    ],
    version: 1
  },
  beaver: {
    id: "beaver",
    name: "Beaver",
    keywords: [
      "animal",
      "rodent"
    ],
    skins: [
      {
        unified: "1f9ab",
        native: "🦫"
      }
    ],
    version: 13
  },
  hedgehog: {
    id: "hedgehog",
    name: "Hedgehog",
    keywords: [
      "animal",
      "nature",
      "spiny"
    ],
    skins: [
      {
        unified: "1f994",
        native: "🦔"
      }
    ],
    version: 5
  },
  bat: {
    id: "bat",
    name: "Bat",
    keywords: [
      "animal",
      "nature",
      "blind",
      "vampire"
    ],
    skins: [
      {
        unified: "1f987",
        native: "🦇"
      }
    ],
    version: 3
  },
  bear: {
    id: "bear",
    name: "Bear",
    keywords: [
      "animal",
      "nature",
      "wild"
    ],
    skins: [
      {
        unified: "1f43b",
        native: "🐻"
      }
    ],
    version: 1
  },
  polar_bear: {
    id: "polar_bear",
    name: "Polar Bear",
    keywords: [
      "animal",
      "arctic"
    ],
    skins: [
      {
        unified: "1f43b-200d-2744-fe0f",
        native: "🐻‍❄️"
      }
    ],
    version: 13
  },
  koala: {
    id: "koala",
    name: "Koala",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f428",
        native: "🐨"
      }
    ],
    version: 1
  },
  panda_face: {
    id: "panda_face",
    name: "Panda",
    keywords: [
      "face",
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f43c",
        native: "🐼"
      }
    ],
    version: 1
  },
  sloth: {
    id: "sloth",
    name: "Sloth",
    keywords: [
      "animal"
    ],
    skins: [
      {
        unified: "1f9a5",
        native: "🦥"
      }
    ],
    version: 12
  },
  otter: {
    id: "otter",
    name: "Otter",
    keywords: [
      "animal"
    ],
    skins: [
      {
        unified: "1f9a6",
        native: "🦦"
      }
    ],
    version: 12
  },
  skunk: {
    id: "skunk",
    name: "Skunk",
    keywords: [
      "animal"
    ],
    skins: [
      {
        unified: "1f9a8",
        native: "🦨"
      }
    ],
    version: 12
  },
  kangaroo: {
    id: "kangaroo",
    name: "Kangaroo",
    keywords: [
      "animal",
      "nature",
      "australia",
      "joey",
      "hop",
      "marsupial"
    ],
    skins: [
      {
        unified: "1f998",
        native: "🦘"
      }
    ],
    version: 11
  },
  badger: {
    id: "badger",
    name: "Badger",
    keywords: [
      "animal",
      "nature",
      "honey"
    ],
    skins: [
      {
        unified: "1f9a1",
        native: "🦡"
      }
    ],
    version: 11
  },
  feet: {
    id: "feet",
    name: "Paw Prints",
    keywords: [
      "feet",
      "animal",
      "tracking",
      "footprints",
      "dog",
      "cat",
      "pet"
    ],
    skins: [
      {
        unified: "1f43e",
        native: "🐾"
      }
    ],
    version: 1
  },
  turkey: {
    id: "turkey",
    name: "Turkey",
    keywords: [
      "animal",
      "bird"
    ],
    skins: [
      {
        unified: "1f983",
        native: "🦃"
      }
    ],
    version: 1
  },
  chicken: {
    id: "chicken",
    name: "Chicken",
    keywords: [
      "animal",
      "cluck",
      "nature",
      "bird"
    ],
    skins: [
      {
        unified: "1f414",
        native: "🐔"
      }
    ],
    version: 1
  },
  rooster: {
    id: "rooster",
    name: "Rooster",
    keywords: [
      "animal",
      "nature",
      "chicken"
    ],
    skins: [
      {
        unified: "1f413",
        native: "🐓"
      }
    ],
    version: 1
  },
  hatching_chick: {
    id: "hatching_chick",
    name: "Hatching Chick",
    keywords: [
      "animal",
      "chicken",
      "egg",
      "born",
      "baby",
      "bird"
    ],
    skins: [
      {
        unified: "1f423",
        native: "🐣"
      }
    ],
    version: 1
  },
  baby_chick: {
    id: "baby_chick",
    name: "Baby Chick",
    keywords: [
      "animal",
      "chicken",
      "bird"
    ],
    skins: [
      {
        unified: "1f424",
        native: "🐤"
      }
    ],
    version: 1
  },
  hatched_chick: {
    id: "hatched_chick",
    name: "Front-Facing Baby Chick",
    keywords: [
      "hatched",
      "front",
      "facing",
      "animal",
      "chicken",
      "bird"
    ],
    skins: [
      {
        unified: "1f425",
        native: "🐥"
      }
    ],
    version: 1
  },
  bird: {
    id: "bird",
    name: "Bird",
    keywords: [
      "animal",
      "nature",
      "fly",
      "tweet",
      "spring"
    ],
    skins: [
      {
        unified: "1f426",
        native: "🐦"
      }
    ],
    version: 1
  },
  penguin: {
    id: "penguin",
    name: "Penguin",
    keywords: [
      "animal",
      "nature"
    ],
    skins: [
      {
        unified: "1f427",
        native: "🐧"
      }
    ],
    version: 1
  },
  dove_of_peace: {
    id: "dove_of_peace",
    name: "Dove",
    keywords: [
      "of",
      "peace",
      "animal",
      "bird"
    ],
    skins: [
      {
        unified: "1f54a-fe0f",
        native: "🕊️"
      }
    ],
    version: 1
  },
  eagle: {
    id: "eagle",
    name: "Eagle",
    keywords: [
      "animal",
      "nature",
      "bird"
    ],
    skins: [
      {
        unified: "1f985",
        native: "🦅"
      }
    ],
    version: 3
  },
  duck: {
    id: "duck",
    name: "Duck",
    keywords: [
      "animal",
      "nature",
      "bird",
      "mallard"
    ],
    skins: [
      {
        unified: "1f986",
        native: "🦆"
      }
    ],
    version: 3
  },
  swan: {
    id: "swan",
    name: "Swan",
    keywords: [
      "animal",
      "nature",
      "bird"
    ],
    skins: [
      {
        unified: "1f9a2",
        native: "🦢"
      }
    ],
    version: 11
  },
  owl: {
    id: "owl",
    name: "Owl",
    keywords: [
      "animal",
      "nature",
      "bird",
      "hoot"
    ],
    skins: [
      {
        unified: "1f989",
        native: "🦉"
      }
    ],
    version: 3
  },
  dodo: {
    id: "dodo",
    name: "Dodo",
    keywords: [
      "animal",
      "bird"
    ],
    skins: [
      {
        unified: "1f9a4",
        native: "🦤"
      }
    ],
    version: 13
  },
  feather: {
    id: "feather",
    name: "Feather",
    keywords: [
      "bird",
      "fly"
    ],
    skins: [
      {
        unified: "1fab6",
        native: "🪶"
      }
    ],
    version: 13
  },
  flamingo: {
    id: "flamingo",
    name: "Flamingo",
    keywords: [
      "animal"
    ],
    skins: [
      {
        unified: "1f9a9",
        native: "🦩"
      }
    ],
    version: 12
  },
  peacock: {
    id: "peacock",
    name: "Peacock",
    keywords: [
      "animal",
      "nature",
      "peahen",
      "bird"
    ],
    skins: [
      {
        unified: "1f99a",
        native: "🦚"
      }
    ],
    version: 11
  },
  parrot: {
    id: "parrot",
    name: "Parrot",
    keywords: [
      "animal",
      "nature",
      "bird",
      "pirate",
      "talk"
    ],
    skins: [
      {
        unified: "1f99c",
        native: "🦜"
      }
    ],
    version: 11
  },
  wing: {
    id: "wing",
    name: "Wing",
    keywords: [
      "angel",
      "birds",
      "flying"
    ],
    skins: [
      {
        unified: "1fabd",
        native: "🪽"
      }
    ],
    version: 15
  },
  black_bird: {
    id: "black_bird",
    name: "Black Bird",
    keywords: [
      "crow"
    ],
    skins: [
      {
        unified: "1f426-200d-2b1b",
        native: "🐦‍⬛"
      }
    ],
    version: 15
  },
  goose: {
    id: "goose",
    name: "Goose",
    keywords: [
      "silly",
      "jemima",
      "goosebumps"
    ],
    skins: [
      {
        unified: "1fabf",
        native: "🪿"
      }
    ],
    version: 15
  },
  frog: {
    id: "frog",
    name: "Frog",
    keywords: [
      "animal",
      "nature",
      "croak",
      "toad"
    ],
    skins: [
      {
        unified: "1f438",
        native: "🐸"
      }
    ],
    version: 1
  },
  crocodile: {
    id: "crocodile",
    name: "Crocodile",
    keywords: [
      "animal",
      "nature",
      "reptile",
      "lizard",
      "alligator"
    ],
    skins: [
      {
        unified: "1f40a",
        native: "🐊"
      }
    ],
    version: 1
  },
  turtle: {
    id: "turtle",
    name: "Turtle",
    keywords: [
      "animal",
      "slow",
      "nature",
      "tortoise"
    ],
    skins: [
      {
        unified: "1f422",
        native: "🐢"
      }
    ],
    version: 1
  },
  lizard: {
    id: "lizard",
    name: "Lizard",
    keywords: [
      "animal",
      "nature",
      "reptile"
    ],
    skins: [
      {
        unified: "1f98e",
        native: "🦎"
      }
    ],
    version: 3
  },
  snake: {
    id: "snake",
    name: "Snake",
    keywords: [
      "animal",
      "evil",
      "nature",
      "hiss",
      "python"
    ],
    skins: [
      {
        unified: "1f40d",
        native: "🐍"
      }
    ],
    version: 1
  },
  dragon_face: {
    id: "dragon_face",
    name: "Dragon Face",
    keywords: [
      "animal",
      "myth",
      "nature",
      "chinese",
      "green"
    ],
    skins: [
      {
        unified: "1f432",
        native: "🐲"
      }
    ],
    version: 1
  },
  dragon: {
    id: "dragon",
    name: "Dragon",
    keywords: [
      "animal",
      "myth",
      "nature",
      "chinese",
      "green"
    ],
    skins: [
      {
        unified: "1f409",
        native: "🐉"
      }
    ],
    version: 1
  },
  sauropod: {
    id: "sauropod",
    name: "Sauropod",
    keywords: [
      "animal",
      "nature",
      "dinosaur",
      "brachiosaurus",
      "brontosaurus",
      "diplodocus",
      "extinct"
    ],
    skins: [
      {
        unified: "1f995",
        native: "🦕"
      }
    ],
    version: 5
  },
  "t-rex": {
    id: "t-rex",
    name: "T-Rex",
    keywords: [
      "t",
      "rex",
      "animal",
      "nature",
      "dinosaur",
      "tyrannosaurus",
      "extinct"
    ],
    skins: [
      {
        unified: "1f996",
        native: "🦖"
      }
    ],
    version: 5
  },
  whale: {
    id: "whale",
    name: "Spouting Whale",
    keywords: [
      "animal",
      "nature",
      "sea",
      "ocean"
    ],
    skins: [
      {
        unified: "1f433",
        native: "🐳"
      }
    ],
    version: 1
  },
  whale2: {
    id: "whale2",
    name: "Whale",
    keywords: [
      "whale2",
      "animal",
      "nature",
      "sea",
      "ocean"
    ],
    skins: [
      {
        unified: "1f40b",
        native: "🐋"
      }
    ],
    version: 1
  },
  dolphin: {
    id: "dolphin",
    name: "Dolphin",
    keywords: [
      "flipper",
      "animal",
      "nature",
      "fish",
      "sea",
      "ocean",
      "fins",
      "beach"
    ],
    skins: [
      {
        unified: "1f42c",
        native: "🐬"
      }
    ],
    version: 1
  },
  seal: {
    id: "seal",
    name: "Seal",
    keywords: [
      "animal",
      "creature",
      "sea"
    ],
    skins: [
      {
        unified: "1f9ad",
        native: "🦭"
      }
    ],
    version: 13
  },
  fish: {
    id: "fish",
    name: "Fish",
    keywords: [
      "animal",
      "food",
      "nature"
    ],
    skins: [
      {
        unified: "1f41f",
        native: "🐟"
      }
    ],
    version: 1
  },
  tropical_fish: {
    id: "tropical_fish",
    name: "Tropical Fish",
    keywords: [
      "animal",
      "swim",
      "ocean",
      "beach",
      "nemo"
    ],
    skins: [
      {
        unified: "1f420",
        native: "🐠"
      }
    ],
    version: 1
  },
  blowfish: {
    id: "blowfish",
    name: "Blowfish",
    keywords: [
      "animal",
      "nature",
      "food",
      "sea",
      "ocean"
    ],
    skins: [
      {
        unified: "1f421",
        native: "🐡"
      }
    ],
    version: 1
  },
  shark: {
    id: "shark",
    name: "Shark",
    keywords: [
      "animal",
      "nature",
      "fish",
      "sea",
      "ocean",
      "jaws",
      "fins",
      "beach"
    ],
    skins: [
      {
        unified: "1f988",
        native: "🦈"
      }
    ],
    version: 3
  },
  octopus: {
    id: "octopus",
    name: "Octopus",
    keywords: [
      "animal",
      "creature",
      "ocean",
      "sea",
      "nature",
      "beach"
    ],
    skins: [
      {
        unified: "1f419",
        native: "🐙"
      }
    ],
    version: 1
  },
  shell: {
    id: "shell",
    name: "Spiral Shell",
    keywords: [
      "nature",
      "sea",
      "beach"
    ],
    skins: [
      {
        unified: "1f41a",
        native: "🐚"
      }
    ],
    version: 1
  },
  coral: {
    id: "coral",
    name: "Coral",
    keywords: [
      "ocean",
      "sea",
      "reef"
    ],
    skins: [
      {
        unified: "1fab8",
        native: "🪸"
      }
    ],
    version: 14
  },
  jellyfish: {
    id: "jellyfish",
    name: "Jellyfish",
    keywords: [
      "sting",
      "tentacles"
    ],
    skins: [
      {
        unified: "1fabc",
        native: "🪼"
      }
    ],
    version: 15
  },
  snail: {
    id: "snail",
    name: "Snail",
    keywords: [
      "slow",
      "animal",
      "shell"
    ],
    skins: [
      {
        unified: "1f40c",
        native: "🐌"
      }
    ],
    version: 1
  },
  butterfly: {
    id: "butterfly",
    name: "Butterfly",
    keywords: [
      "animal",
      "insect",
      "nature",
      "caterpillar"
    ],
    skins: [
      {
        unified: "1f98b",
        native: "🦋"
      }
    ],
    version: 3
  },
  bug: {
    id: "bug",
    name: "Bug",
    keywords: [
      "animal",
      "insect",
      "nature",
      "worm"
    ],
    skins: [
      {
        unified: "1f41b",
        native: "🐛"
      }
    ],
    version: 1
  },
  ant: {
    id: "ant",
    name: "Ant",
    keywords: [
      "animal",
      "insect",
      "nature",
      "bug"
    ],
    skins: [
      {
        unified: "1f41c",
        native: "🐜"
      }
    ],
    version: 1
  },
  bee: {
    id: "bee",
    name: "Honeybee",
    keywords: [
      "bee",
      "animal",
      "insect",
      "nature",
      "bug",
      "spring",
      "honey"
    ],
    skins: [
      {
        unified: "1f41d",
        native: "🐝"
      }
    ],
    version: 1
  },
  beetle: {
    id: "beetle",
    name: "Beetle",
    keywords: [
      "insect"
    ],
    skins: [
      {
        unified: "1fab2",
        native: "🪲"
      }
    ],
    version: 13
  },
  ladybug: {
    id: "ladybug",
    name: "Lady Beetle",
    keywords: [
      "ladybug",
      "animal",
      "insect",
      "nature"
    ],
    skins: [
      {
        unified: "1f41e",
        native: "🐞"
      }
    ],
    version: 1
  },
  cricket: {
    id: "cricket",
    name: "Cricket",
    keywords: [
      "animal",
      "chirp"
    ],
    skins: [
      {
        unified: "1f997",
        native: "🦗"
      }
    ],
    version: 5
  },
  cockroach: {
    id: "cockroach",
    name: "Cockroach",
    keywords: [
      "insect",
      "pests"
    ],
    skins: [
      {
        unified: "1fab3",
        native: "🪳"
      }
    ],
    version: 13
  },
  spider: {
    id: "spider",
    name: "Spider",
    keywords: [
      "animal",
      "arachnid"
    ],
    skins: [
      {
        unified: "1f577-fe0f",
        native: "🕷️"
      }
    ],
    version: 1
  },
  spider_web: {
    id: "spider_web",
    name: "Spider Web",
    keywords: [
      "animal",
      "insect",
      "arachnid",
      "silk"
    ],
    skins: [
      {
        unified: "1f578-fe0f",
        native: "🕸️"
      }
    ],
    version: 1
  },
  scorpion: {
    id: "scorpion",
    name: "Scorpion",
    keywords: [
      "animal",
      "arachnid"
    ],
    skins: [
      {
        unified: "1f982",
        native: "🦂"
      }
    ],
    version: 1
  },
  mosquito: {
    id: "mosquito",
    name: "Mosquito",
    keywords: [
      "animal",
      "nature",
      "insect",
      "malaria"
    ],
    skins: [
      {
        unified: "1f99f",
        native: "🦟"
      }
    ],
    version: 11
  },
  fly: {
    id: "fly",
    name: "Fly",
    keywords: [
      "insect"
    ],
    skins: [
      {
        unified: "1fab0",
        native: "🪰"
      }
    ],
    version: 13
  },
  worm: {
    id: "worm",
    name: "Worm",
    keywords: [
      "animal"
    ],
    skins: [
      {
        unified: "1fab1",
        native: "🪱"
      }
    ],
    version: 13
  },
  microbe: {
    id: "microbe",
    name: "Microbe",
    keywords: [
      "amoeba",
      "bacteria",
      "germs",
      "virus",
      "covid"
    ],
    skins: [
      {
        unified: "1f9a0",
        native: "🦠"
      }
    ],
    version: 11
  },
  bouquet: {
    id: "bouquet",
    name: "Bouquet",
    keywords: [
      "flowers",
      "nature",
      "spring"
    ],
    skins: [
      {
        unified: "1f490",
        native: "💐"
      }
    ],
    version: 1
  },
  cherry_blossom: {
    id: "cherry_blossom",
    name: "Cherry Blossom",
    keywords: [
      "nature",
      "plant",
      "spring",
      "flower"
    ],
    skins: [
      {
        unified: "1f338",
        native: "🌸"
      }
    ],
    version: 1
  },
  white_flower: {
    id: "white_flower",
    name: "White Flower",
    keywords: [
      "japanese",
      "spring"
    ],
    skins: [
      {
        unified: "1f4ae",
        native: "💮"
      }
    ],
    version: 1
  },
  lotus: {
    id: "lotus",
    name: "Lotus",
    keywords: [
      "flower",
      "calm",
      "meditation"
    ],
    skins: [
      {
        unified: "1fab7",
        native: "🪷"
      }
    ],
    version: 14
  },
  rosette: {
    id: "rosette",
    name: "Rosette",
    keywords: [
      "flower",
      "decoration",
      "military"
    ],
    skins: [
      {
        unified: "1f3f5-fe0f",
        native: "🏵️"
      }
    ],
    version: 1
  },
  rose: {
    id: "rose",
    name: "Rose",
    keywords: [
      "flowers",
      "valentines",
      "love",
      "spring"
    ],
    skins: [
      {
        unified: "1f339",
        native: "🌹"
      }
    ],
    version: 1
  },
  wilted_flower: {
    id: "wilted_flower",
    name: "Wilted Flower",
    keywords: [
      "plant",
      "nature",
      "rose"
    ],
    skins: [
      {
        unified: "1f940",
        native: "🥀"
      }
    ],
    version: 3
  },
  hibiscus: {
    id: "hibiscus",
    name: "Hibiscus",
    keywords: [
      "plant",
      "vegetable",
      "flowers",
      "beach"
    ],
    skins: [
      {
        unified: "1f33a",
        native: "🌺"
      }
    ],
    version: 1
  },
  sunflower: {
    id: "sunflower",
    name: "Sunflower",
    keywords: [
      "nature",
      "plant",
      "fall"
    ],
    skins: [
      {
        unified: "1f33b",
        native: "🌻"
      }
    ],
    version: 1
  },
  blossom: {
    id: "blossom",
    name: "Blossom",
    keywords: [
      "nature",
      "flowers",
      "yellow"
    ],
    skins: [
      {
        unified: "1f33c",
        native: "🌼"
      }
    ],
    version: 1
  },
  tulip: {
    id: "tulip",
    name: "Tulip",
    keywords: [
      "flowers",
      "plant",
      "nature",
      "summer",
      "spring"
    ],
    skins: [
      {
        unified: "1f337",
        native: "🌷"
      }
    ],
    version: 1
  },
  hyacinth: {
    id: "hyacinth",
    name: "Hyacinth",
    keywords: [
      "flower",
      "lavender"
    ],
    skins: [
      {
        unified: "1fabb",
        native: "🪻"
      }
    ],
    version: 15
  },
  seedling: {
    id: "seedling",
    name: "Seedling",
    keywords: [
      "plant",
      "nature",
      "grass",
      "lawn",
      "spring"
    ],
    skins: [
      {
        unified: "1f331",
        native: "🌱"
      }
    ],
    version: 1
  },
  potted_plant: {
    id: "potted_plant",
    name: "Potted Plant",
    keywords: [
      "greenery",
      "house"
    ],
    skins: [
      {
        unified: "1fab4",
        native: "🪴"
      }
    ],
    version: 13
  },
  evergreen_tree: {
    id: "evergreen_tree",
    name: "Evergreen Tree",
    keywords: [
      "plant",
      "nature"
    ],
    skins: [
      {
        unified: "1f332",
        native: "🌲"
      }
    ],
    version: 1
  },
  deciduous_tree: {
    id: "deciduous_tree",
    name: "Deciduous Tree",
    keywords: [
      "plant",
      "nature"
    ],
    skins: [
      {
        unified: "1f333",
        native: "🌳"
      }
    ],
    version: 1
  },
  palm_tree: {
    id: "palm_tree",
    name: "Palm Tree",
    keywords: [
      "plant",
      "vegetable",
      "nature",
      "summer",
      "beach",
      "mojito",
      "tropical"
    ],
    skins: [
      {
        unified: "1f334",
        native: "🌴"
      }
    ],
    version: 1
  },
  cactus: {
    id: "cactus",
    name: "Cactus",
    keywords: [
      "vegetable",
      "plant",
      "nature"
    ],
    skins: [
      {
        unified: "1f335",
        native: "🌵"
      }
    ],
    version: 1
  },
  ear_of_rice: {
    id: "ear_of_rice",
    name: "Ear of Rice",
    keywords: [
      "sheaf",
      "nature",
      "plant"
    ],
    skins: [
      {
        unified: "1f33e",
        native: "🌾"
      }
    ],
    version: 1
  },
  herb: {
    id: "herb",
    name: "Herb",
    keywords: [
      "vegetable",
      "plant",
      "medicine",
      "weed",
      "grass",
      "lawn"
    ],
    skins: [
      {
        unified: "1f33f",
        native: "🌿"
      }
    ],
    version: 1
  },
  shamrock: {
    id: "shamrock",
    name: "Shamrock",
    keywords: [
      "vegetable",
      "plant",
      "nature",
      "irish",
      "clover"
    ],
    skins: [
      {
        unified: "2618-fe0f",
        native: "☘️"
      }
    ],
    version: 1
  },
  four_leaf_clover: {
    id: "four_leaf_clover",
    name: "Four Leaf Clover",
    keywords: [
      "vegetable",
      "plant",
      "nature",
      "lucky",
      "irish"
    ],
    skins: [
      {
        unified: "1f340",
        native: "🍀"
      }
    ],
    version: 1
  },
  maple_leaf: {
    id: "maple_leaf",
    name: "Maple Leaf",
    keywords: [
      "nature",
      "plant",
      "vegetable",
      "ca",
      "fall"
    ],
    skins: [
      {
        unified: "1f341",
        native: "🍁"
      }
    ],
    version: 1
  },
  fallen_leaf: {
    id: "fallen_leaf",
    name: "Fallen Leaf",
    keywords: [
      "nature",
      "plant",
      "vegetable",
      "leaves"
    ],
    skins: [
      {
        unified: "1f342",
        native: "🍂"
      }
    ],
    version: 1
  },
  leaves: {
    id: "leaves",
    name: "Leaf Fluttering in Wind",
    keywords: [
      "leaves",
      "nature",
      "plant",
      "tree",
      "vegetable",
      "grass",
      "lawn",
      "spring"
    ],
    skins: [
      {
        unified: "1f343",
        native: "🍃"
      }
    ],
    version: 1
  },
  empty_nest: {
    id: "empty_nest",
    name: "Empty Nest",
    keywords: [
      "bird"
    ],
    skins: [
      {
        unified: "1fab9",
        native: "🪹"
      }
    ],
    version: 14
  },
  nest_with_eggs: {
    id: "nest_with_eggs",
    name: "Nest with Eggs",
    keywords: [
      "bird"
    ],
    skins: [
      {
        unified: "1faba",
        native: "🪺"
      }
    ],
    version: 14
  },
  mushroom: {
    id: "mushroom",
    name: "Mushroom",
    keywords: [
      "plant",
      "vegetable"
    ],
    skins: [
      {
        unified: "1f344",
        native: "🍄"
      }
    ],
    version: 1
  },
  grapes: {
    id: "grapes",
    name: "Grapes",
    keywords: [
      "fruit",
      "food",
      "wine"
    ],
    skins: [
      {
        unified: "1f347",
        native: "🍇"
      }
    ],
    version: 1
  },
  melon: {
    id: "melon",
    name: "Melon",
    keywords: [
      "fruit",
      "nature",
      "food"
    ],
    skins: [
      {
        unified: "1f348",
        native: "🍈"
      }
    ],
    version: 1
  },
  watermelon: {
    id: "watermelon",
    name: "Watermelon",
    keywords: [
      "fruit",
      "food",
      "picnic",
      "summer"
    ],
    skins: [
      {
        unified: "1f349",
        native: "🍉"
      }
    ],
    version: 1
  },
  tangerine: {
    id: "tangerine",
    name: "Tangerine",
    keywords: [
      "food",
      "fruit",
      "nature",
      "orange"
    ],
    skins: [
      {
        unified: "1f34a",
        native: "🍊"
      }
    ],
    version: 1
  },
  lemon: {
    id: "lemon",
    name: "Lemon",
    keywords: [
      "fruit",
      "nature"
    ],
    skins: [
      {
        unified: "1f34b",
        native: "🍋"
      }
    ],
    version: 1
  },
  banana: {
    id: "banana",
    name: "Banana",
    keywords: [
      "fruit",
      "food",
      "monkey"
    ],
    skins: [
      {
        unified: "1f34c",
        native: "🍌"
      }
    ],
    version: 1
  },
  pineapple: {
    id: "pineapple",
    name: "Pineapple",
    keywords: [
      "fruit",
      "nature",
      "food"
    ],
    skins: [
      {
        unified: "1f34d",
        native: "🍍"
      }
    ],
    version: 1
  },
  mango: {
    id: "mango",
    name: "Mango",
    keywords: [
      "fruit",
      "food",
      "tropical"
    ],
    skins: [
      {
        unified: "1f96d",
        native: "🥭"
      }
    ],
    version: 11
  },
  apple: {
    id: "apple",
    name: "Red Apple",
    keywords: [
      "fruit",
      "mac",
      "school"
    ],
    skins: [
      {
        unified: "1f34e",
        native: "🍎"
      }
    ],
    version: 1
  },
  green_apple: {
    id: "green_apple",
    name: "Green Apple",
    keywords: [
      "fruit",
      "nature"
    ],
    skins: [
      {
        unified: "1f34f",
        native: "🍏"
      }
    ],
    version: 1
  },
  pear: {
    id: "pear",
    name: "Pear",
    keywords: [
      "fruit",
      "nature",
      "food"
    ],
    skins: [
      {
        unified: "1f350",
        native: "🍐"
      }
    ],
    version: 1
  },
  peach: {
    id: "peach",
    name: "Peach",
    keywords: [
      "fruit",
      "nature",
      "food"
    ],
    skins: [
      {
        unified: "1f351",
        native: "🍑"
      }
    ],
    version: 1
  },
  cherries: {
    id: "cherries",
    name: "Cherries",
    keywords: [
      "food",
      "fruit"
    ],
    skins: [
      {
        unified: "1f352",
        native: "🍒"
      }
    ],
    version: 1
  },
  strawberry: {
    id: "strawberry",
    name: "Strawberry",
    keywords: [
      "fruit",
      "food",
      "nature"
    ],
    skins: [
      {
        unified: "1f353",
        native: "🍓"
      }
    ],
    version: 1
  },
  blueberries: {
    id: "blueberries",
    name: "Blueberries",
    keywords: [
      "fruit"
    ],
    skins: [
      {
        unified: "1fad0",
        native: "🫐"
      }
    ],
    version: 13
  },
  kiwifruit: {
    id: "kiwifruit",
    name: "Kiwifruit",
    keywords: [
      "kiwi",
      "fruit",
      "food"
    ],
    skins: [
      {
        unified: "1f95d",
        native: "🥝"
      }
    ],
    version: 3
  },
  tomato: {
    id: "tomato",
    name: "Tomato",
    keywords: [
      "fruit",
      "vegetable",
      "nature",
      "food"
    ],
    skins: [
      {
        unified: "1f345",
        native: "🍅"
      }
    ],
    version: 1
  },
  olive: {
    id: "olive",
    name: "Olive",
    keywords: [
      "fruit"
    ],
    skins: [
      {
        unified: "1fad2",
        native: "🫒"
      }
    ],
    version: 13
  },
  coconut: {
    id: "coconut",
    name: "Coconut",
    keywords: [
      "fruit",
      "nature",
      "food",
      "palm"
    ],
    skins: [
      {
        unified: "1f965",
        native: "🥥"
      }
    ],
    version: 5
  },
  avocado: {
    id: "avocado",
    name: "Avocado",
    keywords: [
      "fruit",
      "food"
    ],
    skins: [
      {
        unified: "1f951",
        native: "🥑"
      }
    ],
    version: 3
  },
  eggplant: {
    id: "eggplant",
    name: "Eggplant",
    keywords: [
      "vegetable",
      "nature",
      "food",
      "aubergine"
    ],
    skins: [
      {
        unified: "1f346",
        native: "🍆"
      }
    ],
    version: 1
  },
  potato: {
    id: "potato",
    name: "Potato",
    keywords: [
      "food",
      "tuber",
      "vegatable",
      "starch"
    ],
    skins: [
      {
        unified: "1f954",
        native: "🥔"
      }
    ],
    version: 3
  },
  carrot: {
    id: "carrot",
    name: "Carrot",
    keywords: [
      "vegetable",
      "food",
      "orange"
    ],
    skins: [
      {
        unified: "1f955",
        native: "🥕"
      }
    ],
    version: 3
  },
  corn: {
    id: "corn",
    name: "Ear of Corn",
    keywords: [
      "food",
      "vegetable",
      "plant"
    ],
    skins: [
      {
        unified: "1f33d",
        native: "🌽"
      }
    ],
    version: 1
  },
  hot_pepper: {
    id: "hot_pepper",
    name: "Hot Pepper",
    keywords: [
      "food",
      "spicy",
      "chilli",
      "chili"
    ],
    skins: [
      {
        unified: "1f336-fe0f",
        native: "🌶️"
      }
    ],
    version: 1
  },
  bell_pepper: {
    id: "bell_pepper",
    name: "Bell Pepper",
    keywords: [
      "fruit",
      "plant"
    ],
    skins: [
      {
        unified: "1fad1",
        native: "🫑"
      }
    ],
    version: 13
  },
  cucumber: {
    id: "cucumber",
    name: "Cucumber",
    keywords: [
      "fruit",
      "food",
      "pickle"
    ],
    skins: [
      {
        unified: "1f952",
        native: "🥒"
      }
    ],
    version: 3
  },
  leafy_green: {
    id: "leafy_green",
    name: "Leafy Green",
    keywords: [
      "food",
      "vegetable",
      "plant",
      "bok",
      "choy",
      "cabbage",
      "kale",
      "lettuce"
    ],
    skins: [
      {
        unified: "1f96c",
        native: "🥬"
      }
    ],
    version: 11
  },
  broccoli: {
    id: "broccoli",
    name: "Broccoli",
    keywords: [
      "fruit",
      "food",
      "vegetable"
    ],
    skins: [
      {
        unified: "1f966",
        native: "🥦"
      }
    ],
    version: 5
  },
  garlic: {
    id: "garlic",
    name: "Garlic",
    keywords: [
      "food",
      "spice",
      "cook"
    ],
    skins: [
      {
        unified: "1f9c4",
        native: "🧄"
      }
    ],
    version: 12
  },
  onion: {
    id: "onion",
    name: "Onion",
    keywords: [
      "cook",
      "food",
      "spice"
    ],
    skins: [
      {
        unified: "1f9c5",
        native: "🧅"
      }
    ],
    version: 12
  },
  peanuts: {
    id: "peanuts",
    name: "Peanuts",
    keywords: [
      "food",
      "nut"
    ],
    skins: [
      {
        unified: "1f95c",
        native: "🥜"
      }
    ],
    version: 3
  },
  beans: {
    id: "beans",
    name: "Beans",
    keywords: [
      "food"
    ],
    skins: [
      {
        unified: "1fad8",
        native: "🫘"
      }
    ],
    version: 14
  },
  chestnut: {
    id: "chestnut",
    name: "Chestnut",
    keywords: [
      "food",
      "squirrel"
    ],
    skins: [
      {
        unified: "1f330",
        native: "🌰"
      }
    ],
    version: 1
  },
  ginger_root: {
    id: "ginger_root",
    name: "Ginger Root",
    keywords: [
      "spice",
      "yellow",
      "cooking",
      "gingerbread"
    ],
    skins: [
      {
        unified: "1fada",
        native: "🫚"
      }
    ],
    version: 15
  },
  pea_pod: {
    id: "pea_pod",
    name: "Pea Pod",
    keywords: [
      "cozy",
      "green"
    ],
    skins: [
      {
        unified: "1fadb",
        native: "🫛"
      }
    ],
    version: 15
  },
  bread: {
    id: "bread",
    name: "Bread",
    keywords: [
      "food",
      "wheat",
      "breakfast",
      "toast"
    ],
    skins: [
      {
        unified: "1f35e",
        native: "🍞"
      }
    ],
    version: 1
  },
  croissant: {
    id: "croissant",
    name: "Croissant",
    keywords: [
      "food",
      "bread",
      "french"
    ],
    skins: [
      {
        unified: "1f950",
        native: "🥐"
      }
    ],
    version: 3
  },
  baguette_bread: {
    id: "baguette_bread",
    name: "Baguette Bread",
    keywords: [
      "food",
      "french",
      "france",
      "bakery"
    ],
    skins: [
      {
        unified: "1f956",
        native: "🥖"
      }
    ],
    version: 3
  },
  flatbread: {
    id: "flatbread",
    name: "Flatbread",
    keywords: [
      "flour",
      "food",
      "bakery"
    ],
    skins: [
      {
        unified: "1fad3",
        native: "🫓"
      }
    ],
    version: 13
  },
  pretzel: {
    id: "pretzel",
    name: "Pretzel",
    keywords: [
      "food",
      "bread",
      "twisted",
      "germany",
      "bakery"
    ],
    skins: [
      {
        unified: "1f968",
        native: "🥨"
      }
    ],
    version: 5
  },
  bagel: {
    id: "bagel",
    name: "Bagel",
    keywords: [
      "food",
      "bread",
      "bakery",
      "schmear",
      "jewish"
    ],
    skins: [
      {
        unified: "1f96f",
        native: "🥯"
      }
    ],
    version: 11
  },
  pancakes: {
    id: "pancakes",
    name: "Pancakes",
    keywords: [
      "food",
      "breakfast",
      "flapjacks",
      "hotcakes",
      "brunch"
    ],
    skins: [
      {
        unified: "1f95e",
        native: "🥞"
      }
    ],
    version: 3
  },
  waffle: {
    id: "waffle",
    name: "Waffle",
    keywords: [
      "food",
      "breakfast",
      "brunch"
    ],
    skins: [
      {
        unified: "1f9c7",
        native: "🧇"
      }
    ],
    version: 12
  },
  cheese_wedge: {
    id: "cheese_wedge",
    name: "Cheese Wedge",
    keywords: [
      "food",
      "chadder",
      "swiss"
    ],
    skins: [
      {
        unified: "1f9c0",
        native: "🧀"
      }
    ],
    version: 1
  },
  meat_on_bone: {
    id: "meat_on_bone",
    name: "Meat on Bone",
    keywords: [
      "good",
      "food",
      "drumstick"
    ],
    skins: [
      {
        unified: "1f356",
        native: "🍖"
      }
    ],
    version: 1
  },
  poultry_leg: {
    id: "poultry_leg",
    name: "Poultry Leg",
    keywords: [
      "food",
      "meat",
      "drumstick",
      "bird",
      "chicken",
      "turkey"
    ],
    skins: [
      {
        unified: "1f357",
        native: "🍗"
      }
    ],
    version: 1
  },
  cut_of_meat: {
    id: "cut_of_meat",
    name: "Cut of Meat",
    keywords: [
      "food",
      "cow",
      "chop",
      "lambchop",
      "porkchop"
    ],
    skins: [
      {
        unified: "1f969",
        native: "🥩"
      }
    ],
    version: 5
  },
  bacon: {
    id: "bacon",
    name: "Bacon",
    keywords: [
      "food",
      "breakfast",
      "pork",
      "pig",
      "meat",
      "brunch"
    ],
    skins: [
      {
        unified: "1f953",
        native: "🥓"
      }
    ],
    version: 3
  },
  hamburger: {
    id: "hamburger",
    name: "Hamburger",
    keywords: [
      "meat",
      "fast",
      "food",
      "beef",
      "cheeseburger",
      "mcdonalds",
      "burger",
      "king"
    ],
    skins: [
      {
        unified: "1f354",
        native: "🍔"
      }
    ],
    version: 1
  },
  fries: {
    id: "fries",
    name: "French Fries",
    keywords: [
      "chips",
      "snack",
      "fast",
      "food",
      "potato"
    ],
    skins: [
      {
        unified: "1f35f",
        native: "🍟"
      }
    ],
    version: 1
  },
  pizza: {
    id: "pizza",
    name: "Pizza",
    keywords: [
      "food",
      "party",
      "italy"
    ],
    skins: [
      {
        unified: "1f355",
        native: "🍕"
      }
    ],
    version: 1
  },
  hotdog: {
    id: "hotdog",
    name: "Hot Dog",
    keywords: [
      "hotdog",
      "food",
      "frankfurter",
      "america"
    ],
    skins: [
      {
        unified: "1f32d",
        native: "🌭"
      }
    ],
    version: 1
  },
  sandwich: {
    id: "sandwich",
    name: "Sandwich",
    keywords: [
      "food",
      "lunch",
      "bread",
      "toast",
      "bakery"
    ],
    skins: [
      {
        unified: "1f96a",
        native: "🥪"
      }
    ],
    version: 5
  },
  taco: {
    id: "taco",
    name: "Taco",
    keywords: [
      "food",
      "mexican"
    ],
    skins: [
      {
        unified: "1f32e",
        native: "🌮"
      }
    ],
    version: 1
  },
  burrito: {
    id: "burrito",
    name: "Burrito",
    keywords: [
      "food",
      "mexican"
    ],
    skins: [
      {
        unified: "1f32f",
        native: "🌯"
      }
    ],
    version: 1
  },
  tamale: {
    id: "tamale",
    name: "Tamale",
    keywords: [
      "food",
      "masa"
    ],
    skins: [
      {
        unified: "1fad4",
        native: "🫔"
      }
    ],
    version: 13
  },
  stuffed_flatbread: {
    id: "stuffed_flatbread",
    name: "Stuffed Flatbread",
    keywords: [
      "food",
      "gyro",
      "mediterranean"
    ],
    skins: [
      {
        unified: "1f959",
        native: "🥙"
      }
    ],
    version: 3
  },
  falafel: {
    id: "falafel",
    name: "Falafel",
    keywords: [
      "food",
      "mediterranean"
    ],
    skins: [
      {
        unified: "1f9c6",
        native: "🧆"
      }
    ],
    version: 12
  },
  egg: {
    id: "egg",
    name: "Egg",
    keywords: [
      "food",
      "chicken",
      "breakfast"
    ],
    skins: [
      {
        unified: "1f95a",
        native: "🥚"
      }
    ],
    version: 3
  },
  fried_egg: {
    id: "fried_egg",
    name: "Cooking",
    keywords: [
      "fried",
      "egg",
      "food",
      "breakfast",
      "kitchen",
      "skillet"
    ],
    skins: [
      {
        unified: "1f373",
        native: "🍳"
      }
    ],
    version: 1
  },
  shallow_pan_of_food: {
    id: "shallow_pan_of_food",
    name: "Shallow Pan of Food",
    keywords: [
      "cooking",
      "casserole",
      "paella",
      "skillet"
    ],
    skins: [
      {
        unified: "1f958",
        native: "🥘"
      }
    ],
    version: 3
  },
  stew: {
    id: "stew",
    name: "Pot of Food",
    keywords: [
      "stew",
      "meat",
      "soup",
      "hot"
    ],
    skins: [
      {
        unified: "1f372",
        native: "🍲"
      }
    ],
    version: 1
  },
  fondue: {
    id: "fondue",
    name: "Fondue",
    keywords: [
      "cheese",
      "pot",
      "food"
    ],
    skins: [
      {
        unified: "1fad5",
        native: "🫕"
      }
    ],
    version: 13
  },
  bowl_with_spoon: {
    id: "bowl_with_spoon",
    name: "Bowl with Spoon",
    keywords: [
      "food",
      "breakfast",
      "cereal",
      "oatmeal",
      "porridge"
    ],
    skins: [
      {
        unified: "1f963",
        native: "🥣"
      }
    ],
    version: 5
  },
  green_salad: {
    id: "green_salad",
    name: "Green Salad",
    keywords: [
      "food",
      "healthy",
      "lettuce",
      "vegetable"
    ],
    skins: [
      {
        unified: "1f957",
        native: "🥗"
      }
    ],
    version: 3
  },
  popcorn: {
    id: "popcorn",
    name: "Popcorn",
    keywords: [
      "food",
      "movie",
      "theater",
      "films",
      "snack",
      "drama"
    ],
    skins: [
      {
        unified: "1f37f",
        native: "🍿"
      }
    ],
    version: 1
  },
  butter: {
    id: "butter",
    name: "Butter",
    keywords: [
      "food",
      "cook"
    ],
    skins: [
      {
        unified: "1f9c8",
        native: "🧈"
      }
    ],
    version: 12
  },
  salt: {
    id: "salt",
    name: "Salt",
    keywords: [
      "condiment",
      "shaker"
    ],
    skins: [
      {
        unified: "1f9c2",
        native: "🧂"
      }
    ],
    version: 11
  },
  canned_food: {
    id: "canned_food",
    name: "Canned Food",
    keywords: [
      "soup",
      "tomatoes"
    ],
    skins: [
      {
        unified: "1f96b",
        native: "🥫"
      }
    ],
    version: 5
  },
  bento: {
    id: "bento",
    name: "Bento Box",
    keywords: [
      "food",
      "japanese",
      "lunch"
    ],
    skins: [
      {
        unified: "1f371",
        native: "🍱"
      }
    ],
    version: 1
  },
  rice_cracker: {
    id: "rice_cracker",
    name: "Rice Cracker",
    keywords: [
      "food",
      "japanese",
      "snack"
    ],
    skins: [
      {
        unified: "1f358",
        native: "🍘"
      }
    ],
    version: 1
  },
  rice_ball: {
    id: "rice_ball",
    name: "Rice Ball",
    keywords: [
      "food",
      "japanese"
    ],
    skins: [
      {
        unified: "1f359",
        native: "🍙"
      }
    ],
    version: 1
  },
  rice: {
    id: "rice",
    name: "Cooked Rice",
    keywords: [
      "food",
      "asian"
    ],
    skins: [
      {
        unified: "1f35a",
        native: "🍚"
      }
    ],
    version: 1
  },
  curry: {
    id: "curry",
    name: "Curry Rice",
    keywords: [
      "food",
      "spicy",
      "hot",
      "indian"
    ],
    skins: [
      {
        unified: "1f35b",
        native: "🍛"
      }
    ],
    version: 1
  },
  ramen: {
    id: "ramen",
    name: "Steaming Bowl",
    keywords: [
      "ramen",
      "food",
      "japanese",
      "noodle",
      "chopsticks"
    ],
    skins: [
      {
        unified: "1f35c",
        native: "🍜"
      }
    ],
    version: 1
  },
  spaghetti: {
    id: "spaghetti",
    name: "Spaghetti",
    keywords: [
      "food",
      "italian",
      "pasta",
      "noodle"
    ],
    skins: [
      {
        unified: "1f35d",
        native: "🍝"
      }
    ],
    version: 1
  },
  sweet_potato: {
    id: "sweet_potato",
    name: "Roasted Sweet Potato",
    keywords: [
      "food",
      "nature",
      "plant"
    ],
    skins: [
      {
        unified: "1f360",
        native: "🍠"
      }
    ],
    version: 1
  },
  oden: {
    id: "oden",
    name: "Oden",
    keywords: [
      "food",
      "japanese"
    ],
    skins: [
      {
        unified: "1f362",
        native: "🍢"
      }
    ],
    version: 1
  },
  sushi: {
    id: "sushi",
    name: "Sushi",
    keywords: [
      "food",
      "fish",
      "japanese",
      "rice"
    ],
    skins: [
      {
        unified: "1f363",
        native: "🍣"
      }
    ],
    version: 1
  },
  fried_shrimp: {
    id: "fried_shrimp",
    name: "Fried Shrimp",
    keywords: [
      "food",
      "animal",
      "appetizer",
      "summer"
    ],
    skins: [
      {
        unified: "1f364",
        native: "🍤"
      }
    ],
    version: 1
  },
  fish_cake: {
    id: "fish_cake",
    name: "Fish Cake with Swirl",
    keywords: [
      "food",
      "japan",
      "sea",
      "beach",
      "narutomaki",
      "pink",
      "kamaboko",
      "surimi",
      "ramen"
    ],
    skins: [
      {
        unified: "1f365",
        native: "🍥"
      }
    ],
    version: 1
  },
  moon_cake: {
    id: "moon_cake",
    name: "Moon Cake",
    keywords: [
      "food",
      "autumn",
      "dessert"
    ],
    skins: [
      {
        unified: "1f96e",
        native: "🥮"
      }
    ],
    version: 11
  },
  dango: {
    id: "dango",
    name: "Dango",
    keywords: [
      "food",
      "dessert",
      "sweet",
      "japanese",
      "barbecue",
      "meat"
    ],
    skins: [
      {
        unified: "1f361",
        native: "🍡"
      }
    ],
    version: 1
  },
  dumpling: {
    id: "dumpling",
    name: "Dumpling",
    keywords: [
      "food",
      "empanada",
      "pierogi",
      "potsticker",
      "gyoza"
    ],
    skins: [
      {
        unified: "1f95f",
        native: "🥟"
      }
    ],
    version: 5
  },
  fortune_cookie: {
    id: "fortune_cookie",
    name: "Fortune Cookie",
    keywords: [
      "food",
      "prophecy",
      "dessert"
    ],
    skins: [
      {
        unified: "1f960",
        native: "🥠"
      }
    ],
    version: 5
  },
  takeout_box: {
    id: "takeout_box",
    name: "Takeout Box",
    keywords: [
      "food",
      "leftovers"
    ],
    skins: [
      {
        unified: "1f961",
        native: "🥡"
      }
    ],
    version: 5
  },
  crab: {
    id: "crab",
    name: "Crab",
    keywords: [
      "animal",
      "crustacean"
    ],
    skins: [
      {
        unified: "1f980",
        native: "🦀"
      }
    ],
    version: 1
  },
  lobster: {
    id: "lobster",
    name: "Lobster",
    keywords: [
      "animal",
      "nature",
      "bisque",
      "claws",
      "seafood"
    ],
    skins: [
      {
        unified: "1f99e",
        native: "🦞"
      }
    ],
    version: 11
  },
  shrimp: {
    id: "shrimp",
    name: "Shrimp",
    keywords: [
      "animal",
      "ocean",
      "nature",
      "seafood"
    ],
    skins: [
      {
        unified: "1f990",
        native: "🦐"
      }
    ],
    version: 3
  },
  squid: {
    id: "squid",
    name: "Squid",
    keywords: [
      "animal",
      "nature",
      "ocean",
      "sea"
    ],
    skins: [
      {
        unified: "1f991",
        native: "🦑"
      }
    ],
    version: 3
  },
  oyster: {
    id: "oyster",
    name: "Oyster",
    keywords: [
      "food"
    ],
    skins: [
      {
        unified: "1f9aa",
        native: "🦪"
      }
    ],
    version: 12
  },
  icecream: {
    id: "icecream",
    name: "Soft Ice Cream",
    keywords: [
      "icecream",
      "food",
      "hot",
      "dessert",
      "summer"
    ],
    skins: [
      {
        unified: "1f366",
        native: "🍦"
      }
    ],
    version: 1
  },
  shaved_ice: {
    id: "shaved_ice",
    name: "Shaved Ice",
    keywords: [
      "hot",
      "dessert",
      "summer"
    ],
    skins: [
      {
        unified: "1f367",
        native: "🍧"
      }
    ],
    version: 1
  },
  ice_cream: {
    id: "ice_cream",
    name: "Ice Cream",
    keywords: [
      "food",
      "hot",
      "dessert"
    ],
    skins: [
      {
        unified: "1f368",
        native: "🍨"
      }
    ],
    version: 1
  },
  doughnut: {
    id: "doughnut",
    name: "Doughnut",
    keywords: [
      "food",
      "dessert",
      "snack",
      "sweet",
      "donut"
    ],
    skins: [
      {
        unified: "1f369",
        native: "🍩"
      }
    ],
    version: 1
  },
  cookie: {
    id: "cookie",
    name: "Cookie",
    keywords: [
      "food",
      "snack",
      "oreo",
      "chocolate",
      "sweet",
      "dessert"
    ],
    skins: [
      {
        unified: "1f36a",
        native: "🍪"
      }
    ],
    version: 1
  },
  birthday: {
    id: "birthday",
    name: "Birthday Cake",
    keywords: [
      "food",
      "dessert"
    ],
    skins: [
      {
        unified: "1f382",
        native: "🎂"
      }
    ],
    version: 1
  },
  cake: {
    id: "cake",
    name: "Shortcake",
    keywords: [
      "cake",
      "food",
      "dessert"
    ],
    skins: [
      {
        unified: "1f370",
        native: "🍰"
      }
    ],
    version: 1
  },
  cupcake: {
    id: "cupcake",
    name: "Cupcake",
    keywords: [
      "food",
      "dessert",
      "bakery",
      "sweet"
    ],
    skins: [
      {
        unified: "1f9c1",
        native: "🧁"
      }
    ],
    version: 11
  },
  pie: {
    id: "pie",
    name: "Pie",
    keywords: [
      "food",
      "dessert",
      "pastry"
    ],
    skins: [
      {
        unified: "1f967",
        native: "🥧"
      }
    ],
    version: 5
  },
  chocolate_bar: {
    id: "chocolate_bar",
    name: "Chocolate Bar",
    keywords: [
      "food",
      "snack",
      "dessert",
      "sweet"
    ],
    skins: [
      {
        unified: "1f36b",
        native: "🍫"
      }
    ],
    version: 1
  },
  candy: {
    id: "candy",
    name: "Candy",
    keywords: [
      "snack",
      "dessert",
      "sweet",
      "lolly"
    ],
    skins: [
      {
        unified: "1f36c",
        native: "🍬"
      }
    ],
    version: 1
  },
  lollipop: {
    id: "lollipop",
    name: "Lollipop",
    keywords: [
      "food",
      "snack",
      "candy",
      "sweet"
    ],
    skins: [
      {
        unified: "1f36d",
        native: "🍭"
      }
    ],
    version: 1
  },
  custard: {
    id: "custard",
    name: "Custard",
    keywords: [
      "dessert",
      "food"
    ],
    skins: [
      {
        unified: "1f36e",
        native: "🍮"
      }
    ],
    version: 1
  },
  honey_pot: {
    id: "honey_pot",
    name: "Honey Pot",
    keywords: [
      "bees",
      "sweet",
      "kitchen"
    ],
    skins: [
      {
        unified: "1f36f",
        native: "🍯"
      }
    ],
    version: 1
  },
  baby_bottle: {
    id: "baby_bottle",
    name: "Baby Bottle",
    keywords: [
      "food",
      "container",
      "milk"
    ],
    skins: [
      {
        unified: "1f37c",
        native: "🍼"
      }
    ],
    version: 1
  },
  glass_of_milk: {
    id: "glass_of_milk",
    name: "Glass of Milk",
    keywords: [
      "beverage",
      "drink",
      "cow"
    ],
    skins: [
      {
        unified: "1f95b",
        native: "🥛"
      }
    ],
    version: 3
  },
  coffee: {
    id: "coffee",
    name: "Hot Beverage",
    keywords: [
      "coffee",
      "caffeine",
      "latte",
      "espresso",
      "mug"
    ],
    skins: [
      {
        unified: "2615",
        native: "☕"
      }
    ],
    version: 1
  },
  teapot: {
    id: "teapot",
    name: "Teapot",
    keywords: [
      "drink",
      "hot"
    ],
    skins: [
      {
        unified: "1fad6",
        native: "🫖"
      }
    ],
    version: 13
  },
  tea: {
    id: "tea",
    name: "Teacup Without Handle",
    keywords: [
      "tea",
      "drink",
      "bowl",
      "breakfast",
      "green",
      "british"
    ],
    skins: [
      {
        unified: "1f375",
        native: "🍵"
      }
    ],
    version: 1
  },
  sake: {
    id: "sake",
    name: "Sake",
    keywords: [
      "wine",
      "drink",
      "drunk",
      "beverage",
      "japanese",
      "alcohol",
      "booze"
    ],
    skins: [
      {
        unified: "1f376",
        native: "🍶"
      }
    ],
    version: 1
  },
  champagne: {
    id: "champagne",
    name: "Bottle with Popping Cork",
    keywords: [
      "champagne",
      "drink",
      "wine",
      "celebration"
    ],
    skins: [
      {
        unified: "1f37e",
        native: "🍾"
      }
    ],
    version: 1
  },
  wine_glass: {
    id: "wine_glass",
    name: "Wine Glass",
    keywords: [
      "drink",
      "beverage",
      "drunk",
      "alcohol",
      "booze"
    ],
    skins: [
      {
        unified: "1f377",
        native: "🍷"
      }
    ],
    version: 1
  },
  cocktail: {
    id: "cocktail",
    name: "Cocktail Glass",
    keywords: [
      "drink",
      "drunk",
      "alcohol",
      "beverage",
      "booze",
      "mojito"
    ],
    skins: [
      {
        unified: "1f378",
        native: "🍸"
      }
    ],
    version: 1
  },
  tropical_drink: {
    id: "tropical_drink",
    name: "Tropical Drink",
    keywords: [
      "beverage",
      "cocktail",
      "summer",
      "beach",
      "alcohol",
      "booze",
      "mojito"
    ],
    skins: [
      {
        unified: "1f379",
        native: "🍹"
      }
    ],
    version: 1
  },
  beer: {
    id: "beer",
    name: "Beer Mug",
    keywords: [
      "relax",
      "beverage",
      "drink",
      "drunk",
      "party",
      "pub",
      "summer",
      "alcohol",
      "booze"
    ],
    skins: [
      {
        unified: "1f37a",
        native: "🍺"
      }
    ],
    version: 1
  },
  beers: {
    id: "beers",
    name: "Clinking Beer Mugs",
    keywords: [
      "beers",
      "relax",
      "beverage",
      "drink",
      "drunk",
      "party",
      "pub",
      "summer",
      "alcohol",
      "booze"
    ],
    skins: [
      {
        unified: "1f37b",
        native: "🍻"
      }
    ],
    version: 1
  },
  clinking_glasses: {
    id: "clinking_glasses",
    name: "Clinking Glasses",
    keywords: [
      "beverage",
      "drink",
      "party",
      "alcohol",
      "celebrate",
      "cheers",
      "wine",
      "champagne",
      "toast"
    ],
    skins: [
      {
        unified: "1f942",
        native: "🥂"
      }
    ],
    version: 3
  },
  tumbler_glass: {
    id: "tumbler_glass",
    name: "Tumbler Glass",
    keywords: [
      "drink",
      "beverage",
      "drunk",
      "alcohol",
      "liquor",
      "booze",
      "bourbon",
      "scotch",
      "whisky",
      "shot"
    ],
    skins: [
      {
        unified: "1f943",
        native: "🥃"
      }
    ],
    version: 3
  },
  pouring_liquid: {
    id: "pouring_liquid",
    name: "Pouring Liquid",
    keywords: [
      "cup",
      "water"
    ],
    skins: [
      {
        unified: "1fad7",
        native: "🫗"
      }
    ],
    version: 14
  },
  cup_with_straw: {
    id: "cup_with_straw",
    name: "Cup with Straw",
    keywords: [
      "drink",
      "soda"
    ],
    skins: [
      {
        unified: "1f964",
        native: "🥤"
      }
    ],
    version: 5
  },
  bubble_tea: {
    id: "bubble_tea",
    name: "Bubble Tea",
    keywords: [
      "taiwan",
      "boba",
      "milk",
      "straw"
    ],
    skins: [
      {
        unified: "1f9cb",
        native: "🧋"
      }
    ],
    version: 13
  },
  beverage_box: {
    id: "beverage_box",
    name: "Beverage Box",
    keywords: [
      "drink"
    ],
    skins: [
      {
        unified: "1f9c3",
        native: "🧃"
      }
    ],
    version: 12
  },
  mate_drink: {
    id: "mate_drink",
    name: "Mate",
    keywords: [
      "drink",
      "tea",
      "beverage"
    ],
    skins: [
      {
        unified: "1f9c9",
        native: "🧉"
      }
    ],
    version: 12
  },
  ice_cube: {
    id: "ice_cube",
    name: "Ice",
    keywords: [
      "cube",
      "water",
      "cold"
    ],
    skins: [
      {
        unified: "1f9ca",
        native: "🧊"
      }
    ],
    version: 12
  },
  chopsticks: {
    id: "chopsticks",
    name: "Chopsticks",
    keywords: [
      "food"
    ],
    skins: [
      {
        unified: "1f962",
        native: "🥢"
      }
    ],
    version: 5
  },
  knife_fork_plate: {
    id: "knife_fork_plate",
    name: "Fork and Knife with Plate",
    keywords: [
      "food",
      "eat",
      "meal",
      "lunch",
      "dinner",
      "restaurant"
    ],
    skins: [
      {
        unified: "1f37d-fe0f",
        native: "🍽️"
      }
    ],
    version: 1
  },
  fork_and_knife: {
    id: "fork_and_knife",
    name: "Fork and Knife",
    keywords: [
      "cutlery",
      "kitchen"
    ],
    skins: [
      {
        unified: "1f374",
        native: "🍴"
      }
    ],
    version: 1
  },
  spoon: {
    id: "spoon",
    name: "Spoon",
    keywords: [
      "cutlery",
      "kitchen",
      "tableware"
    ],
    skins: [
      {
        unified: "1f944",
        native: "🥄"
      }
    ],
    version: 3
  },
  hocho: {
    id: "hocho",
    name: "Hocho",
    keywords: [
      "knife",
      "kitchen",
      "blade",
      "cutlery",
      "weapon"
    ],
    skins: [
      {
        unified: "1f52a",
        native: "🔪"
      }
    ],
    version: 1
  },
  jar: {
    id: "jar",
    name: "Jar",
    keywords: [
      "container",
      "sauce"
    ],
    skins: [
      {
        unified: "1fad9",
        native: "🫙"
      }
    ],
    version: 14
  },
  amphora: {
    id: "amphora",
    name: "Amphora",
    keywords: [
      "vase",
      "jar"
    ],
    skins: [
      {
        unified: "1f3fa",
        native: "🏺"
      }
    ],
    version: 1
  },
  earth_africa: {
    id: "earth_africa",
    name: "Earth Globe Europe-Africa",
    keywords: [
      "africa",
      "showing",
      "europe",
      "world",
      "international"
    ],
    skins: [
      {
        unified: "1f30d",
        native: "🌍"
      }
    ],
    version: 1
  },
  earth_americas: {
    id: "earth_americas",
    name: "Earth Globe Americas",
    keywords: [
      "showing",
      "world",
      "USA",
      "international"
    ],
    skins: [
      {
        unified: "1f30e",
        native: "🌎"
      }
    ],
    version: 1
  },
  earth_asia: {
    id: "earth_asia",
    name: "Earth Globe Asia-Australia",
    keywords: [
      "asia",
      "showing",
      "australia",
      "world",
      "east",
      "international"
    ],
    skins: [
      {
        unified: "1f30f",
        native: "🌏"
      }
    ],
    version: 1
  },
  globe_with_meridians: {
    id: "globe_with_meridians",
    name: "Globe with Meridians",
    keywords: [
      "earth",
      "international",
      "world",
      "internet",
      "interweb",
      "i18n"
    ],
    skins: [
      {
        unified: "1f310",
        native: "🌐"
      }
    ],
    version: 1
  },
  world_map: {
    id: "world_map",
    name: "World Map",
    keywords: [
      "location",
      "direction"
    ],
    skins: [
      {
        unified: "1f5fa-fe0f",
        native: "🗺️"
      }
    ],
    version: 1
  },
  japan: {
    id: "japan",
    name: "Map of Japan",
    keywords: [
      "nation",
      "country",
      "japanese",
      "asia"
    ],
    skins: [
      {
        unified: "1f5fe",
        native: "🗾"
      }
    ],
    version: 1
  },
  compass: {
    id: "compass",
    name: "Compass",
    keywords: [
      "magnetic",
      "navigation",
      "orienteering"
    ],
    skins: [
      {
        unified: "1f9ed",
        native: "🧭"
      }
    ],
    version: 11
  },
  snow_capped_mountain: {
    id: "snow_capped_mountain",
    name: "Snow-Capped Mountain",
    keywords: [
      "snow",
      "capped",
      "photo",
      "nature",
      "environment",
      "winter",
      "cold"
    ],
    skins: [
      {
        unified: "1f3d4-fe0f",
        native: "🏔️"
      }
    ],
    version: 1
  },
  mountain: {
    id: "mountain",
    name: "Mountain",
    keywords: [
      "photo",
      "nature",
      "environment"
    ],
    skins: [
      {
        unified: "26f0-fe0f",
        native: "⛰️"
      }
    ],
    version: 1
  },
  volcano: {
    id: "volcano",
    name: "Volcano",
    keywords: [
      "photo",
      "nature",
      "disaster"
    ],
    skins: [
      {
        unified: "1f30b",
        native: "🌋"
      }
    ],
    version: 1
  },
  mount_fuji: {
    id: "mount_fuji",
    name: "Mount Fuji",
    keywords: [
      "photo",
      "mountain",
      "nature",
      "japanese"
    ],
    skins: [
      {
        unified: "1f5fb",
        native: "🗻"
      }
    ],
    version: 1
  },
  camping: {
    id: "camping",
    name: "Camping",
    keywords: [
      "photo",
      "outdoors",
      "tent"
    ],
    skins: [
      {
        unified: "1f3d5-fe0f",
        native: "🏕️"
      }
    ],
    version: 1
  },
  beach_with_umbrella: {
    id: "beach_with_umbrella",
    name: "Beach with Umbrella",
    keywords: [
      "weather",
      "summer",
      "sunny",
      "sand",
      "mojito"
    ],
    skins: [
      {
        unified: "1f3d6-fe0f",
        native: "🏖️"
      }
    ],
    version: 1
  },
  desert: {
    id: "desert",
    name: "Desert",
    keywords: [
      "photo",
      "warm",
      "saharah"
    ],
    skins: [
      {
        unified: "1f3dc-fe0f",
        native: "🏜️"
      }
    ],
    version: 1
  },
  desert_island: {
    id: "desert_island",
    name: "Desert Island",
    keywords: [
      "photo",
      "tropical",
      "mojito"
    ],
    skins: [
      {
        unified: "1f3dd-fe0f",
        native: "🏝️"
      }
    ],
    version: 1
  },
  national_park: {
    id: "national_park",
    name: "National Park",
    keywords: [
      "photo",
      "environment",
      "nature"
    ],
    skins: [
      {
        unified: "1f3de-fe0f",
        native: "🏞️"
      }
    ],
    version: 1
  },
  stadium: {
    id: "stadium",
    name: "Stadium",
    keywords: [
      "photo",
      "place",
      "sports",
      "concert",
      "venue"
    ],
    skins: [
      {
        unified: "1f3df-fe0f",
        native: "🏟️"
      }
    ],
    version: 1
  },
  classical_building: {
    id: "classical_building",
    name: "Classical Building",
    keywords: [
      "art",
      "culture",
      "history"
    ],
    skins: [
      {
        unified: "1f3db-fe0f",
        native: "🏛️"
      }
    ],
    version: 1
  },
  building_construction: {
    id: "building_construction",
    name: "Building Construction",
    keywords: [
      "wip",
      "working",
      "progress"
    ],
    skins: [
      {
        unified: "1f3d7-fe0f",
        native: "🏗️"
      }
    ],
    version: 1
  },
  bricks: {
    id: "bricks",
    name: "Brick",
    keywords: [
      "bricks"
    ],
    skins: [
      {
        unified: "1f9f1",
        native: "🧱"
      }
    ],
    version: 11
  },
  rock: {
    id: "rock",
    name: "Rock",
    keywords: [
      "stone"
    ],
    skins: [
      {
        unified: "1faa8",
        native: "🪨"
      }
    ],
    version: 13
  },
  wood: {
    id: "wood",
    name: "Wood",
    keywords: [
      "nature",
      "timber",
      "trunk"
    ],
    skins: [
      {
        unified: "1fab5",
        native: "🪵"
      }
    ],
    version: 13
  },
  hut: {
    id: "hut",
    name: "Hut",
    keywords: [
      "house",
      "structure"
    ],
    skins: [
      {
        unified: "1f6d6",
        native: "🛖"
      }
    ],
    version: 13
  },
  house_buildings: {
    id: "house_buildings",
    name: "Houses",
    keywords: [
      "house",
      "buildings",
      "photo"
    ],
    skins: [
      {
        unified: "1f3d8-fe0f",
        native: "🏘️"
      }
    ],
    version: 1
  },
  derelict_house_building: {
    id: "derelict_house_building",
    name: "Derelict House",
    keywords: [
      "building",
      "abandon",
      "evict",
      "broken"
    ],
    skins: [
      {
        unified: "1f3da-fe0f",
        native: "🏚️"
      }
    ],
    version: 1
  },
  house: {
    id: "house",
    name: "House",
    keywords: [
      "building",
      "home"
    ],
    skins: [
      {
        unified: "1f3e0",
        native: "🏠"
      }
    ],
    version: 1
  },
  house_with_garden: {
    id: "house_with_garden",
    name: "House with Garden",
    keywords: [
      "home",
      "plant",
      "nature"
    ],
    skins: [
      {
        unified: "1f3e1",
        native: "🏡"
      }
    ],
    version: 1
  },
  office: {
    id: "office",
    name: "Office Building",
    keywords: [
      "bureau",
      "work"
    ],
    skins: [
      {
        unified: "1f3e2",
        native: "🏢"
      }
    ],
    version: 1
  },
  post_office: {
    id: "post_office",
    name: "Japanese Post Office",
    keywords: [
      "building",
      "envelope",
      "communication"
    ],
    skins: [
      {
        unified: "1f3e3",
        native: "🏣"
      }
    ],
    version: 1
  },
  european_post_office: {
    id: "european_post_office",
    name: "Post Office",
    keywords: [
      "european",
      "building",
      "email"
    ],
    skins: [
      {
        unified: "1f3e4",
        native: "🏤"
      }
    ],
    version: 1
  },
  hospital: {
    id: "hospital",
    name: "Hospital",
    keywords: [
      "building",
      "health",
      "surgery",
      "doctor"
    ],
    skins: [
      {
        unified: "1f3e5",
        native: "🏥"
      }
    ],
    version: 1
  },
  bank: {
    id: "bank",
    name: "Bank",
    keywords: [
      "building",
      "money",
      "sales",
      "cash",
      "business",
      "enterprise"
    ],
    skins: [
      {
        unified: "1f3e6",
        native: "🏦"
      }
    ],
    version: 1
  },
  hotel: {
    id: "hotel",
    name: "Hotel",
    keywords: [
      "building",
      "accomodation",
      "checkin"
    ],
    skins: [
      {
        unified: "1f3e8",
        native: "🏨"
      }
    ],
    version: 1
  },
  love_hotel: {
    id: "love_hotel",
    name: "Love Hotel",
    keywords: [
      "like",
      "affection",
      "dating"
    ],
    skins: [
      {
        unified: "1f3e9",
        native: "🏩"
      }
    ],
    version: 1
  },
  convenience_store: {
    id: "convenience_store",
    name: "Convenience Store",
    keywords: [
      "building",
      "shopping",
      "groceries"
    ],
    skins: [
      {
        unified: "1f3ea",
        native: "🏪"
      }
    ],
    version: 1
  },
  school: {
    id: "school",
    name: "School",
    keywords: [
      "building",
      "student",
      "education",
      "learn",
      "teach"
    ],
    skins: [
      {
        unified: "1f3eb",
        native: "🏫"
      }
    ],
    version: 1
  },
  department_store: {
    id: "department_store",
    name: "Department Store",
    keywords: [
      "building",
      "shopping",
      "mall"
    ],
    skins: [
      {
        unified: "1f3ec",
        native: "🏬"
      }
    ],
    version: 1
  },
  factory: {
    id: "factory",
    name: "Factory",
    keywords: [
      "building",
      "industry",
      "pollution",
      "smoke"
    ],
    skins: [
      {
        unified: "1f3ed",
        native: "🏭"
      }
    ],
    version: 1
  },
  japanese_castle: {
    id: "japanese_castle",
    name: "Japanese Castle",
    keywords: [
      "photo",
      "building"
    ],
    skins: [
      {
        unified: "1f3ef",
        native: "🏯"
      }
    ],
    version: 1
  },
  european_castle: {
    id: "european_castle",
    name: "Castle",
    keywords: [
      "european",
      "building",
      "royalty",
      "history"
    ],
    skins: [
      {
        unified: "1f3f0",
        native: "🏰"
      }
    ],
    version: 1
  },
  wedding: {
    id: "wedding",
    name: "Wedding",
    keywords: [
      "love",
      "like",
      "affection",
      "couple",
      "marriage",
      "bride",
      "groom"
    ],
    skins: [
      {
        unified: "1f492",
        native: "💒"
      }
    ],
    version: 1
  },
  tokyo_tower: {
    id: "tokyo_tower",
    name: "Tokyo Tower",
    keywords: [
      "photo",
      "japanese"
    ],
    skins: [
      {
        unified: "1f5fc",
        native: "🗼"
      }
    ],
    version: 1
  },
  statue_of_liberty: {
    id: "statue_of_liberty",
    name: "Statue of Liberty",
    keywords: [
      "american",
      "newyork"
    ],
    skins: [
      {
        unified: "1f5fd",
        native: "🗽"
      }
    ],
    version: 1
  },
  church: {
    id: "church",
    name: "Church",
    keywords: [
      "building",
      "religion",
      "christ"
    ],
    skins: [
      {
        unified: "26ea",
        native: "⛪"
      }
    ],
    version: 1
  },
  mosque: {
    id: "mosque",
    name: "Mosque",
    keywords: [
      "islam",
      "worship",
      "minaret"
    ],
    skins: [
      {
        unified: "1f54c",
        native: "🕌"
      }
    ],
    version: 1
  },
  hindu_temple: {
    id: "hindu_temple",
    name: "Hindu Temple",
    keywords: [
      "religion"
    ],
    skins: [
      {
        unified: "1f6d5",
        native: "🛕"
      }
    ],
    version: 12
  },
  synagogue: {
    id: "synagogue",
    name: "Synagogue",
    keywords: [
      "judaism",
      "worship",
      "temple",
      "jewish"
    ],
    skins: [
      {
        unified: "1f54d",
        native: "🕍"
      }
    ],
    version: 1
  },
  shinto_shrine: {
    id: "shinto_shrine",
    name: "Shinto Shrine",
    keywords: [
      "temple",
      "japan",
      "kyoto"
    ],
    skins: [
      {
        unified: "26e9-fe0f",
        native: "⛩️"
      }
    ],
    version: 1
  },
  kaaba: {
    id: "kaaba",
    name: "Kaaba",
    keywords: [
      "mecca",
      "mosque",
      "islam"
    ],
    skins: [
      {
        unified: "1f54b",
        native: "🕋"
      }
    ],
    version: 1
  },
  fountain: {
    id: "fountain",
    name: "Fountain",
    keywords: [
      "photo",
      "summer",
      "water",
      "fresh"
    ],
    skins: [
      {
        unified: "26f2",
        native: "⛲"
      }
    ],
    version: 1
  },
  tent: {
    id: "tent",
    name: "Tent",
    keywords: [
      "photo",
      "camping",
      "outdoors"
    ],
    skins: [
      {
        unified: "26fa",
        native: "⛺"
      }
    ],
    version: 1
  },
  foggy: {
    id: "foggy",
    name: "Foggy",
    keywords: [
      "photo",
      "mountain"
    ],
    skins: [
      {
        unified: "1f301",
        native: "🌁"
      }
    ],
    version: 1
  },
  night_with_stars: {
    id: "night_with_stars",
    name: "Night with Stars",
    keywords: [
      "evening",
      "city",
      "downtown"
    ],
    skins: [
      {
        unified: "1f303",
        native: "🌃"
      }
    ],
    version: 1
  },
  cityscape: {
    id: "cityscape",
    name: "Cityscape",
    keywords: [
      "photo",
      "night",
      "life",
      "urban"
    ],
    skins: [
      {
        unified: "1f3d9-fe0f",
        native: "🏙️"
      }
    ],
    version: 1
  },
  sunrise_over_mountains: {
    id: "sunrise_over_mountains",
    name: "Sunrise over Mountains",
    keywords: [
      "view",
      "vacation",
      "photo"
    ],
    skins: [
      {
        unified: "1f304",
        native: "🌄"
      }
    ],
    version: 1
  },
  sunrise: {
    id: "sunrise",
    name: "Sunrise",
    keywords: [
      "morning",
      "view",
      "vacation",
      "photo"
    ],
    skins: [
      {
        unified: "1f305",
        native: "🌅"
      }
    ],
    version: 1
  },
  city_sunset: {
    id: "city_sunset",
    name: "Cityscape at Dusk",
    keywords: [
      "city",
      "sunset",
      "photo",
      "evening",
      "sky",
      "buildings"
    ],
    skins: [
      {
        unified: "1f306",
        native: "🌆"
      }
    ],
    version: 1
  },
  city_sunrise: {
    id: "city_sunrise",
    name: "Sunset",
    keywords: [
      "city",
      "sunrise",
      "photo",
      "good",
      "morning",
      "dawn"
    ],
    skins: [
      {
        unified: "1f307",
        native: "🌇"
      }
    ],
    version: 1
  },
  bridge_at_night: {
    id: "bridge_at_night",
    name: "Bridge at Night",
    keywords: [
      "photo",
      "sanfrancisco"
    ],
    skins: [
      {
        unified: "1f309",
        native: "🌉"
      }
    ],
    version: 1
  },
  hotsprings: {
    id: "hotsprings",
    name: "Hot Springs",
    keywords: [
      "hotsprings",
      "bath",
      "warm",
      "relax"
    ],
    skins: [
      {
        unified: "2668-fe0f",
        native: "♨️"
      }
    ],
    version: 1
  },
  carousel_horse: {
    id: "carousel_horse",
    name: "Carousel Horse",
    keywords: [
      "photo",
      "carnival"
    ],
    skins: [
      {
        unified: "1f3a0",
        native: "🎠"
      }
    ],
    version: 1
  },
  playground_slide: {
    id: "playground_slide",
    name: "Playground Slide",
    keywords: [
      "fun",
      "park"
    ],
    skins: [
      {
        unified: "1f6dd",
        native: "🛝"
      }
    ],
    version: 14
  },
  ferris_wheel: {
    id: "ferris_wheel",
    name: "Ferris Wheel",
    keywords: [
      "photo",
      "carnival",
      "londoneye"
    ],
    skins: [
      {
        unified: "1f3a1",
        native: "🎡"
      }
    ],
    version: 1
  },
  roller_coaster: {
    id: "roller_coaster",
    name: "Roller Coaster",
    keywords: [
      "carnival",
      "playground",
      "photo",
      "fun"
    ],
    skins: [
      {
        unified: "1f3a2",
        native: "🎢"
      }
    ],
    version: 1
  },
  barber: {
    id: "barber",
    name: "Barber Pole",
    keywords: [
      "hair",
      "salon",
      "style"
    ],
    skins: [
      {
        unified: "1f488",
        native: "💈"
      }
    ],
    version: 1
  },
  circus_tent: {
    id: "circus_tent",
    name: "Circus Tent",
    keywords: [
      "festival",
      "carnival",
      "party"
    ],
    skins: [
      {
        unified: "1f3aa",
        native: "🎪"
      }
    ],
    version: 1
  },
  steam_locomotive: {
    id: "steam_locomotive",
    name: "Locomotive",
    keywords: [
      "steam",
      "transportation",
      "vehicle",
      "train"
    ],
    skins: [
      {
        unified: "1f682",
        native: "🚂"
      }
    ],
    version: 1
  },
  railway_car: {
    id: "railway_car",
    name: "Railway Car",
    keywords: [
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f683",
        native: "🚃"
      }
    ],
    version: 1
  },
  bullettrain_side: {
    id: "bullettrain_side",
    name: "High-Speed Train",
    keywords: [
      "bullettrain",
      "side",
      "high",
      "speed",
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f684",
        native: "🚄"
      }
    ],
    version: 1
  },
  bullettrain_front: {
    id: "bullettrain_front",
    name: "Bullet Train",
    keywords: [
      "bullettrain",
      "front",
      "transportation",
      "vehicle",
      "speed",
      "fast",
      "public",
      "travel"
    ],
    skins: [
      {
        unified: "1f685",
        native: "🚅"
      }
    ],
    version: 1
  },
  train2: {
    id: "train2",
    name: "Train",
    keywords: [
      "train2",
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f686",
        native: "🚆"
      }
    ],
    version: 1
  },
  metro: {
    id: "metro",
    name: "Metro",
    keywords: [
      "transportation",
      "blue",
      "square",
      "mrt",
      "underground",
      "tube"
    ],
    skins: [
      {
        unified: "1f687",
        native: "🚇"
      }
    ],
    version: 1
  },
  light_rail: {
    id: "light_rail",
    name: "Light Rail",
    keywords: [
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f688",
        native: "🚈"
      }
    ],
    version: 1
  },
  station: {
    id: "station",
    name: "Station",
    keywords: [
      "transportation",
      "vehicle",
      "public"
    ],
    skins: [
      {
        unified: "1f689",
        native: "🚉"
      }
    ],
    version: 1
  },
  tram: {
    id: "tram",
    name: "Tram",
    keywords: [
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f68a",
        native: "🚊"
      }
    ],
    version: 1
  },
  monorail: {
    id: "monorail",
    name: "Monorail",
    keywords: [
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f69d",
        native: "🚝"
      }
    ],
    version: 1
  },
  mountain_railway: {
    id: "mountain_railway",
    name: "Mountain Railway",
    keywords: [
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f69e",
        native: "🚞"
      }
    ],
    version: 1
  },
  train: {
    id: "train",
    name: "Tram Car",
    keywords: [
      "train",
      "transportation",
      "vehicle",
      "carriage",
      "public",
      "travel"
    ],
    skins: [
      {
        unified: "1f68b",
        native: "🚋"
      }
    ],
    version: 1
  },
  bus: {
    id: "bus",
    name: "Bus",
    keywords: [
      "car",
      "vehicle",
      "transportation"
    ],
    skins: [
      {
        unified: "1f68c",
        native: "🚌"
      }
    ],
    version: 1
  },
  oncoming_bus: {
    id: "oncoming_bus",
    name: "Oncoming Bus",
    keywords: [
      "vehicle",
      "transportation"
    ],
    skins: [
      {
        unified: "1f68d",
        native: "🚍"
      }
    ],
    version: 1
  },
  trolleybus: {
    id: "trolleybus",
    name: "Trolleybus",
    keywords: [
      "bart",
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f68e",
        native: "🚎"
      }
    ],
    version: 1
  },
  minibus: {
    id: "minibus",
    name: "Minibus",
    keywords: [
      "vehicle",
      "car",
      "transportation"
    ],
    skins: [
      {
        unified: "1f690",
        native: "🚐"
      }
    ],
    version: 1
  },
  ambulance: {
    id: "ambulance",
    name: "Ambulance",
    keywords: [
      "health",
      "911",
      "hospital"
    ],
    skins: [
      {
        unified: "1f691",
        native: "🚑"
      }
    ],
    version: 1
  },
  fire_engine: {
    id: "fire_engine",
    name: "Fire Engine",
    keywords: [
      "transportation",
      "cars",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f692",
        native: "🚒"
      }
    ],
    version: 1
  },
  police_car: {
    id: "police_car",
    name: "Police Car",
    keywords: [
      "vehicle",
      "cars",
      "transportation",
      "law",
      "legal",
      "enforcement"
    ],
    skins: [
      {
        unified: "1f693",
        native: "🚓"
      }
    ],
    version: 1
  },
  oncoming_police_car: {
    id: "oncoming_police_car",
    name: "Oncoming Police Car",
    keywords: [
      "vehicle",
      "law",
      "legal",
      "enforcement",
      "911"
    ],
    skins: [
      {
        unified: "1f694",
        native: "🚔"
      }
    ],
    version: 1
  },
  taxi: {
    id: "taxi",
    name: "Taxi",
    keywords: [
      "uber",
      "vehicle",
      "cars",
      "transportation"
    ],
    skins: [
      {
        unified: "1f695",
        native: "🚕"
      }
    ],
    version: 1
  },
  oncoming_taxi: {
    id: "oncoming_taxi",
    name: "Oncoming Taxi",
    keywords: [
      "vehicle",
      "cars",
      "uber"
    ],
    skins: [
      {
        unified: "1f696",
        native: "🚖"
      }
    ],
    version: 1
  },
  car: {
    id: "car",
    name: "Automobile",
    keywords: [
      "car",
      "red",
      "transportation",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f697",
        native: "🚗"
      }
    ],
    version: 1
  },
  oncoming_automobile: {
    id: "oncoming_automobile",
    name: "Oncoming Automobile",
    keywords: [
      "car",
      "vehicle",
      "transportation"
    ],
    skins: [
      {
        unified: "1f698",
        native: "🚘"
      }
    ],
    version: 1
  },
  blue_car: {
    id: "blue_car",
    name: "Recreational Vehicle",
    keywords: [
      "blue",
      "car",
      "sport",
      "utility",
      "transportation"
    ],
    skins: [
      {
        unified: "1f699",
        native: "🚙"
      }
    ],
    version: 1
  },
  pickup_truck: {
    id: "pickup_truck",
    name: "Pickup Truck",
    keywords: [
      "car",
      "transportation"
    ],
    skins: [
      {
        unified: "1f6fb",
        native: "🛻"
      }
    ],
    version: 13
  },
  truck: {
    id: "truck",
    name: "Delivery Truck",
    keywords: [
      "cars",
      "transportation"
    ],
    skins: [
      {
        unified: "1f69a",
        native: "🚚"
      }
    ],
    version: 1
  },
  articulated_lorry: {
    id: "articulated_lorry",
    name: "Articulated Lorry",
    keywords: [
      "vehicle",
      "cars",
      "transportation",
      "express"
    ],
    skins: [
      {
        unified: "1f69b",
        native: "🚛"
      }
    ],
    version: 1
  },
  tractor: {
    id: "tractor",
    name: "Tractor",
    keywords: [
      "vehicle",
      "car",
      "farming",
      "agriculture"
    ],
    skins: [
      {
        unified: "1f69c",
        native: "🚜"
      }
    ],
    version: 1
  },
  racing_car: {
    id: "racing_car",
    name: "Racing Car",
    keywords: [
      "sports",
      "race",
      "fast",
      "formula",
      "f1"
    ],
    skins: [
      {
        unified: "1f3ce-fe0f",
        native: "🏎️"
      }
    ],
    version: 1
  },
  racing_motorcycle: {
    id: "racing_motorcycle",
    name: "Motorcycle",
    keywords: [
      "racing",
      "race",
      "sports",
      "fast"
    ],
    skins: [
      {
        unified: "1f3cd-fe0f",
        native: "🏍️"
      }
    ],
    version: 1
  },
  motor_scooter: {
    id: "motor_scooter",
    name: "Motor Scooter",
    keywords: [
      "vehicle",
      "vespa",
      "sasha"
    ],
    skins: [
      {
        unified: "1f6f5",
        native: "🛵"
      }
    ],
    version: 3
  },
  manual_wheelchair: {
    id: "manual_wheelchair",
    name: "Manual Wheelchair",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9bd",
        native: "🦽"
      }
    ],
    version: 12
  },
  motorized_wheelchair: {
    id: "motorized_wheelchair",
    name: "Motorized Wheelchair",
    keywords: [
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9bc",
        native: "🦼"
      }
    ],
    version: 12
  },
  auto_rickshaw: {
    id: "auto_rickshaw",
    name: "Auto Rickshaw",
    keywords: [
      "move",
      "transportation"
    ],
    skins: [
      {
        unified: "1f6fa",
        native: "🛺"
      }
    ],
    version: 12
  },
  bike: {
    id: "bike",
    name: "Bicycle",
    keywords: [
      "bike",
      "sports",
      "exercise",
      "hipster"
    ],
    skins: [
      {
        unified: "1f6b2",
        native: "🚲"
      }
    ],
    version: 1
  },
  scooter: {
    id: "scooter",
    name: "Scooter",
    keywords: [
      "kick",
      "vehicle",
      "razor"
    ],
    skins: [
      {
        unified: "1f6f4",
        native: "🛴"
      }
    ],
    version: 3
  },
  skateboard: {
    id: "skateboard",
    name: "Skateboard",
    keywords: [
      "board"
    ],
    skins: [
      {
        unified: "1f6f9",
        native: "🛹"
      }
    ],
    version: 11
  },
  roller_skate: {
    id: "roller_skate",
    name: "Roller Skate",
    keywords: [
      "footwear",
      "sports"
    ],
    skins: [
      {
        unified: "1f6fc",
        native: "🛼"
      }
    ],
    version: 13
  },
  busstop: {
    id: "busstop",
    name: "Bus Stop",
    keywords: [
      "busstop",
      "transportation",
      "wait"
    ],
    skins: [
      {
        unified: "1f68f",
        native: "🚏"
      }
    ],
    version: 1
  },
  motorway: {
    id: "motorway",
    name: "Motorway",
    keywords: [
      "road",
      "cupertino",
      "interstate",
      "highway"
    ],
    skins: [
      {
        unified: "1f6e3-fe0f",
        native: "🛣️"
      }
    ],
    version: 1
  },
  railway_track: {
    id: "railway_track",
    name: "Railway Track",
    keywords: [
      "train",
      "transportation"
    ],
    skins: [
      {
        unified: "1f6e4-fe0f",
        native: "🛤️"
      }
    ],
    version: 1
  },
  oil_drum: {
    id: "oil_drum",
    name: "Oil Drum",
    keywords: [
      "barrell"
    ],
    skins: [
      {
        unified: "1f6e2-fe0f",
        native: "🛢️"
      }
    ],
    version: 1
  },
  fuelpump: {
    id: "fuelpump",
    name: "Fuel Pump",
    keywords: [
      "fuelpump",
      "gas",
      "station",
      "petroleum"
    ],
    skins: [
      {
        unified: "26fd",
        native: "⛽"
      }
    ],
    version: 1
  },
  wheel: {
    id: "wheel",
    name: "Wheel",
    keywords: [
      "car",
      "transport"
    ],
    skins: [
      {
        unified: "1f6de",
        native: "🛞"
      }
    ],
    version: 14
  },
  rotating_light: {
    id: "rotating_light",
    name: "Police Car Light",
    keywords: [
      "rotating",
      "ambulance",
      "911",
      "emergency",
      "alert",
      "error",
      "pinged",
      "law",
      "legal"
    ],
    skins: [
      {
        unified: "1f6a8",
        native: "🚨"
      }
    ],
    version: 1
  },
  traffic_light: {
    id: "traffic_light",
    name: "Horizontal Traffic Light",
    keywords: [
      "transportation",
      "signal"
    ],
    skins: [
      {
        unified: "1f6a5",
        native: "🚥"
      }
    ],
    version: 1
  },
  vertical_traffic_light: {
    id: "vertical_traffic_light",
    name: "Vertical Traffic Light",
    keywords: [
      "transportation",
      "driving"
    ],
    skins: [
      {
        unified: "1f6a6",
        native: "🚦"
      }
    ],
    version: 1
  },
  octagonal_sign: {
    id: "octagonal_sign",
    name: "Stop Sign",
    keywords: [
      "octagonal"
    ],
    skins: [
      {
        unified: "1f6d1",
        native: "🛑"
      }
    ],
    version: 3
  },
  construction: {
    id: "construction",
    name: "Construction",
    keywords: [
      "wip",
      "progress",
      "caution",
      "warning"
    ],
    skins: [
      {
        unified: "1f6a7",
        native: "🚧"
      }
    ],
    version: 1
  },
  anchor: {
    id: "anchor",
    name: "Anchor",
    keywords: [
      "ship",
      "ferry",
      "sea",
      "boat"
    ],
    skins: [
      {
        unified: "2693",
        native: "⚓"
      }
    ],
    version: 1
  },
  ring_buoy: {
    id: "ring_buoy",
    name: "Ring Buoy",
    keywords: [
      "life",
      "saver",
      "preserver"
    ],
    skins: [
      {
        unified: "1f6df",
        native: "🛟"
      }
    ],
    version: 14
  },
  boat: {
    id: "boat",
    name: "Sailboat",
    keywords: [
      "boat",
      "ship",
      "summer",
      "transportation",
      "water",
      "sailing"
    ],
    skins: [
      {
        unified: "26f5",
        native: "⛵"
      }
    ],
    version: 1
  },
  canoe: {
    id: "canoe",
    name: "Canoe",
    keywords: [
      "boat",
      "paddle",
      "water",
      "ship"
    ],
    skins: [
      {
        unified: "1f6f6",
        native: "🛶"
      }
    ],
    version: 3
  },
  speedboat: {
    id: "speedboat",
    name: "Speedboat",
    keywords: [
      "ship",
      "transportation",
      "vehicle",
      "summer"
    ],
    skins: [
      {
        unified: "1f6a4",
        native: "🚤"
      }
    ],
    version: 1
  },
  passenger_ship: {
    id: "passenger_ship",
    name: "Passenger Ship",
    keywords: [
      "yacht",
      "cruise",
      "ferry"
    ],
    skins: [
      {
        unified: "1f6f3-fe0f",
        native: "🛳️"
      }
    ],
    version: 1
  },
  ferry: {
    id: "ferry",
    name: "Ferry",
    keywords: [
      "boat",
      "ship",
      "yacht"
    ],
    skins: [
      {
        unified: "26f4-fe0f",
        native: "⛴️"
      }
    ],
    version: 1
  },
  motor_boat: {
    id: "motor_boat",
    name: "Motor Boat",
    keywords: [
      "ship"
    ],
    skins: [
      {
        unified: "1f6e5-fe0f",
        native: "🛥️"
      }
    ],
    version: 1
  },
  ship: {
    id: "ship",
    name: "Ship",
    keywords: [
      "transportation",
      "titanic",
      "deploy"
    ],
    skins: [
      {
        unified: "1f6a2",
        native: "🚢"
      }
    ],
    version: 1
  },
  airplane: {
    id: "airplane",
    name: "Airplane",
    keywords: [
      "vehicle",
      "transportation",
      "flight",
      "fly"
    ],
    skins: [
      {
        unified: "2708-fe0f",
        native: "✈️"
      }
    ],
    version: 1
  },
  small_airplane: {
    id: "small_airplane",
    name: "Small Airplane",
    keywords: [
      "flight",
      "transportation",
      "fly",
      "vehicle"
    ],
    skins: [
      {
        unified: "1f6e9-fe0f",
        native: "🛩️"
      }
    ],
    version: 1
  },
  airplane_departure: {
    id: "airplane_departure",
    name: "Airplane Departure",
    keywords: [
      "airport",
      "flight",
      "landing"
    ],
    skins: [
      {
        unified: "1f6eb",
        native: "🛫"
      }
    ],
    version: 1
  },
  airplane_arriving: {
    id: "airplane_arriving",
    name: "Airplane Arrival",
    keywords: [
      "arriving",
      "airport",
      "flight",
      "boarding"
    ],
    skins: [
      {
        unified: "1f6ec",
        native: "🛬"
      }
    ],
    version: 1
  },
  parachute: {
    id: "parachute",
    name: "Parachute",
    keywords: [
      "fly",
      "glide"
    ],
    skins: [
      {
        unified: "1fa82",
        native: "🪂"
      }
    ],
    version: 12
  },
  seat: {
    id: "seat",
    name: "Seat",
    keywords: [
      "sit",
      "airplane",
      "transport",
      "bus",
      "flight",
      "fly"
    ],
    skins: [
      {
        unified: "1f4ba",
        native: "💺"
      }
    ],
    version: 1
  },
  helicopter: {
    id: "helicopter",
    name: "Helicopter",
    keywords: [
      "transportation",
      "vehicle",
      "fly"
    ],
    skins: [
      {
        unified: "1f681",
        native: "🚁"
      }
    ],
    version: 1
  },
  suspension_railway: {
    id: "suspension_railway",
    name: "Suspension Railway",
    keywords: [
      "vehicle",
      "transportation"
    ],
    skins: [
      {
        unified: "1f69f",
        native: "🚟"
      }
    ],
    version: 1
  },
  mountain_cableway: {
    id: "mountain_cableway",
    name: "Mountain Cableway",
    keywords: [
      "transportation",
      "vehicle",
      "ski"
    ],
    skins: [
      {
        unified: "1f6a0",
        native: "🚠"
      }
    ],
    version: 1
  },
  aerial_tramway: {
    id: "aerial_tramway",
    name: "Aerial Tramway",
    keywords: [
      "transportation",
      "vehicle",
      "ski"
    ],
    skins: [
      {
        unified: "1f6a1",
        native: "🚡"
      }
    ],
    version: 1
  },
  satellite: {
    id: "satellite",
    name: "Satellite",
    keywords: [
      "communication",
      "gps",
      "orbit",
      "spaceflight",
      "NASA",
      "ISS"
    ],
    skins: [
      {
        unified: "1f6f0-fe0f",
        native: "🛰️"
      }
    ],
    version: 1
  },
  rocket: {
    id: "rocket",
    name: "Rocket",
    keywords: [
      "launch",
      "ship",
      "staffmode",
      "NASA",
      "outer",
      "space",
      "fly"
    ],
    skins: [
      {
        unified: "1f680",
        native: "🚀"
      }
    ],
    version: 1
  },
  flying_saucer: {
    id: "flying_saucer",
    name: "Flying Saucer",
    keywords: [
      "transportation",
      "vehicle",
      "ufo"
    ],
    skins: [
      {
        unified: "1f6f8",
        native: "🛸"
      }
    ],
    version: 5
  },
  bellhop_bell: {
    id: "bellhop_bell",
    name: "Bellhop Bell",
    keywords: [
      "service"
    ],
    skins: [
      {
        unified: "1f6ce-fe0f",
        native: "🛎️"
      }
    ],
    version: 1
  },
  luggage: {
    id: "luggage",
    name: "Luggage",
    keywords: [
      "packing",
      "travel"
    ],
    skins: [
      {
        unified: "1f9f3",
        native: "🧳"
      }
    ],
    version: 11
  },
  hourglass: {
    id: "hourglass",
    name: "Hourglass",
    keywords: [
      "done",
      "time",
      "clock",
      "oldschool",
      "limit",
      "exam",
      "quiz",
      "test"
    ],
    skins: [
      {
        unified: "231b",
        native: "⌛"
      }
    ],
    version: 1
  },
  hourglass_flowing_sand: {
    id: "hourglass_flowing_sand",
    name: "Hourglass Not Done",
    keywords: [
      "flowing",
      "sand",
      "oldschool",
      "time",
      "countdown"
    ],
    skins: [
      {
        unified: "23f3",
        native: "⏳"
      }
    ],
    version: 1
  },
  watch: {
    id: "watch",
    name: "Watch",
    keywords: [
      "time",
      "accessories"
    ],
    skins: [
      {
        unified: "231a",
        native: "⌚"
      }
    ],
    version: 1
  },
  alarm_clock: {
    id: "alarm_clock",
    name: "Alarm Clock",
    keywords: [
      "time",
      "wake"
    ],
    skins: [
      {
        unified: "23f0",
        native: "⏰"
      }
    ],
    version: 1
  },
  stopwatch: {
    id: "stopwatch",
    name: "Stopwatch",
    keywords: [
      "time",
      "deadline"
    ],
    skins: [
      {
        unified: "23f1-fe0f",
        native: "⏱️"
      }
    ],
    version: 1
  },
  timer_clock: {
    id: "timer_clock",
    name: "Timer Clock",
    keywords: [
      "alarm"
    ],
    skins: [
      {
        unified: "23f2-fe0f",
        native: "⏲️"
      }
    ],
    version: 1
  },
  mantelpiece_clock: {
    id: "mantelpiece_clock",
    name: "Mantelpiece Clock",
    keywords: [
      "time"
    ],
    skins: [
      {
        unified: "1f570-fe0f",
        native: "🕰️"
      }
    ],
    version: 1
  },
  clock12: {
    id: "clock12",
    name: "Twelve O’clock",
    keywords: [
      "clock12",
      "o",
      "clock",
      "12",
      "00:00",
      "0000",
      "12:00",
      "1200",
      "time",
      "noon",
      "midnight",
      "midday",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f55b",
        native: "🕛"
      }
    ],
    version: 1
  },
  clock1230: {
    id: "clock1230",
    name: "Twelve-Thirty",
    keywords: [
      "clock1230",
      "twelve",
      "thirty",
      "00:30",
      "0030",
      "12:30",
      "1230",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f567",
        native: "🕧"
      }
    ],
    version: 1
  },
  clock1: {
    id: "clock1",
    name: "One O’clock",
    keywords: [
      "clock1",
      "o",
      "clock",
      "1",
      "1:00",
      "100",
      "13:00",
      "1300",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f550",
        native: "🕐"
      }
    ],
    version: 1
  },
  clock130: {
    id: "clock130",
    name: "One-Thirty",
    keywords: [
      "clock130",
      "one",
      "thirty",
      "1:30",
      "130",
      "13:30",
      "1330",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f55c",
        native: "🕜"
      }
    ],
    version: 1
  },
  clock2: {
    id: "clock2",
    name: "Two O’clock",
    keywords: [
      "clock2",
      "o",
      "clock",
      "2",
      "2:00",
      "200",
      "14:00",
      "1400",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f551",
        native: "🕑"
      }
    ],
    version: 1
  },
  clock230: {
    id: "clock230",
    name: "Two-Thirty",
    keywords: [
      "clock230",
      "two",
      "thirty",
      "2:30",
      "230",
      "14:30",
      "1430",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f55d",
        native: "🕝"
      }
    ],
    version: 1
  },
  clock3: {
    id: "clock3",
    name: "Three O’clock",
    keywords: [
      "clock3",
      "o",
      "clock",
      "3",
      "3:00",
      "300",
      "15:00",
      "1500",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f552",
        native: "🕒"
      }
    ],
    version: 1
  },
  clock330: {
    id: "clock330",
    name: "Three-Thirty",
    keywords: [
      "clock330",
      "three",
      "thirty",
      "3:30",
      "330",
      "15:30",
      "1530",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f55e",
        native: "🕞"
      }
    ],
    version: 1
  },
  clock4: {
    id: "clock4",
    name: "Four O’clock",
    keywords: [
      "clock4",
      "o",
      "clock",
      "4",
      "4:00",
      "400",
      "16:00",
      "1600",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f553",
        native: "🕓"
      }
    ],
    version: 1
  },
  clock430: {
    id: "clock430",
    name: "Four-Thirty",
    keywords: [
      "clock430",
      "four",
      "thirty",
      "4:30",
      "430",
      "16:30",
      "1630",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f55f",
        native: "🕟"
      }
    ],
    version: 1
  },
  clock5: {
    id: "clock5",
    name: "Five O’clock",
    keywords: [
      "clock5",
      "o",
      "clock",
      "5",
      "5:00",
      "500",
      "17:00",
      "1700",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f554",
        native: "🕔"
      }
    ],
    version: 1
  },
  clock530: {
    id: "clock530",
    name: "Five-Thirty",
    keywords: [
      "clock530",
      "five",
      "thirty",
      "5:30",
      "530",
      "17:30",
      "1730",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f560",
        native: "🕠"
      }
    ],
    version: 1
  },
  clock6: {
    id: "clock6",
    name: "Six O’clock",
    keywords: [
      "clock6",
      "o",
      "clock",
      "6",
      "6:00",
      "600",
      "18:00",
      "1800",
      "time",
      "late",
      "early",
      "schedule",
      "dawn",
      "dusk"
    ],
    skins: [
      {
        unified: "1f555",
        native: "🕕"
      }
    ],
    version: 1
  },
  clock630: {
    id: "clock630",
    name: "Six-Thirty",
    keywords: [
      "clock630",
      "six",
      "thirty",
      "6:30",
      "630",
      "18:30",
      "1830",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f561",
        native: "🕡"
      }
    ],
    version: 1
  },
  clock7: {
    id: "clock7",
    name: "Seven O’clock",
    keywords: [
      "clock7",
      "o",
      "clock",
      "7",
      "7:00",
      "700",
      "19:00",
      "1900",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f556",
        native: "🕖"
      }
    ],
    version: 1
  },
  clock730: {
    id: "clock730",
    name: "Seven-Thirty",
    keywords: [
      "clock730",
      "seven",
      "thirty",
      "7:30",
      "730",
      "19:30",
      "1930",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f562",
        native: "🕢"
      }
    ],
    version: 1
  },
  clock8: {
    id: "clock8",
    name: "Eight O’clock",
    keywords: [
      "clock8",
      "o",
      "clock",
      "8",
      "8:00",
      "800",
      "20:00",
      "2000",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f557",
        native: "🕗"
      }
    ],
    version: 1
  },
  clock830: {
    id: "clock830",
    name: "Eight-Thirty",
    keywords: [
      "clock830",
      "eight",
      "thirty",
      "8:30",
      "830",
      "20:30",
      "2030",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f563",
        native: "🕣"
      }
    ],
    version: 1
  },
  clock9: {
    id: "clock9",
    name: "Nine O’clock",
    keywords: [
      "clock9",
      "o",
      "clock",
      "9",
      "9:00",
      "900",
      "21:00",
      "2100",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f558",
        native: "🕘"
      }
    ],
    version: 1
  },
  clock930: {
    id: "clock930",
    name: "Nine-Thirty",
    keywords: [
      "clock930",
      "nine",
      "thirty",
      "9:30",
      "930",
      "21:30",
      "2130",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f564",
        native: "🕤"
      }
    ],
    version: 1
  },
  clock10: {
    id: "clock10",
    name: "Ten O’clock",
    keywords: [
      "clock10",
      "o",
      "clock",
      "10",
      "10:00",
      "1000",
      "22:00",
      "2200",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f559",
        native: "🕙"
      }
    ],
    version: 1
  },
  clock1030: {
    id: "clock1030",
    name: "Ten-Thirty",
    keywords: [
      "clock1030",
      "ten",
      "thirty",
      "10:30",
      "1030",
      "22:30",
      "2230",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f565",
        native: "🕥"
      }
    ],
    version: 1
  },
  clock11: {
    id: "clock11",
    name: "Eleven O’clock",
    keywords: [
      "clock11",
      "o",
      "clock",
      "11",
      "11:00",
      "1100",
      "23:00",
      "2300",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f55a",
        native: "🕚"
      }
    ],
    version: 1
  },
  clock1130: {
    id: "clock1130",
    name: "Eleven-Thirty",
    keywords: [
      "clock1130",
      "eleven",
      "thirty",
      "11:30",
      "1130",
      "23:30",
      "2330",
      "time",
      "late",
      "early",
      "schedule"
    ],
    skins: [
      {
        unified: "1f566",
        native: "🕦"
      }
    ],
    version: 1
  },
  new_moon: {
    id: "new_moon",
    name: "New Moon",
    keywords: [
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f311",
        native: "🌑"
      }
    ],
    version: 1
  },
  waxing_crescent_moon: {
    id: "waxing_crescent_moon",
    name: "Waxing Crescent Moon",
    keywords: [
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f312",
        native: "🌒"
      }
    ],
    version: 1
  },
  first_quarter_moon: {
    id: "first_quarter_moon",
    name: "First Quarter Moon",
    keywords: [
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f313",
        native: "🌓"
      }
    ],
    version: 1
  },
  moon: {
    id: "moon",
    name: "Waxing Gibbous Moon",
    keywords: [
      "nature",
      "night",
      "sky",
      "gray",
      "twilight",
      "planet",
      "space",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f314",
        native: "🌔"
      }
    ],
    version: 1
  },
  full_moon: {
    id: "full_moon",
    name: "Full Moon",
    keywords: [
      "nature",
      "yellow",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f315",
        native: "🌕"
      }
    ],
    version: 1
  },
  waning_gibbous_moon: {
    id: "waning_gibbous_moon",
    name: "Waning Gibbous Moon",
    keywords: [
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep",
      "waxing"
    ],
    skins: [
      {
        unified: "1f316",
        native: "🌖"
      }
    ],
    version: 1
  },
  last_quarter_moon: {
    id: "last_quarter_moon",
    name: "Last Quarter Moon",
    keywords: [
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f317",
        native: "🌗"
      }
    ],
    version: 1
  },
  waning_crescent_moon: {
    id: "waning_crescent_moon",
    name: "Waning Crescent Moon",
    keywords: [
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f318",
        native: "🌘"
      }
    ],
    version: 1
  },
  crescent_moon: {
    id: "crescent_moon",
    name: "Crescent Moon",
    keywords: [
      "night",
      "sleep",
      "sky",
      "evening",
      "magic"
    ],
    skins: [
      {
        unified: "1f319",
        native: "🌙"
      }
    ],
    version: 1
  },
  new_moon_with_face: {
    id: "new_moon_with_face",
    name: "New Moon Face",
    keywords: [
      "with",
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f31a",
        native: "🌚"
      }
    ],
    version: 1
  },
  first_quarter_moon_with_face: {
    id: "first_quarter_moon_with_face",
    name: "First Quarter Moon Face",
    keywords: [
      "with",
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f31b",
        native: "🌛"
      }
    ],
    version: 1
  },
  last_quarter_moon_with_face: {
    id: "last_quarter_moon_with_face",
    name: "Last Quarter Moon Face",
    keywords: [
      "with",
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f31c",
        native: "🌜"
      }
    ],
    version: 1
  },
  thermometer: {
    id: "thermometer",
    name: "Thermometer",
    keywords: [
      "weather",
      "temperature",
      "hot",
      "cold"
    ],
    skins: [
      {
        unified: "1f321-fe0f",
        native: "🌡️"
      }
    ],
    version: 1
  },
  sunny: {
    id: "sunny",
    name: "Sun",
    keywords: [
      "sunny",
      "weather",
      "nature",
      "brightness",
      "summer",
      "beach",
      "spring"
    ],
    skins: [
      {
        unified: "2600-fe0f",
        native: "☀️"
      }
    ],
    version: 1
  },
  full_moon_with_face: {
    id: "full_moon_with_face",
    name: "Full Moon Face",
    keywords: [
      "with",
      "nature",
      "twilight",
      "planet",
      "space",
      "night",
      "evening",
      "sleep"
    ],
    skins: [
      {
        unified: "1f31d",
        native: "🌝"
      }
    ],
    version: 1
  },
  sun_with_face: {
    id: "sun_with_face",
    name: "Sun with Face",
    keywords: [
      "nature",
      "morning",
      "sky"
    ],
    skins: [
      {
        unified: "1f31e",
        native: "🌞"
      }
    ],
    version: 1
  },
  ringed_planet: {
    id: "ringed_planet",
    name: "Ringed Planet",
    keywords: [
      "outerspace"
    ],
    skins: [
      {
        unified: "1fa90",
        native: "🪐"
      }
    ],
    version: 12
  },
  star: {
    id: "star",
    name: "Star",
    keywords: [
      "night",
      "yellow"
    ],
    skins: [
      {
        unified: "2b50",
        native: "⭐"
      }
    ],
    version: 1
  },
  star2: {
    id: "star2",
    name: "Glowing Star",
    keywords: [
      "star2",
      "night",
      "sparkle",
      "awesome",
      "good",
      "magic"
    ],
    skins: [
      {
        unified: "1f31f",
        native: "🌟"
      }
    ],
    version: 1
  },
  stars: {
    id: "stars",
    name: "Shooting Star",
    keywords: [
      "stars",
      "night",
      "photo"
    ],
    skins: [
      {
        unified: "1f320",
        native: "🌠"
      }
    ],
    version: 1
  },
  milky_way: {
    id: "milky_way",
    name: "Milky Way",
    keywords: [
      "photo",
      "space",
      "stars"
    ],
    skins: [
      {
        unified: "1f30c",
        native: "🌌"
      }
    ],
    version: 1
  },
  cloud: {
    id: "cloud",
    name: "Cloud",
    keywords: [
      "weather",
      "sky"
    ],
    skins: [
      {
        unified: "2601-fe0f",
        native: "☁️"
      }
    ],
    version: 1
  },
  partly_sunny: {
    id: "partly_sunny",
    name: "Sun Behind Cloud",
    keywords: [
      "partly",
      "sunny",
      "weather",
      "nature",
      "cloudy",
      "morning",
      "fall",
      "spring"
    ],
    skins: [
      {
        unified: "26c5",
        native: "⛅"
      }
    ],
    version: 1
  },
  thunder_cloud_and_rain: {
    id: "thunder_cloud_and_rain",
    name: "Cloud with Lightning and Rain",
    keywords: [
      "thunder",
      "weather"
    ],
    skins: [
      {
        unified: "26c8-fe0f",
        native: "⛈️"
      }
    ],
    version: 1
  },
  mostly_sunny: {
    id: "mostly_sunny",
    name: "Sun Behind Small Cloud",
    keywords: [
      "mostly",
      "sunny",
      "weather"
    ],
    skins: [
      {
        unified: "1f324-fe0f",
        native: "🌤️"
      }
    ],
    version: 1
  },
  barely_sunny: {
    id: "barely_sunny",
    name: "Sun Behind Large Cloud",
    keywords: [
      "barely",
      "sunny",
      "weather"
    ],
    skins: [
      {
        unified: "1f325-fe0f",
        native: "🌥️"
      }
    ],
    version: 1
  },
  partly_sunny_rain: {
    id: "partly_sunny_rain",
    name: "Sun Behind Rain Cloud",
    keywords: [
      "partly",
      "sunny",
      "weather"
    ],
    skins: [
      {
        unified: "1f326-fe0f",
        native: "🌦️"
      }
    ],
    version: 1
  },
  rain_cloud: {
    id: "rain_cloud",
    name: "Cloud with Rain",
    keywords: [
      "weather"
    ],
    skins: [
      {
        unified: "1f327-fe0f",
        native: "🌧️"
      }
    ],
    version: 1
  },
  snow_cloud: {
    id: "snow_cloud",
    name: "Cloud with Snow",
    keywords: [
      "weather"
    ],
    skins: [
      {
        unified: "1f328-fe0f",
        native: "🌨️"
      }
    ],
    version: 1
  },
  lightning: {
    id: "lightning",
    name: "Cloud with Lightning",
    keywords: [
      "weather",
      "thunder"
    ],
    skins: [
      {
        unified: "1f329-fe0f",
        native: "🌩️"
      }
    ],
    version: 1
  },
  tornado: {
    id: "tornado",
    name: "Tornado",
    keywords: [
      "cloud",
      "weather",
      "cyclone",
      "twister"
    ],
    skins: [
      {
        unified: "1f32a-fe0f",
        native: "🌪️"
      }
    ],
    version: 1
  },
  fog: {
    id: "fog",
    name: "Fog",
    keywords: [
      "weather"
    ],
    skins: [
      {
        unified: "1f32b-fe0f",
        native: "🌫️"
      }
    ],
    version: 1
  },
  wind_blowing_face: {
    id: "wind_blowing_face",
    name: "Wind Face",
    keywords: [
      "blowing",
      "gust",
      "air"
    ],
    skins: [
      {
        unified: "1f32c-fe0f",
        native: "🌬️"
      }
    ],
    version: 1
  },
  cyclone: {
    id: "cyclone",
    name: "Cyclone",
    keywords: [
      "weather",
      "swirl",
      "blue",
      "cloud",
      "vortex",
      "spiral",
      "whirlpool",
      "spin",
      "tornado",
      "hurricane",
      "typhoon"
    ],
    skins: [
      {
        unified: "1f300",
        native: "🌀"
      }
    ],
    version: 1
  },
  rainbow: {
    id: "rainbow",
    name: "Rainbow",
    keywords: [
      "nature",
      "happy",
      "unicorn",
      "face",
      "photo",
      "sky",
      "spring"
    ],
    skins: [
      {
        unified: "1f308",
        native: "🌈"
      }
    ],
    version: 1
  },
  closed_umbrella: {
    id: "closed_umbrella",
    name: "Closed Umbrella",
    keywords: [
      "weather",
      "rain",
      "drizzle"
    ],
    skins: [
      {
        unified: "1f302",
        native: "🌂"
      }
    ],
    version: 1
  },
  umbrella: {
    id: "umbrella",
    name: "Umbrella",
    keywords: [
      "weather",
      "spring"
    ],
    skins: [
      {
        unified: "2602-fe0f",
        native: "☂️"
      }
    ],
    version: 1
  },
  umbrella_with_rain_drops: {
    id: "umbrella_with_rain_drops",
    name: "Umbrella with Rain Drops",
    keywords: [
      "rainy",
      "weather",
      "spring"
    ],
    skins: [
      {
        unified: "2614",
        native: "☔"
      }
    ],
    version: 1
  },
  umbrella_on_ground: {
    id: "umbrella_on_ground",
    name: "Umbrella on Ground",
    keywords: [
      "weather",
      "summer"
    ],
    skins: [
      {
        unified: "26f1-fe0f",
        native: "⛱️"
      }
    ],
    version: 1
  },
  zap: {
    id: "zap",
    name: "High Voltage",
    keywords: [
      "zap",
      "thunder",
      "weather",
      "lightning",
      "bolt",
      "fast"
    ],
    skins: [
      {
        unified: "26a1",
        native: "⚡"
      }
    ],
    version: 1
  },
  snowflake: {
    id: "snowflake",
    name: "Snowflake",
    keywords: [
      "winter",
      "season",
      "cold",
      "weather",
      "christmas",
      "xmas"
    ],
    skins: [
      {
        unified: "2744-fe0f",
        native: "❄️"
      }
    ],
    version: 1
  },
  snowman: {
    id: "snowman",
    name: "Snowman",
    keywords: [
      "winter",
      "season",
      "cold",
      "weather",
      "christmas",
      "xmas",
      "frozen"
    ],
    skins: [
      {
        unified: "2603-fe0f",
        native: "☃️"
      }
    ],
    version: 1
  },
  snowman_without_snow: {
    id: "snowman_without_snow",
    name: "Snowman Without Snow",
    keywords: [
      "winter",
      "season",
      "cold",
      "weather",
      "christmas",
      "xmas",
      "frozen"
    ],
    skins: [
      {
        unified: "26c4",
        native: "⛄"
      }
    ],
    version: 1
  },
  comet: {
    id: "comet",
    name: "Comet",
    keywords: [
      "space"
    ],
    skins: [
      {
        unified: "2604-fe0f",
        native: "☄️"
      }
    ],
    version: 1
  },
  fire: {
    id: "fire",
    name: "Fire",
    keywords: [
      "hot",
      "cook",
      "flame"
    ],
    skins: [
      {
        unified: "1f525",
        native: "🔥"
      }
    ],
    version: 1
  },
  droplet: {
    id: "droplet",
    name: "Droplet",
    keywords: [
      "water",
      "drip",
      "faucet",
      "spring"
    ],
    skins: [
      {
        unified: "1f4a7",
        native: "💧"
      }
    ],
    version: 1
  },
  ocean: {
    id: "ocean",
    name: "Water Wave",
    keywords: [
      "ocean",
      "sea",
      "nature",
      "tsunami",
      "disaster"
    ],
    skins: [
      {
        unified: "1f30a",
        native: "🌊"
      }
    ],
    version: 1
  },
  jack_o_lantern: {
    id: "jack_o_lantern",
    name: "Jack-O-Lantern",
    keywords: [
      "jack",
      "o",
      "lantern",
      "halloween",
      "light",
      "pumpkin",
      "creepy",
      "fall"
    ],
    skins: [
      {
        unified: "1f383",
        native: "🎃"
      }
    ],
    version: 1
  },
  christmas_tree: {
    id: "christmas_tree",
    name: "Christmas Tree",
    keywords: [
      "festival",
      "vacation",
      "december",
      "xmas",
      "celebration"
    ],
    skins: [
      {
        unified: "1f384",
        native: "🎄"
      }
    ],
    version: 1
  },
  fireworks: {
    id: "fireworks",
    name: "Fireworks",
    keywords: [
      "photo",
      "festival",
      "carnival",
      "congratulations"
    ],
    skins: [
      {
        unified: "1f386",
        native: "🎆"
      }
    ],
    version: 1
  },
  sparkler: {
    id: "sparkler",
    name: "Sparkler",
    keywords: [
      "stars",
      "night",
      "shine"
    ],
    skins: [
      {
        unified: "1f387",
        native: "🎇"
      }
    ],
    version: 1
  },
  firecracker: {
    id: "firecracker",
    name: "Firecracker",
    keywords: [
      "dynamite",
      "boom",
      "explode",
      "explosion",
      "explosive"
    ],
    skins: [
      {
        unified: "1f9e8",
        native: "🧨"
      }
    ],
    version: 11
  },
  sparkles: {
    id: "sparkles",
    name: "Sparkles",
    keywords: [
      "stars",
      "shine",
      "shiny",
      "cool",
      "awesome",
      "good",
      "magic"
    ],
    skins: [
      {
        unified: "2728",
        native: "✨"
      }
    ],
    version: 1
  },
  balloon: {
    id: "balloon",
    name: "Balloon",
    keywords: [
      "party",
      "celebration",
      "birthday",
      "circus"
    ],
    skins: [
      {
        unified: "1f388",
        native: "🎈"
      }
    ],
    version: 1
  },
  tada: {
    id: "tada",
    name: "Party Popper",
    keywords: [
      "tada",
      "congratulations",
      "birthday",
      "magic",
      "circus",
      "celebration"
    ],
    skins: [
      {
        unified: "1f389",
        native: "🎉"
      }
    ],
    version: 1
  },
  confetti_ball: {
    id: "confetti_ball",
    name: "Confetti Ball",
    keywords: [
      "festival",
      "party",
      "birthday",
      "circus"
    ],
    skins: [
      {
        unified: "1f38a",
        native: "🎊"
      }
    ],
    version: 1
  },
  tanabata_tree: {
    id: "tanabata_tree",
    name: "Tanabata Tree",
    keywords: [
      "plant",
      "nature",
      "branch",
      "summer",
      "bamboo",
      "wish",
      "star",
      "festival",
      "tanzaku"
    ],
    skins: [
      {
        unified: "1f38b",
        native: "🎋"
      }
    ],
    version: 1
  },
  bamboo: {
    id: "bamboo",
    name: "Pine Decoration",
    keywords: [
      "bamboo",
      "japanese",
      "plant",
      "nature",
      "vegetable",
      "panda",
      "new",
      "years"
    ],
    skins: [
      {
        unified: "1f38d",
        native: "🎍"
      }
    ],
    version: 1
  },
  dolls: {
    id: "dolls",
    name: "Japanese Dolls",
    keywords: [
      "toy",
      "kimono"
    ],
    skins: [
      {
        unified: "1f38e",
        native: "🎎"
      }
    ],
    version: 1
  },
  flags: {
    id: "flags",
    name: "Carp Streamer",
    keywords: [
      "flags",
      "fish",
      "japanese",
      "koinobori",
      "banner"
    ],
    skins: [
      {
        unified: "1f38f",
        native: "🎏"
      }
    ],
    version: 1
  },
  wind_chime: {
    id: "wind_chime",
    name: "Wind Chime",
    keywords: [
      "nature",
      "ding",
      "spring",
      "bell"
    ],
    skins: [
      {
        unified: "1f390",
        native: "🎐"
      }
    ],
    version: 1
  },
  rice_scene: {
    id: "rice_scene",
    name: "Moon Viewing Ceremony",
    keywords: [
      "rice",
      "scene",
      "photo",
      "japan",
      "asia",
      "tsukimi"
    ],
    skins: [
      {
        unified: "1f391",
        native: "🎑"
      }
    ],
    version: 1
  },
  red_envelope: {
    id: "red_envelope",
    name: "Red Envelope",
    keywords: [
      "gift"
    ],
    skins: [
      {
        unified: "1f9e7",
        native: "🧧"
      }
    ],
    version: 11
  },
  ribbon: {
    id: "ribbon",
    name: "Ribbon",
    keywords: [
      "decoration",
      "pink",
      "girl",
      "bowtie"
    ],
    skins: [
      {
        unified: "1f380",
        native: "🎀"
      }
    ],
    version: 1
  },
  gift: {
    id: "gift",
    name: "Wrapped Gift",
    keywords: [
      "present",
      "birthday",
      "christmas",
      "xmas"
    ],
    skins: [
      {
        unified: "1f381",
        native: "🎁"
      }
    ],
    version: 1
  },
  reminder_ribbon: {
    id: "reminder_ribbon",
    name: "Reminder Ribbon",
    keywords: [
      "sports",
      "cause",
      "support",
      "awareness"
    ],
    skins: [
      {
        unified: "1f397-fe0f",
        native: "🎗️"
      }
    ],
    version: 1
  },
  admission_tickets: {
    id: "admission_tickets",
    name: "Admission Tickets",
    keywords: [
      "sports",
      "concert",
      "entrance"
    ],
    skins: [
      {
        unified: "1f39f-fe0f",
        native: "🎟️"
      }
    ],
    version: 1
  },
  ticket: {
    id: "ticket",
    name: "Ticket",
    keywords: [
      "event",
      "concert",
      "pass"
    ],
    skins: [
      {
        unified: "1f3ab",
        native: "🎫"
      }
    ],
    version: 1
  },
  medal: {
    id: "medal",
    name: "Military Medal",
    keywords: [
      "award",
      "winning",
      "army"
    ],
    skins: [
      {
        unified: "1f396-fe0f",
        native: "🎖️"
      }
    ],
    version: 1
  },
  trophy: {
    id: "trophy",
    name: "Trophy",
    keywords: [
      "win",
      "award",
      "contest",
      "place",
      "ftw",
      "ceremony"
    ],
    skins: [
      {
        unified: "1f3c6",
        native: "🏆"
      }
    ],
    version: 1
  },
  sports_medal: {
    id: "sports_medal",
    name: "Sports Medal",
    keywords: [
      "award",
      "winning"
    ],
    skins: [
      {
        unified: "1f3c5",
        native: "🏅"
      }
    ],
    version: 1
  },
  first_place_medal: {
    id: "first_place_medal",
    name: "1st Place Medal",
    keywords: [
      "first",
      "award",
      "winning"
    ],
    skins: [
      {
        unified: "1f947",
        native: "🥇"
      }
    ],
    version: 3
  },
  second_place_medal: {
    id: "second_place_medal",
    name: "2nd Place Medal",
    keywords: [
      "second",
      "award"
    ],
    skins: [
      {
        unified: "1f948",
        native: "🥈"
      }
    ],
    version: 3
  },
  third_place_medal: {
    id: "third_place_medal",
    name: "3rd Place Medal",
    keywords: [
      "third",
      "award"
    ],
    skins: [
      {
        unified: "1f949",
        native: "🥉"
      }
    ],
    version: 3
  },
  soccer: {
    id: "soccer",
    name: "Soccer Ball",
    keywords: [
      "sports",
      "football"
    ],
    skins: [
      {
        unified: "26bd",
        native: "⚽"
      }
    ],
    version: 1
  },
  baseball: {
    id: "baseball",
    name: "Baseball",
    keywords: [
      "sports",
      "balls"
    ],
    skins: [
      {
        unified: "26be",
        native: "⚾"
      }
    ],
    version: 1
  },
  softball: {
    id: "softball",
    name: "Softball",
    keywords: [
      "sports",
      "balls"
    ],
    skins: [
      {
        unified: "1f94e",
        native: "🥎"
      }
    ],
    version: 11
  },
  basketball: {
    id: "basketball",
    name: "Basketball",
    keywords: [
      "sports",
      "balls",
      "NBA"
    ],
    skins: [
      {
        unified: "1f3c0",
        native: "🏀"
      }
    ],
    version: 1
  },
  volleyball: {
    id: "volleyball",
    name: "Volleyball",
    keywords: [
      "sports",
      "balls"
    ],
    skins: [
      {
        unified: "1f3d0",
        native: "🏐"
      }
    ],
    version: 1
  },
  football: {
    id: "football",
    name: "American Football",
    keywords: [
      "sports",
      "balls",
      "NFL"
    ],
    skins: [
      {
        unified: "1f3c8",
        native: "🏈"
      }
    ],
    version: 1
  },
  rugby_football: {
    id: "rugby_football",
    name: "Rugby Football",
    keywords: [
      "sports",
      "team"
    ],
    skins: [
      {
        unified: "1f3c9",
        native: "🏉"
      }
    ],
    version: 1
  },
  tennis: {
    id: "tennis",
    name: "Tennis",
    keywords: [
      "sports",
      "balls",
      "green"
    ],
    skins: [
      {
        unified: "1f3be",
        native: "🎾"
      }
    ],
    version: 1
  },
  flying_disc: {
    id: "flying_disc",
    name: "Flying Disc",
    keywords: [
      "sports",
      "frisbee",
      "ultimate"
    ],
    skins: [
      {
        unified: "1f94f",
        native: "🥏"
      }
    ],
    version: 11
  },
  bowling: {
    id: "bowling",
    name: "Bowling",
    keywords: [
      "sports",
      "fun",
      "play"
    ],
    skins: [
      {
        unified: "1f3b3",
        native: "🎳"
      }
    ],
    version: 1
  },
  cricket_bat_and_ball: {
    id: "cricket_bat_and_ball",
    name: "Cricket Game",
    keywords: [
      "bat",
      "and",
      "ball",
      "sports"
    ],
    skins: [
      {
        unified: "1f3cf",
        native: "🏏"
      }
    ],
    version: 1
  },
  field_hockey_stick_and_ball: {
    id: "field_hockey_stick_and_ball",
    name: "Field Hockey",
    keywords: [
      "stick",
      "and",
      "ball",
      "sports"
    ],
    skins: [
      {
        unified: "1f3d1",
        native: "🏑"
      }
    ],
    version: 1
  },
  ice_hockey_stick_and_puck: {
    id: "ice_hockey_stick_and_puck",
    name: "Ice Hockey",
    keywords: [
      "stick",
      "and",
      "puck",
      "sports"
    ],
    skins: [
      {
        unified: "1f3d2",
        native: "🏒"
      }
    ],
    version: 1
  },
  lacrosse: {
    id: "lacrosse",
    name: "Lacrosse",
    keywords: [
      "sports",
      "ball",
      "stick"
    ],
    skins: [
      {
        unified: "1f94d",
        native: "🥍"
      }
    ],
    version: 11
  },
  table_tennis_paddle_and_ball: {
    id: "table_tennis_paddle_and_ball",
    name: "Ping Pong",
    keywords: [
      "table",
      "tennis",
      "paddle",
      "and",
      "ball",
      "sports",
      "pingpong"
    ],
    skins: [
      {
        unified: "1f3d3",
        native: "🏓"
      }
    ],
    version: 1
  },
  badminton_racquet_and_shuttlecock: {
    id: "badminton_racquet_and_shuttlecock",
    name: "Badminton",
    keywords: [
      "racquet",
      "and",
      "shuttlecock",
      "sports"
    ],
    skins: [
      {
        unified: "1f3f8",
        native: "🏸"
      }
    ],
    version: 1
  },
  boxing_glove: {
    id: "boxing_glove",
    name: "Boxing Glove",
    keywords: [
      "sports",
      "fighting"
    ],
    skins: [
      {
        unified: "1f94a",
        native: "🥊"
      }
    ],
    version: 3
  },
  martial_arts_uniform: {
    id: "martial_arts_uniform",
    name: "Martial Arts Uniform",
    keywords: [
      "judo",
      "karate",
      "taekwondo"
    ],
    skins: [
      {
        unified: "1f94b",
        native: "🥋"
      }
    ],
    version: 3
  },
  goal_net: {
    id: "goal_net",
    name: "Goal Net",
    keywords: [
      "sports"
    ],
    skins: [
      {
        unified: "1f945",
        native: "🥅"
      }
    ],
    version: 3
  },
  golf: {
    id: "golf",
    name: "Flag in Hole",
    keywords: [
      "golf",
      "sports",
      "business",
      "summer"
    ],
    skins: [
      {
        unified: "26f3",
        native: "⛳"
      }
    ],
    version: 1
  },
  ice_skate: {
    id: "ice_skate",
    name: "Ice Skate",
    keywords: [
      "sports"
    ],
    skins: [
      {
        unified: "26f8-fe0f",
        native: "⛸️"
      }
    ],
    version: 1
  },
  fishing_pole_and_fish: {
    id: "fishing_pole_and_fish",
    name: "Fishing Pole",
    keywords: [
      "and",
      "fish",
      "food",
      "hobby",
      "summer"
    ],
    skins: [
      {
        unified: "1f3a3",
        native: "🎣"
      }
    ],
    version: 1
  },
  diving_mask: {
    id: "diving_mask",
    name: "Diving Mask",
    keywords: [
      "sport",
      "ocean"
    ],
    skins: [
      {
        unified: "1f93f",
        native: "🤿"
      }
    ],
    version: 12
  },
  running_shirt_with_sash: {
    id: "running_shirt_with_sash",
    name: "Running Shirt",
    keywords: [
      "with",
      "sash",
      "play",
      "pageant"
    ],
    skins: [
      {
        unified: "1f3bd",
        native: "🎽"
      }
    ],
    version: 1
  },
  ski: {
    id: "ski",
    name: "Skis",
    keywords: [
      "ski",
      "sports",
      "winter",
      "cold",
      "snow"
    ],
    skins: [
      {
        unified: "1f3bf",
        native: "🎿"
      }
    ],
    version: 1
  },
  sled: {
    id: "sled",
    name: "Sled",
    keywords: [
      "sleigh",
      "luge",
      "toboggan"
    ],
    skins: [
      {
        unified: "1f6f7",
        native: "🛷"
      }
    ],
    version: 5
  },
  curling_stone: {
    id: "curling_stone",
    name: "Curling Stone",
    keywords: [
      "sports"
    ],
    skins: [
      {
        unified: "1f94c",
        native: "🥌"
      }
    ],
    version: 5
  },
  dart: {
    id: "dart",
    name: "Bullseye",
    keywords: [
      "dart",
      "direct",
      "hit",
      "game",
      "play",
      "bar",
      "target"
    ],
    skins: [
      {
        unified: "1f3af",
        native: "🎯"
      }
    ],
    version: 1
  },
  "yo-yo": {
    id: "yo-yo",
    name: "Yo-Yo",
    keywords: [
      "yo",
      "toy"
    ],
    skins: [
      {
        unified: "1fa80",
        native: "🪀"
      }
    ],
    version: 12
  },
  kite: {
    id: "kite",
    name: "Kite",
    keywords: [
      "wind",
      "fly"
    ],
    skins: [
      {
        unified: "1fa81",
        native: "🪁"
      }
    ],
    version: 12
  },
  gun: {
    id: "gun",
    name: "Pistol",
    keywords: [
      "gun",
      "violence",
      "weapon",
      "revolver"
    ],
    skins: [
      {
        unified: "1f52b",
        native: "🔫"
      }
    ],
    version: 1
  },
  "8ball": {
    id: "8ball",
    name: "Billiards",
    keywords: [
      "8ball",
      "pool",
      "8",
      "ball",
      "hobby",
      "game",
      "luck",
      "magic"
    ],
    skins: [
      {
        unified: "1f3b1",
        native: "🎱"
      }
    ],
    version: 1
  },
  crystal_ball: {
    id: "crystal_ball",
    name: "Crystal Ball",
    keywords: [
      "disco",
      "party",
      "magic",
      "circus",
      "fortune",
      "teller"
    ],
    skins: [
      {
        unified: "1f52e",
        native: "🔮"
      }
    ],
    version: 1
  },
  magic_wand: {
    id: "magic_wand",
    name: "Magic Wand",
    keywords: [
      "supernature",
      "power"
    ],
    skins: [
      {
        unified: "1fa84",
        native: "🪄"
      }
    ],
    version: 13
  },
  video_game: {
    id: "video_game",
    name: "Video Game",
    keywords: [
      "play",
      "console",
      "PS4",
      "controller"
    ],
    skins: [
      {
        unified: "1f3ae",
        native: "🎮"
      }
    ],
    version: 1
  },
  joystick: {
    id: "joystick",
    name: "Joystick",
    keywords: [
      "game",
      "play"
    ],
    skins: [
      {
        unified: "1f579-fe0f",
        native: "🕹️"
      }
    ],
    version: 1
  },
  slot_machine: {
    id: "slot_machine",
    name: "Slot Machine",
    keywords: [
      "bet",
      "gamble",
      "vegas",
      "fruit",
      "luck",
      "casino"
    ],
    skins: [
      {
        unified: "1f3b0",
        native: "🎰"
      }
    ],
    version: 1
  },
  game_die: {
    id: "game_die",
    name: "Game Die",
    keywords: [
      "dice",
      "random",
      "tabletop",
      "play",
      "luck"
    ],
    skins: [
      {
        unified: "1f3b2",
        native: "🎲"
      }
    ],
    version: 1
  },
  jigsaw: {
    id: "jigsaw",
    name: "Puzzle Piece",
    keywords: [
      "jigsaw",
      "interlocking"
    ],
    skins: [
      {
        unified: "1f9e9",
        native: "🧩"
      }
    ],
    version: 11
  },
  teddy_bear: {
    id: "teddy_bear",
    name: "Teddy Bear",
    keywords: [
      "plush",
      "stuffed"
    ],
    skins: [
      {
        unified: "1f9f8",
        native: "🧸"
      }
    ],
    version: 11
  },
  pinata: {
    id: "pinata",
    name: "Pinata",
    keywords: [
      "mexico",
      "candy",
      "celebration"
    ],
    skins: [
      {
        unified: "1fa85",
        native: "🪅"
      }
    ],
    version: 13
  },
  mirror_ball: {
    id: "mirror_ball",
    name: "Mirror Ball",
    keywords: [
      "disco",
      "dance",
      "party"
    ],
    skins: [
      {
        unified: "1faa9",
        native: "🪩"
      }
    ],
    version: 14
  },
  nesting_dolls: {
    id: "nesting_dolls",
    name: "Nesting Dolls",
    keywords: [
      "matryoshka",
      "toy"
    ],
    skins: [
      {
        unified: "1fa86",
        native: "🪆"
      }
    ],
    version: 13
  },
  spades: {
    id: "spades",
    name: "Spade Suit",
    keywords: [
      "spades",
      "poker",
      "cards",
      "suits",
      "magic"
    ],
    skins: [
      {
        unified: "2660-fe0f",
        native: "♠️"
      }
    ],
    version: 1
  },
  hearts: {
    id: "hearts",
    name: "Heart Suit",
    keywords: [
      "hearts",
      "poker",
      "cards",
      "magic",
      "suits"
    ],
    skins: [
      {
        unified: "2665-fe0f",
        native: "♥️"
      }
    ],
    version: 1
  },
  diamonds: {
    id: "diamonds",
    name: "Diamond Suit",
    keywords: [
      "diamonds",
      "poker",
      "cards",
      "magic",
      "suits"
    ],
    skins: [
      {
        unified: "2666-fe0f",
        native: "♦️"
      }
    ],
    version: 1
  },
  clubs: {
    id: "clubs",
    name: "Club Suit",
    keywords: [
      "clubs",
      "poker",
      "cards",
      "magic",
      "suits"
    ],
    skins: [
      {
        unified: "2663-fe0f",
        native: "♣️"
      }
    ],
    version: 1
  },
  chess_pawn: {
    id: "chess_pawn",
    name: "Chess Pawn",
    keywords: [
      "expendable"
    ],
    skins: [
      {
        unified: "265f-fe0f",
        native: "♟️"
      }
    ],
    version: 11
  },
  black_joker: {
    id: "black_joker",
    name: "Joker",
    keywords: [
      "black",
      "poker",
      "cards",
      "game",
      "play",
      "magic"
    ],
    skins: [
      {
        unified: "1f0cf",
        native: "🃏"
      }
    ],
    version: 1
  },
  mahjong: {
    id: "mahjong",
    name: "Mahjong Red Dragon",
    keywords: [
      "game",
      "play",
      "chinese",
      "kanji"
    ],
    skins: [
      {
        unified: "1f004",
        native: "🀄"
      }
    ],
    version: 1
  },
  flower_playing_cards: {
    id: "flower_playing_cards",
    name: "Flower Playing Cards",
    keywords: [
      "game",
      "sunset",
      "red"
    ],
    skins: [
      {
        unified: "1f3b4",
        native: "🎴"
      }
    ],
    version: 1
  },
  performing_arts: {
    id: "performing_arts",
    name: "Performing Arts",
    keywords: [
      "acting",
      "theater",
      "drama"
    ],
    skins: [
      {
        unified: "1f3ad",
        native: "🎭"
      }
    ],
    version: 1
  },
  frame_with_picture: {
    id: "frame_with_picture",
    name: "Framed Picture",
    keywords: [
      "frame",
      "with",
      "photography"
    ],
    skins: [
      {
        unified: "1f5bc-fe0f",
        native: "🖼️"
      }
    ],
    version: 1
  },
  art: {
    id: "art",
    name: "Artist Palette",
    keywords: [
      "art",
      "design",
      "paint",
      "draw",
      "colors"
    ],
    skins: [
      {
        unified: "1f3a8",
        native: "🎨"
      }
    ],
    version: 1
  },
  thread: {
    id: "thread",
    name: "Thread",
    keywords: [
      "needle",
      "sewing",
      "spool",
      "string"
    ],
    skins: [
      {
        unified: "1f9f5",
        native: "🧵"
      }
    ],
    version: 11
  },
  sewing_needle: {
    id: "sewing_needle",
    name: "Sewing Needle",
    keywords: [
      "stitches"
    ],
    skins: [
      {
        unified: "1faa1",
        native: "🪡"
      }
    ],
    version: 13
  },
  yarn: {
    id: "yarn",
    name: "Yarn",
    keywords: [
      "ball",
      "crochet",
      "knit"
    ],
    skins: [
      {
        unified: "1f9f6",
        native: "🧶"
      }
    ],
    version: 11
  },
  knot: {
    id: "knot",
    name: "Knot",
    keywords: [
      "rope",
      "scout"
    ],
    skins: [
      {
        unified: "1faa2",
        native: "🪢"
      }
    ],
    version: 13
  },
  eyeglasses: {
    id: "eyeglasses",
    name: "Glasses",
    keywords: [
      "eyeglasses",
      "fashion",
      "accessories",
      "eyesight",
      "nerdy",
      "dork",
      "geek"
    ],
    skins: [
      {
        unified: "1f453",
        native: "👓"
      }
    ],
    version: 1
  },
  dark_sunglasses: {
    id: "dark_sunglasses",
    name: "Sunglasses",
    keywords: [
      "dark",
      "face",
      "cool",
      "accessories"
    ],
    skins: [
      {
        unified: "1f576-fe0f",
        native: "🕶️"
      }
    ],
    version: 1
  },
  goggles: {
    id: "goggles",
    name: "Goggles",
    keywords: [
      "eyes",
      "protection",
      "safety"
    ],
    skins: [
      {
        unified: "1f97d",
        native: "🥽"
      }
    ],
    version: 11
  },
  lab_coat: {
    id: "lab_coat",
    name: "Lab Coat",
    keywords: [
      "doctor",
      "experiment",
      "scientist",
      "chemist"
    ],
    skins: [
      {
        unified: "1f97c",
        native: "🥼"
      }
    ],
    version: 11
  },
  safety_vest: {
    id: "safety_vest",
    name: "Safety Vest",
    keywords: [
      "protection"
    ],
    skins: [
      {
        unified: "1f9ba",
        native: "🦺"
      }
    ],
    version: 12
  },
  necktie: {
    id: "necktie",
    name: "Necktie",
    keywords: [
      "shirt",
      "suitup",
      "formal",
      "fashion",
      "cloth",
      "business"
    ],
    skins: [
      {
        unified: "1f454",
        native: "👔"
      }
    ],
    version: 1
  },
  shirt: {
    id: "shirt",
    name: "T-Shirt",
    keywords: [
      "shirt",
      "tshirt",
      "t",
      "fashion",
      "cloth",
      "casual",
      "tee"
    ],
    skins: [
      {
        unified: "1f455",
        native: "👕"
      }
    ],
    version: 1
  },
  jeans: {
    id: "jeans",
    name: "Jeans",
    keywords: [
      "fashion",
      "shopping"
    ],
    skins: [
      {
        unified: "1f456",
        native: "👖"
      }
    ],
    version: 1
  },
  scarf: {
    id: "scarf",
    name: "Scarf",
    keywords: [
      "neck",
      "winter",
      "clothes"
    ],
    skins: [
      {
        unified: "1f9e3",
        native: "🧣"
      }
    ],
    version: 5
  },
  gloves: {
    id: "gloves",
    name: "Gloves",
    keywords: [
      "hands",
      "winter",
      "clothes"
    ],
    skins: [
      {
        unified: "1f9e4",
        native: "🧤"
      }
    ],
    version: 5
  },
  coat: {
    id: "coat",
    name: "Coat",
    keywords: [
      "jacket"
    ],
    skins: [
      {
        unified: "1f9e5",
        native: "🧥"
      }
    ],
    version: 5
  },
  socks: {
    id: "socks",
    name: "Socks",
    keywords: [
      "stockings",
      "clothes"
    ],
    skins: [
      {
        unified: "1f9e6",
        native: "🧦"
      }
    ],
    version: 5
  },
  dress: {
    id: "dress",
    name: "Dress",
    keywords: [
      "clothes",
      "fashion",
      "shopping"
    ],
    skins: [
      {
        unified: "1f457",
        native: "👗"
      }
    ],
    version: 1
  },
  kimono: {
    id: "kimono",
    name: "Kimono",
    keywords: [
      "dress",
      "fashion",
      "women",
      "female",
      "japanese"
    ],
    skins: [
      {
        unified: "1f458",
        native: "👘"
      }
    ],
    version: 1
  },
  sari: {
    id: "sari",
    name: "Sari",
    keywords: [
      "dress"
    ],
    skins: [
      {
        unified: "1f97b",
        native: "🥻"
      }
    ],
    version: 12
  },
  "one-piece_swimsuit": {
    id: "one-piece_swimsuit",
    name: "One-Piece Swimsuit",
    keywords: [
      "one",
      "piece",
      "fashion"
    ],
    skins: [
      {
        unified: "1fa71",
        native: "🩱"
      }
    ],
    version: 12
  },
  briefs: {
    id: "briefs",
    name: "Briefs",
    keywords: [
      "clothing"
    ],
    skins: [
      {
        unified: "1fa72",
        native: "🩲"
      }
    ],
    version: 12
  },
  shorts: {
    id: "shorts",
    name: "Shorts",
    keywords: [
      "clothing"
    ],
    skins: [
      {
        unified: "1fa73",
        native: "🩳"
      }
    ],
    version: 12
  },
  bikini: {
    id: "bikini",
    name: "Bikini",
    keywords: [
      "swimming",
      "female",
      "woman",
      "girl",
      "fashion",
      "beach",
      "summer"
    ],
    skins: [
      {
        unified: "1f459",
        native: "👙"
      }
    ],
    version: 1
  },
  womans_clothes: {
    id: "womans_clothes",
    name: "Womans Clothes",
    keywords: [
      "woman",
      "s",
      "fashion",
      "shopping",
      "bags",
      "female"
    ],
    skins: [
      {
        unified: "1f45a",
        native: "👚"
      }
    ],
    version: 1
  },
  folding_hand_fan: {
    id: "folding_hand_fan",
    name: "Folding Hand Fan",
    keywords: [
      "flamenco",
      "hot"
    ],
    skins: [
      {
        unified: "1faad",
        native: "🪭"
      }
    ],
    version: 15
  },
  purse: {
    id: "purse",
    name: "Purse",
    keywords: [
      "fashion",
      "accessories",
      "money",
      "sales",
      "shopping"
    ],
    skins: [
      {
        unified: "1f45b",
        native: "👛"
      }
    ],
    version: 1
  },
  handbag: {
    id: "handbag",
    name: "Handbag",
    keywords: [
      "fashion",
      "accessory",
      "accessories",
      "shopping"
    ],
    skins: [
      {
        unified: "1f45c",
        native: "👜"
      }
    ],
    version: 1
  },
  pouch: {
    id: "pouch",
    name: "Pouch",
    keywords: [
      "clutch",
      "bag",
      "accessories",
      "shopping"
    ],
    skins: [
      {
        unified: "1f45d",
        native: "👝"
      }
    ],
    version: 1
  },
  shopping_bags: {
    id: "shopping_bags",
    name: "Shopping Bags",
    keywords: [
      "mall",
      "buy",
      "purchase"
    ],
    skins: [
      {
        unified: "1f6cd-fe0f",
        native: "🛍️"
      }
    ],
    version: 1
  },
  school_satchel: {
    id: "school_satchel",
    name: "Backpack",
    keywords: [
      "school",
      "satchel",
      "student",
      "education",
      "bag"
    ],
    skins: [
      {
        unified: "1f392",
        native: "🎒"
      }
    ],
    version: 1
  },
  thong_sandal: {
    id: "thong_sandal",
    name: "Thong Sandal",
    keywords: [
      "footwear",
      "summer"
    ],
    skins: [
      {
        unified: "1fa74",
        native: "🩴"
      }
    ],
    version: 13
  },
  mans_shoe: {
    id: "mans_shoe",
    name: "Mans Shoe",
    keywords: [
      "man",
      "s",
      "fashion",
      "male"
    ],
    skins: [
      {
        unified: "1f45e",
        native: "👞"
      }
    ],
    version: 1
  },
  athletic_shoe: {
    id: "athletic_shoe",
    name: "Running Shoe",
    keywords: [
      "athletic",
      "shoes",
      "sports",
      "sneakers"
    ],
    skins: [
      {
        unified: "1f45f",
        native: "👟"
      }
    ],
    version: 1
  },
  hiking_boot: {
    id: "hiking_boot",
    name: "Hiking Boot",
    keywords: [
      "backpacking",
      "camping"
    ],
    skins: [
      {
        unified: "1f97e",
        native: "🥾"
      }
    ],
    version: 11
  },
  womans_flat_shoe: {
    id: "womans_flat_shoe",
    name: "Flat Shoe",
    keywords: [
      "womans",
      "ballet",
      "slip",
      "on",
      "slipper"
    ],
    skins: [
      {
        unified: "1f97f",
        native: "🥿"
      }
    ],
    version: 11
  },
  high_heel: {
    id: "high_heel",
    name: "High-Heeled Shoe",
    keywords: [
      "high",
      "heel",
      "heeled",
      "fashion",
      "shoes",
      "female",
      "pumps",
      "stiletto"
    ],
    skins: [
      {
        unified: "1f460",
        native: "👠"
      }
    ],
    version: 1
  },
  sandal: {
    id: "sandal",
    name: "Womans Sandal",
    keywords: [
      "woman",
      "s",
      "shoes",
      "fashion",
      "flip",
      "flops"
    ],
    skins: [
      {
        unified: "1f461",
        native: "👡"
      }
    ],
    version: 1
  },
  ballet_shoes: {
    id: "ballet_shoes",
    name: "Ballet Shoes",
    keywords: [
      "dance"
    ],
    skins: [
      {
        unified: "1fa70",
        native: "🩰"
      }
    ],
    version: 12
  },
  boot: {
    id: "boot",
    name: "Womans Boots",
    keywords: [
      "boot",
      "woman",
      "s",
      "shoes",
      "fashion"
    ],
    skins: [
      {
        unified: "1f462",
        native: "👢"
      }
    ],
    version: 1
  },
  hair_pick: {
    id: "hair_pick",
    name: "Hair Pick",
    keywords: [
      "afro",
      "comb"
    ],
    skins: [
      {
        unified: "1faae",
        native: "🪮"
      }
    ],
    version: 15
  },
  crown: {
    id: "crown",
    name: "Crown",
    keywords: [
      "king",
      "kod",
      "leader",
      "royalty",
      "lord"
    ],
    skins: [
      {
        unified: "1f451",
        native: "👑"
      }
    ],
    version: 1
  },
  womans_hat: {
    id: "womans_hat",
    name: "Womans Hat",
    keywords: [
      "woman",
      "s",
      "fashion",
      "accessories",
      "female",
      "lady",
      "spring"
    ],
    skins: [
      {
        unified: "1f452",
        native: "👒"
      }
    ],
    version: 1
  },
  tophat: {
    id: "tophat",
    name: "Top Hat",
    keywords: [
      "tophat",
      "magic",
      "gentleman",
      "classy",
      "circus"
    ],
    skins: [
      {
        unified: "1f3a9",
        native: "🎩"
      }
    ],
    version: 1
  },
  mortar_board: {
    id: "mortar_board",
    name: "Graduation Cap",
    keywords: [
      "mortar",
      "board",
      "school",
      "college",
      "degree",
      "university",
      "hat",
      "legal",
      "learn",
      "education"
    ],
    skins: [
      {
        unified: "1f393",
        native: "🎓"
      }
    ],
    version: 1
  },
  billed_cap: {
    id: "billed_cap",
    name: "Billed Cap",
    keywords: [
      "baseball"
    ],
    skins: [
      {
        unified: "1f9e2",
        native: "🧢"
      }
    ],
    version: 5
  },
  military_helmet: {
    id: "military_helmet",
    name: "Military Helmet",
    keywords: [
      "army",
      "protection"
    ],
    skins: [
      {
        unified: "1fa96",
        native: "🪖"
      }
    ],
    version: 13
  },
  helmet_with_white_cross: {
    id: "helmet_with_white_cross",
    name: "Rescue Worker’s Helmet",
    keywords: [
      "with",
      "white",
      "cross",
      "worker",
      "s",
      "construction",
      "build"
    ],
    skins: [
      {
        unified: "26d1-fe0f",
        native: "⛑️"
      }
    ],
    version: 1
  },
  prayer_beads: {
    id: "prayer_beads",
    name: "Prayer Beads",
    keywords: [
      "dhikr",
      "religious"
    ],
    skins: [
      {
        unified: "1f4ff",
        native: "📿"
      }
    ],
    version: 1
  },
  lipstick: {
    id: "lipstick",
    name: "Lipstick",
    keywords: [
      "female",
      "girl",
      "fashion",
      "woman"
    ],
    skins: [
      {
        unified: "1f484",
        native: "💄"
      }
    ],
    version: 1
  },
  ring: {
    id: "ring",
    name: "Ring",
    keywords: [
      "wedding",
      "propose",
      "marriage",
      "valentines",
      "diamond",
      "fashion",
      "jewelry",
      "gem",
      "engagement"
    ],
    skins: [
      {
        unified: "1f48d",
        native: "💍"
      }
    ],
    version: 1
  },
  gem: {
    id: "gem",
    name: "Gem Stone",
    keywords: [
      "blue",
      "ruby",
      "diamond",
      "jewelry"
    ],
    skins: [
      {
        unified: "1f48e",
        native: "💎"
      }
    ],
    version: 1
  },
  mute: {
    id: "mute",
    name: "Muted Speaker",
    keywords: [
      "mute",
      "sound",
      "volume",
      "silence",
      "quiet"
    ],
    skins: [
      {
        unified: "1f507",
        native: "🔇"
      }
    ],
    version: 1
  },
  speaker: {
    id: "speaker",
    name: "Speaker",
    keywords: [
      "low",
      "volume",
      "sound",
      "silence",
      "broadcast"
    ],
    skins: [
      {
        unified: "1f508",
        native: "🔈"
      }
    ],
    version: 1
  },
  sound: {
    id: "sound",
    name: "Speaker Medium Volume",
    keywords: [
      "sound",
      "broadcast"
    ],
    skins: [
      {
        unified: "1f509",
        native: "🔉"
      }
    ],
    version: 1
  },
  loud_sound: {
    id: "loud_sound",
    name: "Speaker High Volume",
    keywords: [
      "loud",
      "sound",
      "noise",
      "noisy",
      "broadcast"
    ],
    skins: [
      {
        unified: "1f50a",
        native: "🔊"
      }
    ],
    version: 1
  },
  loudspeaker: {
    id: "loudspeaker",
    name: "Loudspeaker",
    keywords: [
      "volume",
      "sound"
    ],
    skins: [
      {
        unified: "1f4e2",
        native: "📢"
      }
    ],
    version: 1
  },
  mega: {
    id: "mega",
    name: "Megaphone",
    keywords: [
      "mega",
      "sound",
      "speaker",
      "volume"
    ],
    skins: [
      {
        unified: "1f4e3",
        native: "📣"
      }
    ],
    version: 1
  },
  postal_horn: {
    id: "postal_horn",
    name: "Postal Horn",
    keywords: [
      "instrument",
      "music"
    ],
    skins: [
      {
        unified: "1f4ef",
        native: "📯"
      }
    ],
    version: 1
  },
  bell: {
    id: "bell",
    name: "Bell",
    keywords: [
      "sound",
      "notification",
      "christmas",
      "xmas",
      "chime"
    ],
    skins: [
      {
        unified: "1f514",
        native: "🔔"
      }
    ],
    version: 1
  },
  no_bell: {
    id: "no_bell",
    name: "Bell with Slash",
    keywords: [
      "no",
      "sound",
      "volume",
      "mute",
      "quiet",
      "silent"
    ],
    skins: [
      {
        unified: "1f515",
        native: "🔕"
      }
    ],
    version: 1
  },
  musical_score: {
    id: "musical_score",
    name: "Musical Score",
    keywords: [
      "treble",
      "clef",
      "compose"
    ],
    skins: [
      {
        unified: "1f3bc",
        native: "🎼"
      }
    ],
    version: 1
  },
  musical_note: {
    id: "musical_note",
    name: "Musical Note",
    keywords: [
      "score",
      "tone",
      "sound"
    ],
    skins: [
      {
        unified: "1f3b5",
        native: "🎵"
      }
    ],
    version: 1
  },
  notes: {
    id: "notes",
    name: "Musical Notes",
    keywords: [
      "music",
      "score"
    ],
    skins: [
      {
        unified: "1f3b6",
        native: "🎶"
      }
    ],
    version: 1
  },
  studio_microphone: {
    id: "studio_microphone",
    name: "Studio Microphone",
    keywords: [
      "sing",
      "recording",
      "artist",
      "talkshow"
    ],
    skins: [
      {
        unified: "1f399-fe0f",
        native: "🎙️"
      }
    ],
    version: 1
  },
  level_slider: {
    id: "level_slider",
    name: "Level Slider",
    keywords: [
      "scale"
    ],
    skins: [
      {
        unified: "1f39a-fe0f",
        native: "🎚️"
      }
    ],
    version: 1
  },
  control_knobs: {
    id: "control_knobs",
    name: "Control Knobs",
    keywords: [
      "dial"
    ],
    skins: [
      {
        unified: "1f39b-fe0f",
        native: "🎛️"
      }
    ],
    version: 1
  },
  microphone: {
    id: "microphone",
    name: "Microphone",
    keywords: [
      "sound",
      "music",
      "PA",
      "sing",
      "talkshow"
    ],
    skins: [
      {
        unified: "1f3a4",
        native: "🎤"
      }
    ],
    version: 1
  },
  headphones: {
    id: "headphones",
    name: "Headphone",
    keywords: [
      "headphones",
      "music",
      "score",
      "gadgets"
    ],
    skins: [
      {
        unified: "1f3a7",
        native: "🎧"
      }
    ],
    version: 1
  },
  radio: {
    id: "radio",
    name: "Radio",
    keywords: [
      "communication",
      "music",
      "podcast",
      "program"
    ],
    skins: [
      {
        unified: "1f4fb",
        native: "📻"
      }
    ],
    version: 1
  },
  saxophone: {
    id: "saxophone",
    name: "Saxophone",
    keywords: [
      "music",
      "instrument",
      "jazz",
      "blues"
    ],
    skins: [
      {
        unified: "1f3b7",
        native: "🎷"
      }
    ],
    version: 1
  },
  accordion: {
    id: "accordion",
    name: "Accordion",
    keywords: [
      "music"
    ],
    skins: [
      {
        unified: "1fa97",
        native: "🪗"
      }
    ],
    version: 13
  },
  guitar: {
    id: "guitar",
    name: "Guitar",
    keywords: [
      "music",
      "instrument"
    ],
    skins: [
      {
        unified: "1f3b8",
        native: "🎸"
      }
    ],
    version: 1
  },
  musical_keyboard: {
    id: "musical_keyboard",
    name: "Musical Keyboard",
    keywords: [
      "piano",
      "instrument",
      "compose"
    ],
    skins: [
      {
        unified: "1f3b9",
        native: "🎹"
      }
    ],
    version: 1
  },
  trumpet: {
    id: "trumpet",
    name: "Trumpet",
    keywords: [
      "music",
      "brass"
    ],
    skins: [
      {
        unified: "1f3ba",
        native: "🎺"
      }
    ],
    version: 1
  },
  violin: {
    id: "violin",
    name: "Violin",
    keywords: [
      "music",
      "instrument",
      "orchestra",
      "symphony"
    ],
    skins: [
      {
        unified: "1f3bb",
        native: "🎻"
      }
    ],
    version: 1
  },
  banjo: {
    id: "banjo",
    name: "Banjo",
    keywords: [
      "music",
      "instructment"
    ],
    skins: [
      {
        unified: "1fa95",
        native: "🪕"
      }
    ],
    version: 12
  },
  drum_with_drumsticks: {
    id: "drum_with_drumsticks",
    name: "Drum",
    keywords: [
      "with",
      "drumsticks",
      "music",
      "instrument",
      "snare"
    ],
    skins: [
      {
        unified: "1f941",
        native: "🥁"
      }
    ],
    version: 3
  },
  long_drum: {
    id: "long_drum",
    name: "Long Drum",
    keywords: [
      "music"
    ],
    skins: [
      {
        unified: "1fa98",
        native: "🪘"
      }
    ],
    version: 13
  },
  maracas: {
    id: "maracas",
    name: "Maracas",
    keywords: [
      "music",
      "instrument",
      "percussion"
    ],
    skins: [
      {
        unified: "1fa87",
        native: "🪇"
      }
    ],
    version: 15
  },
  flute: {
    id: "flute",
    name: "Flute",
    keywords: [
      "bamboo",
      "music",
      "instrument",
      "pied",
      "piper"
    ],
    skins: [
      {
        unified: "1fa88",
        native: "🪈"
      }
    ],
    version: 15
  },
  iphone: {
    id: "iphone",
    name: "Mobile Phone",
    keywords: [
      "iphone",
      "technology",
      "apple",
      "gadgets",
      "dial"
    ],
    skins: [
      {
        unified: "1f4f1",
        native: "📱"
      }
    ],
    version: 1
  },
  calling: {
    id: "calling",
    name: "Mobile Phone with Arrow",
    keywords: [
      "calling",
      "iphone",
      "incoming"
    ],
    skins: [
      {
        unified: "1f4f2",
        native: "📲"
      }
    ],
    version: 1
  },
  phone: {
    id: "phone",
    name: "Telephone",
    keywords: [
      "phone",
      "technology",
      "communication",
      "dial"
    ],
    skins: [
      {
        unified: "260e-fe0f",
        native: "☎️"
      }
    ],
    version: 1
  },
  telephone_receiver: {
    id: "telephone_receiver",
    name: "Telephone Receiver",
    keywords: [
      "technology",
      "communication",
      "dial"
    ],
    skins: [
      {
        unified: "1f4de",
        native: "📞"
      }
    ],
    version: 1
  },
  pager: {
    id: "pager",
    name: "Pager",
    keywords: [
      "bbcall",
      "oldschool",
      "90s"
    ],
    skins: [
      {
        unified: "1f4df",
        native: "📟"
      }
    ],
    version: 1
  },
  fax: {
    id: "fax",
    name: "Fax Machine",
    keywords: [
      "communication",
      "technology"
    ],
    skins: [
      {
        unified: "1f4e0",
        native: "📠"
      }
    ],
    version: 1
  },
  battery: {
    id: "battery",
    name: "Battery",
    keywords: [
      "power",
      "energy",
      "sustain"
    ],
    skins: [
      {
        unified: "1f50b",
        native: "🔋"
      }
    ],
    version: 1
  },
  low_battery: {
    id: "low_battery",
    name: "Low Battery",
    keywords: [
      "drained",
      "dead"
    ],
    skins: [
      {
        unified: "1faab",
        native: "🪫"
      }
    ],
    version: 14
  },
  electric_plug: {
    id: "electric_plug",
    name: "Electric Plug",
    keywords: [
      "charger",
      "power"
    ],
    skins: [
      {
        unified: "1f50c",
        native: "🔌"
      }
    ],
    version: 1
  },
  computer: {
    id: "computer",
    name: "Laptop",
    keywords: [
      "computer",
      "technology",
      "screen",
      "display",
      "monitor"
    ],
    skins: [
      {
        unified: "1f4bb",
        native: "💻"
      }
    ],
    version: 1
  },
  desktop_computer: {
    id: "desktop_computer",
    name: "Desktop Computer",
    keywords: [
      "technology",
      "computing",
      "screen"
    ],
    skins: [
      {
        unified: "1f5a5-fe0f",
        native: "🖥️"
      }
    ],
    version: 1
  },
  printer: {
    id: "printer",
    name: "Printer",
    keywords: [
      "paper",
      "ink"
    ],
    skins: [
      {
        unified: "1f5a8-fe0f",
        native: "🖨️"
      }
    ],
    version: 1
  },
  keyboard: {
    id: "keyboard",
    name: "Keyboard",
    keywords: [
      "technology",
      "computer",
      "type",
      "input",
      "text"
    ],
    skins: [
      {
        unified: "2328-fe0f",
        native: "⌨️"
      }
    ],
    version: 1
  },
  three_button_mouse: {
    id: "three_button_mouse",
    name: "Computer Mouse",
    keywords: [
      "three",
      "button",
      "click"
    ],
    skins: [
      {
        unified: "1f5b1-fe0f",
        native: "🖱️"
      }
    ],
    version: 1
  },
  trackball: {
    id: "trackball",
    name: "Trackball",
    keywords: [
      "technology",
      "trackpad"
    ],
    skins: [
      {
        unified: "1f5b2-fe0f",
        native: "🖲️"
      }
    ],
    version: 1
  },
  minidisc: {
    id: "minidisc",
    name: "Minidisc",
    keywords: [
      "computer",
      "disk",
      "technology",
      "record",
      "data",
      "90s"
    ],
    skins: [
      {
        unified: "1f4bd",
        native: "💽"
      }
    ],
    version: 1
  },
  floppy_disk: {
    id: "floppy_disk",
    name: "Floppy Disk",
    keywords: [
      "oldschool",
      "technology",
      "save",
      "90s",
      "80s"
    ],
    skins: [
      {
        unified: "1f4be",
        native: "💾"
      }
    ],
    version: 1
  },
  cd: {
    id: "cd",
    name: "Optical Disc",
    keywords: [
      "cd",
      "disk",
      "technology",
      "dvd",
      "90s"
    ],
    skins: [
      {
        unified: "1f4bf",
        native: "💿"
      }
    ],
    version: 1
  },
  dvd: {
    id: "dvd",
    name: "Dvd",
    keywords: [
      "cd",
      "disk",
      "disc"
    ],
    skins: [
      {
        unified: "1f4c0",
        native: "📀"
      }
    ],
    version: 1
  },
  abacus: {
    id: "abacus",
    name: "Abacus",
    keywords: [
      "calculation"
    ],
    skins: [
      {
        unified: "1f9ee",
        native: "🧮"
      }
    ],
    version: 11
  },
  movie_camera: {
    id: "movie_camera",
    name: "Movie Camera",
    keywords: [
      "film",
      "record"
    ],
    skins: [
      {
        unified: "1f3a5",
        native: "🎥"
      }
    ],
    version: 1
  },
  film_frames: {
    id: "film_frames",
    name: "Film Frames",
    keywords: [
      "movie"
    ],
    skins: [
      {
        unified: "1f39e-fe0f",
        native: "🎞️"
      }
    ],
    version: 1
  },
  film_projector: {
    id: "film_projector",
    name: "Film Projector",
    keywords: [
      "video",
      "tape",
      "record",
      "movie"
    ],
    skins: [
      {
        unified: "1f4fd-fe0f",
        native: "📽️"
      }
    ],
    version: 1
  },
  clapper: {
    id: "clapper",
    name: "Clapper Board",
    keywords: [
      "movie",
      "film",
      "record"
    ],
    skins: [
      {
        unified: "1f3ac",
        native: "🎬"
      }
    ],
    version: 1
  },
  tv: {
    id: "tv",
    name: "Television",
    keywords: [
      "tv",
      "technology",
      "program",
      "oldschool",
      "show"
    ],
    skins: [
      {
        unified: "1f4fa",
        native: "📺"
      }
    ],
    version: 1
  },
  camera: {
    id: "camera",
    name: "Camera",
    keywords: [
      "gadgets",
      "photography"
    ],
    skins: [
      {
        unified: "1f4f7",
        native: "📷"
      }
    ],
    version: 1
  },
  camera_with_flash: {
    id: "camera_with_flash",
    name: "Camera with Flash",
    keywords: [
      "photography",
      "gadgets"
    ],
    skins: [
      {
        unified: "1f4f8",
        native: "📸"
      }
    ],
    version: 1
  },
  video_camera: {
    id: "video_camera",
    name: "Video Camera",
    keywords: [
      "film",
      "record"
    ],
    skins: [
      {
        unified: "1f4f9",
        native: "📹"
      }
    ],
    version: 1
  },
  vhs: {
    id: "vhs",
    name: "Videocassette",
    keywords: [
      "vhs",
      "record",
      "video",
      "oldschool",
      "90s",
      "80s"
    ],
    skins: [
      {
        unified: "1f4fc",
        native: "📼"
      }
    ],
    version: 1
  },
  mag: {
    id: "mag",
    name: "Magnifying Glass Tilted Left",
    keywords: [
      "mag",
      "search",
      "zoom",
      "find",
      "detective"
    ],
    skins: [
      {
        unified: "1f50d",
        native: "🔍"
      }
    ],
    version: 1
  },
  mag_right: {
    id: "mag_right",
    name: "Magnifying Glass Tilted Right",
    keywords: [
      "mag",
      "search",
      "zoom",
      "find",
      "detective"
    ],
    skins: [
      {
        unified: "1f50e",
        native: "🔎"
      }
    ],
    version: 1
  },
  candle: {
    id: "candle",
    name: "Candle",
    keywords: [
      "fire",
      "wax"
    ],
    skins: [
      {
        unified: "1f56f-fe0f",
        native: "🕯️"
      }
    ],
    version: 1
  },
  bulb: {
    id: "bulb",
    name: "Light Bulb",
    keywords: [
      "electricity",
      "idea"
    ],
    skins: [
      {
        unified: "1f4a1",
        native: "💡"
      }
    ],
    version: 1
  },
  flashlight: {
    id: "flashlight",
    name: "Flashlight",
    keywords: [
      "dark",
      "camping",
      "sight",
      "night"
    ],
    skins: [
      {
        unified: "1f526",
        native: "🔦"
      }
    ],
    version: 1
  },
  izakaya_lantern: {
    id: "izakaya_lantern",
    name: "Izakaya Lantern",
    keywords: [
      "red",
      "paper",
      "light",
      "halloween",
      "spooky"
    ],
    skins: [
      {
        unified: "1f3ee",
        native: "🏮"
      }
    ],
    version: 1
  },
  diya_lamp: {
    id: "diya_lamp",
    name: "Diya Lamp",
    keywords: [
      "lighting"
    ],
    skins: [
      {
        unified: "1fa94",
        native: "🪔"
      }
    ],
    version: 12
  },
  notebook_with_decorative_cover: {
    id: "notebook_with_decorative_cover",
    name: "Notebook with Decorative Cover",
    keywords: [
      "classroom",
      "notes",
      "record",
      "paper",
      "study"
    ],
    skins: [
      {
        unified: "1f4d4",
        native: "📔"
      }
    ],
    version: 1
  },
  closed_book: {
    id: "closed_book",
    name: "Closed Book",
    keywords: [
      "read",
      "library",
      "knowledge",
      "textbook",
      "learn"
    ],
    skins: [
      {
        unified: "1f4d5",
        native: "📕"
      }
    ],
    version: 1
  },
  book: {
    id: "book",
    name: "Open Book",
    keywords: [
      "read",
      "library",
      "knowledge",
      "literature",
      "learn",
      "study"
    ],
    skins: [
      {
        unified: "1f4d6",
        native: "📖"
      }
    ],
    version: 1
  },
  green_book: {
    id: "green_book",
    name: "Green Book",
    keywords: [
      "read",
      "library",
      "knowledge",
      "study"
    ],
    skins: [
      {
        unified: "1f4d7",
        native: "📗"
      }
    ],
    version: 1
  },
  blue_book: {
    id: "blue_book",
    name: "Blue Book",
    keywords: [
      "read",
      "library",
      "knowledge",
      "learn",
      "study"
    ],
    skins: [
      {
        unified: "1f4d8",
        native: "📘"
      }
    ],
    version: 1
  },
  orange_book: {
    id: "orange_book",
    name: "Orange Book",
    keywords: [
      "read",
      "library",
      "knowledge",
      "textbook",
      "study"
    ],
    skins: [
      {
        unified: "1f4d9",
        native: "📙"
      }
    ],
    version: 1
  },
  books: {
    id: "books",
    name: "Books",
    keywords: [
      "literature",
      "library",
      "study"
    ],
    skins: [
      {
        unified: "1f4da",
        native: "📚"
      }
    ],
    version: 1
  },
  notebook: {
    id: "notebook",
    name: "Notebook",
    keywords: [
      "stationery",
      "record",
      "notes",
      "paper",
      "study"
    ],
    skins: [
      {
        unified: "1f4d3",
        native: "📓"
      }
    ],
    version: 1
  },
  ledger: {
    id: "ledger",
    name: "Ledger",
    keywords: [
      "notes",
      "paper"
    ],
    skins: [
      {
        unified: "1f4d2",
        native: "📒"
      }
    ],
    version: 1
  },
  page_with_curl: {
    id: "page_with_curl",
    name: "Page with Curl",
    keywords: [
      "documents",
      "office",
      "paper"
    ],
    skins: [
      {
        unified: "1f4c3",
        native: "📃"
      }
    ],
    version: 1
  },
  scroll: {
    id: "scroll",
    name: "Scroll",
    keywords: [
      "documents",
      "ancient",
      "history",
      "paper"
    ],
    skins: [
      {
        unified: "1f4dc",
        native: "📜"
      }
    ],
    version: 1
  },
  page_facing_up: {
    id: "page_facing_up",
    name: "Page Facing Up",
    keywords: [
      "documents",
      "office",
      "paper",
      "information"
    ],
    skins: [
      {
        unified: "1f4c4",
        native: "📄"
      }
    ],
    version: 1
  },
  newspaper: {
    id: "newspaper",
    name: "Newspaper",
    keywords: [
      "press",
      "headline"
    ],
    skins: [
      {
        unified: "1f4f0",
        native: "📰"
      }
    ],
    version: 1
  },
  rolled_up_newspaper: {
    id: "rolled_up_newspaper",
    name: "Rolled-Up Newspaper",
    keywords: [
      "rolled",
      "up",
      "press",
      "headline"
    ],
    skins: [
      {
        unified: "1f5de-fe0f",
        native: "🗞️"
      }
    ],
    version: 1
  },
  bookmark_tabs: {
    id: "bookmark_tabs",
    name: "Bookmark Tabs",
    keywords: [
      "favorite",
      "save",
      "order",
      "tidy"
    ],
    skins: [
      {
        unified: "1f4d1",
        native: "📑"
      }
    ],
    version: 1
  },
  bookmark: {
    id: "bookmark",
    name: "Bookmark",
    keywords: [
      "favorite",
      "label",
      "save"
    ],
    skins: [
      {
        unified: "1f516",
        native: "🔖"
      }
    ],
    version: 1
  },
  label: {
    id: "label",
    name: "Label",
    keywords: [
      "sale",
      "tag"
    ],
    skins: [
      {
        unified: "1f3f7-fe0f",
        native: "🏷️"
      }
    ],
    version: 1
  },
  moneybag: {
    id: "moneybag",
    name: "Money Bag",
    keywords: [
      "moneybag",
      "dollar",
      "payment",
      "coins",
      "sale"
    ],
    skins: [
      {
        unified: "1f4b0",
        native: "💰"
      }
    ],
    version: 1
  },
  coin: {
    id: "coin",
    name: "Coin",
    keywords: [
      "money",
      "currency"
    ],
    skins: [
      {
        unified: "1fa99",
        native: "🪙"
      }
    ],
    version: 13
  },
  yen: {
    id: "yen",
    name: "Yen Banknote",
    keywords: [
      "money",
      "sales",
      "japanese",
      "dollar",
      "currency"
    ],
    skins: [
      {
        unified: "1f4b4",
        native: "💴"
      }
    ],
    version: 1
  },
  dollar: {
    id: "dollar",
    name: "Dollar Banknote",
    keywords: [
      "money",
      "sales",
      "bill",
      "currency"
    ],
    skins: [
      {
        unified: "1f4b5",
        native: "💵"
      }
    ],
    version: 1
  },
  euro: {
    id: "euro",
    name: "Euro Banknote",
    keywords: [
      "money",
      "sales",
      "dollar",
      "currency"
    ],
    skins: [
      {
        unified: "1f4b6",
        native: "💶"
      }
    ],
    version: 1
  },
  pound: {
    id: "pound",
    name: "Pound Banknote",
    keywords: [
      "british",
      "sterling",
      "money",
      "sales",
      "bills",
      "uk",
      "england",
      "currency"
    ],
    skins: [
      {
        unified: "1f4b7",
        native: "💷"
      }
    ],
    version: 1
  },
  money_with_wings: {
    id: "money_with_wings",
    name: "Money with Wings",
    keywords: [
      "dollar",
      "bills",
      "payment",
      "sale"
    ],
    skins: [
      {
        unified: "1f4b8",
        native: "💸"
      }
    ],
    version: 1
  },
  credit_card: {
    id: "credit_card",
    name: "Credit Card",
    keywords: [
      "money",
      "sales",
      "dollar",
      "bill",
      "payment",
      "shopping"
    ],
    skins: [
      {
        unified: "1f4b3",
        native: "💳"
      }
    ],
    version: 1
  },
  receipt: {
    id: "receipt",
    name: "Receipt",
    keywords: [
      "accounting",
      "expenses"
    ],
    skins: [
      {
        unified: "1f9fe",
        native: "🧾"
      }
    ],
    version: 11
  },
  chart: {
    id: "chart",
    name: "Chart Increasing with Yen",
    keywords: [
      "green",
      "square",
      "graph",
      "presentation",
      "stats"
    ],
    skins: [
      {
        unified: "1f4b9",
        native: "💹"
      }
    ],
    version: 1
  },
  email: {
    id: "email",
    name: "Envelope",
    keywords: [
      "email",
      "letter",
      "postal",
      "inbox",
      "communication"
    ],
    skins: [
      {
        unified: "2709-fe0f",
        native: "✉️"
      }
    ],
    version: 1
  },
  "e-mail": {
    id: "e-mail",
    name: "E-Mail",
    keywords: [
      "e",
      "mail",
      "communication",
      "inbox"
    ],
    skins: [
      {
        unified: "1f4e7",
        native: "📧"
      }
    ],
    version: 1
  },
  incoming_envelope: {
    id: "incoming_envelope",
    name: "Incoming Envelope",
    keywords: [
      "email",
      "inbox"
    ],
    skins: [
      {
        unified: "1f4e8",
        native: "📨"
      }
    ],
    version: 1
  },
  envelope_with_arrow: {
    id: "envelope_with_arrow",
    name: "Envelope with Arrow",
    keywords: [
      "email",
      "communication"
    ],
    skins: [
      {
        unified: "1f4e9",
        native: "📩"
      }
    ],
    version: 1
  },
  outbox_tray: {
    id: "outbox_tray",
    name: "Outbox Tray",
    keywords: [
      "inbox",
      "email"
    ],
    skins: [
      {
        unified: "1f4e4",
        native: "📤"
      }
    ],
    version: 1
  },
  inbox_tray: {
    id: "inbox_tray",
    name: "Inbox Tray",
    keywords: [
      "email",
      "documents"
    ],
    skins: [
      {
        unified: "1f4e5",
        native: "📥"
      }
    ],
    version: 1
  },
  package: {
    id: "package",
    name: "Package",
    keywords: [
      "mail",
      "gift",
      "cardboard",
      "box",
      "moving"
    ],
    skins: [
      {
        unified: "1f4e6",
        native: "📦"
      }
    ],
    version: 1
  },
  mailbox: {
    id: "mailbox",
    name: "Closed Mailbox with Raised Flag",
    keywords: [
      "email",
      "inbox",
      "communication"
    ],
    skins: [
      {
        unified: "1f4eb",
        native: "📫"
      }
    ],
    version: 1
  },
  mailbox_closed: {
    id: "mailbox_closed",
    name: "Closed Mailbox with Lowered Flag",
    keywords: [
      "email",
      "communication",
      "inbox"
    ],
    skins: [
      {
        unified: "1f4ea",
        native: "📪"
      }
    ],
    version: 1
  },
  mailbox_with_mail: {
    id: "mailbox_with_mail",
    name: "Open Mailbox with Raised Flag",
    keywords: [
      "mail",
      "email",
      "inbox",
      "communication"
    ],
    skins: [
      {
        unified: "1f4ec",
        native: "📬"
      }
    ],
    version: 1
  },
  mailbox_with_no_mail: {
    id: "mailbox_with_no_mail",
    name: "Open Mailbox with Lowered Flag",
    keywords: [
      "no",
      "mail",
      "email",
      "inbox"
    ],
    skins: [
      {
        unified: "1f4ed",
        native: "📭"
      }
    ],
    version: 1
  },
  postbox: {
    id: "postbox",
    name: "Postbox",
    keywords: [
      "email",
      "letter",
      "envelope"
    ],
    skins: [
      {
        unified: "1f4ee",
        native: "📮"
      }
    ],
    version: 1
  },
  ballot_box_with_ballot: {
    id: "ballot_box_with_ballot",
    name: "Ballot Box with Ballot",
    keywords: [
      "election",
      "vote"
    ],
    skins: [
      {
        unified: "1f5f3-fe0f",
        native: "🗳️"
      }
    ],
    version: 1
  },
  pencil2: {
    id: "pencil2",
    name: "Pencil",
    keywords: [
      "pencil2",
      "stationery",
      "write",
      "paper",
      "writing",
      "school",
      "study"
    ],
    skins: [
      {
        unified: "270f-fe0f",
        native: "✏️"
      }
    ],
    version: 1
  },
  black_nib: {
    id: "black_nib",
    name: "Black Nib",
    keywords: [
      "pen",
      "stationery",
      "writing",
      "write"
    ],
    skins: [
      {
        unified: "2712-fe0f",
        native: "✒️"
      }
    ],
    version: 1
  },
  lower_left_fountain_pen: {
    id: "lower_left_fountain_pen",
    name: "Fountain Pen",
    keywords: [
      "lower",
      "left",
      "stationery",
      "writing",
      "write"
    ],
    skins: [
      {
        unified: "1f58b-fe0f",
        native: "🖋️"
      }
    ],
    version: 1
  },
  lower_left_ballpoint_pen: {
    id: "lower_left_ballpoint_pen",
    name: "Pen",
    keywords: [
      "lower",
      "left",
      "ballpoint",
      "stationery",
      "writing",
      "write"
    ],
    skins: [
      {
        unified: "1f58a-fe0f",
        native: "🖊️"
      }
    ],
    version: 1
  },
  lower_left_paintbrush: {
    id: "lower_left_paintbrush",
    name: "Paintbrush",
    keywords: [
      "lower",
      "left",
      "drawing",
      "creativity",
      "art"
    ],
    skins: [
      {
        unified: "1f58c-fe0f",
        native: "🖌️"
      }
    ],
    version: 1
  },
  lower_left_crayon: {
    id: "lower_left_crayon",
    name: "Crayon",
    keywords: [
      "lower",
      "left",
      "drawing",
      "creativity"
    ],
    skins: [
      {
        unified: "1f58d-fe0f",
        native: "🖍️"
      }
    ],
    version: 1
  },
  memo: {
    id: "memo",
    name: "Memo",
    keywords: [
      "pencil",
      "write",
      "documents",
      "stationery",
      "paper",
      "writing",
      "legal",
      "exam",
      "quiz",
      "test",
      "study",
      "compose"
    ],
    skins: [
      {
        unified: "1f4dd",
        native: "📝"
      }
    ],
    version: 1
  },
  briefcase: {
    id: "briefcase",
    name: "Briefcase",
    keywords: [
      "business",
      "documents",
      "work",
      "law",
      "legal",
      "job",
      "career"
    ],
    skins: [
      {
        unified: "1f4bc",
        native: "💼"
      }
    ],
    version: 1
  },
  file_folder: {
    id: "file_folder",
    name: "File Folder",
    keywords: [
      "documents",
      "business",
      "office"
    ],
    skins: [
      {
        unified: "1f4c1",
        native: "📁"
      }
    ],
    version: 1
  },
  open_file_folder: {
    id: "open_file_folder",
    name: "Open File Folder",
    keywords: [
      "documents",
      "load"
    ],
    skins: [
      {
        unified: "1f4c2",
        native: "📂"
      }
    ],
    version: 1
  },
  card_index_dividers: {
    id: "card_index_dividers",
    name: "Card Index Dividers",
    keywords: [
      "organizing",
      "business",
      "stationery"
    ],
    skins: [
      {
        unified: "1f5c2-fe0f",
        native: "🗂️"
      }
    ],
    version: 1
  },
  date: {
    id: "date",
    name: "Calendar",
    keywords: [
      "date",
      "schedule"
    ],
    skins: [
      {
        unified: "1f4c5",
        native: "📅"
      }
    ],
    version: 1
  },
  calendar: {
    id: "calendar",
    name: "Tear-off Calendar",
    keywords: [
      "tear",
      "off",
      "schedule",
      "date",
      "planning"
    ],
    skins: [
      {
        unified: "1f4c6",
        native: "📆"
      }
    ],
    version: 1
  },
  spiral_note_pad: {
    id: "spiral_note_pad",
    name: "Spiral Notepad",
    keywords: [
      "note",
      "pad",
      "memo",
      "stationery"
    ],
    skins: [
      {
        unified: "1f5d2-fe0f",
        native: "🗒️"
      }
    ],
    version: 1
  },
  spiral_calendar_pad: {
    id: "spiral_calendar_pad",
    name: "Spiral Calendar",
    keywords: [
      "pad",
      "date",
      "schedule",
      "planning"
    ],
    skins: [
      {
        unified: "1f5d3-fe0f",
        native: "🗓️"
      }
    ],
    version: 1
  },
  card_index: {
    id: "card_index",
    name: "Card Index",
    keywords: [
      "business",
      "stationery"
    ],
    skins: [
      {
        unified: "1f4c7",
        native: "📇"
      }
    ],
    version: 1
  },
  chart_with_upwards_trend: {
    id: "chart_with_upwards_trend",
    name: "Chart Increasing",
    keywords: [
      "with",
      "upwards",
      "trend",
      "graph",
      "presentation",
      "stats",
      "recovery",
      "business",
      "economics",
      "money",
      "sales",
      "good",
      "success"
    ],
    skins: [
      {
        unified: "1f4c8",
        native: "📈"
      }
    ],
    version: 1
  },
  chart_with_downwards_trend: {
    id: "chart_with_downwards_trend",
    name: "Chart Decreasing",
    keywords: [
      "with",
      "downwards",
      "trend",
      "graph",
      "presentation",
      "stats",
      "recession",
      "business",
      "economics",
      "money",
      "sales",
      "bad",
      "failure"
    ],
    skins: [
      {
        unified: "1f4c9",
        native: "📉"
      }
    ],
    version: 1
  },
  bar_chart: {
    id: "bar_chart",
    name: "Bar Chart",
    keywords: [
      "graph",
      "presentation",
      "stats"
    ],
    skins: [
      {
        unified: "1f4ca",
        native: "📊"
      }
    ],
    version: 1
  },
  clipboard: {
    id: "clipboard",
    name: "Clipboard",
    keywords: [
      "stationery",
      "documents"
    ],
    skins: [
      {
        unified: "1f4cb",
        native: "📋"
      }
    ],
    version: 1
  },
  pushpin: {
    id: "pushpin",
    name: "Pushpin",
    keywords: [
      "stationery",
      "mark",
      "here"
    ],
    skins: [
      {
        unified: "1f4cc",
        native: "📌"
      }
    ],
    version: 1
  },
  round_pushpin: {
    id: "round_pushpin",
    name: "Round Pushpin",
    keywords: [
      "stationery",
      "location",
      "map",
      "here"
    ],
    skins: [
      {
        unified: "1f4cd",
        native: "📍"
      }
    ],
    version: 1
  },
  paperclip: {
    id: "paperclip",
    name: "Paperclip",
    keywords: [
      "documents",
      "stationery"
    ],
    skins: [
      {
        unified: "1f4ce",
        native: "📎"
      }
    ],
    version: 1
  },
  linked_paperclips: {
    id: "linked_paperclips",
    name: "Linked Paperclips",
    keywords: [
      "documents",
      "stationery"
    ],
    skins: [
      {
        unified: "1f587-fe0f",
        native: "🖇️"
      }
    ],
    version: 1
  },
  straight_ruler: {
    id: "straight_ruler",
    name: "Straight Ruler",
    keywords: [
      "stationery",
      "calculate",
      "length",
      "math",
      "school",
      "drawing",
      "architect",
      "sketch"
    ],
    skins: [
      {
        unified: "1f4cf",
        native: "📏"
      }
    ],
    version: 1
  },
  triangular_ruler: {
    id: "triangular_ruler",
    name: "Triangular Ruler",
    keywords: [
      "stationery",
      "math",
      "architect",
      "sketch"
    ],
    skins: [
      {
        unified: "1f4d0",
        native: "📐"
      }
    ],
    version: 1
  },
  scissors: {
    id: "scissors",
    name: "Scissors",
    keywords: [
      "stationery",
      "cut"
    ],
    skins: [
      {
        unified: "2702-fe0f",
        native: "✂️"
      }
    ],
    version: 1
  },
  card_file_box: {
    id: "card_file_box",
    name: "Card File Box",
    keywords: [
      "business",
      "stationery"
    ],
    skins: [
      {
        unified: "1f5c3-fe0f",
        native: "🗃️"
      }
    ],
    version: 1
  },
  file_cabinet: {
    id: "file_cabinet",
    name: "File Cabinet",
    keywords: [
      "filing",
      "organizing"
    ],
    skins: [
      {
        unified: "1f5c4-fe0f",
        native: "🗄️"
      }
    ],
    version: 1
  },
  wastebasket: {
    id: "wastebasket",
    name: "Wastebasket",
    keywords: [
      "bin",
      "trash",
      "rubbish",
      "garbage",
      "toss"
    ],
    skins: [
      {
        unified: "1f5d1-fe0f",
        native: "🗑️"
      }
    ],
    version: 1
  },
  lock: {
    id: "lock",
    name: "Lock",
    keywords: [
      "locked",
      "security",
      "password",
      "padlock"
    ],
    skins: [
      {
        unified: "1f512",
        native: "🔒"
      }
    ],
    version: 1
  },
  unlock: {
    id: "unlock",
    name: "Unlocked",
    keywords: [
      "unlock",
      "privacy",
      "security"
    ],
    skins: [
      {
        unified: "1f513",
        native: "🔓"
      }
    ],
    version: 1
  },
  lock_with_ink_pen: {
    id: "lock_with_ink_pen",
    name: "Locked with Pen",
    keywords: [
      "lock",
      "ink",
      "security",
      "secret"
    ],
    skins: [
      {
        unified: "1f50f",
        native: "🔏"
      }
    ],
    version: 1
  },
  closed_lock_with_key: {
    id: "closed_lock_with_key",
    name: "Locked with Key",
    keywords: [
      "closed",
      "lock",
      "security",
      "privacy"
    ],
    skins: [
      {
        unified: "1f510",
        native: "🔐"
      }
    ],
    version: 1
  },
  key: {
    id: "key",
    name: "Key",
    keywords: [
      "lock",
      "door",
      "password"
    ],
    skins: [
      {
        unified: "1f511",
        native: "🔑"
      }
    ],
    version: 1
  },
  old_key: {
    id: "old_key",
    name: "Old Key",
    keywords: [
      "lock",
      "door",
      "password"
    ],
    skins: [
      {
        unified: "1f5dd-fe0f",
        native: "🗝️"
      }
    ],
    version: 1
  },
  hammer: {
    id: "hammer",
    name: "Hammer",
    keywords: [
      "tools",
      "build",
      "create"
    ],
    skins: [
      {
        unified: "1f528",
        native: "🔨"
      }
    ],
    version: 1
  },
  axe: {
    id: "axe",
    name: "Axe",
    keywords: [
      "tool",
      "chop",
      "cut"
    ],
    skins: [
      {
        unified: "1fa93",
        native: "🪓"
      }
    ],
    version: 12
  },
  pick: {
    id: "pick",
    name: "Pick",
    keywords: [
      "tools",
      "dig"
    ],
    skins: [
      {
        unified: "26cf-fe0f",
        native: "⛏️"
      }
    ],
    version: 1
  },
  hammer_and_pick: {
    id: "hammer_and_pick",
    name: "Hammer and Pick",
    keywords: [
      "tools",
      "build",
      "create"
    ],
    skins: [
      {
        unified: "2692-fe0f",
        native: "⚒️"
      }
    ],
    version: 1
  },
  hammer_and_wrench: {
    id: "hammer_and_wrench",
    name: "Hammer and Wrench",
    keywords: [
      "tools",
      "build",
      "create"
    ],
    skins: [
      {
        unified: "1f6e0-fe0f",
        native: "🛠️"
      }
    ],
    version: 1
  },
  dagger_knife: {
    id: "dagger_knife",
    name: "Dagger",
    keywords: [
      "knife",
      "weapon"
    ],
    skins: [
      {
        unified: "1f5e1-fe0f",
        native: "🗡️"
      }
    ],
    version: 1
  },
  crossed_swords: {
    id: "crossed_swords",
    name: "Crossed Swords",
    keywords: [
      "weapon"
    ],
    skins: [
      {
        unified: "2694-fe0f",
        native: "⚔️"
      }
    ],
    version: 1
  },
  bomb: {
    id: "bomb",
    name: "Bomb",
    keywords: [
      "boom",
      "explode",
      "explosion",
      "terrorism"
    ],
    skins: [
      {
        unified: "1f4a3",
        native: "💣"
      }
    ],
    version: 1
  },
  boomerang: {
    id: "boomerang",
    name: "Boomerang",
    keywords: [
      "weapon"
    ],
    skins: [
      {
        unified: "1fa83",
        native: "🪃"
      }
    ],
    version: 13
  },
  bow_and_arrow: {
    id: "bow_and_arrow",
    name: "Bow and Arrow",
    keywords: [
      "sports"
    ],
    skins: [
      {
        unified: "1f3f9",
        native: "🏹"
      }
    ],
    version: 1
  },
  shield: {
    id: "shield",
    name: "Shield",
    keywords: [
      "protection",
      "security"
    ],
    skins: [
      {
        unified: "1f6e1-fe0f",
        native: "🛡️"
      }
    ],
    version: 1
  },
  carpentry_saw: {
    id: "carpentry_saw",
    name: "Carpentry Saw",
    keywords: [
      "cut",
      "chop"
    ],
    skins: [
      {
        unified: "1fa9a",
        native: "🪚"
      }
    ],
    version: 13
  },
  wrench: {
    id: "wrench",
    name: "Wrench",
    keywords: [
      "tools",
      "diy",
      "ikea",
      "fix",
      "maintainer"
    ],
    skins: [
      {
        unified: "1f527",
        native: "🔧"
      }
    ],
    version: 1
  },
  screwdriver: {
    id: "screwdriver",
    name: "Screwdriver",
    keywords: [
      "tools"
    ],
    skins: [
      {
        unified: "1fa9b",
        native: "🪛"
      }
    ],
    version: 13
  },
  nut_and_bolt: {
    id: "nut_and_bolt",
    name: "Nut and Bolt",
    keywords: [
      "handy",
      "tools",
      "fix"
    ],
    skins: [
      {
        unified: "1f529",
        native: "🔩"
      }
    ],
    version: 1
  },
  gear: {
    id: "gear",
    name: "Gear",
    keywords: [
      "cog"
    ],
    skins: [
      {
        unified: "2699-fe0f",
        native: "⚙️"
      }
    ],
    version: 1
  },
  compression: {
    id: "compression",
    name: "Clamp",
    keywords: [
      "compression",
      "tool"
    ],
    skins: [
      {
        unified: "1f5dc-fe0f",
        native: "🗜️"
      }
    ],
    version: 1
  },
  scales: {
    id: "scales",
    name: "Balance Scale",
    keywords: [
      "scales",
      "law",
      "fairness",
      "weight"
    ],
    skins: [
      {
        unified: "2696-fe0f",
        native: "⚖️"
      }
    ],
    version: 1
  },
  probing_cane: {
    id: "probing_cane",
    name: "White Cane",
    keywords: [
      "probing",
      "accessibility"
    ],
    skins: [
      {
        unified: "1f9af",
        native: "🦯"
      }
    ],
    version: 12
  },
  link: {
    id: "link",
    name: "Link",
    keywords: [
      "rings",
      "url"
    ],
    skins: [
      {
        unified: "1f517",
        native: "🔗"
      }
    ],
    version: 1
  },
  chains: {
    id: "chains",
    name: "Chains",
    keywords: [
      "lock",
      "arrest"
    ],
    skins: [
      {
        unified: "26d3-fe0f",
        native: "⛓️"
      }
    ],
    version: 1
  },
  hook: {
    id: "hook",
    name: "Hook",
    keywords: [
      "tools"
    ],
    skins: [
      {
        unified: "1fa9d",
        native: "🪝"
      }
    ],
    version: 13
  },
  toolbox: {
    id: "toolbox",
    name: "Toolbox",
    keywords: [
      "tools",
      "diy",
      "fix",
      "maintainer",
      "mechanic"
    ],
    skins: [
      {
        unified: "1f9f0",
        native: "🧰"
      }
    ],
    version: 11
  },
  magnet: {
    id: "magnet",
    name: "Magnet",
    keywords: [
      "attraction",
      "magnetic"
    ],
    skins: [
      {
        unified: "1f9f2",
        native: "🧲"
      }
    ],
    version: 11
  },
  ladder: {
    id: "ladder",
    name: "Ladder",
    keywords: [
      "tools"
    ],
    skins: [
      {
        unified: "1fa9c",
        native: "🪜"
      }
    ],
    version: 13
  },
  alembic: {
    id: "alembic",
    name: "Alembic",
    keywords: [
      "distilling",
      "science",
      "experiment",
      "chemistry"
    ],
    skins: [
      {
        unified: "2697-fe0f",
        native: "⚗️"
      }
    ],
    version: 1
  },
  test_tube: {
    id: "test_tube",
    name: "Test Tube",
    keywords: [
      "chemistry",
      "experiment",
      "lab",
      "science"
    ],
    skins: [
      {
        unified: "1f9ea",
        native: "🧪"
      }
    ],
    version: 11
  },
  petri_dish: {
    id: "petri_dish",
    name: "Petri Dish",
    keywords: [
      "bacteria",
      "biology",
      "culture",
      "lab"
    ],
    skins: [
      {
        unified: "1f9eb",
        native: "🧫"
      }
    ],
    version: 11
  },
  dna: {
    id: "dna",
    name: "Dna",
    keywords: [
      "biologist",
      "genetics",
      "life"
    ],
    skins: [
      {
        unified: "1f9ec",
        native: "🧬"
      }
    ],
    version: 11
  },
  microscope: {
    id: "microscope",
    name: "Microscope",
    keywords: [
      "laboratory",
      "experiment",
      "zoomin",
      "science",
      "study"
    ],
    skins: [
      {
        unified: "1f52c",
        native: "🔬"
      }
    ],
    version: 1
  },
  telescope: {
    id: "telescope",
    name: "Telescope",
    keywords: [
      "stars",
      "space",
      "zoom",
      "science",
      "astronomy"
    ],
    skins: [
      {
        unified: "1f52d",
        native: "🔭"
      }
    ],
    version: 1
  },
  satellite_antenna: {
    id: "satellite_antenna",
    name: "Satellite Antenna",
    keywords: [
      "communication",
      "future",
      "radio",
      "space"
    ],
    skins: [
      {
        unified: "1f4e1",
        native: "📡"
      }
    ],
    version: 1
  },
  syringe: {
    id: "syringe",
    name: "Syringe",
    keywords: [
      "health",
      "hospital",
      "drugs",
      "blood",
      "medicine",
      "needle",
      "doctor",
      "nurse"
    ],
    skins: [
      {
        unified: "1f489",
        native: "💉"
      }
    ],
    version: 1
  },
  drop_of_blood: {
    id: "drop_of_blood",
    name: "Drop of Blood",
    keywords: [
      "period",
      "hurt",
      "harm",
      "wound"
    ],
    skins: [
      {
        unified: "1fa78",
        native: "🩸"
      }
    ],
    version: 12
  },
  pill: {
    id: "pill",
    name: "Pill",
    keywords: [
      "health",
      "medicine",
      "doctor",
      "pharmacy",
      "drug"
    ],
    skins: [
      {
        unified: "1f48a",
        native: "💊"
      }
    ],
    version: 1
  },
  adhesive_bandage: {
    id: "adhesive_bandage",
    name: "Adhesive Bandage",
    keywords: [
      "heal"
    ],
    skins: [
      {
        unified: "1fa79",
        native: "🩹"
      }
    ],
    version: 12
  },
  crutch: {
    id: "crutch",
    name: "Crutch",
    keywords: [
      "accessibility",
      "assist"
    ],
    skins: [
      {
        unified: "1fa7c",
        native: "🩼"
      }
    ],
    version: 14
  },
  stethoscope: {
    id: "stethoscope",
    name: "Stethoscope",
    keywords: [
      "health"
    ],
    skins: [
      {
        unified: "1fa7a",
        native: "🩺"
      }
    ],
    version: 12
  },
  "x-ray": {
    id: "x-ray",
    name: "X-Ray",
    keywords: [
      "x",
      "ray",
      "skeleton",
      "medicine"
    ],
    skins: [
      {
        unified: "1fa7b",
        native: "🩻"
      }
    ],
    version: 14
  },
  door: {
    id: "door",
    name: "Door",
    keywords: [
      "house",
      "entry",
      "exit"
    ],
    skins: [
      {
        unified: "1f6aa",
        native: "🚪"
      }
    ],
    version: 1
  },
  elevator: {
    id: "elevator",
    name: "Elevator",
    keywords: [
      "lift"
    ],
    skins: [
      {
        unified: "1f6d7",
        native: "🛗"
      }
    ],
    version: 13
  },
  mirror: {
    id: "mirror",
    name: "Mirror",
    keywords: [
      "reflection"
    ],
    skins: [
      {
        unified: "1fa9e",
        native: "🪞"
      }
    ],
    version: 13
  },
  window: {
    id: "window",
    name: "Window",
    keywords: [
      "scenery"
    ],
    skins: [
      {
        unified: "1fa9f",
        native: "🪟"
      }
    ],
    version: 13
  },
  bed: {
    id: "bed",
    name: "Bed",
    keywords: [
      "sleep",
      "rest"
    ],
    skins: [
      {
        unified: "1f6cf-fe0f",
        native: "🛏️"
      }
    ],
    version: 1
  },
  couch_and_lamp: {
    id: "couch_and_lamp",
    name: "Couch and Lamp",
    keywords: [
      "read",
      "chill"
    ],
    skins: [
      {
        unified: "1f6cb-fe0f",
        native: "🛋️"
      }
    ],
    version: 1
  },
  chair: {
    id: "chair",
    name: "Chair",
    keywords: [
      "sit",
      "furniture"
    ],
    skins: [
      {
        unified: "1fa91",
        native: "🪑"
      }
    ],
    version: 12
  },
  toilet: {
    id: "toilet",
    name: "Toilet",
    keywords: [
      "restroom",
      "wc",
      "washroom",
      "bathroom",
      "potty"
    ],
    skins: [
      {
        unified: "1f6bd",
        native: "🚽"
      }
    ],
    version: 1
  },
  plunger: {
    id: "plunger",
    name: "Plunger",
    keywords: [
      "toilet"
    ],
    skins: [
      {
        unified: "1faa0",
        native: "🪠"
      }
    ],
    version: 13
  },
  shower: {
    id: "shower",
    name: "Shower",
    keywords: [
      "clean",
      "water",
      "bathroom"
    ],
    skins: [
      {
        unified: "1f6bf",
        native: "🚿"
      }
    ],
    version: 1
  },
  bathtub: {
    id: "bathtub",
    name: "Bathtub",
    keywords: [
      "clean",
      "shower",
      "bathroom"
    ],
    skins: [
      {
        unified: "1f6c1",
        native: "🛁"
      }
    ],
    version: 1
  },
  mouse_trap: {
    id: "mouse_trap",
    name: "Mouse Trap",
    keywords: [
      "cheese"
    ],
    skins: [
      {
        unified: "1faa4",
        native: "🪤"
      }
    ],
    version: 13
  },
  razor: {
    id: "razor",
    name: "Razor",
    keywords: [
      "cut"
    ],
    skins: [
      {
        unified: "1fa92",
        native: "🪒"
      }
    ],
    version: 12
  },
  lotion_bottle: {
    id: "lotion_bottle",
    name: "Lotion Bottle",
    keywords: [
      "moisturizer",
      "sunscreen"
    ],
    skins: [
      {
        unified: "1f9f4",
        native: "🧴"
      }
    ],
    version: 11
  },
  safety_pin: {
    id: "safety_pin",
    name: "Safety Pin",
    keywords: [
      "diaper"
    ],
    skins: [
      {
        unified: "1f9f7",
        native: "🧷"
      }
    ],
    version: 11
  },
  broom: {
    id: "broom",
    name: "Broom",
    keywords: [
      "cleaning",
      "sweeping",
      "witch"
    ],
    skins: [
      {
        unified: "1f9f9",
        native: "🧹"
      }
    ],
    version: 11
  },
  basket: {
    id: "basket",
    name: "Basket",
    keywords: [
      "laundry"
    ],
    skins: [
      {
        unified: "1f9fa",
        native: "🧺"
      }
    ],
    version: 11
  },
  roll_of_paper: {
    id: "roll_of_paper",
    name: "Roll of Paper",
    keywords: [],
    skins: [
      {
        unified: "1f9fb",
        native: "🧻"
      }
    ],
    version: 11
  },
  bucket: {
    id: "bucket",
    name: "Bucket",
    keywords: [
      "water",
      "container"
    ],
    skins: [
      {
        unified: "1faa3",
        native: "🪣"
      }
    ],
    version: 13
  },
  soap: {
    id: "soap",
    name: "Soap",
    keywords: [
      "bar",
      "bathing",
      "cleaning",
      "lather"
    ],
    skins: [
      {
        unified: "1f9fc",
        native: "🧼"
      }
    ],
    version: 11
  },
  bubbles: {
    id: "bubbles",
    name: "Bubbles",
    keywords: [
      "soap",
      "fun",
      "carbonation",
      "sparkling"
    ],
    skins: [
      {
        unified: "1fae7",
        native: "🫧"
      }
    ],
    version: 14
  },
  toothbrush: {
    id: "toothbrush",
    name: "Toothbrush",
    keywords: [
      "hygiene",
      "dental"
    ],
    skins: [
      {
        unified: "1faa5",
        native: "🪥"
      }
    ],
    version: 13
  },
  sponge: {
    id: "sponge",
    name: "Sponge",
    keywords: [
      "absorbing",
      "cleaning",
      "porous"
    ],
    skins: [
      {
        unified: "1f9fd",
        native: "🧽"
      }
    ],
    version: 11
  },
  fire_extinguisher: {
    id: "fire_extinguisher",
    name: "Fire Extinguisher",
    keywords: [
      "quench"
    ],
    skins: [
      {
        unified: "1f9ef",
        native: "🧯"
      }
    ],
    version: 11
  },
  shopping_trolley: {
    id: "shopping_trolley",
    name: "Shopping Cart",
    keywords: [
      "trolley"
    ],
    skins: [
      {
        unified: "1f6d2",
        native: "🛒"
      }
    ],
    version: 3
  },
  smoking: {
    id: "smoking",
    name: "Cigarette",
    keywords: [
      "smoking",
      "kills",
      "tobacco",
      "joint",
      "smoke"
    ],
    skins: [
      {
        unified: "1f6ac",
        native: "🚬"
      }
    ],
    version: 1
  },
  coffin: {
    id: "coffin",
    name: "Coffin",
    keywords: [
      "vampire",
      "dead",
      "die",
      "death",
      "rip",
      "graveyard",
      "cemetery",
      "casket",
      "funeral",
      "box"
    ],
    skins: [
      {
        unified: "26b0-fe0f",
        native: "⚰️"
      }
    ],
    version: 1
  },
  headstone: {
    id: "headstone",
    name: "Headstone",
    keywords: [
      "death",
      "rip",
      "grave"
    ],
    skins: [
      {
        unified: "1faa6",
        native: "🪦"
      }
    ],
    version: 13
  },
  funeral_urn: {
    id: "funeral_urn",
    name: "Funeral Urn",
    keywords: [
      "dead",
      "die",
      "death",
      "rip",
      "ashes"
    ],
    skins: [
      {
        unified: "26b1-fe0f",
        native: "⚱️"
      }
    ],
    version: 1
  },
  nazar_amulet: {
    id: "nazar_amulet",
    name: "Nazar Amulet",
    keywords: [
      "bead",
      "charm"
    ],
    skins: [
      {
        unified: "1f9ff",
        native: "🧿"
      }
    ],
    version: 11
  },
  hamsa: {
    id: "hamsa",
    name: "Hamsa",
    keywords: [
      "religion",
      "protection"
    ],
    skins: [
      {
        unified: "1faac",
        native: "🪬"
      }
    ],
    version: 14
  },
  moyai: {
    id: "moyai",
    name: "Moai",
    keywords: [
      "moyai",
      "rock",
      "easter",
      "island"
    ],
    skins: [
      {
        unified: "1f5ff",
        native: "🗿"
      }
    ],
    version: 1
  },
  placard: {
    id: "placard",
    name: "Placard",
    keywords: [
      "announcement"
    ],
    skins: [
      {
        unified: "1faa7",
        native: "🪧"
      }
    ],
    version: 13
  },
  identification_card: {
    id: "identification_card",
    name: "Identification Card",
    keywords: [
      "document"
    ],
    skins: [
      {
        unified: "1faaa",
        native: "🪪"
      }
    ],
    version: 14
  },
  atm: {
    id: "atm",
    name: "Atm Sign",
    keywords: [
      "money",
      "sales",
      "cash",
      "blue",
      "square",
      "payment",
      "bank"
    ],
    skins: [
      {
        unified: "1f3e7",
        native: "🏧"
      }
    ],
    version: 1
  },
  put_litter_in_its_place: {
    id: "put_litter_in_its_place",
    name: "Litter in Bin Sign",
    keywords: [
      "put",
      "its",
      "place",
      "blue",
      "square",
      "human",
      "info"
    ],
    skins: [
      {
        unified: "1f6ae",
        native: "🚮"
      }
    ],
    version: 1
  },
  potable_water: {
    id: "potable_water",
    name: "Potable Water",
    keywords: [
      "blue",
      "square",
      "liquid",
      "restroom",
      "cleaning",
      "faucet"
    ],
    skins: [
      {
        unified: "1f6b0",
        native: "🚰"
      }
    ],
    version: 1
  },
  wheelchair: {
    id: "wheelchair",
    name: "Wheelchair Symbol",
    keywords: [
      "blue",
      "square",
      "disabled",
      "accessibility"
    ],
    skins: [
      {
        unified: "267f",
        native: "♿"
      }
    ],
    version: 1
  },
  mens: {
    id: "mens",
    name: "Men’s Room",
    keywords: [
      "mens",
      "men",
      "s",
      "toilet",
      "restroom",
      "wc",
      "blue",
      "square",
      "gender",
      "male"
    ],
    skins: [
      {
        unified: "1f6b9",
        native: "🚹"
      }
    ],
    version: 1
  },
  womens: {
    id: "womens",
    name: "Women’s Room",
    keywords: [
      "womens",
      "women",
      "s",
      "purple",
      "square",
      "woman",
      "female",
      "toilet",
      "loo",
      "restroom",
      "gender"
    ],
    skins: [
      {
        unified: "1f6ba",
        native: "🚺"
      }
    ],
    version: 1
  },
  restroom: {
    id: "restroom",
    name: "Restroom",
    keywords: [
      "blue",
      "square",
      "toilet",
      "refresh",
      "wc",
      "gender"
    ],
    skins: [
      {
        unified: "1f6bb",
        native: "🚻"
      }
    ],
    version: 1
  },
  baby_symbol: {
    id: "baby_symbol",
    name: "Baby Symbol",
    keywords: [
      "orange",
      "square",
      "child"
    ],
    skins: [
      {
        unified: "1f6bc",
        native: "🚼"
      }
    ],
    version: 1
  },
  wc: {
    id: "wc",
    name: "Water Closet",
    keywords: [
      "wc",
      "toilet",
      "restroom",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f6be",
        native: "🚾"
      }
    ],
    version: 1
  },
  passport_control: {
    id: "passport_control",
    name: "Passport Control",
    keywords: [
      "custom",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f6c2",
        native: "🛂"
      }
    ],
    version: 1
  },
  customs: {
    id: "customs",
    name: "Customs",
    keywords: [
      "passport",
      "border",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f6c3",
        native: "🛃"
      }
    ],
    version: 1
  },
  baggage_claim: {
    id: "baggage_claim",
    name: "Baggage Claim",
    keywords: [
      "blue",
      "square",
      "airport",
      "transport"
    ],
    skins: [
      {
        unified: "1f6c4",
        native: "🛄"
      }
    ],
    version: 1
  },
  left_luggage: {
    id: "left_luggage",
    name: "Left Luggage",
    keywords: [
      "blue",
      "square",
      "travel"
    ],
    skins: [
      {
        unified: "1f6c5",
        native: "🛅"
      }
    ],
    version: 1
  },
  warning: {
    id: "warning",
    name: "Warning",
    keywords: [
      "exclamation",
      "wip",
      "alert",
      "error",
      "problem",
      "issue"
    ],
    skins: [
      {
        unified: "26a0-fe0f",
        native: "⚠️"
      }
    ],
    version: 1
  },
  children_crossing: {
    id: "children_crossing",
    name: "Children Crossing",
    keywords: [
      "school",
      "warning",
      "danger",
      "sign",
      "driving",
      "yellow",
      "diamond"
    ],
    skins: [
      {
        unified: "1f6b8",
        native: "🚸"
      }
    ],
    version: 1
  },
  no_entry: {
    id: "no_entry",
    name: "No Entry",
    keywords: [
      "limit",
      "security",
      "privacy",
      "bad",
      "denied",
      "stop",
      "circle"
    ],
    skins: [
      {
        unified: "26d4",
        native: "⛔"
      }
    ],
    version: 1
  },
  no_entry_sign: {
    id: "no_entry_sign",
    name: "Prohibited",
    keywords: [
      "no",
      "entry",
      "sign",
      "forbid",
      "stop",
      "limit",
      "denied",
      "disallow",
      "circle"
    ],
    skins: [
      {
        unified: "1f6ab",
        native: "🚫"
      }
    ],
    version: 1
  },
  no_bicycles: {
    id: "no_bicycles",
    name: "No Bicycles",
    keywords: [
      "cyclist",
      "prohibited",
      "circle"
    ],
    skins: [
      {
        unified: "1f6b3",
        native: "🚳"
      }
    ],
    version: 1
  },
  no_smoking: {
    id: "no_smoking",
    name: "No Smoking",
    keywords: [
      "cigarette",
      "blue",
      "square",
      "smell",
      "smoke"
    ],
    skins: [
      {
        unified: "1f6ad",
        native: "🚭"
      }
    ],
    version: 1
  },
  do_not_litter: {
    id: "do_not_litter",
    name: "No Littering",
    keywords: [
      "do",
      "not",
      "litter",
      "trash",
      "bin",
      "garbage",
      "circle"
    ],
    skins: [
      {
        unified: "1f6af",
        native: "🚯"
      }
    ],
    version: 1
  },
  "non-potable_water": {
    id: "non-potable_water",
    name: "Non-Potable Water",
    keywords: [
      "non",
      "potable",
      "drink",
      "faucet",
      "tap",
      "circle"
    ],
    skins: [
      {
        unified: "1f6b1",
        native: "🚱"
      }
    ],
    version: 1
  },
  no_pedestrians: {
    id: "no_pedestrians",
    name: "No Pedestrians",
    keywords: [
      "rules",
      "crossing",
      "walking",
      "circle"
    ],
    skins: [
      {
        unified: "1f6b7",
        native: "🚷"
      }
    ],
    version: 1
  },
  no_mobile_phones: {
    id: "no_mobile_phones",
    name: "No Mobile Phones",
    keywords: [
      "iphone",
      "mute",
      "circle"
    ],
    skins: [
      {
        unified: "1f4f5",
        native: "📵"
      }
    ],
    version: 1
  },
  underage: {
    id: "underage",
    name: "No One Under Eighteen",
    keywords: [
      "underage",
      "18",
      "drink",
      "pub",
      "night",
      "minor",
      "circle"
    ],
    skins: [
      {
        unified: "1f51e",
        native: "🔞"
      }
    ],
    version: 1
  },
  radioactive_sign: {
    id: "radioactive_sign",
    name: "Radioactive",
    keywords: [
      "sign",
      "nuclear",
      "danger"
    ],
    skins: [
      {
        unified: "2622-fe0f",
        native: "☢️"
      }
    ],
    version: 1
  },
  biohazard_sign: {
    id: "biohazard_sign",
    name: "Biohazard",
    keywords: [
      "sign",
      "danger"
    ],
    skins: [
      {
        unified: "2623-fe0f",
        native: "☣️"
      }
    ],
    version: 1
  },
  arrow_up: {
    id: "arrow_up",
    name: "Up Arrow",
    keywords: [
      "blue",
      "square",
      "continue",
      "top",
      "direction"
    ],
    skins: [
      {
        unified: "2b06-fe0f",
        native: "⬆️"
      }
    ],
    version: 1
  },
  arrow_upper_right: {
    id: "arrow_upper_right",
    name: "Up-Right Arrow",
    keywords: [
      "upper",
      "right",
      "up",
      "blue",
      "square",
      "point",
      "direction",
      "diagonal",
      "northeast"
    ],
    skins: [
      {
        unified: "2197-fe0f",
        native: "↗️"
      }
    ],
    version: 1
  },
  arrow_right: {
    id: "arrow_right",
    name: "Right Arrow",
    keywords: [
      "blue",
      "square",
      "next"
    ],
    skins: [
      {
        unified: "27a1-fe0f",
        native: "➡️"
      }
    ],
    version: 1
  },
  arrow_lower_right: {
    id: "arrow_lower_right",
    name: "South East Arrow",
    keywords: [
      "lower",
      "right",
      "down",
      "blue",
      "square",
      "direction",
      "diagonal",
      "southeast"
    ],
    skins: [
      {
        unified: "2198-fe0f",
        native: "↘️"
      }
    ],
    version: 1
  },
  arrow_down: {
    id: "arrow_down",
    name: "Down Arrow",
    keywords: [
      "blue",
      "square",
      "direction",
      "bottom"
    ],
    skins: [
      {
        unified: "2b07-fe0f",
        native: "⬇️"
      }
    ],
    version: 1
  },
  arrow_lower_left: {
    id: "arrow_lower_left",
    name: "Down-Left Arrow",
    keywords: [
      "lower",
      "left",
      "down",
      "blue",
      "square",
      "direction",
      "diagonal",
      "southwest"
    ],
    skins: [
      {
        unified: "2199-fe0f",
        native: "↙️"
      }
    ],
    version: 1
  },
  arrow_left: {
    id: "arrow_left",
    name: "Left Arrow",
    keywords: [
      "blue",
      "square",
      "previous",
      "back"
    ],
    skins: [
      {
        unified: "2b05-fe0f",
        native: "⬅️"
      }
    ],
    version: 1
  },
  arrow_upper_left: {
    id: "arrow_upper_left",
    name: "Up-Left Arrow",
    keywords: [
      "upper",
      "left",
      "up",
      "blue",
      "square",
      "point",
      "direction",
      "diagonal",
      "northwest"
    ],
    skins: [
      {
        unified: "2196-fe0f",
        native: "↖️"
      }
    ],
    version: 1
  },
  arrow_up_down: {
    id: "arrow_up_down",
    name: "Up Down Arrow",
    keywords: [
      "blue",
      "square",
      "direction",
      "way",
      "vertical"
    ],
    skins: [
      {
        unified: "2195-fe0f",
        native: "↕️"
      }
    ],
    version: 1
  },
  left_right_arrow: {
    id: "left_right_arrow",
    name: "Left Right Arrow",
    keywords: [
      "shape",
      "direction",
      "horizontal",
      "sideways"
    ],
    skins: [
      {
        unified: "2194-fe0f",
        native: "↔️"
      }
    ],
    version: 1
  },
  leftwards_arrow_with_hook: {
    id: "leftwards_arrow_with_hook",
    name: "Right Arrow Curving Left",
    keywords: [
      "leftwards",
      "with",
      "hook",
      "back",
      "return",
      "blue",
      "square",
      "undo",
      "enter"
    ],
    skins: [
      {
        unified: "21a9-fe0f",
        native: "↩️"
      }
    ],
    version: 1
  },
  arrow_right_hook: {
    id: "arrow_right_hook",
    name: "Left Arrow Curving Right",
    keywords: [
      "hook",
      "blue",
      "square",
      "return",
      "rotate",
      "direction"
    ],
    skins: [
      {
        unified: "21aa-fe0f",
        native: "↪️"
      }
    ],
    version: 1
  },
  arrow_heading_up: {
    id: "arrow_heading_up",
    name: "Right Arrow Curving Up",
    keywords: [
      "heading",
      "blue",
      "square",
      "direction",
      "top"
    ],
    skins: [
      {
        unified: "2934-fe0f",
        native: "⤴️"
      }
    ],
    version: 1
  },
  arrow_heading_down: {
    id: "arrow_heading_down",
    name: "Right Arrow Curving Down",
    keywords: [
      "heading",
      "blue",
      "square",
      "direction",
      "bottom"
    ],
    skins: [
      {
        unified: "2935-fe0f",
        native: "⤵️"
      }
    ],
    version: 1
  },
  arrows_clockwise: {
    id: "arrows_clockwise",
    name: "Clockwise Vertical Arrows",
    keywords: [
      "sync",
      "cycle",
      "round",
      "repeat"
    ],
    skins: [
      {
        unified: "1f503",
        native: "🔃"
      }
    ],
    version: 1
  },
  arrows_counterclockwise: {
    id: "arrows_counterclockwise",
    name: "Counterclockwise Arrows Button",
    keywords: [
      "blue",
      "square",
      "sync",
      "cycle"
    ],
    skins: [
      {
        unified: "1f504",
        native: "🔄"
      }
    ],
    version: 1
  },
  back: {
    id: "back",
    name: "Back Arrow",
    keywords: [
      "words",
      "return"
    ],
    skins: [
      {
        unified: "1f519",
        native: "🔙"
      }
    ],
    version: 1
  },
  end: {
    id: "end",
    name: "End Arrow",
    keywords: [
      "words"
    ],
    skins: [
      {
        unified: "1f51a",
        native: "🔚"
      }
    ],
    version: 1
  },
  on: {
    id: "on",
    name: "On! Arrow",
    keywords: [
      "on",
      "words"
    ],
    skins: [
      {
        unified: "1f51b",
        native: "🔛"
      }
    ],
    version: 1
  },
  soon: {
    id: "soon",
    name: "Soon Arrow",
    keywords: [
      "words"
    ],
    skins: [
      {
        unified: "1f51c",
        native: "🔜"
      }
    ],
    version: 1
  },
  top: {
    id: "top",
    name: "Top Arrow",
    keywords: [
      "words",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f51d",
        native: "🔝"
      }
    ],
    version: 1
  },
  place_of_worship: {
    id: "place_of_worship",
    name: "Place of Worship",
    keywords: [
      "religion",
      "church",
      "temple",
      "prayer"
    ],
    skins: [
      {
        unified: "1f6d0",
        native: "🛐"
      }
    ],
    version: 1
  },
  atom_symbol: {
    id: "atom_symbol",
    name: "Atom Symbol",
    keywords: [
      "science",
      "physics",
      "chemistry"
    ],
    skins: [
      {
        unified: "269b-fe0f",
        native: "⚛️"
      }
    ],
    version: 1
  },
  om_symbol: {
    id: "om_symbol",
    name: "Om",
    keywords: [
      "symbol",
      "hinduism",
      "buddhism",
      "sikhism",
      "jainism"
    ],
    skins: [
      {
        unified: "1f549-fe0f",
        native: "🕉️"
      }
    ],
    version: 1
  },
  star_of_david: {
    id: "star_of_david",
    name: "Star of David",
    keywords: [
      "judaism"
    ],
    skins: [
      {
        unified: "2721-fe0f",
        native: "✡️"
      }
    ],
    version: 1
  },
  wheel_of_dharma: {
    id: "wheel_of_dharma",
    name: "Wheel of Dharma",
    keywords: [
      "hinduism",
      "buddhism",
      "sikhism",
      "jainism"
    ],
    skins: [
      {
        unified: "2638-fe0f",
        native: "☸️"
      }
    ],
    version: 1
  },
  yin_yang: {
    id: "yin_yang",
    name: "Yin Yang",
    keywords: [
      "balance"
    ],
    skins: [
      {
        unified: "262f-fe0f",
        native: "☯️"
      }
    ],
    version: 1
  },
  latin_cross: {
    id: "latin_cross",
    name: "Latin Cross",
    keywords: [
      "christianity"
    ],
    skins: [
      {
        unified: "271d-fe0f",
        native: "✝️"
      }
    ],
    version: 1
  },
  orthodox_cross: {
    id: "orthodox_cross",
    name: "Orthodox Cross",
    keywords: [
      "suppedaneum",
      "religion"
    ],
    skins: [
      {
        unified: "2626-fe0f",
        native: "☦️"
      }
    ],
    version: 1
  },
  star_and_crescent: {
    id: "star_and_crescent",
    name: "Star and Crescent",
    keywords: [
      "islam"
    ],
    skins: [
      {
        unified: "262a-fe0f",
        native: "☪️"
      }
    ],
    version: 1
  },
  peace_symbol: {
    id: "peace_symbol",
    name: "Peace Symbol",
    keywords: [
      "hippie"
    ],
    skins: [
      {
        unified: "262e-fe0f",
        native: "☮️"
      }
    ],
    version: 1
  },
  menorah_with_nine_branches: {
    id: "menorah_with_nine_branches",
    name: "Menorah",
    keywords: [
      "with",
      "nine",
      "branches",
      "hanukkah",
      "candles",
      "jewish"
    ],
    skins: [
      {
        unified: "1f54e",
        native: "🕎"
      }
    ],
    version: 1
  },
  six_pointed_star: {
    id: "six_pointed_star",
    name: "Dotted Six-Pointed Star",
    keywords: [
      "six",
      "pointed",
      "purple",
      "square",
      "religion",
      "jewish",
      "hexagram"
    ],
    skins: [
      {
        unified: "1f52f",
        native: "🔯"
      }
    ],
    version: 1
  },
  khanda: {
    id: "khanda",
    name: "Khanda",
    keywords: [
      "Sikhism",
      "religion"
    ],
    skins: [
      {
        unified: "1faaf",
        native: "🪯"
      }
    ],
    version: 15
  },
  aries: {
    id: "aries",
    name: "Aries",
    keywords: [
      "sign",
      "purple",
      "square",
      "zodiac",
      "astrology"
    ],
    skins: [
      {
        unified: "2648",
        native: "♈"
      }
    ],
    version: 1
  },
  taurus: {
    id: "taurus",
    name: "Taurus",
    keywords: [
      "purple",
      "square",
      "sign",
      "zodiac",
      "astrology"
    ],
    skins: [
      {
        unified: "2649",
        native: "♉"
      }
    ],
    version: 1
  },
  gemini: {
    id: "gemini",
    name: "Gemini",
    keywords: [
      "sign",
      "zodiac",
      "purple",
      "square",
      "astrology"
    ],
    skins: [
      {
        unified: "264a",
        native: "♊"
      }
    ],
    version: 1
  },
  cancer: {
    id: "cancer",
    name: "Cancer",
    keywords: [
      "sign",
      "zodiac",
      "purple",
      "square",
      "astrology"
    ],
    skins: [
      {
        unified: "264b",
        native: "♋"
      }
    ],
    version: 1
  },
  leo: {
    id: "leo",
    name: "Leo",
    keywords: [
      "sign",
      "purple",
      "square",
      "zodiac",
      "astrology"
    ],
    skins: [
      {
        unified: "264c",
        native: "♌"
      }
    ],
    version: 1
  },
  virgo: {
    id: "virgo",
    name: "Virgo",
    keywords: [
      "sign",
      "zodiac",
      "purple",
      "square",
      "astrology"
    ],
    skins: [
      {
        unified: "264d",
        native: "♍"
      }
    ],
    version: 1
  },
  libra: {
    id: "libra",
    name: "Libra",
    keywords: [
      "sign",
      "purple",
      "square",
      "zodiac",
      "astrology"
    ],
    skins: [
      {
        unified: "264e",
        native: "♎"
      }
    ],
    version: 1
  },
  scorpius: {
    id: "scorpius",
    name: "Scorpio",
    keywords: [
      "scorpius",
      "sign",
      "zodiac",
      "purple",
      "square",
      "astrology"
    ],
    skins: [
      {
        unified: "264f",
        native: "♏"
      }
    ],
    version: 1
  },
  sagittarius: {
    id: "sagittarius",
    name: "Sagittarius",
    keywords: [
      "sign",
      "zodiac",
      "purple",
      "square",
      "astrology"
    ],
    skins: [
      {
        unified: "2650",
        native: "♐"
      }
    ],
    version: 1
  },
  capricorn: {
    id: "capricorn",
    name: "Capricorn",
    keywords: [
      "sign",
      "zodiac",
      "purple",
      "square",
      "astrology"
    ],
    skins: [
      {
        unified: "2651",
        native: "♑"
      }
    ],
    version: 1
  },
  aquarius: {
    id: "aquarius",
    name: "Aquarius",
    keywords: [
      "sign",
      "purple",
      "square",
      "zodiac",
      "astrology"
    ],
    skins: [
      {
        unified: "2652",
        native: "♒"
      }
    ],
    version: 1
  },
  pisces: {
    id: "pisces",
    name: "Pisces",
    keywords: [
      "purple",
      "square",
      "sign",
      "zodiac",
      "astrology"
    ],
    skins: [
      {
        unified: "2653",
        native: "♓"
      }
    ],
    version: 1
  },
  ophiuchus: {
    id: "ophiuchus",
    name: "Ophiuchus",
    keywords: [
      "sign",
      "purple",
      "square",
      "constellation",
      "astrology"
    ],
    skins: [
      {
        unified: "26ce",
        native: "⛎"
      }
    ],
    version: 1
  },
  twisted_rightwards_arrows: {
    id: "twisted_rightwards_arrows",
    name: "Shuffle Tracks Button",
    keywords: [
      "twisted",
      "rightwards",
      "arrows",
      "blue",
      "square",
      "music",
      "random"
    ],
    skins: [
      {
        unified: "1f500",
        native: "🔀"
      }
    ],
    version: 1
  },
  repeat: {
    id: "repeat",
    name: "Repeat Button",
    keywords: [
      "loop",
      "record"
    ],
    skins: [
      {
        unified: "1f501",
        native: "🔁"
      }
    ],
    version: 1
  },
  repeat_one: {
    id: "repeat_one",
    name: "Repeat Single Button",
    keywords: [
      "one",
      "blue",
      "square",
      "loop"
    ],
    skins: [
      {
        unified: "1f502",
        native: "🔂"
      }
    ],
    version: 1
  },
  arrow_forward: {
    id: "arrow_forward",
    name: "Play Button",
    keywords: [
      "arrow",
      "forward",
      "blue",
      "square",
      "right",
      "direction"
    ],
    skins: [
      {
        unified: "25b6-fe0f",
        native: "▶️"
      }
    ],
    version: 1
  },
  fast_forward: {
    id: "fast_forward",
    name: "Fast-Forward Button",
    keywords: [
      "fast",
      "forward",
      "blue",
      "square",
      "play",
      "speed",
      "continue"
    ],
    skins: [
      {
        unified: "23e9",
        native: "⏩"
      }
    ],
    version: 1
  },
  black_right_pointing_double_triangle_with_vertical_bar: {
    id: "black_right_pointing_double_triangle_with_vertical_bar",
    name: "Next Track Button",
    keywords: [
      "black",
      "right",
      "pointing",
      "double",
      "triangle",
      "with",
      "vertical",
      "bar",
      "forward",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "23ed-fe0f",
        native: "⏭️"
      }
    ],
    version: 1
  },
  black_right_pointing_triangle_with_double_vertical_bar: {
    id: "black_right_pointing_triangle_with_double_vertical_bar",
    name: "Play or Pause Button",
    keywords: [
      "black",
      "right",
      "pointing",
      "triangle",
      "with",
      "double",
      "vertical",
      "bar",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "23ef-fe0f",
        native: "⏯️"
      }
    ],
    version: 1
  },
  arrow_backward: {
    id: "arrow_backward",
    name: "Reverse Button",
    keywords: [
      "arrow",
      "backward",
      "blue",
      "square",
      "left",
      "direction"
    ],
    skins: [
      {
        unified: "25c0-fe0f",
        native: "◀️"
      }
    ],
    version: 1
  },
  rewind: {
    id: "rewind",
    name: "Fast Reverse Button",
    keywords: [
      "rewind",
      "play",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "23ea",
        native: "⏪"
      }
    ],
    version: 1
  },
  black_left_pointing_double_triangle_with_vertical_bar: {
    id: "black_left_pointing_double_triangle_with_vertical_bar",
    name: "Last Track Button",
    keywords: [
      "black",
      "left",
      "pointing",
      "double",
      "triangle",
      "with",
      "vertical",
      "bar",
      "backward"
    ],
    skins: [
      {
        unified: "23ee-fe0f",
        native: "⏮️"
      }
    ],
    version: 1
  },
  arrow_up_small: {
    id: "arrow_up_small",
    name: "Upwards Button",
    keywords: [
      "arrow",
      "up",
      "small",
      "blue",
      "square",
      "triangle",
      "direction",
      "point",
      "forward",
      "top"
    ],
    skins: [
      {
        unified: "1f53c",
        native: "🔼"
      }
    ],
    version: 1
  },
  arrow_double_up: {
    id: "arrow_double_up",
    name: "Fast Up Button",
    keywords: [
      "arrow",
      "double",
      "blue",
      "square",
      "direction",
      "top"
    ],
    skins: [
      {
        unified: "23eb",
        native: "⏫"
      }
    ],
    version: 1
  },
  arrow_down_small: {
    id: "arrow_down_small",
    name: "Downwards Button",
    keywords: [
      "arrow",
      "down",
      "small",
      "blue",
      "square",
      "direction",
      "bottom"
    ],
    skins: [
      {
        unified: "1f53d",
        native: "🔽"
      }
    ],
    version: 1
  },
  arrow_double_down: {
    id: "arrow_double_down",
    name: "Fast Down Button",
    keywords: [
      "arrow",
      "double",
      "blue",
      "square",
      "direction",
      "bottom"
    ],
    skins: [
      {
        unified: "23ec",
        native: "⏬"
      }
    ],
    version: 1
  },
  double_vertical_bar: {
    id: "double_vertical_bar",
    name: "Pause Button",
    keywords: [
      "double",
      "vertical",
      "bar",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "23f8-fe0f",
        native: "⏸️"
      }
    ],
    version: 1
  },
  black_square_for_stop: {
    id: "black_square_for_stop",
    name: "Stop Button",
    keywords: [
      "black",
      "square",
      "for",
      "blue"
    ],
    skins: [
      {
        unified: "23f9-fe0f",
        native: "⏹️"
      }
    ],
    version: 1
  },
  black_circle_for_record: {
    id: "black_circle_for_record",
    name: "Record Button",
    keywords: [
      "black",
      "circle",
      "for",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "23fa-fe0f",
        native: "⏺️"
      }
    ],
    version: 1
  },
  eject: {
    id: "eject",
    name: "Eject Button",
    keywords: [
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "23cf-fe0f",
        native: "⏏️"
      }
    ],
    version: 1
  },
  cinema: {
    id: "cinema",
    name: "Cinema",
    keywords: [
      "blue",
      "square",
      "record",
      "film",
      "movie",
      "curtain",
      "stage",
      "theater"
    ],
    skins: [
      {
        unified: "1f3a6",
        native: "🎦"
      }
    ],
    version: 1
  },
  low_brightness: {
    id: "low_brightness",
    name: "Dim Button",
    keywords: [
      "low",
      "brightness",
      "sun",
      "afternoon",
      "warm",
      "summer"
    ],
    skins: [
      {
        unified: "1f505",
        native: "🔅"
      }
    ],
    version: 1
  },
  high_brightness: {
    id: "high_brightness",
    name: "Bright Button",
    keywords: [
      "high",
      "brightness",
      "sun",
      "light"
    ],
    skins: [
      {
        unified: "1f506",
        native: "🔆"
      }
    ],
    version: 1
  },
  signal_strength: {
    id: "signal_strength",
    name: "Antenna Bars",
    keywords: [
      "signal",
      "strength",
      "blue",
      "square",
      "reception",
      "phone",
      "internet",
      "connection",
      "wifi",
      "bluetooth"
    ],
    skins: [
      {
        unified: "1f4f6",
        native: "📶"
      }
    ],
    version: 1
  },
  wireless: {
    id: "wireless",
    name: "Wireless",
    keywords: [
      "wifi",
      "internet",
      "contactless",
      "signal"
    ],
    skins: [
      {
        unified: "1f6dc",
        native: "🛜"
      }
    ],
    version: 15
  },
  vibration_mode: {
    id: "vibration_mode",
    name: "Vibration Mode",
    keywords: [
      "orange",
      "square",
      "phone"
    ],
    skins: [
      {
        unified: "1f4f3",
        native: "📳"
      }
    ],
    version: 1
  },
  mobile_phone_off: {
    id: "mobile_phone_off",
    name: "Mobile Phone off",
    keywords: [
      "mute",
      "orange",
      "square",
      "silence",
      "quiet"
    ],
    skins: [
      {
        unified: "1f4f4",
        native: "📴"
      }
    ],
    version: 1
  },
  female_sign: {
    id: "female_sign",
    name: "Female Sign",
    keywords: [
      "woman",
      "women",
      "lady",
      "girl"
    ],
    skins: [
      {
        unified: "2640-fe0f",
        native: "♀️"
      }
    ],
    version: 4
  },
  male_sign: {
    id: "male_sign",
    name: "Male Sign",
    keywords: [
      "man",
      "boy",
      "men"
    ],
    skins: [
      {
        unified: "2642-fe0f",
        native: "♂️"
      }
    ],
    version: 4
  },
  transgender_symbol: {
    id: "transgender_symbol",
    name: "Transgender Symbol",
    keywords: [
      "lgbtq"
    ],
    skins: [
      {
        unified: "26a7-fe0f",
        native: "⚧️"
      }
    ],
    version: 13
  },
  heavy_multiplication_x: {
    id: "heavy_multiplication_x",
    name: "Multiply",
    keywords: [
      "heavy",
      "multiplication",
      "x",
      "sign",
      "math",
      "calculation"
    ],
    skins: [
      {
        unified: "2716-fe0f",
        native: "✖️"
      }
    ],
    version: 1
  },
  heavy_plus_sign: {
    id: "heavy_plus_sign",
    name: "Plus",
    keywords: [
      "heavy",
      "sign",
      "math",
      "calculation",
      "addition",
      "more",
      "increase"
    ],
    skins: [
      {
        unified: "2795",
        native: "➕"
      }
    ],
    version: 1
  },
  heavy_minus_sign: {
    id: "heavy_minus_sign",
    name: "Minus",
    keywords: [
      "heavy",
      "sign",
      "math",
      "calculation",
      "subtract",
      "less"
    ],
    skins: [
      {
        unified: "2796",
        native: "➖"
      }
    ],
    version: 1
  },
  heavy_division_sign: {
    id: "heavy_division_sign",
    name: "Divide",
    keywords: [
      "heavy",
      "division",
      "sign",
      "math",
      "calculation"
    ],
    skins: [
      {
        unified: "2797",
        native: "➗"
      }
    ],
    version: 1
  },
  heavy_equals_sign: {
    id: "heavy_equals_sign",
    name: "Heavy Equals Sign",
    keywords: [
      "math"
    ],
    skins: [
      {
        unified: "1f7f0",
        native: "🟰"
      }
    ],
    version: 14
  },
  infinity: {
    id: "infinity",
    name: "Infinity",
    keywords: [
      "forever"
    ],
    skins: [
      {
        unified: "267e-fe0f",
        native: "♾️"
      }
    ],
    version: 11
  },
  bangbang: {
    id: "bangbang",
    name: "Double Exclamation Mark",
    keywords: [
      "bangbang",
      "surprise"
    ],
    skins: [
      {
        unified: "203c-fe0f",
        native: "‼️"
      }
    ],
    version: 1
  },
  interrobang: {
    id: "interrobang",
    name: "Exclamation Question Mark",
    keywords: [
      "interrobang",
      "wat",
      "punctuation",
      "surprise"
    ],
    skins: [
      {
        unified: "2049-fe0f",
        native: "⁉️"
      }
    ],
    version: 1
  },
  question: {
    id: "question",
    name: "Red Question Mark",
    keywords: [
      "doubt",
      "confused"
    ],
    skins: [
      {
        unified: "2753",
        native: "❓"
      }
    ],
    version: 1
  },
  grey_question: {
    id: "grey_question",
    name: "White Question Mark",
    keywords: [
      "grey",
      "doubts",
      "gray",
      "huh",
      "confused"
    ],
    skins: [
      {
        unified: "2754",
        native: "❔"
      }
    ],
    version: 1
  },
  grey_exclamation: {
    id: "grey_exclamation",
    name: "White Exclamation Mark",
    keywords: [
      "grey",
      "surprise",
      "punctuation",
      "gray",
      "wow",
      "warning"
    ],
    skins: [
      {
        unified: "2755",
        native: "❕"
      }
    ],
    version: 1
  },
  exclamation: {
    id: "exclamation",
    name: "Red Exclamation Mark",
    keywords: [
      "heavy",
      "danger",
      "surprise",
      "punctuation",
      "wow",
      "warning"
    ],
    skins: [
      {
        unified: "2757",
        native: "❗"
      }
    ],
    version: 1
  },
  wavy_dash: {
    id: "wavy_dash",
    name: "Wavy Dash",
    keywords: [
      "draw",
      "line",
      "moustache",
      "mustache",
      "squiggle",
      "scribble"
    ],
    skins: [
      {
        unified: "3030-fe0f",
        native: "〰️"
      }
    ],
    version: 1
  },
  currency_exchange: {
    id: "currency_exchange",
    name: "Currency Exchange",
    keywords: [
      "money",
      "sales",
      "dollar",
      "travel"
    ],
    skins: [
      {
        unified: "1f4b1",
        native: "💱"
      }
    ],
    version: 1
  },
  heavy_dollar_sign: {
    id: "heavy_dollar_sign",
    name: "Heavy Dollar Sign",
    keywords: [
      "money",
      "sales",
      "payment",
      "currency",
      "buck"
    ],
    skins: [
      {
        unified: "1f4b2",
        native: "💲"
      }
    ],
    version: 1
  },
  medical_symbol: {
    id: "medical_symbol",
    name: "Medical Symbol",
    keywords: [
      "staff",
      "of",
      "aesculapius",
      "health",
      "hospital"
    ],
    skins: [
      {
        unified: "2695-fe0f",
        native: "⚕️"
      }
    ],
    version: 4
  },
  recycle: {
    id: "recycle",
    name: "Recycling Symbol",
    keywords: [
      "recycle",
      "arrow",
      "environment",
      "garbage",
      "trash"
    ],
    skins: [
      {
        unified: "267b-fe0f",
        native: "♻️"
      }
    ],
    version: 1
  },
  fleur_de_lis: {
    id: "fleur_de_lis",
    name: "Fleur-De-Lis",
    keywords: [
      "fleur",
      "de",
      "lis",
      "decorative",
      "scout"
    ],
    skins: [
      {
        unified: "269c-fe0f",
        native: "⚜️"
      }
    ],
    version: 1
  },
  trident: {
    id: "trident",
    name: "Trident Emblem",
    keywords: [
      "weapon",
      "spear"
    ],
    skins: [
      {
        unified: "1f531",
        native: "🔱"
      }
    ],
    version: 1
  },
  name_badge: {
    id: "name_badge",
    name: "Name Badge",
    keywords: [
      "fire",
      "forbid"
    ],
    skins: [
      {
        unified: "1f4db",
        native: "📛"
      }
    ],
    version: 1
  },
  beginner: {
    id: "beginner",
    name: "Japanese Symbol for Beginner",
    keywords: [
      "badge",
      "shield"
    ],
    skins: [
      {
        unified: "1f530",
        native: "🔰"
      }
    ],
    version: 1
  },
  o: {
    id: "o",
    name: "Hollow Red Circle",
    keywords: [
      "o",
      "round"
    ],
    skins: [
      {
        unified: "2b55",
        native: "⭕"
      }
    ],
    version: 1
  },
  white_check_mark: {
    id: "white_check_mark",
    name: "Check Mark Button",
    keywords: [
      "white",
      "green",
      "square",
      "ok",
      "agree",
      "vote",
      "election",
      "answer",
      "tick"
    ],
    skins: [
      {
        unified: "2705",
        native: "✅"
      }
    ],
    version: 1
  },
  ballot_box_with_check: {
    id: "ballot_box_with_check",
    name: "Check Box with Check",
    keywords: [
      "ballot",
      "ok",
      "agree",
      "confirm",
      "black",
      "square",
      "vote",
      "election",
      "yes",
      "tick"
    ],
    skins: [
      {
        unified: "2611-fe0f",
        native: "☑️"
      }
    ],
    version: 1
  },
  heavy_check_mark: {
    id: "heavy_check_mark",
    name: "Check Mark",
    keywords: [
      "heavy",
      "ok",
      "nike",
      "answer",
      "yes",
      "tick"
    ],
    skins: [
      {
        unified: "2714-fe0f",
        native: "✔️"
      }
    ],
    version: 1
  },
  x: {
    id: "x",
    name: "Cross Mark",
    keywords: [
      "x",
      "no",
      "delete",
      "remove",
      "cancel",
      "red"
    ],
    skins: [
      {
        unified: "274c",
        native: "❌"
      }
    ],
    version: 1
  },
  negative_squared_cross_mark: {
    id: "negative_squared_cross_mark",
    name: "Cross Mark Button",
    keywords: [
      "negative",
      "squared",
      "x",
      "green",
      "square",
      "no",
      "deny"
    ],
    skins: [
      {
        unified: "274e",
        native: "❎"
      }
    ],
    version: 1
  },
  curly_loop: {
    id: "curly_loop",
    name: "Curly Loop",
    keywords: [
      "scribble",
      "draw",
      "shape",
      "squiggle"
    ],
    skins: [
      {
        unified: "27b0",
        native: "➰"
      }
    ],
    version: 1
  },
  loop: {
    id: "loop",
    name: "Double Curly Loop",
    keywords: [
      "tape",
      "cassette"
    ],
    skins: [
      {
        unified: "27bf",
        native: "➿"
      }
    ],
    version: 1
  },
  part_alternation_mark: {
    id: "part_alternation_mark",
    name: "Part Alternation Mark",
    keywords: [
      "graph",
      "presentation",
      "stats",
      "business",
      "economics",
      "bad"
    ],
    skins: [
      {
        unified: "303d-fe0f",
        native: "〽️"
      }
    ],
    version: 1
  },
  eight_spoked_asterisk: {
    id: "eight_spoked_asterisk",
    name: "Eight Spoked Asterisk",
    keywords: [
      "star",
      "sparkle",
      "green",
      "square"
    ],
    skins: [
      {
        unified: "2733-fe0f",
        native: "✳️"
      }
    ],
    version: 1
  },
  eight_pointed_black_star: {
    id: "eight_pointed_black_star",
    name: "Eight-Pointed Star",
    keywords: [
      "eight",
      "pointed",
      "black",
      "orange",
      "square",
      "shape",
      "polygon"
    ],
    skins: [
      {
        unified: "2734-fe0f",
        native: "✴️"
      }
    ],
    version: 1
  },
  sparkle: {
    id: "sparkle",
    name: "Sparkle",
    keywords: [
      "stars",
      "green",
      "square",
      "awesome",
      "good",
      "fireworks"
    ],
    skins: [
      {
        unified: "2747-fe0f",
        native: "❇️"
      }
    ],
    version: 1
  },
  copyright: {
    id: "copyright",
    name: "Copyright",
    keywords: [
      "ip",
      "license",
      "circle",
      "law",
      "legal"
    ],
    skins: [
      {
        unified: "00a9-fe0f",
        native: "©️"
      }
    ],
    version: 1
  },
  registered: {
    id: "registered",
    name: "Registered",
    keywords: [
      "alphabet",
      "circle"
    ],
    skins: [
      {
        unified: "00ae-fe0f",
        native: "®️"
      }
    ],
    version: 1
  },
  tm: {
    id: "tm",
    name: "Trade Mark",
    keywords: [
      "tm",
      "trademark",
      "brand",
      "law",
      "legal"
    ],
    skins: [
      {
        unified: "2122-fe0f",
        native: "™️"
      }
    ],
    version: 1
  },
  hash: {
    id: "hash",
    name: "Hash Key",
    keywords: [
      "keycap",
      "",
      "symbol",
      "blue",
      "square",
      "twitter"
    ],
    skins: [
      {
        unified: "0023-fe0f-20e3",
        native: "#️⃣"
      }
    ],
    version: 1
  },
  keycap_star: {
    id: "keycap_star",
    name: "Keycap: *",
    keywords: [
      "keycap",
      "star",
      ""
    ],
    skins: [
      {
        unified: "002a-fe0f-20e3",
        native: "*️⃣"
      }
    ],
    version: 2
  },
  zero: {
    id: "zero",
    name: "Keycap 0",
    keywords: [
      "zero",
      "numbers",
      "blue",
      "square",
      "null"
    ],
    skins: [
      {
        unified: "0030-fe0f-20e3",
        native: "0️⃣"
      }
    ],
    version: 1
  },
  one: {
    id: "one",
    name: "Keycap 1",
    keywords: [
      "one",
      "blue",
      "square",
      "numbers"
    ],
    skins: [
      {
        unified: "0031-fe0f-20e3",
        native: "1️⃣"
      }
    ],
    version: 1
  },
  two: {
    id: "two",
    name: "Keycap 2",
    keywords: [
      "two",
      "numbers",
      "prime",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "0032-fe0f-20e3",
        native: "2️⃣"
      }
    ],
    version: 1
  },
  three: {
    id: "three",
    name: "Keycap 3",
    keywords: [
      "three",
      "numbers",
      "prime",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "0033-fe0f-20e3",
        native: "3️⃣"
      }
    ],
    version: 1
  },
  four: {
    id: "four",
    name: "Keycap 4",
    keywords: [
      "four",
      "numbers",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "0034-fe0f-20e3",
        native: "4️⃣"
      }
    ],
    version: 1
  },
  five: {
    id: "five",
    name: "Keycap 5",
    keywords: [
      "five",
      "numbers",
      "blue",
      "square",
      "prime"
    ],
    skins: [
      {
        unified: "0035-fe0f-20e3",
        native: "5️⃣"
      }
    ],
    version: 1
  },
  six: {
    id: "six",
    name: "Keycap 6",
    keywords: [
      "six",
      "numbers",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "0036-fe0f-20e3",
        native: "6️⃣"
      }
    ],
    version: 1
  },
  seven: {
    id: "seven",
    name: "Keycap 7",
    keywords: [
      "seven",
      "numbers",
      "blue",
      "square",
      "prime"
    ],
    skins: [
      {
        unified: "0037-fe0f-20e3",
        native: "7️⃣"
      }
    ],
    version: 1
  },
  eight: {
    id: "eight",
    name: "Keycap 8",
    keywords: [
      "eight",
      "blue",
      "square",
      "numbers"
    ],
    skins: [
      {
        unified: "0038-fe0f-20e3",
        native: "8️⃣"
      }
    ],
    version: 1
  },
  nine: {
    id: "nine",
    name: "Keycap 9",
    keywords: [
      "nine",
      "blue",
      "square",
      "numbers"
    ],
    skins: [
      {
        unified: "0039-fe0f-20e3",
        native: "9️⃣"
      }
    ],
    version: 1
  },
  keycap_ten: {
    id: "keycap_ten",
    name: "Keycap 10",
    keywords: [
      "ten",
      "numbers",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f51f",
        native: "🔟"
      }
    ],
    version: 1
  },
  capital_abcd: {
    id: "capital_abcd",
    name: "Input Latin Uppercase",
    keywords: [
      "capital",
      "abcd",
      "alphabet",
      "words",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f520",
        native: "🔠"
      }
    ],
    version: 1
  },
  abcd: {
    id: "abcd",
    name: "Input Latin Lowercase",
    keywords: [
      "abcd",
      "blue",
      "square",
      "alphabet"
    ],
    skins: [
      {
        unified: "1f521",
        native: "🔡"
      }
    ],
    version: 1
  },
  symbols: {
    id: "symbols",
    name: "Input Symbols",
    keywords: [
      "blue",
      "square",
      "music",
      "note",
      "ampersand",
      "percent",
      "glyphs",
      "characters"
    ],
    skins: [
      {
        unified: "1f523",
        native: "🔣"
      }
    ],
    version: 1
  },
  abc: {
    id: "abc",
    name: "Input Latin Letters",
    keywords: [
      "abc",
      "blue",
      "square",
      "alphabet"
    ],
    skins: [
      {
        unified: "1f524",
        native: "🔤"
      }
    ],
    version: 1
  },
  a: {
    id: "a",
    name: "A Button (blood Type)",
    keywords: [
      "red",
      "square",
      "alphabet",
      "letter"
    ],
    skins: [
      {
        unified: "1f170-fe0f",
        native: "🅰️"
      }
    ],
    version: 1
  },
  ab: {
    id: "ab",
    name: "Negative Squared Ab",
    keywords: [
      "button",
      "red",
      "square",
      "alphabet"
    ],
    skins: [
      {
        unified: "1f18e",
        native: "🆎"
      }
    ],
    version: 1
  },
  b: {
    id: "b",
    name: "B Button (blood Type)",
    keywords: [
      "red",
      "square",
      "alphabet",
      "letter"
    ],
    skins: [
      {
        unified: "1f171-fe0f",
        native: "🅱️"
      }
    ],
    version: 1
  },
  cl: {
    id: "cl",
    name: "Cl Button",
    keywords: [
      "alphabet",
      "words",
      "red",
      "square"
    ],
    skins: [
      {
        unified: "1f191",
        native: "🆑"
      }
    ],
    version: 1
  },
  cool: {
    id: "cool",
    name: "Cool Button",
    keywords: [
      "words",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f192",
        native: "🆒"
      }
    ],
    version: 1
  },
  free: {
    id: "free",
    name: "Free Button",
    keywords: [
      "blue",
      "square",
      "words"
    ],
    skins: [
      {
        unified: "1f193",
        native: "🆓"
      }
    ],
    version: 1
  },
  information_source: {
    id: "information_source",
    name: "Information",
    keywords: [
      "source",
      "blue",
      "square",
      "alphabet",
      "letter"
    ],
    skins: [
      {
        unified: "2139-fe0f",
        native: "ℹ️"
      }
    ],
    version: 1
  },
  id: {
    id: "id",
    name: "Id Button",
    keywords: [
      "purple",
      "square",
      "words"
    ],
    skins: [
      {
        unified: "1f194",
        native: "🆔"
      }
    ],
    version: 1
  },
  m: {
    id: "m",
    name: "Circled M",
    keywords: [
      "alphabet",
      "blue",
      "circle",
      "letter"
    ],
    skins: [
      {
        unified: "24c2-fe0f",
        native: "Ⓜ️"
      }
    ],
    version: 1
  },
  new: {
    id: "new",
    name: "New Button",
    keywords: [
      "blue",
      "square",
      "words",
      "start"
    ],
    skins: [
      {
        unified: "1f195",
        native: "🆕"
      }
    ],
    version: 1
  },
  ng: {
    id: "ng",
    name: "Ng Button",
    keywords: [
      "blue",
      "square",
      "words",
      "shape",
      "icon"
    ],
    skins: [
      {
        unified: "1f196",
        native: "🆖"
      }
    ],
    version: 1
  },
  o2: {
    id: "o2",
    name: "O Button (blood Type)",
    keywords: [
      "o2",
      "alphabet",
      "red",
      "square",
      "letter"
    ],
    skins: [
      {
        unified: "1f17e-fe0f",
        native: "🅾️"
      }
    ],
    version: 1
  },
  ok: {
    id: "ok",
    name: "Ok Button",
    keywords: [
      "good",
      "agree",
      "yes",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f197",
        native: "🆗"
      }
    ],
    version: 1
  },
  parking: {
    id: "parking",
    name: "P Button",
    keywords: [
      "parking",
      "cars",
      "blue",
      "square",
      "alphabet",
      "letter"
    ],
    skins: [
      {
        unified: "1f17f-fe0f",
        native: "🅿️"
      }
    ],
    version: 1
  },
  sos: {
    id: "sos",
    name: "Sos Button",
    keywords: [
      "help",
      "red",
      "square",
      "words",
      "emergency",
      "911"
    ],
    skins: [
      {
        unified: "1f198",
        native: "🆘"
      }
    ],
    version: 1
  },
  up: {
    id: "up",
    name: "Up! Button",
    keywords: [
      "up",
      "blue",
      "square",
      "above",
      "high"
    ],
    skins: [
      {
        unified: "1f199",
        native: "🆙"
      }
    ],
    version: 1
  },
  vs: {
    id: "vs",
    name: "Vs Button",
    keywords: [
      "words",
      "orange",
      "square"
    ],
    skins: [
      {
        unified: "1f19a",
        native: "🆚"
      }
    ],
    version: 1
  },
  koko: {
    id: "koko",
    name: "Squared Katakana Koko",
    keywords: [
      "japanese",
      "here",
      "button",
      "blue",
      "square",
      "destination"
    ],
    skins: [
      {
        unified: "1f201",
        native: "🈁"
      }
    ],
    version: 1
  },
  sa: {
    id: "sa",
    name: "Squared Katakana Sa",
    keywords: [
      "japanese",
      "service",
      "charge",
      "button",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f202-fe0f",
        native: "🈂️"
      }
    ],
    version: 1
  },
  u6708: {
    id: "u6708",
    name: "Japanese “monthly Amount” Button",
    keywords: [
      "u6708",
      "monthly",
      "amount",
      "chinese",
      "month",
      "moon",
      "orange",
      "square",
      "kanji"
    ],
    skins: [
      {
        unified: "1f237-fe0f",
        native: "🈷️"
      }
    ],
    version: 1
  },
  u6709: {
    id: "u6709",
    name: "Squared Cjk Unified Ideograph-6709",
    keywords: [
      "u6709",
      "japanese",
      "not",
      "free",
      "of",
      "charge",
      "button",
      "orange",
      "square",
      "chinese",
      "have",
      "kanji"
    ],
    skins: [
      {
        unified: "1f236",
        native: "🈶"
      }
    ],
    version: 1
  },
  u6307: {
    id: "u6307",
    name: "Japanese “reserved” Button",
    keywords: [
      "u6307",
      "reserved",
      "chinese",
      "point",
      "green",
      "square",
      "kanji"
    ],
    skins: [
      {
        unified: "1f22f",
        native: "🈯"
      }
    ],
    version: 1
  },
  ideograph_advantage: {
    id: "ideograph_advantage",
    name: "Japanese “bargain” Button",
    keywords: [
      "ideograph",
      "advantage",
      "bargain",
      "chinese",
      "kanji",
      "obtain",
      "get",
      "circle"
    ],
    skins: [
      {
        unified: "1f250",
        native: "🉐"
      }
    ],
    version: 1
  },
  u5272: {
    id: "u5272",
    name: "Japanese “discount” Button",
    keywords: [
      "u5272",
      "discount",
      "cut",
      "divide",
      "chinese",
      "kanji",
      "pink",
      "square"
    ],
    skins: [
      {
        unified: "1f239",
        native: "🈹"
      }
    ],
    version: 1
  },
  u7121: {
    id: "u7121",
    name: "Japanese “free of Charge” Button",
    keywords: [
      "u7121",
      "free",
      "charge",
      "nothing",
      "chinese",
      "kanji",
      "orange",
      "square"
    ],
    skins: [
      {
        unified: "1f21a",
        native: "🈚"
      }
    ],
    version: 1
  },
  u7981: {
    id: "u7981",
    name: "Japanese “prohibited” Button",
    keywords: [
      "u7981",
      "prohibited",
      "kanji",
      "chinese",
      "forbidden",
      "limit",
      "restricted",
      "red",
      "square"
    ],
    skins: [
      {
        unified: "1f232",
        native: "🈲"
      }
    ],
    version: 1
  },
  accept: {
    id: "accept",
    name: "Circled Ideograph Accept",
    keywords: [
      "japanese",
      "acceptable",
      "button",
      "ok",
      "good",
      "chinese",
      "kanji",
      "agree",
      "yes",
      "orange",
      "circle"
    ],
    skins: [
      {
        unified: "1f251",
        native: "🉑"
      }
    ],
    version: 1
  },
  u7533: {
    id: "u7533",
    name: "Japanese “application” Button",
    keywords: [
      "u7533",
      "application",
      "chinese",
      "kanji",
      "orange",
      "square"
    ],
    skins: [
      {
        unified: "1f238",
        native: "🈸"
      }
    ],
    version: 1
  },
  u5408: {
    id: "u5408",
    name: "Japanese “passing Grade” Button",
    keywords: [
      "u5408",
      "passing",
      "grade",
      "chinese",
      "join",
      "kanji",
      "red",
      "square"
    ],
    skins: [
      {
        unified: "1f234",
        native: "🈴"
      }
    ],
    version: 1
  },
  u7a7a: {
    id: "u7a7a",
    name: "Japanese “vacancy” Button",
    keywords: [
      "u7a7a",
      "vacancy",
      "kanji",
      "chinese",
      "empty",
      "sky",
      "blue",
      "square"
    ],
    skins: [
      {
        unified: "1f233",
        native: "🈳"
      }
    ],
    version: 1
  },
  congratulations: {
    id: "congratulations",
    name: "Circled Ideograph Congratulation",
    keywords: [
      "congratulations",
      "japanese",
      "button",
      "chinese",
      "kanji",
      "red",
      "circle"
    ],
    skins: [
      {
        unified: "3297-fe0f",
        native: "㊗️"
      }
    ],
    version: 1
  },
  secret: {
    id: "secret",
    name: "Circled Ideograph Secret",
    keywords: [
      "japanese",
      "button",
      "privacy",
      "chinese",
      "sshh",
      "kanji",
      "red",
      "circle"
    ],
    skins: [
      {
        unified: "3299-fe0f",
        native: "㊙️"
      }
    ],
    version: 1
  },
  u55b6: {
    id: "u55b6",
    name: "Squared Cjk Unified Ideograph-55b6",
    keywords: [
      "u55b6",
      "japanese",
      "open",
      "for",
      "business",
      "button",
      "opening",
      "hours",
      "orange",
      "square"
    ],
    skins: [
      {
        unified: "1f23a",
        native: "🈺"
      }
    ],
    version: 1
  },
  u6e80: {
    id: "u6e80",
    name: "Japanese “no Vacancy” Button",
    keywords: [
      "u6e80",
      "no",
      "vacancy",
      "full",
      "chinese",
      "red",
      "square",
      "kanji"
    ],
    skins: [
      {
        unified: "1f235",
        native: "🈵"
      }
    ],
    version: 1
  },
  red_circle: {
    id: "red_circle",
    name: "Red Circle",
    keywords: [
      "shape",
      "error",
      "danger"
    ],
    skins: [
      {
        unified: "1f534",
        native: "🔴"
      }
    ],
    version: 1
  },
  large_orange_circle: {
    id: "large_orange_circle",
    name: "Orange Circle",
    keywords: [
      "large",
      "round"
    ],
    skins: [
      {
        unified: "1f7e0",
        native: "🟠"
      }
    ],
    version: 12
  },
  large_yellow_circle: {
    id: "large_yellow_circle",
    name: "Yellow Circle",
    keywords: [
      "large",
      "round"
    ],
    skins: [
      {
        unified: "1f7e1",
        native: "🟡"
      }
    ],
    version: 12
  },
  large_green_circle: {
    id: "large_green_circle",
    name: "Green Circle",
    keywords: [
      "large",
      "round"
    ],
    skins: [
      {
        unified: "1f7e2",
        native: "🟢"
      }
    ],
    version: 12
  },
  large_blue_circle: {
    id: "large_blue_circle",
    name: "Blue Circle",
    keywords: [
      "large",
      "shape",
      "icon",
      "button"
    ],
    skins: [
      {
        unified: "1f535",
        native: "🔵"
      }
    ],
    version: 1
  },
  large_purple_circle: {
    id: "large_purple_circle",
    name: "Purple Circle",
    keywords: [
      "large",
      "round"
    ],
    skins: [
      {
        unified: "1f7e3",
        native: "🟣"
      }
    ],
    version: 12
  },
  large_brown_circle: {
    id: "large_brown_circle",
    name: "Brown Circle",
    keywords: [
      "large",
      "round"
    ],
    skins: [
      {
        unified: "1f7e4",
        native: "🟤"
      }
    ],
    version: 12
  },
  black_circle: {
    id: "black_circle",
    name: "Black Circle",
    keywords: [
      "shape",
      "button",
      "round"
    ],
    skins: [
      {
        unified: "26ab",
        native: "⚫"
      }
    ],
    version: 1
  },
  white_circle: {
    id: "white_circle",
    name: "White Circle",
    keywords: [
      "shape",
      "round"
    ],
    skins: [
      {
        unified: "26aa",
        native: "⚪"
      }
    ],
    version: 1
  },
  large_red_square: {
    id: "large_red_square",
    name: "Red Square",
    keywords: [
      "large"
    ],
    skins: [
      {
        unified: "1f7e5",
        native: "🟥"
      }
    ],
    version: 12
  },
  large_orange_square: {
    id: "large_orange_square",
    name: "Orange Square",
    keywords: [
      "large"
    ],
    skins: [
      {
        unified: "1f7e7",
        native: "🟧"
      }
    ],
    version: 12
  },
  large_yellow_square: {
    id: "large_yellow_square",
    name: "Yellow Square",
    keywords: [
      "large"
    ],
    skins: [
      {
        unified: "1f7e8",
        native: "🟨"
      }
    ],
    version: 12
  },
  large_green_square: {
    id: "large_green_square",
    name: "Green Square",
    keywords: [
      "large"
    ],
    skins: [
      {
        unified: "1f7e9",
        native: "🟩"
      }
    ],
    version: 12
  },
  large_blue_square: {
    id: "large_blue_square",
    name: "Blue Square",
    keywords: [
      "large"
    ],
    skins: [
      {
        unified: "1f7e6",
        native: "🟦"
      }
    ],
    version: 12
  },
  large_purple_square: {
    id: "large_purple_square",
    name: "Purple Square",
    keywords: [
      "large"
    ],
    skins: [
      {
        unified: "1f7ea",
        native: "🟪"
      }
    ],
    version: 12
  },
  large_brown_square: {
    id: "large_brown_square",
    name: "Brown Square",
    keywords: [
      "large"
    ],
    skins: [
      {
        unified: "1f7eb",
        native: "🟫"
      }
    ],
    version: 12
  },
  black_large_square: {
    id: "black_large_square",
    name: "Black Large Square",
    keywords: [
      "shape",
      "icon",
      "button"
    ],
    skins: [
      {
        unified: "2b1b",
        native: "⬛"
      }
    ],
    version: 1
  },
  white_large_square: {
    id: "white_large_square",
    name: "White Large Square",
    keywords: [
      "shape",
      "icon",
      "stone",
      "button"
    ],
    skins: [
      {
        unified: "2b1c",
        native: "⬜"
      }
    ],
    version: 1
  },
  black_medium_square: {
    id: "black_medium_square",
    name: "Black Medium Square",
    keywords: [
      "shape",
      "button",
      "icon"
    ],
    skins: [
      {
        unified: "25fc-fe0f",
        native: "◼️"
      }
    ],
    version: 1
  },
  white_medium_square: {
    id: "white_medium_square",
    name: "White Medium Square",
    keywords: [
      "shape",
      "stone",
      "icon"
    ],
    skins: [
      {
        unified: "25fb-fe0f",
        native: "◻️"
      }
    ],
    version: 1
  },
  black_medium_small_square: {
    id: "black_medium_small_square",
    name: "Black Medium Small Square",
    keywords: [
      "icon",
      "shape",
      "button"
    ],
    skins: [
      {
        unified: "25fe",
        native: "◾"
      }
    ],
    version: 1
  },
  white_medium_small_square: {
    id: "white_medium_small_square",
    name: "White Medium Small Square",
    keywords: [
      "shape",
      "stone",
      "icon",
      "button"
    ],
    skins: [
      {
        unified: "25fd",
        native: "◽"
      }
    ],
    version: 1
  },
  black_small_square: {
    id: "black_small_square",
    name: "Black Small Square",
    keywords: [
      "shape",
      "icon"
    ],
    skins: [
      {
        unified: "25aa-fe0f",
        native: "▪️"
      }
    ],
    version: 1
  },
  white_small_square: {
    id: "white_small_square",
    name: "White Small Square",
    keywords: [
      "shape",
      "icon"
    ],
    skins: [
      {
        unified: "25ab-fe0f",
        native: "▫️"
      }
    ],
    version: 1
  },
  large_orange_diamond: {
    id: "large_orange_diamond",
    name: "Large Orange Diamond",
    keywords: [
      "shape",
      "jewel",
      "gem"
    ],
    skins: [
      {
        unified: "1f536",
        native: "🔶"
      }
    ],
    version: 1
  },
  large_blue_diamond: {
    id: "large_blue_diamond",
    name: "Large Blue Diamond",
    keywords: [
      "shape",
      "jewel",
      "gem"
    ],
    skins: [
      {
        unified: "1f537",
        native: "🔷"
      }
    ],
    version: 1
  },
  small_orange_diamond: {
    id: "small_orange_diamond",
    name: "Small Orange Diamond",
    keywords: [
      "shape",
      "jewel",
      "gem"
    ],
    skins: [
      {
        unified: "1f538",
        native: "🔸"
      }
    ],
    version: 1
  },
  small_blue_diamond: {
    id: "small_blue_diamond",
    name: "Small Blue Diamond",
    keywords: [
      "shape",
      "jewel",
      "gem"
    ],
    skins: [
      {
        unified: "1f539",
        native: "🔹"
      }
    ],
    version: 1
  },
  small_red_triangle: {
    id: "small_red_triangle",
    name: "Red Triangle Pointed Up",
    keywords: [
      "small",
      "shape",
      "direction",
      "top"
    ],
    skins: [
      {
        unified: "1f53a",
        native: "🔺"
      }
    ],
    version: 1
  },
  small_red_triangle_down: {
    id: "small_red_triangle_down",
    name: "Red Triangle Pointed Down",
    keywords: [
      "small",
      "shape",
      "direction",
      "bottom"
    ],
    skins: [
      {
        unified: "1f53b",
        native: "🔻"
      }
    ],
    version: 1
  },
  diamond_shape_with_a_dot_inside: {
    id: "diamond_shape_with_a_dot_inside",
    name: "Diamond with a Dot",
    keywords: [
      "shape",
      "inside",
      "jewel",
      "blue",
      "gem",
      "crystal",
      "fancy"
    ],
    skins: [
      {
        unified: "1f4a0",
        native: "💠"
      }
    ],
    version: 1
  },
  radio_button: {
    id: "radio_button",
    name: "Radio Button",
    keywords: [
      "input",
      "old",
      "music",
      "circle"
    ],
    skins: [
      {
        unified: "1f518",
        native: "🔘"
      }
    ],
    version: 1
  },
  white_square_button: {
    id: "white_square_button",
    name: "White Square Button",
    keywords: [
      "shape",
      "input"
    ],
    skins: [
      {
        unified: "1f533",
        native: "🔳"
      }
    ],
    version: 1
  },
  black_square_button: {
    id: "black_square_button",
    name: "Black Square Button",
    keywords: [
      "shape",
      "input",
      "frame"
    ],
    skins: [
      {
        unified: "1f532",
        native: "🔲"
      }
    ],
    version: 1
  },
  checkered_flag: {
    id: "checkered_flag",
    name: "Chequered Flag",
    keywords: [
      "checkered",
      "contest",
      "finishline",
      "race",
      "gokart"
    ],
    skins: [
      {
        unified: "1f3c1",
        native: "🏁"
      }
    ],
    version: 1
  },
  triangular_flag_on_post: {
    id: "triangular_flag_on_post",
    name: "Triangular Flag",
    keywords: [
      "on",
      "post",
      "mark",
      "milestone",
      "place"
    ],
    skins: [
      {
        unified: "1f6a9",
        native: "🚩"
      }
    ],
    version: 1
  },
  crossed_flags: {
    id: "crossed_flags",
    name: "Crossed Flags",
    keywords: [
      "japanese",
      "nation",
      "country",
      "border"
    ],
    skins: [
      {
        unified: "1f38c",
        native: "🎌"
      }
    ],
    version: 1
  },
  waving_black_flag: {
    id: "waving_black_flag",
    name: "Black Flag",
    keywords: [
      "waving",
      "pirate"
    ],
    skins: [
      {
        unified: "1f3f4",
        native: "🏴"
      }
    ],
    version: 1
  },
  waving_white_flag: {
    id: "waving_white_flag",
    name: "White Flag",
    keywords: [
      "waving",
      "losing",
      "loser",
      "lost",
      "surrender",
      "give",
      "up",
      "fail"
    ],
    skins: [
      {
        unified: "1f3f3-fe0f",
        native: "🏳️"
      }
    ],
    version: 1
  },
  "rainbow-flag": {
    id: "rainbow-flag",
    name: "Rainbow Flag",
    keywords: [
      "pride",
      "gay",
      "lgbt",
      "glbt",
      "queer",
      "homosexual",
      "lesbian",
      "bisexual",
      "transgender"
    ],
    skins: [
      {
        unified: "1f3f3-fe0f-200d-1f308",
        native: "🏳️‍🌈"
      }
    ],
    version: 4
  },
  transgender_flag: {
    id: "transgender_flag",
    name: "Transgender Flag",
    keywords: [
      "lgbtq"
    ],
    skins: [
      {
        unified: "1f3f3-fe0f-200d-26a7-fe0f",
        native: "🏳️‍⚧️"
      }
    ],
    version: 13
  },
  pirate_flag: {
    id: "pirate_flag",
    name: "Pirate Flag",
    keywords: [
      "skull",
      "crossbones",
      "banner"
    ],
    skins: [
      {
        unified: "1f3f4-200d-2620-fe0f",
        native: "🏴‍☠️"
      }
    ],
    version: 11
  },
  "flag-ac": {
    id: "flag-ac",
    name: "Ascension Island Flag",
    keywords: [
      "ac"
    ],
    skins: [
      {
        unified: "1f1e6-1f1e8",
        native: "🇦🇨"
      }
    ],
    version: 2
  },
  "flag-ad": {
    id: "flag-ad",
    name: "Andorra Flag",
    keywords: [
      "ad",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1e9",
        native: "🇦🇩"
      }
    ],
    version: 2
  },
  "flag-ae": {
    id: "flag-ae",
    name: "United Arab Emirates Flag",
    keywords: [
      "ae",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1ea",
        native: "🇦🇪"
      }
    ],
    version: 2
  },
  "flag-af": {
    id: "flag-af",
    name: "Afghanistan Flag",
    keywords: [
      "af",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1eb",
        native: "🇦🇫"
      }
    ],
    version: 2
  },
  "flag-ag": {
    id: "flag-ag",
    name: "Antigua & Barbuda Flag",
    keywords: [
      "ag",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1ec",
        native: "🇦🇬"
      }
    ],
    version: 2
  },
  "flag-ai": {
    id: "flag-ai",
    name: "Anguilla Flag",
    keywords: [
      "ai",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1ee",
        native: "🇦🇮"
      }
    ],
    version: 2
  },
  "flag-al": {
    id: "flag-al",
    name: "Albania Flag",
    keywords: [
      "al",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1f1",
        native: "🇦🇱"
      }
    ],
    version: 2
  },
  "flag-am": {
    id: "flag-am",
    name: "Armenia Flag",
    keywords: [
      "am",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1f2",
        native: "🇦🇲"
      }
    ],
    version: 2
  },
  "flag-ao": {
    id: "flag-ao",
    name: "Angola Flag",
    keywords: [
      "ao",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1f4",
        native: "🇦🇴"
      }
    ],
    version: 2
  },
  "flag-aq": {
    id: "flag-aq",
    name: "Antarctica Flag",
    keywords: [
      "aq",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1f6",
        native: "🇦🇶"
      }
    ],
    version: 2
  },
  "flag-ar": {
    id: "flag-ar",
    name: "Argentina Flag",
    keywords: [
      "ar",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1f7",
        native: "🇦🇷"
      }
    ],
    version: 2
  },
  "flag-as": {
    id: "flag-as",
    name: "American Samoa Flag",
    keywords: [
      "as",
      "ws",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1f8",
        native: "🇦🇸"
      }
    ],
    version: 2
  },
  "flag-at": {
    id: "flag-at",
    name: "Austria Flag",
    keywords: [
      "at",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1f9",
        native: "🇦🇹"
      }
    ],
    version: 2
  },
  "flag-au": {
    id: "flag-au",
    name: "Australia Flag",
    keywords: [
      "au",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1fa",
        native: "🇦🇺"
      }
    ],
    version: 2
  },
  "flag-aw": {
    id: "flag-aw",
    name: "Aruba Flag",
    keywords: [
      "aw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1fc",
        native: "🇦🇼"
      }
    ],
    version: 2
  },
  "flag-ax": {
    id: "flag-ax",
    name: "Åland Islands Flag",
    keywords: [
      "ax",
      "aland",
      "Aland",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1fd",
        native: "🇦🇽"
      }
    ],
    version: 2
  },
  "flag-az": {
    id: "flag-az",
    name: "Azerbaijan Flag",
    keywords: [
      "az",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e6-1f1ff",
        native: "🇦🇿"
      }
    ],
    version: 2
  },
  "flag-ba": {
    id: "flag-ba",
    name: "Bosnia & Herzegovina Flag",
    keywords: [
      "ba",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1e6",
        native: "🇧🇦"
      }
    ],
    version: 2
  },
  "flag-bb": {
    id: "flag-bb",
    name: "Barbados Flag",
    keywords: [
      "bb",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1e7",
        native: "🇧🇧"
      }
    ],
    version: 2
  },
  "flag-bd": {
    id: "flag-bd",
    name: "Bangladesh Flag",
    keywords: [
      "bd",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1e9",
        native: "🇧🇩"
      }
    ],
    version: 2
  },
  "flag-be": {
    id: "flag-be",
    name: "Belgium Flag",
    keywords: [
      "be",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1ea",
        native: "🇧🇪"
      }
    ],
    version: 2
  },
  "flag-bf": {
    id: "flag-bf",
    name: "Burkina Faso Flag",
    keywords: [
      "bf",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1eb",
        native: "🇧🇫"
      }
    ],
    version: 2
  },
  "flag-bg": {
    id: "flag-bg",
    name: "Bulgaria Flag",
    keywords: [
      "bg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1ec",
        native: "🇧🇬"
      }
    ],
    version: 2
  },
  "flag-bh": {
    id: "flag-bh",
    name: "Bahrain Flag",
    keywords: [
      "bh",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1ed",
        native: "🇧🇭"
      }
    ],
    version: 2
  },
  "flag-bi": {
    id: "flag-bi",
    name: "Burundi Flag",
    keywords: [
      "bi",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1ee",
        native: "🇧🇮"
      }
    ],
    version: 2
  },
  "flag-bj": {
    id: "flag-bj",
    name: "Benin Flag",
    keywords: [
      "bj",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1ef",
        native: "🇧🇯"
      }
    ],
    version: 2
  },
  "flag-bl": {
    id: "flag-bl",
    name: "St. Barthélemy Flag",
    keywords: [
      "bl",
      "st",
      "barthelemy",
      "saint",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f1",
        native: "🇧🇱"
      }
    ],
    version: 2
  },
  "flag-bm": {
    id: "flag-bm",
    name: "Bermuda Flag",
    keywords: [
      "bm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f2",
        native: "🇧🇲"
      }
    ],
    version: 2
  },
  "flag-bn": {
    id: "flag-bn",
    name: "Brunei Flag",
    keywords: [
      "bn",
      "darussalam",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f3",
        native: "🇧🇳"
      }
    ],
    version: 2
  },
  "flag-bo": {
    id: "flag-bo",
    name: "Bolivia Flag",
    keywords: [
      "bo",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f4",
        native: "🇧🇴"
      }
    ],
    version: 2
  },
  "flag-bq": {
    id: "flag-bq",
    name: "Caribbean Netherlands Flag",
    keywords: [
      "bq",
      "bonaire",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f6",
        native: "🇧🇶"
      }
    ],
    version: 2
  },
  "flag-br": {
    id: "flag-br",
    name: "Brazil Flag",
    keywords: [
      "br",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f7",
        native: "🇧🇷"
      }
    ],
    version: 2
  },
  "flag-bs": {
    id: "flag-bs",
    name: "Bahamas Flag",
    keywords: [
      "bs",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f8",
        native: "🇧🇸"
      }
    ],
    version: 2
  },
  "flag-bt": {
    id: "flag-bt",
    name: "Bhutan Flag",
    keywords: [
      "bt",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1f9",
        native: "🇧🇹"
      }
    ],
    version: 2
  },
  "flag-bv": {
    id: "flag-bv",
    name: "Bouvet Island Flag",
    keywords: [
      "bv",
      "norway"
    ],
    skins: [
      {
        unified: "1f1e7-1f1fb",
        native: "🇧🇻"
      }
    ],
    version: 2
  },
  "flag-bw": {
    id: "flag-bw",
    name: "Botswana Flag",
    keywords: [
      "bw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1fc",
        native: "🇧🇼"
      }
    ],
    version: 2
  },
  "flag-by": {
    id: "flag-by",
    name: "Belarus Flag",
    keywords: [
      "by",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1fe",
        native: "🇧🇾"
      }
    ],
    version: 2
  },
  "flag-bz": {
    id: "flag-bz",
    name: "Belize Flag",
    keywords: [
      "bz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e7-1f1ff",
        native: "🇧🇿"
      }
    ],
    version: 2
  },
  "flag-ca": {
    id: "flag-ca",
    name: "Canada Flag",
    keywords: [
      "ca",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1e6",
        native: "🇨🇦"
      }
    ],
    version: 2
  },
  "flag-cc": {
    id: "flag-cc",
    name: "Cocos (keeling) Islands Flag",
    keywords: [
      "cc",
      "keeling",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1e8",
        native: "🇨🇨"
      }
    ],
    version: 2
  },
  "flag-cd": {
    id: "flag-cd",
    name: "Congo - Kinshasa Flag",
    keywords: [
      "cd",
      "democratic",
      "republic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1e9",
        native: "🇨🇩"
      }
    ],
    version: 2
  },
  "flag-cf": {
    id: "flag-cf",
    name: "Central African Republic Flag",
    keywords: [
      "cf",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1eb",
        native: "🇨🇫"
      }
    ],
    version: 2
  },
  "flag-cg": {
    id: "flag-cg",
    name: "Congo - Brazzaville Flag",
    keywords: [
      "cg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1ec",
        native: "🇨🇬"
      }
    ],
    version: 2
  },
  "flag-ch": {
    id: "flag-ch",
    name: "Switzerland Flag",
    keywords: [
      "ch",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1ed",
        native: "🇨🇭"
      }
    ],
    version: 2
  },
  "flag-ci": {
    id: "flag-ci",
    name: "Côte D’ivoire Flag",
    keywords: [
      "ci",
      "cote",
      "d",
      "ivoire",
      "ivory",
      "coast",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1ee",
        native: "🇨🇮"
      }
    ],
    version: 2
  },
  "flag-ck": {
    id: "flag-ck",
    name: "Cook Islands Flag",
    keywords: [
      "ck",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1f0",
        native: "🇨🇰"
      }
    ],
    version: 2
  },
  "flag-cl": {
    id: "flag-cl",
    name: "Chile Flag",
    keywords: [
      "cl",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1f1",
        native: "🇨🇱"
      }
    ],
    version: 2
  },
  "flag-cm": {
    id: "flag-cm",
    name: "Cameroon Flag",
    keywords: [
      "cm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1f2",
        native: "🇨🇲"
      }
    ],
    version: 2
  },
  cn: {
    id: "cn",
    name: "China Flag",
    keywords: [
      "cn",
      "chinese",
      "prc",
      "country",
      "nation",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1f3",
        native: "🇨🇳"
      }
    ],
    version: 1
  },
  "flag-co": {
    id: "flag-co",
    name: "Colombia Flag",
    keywords: [
      "co",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1f4",
        native: "🇨🇴"
      }
    ],
    version: 2
  },
  "flag-cp": {
    id: "flag-cp",
    name: "Clipperton Island Flag",
    keywords: [
      "cp"
    ],
    skins: [
      {
        unified: "1f1e8-1f1f5",
        native: "🇨🇵"
      }
    ],
    version: 2
  },
  "flag-cr": {
    id: "flag-cr",
    name: "Costa Rica Flag",
    keywords: [
      "cr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1f7",
        native: "🇨🇷"
      }
    ],
    version: 2
  },
  "flag-cu": {
    id: "flag-cu",
    name: "Cuba Flag",
    keywords: [
      "cu",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1fa",
        native: "🇨🇺"
      }
    ],
    version: 2
  },
  "flag-cv": {
    id: "flag-cv",
    name: "Cape Verde Flag",
    keywords: [
      "cv",
      "cabo",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1fb",
        native: "🇨🇻"
      }
    ],
    version: 2
  },
  "flag-cw": {
    id: "flag-cw",
    name: "Curaçao Flag",
    keywords: [
      "cw",
      "curacao",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1fc",
        native: "🇨🇼"
      }
    ],
    version: 2
  },
  "flag-cx": {
    id: "flag-cx",
    name: "Christmas Island Flag",
    keywords: [
      "cx",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1fd",
        native: "🇨🇽"
      }
    ],
    version: 2
  },
  "flag-cy": {
    id: "flag-cy",
    name: "Cyprus Flag",
    keywords: [
      "cy",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1fe",
        native: "🇨🇾"
      }
    ],
    version: 2
  },
  "flag-cz": {
    id: "flag-cz",
    name: "Czechia Flag",
    keywords: [
      "cz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e8-1f1ff",
        native: "🇨🇿"
      }
    ],
    version: 2
  },
  de: {
    id: "de",
    name: "Germany Flag",
    keywords: [
      "de",
      "german",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e9-1f1ea",
        native: "🇩🇪"
      }
    ],
    version: 1
  },
  "flag-dg": {
    id: "flag-dg",
    name: "Diego Garcia Flag",
    keywords: [
      "dg"
    ],
    skins: [
      {
        unified: "1f1e9-1f1ec",
        native: "🇩🇬"
      }
    ],
    version: 2
  },
  "flag-dj": {
    id: "flag-dj",
    name: "Djibouti Flag",
    keywords: [
      "dj",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e9-1f1ef",
        native: "🇩🇯"
      }
    ],
    version: 2
  },
  "flag-dk": {
    id: "flag-dk",
    name: "Denmark Flag",
    keywords: [
      "dk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e9-1f1f0",
        native: "🇩🇰"
      }
    ],
    version: 2
  },
  "flag-dm": {
    id: "flag-dm",
    name: "Dominica Flag",
    keywords: [
      "dm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e9-1f1f2",
        native: "🇩🇲"
      }
    ],
    version: 2
  },
  "flag-do": {
    id: "flag-do",
    name: "Dominican Republic Flag",
    keywords: [
      "do",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e9-1f1f4",
        native: "🇩🇴"
      }
    ],
    version: 2
  },
  "flag-dz": {
    id: "flag-dz",
    name: "Algeria Flag",
    keywords: [
      "dz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1e9-1f1ff",
        native: "🇩🇿"
      }
    ],
    version: 2
  },
  "flag-ea": {
    id: "flag-ea",
    name: "Ceuta & Melilla Flag",
    keywords: [
      "ea"
    ],
    skins: [
      {
        unified: "1f1ea-1f1e6",
        native: "🇪🇦"
      }
    ],
    version: 2
  },
  "flag-ec": {
    id: "flag-ec",
    name: "Ecuador Flag",
    keywords: [
      "ec",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1e8",
        native: "🇪🇨"
      }
    ],
    version: 2
  },
  "flag-ee": {
    id: "flag-ee",
    name: "Estonia Flag",
    keywords: [
      "ee",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1ea",
        native: "🇪🇪"
      }
    ],
    version: 2
  },
  "flag-eg": {
    id: "flag-eg",
    name: "Egypt Flag",
    keywords: [
      "eg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1ec",
        native: "🇪🇬"
      }
    ],
    version: 2
  },
  "flag-eh": {
    id: "flag-eh",
    name: "Western Sahara Flag",
    keywords: [
      "eh",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1ed",
        native: "🇪🇭"
      }
    ],
    version: 2
  },
  "flag-er": {
    id: "flag-er",
    name: "Eritrea Flag",
    keywords: [
      "er",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1f7",
        native: "🇪🇷"
      }
    ],
    version: 2
  },
  es: {
    id: "es",
    name: "Spain Flag",
    keywords: [
      "es",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1f8",
        native: "🇪🇸"
      }
    ],
    version: 1
  },
  "flag-et": {
    id: "flag-et",
    name: "Ethiopia Flag",
    keywords: [
      "et",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1f9",
        native: "🇪🇹"
      }
    ],
    version: 2
  },
  "flag-eu": {
    id: "flag-eu",
    name: "European Union Flag",
    keywords: [
      "eu",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ea-1f1fa",
        native: "🇪🇺"
      }
    ],
    version: 2
  },
  "flag-fi": {
    id: "flag-fi",
    name: "Finland Flag",
    keywords: [
      "fi",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1eb-1f1ee",
        native: "🇫🇮"
      }
    ],
    version: 2
  },
  "flag-fj": {
    id: "flag-fj",
    name: "Fiji Flag",
    keywords: [
      "fj",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1eb-1f1ef",
        native: "🇫🇯"
      }
    ],
    version: 2
  },
  "flag-fk": {
    id: "flag-fk",
    name: "Falkland Islands Flag",
    keywords: [
      "fk",
      "malvinas",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1eb-1f1f0",
        native: "🇫🇰"
      }
    ],
    version: 2
  },
  "flag-fm": {
    id: "flag-fm",
    name: "Micronesia Flag",
    keywords: [
      "fm",
      "federated",
      "states",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1eb-1f1f2",
        native: "🇫🇲"
      }
    ],
    version: 2
  },
  "flag-fo": {
    id: "flag-fo",
    name: "Faroe Islands Flag",
    keywords: [
      "fo",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1eb-1f1f4",
        native: "🇫🇴"
      }
    ],
    version: 2
  },
  fr: {
    id: "fr",
    name: "France Flag",
    keywords: [
      "fr",
      "banner",
      "nation",
      "french",
      "country"
    ],
    skins: [
      {
        unified: "1f1eb-1f1f7",
        native: "🇫🇷"
      }
    ],
    version: 1
  },
  "flag-ga": {
    id: "flag-ga",
    name: "Gabon Flag",
    keywords: [
      "ga",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1e6",
        native: "🇬🇦"
      }
    ],
    version: 2
  },
  gb: {
    id: "gb",
    name: "United Kingdom Flag",
    keywords: [
      "gb",
      "uk",
      "great",
      "britain",
      "northern",
      "ireland",
      "nation",
      "country",
      "banner",
      "british",
      "UK",
      "english",
      "england",
      "union",
      "jack"
    ],
    skins: [
      {
        unified: "1f1ec-1f1e7",
        native: "🇬🇧"
      }
    ],
    version: 1
  },
  "flag-gd": {
    id: "flag-gd",
    name: "Grenada Flag",
    keywords: [
      "gd",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1e9",
        native: "🇬🇩"
      }
    ],
    version: 2
  },
  "flag-ge": {
    id: "flag-ge",
    name: "Georgia Flag",
    keywords: [
      "ge",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1ea",
        native: "🇬🇪"
      }
    ],
    version: 2
  },
  "flag-gf": {
    id: "flag-gf",
    name: "French Guiana Flag",
    keywords: [
      "gf",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1eb",
        native: "🇬🇫"
      }
    ],
    version: 2
  },
  "flag-gg": {
    id: "flag-gg",
    name: "Guernsey Flag",
    keywords: [
      "gg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1ec",
        native: "🇬🇬"
      }
    ],
    version: 2
  },
  "flag-gh": {
    id: "flag-gh",
    name: "Ghana Flag",
    keywords: [
      "gh",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1ed",
        native: "🇬🇭"
      }
    ],
    version: 2
  },
  "flag-gi": {
    id: "flag-gi",
    name: "Gibraltar Flag",
    keywords: [
      "gi",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1ee",
        native: "🇬🇮"
      }
    ],
    version: 2
  },
  "flag-gl": {
    id: "flag-gl",
    name: "Greenland Flag",
    keywords: [
      "gl",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f1",
        native: "🇬🇱"
      }
    ],
    version: 2
  },
  "flag-gm": {
    id: "flag-gm",
    name: "Gambia Flag",
    keywords: [
      "gm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f2",
        native: "🇬🇲"
      }
    ],
    version: 2
  },
  "flag-gn": {
    id: "flag-gn",
    name: "Guinea Flag",
    keywords: [
      "gn",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f3",
        native: "🇬🇳"
      }
    ],
    version: 2
  },
  "flag-gp": {
    id: "flag-gp",
    name: "Guadeloupe Flag",
    keywords: [
      "gp",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f5",
        native: "🇬🇵"
      }
    ],
    version: 2
  },
  "flag-gq": {
    id: "flag-gq",
    name: "Equatorial Guinea Flag",
    keywords: [
      "gq",
      "gn",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f6",
        native: "🇬🇶"
      }
    ],
    version: 2
  },
  "flag-gr": {
    id: "flag-gr",
    name: "Greece Flag",
    keywords: [
      "gr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f7",
        native: "🇬🇷"
      }
    ],
    version: 2
  },
  "flag-gs": {
    id: "flag-gs",
    name: "South Georgia & South Sandwich Islands Flag",
    keywords: [
      "gs",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f8",
        native: "🇬🇸"
      }
    ],
    version: 2
  },
  "flag-gt": {
    id: "flag-gt",
    name: "Guatemala Flag",
    keywords: [
      "gt",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1f9",
        native: "🇬🇹"
      }
    ],
    version: 2
  },
  "flag-gu": {
    id: "flag-gu",
    name: "Guam Flag",
    keywords: [
      "gu",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1fa",
        native: "🇬🇺"
      }
    ],
    version: 2
  },
  "flag-gw": {
    id: "flag-gw",
    name: "Guinea-Bissau Flag",
    keywords: [
      "gw",
      "guinea",
      "bissau",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1fc",
        native: "🇬🇼"
      }
    ],
    version: 2
  },
  "flag-gy": {
    id: "flag-gy",
    name: "Guyana Flag",
    keywords: [
      "gy",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ec-1f1fe",
        native: "🇬🇾"
      }
    ],
    version: 2
  },
  "flag-hk": {
    id: "flag-hk",
    name: "Hong Kong Sar China Flag",
    keywords: [
      "hk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ed-1f1f0",
        native: "🇭🇰"
      }
    ],
    version: 2
  },
  "flag-hm": {
    id: "flag-hm",
    name: "Heard & Mcdonald Islands Flag",
    keywords: [
      "hm"
    ],
    skins: [
      {
        unified: "1f1ed-1f1f2",
        native: "🇭🇲"
      }
    ],
    version: 2
  },
  "flag-hn": {
    id: "flag-hn",
    name: "Honduras Flag",
    keywords: [
      "hn",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ed-1f1f3",
        native: "🇭🇳"
      }
    ],
    version: 2
  },
  "flag-hr": {
    id: "flag-hr",
    name: "Croatia Flag",
    keywords: [
      "hr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ed-1f1f7",
        native: "🇭🇷"
      }
    ],
    version: 2
  },
  "flag-ht": {
    id: "flag-ht",
    name: "Haiti Flag",
    keywords: [
      "ht",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ed-1f1f9",
        native: "🇭🇹"
      }
    ],
    version: 2
  },
  "flag-hu": {
    id: "flag-hu",
    name: "Hungary Flag",
    keywords: [
      "hu",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ed-1f1fa",
        native: "🇭🇺"
      }
    ],
    version: 2
  },
  "flag-ic": {
    id: "flag-ic",
    name: "Canary Islands Flag",
    keywords: [
      "ic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1e8",
        native: "🇮🇨"
      }
    ],
    version: 2
  },
  "flag-id": {
    id: "flag-id",
    name: "Indonesia Flag",
    keywords: [
      "id",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1e9",
        native: "🇮🇩"
      }
    ],
    version: 2
  },
  "flag-ie": {
    id: "flag-ie",
    name: "Ireland Flag",
    keywords: [
      "ie",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1ea",
        native: "🇮🇪"
      }
    ],
    version: 2
  },
  "flag-il": {
    id: "flag-il",
    name: "Israel Flag",
    keywords: [
      "il",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f1",
        native: "🇮🇱"
      }
    ],
    version: 2
  },
  "flag-im": {
    id: "flag-im",
    name: "Isle of Man Flag",
    keywords: [
      "im",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f2",
        native: "🇮🇲"
      }
    ],
    version: 2
  },
  "flag-in": {
    id: "flag-in",
    name: "India Flag",
    keywords: [
      "in",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f3",
        native: "🇮🇳"
      }
    ],
    version: 2
  },
  "flag-io": {
    id: "flag-io",
    name: "British Indian Ocean Territory Flag",
    keywords: [
      "io",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f4",
        native: "🇮🇴"
      }
    ],
    version: 2
  },
  "flag-iq": {
    id: "flag-iq",
    name: "Iraq Flag",
    keywords: [
      "iq",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f6",
        native: "🇮🇶"
      }
    ],
    version: 2
  },
  "flag-ir": {
    id: "flag-ir",
    name: "Iran Flag",
    keywords: [
      "ir",
      "islamic",
      "republic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f7",
        native: "🇮🇷"
      }
    ],
    version: 2
  },
  "flag-is": {
    id: "flag-is",
    name: "Iceland Flag",
    keywords: [
      "is",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f8",
        native: "🇮🇸"
      }
    ],
    version: 2
  },
  it: {
    id: "it",
    name: "Italy Flag",
    keywords: [
      "it",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ee-1f1f9",
        native: "🇮🇹"
      }
    ],
    version: 1
  },
  "flag-je": {
    id: "flag-je",
    name: "Jersey Flag",
    keywords: [
      "je",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ef-1f1ea",
        native: "🇯🇪"
      }
    ],
    version: 2
  },
  "flag-jm": {
    id: "flag-jm",
    name: "Jamaica Flag",
    keywords: [
      "jm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ef-1f1f2",
        native: "🇯🇲"
      }
    ],
    version: 2
  },
  "flag-jo": {
    id: "flag-jo",
    name: "Jordan Flag",
    keywords: [
      "jo",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ef-1f1f4",
        native: "🇯🇴"
      }
    ],
    version: 2
  },
  jp: {
    id: "jp",
    name: "Japan Flag",
    keywords: [
      "jp",
      "japanese",
      "nation",
      "country",
      "banner",
      "ja"
    ],
    skins: [
      {
        unified: "1f1ef-1f1f5",
        native: "🇯🇵"
      }
    ],
    version: 1
  },
  "flag-ke": {
    id: "flag-ke",
    name: "Kenya Flag",
    keywords: [
      "ke",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1ea",
        native: "🇰🇪"
      }
    ],
    version: 2
  },
  "flag-kg": {
    id: "flag-kg",
    name: "Kyrgyzstan Flag",
    keywords: [
      "kg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1ec",
        native: "🇰🇬"
      }
    ],
    version: 2
  },
  "flag-kh": {
    id: "flag-kh",
    name: "Cambodia Flag",
    keywords: [
      "kh",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1ed",
        native: "🇰🇭"
      }
    ],
    version: 2
  },
  "flag-ki": {
    id: "flag-ki",
    name: "Kiribati Flag",
    keywords: [
      "ki",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1ee",
        native: "🇰🇮"
      }
    ],
    version: 2
  },
  "flag-km": {
    id: "flag-km",
    name: "Comoros Flag",
    keywords: [
      "km",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1f2",
        native: "🇰🇲"
      }
    ],
    version: 2
  },
  "flag-kn": {
    id: "flag-kn",
    name: "St. Kitts & Nevis Flag",
    keywords: [
      "kn",
      "st",
      "saint",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1f3",
        native: "🇰🇳"
      }
    ],
    version: 2
  },
  "flag-kp": {
    id: "flag-kp",
    name: "North Korea Flag",
    keywords: [
      "kp",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1f5",
        native: "🇰🇵"
      }
    ],
    version: 2
  },
  kr: {
    id: "kr",
    name: "South Korea Flag",
    keywords: [
      "kr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1f7",
        native: "🇰🇷"
      }
    ],
    version: 1
  },
  "flag-kw": {
    id: "flag-kw",
    name: "Kuwait Flag",
    keywords: [
      "kw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1fc",
        native: "🇰🇼"
      }
    ],
    version: 2
  },
  "flag-ky": {
    id: "flag-ky",
    name: "Cayman Islands Flag",
    keywords: [
      "ky",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1fe",
        native: "🇰🇾"
      }
    ],
    version: 2
  },
  "flag-kz": {
    id: "flag-kz",
    name: "Kazakhstan Flag",
    keywords: [
      "kz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f0-1f1ff",
        native: "🇰🇿"
      }
    ],
    version: 2
  },
  "flag-la": {
    id: "flag-la",
    name: "Laos Flag",
    keywords: [
      "la",
      "lao",
      "democratic",
      "republic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1e6",
        native: "🇱🇦"
      }
    ],
    version: 2
  },
  "flag-lb": {
    id: "flag-lb",
    name: "Lebanon Flag",
    keywords: [
      "lb",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1e7",
        native: "🇱🇧"
      }
    ],
    version: 2
  },
  "flag-lc": {
    id: "flag-lc",
    name: "St. Lucia Flag",
    keywords: [
      "lc",
      "st",
      "saint",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1e8",
        native: "🇱🇨"
      }
    ],
    version: 2
  },
  "flag-li": {
    id: "flag-li",
    name: "Liechtenstein Flag",
    keywords: [
      "li",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1ee",
        native: "🇱🇮"
      }
    ],
    version: 2
  },
  "flag-lk": {
    id: "flag-lk",
    name: "Sri Lanka Flag",
    keywords: [
      "lk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1f0",
        native: "🇱🇰"
      }
    ],
    version: 2
  },
  "flag-lr": {
    id: "flag-lr",
    name: "Liberia Flag",
    keywords: [
      "lr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1f7",
        native: "🇱🇷"
      }
    ],
    version: 2
  },
  "flag-ls": {
    id: "flag-ls",
    name: "Lesotho Flag",
    keywords: [
      "ls",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1f8",
        native: "🇱🇸"
      }
    ],
    version: 2
  },
  "flag-lt": {
    id: "flag-lt",
    name: "Lithuania Flag",
    keywords: [
      "lt",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1f9",
        native: "🇱🇹"
      }
    ],
    version: 2
  },
  "flag-lu": {
    id: "flag-lu",
    name: "Luxembourg Flag",
    keywords: [
      "lu",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1fa",
        native: "🇱🇺"
      }
    ],
    version: 2
  },
  "flag-lv": {
    id: "flag-lv",
    name: "Latvia Flag",
    keywords: [
      "lv",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1fb",
        native: "🇱🇻"
      }
    ],
    version: 2
  },
  "flag-ly": {
    id: "flag-ly",
    name: "Libya Flag",
    keywords: [
      "ly",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f1-1f1fe",
        native: "🇱🇾"
      }
    ],
    version: 2
  },
  "flag-ma": {
    id: "flag-ma",
    name: "Morocco Flag",
    keywords: [
      "ma",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1e6",
        native: "🇲🇦"
      }
    ],
    version: 2
  },
  "flag-mc": {
    id: "flag-mc",
    name: "Monaco Flag",
    keywords: [
      "mc",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1e8",
        native: "🇲🇨"
      }
    ],
    version: 2
  },
  "flag-md": {
    id: "flag-md",
    name: "Moldova Flag",
    keywords: [
      "md",
      "republic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1e9",
        native: "🇲🇩"
      }
    ],
    version: 2
  },
  "flag-me": {
    id: "flag-me",
    name: "Montenegro Flag",
    keywords: [
      "me",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1ea",
        native: "🇲🇪"
      }
    ],
    version: 2
  },
  "flag-mf": {
    id: "flag-mf",
    name: "St. Martin Flag",
    keywords: [
      "mf",
      "st"
    ],
    skins: [
      {
        unified: "1f1f2-1f1eb",
        native: "🇲🇫"
      }
    ],
    version: 2
  },
  "flag-mg": {
    id: "flag-mg",
    name: "Madagascar Flag",
    keywords: [
      "mg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1ec",
        native: "🇲🇬"
      }
    ],
    version: 2
  },
  "flag-mh": {
    id: "flag-mh",
    name: "Marshall Islands Flag",
    keywords: [
      "mh",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1ed",
        native: "🇲🇭"
      }
    ],
    version: 2
  },
  "flag-mk": {
    id: "flag-mk",
    name: "North Macedonia Flag",
    keywords: [
      "mk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f0",
        native: "🇲🇰"
      }
    ],
    version: 2
  },
  "flag-ml": {
    id: "flag-ml",
    name: "Mali Flag",
    keywords: [
      "ml",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f1",
        native: "🇲🇱"
      }
    ],
    version: 2
  },
  "flag-mm": {
    id: "flag-mm",
    name: "Myanmar (burma) Flag",
    keywords: [
      "mm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f2",
        native: "🇲🇲"
      }
    ],
    version: 2
  },
  "flag-mn": {
    id: "flag-mn",
    name: "Mongolia Flag",
    keywords: [
      "mn",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f3",
        native: "🇲🇳"
      }
    ],
    version: 2
  },
  "flag-mo": {
    id: "flag-mo",
    name: "Macao Sar China Flag",
    keywords: [
      "mo",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f4",
        native: "🇲🇴"
      }
    ],
    version: 2
  },
  "flag-mp": {
    id: "flag-mp",
    name: "Northern Mariana Islands Flag",
    keywords: [
      "mp",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f5",
        native: "🇲🇵"
      }
    ],
    version: 2
  },
  "flag-mq": {
    id: "flag-mq",
    name: "Martinique Flag",
    keywords: [
      "mq",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f6",
        native: "🇲🇶"
      }
    ],
    version: 2
  },
  "flag-mr": {
    id: "flag-mr",
    name: "Mauritania Flag",
    keywords: [
      "mr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f7",
        native: "🇲🇷"
      }
    ],
    version: 2
  },
  "flag-ms": {
    id: "flag-ms",
    name: "Montserrat Flag",
    keywords: [
      "ms",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f8",
        native: "🇲🇸"
      }
    ],
    version: 2
  },
  "flag-mt": {
    id: "flag-mt",
    name: "Malta Flag",
    keywords: [
      "mt",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1f9",
        native: "🇲🇹"
      }
    ],
    version: 2
  },
  "flag-mu": {
    id: "flag-mu",
    name: "Mauritius Flag",
    keywords: [
      "mu",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1fa",
        native: "🇲🇺"
      }
    ],
    version: 2
  },
  "flag-mv": {
    id: "flag-mv",
    name: "Maldives Flag",
    keywords: [
      "mv",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1fb",
        native: "🇲🇻"
      }
    ],
    version: 2
  },
  "flag-mw": {
    id: "flag-mw",
    name: "Malawi Flag",
    keywords: [
      "mw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1fc",
        native: "🇲🇼"
      }
    ],
    version: 2
  },
  "flag-mx": {
    id: "flag-mx",
    name: "Mexico Flag",
    keywords: [
      "mx",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1fd",
        native: "🇲🇽"
      }
    ],
    version: 2
  },
  "flag-my": {
    id: "flag-my",
    name: "Malaysia Flag",
    keywords: [
      "my",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1fe",
        native: "🇲🇾"
      }
    ],
    version: 2
  },
  "flag-mz": {
    id: "flag-mz",
    name: "Mozambique Flag",
    keywords: [
      "mz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f2-1f1ff",
        native: "🇲🇿"
      }
    ],
    version: 2
  },
  "flag-na": {
    id: "flag-na",
    name: "Namibia Flag",
    keywords: [
      "na",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1e6",
        native: "🇳🇦"
      }
    ],
    version: 2
  },
  "flag-nc": {
    id: "flag-nc",
    name: "New Caledonia Flag",
    keywords: [
      "nc",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1e8",
        native: "🇳🇨"
      }
    ],
    version: 2
  },
  "flag-ne": {
    id: "flag-ne",
    name: "Niger Flag",
    keywords: [
      "ne",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1ea",
        native: "🇳🇪"
      }
    ],
    version: 2
  },
  "flag-nf": {
    id: "flag-nf",
    name: "Norfolk Island Flag",
    keywords: [
      "nf",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1eb",
        native: "🇳🇫"
      }
    ],
    version: 2
  },
  "flag-ng": {
    id: "flag-ng",
    name: "Nigeria Flag",
    keywords: [
      "ng",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1ec",
        native: "🇳🇬"
      }
    ],
    version: 2
  },
  "flag-ni": {
    id: "flag-ni",
    name: "Nicaragua Flag",
    keywords: [
      "ni",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1ee",
        native: "🇳🇮"
      }
    ],
    version: 2
  },
  "flag-nl": {
    id: "flag-nl",
    name: "Netherlands Flag",
    keywords: [
      "nl",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1f1",
        native: "🇳🇱"
      }
    ],
    version: 2
  },
  "flag-no": {
    id: "flag-no",
    name: "Norway Flag",
    keywords: [
      "no",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1f4",
        native: "🇳🇴"
      }
    ],
    version: 2
  },
  "flag-np": {
    id: "flag-np",
    name: "Nepal Flag",
    keywords: [
      "np",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1f5",
        native: "🇳🇵"
      }
    ],
    version: 2
  },
  "flag-nr": {
    id: "flag-nr",
    name: "Nauru Flag",
    keywords: [
      "nr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1f7",
        native: "🇳🇷"
      }
    ],
    version: 2
  },
  "flag-nu": {
    id: "flag-nu",
    name: "Niue Flag",
    keywords: [
      "nu",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1fa",
        native: "🇳🇺"
      }
    ],
    version: 2
  },
  "flag-nz": {
    id: "flag-nz",
    name: "New Zealand Flag",
    keywords: [
      "nz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f3-1f1ff",
        native: "🇳🇿"
      }
    ],
    version: 2
  },
  "flag-om": {
    id: "flag-om",
    name: "Oman Flag",
    keywords: [
      "om",
      "symbol",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f4-1f1f2",
        native: "🇴🇲"
      }
    ],
    version: 2
  },
  "flag-pa": {
    id: "flag-pa",
    name: "Panama Flag",
    keywords: [
      "pa",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1e6",
        native: "🇵🇦"
      }
    ],
    version: 2
  },
  "flag-pe": {
    id: "flag-pe",
    name: "Peru Flag",
    keywords: [
      "pe",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1ea",
        native: "🇵🇪"
      }
    ],
    version: 2
  },
  "flag-pf": {
    id: "flag-pf",
    name: "French Polynesia Flag",
    keywords: [
      "pf",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1eb",
        native: "🇵🇫"
      }
    ],
    version: 2
  },
  "flag-pg": {
    id: "flag-pg",
    name: "Papua New Guinea Flag",
    keywords: [
      "pg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1ec",
        native: "🇵🇬"
      }
    ],
    version: 2
  },
  "flag-ph": {
    id: "flag-ph",
    name: "Philippines Flag",
    keywords: [
      "ph",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1ed",
        native: "🇵🇭"
      }
    ],
    version: 2
  },
  "flag-pk": {
    id: "flag-pk",
    name: "Pakistan Flag",
    keywords: [
      "pk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1f0",
        native: "🇵🇰"
      }
    ],
    version: 2
  },
  "flag-pl": {
    id: "flag-pl",
    name: "Poland Flag",
    keywords: [
      "pl",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1f1",
        native: "🇵🇱"
      }
    ],
    version: 2
  },
  "flag-pm": {
    id: "flag-pm",
    name: "St. Pierre & Miquelon Flag",
    keywords: [
      "pm",
      "st",
      "saint",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1f2",
        native: "🇵🇲"
      }
    ],
    version: 2
  },
  "flag-pn": {
    id: "flag-pn",
    name: "Pitcairn Islands Flag",
    keywords: [
      "pn",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1f3",
        native: "🇵🇳"
      }
    ],
    version: 2
  },
  "flag-pr": {
    id: "flag-pr",
    name: "Puerto Rico Flag",
    keywords: [
      "pr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1f7",
        native: "🇵🇷"
      }
    ],
    version: 2
  },
  "flag-ps": {
    id: "flag-ps",
    name: "Palestinian Territories Flag",
    keywords: [
      "ps",
      "palestine",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1f8",
        native: "🇵🇸"
      }
    ],
    version: 2
  },
  "flag-pt": {
    id: "flag-pt",
    name: "Portugal Flag",
    keywords: [
      "pt",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1f9",
        native: "🇵🇹"
      }
    ],
    version: 2
  },
  "flag-pw": {
    id: "flag-pw",
    name: "Palau Flag",
    keywords: [
      "pw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1fc",
        native: "🇵🇼"
      }
    ],
    version: 2
  },
  "flag-py": {
    id: "flag-py",
    name: "Paraguay Flag",
    keywords: [
      "py",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f5-1f1fe",
        native: "🇵🇾"
      }
    ],
    version: 2
  },
  "flag-qa": {
    id: "flag-qa",
    name: "Qatar Flag",
    keywords: [
      "qa",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f6-1f1e6",
        native: "🇶🇦"
      }
    ],
    version: 2
  },
  "flag-re": {
    id: "flag-re",
    name: "Réunion Flag",
    keywords: [
      "re",
      "reunion",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f7-1f1ea",
        native: "🇷🇪"
      }
    ],
    version: 2
  },
  "flag-ro": {
    id: "flag-ro",
    name: "Romania Flag",
    keywords: [
      "ro",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f7-1f1f4",
        native: "🇷🇴"
      }
    ],
    version: 2
  },
  "flag-rs": {
    id: "flag-rs",
    name: "Serbia Flag",
    keywords: [
      "rs",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f7-1f1f8",
        native: "🇷🇸"
      }
    ],
    version: 2
  },
  ru: {
    id: "ru",
    name: "Russia Flag",
    keywords: [
      "ru",
      "russian",
      "federation",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f7-1f1fa",
        native: "🇷🇺"
      }
    ],
    version: 1
  },
  "flag-rw": {
    id: "flag-rw",
    name: "Rwanda Flag",
    keywords: [
      "rw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f7-1f1fc",
        native: "🇷🇼"
      }
    ],
    version: 2
  },
  "flag-sa": {
    id: "flag-sa",
    name: "Saudi Arabia Flag",
    keywords: [
      "sa",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1e6",
        native: "🇸🇦"
      }
    ],
    version: 2
  },
  "flag-sb": {
    id: "flag-sb",
    name: "Solomon Islands Flag",
    keywords: [
      "sb",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1e7",
        native: "🇸🇧"
      }
    ],
    version: 2
  },
  "flag-sc": {
    id: "flag-sc",
    name: "Seychelles Flag",
    keywords: [
      "sc",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1e8",
        native: "🇸🇨"
      }
    ],
    version: 2
  },
  "flag-sd": {
    id: "flag-sd",
    name: "Sudan Flag",
    keywords: [
      "sd",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1e9",
        native: "🇸🇩"
      }
    ],
    version: 2
  },
  "flag-se": {
    id: "flag-se",
    name: "Sweden Flag",
    keywords: [
      "se",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1ea",
        native: "🇸🇪"
      }
    ],
    version: 2
  },
  "flag-sg": {
    id: "flag-sg",
    name: "Singapore Flag",
    keywords: [
      "sg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1ec",
        native: "🇸🇬"
      }
    ],
    version: 2
  },
  "flag-sh": {
    id: "flag-sh",
    name: "St. Helena Flag",
    keywords: [
      "sh",
      "st",
      "saint",
      "ascension",
      "tristan",
      "cunha",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1ed",
        native: "🇸🇭"
      }
    ],
    version: 2
  },
  "flag-si": {
    id: "flag-si",
    name: "Slovenia Flag",
    keywords: [
      "si",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1ee",
        native: "🇸🇮"
      }
    ],
    version: 2
  },
  "flag-sj": {
    id: "flag-sj",
    name: "Svalbard & Jan Mayen Flag",
    keywords: [
      "sj"
    ],
    skins: [
      {
        unified: "1f1f8-1f1ef",
        native: "🇸🇯"
      }
    ],
    version: 2
  },
  "flag-sk": {
    id: "flag-sk",
    name: "Slovakia Flag",
    keywords: [
      "sk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f0",
        native: "🇸🇰"
      }
    ],
    version: 2
  },
  "flag-sl": {
    id: "flag-sl",
    name: "Sierra Leone Flag",
    keywords: [
      "sl",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f1",
        native: "🇸🇱"
      }
    ],
    version: 2
  },
  "flag-sm": {
    id: "flag-sm",
    name: "San Marino Flag",
    keywords: [
      "sm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f2",
        native: "🇸🇲"
      }
    ],
    version: 2
  },
  "flag-sn": {
    id: "flag-sn",
    name: "Senegal Flag",
    keywords: [
      "sn",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f3",
        native: "🇸🇳"
      }
    ],
    version: 2
  },
  "flag-so": {
    id: "flag-so",
    name: "Somalia Flag",
    keywords: [
      "so",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f4",
        native: "🇸🇴"
      }
    ],
    version: 2
  },
  "flag-sr": {
    id: "flag-sr",
    name: "Suriname Flag",
    keywords: [
      "sr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f7",
        native: "🇸🇷"
      }
    ],
    version: 2
  },
  "flag-ss": {
    id: "flag-ss",
    name: "South Sudan Flag",
    keywords: [
      "ss",
      "sd",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f8",
        native: "🇸🇸"
      }
    ],
    version: 2
  },
  "flag-st": {
    id: "flag-st",
    name: "São Tomé & Príncipe Flag",
    keywords: [
      "st",
      "sao",
      "tome",
      "principe",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1f9",
        native: "🇸🇹"
      }
    ],
    version: 2
  },
  "flag-sv": {
    id: "flag-sv",
    name: "El Salvador Flag",
    keywords: [
      "sv",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1fb",
        native: "🇸🇻"
      }
    ],
    version: 2
  },
  "flag-sx": {
    id: "flag-sx",
    name: "Sint Maarten Flag",
    keywords: [
      "sx",
      "dutch",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1fd",
        native: "🇸🇽"
      }
    ],
    version: 2
  },
  "flag-sy": {
    id: "flag-sy",
    name: "Syria Flag",
    keywords: [
      "sy",
      "syrian",
      "arab",
      "republic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1fe",
        native: "🇸🇾"
      }
    ],
    version: 2
  },
  "flag-sz": {
    id: "flag-sz",
    name: "Eswatini Flag",
    keywords: [
      "sz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f8-1f1ff",
        native: "🇸🇿"
      }
    ],
    version: 2
  },
  "flag-ta": {
    id: "flag-ta",
    name: "Tristan Da Cunha Flag",
    keywords: [
      "ta"
    ],
    skins: [
      {
        unified: "1f1f9-1f1e6",
        native: "🇹🇦"
      }
    ],
    version: 2
  },
  "flag-tc": {
    id: "flag-tc",
    name: "Turks & Caicos Islands Flag",
    keywords: [
      "tc",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1e8",
        native: "🇹🇨"
      }
    ],
    version: 2
  },
  "flag-td": {
    id: "flag-td",
    name: "Chad Flag",
    keywords: [
      "td",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1e9",
        native: "🇹🇩"
      }
    ],
    version: 2
  },
  "flag-tf": {
    id: "flag-tf",
    name: "French Southern Territories Flag",
    keywords: [
      "tf",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1eb",
        native: "🇹🇫"
      }
    ],
    version: 2
  },
  "flag-tg": {
    id: "flag-tg",
    name: "Togo Flag",
    keywords: [
      "tg",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1ec",
        native: "🇹🇬"
      }
    ],
    version: 2
  },
  "flag-th": {
    id: "flag-th",
    name: "Thailand Flag",
    keywords: [
      "th",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1ed",
        native: "🇹🇭"
      }
    ],
    version: 2
  },
  "flag-tj": {
    id: "flag-tj",
    name: "Tajikistan Flag",
    keywords: [
      "tj",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1ef",
        native: "🇹🇯"
      }
    ],
    version: 2
  },
  "flag-tk": {
    id: "flag-tk",
    name: "Tokelau Flag",
    keywords: [
      "tk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1f0",
        native: "🇹🇰"
      }
    ],
    version: 2
  },
  "flag-tl": {
    id: "flag-tl",
    name: "Timor-Leste Flag",
    keywords: [
      "tl",
      "timor",
      "leste",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1f1",
        native: "🇹🇱"
      }
    ],
    version: 2
  },
  "flag-tm": {
    id: "flag-tm",
    name: "Turkmenistan Flag",
    keywords: [
      "tm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1f2",
        native: "🇹🇲"
      }
    ],
    version: 2
  },
  "flag-tn": {
    id: "flag-tn",
    name: "Tunisia Flag",
    keywords: [
      "tn",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1f3",
        native: "🇹🇳"
      }
    ],
    version: 2
  },
  "flag-to": {
    id: "flag-to",
    name: "Tonga Flag",
    keywords: [
      "to",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1f4",
        native: "🇹🇴"
      }
    ],
    version: 2
  },
  "flag-tr": {
    id: "flag-tr",
    name: "Turkey Flag",
    keywords: [
      "tr",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1f7",
        native: "🇹🇷"
      }
    ],
    version: 2
  },
  "flag-tt": {
    id: "flag-tt",
    name: "Trinidad & Tobago Flag",
    keywords: [
      "tt",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1f9",
        native: "🇹🇹"
      }
    ],
    version: 2
  },
  "flag-tv": {
    id: "flag-tv",
    name: "Tuvalu Flag",
    keywords: [
      "tv",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1fb",
        native: "🇹🇻"
      }
    ],
    version: 2
  },
  "flag-tw": {
    id: "flag-tw",
    name: "Taiwan Flag",
    keywords: [
      "tw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1fc",
        native: "🇹🇼"
      }
    ],
    version: 2
  },
  "flag-tz": {
    id: "flag-tz",
    name: "Tanzania Flag",
    keywords: [
      "tz",
      "united",
      "republic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1f9-1f1ff",
        native: "🇹🇿"
      }
    ],
    version: 2
  },
  "flag-ua": {
    id: "flag-ua",
    name: "Ukraine Flag",
    keywords: [
      "ua",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fa-1f1e6",
        native: "🇺🇦"
      }
    ],
    version: 2
  },
  "flag-ug": {
    id: "flag-ug",
    name: "Uganda Flag",
    keywords: [
      "ug",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fa-1f1ec",
        native: "🇺🇬"
      }
    ],
    version: 2
  },
  "flag-um": {
    id: "flag-um",
    name: "U.s. Outlying Islands Flag",
    keywords: [
      "um",
      "u",
      "s"
    ],
    skins: [
      {
        unified: "1f1fa-1f1f2",
        native: "🇺🇲"
      }
    ],
    version: 2
  },
  "flag-un": {
    id: "flag-un",
    name: "United Nations Flag",
    keywords: [
      "un",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fa-1f1f3",
        native: "🇺🇳"
      }
    ],
    version: 4
  },
  us: {
    id: "us",
    name: "United States Flag",
    keywords: [
      "us",
      "america",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fa-1f1f8",
        native: "🇺🇸"
      }
    ],
    version: 1
  },
  "flag-uy": {
    id: "flag-uy",
    name: "Uruguay Flag",
    keywords: [
      "uy",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fa-1f1fe",
        native: "🇺🇾"
      }
    ],
    version: 2
  },
  "flag-uz": {
    id: "flag-uz",
    name: "Uzbekistan Flag",
    keywords: [
      "uz",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fa-1f1ff",
        native: "🇺🇿"
      }
    ],
    version: 2
  },
  "flag-va": {
    id: "flag-va",
    name: "Vatican City Flag",
    keywords: [
      "va",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fb-1f1e6",
        native: "🇻🇦"
      }
    ],
    version: 2
  },
  "flag-vc": {
    id: "flag-vc",
    name: "St. Vincent & Grenadines Flag",
    keywords: [
      "vc",
      "st",
      "saint",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fb-1f1e8",
        native: "🇻🇨"
      }
    ],
    version: 2
  },
  "flag-ve": {
    id: "flag-ve",
    name: "Venezuela Flag",
    keywords: [
      "ve",
      "bolivarian",
      "republic",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fb-1f1ea",
        native: "🇻🇪"
      }
    ],
    version: 2
  },
  "flag-vg": {
    id: "flag-vg",
    name: "British Virgin Islands Flag",
    keywords: [
      "vg",
      "bvi",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fb-1f1ec",
        native: "🇻🇬"
      }
    ],
    version: 2
  },
  "flag-vi": {
    id: "flag-vi",
    name: "U.s. Virgin Islands Flag",
    keywords: [
      "vi",
      "u",
      "s",
      "us",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fb-1f1ee",
        native: "🇻🇮"
      }
    ],
    version: 2
  },
  "flag-vn": {
    id: "flag-vn",
    name: "Vietnam Flag",
    keywords: [
      "vn",
      "viet",
      "nam",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fb-1f1f3",
        native: "🇻🇳"
      }
    ],
    version: 2
  },
  "flag-vu": {
    id: "flag-vu",
    name: "Vanuatu Flag",
    keywords: [
      "vu",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fb-1f1fa",
        native: "🇻🇺"
      }
    ],
    version: 2
  },
  "flag-wf": {
    id: "flag-wf",
    name: "Wallis & Futuna Flag",
    keywords: [
      "wf",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fc-1f1eb",
        native: "🇼🇫"
      }
    ],
    version: 2
  },
  "flag-ws": {
    id: "flag-ws",
    name: "Samoa Flag",
    keywords: [
      "ws",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fc-1f1f8",
        native: "🇼🇸"
      }
    ],
    version: 2
  },
  "flag-xk": {
    id: "flag-xk",
    name: "Kosovo Flag",
    keywords: [
      "xk",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fd-1f1f0",
        native: "🇽🇰"
      }
    ],
    version: 2
  },
  "flag-ye": {
    id: "flag-ye",
    name: "Yemen Flag",
    keywords: [
      "ye",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fe-1f1ea",
        native: "🇾🇪"
      }
    ],
    version: 2
  },
  "flag-yt": {
    id: "flag-yt",
    name: "Mayotte Flag",
    keywords: [
      "yt",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1fe-1f1f9",
        native: "🇾🇹"
      }
    ],
    version: 2
  },
  "flag-za": {
    id: "flag-za",
    name: "South Africa Flag",
    keywords: [
      "za",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ff-1f1e6",
        native: "🇿🇦"
      }
    ],
    version: 2
  },
  "flag-zm": {
    id: "flag-zm",
    name: "Zambia Flag",
    keywords: [
      "zm",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ff-1f1f2",
        native: "🇿🇲"
      }
    ],
    version: 2
  },
  "flag-zw": {
    id: "flag-zw",
    name: "Zimbabwe Flag",
    keywords: [
      "zw",
      "nation",
      "country",
      "banner"
    ],
    skins: [
      {
        unified: "1f1ff-1f1fc",
        native: "🇿🇼"
      }
    ],
    version: 2
  },
  "flag-england": {
    id: "flag-england",
    name: "England Flag",
    keywords: [
      "english"
    ],
    skins: [
      {
        unified: "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
        native: "🏴󠁧󠁢󠁥󠁮󠁧󠁿"
      }
    ],
    version: 5
  },
  "flag-scotland": {
    id: "flag-scotland",
    name: "Scotland Flag",
    keywords: [
      "scottish"
    ],
    skins: [
      {
        unified: "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
        native: "🏴󠁧󠁢󠁳󠁣󠁴󠁿"
      }
    ],
    version: 5
  },
  "flag-wales": {
    id: "flag-wales",
    name: "Wales Flag",
    keywords: [
      "welsh"
    ],
    skins: [
      {
        unified: "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",
        native: "🏴󠁧󠁢󠁷󠁬󠁳󠁿"
      }
    ],
    version: 5
  }
}, ECe = {
  satisfied: "laughing",
  grinning_face_with_star_eyes: "star-struck",
  grinning_face_with_one_large_and_one_small_eye: "zany_face",
  smiling_face_with_smiling_eyes_and_hand_covering_mouth: "face_with_hand_over_mouth",
  face_with_finger_covering_closed_lips: "shushing_face",
  face_with_one_eyebrow_raised: "face_with_raised_eyebrow",
  face_with_open_mouth_vomiting: "face_vomiting",
  shocked_face_with_exploding_head: "exploding_head",
  serious_face_with_symbols_covering_mouth: "face_with_symbols_on_mouth",
  poop: "hankey",
  shit: "hankey",
  collision: "boom",
  raised_hand: "hand",
  hand_with_index_and_middle_fingers_crossed: "crossed_fingers",
  sign_of_the_horns: "the_horns",
  reversed_hand_with_middle_finger_extended: "middle_finger",
  thumbsup: "+1",
  thumbsdown: "-1",
  punch: "facepunch",
  mother_christmas: "mrs_claus",
  running: "runner",
  "man-with-bunny-ears-partying": "men-with-bunny-ears-partying",
  "woman-with-bunny-ears-partying": "women-with-bunny-ears-partying",
  women_holding_hands: "two_women_holding_hands",
  woman_and_man_holding_hands: "man_and_woman_holding_hands",
  couple: "man_and_woman_holding_hands",
  men_holding_hands: "two_men_holding_hands",
  paw_prints: "feet",
  flipper: "dolphin",
  honeybee: "bee",
  lady_beetle: "ladybug",
  cooking: "fried_egg",
  knife: "hocho",
  red_car: "car",
  sailboat: "boat",
  waxing_gibbous_moon: "moon",
  sun_small_cloud: "mostly_sunny",
  sun_behind_cloud: "barely_sunny",
  sun_behind_rain_cloud: "partly_sunny_rain",
  lightning_cloud: "lightning",
  tornado_cloud: "tornado",
  tshirt: "shirt",
  shoe: "mans_shoe",
  telephone: "phone",
  lantern: "izakaya_lantern",
  open_book: "book",
  envelope: "email",
  pencil: "memo",
  heavy_exclamation_mark: "exclamation",
  staff_of_aesculapius: "medical_symbol",
  "flag-cn": "cn",
  "flag-de": "de",
  "flag-es": "es",
  "flag-fr": "fr",
  uk: "gb",
  "flag-gb": "gb",
  "flag-it": "it",
  "flag-jp": "jp",
  "flag-kr": "kr",
  "flag-ru": "ru",
  "flag-us": "us"
}, TCe = {
  cols: 61,
  rows: 61
}, KU = {
  categories: SCe,
  emojis: CCe,
  aliases: ECe,
  sheet: TCe
};
function pi(t, e = {}) {
  window.plausible = window.plausible || function() {
    (window.plausible.q = window.plausible.q || []).push(arguments);
  }, window.plausible(t, { props: e }), window.posthog && window.posthog.capture(t, e);
}
function $Ce(t, { minLength: e = 1, maxLength: n = 75 }) {
  return $t(
    (i) => {
      const r = "[^" + t + "\\s]", o = new RegExp(
        "[" + t + "]((?:" + r + "){0," + n + "})$"
      ).exec(i);
      if (o !== null) {
        const a = o[1];
        if (a.length >= e)
          return {
            leadOffset: o.index,
            matchingString: a,
            replaceableString: o[0]
          };
      }
      return null;
    },
    [n, e, t]
  );
}
var dc = {}, $2 = {}, JU = j;
function MCe(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
let eZ = JU.createContext(null);
$2.LexicalComposerContext = eZ;
$2.createLexicalComposerContext = function(t, e) {
  let n = null;
  return t != null && (n = t[1]), { getTheme: function() {
    return e ?? (n != null ? n.getTheme() : null);
  } };
};
$2.useLexicalComposerContext = function() {
  let t = JU.useContext(eZ);
  return t == null && MCe(8), t;
};
const NCe = $2;
var Oe = NCe, ZE = Oe, Hi = N, zn = j, WD = lt, ACe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? zn.useLayoutEffect : zn.useEffect;
let DCe = class {
  constructor(e) {
    this.key = e, this.ref = { current: null }, this.setRefElement = this.setRefElement.bind(this);
  }
  setRefElement(e) {
    this.ref = { current: e };
  }
}, HD = (t) => {
  const e = document.getElementById("typeahead-menu");
  if (e) {
    var n = e.getBoundingClientRect();
    n.top + n.height > window.innerHeight && e.scrollIntoView({ block: "center" }), 0 > n.top && e.scrollIntoView({ block: "center" }), t.scrollIntoView({ block: "nearest" });
  }
};
function PCe(t) {
  var e = Hi.$getSelection();
  if (!Hi.$isRangeSelection(e) || !e.isCollapsed()) return null;
  var n = e.anchor;
  if (n.type !== "text" || (e = n.getNode(), !e.isSimpleText())) return null;
  n = n.offset;
  let i = e.getTextContent().slice(0, n);
  var r = t.matchingString;
  t = t.replaceableString.length;
  for (let o = t; o <= r.length; o++) i.substr(-o) === r.substr(0, o) && (t = o);
  if (t = n - t, 0 > t) return null;
  let s;
  return t === 0 ? [s] = e.splitText(n) : [, s] = e.splitText(t, n), s;
}
function ICe(t, e) {
  let n = getComputedStyle(t), i = n.position === "absolute";
  if (e = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/, n.position === "fixed") return document.body;
  for (; t = t.parentElement; ) if (n = getComputedStyle(t), (!i || n.position !== "static") && e.test(n.overflow + n.overflowY + n.overflowX)) return t;
  return document.body;
}
function QD(t, e) {
  return t = t.getBoundingClientRect(), e = e.getBoundingClientRect(), t.top > e.top && t.top < e.bottom;
}
function tZ(t, e, n, i) {
  let [r] = ZE.useLexicalComposerContext();
  zn.useEffect(() => {
    if (e != null && t != null) {
      let s = r.getRootElement(), o = s != null ? ICe(s, !1) : document.body, a = !1, l = QD(e, o), u = function() {
        a || (window.requestAnimationFrame(function() {
          n(), a = !1;
        }), a = !0);
        const d = QD(e, o);
        d !== l && (l = d, i != null && i(d));
      }, f = new ResizeObserver(n);
      return window.addEventListener("resize", n), document.addEventListener("scroll", u, { capture: !0, passive: !0 }), f.observe(e), () => {
        f.unobserve(e), window.removeEventListener("resize", n), document.removeEventListener(
          "scroll",
          u,
          !0
        );
      };
    }
  }, [e, r, i, n, t]);
}
let UD = Hi.createCommand("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");
function LCe({ close: t, editor: e, anchorElementRef: n, resolution: i, options: r, menuRenderFn: s, onSelectOption: o, shouldSplitNodeWithQuery: a = !1, commandPriority: l = Hi.COMMAND_PRIORITY_LOW }) {
  let [u, f] = zn.useState(null);
  zn.useEffect(() => {
    f(0);
  }, [i.match && i.match.matchingString]);
  let d = zn.useCallback((g) => {
    e.update(() => {
      const w = i.match != null && a ? PCe(i.match) : null;
      o(g, w, t, i.match ? i.match.matchingString : "");
    });
  }, [e, a, i.match, o, t]), h = zn.useCallback((g) => {
    const w = e.getRootElement();
    w !== null && (w.setAttribute(
      "aria-activedescendant",
      "typeahead-item-" + g
    ), f(g));
  }, [e]);
  zn.useEffect(() => () => {
    let g = e.getRootElement();
    g !== null && g.removeAttribute("aria-activedescendant");
  }, [e]), ACe(() => {
    r === null ? f(null) : u === null && h(0);
  }, [r, u, h]), zn.useEffect(() => WD.mergeRegister(e.registerCommand(UD, ({ option: g }) => g.ref && g.ref.current != null ? (HD(g.ref.current), !0) : !1, l)), [e, h, l]), zn.useEffect(() => WD.mergeRegister(e.registerCommand(Hi.KEY_ARROW_DOWN_COMMAND, (g) => {
    if (r !== null && r.length && u !== null) {
      let w = u !== r.length - 1 ? u + 1 : 0;
      h(w);
      let x = r[w];
      x.ref != null && x.ref.current && e.dispatchCommand(UD, { index: w, option: x }), g.preventDefault(), g.stopImmediatePropagation();
    }
    return !0;
  }, l), e.registerCommand(Hi.KEY_ARROW_UP_COMMAND, (g) => {
    if (r !== null && r.length && u !== null) {
      var w = u !== 0 ? u - 1 : r.length - 1;
      h(w), w = r[w], w.ref != null && w.ref.current && HD(w.ref.current), g.preventDefault(), g.stopImmediatePropagation();
    }
    return !0;
  }, l), e.registerCommand(Hi.KEY_ESCAPE_COMMAND, (g) => (g.preventDefault(), g.stopImmediatePropagation(), t(), !0), l), e.registerCommand(Hi.KEY_TAB_COMMAND, (g) => r === null || u === null || r[u] == null ? !1 : (g.preventDefault(), g.stopImmediatePropagation(), d(r[u]), !0), l), e.registerCommand(Hi.KEY_ENTER_COMMAND, (g) => r === null || u === null || r[u] == null ? !1 : (g !== null && (g.preventDefault(), g.stopImmediatePropagation()), d(r[u]), !0), l)), [d, t, e, r, u, h, l]);
  let m = zn.useMemo(() => ({ options: r, selectOptionAndCleanUp: d, selectedIndex: u, setHighlightedIndex: f }), [d, u, r]);
  return s(n, m, i.match ? i.match.matchingString : "");
}
function RCe(t, e, n, i = document.body) {
  let [r] = ZE.useLexicalComposerContext(), s = zn.useRef(document.createElement("div")), o = zn.useCallback(
    () => {
      s.current.style.top = s.current.style.bottom;
      const l = r.getRootElement(), u = s.current;
      var f = u.firstChild;
      if (l !== null && t !== null) {
        const { left: h, top: m, width: g, height: w } = t.getRect();
        if (u.style.top = `${m + window.pageYOffset + s.current.offsetHeight + 3}px`, u.style.left = `${h + window.pageXOffset}px`, u.style.height = `${w}px`, u.style.width = `${g}px`, f !== null) {
          f.style.top = `${m}`;
          var d = f.getBoundingClientRect();
          f = d.height, d = d.width;
          const x = l.getBoundingClientRect();
          h + d > x.right && (u.style.left = `${x.right - d + window.pageXOffset}px`), (m + f > window.innerHeight || m + f > x.bottom) && m - x.top > f && (u.style.top = `${m - f + window.pageYOffset - w}px`);
        }
        u.isConnected || (n != null && (u.className = n), u.setAttribute("aria-label", "Typeahead menu"), u.setAttribute("id", "typeahead-menu"), u.setAttribute("role", "listbox"), u.style.display = "block", u.style.position = "absolute", i.append(u)), s.current = u, l.setAttribute("aria-controls", "typeahead-menu");
      }
    },
    [r, t, n, i]
  );
  zn.useEffect(() => {
    let l = r.getRootElement();
    if (t !== null) return o(), () => {
      l !== null && l.removeAttribute("aria-controls");
      let u = s.current;
      u !== null && u.isConnected && u.remove();
    };
  }, [r, o, t]);
  let a = zn.useCallback((l) => {
    t !== null && (l || e(null));
  }, [t, e]);
  return tZ(t, s.current, o, a), s;
}
function jCe(t, e, n) {
  var i = n.getSelection();
  if (i === null || !i.isCollapsed || (n = i.anchorNode, i = i.anchorOffset, n == null || i == null)) return !1;
  try {
    e.setStart(n, t), e.setEnd(n, i);
  } catch {
    return !1;
  }
  return !0;
}
function FCe(t) {
  let e = null;
  return t.getEditorState().read(() => {
    var n = Hi.$getSelection();
    if (Hi.$isRangeSelection(n)) {
      var i = n.anchor;
      i.type !== "text" ? e = null : (n = i.getNode(), n.isSimpleText() ? (i = i.offset, e = n.getTextContent().slice(0, i)) : e = null);
    }
  }), e;
}
function BCe(t, e) {
  return e !== 0 ? !1 : t.getEditorState().read(() => {
    var n = Hi.$getSelection();
    return Hi.$isRangeSelection(n) ? (n = n.anchor.getNode().getPreviousSibling(), Hi.$isTextNode(n) && n.isTextEntity()) : !1;
  });
}
function zCe(t) {
  zn.startTransition ? zn.startTransition(t) : t();
}
let WCe = Hi.createCommand("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");
dc.LexicalTypeaheadMenuPlugin = function({ options: t, onQueryChange: e, onSelectOption: n, onOpen: i, onClose: r, menuRenderFn: s, triggerFn: o, anchorClassName: a, commandPriority: l = Hi.COMMAND_PRIORITY_LOW, parent: u }) {
  let [f] = ZE.useLexicalComposerContext(), [d, h] = zn.useState(null);
  a = RCe(d, h, a, u);
  let m = zn.useCallback(() => {
    h(null), r != null && d !== null && r();
  }, [r, d]), g = zn.useCallback((w) => {
    h(w), i != null && d === null && i(w);
  }, [i, d]);
  return zn.useEffect(() => {
    let w = f.registerUpdateListener(() => {
      f.getEditorState().read(() => {
        const x = f._window || window, _ = x.document.createRange(), S = Hi.$getSelection(), C = FCe(f);
        if (Hi.$isRangeSelection(S) && S.isCollapsed() && C !== null && _ !== null) {
          var E = o(C, f);
          e(E ? E.matchingString : null), E === null || BCe(f, E.leadOffset) || jCe(E.leadOffset, _, x) === null ? m() : zCe(() => g({ getRect: () => _.getBoundingClientRect(), match: E }));
        } else m();
      });
    });
    return () => {
      w();
    };
  }, [f, o, e, d, m, g]), d === null || f === null ? null : zn.createElement(LCe, { close: m, resolution: d, editor: f, anchorElementRef: a, options: t, menuRenderFn: s, shouldSplitNodeWithQuery: !0, onSelectOption: n, commandPriority: l });
};
dc.MenuOption = DCe;
dc.PUNCTUATION = `\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;
dc.SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND = WCe;
dc.getScrollParent = function(t, e) {
  let n = getComputedStyle(t), i = n.position === "absolute";
  if (e = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/, n.position === "fixed") return document.body;
  for (; t = t.parentElement; ) if (n = getComputedStyle(t), (!i || n.position !== "static") && e.test(n.overflow + n.overflowY + n.overflowX)) return t;
  return document.body;
};
dc.useBasicTypeaheadTriggerMatch = function(t, { minLength: e = 1, maxLength: n = 75 }) {
  return zn.useCallback((i) => {
    if (i = new RegExp("(^|\\s|\\()([" + t + "]((?:[^" + (t + `\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;\\s]){0,`) + n + "}))$").exec(i), i !== null) {
      let r = i[1], s = i[3];
      if (s.length >= e) return { leadOffset: i.index + r.length, matchingString: s, replaceableString: i[2] };
    }
    return null;
  }, [n, e, t]);
};
dc.useDynamicPositioning = tZ;
const HCe = dc;
var QCe = HCe;
function nZ(t) {
  return t && t.__esModule ? t.default : t;
}
function Js(t, e, n) {
  return e in t ? Object.defineProperty(t, e, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[e] = n, t;
}
var M2, ut, iZ, Ng, rZ, ZD, Ww = {}, sZ = [], UCe = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
function Eu(t, e) {
  for (var n in e) t[n] = e[n];
  return t;
}
function oZ(t) {
  var e = t.parentNode;
  e && e.removeChild(t);
}
function $C(t, e, n) {
  var i, r, s, o = {};
  for (s in e) s == "key" ? i = e[s] : s == "ref" ? r = e[s] : o[s] = e[s];
  if (arguments.length > 2 && (o.children = arguments.length > 3 ? M2.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (s in t.defaultProps) o[s] === void 0 && (o[s] = t.defaultProps[s]);
  return vy(t, o, i, r, null);
}
function vy(t, e, n, i, r) {
  var s = {
    type: t,
    props: e,
    key: n,
    ref: i,
    __k: null,
    __: null,
    __b: 0,
    __e: null,
    __d: void 0,
    __c: null,
    __h: null,
    constructor: void 0,
    __v: r ?? ++iZ
  };
  return r == null && ut.vnode != null && ut.vnode(s), s;
}
function rl() {
  return {
    current: null
  };
}
function Ih(t) {
  return t.children;
}
function Ca(t, e) {
  this.props = t, this.context = e;
}
function Lh(t, e) {
  if (e == null) return t.__ ? Lh(t.__, t.__.__k.indexOf(t) + 1) : null;
  for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
  return typeof t.type == "function" ? Lh(t) : null;
}
function aZ(t) {
  var e, n;
  if ((t = t.__) != null && t.__c != null) {
    for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
      t.__e = t.__c.base = n.__e;
      break;
    }
    return aZ(t);
  }
}
function qD(t) {
  (!t.__d && (t.__d = !0) && Ng.push(t) && !Hw.__r++ || ZD !== ut.debounceRendering) && ((ZD = ut.debounceRendering) || rZ)(Hw);
}
function Hw() {
  for (var t; Hw.__r = Ng.length; ) t = Ng.sort(function(e, n) {
    return e.__v.__b - n.__v.__b;
  }), Ng = [], t.some(function(e) {
    var n, i, r, s, o, a;
    e.__d && (o = (s = (n = e).__v).__e, (a = n.__P) && (i = [], (r = Eu({}, s)).__v = s.__v + 1, qE(a, s, r, n.__n, a.ownerSVGElement !== void 0, s.__h != null ? [
      o
    ] : null, i, o ?? Lh(s), s.__h), fZ(i, s), s.__e != o && aZ(s)));
  });
}
function lZ(t, e, n, i, r, s, o, a, l, u) {
  var f, d, h, m, g, w, x, _ = i && i.__k || sZ, S = _.length;
  for (n.__k = [], f = 0; f < e.length; f++) if ((m = n.__k[f] = (m = e[f]) == null || typeof m == "boolean" ? null : typeof m == "string" || typeof m == "number" || typeof m == "bigint" ? vy(null, m, null, null, m) : Array.isArray(m) ? vy(Ih, {
    children: m
  }, null, null, null) : m.__b > 0 ? vy(m.type, m.props, m.key, null, m.__v) : m) != null) {
    if (m.__ = n, m.__b = n.__b + 1, (h = _[f]) === null || h && m.key == h.key && m.type === h.type) _[f] = void 0;
    else for (d = 0; d < S; d++) {
      if ((h = _[d]) && m.key == h.key && m.type === h.type) {
        _[d] = void 0;
        break;
      }
      h = null;
    }
    qE(t, m, h = h || Ww, r, s, o, a, l, u), g = m.__e, (d = m.ref) && h.ref != d && (x || (x = []), h.ref && x.push(h.ref, null, m), x.push(d, m.__c || g, m)), g != null ? (w == null && (w = g), typeof m.type == "function" && m.__k === h.__k ? m.__d = l = uZ(m, l, t) : l = cZ(t, m, h, _, g, l), typeof n.type == "function" && (n.__d = l)) : l && h.__e == l && l.parentNode != t && (l = Lh(h));
  }
  for (n.__e = w, f = S; f--; ) _[f] != null && (typeof n.type == "function" && _[f].__e != null && _[f].__e == n.__d && (n.__d = Lh(i, f + 1)), hZ(_[f], _[f]));
  if (x) for (f = 0; f < x.length; f++) dZ(x[f], x[++f], x[++f]);
}
function uZ(t, e, n) {
  for (var i, r = t.__k, s = 0; r && s < r.length; s++) (i = r[s]) && (i.__ = t, e = typeof i.type == "function" ? uZ(i, e, n) : cZ(n, i, i, r, i.__e, e));
  return e;
}
function Qw(t, e) {
  return e = e || [], t == null || typeof t == "boolean" || (Array.isArray(t) ? t.some(function(n) {
    Qw(n, e);
  }) : e.push(t)), e;
}
function cZ(t, e, n, i, r, s) {
  var o, a, l;
  if (e.__d !== void 0) o = e.__d, e.__d = void 0;
  else if (n == null || r != s || r.parentNode == null) e: if (s == null || s.parentNode !== t) t.appendChild(r), o = null;
  else {
    for (a = s, l = 0; (a = a.nextSibling) && l < i.length; l += 2) if (a == r) break e;
    t.insertBefore(r, s), o = s;
  }
  return o !== void 0 ? o : r.nextSibling;
}
function ZCe(t, e, n, i, r) {
  var s;
  for (s in n) s === "children" || s === "key" || s in e || Uw(t, s, null, n[s], i);
  for (s in e) r && typeof e[s] != "function" || s === "children" || s === "key" || s === "value" || s === "checked" || n[s] === e[s] || Uw(t, s, e[s], n[s], i);
}
function YD(t, e, n) {
  e[0] === "-" ? t.setProperty(e, n) : t[e] = n == null ? "" : typeof n != "number" || UCe.test(e) ? n : n + "px";
}
function Uw(t, e, n, i, r) {
  var s;
  e: if (e === "style")
    if (typeof n == "string") t.style.cssText = n;
    else {
      if (typeof i == "string" && (t.style.cssText = i = ""), i) for (e in i) n && e in n || YD(t.style, e, "");
      if (n) for (e in n) i && n[e] === i[e] || YD(t.style, e, n[e]);
    }
  else if (e[0] === "o" && e[1] === "n") s = e !== (e = e.replace(/Capture$/, "")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = n, n ? i || t.addEventListener(e, s ? XD : VD, s) : t.removeEventListener(e, s ? XD : VD, s);
  else if (e !== "dangerouslySetInnerHTML") {
    if (r) e = e.replace(/xlink[H:h]/, "h").replace(/sName$/, "s");
    else if (e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e in t) try {
      t[e] = n ?? "";
      break e;
    } catch {
    }
    typeof n == "function" || (n != null && (n !== !1 || e[0] === "a" && e[1] === "r") ? t.setAttribute(e, n) : t.removeAttribute(e));
  }
}
function VD(t) {
  this.l[t.type + !1](ut.event ? ut.event(t) : t);
}
function XD(t) {
  this.l[t.type + !0](ut.event ? ut.event(t) : t);
}
function qE(t, e, n, i, r, s, o, a, l) {
  var u, f, d, h, m, g, w, x, _, S, C, E = e.type;
  if (e.constructor !== void 0) return null;
  n.__h != null && (l = n.__h, a = e.__e = n.__e, e.__h = null, s = [
    a
  ]), (u = ut.__b) && u(e);
  try {
    e: if (typeof E == "function") {
      if (x = e.props, _ = (u = E.contextType) && i[u.__c], S = u ? _ ? _.props.value : u.__ : i, n.__c ? w = (f = e.__c = n.__c).__ = f.__E : ("prototype" in E && E.prototype.render ? e.__c = f = new E(x, S) : (e.__c = f = new Ca(x, S), f.constructor = E, f.render = YCe), _ && _.sub(f), f.props = x, f.state || (f.state = {}), f.context = S, f.__n = i, d = f.__d = !0, f.__h = []), f.__s == null && (f.__s = f.state), E.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = Eu({}, f.__s)), Eu(f.__s, E.getDerivedStateFromProps(x, f.__s))), h = f.props, m = f.state, d) E.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), f.componentDidMount != null && f.__h.push(f.componentDidMount);
      else {
        if (E.getDerivedStateFromProps == null && x !== h && f.componentWillReceiveProps != null && f.componentWillReceiveProps(x, S), !f.__e && f.shouldComponentUpdate != null && f.shouldComponentUpdate(x, f.__s, S) === !1 || e.__v === n.__v) {
          f.props = x, f.state = f.__s, e.__v !== n.__v && (f.__d = !1), f.__v = e, e.__e = n.__e, e.__k = n.__k, e.__k.forEach(function(M) {
            M && (M.__ = e);
          }), f.__h.length && o.push(f);
          break e;
        }
        f.componentWillUpdate != null && f.componentWillUpdate(x, f.__s, S), f.componentDidUpdate != null && f.__h.push(function() {
          f.componentDidUpdate(h, m, g);
        });
      }
      f.context = S, f.props = x, f.state = f.__s, (u = ut.__r) && u(e), f.__d = !1, f.__v = e, f.__P = t, u = f.render(f.props, f.state, f.context), f.state = f.__s, f.getChildContext != null && (i = Eu(Eu({}, i), f.getChildContext())), d || f.getSnapshotBeforeUpdate == null || (g = f.getSnapshotBeforeUpdate(h, m)), C = u != null && u.type === Ih && u.key == null ? u.props.children : u, lZ(t, Array.isArray(C) ? C : [
        C
      ], e, n, i, r, s, o, a, l), f.base = e.__e, e.__h = null, f.__h.length && o.push(f), w && (f.__E = f.__ = null), f.__e = !1;
    } else s == null && e.__v === n.__v ? (e.__k = n.__k, e.__e = n.__e) : e.__e = qCe(n.__e, e, n, i, r, s, o, l);
    (u = ut.diffed) && u(e);
  } catch (M) {
    e.__v = null, (l || s != null) && (e.__e = a, e.__h = !!l, s[s.indexOf(a)] = null), ut.__e(M, e, n);
  }
}
function fZ(t, e) {
  ut.__c && ut.__c(e, t), t.some(function(n) {
    try {
      t = n.__h, n.__h = [], t.some(function(i) {
        i.call(n);
      });
    } catch (i) {
      ut.__e(i, n.__v);
    }
  });
}
function qCe(t, e, n, i, r, s, o, a) {
  var l, u, f, d = n.props, h = e.props, m = e.type, g = 0;
  if (m === "svg" && (r = !0), s != null) {
    for (; g < s.length; g++) if ((l = s[g]) && "setAttribute" in l == !!m && (m ? l.localName === m : l.nodeType === 3)) {
      t = l, s[g] = null;
      break;
    }
  }
  if (t == null) {
    if (m === null) return document.createTextNode(h);
    t = r ? document.createElementNS("http://www.w3.org/2000/svg", m) : document.createElement(m, h.is && h), s = null, a = !1;
  }
  if (m === null) d === h || a && t.data === h || (t.data = h);
  else {
    if (s = s && M2.call(t.childNodes), u = (d = n.props || Ww).dangerouslySetInnerHTML, f = h.dangerouslySetInnerHTML, !a) {
      if (s != null) for (d = {}, g = 0; g < t.attributes.length; g++) d[t.attributes[g].name] = t.attributes[g].value;
      (f || u) && (f && (u && f.__html == u.__html || f.__html === t.innerHTML) || (t.innerHTML = f && f.__html || ""));
    }
    if (ZCe(t, h, d, r, a), f) e.__k = [];
    else if (g = e.props.children, lZ(t, Array.isArray(g) ? g : [
      g
    ], e, n, i, r && m !== "foreignObject", s, o, s ? s[0] : n.__k && Lh(n, 0), a), s != null) for (g = s.length; g--; ) s[g] != null && oZ(s[g]);
    a || ("value" in h && (g = h.value) !== void 0 && (g !== d.value || g !== t.value || m === "progress" && !g) && Uw(t, "value", g, d.value, !1), "checked" in h && (g = h.checked) !== void 0 && g !== t.checked && Uw(t, "checked", g, d.checked, !1));
  }
  return t;
}
function dZ(t, e, n) {
  try {
    typeof t == "function" ? t(e) : t.current = e;
  } catch (i) {
    ut.__e(i, n);
  }
}
function hZ(t, e, n) {
  var i, r;
  if (ut.unmount && ut.unmount(t), (i = t.ref) && (i.current && i.current !== t.__e || dZ(i, null, e)), (i = t.__c) != null) {
    if (i.componentWillUnmount) try {
      i.componentWillUnmount();
    } catch (s) {
      ut.__e(s, e);
    }
    i.base = i.__P = null;
  }
  if (i = t.__k) for (r = 0; r < i.length; r++) i[r] && hZ(i[r], e, typeof t.type != "function");
  n || t.__e == null || oZ(t.__e), t.__e = t.__d = void 0;
}
function YCe(t, e, n) {
  return this.constructor(t, n);
}
function pZ(t, e, n) {
  var i, r, s;
  ut.__ && ut.__(t, e), r = (i = typeof n == "function") ? null : n && n.__k || e.__k, s = [], qE(e, t = (!i && n || e).__k = $C(Ih, null, [
    t
  ]), r || Ww, Ww, e.ownerSVGElement !== void 0, !i && n ? [
    n
  ] : r ? null : e.firstChild ? M2.call(e.childNodes) : null, s, !i && n ? n : r ? r.__e : e.firstChild, i), fZ(s, t);
}
M2 = sZ.slice, ut = {
  __e: function(t, e) {
    for (var n, i, r; e = e.__; ) if ((n = e.__c) && !n.__) try {
      if ((i = n.constructor) && i.getDerivedStateFromError != null && (n.setState(i.getDerivedStateFromError(t)), r = n.__d), n.componentDidCatch != null && (n.componentDidCatch(t), r = n.__d), r) return n.__E = n;
    } catch (s) {
      t = s;
    }
    throw t;
  }
}, iZ = 0, Ca.prototype.setState = function(t, e) {
  var n;
  n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = Eu({}, this.state), typeof t == "function" && (t = t(Eu({}, n), this.props)), t && Eu(n, t), t != null && this.__v && (e && this.__h.push(e), qD(this));
}, Ca.prototype.forceUpdate = function(t) {
  this.__v && (this.__e = !0, t && this.__h.push(t), qD(this));
}, Ca.prototype.render = Ih, Ng = [], rZ = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Hw.__r = 0;
var VCe = 0;
function ve(t, e, n, i, r) {
  var s, o, a = {};
  for (o in e) o == "ref" ? s = e[o] : a[o] = e[o];
  var l = {
    type: t,
    props: a,
    key: n,
    ref: s,
    __k: null,
    __: null,
    __b: 0,
    __e: null,
    __d: void 0,
    __c: null,
    __h: null,
    constructor: void 0,
    __v: --VCe,
    __source: i,
    __self: r
  };
  if (typeof t == "function" && (s = t.defaultProps)) for (o in s) a[o] === void 0 && (a[o] = s[o]);
  return ut.vnode && ut.vnode(l), l;
}
function XCe(t, e) {
  try {
    window.localStorage[`emoji-mart.${t}`] = JSON.stringify(e);
  } catch {
  }
}
function GCe(t) {
  try {
    const e = window.localStorage[`emoji-mart.${t}`];
    if (e) return JSON.parse(e);
  } catch {
  }
}
var Ru = {
  set: XCe,
  get: GCe
};
const gO = /* @__PURE__ */ new Map(), KCe = [
  {
    v: 15,
    emoji: "🫨"
  },
  {
    v: 14,
    emoji: "🫠"
  },
  {
    v: 13.1,
    emoji: "😶‍🌫️"
  },
  {
    v: 13,
    emoji: "🥸"
  },
  {
    v: 12.1,
    emoji: "🧑‍🦰"
  },
  {
    v: 12,
    emoji: "🥱"
  },
  {
    v: 11,
    emoji: "🥰"
  },
  {
    v: 5,
    emoji: "🤩"
  },
  {
    v: 4,
    emoji: "👱‍♀️"
  },
  {
    v: 3,
    emoji: "🤣"
  },
  {
    v: 2,
    emoji: "👋🏻"
  },
  {
    v: 1,
    emoji: "🙃"
  }
];
function JCe() {
  for (const { v: t, emoji: e } of KCe)
    if (mZ(e)) return t;
}
function e6e() {
  return !mZ("🇨🇦");
}
function mZ(t) {
  if (gO.has(t)) return gO.get(t);
  const e = t6e(t);
  return gO.set(t, e), e;
}
const t6e = (() => {
  let t = null;
  try {
    navigator.userAgent.includes("jsdom") || (t = document.createElement("canvas").getContext("2d", {
      willReadFrequently: !0
    }));
  } catch {
  }
  if (!t) return () => !1;
  const e = 25, n = 20, i = Math.floor(e / 2);
  return t.font = i + "px Arial, Sans-Serif", t.textBaseline = "top", t.canvas.width = n * 2, t.canvas.height = e, (r) => {
    t.clearRect(0, 0, n * 2, e), t.fillStyle = "#FF0000", t.fillText(r, 0, 22), t.fillStyle = "#0000FF", t.fillText(r, n, 22);
    const s = t.getImageData(0, 0, n, e).data, o = s.length;
    let a = 0;
    for (; a < o && !s[a + 3]; a += 4) ;
    if (a >= o) return !1;
    const l = n + a / 4 % n, u = Math.floor(a / 4 / n), f = t.getImageData(l, u, 1, 1).data;
    return !(s[a] !== f[0] || s[a + 2] !== f[2] || t.measureText(r).width >= n);
  };
})();
var GD = {
  latestVersion: JCe,
  noCountryFlags: e6e
};
const MC = [
  "+1",
  "grinning",
  "kissing_heart",
  "heart_eyes",
  "laughing",
  "stuck_out_tongue_winking_eye",
  "sweat_smile",
  "joy",
  "scream",
  "disappointed",
  "unamused",
  "weary",
  "sob",
  "sunglasses",
  "heart"
];
let nr = null;
function n6e(t) {
  nr || (nr = Ru.get("frequently") || {});
  const e = t.id || t;
  e && (nr[e] || (nr[e] = 0), nr[e] += 1, Ru.set("last", e), Ru.set("frequently", nr));
}
function i6e({ maxFrequentRows: t, perLine: e }) {
  if (!t) return [];
  nr || (nr = Ru.get("frequently"));
  let n = [];
  if (!nr) {
    nr = {};
    for (let s in MC.slice(0, e)) {
      const o = MC[s];
      nr[o] = e - s, n.push(o);
    }
    return n;
  }
  const i = t * e, r = Ru.get("last");
  for (let s in nr) n.push(s);
  if (n.sort((s, o) => {
    const a = nr[o], l = nr[s];
    return a == l ? s.localeCompare(o) : a - l;
  }), n.length > i) {
    const s = n.slice(i);
    n = n.slice(0, i);
    for (let o of s)
      o != r && delete nr[o];
    r && n.indexOf(r) == -1 && (delete nr[n[n.length - 1]], n.splice(-1, 1, r)), Ru.set("frequently", nr);
  }
  return n;
}
var gZ = {
  add: n6e,
  get: i6e,
  DEFAULTS: MC
}, vZ = {};
vZ = JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');
var pl = {
  autoFocus: {
    value: !1
  },
  dynamicWidth: {
    value: !1
  },
  emojiButtonColors: {
    value: null
  },
  emojiButtonRadius: {
    value: "100%"
  },
  emojiButtonSize: {
    value: 36
  },
  emojiSize: {
    value: 24
  },
  emojiVersion: {
    value: 15,
    choices: [
      1,
      2,
      3,
      4,
      5,
      11,
      12,
      12.1,
      13,
      13.1,
      14,
      15
    ]
  },
  exceptEmojis: {
    value: []
  },
  icons: {
    value: "auto",
    choices: [
      "auto",
      "outline",
      "solid"
    ]
  },
  locale: {
    value: "en",
    choices: [
      "en",
      "ar",
      "be",
      "cs",
      "de",
      "es",
      "fa",
      "fi",
      "fr",
      "hi",
      "it",
      "ja",
      "ko",
      "nl",
      "pl",
      "pt",
      "ru",
      "sa",
      "tr",
      "uk",
      "vi",
      "zh"
    ]
  },
  maxFrequentRows: {
    value: 4
  },
  navPosition: {
    value: "top",
    choices: [
      "top",
      "bottom",
      "none"
    ]
  },
  noCountryFlags: {
    value: !1
  },
  noResultsEmoji: {
    value: null
  },
  perLine: {
    value: 9
  },
  previewEmoji: {
    value: null
  },
  previewPosition: {
    value: "bottom",
    choices: [
      "top",
      "bottom",
      "none"
    ]
  },
  searchPosition: {
    value: "sticky",
    choices: [
      "sticky",
      "static",
      "none"
    ]
  },
  set: {
    value: "native",
    choices: [
      "native",
      "apple",
      "facebook",
      "google",
      "twitter"
    ]
  },
  skin: {
    value: 1,
    choices: [
      1,
      2,
      3,
      4,
      5,
      6
    ]
  },
  skinTonePosition: {
    value: "preview",
    choices: [
      "preview",
      "search",
      "none"
    ]
  },
  theme: {
    value: "auto",
    choices: [
      "auto",
      "light",
      "dark"
    ]
  },
  // Data
  categories: null,
  categoryIcons: null,
  custom: null,
  data: null,
  i18n: null,
  // Callbacks
  getImageURL: null,
  getSpritesheetURL: null,
  onAddCustomEmoji: null,
  onClickOutside: null,
  onEmojiSelect: null,
  // Deprecated
  stickySearch: {
    deprecated: !0,
    value: !0
  }
};
let kr = null, jt = null;
const vO = {};
async function KD(t) {
  if (vO[t]) return vO[t];
  const n = await (await fetch(t)).json();
  return vO[t] = n, n;
}
let bO = null, bZ = null, yZ = !1;
function U1(t, { caller: e } = {}) {
  return bO || (bO = new Promise((n) => {
    bZ = n;
  })), t ? r6e(t) : e && !yZ && console.warn(`\`${e}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`), bO;
}
async function r6e(t) {
  yZ = !0;
  let { emojiVersion: e, set: n, locale: i } = t;
  if (e || (e = pl.emojiVersion.value), n || (n = pl.set.value), i || (i = pl.locale.value), jt)
    jt.categories = jt.categories.filter((l) => !l.name);
  else {
    jt = (typeof t.data == "function" ? await t.data() : t.data) || await KD(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${e}/${n}.json`), jt.emoticons = {}, jt.natives = {}, jt.categories.unshift({
      id: "frequent",
      emojis: []
    });
    for (const l in jt.aliases) {
      const u = jt.aliases[l], f = jt.emojis[u];
      f && (f.aliases || (f.aliases = []), f.aliases.push(l));
    }
    jt.originalCategories = jt.categories;
  }
  if (kr = (typeof t.i18n == "function" ? await t.i18n() : t.i18n) || (i == "en" ? /* @__PURE__ */ nZ(vZ) : await KD(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)), t.custom) for (let l in t.custom) {
    l = parseInt(l);
    const u = t.custom[l], f = t.custom[l - 1];
    if (!(!u.emojis || !u.emojis.length)) {
      u.id || (u.id = `custom_${l + 1}`), u.name || (u.name = kr.categories.custom), f && !u.icon && (u.target = f.target || f), jt.categories.push(u);
      for (const d of u.emojis) jt.emojis[d.id] = d;
    }
  }
  t.categories && (jt.categories = jt.originalCategories.filter((l) => t.categories.indexOf(l.id) != -1).sort((l, u) => {
    const f = t.categories.indexOf(l.id), d = t.categories.indexOf(u.id);
    return f - d;
  }));
  let r = null, s = null;
  n == "native" && (r = GD.latestVersion(), s = t.noCountryFlags || GD.noCountryFlags());
  let o = jt.categories.length, a = !1;
  for (; o--; ) {
    const l = jt.categories[o];
    if (l.id == "frequent") {
      let { maxFrequentRows: d, perLine: h } = t;
      d = d >= 0 ? d : pl.maxFrequentRows.value, h || (h = pl.perLine.value), l.emojis = gZ.get({
        maxFrequentRows: d,
        perLine: h
      });
    }
    if (!l.emojis || !l.emojis.length) {
      jt.categories.splice(o, 1);
      continue;
    }
    const { categoryIcons: u } = t;
    if (u) {
      const d = u[l.id];
      d && !l.icon && (l.icon = d);
    }
    let f = l.emojis.length;
    for (; f--; ) {
      const d = l.emojis[f], h = d.id ? d : jt.emojis[d], m = () => {
        l.emojis.splice(f, 1);
      };
      if (!h || t.exceptEmojis && t.exceptEmojis.includes(h.id)) {
        m();
        continue;
      }
      if (r && h.version > r) {
        m();
        continue;
      }
      if (s && l.id == "flags" && !u6e.includes(h.id)) {
        m();
        continue;
      }
      if (!h.search) {
        if (a = !0, h.search = "," + [
          [
            h.id,
            !1
          ],
          [
            h.name,
            !0
          ],
          [
            h.keywords,
            !1
          ],
          [
            h.emoticons,
            !1
          ]
        ].map(([w, x]) => {
          if (w)
            return (Array.isArray(w) ? w : [
              w
            ]).map((_) => (x ? _.split(/[-|_|\s]+/) : [
              _
            ]).map((S) => S.toLowerCase())).flat();
        }).flat().filter((w) => w && w.trim()).join(","), h.emoticons) for (const w of h.emoticons)
          jt.emoticons[w] || (jt.emoticons[w] = h.id);
        let g = 0;
        for (const w of h.skins) {
          if (!w) continue;
          g++;
          const { native: x } = w;
          x && (jt.natives[x] = h.id, h.search += `,${x}`);
          const _ = g == 1 ? "" : `:skin-tone-${g}:`;
          w.shortcodes = `:${h.id}:${_}`;
        }
      }
    }
  }
  a && Oa.reset(), bZ();
}
function wZ(t, e, n) {
  t || (t = {});
  const i = {};
  for (let r in e) i[r] = kZ(r, t, e, n);
  return i;
}
function kZ(t, e, n, i) {
  const r = n[t];
  let s = i && i.getAttribute(t) || (e[t] != null && e[t] != null ? e[t] : null);
  return r && (s != null && r.value && typeof r.value != typeof s && (typeof r.value == "boolean" ? s = s != "false" : s = r.value.constructor(s)), r.transform && s && (s = r.transform(s)), (s == null || r.choices && r.choices.indexOf(s) == -1) && (s = r.value)), s;
}
const s6e = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;
let NC = null;
function o6e(t) {
  return t.id ? t : jt.emojis[t] || jt.emojis[jt.aliases[t]] || jt.emojis[jt.natives[t]];
}
function a6e() {
  NC = null;
}
async function l6e(t, { maxResults: e, caller: n } = {}) {
  if (!t || !t.trim().length) return null;
  e || (e = 90), await U1(null, {
    caller: n || "SearchIndex.search"
  });
  const i = t.toLowerCase().replace(/(\w)-/, "$1 ").split(/[\s|,]+/).filter((a, l, u) => a.trim() && u.indexOf(a) == l);
  if (!i.length) return;
  let r = NC || (NC = Object.values(jt.emojis)), s, o;
  for (const a of i) {
    if (!r.length) break;
    s = [], o = {};
    for (const l of r) {
      if (!l.search) continue;
      const u = l.search.indexOf(`,${a}`);
      u != -1 && (s.push(l), o[l.id] || (o[l.id] = 0), o[l.id] += l.id == a ? 0 : u + 1);
    }
    r = s;
  }
  return s.length < 2 || (s.sort((a, l) => {
    const u = o[a.id], f = o[l.id];
    return u == f ? a.id.localeCompare(l.id) : u - f;
  }), s.length > e && (s = s.slice(0, e))), s;
}
var Oa = {
  search: l6e,
  get: o6e,
  reset: a6e,
  SHORTCODES_REGEX: s6e
};
const u6e = [
  "checkered_flag",
  "crossed_flags",
  "pirate_flag",
  "rainbow-flag",
  "transgender_flag",
  "triangular_flag_on_post",
  "waving_black_flag",
  "waving_white_flag"
];
function c6e(t, e) {
  return Array.isArray(t) && Array.isArray(e) && t.length === e.length && t.every((n, i) => n == e[i]);
}
async function f6e(t = 1) {
  for (let e in [
    ...Array(t).keys()
  ]) await new Promise(requestAnimationFrame);
}
function d6e(t, { skinIndex: e = 0 } = {}) {
  const n = t.skins[e] || (e = 0, t.skins[e]), i = {
    id: t.id,
    name: t.name,
    native: n.native,
    unified: n.unified,
    keywords: t.keywords,
    shortcodes: n.shortcodes || t.shortcodes
  };
  return t.skins.length > 1 && (i.skin = e + 1), n.src && (i.src = n.src), t.aliases && t.aliases.length && (i.aliases = t.aliases), t.emoticons && t.emoticons.length && (i.emoticons = t.emoticons), i;
}
const h6e = {
  activity: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ ve("path", {
        d: "M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"
      })
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"
      })
    })
  },
  custom: /* @__PURE__ */ ve("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 448 512",
    children: /* @__PURE__ */ ve("path", {
      d: "M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"
    })
  }),
  flags: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ ve("path", {
        d: "M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"
      })
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"
      })
    })
  },
  foods: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ ve("path", {
        d: "M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"
      })
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"
      })
    })
  },
  frequent: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ ve("path", {
          d: "M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"
        }),
        /* @__PURE__ */ ve("path", {
          d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"
        })
      ]
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"
      })
    })
  },
  nature: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ ve("path", {
          d: "M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"
        }),
        /* @__PURE__ */ ve("path", {
          d: "M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"
        })
      ]
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 576 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"
      })
    })
  },
  objects: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ ve("path", {
          d: "M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"
        }),
        /* @__PURE__ */ ve("path", {
          d: "M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"
        })
      ]
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 384 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"
      })
    })
  },
  people: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ ve("path", {
          d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"
        }),
        /* @__PURE__ */ ve("path", {
          d: "M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"
        })
      ]
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"
      })
    })
  },
  places: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ ve("path", {
          d: "M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"
        }),
        /* @__PURE__ */ ve("path", {
          d: "M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"
        })
      ]
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"
      })
    })
  },
  symbols: {
    outline: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ ve("path", {
        d: "M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"
      })
    }),
    solid: /* @__PURE__ */ ve("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ ve("path", {
        d: "M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"
      })
    })
  }
}, p6e = {
  loupe: /* @__PURE__ */ ve("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 20 20",
    children: /* @__PURE__ */ ve("path", {
      d: "M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"
    })
  }),
  delete: /* @__PURE__ */ ve("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 20 20",
    children: /* @__PURE__ */ ve("path", {
      d: "M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"
    })
  })
};
var Zw = {
  categories: h6e,
  search: p6e
};
function AC(t) {
  let { id: e, skin: n, emoji: i } = t;
  if (t.shortcodes) {
    const a = t.shortcodes.match(Oa.SHORTCODES_REGEX);
    a && (e = a[1], a[2] && (n = a[2]));
  }
  if (i || (i = Oa.get(e || t.native)), !i) return t.fallback;
  const r = i.skins[n - 1] || i.skins[0], s = r.src || (t.set != "native" && !t.spritesheet ? typeof t.getImageURL == "function" ? t.getImageURL(t.set, r.unified) : `https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@15.0.1/img/${t.set}/64/${r.unified}.png` : void 0), o = typeof t.getSpritesheetURL == "function" ? t.getSpritesheetURL(t.set) : `https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@15.0.1/img/${t.set}/sheets-256/64.png`;
  return /* @__PURE__ */ ve("span", {
    class: "emoji-mart-emoji",
    "data-emoji-set": t.set,
    children: s ? /* @__PURE__ */ ve("img", {
      style: {
        maxWidth: t.size || "1em",
        maxHeight: t.size || "1em",
        display: "inline-block"
      },
      alt: r.native || r.shortcodes,
      src: s
    }) : t.set == "native" ? /* @__PURE__ */ ve("span", {
      style: {
        fontSize: t.size,
        fontFamily: '"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'
      },
      children: r.native
    }) : /* @__PURE__ */ ve("span", {
      style: {
        display: "block",
        width: t.size,
        height: t.size,
        backgroundImage: `url(${o})`,
        backgroundSize: `${100 * jt.sheet.cols}% ${100 * jt.sheet.rows}%`,
        backgroundPosition: `${100 / (jt.sheet.cols - 1) * r.x}% ${100 / (jt.sheet.rows - 1) * r.y}%`
      }
    })
  });
}
const m6e = typeof window < "u" && window.HTMLElement ? window.HTMLElement : Object;
class xZ extends m6e {
  static get observedAttributes() {
    return Object.keys(this.Props);
  }
  update(e = {}) {
    for (let n in e) this.attributeChangedCallback(n, null, e[n]);
  }
  attributeChangedCallback(e, n, i) {
    if (!this.component) return;
    const r = kZ(e, {
      [e]: i
    }, this.constructor.Props, this);
    this.component.componentWillReceiveProps ? this.component.componentWillReceiveProps({
      [e]: r
    }) : (this.component.props[e] = r, this.component.forceUpdate());
  }
  disconnectedCallback() {
    this.disconnected = !0, this.component && this.component.unregister && this.component.unregister();
  }
  constructor(e = {}) {
    if (super(), this.props = e, e.parent || e.ref) {
      let n = null;
      const i = e.parent || (n = e.ref && e.ref.current);
      n && (n.innerHTML = ""), i && i.appendChild(this);
    }
  }
}
class g6e extends xZ {
  setShadow() {
    this.attachShadow({
      mode: "open"
    });
  }
  injectStyles(e) {
    if (!e) return;
    const n = document.createElement("style");
    n.textContent = e, this.shadowRoot.insertBefore(n, this.shadowRoot.firstChild);
  }
  constructor(e, { styles: n } = {}) {
    super(e), this.setShadow(), this.injectStyles(n);
  }
}
var _Z = {
  fallback: "",
  id: "",
  native: "",
  shortcodes: "",
  size: {
    value: "",
    transform: (t) => /\D/.test(t) ? t : `${t}px`
  },
  // Shared
  set: pl.set,
  skin: pl.skin
};
class OZ extends xZ {
  async connectedCallback() {
    const e = wZ(this.props, _Z, this);
    e.element = this, e.ref = (n) => {
      this.component = n;
    }, await U1(), !this.disconnected && pZ(/* @__PURE__ */ ve(AC, {
      ...e
    }), this);
  }
  constructor(e) {
    super(e);
  }
}
Js(OZ, "Props", _Z);
typeof customElements < "u" && !customElements.get("em-emoji") && customElements.define("em-emoji", OZ);
var JD, DC = [], eP = ut.__b, tP = ut.__r, nP = ut.diffed, iP = ut.__c, rP = ut.unmount;
function v6e() {
  var t;
  for (DC.sort(function(e, n) {
    return e.__v.__b - n.__v.__b;
  }); t = DC.pop(); ) if (t.__P) try {
    t.__H.__h.forEach(by), t.__H.__h.forEach(PC), t.__H.__h = [];
  } catch (e) {
    t.__H.__h = [], ut.__e(e, t.__v);
  }
}
ut.__b = function(t) {
  eP && eP(t);
}, ut.__r = function(t) {
  tP && tP(t);
  var e = t.__c.__H;
  e && (e.__h.forEach(by), e.__h.forEach(PC), e.__h = []);
}, ut.diffed = function(t) {
  nP && nP(t);
  var e = t.__c;
  e && e.__H && e.__H.__h.length && (DC.push(e) !== 1 && JD === ut.requestAnimationFrame || ((JD = ut.requestAnimationFrame) || function(n) {
    var i, r = function() {
      clearTimeout(s), sP && cancelAnimationFrame(i), setTimeout(n);
    }, s = setTimeout(r, 100);
    sP && (i = requestAnimationFrame(r));
  })(v6e));
}, ut.__c = function(t, e) {
  e.some(function(n) {
    try {
      n.__h.forEach(by), n.__h = n.__h.filter(function(i) {
        return !i.__ || PC(i);
      });
    } catch (i) {
      e.some(function(r) {
        r.__h && (r.__h = []);
      }), e = [], ut.__e(i, n.__v);
    }
  }), iP && iP(t, e);
}, ut.unmount = function(t) {
  rP && rP(t);
  var e, n = t.__c;
  n && n.__H && (n.__H.__.forEach(function(i) {
    try {
      by(i);
    } catch (r) {
      e = r;
    }
  }), e && ut.__e(e, n.__v));
};
var sP = typeof requestAnimationFrame == "function";
function by(t) {
  var e = t.__c;
  typeof e == "function" && (t.__c = void 0, e());
}
function PC(t) {
  t.__c = t.__();
}
function b6e(t, e) {
  for (var n in e) t[n] = e[n];
  return t;
}
function oP(t, e) {
  for (var n in t) if (n !== "__source" && !(n in e)) return !0;
  for (var i in e) if (i !== "__source" && t[i] !== e[i]) return !0;
  return !1;
}
function qw(t) {
  this.props = t;
}
(qw.prototype = new Ca()).isPureReactComponent = !0, qw.prototype.shouldComponentUpdate = function(t, e) {
  return oP(this.props, t) || oP(this.state, e);
};
var aP = ut.__b;
ut.__b = function(t) {
  t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), aP && aP(t);
};
var y6e = ut.__e;
ut.__e = function(t, e, n) {
  if (t.then) {
    for (var i, r = e; r = r.__; ) if ((i = r.__c) && i.__c) return e.__e == null && (e.__e = n.__e, e.__k = n.__k), i.__c(t, e);
  }
  y6e(t, e, n);
};
var lP = ut.unmount;
function yO() {
  this.__u = 0, this.t = null, this.__b = null;
}
function SZ(t) {
  var e = t.__.__c;
  return e && e.__e && e.__e(t);
}
function Nb() {
  this.u = null, this.o = null;
}
ut.unmount = function(t) {
  var e = t.__c;
  e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null), lP && lP(t);
}, (yO.prototype = new Ca()).__c = function(t, e) {
  var n = e.__c, i = this;
  i.t == null && (i.t = []), i.t.push(n);
  var r = SZ(i.__v), s = !1, o = function() {
    s || (s = !0, n.__R = null, r ? r(a) : a());
  };
  n.__R = o;
  var a = function() {
    if (!--i.__u) {
      if (i.state.__e) {
        var u = i.state.__e;
        i.__v.__k[0] = function d(h, m, g) {
          return h && (h.__v = null, h.__k = h.__k && h.__k.map(function(w) {
            return d(w, m, g);
          }), h.__c && h.__c.__P === m && (h.__e && g.insertBefore(h.__e, h.__d), h.__c.__e = !0, h.__c.__P = g)), h;
        }(u, u.__c.__P, u.__c.__O);
      }
      var f;
      for (i.setState({
        __e: i.__b = null
      }); f = i.t.pop(); ) f.forceUpdate();
    }
  }, l = e.__h === !0;
  i.__u++ || l || i.setState({
    __e: i.__b = i.__v.__k[0]
  }), t.then(o, o);
}, yO.prototype.componentWillUnmount = function() {
  this.t = [];
}, yO.prototype.render = function(t, e) {
  if (this.__b) {
    if (this.__v.__k) {
      var n = document.createElement("div"), i = this.__v.__k[0].__c;
      this.__v.__k[0] = function s(o, a, l) {
        return o && (o.__c && o.__c.__H && (o.__c.__H.__.forEach(function(u) {
          typeof u.__c == "function" && u.__c();
        }), o.__c.__H = null), (o = b6e({}, o)).__c != null && (o.__c.__P === l && (o.__c.__P = a), o.__c = null), o.__k = o.__k && o.__k.map(function(u) {
          return s(u, a, l);
        })), o;
      }(this.__b, n, i.__O = i.__P);
    }
    this.__b = null;
  }
  var r = e.__e && $C(Ih, null, t.fallback);
  return r && (r.__h = null), [
    $C(Ih, null, e.__e ? null : t.children),
    r
  ];
};
var uP = function(t, e, n) {
  if (++n[1] === n[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size)) for (n = t.u; n; ) {
    for (; n.length > 3; ) n.pop()();
    if (n[1] < n[0]) break;
    t.u = n = n[2];
  }
};
(Nb.prototype = new Ca()).__e = function(t) {
  var e = this, n = SZ(e.__v), i = e.o.get(t);
  return i[0]++, function(r) {
    var s = function() {
      e.props.revealOrder ? (i.push(r), uP(e, t, i)) : r();
    };
    n ? n(s) : s();
  };
}, Nb.prototype.render = function(t) {
  this.u = null, this.o = /* @__PURE__ */ new Map();
  var e = Qw(t.children);
  t.revealOrder && t.revealOrder[0] === "b" && e.reverse();
  for (var n = e.length; n--; ) this.o.set(e[n], this.u = [
    1,
    0,
    this.u
  ]);
  return t.children;
}, Nb.prototype.componentDidUpdate = Nb.prototype.componentDidMount = function() {
  var t = this;
  this.o.forEach(function(e, n) {
    uP(t, n, e);
  });
};
var w6e = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, k6e = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, x6e = typeof document < "u", _6e = function(t) {
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/i : /fil|che|ra/i).test(t);
};
Ca.prototype.isReactComponent = {}, [
  "componentWillMount",
  "componentWillReceiveProps",
  "componentWillUpdate"
].forEach(function(t) {
  Object.defineProperty(Ca.prototype, t, {
    configurable: !0,
    get: function() {
      return this["UNSAFE_" + t];
    },
    set: function(e) {
      Object.defineProperty(this, t, {
        configurable: !0,
        writable: !0,
        value: e
      });
    }
  });
});
var cP = ut.event;
function O6e() {
}
function S6e() {
  return this.cancelBubble;
}
function C6e() {
  return this.defaultPrevented;
}
ut.event = function(t) {
  return cP && (t = cP(t)), t.persist = O6e, t.isPropagationStopped = S6e, t.isDefaultPrevented = C6e, t.nativeEvent = t;
};
var fP = {
  configurable: !0,
  get: function() {
    return this.class;
  }
}, dP = ut.vnode;
ut.vnode = function(t) {
  var e = t.type, n = t.props, i = n;
  if (typeof e == "string") {
    var r = e.indexOf("-") === -1;
    for (var s in i = {}, n) {
      var o = n[s];
      x6e && s === "children" && e === "noscript" || s === "value" && "defaultValue" in n && o == null || (s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && o === !0 ? o = "" : /ondoubleclick/i.test(s) ? s = "ondblclick" : /^onchange(textarea|input)/i.test(s + e) && !_6e(n.type) ? s = "oninput" : /^onfocus$/i.test(s) ? s = "onfocusin" : /^onblur$/i.test(s) ? s = "onfocusout" : /^on(Ani|Tra|Tou|BeforeInp)/.test(s) ? s = s.toLowerCase() : r && k6e.test(s) ? s = s.replace(/[A-Z0-9]/, "-$&").toLowerCase() : o === null && (o = void 0), i[s] = o);
    }
    e == "select" && i.multiple && Array.isArray(i.value) && (i.value = Qw(n.children).forEach(function(a) {
      a.props.selected = i.value.indexOf(a.props.value) != -1;
    })), e == "select" && i.defaultValue != null && (i.value = Qw(n.children).forEach(function(a) {
      a.props.selected = i.multiple ? i.defaultValue.indexOf(a.props.value) != -1 : i.defaultValue == a.props.value;
    })), t.props = i, n.class != n.className && (fP.enumerable = "className" in n, n.className != null && (i.class = n.className), Object.defineProperty(i, "className", fP));
  }
  t.$$typeof = w6e, dP && dP(t);
};
var hP = ut.__r;
ut.__r = function(t) {
  hP && hP(t), t.__c;
};
const E6e = {
  light: "outline",
  dark: "solid"
};
class T6e extends qw {
  renderIcon(e) {
    const { icon: n } = e;
    if (n) {
      if (n.svg) return /* @__PURE__ */ ve("span", {
        class: "flex",
        dangerouslySetInnerHTML: {
          __html: n.svg
        }
      });
      if (n.src) return /* @__PURE__ */ ve("img", {
        src: n.src
      });
    }
    const i = Zw.categories[e.id] || Zw.categories.custom, r = this.props.icons == "auto" ? E6e[this.props.theme] : this.props.icons;
    return i[r] || i;
  }
  render() {
    let e = null;
    return /* @__PURE__ */ ve("nav", {
      id: "nav",
      class: "padding",
      "data-position": this.props.position,
      dir: this.props.dir,
      children: /* @__PURE__ */ ve("div", {
        class: "flex relative",
        children: [
          this.categories.map((n, i) => {
            const r = n.name || kr.categories[n.id], s = !this.props.unfocused && n.id == this.state.categoryId;
            return s && (e = i), /* @__PURE__ */ ve("button", {
              "aria-label": r,
              "aria-selected": s || void 0,
              title: r,
              type: "button",
              class: "flex flex-grow flex-center",
              onMouseDown: (o) => o.preventDefault(),
              onClick: () => {
                this.props.onClick({
                  category: n,
                  i
                });
              },
              children: this.renderIcon(n)
            });
          }),
          /* @__PURE__ */ ve("div", {
            class: "bar",
            style: {
              width: `${100 / this.categories.length}%`,
              opacity: e == null ? 0 : 1,
              transform: this.props.dir === "rtl" ? `scaleX(-1) translateX(${e * 100}%)` : `translateX(${e * 100}%)`
            }
          })
        ]
      })
    });
  }
  constructor() {
    super(), this.categories = jt.categories.filter((e) => !e.target), this.state = {
      categoryId: this.categories[0].id
    };
  }
}
class $6e extends qw {
  shouldComponentUpdate(e) {
    for (let n in e)
      if (n != "children" && e[n] != this.props[n])
        return !0;
    return !1;
  }
  render() {
    return this.props.children;
  }
}
const Ab = {
  rowsPerRender: 10
};
class M6e extends Ca {
  getInitialState(e = this.props) {
    return {
      skin: Ru.get("skin") || e.skin,
      theme: this.initTheme(e.theme)
    };
  }
  componentWillMount() {
    this.dir = kr.rtl ? "rtl" : "ltr", this.refs = {
      menu: rl(),
      navigation: rl(),
      scroll: rl(),
      search: rl(),
      searchInput: rl(),
      skinToneButton: rl(),
      skinToneRadio: rl()
    }, this.initGrid(), this.props.stickySearch == !1 && this.props.searchPosition == "sticky" && (console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."), this.props.searchPosition = "static");
  }
  componentDidMount() {
    if (this.register(), this.shadowRoot = this.base.parentNode, this.props.autoFocus) {
      const { searchInput: e } = this.refs;
      e.current && e.current.focus();
    }
  }
  componentWillReceiveProps(e) {
    this.nextState || (this.nextState = {});
    for (const n in e) this.nextState[n] = e[n];
    clearTimeout(this.nextStateTimer), this.nextStateTimer = setTimeout(() => {
      let n = !1;
      for (const r in this.nextState)
        this.props[r] = this.nextState[r], (r === "custom" || r === "categories") && (n = !0);
      delete this.nextState;
      const i = this.getInitialState();
      if (n) return this.reset(i);
      this.setState(i);
    });
  }
  componentWillUnmount() {
    this.unregister();
  }
  async reset(e = {}) {
    await U1(this.props), this.initGrid(), this.unobserve(), this.setState(e, () => {
      this.observeCategories(), this.observeRows();
    });
  }
  register() {
    document.addEventListener("click", this.handleClickOutside), this.observe();
  }
  unregister() {
    var e;
    document.removeEventListener("click", this.handleClickOutside), (e = this.darkMedia) == null || e.removeEventListener("change", this.darkMediaCallback), this.unobserve();
  }
  observe() {
    this.observeCategories(), this.observeRows();
  }
  unobserve({ except: e = [] } = {}) {
    Array.isArray(e) || (e = [
      e
    ]);
    for (const n of this.observers)
      e.includes(n) || n.disconnect();
    this.observers = [].concat(e);
  }
  initGrid() {
    const { categories: e } = jt;
    this.refs.categories = /* @__PURE__ */ new Map();
    const n = jt.categories.map((r) => r.id).join(",");
    this.navKey && this.navKey != n && this.refs.scroll.current && (this.refs.scroll.current.scrollTop = 0), this.navKey = n, this.grid = [], this.grid.setsize = 0;
    const i = (r, s) => {
      const o = [];
      o.__categoryId = s.id, o.__index = r.length, this.grid.push(o);
      const a = this.grid.length - 1, l = a % Ab.rowsPerRender ? {} : rl();
      return l.index = a, l.posinset = this.grid.setsize + 1, r.push(l), o;
    };
    for (let r of e) {
      const s = [];
      let o = i(s, r);
      for (let a of r.emojis)
        o.length == this.getPerLine() && (o = i(s, r)), this.grid.setsize += 1, o.push(a);
      this.refs.categories.set(r.id, {
        root: rl(),
        rows: s
      });
    }
  }
  initTheme(e) {
    if (e != "auto") return e;
    if (!this.darkMedia) {
      if (this.darkMedia = matchMedia("(prefers-color-scheme: dark)"), this.darkMedia.media.match(/^not/)) return "light";
      this.darkMedia.addEventListener("change", this.darkMediaCallback);
    }
    return this.darkMedia.matches ? "dark" : "light";
  }
  initDynamicPerLine(e = this.props) {
    if (!e.dynamicWidth) return;
    const { element: n, emojiButtonSize: i } = e, r = () => {
      const { width: o } = n.getBoundingClientRect();
      return Math.floor(o / i);
    }, s = new ResizeObserver(() => {
      this.unobserve({
        except: s
      }), this.setState({
        perLine: r()
      }, () => {
        this.initGrid(), this.forceUpdate(() => {
          this.observeCategories(), this.observeRows();
        });
      });
    });
    return s.observe(n), this.observers.push(s), r();
  }
  getPerLine() {
    return this.state.perLine || this.props.perLine;
  }
  getEmojiByPos([e, n]) {
    const i = this.state.searchResults || this.grid, r = i[e] && i[e][n];
    if (r)
      return Oa.get(r);
  }
  observeCategories() {
    const e = this.refs.navigation.current;
    if (!e) return;
    const n = /* @__PURE__ */ new Map(), i = (o) => {
      o != e.state.categoryId && e.setState({
        categoryId: o
      });
    }, r = {
      root: this.refs.scroll.current,
      threshold: [
        0,
        1
      ]
    }, s = new IntersectionObserver((o) => {
      for (const l of o) {
        const u = l.target.dataset.id;
        n.set(u, l.intersectionRatio);
      }
      const a = [
        ...n
      ];
      for (const [l, u] of a) if (u) {
        i(l);
        break;
      }
    }, r);
    for (const { root: o } of this.refs.categories.values()) s.observe(o.current);
    this.observers.push(s);
  }
  observeRows() {
    const e = {
      ...this.state.visibleRows
    }, n = new IntersectionObserver((i) => {
      for (const r of i) {
        const s = parseInt(r.target.dataset.index);
        r.isIntersecting ? e[s] = !0 : delete e[s];
      }
      this.setState({
        visibleRows: e
      });
    }, {
      root: this.refs.scroll.current,
      rootMargin: `${this.props.emojiButtonSize * (Ab.rowsPerRender + 5)}px 0px ${this.props.emojiButtonSize * Ab.rowsPerRender}px`
    });
    for (const { rows: i } of this.refs.categories.values())
      for (const r of i) r.current && n.observe(r.current);
    this.observers.push(n);
  }
  preventDefault(e) {
    e.preventDefault();
  }
  unfocusSearch() {
    const e = this.refs.searchInput.current;
    e && e.blur();
  }
  navigate({ e, input: n, left: i, right: r, up: s, down: o }) {
    const a = this.state.searchResults || this.grid;
    if (!a.length) return;
    let [l, u] = this.state.pos;
    const f = (() => {
      if (l == 0 && u == 0 && !e.repeat && (i || s))
        return null;
      if (l == -1)
        return !e.repeat && (r || o) && n.selectionStart == n.value.length ? [
          0,
          0
        ] : null;
      if (i || r) {
        let d = a[l];
        const h = i ? -1 : 1;
        if (u += h, !d[u]) {
          if (l += h, d = a[l], !d)
            return l = i ? 0 : a.length - 1, u = i ? 0 : a[l].length - 1, [
              l,
              u
            ];
          u = i ? d.length - 1 : 0;
        }
        return [
          l,
          u
        ];
      }
      if (s || o) {
        l += s ? -1 : 1;
        const d = a[l];
        return d ? (d[u] || (u = d.length - 1), [
          l,
          u
        ]) : (l = s ? 0 : a.length - 1, u = s ? 0 : a[l].length - 1, [
          l,
          u
        ]);
      }
    })();
    if (f) e.preventDefault();
    else {
      this.state.pos[0] > -1 && this.setState({
        pos: [
          -1,
          -1
        ]
      });
      return;
    }
    this.setState({
      pos: f,
      keyboard: !0
    }, () => {
      this.scrollTo({
        row: f[0]
      });
    });
  }
  scrollTo({ categoryId: e, row: n }) {
    const i = this.state.searchResults || this.grid;
    if (!i.length) return;
    const r = this.refs.scroll.current, s = r.getBoundingClientRect();
    let o = 0;
    if (n >= 0 && (e = i[n].__categoryId), e && (o = (this.refs[e] || this.refs.categories.get(e).root).current.getBoundingClientRect().top - (s.top - r.scrollTop) + 1), n >= 0)
      if (!n) o = 0;
      else {
        const a = i[n].__index, l = o + a * this.props.emojiButtonSize, u = l + this.props.emojiButtonSize + this.props.emojiButtonSize * 0.88;
        if (l < r.scrollTop) o = l;
        else if (u > r.scrollTop + s.height) o = u - s.height;
        else return;
      }
    this.ignoreMouse(), r.scrollTop = o;
  }
  ignoreMouse() {
    this.mouseIsIgnored = !0, clearTimeout(this.ignoreMouseTimer), this.ignoreMouseTimer = setTimeout(() => {
      delete this.mouseIsIgnored;
    }, 100);
  }
  handleEmojiOver(e) {
    this.mouseIsIgnored || this.state.showSkins || this.setState({
      pos: e || [
        -1,
        -1
      ],
      keyboard: !1
    });
  }
  handleEmojiClick({ e, emoji: n, pos: i }) {
    if (this.props.onEmojiSelect && (!n && i && (n = this.getEmojiByPos(i)), n)) {
      const r = d6e(n, {
        skinIndex: this.state.skin - 1
      });
      this.props.maxFrequentRows && gZ.add(r, this.props), this.props.onEmojiSelect(r, e);
    }
  }
  closeSkins() {
    this.state.showSkins && (this.setState({
      showSkins: null,
      tempSkin: null
    }), this.base.removeEventListener("click", this.handleBaseClick), this.base.removeEventListener("keydown", this.handleBaseKeydown));
  }
  handleSkinMouseOver(e) {
    this.setState({
      tempSkin: e
    });
  }
  handleSkinClick(e) {
    this.ignoreMouse(), this.closeSkins(), this.setState({
      skin: e,
      tempSkin: null
    }), Ru.set("skin", e);
  }
  renderNav() {
    return /* @__PURE__ */ ve(T6e, {
      ref: this.refs.navigation,
      icons: this.props.icons,
      theme: this.state.theme,
      dir: this.dir,
      unfocused: !!this.state.searchResults,
      position: this.props.navPosition,
      onClick: this.handleCategoryClick
    }, this.navKey);
  }
  renderPreview() {
    const e = this.getEmojiByPos(this.state.pos), n = this.state.searchResults && !this.state.searchResults.length;
    return /* @__PURE__ */ ve("div", {
      id: "preview",
      class: "flex flex-middle",
      dir: this.dir,
      "data-position": this.props.previewPosition,
      children: [
        /* @__PURE__ */ ve("div", {
          class: "flex flex-middle flex-grow",
          children: [
            /* @__PURE__ */ ve("div", {
              class: "flex flex-auto flex-middle flex-center",
              style: {
                height: this.props.emojiButtonSize,
                fontSize: this.props.emojiButtonSize
              },
              children: /* @__PURE__ */ ve(AC, {
                emoji: e,
                id: n ? this.props.noResultsEmoji || "cry" : this.props.previewEmoji || (this.props.previewPosition == "top" ? "point_down" : "point_up"),
                set: this.props.set,
                size: this.props.emojiButtonSize,
                skin: this.state.tempSkin || this.state.skin,
                spritesheet: !0,
                getSpritesheetURL: this.props.getSpritesheetURL
              })
            }),
            /* @__PURE__ */ ve("div", {
              class: `margin-${this.dir[0]}`,
              children: e || n ? /* @__PURE__ */ ve("div", {
                class: `padding-${this.dir[2]} align-${this.dir[0]}`,
                children: [
                  /* @__PURE__ */ ve("div", {
                    class: "preview-title ellipsis",
                    children: e ? e.name : kr.search_no_results_1
                  }),
                  /* @__PURE__ */ ve("div", {
                    class: "preview-subtitle ellipsis color-c",
                    children: e ? e.skins[0].shortcodes : kr.search_no_results_2
                  })
                ]
              }) : /* @__PURE__ */ ve("div", {
                class: "preview-placeholder color-c",
                children: kr.pick
              })
            })
          ]
        }),
        !e && this.props.skinTonePosition == "preview" && this.renderSkinToneButton()
      ]
    });
  }
  renderEmojiButton(e, { pos: n, posinset: i, grid: r }) {
    const s = this.props.emojiButtonSize, o = this.state.tempSkin || this.state.skin, l = (e.skins[o - 1] || e.skins[0]).native, u = c6e(this.state.pos, n), f = n.concat(e.id).join("");
    return /* @__PURE__ */ ve($6e, {
      selected: u,
      skin: o,
      size: s,
      children: /* @__PURE__ */ ve("button", {
        "aria-label": l,
        "aria-selected": u || void 0,
        "aria-posinset": i,
        "aria-setsize": r.setsize,
        "data-keyboard": this.state.keyboard,
        title: this.props.previewPosition == "none" ? e.name : void 0,
        type: "button",
        class: "flex flex-center flex-middle",
        tabindex: "-1",
        onClick: (d) => this.handleEmojiClick({
          e: d,
          emoji: e
        }),
        onMouseEnter: () => this.handleEmojiOver(n),
        onMouseLeave: () => this.handleEmojiOver(),
        style: {
          width: this.props.emojiButtonSize,
          height: this.props.emojiButtonSize,
          fontSize: this.props.emojiSize,
          lineHeight: 0
        },
        children: [
          /* @__PURE__ */ ve("div", {
            "aria-hidden": "true",
            class: "background",
            style: {
              borderRadius: this.props.emojiButtonRadius,
              backgroundColor: this.props.emojiButtonColors ? this.props.emojiButtonColors[(i - 1) % this.props.emojiButtonColors.length] : void 0
            }
          }),
          /* @__PURE__ */ ve(AC, {
            emoji: e,
            set: this.props.set,
            size: this.props.emojiSize,
            skin: o,
            spritesheet: !0,
            getSpritesheetURL: this.props.getSpritesheetURL
          })
        ]
      })
    }, f);
  }
  renderSearch() {
    const e = this.props.previewPosition == "none" || this.props.skinTonePosition == "search";
    return /* @__PURE__ */ ve("div", {
      children: [
        /* @__PURE__ */ ve("div", {
          class: "spacer"
        }),
        /* @__PURE__ */ ve("div", {
          class: "flex flex-middle",
          children: [
            /* @__PURE__ */ ve("div", {
              class: "search relative flex-grow",
              children: [
                /* @__PURE__ */ ve("input", {
                  type: "search",
                  ref: this.refs.searchInput,
                  placeholder: kr.search,
                  onClick: this.handleSearchClick,
                  onInput: this.handleSearchInput,
                  onKeyDown: this.handleSearchKeyDown,
                  autoComplete: "off"
                }),
                /* @__PURE__ */ ve("span", {
                  class: "icon loupe flex",
                  children: Zw.search.loupe
                }),
                this.state.searchResults && /* @__PURE__ */ ve("button", {
                  title: "Clear",
                  "aria-label": "Clear",
                  type: "button",
                  class: "icon delete flex",
                  onClick: this.clearSearch,
                  onMouseDown: this.preventDefault,
                  children: Zw.search.delete
                })
              ]
            }),
            e && this.renderSkinToneButton()
          ]
        })
      ]
    });
  }
  renderSearchResults() {
    const { searchResults: e } = this.state;
    return e ? /* @__PURE__ */ ve("div", {
      class: "category",
      ref: this.refs.search,
      children: [
        /* @__PURE__ */ ve("div", {
          class: `sticky padding-small align-${this.dir[0]}`,
          children: kr.categories.search
        }),
        /* @__PURE__ */ ve("div", {
          children: e.length ? e.map((n, i) => /* @__PURE__ */ ve("div", {
            class: "flex",
            children: n.map((r, s) => this.renderEmojiButton(r, {
              pos: [
                i,
                s
              ],
              posinset: i * this.props.perLine + s + 1,
              grid: e
            }))
          })) : /* @__PURE__ */ ve("div", {
            class: `padding-small align-${this.dir[0]}`,
            children: this.props.onAddCustomEmoji && /* @__PURE__ */ ve("a", {
              onClick: this.props.onAddCustomEmoji,
              children: kr.add_custom
            })
          })
        })
      ]
    }) : null;
  }
  renderCategories() {
    const { categories: e } = jt, n = !!this.state.searchResults, i = this.getPerLine();
    return /* @__PURE__ */ ve("div", {
      style: {
        visibility: n ? "hidden" : void 0,
        display: n ? "none" : void 0,
        height: "100%"
      },
      children: e.map((r) => {
        const { root: s, rows: o } = this.refs.categories.get(r.id);
        return /* @__PURE__ */ ve("div", {
          "data-id": r.target ? r.target.id : r.id,
          class: "category",
          ref: s,
          children: [
            /* @__PURE__ */ ve("div", {
              class: `sticky padding-small align-${this.dir[0]}`,
              children: r.name || kr.categories[r.id]
            }),
            /* @__PURE__ */ ve("div", {
              class: "relative",
              style: {
                height: o.length * this.props.emojiButtonSize
              },
              children: o.map((a, l) => {
                const u = a.index - a.index % Ab.rowsPerRender, f = this.state.visibleRows[u], d = "current" in a ? a : void 0;
                if (!f && !d) return null;
                const h = l * i, m = h + i, g = r.emojis.slice(h, m);
                return g.length < i && g.push(...new Array(i - g.length)), /* @__PURE__ */ ve("div", {
                  "data-index": a.index,
                  ref: d,
                  class: "flex row",
                  style: {
                    top: l * this.props.emojiButtonSize
                  },
                  children: f && g.map((w, x) => {
                    if (!w) return /* @__PURE__ */ ve("div", {
                      style: {
                        width: this.props.emojiButtonSize,
                        height: this.props.emojiButtonSize
                      }
                    });
                    const _ = Oa.get(w);
                    return this.renderEmojiButton(_, {
                      pos: [
                        a.index,
                        x
                      ],
                      posinset: a.posinset + x,
                      grid: this.grid
                    });
                  })
                }, a.index);
              })
            })
          ]
        });
      })
    });
  }
  renderSkinToneButton() {
    return this.props.skinTonePosition == "none" ? null : /* @__PURE__ */ ve("div", {
      class: "flex flex-auto flex-center flex-middle",
      style: {
        position: "relative",
        width: this.props.emojiButtonSize,
        height: this.props.emojiButtonSize
      },
      children: /* @__PURE__ */ ve("button", {
        type: "button",
        ref: this.refs.skinToneButton,
        class: "skin-tone-button flex flex-auto flex-center flex-middle",
        "aria-selected": this.state.showSkins ? "" : void 0,
        "aria-label": kr.skins.choose,
        title: kr.skins.choose,
        onClick: this.openSkins,
        style: {
          width: this.props.emojiSize,
          height: this.props.emojiSize
        },
        children: /* @__PURE__ */ ve("span", {
          class: `skin-tone skin-tone-${this.state.skin}`
        })
      })
    });
  }
  renderLiveRegion() {
    const e = this.getEmojiByPos(this.state.pos), n = e ? e.name : "";
    return /* @__PURE__ */ ve("div", {
      "aria-live": "polite",
      class: "sr-only",
      children: n
    });
  }
  renderSkins() {
    const n = this.refs.skinToneButton.current.getBoundingClientRect(), i = this.base.getBoundingClientRect(), r = {};
    return this.dir == "ltr" ? r.right = i.right - n.right - 3 : r.left = n.left - i.left - 3, this.props.previewPosition == "bottom" && this.props.skinTonePosition == "preview" ? r.bottom = i.bottom - n.top + 6 : (r.top = n.bottom - i.top + 3, r.bottom = "auto"), /* @__PURE__ */ ve("div", {
      ref: this.refs.menu,
      role: "radiogroup",
      dir: this.dir,
      "aria-label": kr.skins.choose,
      class: "menu hidden",
      "data-position": r.top ? "top" : "bottom",
      style: r,
      children: [
        ...Array(6).keys()
      ].map((s) => {
        const o = s + 1, a = this.state.skin == o;
        return /* @__PURE__ */ ve("div", {
          children: [
            /* @__PURE__ */ ve("input", {
              type: "radio",
              name: "skin-tone",
              value: o,
              "aria-label": kr.skins[o],
              ref: a ? this.refs.skinToneRadio : null,
              defaultChecked: a,
              onChange: () => this.handleSkinMouseOver(o),
              onKeyDown: (l) => {
                (l.code == "Enter" || l.code == "Space" || l.code == "Tab") && (l.preventDefault(), this.handleSkinClick(o));
              }
            }),
            /* @__PURE__ */ ve("button", {
              "aria-hidden": "true",
              tabindex: "-1",
              onClick: () => this.handleSkinClick(o),
              onMouseEnter: () => this.handleSkinMouseOver(o),
              onMouseLeave: () => this.handleSkinMouseOver(),
              class: "option flex flex-grow flex-middle",
              children: [
                /* @__PURE__ */ ve("span", {
                  class: `skin-tone skin-tone-${o}`
                }),
                /* @__PURE__ */ ve("span", {
                  class: "margin-small-lr",
                  children: kr.skins[o]
                })
              ]
            })
          ]
        });
      })
    });
  }
  render() {
    const e = this.props.perLine * this.props.emojiButtonSize;
    return /* @__PURE__ */ ve("section", {
      id: "root",
      class: "flex flex-column",
      dir: this.dir,
      style: {
        width: this.props.dynamicWidth ? "100%" : `calc(${e}px + (var(--padding) + var(--sidebar-width)))`
      },
      "data-emoji-set": this.props.set,
      "data-theme": this.state.theme,
      "data-menu": this.state.showSkins ? "" : void 0,
      children: [
        this.props.previewPosition == "top" && this.renderPreview(),
        this.props.navPosition == "top" && this.renderNav(),
        this.props.searchPosition == "sticky" && /* @__PURE__ */ ve("div", {
          class: "padding-lr",
          children: this.renderSearch()
        }),
        /* @__PURE__ */ ve("div", {
          ref: this.refs.scroll,
          class: "scroll flex-grow padding-lr",
          children: /* @__PURE__ */ ve("div", {
            style: {
              width: this.props.dynamicWidth ? "100%" : e,
              height: "100%"
            },
            children: [
              this.props.searchPosition == "static" && this.renderSearch(),
              this.renderSearchResults(),
              this.renderCategories()
            ]
          })
        }),
        this.props.navPosition == "bottom" && this.renderNav(),
        this.props.previewPosition == "bottom" && this.renderPreview(),
        this.state.showSkins && this.renderSkins(),
        this.renderLiveRegion()
      ]
    });
  }
  constructor(e) {
    super(), Js(this, "darkMediaCallback", () => {
      this.props.theme == "auto" && this.setState({
        theme: this.darkMedia.matches ? "dark" : "light"
      });
    }), Js(this, "handleClickOutside", (n) => {
      const { element: i } = this.props;
      n.target != i && (this.state.showSkins && this.closeSkins(), this.props.onClickOutside && this.props.onClickOutside(n));
    }), Js(this, "handleBaseClick", (n) => {
      this.state.showSkins && (n.target.closest(".menu") || (n.preventDefault(), n.stopImmediatePropagation(), this.closeSkins()));
    }), Js(this, "handleBaseKeydown", (n) => {
      this.state.showSkins && n.key == "Escape" && (n.preventDefault(), n.stopImmediatePropagation(), this.closeSkins());
    }), Js(this, "handleSearchClick", () => {
      this.getEmojiByPos(this.state.pos) && this.setState({
        pos: [
          -1,
          -1
        ]
      });
    }), Js(this, "handleSearchInput", async () => {
      const n = this.refs.searchInput.current;
      if (!n) return;
      const { value: i } = n, r = await Oa.search(i), s = () => {
        this.refs.scroll.current && (this.refs.scroll.current.scrollTop = 0);
      };
      if (!r) return this.setState({
        searchResults: r,
        pos: [
          -1,
          -1
        ]
      }, s);
      const o = n.selectionStart == n.value.length ? [
        0,
        0
      ] : [
        -1,
        -1
      ], a = [];
      a.setsize = r.length;
      let l = null;
      for (let u of r)
        (!a.length || l.length == this.getPerLine()) && (l = [], l.__categoryId = "search", l.__index = a.length, a.push(l)), l.push(u);
      this.ignoreMouse(), this.setState({
        searchResults: a,
        pos: o
      }, s);
    }), Js(this, "handleSearchKeyDown", (n) => {
      const i = n.currentTarget;
      switch (n.stopImmediatePropagation(), n.key) {
        case "ArrowLeft":
          this.navigate({
            e: n,
            input: i,
            left: !0
          });
          break;
        case "ArrowRight":
          this.navigate({
            e: n,
            input: i,
            right: !0
          });
          break;
        case "ArrowUp":
          this.navigate({
            e: n,
            input: i,
            up: !0
          });
          break;
        case "ArrowDown":
          this.navigate({
            e: n,
            input: i,
            down: !0
          });
          break;
        case "Enter":
          n.preventDefault(), this.handleEmojiClick({
            e: n,
            pos: this.state.pos
          });
          break;
        case "Escape":
          n.preventDefault(), this.state.searchResults ? this.clearSearch() : this.unfocusSearch();
          break;
      }
    }), Js(this, "clearSearch", () => {
      const n = this.refs.searchInput.current;
      n && (n.value = "", n.focus(), this.handleSearchInput());
    }), Js(this, "handleCategoryClick", ({ category: n, i }) => {
      this.scrollTo(i == 0 ? {
        row: -1
      } : {
        categoryId: n.id
      });
    }), Js(this, "openSkins", (n) => {
      const { currentTarget: i } = n, r = i.getBoundingClientRect();
      this.setState({
        showSkins: r
      }, async () => {
        await f6e(2);
        const s = this.refs.menu.current;
        s && (s.classList.remove("hidden"), this.refs.skinToneRadio.current.focus(), this.base.addEventListener("click", this.handleBaseClick, !0), this.base.addEventListener("keydown", this.handleBaseKeydown, !0));
      });
    }), this.observers = [], this.state = {
      pos: [
        -1,
        -1
      ],
      perLine: this.initDynamicPerLine(e),
      visibleRows: {
        0: !0
      },
      ...this.getInitialState(e)
    };
  }
}
class YE extends g6e {
  async connectedCallback() {
    const e = wZ(this.props, pl, this);
    e.element = this, e.ref = (n) => {
      this.component = n;
    }, await U1(e), !this.disconnected && pZ(/* @__PURE__ */ ve(M6e, {
      ...e
    }), this.shadowRoot);
  }
  constructor(e) {
    super(e, {
      styles: /* @__PURE__ */ nZ(CZ)
    });
  }
}
Js(YE, "Props", pl);
typeof customElements < "u" && !customElements.get("em-emoji-picker") && customElements.define("em-emoji-picker", YE);
var CZ = {};
CZ = `:host {
  width: min-content;
  height: 435px;
  min-height: 230px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  --border-radius: 10px;
  --category-icon-size: 18px;
  --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-size: 15px;
  --preview-placeholder-size: 21px;
  --preview-title-size: 1.1em;
  --preview-subtitle-size: .9em;
  --shadow-color: 0deg 0% 0%;
  --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14);
  display: flex;
}

[data-theme="light"] {
  --em-rgb-color: var(--rgb-color, 34, 36, 39);
  --em-rgb-accent: var(--rgb-accent, 34, 102, 237);
  --em-rgb-background: var(--rgb-background, 255, 255, 255);
  --em-rgb-input: var(--rgb-input, 255, 255, 255);
  --em-color-border: var(--color-border, rgba(0, 0, 0, .05));
  --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));
}

[data-theme="dark"] {
  --em-rgb-color: var(--rgb-color, 222, 222, 221);
  --em-rgb-accent: var(--rgb-accent, 58, 130, 247);
  --em-rgb-background: var(--rgb-background, 21, 22, 23);
  --em-rgb-input: var(--rgb-input, 0, 0, 0);
  --em-color-border: var(--color-border, rgba(255, 255, 255, .1));
  --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));
}

#root {
  --color-a: rgb(var(--em-rgb-color));
  --color-b: rgba(var(--em-rgb-color), .65);
  --color-c: rgba(var(--em-rgb-color), .45);
  --padding: 12px;
  --padding-small: calc(var(--padding) / 2);
  --sidebar-width: 16px;
  --duration: 225ms;
  --duration-fast: 125ms;
  --duration-instant: 50ms;
  --easing: cubic-bezier(.4, 0, .2, 1);
  width: 100%;
  text-align: left;
  border-radius: var(--border-radius);
  background-color: rgb(var(--em-rgb-background));
  position: relative;
}

@media (prefers-reduced-motion) {
  #root {
    --duration: 0;
    --duration-fast: 0;
    --duration-instant: 0;
  }
}

#root[data-menu] button {
  cursor: auto;
}

#root[data-menu] .menu button {
  cursor: pointer;
}

:host, #root, input, button {
  color: rgb(var(--em-rgb-color));
  font-family: var(--font-family);
  font-size: var(--font-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: normal;
}

*, :before, :after {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.relative {
  position: relative;
}

.flex {
  display: flex;
}

.flex-auto {
  flex: none;
}

.flex-center {
  justify-content: center;
}

.flex-column {
  flex-direction: column;
}

.flex-grow {
  flex: auto;
}

.flex-middle {
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.padding {
  padding: var(--padding);
}

.padding-t {
  padding-top: var(--padding);
}

.padding-lr {
  padding-left: var(--padding);
  padding-right: var(--padding);
}

.padding-r {
  padding-right: var(--padding);
}

.padding-small {
  padding: var(--padding-small);
}

.padding-small-b {
  padding-bottom: var(--padding-small);
}

.padding-small-lr {
  padding-left: var(--padding-small);
  padding-right: var(--padding-small);
}

.margin {
  margin: var(--padding);
}

.margin-r {
  margin-right: var(--padding);
}

.margin-l {
  margin-left: var(--padding);
}

.margin-small-l {
  margin-left: var(--padding-small);
}

.margin-small-lr {
  margin-left: var(--padding-small);
  margin-right: var(--padding-small);
}

.align-l {
  text-align: left;
}

.align-r {
  text-align: right;
}

.color-a {
  color: var(--color-a);
}

.color-b {
  color: var(--color-b);
}

.color-c {
  color: var(--color-c);
}

.ellipsis {
  white-space: nowrap;
  max-width: 100%;
  width: auto;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  top: auto;
  left: -10000px;
  overflow: hidden;
}

a {
  cursor: pointer;
  color: rgb(var(--em-rgb-accent));
}

a:hover {
  text-decoration: underline;
}

.spacer {
  height: 10px;
}

[dir="rtl"] .scroll {
  padding-left: 0;
  padding-right: var(--padding);
}

.scroll {
  padding-right: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.scroll::-webkit-scrollbar {
  width: var(--sidebar-width);
  height: var(--sidebar-width);
}

.scroll::-webkit-scrollbar-track {
  border: 0;
}

.scroll::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.scroll::-webkit-scrollbar-corner {
  background-color: rgba(0, 0, 0, 0);
}

.scroll::-webkit-scrollbar-thumb {
  min-height: 20%;
  min-height: 65px;
  border: 4px solid rgb(var(--em-rgb-background));
  border-radius: 8px;
}

.scroll::-webkit-scrollbar-thumb:hover {
  background-color: var(--em-color-border-over) !important;
}

.scroll:hover::-webkit-scrollbar-thumb {
  background-color: var(--em-color-border);
}

.sticky {
  z-index: 1;
  background-color: rgba(var(--em-rgb-background), .9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-weight: 500;
  position: sticky;
  top: -1px;
}

[dir="rtl"] .search input[type="search"] {
  padding: 10px 2.2em 10px 2em;
}

[dir="rtl"] .search .loupe {
  left: auto;
  right: .7em;
}

[dir="rtl"] .search .delete {
  left: .7em;
  right: auto;
}

.search {
  z-index: 2;
  position: relative;
}

.search input, .search button {
  font-size: calc(var(--font-size)  - 1px);
}

.search input[type="search"] {
  width: 100%;
  background-color: var(--em-color-border);
  transition-duration: var(--duration);
  transition-property: background-color, box-shadow;
  transition-timing-function: var(--easing);
  border: 0;
  border-radius: 10px;
  outline: 0;
  padding: 10px 2em 10px 2.2em;
  display: block;
}

.search input[type="search"]::-ms-input-placeholder {
  color: inherit;
  opacity: .6;
}

.search input[type="search"]::placeholder {
  color: inherit;
  opacity: .6;
}

.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  -ms-appearance: none;
  appearance: none;
}

.search input[type="search"]:focus {
  background-color: rgb(var(--em-rgb-input));
  box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2);
}

.search .icon {
  z-index: 1;
  color: rgba(var(--em-rgb-color), .7);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.search .loupe {
  pointer-events: none;
  left: .7em;
}

.search .delete {
  right: .7em;
}

svg {
  fill: currentColor;
  width: 1em;
  height: 1em;
}

button {
  -webkit-appearance: none;
  -ms-appearance: none;
  appearance: none;
  cursor: pointer;
  color: currentColor;
  background-color: rgba(0, 0, 0, 0);
  border: 0;
}

#nav {
  z-index: 2;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-right: var(--sidebar-width);
  position: relative;
}

#nav button {
  color: var(--color-b);
  transition: color var(--duration) var(--easing);
}

#nav button:hover {
  color: var(--color-a);
}

#nav svg, #nav img {
  width: var(--category-icon-size);
  height: var(--category-icon-size);
}

#nav[dir="rtl"] .bar {
  left: auto;
  right: 0;
}

#nav .bar {
  width: 100%;
  height: 3px;
  background-color: rgb(var(--em-rgb-accent));
  transition: transform var(--duration) var(--easing);
  border-radius: 3px 3px 0 0;
  position: absolute;
  bottom: -12px;
  left: 0;
}

#nav button[aria-selected] {
  color: rgb(var(--em-rgb-accent));
}

#preview {
  z-index: 2;
  padding: calc(var(--padding)  + 4px) var(--padding);
  padding-right: var(--sidebar-width);
  position: relative;
}

#preview .preview-placeholder {
  font-size: var(--preview-placeholder-size);
}

#preview .preview-title {
  font-size: var(--preview-title-size);
}

#preview .preview-subtitle {
  font-size: var(--preview-subtitle-size);
}

#nav:before, #preview:before {
  content: "";
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
}

#nav[data-position="top"]:before, #preview[data-position="top"]:before {
  background: linear-gradient(to bottom, var(--em-color-border), transparent);
  top: 100%;
}

#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before {
  background: linear-gradient(to top, var(--em-color-border), transparent);
  bottom: 100%;
}

.category:last-child {
  min-height: calc(100% + 1px);
}

.category button {
  font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;
  position: relative;
}

.category button > * {
  position: relative;
}

.category button .background {
  opacity: 0;
  background-color: var(--em-color-border);
  transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.category button:hover .background {
  transition-duration: var(--duration-instant);
  transition-delay: 0s;
}

.category button[aria-selected] .background {
  opacity: 1;
}

.category button[data-keyboard] .background {
  transition: none;
}

.row {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.skin-tone-button {
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 100%;
}

.skin-tone-button:hover {
  border-color: var(--em-color-border);
}

.skin-tone-button:active .skin-tone {
  transform: scale(.85) !important;
}

.skin-tone-button .skin-tone {
  transition: transform var(--duration) var(--easing);
}

.skin-tone-button[aria-selected] {
  background-color: var(--em-color-border);
  border-top-color: rgba(0, 0, 0, .05);
  border-bottom-color: rgba(0, 0, 0, 0);
  border-left-width: 0;
  border-right-width: 0;
}

.skin-tone-button[aria-selected] .skin-tone {
  transform: scale(.9);
}

.menu {
  z-index: 2;
  white-space: nowrap;
  border: 1px solid var(--em-color-border);
  background-color: rgba(var(--em-rgb-background), .9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition-property: opacity, transform;
  transition-duration: var(--duration);
  transition-timing-function: var(--easing);
  border-radius: 10px;
  padding: 4px;
  position: absolute;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, .05);
}

.menu.hidden {
  opacity: 0;
}

.menu[data-position="bottom"] {
  transform-origin: 100% 100%;
}

.menu[data-position="bottom"].hidden {
  transform: scale(.9)rotate(-3deg)translateY(5%);
}

.menu[data-position="top"] {
  transform-origin: 100% 0;
}

.menu[data-position="top"].hidden {
  transform: scale(.9)rotate(3deg)translateY(-5%);
}

.menu input[type="radio"] {
  clip: rect(0 0 0 0);
  width: 1px;
  height: 1px;
  border: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.menu input[type="radio"]:checked + .option {
  box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));
}

.option {
  width: 100%;
  border-radius: 6px;
  padding: 4px 6px;
}

.option:hover {
  color: #fff;
  background-color: rgb(var(--em-rgb-accent));
}

.skin-tone {
  width: 16px;
  height: 16px;
  border-radius: 100%;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.skin-tone:after {
  content: "";
  mix-blend-mode: overlay;
  background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0));
  border: 1px solid rgba(0, 0, 0, .8);
  border-radius: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;
}

.skin-tone-1 {
  background-color: #ffc93a;
}

.skin-tone-2 {
  background-color: #ffdab7;
}

.skin-tone-3 {
  background-color: #e7b98f;
}

.skin-tone-4 {
  background-color: #c88c61;
}

.skin-tone-5 {
  background-color: #a46134;
}

.skin-tone-6 {
  background-color: #5d4437;
}

[data-index] {
  justify-content: space-between;
}

[data-emoji-set="twitter"] .skin-tone:after {
  box-shadow: none;
  border-color: rgba(0, 0, 0, .5);
}

[data-emoji-set="twitter"] .skin-tone-1 {
  background-color: #fade72;
}

[data-emoji-set="twitter"] .skin-tone-2 {
  background-color: #f3dfd0;
}

[data-emoji-set="twitter"] .skin-tone-3 {
  background-color: #eed3a8;
}

[data-emoji-set="twitter"] .skin-tone-4 {
  background-color: #cfad8d;
}

[data-emoji-set="twitter"] .skin-tone-5 {
  background-color: #a8805d;
}

[data-emoji-set="twitter"] .skin-tone-6 {
  background-color: #765542;
}

[data-emoji-set="google"] .skin-tone:after {
  box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4);
}

[data-emoji-set="google"] .skin-tone-1 {
  background-color: #f5c748;
}

[data-emoji-set="google"] .skin-tone-2 {
  background-color: #f1d5aa;
}

[data-emoji-set="google"] .skin-tone-3 {
  background-color: #d4b48d;
}

[data-emoji-set="google"] .skin-tone-4 {
  background-color: #aa876b;
}

[data-emoji-set="google"] .skin-tone-5 {
  background-color: #916544;
}

[data-emoji-set="google"] .skin-tone-6 {
  background-color: #61493f;
}

[data-emoji-set="facebook"] .skin-tone:after {
  border-color: rgba(0, 0, 0, .4);
  box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;
}

[data-emoji-set="facebook"] .skin-tone-1 {
  background-color: #f5c748;
}

[data-emoji-set="facebook"] .skin-tone-2 {
  background-color: #f1d5aa;
}

[data-emoji-set="facebook"] .skin-tone-3 {
  background-color: #d4b48d;
}

[data-emoji-set="facebook"] .skin-tone-4 {
  background-color: #aa876b;
}

[data-emoji-set="facebook"] .skin-tone-5 {
  background-color: #916544;
}

[data-emoji-set="facebook"] .skin-tone-6 {
  background-color: #61493f;
}

`;
U1({ data: KU });
const N6e = function({ index: t, isSelected: e, onClick: n, onMouseEnter: i, emoji: r }) {
  const s = j.useRef(null);
  return r.ref = s, /* @__PURE__ */ y.jsxs(
    "li",
    {
      ref: r.ref,
      "aria-selected": e,
      className: `mb-0 flex cursor-pointer items-center gap-2 whitespace-nowrap rounded-md px-2 py-1 font-sans text-sm leading-[1.65] tracking-wide text-grey-800 dark:text-grey-200 ${e ? "bg-grey-100 text-grey-900 dark:bg-grey-900 dark:text-white" : ""}`,
      "data-testid": "emoji-option-" + t,
      id: "emoji-option-" + t,
      role: "option",
      tabIndex: -1,
      onClick: n,
      onMouseEnter: i,
      children: [
        /* @__PURE__ */ y.jsx("span", { className: "font-serif text-lg", children: r.skins[0].native }),
        /* @__PURE__ */ y.jsx("span", { className: "truncate", children: r.id })
      ]
    },
    r.id
  );
};
function VE() {
  const [t] = Oe.useLexicalComposerContext(), [e, n] = j.useState(null), [i, r] = j.useState(null), s = $Ce(":", { minLength: 1 }), o = () => t.getEditorState().read(() => {
    const d = N.$getSelection().anchor.getNode();
    return !!(d && N.$isTextNode(d) && d.hasFormat("code"));
  });
  j.useEffect(() => lt.mergeRegister(
    t.registerCommand(
      N.KEY_DOWN_COMMAND,
      async (f) => {
        if (!e)
          return !1;
        if (f.key === ":") {
          if (o() === !0)
            return !1;
          const d = await Oa.search(e);
          if (d.length === 0)
            return;
          if ((d == null ? void 0 : d[0].id) === e)
            return a(d[0]), f.preventDefault(), !0;
        }
        return !1;
      },
      N.COMMAND_PRIORITY_HIGH
    )
  ));
  const a = j.useCallback((f) => {
    t.update(() => {
      const d = N.$getSelection();
      if (!N.$isRangeSelection(d) || f === null)
        return;
      const h = d.anchor.getNode(), m = f.id.length + 1;
      h.spliceText(d.anchor.offset - m, m, f.skins[0].native, !0).setFormat(d.format), pi("Emoji Inserted", { method: "completed" });
    });
  }, [t]);
  j.useEffect(() => {
    if (!e) {
      r(null);
      return;
    }
    async function f() {
      let d = [];
      [")", "-)"].includes(e) ? d = await Oa.search("smile") : ["(", "-("].includes(e) ? d = await Oa.search("frown") : d = await Oa.search(e), r(d);
    }
    f();
  }, [e]);
  const l = j.useCallback((f, d, h) => {
    t.update(() => {
      const m = N.$getSelection();
      if (!N.$isRangeSelection(m) || f === null)
        return;
      d && d.remove();
      const g = N.$createTextNode(f.skins[0].native);
      g.setFormat(m.format), m.insertNodes([g]), h(), pi("Emoji Inserted", { method: "selected" });
    });
  }, [t]);
  j.useEffect(() => {
    const f = (d) => {
      d.key === "Escape" && r(null);
    };
    return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
  });
  function u() {
    return {
      marginTop: `${window.getSelection().getRangeAt(0).getBoundingClientRect().height}px`
    };
  }
  return /* @__PURE__ */ y.jsx(
    QCe.LexicalTypeaheadMenuPlugin,
    {
      menuRenderFn: (f, { selectedIndex: d, selectOptionAndCleanUp: h, setHighlightedIndex: m }) => f.current === null || !i || i.length === 0 ? null : /* @__PURE__ */ y.jsx(Ff, { className: "w-[240px]", to: f.current, children: /* @__PURE__ */ y.jsx("ul", { className: "relative z-10 max-h-[214px] select-none scroll-p-2 list-none overflow-y-auto rounded-md bg-white p-1  shadow-md dark:bg-grey-950", "data-testid": "emoji-menu", style: u(), children: i.map((g, w) => /* @__PURE__ */ y.jsx("div", { children: /* @__PURE__ */ y.jsx(
        N6e,
        {
          emoji: g,
          index: w,
          isSelected: d === w,
          onClick: (x) => {
            m(w), h(g), x.stopPropagation(), x.preventDefault();
          },
          onMouseEnter: () => {
            m(w);
          }
        }
      ) }, g.id)) }) }),
      options: i,
      triggerFn: s,
      onQueryChange: n,
      onSelectOption: l
    }
  );
}
const A6e = ({ text: t = "Type here" }) => /* @__PURE__ */ y.jsx("div", { className: "pointer-events-none absolute left-0 top-0 !m-0 min-w-full cursor-text font-sans text-sm font-normal leading-[24px] tracking-wide text-grey-500 dark:text-grey-800", children: t });
function D6e({ parentEditor: t }) {
  const [e] = Oe.useLexicalComposerContext(), { setCaptionHasFocus: n, captionHasFocus: i, nodeKey: r, isSelected: s } = Au(gn), o = $t((a) => {
    s && (a.target.matches("input, textarea") || !i && a.key.length === 1 && !a.ctrlKey && !a.metaKey && !a.altKey && e.focus());
  }, [e, i, s]);
  return j.useEffect(() => (document.addEventListener("keydown", o), () => {
    document.removeEventListener("keydown", o);
  }), [o, e]), j.useEffect(
    () => lt.mergeRegister(
      e.registerCommand(
        N.FOCUS_COMMAND,
        () => (n(!0), !1),
        N.COMMAND_PRIORITY_LOW
      ),
      e.registerCommand(
        N.BLUR_COMMAND,
        () => (n(!1), !1),
        N.COMMAND_PRIORITY_LOW
      ),
      e.registerCommand(
        N.KEY_ENTER_COMMAND,
        (a) => document.querySelector("#typeahead-menu") || a.shiftKey ? !1 : (a._fromNested = !0, e._parentEditor.dispatchCommand(N.KEY_ENTER_COMMAND, a), !0),
        N.COMMAND_PRIORITY_LOW
      ),
      e.registerCommand(
        N.KEY_ARROW_DOWN_COMMAND,
        (a) => document.querySelector("#typeahead-menu") ? !1 : (a._fromCaptionEditor = !0, e._parentEditor.dispatchCommand(N.KEY_ARROW_DOWN_COMMAND, a), !0),
        N.COMMAND_PRIORITY_HIGH
      ),
      e.registerCommand(
        N.KEY_ARROW_UP_COMMAND,
        (a) => document.querySelector("#typeahead-menu") ? !1 : (a._fromCaptionEditor = !0, e._parentEditor.dispatchCommand(N.KEY_ARROW_UP_COMMAND, a), !0),
        N.COMMAND_PRIORITY_HIGH
      )
    ),
    [e, n, t, r]
  ), null;
}
const P6e = ({ paragraphs: t = 1, captionEditor: e, captionEditorInitialState: n, placeholderText: i, className: r = "koenig-lexical-caption" }) => {
  const [s] = Oe.useLexicalComposerContext();
  return /* @__PURE__ */ y.jsx(
    hee,
    {
      initialEditor: e,
      initialEditorState: n,
      initialNodes: pr,
      children: /* @__PURE__ */ y.jsxs(
        lx,
        {
          className: r,
          markdownTransformers: IX,
          placeholder: /* @__PURE__ */ y.jsx(A6e, { text: i }),
          children: [
            /* @__PURE__ */ y.jsx(D6e, { parentEditor: s }),
            /* @__PURE__ */ y.jsx(i_, { paragraphs: t }),
            /* @__PURE__ */ y.jsx(VE, {})
          ]
        }
      )
    }
  );
};
function Yw({ value: t, onChange: e, ...n }) {
  const i = (r) => {
    e(r);
  };
  return /* @__PURE__ */ y.jsx(
    "input",
    {
      defaultValue: t,
      onChange: i,
      ...n
    }
  );
}
var hc = {}, Ur = N;
function XE(t, e = !0) {
  return t ? !1 : (t = EZ(), e && (t = t.trim()), t === "");
}
function EZ() {
  return Ur.$getRoot().getTextContent();
}
function TZ(t) {
  if (!XE(t, !1)) return !1;
  t = Ur.$getRoot().getChildren();
  let e = t.length;
  if (1 < e) return !1;
  for (let i = 0; i < e; i++) {
    var n = t[i];
    if (Ur.$isDecoratorNode(n)) return !1;
    if (Ur.$isElementNode(n)) {
      if (!Ur.$isParagraphNode(n) || n.__indent !== 0) return !1;
      n = n.getChildren();
      let r = n.length;
      for (let s = 0; s < r; s++) if (!Ur.$isTextNode(n[i])) return !1;
    }
  }
  return !0;
}
hc.$canShowPlaceholder = TZ;
hc.$canShowPlaceholderCurry = function(t) {
  return () => TZ(t);
};
hc.$findTextIntersectionFromCharacters = function(t, e) {
  var n = t.getFirstChild();
  t = 0;
  e: for (; n !== null; ) {
    if (Ur.$isElementNode(n)) {
      var i = n.getFirstChild();
      if (i !== null) {
        n = i;
        continue;
      }
    } else if (Ur.$isTextNode(n)) {
      if (i = n.getTextContentSize(), t + i > e) return { node: n, offset: e - t };
      t += i;
    }
    if (i = n.getNextSibling(), i !== null) n = i;
    else {
      for (n = n.getParent(); n !== null; ) {
        if (i = n.getNextSibling(), i !== null) {
          n = i;
          continue e;
        }
        n = n.getParent();
      }
      break;
    }
  }
  return null;
};
hc.$isRootTextContentEmpty = XE;
hc.$isRootTextContentEmptyCurry = function(t, e) {
  return () => XE(t, e);
};
hc.$rootTextContent = EZ;
hc.registerLexicalTextEntity = function(t, e, n, i) {
  let r = (o) => {
    const a = Ur.$createTextNode(o.getTextContent());
    a.setFormat(o.getFormat()), o.replace(a);
  }, s = t.registerNodeTransform(Ur.TextNode, (o) => {
    if (o.isSimpleText()) {
      var a = o.getPreviousSibling(), l = o.getTextContent(), u = o;
      if (Ur.$isTextNode(a)) {
        var f = a.getTextContent(), d = e(f + l);
        if (a instanceof n) {
          if (d === null || a.getLatest().__mode !== 0) {
            r(a);
            return;
          }
          if (d = d.end - f.length, 0 < d) {
            u = l.slice(0, d), u = f + u, a.select(), a.setTextContent(u), d === l.length ? o.remove() : (a = l.slice(d), o.setTextContent(a));
            return;
          }
        } else if (d === null || d.start < f.length) return;
      }
      for (; ; ) {
        if (o = e(l), l = d = o === null ? "" : l.slice(o.end), d === "") {
          if (f = u.getNextSibling(), Ur.$isTextNode(f)) {
            if (d = u.getTextContent() + f.getTextContent(), d = e(d), d === null) {
              f instanceof n ? r(f) : f.markDirty();
              break;
            } else if (d.start !== 0) break;
          }
        } else if (f = e(d), f !== null && f.start === 0) break;
        if (o === null) break;
        if (o.start === 0 && Ur.$isTextNode(a) && a.isTextEntity()) continue;
        let h;
        if (o.start === 0 ? [h, u] = u.splitText(o.end) : [, h, u] = u.splitText(o.start, o.end), o = i(h), o.setFormat(h.getFormat()), h.replace(o), u == null) break;
      }
    }
  });
  return t = t.registerNodeTransform(n, (o) => {
    var a = o.getTextContent();
    const l = e(a);
    l === null || l.start !== 0 ? r(o) : a.length > l.end ? o.splitText(l.end) : (a = o.getPreviousSibling(), Ur.$isTextNode(a) && a.isTextEntity() && (r(a), r(o)), a = o.getNextSibling(), Ur.$isTextNode(a) && a.isTextEntity() && (r(a), o instanceof n && r(o)));
  }), [s, t];
};
const I6e = hc;
var ho = I6e;
function po(t) {
  return (t._pendingEditorState || t.getEditorState()).read(ho.$canShowPlaceholderCurry(!1));
}
function L6e({ captionEditor: t, captionEditorInitialState: e, placeholder: n, dataTestId: i }) {
  return /* @__PURE__ */ y.jsx(
    "div",
    {
      className: "m-0 w-full px-9 text-center",
      "data-testid": i,
      "data-kg-allow-clickthrough": !0,
      children: /* @__PURE__ */ y.jsx(
        P6e,
        {
          captionEditor: t,
          captionEditorInitialState: e,
          placeholderText: n
        }
      )
    }
  );
}
function R6e({ value: t, placeholder: e, onChange: n, readOnly: i, dataTestId: r, autoFocus: s = !0 }) {
  const o = (a) => {
    n == null || n(a.target.value);
  };
  return /* @__PURE__ */ y.jsx(
    Yw,
    {
      autoFocus: s,
      className: "not-kg-prose w-full bg-transparent px-9 text-center font-sans text-sm font-normal leading-[1.625] tracking-wide text-grey-800 placeholder:text-grey-500 dark:text-grey-500 dark:placeholder:text-grey-800",
      "data-testid": r,
      placeholder: e,
      readOnly: i,
      value: t,
      "data-koenig-dnd-disabled": !0,
      onChange: o
    }
  );
}
function j6e({ isEditingAlt: t, onClick: e }) {
  return /* @__PURE__ */ y.jsx(
    "button",
    {
      className: `absolute bottom-0 right-0 m-2 cursor-pointer rounded-md border px-1 font-sans text-[1.3rem] font-normal leading-7 tracking-wide transition-all duration-100 ${t ? "border-green bg-green text-white" : "border-grey text-grey"} `,
      "data-testid": "alt-toggle-button",
      name: "alt-toggle-button",
      type: "button",
      onClick: e,
      children: "Alt"
    }
  );
}
function gp({
  altText: t,
  altTextPlaceholder: e,
  setAltText: n,
  captionEditor: i,
  captionEditorInitialState: r,
  captionPlaceholder: s,
  isSelected: o,
  readOnly: a,
  dataTestId: l
}) {
  const [u, f] = j.useState(!1), d = (g) => {
    g.stopPropagation(), f(!u);
  };
  j.useEffect(() => {
    o || f(!1);
  }, [o, f]);
  const h = po(i), m = n && o;
  return (o || !h) && /* @__PURE__ */ y.jsxs("figcaption", { className: "flex min-h-[40px] w-full p-2", children: [
    u ? /* @__PURE__ */ y.jsx(R6e, { dataTestId: l, placeholder: e, readOnly: a, value: t, onChange: n }) : /* @__PURE__ */ y.jsx(L6e, { captionEditor: i, captionEditorInitialState: r, dataTestId: l, placeholder: s }),
    m && /* @__PURE__ */ y.jsx(j6e, { isEditingAlt: u, onClick: d })
  ] });
}
class Vw {
  /**
  @internal
  */
  constructor(e, n, i, r, s, o, a, l, u, f = 0, d) {
    this.p = e, this.stack = n, this.state = i, this.reducePos = r, this.pos = s, this.score = o, this.buffer = a, this.bufferBase = l, this.curContext = u, this.lookAhead = f, this.parent = d;
  }
  /**
  @internal
  */
  toString() {
    return `[${this.stack.filter((e, n) => n % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
  }
  // Start an empty stack
  /**
  @internal
  */
  static start(e, n, i = 0) {
    let r = e.parser.context;
    return new Vw(e, [], n, i, i, 0, [], 0, r ? new pP(r, r.start) : null, 0, null);
  }
  /**
  The stack's current [context](#lr.ContextTracker) value, if
  any. Its type will depend on the context tracker's type
  parameter, or it will be `null` if there is no context
  tracker.
  */
  get context() {
    return this.curContext ? this.curContext.context : null;
  }
  // Push a state onto the stack, tracking its start position as well
  // as the buffer base at that point.
  /**
  @internal
  */
  pushState(e, n) {
    this.stack.push(this.state, n, this.bufferBase + this.buffer.length), this.state = e;
  }
  // Apply a reduce action
  /**
  @internal
  */
  reduce(e) {
    var n;
    let i = e >> 19, r = e & 65535, { parser: s } = this.p, o = s.dynamicPrecedence(r);
    if (o && (this.score += o), i == 0) {
      this.pushState(s.getGoto(this.state, r, !0), this.reducePos), r < s.minRepeatTerm && this.storeNode(r, this.reducePos, this.reducePos, 4, !0), this.reduceContext(r, this.reducePos);
      return;
    }
    let a = this.stack.length - (i - 1) * 3 - (e & 262144 ? 6 : 0), l = a ? this.stack[a - 2] : this.p.ranges[0].from, u = this.reducePos - l;
    u >= 2e3 && !(!((n = this.p.parser.nodeSet.types[r]) === null || n === void 0) && n.isAnonymous) && (l == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = l, this.p.lastBigReductionSize = u));
    let f = a ? this.stack[a - 1] : 0, d = this.bufferBase + this.buffer.length - f;
    if (r < s.minRepeatTerm || e & 131072) {
      let h = s.stateFlag(
        this.state,
        1
        /* StateFlag.Skipped */
      ) ? this.pos : this.reducePos;
      this.storeNode(r, l, h, d + 4, !0);
    }
    if (e & 262144)
      this.state = this.stack[a];
    else {
      let h = this.stack[a - 3];
      this.state = s.getGoto(h, r, !0);
    }
    for (; this.stack.length > a; )
      this.stack.pop();
    this.reduceContext(r, l);
  }
  // Shift a value into the buffer
  /**
  @internal
  */
  storeNode(e, n, i, r = 4, s = !1) {
    if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
      let o = this, a = this.buffer.length;
      if (a == 0 && o.parent && (a = o.bufferBase - o.parent.bufferBase, o = o.parent), a > 0 && o.buffer[a - 4] == 0 && o.buffer[a - 1] > -1) {
        if (n == i)
          return;
        if (o.buffer[a - 2] >= n) {
          o.buffer[a - 2] = i;
          return;
        }
      }
    }
    if (!s || this.pos == i)
      this.buffer.push(e, n, i, r);
    else {
      let o = this.buffer.length;
      if (o > 0 && this.buffer[o - 4] != 0)
        for (; o > 0 && this.buffer[o - 2] > i; )
          this.buffer[o] = this.buffer[o - 4], this.buffer[o + 1] = this.buffer[o - 3], this.buffer[o + 2] = this.buffer[o - 2], this.buffer[o + 3] = this.buffer[o - 1], o -= 4, r > 4 && (r -= 4);
      this.buffer[o] = e, this.buffer[o + 1] = n, this.buffer[o + 2] = i, this.buffer[o + 3] = r;
    }
  }
  // Apply a shift action
  /**
  @internal
  */
  shift(e, n, i, r) {
    if (e & 131072)
      this.pushState(e & 65535, this.pos);
    else if (e & 262144)
      this.pos = r, this.shiftContext(n, i), n <= this.p.parser.maxNode && this.buffer.push(n, i, r, 4);
    else {
      let s = e, { parser: o } = this.p;
      (r > this.pos || n <= o.maxNode) && (this.pos = r, o.stateFlag(
        s,
        1
        /* StateFlag.Skipped */
      ) || (this.reducePos = r)), this.pushState(s, i), this.shiftContext(n, i), n <= o.maxNode && this.buffer.push(n, i, r, 4);
    }
  }
  // Apply an action
  /**
  @internal
  */
  apply(e, n, i, r) {
    e & 65536 ? this.reduce(e) : this.shift(e, n, i, r);
  }
  // Add a prebuilt (reused) node into the buffer.
  /**
  @internal
  */
  useNode(e, n) {
    let i = this.p.reused.length - 1;
    (i < 0 || this.p.reused[i] != e) && (this.p.reused.push(e), i++);
    let r = this.pos;
    this.reducePos = this.pos = r + e.length, this.pushState(n, r), this.buffer.push(
      i,
      r,
      this.reducePos,
      -1
      /* size == -1 means this is a reused value */
    ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
  }
  // Split the stack. Due to the buffer sharing and the fact
  // that `this.stack` tends to stay quite shallow, this isn't very
  // expensive.
  /**
  @internal
  */
  split() {
    let e = this, n = e.buffer.length;
    for (; n > 0 && e.buffer[n - 2] > e.reducePos; )
      n -= 4;
    let i = e.buffer.slice(n), r = e.bufferBase + n;
    for (; e && r == e.bufferBase; )
      e = e.parent;
    return new Vw(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, i, r, this.curContext, this.lookAhead, e);
  }
  // Try to recover from an error by 'deleting' (ignoring) one token.
  /**
  @internal
  */
  recoverByDelete(e, n) {
    let i = e <= this.p.parser.maxNode;
    i && this.storeNode(e, this.pos, n, 4), this.storeNode(0, this.pos, n, i ? 8 : 4), this.pos = this.reducePos = n, this.score -= 190;
  }
  /**
  Check if the given term would be able to be shifted (optionally
  after some reductions) on this stack. This can be useful for
  external tokenizers that want to make sure they only provide a
  given token when it applies.
  */
  canShift(e) {
    for (let n = new F6e(this); ; ) {
      let i = this.p.parser.stateSlot(
        n.state,
        4
        /* ParseState.DefaultReduce */
      ) || this.p.parser.hasAction(n.state, e);
      if (i == 0)
        return !1;
      if (!(i & 65536))
        return !0;
      n.reduce(i);
    }
  }
  // Apply up to Recover.MaxNext recovery actions that conceptually
  // inserts some missing token or rule.
  /**
  @internal
  */
  recoverByInsert(e) {
    if (this.stack.length >= 300)
      return [];
    let n = this.p.parser.nextStates(this.state);
    if (n.length > 8 || this.stack.length >= 120) {
      let r = [];
      for (let s = 0, o; s < n.length; s += 2)
        (o = n[s + 1]) != this.state && this.p.parser.hasAction(o, e) && r.push(n[s], o);
      if (this.stack.length < 120)
        for (let s = 0; r.length < 8 && s < n.length; s += 2) {
          let o = n[s + 1];
          r.some((a, l) => l & 1 && a == o) || r.push(n[s], o);
        }
      n = r;
    }
    let i = [];
    for (let r = 0; r < n.length && i.length < 4; r += 2) {
      let s = n[r + 1];
      if (s == this.state)
        continue;
      let o = this.split();
      o.pushState(s, this.pos), o.storeNode(0, o.pos, o.pos, 4, !0), o.shiftContext(n[r], this.pos), o.reducePos = this.pos, o.score -= 200, i.push(o);
    }
    return i;
  }
  // Force a reduce, if possible. Return false if that can't
  // be done.
  /**
  @internal
  */
  forceReduce() {
    let { parser: e } = this.p, n = e.stateSlot(
      this.state,
      5
      /* ParseState.ForcedReduce */
    );
    if (!(n & 65536))
      return !1;
    if (!e.validAction(this.state, n)) {
      let i = n >> 19, r = n & 65535, s = this.stack.length - i * 3;
      if (s < 0 || e.getGoto(this.stack[s], r, !1) < 0) {
        let o = this.findForcedReduction();
        if (o == null)
          return !1;
        n = o;
      }
      this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
    }
    return this.reducePos = this.pos, this.reduce(n), !0;
  }
  /**
  Try to scan through the automaton to find some kind of reduction
  that can be applied. Used when the regular ForcedReduce field
  isn't a valid action. @internal
  */
  findForcedReduction() {
    let { parser: e } = this.p, n = [], i = (r, s) => {
      if (!n.includes(r))
        return n.push(r), e.allActions(r, (o) => {
          if (!(o & 393216)) if (o & 65536) {
            let a = (o >> 19) - s;
            if (a > 1) {
              let l = o & 65535, u = this.stack.length - a * 3;
              if (u >= 0 && e.getGoto(this.stack[u], l, !1) >= 0)
                return a << 19 | 65536 | l;
            }
          } else {
            let a = i(o, s + 1);
            if (a != null)
              return a;
          }
        });
    };
    return i(this.state, 0);
  }
  /**
  @internal
  */
  forceAll() {
    for (; !this.p.parser.stateFlag(
      this.state,
      2
      /* StateFlag.Accepting */
    ); )
      if (!this.forceReduce()) {
        this.storeNode(0, this.pos, this.pos, 4, !0);
        break;
      }
    return this;
  }
  /**
  Check whether this state has no further actions (assumed to be a direct descendant of the
  top state, since any other states must be able to continue
  somehow). @internal
  */
  get deadEnd() {
    if (this.stack.length != 3)
      return !1;
    let { parser: e } = this.p;
    return e.data[e.stateSlot(
      this.state,
      1
      /* ParseState.Actions */
    )] == 65535 && !e.stateSlot(
      this.state,
      4
      /* ParseState.DefaultReduce */
    );
  }
  /**
  Restart the stack (put it back in its start state). Only safe
  when this.stack.length == 3 (state is directly below the top
  state). @internal
  */
  restart() {
    this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
  }
  /**
  @internal
  */
  sameState(e) {
    if (this.state != e.state || this.stack.length != e.stack.length)
      return !1;
    for (let n = 0; n < this.stack.length; n += 3)
      if (this.stack[n] != e.stack[n])
        return !1;
    return !0;
  }
  /**
  Get the parser used by this stack.
  */
  get parser() {
    return this.p.parser;
  }
  /**
  Test whether a given dialect (by numeric ID, as exported from
  the terms file) is enabled.
  */
  dialectEnabled(e) {
    return this.p.parser.dialect.flags[e];
  }
  shiftContext(e, n) {
    this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(n)));
  }
  reduceContext(e, n) {
    this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(n)));
  }
  /**
  @internal
  */
  emitContext() {
    let e = this.buffer.length - 1;
    (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
  }
  /**
  @internal
  */
  emitLookAhead() {
    let e = this.buffer.length - 1;
    (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
  }
  updateContext(e) {
    if (e != this.curContext.context) {
      let n = new pP(this.curContext.tracker, e);
      n.hash != this.curContext.hash && this.emitContext(), this.curContext = n;
    }
  }
  /**
  @internal
  */
  setLookAhead(e) {
    e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
  }
  /**
  @internal
  */
  close() {
    this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
  }
}
class pP {
  constructor(e, n) {
    this.tracker = e, this.context = n, this.hash = e.strict ? e.hash(n) : 0;
  }
}
class F6e {
  constructor(e) {
    this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
  }
  reduce(e) {
    let n = e & 65535, i = e >> 19;
    i == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (i - 1) * 3;
    let r = this.start.p.parser.getGoto(this.stack[this.base - 3], n, !0);
    this.state = r;
  }
}
class Xw {
  constructor(e, n, i) {
    this.stack = e, this.pos = n, this.index = i, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
  }
  static create(e, n = e.bufferBase + e.buffer.length) {
    return new Xw(e, n, n - e.bufferBase);
  }
  maybeNext() {
    let e = this.stack.parent;
    e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
  }
  get id() {
    return this.buffer[this.index - 4];
  }
  get start() {
    return this.buffer[this.index - 3];
  }
  get end() {
    return this.buffer[this.index - 2];
  }
  get size() {
    return this.buffer[this.index - 1];
  }
  next() {
    this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
  }
  fork() {
    return new Xw(this.stack, this.pos, this.index);
  }
}
function lg(t, e = Uint16Array) {
  if (typeof t != "string")
    return t;
  let n = null;
  for (let i = 0, r = 0; i < t.length; ) {
    let s = 0;
    for (; ; ) {
      let o = t.charCodeAt(i++), a = !1;
      if (o == 126) {
        s = 65535;
        break;
      }
      o >= 92 && o--, o >= 34 && o--;
      let l = o - 32;
      if (l >= 46 && (l -= 46, a = !0), s += l, a)
        break;
      s *= 46;
    }
    n ? n[r++] = s : n = new e(s);
  }
  return n;
}
class yy {
  constructor() {
    this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
  }
}
const mP = new yy();
class B6e {
  /**
  @internal
  */
  constructor(e, n) {
    this.input = e, this.ranges = n, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = mP, this.rangeIndex = 0, this.pos = this.chunkPos = n[0].from, this.range = n[0], this.end = n[n.length - 1].to, this.readNext();
  }
  /**
  @internal
  */
  resolveOffset(e, n) {
    let i = this.range, r = this.rangeIndex, s = this.pos + e;
    for (; s < i.from; ) {
      if (!r)
        return null;
      let o = this.ranges[--r];
      s -= i.from - o.to, i = o;
    }
    for (; n < 0 ? s > i.to : s >= i.to; ) {
      if (r == this.ranges.length - 1)
        return null;
      let o = this.ranges[++r];
      s += o.from - i.to, i = o;
    }
    return s;
  }
  /**
  @internal
  */
  clipPos(e) {
    if (e >= this.range.from && e < this.range.to)
      return e;
    for (let n of this.ranges)
      if (n.to > e)
        return Math.max(e, n.from);
    return this.end;
  }
  /**
  Look at a code unit near the stream position. `.peek(0)` equals
  `.next`, `.peek(-1)` gives you the previous character, and so
  on.
  
  Note that looking around during tokenizing creates dependencies
  on potentially far-away content, which may reduce the
  effectiveness incremental parsing—when looking forward—or even
  cause invalid reparses when looking backward more than 25 code
  units, since the library does not track lookbehind.
  */
  peek(e) {
    let n = this.chunkOff + e, i, r;
    if (n >= 0 && n < this.chunk.length)
      i = this.pos + e, r = this.chunk.charCodeAt(n);
    else {
      let s = this.resolveOffset(e, 1);
      if (s == null)
        return -1;
      if (i = s, i >= this.chunk2Pos && i < this.chunk2Pos + this.chunk2.length)
        r = this.chunk2.charCodeAt(i - this.chunk2Pos);
      else {
        let o = this.rangeIndex, a = this.range;
        for (; a.to <= i; )
          a = this.ranges[++o];
        this.chunk2 = this.input.chunk(this.chunk2Pos = i), i + this.chunk2.length > a.to && (this.chunk2 = this.chunk2.slice(0, a.to - i)), r = this.chunk2.charCodeAt(0);
      }
    }
    return i >= this.token.lookAhead && (this.token.lookAhead = i + 1), r;
  }
  /**
  Accept a token. By default, the end of the token is set to the
  current stream position, but you can pass an offset (relative to
  the stream position) to change that.
  */
  acceptToken(e, n = 0) {
    let i = n ? this.resolveOffset(n, -1) : this.pos;
    if (i == null || i < this.token.start)
      throw new RangeError("Token end out of bounds");
    this.token.value = e, this.token.end = i;
  }
  getChunk() {
    if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
      let { chunk: e, chunkPos: n } = this;
      this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = n, this.chunkOff = this.pos - this.chunkPos;
    } else {
      this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
      let e = this.input.chunk(this.pos), n = this.pos + e.length;
      this.chunk = n > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
    }
  }
  readNext() {
    return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
  }
  /**
  Move the stream forward N (defaults to 1) code units. Returns
  the new value of [`next`](#lr.InputStream.next).
  */
  advance(e = 1) {
    for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
      if (this.rangeIndex == this.ranges.length - 1)
        return this.setDone();
      e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
    }
    return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
  }
  setDone() {
    return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
  }
  /**
  @internal
  */
  reset(e, n) {
    if (n ? (this.token = n, n.start = e, n.lookAhead = e + 1, n.value = n.extended = -1) : this.token = mP, this.pos != e) {
      if (this.pos = e, e == this.end)
        return this.setDone(), this;
      for (; e < this.range.from; )
        this.range = this.ranges[--this.rangeIndex];
      for (; e >= this.range.to; )
        this.range = this.ranges[++this.rangeIndex];
      e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
    }
    return this;
  }
  /**
  @internal
  */
  read(e, n) {
    if (e >= this.chunkPos && n <= this.chunkPos + this.chunk.length)
      return this.chunk.slice(e - this.chunkPos, n - this.chunkPos);
    if (e >= this.chunk2Pos && n <= this.chunk2Pos + this.chunk2.length)
      return this.chunk2.slice(e - this.chunk2Pos, n - this.chunk2Pos);
    if (e >= this.range.from && n <= this.range.to)
      return this.input.read(e, n);
    let i = "";
    for (let r of this.ranges) {
      if (r.from >= n)
        break;
      r.to > e && (i += this.input.read(Math.max(r.from, e), Math.min(r.to, n)));
    }
    return i;
  }
}
class bh {
  constructor(e, n) {
    this.data = e, this.id = n;
  }
  token(e, n) {
    let { parser: i } = n.p;
    $Z(this.data, e, n, this.id, i.data, i.tokenPrecTable);
  }
}
bh.prototype.contextual = bh.prototype.fallback = bh.prototype.extend = !1;
class Gw {
  constructor(e, n, i) {
    this.precTable = n, this.elseToken = i, this.data = typeof e == "string" ? lg(e) : e;
  }
  token(e, n) {
    let i = e.pos, r = 0;
    for (; ; ) {
      let s = e.next < 0, o = e.resolveOffset(1, 1);
      if ($Z(this.data, e, n, 0, this.data, this.precTable), e.token.value > -1)
        break;
      if (this.elseToken == null)
        return;
      if (s || r++, o == null)
        break;
      e.reset(o, e.token);
    }
    r && (e.reset(i, e.token), e.acceptToken(this.elseToken, r));
  }
}
Gw.prototype.contextual = bh.prototype.fallback = bh.prototype.extend = !1;
class Vo {
  /**
  Create a tokenizer. The first argument is the function that,
  given an input stream, scans for the types of tokens it
  recognizes at the stream's position, and calls
  [`acceptToken`](#lr.InputStream.acceptToken) when it finds
  one.
  */
  constructor(e, n = {}) {
    this.token = e, this.contextual = !!n.contextual, this.fallback = !!n.fallback, this.extend = !!n.extend;
  }
}
function $Z(t, e, n, i, r, s) {
  let o = 0, a = 1 << i, { dialect: l } = n.p.parser;
  e: for (; a & t[o]; ) {
    let u = t[o + 1];
    for (let m = o + 3; m < u; m += 2)
      if ((t[m + 1] & a) > 0) {
        let g = t[m];
        if (l.allows(g) && (e.token.value == -1 || e.token.value == g || z6e(g, e.token.value, r, s))) {
          e.acceptToken(g);
          break;
        }
      }
    let f = e.next, d = 0, h = t[o + 2];
    if (e.next < 0 && h > d && t[u + h * 3 - 3] == 65535) {
      o = t[u + h * 3 - 1];
      continue e;
    }
    for (; d < h; ) {
      let m = d + h >> 1, g = u + m + (m << 1), w = t[g], x = t[g + 1] || 65536;
      if (f < w)
        h = m;
      else if (f >= x)
        d = m + 1;
      else {
        o = t[g + 2], e.advance();
        continue e;
      }
    }
    break;
  }
}
function gP(t, e, n) {
  for (let i = e, r; (r = t[i]) != 65535; i++)
    if (r == n)
      return i - e;
  return -1;
}
function z6e(t, e, n, i) {
  let r = gP(n, i, e);
  return r < 0 || gP(n, i, t) < r;
}
const $s = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
let wO = null;
function vP(t, e, n) {
  let i = t.cursor(hn.IncludeAnonymous);
  for (i.moveTo(e); ; )
    if (!(n < 0 ? i.childBefore(e) : i.childAfter(e)))
      for (; ; ) {
        if ((n < 0 ? i.to < e : i.from > e) && !i.type.isError)
          return n < 0 ? Math.max(0, Math.min(
            i.to - 1,
            e - 25
            /* Safety.Margin */
          )) : Math.min(t.length, Math.max(
            i.from + 1,
            e + 25
            /* Safety.Margin */
          ));
        if (n < 0 ? i.prevSibling() : i.nextSibling())
          break;
        if (!i.parent())
          return n < 0 ? 0 : t.length;
      }
}
class W6e {
  constructor(e, n) {
    this.fragments = e, this.nodeSet = n, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
  }
  nextFragment() {
    let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
    if (e) {
      for (this.safeFrom = e.openStart ? vP(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? vP(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
        this.trees.pop(), this.start.pop(), this.index.pop();
      this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
    } else
      this.nextStart = 1e9;
  }
  // `pos` must be >= any previously given `pos` for this cursor
  nodeAt(e) {
    if (e < this.nextStart)
      return null;
    for (; this.fragment && this.safeTo <= e; )
      this.nextFragment();
    if (!this.fragment)
      return null;
    for (; ; ) {
      let n = this.trees.length - 1;
      if (n < 0)
        return this.nextFragment(), null;
      let i = this.trees[n], r = this.index[n];
      if (r == i.children.length) {
        this.trees.pop(), this.start.pop(), this.index.pop();
        continue;
      }
      let s = i.children[r], o = this.start[n] + i.positions[r];
      if (o > e)
        return this.nextStart = o, null;
      if (s instanceof Qn) {
        if (o == e) {
          if (o < this.safeFrom)
            return null;
          let a = o + s.length;
          if (a <= this.safeTo) {
            let l = s.prop(Mt.lookAhead);
            if (!l || a + l < this.fragment.to)
              return s;
          }
        }
        this.index[n]++, o + s.length >= Math.max(this.safeFrom, e) && (this.trees.push(s), this.start.push(o), this.index.push(0));
      } else
        this.index[n]++, this.nextStart = o + s.length;
    }
  }
}
class H6e {
  constructor(e, n) {
    this.stream = n, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((i) => new yy());
  }
  getActions(e) {
    let n = 0, i = null, { parser: r } = e.p, { tokenizers: s } = r, o = r.stateSlot(
      e.state,
      3
      /* ParseState.TokenizerMask */
    ), a = e.curContext ? e.curContext.hash : 0, l = 0;
    for (let u = 0; u < s.length; u++) {
      if (!(1 << u & o))
        continue;
      let f = s[u], d = this.tokens[u];
      if (!(i && !f.fallback) && ((f.contextual || d.start != e.pos || d.mask != o || d.context != a) && (this.updateCachedToken(d, f, e), d.mask = o, d.context = a), d.lookAhead > d.end + 25 && (l = Math.max(d.lookAhead, l)), d.value != 0)) {
        let h = n;
        if (d.extended > -1 && (n = this.addActions(e, d.extended, d.end, n)), n = this.addActions(e, d.value, d.end, n), !f.extend && (i = d, n > h))
          break;
      }
    }
    for (; this.actions.length > n; )
      this.actions.pop();
    return l && e.setLookAhead(l), !i && e.pos == this.stream.end && (i = new yy(), i.value = e.p.parser.eofTerm, i.start = i.end = e.pos, n = this.addActions(e, i.value, i.end, n)), this.mainToken = i, this.actions;
  }
  getMainToken(e) {
    if (this.mainToken)
      return this.mainToken;
    let n = new yy(), { pos: i, p: r } = e;
    return n.start = i, n.end = Math.min(i + 1, r.stream.end), n.value = i == r.stream.end ? r.parser.eofTerm : 0, n;
  }
  updateCachedToken(e, n, i) {
    let r = this.stream.clipPos(i.pos);
    if (n.token(this.stream.reset(r, e), i), e.value > -1) {
      let { parser: s } = i.p;
      for (let o = 0; o < s.specialized.length; o++)
        if (s.specialized[o] == e.value) {
          let a = s.specializers[o](this.stream.read(e.start, e.end), i);
          if (a >= 0 && i.p.parser.dialect.allows(a >> 1)) {
            a & 1 ? e.extended = a >> 1 : e.value = a >> 1;
            break;
          }
        }
    } else
      e.value = 0, e.end = this.stream.clipPos(r + 1);
  }
  putAction(e, n, i, r) {
    for (let s = 0; s < r; s += 3)
      if (this.actions[s] == e)
        return r;
    return this.actions[r++] = e, this.actions[r++] = n, this.actions[r++] = i, r;
  }
  addActions(e, n, i, r) {
    let { state: s } = e, { parser: o } = e.p, { data: a } = o;
    for (let l = 0; l < 2; l++)
      for (let u = o.stateSlot(
        s,
        l ? 2 : 1
        /* ParseState.Actions */
      ); ; u += 3) {
        if (a[u] == 65535)
          if (a[u + 1] == 1)
            u = hl(a, u + 2);
          else {
            r == 0 && a[u + 1] == 2 && (r = this.putAction(hl(a, u + 2), n, i, r));
            break;
          }
        a[u] == n && (r = this.putAction(hl(a, u + 1), n, i, r));
      }
    return r;
  }
}
class Q6e {
  constructor(e, n, i, r) {
    this.parser = e, this.input = n, this.ranges = r, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new B6e(n, r), this.tokens = new H6e(e, this.stream), this.topTerm = e.top[1];
    let { from: s } = r[0];
    this.stacks = [Vw.start(this, e.top[0], s)], this.fragments = i.length && this.stream.end - s > e.bufferLength * 4 ? new W6e(i, e.nodeSet) : null;
  }
  get parsedPos() {
    return this.minStackPos;
  }
  // Move the parser forward. This will process all parse stacks at
  // `this.pos` and try to advance them to a further position. If no
  // stack for such a position is found, it'll start error-recovery.
  //
  // When the parse is finished, this will return a syntax tree. When
  // not, it returns `null`.
  advance() {
    let e = this.stacks, n = this.minStackPos, i = this.stacks = [], r, s;
    if (this.bigReductionCount > 300 && e.length == 1) {
      let [o] = e;
      for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; )
        ;
      this.bigReductionCount = this.lastBigReductionSize = 0;
    }
    for (let o = 0; o < e.length; o++) {
      let a = e[o];
      for (; ; ) {
        if (this.tokens.mainToken = null, a.pos > n)
          i.push(a);
        else {
          if (this.advanceStack(a, i, e))
            continue;
          {
            r || (r = [], s = []), r.push(a);
            let l = this.tokens.getMainToken(a);
            s.push(l.value, l.end);
          }
        }
        break;
      }
    }
    if (!i.length) {
      let o = r && Z6e(r);
      if (o)
        return $s && console.log("Finish with " + this.stackID(o)), this.stackToTree(o);
      if (this.parser.strict)
        throw $s && r && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + n);
      this.recovering || (this.recovering = 5);
    }
    if (this.recovering && r) {
      let o = this.stoppedAt != null && r[0].pos > this.stoppedAt ? r[0] : this.runRecovery(r, s, i);
      if (o)
        return $s && console.log("Force-finish " + this.stackID(o)), this.stackToTree(o.forceAll());
    }
    if (this.recovering) {
      let o = this.recovering == 1 ? 1 : this.recovering * 3;
      if (i.length > o)
        for (i.sort((a, l) => l.score - a.score); i.length > o; )
          i.pop();
      i.some((a) => a.reducePos > n) && this.recovering--;
    } else if (i.length > 1) {
      e: for (let o = 0; o < i.length - 1; o++) {
        let a = i[o];
        for (let l = o + 1; l < i.length; l++) {
          let u = i[l];
          if (a.sameState(u) || a.buffer.length > 500 && u.buffer.length > 500)
            if ((a.score - u.score || a.buffer.length - u.buffer.length) > 0)
              i.splice(l--, 1);
            else {
              i.splice(o--, 1);
              continue e;
            }
        }
      }
      i.length > 12 && i.splice(
        12,
        i.length - 12
        /* Rec.MaxStackCount */
      );
    }
    this.minStackPos = i[0].pos;
    for (let o = 1; o < i.length; o++)
      i[o].pos < this.minStackPos && (this.minStackPos = i[o].pos);
    return null;
  }
  stopAt(e) {
    if (this.stoppedAt != null && this.stoppedAt < e)
      throw new RangeError("Can't move stoppedAt forward");
    this.stoppedAt = e;
  }
  // Returns an updated version of the given stack, or null if the
  // stack can't advance normally. When `split` and `stacks` are
  // given, stacks split off by ambiguous operations will be pushed to
  // `split`, or added to `stacks` if they move `pos` forward.
  advanceStack(e, n, i) {
    let r = e.pos, { parser: s } = this, o = $s ? this.stackID(e) + " -> " : "";
    if (this.stoppedAt != null && r > this.stoppedAt)
      return e.forceReduce() ? e : null;
    if (this.fragments) {
      let u = e.curContext && e.curContext.tracker.strict, f = u ? e.curContext.hash : 0;
      for (let d = this.fragments.nodeAt(r); d; ) {
        let h = this.parser.nodeSet.types[d.type.id] == d.type ? s.getGoto(e.state, d.type.id) : -1;
        if (h > -1 && d.length && (!u || (d.prop(Mt.contextHash) || 0) == f))
          return e.useNode(d, h), $s && console.log(o + this.stackID(e) + ` (via reuse of ${s.getName(d.type.id)})`), !0;
        if (!(d instanceof Qn) || d.children.length == 0 || d.positions[0] > 0)
          break;
        let m = d.children[0];
        if (m instanceof Qn && d.positions[0] == 0)
          d = m;
        else
          break;
      }
    }
    let a = s.stateSlot(
      e.state,
      4
      /* ParseState.DefaultReduce */
    );
    if (a > 0)
      return e.reduce(a), $s && console.log(o + this.stackID(e) + ` (via always-reduce ${s.getName(
        a & 65535
        /* Action.ValueMask */
      )})`), !0;
    if (e.stack.length >= 8400)
      for (; e.stack.length > 6e3 && e.forceReduce(); )
        ;
    let l = this.tokens.getActions(e);
    for (let u = 0; u < l.length; ) {
      let f = l[u++], d = l[u++], h = l[u++], m = u == l.length || !i, g = m ? e : e.split(), w = this.tokens.mainToken;
      if (g.apply(f, d, w ? w.start : g.pos, h), $s && console.log(o + this.stackID(g) + ` (via ${f & 65536 ? `reduce of ${s.getName(
        f & 65535
        /* Action.ValueMask */
      )}` : "shift"} for ${s.getName(d)} @ ${r}${g == e ? "" : ", split"})`), m)
        return !0;
      g.pos > r ? n.push(g) : i.push(g);
    }
    return !1;
  }
  // Advance a given stack forward as far as it will go. Returns the
  // (possibly updated) stack if it got stuck, or null if it moved
  // forward and was given to `pushStackDedup`.
  advanceFully(e, n) {
    let i = e.pos;
    for (; ; ) {
      if (!this.advanceStack(e, null, null))
        return !1;
      if (e.pos > i)
        return bP(e, n), !0;
    }
  }
  runRecovery(e, n, i) {
    let r = null, s = !1;
    for (let o = 0; o < e.length; o++) {
      let a = e[o], l = n[o << 1], u = n[(o << 1) + 1], f = $s ? this.stackID(a) + " -> " : "";
      if (a.deadEnd && (s || (s = !0, a.restart(), $s && console.log(f + this.stackID(a) + " (restarted)"), this.advanceFully(a, i))))
        continue;
      let d = a.split(), h = f;
      for (let m = 0; d.forceReduce() && m < 10 && ($s && console.log(h + this.stackID(d) + " (via force-reduce)"), !this.advanceFully(d, i)); m++)
        $s && (h = this.stackID(d) + " -> ");
      for (let m of a.recoverByInsert(l))
        $s && console.log(f + this.stackID(m) + " (via recover-insert)"), this.advanceFully(m, i);
      this.stream.end > a.pos ? (u == a.pos && (u++, l = 0), a.recoverByDelete(l, u), $s && console.log(f + this.stackID(a) + ` (via recover-delete ${this.parser.getName(l)})`), bP(a, i)) : (!r || r.score < a.score) && (r = a);
    }
    return r;
  }
  // Convert the stack's buffer to a syntax tree.
  stackToTree(e) {
    return e.close(), Qn.build({
      buffer: Xw.create(e),
      nodeSet: this.parser.nodeSet,
      topID: this.topTerm,
      maxBufferLength: this.parser.bufferLength,
      reused: this.reused,
      start: this.ranges[0].from,
      length: e.pos - this.ranges[0].from,
      minRepeatType: this.parser.minRepeatTerm
    });
  }
  stackID(e) {
    let n = (wO || (wO = /* @__PURE__ */ new WeakMap())).get(e);
    return n || wO.set(e, n = String.fromCodePoint(this.nextStackID++)), n + e;
  }
}
function bP(t, e) {
  for (let n = 0; n < e.length; n++) {
    let i = e[n];
    if (i.pos == t.pos && i.sameState(t)) {
      e[n].score < t.score && (e[n] = t);
      return;
    }
  }
  e.push(t);
}
class U6e {
  constructor(e, n, i) {
    this.source = e, this.flags = n, this.disabled = i;
  }
  allows(e) {
    return !this.disabled || this.disabled[e] == 0;
  }
}
const kO = (t) => t;
class MZ {
  /**
  Define a context tracker.
  */
  constructor(e) {
    this.start = e.start, this.shift = e.shift || kO, this.reduce = e.reduce || kO, this.reuse = e.reuse || kO, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
  }
}
class Rh extends yQ {
  /**
  @internal
  */
  constructor(e) {
    if (super(), this.wrappers = [], e.version != 14)
      throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
    let n = e.nodeNames.split(" ");
    this.minRepeatTerm = n.length;
    for (let a = 0; a < e.repeatNodeCount; a++)
      n.push("");
    let i = Object.keys(e.topRules).map((a) => e.topRules[a][1]), r = [];
    for (let a = 0; a < n.length; a++)
      r.push([]);
    function s(a, l, u) {
      r[a].push([l, l.deserialize(String(u))]);
    }
    if (e.nodeProps)
      for (let a of e.nodeProps) {
        let l = a[0];
        typeof l == "string" && (l = Mt[l]);
        for (let u = 1; u < a.length; ) {
          let f = a[u++];
          if (f >= 0)
            s(f, l, a[u++]);
          else {
            let d = a[u + -f];
            for (let h = -f; h > 0; h--)
              s(a[u++], l, d);
            u++;
          }
        }
      }
    this.nodeSet = new OE(n.map((a, l) => ns.define({
      name: l >= this.minRepeatTerm ? void 0 : a,
      id: l,
      props: r[l],
      top: i.indexOf(l) > -1,
      error: l == 0,
      skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
    }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = pQ;
    let o = lg(e.tokenData);
    this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
    for (let a = 0; a < this.specializerSpecs.length; a++)
      this.specialized[a] = this.specializerSpecs[a].term;
    this.specializers = this.specializerSpecs.map(yP), this.states = lg(e.states, Uint32Array), this.data = lg(e.stateData), this.goto = lg(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((a) => typeof a == "number" ? new bh(o, a) : a), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
  }
  createParse(e, n, i) {
    let r = new Q6e(this, e, n, i);
    for (let s of this.wrappers)
      r = s(r, e, n, i);
    return r;
  }
  /**
  Get a goto table entry @internal
  */
  getGoto(e, n, i = !1) {
    let r = this.goto;
    if (n >= r[0])
      return -1;
    for (let s = r[n + 1]; ; ) {
      let o = r[s++], a = o & 1, l = r[s++];
      if (a && i)
        return l;
      for (let u = s + (o >> 1); s < u; s++)
        if (r[s] == e)
          return l;
      if (a)
        return -1;
    }
  }
  /**
  Check if this state has an action for a given terminal @internal
  */
  hasAction(e, n) {
    let i = this.data;
    for (let r = 0; r < 2; r++)
      for (let s = this.stateSlot(
        e,
        r ? 2 : 1
        /* ParseState.Actions */
      ), o; ; s += 3) {
        if ((o = i[s]) == 65535)
          if (i[s + 1] == 1)
            o = i[s = hl(i, s + 2)];
          else {
            if (i[s + 1] == 2)
              return hl(i, s + 2);
            break;
          }
        if (o == n || o == 0)
          return hl(i, s + 1);
      }
    return 0;
  }
  /**
  @internal
  */
  stateSlot(e, n) {
    return this.states[e * 6 + n];
  }
  /**
  @internal
  */
  stateFlag(e, n) {
    return (this.stateSlot(
      e,
      0
      /* ParseState.Flags */
    ) & n) > 0;
  }
  /**
  @internal
  */
  validAction(e, n) {
    return !!this.allActions(e, (i) => i == n ? !0 : null);
  }
  /**
  @internal
  */
  allActions(e, n) {
    let i = this.stateSlot(
      e,
      4
      /* ParseState.DefaultReduce */
    ), r = i ? n(i) : void 0;
    for (let s = this.stateSlot(
      e,
      1
      /* ParseState.Actions */
    ); r == null; s += 3) {
      if (this.data[s] == 65535)
        if (this.data[s + 1] == 1)
          s = hl(this.data, s + 2);
        else
          break;
      r = n(hl(this.data, s + 1));
    }
    return r;
  }
  /**
  Get the states that can follow this one through shift actions or
  goto jumps. @internal
  */
  nextStates(e) {
    let n = [];
    for (let i = this.stateSlot(
      e,
      1
      /* ParseState.Actions */
    ); ; i += 3) {
      if (this.data[i] == 65535)
        if (this.data[i + 1] == 1)
          i = hl(this.data, i + 2);
        else
          break;
      if (!(this.data[i + 2] & 1)) {
        let r = this.data[i + 1];
        n.some((s, o) => o & 1 && s == r) || n.push(this.data[i], r);
      }
    }
    return n;
  }
  /**
  Configure the parser. Returns a new parser instance that has the
  given settings modified. Settings not provided in `config` are
  kept from the original parser.
  */
  configure(e) {
    let n = Object.assign(Object.create(Rh.prototype), this);
    if (e.props && (n.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
      let i = this.topRules[e.top];
      if (!i)
        throw new RangeError(`Invalid top rule name ${e.top}`);
      n.top = i;
    }
    return e.tokenizers && (n.tokenizers = this.tokenizers.map((i) => {
      let r = e.tokenizers.find((s) => s.from == i);
      return r ? r.to : i;
    })), e.specializers && (n.specializers = this.specializers.slice(), n.specializerSpecs = this.specializerSpecs.map((i, r) => {
      let s = e.specializers.find((a) => a.from == i.external);
      if (!s)
        return i;
      let o = Object.assign(Object.assign({}, i), { external: s.to });
      return n.specializers[r] = yP(o), o;
    })), e.contextTracker && (n.context = e.contextTracker), e.dialect && (n.dialect = this.parseDialect(e.dialect)), e.strict != null && (n.strict = e.strict), e.wrap && (n.wrappers = n.wrappers.concat(e.wrap)), e.bufferLength != null && (n.bufferLength = e.bufferLength), n;
  }
  /**
  Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
  are registered for this parser.
  */
  hasWrappers() {
    return this.wrappers.length > 0;
  }
  /**
  Returns the name associated with a given term. This will only
  work for all terms when the parser was generated with the
  `--names` option. By default, only the names of tagged terms are
  stored.
  */
  getName(e) {
    return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
  }
  /**
  The eof term id is always allocated directly after the node
  types. @internal
  */
  get eofTerm() {
    return this.maxNode + 1;
  }
  /**
  The type of top node produced by the parser.
  */
  get topNode() {
    return this.nodeSet.types[this.top[1]];
  }
  /**
  @internal
  */
  dynamicPrecedence(e) {
    let n = this.dynamicPrecedences;
    return n == null ? 0 : n[e] || 0;
  }
  /**
  @internal
  */
  parseDialect(e) {
    let n = Object.keys(this.dialects), i = n.map(() => !1);
    if (e)
      for (let s of e.split(" ")) {
        let o = n.indexOf(s);
        o >= 0 && (i[o] = !0);
      }
    let r = null;
    for (let s = 0; s < n.length; s++)
      if (!i[s])
        for (let o = this.dialects[n[s]], a; (a = this.data[o++]) != 65535; )
          (r || (r = new Uint8Array(this.maxTerm + 1)))[a] = 1;
    return new U6e(e, i, r);
  }
  /**
  Used by the output of the parser generator. Not available to
  user code. @hide
  */
  static deserialize(e) {
    return new Rh(e);
  }
}
function hl(t, e) {
  return t[e] | t[e + 1] << 16;
}
function Z6e(t) {
  let e = null;
  for (let n of t) {
    let i = n.p.stoppedAt;
    (n.pos == n.p.stream.end || i != null && n.pos > i) && n.p.parser.stateFlag(
      n.state,
      2
      /* StateFlag.Accepting */
    ) && (!e || e.score < n.score) && (e = n);
  }
  return e;
}
function yP(t) {
  if (t.external) {
    let e = t.extend ? 1 : 0;
    return (n, i) => t.external(n, i) << 1 | e;
  }
  return t.get;
}
const q6e = 101, wP = 1, Y6e = 102, V6e = 103, kP = 2, NZ = [
  9,
  10,
  11,
  12,
  13,
  32,
  133,
  160,
  5760,
  8192,
  8193,
  8194,
  8195,
  8196,
  8197,
  8198,
  8199,
  8200,
  8201,
  8202,
  8232,
  8233,
  8239,
  8287,
  12288
], X6e = 58, G6e = 40, AZ = 95, K6e = 91, wy = 45, J6e = 46, e5e = 35, t5e = 37, n5e = 38, i5e = 92, r5e = 10;
function x0(t) {
  return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t >= 161;
}
function DZ(t) {
  return t >= 48 && t <= 57;
}
const s5e = new Vo((t, e) => {
  for (let n = !1, i = 0, r = 0; ; r++) {
    let { next: s } = t;
    if (x0(s) || s == wy || s == AZ || n && DZ(s))
      !n && (s != wy || r > 0) && (n = !0), i === r && s == wy && i++, t.advance();
    else if (s == i5e && t.peek(1) != r5e)
      t.advance(), t.next > -1 && t.advance(), n = !0;
    else {
      n && t.acceptToken(s == G6e ? Y6e : i == 2 && e.canShift(kP) ? kP : V6e);
      break;
    }
  }
}), o5e = new Vo((t) => {
  if (NZ.includes(t.peek(-1))) {
    let { next: e } = t;
    (x0(e) || e == AZ || e == e5e || e == J6e || e == K6e || e == X6e && x0(t.peek(1)) || e == wy || e == n5e) && t.acceptToken(q6e);
  }
}), a5e = new Vo((t) => {
  if (!NZ.includes(t.peek(-1))) {
    let { next: e } = t;
    if (e == t5e && (t.advance(), t.acceptToken(wP)), x0(e)) {
      do
        t.advance();
      while (x0(t.next) || DZ(t.next));
      t.acceptToken(wP);
    }
  }
}), l5e = v2({
  "AtKeyword import charset namespace keyframes media supports": X.definitionKeyword,
  "from to selector": X.keyword,
  NamespaceName: X.namespace,
  KeyframeName: X.labelName,
  KeyframeRangeName: X.operatorKeyword,
  TagName: X.tagName,
  ClassName: X.className,
  PseudoClassName: X.constant(X.className),
  IdName: X.labelName,
  "FeatureName PropertyName": X.propertyName,
  AttributeName: X.attributeName,
  NumberLiteral: X.number,
  KeywordQuery: X.keyword,
  UnaryQueryOp: X.operatorKeyword,
  "CallTag ValueName": X.atom,
  VariableName: X.variableName,
  Callee: X.operatorKeyword,
  Unit: X.unit,
  "UniversalSelector NestingSelector": X.definitionOperator,
  MatchOp: X.compareOperator,
  "ChildOp SiblingOp, LogicOp": X.logicOperator,
  BinOp: X.arithmeticOperator,
  Important: X.modifier,
  Comment: X.blockComment,
  ColorLiteral: X.color,
  "ParenthesizedContent StringLiteral": X.string,
  ":": X.punctuation,
  "PseudoOp #": X.derefOperator,
  "; ,": X.separator,
  "( )": X.paren,
  "[ ]": X.squareBracket,
  "{ }": X.brace
}), u5e = { __proto__: null, lang: 34, "nth-child": 34, "nth-last-child": 34, "nth-of-type": 34, "nth-last-of-type": 34, dir: 34, "host-context": 34, url: 62, "url-prefix": 62, domain: 62, regexp: 62, selector: 140 }, c5e = { __proto__: null, "@import": 120, "@media": 144, "@charset": 148, "@namespace": 152, "@keyframes": 158, "@supports": 170 }, f5e = { __proto__: null, not: 134, only: 134 }, d5e = Rh.deserialize({
  version: 14,
  states: ":|QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$[QXO'#CaO$fQ[O'#CiO$qQ[O'#DUO$vQ[O'#DXOOQP'#Eo'#EoO${QdO'#DhO%jQ[O'#DuO${QdO'#DwO%{Q[O'#DyO&WQ[O'#D|O&`Q[O'#ESO&nQ[O'#EUOOQS'#En'#EnOOQS'#EX'#EXQYQ[OOO&uQXO'#CdO'jQWO'#DdO'oQWO'#EtO'zQ[O'#EtQOQWOOP(UO#tO'#C_POOO)C@^)C@^OOQP'#Ch'#ChOOQP,59Q,59QO#kQ[O,59QO(aQ[O,59TO$qQ[O,59pO$vQ[O,59sO(lQ[O,59vO(lQ[O,59xO(lQ[O,59yO(lQ[O'#E^O)WQWO,58{O)`Q[O'#DcOOQS,58{,58{OOQP'#Cl'#ClOOQO'#DS'#DSOOQP,59T,59TO)gQWO,59TO)lQWO,59TOOQP'#DW'#DWOOQP,59p,59pOOQO'#DY'#DYO)qQ`O,59sOOQS'#Cq'#CqO${QdO'#CrO)yQvO'#CtO+ZQtO,5:SOOQO'#Cy'#CyO)lQWO'#CxO+oQWO'#CzO+tQ[O'#DPOOQS'#Eq'#EqOOQO'#Dk'#DkO+|Q[O'#DrO,[QWO'#EuO&`Q[O'#DpO,jQWO'#DsOOQO'#Ev'#EvO)ZQWO,5:aO,oQpO,5:cOOQS'#D{'#D{O,wQWO,5:eO,|Q[O,5:eOOQO'#EO'#EOO-UQWO,5:hO-ZQWO,5:nO-cQWO,5:pOOQS-E8V-E8VO-kQdO,5:OO-{Q[O'#E`O.YQWO,5;`O.YQWO,5;`POOO'#EW'#EWP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lOOQP1G.o1G.oO)gQWO1G.oO)lQWO1G.oOOQP1G/[1G/[O.pQ`O1G/_O/ZQXO1G/bO/qQXO1G/dO0XQXO1G/eO0oQXO,5:xOOQO-E8[-E8[OOQS1G.g1G.gO0yQWO,59}O1OQ[O'#DTO1VQdO'#CpOOQP1G/_1G/_O${QdO1G/_O1^QpO,59^OOQS,59`,59`O${QdO,59bO1fQWO1G/nOOQS,59d,59dO1kQ!bO,59fOOQS'#DQ'#DQOOQS'#EZ'#EZO1vQ[O,59kOOQS,59k,59kO2OQWO'#DkO2ZQWO,5:WO2`QWO,5:^O&`Q[O,5:YO2hQ[O'#EaO3PQWO,5;aO3[QWO,5:[O(lQ[O,5:_OOQS1G/{1G/{OOQS1G/}1G/}OOQS1G0P1G0PO3mQWO1G0PO3rQdO'#EPOOQS1G0S1G0SOOQS1G0Y1G0YOOQS1G0[1G0[O3}QtO1G/jOOQO1G/j1G/jOOQO,5:z,5:zO4eQ[O,5:zOOQO-E8^-E8^O4rQWO1G0zPOOO-E8U-E8UPOOO1G.e1G.eOOQP7+$Z7+$ZOOQP7+$y7+$yO${QdO7+$yOOQS1G/i1G/iO4}QXO'#EsO5XQWO,59oO5^QtO'#EYO6UQdO'#EpO6`QWO,59[O6eQpO7+$yOOQS1G.x1G.xOOQS1G.|1G.|OOQS7+%Y7+%YOOQS1G/Q1G/QO6mQWO1G/QOOQS-E8X-E8XOOQS1G/V1G/VO${QdO1G/rOOQO1G/x1G/xOOQO1G/t1G/tO6rQWO,5:{OOQO-E8_-E8_O7QQXO1G/yOOQS7+%k7+%kO7XQYO'#CtOOQO'#ER'#ERO7dQ`O'#EQOOQO'#EQ'#EQO7oQWO'#EbO7wQdO,5:kOOQS,5:k,5:kO8SQtO'#E_O${QdO'#E_O9TQdO7+%UOOQO7+%U7+%UOOQO1G0f1G0fO9hQpO<<HeO9pQ[O'#E]O9zQWO,5;_OOQP1G/Z1G/ZOOQS-E8W-E8WO:SQdO'#E[O:^QWO,5;[OOQT1G.v1G.vOOQP<<He<<HeOOQS7+$l7+$lO:fQdO7+%^OOQO7+%e7+%eOOQO,5:l,5:lO3uQdO'#EcO7oQWO,5:|OOQS,5:|,5:|OOQS-E8`-E8`OOQS1G0V1G0VO:mQtO,5:yOOQS-E8]-E8]OOQO<<Hp<<HpOOQPAN>PAN>PO;nQXO,5:wOOQO-E8Z-E8ZO;xQdO,5:vOOQO-E8Y-E8YOOQO<<Hx<<HxOOQO,5:},5:}OOQO-E8a-E8aOOQS1G0h1G0h",
  stateData: "<[~O#]OS#^QQ~OUYOXYOZTO^VO_VOrXOyWO!]aO!^ZO!j[O!l]O!n^O!q_O!w`O#ZRO~OQfOUYOXYOZTO^VO_VOrXOyWO!]aO!^ZO!j[O!l]O!n^O!q_O!w`O#ZeO~O#W#hP~P!ZO#^jO~O#ZlO~OZnO^oO_oOrqOypO!PrO!StO#XsO~OuuO!UwO~P#pOa}O#YzO#ZyO~O#Z!OO~O#Z!QO~OQ![Oc!TOg![Oi![Oo!YOr!ZO#Y!WO#Z!SO#f!UO~Oc!^O!e!`O!h!aO#Z!]O!U#iP~Oi!fOo!YO#Z!eO~Oi!hO#Z!hO~Oc!^O!e!`O!h!aO#Z!]O~O!Z#iP~P%jOZWX^WX^!XX_WXrWXuWXyWX!PWX!SWX!UWX#XWX~O^!mO~O!Z!nO#W#hX!T#hX~O#W#hX!T#hX~P!ZO#_!qO#`!qO#a!sO~Oa!wO#YzO#ZyO~OUYOXYOZTO^VO_VOrXOyWO#ZRO~OuuO!UwO~O!T#hP~P!ZOc#RO~Oc#SO~Oq#TO}#UO~OP#WOchXkhX!ZhX!ehX!hhX#ZhXbhXQhXghXihXohXrhXuhX!YhX#WhX#YhX#fhXqhX!ThX~Oc!^Ok#XO!e!`O!h!aO#Z!]O!Z#iP~Oc#[O~Oq#`O#Z#]O~Oc!^O!e!`O!h!aO#Z#aO~Ou#eO!c#dO!U#iX!Z#iX~Oc#hO~Ok#XO!Z#jO~O!Z#kO~Oi#lOo!YO~O!U#mO~O!UwO!c#dO~O!UwO!Z#pO~O!Y#rO!Z!Wa#W!Wa!T!Wa~P${O!Z#SX#W#SX!T#SX~P!ZO!Z!nO#W#ha!T#ha~O#_!qO#`!qO#a#xO~Oq#zO}#{O~OZnO^oO_oOrqOypO~Ou!Oi!P!Oi!S!Oi!U!Oi#X!Oib!Oi~P.xOu!Qi!P!Qi!S!Qi!U!Qi#X!Qib!Qi~P.xOu!Ri!P!Ri!S!Ri!U!Ri#X!Rib!Ri~P.xOu#Qa!U#Qa~P#pO!T#|O~Ob#gP~P(lOb#dP~P${Ob$TOk#XO~O!Z$VO~Ob$WOi$XOp$XO~Oq$ZO#Z#]O~O^!aXb!_X!c!_X~O^$[O~Ob$]O!c#dO~Oc!^O!e!`O!h!aO#Z!]Ou#TX!U#TX!Z#TX~Ou#eO!U#ia!Z#ia~O!c#dOu!da!U!da!Z!dab!da~O!Z$bO~O!T$iO#Z$dO#f$cO~Ok#XOu$kO!Y$mO!Z!Wi#W!Wi!T!Wi~P${O!Z#Sa#W#Sa!T#Sa~P!ZO!Z!nO#W#hi!T#hi~Ou$pOb#gX~P#pOb$rO~Ok#XOQ!|Xb!|Xc!|Xg!|Xi!|Xo!|Xr!|Xu!|X#Y!|X#Z!|X#f!|X~Ou$tOb#dX~P${Ob$vO~Ok#XOq$wO~Ob$xO~O!c#dOu#Ta!U#Ta!Z#Ta~Ob$zO~P#pOP#WOuhX!UhX~O#f$cOu!tX!U!tX~Ou$|O!UwO~O!T%QO#Z$dO#f$cO~Ok#XOQ#RXc#RXg#RXi#RXo#RXr#RXu#RX!Y#RX!Z#RX#W#RX#Y#RX#Z#RX#f#RX!T#RX~Ou$kO!Y%TO!Z!Wq#W!Wq!T!Wq~P${Ok#XOq%UO~Ob#PXu#PX~P(lOu$pOb#ga~Ob#OXu#OX~P${Ou$tOb#da~Ob%ZO~P${Ok#XOQ#Rac#Rag#Rai#Rao#Rar#Rau#Ra!Y#Ra!Z#Ra#W#Ra#Y#Ra#Z#Ra#f#Ra!T#Ra~Ob#Pau#Pa~P#pOb#Oau#Oa~P${O#]p#^#fk!S#f~",
  goto: "-o#kPPP#lP#oP#x$YP#xP$j#xPP$pPPP$v%P%PP%cP%PP%P%}&aPPPP%P&yP&}'T#xP'Z#x'aP#xP#x#xPPP'g'|(ZPP#oPP(b(b(l(bP(bP(b(bP#oP#oP#oP(o#oP(r(u(x)P#oP#oP)U)[)k)y*P*V*]*c*i*s*y+PPPPPPPPPPP+V+`,O,RP,w,z-Q-ZRkQ_bOPdhw!n#tmYOPdhrstuw!n#R#h#t$pmSOPdhrstuw!n#R#h#t$pQmTR!tnQ{VR!uoQ!u}Q#Z!XR#y!wq![Z]!T!m#S#U#X#q#{$Q$[$k$l$t$y%Xp![Z]!T!m#S#U#X#q#{$Q$[$k$l$t$y%XU$f#m$h$|R${$eq!XZ]!T!m#S#U#X#q#{$Q$[$k$l$t$y%Xp![Z]!T!m#S#U#X#q#{$Q$[$k$l$t$y%XQ!f^R#l!gT#^!Z#_Q|VR!voQ!u|R#y!vQ!PWR!xpQ!RXR!yqQxUQ#PvQ#i!cQ#o!jQ#p!kQ%O$gR%^$}SgPwQ!phQ#s!nR$n#tZfPhw!n#ta!b[`a!V!^!`#d#eR#b!^R!g^R!i_R#n!iS$g#m$hR%[$|V$e#m$h$|Q!rjR#w!rQdOShPwU!ldh#tR#t!nQ$Q#SU$s$Q$y%XQ$y$[R%X$tQ#_!ZR$Y#_Q$u$QR%Y$uQ$q#}R%W$qQvUR#OvQ$l#qR%S$lQ!ogS#u!o#vR#v!pQ#f!_R$`#fQ$h#mR%P$hQ$}$gR%]$}_cOPdhw!n#t^UOPdhw!n#tQ!zrQ!{sQ!|tQ!}uQ#}#RQ$a#hR%V$pR$R#SQ!VZQ!d]Q#V!TQ#q!m[$P#S$Q$[$t$y%XQ$S#UQ$U#XS$j#q$lQ$o#{R%R$kR$O#RQiPR#QwQ!c[Q!kaR#Y!VU!_[a!VQ!j`Q#c!^Q#g!`Q$^#dR$_#e",
  nodeNames: "⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",
  maxTerm: 118,
  nodeProps: [
    ["isolate", -2, 3, 25, ""],
    ["openedBy", 18, "(", 33, "[", 51, "{"],
    ["closedBy", 19, ")", 34, "]", 52, "}"]
  ],
  propSources: [l5e],
  skippedNodes: [0, 3, 88],
  repeatNodeCount: 12,
  tokenData: "J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;'S;=`%o<%lO%^`%cSp`Oy%^z;'S%^;'S;=`%o<%lO%^`%rP;=`<%l%^~%zh#]~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^~'mh#]~p`OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^l)[UOy%^z#]%^#]#^)n#^;'S%^;'S;=`%o<%lO%^l)sUp`Oy%^z#a%^#a#b*V#b;'S%^;'S;=`%o<%lO%^l*[Up`Oy%^z#d%^#d#e*n#e;'S%^;'S;=`%o<%lO%^l*sUp`Oy%^z#c%^#c#d+V#d;'S%^;'S;=`%o<%lO%^l+[Up`Oy%^z#f%^#f#g+n#g;'S%^;'S;=`%o<%lO%^l+sUp`Oy%^z#h%^#h#i,V#i;'S%^;'S;=`%o<%lO%^l,[Up`Oy%^z#T%^#T#U,n#U;'S%^;'S;=`%o<%lO%^l,sUp`Oy%^z#b%^#b#c-V#c;'S%^;'S;=`%o<%lO%^l-[Up`Oy%^z#h%^#h#i-n#i;'S%^;'S;=`%o<%lO%^l-uS!Y[p`Oy%^z;'S%^;'S;=`%o<%lO%^~.UWOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o<%lO.R~.sOi~~.vRO;'S.R;'S;=`/P;=`O.R~/SXOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o;=`<%l.R<%lO.R~/rP;=`<%l.Rn/zYyQOy%^z!Q%^!Q![0j![!c%^!c!i0j!i#T%^#T#Z0j#Z;'S%^;'S;=`%o<%lO%^l0oYp`Oy%^z!Q%^!Q![1_![!c%^!c!i1_!i#T%^#T#Z1_#Z;'S%^;'S;=`%o<%lO%^l1dYp`Oy%^z!Q%^!Q![2S![!c%^!c!i2S!i#T%^#T#Z2S#Z;'S%^;'S;=`%o<%lO%^l2ZYg[p`Oy%^z!Q%^!Q![2y![!c%^!c!i2y!i#T%^#T#Z2y#Z;'S%^;'S;=`%o<%lO%^l3QYg[p`Oy%^z!Q%^!Q![3p![!c%^!c!i3p!i#T%^#T#Z3p#Z;'S%^;'S;=`%o<%lO%^l3uYp`Oy%^z!Q%^!Q![4e![!c%^!c!i4e!i#T%^#T#Z4e#Z;'S%^;'S;=`%o<%lO%^l4lYg[p`Oy%^z!Q%^!Q![5[![!c%^!c!i5[!i#T%^#T#Z5[#Z;'S%^;'S;=`%o<%lO%^l5aYp`Oy%^z!Q%^!Q![6P![!c%^!c!i6P!i#T%^#T#Z6P#Z;'S%^;'S;=`%o<%lO%^l6WSg[p`Oy%^z;'S%^;'S;=`%o<%lO%^d6gUOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^d7QS}Sp`Oy%^z;'S%^;'S;=`%o<%lO%^b7cSXQOy%^z;'S%^;'S;=`%o<%lO%^~7rWOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W<%lO7o~8_RO;'S7o;'S;=`8h;=`O7o~8kXOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W;=`<%l7o<%lO7o~9ZP;=`<%l7on9cSc^Oy%^z;'S%^;'S;=`%o<%lO%^~9tOb~n9{UUQkWOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^n:fWkW!SQOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^l;TUp`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYp`#f[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l<cYp`Oy%^z{%^{|=R|}%^}!O=R!O!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^l=WUp`Oy%^z!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^l=qUp`#f[Oy%^z!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^l>[[p`#f[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSu^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWkWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VUZQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTkWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSp`#^~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#f[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU^QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S_Qp`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Z^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS}SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!PQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!PQp`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!]Qp`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSr^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSq^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUp`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!cQp`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!UUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!T^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!SQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",
  tokenizers: [o5e, a5e, s5e, 1, 2, 3, 4, new Gw("m~RRYZ[z{a~~g~aO#`~~dP!P!Qg~lO#a~~", 28, 107)],
  topRules: { StyleSheet: [0, 4], Styles: [1, 87] },
  specialized: [{ term: 102, get: (t) => u5e[t] || -1 }, { term: 59, get: (t) => c5e[t] || -1 }, { term: 103, get: (t) => f5e[t] || -1 }],
  tokenPrec: 1246
});
let xO = null;
function _O() {
  if (!xO && typeof document == "object" && document.body) {
    let { style: t } = document.body, e = [], n = /* @__PURE__ */ new Set();
    for (let i in t)
      i != "cssText" && i != "cssFloat" && typeof t[i] == "string" && (/[A-Z]/.test(i) && (i = i.replace(/[A-Z]/g, (r) => "-" + r.toLowerCase())), n.has(i) || (e.push(i), n.add(i)));
    xO = e.sort().map((i) => ({ type: "property", label: i, apply: i + ": " }));
  }
  return xO || [];
}
const xP = /* @__PURE__ */ [
  "active",
  "after",
  "any-link",
  "autofill",
  "backdrop",
  "before",
  "checked",
  "cue",
  "default",
  "defined",
  "disabled",
  "empty",
  "enabled",
  "file-selector-button",
  "first",
  "first-child",
  "first-letter",
  "first-line",
  "first-of-type",
  "focus",
  "focus-visible",
  "focus-within",
  "fullscreen",
  "has",
  "host",
  "host-context",
  "hover",
  "in-range",
  "indeterminate",
  "invalid",
  "is",
  "lang",
  "last-child",
  "last-of-type",
  "left",
  "link",
  "marker",
  "modal",
  "not",
  "nth-child",
  "nth-last-child",
  "nth-last-of-type",
  "nth-of-type",
  "only-child",
  "only-of-type",
  "optional",
  "out-of-range",
  "part",
  "placeholder",
  "placeholder-shown",
  "read-only",
  "read-write",
  "required",
  "right",
  "root",
  "scope",
  "selection",
  "slotted",
  "target",
  "target-text",
  "valid",
  "visited",
  "where"
].map((t) => ({ type: "class", label: t })), _P = /* @__PURE__ */ [
  "above",
  "absolute",
  "activeborder",
  "additive",
  "activecaption",
  "after-white-space",
  "ahead",
  "alias",
  "all",
  "all-scroll",
  "alphabetic",
  "alternate",
  "always",
  "antialiased",
  "appworkspace",
  "asterisks",
  "attr",
  "auto",
  "auto-flow",
  "avoid",
  "avoid-column",
  "avoid-page",
  "avoid-region",
  "axis-pan",
  "background",
  "backwards",
  "baseline",
  "below",
  "bidi-override",
  "blink",
  "block",
  "block-axis",
  "bold",
  "bolder",
  "border",
  "border-box",
  "both",
  "bottom",
  "break",
  "break-all",
  "break-word",
  "bullets",
  "button",
  "button-bevel",
  "buttonface",
  "buttonhighlight",
  "buttonshadow",
  "buttontext",
  "calc",
  "capitalize",
  "caps-lock-indicator",
  "caption",
  "captiontext",
  "caret",
  "cell",
  "center",
  "checkbox",
  "circle",
  "cjk-decimal",
  "clear",
  "clip",
  "close-quote",
  "col-resize",
  "collapse",
  "color",
  "color-burn",
  "color-dodge",
  "column",
  "column-reverse",
  "compact",
  "condensed",
  "contain",
  "content",
  "contents",
  "content-box",
  "context-menu",
  "continuous",
  "copy",
  "counter",
  "counters",
  "cover",
  "crop",
  "cross",
  "crosshair",
  "currentcolor",
  "cursive",
  "cyclic",
  "darken",
  "dashed",
  "decimal",
  "decimal-leading-zero",
  "default",
  "default-button",
  "dense",
  "destination-atop",
  "destination-in",
  "destination-out",
  "destination-over",
  "difference",
  "disc",
  "discard",
  "disclosure-closed",
  "disclosure-open",
  "document",
  "dot-dash",
  "dot-dot-dash",
  "dotted",
  "double",
  "down",
  "e-resize",
  "ease",
  "ease-in",
  "ease-in-out",
  "ease-out",
  "element",
  "ellipse",
  "ellipsis",
  "embed",
  "end",
  "ethiopic-abegede-gez",
  "ethiopic-halehame-aa-er",
  "ethiopic-halehame-gez",
  "ew-resize",
  "exclusion",
  "expanded",
  "extends",
  "extra-condensed",
  "extra-expanded",
  "fantasy",
  "fast",
  "fill",
  "fill-box",
  "fixed",
  "flat",
  "flex",
  "flex-end",
  "flex-start",
  "footnotes",
  "forwards",
  "from",
  "geometricPrecision",
  "graytext",
  "grid",
  "groove",
  "hand",
  "hard-light",
  "help",
  "hidden",
  "hide",
  "higher",
  "highlight",
  "highlighttext",
  "horizontal",
  "hsl",
  "hsla",
  "hue",
  "icon",
  "ignore",
  "inactiveborder",
  "inactivecaption",
  "inactivecaptiontext",
  "infinite",
  "infobackground",
  "infotext",
  "inherit",
  "initial",
  "inline",
  "inline-axis",
  "inline-block",
  "inline-flex",
  "inline-grid",
  "inline-table",
  "inset",
  "inside",
  "intrinsic",
  "invert",
  "italic",
  "justify",
  "keep-all",
  "landscape",
  "large",
  "larger",
  "left",
  "level",
  "lighter",
  "lighten",
  "line-through",
  "linear",
  "linear-gradient",
  "lines",
  "list-item",
  "listbox",
  "listitem",
  "local",
  "logical",
  "loud",
  "lower",
  "lower-hexadecimal",
  "lower-latin",
  "lower-norwegian",
  "lowercase",
  "ltr",
  "luminosity",
  "manipulation",
  "match",
  "matrix",
  "matrix3d",
  "medium",
  "menu",
  "menutext",
  "message-box",
  "middle",
  "min-intrinsic",
  "mix",
  "monospace",
  "move",
  "multiple",
  "multiple_mask_images",
  "multiply",
  "n-resize",
  "narrower",
  "ne-resize",
  "nesw-resize",
  "no-close-quote",
  "no-drop",
  "no-open-quote",
  "no-repeat",
  "none",
  "normal",
  "not-allowed",
  "nowrap",
  "ns-resize",
  "numbers",
  "numeric",
  "nw-resize",
  "nwse-resize",
  "oblique",
  "opacity",
  "open-quote",
  "optimizeLegibility",
  "optimizeSpeed",
  "outset",
  "outside",
  "outside-shape",
  "overlay",
  "overline",
  "padding",
  "padding-box",
  "painted",
  "page",
  "paused",
  "perspective",
  "pinch-zoom",
  "plus-darker",
  "plus-lighter",
  "pointer",
  "polygon",
  "portrait",
  "pre",
  "pre-line",
  "pre-wrap",
  "preserve-3d",
  "progress",
  "push-button",
  "radial-gradient",
  "radio",
  "read-only",
  "read-write",
  "read-write-plaintext-only",
  "rectangle",
  "region",
  "relative",
  "repeat",
  "repeating-linear-gradient",
  "repeating-radial-gradient",
  "repeat-x",
  "repeat-y",
  "reset",
  "reverse",
  "rgb",
  "rgba",
  "ridge",
  "right",
  "rotate",
  "rotate3d",
  "rotateX",
  "rotateY",
  "rotateZ",
  "round",
  "row",
  "row-resize",
  "row-reverse",
  "rtl",
  "run-in",
  "running",
  "s-resize",
  "sans-serif",
  "saturation",
  "scale",
  "scale3d",
  "scaleX",
  "scaleY",
  "scaleZ",
  "screen",
  "scroll",
  "scrollbar",
  "scroll-position",
  "se-resize",
  "self-start",
  "self-end",
  "semi-condensed",
  "semi-expanded",
  "separate",
  "serif",
  "show",
  "single",
  "skew",
  "skewX",
  "skewY",
  "skip-white-space",
  "slide",
  "slider-horizontal",
  "slider-vertical",
  "sliderthumb-horizontal",
  "sliderthumb-vertical",
  "slow",
  "small",
  "small-caps",
  "small-caption",
  "smaller",
  "soft-light",
  "solid",
  "source-atop",
  "source-in",
  "source-out",
  "source-over",
  "space",
  "space-around",
  "space-between",
  "space-evenly",
  "spell-out",
  "square",
  "start",
  "static",
  "status-bar",
  "stretch",
  "stroke",
  "stroke-box",
  "sub",
  "subpixel-antialiased",
  "svg_masks",
  "super",
  "sw-resize",
  "symbolic",
  "symbols",
  "system-ui",
  "table",
  "table-caption",
  "table-cell",
  "table-column",
  "table-column-group",
  "table-footer-group",
  "table-header-group",
  "table-row",
  "table-row-group",
  "text",
  "text-bottom",
  "text-top",
  "textarea",
  "textfield",
  "thick",
  "thin",
  "threeddarkshadow",
  "threedface",
  "threedhighlight",
  "threedlightshadow",
  "threedshadow",
  "to",
  "top",
  "transform",
  "translate",
  "translate3d",
  "translateX",
  "translateY",
  "translateZ",
  "transparent",
  "ultra-condensed",
  "ultra-expanded",
  "underline",
  "unidirectional-pan",
  "unset",
  "up",
  "upper-latin",
  "uppercase",
  "url",
  "var",
  "vertical",
  "vertical-text",
  "view-box",
  "visible",
  "visibleFill",
  "visiblePainted",
  "visibleStroke",
  "visual",
  "w-resize",
  "wait",
  "wave",
  "wider",
  "window",
  "windowframe",
  "windowtext",
  "words",
  "wrap",
  "wrap-reverse",
  "x-large",
  "x-small",
  "xor",
  "xx-large",
  "xx-small"
].map((t) => ({ type: "keyword", label: t })).concat(/* @__PURE__ */ [
  "aliceblue",
  "antiquewhite",
  "aqua",
  "aquamarine",
  "azure",
  "beige",
  "bisque",
  "black",
  "blanchedalmond",
  "blue",
  "blueviolet",
  "brown",
  "burlywood",
  "cadetblue",
  "chartreuse",
  "chocolate",
  "coral",
  "cornflowerblue",
  "cornsilk",
  "crimson",
  "cyan",
  "darkblue",
  "darkcyan",
  "darkgoldenrod",
  "darkgray",
  "darkgreen",
  "darkkhaki",
  "darkmagenta",
  "darkolivegreen",
  "darkorange",
  "darkorchid",
  "darkred",
  "darksalmon",
  "darkseagreen",
  "darkslateblue",
  "darkslategray",
  "darkturquoise",
  "darkviolet",
  "deeppink",
  "deepskyblue",
  "dimgray",
  "dodgerblue",
  "firebrick",
  "floralwhite",
  "forestgreen",
  "fuchsia",
  "gainsboro",
  "ghostwhite",
  "gold",
  "goldenrod",
  "gray",
  "grey",
  "green",
  "greenyellow",
  "honeydew",
  "hotpink",
  "indianred",
  "indigo",
  "ivory",
  "khaki",
  "lavender",
  "lavenderblush",
  "lawngreen",
  "lemonchiffon",
  "lightblue",
  "lightcoral",
  "lightcyan",
  "lightgoldenrodyellow",
  "lightgray",
  "lightgreen",
  "lightpink",
  "lightsalmon",
  "lightseagreen",
  "lightskyblue",
  "lightslategray",
  "lightsteelblue",
  "lightyellow",
  "lime",
  "limegreen",
  "linen",
  "magenta",
  "maroon",
  "mediumaquamarine",
  "mediumblue",
  "mediumorchid",
  "mediumpurple",
  "mediumseagreen",
  "mediumslateblue",
  "mediumspringgreen",
  "mediumturquoise",
  "mediumvioletred",
  "midnightblue",
  "mintcream",
  "mistyrose",
  "moccasin",
  "navajowhite",
  "navy",
  "oldlace",
  "olive",
  "olivedrab",
  "orange",
  "orangered",
  "orchid",
  "palegoldenrod",
  "palegreen",
  "paleturquoise",
  "palevioletred",
  "papayawhip",
  "peachpuff",
  "peru",
  "pink",
  "plum",
  "powderblue",
  "purple",
  "rebeccapurple",
  "red",
  "rosybrown",
  "royalblue",
  "saddlebrown",
  "salmon",
  "sandybrown",
  "seagreen",
  "seashell",
  "sienna",
  "silver",
  "skyblue",
  "slateblue",
  "slategray",
  "snow",
  "springgreen",
  "steelblue",
  "tan",
  "teal",
  "thistle",
  "tomato",
  "turquoise",
  "violet",
  "wheat",
  "white",
  "whitesmoke",
  "yellow",
  "yellowgreen"
].map((t) => ({ type: "constant", label: t }))), h5e = /* @__PURE__ */ [
  "a",
  "abbr",
  "address",
  "article",
  "aside",
  "b",
  "bdi",
  "bdo",
  "blockquote",
  "body",
  "br",
  "button",
  "canvas",
  "caption",
  "cite",
  "code",
  "col",
  "colgroup",
  "dd",
  "del",
  "details",
  "dfn",
  "dialog",
  "div",
  "dl",
  "dt",
  "em",
  "figcaption",
  "figure",
  "footer",
  "form",
  "header",
  "hgroup",
  "h1",
  "h2",
  "h3",
  "h4",
  "h5",
  "h6",
  "hr",
  "html",
  "i",
  "iframe",
  "img",
  "input",
  "ins",
  "kbd",
  "label",
  "legend",
  "li",
  "main",
  "meter",
  "nav",
  "ol",
  "output",
  "p",
  "pre",
  "ruby",
  "section",
  "select",
  "small",
  "source",
  "span",
  "strong",
  "sub",
  "summary",
  "sup",
  "table",
  "tbody",
  "td",
  "template",
  "textarea",
  "tfoot",
  "th",
  "thead",
  "tr",
  "u",
  "ul"
].map((t) => ({ type: "type", label: t })), p5e = /* @__PURE__ */ [
  "@charset",
  "@color-profile",
  "@container",
  "@counter-style",
  "@font-face",
  "@font-feature-values",
  "@font-palette-values",
  "@import",
  "@keyframes",
  "@layer",
  "@media",
  "@namespace",
  "@page",
  "@position-try",
  "@property",
  "@scope",
  "@starting-style",
  "@supports",
  "@view-transition"
].map((t) => ({ type: "keyword", label: t })), sl = /^(\w[\w-]*|-\w[\w-]*|)$/, m5e = /^-(-[\w-]*)?$/;
function g5e(t, e) {
  var n;
  if ((t.name == "(" || t.type.isError) && (t = t.parent || t), t.name != "ArgList")
    return !1;
  let i = (n = t.parent) === null || n === void 0 ? void 0 : n.firstChild;
  return (i == null ? void 0 : i.name) != "Callee" ? !1 : e.sliceString(i.from, i.to) == "var";
}
const OP = /* @__PURE__ */ new bQ(), v5e = ["Declaration"];
function b5e(t) {
  for (let e = t; ; ) {
    if (e.type.isTop)
      return e;
    if (!(e = e.parent))
      return t;
  }
}
function PZ(t, e, n) {
  if (e.to - e.from > 4096) {
    let i = OP.get(e);
    if (i)
      return i;
    let r = [], s = /* @__PURE__ */ new Set(), o = e.cursor(hn.IncludeAnonymous);
    if (o.firstChild())
      do
        for (let a of PZ(t, o.node, n))
          s.has(a.label) || (s.add(a.label), r.push(a));
      while (o.nextSibling());
    return OP.set(e, r), r;
  } else {
    let i = [], r = /* @__PURE__ */ new Set();
    return e.cursor().iterate((s) => {
      var o;
      if (n(s) && s.matchContext(v5e) && ((o = s.node.nextSibling) === null || o === void 0 ? void 0 : o.name) == ":") {
        let a = t.sliceString(s.from, s.to);
        r.has(a) || (r.add(a), i.push({ label: a, type: "variable" }));
      }
    }), i;
  }
}
const y5e = (t) => (e) => {
  let { state: n, pos: i } = e, r = ri(n).resolveInner(i, -1), s = r.type.isError && r.from == r.to - 1 && n.doc.sliceString(r.from, r.to) == "-";
  if (r.name == "PropertyName" || (s || r.name == "TagName") && /^(Block|Styles)$/.test(r.resolve(r.to).name))
    return { from: r.from, options: _O(), validFor: sl };
  if (r.name == "ValueName")
    return { from: r.from, options: _P, validFor: sl };
  if (r.name == "PseudoClassName")
    return { from: r.from, options: xP, validFor: sl };
  if (t(r) || (e.explicit || s) && g5e(r, n.doc))
    return {
      from: t(r) || s ? r.from : i,
      options: PZ(n.doc, b5e(r), t),
      validFor: m5e
    };
  if (r.name == "TagName") {
    for (let { parent: l } = r; l; l = l.parent)
      if (l.name == "Block")
        return { from: r.from, options: _O(), validFor: sl };
    return { from: r.from, options: h5e, validFor: sl };
  }
  if (r.name == "AtKeyword")
    return { from: r.from, options: p5e, validFor: sl };
  if (!e.explicit)
    return null;
  let o = r.resolve(i), a = o.childBefore(i);
  return a && a.name == ":" && o.name == "PseudoClassSelector" ? { from: i, options: xP, validFor: sl } : a && a.name == ":" && o.name == "Declaration" || o.name == "ArgList" ? { from: i, options: _P, validFor: sl } : o.name == "Block" || o.name == "Styles" ? { from: i, options: _O(), validFor: sl } : null;
}, w5e = /* @__PURE__ */ y5e((t) => t.name == "VariableName"), Kw = /* @__PURE__ */ Nh.define({
  name: "css",
  parser: /* @__PURE__ */ d5e.configure({
    props: [
      /* @__PURE__ */ y2.add({
        Declaration: /* @__PURE__ */ my()
      }),
      /* @__PURE__ */ w2.add({
        "Block KeyframeList": CQ
      })
    ]
  }),
  languageData: {
    commentTokens: { block: { open: "/*", close: "*/" } },
    indentOnInput: /^\s*\}$/,
    wordChars: "-"
  }
});
function IZ() {
  return new $E(Kw, Kw.data.of({ autocomplete: w5e }));
}
const k5e = 55, x5e = 1, _5e = 56, O5e = 2, S5e = 57, C5e = 3, SP = 4, E5e = 5, GE = 6, LZ = 7, RZ = 8, jZ = 9, FZ = 10, T5e = 11, $5e = 12, M5e = 13, OO = 58, N5e = 14, A5e = 15, CP = 59, BZ = 21, D5e = 23, zZ = 24, P5e = 25, IC = 27, WZ = 28, I5e = 29, L5e = 32, R5e = 35, j5e = 37, F5e = 38, B5e = 0, z5e = 1, W5e = {
  area: !0,
  base: !0,
  br: !0,
  col: !0,
  command: !0,
  embed: !0,
  frame: !0,
  hr: !0,
  img: !0,
  input: !0,
  keygen: !0,
  link: !0,
  meta: !0,
  param: !0,
  source: !0,
  track: !0,
  wbr: !0,
  menuitem: !0
}, H5e = {
  dd: !0,
  li: !0,
  optgroup: !0,
  option: !0,
  p: !0,
  rp: !0,
  rt: !0,
  tbody: !0,
  td: !0,
  tfoot: !0,
  th: !0,
  tr: !0
}, EP = {
  dd: { dd: !0, dt: !0 },
  dt: { dd: !0, dt: !0 },
  li: { li: !0 },
  option: { option: !0, optgroup: !0 },
  optgroup: { optgroup: !0 },
  p: {
    address: !0,
    article: !0,
    aside: !0,
    blockquote: !0,
    dir: !0,
    div: !0,
    dl: !0,
    fieldset: !0,
    footer: !0,
    form: !0,
    h1: !0,
    h2: !0,
    h3: !0,
    h4: !0,
    h5: !0,
    h6: !0,
    header: !0,
    hgroup: !0,
    hr: !0,
    menu: !0,
    nav: !0,
    ol: !0,
    p: !0,
    pre: !0,
    section: !0,
    table: !0,
    ul: !0
  },
  rp: { rp: !0, rt: !0 },
  rt: { rp: !0, rt: !0 },
  tbody: { tbody: !0, tfoot: !0 },
  td: { td: !0, th: !0 },
  tfoot: { tbody: !0 },
  th: { td: !0, th: !0 },
  thead: { tbody: !0, tfoot: !0 },
  tr: { tr: !0 }
};
function Q5e(t) {
  return t == 45 || t == 46 || t == 58 || t >= 65 && t <= 90 || t == 95 || t >= 97 && t <= 122 || t >= 161;
}
let TP = null, $P = null, MP = 0;
function LC(t, e) {
  let n = t.pos + e;
  if (MP == n && $P == t) return TP;
  let i = t.peek(e), r = "";
  for (; Q5e(i); )
    r += String.fromCharCode(i), i = t.peek(++e);
  return $P = t, MP = n, TP = r ? r.toLowerCase() : i == U5e || i == Z5e ? void 0 : null;
}
const HZ = 60, Jw = 62, KE = 47, U5e = 63, Z5e = 33, q5e = 45;
function NP(t, e) {
  this.name = t, this.parent = e;
}
const Y5e = [GE, FZ, LZ, RZ, jZ], V5e = new MZ({
  start: null,
  shift(t, e, n, i) {
    return Y5e.indexOf(e) > -1 ? new NP(LC(i, 1) || "", t) : t;
  },
  reduce(t, e) {
    return e == BZ && t ? t.parent : t;
  },
  reuse(t, e, n, i) {
    let r = e.type.id;
    return r == GE || r == j5e ? new NP(LC(i, 1) || "", t) : t;
  },
  strict: !1
}), X5e = new Vo((t, e) => {
  if (t.next != HZ) {
    t.next < 0 && e.context && t.acceptToken(OO);
    return;
  }
  t.advance();
  let n = t.next == KE;
  n && t.advance();
  let i = LC(t, 0);
  if (i === void 0) return;
  if (!i) return t.acceptToken(n ? A5e : N5e);
  let r = e.context ? e.context.name : null;
  if (n) {
    if (i == r) return t.acceptToken(T5e);
    if (r && H5e[r]) return t.acceptToken(OO, -2);
    if (e.dialectEnabled(B5e)) return t.acceptToken($5e);
    for (let s = e.context; s; s = s.parent) if (s.name == i) return;
    t.acceptToken(M5e);
  } else {
    if (i == "script") return t.acceptToken(LZ);
    if (i == "style") return t.acceptToken(RZ);
    if (i == "textarea") return t.acceptToken(jZ);
    if (W5e.hasOwnProperty(i)) return t.acceptToken(FZ);
    r && EP[r] && EP[r][i] ? t.acceptToken(OO, -1) : t.acceptToken(GE);
  }
}, { contextual: !0 }), G5e = new Vo((t) => {
  for (let e = 0, n = 0; ; n++) {
    if (t.next < 0) {
      n && t.acceptToken(CP);
      break;
    }
    if (t.next == q5e)
      e++;
    else if (t.next == Jw && e >= 2) {
      n >= 3 && t.acceptToken(CP, -2);
      break;
    } else
      e = 0;
    t.advance();
  }
});
function K5e(t) {
  for (; t; t = t.parent)
    if (t.name == "svg" || t.name == "math") return !0;
  return !1;
}
const J5e = new Vo((t, e) => {
  if (t.next == KE && t.peek(1) == Jw) {
    let n = e.dialectEnabled(z5e) || K5e(e.context);
    t.acceptToken(n ? E5e : SP, 2);
  } else t.next == Jw && t.acceptToken(SP, 1);
});
function JE(t, e, n) {
  let i = 2 + t.length;
  return new Vo((r) => {
    for (let s = 0, o = 0, a = 0; ; a++) {
      if (r.next < 0) {
        a && r.acceptToken(e);
        break;
      }
      if (s == 0 && r.next == HZ || s == 1 && r.next == KE || s >= 2 && s < i && r.next == t.charCodeAt(s - 2))
        s++, o++;
      else if (s == i && r.next == Jw) {
        a > o ? r.acceptToken(e, -o) : r.acceptToken(n, -(o - 2));
        break;
      } else if ((r.next == 10 || r.next == 13) && a) {
        r.acceptToken(e, 1);
        break;
      } else
        s = o = 0;
      r.advance();
    }
  });
}
const eEe = JE("script", k5e, x5e), tEe = JE("style", _5e, O5e), nEe = JE("textarea", S5e, C5e), iEe = v2({
  "Text RawText IncompleteTag IncompleteCloseTag": X.content,
  "StartTag StartCloseTag SelfClosingEndTag EndTag": X.angleBracket,
  TagName: X.tagName,
  "MismatchedCloseTag/TagName": [X.tagName, X.invalid],
  AttributeName: X.attributeName,
  "AttributeValue UnquotedAttributeValue": X.attributeValue,
  Is: X.definitionOperator,
  "EntityReference CharacterReference": X.character,
  Comment: X.blockComment,
  ProcessingInst: X.processingInstruction,
  DoctypeDecl: X.documentMeta
}), rEe = Rh.deserialize({
  version: 14,
  states: ",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",
  stateData: ",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",
  goto: "%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",
  nodeNames: "⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",
  maxTerm: 68,
  context: V5e,
  nodeProps: [
    ["closedBy", -10, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, "EndTag", 6, "EndTag SelfClosingEndTag", -4, 22, 31, 34, 37, "CloseTag"],
    ["openedBy", 4, "StartTag StartCloseTag", 5, "StartTag", -4, 30, 33, 36, 38, "OpenTag"],
    ["group", -10, 14, 15, 18, 19, 20, 21, 40, 41, 42, 43, "Entity", 17, "Entity TextContent", -3, 29, 32, 35, "TextContent Entity"],
    ["isolate", -11, 22, 30, 31, 33, 34, 36, 37, 38, 39, 42, 43, "ltr", -3, 27, 28, 40, ""]
  ],
  propSources: [iEe],
  skippedNodes: [0],
  repeatNodeCount: 9,
  tokenData: "!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",
  tokenizers: [eEe, tEe, nEe, J5e, X5e, G5e, 0, 1, 2, 3, 4, 5],
  topRules: { Document: [0, 16] },
  dialects: { noMatch: 0, selfClosing: 515 },
  tokenPrec: 517
});
function QZ(t, e) {
  let n = /* @__PURE__ */ Object.create(null);
  for (let i of t.getChildren(zZ)) {
    let r = i.getChild(P5e), s = i.getChild(IC) || i.getChild(WZ);
    r && (n[e.read(r.from, r.to)] = s ? s.type.id == IC ? e.read(s.from + 1, s.to - 1) : e.read(s.from, s.to) : "");
  }
  return n;
}
function AP(t, e) {
  let n = t.getChild(D5e);
  return n ? e.read(n.from, n.to) : " ";
}
function SO(t, e, n) {
  let i;
  for (let r of n)
    if (!r.attrs || r.attrs(i || (i = QZ(t.node.parent.firstChild, e))))
      return { parser: r.parser };
  return null;
}
function UZ(t = [], e = []) {
  let n = [], i = [], r = [], s = [];
  for (let a of t)
    (a.tag == "script" ? n : a.tag == "style" ? i : a.tag == "textarea" ? r : s).push(a);
  let o = e.length ? /* @__PURE__ */ Object.create(null) : null;
  for (let a of e) (o[a.name] || (o[a.name] = [])).push(a);
  return k3e((a, l) => {
    let u = a.type.id;
    if (u == I5e) return SO(a, l, n);
    if (u == L5e) return SO(a, l, i);
    if (u == R5e) return SO(a, l, r);
    if (u == BZ && s.length) {
      let f = a.node, d = f.firstChild, h = d && AP(d, l), m;
      if (h) {
        for (let g of s)
          if (g.tag == h && (!g.attrs || g.attrs(m || (m = QZ(d, l))))) {
            let w = f.lastChild, x = w.type.id == F5e ? w.from : f.to;
            if (x > d.to)
              return { parser: g.parser, overlay: [{ from: d.to, to: x }] };
          }
      }
    }
    if (o && u == zZ) {
      let f = a.node, d;
      if (d = f.firstChild) {
        let h = o[l.read(d.from, d.to)];
        if (h) for (let m of h) {
          if (m.tagName && m.tagName != AP(f.parent, l)) continue;
          let g = f.lastChild;
          if (g.type.id == IC) {
            let w = g.from + 1, x = g.lastChild, _ = g.to - (x && x.isError ? 0 : 1);
            if (_ > w) return { parser: m.parser, overlay: [{ from: w, to: _ }] };
          } else if (g.type.id == WZ)
            return { parser: m.parser, overlay: [{ from: g.from, to: g.to }] };
        }
      }
    }
    return null;
  });
}
const sEe = 309, DP = 1, oEe = 2, aEe = 3, lEe = 310, uEe = 312, cEe = 313, fEe = 4, dEe = 5, hEe = 0, RC = [
  9,
  10,
  11,
  12,
  13,
  32,
  133,
  160,
  5760,
  8192,
  8193,
  8194,
  8195,
  8196,
  8197,
  8198,
  8199,
  8200,
  8201,
  8202,
  8232,
  8233,
  8239,
  8287,
  12288
], ZZ = 125, pEe = 59, jC = 47, mEe = 42, gEe = 43, vEe = 45, bEe = 60, yEe = 44, wEe = new MZ({
  start: !1,
  shift(t, e) {
    return e == fEe || e == dEe || e == uEe ? t : e == cEe;
  },
  strict: !1
}), kEe = new Vo((t, e) => {
  let { next: n } = t;
  (n == ZZ || n == -1 || e.context) && t.acceptToken(lEe);
}, { contextual: !0, fallback: !0 }), xEe = new Vo((t, e) => {
  let { next: n } = t, i;
  RC.indexOf(n) > -1 || n == jC && ((i = t.peek(1)) == jC || i == mEe) || n != ZZ && n != pEe && n != -1 && !e.context && t.acceptToken(sEe);
}, { contextual: !0 }), _Ee = new Vo((t, e) => {
  let { next: n } = t;
  if ((n == gEe || n == vEe) && (t.advance(), n == t.next)) {
    t.advance();
    let i = !e.context && e.canShift(DP);
    t.acceptToken(i ? DP : oEe);
  }
}, { contextual: !0 });
function CO(t, e) {
  return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57;
}
const OEe = new Vo((t, e) => {
  if (t.next != bEe || !e.dialectEnabled(hEe) || (t.advance(), t.next == jC)) return;
  let n = 0;
  for (; RC.indexOf(t.next) > -1; )
    t.advance(), n++;
  if (CO(t.next, !0)) {
    for (t.advance(), n++; CO(t.next, !1); )
      t.advance(), n++;
    for (; RC.indexOf(t.next) > -1; )
      t.advance(), n++;
    if (t.next == yEe) return;
    for (let i = 0; ; i++) {
      if (i == 7) {
        if (!CO(t.next, !0)) return;
        break;
      }
      if (t.next != "extends".charCodeAt(i)) break;
      t.advance(), n++;
    }
  }
  t.acceptToken(aEe, -n);
}), SEe = v2({
  "get set async static": X.modifier,
  "for while do if else switch try catch finally return throw break continue default case": X.controlKeyword,
  "in of await yield void typeof delete instanceof": X.operatorKeyword,
  "let var const using function class extends": X.definitionKeyword,
  "import export from": X.moduleKeyword,
  "with debugger as new": X.keyword,
  TemplateString: X.special(X.string),
  super: X.atom,
  BooleanLiteral: X.bool,
  this: X.self,
  null: X.null,
  Star: X.modifier,
  VariableName: X.variableName,
  "CallExpression/VariableName TaggedTemplateExpression/VariableName": X.function(X.variableName),
  VariableDefinition: X.definition(X.variableName),
  Label: X.labelName,
  PropertyName: X.propertyName,
  PrivatePropertyName: X.special(X.propertyName),
  "CallExpression/MemberExpression/PropertyName": X.function(X.propertyName),
  "FunctionDeclaration/VariableDefinition": X.function(X.definition(X.variableName)),
  "ClassDeclaration/VariableDefinition": X.definition(X.className),
  PropertyDefinition: X.definition(X.propertyName),
  PrivatePropertyDefinition: X.definition(X.special(X.propertyName)),
  UpdateOp: X.updateOperator,
  "LineComment Hashbang": X.lineComment,
  BlockComment: X.blockComment,
  Number: X.number,
  String: X.string,
  Escape: X.escape,
  ArithOp: X.arithmeticOperator,
  LogicOp: X.logicOperator,
  BitOp: X.bitwiseOperator,
  CompareOp: X.compareOperator,
  RegExp: X.regexp,
  Equals: X.definitionOperator,
  Arrow: X.function(X.punctuation),
  ": Spread": X.punctuation,
  "( )": X.paren,
  "[ ]": X.squareBracket,
  "{ }": X.brace,
  "InterpolationStart InterpolationEnd": X.special(X.brace),
  ".": X.derefOperator,
  ", ;": X.separator,
  "@": X.meta,
  TypeName: X.typeName,
  TypeDefinition: X.definition(X.typeName),
  "type enum interface implements namespace module declare": X.definitionKeyword,
  "abstract global Privacy readonly override": X.modifier,
  "is keyof unique infer": X.operatorKeyword,
  JSXAttributeValue: X.attributeValue,
  JSXText: X.content,
  "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": X.angleBracket,
  "JSXIdentifier JSXNameSpacedName": X.tagName,
  "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": X.attributeName,
  "JSXBuiltin/JSXIdentifier": X.standard(X.tagName)
}), CEe = { __proto__: null, export: 18, as: 23, from: 31, default: 34, async: 39, function: 40, extends: 52, this: 56, true: 64, false: 64, null: 76, void: 80, typeof: 84, super: 102, new: 136, delete: 152, yield: 161, await: 165, class: 170, public: 227, private: 227, protected: 227, readonly: 229, instanceof: 248, satisfies: 251, in: 252, const: 254, import: 286, keyof: 339, unique: 343, infer: 349, is: 385, abstract: 405, implements: 407, type: 409, let: 412, var: 414, using: 417, interface: 423, enum: 427, namespace: 433, module: 435, declare: 439, global: 443, for: 462, of: 471, while: 474, with: 478, do: 482, if: 486, else: 488, switch: 492, case: 498, try: 504, catch: 508, finally: 512, return: 516, throw: 520, break: 524, continue: 528, debugger: 532 }, EEe = { __proto__: null, async: 123, get: 125, set: 127, declare: 187, public: 189, private: 189, protected: 189, static: 191, abstract: 193, override: 195, readonly: 201, accessor: 203, new: 389 }, TEe = { __proto__: null, "<": 143 }, $Ee = Rh.deserialize({
  version: 14,
  states: "$<UO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ08SO'#ChO+RO!bO'#CiO+aO#tO'#CiO+oO?MpO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DyO0fQ^O'#EROOQ07b'#EZ'#EZO1PQWO'#EWOOQO'#El'#ElOOQO'#Ie'#IeO1XQWO'#GmO1dQWO'#EkO1iQWO'#EkO3kQ08SO'#JiO6[Q08SO'#JjO6xQWO'#FZO6}Q&jO'#FqOOQ07b'#Fc'#FcO7YO,YO'#FcO7hQ7[O'#FxO9UQWO'#FwOOQ07b'#Jj'#JjOOQ07`'#Ji'#JiO9ZQWO'#GqOOQU'#KU'#KUO9fQWO'#IRO9kQ07hO'#ISOOQU'#JW'#JWOOQU'#IW'#IWQ`Q^OOO`Q^OOO%[Q^O'#DqO9sQ^O'#D}O9zQ^O'#EPO9aQWO'#GmO:RQ7[O'#CnO:aQWO'#EjO:lQWO'#EuO:qQ7[O'#FbO;`QWO'#GmOOQO'#KV'#KVO;eQWO'#KVO;sQWO'#GuO;sQWO'#GvO;sQWO'#GxO9aQWO'#G{O<jQWO'#HOO>RQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#ChO@jQ`O'#DiQOQWOOO%[Q^O'#EPOAQQWO'#ESO:RQ7[O'#EjOA]QWO'#EjOAhQpO'#FbOOQU'#Cf'#CfOOQ07`'#Dn'#DnOOQ07`'#Jm'#JmO%[Q^O'#JmOOQO'#Jq'#JqOOQO'#Ib'#IbOBhQ`O'#EcOOQ07`'#Eb'#EbOCdQ07pO'#EcOCnQ`O'#EVOOQO'#Jp'#JpODSQ`O'#JqOEaQ`O'#EVOCnQ`O'#EcPEnO!0LbO'#CaPOOO)CDu)CDuOOOO'#IX'#IXOEyO!bO,59TOOQ07b,59T,59TOOOO'#IY'#IYOFXO#tO,59TO%[Q^O'#D`OOOO'#I['#I[OFgO?MpO,59xOOQ07b,59x,59xOFuQ^O'#I]OGYQWO'#JkOI[QrO'#JkO+}Q^O'#JkOIcQWO,5:OOIyQWO'#ElOJWQWO'#JyOJcQWO'#JxOJcQWO'#JxOJkQWO,5;YOJpQWO'#JwOOQ07f,5:Z,5:ZOJwQ^O,5:ZOLxQ08SO,5:eOMiQWO,5:mONSQ07hO'#JvONZQWO'#JuO9ZQWO'#JuONoQWO'#JuONwQWO,5;XON|QWO'#JuO!#UQrO'#JjOOQ07b'#Ch'#ChO%[Q^O'#ERO!#tQpO,5:rOOQO'#Jr'#JrOOQO-E<c-E<cO9aQWO,5=XO!$[QWO,5=XO!$aQ^O,5;VO!&dQ7[O'#EgO!'}QWO,5;VO!)mQ7[O'#DsO!)tQ^O'#DxO!*OQ`O,5;`O!*WQ`O,5;`O%[Q^O,5;`OOQU'#FR'#FROOQU'#FT'#FTO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aO%[Q^O,5;aOOQU'#FX'#FXO!*fQ^O,5;rOOQ07b,5;w,5;wOOQ07b,5;x,5;xO!,iQWO,5;xOOQ07b,5;y,5;yO%[Q^O'#IiO!,qQ07hO,5<eO!&dQ7[O,5;aO!-`Q7[O,5;aO%[Q^O,5;uO!-gQ&jO'#FgO!.dQ&jO'#J}O!.OQ&jO'#J}O!.kQ&jO'#J}OOQO'#J}'#J}O!/PQ&jO,5<POOOS,5<],5<]O!/bQ^O'#FsOOOS'#Ih'#IhO7YO,YO,5;}O!/iQ&jO'#FuOOQ07b,5;},5;}O!0YQMhO'#CuOOQ07b'#Cy'#CyO!0mQWO'#CyO!0rO?MpO'#C}O!1`Q7[O,5<bO!1gQWO,5<dO!3SQ!LQO'#GSO!3aQWO'#GTO!3fQWO'#GTO!3kQ!LQO'#GXO!4jQ`O'#G]OOQO'#Gh'#GhO!(SQ7[O'#GgOOQO'#Gj'#GjO!(SQ7[O'#GiO!5]QMhO'#JdOOQ07b'#Jd'#JdO!5gQWO'#JcO!5uQWO'#JbO!5}QWO'#CtOOQ07b'#Cw'#CwOOQ07b'#DR'#DROOQ07b'#DT'#DTO1SQWO'#DVO!(SQ7[O'#FzO!(SQ7[O'#F|O!6VQWO'#GOO!6[QWO'#GPO!3fQWO'#GVO!(SQ7[O'#G[O!6aQWO'#EmO!7OQWO,5<cOOQ07`'#Cq'#CqO!7WQWO'#EnO!8QQ`O'#EoOOQ07`'#Jw'#JwO!8XQ07hO'#KWO9kQ07hO,5=]O`Q^O,5>mOOQU'#J`'#J`OOQU,5>n,5>nOOQU-E<U-E<UO!:ZQ08SO,5:]O!<wQ08SO,5:iO%[Q^O,5:iO!?bQ08SO,5:kOOQO,5@q,5@qO!@RQ7[O,5=XO!@aQ07hO'#JaO9UQWO'#JaO!@rQ07hO,59YO!@}Q`O,59YO!AVQ7[O,59YO:RQ7[O,59YO!AbQWO,5;VO!AjQWO'#HZO!BOQWO'#KZO%[Q^O,5;zO!7{Q`O,5;|O!BWQWO,5=tO!B]QWO,5=tO!BbQWO,5=tO9kQ07hO,5=tO;sQWO,5=dOOQO'#Cu'#CuO!BpQ`O,5=aO!BxQ7[O,5=bO!CTQWO,5=dO!CYQpO,5=gO!CbQWO'#KVO>pQWO'#HQO9aQWO'#HSO!CgQWO'#HSO:RQ7[O'#HUO!ClQWO'#HUOOQU,5=j,5=jO!CqQWO'#HVO!DSQWO'#CnO!DXQWO,59OO!DcQWO,59OO!FhQ^O,59OOOQU,59O,59OO!FxQ07hO,59OO%[Q^O,59OO!ITQ^O'#H^OOQU'#H_'#H_OOQU'#H`'#H`O`Q^O,5=vO!IkQWO,5=vO`Q^O,5=|O`Q^O,5>OO!IpQWO,5>QO`Q^O,5>SO!IuQWO,5>VO!IzQ^O,5>]OOQU,5>c,5>cO%[Q^O,5>cO9kQ07hO,5>eOOQU,5>g,5>gO!NUQWO,5>gOOQU,5>i,5>iO!NUQWO,5>iOOQU,5>k,5>kO!NZQ`O'#D[O%[Q^O'#JmO!NxQ`O'#JmO# gQ`O'#DjO# xQ`O'#DjO#$ZQ^O'#DjO#$bQWO'#JlO#$jQWO,5:TO#$oQWO'#EpO#$}QWO'#JzO#%VQWO,5;ZO#%[Q`O'#DjO#%iQ`O'#EUOOQ07b,5:n,5:nO%[Q^O,5:nO#%pQWO,5:nO>pQWO,5;UO!@}Q`O,5;UO!AVQ7[O,5;UO:RQ7[O,5;UO#%xQWO,5@XO#%}Q$ISO,5:rOOQO-E<`-E<`O#'TQ07pO,5:}OCnQ`O,5:qO#'_Q`O,5:qOCnQ`O,5:}O!@rQ07hO,5:qOOQ07`'#Ef'#EfOOQO,5:},5:}O%[Q^O,5:}O#'lQ07hO,5:}O#'wQ07hO,5:}O!@}Q`O,5:qOOQO,5;T,5;TO#(VQ07hO,5:}POOO'#IV'#IVP#(kO!0LbO,58{POOO,58{,58{OOOO-E<V-E<VOOQ07b1G.o1G.oOOOO-E<W-E<WO#(vQpO,59zOOOO-E<Y-E<YOOQ07b1G/d1G/dO#({QrO,5>wO+}Q^O,5>wOOQO,5>},5>}O#)VQ^O'#I]OOQO-E<Z-E<ZO#)dQWO,5@VO#)lQrO,5@VO#)sQWO,5@dOOQ07b1G/j1G/jO%[Q^O,5@eO#){QWO'#IcOOQO-E<a-E<aO#)sQWO,5@dOOQ07`1G0t1G0tOOQ07f1G/u1G/uOOQ07f1G0X1G0XO%[Q^O,5@bO#*aQ07hO,5@bO#*rQ07hO,5@bO#*yQWO,5@aO9ZQWO,5@aO#+RQWO,5@aO#+aQWO'#IfO#*yQWO,5@aOOQ07`1G0s1G0sO!*OQ`O,5:tO!*ZQ`O,5:tOOQO,5:v,5:vO#,RQWO,5:vO#,ZQ7[O1G2sO9aQWO1G2sOOQ07b1G0q1G0qO#,iQ08SO1G0qO#-nQ08QO,5;ROOQ07b'#GR'#GRO#.[Q08SO'#JdO!$aQ^O1G0qO#0dQ7[O'#JnO#0nQWO,5:_O#0sQrO'#JoO%[Q^O'#JoO#0}QWO,5:dOOQ07b'#D['#D[OOQ07b1G0z1G0zO%[Q^O1G0zOOQ07b1G1d1G1dO#1SQWO1G0zO#3kQ08SO1G0{O#3rQ08SO1G0{O#6]Q08SO1G0{O#6dQ08SO1G0{O#8nQ08SO1G0{O#9UQ08SO1G0{O#<OQ08SO1G0{O#<VQ08SO1G0{O#>pQ08SO1G0{O#>wQ08SO1G0{O#@oQ08SO1G0{O#CoQ(CYO'#ChO#EmQ(CYO1G1^O#EtQ(CYO'#JjO!,lQWO1G1dO#FUQ08SO,5?TOOQ07`-E<g-E<gO#FxQ08SO1G0{OOQ07b1G0{1G0{O#ITQ08SO1G1aO#IwQ&jO,5<TO#JPQ&jO,5<UO#JXQ&jO'#FlO#JpQWO'#FkOOQO'#KO'#KOOOQO'#Ig'#IgO#JuQ&jO1G1kOOQ07b1G1k1G1kOOOS1G1v1G1vO#KWQ(CYO'#JiO#KbQWO,5<_O!*fQ^O,5<_OOOS-E<f-E<fOOQ07b1G1i1G1iO#KgQ`O'#J}OOQ07b,5<a,5<aO#KoQ`O,5<aOOQ07b,59e,59eO!&dQ7[O'#DPOOOO'#IZ'#IZO#KtO?MpO,59iOOQ07b,59i,59iO%[Q^O1G1|O!6[QWO'#IkO#LPQ7[O,5<uOOQ07b,5<r,5<rO!(SQ7[O'#InO#LoQ7[O,5=RO!(SQ7[O'#IpO#MbQ7[O,5=TO!&dQ7[O,5=VOOQO1G2O1G2OO#MlQpO'#CqO#NPQpO,5<nO#NWQWO'#KRO9aQWO'#KRO#NfQWO,5<pO!(SQ7[O,5<oO#NkQWO'#GUO#NvQWO,5<oO#N{QpO'#GRO$ YQpO'#KSO$ dQWO'#KSO!&dQ7[O'#KSO$ iQWO,5<sO$ nQ`O'#G^O!4eQ`O'#G^O$!PQWO'#G`O$!UQWO'#GbO!3fQWO'#GeO$!ZQ07hO'#ImO$!fQ`O,5<wOOQ07f,5<w,5<wO$!mQ`O'#G^O$!{Q`O'#G_O$#TQ`O'#G_O$#YQ7[O,5=RO$#jQ7[O,5=TOOQ07b,5=W,5=WO!(SQ7[O,5?}O!(SQ7[O,5?}O$#zQWO'#IrO$$VQWO,5?|O$$_QWO,59`O$%OQ7[O,59qOOQ07b,59q,59qO$%qQ7[O,5<fO$&dQ7[O,5<hO@bQWO,5<jOOQ07b,5<k,5<kO$&nQWO,5<qO$&sQ7[O,5<vO$'TQWO'#JuO!$aQ^O1G1}O$'YQWO1G1}O9ZQWO'#JxO9ZQWO'#EpO%[Q^O'#EpO9ZQWO'#ItO$'_Q07hO,5@rOOQU1G2w1G2wOOQU1G4X1G4XOOQ07b1G/w1G/wO!,iQWO1G/wO$)dQ08SO1G0TOOQU1G2s1G2sO!&dQ7[O1G2sO%[Q^O1G2sO#,^QWO1G2sO$+hQ7[O'#EgOOQ07`,5?{,5?{O$+rQ07hO,5?{OOQU1G.t1G.tO!@rQ07hO1G.tO!@}Q`O1G.tO!AVQ7[O1G.tO$,TQWO1G0qO$,YQWO'#ChO$,eQWO'#K[O$,mQWO,5=uO$,rQWO'#K[O$,wQWO'#K[O$-VQWO'#IzO$-eQWO,5@uO$-mQrO1G1fOOQ07b1G1h1G1hO9aQWO1G3`O@bQWO1G3`O$-tQWO1G3`O$-yQWO1G3`OOQU1G3`1G3`O!CTQWO1G3OO!&dQ7[O1G2{O$.OQWO1G2{OOQU1G2|1G2|O!&dQ7[O1G2|O$.TQWO1G2|O$.]Q`O'#GzOOQU1G3O1G3OO!4eQ`O'#IvO!CYQpO1G3ROOQU1G3R1G3ROOQU,5=l,5=lO$.eQ7[O,5=nO9aQWO,5=nO$!UQWO,5=pO9UQWO,5=pO!@}Q`O,5=pO!AVQ7[O,5=pO:RQ7[O,5=pO$.sQWO'#KYO$/OQWO,5=qOOQU1G.j1G.jO$/TQ07hO1G.jO@bQWO1G.jO$/`QWO1G.jO9kQ07hO1G.jO$1eQrO,5@wO$1uQWO,5@wO9ZQWO,5@wO$2QQ^O,5=xO$2XQWO,5=xOOQU1G3b1G3bO`Q^O1G3bOOQU1G3h1G3hOOQU1G3j1G3jO>kQWO1G3lO$2^Q^O1G3nO$6bQ^O'#HmOOQU1G3q1G3qO$6oQWO'#HsO>pQWO'#HuOOQU1G3w1G3wO$6wQ^O1G3wO9kQ07hO1G3}OOQU1G4P1G4POOQ07`'#GY'#GYO9kQ07hO1G4RO9kQ07hO1G4TO$;OQWO,5@XO!*fQ^O,5;[O9ZQWO,5;[O>pQWO,5:UO!*fQ^O,5:UO!@}Q`O,5:UO$;TQ(CYO,5:UOOQO,5;[,5;[O$;_Q`O'#I^O$;uQWO,5@WOOQ07b1G/o1G/oO$;}Q`O'#IdO$<XQWO,5@fOOQ07`1G0u1G0uO# xQ`O,5:UOOQO'#Ia'#IaO$<aQ`O,5:pOOQ07f,5:p,5:pO#%sQWO1G0YOOQ07b1G0Y1G0YO%[Q^O1G0YOOQ07b1G0p1G0pO>pQWO1G0pO!@}Q`O1G0pO!AVQ7[O1G0pOOQ07`1G5s1G5sO!@rQ07hO1G0]OOQO1G0i1G0iO%[Q^O1G0iO$<hQ07hO1G0iO$<sQ07hO1G0iO!@}Q`O1G0]OCnQ`O1G0]O$=RQ07hO1G0iOOQO1G0]1G0]O$=gQ08SO1G0iPOOO-E<T-E<TPOOO1G.g1G.gOOOO1G/f1G/fO$=qQpO,5<eO$=yQrO1G4cOOQO1G4i1G4iO%[Q^O,5>wO$>TQWO1G5qO$>]QWO1G6OO$>eQrO1G6PO9ZQWO,5>}O$>oQ08SO1G5|O%[Q^O1G5|O$?PQ07hO1G5|O$?bQWO1G5{O$?bQWO1G5{O9ZQWO1G5{O$?jQWO,5?QO9ZQWO,5?QOOQO,5?Q,5?QO$@OQWO,5?QO$'TQWO,5?QOOQO-E<d-E<dOOQO1G0`1G0`OOQO1G0b1G0bO!,lQWO1G0bOOQU7+(_7+(_O!&dQ7[O7+(_O%[Q^O7+(_O$@^QWO7+(_O$@iQ7[O7+(_O$@wQ08SO,5=RO$CSQ08SO,5=TO$E_Q08SO,5=RO$GpQ08SO,5=TO$JRQ08SO,59qO$LZQ08SO,5<fO$NfQ08SO,5<hO%!qQ08SO,5<vOOQ07b7+&]7+&]O%%SQ08SO7+&]O%%vQ7[O'#I_O%&QQWO,5@YOOQ07b1G/y1G/yO%&YQ^O'#I`O%&gQWO,5@ZO%&oQrO,5@ZOOQ07b1G0O1G0OO%&yQWO7+&fOOQ07b7+&f7+&fO%'OQ(CYO,5:eO%[Q^O7+&xO%'YQ(CYO,5:]O%'gQ(CYO,5:iO%'qQ(CYO,5:kOOQ07b7+'O7+'OOOQO1G1o1G1oOOQO1G1p1G1pO%'{QtO,5<WO!*fQ^O,5<VOOQO-E<e-E<eOOQ07b7+'V7+'VOOOS7+'b7+'bOOOS1G1y1G1yO%(WQWO1G1yOOQ07b1G1{1G1{O%(]QpO,59kOOOO-E<X-E<XOOQ07b1G/T1G/TO%(dQ08SO7+'hOOQ07b,5?V,5?VO%)WQpO,5?VOOQ07b1G2a1G2aP!&dQ7[O'#IkPOQ07b-E<i-E<iO%)vQ7[O,5?YOOQ07b-E<l-E<lO%*iQ7[O,5?[OOQ07b-E<n-E<nO%*sQpO1G2qOOQ07b1G2Y1G2YO%*zQWO'#IjO%+YQWO,5@mO%+YQWO,5@mO%+bQWO,5@mO%+mQWO,5@mOOQO1G2[1G2[O%+{Q7[O1G2ZO!(SQ7[O1G2ZO%,]Q!LQO'#IlO%,mQWO,5@nO!&dQ7[O,5@nO%,uQpO,5@nOOQ07b1G2_1G2_OOQ07`,5<x,5<xOOQ07`,5<y,5<yO$'TQWO,5<yOC_QWO,5<yO!@}Q`O,5<xOOQO'#Ga'#GaO%-PQWO,5<zOOQ07`,5<|,5<|O$'TQWO,5=POOQO,5?X,5?XOOQO-E<k-E<kOOQ07f1G2c1G2cO!4eQ`O,5<xO%-XQWO,5<yO$!PQWO,5<zO!4eQ`O,5<yO!(SQ7[O'#InO%-{Q7[O1G2mO!(SQ7[O'#IpO%.nQ7[O1G2oO%.xQ7[O1G5iO%/SQ7[O1G5iOOQO,5?^,5?^OOQO-E<p-E<pOOQO1G.z1G.zO!7{Q`O,59sO%[Q^O,59sO%/aQWO1G2UO!(SQ7[O1G2]O%/fQ08SO7+'iOOQ07b7+'i7+'iO!$aQ^O7+'iO%0YQWO,5;[OOQ07`,5?`,5?`OOQ07`-E<r-E<rOOQ07b7+%c7+%cO%0_QpO'#KTO#%sQWO7+(_O%0iQrO7+(_O$@aQWO7+(_O%0pQ08QO'#ChO%1TQ08QO,5<}O%1uQWO,5<}OOQ07`1G5g1G5gOOQU7+$`7+$`O!@rQ07hO7+$`O!@}Q`O7+$`O!$aQ^O7+&]O%1zQWO'#IyO%2cQWO,5@vOOQO1G3a1G3aO9aQWO,5@vO%2cQWO,5@vO%2kQWO,5@vOOQO,5?f,5?fOOQO-E<x-E<xOOQ07b7+'Q7+'QO%2pQWO7+(zO9kQ07hO7+(zO9aQWO7+(zO@bQWO7+(zOOQU7+(j7+(jO%2uQ08QO7+(gO!&dQ7[O7+(gO%3PQpO7+(hOOQU7+(h7+(hO!&dQ7[O7+(hO%3WQWO'#KXO%3cQWO,5=fOOQO,5?b,5?bOOQO-E<t-E<tOOQU7+(m7+(mO%4rQ`O'#HTOOQU1G3Y1G3YO!&dQ7[O1G3YO%[Q^O1G3YO%4yQWO1G3YO%5UQ7[O1G3YO9kQ07hO1G3[O$!UQWO1G3[O9UQWO1G3[O!@}Q`O1G3[O!AVQ7[O1G3[O%5dQWO'#IxO%5xQWO,5@tO%6QQ`O,5@tOOQ07`1G3]1G3]OOQU7+$U7+$UO@bQWO7+$UO9kQ07hO7+$UO%6]QWO7+$UO%[Q^O1G6cO%[Q^O1G6dO%6bQ07hO1G6cO%6lQ^O1G3dO%6sQWO1G3dO%6xQ^O1G3dOOQU7+(|7+(|O9kQ07hO7+)WO`Q^O7+)YOOQU'#K_'#K_OOQU'#I{'#I{O%7PQ^O,5>XOOQU,5>X,5>XO%[Q^O'#HnO%7^QWO'#HpOOQU,5>_,5>_O9ZQWO,5>_OOQU,5>a,5>aOOQU7+)c7+)cOOQU7+)i7+)iOOQU7+)m7+)mOOQU7+)o7+)oO%7cQ`O1G5sO%7wQ(CYO1G0vO%8RQWO1G0vOOQO1G/p1G/pO%8^Q(CYO1G/pO>pQWO1G/pO!*fQ^O'#DjOOQO,5>x,5>xOOQO-E<[-E<[OOQO,5?O,5?OOOQO-E<b-E<bO!@}Q`O1G/pOOQO-E<_-E<_OOQ07f1G0[1G0[OOQ07b7+%t7+%tO#%sQWO7+%tOOQ07b7+&[7+&[O>pQWO7+&[O!@}Q`O7+&[OOQO7+%w7+%wO$=gQ08SO7+&TOOQO7+&T7+&TO%[Q^O7+&TO%8hQ07hO7+&TO!@rQ07hO7+%wO!@}Q`O7+%wO%8sQ07hO7+&TO%9RQ08SO7++hO%[Q^O7++hO%9cQWO7++gO%9cQWO7++gOOQO1G4l1G4lO9ZQWO1G4lO%9kQWO1G4lOOQO7+%|7+%|O#%sQWO<<KyO%0iQrO<<KyO%9yQWO<<KyOOQU<<Ky<<KyO!&dQ7[O<<KyO%[Q^O<<KyO%:RQWO<<KyO%:^Q08SO,5?YO%<iQ08SO,5?[O%>tQ08SO1G2ZO%AVQ08SO1G2mO%CbQ08SO1G2oO%EmQ7[O,5>yOOQO-E<]-E<]O%EwQrO,5>zO%[Q^O,5>zOOQO-E<^-E<^O%FRQWO1G5uOOQ07b<<JQ<<JQO%FZQ(CYO1G0qO%HeQ(CYO1G0{O%HlQ(CYO1G0{O%JpQ(CYO1G0{O%JwQ(CYO1G0{O%LlQ(CYO1G0{O%MSQ(CYO1G0{O& gQ(CYO1G0{O& nQ(CYO1G0{O&#rQ(CYO1G0{O&#yQ(CYO1G0{O&%qQ(CYO1G0{O&&UQ08SO<<JdO&'ZQ(CYO1G0{O&)PQ(CYO'#JdO&+SQ(CYO1G1aO&+aQ(CYO1G0TO!*fQ^O'#FnOOQO'#KP'#KPOOQO1G1r1G1rO&+kQWO1G1qO&+pQ(CYO,5?TOOOS7+'e7+'eOOOO1G/V1G/VOOQ07b1G4q1G4qO!(SQ7[O7+(]O&+zQWO,5?UO9aQWO,5?UOOQO-E<h-E<hO&,YQWO1G6XO&,YQWO1G6XO&,bQWO1G6XO&,mQ7[O7+'uO&,}QpO,5?WO&-XQWO,5?WO!&dQ7[O,5?WOOQO-E<j-E<jO&-^QpO1G6YO&-hQWO1G6YOOQ07`1G2e1G2eO$'TQWO1G2eOOQ07`1G2d1G2dO&-pQWO1G2fO!&dQ7[O1G2fOOQ07`1G2k1G2kO!@}Q`O1G2dOC_QWO1G2eO&-uQWO1G2fO&-}QWO1G2eO&.qQ7[O,5?YOOQ07b-E<m-E<mO&/dQ7[O,5?[OOQ07b-E<o-E<oO!(SQ7[O7++TOOQ07b1G/_1G/_O&/nQWO1G/_OOQ07b7+'p7+'pO&/sQ7[O7+'wO&0TQ08SO<<KTOOQ07b<<KT<<KTO&0wQWO1G0vO!&dQ7[O'#IsO&0|QWO,5@oO!&dQ7[O1G2iOOQU<<Gz<<GzO!@rQ07hO<<GzO&1UQ08SO<<IwOOQ07b<<Iw<<IwOOQO,5?e,5?eO&1xQWO,5?eO&1}QWO,5?eOOQO-E<w-E<wO&2]QWO1G6bO&2]QWO1G6bO9aQWO1G6bO@bQWO<<LfOOQU<<Lf<<LfO&2eQWO<<LfO9kQ07hO<<LfOOQU<<LR<<LRO%2uQ08QO<<LROOQU<<LS<<LSO%3PQpO<<LSO&2jQ`O'#IuO&2uQWO,5@sO!*fQ^O,5@sOOQU1G3Q1G3QO&2}Q^O'#JmOOQO'#Iw'#IwO9kQ07hO'#IwO&3XQ`O,5=oOOQU,5=o,5=oO&3`Q`O'#EcO&3tQWO7+(tO&3yQWO7+(tOOQU7+(t7+(tO!&dQ7[O7+(tO%[Q^O7+(tO&4RQWO7+(tOOQU7+(v7+(vO9kQ07hO7+(vO$!UQWO7+(vO9UQWO7+(vO!@}Q`O7+(vO&4^QWO,5?dOOQO-E<v-E<vOOQO'#HW'#HWO&4iQWO1G6`O9kQ07hO<<GpOOQU<<Gp<<GpO@bQWO<<GpO&4qQWO7++}O&4vQWO7+,OO%[Q^O7++}O%[Q^O7+,OOOQU7+)O7+)OO&4{QWO7+)OO&5QQ^O7+)OO&5XQWO7+)OOOQU<<Lr<<LrOOQU<<Lt<<LtOOQU-E<y-E<yOOQU1G3s1G3sO&5^QWO,5>YOOQU,5>[,5>[O&5cQWO1G3yO9ZQWO7+&bO!*fQ^O7+&bOOQO7+%[7+%[O&5hQ(CYO1G6PO>pQWO7+%[OOQ07b<<I`<<I`OOQ07b<<Iv<<IvO>pQWO<<IvOOQO<<Io<<IoO$=gQ08SO<<IoO%[Q^O<<IoOOQO<<Ic<<IcO!@rQ07hO<<IcO&5rQ07hO<<IoO&5}Q08SO<= SO&6_QWO<= ROOQO7+*W7+*WO9ZQWO7+*WOOQUANAeANAeO&6gQWOANAeO!&dQ7[OANAeO#%sQWOANAeO%0iQrOANAeO%[Q^OANAeO&6oQ08SO7+'uO&9QQ08SO,5?YO&;]Q08SO,5?[O&=hQ08SO7+'wO&?yQrO1G4fO&@TQ(CYO7+&]O&BXQ(CYO,5=RO&D`Q(CYO,5=TO&DpQ(CYO,5=RO&EQQ(CYO,5=TO&EbQ(CYO,59qO&GeQ(CYO,5<fO&IhQ(CYO,5<hO&KkQ(CYO,5<vO&MaQ(CYO7+'hO&MnQ(CYO7+'iO&M{QWO,5<YOOQO7+']7+']O&NQQ7[O<<KwOOQO1G4p1G4pO&NXQWO1G4pO&NdQWO1G4pO&NrQWO7++sO&NrQWO7++sO!&dQ7[O1G4rO&NzQpO1G4rO' UQWO7++tOOQ07`7+(P7+(PO$'TQWO7+(QO' ^QpO7+(QOOQ07`7+(O7+(OO$'TQWO7+(PO' eQWO7+(QO!&dQ7[O7+(QOC_QWO7+(PO' jQ7[O<<NoOOQ07b7+$y7+$yO' tQpO,5?_OOQO-E<q-E<qO'!OQ08QO7+(TOOQUAN=fAN=fO9aQWO1G5POOQO1G5P1G5PO'!`QWO1G5PO'!eQWO7++|O'!eQWO7++|O9kQ07hOANBQO@bQWOANBQOOQUANBQANBQOOQUANAmANAmOOQUANAnANAnO'!mQWO,5?aOOQO-E<s-E<sO'!xQ(CYO1G6_O'%YQrO'#ChOOQO,5?c,5?cOOQO-E<u-E<uOOQU1G3Z1G3ZO&2}Q^O,5<zOOQU<<L`<<L`O!&dQ7[O<<L`O&3tQWO<<L`O'%dQWO<<L`O%[Q^O<<L`OOQU<<Lb<<LbO9kQ07hO<<LbO$!UQWO<<LbO9UQWO<<LbO'%lQ`O1G5OO'%wQWO7++zOOQUAN=[AN=[O9kQ07hOAN=[OOQU<= i<= iOOQU<= j<= jO'&PQWO<= iO'&UQWO<= jOOQU<<Lj<<LjO'&ZQWO<<LjO'&`Q^O<<LjOOQU1G3t1G3tO>pQWO7+)eO'&gQWO<<I|O'&rQ(CYO<<I|OOQO<<Hv<<HvOOQ07bAN?bAN?bOOQOAN?ZAN?ZO$=gQ08SOAN?ZOOQOAN>}AN>}O%[Q^OAN?ZOOQO<<Mr<<MrOOQUG27PG27PO!&dQ7[OG27PO#%sQWOG27PO'&|QWOG27PO%0iQrOG27PO''UQ(CYO<<JdO''cQ(CYO1G2ZO')XQ(CYO,5?YO'+[Q(CYO,5?[O'-_Q(CYO1G2mO'/bQ(CYO1G2oO'1eQ(CYO<<KTO'1rQ(CYO<<IwOOQO1G1t1G1tO!(SQ7[OANAcOOQO7+*[7+*[O'2PQWO7+*[O'2[QWO<= _O'2dQpO7+*^OOQ07`<<Kl<<KlO$'TQWO<<KlOOQ07`<<Kk<<KkO'2nQpO<<KlO$'TQWO<<KkOOQO7+*k7+*kO9aQWO7+*kO'2uQWO<= hOOQUG27lG27lO9kQ07hOG27lO!*fQ^O1G4{O'2}QWO7++yO&3tQWOANAzOOQUANAzANAzO!&dQ7[OANAzO'3VQWOANAzOOQUANA|ANA|O9kQ07hOANA|O$!UQWOANA|OOQO'#HX'#HXOOQO7+*j7+*jOOQUG22vG22vOOQUANETANETOOQUANEUANEUOOQUANBUANBUO'3_QWOANBUOOQU<<MP<<MPO!*fQ^OAN?hOOQOG24uG24uO$=gQ08SOG24uO#%sQWOLD,kOOQULD,kLD,kO!&dQ7[OLD,kO'3dQWOLD,kO'3lQ(CYO7+'uO'5bQ(CYO,5?YO'7eQ(CYO,5?[O'9hQ(CYO7+'wO';^Q7[OG26}OOQO<<Mv<<MvOOQ07`ANAWANAWO$'TQWOANAWOOQ07`ANAVANAVOOQO<<NV<<NVOOQULD-WLD-WO';nQ(CYO7+*gOOQUG27fG27fO&3tQWOG27fO!&dQ7[OG27fOOQUG27hG27hO9kQ07hOG27hOOQUG27pG27pO';xQ(CYOG25SOOQOLD*aLD*aOOQU!$(!V!$(!VO#%sQWO!$(!VO!&dQ7[O!$(!VO'<SQ08SOG26}OOQ07`G26rG26rOOQULD-QLD-QO&3tQWOLD-QOOQULD-SLD-SOOQU!)9Eq!)9EqO#%sQWO!)9EqOOQU!$(!l!$(!lOOQU!.K;]!.K;]O'>eQ(CYOG26}O!*fQ^O'#DyO1PQWO'#EWO'@ZQrO'#JiO!*fQ^O'#DqO'@bQ^O'#D}O'@iQrO'#ChO'CPQrO'#ChO!*fQ^O'#EPO'CaQ^O,5;VO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O'#IiO'EdQWO,5<eO'ElQ7[O,5;aO'GVQ7[O,5;aO!*fQ^O,5;uO!&dQ7[O'#GgO'ElQ7[O'#GgO!&dQ7[O'#GiO'ElQ7[O'#GiO1SQWO'#DVO1SQWO'#DVO!&dQ7[O'#FzO'ElQ7[O'#FzO!&dQ7[O'#F|O'ElQ7[O'#F|O!&dQ7[O'#G[O'ElQ7[O'#G[O!*fQ^O,5:iO!*fQ^O,5@eO'CaQ^O1G0qO'G^Q(CYO'#ChO!*fQ^O1G1|O!&dQ7[O'#InO'ElQ7[O'#InO!&dQ7[O'#IpO'ElQ7[O'#IpO!&dQ7[O,5<oO'ElQ7[O,5<oO'CaQ^O1G1}O!*fQ^O7+&xO!&dQ7[O1G2ZO'ElQ7[O1G2ZO!&dQ7[O'#InO'ElQ7[O'#InO!&dQ7[O'#IpO'ElQ7[O'#IpO!&dQ7[O1G2]O'ElQ7[O1G2]O'CaQ^O7+'iO'CaQ^O7+&]O!&dQ7[OANAcO'ElQ7[OANAcO'GhQWO'#EkO'GmQWO'#EkO'GuQWO'#FZO'GzQWO'#EuO'HPQWO'#JyO'H[QWO'#JwO'HgQWO,5;VO'HlQ7[O,5<bO'HsQWO'#GTO'HxQWO'#GTO'H}QWO,5<cO'IVQWO,5;VO'I_Q(CYO1G1^O'IfQWO,5<oO'IkQWO,5<oO'IpQWO,5<qO'IuQWO,5<qO'IzQWO1G1}O'JPQWO1G0qO'JUQ7[O<<KwO'J]Q7[O<<KwO7hQ7[O'#FxO9UQWO'#FwOA]QWO'#EjO!*fQ^O,5;rO!3fQWO'#GTO!3fQWO'#GTO!3fQWO'#GVO!3fQWO'#GVO!(SQ7[O7+(]O!(SQ7[O7+(]O%*sQpO1G2qO%*sQpO1G2qO!&dQ7[O,5=VO!&dQ7[O,5=V",
  stateData: "'Ka~O'tOS'uOSSOS'vRQ~OPYOQYORfOX!VO`qOczOdyOlkOnYOokOpkOvkOxYOzYO!PWO!TkO!UkO![XO!fuO!kZO!nYO!oYO!pYO!rvO!twO!wxO!{]O#s!PO$T|O%b}O%d!QO%f!OO%g!OO%h!OO%k!RO%m!SO%p!TO%q!TO%s!UO&P!WO&V!XO&X!YO&Z!ZO&]![O&`!]O&f!^O&l!_O&n!`O&p!aO&r!bO&t!cO'{SO'}TO(QUO(XVO(g[O(tiO~OVtO~P`OPYOQYORfOc!jOd!iOlkOnYOokOpkOvkOxYOzYO!PWO!TkO!UkO![!eO!fuO!kZO!nYO!oYO!pYO!rvO!t!gO!w!hO$T!kO'{!dO'}TO(QUO(XVO(g[O(tiO~O`!vOo!nO!P!oO!_!xO!`!uO!a!uO!{:dO#P!pO#Q!pO#R!wO#S!pO#T!pO#W!yO#X!yO'|!lO'}TO(QUO([!mO(g!sO~O'v!zO~OP[XZ[X`[Xn[X|[X}[X!P[X!Y[X!h[X!i[X!k[X!o[X#[[X#geX#j[X#k[X#l[X#m[X#n[X#o[X#p[X#q[X#r[X#t[X#v[X#x[X#y[X$O[X'r[X(X[X(h[X(o[X(p[X~O!d$|X~P(qO^!|O'}#OO(O!|O(P#OO~O^#PO(P#OO(Q#OO(R#PO~Ot#RO!R#SO(Y#SO(Z#UO~OPYOQYORfOc!jOd!iOlkOnYOokOpkOvkOxYOzYO!PWO!TkO!UkO![!eO!fuO!kZO!nYO!oYO!pYO!rvO!t!gO!w!hO$T!kO'{:hO'}TO(QUO(XVO(g[O(tiO~O!X#YO!Y#VO!V(_P!V(lP~P+}O!Z#bO~P`OPYOQYORfOc!jOd!iOnYOokOpkOvkOxYOzYO!PWO!TkO!UkO![!eO!fuO!kZO!nYO!oYO!pYO!rvO!t!gO!w!hO$T!kO'}TO(QUO(XVO(g[O(tiO~Ol#lO!X#hO!{]O#e#kO#f#hO'{:iO!j(iP~P.iO!k#nO'{#mO~O!w#rO!{]O%b#sO~O#g#tO~O!d#uO#g#tO~OP$]OZ$dOn$QO|#yO}#zO!P#{O!Y$aO!h$SO!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO#n$RO#o$SO#p$SO#q$cO#r$SO#t$TO#v$VO#x$XO#y$YO(XVO(h$ZO(o#|O(p#}O~O`(]X'r(]X'p(]X!j(]X!V(]X![(]X%c(]X!d(]X~P1qO#[$eO$O$eOP(^XZ(^Xn(^X|(^X}(^X!P(^X!Y(^X!h(^X!k(^X!o(^X#j(^X#k(^X#l(^X#m(^X#n(^X#o(^X#p(^X#q(^X#r(^X#t(^X#v(^X#x(^X#y(^X(X(^X(h(^X(o(^X(p(^X![(^X%c(^X~O`(^X!i(^X'r(^X'p(^X!V(^X!j(^Xr(^X!d(^X~P4XO#[$eO~O$Y$gO$[$fO$c$lO~ORfO![$mO$f$nO$h$pO~Og%VOl%WOn$tOo$sOp$sOv%XOx%YOz%ZO!P${O![$|O!f%`O!k$xO#f%aO$T%^O$o%[O$q%]O$t%_O'{$rO'}TO(QUO(X$uO(o$}O(p%POf(UP~O!k%bO~O!P%eO![%fO'{%dO~O!d%jO~O`%kO'r%kO~O'|!lO~P%[O%h%rO~P%[Og%VO!k%bO'{%dO'|!lO~Od%yO!k%bO'{%dO~O#r$SO~O|&OO![%{O!k%}O%d&RO'{%dO'|!lO'}TO(QUO_(}P~O!w#rO~O%m&TO!P(yX![(yX'{(yX~O'{&UO~O!t&ZO#s!PO%d!QO%f!OO%g!OO%h!OO%k!RO%m!SO%p!TO%q!TO~Oc&`Od&_O!w&]O%b&^O%u&[O~P;xOc&cOdyO![&bO!t&ZO!wxO!{]O#s!PO%b}O%f!OO%g!OO%h!OO%k!RO%m!SO%p!TO%q!TO%s!UO~Oa&fO#[&iO%d&dO'|!lO~P<}O!k&jO!t&nO~O!k#nO~O![XO~O`%kO'q&vO'r%kO~O`%kO'q&yO'r%kO~O`%kO'q&{O'r%kO~O'p[X!V[Xr[X!j[X&T[X![[X%c[X!d[X~P(qO!_'YO!`'RO!a'RO'|!lO'}TO(QUO~Oo'PO!P'OO!X'SO([&}O!Z(`P!Z(nP~P@UOj']O!['ZO'{%dO~Od'bO!k%bO'{%dO~O|&OO!k%}O~Oo!nO!P!oO!{:dO#P!pO#Q!pO#S!pO#T!pO'|!lO'}TO(QUO([!mO(g!sO~O!_'hO!`'gO!a'gO#R!pO#W'iO#X'iO~PApO`%kOg%VO!d#uO!k%bO'r%kO(h'kO~O!o'oO#['mO~PCOOo!nO!P!oO'}TO(QUO([!mO(g!sO~O![XOo(eX!P(eX!_(eX!`(eX!a(eX!{(eX#P(eX#Q(eX#R(eX#S(eX#T(eX#W(eX#X(eX'|(eX'}(eX(Q(eX([(eX(g(eX~O!`'gO!a'gO'|!lO~PCnO'w'sO'x'sO'y'uO~O^!|O'}'wO(O!|O(P'wO~O^#PO(P'wO(Q'wO(R#PO~Ot#RO!R#SO(Y#SO(Z'{O~O!X'}O!V'PX!V'VX!Y'PX!Y'VX~P+}O!Y(PO!V(_X~OP$]OZ$dOn$QO|#yO}#zO!P#{O!Y(PO!h$SO!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO#n$RO#o$SO#p$SO#q$cO#r$SO#t$TO#v$VO#x$XO#y$YO(XVO(h$ZO(o#|O(p#}O~O!V(_X~PGbO!V(UO~O!V(kX!Y(kX!d(kX!j(kX(h(kX~O#[(kX#g#`X!Z(kX~PIhO#[(VO!V(mX!Y(mX~O!Y(WO!V(lX~O!V(ZO~O#[$eO~PIhO!Z([O~P`O|#yO}#zO!P#{O!i#wO!k#xO(XVOP!maZ!man!ma!Y!ma!h!ma!o!ma#j!ma#k!ma#l!ma#m!ma#n!ma#o!ma#p!ma#q!ma#r!ma#t!ma#v!ma#x!ma#y!ma(h!ma(o!ma(p!ma~O`!ma'r!ma'p!ma!V!ma!j!mar!ma![!ma%c!ma!d!ma~PKOO!j(]O~O!d#uO#[(^O(h'kO!Y(jX`(jX'r(jX~O!j(jX~PMnO!P%eO![%fO!{]O#e(cO#f(bO'{%dO~O!Y(dO!j(iX~O!j(fO~O!P%eO![%fO#f(bO'{%dO~OP(^XZ(^Xn(^X|(^X}(^X!P(^X!Y(^X!h(^X!i(^X!k(^X!o(^X#j(^X#k(^X#l(^X#m(^X#n(^X#o(^X#p(^X#q(^X#r(^X#t(^X#v(^X#x(^X#y(^X(X(^X(h(^X(o(^X(p(^X~O!d#uO!j(^X~P! [O|(gO}(hO!i#wO!k#xO!{!za!P!za~O!w!za%b!za![!za#e!za#f!za'{!za~P!#`O!w(lO~OPYOQYORfOc!jOd!iOlkOnYOokOpkOvkOxYOzYO!PWO!TkO!UkO![XO!fuO!kZO!nYO!oYO!pYO!rvO!t!gO!w!hO$T!kO'{!dO'}TO(QUO(XVO(g[O(tiO~Og%VOl%WOn$tOo$sOp$sOv%XOx%YOz;QO!P${O![$|O!f<`O!k$xO#f;WO$T%^O$o;SO$q;UO$t%_O'{(pO'}TO(QUO(X$uO(o$}O(p%PO~O#g(rO~Og%VOl%WOn$tOo$sOp$sOv%XOx%YOz%ZO!P${O![$|O!f%`O!k$xO#f%aO$T%^O$o%[O$q%]O$t%_O'{(pO'}TO(QUO(X$uO(o$}O(p%PO~Of(bP~P!(SO!X(vO!j(cP~P%[O([(xO(g[O~O!P(zO!k#xO([(xO(g[O~OP:cOQ:cORfOc<[Od!iOlkOn:cOokOpkOvkOx:cOz:cO!PWO!TkO!UkO![!eO!f:fO!kZO!n:cO!o:cO!p:cO!r:gO!t:jO!w!hO$T!kO'{)YO'}TO(QUO(XVO(g[O(t<YO~O})]O!k#xO~O!Y$aO`$ma'r$ma'p$ma!j$ma!V$ma![$ma%c$ma!d$ma~O#s)aO~P!&dO|)dO!d)cO![$ZX$W$ZX$Y$ZX$[$ZX$c$ZX~O!d)cO![(qX$W(qX$Y(qX$[(qX$c(qX~O|)dO~P!.OO|)dO![(qX$W(qX$Y(qX$[(qX$c(qX~O![)fO$W)jO$Y)eO$[)eO$c)kO~O!X)nO~P!*fO$Y$gO$[$fO$c)rO~Oj$uX|$uX!P$uX!i$uX(o$uX(p$uX~OfiXf$uXjiX!YiX#[iX~P!/tOo)tO~Ot)uO(Y)vO(Z)xO~Oj*RO|)zO!P){O(o$}O(p%PO~Of)yO~P!0}Of*SO~Og%VOl%WOn$tOo$sOp$sOv%XOx%YOz;QO!P${O![$|O!f<`O!k$xO#f;WO$T%^O$o;SO$q;UO$t%_O'}TO(QUO(X$uO(o$}O(p%PO~O!X*WO'{*TO!j(uP~P!1lO#g*YO~O!k*ZO~O!X*`O'{*]O!V(vP~P!1lOn*lO!P*dO!_*jO!`*cO!a*cO!k*ZO#W*kO%Y*fO'|!lO([!mO~O!Z*iO~P!3xO!i#wOj(WX|(WX!P(WX(o(WX(p(WX!Y(WX#[(WX~Of(WX#|(WX~P!4qOj*qO#[*pOf(VX!Y(VX~O!Y*rOf(UX~O'{&UOf(UP~O!k*yO~O'{(pO~Ol*}O!P%eO!X#hO![%fO!{]O#e#kO#f#hO'{%dO!j(iP~O!d#uO#g+OO~O!P%eO!X+QO!Y(WO![%fO'{%dO!V(lP~Oo'VO!P+SO!X+RO'}TO(QUO([(xO~O!Z(nP~P!7lO!Y+TO`(zX'r(zX~OP$]OZ$dOn$QO|#yO}#zO!P#{O!h$SO!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO#n$RO#o$SO#p$SO#q$cO#r$SO#t$TO#v$VO#x$XO#y$YO(XVO(h$ZO(o#|O(p#}O~O`!ea!Y!ea'r!ea'p!ea!V!ea!j!ear!ea![!ea%c!ea!d!ea~P!8dO|#yO}#zO!P#{O!i#wO!k#xO(XVOP!qaZ!qan!qa!Y!qa!h!qa!o!qa#j!qa#k!qa#l!qa#m!qa#n!qa#o!qa#p!qa#q!qa#r!qa#t!qa#v!qa#x!qa#y!qa(h!qa(o!qa(p!qa~O`!qa'r!qa'p!qa!V!qa!j!qar!qa![!qa%c!qa!d!qa~P!:}O|#yO}#zO!P#{O!i#wO!k#xO(XVOP!saZ!san!sa!Y!sa!h!sa!o!sa#j!sa#k!sa#l!sa#m!sa#n!sa#o!sa#p!sa#q!sa#r!sa#t!sa#v!sa#x!sa#y!sa(h!sa(o!sa(p!sa~O`!sa'r!sa'p!sa!V!sa!j!sar!sa![!sa%c!sa!d!sa~P!=hOg%VOj+^O!['ZO%c+]O~O!d+`O`(TX![(TX'r(TX!Y(TX~O`%kO![XO'r%kO~Og%VO!k%bO~Og%VO!k%bO'{%dO~O!d#uO#g(rO~Oa+kO%d+lO'{+hO'}TO(QUO!Z)OP~O!Y+mO_(}X~OZ+qO~O_+rO~O![%{O'{%dO'|!lO_(}P~Og%VO#[+wO~Og%VOj+zO![$|O~O![+|O~O|,OO![XO~O%h%rO~O!w,TO~Od,YO~Oa,ZO'{#mO'}TO(QUO!Z(|P~Od%yO~O%d!QO'{&UO~P<}OZ,`O_,_O~OPYOQYORfOczOdyOlkOnYOokOpkOvkOxYOzYO!PWO!TkO!UkO!fuO!kZO!nYO!oYO!pYO!rvO!wxO!{]O%b}O'}TO(QUO(XVO(g[O(tiO~O![!eO!t!gO$T!kO'{!dO~P!DkO_,_O`%kO'r%kO~OPYOQYORfOc!jOd!iOlkOnYOokOpkOvkOxYOzYO!PWO!TkO!UkO![!eO!fuO!kZO!nYO!oYO!pYO!rvO!w!hO$T!kO'{!dO'}TO(QUO(XVO(g[O(tiO~O`,eO!twO#s!OO%f!OO%g!OO%h!OO~P!GTO!k&jO~O&V,kO~O![,mO~O&h,oO&j,pOP&eaQ&eaR&eaX&ea`&eac&ead&eal&ean&eao&eap&eav&eax&eaz&ea!P&ea!T&ea!U&ea![&ea!f&ea!k&ea!n&ea!o&ea!p&ea!r&ea!t&ea!w&ea!{&ea#s&ea$T&ea%b&ea%d&ea%f&ea%g&ea%h&ea%k&ea%m&ea%p&ea%q&ea%s&ea&P&ea&V&ea&X&ea&Z&ea&]&ea&`&ea&f&ea&l&ea&n&ea&p&ea&r&ea&t&ea'p&ea'{&ea'}&ea(Q&ea(X&ea(g&ea(t&ea!Z&ea&^&eaa&ea&c&ea~O'{,uO~Og!bX!Y!OX!Y!bX!Z!OX!Z!bX!d!OX!d!bX!k!bX#[!OX~O!d,zO#[,yOg(aX!Y#dX!Y(aX!Z#dX!Z(aX!d(aX!k(aX~Og%VO!d,|O!k%bO!Y!^X!Z!^X~Oo!nO!P!oO'}TO(QUO([!mO~OP:cOQ:cORfOc<[Od!iOlkOn:cOokOpkOvkOx:cOz:cO!PWO!TkO!UkO![!eO!f:fO!kZO!n:cO!o:cO!p:cO!r:gO!t:jO!w!hO$T!kO'}TO(QUO(XVO(g[O(t<YO~O'{;]O~P#!ZO!Y-QO!Z(`X~O!Z-SO~O!d,zO#[,yO!Y#dX!Z#dX~O!Y-TO!Z(nX~O!Z-VO~O!`-WO!a-WO'|!lO~P# xO!Z-ZO~P'_Oj-^O!['ZO~O!V-cO~Oo!za!_!za!`!za!a!za#P!za#Q!za#R!za#S!za#T!za#W!za#X!za'|!za'}!za(Q!za([!za(g!za~P!#`O!o-hO#[-fO~PCOO!`-jO!a-jO'|!lO~PCnO`%kO#[-fO'r%kO~O`%kO!d#uO#[-fO'r%kO~O`%kO!d#uO!o-hO#[-fO'r%kO(h'kO~O'w'sO'x'sO'y-oO~Or-pO~O!V'Pa!Y'Pa~P!8dO!X-tO!V'PX!Y'PX~P%[O!Y(PO!V(_a~O!V(_a~PGbO!Y(WO!V(la~O!P%eO!X-xO![%fO'{%dO!V'VX!Y'VX~O#[-zO!Y(ja!j(ja`(ja'r(ja~O!d#uO~P#*aO!Y(dO!j(ia~O!P%eO![%fO#f.OO'{%dO~Ol.TO!P%eO!X.QO![%fO!{]O#e.SO#f.QO'{%dO!Y'YX!j'YX~O}.XO!k#xO~Og%VOj.[O!['ZO%c.ZO~O`#_i!Y#_i'r#_i'p#_i!V#_i!j#_ir#_i![#_i%c#_i!d#_i~P!8dOj<fO|)zO!P){O(o$}O(p%PO~O#g#Za`#Za#[#Za'r#Za!Y#Za!j#Za![#Za!V#Za~P#-]O#g(WXP(WXZ(WX`(WXn(WX}(WX!h(WX!k(WX!o(WX#j(WX#k(WX#l(WX#m(WX#n(WX#o(WX#p(WX#q(WX#r(WX#t(WX#v(WX#x(WX#y(WX'r(WX(X(WX(h(WX!j(WX!V(WX'p(WXr(WX![(WX%c(WX!d(WX~P!4qO!Y.iOf(bX~P!0}Of.kO~O!Y.lO!j(cX~P!8dO!j.oO~O!V.qO~OP$]O|#yO}#zO!P#{O!i#wO!k#xO!o$]O(XVOZ#ii`#iin#ii!Y#ii!h#ii#k#ii#l#ii#m#ii#n#ii#o#ii#p#ii#q#ii#r#ii#t#ii#v#ii#x#ii#y#ii'r#ii(h#ii(o#ii(p#ii'p#ii!V#ii!j#iir#ii![#ii%c#ii!d#ii~O#j#ii~P#1XO#j$OO~P#1XOP$]O|#yO}#zO!P#{O!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO(XVOZ#ii`#ii!Y#ii!h#ii#n#ii#o#ii#p#ii#q#ii#r#ii#t#ii#v#ii#x#ii#y#ii'r#ii(h#ii(o#ii(p#ii'p#ii!V#ii!j#iir#ii![#ii%c#ii!d#ii~On#ii~P#3yOn$QO~P#3yOP$]On$QO|#yO}#zO!P#{O!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO#n$RO(XVO`#ii!Y#ii#t#ii#v#ii#x#ii#y#ii'r#ii(h#ii(o#ii(p#ii'p#ii!V#ii!j#iir#ii![#ii%c#ii!d#ii~OZ#ii!h#ii#o#ii#p#ii#q#ii#r#ii~P#6kOZ$dO!h$SO#o$SO#p$SO#q$cO#r$SO~P#6kOP$]OZ$dOn$QO|#yO}#zO!P#{O!h$SO!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO#n$RO#o$SO#p$SO#q$cO#r$SO#t$TO(XVO`#ii!Y#ii#v#ii#x#ii#y#ii'r#ii(h#ii(p#ii'p#ii!V#ii!j#iir#ii![#ii%c#ii!d#ii~O(o#ii~P#9lO(o#|O~P#9lOP$]OZ$dOn$QO|#yO}#zO!P#{O!h$SO!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO#n$RO#o$SO#p$SO#q$cO#r$SO#t$TO#v$VO(XVO(o#|O`#ii!Y#ii#x#ii#y#ii'r#ii(h#ii'p#ii!V#ii!j#iir#ii![#ii%c#ii!d#ii~O(p#ii~P#<^O(p#}O~P#<^OP$]OZ$dOn$QO|#yO}#zO!P#{O!h$SO!i#wO!k#xO!o$]O#j$OO#k$PO#l$PO#m$PO#n$RO#o$SO#p$SO#q$cO#r$SO#t$TO#v$VO#x$XO(XVO(o#|O(p#}O~O`#ii!Y#ii#y#ii'r#ii(h#ii'p#ii!V#ii!j#iir#ii![#ii%c#ii!d#ii~P#?OOP[XZ[Xn[X|[X}[X!P[X!h[X!i[X!k[X!o[X#[[X#geX#j[X#k[X#l[X#m[X#n[X#o[X#p[X#q[X#r[X#t[X#v[X#x[X#y[X$O[X(X[X(h[X(o[X(p[X!Y[X!Z[X~O#|[X~P#AiOP$]OZ:zOn:nO|#yO}#zO!P#{O!h:pO!i#wO!k#xO!o$]O#j:lO#k:mO#l:mO#m:mO#n:oO#o:pO#p:pO#q:yO#r:pO#t:qO#v:sO#x:uO#y:vO(XVO(h$ZO(o#|O(p#}O~O#|.sO~P#CvO#[:{O$O:{O#|(^X!Z(^X~P! [O`']a!Y']a'r']a'p']a!j']a!V']ar']a![']a%c']a!d']a~P!8dOP#iiZ#ii`#iin#ii}#ii!Y#ii!h#ii!i#ii!k#ii!o#ii#j#ii#k#ii#l#ii#m#ii#n#ii#o#ii#p#ii#q#ii#r#ii#t#ii#v#ii#x#ii#y#ii'r#ii(X#ii(h#ii'p#ii!V#ii!j#iir#ii![#ii%c#ii!d#ii~P#-]O`#}i!Y#}i'r#}i'p#}i!V#}i!j#}ir#}i![#}i%c#}i!d#}i~P!8dO$Y.xO$[.xO~O$Y.yO$[.yO~O!d)cO#[.zO![$`X$W$`X$Y$`X$[$`X$c$`X~O!X.{O~O![)fO$W.}O$Y)eO$[)eO$c/OO~O!Y:wO!Z(]X~P#CvO!Z/PO~O!d)cO$c(qX~O$c/RO~Ot)uO(Y)vO(Z/UO~O!V/YO~P!&dO(o$}Oj%Za|%Za!P%Za(p%Za!Y%Za#[%Za~Of%Za#|%Za~P#LWO(p%POj%]a|%]a!P%]a(o%]a!Y%]a#[%]a~Of%]a#|%]a~P#LyO!YeX!deX!jeX!j$uX(heX~P!/tO!j/bO~P#-]O!Y/cO!d#uO(h'kO!j(uX~O!j/hO~O!X*WO'{%dO!j(uP~O#g/jO~O!V$uX!Y$uX!d$|X~P!/tO!Y/kO!V(vX~P#-]O!d/mO~O!V/oO~Og%VOn/sO!d#uO!k%bO(h'kO~O'{/uO~O!d+`O~O`%kO!Y/yO'r%kO~O!Z/{O~P!3xO!`/|O!a/|O'|!lO([!mO~O!P0OO([!mO~O#W0PO~Of%Za!Y%Za#[%Za#|%Za~P!0}Of%]a!Y%]a#[%]a#|%]a~P!0}O'{&UOf'fX!Y'fX~O!Y*rOf(Ua~Of0YO~O|0ZO}0ZO!P0[Ojya(oya(pya!Yya#[ya~Ofya#|ya~P$$dO|)zO!P){Oj$na(o$na(p$na!Y$na#[$na~Of$na#|$na~P$%YO|)zO!P){Oj$pa(o$pa(p$pa!Y$pa#[$pa~Of$pa#|$pa~P$%{O#g0^O~Of%Oa!Y%Oa#[%Oa#|%Oa~P!0}O!d#uO~O#g0aO~O!Y+TO`(za'r(za~O|#yO}#zO!P#{O!i#wO!k#xO(XVOP!qiZ!qin!qi!Y!qi!h!qi!o!qi#j!qi#k!qi#l!qi#m!qi#n!qi#o!qi#p!qi#q!qi#r!qi#t!qi#v!qi#x!qi#y!qi(h!qi(o!qi(p!qi~O`!qi'r!qi'p!qi!V!qi!j!qir!qi![!qi%c!qi!d!qi~P$'jOg%VOn$tOo$sOp$sOv%XOx%YOz;QO!P${O![$|O!f<`O!k$xO#f;WO$T%^O$o;SO$q;UO$t%_O'}TO(QUO(X$uO(o$}O(p%PO~Ol0kO'{0jO~P$*TO!d+`O`(Ta![(Ta'r(Ta!Y(Ta~O#g0qO~OZ[X!YeX!ZeX~O!Y0rO!Z)OX~O!Z0tO~OZ0uO~Oa0wO'{+hO'}TO(QUO~O![%{O'{%dO_'nX!Y'nX~O!Y+mO_(}a~O!j0zO~P!8dOZ0}O~O_1OO~O#[1RO~Oj1UO![$|O~O([(xO!Z({P~Og%VOj1_O![1[O%c1^O~OZ1iO!Y1gO!Z(|X~O!Z1jO~O_1lO`%kO'r%kO~O'{#mO'}TO(QUO~O#[$eO$O$eOP(^XZ(^Xn(^X|(^X}(^X!P(^X!Y(^X!h(^X!k(^X!o(^X#j(^X#k(^X#l(^X#m(^X#n(^X#o(^X#p(^X#q(^X#t(^X#v(^X#x(^X#y(^X(X(^X(h(^X(o(^X(p(^X~O#r1oO&T1pO`(^X!i(^X~P$/kO#[$eO#r1oO&T1pO~O`1rO~P%[O`1tO~O&^1wOP&[iQ&[iR&[iX&[i`&[ic&[id&[il&[in&[io&[ip&[iv&[ix&[iz&[i!P&[i!T&[i!U&[i![&[i!f&[i!k&[i!n&[i!o&[i!p&[i!r&[i!t&[i!w&[i!{&[i#s&[i$T&[i%b&[i%d&[i%f&[i%g&[i%h&[i%k&[i%m&[i%p&[i%q&[i%s&[i&P&[i&V&[i&X&[i&Z&[i&]&[i&`&[i&f&[i&l&[i&n&[i&p&[i&r&[i&t&[i'p&[i'{&[i'}&[i(Q&[i(X&[i(g&[i(t&[i!Z&[ia&[i&c&[i~Oa1}O!Z1{O&c1|O~P`O![XO!k2PO~O&j,pOP&eiQ&eiR&eiX&ei`&eic&eid&eil&ein&eio&eip&eiv&eix&eiz&ei!P&ei!T&ei!U&ei![&ei!f&ei!k&ei!n&ei!o&ei!p&ei!r&ei!t&ei!w&ei!{&ei#s&ei$T&ei%b&ei%d&ei%f&ei%g&ei%h&ei%k&ei%m&ei%p&ei%q&ei%s&ei&P&ei&V&ei&X&ei&Z&ei&]&ei&`&ei&f&ei&l&ei&n&ei&p&ei&r&ei&t&ei'p&ei'{&ei'}&ei(Q&ei(X&ei(g&ei(t&ei!Z&ei&^&eia&ei&c&ei~O!V2VO~O!Y!^a!Z!^a~P#CvOo!nO!P!oO!X2]O([!mO!Y'QX!Z'QX~P@UO!Y-QO!Z(`a~O!Y'WX!Z'WX~P!7lO!Y-TO!Z(na~O!Z2dO~P'_O`%kO#[2mO'r%kO~O`%kO!d#uO#[2mO'r%kO~O`%kO!d#uO!o2qO#[2mO'r%kO(h'kO~O`%kO'r%kO~P!8dO!Y$aOr$ma~O!V'Pi!Y'Pi~P!8dO!Y(PO!V(_i~O!Y(WO!V(li~O!V(mi!Y(mi~P!8dO!Y(ji!j(ji`(ji'r(ji~P!8dO#[2sO!Y(ji!j(ji`(ji'r(ji~O!Y(dO!j(ii~O!P%eO![%fO!{]O#e2xO#f2wO'{%dO~O!P%eO![%fO#f2wO'{%dO~Oj3PO!['ZO%c3OO~Og%VOj3PO!['ZO%c3OO~O#g%ZaP%ZaZ%Za`%Zan%Za}%Za!h%Za!i%Za!k%Za!o%Za#j%Za#k%Za#l%Za#m%Za#n%Za#o%Za#p%Za#q%Za#r%Za#t%Za#v%Za#x%Za#y%Za'r%Za(X%Za(h%Za!j%Za!V%Za'p%Zar%Za![%Za%c%Za!d%Za~P#LWO#g%]aP%]aZ%]a`%]an%]a}%]a!h%]a!i%]a!k%]a!o%]a#j%]a#k%]a#l%]a#m%]a#n%]a#o%]a#p%]a#q%]a#r%]a#t%]a#v%]a#x%]a#y%]a'r%]a(X%]a(h%]a!j%]a!V%]a'p%]ar%]a![%]a%c%]a!d%]a~P#LyO#g%ZaP%ZaZ%Za`%Zan%Za}%Za!Y%Za!h%Za!i%Za!k%Za!o%Za#j%Za#k%Za#l%Za#m%Za#n%Za#o%Za#p%Za#q%Za#r%Za#t%Za#v%Za#x%Za#y%Za'r%Za(X%Za(h%Za!j%Za!V%Za'p%Za#[%Zar%Za![%Za%c%Za!d%Za~P#-]O#g%]aP%]aZ%]a`%]an%]a}%]a!Y%]a!h%]a!i%]a!k%]a!o%]a#j%]a#k%]a#l%]a#m%]a#n%]a#o%]a#p%]a#q%]a#r%]a#t%]a#v%]a#x%]a#y%]a'r%]a(X%]a(h%]a!j%]a!V%]a'p%]a#[%]ar%]a![%]a%c%]a!d%]a~P#-]O#gyaPyaZya`yanya!hya!iya!kya!oya#jya#kya#lya#mya#nya#oya#pya#qya#rya#tya#vya#xya#yya'rya(Xya(hya!jya!Vya'pyarya![ya%cya!dya~P$$dO#g$naP$naZ$na`$nan$na}$na!h$na!i$na!k$na!o$na#j$na#k$na#l$na#m$na#n$na#o$na#p$na#q$na#r$na#t$na#v$na#x$na#y$na'r$na(X$na(h$na!j$na!V$na'p$nar$na![$na%c$na!d$na~P$%YO#g$paP$paZ$pa`$pan$pa}$pa!h$pa!i$pa!k$pa!o$pa#j$pa#k$pa#l$pa#m$pa#n$pa#o$pa#p$pa#q$pa#r$pa#t$pa#v$pa#x$pa#y$pa'r$pa(X$pa(h$pa!j$pa!V$pa'p$par$pa![$pa%c$pa!d$pa~P$%{O#g%OaP%OaZ%Oa`%Oan%Oa}%Oa!Y%Oa!h%Oa!i%Oa!k%Oa!o%Oa#j%Oa#k%Oa#l%Oa#m%Oa#n%Oa#o%Oa#p%Oa#q%Oa#r%Oa#t%Oa#v%Oa#x%Oa#y%Oa'r%Oa(X%Oa(h%Oa!j%Oa!V%Oa'p%Oa#[%Oar%Oa![%Oa%c%Oa!d%Oa~P#-]O`#_q!Y#_q'r#_q'p#_q!V#_q!j#_qr#_q![#_q%c#_q!d#_q~P!8dOf'RX!Y'RX~P!(SO!Y.iOf(ba~O!X3ZO!Y'SX!j'SX~P%[O!Y.lO!j(ca~O!Y.lO!j(ca~P!8dO!V3^O~O#|!ma!Z!ma~PKOO#|!ea!Y!ea!Z!ea~P#CvO#|!qa!Z!qa~P!:}O#|!sa!Z!sa~P!=hORfO![3pO$a3qO~O!Z3uO~Or3vO~P#-]O`$jq!Y$jq'r$jq'p$jq!V$jq!j$jqr$jq![$jq%c$jq!d$jq~P!8dO!V3wO~P#-]O|)zO!P){O(p%POj'ba(o'ba!Y'ba#['ba~Of'ba#|'ba~P%)_O|)zO!P){Oj'da(o'da(p'da!Y'da#['da~Of'da#|'da~P%*QO(h$ZO~P#-]O!X3zO'{%dO!Y'^X!j'^X~O!Y/cO!j(ua~O!Y/cO!d#uO!j(ua~O!Y/cO!d#uO(h'kO!j(ua~Of$wi!Y$wi#[$wi#|$wi~P!0}O!X4SO'{*]O!V'`X!Y'`X~P!1lO!Y/kO!V(va~O!Y/kO!V(va~P#-]O!d#uO#r4[O~On4_O!d#uO(h'kO~O(o$}Oj%Zi|%Zi!P%Zi(p%Zi!Y%Zi#[%Zi~Of%Zi#|%Zi~P%-dO(p%POj%]i|%]i!P%]i(o%]i!Y%]i#[%]i~Of%]i#|%]i~P%.VOf(Vi!Y(Vi~P!0}O#[4fOf(Vi!Y(Vi~P!0}O!j4iO~O`$kq!Y$kq'r$kq'p$kq!V$kq!j$kqr$kq![$kq%c$kq!d$kq~P!8dO!V4mO~O!Y4nO![(wX~P#-]O!i#wO~P4XO`$uX![$uX%W[X'r$uX!Y$uX~P!/tO%W4pO`kXjkX|kX!PkX![kX'rkX(okX(pkX!YkX~O%W4pO~Oa4vO%d4wO'{+hO'}TO(QUO!Y'mX!Z'mX~O!Y0rO!Z)Oa~OZ4{O~O_4|O~O`%kO'r%kO~P#-]O![$|O~P#-]O!Y5UO#[5WO!Z({X~O!Z5XO~Oo!nO!P5YO!_!xO!`!uO!a!uO!{:dO#P!pO#Q!pO#R!pO#S!pO#T!pO#W5_O#X!yO'|!lO'}TO(QUO([!mO(g!sO~O!Z5^O~P%3hOj5dO![1[O%c5cO~Og%VOj5dO![1[O%c5cO~Oa5kO'{#mO'}TO(QUO!Y'lX!Z'lX~O!Y1gO!Z(|a~O'}TO(QUO([5mO~O_5qO~O#r5tO&T5uO~PMnO!j5vO~P%[O`5xO~O`5xO~P%[Oa1}O!Z5}O&c1|O~P`O!d6PO~O!d6ROg(ai!Y(ai!Z(ai!d(ai!k(ai~O!Y#di!Z#di~P#CvO#[6SO!Y#di!Z#di~O!Y!^i!Z!^i~P#CvO`%kO#[6]O'r%kO~O`%kO!d#uO#[6]O'r%kO~O!Y(jq!j(jq`(jq'r(jq~P!8dO!Y(dO!j(iq~O!P%eO![%fO#f6dO'{%dO~O!['ZO%c6gO~Oj6jO!['ZO%c6gO~O#g'baP'baZ'ba`'ban'ba}'ba!h'ba!i'ba!k'ba!o'ba#j'ba#k'ba#l'ba#m'ba#n'ba#o'ba#p'ba#q'ba#r'ba#t'ba#v'ba#x'ba#y'ba'r'ba(X'ba(h'ba!j'ba!V'ba'p'bar'ba!['ba%c'ba!d'ba~P%)_O#g'daP'daZ'da`'dan'da}'da!h'da!i'da!k'da!o'da#j'da#k'da#l'da#m'da#n'da#o'da#p'da#q'da#r'da#t'da#v'da#x'da#y'da'r'da(X'da(h'da!j'da!V'da'p'dar'da!['da%c'da!d'da~P%*QO#g$wiP$wiZ$wi`$win$wi}$wi!Y$wi!h$wi!i$wi!k$wi!o$wi#j$wi#k$wi#l$wi#m$wi#n$wi#o$wi#p$wi#q$wi#r$wi#t$wi#v$wi#x$wi#y$wi'r$wi(X$wi(h$wi!j$wi!V$wi'p$wi#[$wir$wi![$wi%c$wi!d$wi~P#-]O#g%ZiP%ZiZ%Zi`%Zin%Zi}%Zi!h%Zi!i%Zi!k%Zi!o%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#p%Zi#q%Zi#r%Zi#t%Zi#v%Zi#x%Zi#y%Zi'r%Zi(X%Zi(h%Zi!j%Zi!V%Zi'p%Zir%Zi![%Zi%c%Zi!d%Zi~P%-dO#g%]iP%]iZ%]i`%]in%]i}%]i!h%]i!i%]i!k%]i!o%]i#j%]i#k%]i#l%]i#m%]i#n%]i#o%]i#p%]i#q%]i#r%]i#t%]i#v%]i#x%]i#y%]i'r%]i(X%]i(h%]i!j%]i!V%]i'p%]ir%]i![%]i%c%]i!d%]i~P%.VOf'Ra!Y'Ra~P!0}O!Y'Sa!j'Sa~P!8dO!Y.lO!j(ci~O#|#_i!Y#_i!Z#_i~P#CvOP$]O|#yO}#zO!P#{O!i#wO!k#xO!o$]O(XVOZ#iin#ii!h#ii#k#ii#l#ii#m#ii#n#ii#o#ii#p#ii#q#ii#r#ii#t#ii#v#ii#x#ii#y#ii#|#ii(h#ii(o#ii(p#ii!Y#ii!Z#ii~O#j#ii~P%FhO#j:lO~P%FhOP$]O|#yO}#zO!P#{O!i#wO!k#xO!o$]O#j:lO#k:mO#l:mO#m:mO(XVOZ#ii!h#ii#n#ii#o#ii#p#ii#q#ii#r#ii#t#ii#v#ii#x#ii#y#ii#|#ii(h#ii(o#ii(p#ii!Y#ii!Z#ii~On#ii~P%HsOn:nO~P%HsOP$]On:nO|#yO}#zO!P#{O!i#wO!k#xO!o$]O#j:lO#k:mO#l:mO#m:mO#n:oO(XVO#t#ii#v#ii#x#ii#y#ii#|#ii(h#ii(o#ii(p#ii!Y#ii!Z#ii~OZ#ii!h#ii#o#ii#p#ii#q#ii#r#ii~P%KOOZ:zO!h:pO#o:pO#p:pO#q:yO#r:pO~P%KOOP$]OZ:zOn:nO|#yO}#zO!P#{O!h:pO!i#wO!k#xO!o$]O#j:lO#k:mO#l:mO#m:mO#n:oO#o:pO#p:pO#q:yO#r:pO#t:qO(XVO#v#ii#x#ii#y#ii#|#ii(h#ii(p#ii!Y#ii!Z#ii~O(o#ii~P%MjO(o#|O~P%MjOP$]OZ:zOn:nO|#yO}#zO!P#{O!h:pO!i#wO!k#xO!o$]O#j:lO#k:mO#l:mO#m:mO#n:oO#o:pO#p:pO#q:yO#r:pO#t:qO#v:sO(XVO(o#|O#x#ii#y#ii#|#ii(h#ii!Y#ii!Z#ii~O(p#ii~P& uO(p#}O~P& uOP$]OZ:zOn:nO|#yO}#zO!P#{O!h:pO!i#wO!k#xO!o$]O#j:lO#k:mO#l:mO#m:mO#n:oO#o:pO#p:pO#q:yO#r:pO#t:qO#v:sO#x:uO(XVO(o#|O(p#}O~O#y#ii#|#ii(h#ii!Y#ii!Z#ii~P&$QO`#zy!Y#zy'r#zy'p#zy!V#zy!j#zyr#zy![#zy%c#zy!d#zy~P!8dOj<gO|)zO!P){O(o$}O(p%PO~OP#iiZ#iin#ii}#ii!h#ii!i#ii!k#ii!o#ii#j#ii#k#ii#l#ii#m#ii#n#ii#o#ii#p#ii#q#ii#r#ii#t#ii#v#ii#x#ii#y#ii#|#ii(X#ii(h#ii!Y#ii!Z#ii~P&&xO!i#wOP(WXZ(WXj(WXn(WX|(WX}(WX!P(WX!h(WX!k(WX!o(WX#j(WX#k(WX#l(WX#m(WX#n(WX#o(WX#p(WX#q(WX#r(WX#t(WX#v(WX#x(WX#y(WX#|(WX(X(WX(h(WX(o(WX(p(WX!Y(WX!Z(WX~O#|#}i!Y#}i!Z#}i~P#CvO#|!qi!Z!qi~P$'jO!Z6|O~O!Y']a!Z']a~P#CvO!d#uO(h'kO!Y'^a!j'^a~O!Y/cO!j(ui~O!Y/cO!d#uO!j(ui~Of$wq!Y$wq#[$wq#|$wq~P!0}O!V'`a!Y'`a~P#-]O!d7TO~O!Y/kO!V(vi~P#-]O!Y/kO!V(vi~O!V7XO~O!d#uO#r7^O~On7_O!d#uO(h'kO~O|)zO!P){O(p%POj'ca(o'ca!Y'ca#['ca~Of'ca#|'ca~P&.YO|)zO!P){Oj'ea(o'ea(p'ea!Y'ea#['ea~Of'ea#|'ea~P&.{O!V7aO~Of$yq!Y$yq#[$yq#|$yq~P!0}O`$ky!Y$ky'r$ky'p$ky!V$ky!j$kyr$ky![$ky%c$ky!d$ky~P!8dO!d6RO~O!Y4nO![(wa~O`#_y!Y#_y'r#_y'p#_y!V#_y!j#_yr#_y![#_y%c#_y!d#_y~P!8dOZ7fO~Oa7hO'{+hO'}TO(QUO~O!Y0rO!Z)Oi~O_7lO~O([(xO!Y'iX!Z'iX~O!Y5UO!Z({a~OlkO'{7sO~P.iO!Z7vO~P%3hOo!nO!P7wO'}TO(QUO([!mO(g!sO~O![1[O~O![1[O%c7yO~Oj7|O![1[O%c7yO~OZ8RO!Y'la!Z'la~O!Y1gO!Z(|i~O!j8VO~O!j8WO~O!j8ZO~O!j8ZO~P%[O`8]O~O!d8^O~O!j8_O~O!Y(mi!Z(mi~P#CvO`%kO#[8gO'r%kO~O!Y(jy!j(jy`(jy'r(jy~P!8dO!Y(dO!j(iy~O!['ZO%c8jO~O#g$wqP$wqZ$wq`$wqn$wq}$wq!Y$wq!h$wq!i$wq!k$wq!o$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#p$wq#q$wq#r$wq#t$wq#v$wq#x$wq#y$wq'r$wq(X$wq(h$wq!j$wq!V$wq'p$wq#[$wqr$wq![$wq%c$wq!d$wq~P#-]O#g'caP'caZ'ca`'can'ca}'ca!h'ca!i'ca!k'ca!o'ca#j'ca#k'ca#l'ca#m'ca#n'ca#o'ca#p'ca#q'ca#r'ca#t'ca#v'ca#x'ca#y'ca'r'ca(X'ca(h'ca!j'ca!V'ca'p'car'ca!['ca%c'ca!d'ca~P&.YO#g'eaP'eaZ'ea`'ean'ea}'ea!h'ea!i'ea!k'ea!o'ea#j'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#t'ea#v'ea#x'ea#y'ea'r'ea(X'ea(h'ea!j'ea!V'ea'p'ear'ea!['ea%c'ea!d'ea~P&.{O#g$yqP$yqZ$yq`$yqn$yq}$yq!Y$yq!h$yq!i$yq!k$yq!o$yq#j$yq#k$yq#l$yq#m$yq#n$yq#o$yq#p$yq#q$yq#r$yq#t$yq#v$yq#x$yq#y$yq'r$yq(X$yq(h$yq!j$yq!V$yq'p$yq#[$yqr$yq![$yq%c$yq!d$yq~P#-]O!Y'Si!j'Si~P!8dO#|#_q!Y#_q!Z#_q~P#CvO(o$}OP%ZaZ%Zan%Za}%Za!h%Za!i%Za!k%Za!o%Za#j%Za#k%Za#l%Za#m%Za#n%Za#o%Za#p%Za#q%Za#r%Za#t%Za#v%Za#x%Za#y%Za#|%Za(X%Za(h%Za!Y%Za!Z%Za~Oj%Za|%Za!P%Za(p%Za~P&@bO(p%POP%]aZ%]an%]a}%]a!h%]a!i%]a!k%]a!o%]a#j%]a#k%]a#l%]a#m%]a#n%]a#o%]a#p%]a#q%]a#r%]a#t%]a#v%]a#x%]a#y%]a#|%]a(X%]a(h%]a!Y%]a!Z%]a~Oj%]a|%]a!P%]a(o%]a~P&BiOj<gO|)zO!P){O(p%PO~P&@bOj<gO|)zO!P){O(o$}O~P&BiO|0ZO}0ZO!P0[OPyaZyajyanya!hya!iya!kya!oya#jya#kya#lya#mya#nya#oya#pya#qya#rya#tya#vya#xya#yya#|ya(Xya(hya(oya(pya!Yya!Zya~O|)zO!P){OP$naZ$naj$nan$na}$na!h$na!i$na!k$na!o$na#j$na#k$na#l$na#m$na#n$na#o$na#p$na#q$na#r$na#t$na#v$na#x$na#y$na#|$na(X$na(h$na(o$na(p$na!Y$na!Z$na~O|)zO!P){OP$paZ$paj$pan$pa}$pa!h$pa!i$pa!k$pa!o$pa#j$pa#k$pa#l$pa#m$pa#n$pa#o$pa#p$pa#q$pa#r$pa#t$pa#v$pa#x$pa#y$pa#|$pa(X$pa(h$pa(o$pa(p$pa!Y$pa!Z$pa~OP%OaZ%Oan%Oa}%Oa!h%Oa!i%Oa!k%Oa!o%Oa#j%Oa#k%Oa#l%Oa#m%Oa#n%Oa#o%Oa#p%Oa#q%Oa#r%Oa#t%Oa#v%Oa#x%Oa#y%Oa#|%Oa(X%Oa(h%Oa!Y%Oa!Z%Oa~P&&xO#|$jq!Y$jq!Z$jq~P#CvO#|$kq!Y$kq!Z$kq~P#CvO!Z8vO~O#|8wO~P!0}O!d#uO!Y'^i!j'^i~O!d#uO(h'kO!Y'^i!j'^i~O!Y/cO!j(uq~O!V'`i!Y'`i~P#-]O!Y/kO!V(vq~O!V8}O~P#-]O!V8}O~Of(Vy!Y(Vy~P!0}O!Y'ga!['ga~P#-]O`%Vq![%Vq'r%Vq!Y%Vq~P#-]OZ9SO~O!Y0rO!Z)Oq~O#[9WO!Y'ia!Z'ia~O!Y5UO!Z({i~P#CvOP[XZ[Xn[X|[X}[X!P[X!V[X!Y[X!h[X!i[X!k[X!o[X#[[X#geX#j[X#k[X#l[X#m[X#n[X#o[X#p[X#q[X#r[X#t[X#v[X#x[X#y[X$O[X(X[X(h[X(o[X(p[X~O!d%TX#r%TX~P'#SO![1[O%c9[O~O'}TO(QUO([9aO~O!Y1gO!Z(|q~O!j9dO~O!j9eO~O!j9fO~O!j9fO~P%[O#[9iO!Y#dy!Z#dy~O!Y#dy!Z#dy~P#CvO!['ZO%c9nO~O#|#zy!Y#zy!Z#zy~P#CvOP$wiZ$win$wi}$wi!h$wi!i$wi!k$wi!o$wi#j$wi#k$wi#l$wi#m$wi#n$wi#o$wi#p$wi#q$wi#r$wi#t$wi#v$wi#x$wi#y$wi#|$wi(X$wi(h$wi!Y$wi!Z$wi~P&&xO|)zO!P){O(p%POP'baZ'baj'ban'ba}'ba!h'ba!i'ba!k'ba!o'ba#j'ba#k'ba#l'ba#m'ba#n'ba#o'ba#p'ba#q'ba#r'ba#t'ba#v'ba#x'ba#y'ba#|'ba(X'ba(h'ba(o'ba!Y'ba!Z'ba~O|)zO!P){OP'daZ'daj'dan'da}'da!h'da!i'da!k'da!o'da#j'da#k'da#l'da#m'da#n'da#o'da#p'da#q'da#r'da#t'da#v'da#x'da#y'da#|'da(X'da(h'da(o'da(p'da!Y'da!Z'da~O(o$}OP%ZiZ%Zij%Zin%Zi|%Zi}%Zi!P%Zi!h%Zi!i%Zi!k%Zi!o%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#p%Zi#q%Zi#r%Zi#t%Zi#v%Zi#x%Zi#y%Zi#|%Zi(X%Zi(h%Zi(p%Zi!Y%Zi!Z%Zi~O(p%POP%]iZ%]ij%]in%]i|%]i}%]i!P%]i!h%]i!i%]i!k%]i!o%]i#j%]i#k%]i#l%]i#m%]i#n%]i#o%]i#p%]i#q%]i#r%]i#t%]i#v%]i#x%]i#y%]i#|%]i(X%]i(h%]i(o%]i!Y%]i!Z%]i~O#|$ky!Y$ky!Z$ky~P#CvO#|#_y!Y#_y!Z#_y~P#CvO!d#uO!Y'^q!j'^q~O!Y/cO!j(uy~O!V'`q!Y'`q~P#-]O!V9wO~P#-]O!Y0rO!Z)Oy~O!Y5UO!Z({q~O![1[O%c:OO~O!j:RO~O!['ZO%c:WO~OP$wqZ$wqn$wq}$wq!h$wq!i$wq!k$wq!o$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#p$wq#q$wq#r$wq#t$wq#v$wq#x$wq#y$wq#|$wq(X$wq(h$wq!Y$wq!Z$wq~P&&xO|)zO!P){O(p%POP'caZ'caj'can'ca}'ca!h'ca!i'ca!k'ca!o'ca#j'ca#k'ca#l'ca#m'ca#n'ca#o'ca#p'ca#q'ca#r'ca#t'ca#v'ca#x'ca#y'ca#|'ca(X'ca(h'ca(o'ca!Y'ca!Z'ca~O|)zO!P){OP'eaZ'eaj'ean'ea}'ea!h'ea!i'ea!k'ea!o'ea#j'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#t'ea#v'ea#x'ea#y'ea#|'ea(X'ea(h'ea(o'ea(p'ea!Y'ea!Z'ea~OP$yqZ$yqn$yq}$yq!h$yq!i$yq!k$yq!o$yq#j$yq#k$yq#l$yq#m$yq#n$yq#o$yq#p$yq#q$yq#r$yq#t$yq#v$yq#x$yq#y$yq#|$yq(X$yq(h$yq!Y$yq!Z$yq~P&&xOf%_!Z!Y%_!Z#[%_!Z#|%_!Z~P!0}O!Y'iq!Z'iq~P#CvO!Y#d!Z!Z#d!Z~P#CvO#g%_!ZP%_!ZZ%_!Z`%_!Zn%_!Z}%_!Z!Y%_!Z!h%_!Z!i%_!Z!k%_!Z!o%_!Z#j%_!Z#k%_!Z#l%_!Z#m%_!Z#n%_!Z#o%_!Z#p%_!Z#q%_!Z#r%_!Z#t%_!Z#v%_!Z#x%_!Z#y%_!Z'r%_!Z(X%_!Z(h%_!Z!j%_!Z!V%_!Z'p%_!Z#[%_!Zr%_!Z![%_!Z%c%_!Z!d%_!Z~P#-]OP%_!ZZ%_!Zn%_!Z}%_!Z!h%_!Z!i%_!Z!k%_!Z!o%_!Z#j%_!Z#k%_!Z#l%_!Z#m%_!Z#n%_!Z#o%_!Z#p%_!Z#q%_!Z#r%_!Z#t%_!Z#v%_!Z#x%_!Z#y%_!Z#|%_!Z(X%_!Z(h%_!Z!Y%_!Z!Z%_!Z~P&&xOr(]X~P1qO'|!lO~P!*fO!VeX!YeX#[eX~P'#SOP[XZ[Xn[X|[X}[X!P[X!Y[X!YeX!h[X!i[X!k[X!o[X#[[X#[eX#geX#j[X#k[X#l[X#m[X#n[X#o[X#p[X#q[X#r[X#t[X#v[X#x[X#y[X$O[X(X[X(h[X(o[X(p[X~O!deX!j[X!jeX(heX~P'@vOP:cOQ:cORfOc<[Od!iOlkOn:cOokOpkOvkOx:cOz:cO!PWO!TkO!UkO![XO!f:fO!kZO!n:cO!o:cO!p:cO!r:gO!t:jO!w!hO$T!kO'{)YO'}TO(QUO(XVO(g[O(t<YO~O!Y:wO!Z$ma~Og%VOl%WOn$tOo$sOp$sOv%XOx%YOz;RO!P${O![$|O!f<aO!k$xO#f;XO$T%^O$o;TO$q;VO$t%_O'{(pO'}TO(QUO(X$uO(o$}O(p%PO~O#s)aO~P'ElO!Z[X!ZeX~P'@vO#g:kO~O!d#uO#g:kO~O#[:{O~O#r:pO~O#[;ZO!Y(mX!Z(mX~O#[:{O!Y(kX!Z(kX~O#g;[O~Of;^O~P!0}O#g;cO~O#g;dO~O!d#uO#g;eO~O!d#uO#g;[O~O#|;fO~P#CvO#g;gO~O#g;hO~O#g;mO~O#g;nO~O#g;oO~O#g;pO~O#|;qO~P!0}O#|;rO~P!0}O!i#P#Q#S#T#W#e#f#q(t$o$q$t%W%b%c%d%k%m%p%q%s%u~'vS#k!U't'|#lo#j#mn|'u$Y'u'{$[([~",
  goto: "$2p)SPPPPP)TPP)WP)iP*x.|PPPP5pPP6WPP<S?gP?zP?zPPP?zPAxP?zP?zP?zPA|PPBRPBlPGdPPPGhPPPPGhJiPPPJoKjPGhPMxPPPP!!WGhPPPGhPGhP!$fGhP!'z!(|!)VP!)y!)}!)yPPPPP!-Y!(|PP!-v!.pP!1dGhGh!1i!4s!9Y!9Y!=OPPP!=VGhPPPPPPPPPPP!@dP!AuPPGh!CSPGhPGhGhGhGhPGh!DfP!GnP!JrP!Jv!KQ!KU!KUP!GkP!KY!KYP!N^P!NbGhGh!Nh##k?zP?zP?z?zP#$v?z?z#'O?z#)k?z#+m?z?z#,[#.f#.f#.j#.r#.f#.zP#.fP?z#/d?z#3R?z?z5pPPP#6vPPP#7a#7aP#7aP#7w#7aPP#7}P#7tP#7t#8b#7t#8|#9S5m)W#9V)WP#9^#9^#9^P)WP)WP)WP)WPP)WP#9d#9gP#9g)WP#9kP#9nP)WP)WP)WP)WP)WP)W)WPP#9t#9z#:V#:]#:c#:i#:o#:}#;T#;Z#;e#;k#;u#<U#<[#<|#=`#=f#=l#=z#>a#@O#@^#@d#Ax#BW#Cr#DQ#DW#D^#Dd#Dn#Dt#Dz#EU#Eh#EnPPPPPPPPPP#EtPPPPPPP#Fi#Ip#KP#KW#K`PPPP$!d$%Z$+r$+u$+x$,q$,t$,w$-O$-WPP$-^$-b$.Y$/X$/]$/qPP$/u$/{$0PP$0S$0W$0Z$1P$1h$2P$2T$2W$2Z$2a$2d$2h$2lR!{RoqOXst!Z#c%j&m&o&p&r,h,m1w1zY!uQ'Z-Y1[5]Q%pvQ%xyQ&P|Q&e!VS'R!e-QQ'a!iS'g!r!xS*c$|*hQ+f%yQ+s&RQ,X&_Q-W'YQ-b'bQ-j'hQ/|*jQ1f,YR;Y:g%OdOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S,e,h,m-^-f-t-z.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3Z5Y5d5t5u5x6]7w7|8]8gS#p]:d!r)[$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q*u%ZQ+k%{Q,Z&bQ,b&jQ.c;QQ0h+^Q0l+`Q0w+lQ1n,`Q2{.[Q4v0rQ5k1gQ6i3PQ6u;RQ7h4wR8m6j&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]t!nQ!r!u!x!y'R'Y'Z'g'h'i-Q-W-Y-j1[5]5_$v$si#u#w$c$d$x${%O%Q%[%]%a)u){)}*P*R*Y*`*p*q+]+`+w+z.Z.i/Z/j/k/m0Q0S0^1R1U1^3O3x4S4[4f4n4p5c6g7T7^7y8j8w9[9n:O:W:y:z:|:};O;P;S;T;U;V;W;X;_;`;a;b;c;d;g;h;i;j;k;l;m;n;q;r<Y<b<c<f<gQ&S|Q'P!eS'V%f-TQ+k%{Q,Z&bQ0]*yQ0w+lQ0|+rQ1m,_Q1n,`Q4v0rQ5P1OQ5k1gQ5n1iQ5o1lQ7h4wQ7k4|Q8U5qQ9V7lR9b8RrnOXst!V!Z#c%j&d&m&o&p&r,h,m1w1zR,]&f&v^OPXYstuvwz!Z!`!g!j!o#R#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O']'m(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<[<][#[WZ#V#Y'S'}!S%gm#g#h#k%b%e(W(b(c(d+Q+R+T,d,z-x.O.P.Q.S2P2w2x6R6dQ%sxQ%wyS%||&RQ&Y!TQ'^!hQ'`!iQ(k#rS*V$x*ZS+e%x%yQ+i%{Q,S&]Q,W&_S-a'a'bQ.^(lQ/g*WQ0p+fQ0v+lQ0x+mQ0{+qQ1a,TS1e,X,YQ2i-bQ3y/cQ4u0rQ4y0uQ5O0}Q5j1fQ7Q3zQ7g4wQ7j4{Q9R7fR9y9S!O$zi#w%O%Q%[%]%a)}*P*Y*p*q.i/j0Q0S0^3x4f8w<Y<b<c!S%uy!i!t%w%x%y'Q'`'a'b'f'p*b+e+f,}-a-b-i/t0p2b2i2p4^Q+_%sQ+x&VQ+{&WQ,V&_Q.](kQ1`,SU1d,W,X,YQ3Q.^Q5e1aS5i1e1fQ8Q5j#W<^#u$c$d$x${)u){*R*`+]+`+w+z.Z/Z/k/m1R1U1^3O4S4[4n4p5c6g7T7^7y8j9[9n:O:W:|;O;S;U;W;_;a;c;g;i;k;m;q<f<go<_:y:z:};P;T;V;X;`;b;d;h;j;l;n;rW%Ti%V*r<YS&V!Q&dQ&W!RQ&X!SR+v&T$w%Si#u#w$c$d$x${%O%Q%[%]%a)u){)}*P*R*Y*`*p*q+]+`+w+z.Z.i/Z/j/k/m0Q0S0^1R1U1^3O3x4S4[4f4n4p5c6g7T7^7y8j8w9[9n:O:W:y:z:|:};O;P;S;T;U;V;W;X;_;`;a;b;c;d;g;h;i;j;k;l;m;n;q;r<Y<b<c<f<gT)v$u)wV*v%Z;Q;RU'V!e%f-TS(y#y#zQ+p&OS.V(g(hQ1V+|Q4g0ZR7p5U&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]$i$`c#X#d%n%o%q'|(S(n(u(})O)P)Q)R)S)T)U)V)W)X)Z)^)b)l+Z+o-O-m-r-w-y.h.n.r.t.u.v/V0_2W2Z2k2r3Y3_3`3a3b3c3d3e3f3g3h3i3j3k3n3o3t4k4s6U6[6a6o6p6y6z7r8a8e8n8t8u9k9{:S:e<PT#SV#T&}kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q'T!eR2^-Qv!nQ!e!r!u!x!y'R'Y'Z'g'h'i-Q-W-Y-j1[5]5_S*b$|*hS/t*c*jQ/}*kQ1X,OQ4^/|R4a0PnqOXst!Z#c%j&m&o&p&r,h,m1w1zQ&t!^Q'q!wS(m#t:kQ+c%vQ,Q&YQ,R&[Q-_'_Q-l'jS.g(r;[S0`+O;eQ0n+dQ1Z,PQ2O,oQ2Q,pQ2Y,{Q2g-`Q2j-dS4l0a;oQ4q0oS4t0q;pQ6T2[Q6X2hQ6^2oQ7e4rQ8b6VQ8c6YQ8f6_R9h8_$d$_c#X#d%o%q'|(S(n(u(})O)P)Q)R)S)T)U)V)W)X)Z)^)b)l+Z+o-O-m-r-w-y.h.n.r.u.v/V0_2W2Z2k2r3Y3_3`3a3b3c3d3e3f3g3h3i3j3k3n3o3t4k4s6U6[6a6o6p6y6z7r8a8e8n8t8u9k9{:S:e<PS(j#o'dU*o%R(q3mS+Y%n.tQ2|0hQ6f2{Q8l6iR9o8m$d$^c#X#d%o%q'|(S(n(u(})O)P)Q)R)S)T)U)V)W)X)Z)^)b)l+Z+o-O-m-r-w-y.h.n.r.u.v/V0_2W2Z2k2r3Y3_3`3a3b3c3d3e3f3g3h3i3j3k3n3o3t4k4s6U6[6a6o6p6y6z7r8a8e8n8t8u9k9{:S:e<PS(i#o'dS({#z$_S+X%n.tS.W(h(jQ.w)]Q0e+YR2y.X&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]S#p]:dQ&o!XQ&p!YQ&r![Q&s!]R1v,kQ'[!hQ+[%sQ-]'^S.Y(k+_Q2e-[W2}.].^0g0iQ6W2fU6e2z2|3QS8i6f6hS9m8k8lS:U9l9oQ:^:VR:a:_U!vQ'Z-YT5Z1[5]!Q_OXZ`st!V!Z#c#g%b%j&d&f&m&o&p&r(d,h,m.P1w1z]!pQ!r'Z-Y1[5]T#p]:d%Y{OPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&j&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S+^,e,h,m-^-f-t-z.[.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3P3Z5Y5d5t5u5x6]6j7w7|8]8gS(y#y#zS.V(g(h!s;v$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Y!tQ'Z-Y1[5]Q'f!rS'p!u!xS'r!y5_S-i'g'hQ-k'iR2p-jQ'o!tS(`#f1qS-h'f'rQ/f*VQ/r*bQ2q-kQ4O/gS4X/s/}Q7P3yS7[4_4aQ8y7QR9Q7_Q#vbQ'n!tS(_#f1qS(a#l*}Q+P%cQ+a%tQ+g%zU-g'f'o'rQ-{(`Q/e*VQ/q*bQ/w*eQ0m+bQ1b,US2n-h-kQ2v.TS3}/f/gS4W/r/}Q4Z/vQ4]/xQ5g1cQ6`2qQ7O3yQ7S4OS7W4X4aQ7]4`Q8O5hS8x7P7QQ8|7XQ9O7[Q9_8PQ9u8yQ9v8}Q9x9QQ:Q9`Q:Y9wQ;y;tQ<U;}R<V<OV!vQ'Z-Y%YaOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&j&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S+^,e,h,m-^-f-t-z.[.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3P3Z5Y5d5t5u5x6]6j7w7|8]8gS#vz!j!r;s$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]R;y<[%YbOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&j&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S+^,e,h,m-^-f-t-z.[.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3P3Z5Y5d5t5u5x6]6j7w7|8]8gQ%cj!S%ty!i!t%w%x%y'Q'`'a'b'f'p*b+e+f,}-a-b-i/t0p2b2i2p4^S%zz!jQ+b%uQ,U&_W1c,V,W,X,YU5h1d1e1fS8P5i5jQ9`8Q!r;t$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q;}<ZR<O<[$|eOPXYstuvw!Z!`!g!o#R#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&m&o&p&r&v'O']'m(P(V(^(r(v(z)y+O+S+^,e,h,m-^-f-t-z.[.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3P3Z5Y5d5t5u5x6]6j7w7|8]8gY#aWZ#V#Y'}!S%gm#g#h#k%b%e(W(b(c(d+Q+R+T,d,z-x.O.P.Q.S2P2w2x6R6dQ,c&j!p;u$[$m)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]R;x'SS'W!e%fR2`-T%OdOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S,e,h,m-^-f-t-z.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3Z5Y5d5t5u5x6]7w7|8]8g!r)[$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q,b&jQ0h+^Q2{.[Q6i3PR8m6j!f$Uc#X%n'|(S(n(u)U)V)W)X)^)b+o-m-r-w-y.h.n/V0_2k2r3Y3k4k4s6[6a6o8e9k:e!T:r)Z)l-O.t2W2Z3_3g3h3i3j3n3t6U6p6y6z7r8a8n8t8u9{:S<P!b$Wc#X%n'|(S(n(u)W)X)^)b+o-m-r-w-y.h.n/V0_2k2r3Y3k4k4s6[6a6o8e9k:e!P:t)Z)l-O.t2W2Z3_3i3j3n3t6U6p6y6z7r8a8n8t8u9{:S<P!^$[c#X%n'|(S(n(u)^)b+o-m-r-w-y.h.n/V0_2k2r3Y3k4k4s6[6a6o8e9k:eQ3x/az<])Z)l-O.t2W2Z3_3n3t6U6p6y6z7r8a8n8t8u9{:S<PQ<b<dR<c<e&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]S$nh$oR3q.z'TgOPWXYZhstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m$o%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.z.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]T$jf$pQ$hfS)e$k)iR)q$pT$if$pT)g$k)i'ThOPWXYZhstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m$o%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.z.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]T$nh$oQ$qhR)p$o%YjOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&j&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S+^,e,h,m-^-f-t-z.[.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3P3Z5Y5d5t5u5x6]6j7w7|8]8g!s<Z$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]#clOPXZst!Z!`!o#R#c#n#{$m%j&f&i&j&m&o&p&r&v'O'](z)n+S+^,e,h,m-^.[.{0[1_1o1p1r1t1w1z1|3P3p5Y5d5t5u5x6j7w7|8]!O%Ri#w%O%Q%[%]%a)}*P*Y*p*q.i/j0Q0S0^3x4f8w<Y<b<c#W(q#u$c$d$x${)u){*R*`+]+`+w+z.Z/Z/k/m1R1U1^3O4S4[4n4p5c6g7T7^7y8j9[9n:O:W:|;O;S;U;W;_;a;c;g;i;k;m;q<f<gQ*z%_Q/W)zo3m:y:z:};P;T;V;X;`;b;d;h;j;l;n;r!O$yi#w%O%Q%[%]%a)}*P*Y*p*q.i/j0Q0S0^3x4f8w<Y<b<cQ*[$zS*e$|*hQ*{%`Q/x*f#W;{#u$c$d$x${)u){*R*`+]+`+w+z.Z/Z/k/m1R1U1^3O4S4[4n4p5c6g7T7^7y8j9[9n:O:W:|;O;S;U;W;_;a;c;g;i;k;m;q<f<gn;|:y:z:};P;T;V;X;`;b;d;h;j;l;n;rQ<Q<^Q<R<_Q<S<`R<T<a!O%Ri#w%O%Q%[%]%a)}*P*Y*p*q.i/j0Q0S0^3x4f8w<Y<b<c#W(q#u$c$d$x${)u){*R*`+]+`+w+z.Z/Z/k/m1R1U1^3O4S4[4n4p5c6g7T7^7y8j9[9n:O:W:|;O;S;U;W;_;a;c;g;i;k;m;q<f<go3m:y:z:};P;T;V;X;`;b;d;h;j;l;n;rnoOXst!Z#c%j&m&o&p&r,h,m1w1zQ*_${Q,v&yQ,w&{R4R/k$v%Si#u#w$c$d$x${%O%Q%[%]%a)u){)}*P*R*Y*`*p*q+]+`+w+z.Z.i/Z/j/k/m0Q0S0^1R1U1^3O3x4S4[4f4n4p5c6g7T7^7y8j8w9[9n:O:W:y:z:|:};O;P;S;T;U;V;W;X;_;`;a;b;c;d;g;h;i;j;k;l;m;n;q;r<Y<b<c<f<gQ+y&WQ1T+{Q5S1SR7o5TT*g$|*hS*g$|*hT5[1[5]S/v*d5YT4`0O7wQ+a%tQ/w*eQ0m+bQ1b,UQ5g1cQ8O5hQ9_8PR:Q9`!O%Oi#w%O%Q%[%]%a)}*P*Y*p*q.i/j0Q0S0^3x4f8w<Y<b<cr)}$v(s*O*n*|/i0U0V3W4P4j6}7`9t;z<W<XS0Q*m0R#W:|#u$c$d$x${)u){*R*`+]+`+w+z.Z/Z/k/m1R1U1^3O4S4[4n4p5c6g7T7^7y8j9[9n:O:W:|;O;S;U;W;_;a;c;g;i;k;m;q<f<gn:}:y:z:};P;T;V;X;`;b;d;h;j;l;n;r!^;_(o)`*U*^._.b.f/S/X/a/n0f1Q1S3T4Q4U5R5T6k6n7U7Y7b7d8{9P:X<d<e`;`3l6q6t6x8o9p9s:bS;i.a3UT;j6s8r!O%Qi#w%O%Q%[%]%a)}*P*Y*p*q.i/j0Q0S0^3x4f8w<Y<b<cv*P$v(s*Q*m*|/]/i0U0V3W4P4b4j6}7`9t;z<W<XS0S*n0T#W;O#u$c$d$x${)u){*R*`+]+`+w+z.Z/Z/k/m1R1U1^3O4S4[4n4p5c6g7T7^7y8j9[9n:O:W:|;O;S;U;W;_;a;c;g;i;k;m;q<f<gn;P:y:z:};P;T;V;X;`;b;d;h;j;l;n;r!b;a(o)`*U*^.`.a.f/S/X/a/n0f1Q1S3R3T4Q4U5R5T6k6l6n7U7Y7b7d8{9P:X<d<ed;b3l6r6s6x8o8p9p9q9s:bS;k.b3VT;l6t8srnOXst!V!Z#c%j&d&m&o&p&r,h,m1w1zQ&a!UR,e&jrnOXst!V!Z#c%j&d&m&o&p&r,h,m1w1zR&a!UQ+}&XR1P+vsnOXst!V!Z#c%j&d&m&o&p&r,h,m1w1zQ1],SS5b1`1aU7x5`5a5eS9Z7z7{S9|9Y9]Q:Z9}R:`:[Q&h!VR,^&dR5n1iS%||&RR0x+mQ&m!WR,h&nR,n&sT1x,m1zR,r&tQ,q&tR2R,rQ't!zR-n'tSsOtQ#cXT%ms#cQ!}TR'v!}Q#QUR'x#QQ)w$uR/T)wQ#TVR'z#TQ#WWU(Q#W(R-uQ(R#XR-u(SQ-R'TR2_-RQ.j(sR3X.jQ.m(uS3[.m3]R3].nQ-Y'ZR2c-YY!rQ'Z-Y1[5]R'e!rS#^W%eU(X#^(Y-vQ(Y#_R-v(TQ-U'WR2a-Ut`OXst!V!Z#c%j&d&f&m&o&p&r,h,m1w1zS#gZ%bU#q`#g.PR.P(dQ(e#iQ-|(aW.U(e-|2t6bQ2t-}R6b2uQ)i$kR.|)iQ$ohR)o$oQ$bcU)_$b-q:xQ-q:eR:x)lQ/d*VW3{/d3|7R8zU3|/e/f/gS7R3}4OR8z7S$X)|$v(o(s)`*U*^*m*n*w*x*|.a.b.d.e.f/S/X/]/_/a/i/n0U0V0f1Q1S3R3S3T3W3l4P4Q4U4b4d4j5R5T6k6l6m6n6s6t6v6w6x6}7U7Y7`7b7d8o8p8q8{9P9p9q9r9s9t:X:b;z<W<X<d<eQ/l*^U4T/l4V7VQ4V/nR7V4UQ*h$|R/z*hr*O$v(s*m*n*|/i0U0V3W4P4j6}7`9t;z<W<X!^._(o)`*U*^.a.b.f/S/X/a/n0f1Q1S3T4Q4U5R5T6k6n7U7Y7b7d8{9P:X<d<eU/^*O._6qa6q3l6s6t6x8o9p9s:bQ0R*mQ3U.aU4c0R3U8rR8r6sv*Q$v(s*m*n*|/]/i0U0V3W4P4b4j6}7`9t;z<W<X!b.`(o)`*U*^.a.b.f/S/X/a/n0f1Q1S3R3T4Q4U5R5T6k6l6n7U7Y7b7d8{9P:X<d<eU/`*Q.`6re6r3l6s6t6x8o8p9p9q9s:bQ0T*nQ3V.bU4e0T3V8sR8s6tQ*s%UR0X*sQ4o0fR7c4oQ+U%hR0d+UQ5V1VS7q5V9XR9X7rQ,P&YR1Y,PQ5]1[R7u5]Q1h,ZS5l1h8SR8S5nQ0s+iW4x0s4z7i9TQ4z0vQ7i4yR9T7jQ+n%|R0y+nQ1z,mR5|1zYrOXst#cQ&q!ZQ+W%jQ,g&mQ,i&oQ,j&pQ,l&rQ1u,hS1x,m1zR5{1wQ%lpQ&u!_Q&x!aQ&z!bQ&|!cQ'l!tQ+V%iQ+c%vQ+u&SQ,]&hQ,t&wW-e'f'n'o'rQ-l'jQ/y*gQ0n+dS1k,^,aQ2S,sQ2T,vQ2U,wQ2j-dW2l-g-h-k-mQ4q0oQ4}0|Q5Q1QQ5f1bQ5p1mQ5z1vU6Z2k2n2qQ6^2oQ7e4rQ7m5PQ7n5RQ7t5[Q7}5gQ8T5oS8d6[6`Q8f6_Q9U7kQ9^8OQ9c8UQ9j8eQ9z9VQ:P9_Q:T9kR:]:QQ%vyQ'_!iQ'j!tU+d%w%x%yQ,{'QU-`'`'a'bS-d'f'pQ/p*bS0o+e+fQ2[,}S2h-a-bQ2o-iQ4Y/tQ4r0pQ6V2bQ6Y2iQ6_2pR7Z4^S$wi<YR*t%VU%Ui%V<YR0W*rQ$viS(o#u+`Q(s#wS)`$c$dQ*U$xQ*^${Q*m%OQ*n%QQ*w%[Q*x%]Q*|%aQ.a:|Q.b;OQ.d;SQ.e;UQ.f;WQ/S)uS/X){/ZQ/])}Q/_*PQ/a*RQ/i*YQ/n*`Q0U*pQ0V*qh0f+].Z1^3O5c6g7y8j9[9n:O:WQ1Q+wQ1S+zQ3R;_Q3S;aQ3T;cQ3W.iS3l:y:zQ4P/jQ4Q/kQ4U/mQ4b0QQ4d0SQ4j0^Q5R1RQ5T1UQ6k;gQ6l;iQ6m;kQ6n;mQ6s:}Q6t;PQ6v;TQ6w;VQ6x;XQ6}3xQ7U4SQ7Y4[Q7`4fQ7b4nQ7d4pQ8o;dQ8p;`Q8q;bQ8{7TQ9P7^Q9p;hQ9q;jQ9r;lQ9s;nQ9t8wQ:X;qQ:b;rQ;z<YQ<W<bQ<X<cQ<d<fR<e<gnpOXst!Z#c%j&m&o&p&r,h,m1w1zQ!fPS#eZ#nQ&w!`U'c!o5Y7wQ'y#RQ(|#{Q)m$mS,a&f&iQ,f&jQ,s&vQ,x'OQ-[']Q.p(zQ/Q)nQ0b+SQ0i+^Q1s,eQ2f-^Q2|.[Q3s.{Q4h0[Q5a1_Q5r1oQ5s1pQ5w1rQ5y1tQ6O1|Q6f3PQ6{3pQ7{5dQ8X5tQ8Y5uQ8[5xQ8l6jQ9]7|R9g8]#WcOPXZst!Z!`!o#c#n#{%j&f&i&j&m&o&p&r&v'O'](z+S+^,e,h,m-^.[0[1_1o1p1r1t1w1z1|3P5Y5d5t5u5x6j7w7|8]Q#XWQ#dYQ%nuQ%ovS%qw!gS'|#V(PQ(S#YQ(n#tQ(u#xQ(}$OQ)O$PQ)P$QQ)Q$RQ)R$SQ)S$TQ)T$UQ)U$VQ)V$WQ)W$XQ)X$YQ)Z$[Q)^$aQ)b$eW)l$m)n.{3pQ+Z%pQ+o%}S-O'S2]Q-m'mS-r'}-tQ-w(VQ-y(^Q.h(rQ.n(vQ.r:cQ.t:fQ.u:gQ.v:jQ/V)yQ0_+OQ2W,yQ2Z,|Q2k-fQ2r-zQ3Y.lQ3_:kQ3`:lQ3a:mQ3b:nQ3c:oQ3d:pQ3e:qQ3f:rQ3g:sQ3h:tQ3i:uQ3j:vQ3k.sQ3n:{Q3o;YQ3t:wQ4k0aQ4s0qQ6U;ZQ6[2mQ6a2sQ6o3ZQ6p;[Q6y;^Q6z;eQ7r5WQ8a6SQ8e6]Q8n;fQ8t;oQ8u;pQ9k8gQ9{9WQ:S9iQ:e#RR<P<]R#ZWR'U!eY!tQ'Z-Y1[5]S'Q!e-QQ'f!rS'p!u!xS'r!y5_S,}'R'YS-i'g'hQ-k'iQ2b-WR2p-jR(t#wR(w#xQ!fQT-X'Z-Y]!qQ!r'Z-Y1[5]Q#o]R'd:dT#jZ%bS#iZ%bS%hm,dU(a#g#h#kS-}(b(cQ.R(dQ0c+TQ2u.OU2v.P.Q.SS6c2w2xR8h6d`#]W#V#Y%e'}(W+Q-xr#fZm#g#h#k%b(b(c(d+T.O.P.Q.S2w2x6dQ1q,dQ2X,zQ6Q2PQ8`6RT;w'S+RT#`W%eS#_W%eS(O#V(WS(T#Y+QS-P'S+RT-s'}-xT'X!e%fQ$kfR)s$pT)h$k)iR3r.zT*X$x*ZR*a${Q0g+]Q2z.ZQ5`1^Q6h3OQ7z5cQ8k6gQ9Y7yQ9l8jQ9}9[Q:V9nQ:[:OR:_:WnqOXst!Z#c%j&m&o&p&r,h,m1w1zQ&g!VR,]&dtmOXst!U!V!Z#c%j&d&m&o&p&r,h,m1w1zR,d&jT%im,dR1W+|R,[&bQ&Q|R+t&RR+j%{T&k!W&nT&l!W&nT1y,m1z",
  nodeNames: "⚠ ArithOp ArithOp JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",
  maxTerm: 371,
  context: wEe,
  nodeProps: [
    ["isolate", -8, 4, 5, 13, 33, 35, 48, 50, 52, ""],
    ["group", -26, 8, 16, 18, 65, 201, 205, 209, 210, 212, 215, 218, 228, 230, 236, 238, 240, 242, 245, 251, 257, 259, 261, 263, 265, 267, 268, "Statement", -32, 12, 13, 28, 31, 32, 38, 48, 51, 52, 54, 59, 67, 75, 79, 81, 83, 84, 106, 107, 116, 117, 134, 137, 139, 140, 141, 142, 144, 145, 164, 165, 167, "Expression", -23, 27, 29, 33, 37, 39, 41, 168, 170, 172, 173, 175, 176, 177, 179, 180, 181, 183, 184, 185, 195, 197, 199, 200, "Type", -3, 87, 99, 105, "ClassItem"],
    ["openedBy", 22, "<", 34, "InterpolationStart", 53, "[", 57, "{", 72, "(", 157, "JSXStartCloseTag"],
    ["closedBy", 23, ">", 36, "InterpolationEnd", 47, "]", 58, "}", 73, ")", 162, "JSXEndTag"]
  ],
  propSources: [SEe],
  skippedNodes: [0, 4, 5, 271],
  repeatNodeCount: 37,
  tokenData: "$Fj(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Ns!`!a$#_!a!b$(l!b!c$,k!c!}Er!}#O$-u#O#P$/P#P#Q$4h#Q#R$5r#R#SEr#S#T$7P#T#o$8Z#o#p$<k#p#q$=a#q#r$>q#r#s$?}#s$f%Z$f$g+g$g#BYEr#BY#BZ$AX#BZ$ISEr$IS$I_$AX$I_$I|Er$I|$I}$Dd$I}$JO$Dd$JO$JTEr$JT$JU$AX$JU$KVEr$KV$KW$AX$KW&FUEr&FU&FV$AX&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AX?HUOEr(n%d_$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$f&j(OpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(OpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$f&j(Op(R!b't(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST(P#S$f&j'u(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$f&j(Op(R!b'u(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$f&j!o$Ip(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/|3l_'}$(n$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$f&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$a`$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$a``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$a`$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(R!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$a`(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k#%|:hh$f&j(Op(R!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__VS$f&j(Op(R!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]VS$f&j(R!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXVS$f&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSVSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWVS(R!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]VS$f&j(OpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWVS(OpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYVS(Op(R!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S#%|C}i$f&j(g!L^(Op(R!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr#%|EoP;=`<%lCr(CSFRk$f&j(Op(R!b$Y#t'{&;d([!LYOY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$f&j(Op(R!b$Y#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv(CSJPP;=`<%lEr%#SJ_`$f&j(Op(R!b#l$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SKl_$f&j$O$Id(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&COLva(p&;`$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SNW`$f&j#x$Id(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/|! c_(Q$)`$f&j(OpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$f&j(OpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$f&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$a`$f&j(OpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(OpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$a`(OpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b(*Q!'t_!k(!b$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z!'l!)O_!jM|$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'+h!*[b$f&j(Op(R!b'|#)d#m$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S!+o`$f&j(Op(R!b#j$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&-O!,|`$f&j(Op(R!bn&%`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&C[!.Z_!Y&;l$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS!/ec$f&j(Op(R!b|'<nOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z!'d!0ya$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z!'d!2Z_!XMt$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!3eg$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!5Vg$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!6wc$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!8_c$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS!9uf$f&j(Op(R!b#k$IdOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Kpxz!;Zz{#,f{!P!;Z!P!Q#-{!Q!^!;Z!^!_#'Z!_!`#5k!`!a#7Q!a!}!;Z!}#O#*}#O#P!Dj#P#o!;Z#o#p#'Z#p;'S!;Z;'S;=`#,`<%lO!;Z(r!;fb$f&j(Op(R!b!USOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Kpx!P!;Z!P!Q#%Z!Q!^!;Z!^!_#'Z!_!}!;Z!}#O#*}#O#P!Dj#P#o!;Z#o#p#'Z#p;'S!;Z;'S;=`#,`<%lO!;Z(Q!<w`$f&j(R!b!USOY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eb!Q!^!<n!^!_!GY!_!}!<n!}#O!Ja#O#P!Dj#P#o!<n#o#p!GY#p;'S!<n;'S;=`!Kj<%lO!<n&n!>Q^$f&j!USOY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@Y!_!}!=y!}#O!Bw#O#P!Dj#P#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!?Ta$f&j!USO!^&c!_#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&cS!@_X!USOY!@YZ!P!@Y!P!Q!@z!Q!}!@Y!}#O!Ac#O#P!Bb#P;'S!@Y;'S;=`!Bq<%lO!@YS!APU!US#Z#[!@z#]#^!@z#a#b!@z#g#h!@z#i#j!@z#m#n!@zS!AfVOY!AcZ#O!Ac#O#P!A{#P#Q!@Y#Q;'S!Ac;'S;=`!B[<%lO!AcS!BOSOY!AcZ;'S!Ac;'S;=`!B[<%lO!AcS!B_P;=`<%l!AcS!BeSOY!@YZ;'S!@Y;'S;=`!Bq<%lO!@YS!BtP;=`<%l!@Y&n!B|[$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#O!Bw#O#P!Cr#P#Q!=y#Q#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!CwX$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!DgP;=`<%l!Bw&n!DoX$f&jOY!=yYZ&cZ!^!=y!^!_!@Y!_#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!E_P;=`<%l!=y(Q!Eki$f&j(R!b!USOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#Z&}#Z#[!Eb#[#]&}#]#^!Eb#^#a&}#a#b!Eb#b#g&}#g#h!Eb#h#i&}#i#j!Eb#j#m&}#m#n!Eb#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!GaZ(R!b!USOY!GYZw!GYwx!@Yx!P!GY!P!Q!HS!Q!}!GY!}#O!Ic#O#P!Bb#P;'S!GY;'S;=`!JZ<%lO!GY!f!HZb(R!b!USOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX(R!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$f&j(R!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!<n#Q#o!Ja#o#p!Ic#p;'S!Ja;'S;=`!Kd<%lO!Ja(Q!KgP;=`<%l!Ja(Q!KmP;=`<%l!<n'`!Ky`$f&j(Op!USOY!KpYZ&cZr!Kprs!=ys!P!Kp!P!Q!L{!Q!^!Kp!^!_!Ns!_!}!Kp!}#O##z#O#P!Dj#P#o!Kp#o#p!Ns#p;'S!Kp;'S;=`#%T<%lO!Kp'`!MUi$f&j(Op!USOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#Z(r#Z#[!L{#[#](r#]#^!L{#^#a(r#a#b!L{#b#g(r#g#h!L{#h#i(r#i#j!L{#j#m(r#m#n!L{#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rt!NzZ(Op!USOY!NsZr!Nsrs!@Ys!P!Ns!P!Q# m!Q!}!Ns!}#O#!|#O#P!Bb#P;'S!Ns;'S;=`##t<%lO!Nst# tb(Op!USOY)rZr)rs#O)r#P#Z)r#Z#[# m#[#])r#]#^# m#^#a)r#a#b# m#b#g)r#g#h# m#h#i)r#i#j# m#j#m)r#m#n# m#n;'S)r;'S;=`*Z<%lO)rt##RX(OpOY#!|Zr#!|rs!Acs#O#!|#O#P!A{#P#Q!Ns#Q;'S#!|;'S;=`##n<%lO#!|t##qP;=`<%l#!|t##wP;=`<%l!Ns'`#$R^$f&j(OpOY##zYZ&cZr##zrs!Bws!^##z!^!_#!|!_#O##z#O#P!Cr#P#Q!Kp#Q#o##z#o#p#!|#p;'S##z;'S;=`#$}<%lO##z'`#%QP;=`<%l##z'`#%WP;=`<%l!Kp(r#%fk$f&j(Op(R!b!USOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#Z%Z#Z#[#%Z#[#]%Z#]#^#%Z#^#a%Z#a#b#%Z#b#g%Z#g#h#%Z#h#i%Z#i#j#%Z#j#m%Z#m#n#%Z#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#W#'d](Op(R!b!USOY#'ZZr#'Zrs!GYsw#'Zwx!Nsx!P#'Z!P!Q#(]!Q!}#'Z!}#O#)w#O#P!Bb#P;'S#'Z;'S;=`#*w<%lO#'Z#W#(fe(Op(R!b!USOY*gZr*grs'}sw*gwx)rx#O*g#P#Z*g#Z#[#(]#[#]*g#]#^#(]#^#a*g#a#b#(]#b#g*g#g#h#(]#h#i*g#i#j#(]#j#m*g#m#n#(]#n;'S*g;'S;=`+Z<%lO*g#W#*OZ(Op(R!bOY#)wZr#)wrs!Icsw#)wwx#!|x#O#)w#O#P!A{#P#Q#'Z#Q;'S#)w;'S;=`#*q<%lO#)w#W#*tP;=`<%l#)w#W#*zP;=`<%l#'Z(r#+W`$f&j(Op(R!bOY#*}YZ&cZr#*}rs!Jasw#*}wx##zx!^#*}!^!_#)w!_#O#*}#O#P!Cr#P#Q!;Z#Q#o#*}#o#p#)w#p;'S#*};'S;=`#,Y<%lO#*}(r#,]P;=`<%l#*}(r#,cP;=`<%l!;Z(CS#,sb$f&j(Op(R!b'v(;d!USOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Kpx!P!;Z!P!Q#%Z!Q!^!;Z!^!_#'Z!_!}!;Z!}#O#*}#O#P!Dj#P#o!;Z#o#p#'Z#p;'S!;Z;'S;=`#,`<%lO!;Z(CS#.W_$f&j(Op(R!bS(;dOY#-{YZ&cZr#-{rs#/Vsw#-{wx#2gx!^#-{!^!_#4f!_#O#-{#O#P#0X#P#o#-{#o#p#4f#p;'S#-{;'S;=`#5e<%lO#-{(Bb#/`]$f&j(R!bS(;dOY#/VYZ&cZw#/Vwx#0Xx!^#/V!^!_#1j!_#O#/V#O#P#0X#P#o#/V#o#p#1j#p;'S#/V;'S;=`#2a<%lO#/V(AO#0`X$f&jS(;dOY#0XYZ&cZ!^#0X!^!_#0{!_#o#0X#o#p#0{#p;'S#0X;'S;=`#1d<%lO#0X(;d#1QSS(;dOY#0{Z;'S#0{;'S;=`#1^<%lO#0{(;d#1aP;=`<%l#0{(AO#1gP;=`<%l#0X(<v#1qW(R!bS(;dOY#1jZw#1jwx#0{x#O#1j#O#P#0{#P;'S#1j;'S;=`#2Z<%lO#1j(<v#2^P;=`<%l#1j(Bb#2dP;=`<%l#/V(Ap#2p]$f&j(OpS(;dOY#2gYZ&cZr#2grs#0Xs!^#2g!^!_#3i!_#O#2g#O#P#0X#P#o#2g#o#p#3i#p;'S#2g;'S;=`#4`<%lO#2g(<U#3pW(OpS(;dOY#3iZr#3irs#0{s#O#3i#O#P#0{#P;'S#3i;'S;=`#4Y<%lO#3i(<U#4]P;=`<%l#3i(Ap#4cP;=`<%l#2g(=h#4oY(Op(R!bS(;dOY#4fZr#4frs#1jsw#4fwx#3ix#O#4f#O#P#0{#P;'S#4f;'S;=`#5_<%lO#4f(=h#5bP;=`<%l#4f(CS#5hP;=`<%l#-{%#W#5xb$f&j$O$Id(Op(R!b!USOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Kpx!P!;Z!P!Q#%Z!Q!^!;Z!^!_#'Z!_!}!;Z!}#O#*}#O#P!Dj#P#o!;Z#o#p#'Z#p;'S!;Z;'S;=`#,`<%lO!;Z+h#7_b$W#t$f&j(Op(R!b!USOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Kpx!P!;Z!P!Q#%Z!Q!^!;Z!^!_#'Z!_!}!;Z!}#O#*}#O#P!Dj#P#o!;Z#o#p#'Z#p;'S!;Z;'S;=`#,`<%lO!;Z$/l#8rp$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#:v![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#:v#S#U%Z#U#V#>Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#<v#c#d#AY#d#l%Z#l#m#D[#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#;Rk$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#:v![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#:v#S#X%Z#X#Y!4|#Y#b%Z#b#c#<v#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#=R_$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>Zd$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#<v#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#Acc$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#Bn!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#Bn#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#Bye$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#Bn!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#Bn#S#b%Z#b#c#<v#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#Deg$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#E|![!^%Z!^!_*g!_!c%Z!c!i#E|!i#O%Z#O#P&c#P#R%Z#R#S#E|#S#T%Z#T#Z#E|#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#FXi$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#E|![!^%Z!^!_*g!_!c%Z!c!i#E|!i#O%Z#O#P&c#P#R%Z#R#S#E|#S#T%Z#T#Z#E|#Z#b%Z#b#c#<v#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#HT_!d$b$f&j#|%<f(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#I__`l$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(@^#Jk^g!*v!h'.r(Op(R!b(tSOY*gZr*grs'}sw*gwx)rx!P*g!P!Q#Kg!Q!^*g!^!_#L]!_!`#M}!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#KpX$h&j(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g$Kh#LfZ#n$Id(Op(R!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#MX!`#O*g#P;'S*g;'S;=`+Z<%lO*g$Kh#MbX$O$Id(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g$Kh#NWX#o$Id(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g%Gh$ Oa#[%?x$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$!T!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#W$!`_#g$Ih$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh$#nafBf#o$Id$c#|$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$$s!`!a$%}!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S$%O_#o$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S$&Ya#n$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$'_!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S$'j`#n$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'+h$(wc(h$Ip$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P$*S!P!^%Z!^!_*g!_!a%Z!a!b$+^!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'+`$*__}'#p$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S$+i`$f&j#y$Id(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&^$,v_!{!Ln$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(@^$.Q_!P(8n$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/UZ$f&jO!^$/w!^!_$0_!_#i$/w#i#j$0d#j#l$/w#l#m$2V#m#o$/w#o#p$0_#p;'S$/w;'S;=`$4b<%lO$/w(n$0OT^#S$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0dO^#S(n$0i[$f&jO!Q&c!Q![$1_![!^&c!_!c&c!c!i$1_!i#T&c#T#Z$1_#Z#o&c#o#p$3u#p;'S&c;'S;=`&w<%lO&c(n$1dZ$f&jO!Q&c!Q![$2V![!^&c!_!c&c!c!i$2V!i#T&c#T#Z$2V#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2[Z$f&jO!Q&c!Q![$2}![!^&c!_!c&c!c!i$2}!i#T&c#T#Z$2}#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3SZ$f&jO!Q&c!Q![$/w![!^&c!_!c&c!c!i$/w!i#T&c#T#Z$/w#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$3xR!Q![$4R!c!i$4R#T#Z$4R#S$4US!Q![$4R!c!i$4R#T#Z$4R#q#r$0_(n$4eP;=`<%l$/w!2r$4s_!V!+S$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S$5}`#v$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&,v$7[_$f&j(Op(R!b(X&%WOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS$8jk$f&j(Op(R!b'{&;d$[#t([!LYOY%ZYZ&cZr%Zrs&}st%Ztu$8Zuw%Zwx(rx}%Z}!O$:_!O!Q%Z!Q![$8Z![!^%Z!^!_*g!_!c%Z!c!}$8Z!}#O%Z#O#P&c#P#R%Z#R#S$8Z#S#T%Z#T#o$8Z#o#p*g#p$g%Z$g;'S$8Z;'S;=`$<e<%lO$8Z+d$:jk$f&j(Op(R!b$[#tOY%ZYZ&cZr%Zrs&}st%Ztu$:_uw%Zwx(rx}%Z}!O$:_!O!Q%Z!Q![$:_![!^%Z!^!_*g!_!c%Z!c!}$:_!}#O%Z#O#P&c#P#R%Z#R#S$:_#S#T%Z#T#o$:_#o#p*g#p$g%Z$g;'S$:_;'S;=`$<_<%lO$:_+d$<bP;=`<%l$:_(CS$<hP;=`<%l$8Z!5p$<tX![!3l(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g&CO$=la(o&;`$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+^#q;'S%Z;'S;=`+a<%lO%Z%#`$?O_!Z$I`r`$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(r$@Y_!pS$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS$Aj|$f&j(Op(R!b't(;d$Y#t'{&;d([!LYOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$AX#BZ$ISEr$IS$I_$AX$I_$JTEr$JT$JU$AX$JU$KVEr$KV$KW$AX$KW&FUEr&FU&FV$AX&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AX?HUOEr(CS$Duk$f&j(Op(R!b'u(;d$Y#t'{&;d([!LYOY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",
  tokenizers: [xEe, _Ee, OEe, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, kEe, new Gw("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOt~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(Z~~", 141, 332), new Gw("j~RQYZXz{^~^O'x~~aP!P!Qd~iO'y~~", 25, 315)],
  topRules: { Script: [0, 6], SingleExpression: [1, 269], SingleClassItem: [2, 270] },
  dialects: { jsx: 0, ts: 14602 },
  dynamicPrecedences: { 69: 1, 79: 1, 81: 1, 165: 1, 193: 1 },
  specialized: [{ term: 319, get: (t) => CEe[t] || -1 }, { term: 334, get: (t) => EEe[t] || -1 }, { term: 70, get: (t) => TEe[t] || -1 }],
  tokenPrec: 14626
}), qZ = [
  /* @__PURE__ */ hs("function ${name}(${params}) {\n	${}\n}", {
    label: "function",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ hs("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n	${}\n}", {
    label: "for",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ hs("for (let ${name} of ${collection}) {\n	${}\n}", {
    label: "for",
    detail: "of loop",
    type: "keyword"
  }),
  /* @__PURE__ */ hs("do {\n	${}\n} while (${})", {
    label: "do",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ hs("while (${}) {\n	${}\n}", {
    label: "while",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ hs(`try {
	\${}
} catch (\${error}) {
	\${}
}`, {
    label: "try",
    detail: "/ catch block",
    type: "keyword"
  }),
  /* @__PURE__ */ hs("if (${}) {\n	${}\n}", {
    label: "if",
    detail: "block",
    type: "keyword"
  }),
  /* @__PURE__ */ hs(`if (\${}) {
	\${}
} else {
	\${}
}`, {
    label: "if",
    detail: "/ else block",
    type: "keyword"
  }),
  /* @__PURE__ */ hs(`class \${name} {
	constructor(\${params}) {
		\${}
	}
}`, {
    label: "class",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ hs('import {${names}} from "${module}"\n${}', {
    label: "import",
    detail: "named",
    type: "keyword"
  }),
  /* @__PURE__ */ hs('import ${name} from "${module}"\n${}', {
    label: "import",
    detail: "default",
    type: "keyword"
  })
], MEe = /* @__PURE__ */ qZ.concat([
  /* @__PURE__ */ hs("interface ${name} {\n	${}\n}", {
    label: "interface",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ hs("type ${name} = ${type}", {
    label: "type",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ hs("enum ${name} {\n	${}\n}", {
    label: "enum",
    detail: "definition",
    type: "keyword"
  })
]), PP = /* @__PURE__ */ new bQ(), YZ = /* @__PURE__ */ new Set([
  "Script",
  "Block",
  "FunctionExpression",
  "FunctionDeclaration",
  "ArrowFunction",
  "MethodDeclaration",
  "ForStatement"
]);
function Pm(t) {
  return (e, n) => {
    let i = e.node.getChild("VariableDefinition");
    return i && n(i, t), !0;
  };
}
const NEe = ["FunctionDeclaration"], AEe = {
  FunctionDeclaration: /* @__PURE__ */ Pm("function"),
  ClassDeclaration: /* @__PURE__ */ Pm("class"),
  ClassExpression: () => !0,
  EnumDeclaration: /* @__PURE__ */ Pm("constant"),
  TypeAliasDeclaration: /* @__PURE__ */ Pm("type"),
  NamespaceDeclaration: /* @__PURE__ */ Pm("namespace"),
  VariableDefinition(t, e) {
    t.matchContext(NEe) || e(t, "variable");
  },
  TypeDefinition(t, e) {
    e(t, "type");
  },
  __proto__: null
};
function VZ(t, e) {
  let n = PP.get(e);
  if (n)
    return n;
  let i = [], r = !0;
  function s(o, a) {
    let l = t.sliceString(o.from, o.to);
    i.push({ label: l, type: a });
  }
  return e.cursor(hn.IncludeAnonymous).iterate((o) => {
    if (r)
      r = !1;
    else if (o.name) {
      let a = AEe[o.name];
      if (a && a(o, s) || YZ.has(o.name))
        return !1;
    } else if (o.to - o.from > 8192) {
      for (let a of VZ(t, o.node))
        i.push(a);
      return !1;
    }
  }), PP.set(e, i), i;
}
const IP = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, XZ = [
  "TemplateString",
  "String",
  "RegExp",
  "LineComment",
  "BlockComment",
  "VariableDefinition",
  "TypeDefinition",
  "Label",
  "PropertyDefinition",
  "PropertyName",
  "PrivatePropertyDefinition",
  "PrivatePropertyName",
  "JSXText",
  "JSXAttributeValue",
  "JSXOpenTag",
  "JSXCloseTag",
  "JSXSelfClosingTag",
  ".",
  "?."
];
function DEe(t) {
  let e = ri(t.state).resolveInner(t.pos, -1);
  if (XZ.indexOf(e.name) > -1)
    return null;
  let n = e.name == "VariableName" || e.to - e.from < 20 && IP.test(t.state.sliceDoc(e.from, e.to));
  if (!n && !t.explicit)
    return null;
  let i = [];
  for (let r = e; r; r = r.parent)
    YZ.has(r.name) && (i = i.concat(VZ(t.state.doc, r)));
  return {
    options: i,
    from: n ? e.from : t.pos,
    validFor: IP
  };
}
const Ea = /* @__PURE__ */ Nh.define({
  name: "javascript",
  parser: /* @__PURE__ */ $Ee.configure({
    props: [
      /* @__PURE__ */ y2.add({
        IfStatement: /* @__PURE__ */ my({ except: /^\s*({|else\b)/ }),
        TryStatement: /* @__PURE__ */ my({ except: /^\s*({|catch\b|finally\b)/ }),
        LabeledStatement: Z3e,
        SwitchBody: (t) => {
          let e = t.textAfter, n = /^\s*\}/.test(e), i = /^\s*(case|default)\b/.test(e);
          return t.baseIndent + (n ? 0 : i ? 1 : 2) * t.unit;
        },
        Block: /* @__PURE__ */ U3e({ closing: "}" }),
        ArrowFunction: (t) => t.baseIndent + t.unit,
        "TemplateString BlockComment": () => null,
        "Statement Property": /* @__PURE__ */ my({ except: /^\s*{/ }),
        JSXElement(t) {
          let e = /^\s*<\//.test(t.textAfter);
          return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
        },
        JSXEscape(t) {
          let e = /\s*\}/.test(t.textAfter);
          return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
        },
        "JSXOpenTag JSXSelfClosingTag"(t) {
          return t.column(t.node.from) + t.unit;
        }
      }),
      /* @__PURE__ */ w2.add({
        "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": CQ,
        BlockComment(t) {
          return { from: t.from + 2, to: t.to - 2 };
        }
      })
    ]
  }),
  languageData: {
    closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
    commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
    indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
    wordChars: "$"
  }
}), GZ = {
  test: (t) => /^JSX/.test(t.name),
  facet: /* @__PURE__ */ xQ({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
}, KZ = /* @__PURE__ */ Ea.configure({ dialect: "ts" }, "typescript"), JZ = /* @__PURE__ */ Ea.configure({
  dialect: "jsx",
  props: [/* @__PURE__ */ TE.add((t) => t.isTop ? [GZ] : void 0)]
}), eq = /* @__PURE__ */ Ea.configure({
  dialect: "jsx ts",
  props: [/* @__PURE__ */ TE.add((t) => t.isTop ? [GZ] : void 0)]
}, "typescript");
let tq = (t) => ({ label: t, type: "keyword" });
const nq = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(tq), PEe = /* @__PURE__ */ nq.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(tq));
function FC(t = {}) {
  let e = t.jsx ? t.typescript ? eq : JZ : t.typescript ? KZ : Ea, n = t.typescript ? MEe.concat(PEe) : qZ.concat(nq);
  return new $E(e, [
    Ea.data.of({
      autocomplete: s4e(XZ, NU(n))
    }),
    Ea.data.of({
      autocomplete: DEe
    }),
    t.jsx ? REe : []
  ]);
}
function IEe(t) {
  for (; ; ) {
    if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag")
      return t;
    if (t.name == "JSXEscape" || !t.parent)
      return null;
    t = t.parent;
  }
}
function LP(t, e, n = t.length) {
  for (let i = e == null ? void 0 : e.firstChild; i; i = i.nextSibling)
    if (i.name == "JSXIdentifier" || i.name == "JSXBuiltin" || i.name == "JSXNamespacedName" || i.name == "JSXMemberExpression")
      return t.sliceString(i.from, Math.min(i.to, n));
  return "";
}
const LEe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), REe = /* @__PURE__ */ Te.inputHandler.of((t, e, n, i, r) => {
  if ((LEe ? t.composing : t.compositionStarted) || t.state.readOnly || e != n || i != ">" && i != "/" || !Ea.isActiveAt(t.state, e, -1))
    return !1;
  let s = r(), { state: o } = s, a = o.changeByRange((l) => {
    var u;
    let { head: f } = l, d = ri(o).resolveInner(f - 1, -1), h;
    if (d.name == "JSXStartTag" && (d = d.parent), !(o.doc.sliceString(f - 1, f) != i || d.name == "JSXAttributeValue" && d.to > f)) {
      if (i == ">" && d.name == "JSXFragmentTag")
        return { range: l, changes: { from: f, insert: "</>" } };
      if (i == "/" && d.name == "JSXStartCloseTag") {
        let m = d.parent, g = m.parent;
        if (g && m.from == f - 2 && ((h = LP(o.doc, g.firstChild, f)) || ((u = g.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) {
          let w = `${h}>`;
          return { range: he.cursor(f + w.length, -1), changes: { from: f, insert: w } };
        }
      } else if (i == ">") {
        let m = IEe(d);
        if (m && m.name == "JSXOpenTag" && !/^\/?>|^<\//.test(o.doc.sliceString(f, f + 2)) && (h = LP(o.doc, m, f)))
          return { range: l, changes: { from: f, insert: `</${h}>` } };
      }
    }
    return { range: l };
  });
  return a.changes.empty ? !1 : (t.dispatch([
    s,
    o.update(a, { userEvent: "input.complete", scrollIntoView: !0 })
  ]), !0);
}), Im = ["_blank", "_self", "_top", "_parent"], EO = ["ascii", "utf-8", "utf-16", "latin1", "latin1"], TO = ["get", "post", "put", "delete"], $O = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"], Ms = ["true", "false"], Xe = {}, jEe = {
  a: {
    attrs: {
      href: null,
      ping: null,
      type: null,
      media: null,
      target: Im,
      hreflang: null
    }
  },
  abbr: Xe,
  address: Xe,
  area: {
    attrs: {
      alt: null,
      coords: null,
      href: null,
      target: null,
      ping: null,
      media: null,
      hreflang: null,
      type: null,
      shape: ["default", "rect", "circle", "poly"]
    }
  },
  article: Xe,
  aside: Xe,
  audio: {
    attrs: {
      src: null,
      mediagroup: null,
      crossorigin: ["anonymous", "use-credentials"],
      preload: ["none", "metadata", "auto"],
      autoplay: ["autoplay"],
      loop: ["loop"],
      controls: ["controls"]
    }
  },
  b: Xe,
  base: { attrs: { href: null, target: Im } },
  bdi: Xe,
  bdo: Xe,
  blockquote: { attrs: { cite: null } },
  body: Xe,
  br: Xe,
  button: {
    attrs: {
      form: null,
      formaction: null,
      name: null,
      value: null,
      autofocus: ["autofocus"],
      disabled: ["autofocus"],
      formenctype: $O,
      formmethod: TO,
      formnovalidate: ["novalidate"],
      formtarget: Im,
      type: ["submit", "reset", "button"]
    }
  },
  canvas: { attrs: { width: null, height: null } },
  caption: Xe,
  center: Xe,
  cite: Xe,
  code: Xe,
  col: { attrs: { span: null } },
  colgroup: { attrs: { span: null } },
  command: {
    attrs: {
      type: ["command", "checkbox", "radio"],
      label: null,
      icon: null,
      radiogroup: null,
      command: null,
      title: null,
      disabled: ["disabled"],
      checked: ["checked"]
    }
  },
  data: { attrs: { value: null } },
  datagrid: { attrs: { disabled: ["disabled"], multiple: ["multiple"] } },
  datalist: { attrs: { data: null } },
  dd: Xe,
  del: { attrs: { cite: null, datetime: null } },
  details: { attrs: { open: ["open"] } },
  dfn: Xe,
  div: Xe,
  dl: Xe,
  dt: Xe,
  em: Xe,
  embed: { attrs: { src: null, type: null, width: null, height: null } },
  eventsource: { attrs: { src: null } },
  fieldset: { attrs: { disabled: ["disabled"], form: null, name: null } },
  figcaption: Xe,
  figure: Xe,
  footer: Xe,
  form: {
    attrs: {
      action: null,
      name: null,
      "accept-charset": EO,
      autocomplete: ["on", "off"],
      enctype: $O,
      method: TO,
      novalidate: ["novalidate"],
      target: Im
    }
  },
  h1: Xe,
  h2: Xe,
  h3: Xe,
  h4: Xe,
  h5: Xe,
  h6: Xe,
  head: {
    children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
  },
  header: Xe,
  hgroup: Xe,
  hr: Xe,
  html: {
    attrs: { manifest: null }
  },
  i: Xe,
  iframe: {
    attrs: {
      src: null,
      srcdoc: null,
      name: null,
      width: null,
      height: null,
      sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
      seamless: ["seamless"]
    }
  },
  img: {
    attrs: {
      alt: null,
      src: null,
      ismap: null,
      usemap: null,
      width: null,
      height: null,
      crossorigin: ["anonymous", "use-credentials"]
    }
  },
  input: {
    attrs: {
      alt: null,
      dirname: null,
      form: null,
      formaction: null,
      height: null,
      list: null,
      max: null,
      maxlength: null,
      min: null,
      name: null,
      pattern: null,
      placeholder: null,
      size: null,
      src: null,
      step: null,
      value: null,
      width: null,
      accept: ["audio/*", "video/*", "image/*"],
      autocomplete: ["on", "off"],
      autofocus: ["autofocus"],
      checked: ["checked"],
      disabled: ["disabled"],
      formenctype: $O,
      formmethod: TO,
      formnovalidate: ["novalidate"],
      formtarget: Im,
      multiple: ["multiple"],
      readonly: ["readonly"],
      required: ["required"],
      type: [
        "hidden",
        "text",
        "search",
        "tel",
        "url",
        "email",
        "password",
        "datetime",
        "date",
        "month",
        "week",
        "time",
        "datetime-local",
        "number",
        "range",
        "color",
        "checkbox",
        "radio",
        "file",
        "submit",
        "image",
        "reset",
        "button"
      ]
    }
  },
  ins: { attrs: { cite: null, datetime: null } },
  kbd: Xe,
  keygen: {
    attrs: {
      challenge: null,
      form: null,
      name: null,
      autofocus: ["autofocus"],
      disabled: ["disabled"],
      keytype: ["RSA"]
    }
  },
  label: { attrs: { for: null, form: null } },
  legend: Xe,
  li: { attrs: { value: null } },
  link: {
    attrs: {
      href: null,
      type: null,
      hreflang: null,
      media: null,
      sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
    }
  },
  map: { attrs: { name: null } },
  mark: Xe,
  menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
  meta: {
    attrs: {
      content: null,
      charset: EO,
      name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
      "http-equiv": ["content-language", "content-type", "default-style", "refresh"]
    }
  },
  meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
  nav: Xe,
  noscript: Xe,
  object: {
    attrs: {
      data: null,
      type: null,
      name: null,
      usemap: null,
      form: null,
      width: null,
      height: null,
      typemustmatch: ["typemustmatch"]
    }
  },
  ol: {
    attrs: { reversed: ["reversed"], start: null, type: ["1", "a", "A", "i", "I"] },
    children: ["li", "script", "template", "ul", "ol"]
  },
  optgroup: { attrs: { disabled: ["disabled"], label: null } },
  option: { attrs: { disabled: ["disabled"], label: null, selected: ["selected"], value: null } },
  output: { attrs: { for: null, form: null, name: null } },
  p: Xe,
  param: { attrs: { name: null, value: null } },
  pre: Xe,
  progress: { attrs: { value: null, max: null } },
  q: { attrs: { cite: null } },
  rp: Xe,
  rt: Xe,
  ruby: Xe,
  samp: Xe,
  script: {
    attrs: {
      type: ["text/javascript"],
      src: null,
      async: ["async"],
      defer: ["defer"],
      charset: EO
    }
  },
  section: Xe,
  select: {
    attrs: {
      form: null,
      name: null,
      size: null,
      autofocus: ["autofocus"],
      disabled: ["disabled"],
      multiple: ["multiple"]
    }
  },
  slot: { attrs: { name: null } },
  small: Xe,
  source: { attrs: { src: null, type: null, media: null } },
  span: Xe,
  strong: Xe,
  style: {
    attrs: {
      type: ["text/css"],
      media: null,
      scoped: null
    }
  },
  sub: Xe,
  summary: Xe,
  sup: Xe,
  table: Xe,
  tbody: Xe,
  td: { attrs: { colspan: null, rowspan: null, headers: null } },
  template: Xe,
  textarea: {
    attrs: {
      dirname: null,
      form: null,
      maxlength: null,
      name: null,
      placeholder: null,
      rows: null,
      cols: null,
      autofocus: ["autofocus"],
      disabled: ["disabled"],
      readonly: ["readonly"],
      required: ["required"],
      wrap: ["soft", "hard"]
    }
  },
  tfoot: Xe,
  th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
  thead: Xe,
  time: { attrs: { datetime: null } },
  title: Xe,
  tr: Xe,
  track: {
    attrs: {
      src: null,
      label: null,
      default: null,
      kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
      srclang: null
    }
  },
  ul: { children: ["li", "script", "template", "ul", "ol"] },
  var: Xe,
  video: {
    attrs: {
      src: null,
      poster: null,
      width: null,
      height: null,
      crossorigin: ["anonymous", "use-credentials"],
      preload: ["auto", "metadata", "none"],
      autoplay: ["autoplay"],
      mediagroup: ["movie"],
      muted: ["muted"],
      controls: ["controls"]
    }
  },
  wbr: Xe
}, iq = {
  accesskey: null,
  class: null,
  contenteditable: Ms,
  contextmenu: null,
  dir: ["ltr", "rtl", "auto"],
  draggable: ["true", "false", "auto"],
  dropzone: ["copy", "move", "link", "string:", "file:"],
  hidden: ["hidden"],
  id: null,
  inert: ["inert"],
  itemid: null,
  itemprop: null,
  itemref: null,
  itemscope: ["itemscope"],
  itemtype: null,
  lang: ["ar", "bn", "de", "en-GB", "en-US", "es", "fr", "hi", "id", "ja", "pa", "pt", "ru", "tr", "zh"],
  spellcheck: Ms,
  autocorrect: Ms,
  autocapitalize: Ms,
  style: null,
  tabindex: null,
  title: null,
  translate: ["yes", "no"],
  rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"],
  role: /* @__PURE__ */ "alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),
  "aria-activedescendant": null,
  "aria-atomic": Ms,
  "aria-autocomplete": ["inline", "list", "both", "none"],
  "aria-busy": Ms,
  "aria-checked": ["true", "false", "mixed", "undefined"],
  "aria-controls": null,
  "aria-describedby": null,
  "aria-disabled": Ms,
  "aria-dropeffect": null,
  "aria-expanded": ["true", "false", "undefined"],
  "aria-flowto": null,
  "aria-grabbed": ["true", "false", "undefined"],
  "aria-haspopup": Ms,
  "aria-hidden": Ms,
  "aria-invalid": ["true", "false", "grammar", "spelling"],
  "aria-label": null,
  "aria-labelledby": null,
  "aria-level": null,
  "aria-live": ["off", "polite", "assertive"],
  "aria-multiline": Ms,
  "aria-multiselectable": Ms,
  "aria-owns": null,
  "aria-posinset": null,
  "aria-pressed": ["true", "false", "mixed", "undefined"],
  "aria-readonly": Ms,
  "aria-relevant": null,
  "aria-required": Ms,
  "aria-selected": ["true", "false", "undefined"],
  "aria-setsize": null,
  "aria-sort": ["ascending", "descending", "none", "other"],
  "aria-valuemax": null,
  "aria-valuemin": null,
  "aria-valuenow": null,
  "aria-valuetext": null
}, rq = /* @__PURE__ */ "beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t) => "on" + t);
for (let t of rq)
  iq[t] = null;
class ek {
  constructor(e, n) {
    this.tags = { ...jEe, ...e }, this.globalAttrs = { ...iq, ...n }, this.allTags = Object.keys(this.tags), this.globalAttrNames = Object.keys(this.globalAttrs);
  }
}
ek.default = /* @__PURE__ */ new ek();
function jh(t, e, n = t.length) {
  if (!e)
    return "";
  let i = e.firstChild, r = i && i.getChild("TagName");
  return r ? t.sliceString(r.from, Math.min(r.to, n)) : "";
}
function Fh(t, e = !1) {
  for (; t; t = t.parent)
    if (t.name == "Element")
      if (e)
        e = !1;
      else
        return t;
  return null;
}
function sq(t, e, n) {
  let i = n.tags[jh(t, Fh(e))];
  return (i == null ? void 0 : i.children) || n.allTags;
}
function eT(t, e) {
  let n = [];
  for (let i = Fh(e); i && !i.type.isTop; i = Fh(i.parent)) {
    let r = jh(t, i);
    if (r && i.lastChild.name == "CloseTag")
      break;
    r && n.indexOf(r) < 0 && (e.name == "EndTag" || e.from >= i.firstChild.to) && n.push(r);
  }
  return n;
}
const oq = /^[:\-\.\w\u00b7-\uffff]*$/;
function RP(t, e, n, i, r) {
  let s = /\s*>/.test(t.sliceDoc(r, r + 5)) ? "" : ">", o = Fh(n, n.name == "StartTag" || n.name == "TagName");
  return {
    from: i,
    to: r,
    options: sq(t.doc, o, e).map((a) => ({ label: a, type: "type" })).concat(eT(t.doc, n).map((a, l) => ({
      label: "/" + a,
      apply: "/" + a + s,
      type: "type",
      boost: 99 - l
    }))),
    validFor: /^\/?[:\-\.\w\u00b7-\uffff]*$/
  };
}
function jP(t, e, n, i) {
  let r = /\s*>/.test(t.sliceDoc(i, i + 5)) ? "" : ">";
  return {
    from: n,
    to: i,
    options: eT(t.doc, e).map((s, o) => ({ label: s, apply: s + r, type: "type", boost: 99 - o })),
    validFor: oq
  };
}
function FEe(t, e, n, i) {
  let r = [], s = 0;
  for (let o of sq(t.doc, n, e))
    r.push({ label: "<" + o, type: "type" });
  for (let o of eT(t.doc, n))
    r.push({ label: "</" + o + ">", type: "type", boost: 99 - s++ });
  return { from: i, to: i, options: r, validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/ };
}
function BEe(t, e, n, i, r) {
  let s = Fh(n), o = s ? e.tags[jh(t.doc, s)] : null, a = o && o.attrs ? Object.keys(o.attrs) : [], l = o && o.globalAttrs === !1 ? a : a.length ? a.concat(e.globalAttrNames) : e.globalAttrNames;
  return {
    from: i,
    to: r,
    options: l.map((u) => ({ label: u, type: "property" })),
    validFor: oq
  };
}
function zEe(t, e, n, i, r) {
  var s;
  let o = (s = n.parent) === null || s === void 0 ? void 0 : s.getChild("AttributeName"), a = [], l;
  if (o) {
    let u = t.sliceDoc(o.from, o.to), f = e.globalAttrs[u];
    if (!f) {
      let d = Fh(n), h = d ? e.tags[jh(t.doc, d)] : null;
      f = (h == null ? void 0 : h.attrs) && h.attrs[u];
    }
    if (f) {
      let d = t.sliceDoc(i, r).toLowerCase(), h = '"', m = '"';
      /^['"]/.test(d) ? (l = d[0] == '"' ? /^[^"]*$/ : /^[^']*$/, h = "", m = t.sliceDoc(r, r + 1) == d[0] ? "" : d[0], d = d.slice(1), i++) : l = /^[^\s<>='"]*$/;
      for (let g of f)
        a.push({ label: g, apply: h + g + m, type: "constant" });
    }
  }
  return { from: i, to: r, options: a, validFor: l };
}
function WEe(t, e) {
  let { state: n, pos: i } = e, r = ri(n).resolveInner(i, -1), s = r.resolve(i);
  for (let o = i, a; s == r && (a = r.childBefore(o)); ) {
    let l = a.lastChild;
    if (!l || !l.type.isError || l.from < l.to)
      break;
    s = r = a, o = l.from;
  }
  return r.name == "TagName" ? r.parent && /CloseTag$/.test(r.parent.name) ? jP(n, r, r.from, i) : RP(n, t, r, r.from, i) : r.name == "StartTag" || r.name == "IncompleteTag" ? RP(n, t, r, i, i) : r.name == "StartCloseTag" || r.name == "IncompleteCloseTag" ? jP(n, r, i, i) : r.name == "OpenTag" || r.name == "SelfClosingTag" || r.name == "AttributeName" ? BEe(n, t, r, r.name == "AttributeName" ? r.from : i, i) : r.name == "Is" || r.name == "AttributeValue" || r.name == "UnquotedAttributeValue" ? zEe(n, t, r, r.name == "Is" ? i : r.from, i) : e.explicit && (s.name == "Element" || s.name == "Text" || s.name == "Document") ? FEe(n, t, r, i) : null;
}
function HEe(t) {
  let { extraTags: e, extraGlobalAttributes: n } = t, i = n || e ? new ek(e, n) : ek.default;
  return (r) => WEe(i, r);
}
const QEe = /* @__PURE__ */ Ea.parser.configure({ top: "SingleExpression" }), aq = [
  {
    tag: "script",
    attrs: (t) => t.type == "text/typescript" || t.lang == "ts",
    parser: KZ.parser
  },
  {
    tag: "script",
    attrs: (t) => t.type == "text/babel" || t.type == "text/jsx",
    parser: JZ.parser
  },
  {
    tag: "script",
    attrs: (t) => t.type == "text/typescript-jsx",
    parser: eq.parser
  },
  {
    tag: "script",
    attrs(t) {
      return /^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type);
    },
    parser: QEe
  },
  {
    tag: "script",
    attrs(t) {
      return !t.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type);
    },
    parser: Ea.parser
  },
  {
    tag: "style",
    attrs(t) {
      return (!t.lang || t.lang == "css") && (!t.type || /^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type));
    },
    parser: Kw.parser
  }
], lq = /* @__PURE__ */ [
  {
    name: "style",
    parser: /* @__PURE__ */ Kw.parser.configure({ top: "Styles" })
  }
].concat(/* @__PURE__ */ rq.map((t) => ({ name: t, parser: Ea.parser }))), uq = /* @__PURE__ */ Nh.define({
  name: "html",
  parser: /* @__PURE__ */ rEe.configure({
    props: [
      /* @__PURE__ */ y2.add({
        Element(t) {
          let e = /^(\s*)(<\/)?/.exec(t.textAfter);
          return t.node.to <= t.pos + e[0].length ? t.continue() : t.lineIndent(t.node.from) + (e[2] ? 0 : t.unit);
        },
        "OpenTag CloseTag SelfClosingTag"(t) {
          return t.column(t.node.from) + t.unit;
        },
        Document(t) {
          if (t.pos + /\s*/.exec(t.textAfter)[0].length < t.node.to)
            return t.continue();
          let e = null, n;
          for (let i = t.node; ; ) {
            let r = i.lastChild;
            if (!r || r.name != "Element" || r.to != i.to)
              break;
            e = i = r;
          }
          return e && !((n = e.lastChild) && (n.name == "CloseTag" || n.name == "SelfClosingTag")) ? t.lineIndent(e.from) + t.unit : null;
        }
      }),
      /* @__PURE__ */ w2.add({
        Element(t) {
          let e = t.firstChild, n = t.lastChild;
          return !e || e.name != "OpenTag" ? null : { from: e.to, to: n.name == "CloseTag" ? n.from : t.to };
        }
      }),
      /* @__PURE__ */ FQ.add({
        "OpenTag CloseTag": (t) => t.getChild("TagName")
      })
    ]
  }),
  languageData: {
    commentTokens: { block: { open: "<!--", close: "-->" } },
    indentOnInput: /^\s*<\/\w+\W$/,
    wordChars: "-_"
  }
}), ky = /* @__PURE__ */ uq.configure({
  wrap: /* @__PURE__ */ UZ(aq, lq)
});
function cq(t = {}) {
  let e = "", n;
  t.matchClosingTags === !1 && (e = "noMatch"), t.selfClosingTags === !0 && (e = (e ? e + " " : "") + "selfClosing"), (t.nestedLanguages && t.nestedLanguages.length || t.nestedAttributes && t.nestedAttributes.length) && (n = UZ((t.nestedLanguages || []).concat(aq), (t.nestedAttributes || []).concat(lq)));
  let i = n ? uq.configure({ wrap: n, dialect: e }) : e ? ky.configure({ dialect: e }) : ky;
  return new $E(i, [
    ky.data.of({ autocomplete: HEe(t) }),
    t.autoCloseTags !== !1 ? UEe : [],
    FC().support,
    IZ().support
  ]);
}
const FP = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")), UEe = /* @__PURE__ */ Te.inputHandler.of((t, e, n, i, r) => {
  if (t.composing || t.state.readOnly || e != n || i != ">" && i != "/" || !ky.isActiveAt(t.state, e, -1))
    return !1;
  let s = r(), { state: o } = s, a = o.changeByRange((l) => {
    var u, f, d;
    let h = o.doc.sliceString(l.from - 1, l.to) == i, { head: m } = l, g = ri(o).resolveInner(m, -1), w;
    if (h && i == ">" && g.name == "EndTag") {
      let x = g.parent;
      if (((f = (u = x.parent) === null || u === void 0 ? void 0 : u.lastChild) === null || f === void 0 ? void 0 : f.name) != "CloseTag" && (w = jh(o.doc, x.parent, m)) && !FP.has(w)) {
        let _ = m + (o.doc.sliceString(m, m + 1) === ">" ? 1 : 0), S = `</${w}>`;
        return { range: l, changes: { from: m, to: _, insert: S } };
      }
    } else if (h && i == "/" && g.name == "IncompleteCloseTag") {
      let x = g.parent;
      if (g.from == m - 2 && ((d = x.lastChild) === null || d === void 0 ? void 0 : d.name) != "CloseTag" && (w = jh(o.doc, x, m)) && !FP.has(w)) {
        let _ = m + (o.doc.sliceString(m, m + 1) === ">" ? 1 : 0), S = `${w}>`;
        return {
          range: he.cursor(m + S.length, -1),
          changes: { from: m, to: _, insert: S }
        };
      }
    }
    return { range: l };
  });
  return a.changes.empty ? !1 : (t.dispatch([
    s,
    o.update(a, {
      userEvent: "input.complete",
      scrollIntoView: !0
    })
  ]), !0);
});
function fq({ code: t, language: e, updateCode: n, updateLanguage: i }) {
  const [r, s] = j.useState(!0), { darkMode: o } = j.useContext(dt);
  j.useEffect(() => {
    const S = () => {
      s(!0);
    };
    return window.addEventListener("mousemove", S), () => {
      window.removeEventListener("mousemove", S);
    };
  }, []);
  const a = j.useCallback((S) => {
    s(!1), n(S);
  }, [n]), l = j.useCallback((S) => {
    i(S.target.value);
  }, [i]), u = Te.theme({
    "&.cm-editor": {
      background: "transparent"
    },
    "&.cm-focused": {
      outline: "0"
    },
    "&.cm-editor .cm-content": {
      padding: "7px 0"
    },
    "&.cm-editor .cm-scroller": {
      overflow: "auto"
    },
    "&.cm-editor .cm-gutters": {
      background: "none",
      border: "none",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      color: "#CED4D9",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-gutter": {
      minHeight: "170px"
    },
    "&.cm-editor .cm-lineNumbers": {
      padding: "0"
    },
    "&.cm-editor .cm-foldGutter": {
      width: "0"
    },
    "&.cm-editor .cm-line": {
      padding: "0 .8rem",
      color: "#394047",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      fontSize: "1.6rem",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter": {
      background: "none"
    },
    "&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor": {
      borderLeft: "1.2px solid black"
    }
  }), f = Te.theme({
    "&.cm-editor": {
      background: "transparent"
    },
    "&.cm-focused": {
      outline: "0"
    },
    "&.cm-editor .cm-content": {
      padding: "7px 0"
    },
    "&.cm-editor .cm-scroller": {
      overflow: "auto"
    },
    "&.cm-editor .cm-gutters": {
      background: "none",
      border: "none",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      color: "rgb(108, 118, 127);",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-gutter": {
      minHeight: "170px"
    },
    "&.cm-editor .cm-lineNumbers": {
      padding: "0"
    },
    "&.cm-editor .cm-foldGutter": {
      width: "0"
    },
    "&.cm-editor .cm-line": {
      padding: "0 .8rem",
      color: "rgb(210, 215, 218)",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      fontSize: "1.6rem",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter": {
      background: "none"
    },
    "&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor": {
      borderLeft: "1.2px solid white"
    }
  }), d = Tl.define([
    { tag: X.keyword, color: "#5A5CAD" },
    { tag: X.atom, color: "#6C8CD5" },
    { tag: X.number, color: "#116644" },
    { tag: X.definition(X.variableName), textDecoration: "underline" },
    { tag: X.variableName, color: "black" },
    { tag: X.comment, color: "#0080FF", fontStyle: "italic", background: "rgba(0,0,0,.05)" },
    { tag: [X.string, X.special(X.brace)], color: "#183691" },
    { tag: X.meta, color: "yellow" },
    { tag: X.bracket, color: "#63a35c" },
    { tag: X.tagName, color: "#63a35c" },
    { tag: X.attributeName, color: "#795da3" }
  ]), h = Tl.define([
    { tag: X.keyword, color: "#795da3" },
    { tag: X.atom, color: "#6C8CD5" },
    { tag: X.number, color: "#63a35c" },
    { tag: X.definition(X.variableName), textDecoration: "underline" },
    { tag: X.variableName, color: "white" },
    { tag: X.comment, color: "#0080FF", fontStyle: "italic", background: "rgba(0,0,0,.05)" },
    { tag: [X.string, X.special(X.brace)], color: "rgb(72, 110, 225)" },
    { tag: X.meta, color: "yellow" },
    { tag: X.bracket, color: "#63a35c" },
    { tag: X.tagName, color: "#63a35c" },
    { tag: X.attributeName, color: "#795da3" },
    { tag: [X.className, X.propertyName], color: "rgb(72, 110, 225)" }
  ]), m = o ? f : u, g = o ? h : d, w = [
    Te.lineWrapping,
    // wraps lines that exceed the viewport width
    z1(g),
    // customizes syntax highlighting rules
    m,
    // customizes general editor appearance (does not include syntax highlighting)
    _E(),
    // adds line numbers to the gutter
    GU({ defaultKeymap: !1, history: !1 }),
    // disable defaultKeymap to prevent Mod+Enter from inserting new line
    Cl.of(IE),
    // add back in standardKeymap, which doesn't include Mod+Enter
    // adds undo/redo functionality with custom behaviour to make tests faster
    x2({
      joinToEvent: void 0
    })
  ], _ = {
    javascript: FC,
    js: FC,
    html: cq,
    css: IZ
  }[e == null ? void 0 : e.toLowerCase().trim()] || null;
  return _ && w.push(_()), /* @__PURE__ */ y.jsxs("div", { className: "not-kg-prose min-h-[170px]", children: [
    /* @__PURE__ */ y.jsx(
      UE,
      {
        autoFocus: !0,
        basicSetup: !1,
        extensions: w,
        value: t,
        onChange: a
      }
    ),
    /* @__PURE__ */ y.jsx(
      "input",
      {
        "aria-label": "Code card language",
        className: `z-999 absolute right-1.5 top-1.5 w-1/5 rounded-md border border-grey-300 px-2 py-1 font-sans text-[1.3rem] leading-4 text-grey-900 transition-opacity focus-visible:outline-none dark:border-grey-900 dark:text-grey-400 ${r ? "opacity-100" : "opacity-0"}`,
        "data-testid": "code-card-language",
        placeholder: "Language...",
        type: "text",
        value: e,
        onChange: l
      }
    )
  ] });
}
function dq({ code: t, darkMode: e, language: n }) {
  const i = e ? "rounded-md border border-grey-950 bg-grey-950 px-2 py-[6px] font-mono text-[1.6rem] leading-9 text-grey-400 whitespace-pre-wrap" : "rounded-md border border-grey-200 bg-grey-100 px-2 py-[6px] font-mono text-[1.6rem] leading-9 text-grey-900 whitespace-pre-wrap";
  return /* @__PURE__ */ y.jsxs("div", { className: "not-kg-prose", children: [
    /* @__PURE__ */ y.jsx("pre", { className: i, children: /* @__PURE__ */ y.jsx("code", { className: n && `language-${n}`, children: t }) }),
    /* @__PURE__ */ y.jsx("div", { className: "absolute right-2 top-2 flex items-center justify-center px-1", children: /* @__PURE__ */ y.jsx("span", { className: "block font-sans text-sm font-medium leading-normal text-grey", children: n }) })
  ] });
}
function hq({ captionEditor: t, captionEditorInitialState: e, code: n, darkMode: i, isEditing: r, isSelected: s, language: o, updateCode: a, updateLanguage: l }) {
  return r ? /* @__PURE__ */ y.jsx(
    fq,
    {
      code: n,
      darkMode: i,
      language: o,
      updateCode: a,
      updateLanguage: l
    }
  ) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(dq, { code: n, darkMode: i, language: o }),
    /* @__PURE__ */ y.jsx(
      gp,
      {
        captionEditor: t,
        captionEditorInitialState: e,
        captionPlaceholder: "Type caption for code block (optional)",
        dataTestId: "codeblock-caption",
        isSelected: s
      }
    )
  ] });
}
fq.propTypes = {
  code: A.string,
  language: A.string,
  updateCode: A.func,
  updateLanguage: A.func
};
dq.propTypes = {
  code: A.string,
  darkMode: A.bool,
  language: A.string
};
hq.propTypes = {
  code: A.string,
  darkMode: A.bool,
  language: A.string,
  captionEditor: A.object,
  captionEditorInitialState: A.object,
  isEditing: A.bool,
  isSelected: A.bool,
  updateCode: A.func,
  updateLanguage: A.func
};
const ZEe = (t) => /* @__PURE__ */ J.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M4.47 1.867a4.525 4.525 0 015.02 1.378.4.4 0 01-.618.51 3.725 3.725 0 00-6.597 2.369v.159l.817-.817a.4.4 0 11.565.565l-1.48 1.48a.4.4 0 01-.605 0l-1.48-1.48a.4.4 0 11.565-.565l.818.817v-.16A4.526 4.526 0 014.47 1.868zm5.655 3.107a.4.4 0 01.283.117l1.5 1.5a.4.4 0 01-.566.565l-.822-.822A4.525 4.525 0 012.709 9.23a.4.4 0 01.582-.55 3.725 3.725 0 006.427-2.333l-.81.81a.4.4 0 11-.566-.565l1.5-1.5a.4.4 0 01.283-.117z" })), qEe = ({
  snippets: t,
  onCreateSnippet: e,
  onUpdateSnippet: n,
  value: i,
  isCreateButtonActive: r,
  onKeyDown: s,
  activeMenuItem: o
}) => /* @__PURE__ */ y.jsxs(
  "ul",
  {
    className: "absolute mt-[-1px] w-full max-w-[240px] rounded-b border border-grey-200 bg-white shadow-md dark:border-grey-900 dark:bg-grey-950",
    tabIndex: 0,
    onKeyDown: s,
    children: [
      /* @__PURE__ */ y.jsx("li", { className: "mb-0 block", children: /* @__PURE__ */ y.jsxs(
        "button",
        {
          className: `flex w-full cursor-pointer items-center justify-between px-3 py-2 text-left text-sm font-medium text-green-600 hover:bg-grey-100 dark:hover:bg-black ${r ? "bg-grey-100 dark:bg-black" : ""}`,
          type: "button",
          onClick: e,
          children: [
            /* @__PURE__ */ y.jsxs("span", { children: [
              'Create "',
              i,
              "“"
            ] }),
            /* @__PURE__ */ y.jsx(Ek, { className: "size-3 stroke-green-600 stroke-[3px]" })
          ]
        }
      ) }),
      !!t.length && /* @__PURE__ */ y.jsx(
        YEe,
        {
          activeMenuItem: o,
          list: t,
          onClick: n
        }
      )
    ]
  }
), YEe = ({ list: t = [], onClick: e, activeMenuItem: n }) => /* @__PURE__ */ y.jsxs("li", { role: "separator", children: [
  /* @__PURE__ */ y.jsx("span", { className: "block border-t border-grey-200 px-3 pb-2 pt-3 text-[1.1rem] font-semibold uppercase tracking-wide text-grey-600 dark:border-grey-900 dark:text-grey-800", children: "Replace existing" }),
  /* @__PURE__ */ y.jsx("ul", { role: "menu", children: t.map((i, r) => /* @__PURE__ */ y.jsx(
    VEe,
    {
      active: n,
      index: r,
      name: i.name,
      onClick: e
    },
    i.name
  )) })
] }), VEe = ({ onClick: t, name: e, active: n, index: i }) => /* @__PURE__ */ y.jsx("li", { className: "mb-1", children: /* @__PURE__ */ y.jsxs(
  "button",
  {
    className: `flex w-full cursor-pointer items-center justify-between px-3 py-2 text-left text-sm hover:bg-grey-100 ${i === n ? "bg-grey-100 dark:bg-black" : ""} dark:hover:bg-black`,
    type: "button",
    onClick: () => t(e),
    children: [
      /* @__PURE__ */ y.jsx("span", { children: e }),
      /* @__PURE__ */ y.jsx("div", { className: "size-5 fill-grey-900", children: /* @__PURE__ */ y.jsx(ZEe, { className: "size-4 fill-grey-900 dark:fill-grey-600" }) })
    ]
  }
) }), vp = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M19 5 5 19m14 0L5 5" })), XEe = ({ value: t, onChange: e, onClear: n, onKeyDown: i }) => /* @__PURE__ */ y.jsxs("div", { className: "relative m-0 flex items-center justify-evenly gap-1 rounded-lg bg-white font-sans text-md font-normal text-black shadow-md dark:bg-grey-950", children: [
  /* @__PURE__ */ y.jsx(
    "input",
    {
      autoComplete: "off",
      autoFocus: !0,
      className: `mb-[1px] h-auto w-full bg-white py-1 pl-3 pr-9 font-normal leading-loose text-grey-900 selection:bg-grey/40 dark:bg-grey-950 dark:text-grey-100 dark:placeholder:text-grey-800 ${t ? "rounded-b-none rounded-t" : "rounded"}`,
      "data-testid": "snippet-name",
      placeholder: "Snippet name",
      value: t,
      "data-1p-ignore": !0,
      onChange: e,
      onKeyDown: i
    }
  ),
  /* @__PURE__ */ y.jsx("button", { "aria-label": "Close", className: "absolute right-3 cursor-pointer", type: "button", onClick: n, children: /* @__PURE__ */ y.jsx(vp, { className: "size-3 stroke-2 text-grey" }) })
] });
function pq({
  value: t,
  onChange: e,
  onCreateSnippet: n,
  onUpdateSnippet: i,
  onClose: r,
  snippets: s = []
}) {
  const o = ct(null), [a, l] = ft(!0), [u, f] = ft(-1), [d, h] = ft([]);
  j.useEffect(() => {
    const g = s.filter((w) => w.name.toLowerCase().includes(t.toLowerCase()));
    g.length === 0 ? (l(!0), f(-1)) : (l(!1), f(0)), h(g);
  }, [t, s]), j.useEffect(() => {
    const g = (w) => {
      o.current && !o.current.contains(w.target) && r();
    };
    return window.addEventListener("mousedown", g), () => {
      window.removeEventListener("mousedown", g);
    };
  }, [r]);
  const m = (g) => {
    if ((g.key === "Escape" || g.key === "Esc") && (g.stopPropagation(), r()), g.key === "ArrowDown" || g.key === "Down") {
      if (g.stopPropagation(), g.preventDefault(), d.length === 0)
        return;
      if (u === -1 && !a) {
        l(!0);
        return;
      }
      const w = u + 1;
      w > d.length - 1 ? (f(-1), l(!0)) : (f(w), l(!1));
    }
    if (g.key === "ArrowUp" || g.key === "Up") {
      if (g.stopPropagation(), g.preventDefault(), d.length === 0)
        return;
      if (a) {
        f(d.length - 1), l(!1);
        return;
      }
      const w = u - 1;
      w < 0 ? (f(-1), l(!0)) : (f(w), l(!1));
    }
    g.key === "Enter" && (a ? (g.stopPropagation(), g.preventDefault(), n()) : u > -1 && (g.stopPropagation(), g.preventDefault(), i(d[u].name)));
  };
  return /* @__PURE__ */ y.jsxs(
    "div",
    {
      ref: o,
      onClick: (g) => g.stopPropagation(),
      children: [
        /* @__PURE__ */ y.jsx(
          XEe,
          {
            value: t,
            onChange: e,
            onClear: r,
            onKeyDown: m
          }
        ),
        !!t && /* @__PURE__ */ y.jsx(
          qEe,
          {
            activeMenuItem: u,
            isCreateButtonActive: a,
            snippets: d,
            value: t,
            onCreateSnippet: n,
            onUpdateSnippet: i
          }
        )
      ]
    }
  );
}
pq.propTypes = {
  value: A.string,
  onChange: A.func,
  onCreateSnippet: A.func,
  onReplaceSnippet: A.func,
  onClose: A.func,
  suggestedList: A.arrayOf(A.shape({
    name: A.string.isRequired,
    value: A.string.isRequired
  }))
};
function ai({ onClose: t, ...e }) {
  const { cardConfig: { snippets: n, createSnippet: i }, darkMode: r } = j.useContext(dt), [s] = Oe.useLexicalComposerContext(), { selectedCardKey: o } = Rf(), [a, l] = j.useState(""), u = (d) => {
    l(d.target.value);
  }, f = (d) => {
    s.update(() => {
      if (o) {
        const h = N.$createNodeSelection();
        h.add(o);
        const m = mf.$generateJSONFromSelectedNodes(s, h);
        i({ name: d, value: JSON.stringify(m) }), s.dispatchCommand(ju, { cardKey: o });
      } else {
        const h = N.$getSelection(), m = mf.$generateJSONFromSelectedNodes(s, h);
        i({ name: d, value: JSON.stringify(m) });
      }
      t == null || t(), s.getRootElement().focus();
    });
  };
  return /* @__PURE__ */ y.jsx(
    pq,
    {
      darkMode: r,
      snippets: n,
      value: a,
      onChange: u,
      onClose: t,
      onCreateSnippet: () => f(a),
      onUpdateSnippet: (d) => f(d),
      ...e
    }
  );
}
const GEe = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "m14.2 4.3 5.5 5.5m-11 11L1 23l2.2-7.7L16.856 1.644a2.2 2.2 0 0 1 3.11 0l2.39 2.39a2.2 2.2 0 0 1 0 3.11L8.7 20.8Z" })), KEe = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1.373 13.33A2.528 2.528 0 0 1 1 12c0-.476.13-.94.373-1.33C2.946 8.163 6.819 3 12 3c5.181 0 9.054 5.164 10.627 7.67.243.39.373.854.373 1.33 0 .476-.13.94-.373 1.33C21.054 15.837 17.181 21 12 21c-5.181 0-9.054-5.164-10.627-7.67Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z" })), JEe = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1 12h8v10H1V12Zm0 0C1 5 2.75 3.344 6 2m8 10h8m-8 0v10h4m-4-10c0-7 1.75-8.656 5-10m1.7 14.4 1.75-1.4h.35v7" })), eTe = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 25 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1 12h8v10H1V12Zm0 0C1 5 2.75 3.344 6 2m8 10h8m-8 0v10h2m-2-10c0-7 1.75-8.656 5-10m.5 13.583c.517-.311 1.275-.559 1.878-.583 1.195 0 2.22.512 2.22 1.878-.015 2.205-4.098 4.78-4.098 4.78V22h4.098" })), Bf = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1.917 5.583h20.166m-8.02-3.666H9.936a1.375 1.375 0 0 0-1.374 1.375v2.291h6.874V3.292a1.375 1.375 0 0 0-1.374-1.375ZM9.938 17.27v-6.874m4.125 6.874v-6.874" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M18.288 20.818a1.366 1.366 0 0 1-1.366 1.265H7.077a1.366 1.366 0 0 1-1.365-1.265L4.438 5.583h15.125l-1.275 15.235Z" })), N2 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1 21.094 3.913 24 17 10.906 14.125 8 1 21.094ZM11 11l3 3M5.25 4.25a2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0-2.5-2.5Zm12 0a2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0-2.5-2.5Zm0 11.99a2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0-2.5-2.5Z" }));
function pc({ label: t, shortcutKeys: e }) {
  return /* @__PURE__ */ y.jsxs("div", { className: `invisible absolute -top-8 left-1/2 z-[1000] flex -translate-x-1/2 items-center gap-1 whitespace-nowrap rounded-md bg-black py-1 font-sans text-2xs font-medium text-white group-hover:visible dark:bg-grey-900 ${e ? "pl-[1rem] pr-1" : "px-[1rem]"}`, children: [
    /* @__PURE__ */ y.jsx("span", { children: t }),
    e && e.map((n) => /* @__PURE__ */ y.jsx("div", { className: "rounded bg-grey-900 px-2 text-2xs text-white dark:bg-grey-950", children: n }, n))
  ] });
}
const tTe = {
  bold: Ej,
  italic: Dj,
  headingTwo: Aj,
  headingThree: Nj,
  quote: Pj,
  quoteOne: JEe,
  quoteTwo: eTe,
  link: DS,
  imgRegular: J0,
  imgWide: e1,
  imgFull: K0,
  imgReplace: Ij,
  add: Cj,
  edit: GEe,
  wand: N2,
  visibility: KEe,
  snippet: Gb,
  remove: Bf
};
function li({ children: t, hide: e, ...n }) {
  return e ? null : /* @__PURE__ */ y.jsx("ul", { className: "relative m-0 flex items-center justify-evenly gap-1 rounded-lg bg-white px-1 font-sans text-md font-normal text-black shadow-md dark:bg-grey-950", ...n, children: t });
}
function at({ label: t, isActive: e, onClick: n, icon: i, shortcutKeys: r, secondary: s, dataTestId: o, hide: a, ...l }) {
  if (a)
    return null;
  const u = tTe[i];
  return /* @__PURE__ */ y.jsxs("li", { className: "group relative m-0 flex p-0 first:m-0", ...l, children: [
    /* @__PURE__ */ y.jsx(
      "button",
      {
        "aria-label": t,
        className: `my-1 flex h-8 w-9 cursor-pointer items-center justify-center rounded-md transition hover:bg-grey-200/80 dark:bg-grey-950 dark:hover:bg-grey-900 ${e ? "bg-grey-200/80" : "bg-white"}`,
        "data-kg-active": e,
        "data-testid": o,
        type: "button",
        onClick: n,
        children: /* @__PURE__ */ y.jsx(u, { className: `size-4 overflow-visible transition ${s ? "stroke-2" : "stroke-[2.5]"} ${e ? "text-green-600 dark:text-green-600" : "text-black dark:text-white"}` })
      }
    ),
    /* @__PURE__ */ y.jsx(pc, { label: t, shortcutKeys: r })
  ] });
}
function Zn({ hide: t }) {
  return t ? null : /* @__PURE__ */ y.jsx("li", { className: "m-0 w-px self-stretch bg-grey-300/80 dark:bg-grey-900" });
}
function nTe({ nodeKey: t, captionEditor: e, captionEditorInitialState: n, code: i, language: r }) {
  const [s] = Oe.useLexicalComposerContext(), { isEditing: o, setEditing: a, isSelected: l } = j.useContext(gn), { cardConfig: u, darkMode: f } = j.useContext(dt), [d, h] = j.useState(!1), m = (x) => {
    s.update(() => {
      const _ = N.$getNodeByKey(t);
      _.code = x;
    });
  }, g = (x) => {
    s.update(() => {
      const _ = N.$getNodeByKey(t);
      _.language = x;
    });
  }, w = (x) => {
    x.preventDefault(), x.stopPropagation(), a(!0);
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      hq,
      {
        captionEditor: e,
        captionEditorInitialState: n,
        code: i,
        darkMode: f,
        handleToolbarEdit: w,
        isEditing: o,
        isSelected: l,
        language: r,
        nodeKey: t,
        updateCode: m,
        updateLanguage: g
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "button",
        isVisible: d,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => h(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "button",
        isVisible: l && !o,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "edit-code-card", icon: "edit", isActive: !1, label: "Edit", onClick: w }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !u.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !u.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => h(!0)
            }
          )
        ] })
      }
    )
  ] });
}
function iTe(t, e) {
  const i = new DOMParser().parseFromString(e, "text/html");
  return Rn.$generateNodesFromDOM(t, i);
}
function mq({ editor: t, initialHtml: e }) {
  return e ? t.update(() => {
    const n = iTe(t, e);
    N.$getRoot().select(), N.$getRoot().clear(), N.$insertNodes(n), n.length && N.$setSelection(null);
  }, { discrete: !0, tag: "history-merge" }) : t.update(() => {
    N.$getRoot().append(N.$createParagraphNode());
  }, { discrete: !0, tag: "history-merge" }), t.getEditorState();
}
const rTe = JSON.stringify({
  root: {
    children: [
      {
        children: [],
        direction: null,
        format: "",
        indent: 0,
        type: "paragraph",
        version: 1
      }
    ],
    direction: null,
    format: "",
    indent: 0,
    type: "root",
    version: 1
  }
});
function xi(t, e, { editor: n, initialEditorState: i = rTe, nodes: r = pr } = {}) {
  if (n)
    t[e] = n;
  else {
    t[e] = N.createEditor({ nodes: r });
    const s = t[e].parseEditorState(i);
    t[e].setEditorState(s, { tag: "history-merge" });
  }
}
function _i(t, e, n) {
  if (!n)
    return;
  const i = t[e], r = mq({
    editor: i,
    initialHtml: n
  });
  i.setEditorState(r, { tag: "history-merge" }), t[`${e}InitialState`] = r;
}
N.createCommand();
class A2 extends p1 {
  constructor(n = {}, i) {
    super(n, i);
    // transient properties used to control node behaviour
    we(this, "__openInEditMode", !1);
    we(this, "__captionEditor");
    we(this, "__captionEditorInitialState");
    const { _openInEditMode: r } = n;
    this.__openInEditMode = r || !1, xi(this, "__captionEditor", { editor: n.captionEditor, nodes: pr }), !n.captionEditor && n.caption && _i(this, "__captionEditor", `${n.caption}`);
  }
  getIcon() {
    return y2e;
  }
  clearOpenInEditMode() {
    const n = this.getWritable();
    n.__openInEditMode = !1;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.captionEditor = i.__captionEditor, n.captionEditorInitialState = i.__captionEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__captionEditor && this.__captionEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__captionEditor, null), r = mi(i);
      n.caption = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), wrapperStyle: "code-card", children: /* @__PURE__ */ y.jsx(
      nTe,
      {
        captionEditor: this.__captionEditor,
        captionEditorInitialState: this.__captionEditorInitialState,
        code: this.code,
        language: this.language,
        nodeKey: this.getKey()
      }
    ) });
  }
}
function BC(t) {
  return new A2(t);
}
function sTe(t) {
  return t instanceof A2;
}
const oTe = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M22.525 29 3 3h6.475L29 29h-6.475Zm5.557-26L17.789 14.075M3.918 29l10.285-11.067" }));
var Fl = {}, gq = lt, vl = N;
let aTe = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]), D2 = class vq extends vl.ElementNode {
  static getType() {
    return "link";
  }
  static clone(e) {
    return new vq(e.__url, { rel: e.__rel, target: e.__target, title: e.__title }, e.__key);
  }
  constructor(e, n = {}, i) {
    super(i);
    let { target: r = null, rel: s = null, title: o = null } = n;
    this.__url = e, this.__target = r, this.__rel = s, this.__title = o;
  }
  createDOM(e) {
    let n = document.createElement("a");
    return n.href = this.sanitizeUrl(this.__url), this.__target !== null && (n.target = this.__target), this.__rel !== null && (n.rel = this.__rel), this.__title !== null && (n.title = this.__title), gq.addClassNamesToElement(
      n,
      e.theme.link
    ), n;
  }
  updateDOM(e, n) {
    let i = this.__url, r = this.__target, s = this.__rel, o = this.__title;
    return i !== e.__url && (n.href = i), r !== e.__target && (r ? n.target = r : n.removeAttribute("target")), s !== e.__rel && (s ? n.rel = s : n.removeAttribute("rel")), o !== e.__title && (o ? n.title = o : n.removeAttribute("title")), !1;
  }
  static importDOM() {
    return { a: () => ({ conversion: lTe, priority: 1 }) };
  }
  static importJSON(e) {
    let n = _0(e.url, { rel: e.rel, target: e.target, title: e.title });
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  sanitizeUrl(e) {
    try {
      let n = new URL(e);
      if (!aTe.has(n.protocol)) return "about:blank";
    } catch {
    }
    return e;
  }
  exportJSON() {
    return { ...super.exportJSON(), rel: this.getRel(), target: this.getTarget(), title: this.getTitle(), type: "link", url: this.getURL(), version: 1 };
  }
  getURL() {
    return this.getLatest().__url;
  }
  setURL(e) {
    this.getWritable().__url = e;
  }
  getTarget() {
    return this.getLatest().__target;
  }
  setTarget(e) {
    this.getWritable().__target = e;
  }
  getRel() {
    return this.getLatest().__rel;
  }
  setRel(e) {
    this.getWritable().__rel = e;
  }
  getTitle() {
    return this.getLatest().__title;
  }
  setTitle(e) {
    this.getWritable().__title = e;
  }
  insertNewAfter(e, n = !0) {
    return e = _0(this.__url, { rel: this.__rel, target: this.__target, title: this.__title }), this.insertAfter(e, n), e;
  }
  canInsertTextBefore() {
    return !1;
  }
  canInsertTextAfter() {
    return !1;
  }
  canBeEmpty() {
    return !1;
  }
  isInline() {
    return !0;
  }
  extractWithChild(e, n) {
    if (!vl.$isRangeSelection(n)) return !1;
    e = n.anchor.getNode();
    let i = n.focus.getNode();
    return this.isParentOf(e) && this.isParentOf(i) && 0 < n.getTextContent().length;
  }
};
function lTe(t) {
  let e = null;
  if (gq.isHTMLAnchorElement(t)) {
    let n = t.textContent;
    (n !== null && n !== "" || 0 < t.children.length) && (e = _0(t.getAttribute("href") || "", { rel: t.getAttribute("rel"), target: t.getAttribute("target"), title: t.getAttribute("title") }));
  }
  return { node: e };
}
function _0(t, e) {
  return vl.$applyNodeReplacement(new D2(t, e));
}
function Qd(t) {
  return t instanceof D2;
}
let tT = class bq extends D2 {
  static getType() {
    return "autolink";
  }
  static clone(e) {
    return new bq(e.__url, { rel: e.__rel, target: e.__target, title: e.__title }, e.__key);
  }
  static importJSON(e) {
    let n = zC(e.url, { rel: e.rel, target: e.target, title: e.title });
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  static importDOM() {
    return null;
  }
  exportJSON() {
    return { ...super.exportJSON(), type: "autolink", version: 1 };
  }
  insertNewAfter(e, n = !0) {
    return e = this.getParentOrThrow().insertNewAfter(e, n), vl.$isElementNode(e) ? (n = zC(this.__url, { rel: this.__rel, target: this.__target, title: this.__title }), e.append(n), n) : null;
  }
};
function zC(t, e) {
  return vl.$applyNodeReplacement(new tT(t, e));
}
let uTe = vl.createCommand("TOGGLE_LINK_COMMAND");
function cTe(t, e) {
  for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
  return e(t) ? t : null;
}
Fl.$createAutoLinkNode = zC;
Fl.$createLinkNode = _0;
Fl.$isAutoLinkNode = function(t) {
  return t instanceof tT;
};
Fl.$isLinkNode = Qd;
Fl.AutoLinkNode = tT;
Fl.LinkNode = D2;
Fl.TOGGLE_LINK_COMMAND = uTe;
Fl.toggleLink = function(t, e = {}) {
  let { target: n, title: i } = e, r = e.rel === void 0 ? "noreferrer" : e.rel;
  if (e = vl.$getSelection(), vl.$isRangeSelection(e)) if (e = e.extract(), t === null) e.forEach((s) => {
    if (s = s.getParent(), Qd(s)) {
      let o = s.getChildren();
      for (let a = 0; a < o.length; a++) s.insertBefore(o[a]);
      s.remove();
    }
  });
  else {
    if (e.length === 1) {
      let a = cTe(e[0], Qd);
      if (a !== null) {
        a.setURL(t), n !== void 0 && a.setTarget(n), r !== null && a.setRel(r), i !== void 0 && a.setTitle(i);
        return;
      }
    }
    let s = null, o = null;
    e.forEach((a) => {
      var l = a.getParent();
      if (l !== o && l !== null && (!vl.$isElementNode(a) || a.isInline())) if (Qd(l)) o = l, l.setURL(t), n !== void 0 && l.setTarget(n), r !== null && o.setRel(r), i !== void 0 && o.setTitle(i);
      else if (l.is(s) || (s = l, o = _0(t, { rel: r, target: n, title: i }), Qd(l) ? a.getPreviousSibling() === null ? l.insertBefore(o) : l.insertAfter(o) : a.insertBefore(o)), Qd(a)) {
        if (!a.is(o)) {
          if (o !== null) {
            l = a.getChildren();
            for (let u = 0; u < l.length; u++) o.append(l[u]);
          }
          a.remove();
        }
      } else o !== null && o.append(a);
    });
  }
};
const fTe = Fl;
var ki = fTe;
function dTe({ value: t, onEnter: e }) {
  const [n] = Oe.useLexicalComposerContext();
  j.useEffect(
    () => lt.mergeRegister(
      n.registerCommand(
        N.KEY_ENTER_COMMAND,
        (i) => (e(i), !1),
        N.COMMAND_PRIORITY_LOW
      )
    ),
    [n, e, t]
  );
}
function yq({ dataTestId: t, value: e, placeholder: n, handleUrlChange: i, handleUrlSubmit: r, hasError: s, handlePasteAsLink: o, handleRetry: a, handleClose: l, isLoading: u }) {
  return j.useEffect(() => {
    const f = (d) => {
      d.key === "Escape" && l();
    };
    return window.addEventListener("keydown", f), () => {
      window.removeEventListener("keydown", f);
    };
  }, [l]), u ? /* @__PURE__ */ y.jsx("div", { className: "flex w-full items-center justify-center rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-900 dark:placeholder:text-grey-800", "data-testid": `${t}-loading-container`, children: /* @__PURE__ */ y.jsx("div", { className: "-ml-1 mr-3 inline-block size-5 animate-spin rounded-full border-4 border-green/20 text-white after:mt-[11px] after:block after:size-1 after:rounded-full after:bg-green/70 after:content-['']", "data-testid": `${t}-loading-spinner` }) }) : s ? /* @__PURE__ */ y.jsxs("div", { className: "min-width-[500px] flex flex-row items-center justify-between rounded-md border border-grey-300 px-3 py-2 text-sm font-normal leading-snug text-grey-900", "data-testid": `${t}-error-container`, children: [
    /* @__PURE__ */ y.jsxs("div", { children: [
      /* @__PURE__ */ y.jsx("span", { className: "mr-3", "data-testid": `${t}-error-message`, children: "Oops, that link didn't work." }),
      /* @__PURE__ */ y.jsx("button", { className: "mr-3 cursor-pointer", "data-testid": `${t}-error-retry`, type: "button", children: /* @__PURE__ */ y.jsx("span", { className: "font-semibold underline", onClick: a, children: "Retry" }) }),
      /* @__PURE__ */ y.jsx("button", { className: "mr-3 cursor-pointer", "data-testid": `${t}-error-pasteAsLink`, type: "button", children: /* @__PURE__ */ y.jsx("span", { className: "font-semibold underline", onClick: () => o(e), children: "Paste URL as link" }) })
    ] }),
    /* @__PURE__ */ y.jsx("button", { className: "cursor-pointer p-1", "data-testid": `${t}-error-close`, type: "button", onClick: l, children: /* @__PURE__ */ y.jsx(vp, { className: "size-4 stroke-2 text-grey-400" }) })
  ] }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(dTe, { value: e, onEnter: r }),
    /* @__PURE__ */ y.jsx(
      "input",
      {
        autoFocus: !0,
        className: "w-full rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-950 dark:text-grey-100 dark:placeholder:text-grey-800",
        "data-testid": t,
        placeholder: n,
        value: e,
        onChange: i,
        onKeyDown: r
      }
    )
  ] });
}
function hTe({ children: t, waitBeforeShow: e = 500 }) {
  const [n, i] = j.useState(e === 0);
  return j.useEffect(() => {
    if (n)
      return;
    const r = setTimeout(() => {
      i(!0);
    }, e);
    return () => {
      clearTimeout(r);
    };
  }, [n, e]), n ? t : null;
}
var pTe = qo, mTe = function() {
  return pTe.Date.now();
}, gTe = mTe, vTe = /\s/;
function bTe(t) {
  for (var e = t.length; e-- && vTe.test(t.charAt(e)); )
    ;
  return e;
}
var yTe = bTe, wTe = yTe, kTe = /^\s+/;
function xTe(t) {
  return t && t.slice(0, wTe(t) + 1).replace(kTe, "");
}
var _Te = xTe, OTe = sp, STe = Pf, CTe = "[object Symbol]";
function ETe(t) {
  return typeof t == "symbol" || STe(t) && OTe(t) == CTe;
}
var P2 = ETe, TTe = _Te, BP = Ll, $Te = P2, zP = NaN, MTe = /^[-+]0x[0-9a-f]+$/i, NTe = /^0b[01]+$/i, ATe = /^0o[0-7]+$/i, DTe = parseInt;
function PTe(t) {
  if (typeof t == "number")
    return t;
  if ($Te(t))
    return zP;
  if (BP(t)) {
    var e = typeof t.valueOf == "function" ? t.valueOf() : t;
    t = BP(e) ? e + "" : e;
  }
  if (typeof t != "string")
    return t === 0 ? t : +t;
  t = TTe(t);
  var n = NTe.test(t);
  return n || ATe.test(t) ? DTe(t.slice(2), n ? 2 : 8) : MTe.test(t) ? zP : +t;
}
var ITe = PTe, LTe = Ll, MO = gTe, WP = ITe, RTe = "Expected a function", jTe = Math.max, FTe = Math.min;
function BTe(t, e, n) {
  var i, r, s, o, a, l, u = 0, f = !1, d = !1, h = !0;
  if (typeof t != "function")
    throw new TypeError(RTe);
  e = WP(e) || 0, LTe(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? jTe(WP(n.maxWait) || 0, e) : s, h = "trailing" in n ? !!n.trailing : h);
  function m($) {
    var P = i, W = r;
    return i = r = void 0, u = $, o = t.apply(W, P), o;
  }
  function g($) {
    return u = $, a = setTimeout(_, e), f ? m($) : o;
  }
  function w($) {
    var P = $ - l, W = $ - u, z = e - P;
    return d ? FTe(z, s - W) : z;
  }
  function x($) {
    var P = $ - l, W = $ - u;
    return l === void 0 || P >= e || P < 0 || d && W >= s;
  }
  function _() {
    var $ = MO();
    if (x($))
      return S($);
    a = setTimeout(_, w($));
  }
  function S($) {
    return a = void 0, h && i ? m($) : (i = r = void 0, o);
  }
  function C() {
    a !== void 0 && clearTimeout(a), u = 0, i = l = r = a = void 0;
  }
  function E() {
    return a === void 0 ? o : S(MO());
  }
  function M() {
    var $ = MO(), P = x($);
    if (i = arguments, r = this, l = $, P) {
      if (a === void 0)
        return g(l);
      if (d)
        return clearTimeout(a), a = setTimeout(_, e), m(l);
    }
    return a === void 0 && (a = setTimeout(_, e)), o;
  }
  return M.cancel = C, M.flush = E, M;
}
var wq = BTe;
const bp = /* @__PURE__ */ Gs(wq);
function nT({
  dataTestId: t,
  className: e = "z-[-1] max-h-[30vh] w-full overflow-y-auto bg-white shadow rounded-lg dark:border-grey-800 dark:bg-grey-900",
  placementTopClass: n = "-top-0.5 -translate-y-full",
  placementBottomClass: i = "mt-0.5",
  children: r,
  ...s
}) {
  const o = j.useRef(null), [a, l] = j.useState("bottom"), u = () => {
    if (!o || !o.current)
      return;
    const d = o.current.parentNode.getBoundingClientRect().bottom;
    window.innerHeight - d < o.current.offsetHeight ? l("top") : l("bottom");
  };
  return rh(() => {
    u();
  }, []), j.useEffect(() => {
    const f = bp(() => {
      u();
    }, 250);
    return window.addEventListener("resize", f, { passive: !0 }), () => {
      window.removeEventListener("resize", f, { passive: !0 });
    };
  }, []), /* @__PURE__ */ y.jsx(
    "ul",
    {
      ref: o,
      className: nt(
        "absolute",
        a === "top" && n,
        a === "bottom" && i,
        e
      ),
      "data-testid": `${t}-dropdown`,
      ...s,
      children: r
    }
  );
}
const zTe = "h-9 rounded-lg border border-grey-100 bg-grey-100 dark:bg-grey-900 dark:border-transparent dark:focus:border-green dark:hover:bg-grey-925 dark:focus:bg-grey-925 transition-colors px-3 py-1.5 font-sans text-sm font-normal text-grey-900 focus:border-green focus:bg-white focus:shadow-[0_0_0_2px_rgba(48,207,67,.25)] focus-visible:outline-none dark:text-white dark:selection:bg-grey-800 placeholder:text-grey-500 md:h-[38px] md:py-2 dark:placeholder:text-grey-700";
function iT({ autoFocus: t, className: e, dataTestId: n, value: i, onChange: r, ...s }) {
  const o = j.useRef(null), a = j.useRef(t), [l, u] = j.useState(i), f = j.useCallback((d) => {
    u(d.target.value), r && r(d);
  }, [r]);
  return j.useEffect(() => {
    if (u(i), a.current) {
      const d = setTimeout(() => {
        o.current && (a.current = !1, o.current.focus());
      }, 0);
      return () => clearTimeout(d);
    }
  }, [i]), /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx("div", { className: "relative", children: /* @__PURE__ */ y.jsx(
    "input",
    {
      ref: o,
      autoFocus: t,
      className: `relative w-full ${e || zTe}`,
      "data-testid": n,
      value: l,
      onChange: f,
      ...s
    }
  ) }) });
}
function rT({ items: t, getItem: e, onSelect: n, defaultSelected: i }) {
  const r = Math.max(0, t.findIndex((l) => l === i)), [s, o] = j.useState(r);
  j.useEffect(() => {
    s >= t.length && o(r);
  }, [t, s, r]), j.useEffect(() => {
    o(r);
  }, [r]);
  const a = j.useCallback((l) => {
    l.key === "ArrowDown" && (l.preventDefault(), l.stopPropagation(), o((u) => Math.min(u + 1, t.length - 1))), l.key === "ArrowUp" && (l.preventDefault(), l.stopPropagation(), o((u) => Math.max(u - 1, 0))), l.key === "Enter" && (l.preventDefault(), l.stopPropagation(), n(t[s]));
  }, [t, s, n]);
  return j.useEffect(() => (window.addEventListener("keydown", a, { capture: !0 }), () => {
    window.removeEventListener("keydown", a, { capture: !0 });
  }), [a]), /* @__PURE__ */ y.jsx(y.Fragment, { children: t.map((l, u) => e(l, u === s)) });
}
const WTe = ({ children: t }) => /* @__PURE__ */ y.jsx(y.Fragment, { children: t });
function sT({ groups: t, getItem: e, getGroup: n, onSelect: i, defaultSelected: r, isLoading: s }) {
  const o = t.flatMap((m) => m.items), a = Math.max(0, o.findIndex((m) => m === r)), [l, u] = j.useState(a), [f, d] = j.useState(!1);
  j.useEffect(() => {
    l >= o.length && u(a);
  }, [o, l, a]), j.useEffect(() => {
    u(a);
  }, [a]);
  const h = j.useCallback((m) => {
    m.key === "ArrowDown" && (m.preventDefault(), m.stopPropagation(), u((g) => Math.min(g + 1, o.length - 1)), d(!0)), m.key === "ArrowUp" && (m.preventDefault(), m.stopPropagation(), u((g) => Math.max(g - 1, 0)), d(!0)), m.key === "Enter" && (m.preventDefault(), m.stopPropagation(), i(o[l]));
  }, [o, l, i]);
  return j.useEffect(() => (window.addEventListener("keydown", h, { capture: !0 }), () => {
    window.removeEventListener("keydown", h, { capture: !0 });
  }), [h]), /* @__PURE__ */ y.jsx(y.Fragment, { children: t.map((m, g) => /* @__PURE__ */ y.jsxs(WTe, { children: [
    n(m, { showSpinner: g === 0 && s }),
    (m.items || []).map((w, x) => {
      const S = t.slice(0, g).reduce((M, $) => M + $.items.length, 0) + x, C = S === l && !!w.value;
      return e(w, C, () => {
        w.value && u(S), d(!1);
      }, f);
    })
  ] }, m.label)) });
}
function kq({ size: t }) {
  let e = "";
  switch (t) {
    case "mini":
      e = "h-3 w-3";
      break;
    default:
      e = "h-5 w-5";
      break;
  }
  return /* @__PURE__ */ y.jsx("div", { className: "", "data-testid": "spinner", children: /* @__PURE__ */ y.jsxs("svg", { className: `${e} animate-spin text-grey-500 dark:text-grey-200`, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
    /* @__PURE__ */ y.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4", style: {
      opacity: "0.3"
    } }),
    /* @__PURE__ */ y.jsx("path", { d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z", fill: "currentColor" })
  ] }) });
}
kq.propTypes = {
  colorClass: A.string,
  size: A.string
};
function xq({ dataTestId: t }) {
  return /* @__PURE__ */ y.jsx(hTe, { children: /* @__PURE__ */ y.jsx("li", { className: "mb-0 px-4 py-2 text-left", "data-testid": `${t}-loading`, children: /* @__PURE__ */ y.jsx("span", { className: "block text-sm font-medium leading-tight text-grey-900 dark:text-white", children: "Searching..." }) }) });
}
function _q({ dataTestId: t, item: e, selected: n, onClick: i, onMouseOver: r, scrollIntoView: s, className: o, selectedClassName: a, children: l }) {
  const u = j.useRef(null);
  j.useEffect(() => {
    n && s && u.current.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
  }, [n, s]);
  const f = (h) => {
    h.preventDefault(), i(e);
  }, d = e.value ? "" : "pointer-events-none";
  return /* @__PURE__ */ y.jsx("li", { ref: u, "aria-selected": n, className: `${n ? a : ""} ${d} ${o}`, "data-testid": `${t}-listOption`, role: "option", onMouseDownCapture: f, onMouseOver: r, children: l });
}
function oT({ dataTestId: t, group: e, showSpinner: n }) {
  return /* @__PURE__ */ y.jsx("li", { className: "mb-0 mt-2 flex items-center justify-between border-t border-grey-200 px-4 pb-2 pt-3 text-[1.1rem] font-semibold uppercase tracking-wide text-grey-600 first-of-type:mt-0 first-of-type:border-t-0 dark:border-grey-900", "data-testid": `${t}-listGroup`, children: /* @__PURE__ */ y.jsxs("div", { className: "flex items-center gap-1.5", children: [
    e.label,
    n && /* @__PURE__ */ y.jsx("span", { className: "ml-px", "data-testid": "input-list-spinner", children: /* @__PURE__ */ y.jsx(kq, { size: "mini" }) })
  ] }) });
}
function HTe() {
  throw new Error("<InputList> getItem function prop must be provided");
}
function Oq({ autoFocus: t, className: e, inputClassName: n, dropdownClassName: i, dropdownPlacementBottomClass: r, dropdownPlacementTopClass: s, dataTestId: o, listOptions: a, isLoading: l, value: u, placeholder: f, onChange: d, onSelect: h, getItem: m = HTe }) {
  var W;
  const [g, w] = j.useState(!1), x = () => {
    w(!0);
  }, _ = () => {
    w(!1);
  }, S = (z, { showSpinner: Z } = {}) => /* @__PURE__ */ y.jsx(oT, { dataTestId: o, group: z, showSpinner: Z }, z.label), C = (z) => {
    d(z.target.value);
  }, E = (z) => {
    (h || d)(z.value, z.type);
  }, M = a && ((W = a[0]) == null ? void 0 : W.items), $ = (l || a && !!a.length) && g, P = () => /* @__PURE__ */ y.jsxs(
    nT,
    {
      className: i,
      dataTestId: o,
      placementBottomClass: r,
      placementTopClass: s,
      children: [
        l && !(a != null && a.length) && /* @__PURE__ */ y.jsx(xq, { dataTestId: o }),
        M ? /* @__PURE__ */ y.jsx(
          sT,
          {
            getGroup: S,
            getItem: m,
            groups: a,
            isLoading: l,
            onSelect: E
          }
        ) : /* @__PURE__ */ y.jsx(
          rT,
          {
            getItem: m,
            items: a,
            onSelect: E
          }
        )
      ]
    }
  );
  return /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsxs("div", { className: `relative z-0 ${e || ""}`, children: [
    /* @__PURE__ */ y.jsx(
      iT,
      {
        autoFocus: t,
        className: n,
        dataTestId: o,
        placeholder: f,
        value: u,
        onBlur: _,
        onChange: C,
        onFocus: x
      }
    ),
    $ && /* @__PURE__ */ y.jsx(P, {})
  ] }) });
}
var HP = rp, QTe = Qz, UTe = Rl, ZTe = P2, QP = HP ? HP.prototype : void 0, UP = QP ? QP.toString : void 0;
function Sq(t) {
  if (typeof t == "string")
    return t;
  if (UTe(t))
    return QTe(t, Sq) + "";
  if (ZTe(t))
    return UP ? UP.call(t) : "";
  var e = t + "";
  return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
}
var qTe = Sq, YTe = qTe;
function VTe(t) {
  return t == null ? "" : YTe(t);
}
var I2 = VTe, XTe = I2, Cq = /[\\^$.*+?()[\]{}|]/g, GTe = RegExp(Cq.source);
function KTe(t) {
  return t = XTe(t), t && GTe.test(t) ? t.replace(Cq, "\\$&") : t;
}
var JTe = KTe;
const e8e = /* @__PURE__ */ Gs(JTe);
function t8e({ string: t, highlightString: e, shouldHighlight: n = !0 }) {
  if (!e || n === !1)
    return t;
  const i = t.split(new RegExp(`(${e8e(e)})`, "gi"));
  return /* @__PURE__ */ y.jsx(y.Fragment, { children: i.map((r, s) => r.toLowerCase() === e.toLowerCase() ? /* @__PURE__ */ y.jsx("span", { className: "font-bold", children: r }, s) : r) });
}
function aT({ dataTestId: t, item: e, highlightString: n, selected: i, onMouseOver: r, scrollIntoView: s, onClick: o }) {
  return /* @__PURE__ */ y.jsxs(
    _q,
    {
      className: "my-[.2rem] flex cursor-pointer items-center justify-between gap-3 rounded-md px-4 py-2 text-left text-black dark:text-white",
      dataTestId: t,
      item: e,
      scrollIntoView: s,
      selected: i,
      selectedClassName: "bg-grey-100 dark:bg-grey-900",
      onClick: o,
      onMouseOver: r,
      children: [
        /* @__PURE__ */ y.jsxs("span", { className: "line-clamp-1 flex items-center gap-[.6rem]", children: [
          e.Icon && /* @__PURE__ */ y.jsx(e.Icon, { className: "size-[1.4rem] stroke-[1.5px]" }),
          /* @__PURE__ */ y.jsx("span", { className: "block truncate text-sm font-medium leading-snug", "data-testid": `${t}-listOption-label`, children: /* @__PURE__ */ y.jsx(t8e, { highlightString: n, shouldHighlight: e.highlight, string: e.label }) })
        ] }),
        i && (e.metaText || e.MetaIcon) && /* @__PURE__ */ y.jsxs("span", { className: "flex shrink-0 items-center gap-[.6rem] text-[1.3rem] leading-snug tracking-tight text-grey-600 dark:text-grey-500", "data-testid": `${t}-listOption-meta`, children: [
          /* @__PURE__ */ y.jsx("span", { title: e.metaIconTitle, children: e.MetaIcon && /* @__PURE__ */ y.jsx(e.MetaIcon, { className: "size-[1.4rem]" }) }),
          e.metaText && /* @__PURE__ */ y.jsx("span", { children: e.metaText })
        ] })
      ]
    }
  );
}
const Eq = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", null, /* @__PURE__ */ J.createElement("path", { d: "M0.75 12a11.25 11.25 0 1 0 22.5 0 11.25 11.25 0 1 0 -22.5 0", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M9.88 23.05c-1.57 -2.2 -2.63 -6.33 -2.63 -11S8.31 3.15 9.88 1", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M14.12 23.05c1.57 -2.2 2.63 -6.33 2.63 -11S15.69 3.15 14.12 1", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "m0.75 12 22.5 0", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "m2.05 17.25 19.9 0", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "m2.05 6.75 19.9 0", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }))), n8e = 100, ZP = /^http|^#|^\/|^mailto:|^tel:/;
function i8e(t) {
  return [{
    label: "Link to web page",
    items: [{
      label: t,
      value: t,
      Icon: Eq,
      highlight: !1,
      type: "url"
    }]
  }];
}
function r8e(t) {
  return [{
    label: "Link to web page",
    items: [{
      label: "Enter URL to create link",
      value: null,
      Icon: Eq,
      highlight: !1,
      type: "no-results"
    }]
  }];
}
function qP(t, { noResultOptions: e, type: n } = {}) {
  return !t || !t.length ? (e || r8e)() : t.map((i) => {
    const r = i.items.map((s) => ({
      label: s.title,
      value: s.url,
      Icon: s.Icon,
      metaText: s.metaText,
      MetaIcon: s.MetaIcon,
      metaIconTitle: s.metaIconTitle,
      type: n || "internal"
    }));
    return { ...i, items: r };
  });
}
const lT = (t, e, { noResultOptions: n } = {}) => {
  const [i, r] = j.useState([]), [s, o] = j.useState([]), [a, l] = j.useState(!1), u = j.useMemo(() => async function(m) {
    if (ZP.test(m)) {
      o(i8e(m));
      return;
    }
    l(!0);
    const g = await e(m);
    g !== void 0 && (o(qP(g, { noResultOptions: n })), l(!1));
  }, [e, n]), f = j.useMemo(() => bp(u, n8e), [u]);
  return j.useEffect(() => {
    (async () => {
      !t && l(!0);
      const m = await e();
      r(qP(m, { type: "default" })), !t && l(!1);
    })().catch(console.error);
  }, []), j.useEffect(() => {
    ZP.test(t) ? (f.cancel(), u(t)) : f(t);
  }, [t, u, f]), {
    isSearching: a,
    listOptions: t ? s : i
  };
};
function s8e({ dataTestId: t, value: e, placeholder: n, handleUrlChange: i, handleUrlSubmit: r, hasError: s, handlePasteAsLink: o, handleRetry: a, handleClose: l, isLoading: u, searchLinks: f }) {
  const { isSearching: d, listOptions: h } = lT(e, f);
  if (j.useEffect(() => {
    e || pi("Link dropdown: Opened", { context: "bookmark" });
  }, []), j.useEffect(() => {
    const _ = (S) => {
      S.key === "Escape" && l();
    };
    return window.addEventListener("keydown", _), () => {
      window.removeEventListener("keydown", _);
    };
  }, [l]), u)
    return /* @__PURE__ */ y.jsx("div", { className: "flex w-full items-center justify-center rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-900 dark:placeholder:text-grey-800", "data-testid": `${t}-loading-container`, children: /* @__PURE__ */ y.jsx("div", { className: "-ml-1 mr-3 inline-block size-5 animate-spin rounded-full border-4 border-green/20 text-white after:mt-[11px] after:block after:size-1 after:rounded-full after:bg-green/70 after:content-['']", "data-testid": `${t}-loading-spinner` }) });
  if (s)
    return /* @__PURE__ */ y.jsxs("div", { className: "min-width-[500px] flex flex-row items-center justify-between rounded-md border border-grey-300 px-3 py-2 text-sm font-normal leading-snug text-grey-900", "data-testid": `${t}-error-container`, children: [
      /* @__PURE__ */ y.jsxs("div", { children: [
        /* @__PURE__ */ y.jsx("span", { className: "mr-3", "data-testid": `${t}-error-message`, children: "Oops, that link didn't work." }),
        /* @__PURE__ */ y.jsx("button", { className: "mr-3 cursor-pointer", "data-testid": `${t}-error-retry`, type: "button", children: /* @__PURE__ */ y.jsx("span", { className: "font-semibold underline", onClick: a, children: "Retry" }) }),
        /* @__PURE__ */ y.jsx("button", { className: "mr-3 cursor-pointer", "data-testid": `${t}-error-pasteAsLink`, type: "button", children: /* @__PURE__ */ y.jsx("span", { className: "font-semibold underline", onClick: () => o(e), children: "Paste URL as link" }) })
      ] }),
      /* @__PURE__ */ y.jsx("button", { className: "cursor-pointer p-1", "data-testid": `${t}-error-close`, type: "button", onClick: l, children: /* @__PURE__ */ y.jsx(vp, { className: "size-4 stroke-2 text-grey-400" }) })
    ] });
  const m = async (_) => {
    i(_);
  }, g = (_, S) => {
    if (_ === null)
      return;
    const C = _ && typeof _ == "string" ? _ : _.value;
    r(C, S);
  }, w = (_) => {
    !_.isComposing && _.key === "Enter" && (_.preventDefault(), r(_.target.value));
  }, x = (_, S, C, E) => /* @__PURE__ */ y.jsx(
    aT,
    {
      dataTestId: t,
      highlightString: e,
      item: _,
      scrollIntoView: E,
      selected: S,
      onClick: g,
      onMouseOver: C
    },
    _.value
  );
  return /* @__PURE__ */ y.jsx("div", { className: "not-kg-prose", onKeyDown: w, children: /* @__PURE__ */ y.jsx(
    Oq,
    {
      autoFocus: !0,
      dataTestId: t,
      dropdownClassName: "z-[-1] max-h-[30vh] w-full overflow-y-auto bg-white px-2 py-1 shadow-md dark:bg-grey-950",
      dropdownPlacementBottomClass: "mt-[.6rem] rounded-md",
      dropdownPlacementTopClass: "top-[-.6rem] -translate-y-full rounded-md",
      getItem: x,
      inputClassName: "w-full rounded-md border border-grey-300 p-2 font-sans text-sm font-normal leading-snug text-grey-900 placeholder:text-grey-500 focus-visible:outline-none dark:border-grey-800 dark:bg-grey-950 dark:text-grey-100 dark:placeholder:text-grey-800",
      isLoading: d,
      listOptions: h,
      placeholder: n,
      value: e,
      onChange: m,
      onSelect: g
    }
  ) });
}
function Tq({
  author: t,
  handleClose: e,
  handlePasteAsLink: n,
  handleRetry: i,
  handleUrlChange: r,
  handleUrlSubmit: s,
  url: o,
  urlInputValue: a,
  urlPlaceholder: l,
  thumbnail: u,
  title: f,
  description: d,
  icon: h,
  publisher: m,
  captionEditor: g,
  captionEditorInitialState: w,
  isSelected: x,
  isLoading: _,
  urlError: S,
  searchLinks: C
}) {
  const [E, M] = j.useState(!0), $ = () => {
    M(!1);
  };
  return o && !S && f ? /* @__PURE__ */ y.jsxs("div", { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "not-kg-prose relative flex min-h-[120px] w-full rounded-md border border-grey/40 bg-transparent font-sans dark:border-grey/20", "data-testid": "bookmark-container", children: [
      /* @__PURE__ */ y.jsxs("div", { className: "flex grow basis-full flex-col items-start justify-start p-5", "data-testid": "bookmark-text-container", children: [
        /* @__PURE__ */ y.jsx("div", { className: "text-[1.5rem] font-semibold leading-normal tracking-normal text-grey-900 dark:text-grey-100", "data-testid": "bookmark-title", children: f }),
        /* @__PURE__ */ y.jsx("div", { className: "mt-1 line-clamp-2 max-h-[44px] overflow-y-hidden text-sm font-normal leading-normal text-grey-800 dark:text-grey-600", "data-testid": "bookmark-description", children: d }),
        /* @__PURE__ */ y.jsxs("div", { className: "mt-[20px] flex items-center text-sm font-medium leading-9 text-grey-900", children: [
          h && /* @__PURE__ */ y.jsx($q, { src: h }),
          /* @__PURE__ */ y.jsx("span", { className: " db max-w-[240px] truncate leading-6 text-grey-900 dark:text-grey-100", "data-testid": "bookmark-publisher", children: m }),
          t && /* @__PURE__ */ y.jsx("span", { className: "font-normal text-grey-800 before:mx-1.5 before:text-grey-900 before:content-['•'] dark:text-grey-600 dark:before:text-grey-100", "data-testid": "bookmark-author", children: t })
        ] })
      ] }),
      u && E && /* @__PURE__ */ y.jsx("div", { className: "grow-1 relative m-0 min-w-[33%]", "data-testid": "bookmark-thumbnail-container", children: /* @__PURE__ */ y.jsx("img", { alt: "", className: "absolute inset-0 size-full rounded-r-[.5rem] object-cover", "data-testid": "bookmark-thumbnail", src: u, onError: $ }) }),
      /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 z-50 mt-0" })
    ] }),
    /* @__PURE__ */ y.jsx(
      gp,
      {
        captionEditor: g,
        captionEditorInitialState: w,
        captionPlaceholder: "Type caption for bookmark (optional)",
        dataTestId: "bookmark-caption",
        isSelected: x
      }
    )
  ] }) : typeof C == "function" ? /* @__PURE__ */ y.jsx(
    s8e,
    {
      dataTestId: "bookmark-url",
      handleClose: e,
      handlePasteAsLink: n,
      handleRetry: i,
      handleUrlChange: r,
      handleUrlSubmit: s,
      hasError: S,
      isLoading: _,
      placeholder: l,
      searchLinks: C,
      value: a
    }
  ) : /* @__PURE__ */ y.jsx(
    yq,
    {
      dataTestId: "bookmark-url",
      handleClose: e,
      handlePasteAsLink: n,
      handleRetry: i,
      handleUrlChange: r,
      handleUrlSubmit: s,
      hasError: S,
      isLoading: _,
      placeholder: l,
      value: a
    }
  );
}
function $q({ src: t }) {
  return /* @__PURE__ */ y.jsx("img", { alt: "", className: "mr-2 size-5 shrink-0", "data-testid": "bookmark-icon", src: t });
}
Tq.propTypes = {
  author: A.string,
  handleClose: A.func,
  handlePasteAsLink: A.func,
  handleRetry: A.func,
  handleUrlChange: A.func,
  handleUrlSubmit: A.func,
  url: A.string,
  urlInputValue: A.string,
  urlPlaceholder: A.string,
  thumbnail: A.string,
  title: A.string,
  description: A.string,
  icon: A.string,
  publisher: A.string,
  captionEditor: A.object,
  captionEditorInitialState: A.object,
  isSelected: A.bool,
  isLoading: A.bool,
  urlError: A.bool,
  searchLinks: A.func
};
$q.propTypes = {
  src: A.string
};
function uT(t, e) {
  if (!t || !e)
    return !1;
  try {
    const n = new URL(t), i = `/${new URL(e).pathname.split("/")[1]}`;
    return n.hostname === new URL(e).hostname && n.pathname.startsWith(i);
  } catch {
    return !1;
  }
}
function o8e({ author: t, nodeKey: e, url: n, icon: i, title: r, description: s, publisher: o, thumbnail: a, captionEditor: l, captionEditorInitialState: u, createdWithUrl: f }) {
  const [d] = Oe.useLexicalComposerContext(), { cardConfig: h } = j.useContext(dt), { isSelected: m } = j.useContext(gn), [g, w] = j.useState(n), [x, _] = j.useState(!1), [S, C] = j.useState(!1), [E, M] = j.useState(!1), $ = (H) => {
    if (typeof H == "string") {
      w(H);
      return;
    }
    w(H.target.value);
  }, P = async (H, R) => {
    if (H) {
      if (typeof H == "string") {
        if ((R === "internal" || R === "default") && pi("Link dropdown: Internal link chosen", { context: "bookmark", fromLatest: R === "default" }), R === "url") {
          const q = uT(H, h == null ? void 0 : h.siteUrl) ? "internal" : "external";
          pi("Link dropdown: URL entered", { context: "bookmark", target: q });
        }
        L(H);
      }
      (H == null ? void 0 : H.key) === "Enter" && L(H.target.value);
    }
  }, W = async () => {
    C(!1);
  }, z = $t(() => {
    d.update(() => {
      const H = N.$getNodeByKey(e), R = N.$createParagraphNode().append(ki.$createLinkNode(g).append(N.$createTextNode(g)));
      H.replace(R), R.selectEnd();
    });
  }, [d, e, g]), Z = $t(() => {
    d.update(() => {
      const H = N.$getNodeByKey(e), R = H.getNextSibling();
      if (R && N.$isParagraphNode(R) && R.getTextContentSize() === 0)
        H.remove(), R.selectEnd();
      else {
        const q = N.$createParagraphNode();
        H.replace(q), q.selectEnd();
      }
    });
  }, [d, e]), L = async (H) => {
    d.getRootElement().focus({ preventScroll: !0 }), _(!0);
    let R;
    try {
      R = await h.fetchEmbed(H, { type: "bookmark" });
    } catch {
      _(!1), C(!0);
      return;
    }
    d.update(() => {
      const q = N.$getNodeByKey(e);
      q.url = H, q.author = R.metadata.author, q.icon = R.metadata.icon, q.title = R.metadata.title, q.description = R.metadata.description, q.publisher = R.metadata.publisher, q.thumbnail = R.metadata.thumbnail;
    }), _(!1);
  }, Q = $t(async () => {
    _(!0);
    let H;
    try {
      H = await h.fetchEmbed(n, { type: "bookmark" });
    } catch {
      _(!1), C(!0);
      return;
    }
    d.update(() => {
      const R = N.$getNodeByKey(e);
      R.url = H.url, R.author = H.metadata.author, R.icon = H.metadata.icon, R.title = H.metadata.title, R.description = H.metadata.description, R.publisher = H.metadata.publisher, R.thumbnail = H.metadata.thumbnail, f && R.selectNext();
    }), _(!1);
  }, []);
  j.useEffect(() => {
    if (f) {
      w(n);
      try {
        Q(n);
      } catch {
        z(n);
      }
    }
  }, []);
  const V = typeof (h == null ? void 0 : h.searchLinks) == "function";
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      Tq,
      {
        author: t,
        captionEditor: l,
        captionEditorInitialState: u,
        description: s,
        handleClose: Z,
        handlePasteAsLink: z,
        handleRetry: W,
        handleUrlChange: $,
        handleUrlSubmit: P,
        icon: i,
        isLoading: x,
        isSelected: m,
        publisher: o,
        searchLinks: h == null ? void 0 : h.searchLinks,
        thumbnail: a,
        title: r,
        url: n,
        urlError: S,
        urlInputValue: g,
        urlPlaceholder: V ? "Paste URL or search posts and pages..." : "Paste URL to add bookmark content..."
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "bookmark",
        isVisible: E,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => M(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "bookmark",
        isVisible: r && m && !E && h.createSnippet,
        children: /* @__PURE__ */ y.jsx(li, { children: /* @__PURE__ */ y.jsx(
          at,
          {
            dataTestId: "create-snippet",
            hide: !h.createSnippet,
            icon: "snippet",
            isActive: !1,
            label: "Save as snippet",
            onClick: () => M(!0)
          }
        ) })
      }
    )
  ] });
}
const Mq = N.createCommand();
class L2 extends S1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__captionEditor");
    we(this, "__captionEditorInitialState");
    we(this, "__createdWithUrl");
    this.__createdWithUrl = !!n.url && !n.metadata, xi(this, "__captionEditor", { editor: n.captionEditor, nodes: pr }), !n.captionEditor && n.caption && _i(this, "__captionEditor", `${n.caption}`);
  }
  getIcon() {
    return _S;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.captionEditor = i.__captionEditor, n.captionEditorInitialState = i.__captionEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__captionEditor && this.__captionEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__captionEditor, null), r = mi(i);
      n.caption = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(
      o8e,
      {
        author: this.author,
        captionEditor: this.__captionEditor,
        captionEditorInitialState: this.__captionEditorInitialState,
        createdWithUrl: this.__createdWithUrl,
        description: this.description,
        icon: this.icon,
        nodeKey: this.getKey(),
        publisher: this.publisher,
        thumbnail: this.thumbnail,
        title: this.title,
        url: this.url
      }
    ) });
  }
}
we(L2, "kgMenu", [{
  label: "Bookmark",
  desc: "Embed a link as a visual bookmark",
  Icon: _S,
  insertCommand: Mq,
  matches: ["bookmark"],
  queryParams: ["url"],
  priority: 4,
  shortcut: "/bookmark [url]"
}]);
const cT = (t) => new L2(t);
function Nq({ captionEditor: t, captionEditorInitialState: e, html: n, isSelected: i, urlInputValue: r, urlPlaceholder: s, urlError: o, isLoading: a, handleUrlChange: l, handleUrlSubmit: u, handleRetry: f, handlePasteAsLink: d, handleClose: h }) {
  return n ? /* @__PURE__ */ y.jsxs("div", { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "not-kg-prose relative", children: [
      /* @__PURE__ */ y.jsx(Aq, { dataTestId: "embed-iframe", html: n }),
      /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 z-50 mt-0" })
    ] }),
    /* @__PURE__ */ y.jsx(
      gp,
      {
        captionEditor: t,
        captionEditorInitialState: e,
        captionPlaceholder: "Type caption for embed (optional)",
        dataTestId: "embed-caption",
        isSelected: i
      }
    )
  ] }) : /* @__PURE__ */ y.jsx(
    yq,
    {
      dataTestId: "embed-url",
      handleClose: h,
      handlePasteAsLink: d,
      handleRetry: f,
      handleUrlChange: l,
      handleUrlSubmit: u,
      hasError: o,
      isLoading: a,
      placeholder: s,
      value: r
    }
  );
}
function Aq({ dataTestId: t, html: e }) {
  const n = j.useRef(null), i = () => {
    var u, f, d, h, m, g;
    const a = (d = (f = (u = n.current) == null ? void 0 : u.contentDocument) == null ? void 0 : f.body) == null ? void 0 : d.firstChild;
    if (!a)
      return;
    if (a.tagName === "IFRAME") {
      const w = a.getAttribute("width"), x = a.getAttribute("height");
      if (w && x && w.indexOf("%") === -1 && x.indexOf("%") === -1) {
        const _ = parseInt(w) / parseInt(x), S = n.current.offsetWidth / _;
        a.style.height = `${S}px`, n.current.style.height = `${S}px`, a.style.width = "100%";
        return;
      }
      if (x && x.indexOf("%") === -1) {
        n.current.style.height = `${x}px`;
        return;
      }
    }
    const l = (g = (m = (h = n.current) == null ? void 0 : h.contentDocument) == null ? void 0 : m.scrollingElement) == null ? void 0 : g.scrollHeight;
    l && (n.current.style.height = `${l}px`);
  }, r = {
    attributes: !0,
    attributeOldValue: !1,
    characterData: !0,
    characterDataOldValue: !1,
    childList: !0,
    subtree: !0
  }, s = new MutationObserver(i), o = () => {
    const a = n.current.contentDocument.body;
    a.style.display = "flex", a.style.margin = "0", a.style.justifyContent = "center", i(), s.observe(n.current.contentWindow.document, r);
  };
  return j.useEffect(() => {
    const a = new ResizeObserver(i);
    return a.observe(n.current), function() {
      a.disconnect(), s.disconnect();
    };
  }, []), /* @__PURE__ */ y.jsx(
    "iframe",
    {
      ref: n,
      className: "bn miw-100 w-full",
      "data-testid": t,
      srcDoc: e,
      tabIndex: -1,
      title: "embed-card-iframe",
      onLoad: o
    }
  );
}
Nq.propTypes = {
  html: A.string,
  isSelected: A.bool,
  urlInputValue: A.string,
  urlPlaceholder: A.string,
  urlError: A.bool,
  isLoading: A.bool,
  handleUrlChange: A.func,
  handleUrlSubmit: A.func,
  handleRetry: A.func,
  handlePasteAsLink: A.func,
  handleClose: A.func,
  captionEditor: A.object,
  captionEditorInitialState: A.object
};
Aq.propTypes = {
  dataTestId: A.string,
  html: A.string
};
function a8e({ nodeKey: t, url: e, html: n, createdWithUrl: i, embedType: r, metadata: s, captionEditor: o, captionEditorInitialState: a }) {
  const [l] = Oe.useLexicalComposerContext(), { cardConfig: u } = j.useContext(dt), { isSelected: f } = j.useContext(gn), [d, h] = j.useState(""), [m, g] = j.useState(!1), [w, x] = j.useState(!1), [_, S] = j.useState(!1), C = (z) => {
    h(z.target.value);
  }, E = async (z) => {
    z.key === "Enter" && W(z.target.value);
  }, M = async () => {
    x(!1);
  }, $ = $t((z) => {
    l.update(() => {
      const Z = N.$getNodeByKey(t);
      if (!Z)
        return;
      const L = N.$createParagraphNode().append(ki.$createLinkNode(z).append(N.$createTextNode(z)));
      Z.replace(L), L.getNextSibling() || L.insertAfter(N.$createParagraphNode()), L.selectNext();
    });
  }, [l, t]), P = $t(() => {
    l.update(() => {
      const z = N.$getNodeByKey(t), Z = z.getNextSibling();
      if (Z && N.$isParagraphNode(Z) && Z.getTextContentSize() === 0)
        z.remove(), Z.selectEnd();
      else {
        const L = N.$createParagraphNode();
        z.replace(L), L.selectEnd();
      }
    });
  }, [l, t]), W = async (z) => {
    g(!0);
    let Z;
    try {
      if (Z = await u.fetchEmbed(z, {}), Z.type === "bookmark") {
        l.update(() => {
          const L = N.$getNodeByKey(t), Q = cT({ url: Z.url, metadata: Z.metadata });
          L.replace(Q);
        });
        return;
      }
    } catch {
      if (i) {
        g(!1), $(z);
        return;
      }
      g(!1), x(!0);
      return;
    }
    l.update(() => {
      const L = N.$getNodeByKey(t);
      L.url = z, L.metadata = Z, L.embedType = Z.type, L.html = Z.html, i && L.selectNext();
    }), g(!1);
  };
  return j.useEffect(() => {
    if (i) {
      h(e);
      try {
        W(e);
      } catch {
        $(e);
      }
    }
  }, []), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      Nq,
      {
        captionEditor: o,
        captionEditorInitialState: a,
        handleClose: P,
        handlePasteAsLink: $,
        handleRetry: M,
        handleUrlChange: C,
        handleUrlSubmit: E,
        html: n,
        isLoading: m,
        isSelected: f,
        metadata: s,
        url: e,
        urlError: w,
        urlInputValue: d,
        urlPlaceholder: "Paste URL to add embedded content..."
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "embed",
        isVisible: _,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => S(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "embed",
        isVisible: n && f && !_ && u.createSnippet,
        children: /* @__PURE__ */ y.jsx(li, { children: /* @__PURE__ */ y.jsx(
          at,
          {
            dataTestId: "create-snippet",
            hide: !u.createSnippet,
            icon: "snippet",
            isActive: !1,
            label: "Save as snippet",
            onClick: () => S(!0)
          }
        ) })
      }
    )
  ] });
}
const au = N.createCommand();
class R2 extends M1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__captionEditor");
    we(this, "__captionEditorInitialState");
    we(this, "__createdWithUrl");
    this.__createdWithUrl = !!n.url && !n.html, xi(this, "__captionEditor", { editor: n.captionEditor, nodes: pr }), !n.captionEditor && n.caption && _i(this, "__captionEditor", `${n.caption}`);
  }
  getIcon() {
    return IS;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.captionEditor = i.__captionEditor, n.captionEditorInitialState = i.__captionEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__captionEditor && this.__captionEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__captionEditor, null), r = mi(i);
      n.caption = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(
      a8e,
      {
        captionEditor: this.__captionEditor,
        captionEditorInitialState: this.__captionEditorInitialState,
        createdWithUrl: this.__createdWithUrl,
        embedType: this.embedType,
        html: this.html,
        metadata: this.metadata,
        nodeKey: this.getKey(),
        url: this.url
      }
    ) });
  }
}
we(R2, "kgMenu", [
  {
    section: "Embeds",
    label: "Other...",
    desc: "/embed [url]",
    Icon: IS,
    insertCommand: au,
    matches: ["embed"],
    queryParams: ["url"],
    priority: 100,
    shortcut: "/embed [url]"
  },
  {
    section: "Embeds",
    label: "YouTube",
    desc: "/youtube [video url]",
    Icon: zj,
    insertCommand: au,
    queryParams: ["url"],
    matches: ["youtube"],
    priority: 1,
    shortcut: "/youtube [url]"
  },
  {
    section: "Embeds",
    label: "X (formerly Twitter)",
    desc: "/twitter [tweet url]",
    Icon: oTe,
    insertCommand: au,
    queryParams: ["url"],
    matches: ["twitter", "x"],
    priority: 2,
    shortcut: "/twitter [url]"
  },
  {
    section: "Embeds",
    label: "Vimeo",
    desc: "/vimeo [video url]",
    Icon: Bj,
    insertCommand: au,
    queryParams: ["url"],
    matches: ["vimeo"],
    priority: 4,
    shortcut: "/vimeo [url]"
  },
  {
    section: "Embeds",
    label: "CodePen",
    desc: "/codepen [pen url]",
    Icon: Tj,
    insertCommand: au,
    queryParams: ["url"],
    matches: ["codepen"],
    priority: 5,
    shortcut: "/codepen [url]"
  },
  {
    section: "Embeds",
    label: "Spotify",
    desc: "/spotify [track or playlist url]",
    Icon: jj,
    insertCommand: au,
    queryParams: ["url"],
    matches: ["spotify"],
    priority: 6,
    shortcut: "/spotify [url]"
  },
  {
    section: "Embeds",
    label: "SoundCloud",
    desc: "/soundcloud [track or playlist url]",
    Icon: Rj,
    insertCommand: au,
    queryParams: ["url"],
    matches: ["soundcloud"],
    priority: 7,
    shortcut: "/soundcloud [url]"
  }
]);
const Dq = (t) => new R2(t), l8e = ({ selectedNode: t, newNode: e }) => {
  const n = N.$isParagraphNode(t), i = t.getTextContent() === "";
  t.insertAfter(e), n && i && t.remove();
  const r = N.$createNodeSelection();
  if (r.add(e.getKey()), N.$setSelection(r), !e.getNextSibling()) {
    const s = N.$createParagraphNode();
    e.insertAfter(s);
  }
};
var os = {}, Jt = N, Ku = lt;
function ml(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
function Pq(t) {
  let e = 1;
  for (t = t.getParent(); t != null; ) {
    if (On(t)) {
      if (t = t.getParent(), Ft(t)) {
        e++, t = t.getParent();
        continue;
      }
      ml(40);
    }
    break;
  }
  return e;
}
function WC(t) {
  t = t.getParent(), Ft(t) || ml(40);
  let e = t;
  for (; e !== null; ) e = e.getParent(), Ft(e) && (t = e);
  return t;
}
function Iq(t) {
  let e = [];
  t = t.getChildren().filter(On);
  for (let n = 0; n < t.length; n++) {
    let i = t[n], r = i.getFirstChild();
    Ft(r) ? e = e.concat(Iq(r)) : e.push(i);
  }
  return e;
}
function pa(t) {
  return On(t) && Ft(t.getFirstChild());
}
function u8e(t) {
  for (; t.getNextSibling() == null && t.getPreviousSibling() == null; ) {
    let e = t.getParent();
    if (e == null || !On(t) && !Ft(t)) break;
    t = e;
  }
  t.remove();
}
function YP(t) {
  return Qs().append(t);
}
function Lq(t, e) {
  return On(t) && (e.length === 0 || e.length === 1 && t.is(e[0]) && t.getChildrenSize() === 0);
}
function kf(t, e) {
  t.splice(t.getChildrenSize(), 0, e);
}
function VP(t, e) {
  if (Ft(t)) return t;
  let n = t.getPreviousSibling(), i = t.getNextSibling(), r = Qs();
  return r.setFormat(t.getFormatType()), r.setIndent(t.getIndent()), kf(r, t.getChildren()), Ft(n) && e === n.getListType() ? (n.append(r), t.remove(), Ft(i) && e === i.getListType() && (kf(n, i.getChildren()), i.remove()), n) : Ft(i) && e === i.getListType() ? (i.getFirstChildOrThrow().insertBefore(r), t.remove(), i) : (e = Kr(e), e.append(r), t.replace(e), Qr(e), e);
}
function Rq(t, e) {
  var n = t.getLastChild();
  let i = e.getFirstChild();
  n && i && pa(n) && pa(i) && (Rq(n.getFirstChild(), i.getFirstChild()), i.remove()), n = e.getChildren(), 0 < n.length && (t.append(...n), Qr(t)), e.remove();
}
function Qr(t, e) {
  if (t = e || t.getChildren(), t !== void 0) for (e = 0; e < t.length; e++) {
    let s = t[e];
    if (On(s)) {
      let o = s.getValue();
      var n = s, i = n.getParent(), r = 1;
      for (i != null && (Ft(i) ? r = i.getStart() : ml(44)), n = n.getPreviousSiblings(), i = 0; i < n.length; i++) {
        let a = n[i];
        On(a) && !Ft(a.getFirstChild()) && r++;
      }
      o !== r && s.setValue(r);
    }
  }
}
function c8e(t) {
  if (!pa(t)) {
    var e = t.getParent(), n = e ? e.getParent() : void 0, i = n ? n.getParent() : void 0;
    if (Ft(i) && On(n) && Ft(e)) {
      var r = e ? e.getFirstChild() : void 0, s = e ? e.getLastChild() : void 0;
      if (t.is(r)) n.insertBefore(t), e.isEmpty() && n.remove();
      else if (t.is(s)) n.insertAfter(t), e.isEmpty() && n.remove();
      else {
        var o = e.getListType();
        r = Qs();
        let a = Kr(o);
        r.append(a), t.getPreviousSiblings().forEach((l) => a.append(l)), s = Qs(), o = Kr(o), s.append(o), kf(o, t.getNextSiblings()), n.insertBefore(r), n.insertAfter(s), n.replace(t);
      }
      Qr(e), Qr(i);
    }
  }
}
let j2 = class jq extends Jt.ElementNode {
  static getType() {
    return "listitem";
  }
  static clone(e) {
    return new jq(e.__value, e.__checked, e.__key);
  }
  constructor(e, n, i) {
    super(i), this.__value = e === void 0 ? 1 : e, this.__checked = n;
  }
  createDOM(e) {
    let n = document.createElement("li"), i = this.getParent();
    return Ft(i) && i.getListType() === "check" && GP(n, this, null), n.value = this.__value, XP(n, e.theme, this), n;
  }
  updateDOM(e, n, i) {
    let r = this.getParent();
    return Ft(r) && r.getListType() === "check" && GP(n, this, e), n.value = this.__value, XP(n, i.theme, this), !1;
  }
  static transform() {
    return (e) => {
      let n = e.getParent();
      Ft(n) && (Qr(n), On(e) || ml(144), n.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0));
    };
  }
  static importDOM() {
    return { li: () => ({ conversion: f8e, priority: 0 }) };
  }
  static importJSON(e) {
    let n = Qs();
    return n.setChecked(e.checked), n.setValue(e.value), n.setFormat(e.format), n.setDirection(e.direction), n;
  }
  exportDOM(e) {
    return e = this.createDOM(e._config), e.style.textAlign = this.getFormatType(), { element: e };
  }
  exportJSON() {
    return {
      ...super.exportJSON(),
      checked: this.getChecked(),
      type: "listitem",
      value: this.getValue(),
      version: 1
    };
  }
  append(...e) {
    for (let n = 0; n < e.length; n++) {
      let i = e[n];
      if (Jt.$isElementNode(i) && this.canMergeWith(i)) {
        let r = i.getChildren();
        this.append(...r), i.remove();
      } else super.append(i);
    }
    return this;
  }
  replace(e, n) {
    if (On(e)) return super.replace(e);
    this.setIndent(0);
    let i = this.getParentOrThrow();
    if (!Ft(i)) return e;
    if (i.__first === this.getKey()) i.insertBefore(e);
    else if (i.__last === this.getKey()) i.insertAfter(e);
    else {
      let r = Kr(i.getListType()), s = this.getNextSibling();
      for (; s; ) {
        let o = s;
        s = s.getNextSibling(), r.append(o);
      }
      i.insertAfter(e), e.insertAfter(r);
    }
    return n && (Jt.$isElementNode(e) || ml(139), this.getChildren().forEach((r) => {
      e.append(r);
    })), this.remove(), i.getChildrenSize() === 0 && i.remove(), e;
  }
  insertAfter(e, n = !0) {
    var i = this.getParentOrThrow();
    Ft(i) || ml(39);
    var r = this.getNextSiblings();
    if (On(e)) return n = super.insertAfter(e, n), e = e.getParentOrThrow(), Ft(e) && Qr(e), n;
    if (Ft(e)) {
      for (i = e, e = e.getChildren(), r = e.length - 1; 0 <= r; r--) i = e[r], this.insertAfter(i, n);
      return i;
    }
    if (i.insertAfter(e, n), r.length !== 0) {
      let s = Kr(i.getListType());
      r.forEach((o) => s.append(o)), e.insertAfter(s, n);
    }
    return e;
  }
  remove(e) {
    let n = this.getPreviousSibling(), i = this.getNextSibling();
    super.remove(e), n && i && pa(n) && pa(i) ? (Rq(n.getFirstChild(), i.getFirstChild()), i.remove()) : i && (e = i.getParent(), Ft(e) && Qr(e));
  }
  insertNewAfter(e, n = !0) {
    return e = Qs(this.__checked == null ? void 0 : !1), this.insertAfter(e, n), e;
  }
  collapseAtStart(e) {
    let n = Jt.$createParagraphNode();
    this.getChildren().forEach((o) => n.append(o));
    var i = this.getParentOrThrow(), r = i.getParentOrThrow();
    let s = On(r);
    return i.getChildrenSize() === 1 ? s ? (i.remove(), r.select()) : (i.insertBefore(n), i.remove(), i = e.anchor, e = e.focus, r = n.getKey(), i.type === "element" && i.getNode().is(this) && i.set(r, i.offset, "element"), e.type === "element" && e.getNode().is(this) && e.set(r, e.offset, "element")) : (i.insertBefore(n), this.remove()), !0;
  }
  getValue() {
    return this.getLatest().__value;
  }
  setValue(e) {
    this.getWritable().__value = e;
  }
  getChecked() {
    return this.getLatest().__checked;
  }
  setChecked(e) {
    this.getWritable().__checked = e;
  }
  toggleChecked() {
    this.setChecked(!this.__checked);
  }
  getIndent() {
    var e = this.getParent();
    if (e === null) return this.getLatest().__indent;
    e = e.getParentOrThrow();
    let n = 0;
    for (; On(e); ) e = e.getParentOrThrow().getParentOrThrow(), n++;
    return n;
  }
  setIndent(e) {
    typeof e == "number" && -1 < e || ml(117);
    let n = this.getIndent();
    for (; n !== e; ) if (n < e) {
      e: {
        var i = /* @__PURE__ */ new Set();
        if (pa(this) || i.has(this.getKey())) break e;
        let a = this.getParent();
        var r = this.getNextSibling(), s = this.getPreviousSibling();
        if (pa(r) && pa(s)) {
          if (s = s.getFirstChild(), Ft(s)) {
            s.append(this);
            var o = r.getFirstChild();
            Ft(o) && (o = o.getChildren(), kf(s, o), r.remove(), i.add(r.getKey())), Qr(s);
          }
        } else pa(r) ? (r = r.getFirstChild(), Ft(r) && (i = r.getFirstChild(), i !== null && i.insertBefore(this), Qr(r))) : pa(s) ? (r = s.getFirstChild(), Ft(r) && (r.append(this), Qr(r))) : Ft(a) && (i = Qs(), o = Kr(a.getListType()), i.append(o), o.append(this), s ? s.insertAfter(i) : r ? r.insertBefore(i) : a.append(i), Qr(o));
        Ft(a) && Qr(a);
      }
      n++;
    } else c8e(this), n--;
    return this;
  }
  insertBefore(e) {
    if (On(e)) {
      let n = this.getParentOrThrow();
      if (Ft(n)) {
        let i = this.getNextSiblings();
        Qr(n, i);
      }
    }
    return super.insertBefore(e);
  }
  canInsertAfter(e) {
    return On(e);
  }
  canReplaceWith(e) {
    return On(e);
  }
  canMergeWith(e) {
    return Jt.$isParagraphNode(e) || On(e);
  }
  extractWithChild(e, n) {
    if (!Jt.$isRangeSelection(n)) return !1;
    e = n.anchor.getNode();
    let i = n.focus.getNode();
    return this.isParentOf(e) && this.isParentOf(i) && this.getTextContent().length === n.getTextContent().length;
  }
  isParentRequired() {
    return !0;
  }
  createParentElementNode() {
    return Kr("bullet");
  }
};
function XP(t, e, n) {
  let i = [], r = [];
  var s = (e = e.list) ? e.listitem : void 0;
  if (e && e.nested) var o = e.nested.listitem;
  if (s !== void 0 && (s = s.split(" "), i.push(...s)), e) {
    s = n.getParent(), s = Ft(s) && s.getListType() === "check";
    let a = n.getChecked();
    s && !a || r.push(e.listitemUnchecked), s && a || r.push(e.listitemChecked), s && i.push(a ? e.listitemChecked : e.listitemUnchecked);
  }
  o !== void 0 && (o = o.split(" "), n.getChildren().some((a) => Ft(a)) ? i.push(...o) : r.push(...o)), 0 < r.length && Ku.removeClassNamesFromElement(t, ...r), 0 < i.length && Ku.addClassNamesToElement(
    t,
    ...i
  );
}
function GP(t, e, n) {
  Ft(e.getFirstChild()) ? (t.removeAttribute("role"), t.removeAttribute("tabIndex"), t.removeAttribute("aria-checked")) : (t.setAttribute("role", "checkbox"), t.setAttribute("tabIndex", "-1"), n && e.__checked === n.__checked || t.setAttribute("aria-checked", e.getChecked() ? "true" : "false"));
}
function f8e(t) {
  return t = Ku.isHTMLElement(t) && t.getAttribute("aria-checked") === "true", { node: Qs(t) };
}
function Qs(t) {
  return Jt.$applyNodeReplacement(new j2(void 0, t));
}
function On(t) {
  return t instanceof j2;
}
let fT = class Fq extends Jt.ElementNode {
  static getType() {
    return "list";
  }
  static clone(e) {
    return new Fq(e.__listType || eI[e.__tag], e.__start, e.__key);
  }
  constructor(e, n, i) {
    super(i), this.__listType = e = eI[e] || e, this.__tag = e === "number" ? "ol" : "ul", this.__start = n;
  }
  getTag() {
    return this.__tag;
  }
  setListType(e) {
    let n = this.getWritable();
    n.__listType = e, n.__tag = e === "number" ? "ol" : "ul";
  }
  getListType() {
    return this.__listType;
  }
  getStart() {
    return this.__start;
  }
  createDOM(e) {
    let n = document.createElement(this.__tag);
    return this.__start !== 1 && n.setAttribute(
      "start",
      String(this.__start)
    ), n.__lexicalListType = this.__listType, KP(n, e.theme, this), n;
  }
  updateDOM(e, n, i) {
    return e.__tag !== this.__tag ? !0 : (KP(n, i.theme, this), !1);
  }
  static importDOM() {
    return { ol: () => ({ conversion: JP, priority: 0 }), ul: () => ({ conversion: JP, priority: 0 }) };
  }
  static importJSON(e) {
    let n = Kr(e.listType, e.start);
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  exportDOM(e) {
    return { element: e } = super.exportDOM(e), e && Ku.isHTMLElement(e) && (this.__start !== 1 && e.setAttribute("start", String(this.__start)), this.__listType === "check" && e.setAttribute("__lexicalListType", "check")), { element: e };
  }
  exportJSON() {
    return { ...super.exportJSON(), listType: this.getListType(), start: this.getStart(), tag: this.getTag(), type: "list", version: 1 };
  }
  canBeEmpty() {
    return !1;
  }
  canIndent() {
    return !1;
  }
  append(...e) {
    for (let i = 0; i < e.length; i++) {
      var n = e[i];
      if (On(n)) super.append(n);
      else {
        let r = Qs();
        Ft(n) || Jt.$isElementNode(n) && (n = Jt.$createTextNode(n.getTextContent())), r.append(n), super.append(r);
      }
    }
    return Qr(this), this;
  }
  extractWithChild(e) {
    return On(e);
  }
};
function KP(t, e, n) {
  let i = [], r = [];
  var s = e.list;
  if (s !== void 0) {
    let a = s[`${n.__tag}Depth`] || [];
    e = Pq(n) - 1;
    let l = e % a.length;
    var o = a[l];
    let u = s[n.__tag], f, d = s.nested;
    if (s = s.checklist, d !== void 0 && d.list && (f = d.list), u !== void 0 && i.push(u), s !== void 0 && n.__listType === "check" && i.push(s), o !== void 0) for (o = o.split(" "), i.push(...o), o = 0; o < a.length; o++) o !== l && r.push(n.__tag + o);
    f !== void 0 && (n = f.split(" "), 1 < e ? i.push(...n) : r.push(...n));
  }
  0 < r.length && Ku.removeClassNamesFromElement(t, ...r), 0 < i.length && Ku.addClassNamesToElement(
    t,
    ...i
  );
}
function d8e(t) {
  let e = [];
  for (let i = 0; i < t.length; i++) {
    var n = t[i];
    On(n) ? (e.push(n), n = n.getChildren(), 1 < n.length && n.forEach((r) => {
      Ft(r) && e.push(YP(r));
    })) : e.push(YP(n));
  }
  return e;
}
function JP(t) {
  let e = t.nodeName.toLowerCase(), n = null;
  return e === "ol" ? n = Kr("number", t.start) : e === "ul" && (n = Ku.isHTMLElement(t) && t.getAttribute("__lexicallisttype") === "check" ? Kr("check") : Kr("bullet")), { after: d8e, node: n };
}
let eI = { ol: "number", ul: "bullet" };
function Kr(t, e = 1) {
  return Jt.$applyNodeReplacement(new fT(t, e));
}
function Ft(t) {
  return t instanceof fT;
}
let h8e = Jt.createCommand("INSERT_UNORDERED_LIST_COMMAND"), p8e = Jt.createCommand("INSERT_ORDERED_LIST_COMMAND"), m8e = Jt.createCommand("INSERT_CHECK_LIST_COMMAND"), g8e = Jt.createCommand("REMOVE_LIST_COMMAND");
os.$createListItemNode = Qs;
os.$createListNode = Kr;
os.$getListDepth = Pq;
os.$handleListInsertParagraph = function() {
  var t = Jt.$getSelection();
  if (!Jt.$isRangeSelection(t) || !t.isCollapsed() || (t = t.anchor.getNode(), !On(t) || t.getChildrenSize() !== 0)) return !1;
  var e = WC(t), n = t.getParent();
  Ft(n) || ml(40);
  let i = n.getParent(), r;
  if (Jt.$isRootOrShadowRoot(i)) r = Jt.$createParagraphNode(), e.insertAfter(r);
  else if (On(i)) r = Qs(), i.insertAfter(r);
  else return !1;
  if (r.select(), e = t.getNextSiblings(), 0 < e.length) {
    let s = Kr(n.getListType());
    Jt.$isParagraphNode(r) ? r.insertAfter(s) : (n = Qs(), n.append(s), r.insertAfter(n)), e.forEach((o) => {
      o.remove(), s.append(o);
    });
  }
  return u8e(t), !0;
};
os.$isListItemNode = On;
os.$isListNode = Ft;
os.INSERT_CHECK_LIST_COMMAND = m8e;
os.INSERT_ORDERED_LIST_COMMAND = p8e;
os.INSERT_UNORDERED_LIST_COMMAND = h8e;
os.ListItemNode = j2;
os.ListNode = fT;
os.REMOVE_LIST_COMMAND = g8e;
os.insertList = function(t, e) {
  t.update(() => {
    var n = Jt.$getSelection();
    if (n !== null) {
      var i = n.getNodes();
      n = n.getStartEndPoints(), n === null && ml(143), [n] = n, n = n.getNode();
      var r = n.getParent();
      if (Lq(n, i)) i = Kr(e), Jt.$isRootOrShadowRoot(r) ? (n.replace(i), r = Qs(), Jt.$isElementNode(n) && (r.setFormat(n.getFormatType()), r.setIndent(n.getIndent())), i.append(r)) : On(n) && (n = n.getParentOrThrow(), kf(i, n.getChildren()), n.replace(i));
      else for (n = /* @__PURE__ */ new Set(), r = 0; r < i.length; r++) {
        var s = i[r];
        if (Jt.$isElementNode(s) && s.isEmpty() && !On(s) && !n.has(s.getKey())) VP(
          s,
          e
        );
        else if (Jt.$isLeafNode(s)) for (s = s.getParent(); s != null; ) {
          let a = s.getKey();
          if (Ft(s)) {
            if (!n.has(a)) {
              var o = Kr(e);
              kf(o, s.getChildren()), s.replace(o), Qr(o), n.add(a);
            }
            break;
          } else {
            if (o = s.getParent(), Jt.$isRootOrShadowRoot(o) && !n.has(a)) {
              n.add(a), VP(s, e);
              break;
            }
            s = o;
          }
        }
      }
    }
  });
};
os.removeList = function(t) {
  t.update(() => {
    let e = Jt.$getSelection();
    if (Jt.$isRangeSelection(e)) {
      var n = /* @__PURE__ */ new Set(), i = e.getNodes(), r = e.anchor.getNode();
      if (Lq(r, i)) n.add(WC(r));
      else for (r = 0; r < i.length; r++) {
        var s = i[r];
        Jt.$isLeafNode(s) && (s = Ku.$getNearestNodeOfType(s, j2), s != null && n.add(WC(s)));
      }
      for (let o of n) {
        n = o, i = Iq(o);
        for (let a of i) i = Jt.$createParagraphNode(), kf(i, a.getChildren()), n.insertAfter(i), n = i, a.__key === e.anchor.key && e.anchor.set(i.getKey(), 0, "element"), a.__key === e.focus.key && e.focus.set(i.getKey(), 0, "element"), a.remove();
        o.remove();
      }
    }
  });
};
const v8e = os;
var ni = v8e;
function tI(t) {
  let [e] = t.getNodes();
  N.$isTextNode(e) && (e = e.getParent());
  let n = e.getTopLevelElement();
  if (ni.$isListItemNode(e) && n !== e.getParent())
    return !1;
  const i = e.getIndexWithinParent(), r = n ? n.getIndexWithinParent() : void 0;
  return i === 0 && r === 0 && t.anchor.offset === 0 && t.focus.offset === 0;
}
function xr(t) {
  const e = N.$createNodeSelection();
  e.add(t.getKey()), N.$setSelection(e);
}
function Bq(t) {
  return t.nodeType === Node.TEXT_NODE && (t = t.parentNode), t.closest("[data-lexical-editor] > *");
}
function nI(t, e = 10) {
  const i = t.getRangeAt(0).cloneRange().getClientRects();
  if (i.length > 0) {
    const r = i[1] || i[0], o = Bq(t.anchorNode).getBoundingClientRect();
    return Math.abs(r.top - o.top) <= e;
  }
}
const b8e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M8.2 5 1 12l7.2 7m7.6-14 7.2 7-7.2 7" }));
function y8e({ darkMode: t, html: e, updateHtml: n }) {
  const i = j.useCallback((d) => {
    n(d);
  }, [n]), r = Te.theme({
    "&.cm-editor": {
      background: "transparent"
    },
    "&.cm-focused": {
      outline: "0"
    },
    "&.cm-editor .cm-content": {
      padding: "7px 0"
    },
    "&.cm-editor .cm-content, &.cm-editor .cm-gutter": {
      minHeight: "170px"
    },
    "&.cm-editor .cm-scroller": {
      overflow: "auto"
    },
    "&.cm-editor .cm-gutters": {
      background: "none",
      border: "none",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      color: "#CED4D9",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-lineNumbers": {
      padding: "0"
    },
    "&.cm-editor .cm-foldGutter": {
      width: "0"
    },
    "&.cm-editor .cm-line": {
      padding: "0 .8rem",
      color: "#394047",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      fontSize: "1.6rem",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter": {
      background: "none"
    },
    "&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor": {
      borderLeft: "1.2px solid black"
    }
  }), s = Te.theme({
    "&.cm-editor": {
      background: "transparent"
    },
    "&.cm-focused": {
      outline: "0"
    },
    "&.cm-editor .cm-content": {
      padding: "7px 0"
    },
    "&.cm-editor .cm-content, &.cm-editor .cm-gutter": {
      minHeight: "170px"
    },
    "&.cm-editor .cm-scroller": {
      overflow: "auto"
    },
    "&.cm-editor .cm-gutters": {
      background: "none",
      border: "none",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      color: "rgb(108, 118, 127);",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-lineNumbers": {
      padding: "0"
    },
    "&.cm-editor .cm-foldGutter": {
      width: "0"
    },
    "&.cm-editor .cm-line": {
      padding: "0 .8rem",
      color: "rgb(210, 215, 218)",
      fontFamily: "Consolas,Liberation Mono,Menlo,Courier,monospace;",
      fontSize: "1.6rem",
      lineHeight: "2.25rem"
    },
    "&.cm-editor .cm-activeLine, &.cm-editor .cm-activeLineGutter": {
      background: "none"
    },
    "&.cm-editor .cm-cursor, &.cm-editor .cm-dropCursor": {
      borderLeft: "1.2px solid white"
    }
  }), o = Tl.define([
    { tag: X.keyword, color: "#5A5CAD" },
    { tag: X.atom, color: "#6C8CD5" },
    { tag: X.number, color: "#116644" },
    { tag: X.definition(X.variableName), textDecoration: "underline" },
    { tag: X.variableName, color: "black" },
    { tag: X.comment, color: "#0080FF", fontStyle: "italic", background: "rgba(0,0,0,.05)" },
    { tag: [X.string, X.special(X.brace)], color: "#183691" },
    { tag: X.meta, color: "yellow" },
    { tag: X.bracket, color: "#63a35c" },
    { tag: X.tagName, color: "#63a35c" },
    { tag: X.attributeName, color: "#795da3" }
  ]), a = Tl.define([
    { tag: X.keyword, color: "#795da3" },
    { tag: X.atom, color: "#6C8CD5" },
    { tag: X.number, color: "#63a35c" },
    { tag: X.definition(X.variableName), textDecoration: "underline" },
    { tag: X.variableName, color: "white" },
    { tag: X.comment, color: "#0080FF", fontStyle: "italic", background: "rgba(0,0,0,.05)" },
    { tag: [X.string, X.special(X.brace)], color: "rgb(72, 110, 225)" },
    { tag: X.meta, color: "yellow" },
    { tag: X.bracket, color: "#63a35c" },
    { tag: X.tagName, color: "#63a35c" },
    { tag: X.attributeName, color: "#795da3" },
    { tag: [X.className, X.propertyName], color: "rgb(72, 110, 225)" }
  ]), l = t ? s : r, u = t ? a : o, f = [
    Te.lineWrapping,
    // wraps lines that exceed the viewport width
    z1(u),
    // customizes syntax highlighting rules
    l,
    _E(),
    // adds line numbers to the gutter
    GU({ defaultKeymap: !1, history: !1 }),
    // disable defaultKeymap to prevent Mod+Enter from inserting new line
    Cl.of(HU),
    // required for quote completion; needs to be listed before standardKeymap
    Cl.of(IE),
    // add back in standardKeymap, which doesn't include Mod+Enter
    cq(),
    BU(),
    // adds undo/redo functionality with custom behaviour to make tests faster
    x2({
      joinToEvent: void 0
    })
  ];
  return /* @__PURE__ */ y.jsx("div", { className: "not-kg-prose min-h-[170px]", children: /* @__PURE__ */ y.jsx(
    UE,
    {
      autoFocus: !0,
      basicSetup: !1,
      extensions: f,
      value: e,
      onChange: i
    }
  ) });
}
/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
const {
  entries: zq,
  setPrototypeOf: iI,
  isFrozen: w8e,
  getPrototypeOf: k8e,
  getOwnPropertyDescriptor: x8e
} = Object;
let {
  freeze: is,
  seal: go,
  create: HC
} = Object, {
  apply: QC,
  construct: UC
} = typeof Reflect < "u" && Reflect;
is || (is = function(e) {
  return e;
});
go || (go = function(e) {
  return e;
});
QC || (QC = function(e, n) {
  for (var i = arguments.length, r = new Array(i > 2 ? i - 2 : 0), s = 2; s < i; s++)
    r[s - 2] = arguments[s];
  return e.apply(n, r);
});
UC || (UC = function(e) {
  for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
    i[r - 1] = arguments[r];
  return new e(...i);
});
const Db = rs(Array.prototype.forEach), _8e = rs(Array.prototype.lastIndexOf), rI = rs(Array.prototype.pop), Lm = rs(Array.prototype.push), O8e = rs(Array.prototype.splice), xy = rs(String.prototype.toLowerCase), NO = rs(String.prototype.toString), AO = rs(String.prototype.match), Rm = rs(String.prototype.replace), S8e = rs(String.prototype.indexOf), C8e = rs(String.prototype.trim), Ao = rs(Object.prototype.hasOwnProperty), Hr = rs(RegExp.prototype.test), jm = E8e(TypeError);
function rs(t) {
  return function(e) {
    e instanceof RegExp && (e.lastIndex = 0);
    for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
      i[r - 1] = arguments[r];
    return QC(t, e, i);
  };
}
function E8e(t) {
  return function() {
    for (var e = arguments.length, n = new Array(e), i = 0; i < e; i++)
      n[i] = arguments[i];
    return UC(t, n);
  };
}
function Rt(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : xy;
  iI && iI(t, null);
  let i = e.length;
  for (; i--; ) {
    let r = e[i];
    if (typeof r == "string") {
      const s = n(r);
      s !== r && (w8e(e) || (e[i] = s), r = s);
    }
    t[r] = !0;
  }
  return t;
}
function T8e(t) {
  for (let e = 0; e < t.length; e++)
    Ao(t, e) || (t[e] = null);
  return t;
}
function ll(t) {
  const e = HC(null);
  for (const [n, i] of zq(t))
    Ao(t, n) && (Array.isArray(i) ? e[n] = T8e(i) : i && typeof i == "object" && i.constructor === Object ? e[n] = ll(i) : e[n] = i);
  return e;
}
function Fm(t, e) {
  for (; t !== null; ) {
    const i = x8e(t, e);
    if (i) {
      if (i.get)
        return rs(i.get);
      if (typeof i.value == "function")
        return rs(i.value);
    }
    t = k8e(t);
  }
  function n() {
    return null;
  }
  return n;
}
const sI = is(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), DO = is(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), PO = is(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), $8e = is(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), IO = is(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), M8e = is(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), oI = is(["#text"]), aI = is(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), LO = is(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), lI = is(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Pb = is(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), N8e = go(/\{\{[\w\W]*|[\w\W]*\}\}/gm), A8e = go(/<%[\w\W]*|[\w\W]*%>/gm), D8e = go(/\$\{[\w\W]*/gm), P8e = go(/^data-[\-\w.\u00B7-\uFFFF]+$/), I8e = go(/^aria-[\-\w]+$/), Wq = go(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), L8e = go(/^(?:\w+script|data):/i), R8e = go(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), Hq = go(/^html$/i), j8e = go(/^[a-z][.\w]*(-[.\w]+)+$/i);
var uI = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  ARIA_ATTR: I8e,
  ATTR_WHITESPACE: R8e,
  CUSTOM_ELEMENT: j8e,
  DATA_ATTR: P8e,
  DOCTYPE_NAME: Hq,
  ERB_EXPR: A8e,
  IS_ALLOWED_URI: Wq,
  IS_SCRIPT_OR_DATA: L8e,
  MUSTACHE_EXPR: N8e,
  TMPLIT_EXPR: D8e
});
const Bm = {
  element: 1,
  text: 3,
  // Deprecated
  progressingInstruction: 7,
  comment: 8,
  document: 9
}, F8e = function() {
  return typeof window > "u" ? null : window;
}, B8e = function(e, n) {
  if (typeof e != "object" || typeof e.createPolicy != "function")
    return null;
  let i = null;
  const r = "data-tt-policy-suffix";
  n && n.hasAttribute(r) && (i = n.getAttribute(r));
  const s = "dompurify" + (i ? "#" + i : "");
  try {
    return e.createPolicy(s, {
      createHTML(o) {
        return o;
      },
      createScriptURL(o) {
        return o;
      }
    });
  } catch {
    return console.warn("TrustedTypes policy " + s + " could not be created."), null;
  }
}, cI = function() {
  return {
    afterSanitizeAttributes: [],
    afterSanitizeElements: [],
    afterSanitizeShadowDOM: [],
    beforeSanitizeAttributes: [],
    beforeSanitizeElements: [],
    beforeSanitizeShadowDOM: [],
    uponSanitizeAttribute: [],
    uponSanitizeElement: [],
    uponSanitizeShadowNode: []
  };
};
function Qq() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : F8e();
  const e = (Ke) => Qq(Ke);
  if (e.version = "3.3.0", e.removed = [], !t || !t.document || t.document.nodeType !== Bm.document || !t.Element)
    return e.isSupported = !1, e;
  let {
    document: n
  } = t;
  const i = n, r = i.currentScript, {
    DocumentFragment: s,
    HTMLTemplateElement: o,
    Node: a,
    Element: l,
    NodeFilter: u,
    NamedNodeMap: f = t.NamedNodeMap || t.MozNamedAttrMap,
    HTMLFormElement: d,
    DOMParser: h,
    trustedTypes: m
  } = t, g = l.prototype, w = Fm(g, "cloneNode"), x = Fm(g, "remove"), _ = Fm(g, "nextSibling"), S = Fm(g, "childNodes"), C = Fm(g, "parentNode");
  if (typeof o == "function") {
    const Ke = n.createElement("template");
    Ke.content && Ke.content.ownerDocument && (n = Ke.content.ownerDocument);
  }
  let E, M = "";
  const {
    implementation: $,
    createNodeIterator: P,
    createDocumentFragment: W,
    getElementsByTagName: z
  } = n, {
    importNode: Z
  } = i;
  let L = cI();
  e.isSupported = typeof zq == "function" && typeof C == "function" && $ && $.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: Q,
    ERB_EXPR: V,
    TMPLIT_EXPR: H,
    DATA_ATTR: R,
    ARIA_ATTR: q,
    IS_SCRIPT_OR_DATA: Y,
    ATTR_WHITESPACE: K,
    CUSTOM_ELEMENT: te
  } = uI;
  let {
    IS_ALLOWED_URI: se
  } = uI, ce = null;
  const U = Rt({}, [...sI, ...DO, ...PO, ...IO, ...oI]);
  let F = null;
  const oe = Rt({}, [...aI, ...LO, ...lI, ...Pb]);
  let le = Object.seal(HC(null, {
    tagNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    attributeNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    allowCustomizedBuiltInElements: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: !1
    }
  })), pe = null, Re = null;
  const ze = Object.seal(HC(null, {
    tagCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    attributeCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    }
  }));
  let rt = !0, pt = !0, ge = !1, De = !0, st = !1, It = !0, At = !1, Ut = !1, He = !1, Ct = !1, Lt = !1, Be = !1, Ie = !0, ae = !1;
  const Ue = "user-content-";
  let qt = !0, Xn = !1, Dt = {}, vn = null;
  const Os = Rt({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
  let Za = null;
  const qa = Rt({}, ["audio", "video", "img", "source", "image", "track"]);
  let Xf = null;
  const Ql = Rt({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Gf = "http://www.w3.org/1998/Math/MathML", Jo = "http://www.w3.org/2000/svg", Rr = "http://www.w3.org/1999/xhtml";
  let Ul = Rr, Ss = !1, Kf = null;
  const tt = Rt({}, [Gf, Jo, Rr], NO);
  let Zl = Rt({}, ["mi", "mo", "mn", "ms", "mtext"]), Fi = Rt({}, ["annotation-xml"]);
  const Fn = Rt({}, ["title", "style", "font", "a", "script"]);
  let bn = null;
  const iv = ["application/xhtml+xml", "text/html"], us = "text/html";
  let yn = null, Gn = null;
  const rv = n.createElement("form"), Jf = function(ne) {
    return ne instanceof RegExp || ne instanceof Function;
  }, Ya = function() {
    let ne = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    if (!(Gn && Gn === ne)) {
      if ((!ne || typeof ne != "object") && (ne = {}), ne = ll(ne), bn = // eslint-disable-next-line unicorn/prefer-includes
      iv.indexOf(ne.PARSER_MEDIA_TYPE) === -1 ? us : ne.PARSER_MEDIA_TYPE, yn = bn === "application/xhtml+xml" ? NO : xy, ce = Ao(ne, "ALLOWED_TAGS") ? Rt({}, ne.ALLOWED_TAGS, yn) : U, F = Ao(ne, "ALLOWED_ATTR") ? Rt({}, ne.ALLOWED_ATTR, yn) : oe, Kf = Ao(ne, "ALLOWED_NAMESPACES") ? Rt({}, ne.ALLOWED_NAMESPACES, NO) : tt, Xf = Ao(ne, "ADD_URI_SAFE_ATTR") ? Rt(ll(Ql), ne.ADD_URI_SAFE_ATTR, yn) : Ql, Za = Ao(ne, "ADD_DATA_URI_TAGS") ? Rt(ll(qa), ne.ADD_DATA_URI_TAGS, yn) : qa, vn = Ao(ne, "FORBID_CONTENTS") ? Rt({}, ne.FORBID_CONTENTS, yn) : Os, pe = Ao(ne, "FORBID_TAGS") ? Rt({}, ne.FORBID_TAGS, yn) : ll({}), Re = Ao(ne, "FORBID_ATTR") ? Rt({}, ne.FORBID_ATTR, yn) : ll({}), Dt = Ao(ne, "USE_PROFILES") ? ne.USE_PROFILES : !1, rt = ne.ALLOW_ARIA_ATTR !== !1, pt = ne.ALLOW_DATA_ATTR !== !1, ge = ne.ALLOW_UNKNOWN_PROTOCOLS || !1, De = ne.ALLOW_SELF_CLOSE_IN_ATTR !== !1, st = ne.SAFE_FOR_TEMPLATES || !1, It = ne.SAFE_FOR_XML !== !1, At = ne.WHOLE_DOCUMENT || !1, Ct = ne.RETURN_DOM || !1, Lt = ne.RETURN_DOM_FRAGMENT || !1, Be = ne.RETURN_TRUSTED_TYPE || !1, He = ne.FORCE_BODY || !1, Ie = ne.SANITIZE_DOM !== !1, ae = ne.SANITIZE_NAMED_PROPS || !1, qt = ne.KEEP_CONTENT !== !1, Xn = ne.IN_PLACE || !1, se = ne.ALLOWED_URI_REGEXP || Wq, Ul = ne.NAMESPACE || Rr, Zl = ne.MATHML_TEXT_INTEGRATION_POINTS || Zl, Fi = ne.HTML_INTEGRATION_POINTS || Fi, le = ne.CUSTOM_ELEMENT_HANDLING || {}, ne.CUSTOM_ELEMENT_HANDLING && Jf(ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (le.tagNameCheck = ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck), ne.CUSTOM_ELEMENT_HANDLING && Jf(ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (le.attributeNameCheck = ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), ne.CUSTOM_ELEMENT_HANDLING && typeof ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (le.allowCustomizedBuiltInElements = ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), st && (pt = !1), Lt && (Ct = !0), Dt && (ce = Rt({}, oI), F = [], Dt.html === !0 && (Rt(ce, sI), Rt(F, aI)), Dt.svg === !0 && (Rt(ce, DO), Rt(F, LO), Rt(F, Pb)), Dt.svgFilters === !0 && (Rt(ce, PO), Rt(F, LO), Rt(F, Pb)), Dt.mathMl === !0 && (Rt(ce, IO), Rt(F, lI), Rt(F, Pb))), ne.ADD_TAGS && (typeof ne.ADD_TAGS == "function" ? ze.tagCheck = ne.ADD_TAGS : (ce === U && (ce = ll(ce)), Rt(ce, ne.ADD_TAGS, yn))), ne.ADD_ATTR && (typeof ne.ADD_ATTR == "function" ? ze.attributeCheck = ne.ADD_ATTR : (F === oe && (F = ll(F)), Rt(F, ne.ADD_ATTR, yn))), ne.ADD_URI_SAFE_ATTR && Rt(Xf, ne.ADD_URI_SAFE_ATTR, yn), ne.FORBID_CONTENTS && (vn === Os && (vn = ll(vn)), Rt(vn, ne.FORBID_CONTENTS, yn)), qt && (ce["#text"] = !0), At && Rt(ce, ["html", "head", "body"]), ce.table && (Rt(ce, ["tbody"]), delete pe.tbody), ne.TRUSTED_TYPES_POLICY) {
        if (typeof ne.TRUSTED_TYPES_POLICY.createHTML != "function")
          throw jm('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
        if (typeof ne.TRUSTED_TYPES_POLICY.createScriptURL != "function")
          throw jm('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
        E = ne.TRUSTED_TYPES_POLICY, M = E.createHTML("");
      } else
        E === void 0 && (E = B8e(m, r)), E !== null && typeof M == "string" && (M = E.createHTML(""));
      is && is(ne), Gn = ne;
    }
  }, ed = Rt({}, [...DO, ...PO, ...$8e]), Mp = Rt({}, [...IO, ...M8e]), r_ = function(ne) {
    let _e = C(ne);
    (!_e || !_e.tagName) && (_e = {
      namespaceURI: Ul,
      tagName: "template"
    });
    const je = xy(ne.tagName), an = xy(_e.tagName);
    return Kf[ne.namespaceURI] ? ne.namespaceURI === Jo ? _e.namespaceURI === Rr ? je === "svg" : _e.namespaceURI === Gf ? je === "svg" && (an === "annotation-xml" || Zl[an]) : !!ed[je] : ne.namespaceURI === Gf ? _e.namespaceURI === Rr ? je === "math" : _e.namespaceURI === Jo ? je === "math" && Fi[an] : !!Mp[je] : ne.namespaceURI === Rr ? _e.namespaceURI === Jo && !Fi[an] || _e.namespaceURI === Gf && !Zl[an] ? !1 : !Mp[je] && (Fn[je] || !ed[je]) : !!(bn === "application/xhtml+xml" && Kf[ne.namespaceURI]) : !1;
  }, cs = function(ne) {
    Lm(e.removed, {
      element: ne
    });
    try {
      C(ne).removeChild(ne);
    } catch {
      x(ne);
    }
  }, Va = function(ne, _e) {
    try {
      Lm(e.removed, {
        attribute: _e.getAttributeNode(ne),
        from: _e
      });
    } catch {
      Lm(e.removed, {
        attribute: null,
        from: _e
      });
    }
    if (_e.removeAttribute(ne), ne === "is")
      if (Ct || Lt)
        try {
          cs(_e);
        } catch {
        }
      else
        try {
          _e.setAttribute(ne, "");
        } catch {
        }
  }, td = function(ne) {
    let _e = null, je = null;
    if (He)
      ne = "<remove></remove>" + ne;
    else {
      const An = AO(ne, /^[\r\n\t ]+/);
      je = An && An[0];
    }
    bn === "application/xhtml+xml" && Ul === Rr && (ne = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + ne + "</body></html>");
    const an = E ? E.createHTML(ne) : ne;
    if (Ul === Rr)
      try {
        _e = new h().parseFromString(an, bn);
      } catch {
      }
    if (!_e || !_e.documentElement) {
      _e = $.createDocument(Ul, "template", null);
      try {
        _e.documentElement.innerHTML = Ss ? M : an;
      } catch {
      }
    }
    const Nn = _e.body || _e.documentElement;
    return ne && je && Nn.insertBefore(n.createTextNode(je), Nn.childNodes[0] || null), Ul === Rr ? z.call(_e, At ? "html" : "body")[0] : At ? _e.documentElement : Nn;
  }, sv = function(ne) {
    return P.call(
      ne.ownerDocument || ne,
      ne,
      // eslint-disable-next-line no-bitwise
      u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION,
      null
    );
  }, yc = function(ne) {
    return ne instanceof d && (typeof ne.nodeName != "string" || typeof ne.textContent != "string" || typeof ne.removeChild != "function" || !(ne.attributes instanceof f) || typeof ne.removeAttribute != "function" || typeof ne.setAttribute != "function" || typeof ne.namespaceURI != "string" || typeof ne.insertBefore != "function" || typeof ne.hasChildNodes != "function");
  }, ov = function(ne) {
    return typeof a == "function" && ne instanceof a;
  };
  function Oo(Ke, ne, _e) {
    Db(Ke, (je) => {
      je.call(e, ne, _e, Gn);
    });
  }
  const nd = function(ne) {
    let _e = null;
    if (Oo(L.beforeSanitizeElements, ne, null), yc(ne))
      return cs(ne), !0;
    const je = yn(ne.nodeName);
    if (Oo(L.uponSanitizeElement, ne, {
      tagName: je,
      allowedTags: ce
    }), It && ne.hasChildNodes() && !ov(ne.firstElementChild) && Hr(/<[/\w!]/g, ne.innerHTML) && Hr(/<[/\w!]/g, ne.textContent) || ne.nodeType === Bm.progressingInstruction || It && ne.nodeType === Bm.comment && Hr(/<[/\w]/g, ne.data))
      return cs(ne), !0;
    if (!(ze.tagCheck instanceof Function && ze.tagCheck(je)) && (!ce[je] || pe[je])) {
      if (!pe[je] && id(je) && (le.tagNameCheck instanceof RegExp && Hr(le.tagNameCheck, je) || le.tagNameCheck instanceof Function && le.tagNameCheck(je)))
        return !1;
      if (qt && !vn[je]) {
        const an = C(ne) || ne.parentNode, Nn = S(ne) || ne.childNodes;
        if (Nn && an) {
          const An = Nn.length;
          for (let Ji = An - 1; Ji >= 0; --Ji) {
            const Yt = w(Nn[Ji], !0);
            Yt.__removalCount = (ne.__removalCount || 0) + 1, an.insertBefore(Yt, _(ne));
          }
        }
      }
      return cs(ne), !0;
    }
    return ne instanceof l && !r_(ne) || (je === "noscript" || je === "noembed" || je === "noframes") && Hr(/<\/no(script|embed|frames)/i, ne.innerHTML) ? (cs(ne), !0) : (st && ne.nodeType === Bm.text && (_e = ne.textContent, Db([Q, V, H], (an) => {
      _e = Rm(_e, an, " ");
    }), ne.textContent !== _e && (Lm(e.removed, {
      element: ne.cloneNode()
    }), ne.textContent = _e)), Oo(L.afterSanitizeElements, ne, null), !1);
  }, av = function(ne, _e, je) {
    if (Ie && (_e === "id" || _e === "name") && (je in n || je in rv))
      return !1;
    if (!(pt && !Re[_e] && Hr(R, _e))) {
      if (!(rt && Hr(q, _e))) {
        if (!(ze.attributeCheck instanceof Function && ze.attributeCheck(_e, ne))) {
          if (!F[_e] || Re[_e]) {
            if (
              // First condition does a very basic check if a) it's basically a valid custom element tagname AND
              // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
              // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
              !(id(ne) && (le.tagNameCheck instanceof RegExp && Hr(le.tagNameCheck, ne) || le.tagNameCheck instanceof Function && le.tagNameCheck(ne)) && (le.attributeNameCheck instanceof RegExp && Hr(le.attributeNameCheck, _e) || le.attributeNameCheck instanceof Function && le.attributeNameCheck(_e, ne)) || // Alternative, second condition checks if it's an `is`-attribute, AND
              // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
              _e === "is" && le.allowCustomizedBuiltInElements && (le.tagNameCheck instanceof RegExp && Hr(le.tagNameCheck, je) || le.tagNameCheck instanceof Function && le.tagNameCheck(je)))
            ) return !1;
          } else if (!Xf[_e]) {
            if (!Hr(se, Rm(je, K, ""))) {
              if (!((_e === "src" || _e === "xlink:href" || _e === "href") && ne !== "script" && S8e(je, "data:") === 0 && Za[ne])) {
                if (!(ge && !Hr(Y, Rm(je, K, "")))) {
                  if (je)
                    return !1;
                }
              }
            }
          }
        }
      }
    }
    return !0;
  }, id = function(ne) {
    return ne !== "annotation-xml" && AO(ne, te);
  }, Xa = function(ne) {
    Oo(L.beforeSanitizeAttributes, ne, null);
    const {
      attributes: _e
    } = ne;
    if (!_e || yc(ne))
      return;
    const je = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: F,
      forceKeepAttr: void 0
    };
    let an = _e.length;
    for (; an--; ) {
      const Nn = _e[an], {
        name: An,
        namespaceURI: Ji,
        value: Yt
      } = Nn, Fe = yn(An), So = Yt;
      let ui = An === "value" ? So : C8e(So);
      if (je.attrName = Fe, je.attrValue = ui, je.keepAttr = !0, je.forceKeepAttr = void 0, Oo(L.uponSanitizeAttribute, ne, je), ui = je.attrValue, ae && (Fe === "id" || Fe === "name") && (Va(An, ne), ui = Ue + ui), It && Hr(/((--!?|])>)|<\/(style|title|textarea)/i, ui)) {
        Va(An, ne);
        continue;
      }
      if (Fe === "attributename" && AO(ui, "href")) {
        Va(An, ne);
        continue;
      }
      if (je.forceKeepAttr)
        continue;
      if (!je.keepAttr) {
        Va(An, ne);
        continue;
      }
      if (!De && Hr(/\/>/i, ui)) {
        Va(An, ne);
        continue;
      }
      st && Db([Q, V, H], (Wt) => {
        ui = Rm(ui, Wt, " ");
      });
      const Cs = yn(ne.nodeName);
      if (!av(Cs, Fe, ui)) {
        Va(An, ne);
        continue;
      }
      if (E && typeof m == "object" && typeof m.getAttributeType == "function" && !Ji)
        switch (m.getAttributeType(Cs, Fe)) {
          case "TrustedHTML": {
            ui = E.createHTML(ui);
            break;
          }
          case "TrustedScriptURL": {
            ui = E.createScriptURL(ui);
            break;
          }
        }
      if (ui !== So)
        try {
          Ji ? ne.setAttributeNS(Ji, An, ui) : ne.setAttribute(An, ui), yc(ne) ? cs(ne) : rI(e.removed);
        } catch {
          Va(An, ne);
        }
    }
    Oo(L.afterSanitizeAttributes, ne, null);
  }, s_ = function Ke(ne) {
    let _e = null;
    const je = sv(ne);
    for (Oo(L.beforeSanitizeShadowDOM, ne, null); _e = je.nextNode(); )
      Oo(L.uponSanitizeShadowNode, _e, null), nd(_e), Xa(_e), _e.content instanceof s && Ke(_e.content);
    Oo(L.afterSanitizeShadowDOM, ne, null);
  };
  return e.sanitize = function(Ke) {
    let ne = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _e = null, je = null, an = null, Nn = null;
    if (Ss = !Ke, Ss && (Ke = "<!-->"), typeof Ke != "string" && !ov(Ke))
      if (typeof Ke.toString == "function") {
        if (Ke = Ke.toString(), typeof Ke != "string")
          throw jm("dirty is not a string, aborting");
      } else
        throw jm("toString is not a function");
    if (!e.isSupported)
      return Ke;
    if (Ut || Ya(ne), e.removed = [], typeof Ke == "string" && (Xn = !1), Xn) {
      if (Ke.nodeName) {
        const Yt = yn(Ke.nodeName);
        if (!ce[Yt] || pe[Yt])
          throw jm("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (Ke instanceof a)
      _e = td("<!---->"), je = _e.ownerDocument.importNode(Ke, !0), je.nodeType === Bm.element && je.nodeName === "BODY" || je.nodeName === "HTML" ? _e = je : _e.appendChild(je);
    else {
      if (!Ct && !st && !At && // eslint-disable-next-line unicorn/prefer-includes
      Ke.indexOf("<") === -1)
        return E && Be ? E.createHTML(Ke) : Ke;
      if (_e = td(Ke), !_e)
        return Ct ? null : Be ? M : "";
    }
    _e && He && cs(_e.firstChild);
    const An = sv(Xn ? Ke : _e);
    for (; an = An.nextNode(); )
      nd(an), Xa(an), an.content instanceof s && s_(an.content);
    if (Xn)
      return Ke;
    if (Ct) {
      if (Lt)
        for (Nn = W.call(_e.ownerDocument); _e.firstChild; )
          Nn.appendChild(_e.firstChild);
      else
        Nn = _e;
      return (F.shadowroot || F.shadowrootmode) && (Nn = Z.call(i, Nn, !0)), Nn;
    }
    let Ji = At ? _e.outerHTML : _e.innerHTML;
    return At && ce["!doctype"] && _e.ownerDocument && _e.ownerDocument.doctype && _e.ownerDocument.doctype.name && Hr(Hq, _e.ownerDocument.doctype.name) && (Ji = "<!DOCTYPE " + _e.ownerDocument.doctype.name + `>
` + Ji), st && Db([Q, V, H], (Yt) => {
      Ji = Rm(Ji, Yt, " ");
    }), E && Be ? E.createHTML(Ji) : Ji;
  }, e.setConfig = function() {
    let Ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    Ya(Ke), Ut = !0;
  }, e.clearConfig = function() {
    Gn = null, Ut = !1;
  }, e.isValidAttribute = function(Ke, ne, _e) {
    Gn || Ya({});
    const je = yn(Ke), an = yn(ne);
    return av(je, an, _e);
  }, e.addHook = function(Ke, ne) {
    typeof ne == "function" && Lm(L[Ke], ne);
  }, e.removeHook = function(Ke, ne) {
    if (ne !== void 0) {
      const _e = _8e(L[Ke], ne);
      return _e === -1 ? void 0 : O8e(L[Ke], _e, 1)[0];
    }
    return rI(L[Ke]);
  }, e.removeHooks = function(Ke) {
    L[Ke] = [];
  }, e.removeAllHooks = function() {
    L = cI();
  }, e;
}
var z8e = Qq();
function F2(t = "", e = {}) {
  return e = {
    replaceJS: !0,
    ...e
  }, e.replaceJS && (t = t.replace(
    /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
    '<pre class="js-embed-placeholder">Embedded JavaScript</pre>'
  ), t = t.replace(
    /<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,
    '<pre class="iframe-embed-placeholder">Embedded iFrame</pre>'
  )), z8e.sanitize(t, {
    ALLOWED_URI_REGEXP: /^https?:|^\/|blob:/,
    ADD_ATTR: ["id"],
    FORBID_TAGS: ["style"]
  });
}
function Uq({ html: t, updateHtml: e, isEditing: n, darkMode: i }) {
  return /* @__PURE__ */ y.jsx(y.Fragment, { children: n ? /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx(
    y8e,
    {
      darkMode: i,
      html: t,
      updateHtml: e
    }
  ) }) : /* @__PURE__ */ y.jsxs("div", { children: [
    /* @__PURE__ */ y.jsx(Zq, { html: t }),
    /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 z-50 mt-0" })
  ] }) });
}
function Zq({ html: t }) {
  const e = F2(t, { replaceJS: !0 });
  return /* @__PURE__ */ y.jsx("div", { dangerouslySetInnerHTML: { __html: e }, className: "min-h-[3.5vh] whitespace-normal" });
}
Zq.propTypes = {
  html: A.string
};
Uq.propTypes = {
  html: A.string,
  updateHtml: A.func,
  isEditing: A.bool,
  darkMode: A.bool
};
function W8e() {
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
    let e = Math.random() * 16 | 0;
    return (t === "x" ? e : e & 3 | 8).toString(16);
  });
}
function H8e({ adjustOnResize: t, adjustOnDrag: e } = {}) {
  const n = ct(null), i = 3, r = ct(!1), s = ct(), o = ct(), a = ct(), l = ct(), u = ct(), f = ct(), d = W8e(), h = (V, H) => {
    const R = (q) => {
      var Y;
      (Y = n.current) != null && Y.contains(q.target) && H(q);
    };
    return document.body.addEventListener(V, R, !1), R;
  }, m = $t((V) => {
    V.preventDefault(), V.stopPropagation();
  }, []), g = $t((V, H) => {
    n.current.style.transform = `translate(${V}px, ${H}px)`;
  }, [n]), w = $t(({ x: V, y: H }) => {
    s.current = V, o.current = H;
    const R = n.current.offsetWidth, q = n.current.offsetHeight, Y = {
      top: H,
      left: V,
      right: window.innerWidth - V - R,
      bottom: window.innerHeight - H - q
    };
    u.current = Y, g(V, H);
  }, [g]), x = $t(() => ({
    x: s.current,
    y: o.current,
    lastSpacing: u.current
  }), []), _ = $t(() => {
    var V;
    f.current = (V = n.current) == null ? void 0 : V.style.overflow, n.current.style.overflow = "hidden";
  }, [n]), S = $t(() => {
    n.current.style.overflow = f.current;
  }, [n]), C = $t(() => {
    window.getSelection().removeAllRanges();
    const V = document.createElement("style");
    V.id = `stylesheet-${d}`, document.head.appendChild(V), V.sheet.insertRule("* { user-select: none !important; }", 0);
  }, [d]), E = $t(() => {
    const V = document.getElementById(`stylesheet-${d}`);
    V == null || V.remove();
  }, [d]), M = $t(() => {
    n.current && (n.current.style.pointerEvents = "none"), window.addEventListener("click", m, { capture: !0, passive: !1 });
  }, [n, m]), $ = $t(() => {
    n.current && (n.current.style.pointerEvents = ""), window.removeEventListener("click", m, { capture: !0, passive: !1 });
  }, [n, m]), P = $t((V) => {
    let H, R;
    if (V.type === "touchmove" ? (H = V.touches[0].clientX, R = V.touches[0].clientY) : (H = V.clientX, R = V.clientY), r.current || (Math.abs(H - a.current - s.current) > i || Math.abs(R - l.current - o.current) > i) && (_(), C(), M(), r.current = !0), r.current) {
      let q = {
        x: H - a.current,
        y: R - l.current
      };
      e && (q = e(n.current, { ...q, lastSpacing: u.current })), w(q);
    }
  }, [i, w, _, C, M, e]), W = $t((V) => {
    r.current = !1, window.removeEventListener("touchend", W, { capture: !0, passive: !0 }), window.removeEventListener("touchmove", P, { capture: !0, passive: !0 }), window.removeEventListener("mouseup", W, { capture: !0, passive: !0 }), window.removeEventListener("mousemove", P, { capture: !0, passive: !0 }), setTimeout(() => {
      window.removeEventListener("click", m.bind(this), { capture: !0, passive: !1 });
    }, 1), S(), E(), setTimeout(() => {
      $();
    }, 5);
  }, [S, E, $, P, m]), z = $t(() => {
    window.addEventListener("touchend", W, { capture: !0, passive: !0 }), window.addEventListener("touchmove", P, { capture: !0, passive: !0 }), window.addEventListener("mouseup", W, { capture: !0, passive: !0 }), window.addEventListener("mousemove", P, { capture: !0, passive: !0 });
  }, [W, P]), Z = $t((V) => {
    var H;
    if (V.stopPropagation(), r.current = !1, V.type === "touchstart" || V.button === 0) {
      V.type === "touchstart" ? (a.current = V.touches[0].clientX - (s.current || 0), l.current = V.touches[0].clientY - (o.current || 0)) : (a.current = V.clientX - (s.current || 0), l.current = V.clientY - (o.current || 0));
      for (const R of V.path || V.composedPath()) {
        if ((H = R == null ? void 0 : R.matches) != null && H.call(R, "input, .ember-basic-dropdown-trigger"))
          break;
        if (R === n.current) {
          z();
          break;
        }
      }
    }
  }, [n, z]), L = $t(() => {
    const V = h("touchstart", Z), H = h("mousedown", Z);
    return () => {
      var R, q;
      (R = n.current) == null || R.removeEventListener("touchstart", V), (q = n.current) == null || q.removeEventListener("mousedown", H);
    };
  }, [Z]), Q = $t(() => {
    window.removeEventListener("touchend", W, { capture: !0, passive: !0 }), window.removeEventListener("touchmove", P, { capture: !0, passive: !0 }), window.removeEventListener("mouseup", W, { capture: !0, passive: !0 }), window.removeEventListener("mousemove", P, { capture: !0, passive: !0 }), setTimeout(() => {
      window.removeEventListener("click", m.bind(this), { capture: !0, passive: !1 });
    }, 1);
  }, [W, P, m]);
  return kt(() => {
    var q;
    const V = n.current;
    V.setAttribute("draggable", !0), (q = n.current) == null || q.classList.add("kg-card-movable");
    let H;
    const R = L();
    return t && (H = new ResizeObserver(() => {
      if (s.current === void 0 || o.current === void 0)
        return;
      const Y = t(V, { x: s.current, y: o.current, lastSpacing: u.current });
      (Y.x !== s.current || Y.y !== o.current) && (a.current = a.current - (Y.x - s.current), l.current = l.current - (Y.y - o.current), w(Y));
    }), H.observe(V)), () => {
      R(), Q(), H == null || H.disconnect(), E();
    };
  }, []), { ref: n, setPosition: w, getPosition: x };
}
function Bh(t) {
  const n = t instanceof HTMLElement && window.getComputedStyle(t).overflowY, i = n !== "visible" && n !== "hidden";
  if (t) {
    if (i && t.scrollHeight >= t.clientHeight)
      return t;
  } else return null;
  return Bh(t.parentNode) || document.body;
}
const fI = 20, Q8e = 20, U8e = 66, Z8e = 20, q8e = 20;
function Y8e() {
  return window.innerWidth < 768 && window.innerHeight > window.innerWidth;
}
const V8e = () => {
  const t = document.querySelector('[data-kg-card-editing="true"]');
  if (!t)
    return { x: 0, y: 0 };
  const e = t.getBoundingClientRect(), n = window.getComputedStyle(t), i = { x: 0, y: 0 };
  return n.transform !== "none" && (i.x = e.left, i.y = e.top), i;
};
function qq(t) {
  return t ? parseInt(window.getComputedStyle(t).getPropertyValue("--kg-breakout-adjustment") || 0, 10) : 0;
}
function dI(t) {
  const e = qq(t);
  return {
    width: window.innerWidth - e,
    height: window.innerHeight
  };
}
function Yq(t, { x: e, y: n, origin: i = { x: 0, y: 0 }, topSpacing: r, bottomSpacing: s, rightSpacing: o, leftSpacing: a, lastSpacing: l }) {
  if (i = V8e(), !t)
    return { x: e + i.x, y: n + i.y };
  const u = qq(t);
  l && l.top < r && (r = l.top), l && l.bottom < s && (s = l.bottom), l && l.right < o && (o = l.right), l && l.left < a && (a = l.left);
  const f = t.offsetWidth, d = t.offsetHeight, h = e + f + i.x, m = n + d + i.y, g = n + i.y < r, w = window.innerHeight - m < s, x = window.innerWidth - h - u < o, _ = e < a;
  let S = 0, C = 0;
  return g && !w && (S = r - n - i.y), w && !g && (S = -(s - (window.innerHeight - m))), x && (C = -(o - (window.innerWidth - h - u))), _ && (C = a - e - i.x), { x: e + C, y: n + S };
}
function ZC(t, { x: e, y: n, origin: i }) {
  return Yq(t, { x: e, y: n, origin: i, topSpacing: 10, bottomSpacing: 10, rightSpacing: 10, leftSpacing: 10, lastSpacing: void 0 });
}
function zm(t, { x: e, y: n, origin: i, lastSpacing: r }) {
  return ZC(t, Yq(t, { x: e, y: n, origin: i, topSpacing: U8e, bottomSpacing: Z8e, rightSpacing: Q8e, leftSpacing: q8e, lastSpacing: r }));
}
function X8e({ positionToRef: t } = {}, e) {
  const { ref: n, getPosition: i, setPosition: r } = H8e({ adjustOnResize: zm, adjustOnDrag: ZC }), s = ct(dI(n.current)), o = ct(e), a = ct({ x: 0, y: 0 }), l = $t((f) => {
    const d = f.offsetHeight, h = t || document.querySelector('[data-kg-card-editing="true"]') || document.querySelector('[data-kg-card-selected="true"]');
    if (!h)
      return;
    const m = h.getBoundingClientRect();
    if (Y8e()) {
      const E = window.innerWidth / 2 - f.offsetWidth / 2, M = m.bottom + fI;
      return ZC(f, { x: E, y: M });
    }
    const g = Math.min(window.innerHeight, m.bottom) - m.top;
    let x = m.top + g / 2 - d / 2, _ = m.right + fI;
    const S = window.getComputedStyle(h), C = { x: 0, y: 0 };
    return S.transform !== "none" && (C.x = m.left, C.y = m.top), zm(f, { x: _, y: x, origin: C });
  }, [t]), u = $t((f) => {
    let { x: d, y: h, lastSpacing: m } = i();
    const g = dI(f);
    if (g.height > s.current.height) {
      const w = g.height - s.current.height, x = l(f);
      x && x.y > h && (h += Math.min(x.y - h, w));
    }
    if (g.width > s.current.width) {
      const w = g.width - s.current.width, x = l(f);
      x && x.x > d && (d += Math.min(x.x - d, w));
    }
    r(zm(f, { x: d, y: h, lastSpacing: m })), s.current = g;
  }, [l, r, i]);
  return rh(() => {
    if (!n.current)
      return;
    const f = Bh(n.current) || document.body;
    let d = 0;
    const h = bp((g) => {
      d = g, u(n.current);
    }, 100, { leading: !0, trailing: !0 }), m = new ResizeObserver((g) => {
      var w;
      for (const x of g)
        if ((w = x.contentBoxSize) != null && w[0]) {
          const _ = x.contentBoxSize[0].inlineSize;
          typeof _ == "number" && _ !== d && h(_);
        }
    });
    return m.observe(f), () => {
      m.disconnect();
    };
  }, [u, n]), rh(() => {
    if (!(!n || !n.current))
      try {
        r(l(n.current));
      } catch (f) {
        console.error(f);
      }
  }, [l, r, n]), rh(() => {
    if (e === "wide" && o.current !== "wide") {
      const f = document.querySelector('[data-kg-card-editing="true"]');
      if (!f)
        return;
      const d = f.getBoundingClientRect(), h = { x: d.left + 2, y: d.top + 1 };
      a.current = h;
      const m = i().x - h.x, g = i().y - h.y;
      r(zm(n.current, { x: m, y: g, origin: h }));
    } else if (o.current === "wide" && e !== "wide") {
      const f = i().x + a.current.x, d = i().y + a.current.y;
      r(zm(n.current, { x: f, y: d, origin: { x: 0, y: 0 } }));
    }
    o.current = e;
  }, [e, i, l, r, n]), { ref: n };
}
const Vq = (t, e) => {
  const n = ct(null);
  return { handleMousedown: () => {
    const s = document.getSelection();
    n.current = s.rangeCount === 0 ? null : s.getRangeAt(0);
  }, handleClick: (s) => {
    if (s.preventDefault(), t(e), n.current) {
      const o = document.getSelection();
      o.removeAllRanges(), o.addRange(n.current), n.current = null;
    }
  } };
};
function Xq({ buttons: t = [], selectedName: e, onClick: n, hasTooltip: i = !0 }) {
  return /* @__PURE__ */ y.jsx("div", { className: "flex", children: /* @__PURE__ */ y.jsx("ul", { className: "flex items-center justify-evenly rounded-lg bg-grey-100 font-sans text-md font-normal text-white dark:bg-grey-900", role: "menubar", children: t.map(({ label: r, name: s, Icon: o, dataTestId: a, ariaLabel: l }) => /* @__PURE__ */ y.jsx(
    G8e,
    {
      ariaLabel: l,
      dataTestId: a,
      hasTooltip: i,
      Icon: o,
      label: r,
      name: s,
      selectedName: e,
      onClick: n
    },
    `${s}-${r}`
  )) }) });
}
function G8e({ dataTestId: t, onClick: e, label: n, ariaLabel: i, name: r, selectedName: s, Icon: o, hasTooltip: a }) {
  const l = r === s, { handleMousedown: u, handleClick: f } = Vq(e, r);
  return /* @__PURE__ */ y.jsx("li", { className: "mb-0", children: /* @__PURE__ */ y.jsxs(
    "button",
    {
      "aria-checked": l,
      "aria-label": i || n,
      className: `group relative flex h-7 w-8 cursor-pointer items-center justify-center rounded-lg text-black dark:text-white ${l ? "border border-grey-300 bg-white shadow-xs dark:border-grey-800 dark:bg-grey-950" : ""} ${o ? "" : "text-[1.3rem] font-bold"}`,
      "data-testid": t,
      role: "menuitemradio",
      type: "button",
      onClick: f,
      onMouseDown: u,
      children: [
        o ? /* @__PURE__ */ y.jsx(o, { className: "size-4 stroke-2" }) : n,
        o && n && a && /* @__PURE__ */ y.jsx(pc, { label: n })
      ]
    }
  ) });
}
Xq.propTypes = {
  selectedName: A.oneOf(["regular", "wide", "full", "split", "center", "left", "small", "medium", "large", "grid", "list", "minimal", "immersive"]).isRequired,
  hasTooltip: A.bool,
  onClick: A.func.isRequired,
  buttons: A.arrayOf(A.shape({
    label: A.string,
    name: A.string.isRequired,
    Icon: A.elementType,
    dataTestId: A.string,
    ariaLabel: A.string
  }))
};
const K8e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M17.041 12.025 6.91 22.156 1 23l.844-5.91L11.975 6.96m0-5.067 10.132 10.132M19.8 9l2.206-2.207a3.396 3.396 0 0 0 0-4.8 3.397 3.397 0 0 0-4.8 0L15 4.2" })), dT = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M22.883 19.771a.786.786 0 0 1-.668.372H1.785a.786.786 0 0 1-.666-1.202l3.93-6.286a.785.785 0 0 1 1.269-.086l3.292 3.95 6.476-8.633a.81.81 0 0 1 .7-.315.786.786 0 0 1 .628.431l5.5 11a.785.785 0 0 1-.03.769Z", clipRule: "evenodd" }), /* @__PURE__ */ J.createElement("circle", { cx: 8, cy: 6, r: 3, fill: "currentColor" }));
function Na({
  color: t = "accent",
  dataTestId: e,
  href: n,
  size: i = "small",
  width: r = "regular",
  rounded: s = !0,
  shrink: o = !1,
  value: a = "",
  placeholder: l = "Add button text",
  type: u = "button",
  disabled: f = !1,
  target: d,
  ...h
}) {
  const m = n ? "a" : "button", g = {
    type: n ? null : u,
    href: n || null,
    rel: d === "_blank" ? "noopener noreferrer" : null,
    target: d || null,
    ...h
  };
  return /* @__PURE__ */ y.jsx(
    m,
    {
      className: nt(
        "not-kg-prose inline-block cursor-pointer text-center font-sans font-medium",
        !o && "shrink-0",
        // This is for dynamic buttons that need to wrap onto a new line if width exceeds editor width, such as the ButtonCard
        r === "regular" || "w-full",
        s && "rounded-md",
        a ? "opacity-100" : "opacity-50",
        t === "white" && "bg-white text-black",
        t === "grey" && "bg-grey-200 text-black",
        t === "black" && "bg-black text-white",
        t === "accent" && "bg-accent text-white",
        !["white", "grey", "black", "accent"].includes(t) && "bg-green text-white"
      ),
      "data-testid": `${e}`,
      disabled: f,
      ...g,
      children: /* @__PURE__ */ y.jsx(
        "span",
        {
          className: nt(
            "block",
            i === "small" && "px-5 py-[1rem] text-md leading-[1.4]",
            i === "medium" && "px-5 py-2 text-[1.6rem]",
            i === "large" && "px-6 py-3 text-lg leading-[1.35]"
          ),
          "data-testid": `${e}-span`,
          children: a || l
        }
      )
    }
  );
}
Na.propTypes = {
  color: A.oneOf(["white", "grey", "black", "accent"]),
  size: A.oneOf(["small", "medium", "large"]),
  width: A.oneOf(["regular", "full"]),
  rounded: A.bool,
  value: A.string,
  placeholder: A.string,
  href: A.string,
  target: A.string,
  disabled: A.bool
};
function yp() {
  return (yp = Object.assign || function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
    }
    return t;
  }).apply(this, arguments);
}
function B2(t, e) {
  if (t == null) return {};
  var n, i, r = {}, s = Object.keys(t);
  for (i = 0; i < s.length; i++) e.indexOf(n = s[i]) >= 0 || (r[n] = t[n]);
  return r;
}
function O0(t) {
  var e = ct(t), n = ct(function(i) {
    e.current && e.current(i);
  });
  return e.current = t, n.current;
}
var S0 = function(t, e, n) {
  return e === void 0 && (e = 0), n === void 0 && (n = 1), t > n ? n : t < e ? e : t;
}, Ag = function(t) {
  return "touches" in t;
}, qC = function(t) {
  return t && t.ownerDocument.defaultView || self;
}, hI = function(t, e, n) {
  var i = t.getBoundingClientRect(), r = Ag(e) ? function(s, o) {
    for (var a = 0; a < s.length; a++) if (s[a].identifier === o) return s[a];
    return s[0];
  }(e.touches, n) : e;
  return { left: S0((r.pageX - (i.left + qC(t).pageXOffset)) / i.width), top: S0((r.pageY - (i.top + qC(t).pageYOffset)) / i.height) };
}, pI = function(t) {
  !Ag(t) && t.preventDefault();
}, Gq = j.memo(function(t) {
  var e = t.onMove, n = t.onKey, i = B2(t, ["onMove", "onKey"]), r = ct(null), s = O0(e), o = O0(n), a = ct(null), l = ct(!1), u = Vm(function() {
    var m = function(x) {
      pI(x), (Ag(x) ? x.touches.length > 0 : x.buttons > 0) && r.current ? s(hI(r.current, x, a.current)) : w(!1);
    }, g = function() {
      return w(!1);
    };
    function w(x) {
      var _ = l.current, S = qC(r.current), C = x ? S.addEventListener : S.removeEventListener;
      C(_ ? "touchmove" : "mousemove", m), C(_ ? "touchend" : "mouseup", g);
    }
    return [function(x) {
      var _ = x.nativeEvent, S = r.current;
      if (S && (pI(_), !function(E, M) {
        return M && !Ag(E);
      }(_, l.current) && S)) {
        if (Ag(_)) {
          l.current = !0;
          var C = _.changedTouches || [];
          C.length && (a.current = C[0].identifier);
        }
        S.focus(), s(hI(S, _, a.current)), w(!0);
      }
    }, function(x) {
      var _ = x.which || x.keyCode;
      _ < 37 || _ > 40 || (x.preventDefault(), o({ left: _ === 39 ? 0.05 : _ === 37 ? -0.05 : 0, top: _ === 40 ? 0.05 : _ === 38 ? -0.05 : 0 }));
    }, w];
  }, [o, s]), f = u[0], d = u[1], h = u[2];
  return kt(function() {
    return h;
  }, [h]), j.createElement("div", yp({}, i, { onTouchStart: f, onMouseDown: f, className: "react-colorful__interactive", ref: r, onKeyDown: d, tabIndex: 0, role: "slider" }));
}), hT = function(t) {
  return t.filter(Boolean).join(" ");
}, Kq = function(t) {
  var e = t.color, n = t.left, i = t.top, r = i === void 0 ? 0.5 : i, s = hT(["react-colorful__pointer", t.className]);
  return j.createElement("div", { className: s, style: { top: 100 * r + "%", left: 100 * n + "%" } }, j.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: e } }));
}, hr = function(t, e, n) {
  return e === void 0 && (e = 0), n === void 0 && (n = Math.pow(10, e)), Math.round(n * t) / n;
}, J8e = function(t) {
  return r9e(YC(t));
}, YC = function(t) {
  return t[0] === "#" && (t = t.substring(1)), t.length < 6 ? { r: parseInt(t[0] + t[0], 16), g: parseInt(t[1] + t[1], 16), b: parseInt(t[2] + t[2], 16), a: t.length === 4 ? hr(parseInt(t[3] + t[3], 16) / 255, 2) : 1 } : { r: parseInt(t.substring(0, 2), 16), g: parseInt(t.substring(2, 4), 16), b: parseInt(t.substring(4, 6), 16), a: t.length === 8 ? hr(parseInt(t.substring(6, 8), 16) / 255, 2) : 1 };
}, e9e = function(t) {
  return i9e(n9e(t));
}, t9e = function(t) {
  var e = t.s, n = t.v, i = t.a, r = (200 - e) * n / 100;
  return { h: hr(t.h), s: hr(r > 0 && r < 200 ? e * n / 100 / (r <= 100 ? r : 200 - r) * 100 : 0), l: hr(r / 2), a: hr(i, 2) };
}, VC = function(t) {
  var e = t9e(t);
  return "hsl(" + e.h + ", " + e.s + "%, " + e.l + "%)";
}, n9e = function(t) {
  var e = t.h, n = t.s, i = t.v, r = t.a;
  e = e / 360 * 6, n /= 100, i /= 100;
  var s = Math.floor(e), o = i * (1 - n), a = i * (1 - (e - s) * n), l = i * (1 - (1 - e + s) * n), u = s % 6;
  return { r: hr(255 * [i, a, o, o, l, i][u]), g: hr(255 * [l, i, i, a, o, o][u]), b: hr(255 * [o, o, l, i, i, a][u]), a: hr(r, 2) };
}, Ib = function(t) {
  var e = t.toString(16);
  return e.length < 2 ? "0" + e : e;
}, i9e = function(t) {
  var e = t.r, n = t.g, i = t.b, r = t.a, s = r < 1 ? Ib(hr(255 * r)) : "";
  return "#" + Ib(e) + Ib(n) + Ib(i) + s;
}, r9e = function(t) {
  var e = t.r, n = t.g, i = t.b, r = t.a, s = Math.max(e, n, i), o = s - Math.min(e, n, i), a = o ? s === e ? (n - i) / o : s === n ? 2 + (i - e) / o : 4 + (e - n) / o : 0;
  return { h: hr(60 * (a < 0 ? a + 6 : a)), s: hr(s ? o / s * 100 : 0), v: hr(s / 255 * 100), a: r };
}, s9e = j.memo(function(t) {
  var e = t.hue, n = t.onChange, i = hT(["react-colorful__hue", t.className]);
  return j.createElement("div", { className: i }, j.createElement(Gq, { onMove: function(r) {
    n({ h: 360 * r.left });
  }, onKey: function(r) {
    n({ h: S0(e + 360 * r.left, 0, 360) });
  }, "aria-label": "Hue", "aria-valuenow": hr(e), "aria-valuemax": "360", "aria-valuemin": "0" }, j.createElement(Kq, { className: "react-colorful__hue-pointer", left: e / 360, color: VC({ h: e, s: 100, v: 100, a: 1 }) })));
}), o9e = j.memo(function(t) {
  var e = t.hsva, n = t.onChange, i = { backgroundColor: VC({ h: e.h, s: 100, v: 100, a: 1 }) };
  return j.createElement("div", { className: "react-colorful__saturation", style: i }, j.createElement(Gq, { onMove: function(r) {
    n({ s: 100 * r.left, v: 100 - 100 * r.top });
  }, onKey: function(r) {
    n({ s: S0(e.s + 100 * r.left, 0, 100), v: S0(e.v - 100 * r.top, 0, 100) });
  }, "aria-label": "Color", "aria-valuetext": "Saturation " + hr(e.s) + "%, Brightness " + hr(e.v) + "%" }, j.createElement(Kq, { className: "react-colorful__saturation-pointer", top: 1 - e.v / 100, left: e.s / 100, color: VC(e) })));
}), Jq = function(t, e) {
  if (t === e) return !0;
  for (var n in t) if (t[n] !== e[n]) return !1;
  return !0;
}, a9e = function(t, e) {
  return t.toLowerCase() === e.toLowerCase() || Jq(YC(t), YC(e));
};
function l9e(t, e, n) {
  var i = O0(n), r = ft(function() {
    return t.toHsva(e);
  }), s = r[0], o = r[1], a = ct({ color: e, hsva: s });
  kt(function() {
    if (!t.equal(e, a.current.color)) {
      var u = t.toHsva(e);
      a.current = { hsva: u, color: e }, o(u);
    }
  }, [e, t]), kt(function() {
    var u;
    Jq(s, a.current.hsva) || t.equal(u = t.fromHsva(s), a.current.color) || (a.current = { hsva: s, color: u }, i(u));
  }, [s, t, i]);
  var l = $t(function(u) {
    o(function(f) {
      return Object.assign({}, f, u);
    });
  }, []);
  return [s, l];
}
var u9e = typeof window < "u" ? rh : kt, c9e = function() {
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
}, mI = /* @__PURE__ */ new Map(), f9e = function(t) {
  u9e(function() {
    var e = t.current ? t.current.ownerDocument : document;
    if (e !== void 0 && !mI.has(e)) {
      var n = e.createElement("style");
      n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, mI.set(e, n);
      var i = c9e();
      i && n.setAttribute("nonce", i), e.head.appendChild(n);
    }
  }, []);
}, d9e = function(t) {
  var e = t.className, n = t.colorModel, i = t.color, r = i === void 0 ? n.defaultColor : i, s = t.onChange, o = B2(t, ["className", "colorModel", "color", "onChange"]), a = ct(null);
  f9e(a);
  var l = l9e(n, r, s), u = l[0], f = l[1], d = hT(["react-colorful", e]);
  return j.createElement("div", yp({}, o, { ref: a, className: d }), j.createElement(o9e, { hsva: u, onChange: f }), j.createElement(s9e, { hue: u.h, onChange: f, className: "react-colorful__last-control" }));
}, h9e = { defaultColor: "000", toHsva: J8e, fromHsva: function(t) {
  return e9e({ h: t.h, s: t.s, v: t.v, a: 1 });
}, equal: a9e }, p9e = function(t) {
  return j.createElement(d9e, yp({}, t, { colorModel: h9e }));
}, m9e = /^#?([0-9A-F]{3,8})$/i, g9e = function(t) {
  var e = t.color, n = e === void 0 ? "" : e, i = t.onChange, r = t.onBlur, s = t.escape, o = t.validate, a = t.format, l = t.process, u = B2(t, ["color", "onChange", "onBlur", "escape", "validate", "format", "process"]), f = ft(function() {
    return s(n);
  }), d = f[0], h = f[1], m = O0(i), g = O0(r), w = $t(function(_) {
    var S = s(_.target.value);
    h(S), o(S) && m(l ? l(S) : S);
  }, [s, l, o, m]), x = $t(function(_) {
    o(_.target.value) || h(s(n)), g(_);
  }, [n, s, o, g]);
  return kt(function() {
    h(s(n));
  }, [n, s]), j.createElement("input", yp({}, u, { value: a ? a(d) : d, spellCheck: "false", onChange: w, onBlur: x }));
}, gI = function(t) {
  return "#" + t;
}, v9e = function(t) {
  var e = t.prefixed, n = t.alpha, i = B2(t, ["prefixed", "alpha"]), r = $t(function(o) {
    return o.replace(/([^0-9A-F]+)/gi, "").substring(0, n ? 8 : 6);
  }, [n]), s = $t(function(o) {
    return function(a, l) {
      var u = m9e.exec(a), f = u ? u[1].length : 0;
      return f === 3 || f === 6 || !!l && f === 4 || !!l && f === 8;
    }(o, n);
  }, [n]);
  return j.createElement(g9e, yp({}, i, { escape: r, format: e ? gI : void 0, process: gI, validate: s }));
};
function Ju() {
  const t = document.body.querySelector(".koenig-lexical");
  return t && getComputedStyle(t).getPropertyValue("--kg-accent-color") || "#ff0095";
}
function eY(t, e, n) {
  j.useEffect(() => {
    if (!t)
      return;
    const i = (r) => {
      e.current && !e.current.contains(r.target) && n();
    };
    return window.addEventListener("mousedown", i, { capture: !0 }), () => window.removeEventListener("mousedown", i, { capture: !0 });
  }, [t, n, e]);
}
function b9e({ value: t, eyedropper: e, hasTransparentOption: n, onChange: i, children: r }) {
  const s = ct(null), o = $t((m) => {
    var x, _, S;
    m.stopPropagation();
    const g = (x = s.current) == null ? void 0 : x.querySelector("input");
    m.target !== g && ((S = (_ = s.current) == null ? void 0 : _.querySelector("input")) == null || S.focus(), m.preventDefault());
  }, []), a = ct(!1), l = $t(() => {
    var m, g;
    a.current = !1, (g = (m = s.current) == null ? void 0 : m.querySelector("input")) == null || g.focus(), document.removeEventListener("mouseup", l), document.removeEventListener("touchend", l);
  }, []), u = $t(() => {
    a.current = !0, document.addEventListener("mouseup", l), document.addEventListener("touchend", l);
  }, [l]), f = $t((m) => {
    m.preventDefault(), a.current = !0, document.body.style.setProperty("pointer-events", "none"), new window.EyeDropper().open().then((w) => i(w.sRGBHex)).finally(() => {
      var w, x;
      a.current = !1, document.body.style.removeProperty("pointer-events"), (x = (w = s.current) == null ? void 0 : w.querySelector("input")) == null || x.focus();
    });
  }, [i]);
  kt(() => {
    var m, g;
    (g = (m = s.current) == null ? void 0 : m.querySelector("input")) == null || g.focus();
  }, []);
  let d = t;
  t === "accent" ? d = Ju() : t === "transparent" && (d = "");
  const h = $t((m) => {
    var g, w;
    (w = (g = s.current) == null ? void 0 : g.querySelector("input")) == null || w.focus();
  }, []);
  return /* @__PURE__ */ y.jsxs("div", { onMouseDown: o, onTouchStart: o, children: [
    /* @__PURE__ */ y.jsx(p9e, { color: d || "#ffffff", onChange: i, onMouseDown: u, onTouchStart: u }),
    /* @__PURE__ */ y.jsxs("div", { className: "mt-3 flex gap-2", children: [
      /* @__PURE__ */ y.jsxs("div", { ref: s, className: "relative flex w-full items-center rounded-lg border border-grey-100 bg-grey-100 px-3 py-1.5 font-sans text-sm font-normal text-grey-900 transition-colors placeholder:text-grey-500 focus-within:border-green focus-within:bg-white focus-within:shadow-[0_0_0_2px_rgba(48,207,67,.25)] focus-within:outline-none dark:border-transparent dark:bg-grey-900 dark:text-white dark:selection:bg-grey-800 dark:placeholder:text-grey-700 dark:focus-within:border-green dark:hover:bg-grey-925 dark:focus:bg-grey-925", onClick: h, children: [
        /* @__PURE__ */ y.jsx("span", { className: "ml-1 mr-2 text-grey-700", children: "#" }),
        /* @__PURE__ */ y.jsx(v9e, { "aria-label": "Color value", className: "z-50 w-full bg-transparent", color: d, onChange: i }),
        e && !!window.EyeDropper && /* @__PURE__ */ y.jsx(
          "button",
          {
            className: "absolute inset-y-0 right-3 z-50 my-auto size-4 p-[1px]",
            type: "button",
            onClick: f,
            children: /* @__PURE__ */ y.jsx(K8e, { className: "size-full stroke-2" })
          }
        )
      ] }),
      n && /* @__PURE__ */ y.jsx(Na, { color: "grey", value: "Clear", onClick: () => i("transparent") }),
      r
    ] })
  ] });
}
function y9e({ hex: t, accent: e, transparent: n, title: i, isSelected: r, onSelect: s }) {
  const o = e ? Ju() : t, a = ct(null), l = (u) => {
    u.preventDefault(), s(e ? "accent" : n ? "transparent" : t);
  };
  return /* @__PURE__ */ y.jsxs(
    "button",
    {
      ref: a,
      className: nt(
        "group relative flex size-5 shrink-0 items-center rounded-full border border-grey-250 dark:border-grey-800",
        r && "outline outline-2 outline-green"
      ),
      style: { backgroundColor: o },
      title: i,
      type: "button",
      onClick: l,
      children: [
        n && /* @__PURE__ */ y.jsx("div", { className: "absolute left-0 top-0 z-10 w-[136%] origin-left rotate-45 border-b border-b-red" }),
        /* @__PURE__ */ y.jsx(pc, { label: i })
      ]
    }
  );
}
function w9e({ value: t, swatches: e, onSwatchChange: n, onTogglePicker: i, onChange: r, isExpanded: s, eyedropper: o, hasTransparentOption: a, children: l }) {
  var S, C, E, M;
  const [u, f] = ft(!1), [d, h] = ft(!1), m = ct(null);
  eY(u, m, () => f(!1));
  const g = $t(($) => {
    $.stopPropagation(), $.preventDefault();
  }, []);
  let w = t, x = (S = e.find(($) => $.hex === t)) == null ? void 0 : S.title;
  t === "accent" ? (w = Ju(), x = (C = e.find(($) => $.accent)) == null ? void 0 : C.title) : t === "image" ? (w = "transparent", x = (E = e.find(($) => $.image)) == null ? void 0 : E.title) : t === "transparent" && (w = "white", x = (M = e.find(($) => $.transparent)) == null ? void 0 : M.title), s && (x = null);
  const _ = ($) => {
    r($);
  };
  return /* @__PURE__ */ y.jsxs("div", { className: "relative", "data-testid": "color-selector-button", children: [
    /* @__PURE__ */ y.jsxs(
      "button",
      {
        className: `relative size-6 cursor-pointer rounded-full ${t ? "p-[2px]" : "border border-grey-200 dark:border-grey-800"}`,
        type: "button",
        onClick: () => {
          f(!u), h(!1);
        },
        children: [
          t && /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 rounded-full bg-clip-content p-[3px]", style: {
            background: "conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))",
            WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
            WebkitMaskComposite: "xor",
            mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
            maskComposite: "exclude"
          } }),
          /* @__PURE__ */ y.jsxs(
            "span",
            {
              className: nt(
                "block size-full rounded-full border-2 border-white dark:border-grey-950",
                t === "image" && "flex items-center justify-center"
              ),
              style: { backgroundColor: w },
              children: [
                t === "image" && /* @__PURE__ */ y.jsx(dT, { className: "size-[1.4rem]" }),
                t === "transparent" && /* @__PURE__ */ y.jsx("div", { className: "absolute left-[3px] top-[3px] z-10 w-[136%] origin-left rotate-45 border-b border-b-red" })
              ]
            }
          )
        ]
      }
    ),
    u && /* @__PURE__ */ y.jsxs(
      "div",
      {
        ref: m,
        className: nt(
          "absolute -right-3 bottom-full z-10 mb-2 flex flex-col gap-3 rounded-lg bg-white p-3 shadow transition-[width] duration-200 ease-in-out dark:bg-grey-900",
          (s || d) && "min-w-[296px]"
        ),
        onClick: g,
        onMouseDown: g,
        onTouchStart: g,
        children: [
          !s && l,
          s && /* @__PURE__ */ y.jsx(
            b9e,
            {
              eyedropper: o,
              hasTransparentOption: a,
              value: t,
              onChange: _
            }
          ),
          d && l,
          /* @__PURE__ */ y.jsxs("div", { className: "flex justify-end gap-1", children: [
            /* @__PURE__ */ y.jsx("div", { className: "flex items-center gap-1", children: e.map(({ customContent: $, ...P }) => $ ? /* @__PURE__ */ y.jsx(vne, { children: $ }, P.title) : /* @__PURE__ */ y.jsx(
              y9e,
              {
                isSelected: x === P.title,
                onSelect: (W) => {
                  n(W);
                },
                ...P
              },
              P.title
            )) }),
            /* @__PURE__ */ y.jsxs(
              "button",
              {
                "aria-label": "Pick color",
                className: `group relative size-6 rounded-full ${x ? "border border-grey-200 dark:border-grey-800" : "p-[2px]"}`,
                "data-testid": "color-picker-toggle",
                type: "button",
                onClick: () => {
                  h(!1), i(!s);
                },
                children: [
                  x ? /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 rounded-full bg-[conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))]" }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
                    /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 rounded-full bg-clip-content p-[3px]", style: {
                      background: "conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))",
                      WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
                      WebkitMaskComposite: "xor",
                      mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
                      maskComposite: "exclude"
                    } }),
                    /* @__PURE__ */ y.jsx(
                      "span",
                      {
                        className: "block size-full rounded-full border-2 border-white dark:border-grey-950",
                        style: { backgroundColor: t },
                        children: t === "transparent" && /* @__PURE__ */ y.jsx("div", { className: "absolute left-[3px] top-[3px] z-10 w-[136%] origin-left rotate-45 border-b border-b-red" })
                      }
                    )
                  ] }),
                  /* @__PURE__ */ y.jsx(pc, { label: "Pick color" })
                ]
              }
            )
          ] })
        ]
      }
    )
  ] });
}
function k9e({ buttons: t = [], selectedName: e, onClick: n }) {
  const [i, r] = ft(!1), s = j.useRef(null), o = t.find((a) => a.name === e);
  return eY(i, s, () => r(!1)), /* @__PURE__ */ y.jsxs("div", { ref: s, className: "relative", children: [
    /* @__PURE__ */ y.jsxs(
      "button",
      {
        className: `relative size-6 cursor-pointer rounded-full ${e ? "p-[2px]" : "border border-grey-200 dark:border-grey-800"}`,
        "data-testid": "color-options-button",
        type: "button",
        onClick: () => r(!i),
        children: [
          e && /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 rounded-full bg-clip-content p-[3px]", style: {
            background: "conic-gradient(hsl(360,100%,50%),hsl(315,100%,50%),hsl(270,100%,50%),hsl(225,100%,50%),hsl(180,100%,50%),hsl(135,100%,50%),hsl(90,100%,50%),hsl(45,100%,50%),hsl(0,100%,50%))",
            WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
            WebkitMaskComposite: "xor",
            mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
            maskComposite: "exclude"
          } }),
          /* @__PURE__ */ y.jsx(
            "span",
            {
              className: `${(o == null ? void 0 : o.color) || ""} block size-full rounded-full border-2 border-white dark:border-grey-950`
            }
          )
        ]
      }
    ),
    i && /* @__PURE__ */ y.jsx("div", { className: "absolute -right-3 bottom-full z-10 mb-2 rounded-lg bg-white px-3 py-2 shadow dark:bg-grey-900", "data-testid": "color-options-popover", children: /* @__PURE__ */ y.jsx("div", { className: "flex", children: /* @__PURE__ */ y.jsx("ul", { className: "flex w-full items-center justify-between rounded-md font-sans text-md font-normal text-white", children: t.map(({ label: a, name: l, color: u }) => l !== "image" ? /* @__PURE__ */ y.jsx(
      x9e,
      {
        color: u,
        "data-testid": `color-options-${l}-button`,
        label: a,
        name: l,
        selectedName: e,
        onClick: (f) => {
          n(f), r(!1);
        }
      },
      `${l}-${a}`
    ) : /* @__PURE__ */ y.jsx("li", { className: `mb-0 flex size-[3rem] cursor-pointer items-center justify-center rounded-full border-2 ${e === l ? "border-green" : "border-transparent"}`, "data-testid": "background-image-color-button", type: "button", onClick: () => n(l), children: /* @__PURE__ */ y.jsx("span", { className: "border-1 flex size-6 items-center justify-center rounded-full border border-black/5", children: /* @__PURE__ */ y.jsx(Ek, { className: "size-3 stroke-grey-700 stroke-2 dark:stroke-grey-500 dark:group-hover:stroke-grey-100" }) }) }, "background-image")) }) }) })
  ] });
}
function x9e({ onClick: t, label: e, name: n, color: i, selectedName: r }) {
  const s = n === r, { handleMousedown: o, handleClick: a } = Vq(t, n);
  return /* @__PURE__ */ y.jsx("li", { className: "mb-0", children: /* @__PURE__ */ y.jsxs(
    "button",
    {
      "aria-label": e,
      className: `group relative flex size-6 cursor-pointer items-center justify-center rounded-full border-2 ${s ? "border-green" : "border-transparent"}`,
      "data-testid": `color-picker-${n}`,
      type: "button",
      onClick: a,
      onMouseDown: o,
      children: [
        /* @__PURE__ */ y.jsx(
          "span",
          {
            className: `${i} size-[1.8rem] rounded-full border`
          }
        ),
        /* @__PURE__ */ y.jsx(pc, { label: e })
      ]
    }
  ) });
}
const tY = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 26, height: 17, viewBox: "0 0 26 17", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", fillRule: "evenodd", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "m1.469 2.5 11.5 12.143L24.469 2.5" }));
function _9e({ item: t, selected: e, onChange: n }) {
  let i = "";
  e && (i = "bg-grey-100 dark:bg-grey-950");
  const r = (s, o) => {
    s.preventDefault(), n(o);
  };
  return /* @__PURE__ */ y.jsx("li", { className: `${i} m-0 hover:bg-grey-100 dark:hover:bg-grey-950`, children: /* @__PURE__ */ y.jsx("button", { className: "size-full cursor-pointer px-3 py-[7px] text-left dark:text-white", "data-test-value": t.name, type: "button", onMouseDownCapture: (s) => r(s, t.name), children: t.label }) }, t.name);
}
function O9e({ value: t, menu: e, onChange: n, dataTestId: i }) {
  const [r, s] = j.useState(!1), o = (g) => {
    s(!r), r || g.target.focus();
  }, a = (g) => {
    g.preventDefault(), g.stopPropagation();
  }, l = () => {
    s(!1);
  }, u = (g) => {
    s(!1), n(g);
  }, f = (g, w) => /* @__PURE__ */ y.jsx(_9e, { item: g, selected: w, onChange: u }, g.name), d = e.find((g) => g.name === t), h = (d == null ? void 0 : d.label) ?? "", m = r ? "z-10" : "z-0";
  return /* @__PURE__ */ y.jsxs("div", { className: `relative ${m} font-sans text-sm font-normal`, "data-testid": i, children: [
    /* @__PURE__ */ y.jsxs(
      "button",
      {
        className: "relative h-9 w-full cursor-pointer rounded-lg border border-grey-150 bg-grey-150 px-3 py-1 pr-5 text-left font-sans font-normal leading-[1.5] text-grey-900 hover:border-grey-100 hover:bg-grey-100 focus-visible:outline-none dark:border-grey-900 dark:bg-grey-900 dark:text-white dark:placeholder:text-grey-800 md:h-[38px] md:py-2",
        "data-testid": `${i}-value`,
        type: "button",
        onBlur: l,
        onClick: o,
        onMouseDownCapture: a,
        children: [
          h,
          /* @__PURE__ */ y.jsx(tY, { className: `absolute right-3 top-[1.5rem] size-2 text-grey-900 ${r && "rotate-180"}` })
        ]
      }
    ),
    r && /* @__PURE__ */ y.jsx(nT, { children: /* @__PURE__ */ y.jsx(
      rT,
      {
        defaultSelected: d,
        getItem: f,
        items: e,
        onSelect: (g) => u(g.name)
      }
    ) })
  ] });
}
function z2({ onFileChange: t, fileInputRef: e, mimeTypes: n = ["image/*"], multiple: i = !1, disabled: r }) {
  const s = n.join(",");
  return /* @__PURE__ */ y.jsx("form", { onChange: t, children: /* @__PURE__ */ y.jsx(
    "input",
    {
      ref: e,
      accept: s,
      disabled: r,
      hidden: !0,
      multiple: i,
      name: "image-input",
      type: "file",
      onClick: (o) => o.stopPropagation()
    }
  ) });
}
function $l({ className: t, onClick: e, label: n, dataTestId: i, Icon: r }) {
  return /* @__PURE__ */ y.jsxs(
    "button",
    {
      "aria-label": n,
      className: nt("group pointer-events-auto relative flex h-8 w-9 cursor-pointer items-center justify-center rounded-md bg-white/90 text-grey-900 transition-all hover:bg-white hover:text-black", t),
      "data-testid": i,
      type: "button",
      onClick: e,
      children: [
        /* @__PURE__ */ y.jsx(r, { className: "size-4 stroke-2" }),
        n && /* @__PURE__ */ y.jsx(pc, { label: n })
      ]
    }
  );
}
const S9e = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", fill: "none", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M11.25 17.25a6 6 0 1 0 12 0 6 6 0 1 0-12 0Zm6 3v-6m0 0L15 16.5m2.25-2.25 2.25 2.25" }), /* @__PURE__ */ J.createElement("path", { d: "M8.25 20.25h-6a1.5 1.5 0 0 1-1.5-1.5V2.25a1.5 1.5 0 0 1 1.5-1.5h10.629a1.5 1.5 0 0 1 1.06.439l2.872 2.872a1.5 1.5 0 0 1 .439 1.06V8.25" }), /* @__PURE__ */ J.createElement("path", { d: "M3.75 12.75a2.25 1.5 0 1 0 4.5 0 2.25 1.5 0 1 0-4.5 0Z" }), /* @__PURE__ */ J.createElement("path", { d: "m8.25 12.75-.295-5.929 1.062-.113A2.685 2.685 0 0 1 11.6 7.99" })), nY = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M12.001 15.75v-12m4.5 4.5-4.5-4.5-4.5 4.5m15.75 7.5v1.5a3 3 0 0 1-3 3h-16.5a3 3 0 0 1-3-3v-1.5", style: {
  fill: "none",
  stroke: "currentColor",
  strokeLinecap: "round",
  strokeLinejoin: "round",
  strokeWidth: "1.5px"
} })), C9e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", ...t }, /* @__PURE__ */ J.createElement("g", { strokeLinecap: "round", strokeWidth: 2, fill: "none", stroke: "currentColor", strokeLinejoin: "round", className: "nc-icon-wrapper" }, /* @__PURE__ */ J.createElement("path", { d: "M4 10h40" }), /* @__PURE__ */ J.createElement("path", { d: "M44 46H4V10l8-8h24l8 8z" }), /* @__PURE__ */ J.createElement("path", { d: "M34 20c0 5.5-4.5 10-10 10s-10-4.5-10-10" }))), E9e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", ...t }, /* @__PURE__ */ J.createElement("g", { strokeLinecap: "round", strokeWidth: 2, fill: "none", stroke: "currentColor", strokeLinejoin: "round", className: "nc-icon-wrapper" }, /* @__PURE__ */ J.createElement("rect", { x: 2, y: 18, width: 31, height: 26, rx: 4 }), /* @__PURE__ */ J.createElement("circle", { cx: 8.5, cy: 7.5, r: 5.5 }), /* @__PURE__ */ J.createElement("circle", { cx: 25.5, cy: 9.5, r: 3.5 }), /* @__PURE__ */ J.createElement("path", { "data-cap": "butt", d: "m33 27 13-6v20l-13-6" }))), T9e = {
  image: AS,
  gallery: $j,
  video: E9e,
  audio: S9e,
  file: nY,
  product: C9e
}, XC = ({ text: t, type: e }) => /* @__PURE__ */ y.jsx(
  "span",
  {
    className: nt(
      "text-center font-sans text-sm font-semibold text-grey-800 transition-all group-hover:text-grey-800",
      e === "button" && "px-3 py-1"
    ),
    "data-kg-card-drag-text": !0,
    children: t
  }
), $9e = ({ desc: t, hasErrors: e }) => e ? null : /* @__PURE__ */ y.jsx("p", { className: "!font-sans !text-[1.3rem] !font-medium text-grey-900", children: t }), M9e = ({ desc: t, hasErrors: e, icon: n, size: i }) => {
  if (i === "xsmall" && e)
    return null;
  const r = T9e[n], s = nt(
    "shrink-0 opacity-80 transition-all ease-linear hover:scale-105 group-hover:opacity-100",
    i === "large" && "size-20 text-grey",
    i === "small" && "size-14 text-grey",
    i === "xsmall" && "size-5 text-grey-700",
    !["large", "small", "xsmall"].includes(i) && "size-16 text-grey",
    i === "xsmall" && t && "mr-3"
  ), o = nt(
    "flex min-w-[auto] !font-sans !text-sm !font-normal text-grey-700 opacity-80 transition-all group-hover:opacity-100",
    i === "xsmall" && "!mt-0",
    i !== "xsmall" && "!mt-4"
  );
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(r, { className: s }),
    /* @__PURE__ */ y.jsx("p", { className: o, children: t })
  ] });
};
function mc({
  desc: t,
  icon: e,
  filePicker: n,
  size: i,
  type: r,
  borderStyle: s = "squared",
  isDraggedOver: o,
  errors: a = [],
  placeholderRef: l,
  dataTestId: u = "media-placeholder",
  errorDataTestId: f = "media-placeholder-errors",
  multiple: d = !1,
  ...h
}) {
  const m = nt(
    "relative flex h-full items-center justify-center",
    r === "button" ? "rounded-lg bg-grey-100" : "border bg-grey-50",
    i === "xsmall" && r !== "button" && "before:pb-[12.5%] dark:bg-grey-900",
    i !== "xsmall" && r !== "button" && "before:pb-[62.5%] dark:bg-grey-950",
    s === "rounded" && r !== "button" && "rounded-lg border-grey/20 dark:border-transparent",
    s !== "rounded" && r !== "button" && "border-grey/20 dark:border-grey/10"
  ), g = nt(
    "group flex cursor-pointer select-none items-center justify-center",
    r === "button" && "px-3 py-1",
    r !== "button" && (i === "xsmall" ? "p-4" : "flex-col p-20")
  ), w = nt(
    "font-sans text-sm font-semibold text-red",
    i !== "xsmall" && "mt-3 max-w-[65%]"
  ), x = a.map((_) => /* @__PURE__ */ y.jsx(
    "span",
    {
      className: w,
      "data-testid": f,
      children: _.message
    },
    _.message
  ));
  return /* @__PURE__ */ y.jsx(
    "div",
    {
      ref: l,
      className: "not-kg-prose size-full",
      ...h,
      "data-testid": u,
      children: /* @__PURE__ */ y.jsx("div", { className: m, children: o ? /* @__PURE__ */ y.jsx(XC, { text: `Drop ${d ? "'em" : "it"} like it's hot 🔥`, type: r }) : /* @__PURE__ */ y.jsxs(
        "button",
        {
          className: g,
          name: "placeholder-button",
          type: "button",
          onClick: n,
          children: [
            r === "button" ? /* @__PURE__ */ y.jsx($9e, { desc: t, hasErrors: a.length > 0 }) : /* @__PURE__ */ y.jsx(M9e, { desc: t, hasErrors: a.length > 0, icon: e, size: i }),
            x
          ]
        }
      ) })
    }
  );
}
mc.propTypes = {
  icon: A.oneOf(["image", "gallery", "video", "audio", "file", "product"]),
  desc: A.string,
  size: A.oneOf(["xsmall", "small", "medium", "large"]),
  type: A.oneOf(["image", "button"]),
  borderStyle: A.oneOf(["squared", "rounded"])
};
function Xo({ style: t, fullWidth: e, bgStyle: n }) {
  return /* @__PURE__ */ y.jsx("div", { className: `rounded-full bg-grey-200 dark:bg-black ${e ? "w-full" : "mx-auto w-3/5"} ${n === "transparent" ? "bg-white/30" : "bg-grey-200"}`, "data-testid": "progress-bar", children: /* @__PURE__ */ y.jsx("div", { className: "rounded-full bg-green py-1 text-center text-2xs leading-none text-white", style: t }) });
}
Xo.propTypes = {
  style: A.object,
  fullWidth: A.bool
};
function Yi({ fileInputRef: t }) {
  var e;
  (e = t.current) == null || e.click();
}
function W2({
  className: t,
  imgClassName: e,
  src: n,
  alt: i,
  desc: r,
  icon: s,
  size: o,
  type: a,
  borderStyle: l = "squared",
  backgroundSize: u = "cover",
  mimeTypes: f,
  onFileChange: d,
  dragHandler: h,
  isEditing: m = !0,
  isLoading: g,
  isPinturaEnabled: w,
  openImageEditor: x,
  progress: _,
  errors: S,
  onRemoveMedia: C = () => {
  },
  additionalActions: E,
  setFileInputRef: M
}) {
  const $ = ct(null), P = (L) => {
    $.current = L, M == null || M(L);
  }, W = {
    width: `${_ == null ? void 0 : _.toFixed(0)}%`
  }, z = (L) => {
    L.stopPropagation(), C();
  };
  return !g && !n ? /* @__PURE__ */ y.jsxs("div", { className: t, children: [
    /* @__PURE__ */ y.jsx(
      mc,
      {
        borderStyle: l,
        dataTestId: "media-upload-placeholder",
        desc: m ? r : "",
        errorDataTestId: "media-upload-errors",
        errors: S,
        filePicker: () => Yi({ fileInputRef: $ }),
        icon: s,
        isDraggedOver: h == null ? void 0 : h.isDraggedOver,
        placeholderRef: h == null ? void 0 : h.setRef,
        size: o,
        type: a
      }
    ),
    /* @__PURE__ */ y.jsx(
      z2,
      {
        fileInputRef: P,
        filePicker: () => Yi({ fileInputRef: $ }),
        mimeTypes: f,
        onFileChange: d
      }
    )
  ] }) : /* @__PURE__ */ y.jsxs("div", { className: nt(
    "group/image relative flex items-center justify-center",
    g ? "min-w-[6.8rem]" : "min-w-[5.2rem]",
    l === "rounded" && "rounded",
    t
  ), "data-testid": "media-upload-filled", children: [
    n && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
      /* @__PURE__ */ y.jsx("img", { alt: i, className: nt("mx-auto h-full w-auto min-w-[5.2rem]", l === "rounded" && "rounded-lg", u === "cover" ? "object-cover" : "object-contain", e), src: n }),
      /* @__PURE__ */ y.jsx("div", { className: nt("absolute inset-0 bg-gradient-to-t from-black/0 via-black/5 to-black/30 opacity-0 transition-all group-hover/image:opacity-100", l === "rounded" && "rounded-lg") })
    ] }),
    !g && /* @__PURE__ */ y.jsxs("div", { className: "absolute right-1 top-1 flex space-x-1 opacity-0 transition-all group-hover/image:opacity-100", children: [
      E,
      w && /* @__PURE__ */ y.jsx($l, { Icon: N2, label: "Edit", onClick: () => x({
        image: n,
        handleSave: (L) => {
          d({
            target: {
              files: [L]
            }
          });
        }
      }) }),
      /* @__PURE__ */ y.jsx($l, { dataTestId: "media-upload-remove", Icon: Bf, label: "Delete", onClick: z })
    ] }),
    g && /* @__PURE__ */ y.jsx(
      "div",
      {
        className: nt("absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-grey-100", l === "rounded" && "rounded-lg"),
        "data-testid": "custom-thumbnail-progress",
        children: /* @__PURE__ */ y.jsx(Xo, { style: W })
      }
    )
  ] });
}
W2.propTypes = {
  additionalActions: A.node,
  alt: A.string,
  backgroundSize: A.oneOf(["cover", "contain"]),
  borderStyle: A.oneOf(["squared", "rounded"]),
  className: A.string,
  desc: A.string,
  dragHandler: A.shape({ isDraggedOver: A.bool, setRef: A.func }),
  errors: A.arrayOf(A.shape({ message: A.string })),
  icon: A.string,
  imgClassName: A.string,
  isEditing: A.bool,
  isLoading: A.bool,
  isPinturaEnabled: A.bool,
  mimeTypes: A.arrayOf(A.string),
  onFileChange: A.func,
  onRemoveMedia: A.func,
  openImageEditor: A.func,
  progress: A.number,
  setFileInputRef: A.func,
  size: A.string,
  src: A.string,
  type: A.oneOf(["image", "button"])
};
function N9e({ item: t, selected: e, onChange: n }) {
  let i = "";
  e && (i = "bg-grey-100 dark:bg-grey-900");
  const r = (s) => {
    s.preventDefault(), n(t);
  };
  return /* @__PURE__ */ y.jsx("li", { className: `${i} m-0 hover:bg-grey-100 dark:hover:bg-grey-900`, children: /* @__PURE__ */ y.jsx(
    "button",
    {
      className: "size-full cursor-pointer px-3 py-[7px] text-left dark:text-white",
      "data-testid": "multiselect-dropdown-item",
      type: "button",
      onMouseDownCapture: r,
      children: t.label
    }
  ) }, t.name);
}
function A9e({ placeholder: t = "", items: e = [], availableItems: n = [], onChange: i, dataTestId: r, allowAdd: s = !0 }) {
  const [o, a] = j.useState(!1), [l, u] = j.useState(""), [f, d] = j.useState(!1), h = j.useRef(null), m = (z) => {
    a(!o), o || z.target.focus();
  }, g = () => {
    a(!1), u(""), d(!1);
  }, w = () => {
    d(!0), m();
  }, x = (z) => {
    !z.name || e != null && e.includes(z.name) || (i(e.concat(z.name)), u(""));
  }, _ = (z, Z) => {
    z.preventDefault(), z.stopPropagation(), i(e.filter((L) => L !== Z.name));
  }, S = (z) => {
    z.key === "Backspace" && !l && i(e.slice(0, -1));
  }, C = (z, Z) => /* @__PURE__ */ y.jsx(N9e, { item: z, selected: Z, onChange: x }, z.name), E = e.map((z) => ({ name: z, label: z })), $ = n.map((z) => ({ name: z, label: z })).filter(
    (z) => !E.some((Z) => Z.name === z.name)
  ).filter((z) => z.name.toLocaleLowerCase().includes(l.toLocaleLowerCase()));
  let P = "";
  const W = $[0];
  return l && s && (e.find((Z) => Z.toLocaleLowerCase() === l.toLocaleLowerCase()) || n.find((Z) => Z.toLocaleLowerCase() === l.toLocaleLowerCase()) || $.unshift({ name: l, label: /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    "Add ",
    /* @__PURE__ */ y.jsxs("strong", { children: [
      '"',
      l,
      '"...'
    ] })
  ] }) })), /* @__PURE__ */ y.jsxs("div", { className: "relative z-0 font-sans text-sm font-normal", "data-testid": r, children: [
    /* @__PURE__ */ y.jsxs(
      "div",
      {
        className: `relative flex w-full cursor-text flex-wrap gap-1 rounded-lg border ${f ? "border-green bg-white shadow-[0_0_0_2px_rgba(48,207,67,.25)] dark:bg-grey-925" : "border-grey-100 bg-grey-100 dark:border-transparent dark:bg-grey-900 dark:hover:bg-grey-925"} px-[10px] py-2 pr-5 font-sans text-sm font-normal leading-[1.5] text-grey-900 placeholder:text-grey-500 focus-visible:outline-none dark:text-white dark:selection:bg-grey-800 dark:placeholder:text-grey-700`,
        type: "button",
        onClick: () => h.current.focus(),
        children: [
          E.map((z) => /* @__PURE__ */ y.jsxs(
            "button",
            {
              className: "flex cursor-pointer items-center gap-1.5 rounded bg-black py-px pl-2 pr-1 leading-[1.5] text-white dark:bg-grey-100 dark:text-grey-900",
              "data-testid": "multiselect-dropdown-selected",
              type: "button",
              onMouseDownCapture: (Z) => _(Z, z),
              children: [
                z.label,
                /* @__PURE__ */ y.jsx(vp, { className: "mt-px size-[1rem] stroke-[3]" })
              ]
            },
            z.name
          )),
          /* @__PURE__ */ y.jsx("div", { className: "flex-1", children: /* @__PURE__ */ y.jsx(
            "input",
            {
              ref: h,
              className: "size-full min-w-[5rem] appearance-none bg-transparent px-0 leading-none outline-none",
              placeholder: E.length === 0 ? t : "",
              value: l,
              onBlur: g,
              onChange: (z) => u(z.target.value),
              onFocus: w,
              onKeyDown: S
            }
          ) }),
          /* @__PURE__ */ y.jsx(tY, { className: `absolute right-3 top-4 size-2 text-grey-900 ${o && "rotate-180"}` })
        ]
      }
    ),
    o && !!$.length && /* @__PURE__ */ y.jsxs(nT, { children: [
      P,
      /* @__PURE__ */ y.jsx(
        rT,
        {
          defaultSelected: W,
          getItem: C,
          items: $,
          onSelect: x
        }
      )
    ] })
  ] });
}
function GC(t, e) {
  return GC = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
    return i.__proto__ = r, i;
  }, GC(t, e);
}
function D9e(t, e) {
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, GC(t, e);
}
A.number, A.number, A.number, A.func;
const iY = ({ tabs: t, defaultTab: e, tabContent: n }) => {
  const [i, r] = ft(e || t[0].id), s = (o) => {
    r(o);
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx("div", { className: `no-scrollbar flex gap-4 border-b border-grey-300 dark:border-grey-900 ${t.length > 1 ? "w-full px-6" : "mx-6"}`, children: t.map((o) => /* @__PURE__ */ y.jsx(
      "button",
      {
        className: `-mb-px appearance-none whitespace-nowrap pb-3 pt-4 text-sm font-semibold transition-all ${t.length > 1 ? "cursor-pointer border-b-2" : "cursor-default"} ${i === o.id ? "border-black text-black dark:border-white dark:text-white" : "border-transparent text-grey-600 hover:border-grey-500 dark:text-grey-500 dark:hover:border-grey-500"}`,
        "data-testid": `tab-${o.id}`,
        type: "button",
        onClick: () => s(o.id),
        children: o.label
      },
      o.id
    )) }),
    /* @__PURE__ */ y.jsx("div", { className: "flex flex-col gap-3 p-6 pt-4", "data-testid": `tab-contents-${i}`, children: n[i] })
  ] });
};
iY.propTypes = {
  tabs: A.arrayOf(
    A.shape({
      id: A.string.isRequired,
      label: A.string.isRequired
    })
  ).isRequired,
  defaultTab: A.string,
  tabContent: A.objectOf(A.node).isRequired
};
function rY({ isChecked: t, onChange: e, dataTestId: n }) {
  return /* @__PURE__ */ y.jsxs("label", { className: "relative inline-block h-4 w-7 outline-none", "data-testid": n, id: n, children: [
    /* @__PURE__ */ y.jsx(
      "input",
      {
        checked: t,
        className: "peer absolute hidden",
        type: "checkbox",
        onChange: e
      }
    ),
    /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 cursor-pointer rounded-full bg-grey-300 transition-all before:absolute before:bottom-[2px] before:left-[2px] before:size-3 before:rounded-full before:bg-white before:transition-all before:duration-100 peer-checked:bg-black peer-checked:before:translate-x-[12px] dark:bg-grey-800 dark:peer-checked:bg-green" })
  ] });
}
rY.propTypes = {
  isChecked: A.bool,
  onChange: A.func
};
function Go({ children: t, darkMode: e, cardWidth: n, tabs: i, defaultTab: r }) {
  const { ref: s } = X8e({}, n), o = j.useMemo(() => i ? typeof t == "object" && t !== null ? t : { default: t } : { default: t }, [i, t]);
  return (
    // Ideally we would use Portal to avoid issues with transformed ancestors (https://bugs.chromium.org/p/chromium/issues/detail?id=20574)
    // However, Portal causes problems with drag/drop, focus, etc
    /* @__PURE__ */ y.jsx("div", { className: `!mt-0 touch-none ${e ? "dark" : ""}`, children: i ? /* @__PURE__ */ y.jsx(
      "div",
      {
        ref: s,
        className: "not-kg-prose fixed left-0 top-0 z-[9999999] m-0 flex w-[320px] flex-col rounded-lg bg-white bg-clip-padding font-sans shadow-lg will-change-transform dark:bg-grey-950 dark:shadow-xl",
        "data-testid": "settings-panel",
        "data-kg-settings-panel": !0,
        children: /* @__PURE__ */ y.jsx(iY, { defaultTab: r, tabContent: o, tabs: i })
      }
    ) : /* @__PURE__ */ y.jsx(
      "div",
      {
        ref: s,
        className: "not-kg-prose fixed left-0 top-0 z-[9999999] m-0 flex w-[320px] flex-col gap-3 rounded-lg bg-white bg-clip-padding p-6 font-sans shadow-lg will-change-transform dark:bg-grey-950 dark:shadow-xl",
        "data-testid": "settings-panel",
        "data-kg-settings-panel": !0,
        children: t
      }
    ) })
  );
}
function ks({ label: t, description: e, isChecked: n, onChange: i, dataTestId: r }) {
  return /* @__PURE__ */ y.jsxs("label", { className: "flex w-full cursor-pointer items-center justify-between", children: [
    /* @__PURE__ */ y.jsxs("div", { children: [
      /* @__PURE__ */ y.jsx("div", { className: "text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", children: t }),
      e && /* @__PURE__ */ y.jsx("p", { className: "mt-1 w-11/12 text-xs font-normal leading-snug text-grey-700 dark:text-grey-600", children: e })
    ] }),
    /* @__PURE__ */ y.jsx("div", { className: "flex shrink-0 pl-2", children: /* @__PURE__ */ y.jsx(rY, { dataTestId: r, isChecked: n, onChange: i }) })
  ] });
}
function zf({ label: t, hideLabel: e, description: n, onChange: i, value: r, placeholder: s, dataTestId: o, onBlur: a }) {
  return /* @__PURE__ */ y.jsxs("div", { className: "flex w-full flex-col justify-between", children: [
    /* @__PURE__ */ y.jsx("div", { className: e ? "sr-only" : "mb-1.5 text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", children: t }),
    /* @__PURE__ */ y.jsx(iT, { dataTestId: o, placeholder: s, value: r, onBlur: a, onChange: i }),
    n && /* @__PURE__ */ y.jsx("p", { className: "text-xs font-normal leading-snug text-grey-700 dark:text-grey-600", children: n })
  ] });
}
function wp({ dataTestId: t, label: e, value: n, onChange: i }) {
  const { cardConfig: r } = j.useContext(dt), [s, o] = j.useState([]);
  j.useEffect(() => {
    r != null && r.fetchAutocompleteLinks && r.fetchAutocompleteLinks().then((l) => {
      o(l.map((u) => ({ value: u.value, label: u.label })));
    });
  }, [r]);
  const a = s.filter((l) => l.label.toLocaleLowerCase().includes(n.toLocaleLowerCase()));
  return /* @__PURE__ */ y.jsx(
    P9e,
    {
      dataTestId: t,
      label: e,
      listOptions: a,
      placeholder: "https://yoursite.com/#/portal/signup/",
      value: n,
      onChange: i
    }
  );
}
function P9e({ dataTestId: t, description: e, label: n, listOptions: i, onChange: r, placeholder: s, value: o }) {
  function a(u) {
    r(u.value);
  }
  const l = (u, f, d, h) => /* @__PURE__ */ y.jsxs(
    _q,
    {
      className: nt(
        f && "bg-grey-100 dark:bg-grey-925",
        "m-0 cursor-pointer px-3 py-[7px] text-left hover:bg-grey-100 dark:hover:bg-grey-925"
      ),
      dataTestId: t,
      item: u,
      scrollIntoView: h,
      selected: f,
      onClick: a,
      onMouseOver: d,
      children: [
        /* @__PURE__ */ y.jsx("span", { className: "block text-sm font-normal leading-tight text-black dark:text-white", "data-testid": `${t}-listOption-${u.label}`, children: u.label }),
        /* @__PURE__ */ y.jsx("span", { className: "block truncate text-xs leading-tight text-grey-700 dark:text-grey-600", "data-testid": `${t}-listOption-${u.value}`, children: u.value })
      ]
    },
    u.value
  );
  return /* @__PURE__ */ y.jsxs("div", { className: "flex w-full flex-col justify-between", children: [
    /* @__PURE__ */ y.jsx("div", { className: "text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", children: n }),
    /* @__PURE__ */ y.jsx(
      Oq,
      {
        dataTestId: t,
        getItem: l,
        listOptions: i,
        placeholder: s,
        value: o,
        onChange: r
      }
    ),
    e && /* @__PURE__ */ y.jsx("p", { className: "text-xs font-normal leading-snug text-grey-700 dark:text-grey-600", children: e })
  ] });
}
function I9e({ label: t, description: e, value: n, menu: i, onChange: r, dataTestId: s }) {
  return /* @__PURE__ */ y.jsxs("div", { className: "flex w-full flex-col justify-between gap-1", children: [
    /* @__PURE__ */ y.jsx("div", { className: "text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", "data-testid": `${s}-label`, children: t }),
    /* @__PURE__ */ y.jsx(
      O9e,
      {
        dataTestId: s,
        menu: i,
        value: n,
        onChange: r
      }
    ),
    e && /* @__PURE__ */ y.jsx("p", { className: "text-xs font-normal leading-snug text-grey-700 dark:text-grey-600", children: e })
  ] });
}
function L9e({ label: t, description: e, placeholder: n = "", items: i, availableItems: r, onChange: s, dataTestId: o, allowAdd: a = !0 }) {
  return /* @__PURE__ */ y.jsxs("div", { className: "flex w-full flex-col justify-between gap-1", children: [
    /* @__PURE__ */ y.jsx("div", { className: "text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", children: t }),
    /* @__PURE__ */ y.jsx(
      A9e,
      {
        allowAdd: a,
        availableItems: r,
        dataTestId: o,
        items: i,
        placeholder: n,
        onChange: s
      }
    ),
    e && /* @__PURE__ */ y.jsx("p", { className: "text-xs font-normal leading-snug text-grey-700 dark:text-grey-600", children: e })
  ] });
}
function Aa({ label: t, onClick: e, selectedName: n, buttons: i, hasTooltip: r }) {
  return /* @__PURE__ */ y.jsxs("div", { className: "flex w-full items-center justify-between text-[1.3rem]", children: [
    /* @__PURE__ */ y.jsx("div", { className: "text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", children: t }),
    /* @__PURE__ */ y.jsx("div", { className: "shrink-0 pl-2", children: /* @__PURE__ */ y.jsx(Xq, { buttons: i, hasTooltip: r, selectedName: n, onClick: e }) })
  ] });
}
function tk({ label: t, onClick: e, selectedName: n, buttons: i, layout: r, dataTestId: s }) {
  return /* @__PURE__ */ y.jsxs("div", { className: `flex w-full text-[1.3rem] ${r === "stacked" ? "flex-col" : "items-center justify-between"}`, "data-testid": s, children: [
    /* @__PURE__ */ y.jsx("div", { className: "text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", children: t }),
    /* @__PURE__ */ y.jsx("div", { className: `shrink-0 ${r === "stacked" ? "-mx-1 pt-[.6rem]" : "pl-2"}`, children: /* @__PURE__ */ y.jsx(k9e, { buttons: i, selectedName: n, onClick: e }) })
  ] });
}
function C0({ label: t, isExpanded: e, onSwatchChange: n, onPickerChange: i, onTogglePicker: r, value: s, swatches: o, eyedropper: a, hasTransparentOption: l, dataTestId: u, children: f, showChildren: d }) {
  const h = (m) => {
    m.stopPropagation();
  };
  return /* @__PURE__ */ y.jsx("div", { className: "flex-col", "data-testid": u, onClick: h, children: /* @__PURE__ */ y.jsxs("div", { className: "flex w-full items-center justify-between text-[1.3rem]", children: [
    /* @__PURE__ */ y.jsx("div", { className: "text-sm font-medium tracking-normal text-grey-900 dark:text-grey-300", children: t }),
    /* @__PURE__ */ y.jsx("div", { className: "shrink-0 pl-2", children: /* @__PURE__ */ y.jsx(
      w9e,
      {
        eyedropper: a,
        hasTransparentOption: l,
        isExpanded: e,
        showChildren: d,
        swatches: o,
        value: s,
        onChange: i,
        onSwatchChange: n,
        onTogglePicker: r,
        children: f
      }
    ) })
  ] }) });
}
function H2({ className: t, imgClassName: e, label: n, hideLabel: i, onFileChange: r, isDraggedOver: s, placeholderRef: o, src: a, alt: l, isLoading: u, errors: f = [], progress: d, onRemoveMedia: h, icon: m, desc: g, size: w, type: x, stacked: _, borderStyle: S, mimeTypes: C, isPinturaEnabled: E, openImageEditor: M, setFileInputRef: $ }) {
  return /* @__PURE__ */ y.jsxs("div", { className: nt(t, !_ && "flex justify-between gap-3"), "data-testid": "media-upload-setting", children: [
    /* @__PURE__ */ y.jsx("div", { className: i ? "sr-only" : "mb-2 shrink-0 text-sm font-medium tracking-normal text-grey-900 dark:text-grey-400", children: n }),
    /* @__PURE__ */ y.jsx(
      W2,
      {
        alt: l,
        borderStyle: S,
        className: nt(
          _ && "h-32",
          !_ && a && "h-[5.2rem]",
          !_ && x !== "button" && !a && "h-[5.2rem] w-[7.2rem]"
        ),
        desc: g,
        dragHandler: { isDraggedOver: s, setRef: o },
        errors: f,
        icon: m,
        imgClassName: e,
        isLoading: u,
        isPinturaEnabled: E,
        mimeTypes: C,
        openImageEditor: M,
        progress: d,
        setFileInputRef: $,
        size: w,
        src: a,
        type: x,
        onFileChange: r,
        onRemoveMedia: h
      }
    )
  ] });
}
function pT({ visibilityOptions: t, toggleVisibility: e }) {
  return t.map((i, r) => {
    const s = i.toggles.map((o) => /* @__PURE__ */ y.jsx(
      ks,
      {
        dataTestId: `visibility-toggle-${i.key}-${o.key}`,
        isChecked: o.checked,
        label: o.label,
        onChange: () => e(i.key, o.key, !o.checked)
      },
      o.key
    ));
    return /* @__PURE__ */ y.jsxs("div", { className: "flex flex-col gap-3", "data-testid": "visibility-settings", children: [
      /* @__PURE__ */ y.jsx("p", { className: "text-sm font-bold tracking-normal text-grey-900 dark:text-grey-300", children: i.label }),
      s,
      r < t.length - 1 && /* @__PURE__ */ y.jsx("hr", { className: "not-kg-prose my-2 block border-t-grey-300 dark:border-t-grey-900" })
    ] }, i.key);
  });
}
function sY(t) {
  return {
    web: {
      nonMembers: t.web.nonMember,
      freeMembers: t.web.memberSegment.indexOf("status:free") !== -1,
      paidMembers: t.web.memberSegment.indexOf("status:-free") !== -1
    },
    email: {
      freeMembers: t.email.memberSegment.indexOf("status:free") !== -1,
      paidMembers: t.email.memberSegment.indexOf("status:-free") !== -1
    }
  };
}
function R9e(t, { isStripeEnabled: e = !0 } = {}) {
  t = t || RW.visibility.buildDefaultVisibility();
  const n = sY(t), i = [
    {
      label: "Web",
      key: "web",
      toggles: [
        { key: "nonMembers", label: "Public visitors", checked: n.web.nonMembers },
        { key: "freeMembers", label: "Free members", checked: n.web.freeMembers },
        { key: "paidMembers", label: "Paid members", checked: n.web.paidMembers }
      ]
    },
    {
      label: "Email",
      key: "email",
      toggles: [
        { key: "freeMembers", label: "Free members", checked: n.email.freeMembers },
        { key: "paidMembers", label: "Paid members", checked: n.email.paidMembers }
      ]
    }
  ];
  return e || (i[0].toggles = i[0].toggles.filter((r) => r.key !== "paidMembers"), i[1].toggles = i[1].toggles.filter((r) => r.key !== "paidMembers")), i;
}
function j9e(t) {
  var s, o, a, l, u;
  const e = t.find((f) => f.key === "web").toggles, n = [];
  (s = e.find((f) => f.key === "freeMembers")) != null && s.checked && n.push("status:free"), (o = e.find((f) => f.key === "paidMembers")) != null && o.checked && n.push("status:-free");
  const i = t.find((f) => f.key === "email").toggles, r = [];
  return (a = i.find((f) => f.key === "freeMembers")) != null && a.checked && r.push("status:free"), (l = i.find((f) => f.key === "paidMembers")) != null && l.checked && r.push("status:-free"), {
    web: {
      nonMember: ((u = e.find((f) => f.key === "nonMembers")) == null ? void 0 : u.checked) || !1,
      memberSegment: n.join(",")
    },
    email: {
      memberSegment: r.join(",")
    }
  };
}
const mT = (t, e, n) => {
  const i = n == null ? void 0 : n.stripeEnabled;
  let r;
  t.getEditorState().read(() => {
    r = N.$getNodeByKey(e).visibility;
  });
  const s = sY(r), o = R9e(r, { isStripeEnabled: i });
  return {
    visibilityData: s,
    visibilityOptions: o,
    toggleVisibility: (a, l, u) => {
      t.update(() => {
        const f = structuredClone(o), h = f.find((g) => g.key === a).toggles.find((g) => g.key === l);
        h.checked = u;
        const m = N.$getNodeByKey(e);
        m.visibility = j9e(f);
      });
    }
  };
};
function F9e({ nodeKey: t, html: e }) {
  const [n] = Oe.useLexicalComposerContext(), i = j.useContext(gn), { cardConfig: r, darkMode: s } = j.useContext(dt), [o, a] = j.useState(!1), { showVisibilitySettings: l } = Rf(), { visibilityOptions: u, toggleVisibility: f } = mT(n, t, r), d = [
    { id: "visibility", label: "Visibility" }
  ], h = (_) => {
    n.update(() => {
      const S = N.$getNodeByKey(t);
      S.html = _;
    });
  }, m = (_) => {
    _.preventDefault(), _.stopPropagation(), n.dispatchCommand(Vs, { cardKey: t, focusEditor: !1 });
  }, g = (_) => {
    var S;
    ((S = _ == null ? void 0 : _.relatedTarget) == null ? void 0 : S.className) !== "kg-prose" && n.dispatchCommand(_y, { cardKey: t });
  }, w = /* @__PURE__ */ y.jsx(
    pT,
    {
      toggleVisibility: f,
      visibilityOptions: u
    }
  ), x = j.useCallback((_) => {
    _.preventDefault(), _.stopPropagation(), n.dispatchCommand(yT, { cardKey: t });
  }, [n, t]);
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      Uq,
      {
        darkMode: s,
        html: e,
        isEditing: i.isEditing,
        updateHtml: h,
        onBlur: g
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "html",
        isVisible: o,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => a(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "html",
        isVisible: i.isSelected && !o && !i.isEditing,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "edit-html",
              icon: "edit",
              isActive: !1,
              label: "Edit",
              onClick: m
            }
          ),
          /* @__PURE__ */ y.jsx(Zn, {}),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "show-visibility",
              icon: "visibility",
              isActive: l,
              label: "Visibility",
              onClick: x
            }
          ),
          /* @__PURE__ */ y.jsx(Zn, { hide: !r.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !r.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => a(!0)
            }
          )
        ] })
      }
    ),
    l && i.isSelected && /* @__PURE__ */ y.jsx(
      Go,
      {
        darkMode: s,
        defaultTab: "visibility",
        tabs: d,
        onMouseDown: (_) => {
          _.preventDefault(), _.stopPropagation();
        },
        children: {
          visibility: w
        }
      }
    )
  ] });
}
const oY = N.createCommand();
class Z1 extends x1 {
  getIcon() {
    return MS;
  }
  constructor(e = {}, n) {
    super(e, n);
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(
      qn,
      {
        IndicatorIcon: b8e,
        isVisibilityActive: this.getIsVisibilityActive(),
        nodeKey: this.getKey(),
        wrapperStyle: "wide",
        children: /* @__PURE__ */ y.jsx(
          F9e,
          {
            html: this.__html,
            nodeKey: this.getKey(),
            visibility: this.__visibility
          }
        )
      }
    );
  }
}
we(Z1, "kgMenu", {
  label: "HTML",
  desc: "Insert a HTML editor card",
  Icon: MS,
  insertCommand: oY,
  matches: ["html"],
  priority: 18,
  shortcut: "/html"
});
function B9e(t) {
  return new Z1(t);
}
function z9e(t) {
  return t instanceof Z1;
}
const vI = Gk;
var W9e = function(t = "", { ghostVersion: e = "4.0", type: n = "mobiledoc" } = {}) {
  const i = vI.coerce(e);
  return typeof t != "string" || (t || "").trim() === "" ? "" : vI.satisfies(i, "<4.x") ? n === "markdown" ? t.replace(/[^\w]/g, "").toLowerCase() : t.replace(/[<>&"?]/g, "").trim().replace(/[^\w]/g, "-").replace(/-{2,}/g, "-").toLowerCase() : encodeURIComponent(
    t.trim().toLowerCase().replace(/[\][!"#$%&'()*+,./:;<=>?@\\^_{|}~]/g, "").replace(/\s+/g, "-").replace(/^-|-{2,}|-$/g, "")
  );
}, H9e = {
  slugify: W9e
}, Q9e = H9e;
const bI = kB, yI = Gk, { slugify: U9e } = Q9e, Ad = {}, wI = function({ ghostVersion: t } = {}) {
  const e = function(n, i = {}) {
    let r = U9e(n, { ghostVersion: t, type: "markdown" });
    return i[r] && (i[r] += 1, r += i[r]), r;
  };
  return function(n) {
    const i = n.renderer.rules.heading_open;
    n.renderer.rules.heading_open = function(r, s, o, a, l) {
      const u = {};
      r[s].attrs = r[s].attrs || [];
      const f = r[s + 1].children.reduce(function(h, m) {
        return h + m.content;
      }, ""), d = e(f, u);
      return r[s].attrs.push(["id", d]), i ? i.apply(this, arguments) : l.renderToken.apply(l, arguments);
    };
  };
}, Z9e = function(t) {
  const e = yI.coerce(t.ghostVersion || "4.0");
  if (yI.satisfies(e, "<4.x")) {
    if (Ad["<4.x"])
      return Ad["<4.x"];
    const n = new bI({ html: !0, breaks: !0, linkify: !0 }).use(nw()).use(iw()).use(rw()).use(sw()).use(wI(t)).use(ow()).use(aw());
    return n.linkify.set({
      fuzzyLink: !1
    }), Ad["<4.x"] = n, n;
  } else {
    if (Ad.latest)
      return Ad.latest;
    const n = new bI({ html: !0, breaks: !0, linkify: !0 }).use(nw()).use(iw()).use(rw()).use(sw()).use(wI(t)).use(ow()).use(aw());
    return n.linkify.set({
      fuzzyLink: !1
    }), Ad.latest = n, n;
  }
};
var q9e = {
  render: function(t, e = {}) {
    return Z9e(e).render(t);
  }
}, Y9e = q9e;
const aY = /* @__PURE__ */ Gs(Y9e), gT = N.createCommand("PASTE_MARKDOWN_COMMAND"), vT = "text/plain", bT = "text/html", V9e = () => {
  const [t] = Oe.useLexicalComposerContext(), [e, n] = j.useState(!1);
  return j.useEffect(() => {
    const i = (r) => {
      r.key === "Shift" && n(!1);
    };
    return document.addEventListener("keyup", i), () => {
      document.removeEventListener("keyup", i);
    };
  }, [n]), j.useEffect(() => {
    const i = (r) => {
      r.key === "Shift" && n(!0);
    };
    return document.addEventListener("keydown", i), () => {
      document.removeEventListener("keydown", i);
    };
  }, [n]), j.useEffect(() => lt.mergeRegister(
    t.registerCommand(
      gT,
      ({ text: i, allowBr: r }) => {
        const s = N.$getSelection();
        if (!N.$isRangeSelection(s))
          return !1;
        const o = new DataTransfer();
        if (e)
          o.setData(vT, i);
        else {
          const a = aY.render(i), l = r ? a : a.replace(/<br\s?\/?>/g, ""), u = F2(l, { replaceJS: !0 });
          o.setData(bT, u);
        }
        return mf.$insertDataTransferForRichText(o, s, t), !0;
      },
      N.COMMAND_PRIORITY_LOW
    )
  ), [t, e]), null;
};
var lY = {}, uY = {}, E0 = {};
Object.defineProperty(E0, "__esModule", { value: !0 });
E0.denestTransform = cY;
E0.registerDenestTransform = K9e;
const xf = ni, Kc = N;
function X9e(t) {
  if (!(0, xf.$isListNode)(t))
    return !1;
  const e = t.getParent();
  return !((0, Kc.$isRootNode)(e) || (0, xf.$isListItemNode)(e));
}
function G9e(t) {
  if (!(0, xf.$isListItemNode)(t))
    return !1;
  const e = t.getParent();
  return !(0, xf.$isListNode)(e);
}
function kI(t) {
  return (0, Kc.$isLineBreakNode)(t) || (0, Kc.$isTextNode)(t) ? !1 : X9e(t) || G9e(t) || t.isInline && !t.isInline() && !(0, xf.$isListNode)(t) && !(0, xf.$isListItemNode)(t);
}
function cY(t, e) {
  const n = t.getChildren();
  if (!n.some(kI))
    return;
  const r = (0, Kc.$createParagraphNode)();
  let s = e(t);
  n.forEach((a) => {
    kI(a) ? (s.getChildrenSize() > 0 && (r.append(s), s = e(t)), r.append(a)) : s.append(a);
  }), s.getChildrenSize() > 0 && r.append(s);
  let o = t;
  for (; o.getParent() && o.getParent() !== (0, Kc.$getRoot)(); )
    o = o.getParentOrThrow();
  r.getChildren().reverse().forEach((a) => {
    if ((0, Kc.$isRootNode)(o.getParent()) && (0, xf.$isListItemNode)(a)) {
      const l = (0, Kc.$createParagraphNode)();
      l.append(...a.getChildren()), a.remove(), o.insertAfter(l);
      return;
    }
    o.insertAfter(a);
  }), t.remove(), r.remove();
}
function K9e(t, e, n) {
  return t.hasNodes([e]) ? t.registerNodeTransform(e, (i) => {
    cY(i, n);
  }) : () => {
  };
}
var T0 = {};
Object.defineProperty(T0, "__esModule", { value: !0 });
T0.removeAlignmentTransform = fY;
T0.registerRemoveAlignmentTransform = J9e;
function fY(t) {
  t.getFormatType() !== "" && t.setFormat("");
}
function J9e(t, e) {
  return t.hasNodes([e]) ? t.registerNodeTransform(e, fY) : () => {
  };
}
const dY = /* @__PURE__ */ Sk(b2e);
var $0 = {};
Object.defineProperty($0, "__esModule", { value: !0 });
$0.mergeListNodesTransform = hY;
$0.registerMergeListNodesTransform = e$e;
const nk = ni;
function hY(t) {
  const e = t.getNextSibling();
  (0, nk.$isListNode)(e) && (0, nk.$isListNode)(t) && e.getListType() === t.getListType() && (t.append(...e.getChildren()), e.remove());
}
function e$e(t) {
  return t.hasNodes([nk.ListNode]) ? t.registerNodeTransform(nk.ListNode, hY) : () => {
  };
}
var Q2 = {};
Object.defineProperty(Q2, "__esModule", { value: !0 });
Q2.removeAtLinkNodesTransform = pY;
Q2.registerRemoveAtLinkNodesTransform = t$e;
const xI = N, _I = dY;
function pY(t) {
  const e = t.getPreviousSibling(), n = t.getNextSibling();
  e ? (0, xI.$isTextNode)(e) && e.getTextContent().endsWith(" ") && e.setTextContent(e.getTextContent().slice(0, -1)) : n && (0, xI.$isTextNode)(n) && n.getTextContent().startsWith(" ") && n.setTextContent(n.getTextContent().slice(1)), t.remove();
}
function t$e(t) {
  return t.hasNodes([_I.AtLinkNode]) ? t.registerNodeTransform(_I.AtLinkNode, pY) : () => {
  };
}
(function(t) {
  var e = on && on.__createBinding || (Object.create ? function(h, m, g, w) {
    w === void 0 && (w = g);
    var x = Object.getOwnPropertyDescriptor(m, g);
    (!x || ("get" in x ? !m.__esModule : x.writable || x.configurable)) && (x = { enumerable: !0, get: function() {
      return m[g];
    } }), Object.defineProperty(h, w, x);
  } : function(h, m, g, w) {
    w === void 0 && (w = g), h[w] = m[g];
  }), n = on && on.__exportStar || function(h, m) {
    for (var g in h) g !== "default" && !Object.prototype.hasOwnProperty.call(m, g) && e(m, h, g);
  };
  Object.defineProperty(t, "__esModule", { value: !0 }), t.registerDefaultTransforms = d;
  const i = E0, r = T0, s = lt, o = N, a = rn, l = dY, u = ni, f = $0;
  n(E0, t), n($0, t), n(T0, t), n(Q2, t);
  function d(h) {
    return (0, s.mergeRegister)(
      // strip unwanted alignment formats
      (0, r.registerRemoveAlignmentTransform)(h, o.ParagraphNode),
      (0, r.registerRemoveAlignmentTransform)(h, a.HeadingNode),
      (0, r.registerRemoveAlignmentTransform)(h, l.ExtendedHeadingNode),
      (0, r.registerRemoveAlignmentTransform)(h, a.QuoteNode),
      // fix invalid nesting of nodes
      (0, i.registerDenestTransform)(h, o.ParagraphNode, () => (0, o.$createParagraphNode)()),
      (0, i.registerDenestTransform)(h, a.HeadingNode, (m) => (0, a.$createHeadingNode)(m.getTag())),
      (0, i.registerDenestTransform)(h, l.ExtendedHeadingNode, (m) => (0, a.$createHeadingNode)(m.getTag())),
      (0, i.registerDenestTransform)(h, a.QuoteNode, () => (0, a.$createQuoteNode)()),
      (0, i.registerDenestTransform)(h, u.ListNode, (m) => (0, u.$createListNode)(m.getListType(), m.getStart())),
      (0, i.registerDenestTransform)(h, u.ListItemNode, () => (0, u.$createListItemNode)()),
      // merge adjacent lists of the same type
      (0, f.registerMergeListNodesTransform)(h)
    );
  }
})(uY);
(function(t) {
  var e = on && on.__createBinding || (Object.create ? function(i, r, s, o) {
    o === void 0 && (o = s);
    var a = Object.getOwnPropertyDescriptor(r, s);
    (!a || ("get" in a ? !r.__esModule : a.writable || a.configurable)) && (a = { enumerable: !0, get: function() {
      return r[s];
    } }), Object.defineProperty(i, o, a);
  } : function(i, r, s, o) {
    o === void 0 && (o = s), i[o] = r[s];
  }), n = on && on.__exportStar || function(i, r) {
    for (var s in i) s !== "default" && !Object.prototype.hasOwnProperty.call(r, s) && e(r, i, s);
  };
  Object.defineProperty(t, "__esModule", { value: !0 }), n(uY, t);
})(lY);
const RO = (t) => {
  if (!t)
    return !1;
  const { metaKey: e, key: n, target: i } = t;
  return n === "Escape" || e && n === "Enter" ? !1 : i.matches("input, textarea") || i.cmView || i.cmIgnore || !!i.closest(".cm-editor");
}, Mn = N.createCommand("INSERT_CARD_COMMAND"), ju = N.createCommand("SELECT_CARD_COMMAND"), _y = N.createCommand("DESELECT_CARD_COMMAND"), Vs = N.createCommand("EDIT_CARD_COMMAND"), Wc = N.createCommand("DELETE_CARD_COMMAND"), KC = N.createCommand("PASTE_LINK_COMMAND"), yT = N.createCommand("SHOW_CARD_VISIBILITY_SETTINGS_COMMAND"), n$e = N.createCommand("HIDE_CARD_VISIBILITY_SETTINGS_COMMAND"), jO = 10, OI = {
  code: "`",
  superscript: "^",
  subscript: "~",
  strikethrough: "~~"
};
function Ic(t, e) {
  const n = N.$createNodeSelection();
  n.add(e), N.$setSelection(n), document.activeElement !== t.getRootElement() && t.getRootElement().focus({ preventScroll: !0 });
}
function Dd(t, e) {
  var i;
  const n = N.$getNodeByKey(e);
  (i = n == null ? void 0 : n.isEmpty) != null && i.call(n) && i$e(t, n);
}
function i$e(t, e) {
  if (N.$getRoot().getLastChild().is(e)) {
    const n = N.$createParagraphNode();
    N.$getRoot().append(n), n.select();
  } else {
    const n = e.getNextSibling();
    N.$isDecoratorNode(n) ? (xr(n), t.getRootElement().focus()) : n.selectStart();
  }
  e.remove();
}
function r$e({ editor: t, containerElem: e, cursorDidExitAtTop: n, isNested: i }) {
  const {
    selectedCardKey: r,
    setSelectedCardKey: s,
    isEditingCard: o,
    setIsEditingCard: a,
    setShowVisibilitySettings: l
  } = Rf(), u = j.useRef(!1);
  return j.useEffect(() => {
    const f = (h) => {
      u.current = h.shiftKey;
    }, d = (h) => {
      u.current = h.shiftKey;
    };
    return document.addEventListener("keydown", f), document.addEventListener("keyup", d), () => {
      document.removeEventListener("keydown", f), document.removeEventListener("keyup", d);
    };
  }, []), j.useEffect(() => {
    const f = (d) => {
      document.body.contains(d.target) && e.current && !e.current.contains(d.target) && t.getEditorState().read(() => {
        const h = N.$getSelection();
        if (N.$isNodeSelection(h)) {
          const m = h.getNodes()[0];
          qc(m) && t.dispatchCommand(_y, { cardKey: m.getKey() });
        }
      });
    };
    return i || window.addEventListener("mousedown", f), () => {
      window.removeEventListener("mousedown", f);
    };
  }, [t, e, i]), j.useEffect(() => lt.mergeRegister(
    t.registerUpdateListener(({ editorState: f, tags: d }) => {
      if (d.has("collaboration") || d.has("card-export") || i || document.activeElement.closest("[data-lexical-decorator]"))
        return;
      const { isCardSelected: h, cardKey: m, cardNode: g } = f.read(() => {
        const w = N.$getSelection();
        if (N.$isNodeSelection(w) && w.getNodes().length === 1 && qc(w.getNodes()[0])) {
          const _ = w.getNodes()[0];
          return { isCardSelected: !0, cardKey: _.getKey(), cardNode: _ };
        } else
          return { isCardSelected: !1 };
      });
      h && !r ? (s(m), a(!1)) : h && r !== m && t.update(() => {
        Dd(t, r), s(m), a(!1);
      }, { tag: "history-merge" }), !h && r && t.update(() => {
        Dd(t, r), s(null), a(!1);
      }, { tag: "history-merge" }), h && g.__openInEditMode && (t.update(() => {
        g.clearOpenInEditMode();
      }, { tag: "history-merge" }), a(!0));
    }),
    t.registerCommand(
      Mn,
      ({ cardNode: f, openInEditMode: d }) => {
        let h;
        const m = N.$getSelection();
        if (N.$isRangeSelection(m))
          h = m.focus.getNode();
        else if (N.$isNodeSelection(m))
          h = m.getNodes()[0];
        else
          return !1;
        return h !== null && (l8e({ selectedNode: h, newNode: f }), s(f.getKey()), d && a(!0)), !0;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      ju,
      ({ cardKey: f }) => {
        var d;
        if (r === f && o) {
          const h = N.$getNodeByKey(f);
          if ((d = h.isEmpty) != null && d.call(h))
            return t.dispatchCommand(Wc, { cardKey: f }), !0;
        }
        r && r !== f && (Dd(t, r), l(!1)), Ic(t, f), s(f), a(!1);
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      Vs,
      ({ cardKey: f, focusEditor: d }) => {
        var m;
        r && r !== f && Dd(t, r), Ic(t, f), s(f);
        const h = N.$getNodeByKey(f);
        (m = h.hasEditMode) != null && m.call(h) && a(!0);
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      _y,
      ({ cardKey: f }) => {
        Dd(t, f), s(null), a(!1), l(!1);
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      Wc,
      ({ cardKey: f, direction: d = "forward" }) => {
        const h = N.$getNodeByKey(f), m = h.getPreviousSibling(), g = h.getNextSibling();
        if (d === "backward" && m)
          if (N.$isDecoratorNode(m)) {
            const w = N.$createNodeSelection();
            w.add(m.getKey()), N.$setSelection(w);
          } else m.selectEnd ? m.selectEnd() : h.selectPrevious();
        else if (g)
          if (N.$isDecoratorNode(g)) {
            const w = N.$createNodeSelection();
            w.add(g.getKey()), N.$setSelection(w);
          } else g.selectStart ? g.selectStart() : h.selectNext();
        else {
          const w = N.$createParagraphNode();
          N.$getRoot().append(w), w.select();
        }
        return h.remove(), t.getRootElement().focus(), !0;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_DOWN_COMMAND,
      (f) => !!RO(f),
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_ENTER_COMMAND,
      (f) => {
        var d, h;
        if (r && (f.metaKey || f.ctrlKey)) {
          const m = N.$getNodeByKey(r);
          if ((d = m.hasEditMode) != null && d.call(m)) {
            if (f.preventDefault(), o) {
              if (t.getRootElement().focus({ preventScroll: !0 }), (h = m.isEmpty) != null && h.call(m)) {
                if (N.$getRoot().getLastChild().is(m)) {
                  const g = N.$createParagraphNode();
                  N.$getRoot().append(g), g.select();
                } else
                  Ic(t, r), t.dispatchCommand(N.KEY_ARROW_DOWN_COMMAND);
                m.remove();
              } else
                Ic(t, r);
              a(!1);
            } else
              a(!0);
            return !0;
          }
        }
        if (!f._fromNested && document.activeElement !== t.getRootElement())
          return !0;
        if (!i && r) {
          f.preventDefault();
          const m = N.$getNodeByKey(r), g = N.$createParagraphNode();
          return m.insertAfter(g), g.select(), !0;
        }
        if (!i) {
          const m = N.$getSelection(), g = m == null ? void 0 : m.getNodes()[0];
          if (N.$isTextNode(g)) {
            const w = g.getTextContent();
            if (w.match(/^```(\w{1,10})?/)) {
              f.preventDefault();
              const x = w.replace(/^```/, ""), _ = g.getTopLevelElement().insertAfter(BC({ language: x, _openInEditMode: !0 }));
              g.getTopLevelElement().remove();
              const S = N.$createNodeSelection();
              return S.add(_.getKey()), N.$setSelection(S), !0;
            }
          }
        }
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_ARROW_UP_COMMAND,
      (f) => {
        const d = N.$getSelection();
        if (f != null && f.shiftKey) {
          if (N.$isRangeSelection(d)) {
            let h = d.anchor.getNode();
            if (!N.$isRootNode(h)) {
              h = h.getTopLevelElement();
              let m = d.focus.getNode().getTopLevelElement(), g = m.getTopLevelElement().getPreviousSibling();
              if (N.$isTextNode(m) && N.$isTextNode(g))
                return !1;
              if (N.$isDecoratorNode(h) || N.$isDecoratorNode(g))
                return d.anchor.offset === 0 ? (d.focus.set("root", m.getIndexWithinParent() - 1, "element"), d.anchor.set("root", h.getIndexWithinParent(), "element")) : (d.focus.set("root", m.getIndexWithinParent(), "element"), d.anchor.set("root", h.getIndexWithinParent() + 1, "element")), f.preventDefault(), !0;
            }
            if (N.$isRootNode(h))
              return d.focus.offset > 0 && d.focus.set("root", d.focus.offset - 1, "element"), f.preventDefault(), !0;
          }
          return !1;
        }
        if (f != null && f._fromCaptionEditor && Ic(t, r), document.activeElement !== t.getRootElement())
          return !0;
        if (N.$isNodeSelection(d)) {
          const m = d.getNodes()[0].getPreviousSibling();
          return !m && n ? (d.clear(), n(), !0) : N.$isDecoratorNode(m) ? (xr(m), !0) : (f.preventDefault(), m.selectEnd(), !0);
        }
        if (N.$isRangeSelection(d) && d.isCollapsed()) {
          const h = d.anchor.getNode().getTopLevelElement(), m = window.getSelection();
          if (n && tI(d))
            return n(), !0;
          const g = (h == null ? void 0 : h.getTextContent().trim()) === "" && d.anchor.offset === 0, w = d.anchor.offset === 0 && d.focus.offset === 0;
          if (g || w) {
            const x = h.getPreviousSibling();
            if (N.$isDecoratorNode(x))
              return xr(x), !0;
          } else if (nI(m, jO)) {
            const _ = h.getPreviousSibling();
            if (N.$isDecoratorNode(_))
              return xr(_), !0;
          }
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_ARROW_DOWN_COMMAND,
      (f) => {
        const d = N.$getSelection();
        if (f != null && f.shiftKey) {
          if (N.$isRangeSelection(d)) {
            let h = d.anchor.getNode();
            if (!N.$isRootNode(h)) {
              h = h.getTopLevelElement();
              let m = d.focus.getNode().getTopLevelElement(), g = m.getTopLevelElement().getNextSibling();
              if (N.$isTextNode(m) && N.$isTextNode(g))
                return !1;
              if (N.$isDecoratorNode(h) || N.$isDecoratorNode(g))
                return d.anchor.offset === h.getTextContentSize() ? (d.anchor.set("root", h.getIndexWithinParent() + 1, "element"), d.focus.set("root", m.getIndexWithinParent() + 2, "element")) : (d.anchor.set("root", h.getIndexWithinParent(), "element"), d.focus.set("root", m.getIndexWithinParent() + 1, "element")), f.preventDefault(), !0;
            }
            if (N.$isRootNode(h))
              return d.focus.offset <= h.getLastChildOrThrow().getIndexWithinParent() && d.focus.set("root", d.focus.offset + 1, "element"), f.preventDefault(), !0;
          }
          return !1;
        }
        if (f != null && f._fromCaptionEditor && Ic(t, r), document.activeElement !== t.getRootElement())
          return !0;
        if (N.$isNodeSelection(d)) {
          const h = d.getNodes()[0], m = h.getNextSibling();
          if (!m) {
            const g = N.$createParagraphNode();
            return h.insertAfter(g), g.select(), !0;
          }
          return N.$isDecoratorNode(m) ? (xr(m), !0) : (f == null || f.preventDefault(), m.selectStart(), !0);
        }
        if (N.$isRangeSelection(d) && d.isCollapsed()) {
          const h = d.anchor.getNode().getTopLevelElement(), m = window.getSelection(), g = Bq(m.anchorNode), w = (h == null ? void 0 : h.getTextContent().trim()) === "" && d.anchor.offset === 0, x = m.rangeCount !== 0 && m.anchorNode === g && m.anchorOffset === g.children.length - 1 && m.focusOffset === g.children.length - 1;
          if (w || x) {
            const _ = h.getNextSibling();
            if (N.$isDecoratorNode(_))
              return xr(_), !0;
          } else {
            const S = m.getRangeAt(0).cloneRange().getClientRects();
            if (S.length > 0) {
              const C = S.length > 1 ? S[1] : S[0], E = g.getBoundingClientRect();
              if (Math.abs(C.bottom - E.bottom) < jO) {
                const M = h.getNextSibling();
                if (N.$isDecoratorNode(M))
                  return xr(M), !0;
              }
            }
          }
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_ARROW_LEFT_COMMAND,
      (f) => {
        if (document.activeElement !== t.getRootElement())
          return !0;
        const d = N.$getSelection();
        if (n) {
          if (N.$isNodeSelection(d)) {
            if (!d.getNodes()[0].getPreviousSibling())
              return f.preventDefault(), d.clear(), n == null || n(), !0;
          } else if (tI(d))
            return f.preventDefault(), n(), !0;
        }
        if (!N.$isNodeSelection(d))
          return !1;
        const h = d.getNodes()[0];
        let m;
        return qc(h) ? m = h.getPreviousSibling() : m = h.getTopLevelElement().getPreviousSibling(), N.$isDecoratorNode(m) ? (f.preventDefault(), xr(m), !0) : !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_ARROW_RIGHT_COMMAND,
      (f) => {
        if (document.activeElement !== t.getRootElement())
          return !0;
        const d = N.$getSelection();
        if (!N.$isNodeSelection(d))
          return !1;
        const h = d.getNodes(), m = h[h.length - 1];
        let g;
        return qc(m) ? g = m.getNextSibling() : g = m.getTopLevelElement().getNextSibling(), N.$isDecoratorNode(g) ? (f.preventDefault(), xr(g), !0) : !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_MODIFIER_COMMAND,
      (f) => {
        const { altKey: d, ctrlKey: h, metaKey: m, shiftKey: g, code: w, key: x } = f, _ = x === "ArrowUp" || f.keyCode === 38, S = x === "ArrowDown" || f.keyCode === 40;
        if (m && (_ || S)) {
          const C = N.$getSelection(), E = N.$isNodeSelection(C), M = N.$isDecoratorNode(N.$getRoot().getFirstChild()), $ = N.$isDecoratorNode(N.$getRoot().getLastChild());
          if (E || M || $) {
            if (S) {
              f.preventDefault();
              const P = N.$getRoot().getLastChild();
              return N.$isDecoratorNode(P) ? (xr(P), !0) : (P.selectEnd(), !0);
            }
            if (_) {
              f.preventDefault();
              const P = N.$getRoot().getFirstChild();
              return N.$isDecoratorNode(P) ? (xr(P), !0) : (P.selectStart(), !0);
            }
          }
        }
        if (h && w === "KeyQ") {
          f.preventDefault();
          const C = N.$getSelection();
          if (N.$isRangeSelection(C)) {
            const E = C.anchor.getNode().getTopLevelElement();
            N.$isParagraphNode(E) ? Ri.$setBlocksType(C, () => rn.$createQuoteNode()) : rn.$isQuoteNode(E) ? Ri.$setBlocksType(C, () => FW()) : ZN(E) && Ri.$setBlocksType(C, () => N.$createParagraphNode());
          }
        }
        if ((h || m) && d && w === "KeyH")
          return f.preventDefault(), t.dispatchCommand(N.FORMAT_TEXT_COMMAND, "highlight"), !0;
        if (h && g && w === "KeyK")
          return t.dispatchCommand(N.FORMAT_TEXT_COMMAND, "code"), !0;
        if (h && d && w === "KeyU")
          return t.dispatchCommand(N.FORMAT_TEXT_COMMAND, "strikethrough"), !0;
        if (h && d && x.match(/^[1-6]$/)) {
          f.preventDefault();
          const C = N.$getSelection();
          N.$isRangeSelection(C) && Ri.$setBlocksType(C, () => rn.$createHeadingNode(`h${x}`));
        }
        if (h && w === "KeyL") {
          f.preventDefault();
          const C = N.$getSelection();
          if (N.$isRangeSelection(C)) {
            const E = C.anchor.getNode().getTopLevelElement();
            ni.$isListNode(E) ? t.update(() => {
              const M = N.$createParagraphNode();
              Ri.$setBlocksType(C, () => M), M.setIndent(0);
            }) : d ? t.dispatchCommand(ni.INSERT_ORDERED_LIST_COMMAND, void 0) : t.dispatchCommand(ni.INSERT_UNORDERED_LIST_COMMAND, void 0);
          }
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    // backspace when card isn't selected
    t.registerCommand(
      N.KEY_BACKSPACE_COMMAND,
      (f) => {
        if (document.activeElement !== t.getRootElement())
          return !0;
        if (!i && r)
          return f.preventDefault(), t.dispatchCommand(Wc, { cardKey: r, direction: "backward" }), !0;
        const d = N.$getSelection();
        if (N.$isRangeSelection(d) && d.isCollapsed()) {
          const m = d.anchor.getNode(), g = m.getTopLevelElement(), w = g.getPreviousSibling(), x = d.anchor.offset === 0 && d.focus.offset === 0;
          if (x && ni.$isListItemNode(m) && m.getIndent() === 0 && m.isEmpty())
            return f.preventDefault(), t.dispatchCommand(N.INSERT_PARAGRAPH_COMMAND), !0;
          if (x && ki.$isLinkNode(m.getPreviousSibling())) {
            const M = m.getPreviousSibling().getLastDescendant();
            if (N.$isTextNode(M))
              return M.spliceText(M.getTextContentSize(), 1, "", !0), !0;
          }
          if (N.$isParagraphNode(m) && m.isEmpty() && N.$isDecoratorNode(w))
            return g.remove(), xr(w), !0;
          if (x && ni.$isListItemNode(m.getParent())) {
            const E = m.getParent();
            if (E.getIndent() === 0) {
              f.preventDefault();
              const M = N.$createParagraphNode();
              return M.append(...E.getChildren()), E.replace(M), !0;
            }
          }
          const _ = m.getParent();
          if (x && (rn.$isQuoteNode(_) || ZN(_))) {
            const E = N.$createParagraphNode();
            return _.getChildren().forEach((M) => {
              E.append(M);
            }), _.replace(E), E.selectStart(), f.preventDefault(), !0;
          }
          if (x && N.$isDecoratorNode(w) && _ === g && // handles lists, where the parent node is not the paragraph
          _.getFirstChild().is(m))
            return f.preventDefault(), w.remove(), !0;
          const S = m.getTextContentSize();
          if (d.anchor.offset === S && d.focus.offset === S && N.$isTextNode(m)) {
            const E = m.getTextContent();
            for (const M of Object.keys(OI))
              if (m.hasFormat(M)) {
                const $ = OI[M];
                let P = E;
                return M === "code" && E.match(/{.*?}(?![A-Za-z\s])/) || (P = $ + P + $), P = P.slice(0, -1), m.setFormat(0), m.setTextContent(P), d.anchor.offset = d.anchor.offset + P.length - E.length, d.focus.offset = d.focus.offset + P.length - E.length, f.preventDefault(), !0;
              }
          }
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_DELETE_COMMAND,
      (f) => {
        if (document.activeElement !== t.getRootElement())
          return !0;
        if (!i && r)
          return f.preventDefault(), t.dispatchCommand(Wc, { cardKey: r, direction: "forward" }), !0;
        const d = N.$getSelection();
        if (N.$isRangeSelection(d) && d.isCollapsed()) {
          const h = d.anchor, m = h.getNode(), g = m.getTopLevelElement(), w = g.getNextSibling();
          if ((g == null ? void 0 : g.getTextContent().trim()) === "" && d.anchor.offset === 0 && N.$isDecoratorNode(w))
            return f.preventDefault(), g.remove(), xr(w), !0;
          if ((h.type === "element" && N.$isElementNode(m) && h.offset === m.getChildrenSize() || h.type === "text" && h.offset === m.getTextContentSize() && h.getNode().getParent().getLastChild().is(h.getNode())) && N.$isDecoratorNode(w))
            return f.preventDefault(), w.remove(), !0;
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.DELETE_LINE_COMMAND,
      (f) => {
        if (r && document.activeElement === t.getRootElement() && !i)
          return t.dispatchCommand(Wc, { cardKey: r, direction: f ? "backward" : "forward" }), !0;
        const d = N.$getSelection();
        if (N.$isRangeSelection(d) && d.isCollapsed()) {
          const m = d.anchor.getNode(), g = m.getTopLevelElement(), w = g.getPreviousSibling(), x = g.getNextSibling(), _ = f ? w : x, S = window.getSelection(), C = nI(S, jO);
          if (N.$isDecoratorNode(_) && C)
            return f && N.$isLineBreakNode(m.getNextSibling()) ? (m.remove(), !0) : (g.remove(), xr(_), !0);
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_TAB_COMMAND,
      (f) => {
        if (document.activeElement !== t.getRootElement())
          return !0;
        if (f.shiftKey && n) {
          const d = N.$getSelection();
          if (N.$isNodeSelection(d))
            return f.preventDefault(), d.clear(), n(), !0;
          let h;
          if (d.isCollapsed()) {
            const g = d.anchor.getNode();
            h = N.$isTextNode(g) ? [g.getParent()] : [g];
          } else
            h = d.getNodes();
          if (!h.some((g) => g.getIndent && g.getIndent() > 0))
            return f.preventDefault(), n(), !0;
        }
        if (!i) {
          const h = N.$getSelection().getNodes()[0];
          if (N.$isTextNode(h)) {
            const m = h.getTextContent();
            if (m.match(/^```(\w{1,10})?/)) {
              f.preventDefault();
              const g = m.replace(/^```/, ""), w = h.getTopLevelElement().insertAfter(BC({ language: g, _openInEditMode: !0 }));
              h.getTopLevelElement().remove();
              const x = N.$createNodeSelection();
              return x.add(w.getKey()), N.$setSelection(x), !0;
            }
          }
          if (ni.$isListItemNode(h) || N.$isTextNode(h) && ni.$isListItemNode(h.getParent())) {
            f.preventDefault();
            let m = N.$isTextNode(h) ? h.getParent() : h;
            const g = m.getIndent();
            return f.shiftKey ? g > 0 && m.setIndent(g - 1) : m.setIndent(g + 1), !0;
          }
          return f.preventDefault(), !0;
        }
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.KEY_ESCAPE_COMMAND,
      (f) => (r && o && (t._parentEditor || t).dispatchCommand(ju, { cardKey: r }), t._parentEditor && t._parentEditor.getRootElement().focus(), f.preventDefault(), !0),
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.PASTE_COMMAND,
      (f) => {
        var S;
        if (document.activeElement !== t.getRootElement() && !i)
          return !!RO(f);
        const d = f.clipboardData;
        if (!d)
          return !1;
        const h = d.getData(vT), m = h == null ? void 0 : h.match(/^(https?:\/\/[^\s]+)$/);
        if (m) {
          const C = (S = N.$getSelection()) == null ? void 0 : S.anchor.getNode();
          return C && C.getTextContent().startsWith("/") ? !1 : (f.preventDefault(), t.dispatchCommand(KC, { linkMatch: m }), !0);
        }
        const g = d.getData(bT);
        if (h && !g)
          return f == null || f.preventDefault(), t.dispatchCommand(gT, { text: h, allowBr: !0 }), !0;
        const w = d.files ? Array.from(d.files) : [], x = w.filter((C) => C.type.startsWith("image/")), _ = g && !!g.match(/<\s*img\b/gi);
        return x.length === 1 && _ ? (f.preventDefault(), t.dispatchCommand(rn.DRAG_DROP_PASTE, w), !0) : !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      KC,
      ({ linkMatch: f }) => {
        const d = N.$getSelection(), h = d.getTextContent(), g = d.anchor.getNode().getTextContent();
        if (h.length > 0) {
          const w = f[1];
          return N.$isRangeSelection(d) && t.dispatchCommand(ki.TOGGLE_LINK_COMMAND, { url: w, rel: null }), !0;
        }
        if (g.length > 0 || u.current === !0) {
          const w = f[1], x = ki.$createLinkNode(w), _ = N.$createTextNode(w);
          x.append(_);
          const S = N.$createTextNode(" ");
          return N.$insertNodes([x, S]), S.remove(), !0;
        }
        if (h.length === 0 && g.length === 0) {
          const w = f[1], x = Dq({ url: w });
          return t.dispatchCommand(Mn, { cardNode: x, createdWithUrl: !0 }), !0;
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.CLICK_COMMAND,
      (f) => {
        if (f.target.matches('[data-lexical-decorator="true"]')) {
          f.preventDefault();
          const d = N.$getNearestNodeFromDOMNode(f.target);
          return Ic(t, d.getKey()), !0;
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      N.CUT_COMMAND,
      (f) => !!RO(f),
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      yT,
      ({ cardKey: f }) => (t.update(() => {
        var h;
        const d = N.$getNodeByKey(f);
        z9e(d) ? (l(!0), r || t.dispatchCommand(ju, { cardKey: f, focusEditor: !0 })) : (h = d == null ? void 0 : d.hasEditMode) != null && h.call(d) && !o ? (l(!0), t.dispatchCommand(Vs, { cardKey: f, focusEditor: !0 })) : o && Dd(t, f);
      }), !0),
      N.COMMAND_PRIORITY_LOW
    ),
    t.registerCommand(
      n$e,
      ({ cardKey: f }) => (t.update(() => {
        l(!1), t.dispatchCommand(_y, { cardKey: f });
      }), !0),
      N.COMMAND_PRIORITY_LOW
    )
  )), j.useEffect(() => lY.registerDefaultTransforms(t), [t]), null;
}
function s$e({ containerElem: t = document.querySelector(".koenig-editor"), cursorDidExitAtTop: e, isNested: n }) {
  const [i] = Oe.useLexicalComposerContext();
  return r$e({ editor: i, containerElem: t, cursorDidExitAtTop: e, isNested: n });
}
const qn = ({ nodeKey: t, width: e, wrapperStyle: n, IndicatorIcon: i, children: r }) => {
  const { cardConfig: s } = j.useContext(dt), [o] = Oe.useLexicalComposerContext(), [a, l] = j.useState(null), [u, f] = j.useState(null), [d, h] = j.useState(e || "regular"), m = j.useRef(null), g = j.useRef(!1), { selectedCardKey: w, isEditingCard: x, isDragging: _ } = Rf(), S = w === t, C = S && x, E = j.useCallback((P) => {
    P.preventDefault(), P.stopPropagation(), o.dispatchCommand(yT, { cardKey: t });
  }, [o, t]);
  j.useLayoutEffect(() => {
    o.getEditorState().read(() => {
      const P = N.$getNodeByKey(t);
      l(P.getType());
    });
  }, []), j.useEffect(() => lt.mergeRegister(
    // we register a click command at the editor level rather than the React level
    // so that we can prevent the editor's default click behaviour without also
    // preventing the click behaviour of other React components inside the card
    o.registerCommand(
      N.CLICK_COMMAND,
      (P) => {
        var W;
        if (!g.current && m.current.contains(P.target)) {
          const z = N.$getNodeByKey(t), Z = !z, L = P.target.closest('[data-kg-allow-clickthrough="false"]'), Q = P.target.closest("[data-kg-settings-panel]");
          return S && ((W = z == null ? void 0 : z.hasEditMode) != null && W.call(z)) && !C && !L && !Q ? o.dispatchCommand(Vs, { cardKey: t, focusEditor: !Z }) : S || o.dispatchCommand(ju, { cardKey: t, focusEditor: !Z }), Z ? void 0 : !0;
        }
        return g.current === !0 ? (g.current = !1, !0) : (g.current = !1, !1);
      },
      N.COMMAND_PRIORITY_LOW
    )
  )), j.useEffect(() => {
    var P;
    (P = m.current) != null && P.parentElement && (d === "regular" ? delete m.current.parentElement.dataset.kgCardWidth : (d !== e && h(d), m.current.parentElement.dataset.kgCardWidth = e));
  }, [d, m, e]);
  const M = (P) => {
    P ? o.dispatchCommand(Vs, { cardKey: t }) : S || o.dispatchCommand(ju, { cardKey: t });
  };
  j.useEffect(() => {
    const P = m.current;
    function W(z) {
      if (!S && !C) {
        o.dispatchCommand(ju, { cardKey: t }), g.current = !0;
        const Z = z.target.tagName, L = ["INPUT", "TEXTAREA"], Q = !!z.target.closest("[data-kg-allow-clickthrough]");
        !L.includes(Z) && !Q && z.preventDefault();
      }
    }
    return P == null || P.addEventListener("mousedown", W), () => {
      P == null || P.removeEventListener("mousedown", W);
    };
  }, [o, S, C, t, m]);
  let $ = !1;
  return o.getEditorState().read(() => {
    var W;
    const P = N.$getNodeByKey(t);
    $ = (W = P == null ? void 0 : P.getIsVisibilityActive) == null ? void 0 : W.call(P);
  }), /* @__PURE__ */ y.jsx(gn.Provider, { value: {
    isSelected: S,
    captionHasFocus: u,
    isEditing: C,
    cardWidth: d,
    setCardWidth: h,
    setCaptionHasFocus: f,
    setEditing: M,
    nodeKey: t,
    cardContainerRef: m
  }, children: /* @__PURE__ */ y.jsx(
    d5,
    {
      ref: m,
      cardType: a,
      cardWidth: e,
      feature: s == null ? void 0 : s.feature,
      IndicatorIcon: i,
      isDragging: _,
      isEditing: C,
      isSelected: S,
      isVisibilityActive: $,
      wrapperStyle: n,
      onIndicatorClick: E,
      children: r
    }
  ) });
};
function wT(t) {
  const e = t._nodes, n = [];
  for (const [i, { klass: r }] of e)
    r.kgMenu && n.push([i, r]);
  return n;
}
const U2 = N.createCommand();
function SI(t, e) {
  const n = t.type;
  return Object.keys(e).find((r) => e[r].includes(n));
}
function o$e(t, e) {
  const n = t[Symbol.iterator]();
  return new Promise((i, r) => {
    const s = [], o = () => {
      const { done: a, value: l } = n.next();
      if (a)
        return i({ processed: s });
      const u = new FileReader();
      u.addEventListener("error", r), u.addEventListener("load", () => {
        const d = u.result, h = SI(l, e);
        typeof d == "string" && s.push({ type: h, file: l }), o();
      }), SI(l, e) ? u.readAsDataURL(l) : (console.error("unsupported file type"), o());
    };
    o();
  });
}
async function a$e(t, e) {
  const n = wT(t);
  let i = {};
  for (const [r, s] of n)
    r && s.uploadType && (i[r] = e[s.uploadType].mimeTypes);
  return {
    acceptableMimeTypes: i
  };
}
function l$e() {
  const [t] = Oe.useLexicalComposerContext(), { fileUploader: e } = j.useContext(dt), n = j.useCallback(async (i) => {
    if (!e)
      return;
    const { acceptableMimeTypes: r } = await a$e(t, e.fileTypes), { processed: s } = await o$e(i, r);
    s.forEach((o) => {
      t.dispatchCommand(U2, o);
    });
  }, [t, e]);
  return j.useEffect(() => t.registerCommand(
    N.DROP_COMMAND,
    (i) => {
      const r = Array.from(i.dataTransfer.files);
      return r.length > 0 ? (i.preventDefault(), i.stopPropagation(), t.dispatchCommand(rn.DRAG_DROP_PASTE, r), !0) : !1;
    },
    N.COMMAND_PRIORITY_HIGH
  ), [t]), j.useEffect(() => {
    const i = t.getRootElement(), r = (a) => {
      !a.dataTransfer || a.target.closest("[data-kg-card]") || (a.stopPropagation(), a.preventDefault());
    }, s = (a) => {
      a.preventDefault();
    }, o = (a) => {
      a.dataTransfer.getData("text/html") && (a.preventDefault(), t.update(() => {
        t.focus();
        let u = N.$getSelection();
        u || (N.$getRoot().selectEnd(), u = N.$getSelection()), mf.$insertDataTransferForRichText(a.dataTransfer, u, t);
      }));
    };
    return i.addEventListener("dragover", r), i.addEventListener("dragleave", s), i.addEventListener("drop", o), () => {
      i.removeEventListener("dragover", r), i.removeEventListener("dragleave", s), i.removeEventListener("drop", o);
    };
  }, [t]), j.useEffect(() => t.registerCommand(
    rn.DRAG_DROP_PASTE,
    async (i) => {
      try {
        return t.focus(), await n(i);
      } catch (r) {
        console.error(r);
      }
    },
    N.COMMAND_PRIORITY_LOW
  ), [t, n]), null;
}
function u$e({
  enabled: t = !0,
  canDrop: e,
  onDrop: n,
  onDropEnd: i,
  getDraggableInfo: r,
  getIndicatorPosition: s,
  draggableSelector: o,
  droppableSelector: a
}) {
  const l = j.useContext(dt), [u, f] = j.useState(null), [d, h] = j.useState(!1), m = j.useRef(null), g = j.useCallback(($) => {
    e($) ? m.current.enableDrag() : m.current.disableDrag();
  }, [e]), w = j.useCallback(() => {
    h(!1);
  }, [h]), x = j.useCallback(($) => {
    h(e($));
  }, [h, e]), _ = j.useCallback(() => {
    h(!1);
  }, [h]), S = j.useCallback(($) => (n == null ? void 0 : n($)) || !1, [n]), C = j.useCallback(($, P) => {
    i == null || i($, P);
  }, [i]), E = j.useCallback(($) => (s == null ? void 0 : s($)) || !1, [s]), M = j.useCallback(($) => (r == null ? void 0 : r($)) || {}, [r]);
  return j.useEffect(() => {
    var $, P;
    t ? ($ = m.current) == null || $.enableDrag() : (P = m.current) == null || P.disableDrag();
  }, [t, u]), j.useEffect(() => {
    !u || !l.dragDropHandler || (m.current = l.dragDropHandler.registerContainer(
      u,
      {
        draggableSelector: o,
        droppableSelector: a,
        isDragEnabled: t,
        onDragStart: g,
        onDragEnd: w,
        onDragEnterContainer: x,
        onDragLeaveContainer: _,
        getDraggableInfo: M,
        getIndicatorPosition: E,
        onDrop: S,
        onDropEnd: C
      }
    ));
  }, [
    M,
    E,
    S,
    C,
    u,
    o,
    a,
    t,
    l.dragDropHandler,
    w,
    x,
    _,
    g
  ]), { setRef: f, isDraggedOver: d };
}
function Wo({ handleDrop: t, disabled: e = !1 }) {
  const [n, i] = ft(null), [r, s] = ft(!1);
  return kt(() => {
    const o = n;
    if (!o || e)
      return;
    o.addEventListener("dragenter", a), o.addEventListener("dragover", l), o.addEventListener("dragleave", u), o.addEventListener("drop", f);
    function a(h) {
      d(h), s(!0);
    }
    function l(h) {
      d(h), s(!0);
    }
    function u(h) {
      d(h), s(!1);
    }
    function f(h) {
      d(h);
      const { dataTransfer: m } = h;
      m.files && m.files.length > 0 && t(Array.from(m.files)), s(!1);
    }
    function d(h) {
      h.preventDefault(), h.stopPropagation();
    }
    return () => {
      o.removeEventListener("dragenter", a), o.removeEventListener("dragover", l), o.removeEventListener("dragleave", u), o.removeEventListener("drop", f);
    };
  }, [t, n, e]), { setRef: i, isDraggedOver: r };
}
function Z2({
  config: t,
  disabled: e = !1
}) {
  const [n, i] = ft(!1), [r, s] = ft(!1), o = ct(!1), a = !e && n && r;
  kt(() => {
    const u = t == null ? void 0 : t.jsUrl;
    if (u) {
      if (window.pintura) {
        i(!0);
        return;
      }
      try {
        const f = new URL(u);
        import(`${f.protocol}//${f.host}${f.pathname}`).then(() => {
          i(!0);
        }).catch(() => {
        });
      } catch {
      }
    }
  }, [t == null ? void 0 : t.jsUrl]), kt(() => {
    let u = t == null ? void 0 : t.cssUrl;
    if (u)
      try {
        if (document.querySelector(`link[href="${u}"]`))
          s(!0);
        else {
          let d = document.createElement("link");
          d.rel = "stylesheet", d.type = "text/css", d.href = u, d.onload = () => {
            s(!0);
          }, document.head.appendChild(d);
        }
      } catch {
      }
  }, [t == null ? void 0 : t.cssUrl]);
  const l = $t(({ image: u, handleSave: f }) => {
    if (o.current = !1, pi("Image Edit Button Clicked", { location: "editor" }), u && a) {
      const d = new URL(u);
      d.searchParams.has("v") || d.searchParams.set("v", Date.now());
      const h = d.href, m = window.pintura.openDefaultEditor({
        src: h,
        enableTransparencyGrid: !0,
        util: "crop",
        utils: [
          "crop",
          "filter",
          "finetune",
          "redact",
          "annotate",
          "trim",
          "frame",
          "resize"
        ],
        frameOptions: [
          // No frame
          [void 0, (g) => g.labelNone],
          // Sharp edge frame
          ["solidSharp", (g) => g.frameLabelMatSharp],
          // Rounded edge frame
          ["solidRound", (g) => g.frameLabelMatRound],
          // A single line frame
          ["lineSingle", (g) => g.frameLabelLineSingle],
          // A frame with cornenr hooks
          ["hook", (g) => g.frameLabelCornerHooks],
          // A polaroid frame
          ["polaroid", (g) => g.frameLabelPolaroid]
        ],
        cropSelectPresetFilter: "landscape",
        cropSelectPresetOptions: [
          [void 0, "Custom"],
          [1, "Square"],
          // shown when cropSelectPresetFilter is set to 'landscape'
          [2 / 1, "2:1"],
          [3 / 2, "3:2"],
          [4 / 3, "4:3"],
          [16 / 10, "16:10"],
          [16 / 9, "16:9"],
          // shown when cropSelectPresetFilter is set to 'portrait'
          [1 / 2, "1:2"],
          [2 / 3, "2:3"],
          [3 / 4, "3:4"],
          [10 / 16, "10:16"],
          [9 / 16, "9:16"]
        ],
        locale: {
          labelButtonExport: "Save and close"
        },
        previewPad: !0,
        willClose: () => o.current
        // prevent closing on escape, only allow on close button clicks
      });
      m.on("loaderror", () => {
      }), m.on("process", (g) => {
        f(g.dest), pi("Image Edit Saved", { location: "editor" });
      });
    }
  }, [a]);
  return kt(() => {
    const u = (f) => {
      f.target.closest('.PinturaModal button[title="Close"]') && (o.current = !0);
    };
    return window.addEventListener("click", u, { capture: !0 }), () => {
      window.removeEventListener("click", u);
    };
  }, []), {
    isEnabled: a,
    openEditor: l
  };
}
var c$e = Rl, f$e = P2, d$e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, h$e = /^\w*$/;
function p$e(t, e) {
  if (c$e(t))
    return !1;
  var n = typeof t;
  return n == "number" || n == "symbol" || n == "boolean" || t == null || f$e(t) ? !0 : h$e.test(t) || !d$e.test(t) || e != null && t in Object(e);
}
var m$e = p$e, mY = Xz, g$e = "Expected a function";
function kT(t, e) {
  if (typeof t != "function" || e != null && typeof e != "function")
    throw new TypeError(g$e);
  var n = function() {
    var i = arguments, r = e ? e.apply(this, i) : i[0], s = n.cache;
    if (s.has(r))
      return s.get(r);
    var o = t.apply(this, i);
    return n.cache = s.set(r, o) || s, o;
  };
  return n.cache = new (kT.Cache || mY)(), n;
}
kT.Cache = mY;
var v$e = kT, b$e = v$e, y$e = 500;
function w$e(t) {
  var e = b$e(t, function(i) {
    return n.size === y$e && n.clear(), i;
  }), n = e.cache;
  return e;
}
var k$e = w$e, x$e = k$e, _$e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, O$e = /\\(\\)?/g, S$e = x$e(function(t) {
  var e = [];
  return t.charCodeAt(0) === 46 && e.push(""), t.replace(_$e, function(n, i, r, s) {
    e.push(r ? s.replace(O$e, "$1") : i || n);
  }), e;
}), C$e = S$e, E$e = Rl, T$e = m$e, $$e = C$e, M$e = I2;
function N$e(t, e) {
  return E$e(t) ? t : T$e(t, e) ? [t] : $$e(M$e(t));
}
var q2 = N$e, A$e = P2;
function D$e(t) {
  if (typeof t == "string" || A$e(t))
    return t;
  var e = t + "";
  return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
}
var xT = D$e, P$e = q2, I$e = xT;
function L$e(t, e) {
  e = P$e(e, t);
  for (var n = 0, i = e.length; t != null && n < i; )
    t = t[I$e(e[n++])];
  return n && n == i ? t : void 0;
}
var R$e = L$e, j$e = Y5, F$e = q2, B$e = Q5, CI = Ll, z$e = xT;
function W$e(t, e, n, i) {
  if (!CI(t))
    return t;
  e = F$e(e, t);
  for (var r = -1, s = e.length, o = s - 1, a = t; a != null && ++r < s; ) {
    var l = z$e(e[r]), u = n;
    if (l === "__proto__" || l === "constructor" || l === "prototype")
      return t;
    if (r != o) {
      var f = a[l];
      u = i ? i(f, l, a) : void 0, u === void 0 && (u = CI(f) ? f : B$e(e[r + 1]) ? [] : {});
    }
    j$e(a, l, u), a = a[l];
  }
  return t;
}
var H$e = W$e, Q$e = R$e, U$e = H$e, Z$e = q2;
function q$e(t, e, n) {
  for (var i = -1, r = e.length, s = {}; ++i < r; ) {
    var o = e[i], a = Q$e(t, o);
    n(a, o) && U$e(s, Z$e(o, t), a);
  }
  return s;
}
var Y$e = q$e;
function V$e(t, e) {
  return t != null && e in Object(t);
}
var X$e = V$e, G$e = q2, K$e = H5, J$e = Rl, eMe = Q5, tMe = z5, nMe = xT;
function iMe(t, e, n) {
  e = G$e(e, t);
  for (var i = -1, r = e.length, s = !1; ++i < r; ) {
    var o = nMe(e[i]);
    if (!(s = t != null && n(t, o)))
      break;
    t = t[o];
  }
  return s || ++i != r ? s : (r = t == null ? 0 : t.length, !!r && tMe(r) && eMe(o, r) && (J$e(t) || K$e(t)));
}
var rMe = iMe, sMe = X$e, oMe = rMe;
function aMe(t, e) {
  return t != null && oMe(t, e, sMe);
}
var lMe = aMe, uMe = Y$e, cMe = lMe;
function fMe(t, e) {
  return uMe(t, e, function(n, i) {
    return cMe(t, i);
  });
}
var dMe = fMe, EI = rp, hMe = H5, pMe = Rl, TI = EI ? EI.isConcatSpreadable : void 0;
function mMe(t) {
  return pMe(t) || hMe(t) || !!(TI && t && t[TI]);
}
var gMe = mMe, vMe = G5, bMe = gMe;
function gY(t, e, n, i, r) {
  var s = -1, o = t.length;
  for (n || (n = bMe), r || (r = []); ++s < o; ) {
    var a = t[s];
    e > 0 && n(a) ? e > 1 ? gY(a, e - 1, n, i, r) : vMe(r, a) : i || (r[r.length] = a);
  }
  return r;
}
var yMe = gY, wMe = yMe;
function kMe(t) {
  var e = t == null ? 0 : t.length;
  return e ? wMe(t, 1) : [];
}
var xMe = kMe;
function _Me(t, e, n) {
  switch (n.length) {
    case 0:
      return t.call(e);
    case 1:
      return t.call(e, n[0]);
    case 2:
      return t.call(e, n[0], n[1]);
    case 3:
      return t.call(e, n[0], n[1], n[2]);
  }
  return t.apply(e, n);
}
var OMe = _Me, SMe = OMe, $I = Math.max;
function CMe(t, e, n) {
  return e = $I(e === void 0 ? t.length - 1 : e, 0), function() {
    for (var i = arguments, r = -1, s = $I(i.length - e, 0), o = Array(s); ++r < s; )
      o[r] = i[e + r];
    r = -1;
    for (var a = Array(e + 1); ++r < e; )
      a[r] = i[r];
    return a[e] = n(o), SMe(t, this, a);
  };
}
var EMe = CMe;
function TMe(t) {
  return function() {
    return t;
  };
}
var $Me = TMe;
function MMe(t) {
  return t;
}
var NMe = MMe, AMe = $Me, MI = Gz, DMe = NMe, PMe = MI ? function(t, e) {
  return MI(t, "toString", {
    configurable: !0,
    enumerable: !1,
    value: AMe(e),
    writable: !0
  });
} : DMe, IMe = PMe, LMe = 800, RMe = 16, jMe = Date.now;
function FMe(t) {
  var e = 0, n = 0;
  return function() {
    var i = jMe(), r = RMe - (i - n);
    if (n = i, r > 0) {
      if (++e >= LMe)
        return arguments[0];
    } else
      e = 0;
    return t.apply(void 0, arguments);
  };
}
var BMe = FMe, zMe = IMe, WMe = BMe, HMe = WMe(zMe), QMe = HMe, UMe = xMe, ZMe = EMe, qMe = QMe;
function YMe(t) {
  return qMe(ZMe(t, void 0, UMe), t + "");
}
var VMe = YMe, XMe = dMe, GMe = VMe, KMe = GMe(function(t, e) {
  return t == null ? {} : XMe(t, e);
}), JMe = KMe;
const JC = /* @__PURE__ */ Gs(JMe);
function e6(t) {
  return new URL(t).pathname.match(/\/([^/]*)$/)[1];
}
function e7e({ images: t, updateImages: e, isSelected: n = !1, maxImages: i = 9, disabled: r = !1 }) {
  const s = j.useContext(dt), [o, a] = j.useState(null), [l, u] = j.useState(!1), f = j.useRef(null), d = j.useRef(!1), h = (M) => {
    (M.type === "image" || M.cardName === "image") && M.dataset.src && t.length !== i && f.current.enableDrag();
  }, m = () => {
    u(!1);
  }, g = () => {
    u(!0);
  }, w = () => {
    u(!1);
  }, x = (M) => {
    if (M.type !== "image" && M.cardName !== "image")
      return !1;
    let $ = [...t], { insertIndex: P } = M;
    const z = Array.from(o.querySelectorAll("[data-image]")).indexOf(M.element);
    if ($.length || (P = 0), E(z, P)) {
      if (z === -1) {
        const { dataset: Z } = M, L = M.element.querySelector(`img[src="${Z.src}"]`);
        Z.width = Z.width || L.naturalWidth, Z.height = Z.height || L.naturalHeight, Z.fileName = (Z == null ? void 0 : Z.fileName) || e6(Z.src), $.splice(P, 0, Z);
      } else {
        const Z = $.find((Q) => Q.src === M.dataset.src), L = z < P && P ? -1 : 0;
        $ = $.filter((Q) => Q !== Z), $.splice(P + L, 0, Z);
      }
      return e($), f.current.refresh(), d.current = !0, !0;
    }
    return !1;
  }, _ = (M, $) => {
    if (d.current || !$) {
      d.current = !1;
      return;
    }
    const P = t.find((W) => W.src === M.dataset.src);
    if (P) {
      const W = t.filter((z) => z !== P);
      e(W), f.current.refresh();
    }
  }, S = (M) => {
    let $ = M.querySelector("img").getAttribute("src"), P = t.find((z) => z.src === $) || t.find((z) => z.previewSrc === $), W = P && JC(P, ["fileName", "src", "row", "width", "height", "caption"]);
    return P ? {
      type: "image",
      dataset: W
    } : {};
  }, C = (M, $, P) => {
    if (M.type !== "image" && M.cardName !== "image")
      return !1;
    const W = $.closest("[data-row]"), z = Array.from(o.querySelectorAll("[data-image]")), Z = z.indexOf(M.element), L = z.indexOf($);
    if (W && E(Z, L, P)) {
      const Q = Array.from(W.querySelectorAll("[data-image]")), V = Q.indexOf($);
      let H = L;
      const R = [], q = [];
      return Q.forEach((Y, K) => {
        K < V && R.push(Y), K === V && (P.match(/left/) ? q.push(Y) : R.push(Y)), K > V && q.push(Y);
      }), P.match(/right/) && (H += 1), {
        direction: "horizontal",
        position: P.match(/left/) ? "left" : "right",
        beforeElems: R,
        afterElems: q,
        insertIndex: H
      };
    } else
      return !1;
  }, E = (M, $, P = "") => M === -1 ? !0 : M === $ || typeof $ > "u" ? !1 : (P.match(/left/) && ($ -= 1), P.match(/right/) && ($ += 1), $ !== M);
  return j.useEffect(() => {
    var M, $;
    n ? (M = f.current) == null || M.enableDrag() : ($ = f.current) == null || $.disableDrag();
  }, [n, o]), j.useEffect(() => {
    const M = o;
    if (!(!M || !(s != null && s.dragDropHandler)))
      return f.current = s.dragDropHandler.registerContainer(
        M,
        {
          draggableSelector: "[data-image]",
          droppableSelector: "[data-image]",
          isDragEnabled: !r && t.length > 0,
          onDragStart: h,
          onDragEnd: m,
          onDragEnterContainer: g,
          onDragLeaveContainer: w,
          getDraggableInfo: S,
          getIndicatorPosition: C,
          onDrop: x,
          onDropEnd: _
        }
      ), () => {
        f.current && (f.current.destroy(), f.current = null);
      };
  }, [o, t, s.dragDropHandler]), { setContainerRef: a, isDraggedOver: l };
}
function vY({ index: t, images: e, deleteImage: n, isDragging: i }) {
  const r = e.map((s, o) => {
    const a = e.length === 1 ? "single" : o === 0 ? "first" : o === e.length - 1 ? "last" : "middle";
    return /* @__PURE__ */ y.jsx(bY, { deleteImage: n, image: s, isDragging: i, position: a }, s.src);
  });
  return /* @__PURE__ */ y.jsx("div", { className: `flex flex-row justify-center ${t !== 0 && "mt-4"}`, "data-row": t, children: r });
}
function bY({ image: t, deleteImage: e, position: n, isDragging: i }) {
  const s = {
    flex: `${(t.width || 1) / (t.height || 1)} 1 0%`
  };
  let o = [], a = [];
  switch (n) {
    case "first":
      o = ["pr-2"], a = ["mr-2"];
      break;
    case "middle":
      o = ["pl-2", "pr-2"], a = ["ml-2", "mr-2"];
      break;
    case "last":
      o = ["pl-2"], a = ["ml-2"];
      break;
  }
  return /* @__PURE__ */ y.jsxs(
    "div",
    {
      className: `group/image relative ${o.join(" ")}`,
      "data-testid": "gallery-image",
      style: s,
      "data-image": !0,
      children: [
        /* @__PURE__ */ y.jsx(
          "img",
          {
            alt: t.alt,
            className: "pointer-events-none block size-full",
            height: t.height,
            src: t.previewSrc || t.src,
            width: t.width
          }
        ),
        i ? null : /* @__PURE__ */ y.jsx("div", { className: `pointer-events-none invisible absolute inset-0 bg-gradient-to-t from-black/0 via-black/5 to-black/30 p-3 opacity-0 transition-all group-hover/image:visible group-hover/image:opacity-100 ${a.join(" ")}`, children: /* @__PURE__ */ y.jsx("div", { className: "flex flex-row-reverse", children: /* @__PURE__ */ y.jsx($l, { Icon: Bf, label: "Delete", onClick: () => e(t) }) }) })
      ]
    }
  );
}
function yY({ images: t, deleteImage: e, reorderHandler: n, isDragging: i }) {
  const r = [], s = t.length, o = function(l) {
    return s > 1 && s % 3 === 1 && l === s - 2;
  };
  t.forEach((l, u) => {
    let f = l.row || 0;
    o(u) && (f = f + 1), r[f] || (r[f] = []), r[f].push(l);
  });
  const a = r.map((l, u) => /* @__PURE__ */ y.jsx(vY, { deleteImage: e, images: l, index: u, isDragging: i }, u));
  return /* @__PURE__ */ y.jsx("div", { ref: n.setContainerRef, className: "not-kg-prose flex flex-col", "data-gallery": !0, children: a });
}
function wY({ openFilePicker: t, isDraggedOver: e, reorderHandler: n }) {
  return /* @__PURE__ */ y.jsx(
    mc,
    {
      desc: "Click to select up to 9 images",
      filePicker: t,
      icon: "gallery",
      isDraggedOver: e,
      multiple: !0,
      placeholderRef: n.setContainerRef,
      size: "large"
    }
  );
}
function kY({ progress: t }) {
  const e = {
    width: `${t == null ? void 0 : t.toFixed(0)}%`
  };
  return /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-white/50", "data-testid": "gallery-progress", children: /* @__PURE__ */ y.jsx(Xo, { bgStyle: "transparent", style: e }) });
}
function t7e() {
  return /* @__PURE__ */ y.jsx("div", { className: "bg-black-60 pointer-events-none absolute inset-0 flex items-center bg-black/60", "data-kg-card-drag-text": !0, children: /* @__PURE__ */ y.jsx("span", { className: "sans-serif fw7 f7 block w-full text-center font-bold text-white", children: "Drop to add up to 9 images" }) });
}
function xY({
  captionEditor: t,
  captionEditorInitialState: e,
  clearErrorMessage: n,
  deleteImage: i,
  filesDropper: r,
  errorMessage: s,
  fileInputRef: o,
  imageMimeTypes: a = [],
  images: l = [],
  isSelected: u,
  onFileChange: f,
  uploader: d = {},
  reorderHandler: h = {}
}) {
  const m = () => {
    o.current.click();
  }, { isLoading: g, progress: w } = d, { isDraggedOver: x } = r, { isDraggedOver: _ } = h, S = x || _;
  return /* @__PURE__ */ y.jsxs("figure", { children: [
    /* @__PURE__ */ y.jsxs("div", { ref: r.setRef, className: "not-kg-prose relative", "data-testid": "gallery-container", children: [
      l.length ? /* @__PURE__ */ y.jsx(yY, { deleteImage: i, images: l, isDragging: S, reorderHandler: h }) : /* @__PURE__ */ y.jsx(wY, { isDraggedOver: S, openFilePicker: m, reorderHandler: h }),
      g ? /* @__PURE__ */ y.jsx(kY, { progress: w }) : null,
      l.length && x ? /* @__PURE__ */ y.jsx(t7e, {}) : null,
      s && !S ? /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60", "data-testid": "gallery-error", children: /* @__PURE__ */ y.jsxs("span", { className: "center sans-serif f7 block bg-red px-2 font-bold text-white", children: [
        s,
        ".",
        /* @__PURE__ */ y.jsx("button", { className: "ml-2 cursor-pointer underline", "data-testid": "clear-gallery-error", type: "button", onClick: n, children: "Dismiss" })
      ] }) }) : null,
      /* @__PURE__ */ y.jsx("form", { onChange: f, children: /* @__PURE__ */ y.jsx(
        "input",
        {
          ref: o,
          accept: a.join(","),
          hidden: !0,
          multiple: !0,
          name: "image-input",
          type: "file"
        }
      ) })
    ] }),
    /* @__PURE__ */ y.jsx(
      gp,
      {
        captionEditor: t,
        captionEditorInitialState: e,
        captionPlaceholder: "Type caption for gallery (optional)",
        dataTestId: "gallery-card-caption",
        isSelected: u
      }
    )
  ] });
}
vY.propTypes = {
  deleteImage: A.func,
  images: A.array,
  index: A.number,
  isDragging: A.bool
};
bY.propTypes = {
  deleteImage: A.func,
  image: A.object,
  position: A.string,
  isDragging: A.bool
};
yY.propTypes = {
  deleteImage: A.func,
  filesDropper: A.object,
  images: A.array,
  isDragging: A.bool,
  reorderHandler: A.object
};
wY.propTypes = {
  openFilePicker: A.func,
  isDraggedOver: A.bool,
  reorderHandler: A.object
};
kY.propTypes = {
  progress: A.number
};
xY.propTypes = {
  isSelected: A.bool,
  onFileChange: A.func,
  captionEditor: A.object,
  captionEditorInitialState: A.object,
  errorMessage: A.string,
  clearErrorMessage: A.func,
  deleteImage: A.func,
  fileInputRef: A.object,
  filesDropper: A.object,
  imageMimeTypes: A.array,
  images: A.array,
  uploader: A.object,
  reorderHandler: A.object
};
async function Wf(t) {
  const e = new Image();
  return new Promise((n, i) => {
    e.onload = () => {
      n({ width: e.naturalWidth, height: e.naturalHeight });
    }, e.onerror = i, e.src = t;
  });
}
function n7e({ nodeKey: t, captionEditor: e, captionEditorInitialState: n }) {
  const [i] = Oe.useLexicalComposerContext(), { fileUploader: r, cardConfig: s } = j.useContext(dt), { isSelected: o } = j.useContext(gn), a = j.useRef(), [l, u] = j.useState(null), [f, d] = j.useState(!1), [h, m] = j.useState(() => i.getEditorState().read(() => N.$getNodeByKey(t).images)), g = e7e({ images: h, updateImages: _, isSelected: o }), w = r.useFileUpload("image"), x = Wo({ handleDrop: $ });
  function _(Z) {
    Dg(Z), m(Z), S(Z);
  }
  function S(Z) {
    i.update(() => {
      N.$getNodeByKey(t).setImages(Z);
    });
  }
  const C = (Z) => {
    const L = h.filter((Q) => Q.fileName !== Z.fileName);
    Dg(L), m(L), S(L);
  }, E = async (Z) => {
    const L = h.length, Q = t6 - L, V = Array.prototype.slice.call(Z, 0, Q);
    if (V.length < Z.length && u("Galleries are limited to 9 images"), V.length === 0)
      return;
    const H = [...h];
    for (const Y of V) {
      const K = URL.createObjectURL(Y), { width: te, height: se } = await Wf(K);
      H.push({
        fileName: Y.name,
        previewSrc: K,
        width: te,
        height: se
      });
    }
    Dg(H), m(H);
    const R = await w.upload(V), q = [...H];
    if (!R) {
      u("Something went wrong while uploading images. Please refresh the page and try again");
      return;
    }
    R.forEach((Y) => {
      const K = q.find((te) => te.fileName === Y.fileName);
      if (!K) {
        console.error("Uploaded image not found in images array. Filename:", Y.fileName);
        return;
      }
      K.src = Y.url;
    }), m(H), S(H);
  }, M = async (Z) => {
    const L = Z.target.files;
    if (!(!L || !L.length))
      return await E(L);
  };
  async function $(Z) {
    await E(Z);
  }
  function P(Z) {
    Z.preventDefault(), a.current.click();
  }
  const W = () => {
    u(null);
  }, z = !o || x.isDraggedOver || g.isDraggedOver || h.length <= 0;
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      xY,
      {
        captionEditor: e,
        captionEditorInitialState: n,
        clearErrorMessage: W,
        deleteImage: C,
        errorMessage: l,
        fileInputRef: a,
        filesDropper: x,
        imageMimeTypes: r.fileTypes.image.mimeTypes,
        images: h,
        isSelected: o,
        reorderHandler: g,
        uploader: w,
        onFileChange: M
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "gallery",
        isVisible: f,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => d(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "gallery",
        isVisible: !z,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "add-gallery-image", icon: "add", isActive: !1, label: "Add images", onClick: P }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !s.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !s.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => d(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const _Y = N.createCommand(), t6 = 9, i7e = 3, NI = ["row", "src", "width", "height", "alt", "caption", "fileName"];
function Dg(t) {
  t.forEach((e, n) => {
    e.row = Math.ceil((n + 1) / i7e) - 1;
  });
}
class Y2 extends A1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__captionEditor");
    we(this, "__captionEditorInitialState");
    const { caption: r } = n;
    xi(this, "__captionEditor", { editor: n.captionEditor, nodes: pr }), !n.captionEditor && r && _i(this, "__captionEditor", `${r}`);
  }
  getIcon() {
    return $S;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.captionEditor = i.__captionEditor, n.captionEditorInitialState = i.__captionEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__captionEditor && this.__captionEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__captionEditor, null), r = mi(i);
      n.caption = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), width: "wide", children: /* @__PURE__ */ y.jsx(
      n7e,
      {
        captionEditor: this.__captionEditor,
        captionEditorInitialState: this.__captionEditorInitialState,
        nodeKey: this.getKey()
      }
    ) });
  }
  // TODO: move to kg-default-nodes?
  setImages(n) {
    const i = n.slice(0, t6).map((r) => JC(r, NI));
    Dg(i), this.images = i;
  }
  addImages(n) {
    const i = [...this.images, ...n].slice(0, t6).map((r) => JC(r, NI));
    Dg(i), this.images = i;
  }
}
we(Y2, "kgMenu", [{
  label: "Gallery",
  desc: "Create an image gallery",
  Icon: $S,
  insertCommand: _Y,
  insertParams: {
    triggerFileDialog: !0
  },
  matches: ["gallery"],
  priority: 5,
  shortcut: "/gallery"
}]);
const OY = (t) => new Y2(t);
function ug(t) {
  return /\.(gif)$/.test(t);
}
function SY({ src: t, alt: e, previewSrc: n, imageUploader: i, imageCardDragHandler: r, imageFileDragHandler: s, isPinturaEnabled: o, openImageEditor: a, onFileChange: l }) {
  var h;
  const u = {
    width: `${(h = i.progress) == null ? void 0 : h.toFixed(0)}%`
  }, f = i.progress.toFixed(0) < 100 ? `upload in progress, ${i.progress}` : "";
  function d(m) {
    s == null || s.setRef(m), r == null || r.setRef(m);
  }
  return /* @__PURE__ */ y.jsxs("div", { ref: d, className: "not-kg-prose group/image relative", children: [
    /* @__PURE__ */ y.jsx(
      "img",
      {
        alt: e || f,
        className: `mx-auto block ${n ? "opacity-40" : ""}`,
        "data-testid": i.isLoading ? "image-card-loading" : "image-card-populated",
        src: n || t
      }
    ),
    i.isLoading ? /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-white/50", "data-testid": "upload-progress", children: /* @__PURE__ */ y.jsx(Xo, { style: u }) }) : /* @__PURE__ */ y.jsx(y.Fragment, {}),
    r != null && r.isDraggedOver ? /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex items-center justify-center border border-grey/20 bg-black/80 dark:border-grey/10 dark:bg-grey-950", children: /* @__PURE__ */ y.jsx(XC, { text: "Drop to convert to a gallery" }) }) : null,
    s != null && s.isDraggedOver ? /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex items-center justify-center border border-grey/20 bg-black/80 dark:border-grey/10 dark:bg-grey-950", "data-testid": "drag-overlay", children: /* @__PURE__ */ y.jsx(XC, { text: "Drop to replace image" }) }) : null,
    o && !ug(t) && /* @__PURE__ */ y.jsx("div", { className: "pointer-events-none invisible absolute inset-0 bg-gradient-to-t from-black/0 via-black/5 to-black/30 p-3 opacity-0 transition-all group-hover/image:visible group-hover/image:opacity-100", children: /* @__PURE__ */ y.jsx("div", { className: "flex flex-row-reverse", children: /* @__PURE__ */ y.jsx($l, { Icon: N2, label: "Edit", onClick: () => a({
      image: t,
      handleSave: (m) => {
        l({
          target: {
            files: [m]
          }
        });
      }
    }) }) }) })
  ] });
}
function CY({ onFileChange: t, setFileInputRef: e, imageFileDragHandler: n, errors: i }) {
  const r = j.useRef(null), s = (o) => {
    r.current = o, e(r);
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      mc,
      {
        desc: "Click to select an image",
        errors: i,
        filePicker: () => Yi({ fileInputRef: r }),
        icon: "image",
        isDraggedOver: n == null ? void 0 : n.isDraggedOver,
        placeholderRef: n == null ? void 0 : n.setRef
      }
    ),
    /* @__PURE__ */ y.jsx(
      z2,
      {
        fileInputRef: s,
        filePicker: () => Yi({ fileInputRef: r }),
        onFileChange: t
      }
    )
  ] });
}
const EY = ({
  src: t,
  altText: e,
  previewSrc: n,
  imageUploader: i,
  onFileChange: r,
  setFileInputRef: s,
  imageCardDragHandler: o,
  imageFileDragHandler: a,
  isPinturaEnabled: l,
  openImageEditor: u
}) => n || t ? /* @__PURE__ */ y.jsx(
  SY,
  {
    alt: e,
    imageCardDragHandler: o,
    imageFileDragHandler: a,
    imageUploader: i,
    isPinturaEnabled: l,
    openImageEditor: u,
    previewSrc: n,
    src: t,
    onFileChange: r
  }
) : /* @__PURE__ */ y.jsx(
  CY,
  {
    errors: i.errors,
    imageFileDragHandler: a,
    setFileInputRef: s,
    onFileChange: r
  }
);
function TY({
  isSelected: t,
  src: e,
  onFileChange: n,
  captionEditor: i,
  captionEditorInitialState: r,
  altText: s,
  setAltText: o,
  setFigureRef: a,
  fileInputRef: l,
  cardWidth: u,
  previewSrc: f,
  imageUploader: d,
  imageCardDragHandler: h,
  imageFileDragHandler: m,
  isPinturaEnabled: g,
  openImageEditor: w
}) {
  const x = j.useRef(null);
  j.useEffect(() => {
    a && a(x);
  }, [x, a]);
  const _ = (S) => {
    l && (l.current = S.current);
  };
  return /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsxs("figure", { ref: x, "data-kg-card-width": u, children: [
    /* @__PURE__ */ y.jsx(
      EY,
      {
        altText: s,
        imageCardDragHandler: h,
        imageFileDragHandler: m,
        imageUploader: d,
        isPinturaEnabled: g,
        openImageEditor: w,
        previewSrc: f,
        setFileInputRef: _,
        src: e,
        onFileChange: n
      }
    ),
    /* @__PURE__ */ y.jsx(
      gp,
      {
        altText: s || "",
        altTextPlaceholder: "Type alt text for image (optional)",
        captionEditor: i,
        captionEditorInitialState: r,
        captionPlaceholder: "Type caption for image (optional)",
        dataTestId: "image-caption-editor",
        isSelected: t,
        readOnly: !t,
        setAltText: o
      }
    )
  ] }) });
}
EY.propTypes = {
  src: A.string,
  altText: A.string,
  previewSrc: A.string,
  imageUploader: A.object,
  onFileChange: A.func,
  setFileInputRef: A.func,
  imageFileDragHandler: A.object,
  imageCardDragHandler: A.object,
  isPinturaEnabled: A.bool,
  openImageEditor: A.func
};
SY.propTypes = {
  src: A.string,
  alt: A.string,
  previewSrc: A.string,
  imageUploader: A.object,
  imageCardDragHandler: A.object,
  imageFileDragHandler: A.object,
  isPinturaEnabled: A.bool,
  openImageEditor: A.func,
  onFileChange: A.func
};
CY.propTypes = {
  onFileChange: A.func,
  setFileInputRef: A.func,
  errors: A.array,
  imageFileDragHandler: A.object
};
TY.propTypes = {
  isSelected: A.bool,
  src: A.string,
  onFileChange: A.func,
  captionEditor: A.object,
  captionEditorInitialState: A.object,
  altText: A.string,
  setAltText: A.func,
  setFigureRef: A.func,
  fileInputRef: A.object,
  cardWidth: A.string,
  previewSrc: A.string,
  imageUploader: A.object,
  imageFileDragHandler: A.object,
  imageCardDragHandler: A.object,
  isPinturaEnabled: A.bool,
  openImageEditor: A.func
};
function _T({ href: t, update: e, cancel: n }) {
  const [i, r] = j.useState(t), s = ct(null), o = ct(null);
  j.useEffect(() => {
    r(t);
  }, [t]), kt(() => {
    s.current.focus();
  }, []);
  const a = j.useCallback((u) => {
    o.current && !o.current.contains(u.target) && n();
  }, [n]);
  j.useEffect(() => (window.addEventListener("mousedown", a), () => {
    window.removeEventListener("mousedown", a);
  }), [a]);
  const l = j.useCallback((u) => {
    u.key === "Escape" && n();
  }, [n]);
  return j.useEffect(() => (window.addEventListener("keydown", l), () => {
    window.removeEventListener("keydown", l);
  }), [l]), /* @__PURE__ */ y.jsxs("div", { ref: o, className: "relative m-0 flex items-center justify-evenly gap-1 rounded-lg bg-white p-1 font-sans text-md font-normal text-black shadow-md dark:bg-grey-950", children: [
    /* @__PURE__ */ y.jsx(
      "input",
      {
        ref: s,
        className: "mb-[1px] h-8 w-full pl-3 pr-9 leading-loose text-grey-900 selection:bg-grey/40 dark:bg-grey-950 dark:text-grey-300 dark:selection:bg-grey-800/40 dark:selection:text-grey-100",
        "data-testid": "link-input",
        name: "link-input",
        placeholder: "Enter url",
        value: i,
        "data-kg-link-input": !0,
        onInput: (u) => {
          r(u.target.value);
        },
        onKeyDown: (u) => {
          if (u.key === "Enter") {
            u.preventDefault(), e(i);
            return;
          }
        }
      }
    ),
    !!i && /* @__PURE__ */ y.jsx("button", { "aria-label": "Close", className: "absolute right-3 cursor-pointer", type: "button", onClick: (u) => {
      u.stopPropagation(), r(""), s.current.focus();
    }, children: /* @__PURE__ */ y.jsx(vp, { className: "size-4 stroke-2 text-grey" }) })
  ] });
}
_T.propTypes = {
  href: A.string
};
async function r7e(t, e) {
  if (!t.startsWith("data:"))
    return;
  const n = t.split(",")[0].split(":")[1].split(";")[0];
  if (!e) {
    let s;
    try {
      s = window.crypto.randomUUID();
    } catch {
      s = Math.random().toString(36).substring(2, 15);
    }
    const o = n.split("/")[1];
    e = `data-src-image-${s}.${o}`;
  }
  const i = await fetch(t).then((s) => s.blob());
  return new File([i], e, { type: n, lastModified: /* @__PURE__ */ new Date() });
}
const cg = async (t, e, n, i) => {
  if (!t)
    return;
  let r = URL.createObjectURL(t[0]);
  r && await n.update(() => {
    const u = N.$getNodeByKey(e);
    u.previewSrc = r;
  });
  const { width: s, height: o } = await Wf(r), a = await i(t), l = a == null ? void 0 : a[0].url;
  await n.update(() => {
    const u = N.$getNodeByKey(e);
    u.width = s, u.height = o, u.src = l, u.previewSrc = null;
  });
}, OT = async (t, e) => {
  if (!t)
    return;
  const n = await e(t), i = n == null ? void 0 : n[0].url, { width: r, height: s } = await Wf(i);
  return {
    imageSrc: i,
    width: r,
    height: s
  };
};
function s7e({ nodeKey: t, initialFile: e, src: n, altText: i, captionEditor: r, captionEditorInitialState: s, triggerFileDialog: o, previewSrc: a, href: l }) {
  var te;
  const [u] = Oe.useLexicalComposerContext(), [f, d] = j.useState(!1), { fileUploader: h, cardConfig: m } = j.useContext(dt), { isSelected: g, cardWidth: w, setCardWidth: x } = j.useContext(gn), _ = j.useRef(), S = j.useRef(), [C, E] = j.useState(!1), M = h.useFileUpload("image"), $ = Wo({ handleDrop: K }), P = j.useCallback((se) => se.type === "card" && se.cardName === "image" && se.nodeKey !== t, [t]), W = j.useCallback((se) => {
    const { type: ce, cardName: U, nodeKey: F, dataset: oe } = se;
    ce === "card" && U === "image" && F && oe && u.update(() => {
      const le = N.$getNodeByKey(t), pe = N.$getNodeByKey(F), Re = OY();
      oe.fileName = (oe == null ? void 0 : oe.fileName) || e6(oe.src);
      const ze = le.getDataset();
      ze.fileName = (ze == null ? void 0 : ze.fileName) || e6(ze.src), Re.addImages([ze, oe]), le.replace(Re), pe.remove();
    });
  }, [u, t]), z = u$e({
    canDrop: P,
    onDrop: W
  }), { isEnabled: Z, openEditor: L } = Z2({ config: m.pinturaConfig });
  j.useEffect(() => {
    if (!(n != null && n.startsWith("data:")) || M.isLoading)
      return;
    let se = !0;
    return (async () => {
      const U = await r7e(n);
      se && await cg([U], t, u, M.upload);
    })(), () => se = !1;
  }, [u, M.isLoading, M.upload, t, n]), j.useEffect(() => {
    (async (F) => {
      F && !n && await cg([F], t, u, M.upload);
    })(e);
    const ce = async () => {
      if (n && !e && !o) {
        const { width: F, height: oe } = await Wf(n);
        u.update(() => {
          const le = N.$getNodeByKey(t);
          le.width = F, le.height = oe;
        });
      }
    };
    u.getEditorState().read(() => {
      const F = N.$getNodeByKey(t);
      return !F.width || !F.height;
    }) && ce();
  }, []);
  const Q = async (se) => {
    const ce = se.target.files;
    return u.update(() => {
      const U = N.$getNodeByKey(t);
      U.src = "";
    }), await cg(ce, t, u, M.upload);
  }, V = (se) => {
    u.update(() => {
      const ce = N.$getNodeByKey(t);
      ce.href = se;
    });
  }, H = (se) => {
    u.update(() => {
      const ce = N.$getNodeByKey(t);
      ce.alt = se;
    });
  };
  j.useEffect(() => {
    if (!o)
      return;
    const se = setTimeout(() => {
      Yi({ fileInputRef: _ }), u.update(() => {
        const ce = N.$getNodeByKey(t);
        ce.triggerFileDialog = !1;
      });
    });
    return () => {
      clearTimeout(se);
    };
  });
  const R = (se) => {
    u.update(() => {
      const ce = N.$getNodeByKey(t);
      ce.cardWidth = se, x(se);
    });
  }, q = () => {
    d(!1), Y();
  }, Y = () => {
    u.update(() => {
      const se = N.$createNodeSelection();
      se.add(t), N.$setSelection(se);
    });
  };
  async function K(se) {
    await cg(se, t, u, M.upload);
  }
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      TY,
      {
        altText: i,
        captionEditor: r,
        captionEditorInitialState: s,
        cardWidth: w,
        fileInputRef: _,
        imageCardDragHandler: z,
        imageFileDragHandler: $,
        imageUploader: M,
        isPinturaEnabled: Z,
        isSelected: g,
        openImageEditor: L,
        previewSrc: a,
        setAltText: H,
        src: n,
        onFileChange: Q
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "image",
        isVisible: f,
        children: /* @__PURE__ */ y.jsx(
          _T,
          {
            cancel: q,
            href: l,
            update: (se) => {
              V(se), q();
            }
          }
        )
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "image",
        isVisible: C,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => E(!1) })
      }
    ),
    /* @__PURE__ */ y.jsxs(
      St,
      {
        "data-kg-card-toolbar": "image",
        isVisible: n && g && !f && !C,
        children: [
          /* @__PURE__ */ y.jsx(
            z2,
            {
              fileInputRef: S,
              mimeTypes: (te = h.fileTypes.image) == null ? void 0 : te.mimeTypes,
              onFileChange: Q
            }
          ),
          /* @__PURE__ */ y.jsxs(li, { children: [
            /* @__PURE__ */ y.jsx(
              at,
              {
                hide: ug(n),
                icon: "imgRegular",
                isActive: w === "regular",
                label: "Regular width",
                onClick: () => R("regular")
              }
            ),
            /* @__PURE__ */ y.jsx(
              at,
              {
                hide: ug(n),
                icon: "imgWide",
                isActive: w === "wide",
                label: "Wide width",
                onClick: () => R("wide")
              }
            ),
            /* @__PURE__ */ y.jsx(
              at,
              {
                hide: ug(n),
                icon: "imgFull",
                isActive: w === "full",
                label: "Full width",
                onClick: () => R("full")
              }
            ),
            /* @__PURE__ */ y.jsx(Zn, { hide: ug(n) }),
            /* @__PURE__ */ y.jsx(at, { icon: "link", isActive: l || !1, label: "Link", onClick: () => {
              d(!0);
            } }),
            /* @__PURE__ */ y.jsx(Zn, { hide: !m.createSnippet }),
            /* @__PURE__ */ y.jsx(
              at,
              {
                dataTestId: "create-snippet",
                hide: !m.createSnippet,
                icon: "snippet",
                isActive: !1,
                label: "Save as snippet",
                onClick: () => E(!0)
              }
            )
          ] })
        ]
      }
    )
  ] });
}
const o7e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1.472 13.357a9.063 9.063 0 1 0 16.682-7.09 9.063 9.063 0 1 0-16.682 7.09Zm14.749 2.863 7.029 7.03" })), a7e = "https://tenor.googleapis.com", l7e = "v2", u7e = 600, ik = {
  COMMON: "common",
  INVALID_API_KEY: "invalid_key"
};
function c7e({ config: t }) {
  const [e, n] = ft([]), [i, r] = ft(null), [s, o] = ft(!1), [a, l] = ft(!1), [u, f] = ft([]), d = ct(null), h = ct(""), m = ct([]), g = ct(null), w = ct(""), x = ct(4), _ = ct([]), S = ct([]);
  function C(te) {
    return w.current = te, P(), te ? M(te) : $();
  }
  const E = bp((te = "") => C(te), u7e);
  async function M(te) {
    h.current = "search", await Q(h.current, { params: {
      q: te,
      media_filter: "minimal"
    } });
  }
  async function $() {
    h.current = "featured", await Q(h.current, { params: {
      q: "excited",
      media_filter: "minimal"
    } });
  }
  function P() {
    S.current = [], d.current = null, W();
  }
  function W() {
    let te = [], se = [];
    for (let ce = 0; ce < x.current; ce += 1)
      te[ce] = [], se[ce] = 0;
    _.current = te, m.current = se, S.current.length && z();
  }
  function z() {
    S.current.forEach((te) => {
      Z(te);
    });
  }
  function Z(te) {
    const se = Math.min(...m.current), ce = m.current.indexOf(se);
    m.current[ce] += 300 * te.ratio, _.current[ce].push(te), te.columnIndex = ce, te.columnRowIndex = _.current[ce].length - 1;
  }
  function L(te, se) {
    const [ce, U] = te.media_formats.tinygif.dims;
    te.ratio = U / ce, S.current.push(te), te.index = se, Z(te);
  }
  async function Q(te, se) {
    const ce = `${l7e}/${te}`.replace(/\/+/, "/"), U = new URL(ce, a7e), F = new URLSearchParams(se.params);
    return F.set("key", t.googleApiKey), F.set("client_key", "ghost-editor"), F.set("contentfilter", Y()), U.search = F.toString(), g.current = arguments, r(null), o(!0), fetch(U).then((oe) => V(oe)).then((oe) => oe.json()).then((oe) => H(oe)).then((oe) => R(oe)).then(() => {
      n(_.current), f(S.current);
    }).catch((oe) => {
      !se.ignoreErrors && !i && r(ik.COMMON), i && i.startsWith("API key not valid") && r(ik.INVALID_API_KEY), console.error(oe);
    }).finally(() => {
      o(!1), l(!1);
    });
  }
  async function V(te) {
    if (te.status >= 200 && te.status < 300)
      return te;
    let se;
    te.headers.map["content-type"].startsWith("application/json") ? se = await te.json().then((U) => U.error.message || U.error) : te.headers.map["content-type"] === "text/xml" && (se = await te.text()), r(se);
    const ce = new Error(se);
    throw ce.response = te, ce;
  }
  async function H(te) {
    return d.current = te.next, te;
  }
  async function R(te) {
    return te.results.forEach((ce, U) => L(ce, U)), te;
  }
  function q() {
    if (!s) {
      if (!S.current.length)
        return $();
      if (d.current !== null) {
        const te = {
          pos: d.current,
          media_filter: "minimal"
        };
        return h.current === "search" && (te.q = w), l(!0), Q(h.current, { params: te });
      }
    }
  }
  function Y() {
    return t.contentFilter || "off";
  }
  function K(te) {
    x.current = te, W(), n(_.current);
  }
  return {
    updateSearch: E,
    isLoading: s,
    isLazyLoading: a,
    error: i,
    loadNextPage: q,
    columns: e,
    changeColumnCount: K,
    gifs: u
  };
}
function f7e({ error: t }) {
  return t === ik.COMMON ? /* @__PURE__ */ y.jsx("p", { children: "Uh-oh! Trouble reaching the Tenor API, please check your connection" }) : t === ik.INVALID_API_KEY ? /* @__PURE__ */ y.jsxs("p", { children: [
    "This version of the Tenor API is no longer supported. Please update your API key by following our",
    /* @__PURE__ */ y.jsx("a", { href: "https://ghost.org/docs/config/#tenor", rel: "noopener noreferrer", target: "_blank", children: " documentation here" }),
    "."
  ] }) : /* @__PURE__ */ y.jsx("p", { children: t });
}
function d7e({ gif: t, onClick: e, highlightedGif: n = {} }) {
  const i = ct(null), r = t.media_formats.tinygif;
  kt(() => {
    var a, l;
    n.id === t.id ? (a = i.current) == null || a.focus() : (l = i.current) == null || l.blur();
  }, [t.id, n.id]);
  const s = () => {
    e(t);
  };
  return /* @__PURE__ */ y.jsx(
    "button",
    {
      ref: i,
      className: "cursor-pointer border-2 border-transparent focus:border-green-600",
      "data-tenor-index": t.index,
      type: "button",
      onClick: s,
      children: /* @__PURE__ */ y.jsx("img", { alt: r.content_description, height: r.dims[1], src: r.url, width: r.dims[0] })
    }
  );
}
function h7e({ isLazyLoading: t }) {
  return t ? /* @__PURE__ */ y.jsx("div", { className: "inset-y-0 w-full p-6 text-center", children: /* @__PURE__ */ y.jsx("div", { className: "inline-block size-[50px] animate-spin rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full before:bg-grey-800" }) }) : /* @__PURE__ */ y.jsx("div", { className: "absolute inset-y-0 left-0 flex w-full items-center justify-center overflow-hidden", children: /* @__PURE__ */ y.jsx("div", { className: "relative inline-block size-[50px] animate-spin rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full before:bg-grey-800" }) });
}
const p7e = 540, m7e = 940, g7e = ({ onGifInsert: t, onClickOutside: e, updateSearch: n, columns: i, isLoading: r, isLazyLoading: s, error: o, changeColumnCount: a, loadNextPage: l, gifs: u }) => {
  const f = ct(null), d = ct(null), [h, m] = ft(void 0);
  kt(() => {
    n();
  }, []), kt(() => {
    if (!f.current)
      return;
    const K = new ResizeObserver((te) => {
      const [se] = te, U = (Array.isArray(se.contentBoxSize) ? se.contentBoxSize[0] : se.contentBoxSize).inlineSize;
      let F = 4;
      U <= p7e ? F = 2 : U <= m7e && (F = 3), a(F);
    });
    return K.observe(f.current), () => {
      K == null || K.disconnect();
    };
  }, []), kt(() => (document.addEventListener("keydown", Z), () => {
    document.removeEventListener("keydown", Z);
  }), [Z]), j.useEffect(() => {
    const K = (te) => {
      f.current && !f.current.contains(te.target) && e();
    };
    return window.addEventListener("mousedown", K), () => {
      window.removeEventListener("mousedown", K);
    };
  }, [e]);
  function g(K) {
    const te = K.media_formats.gif, se = {
      src: te.url,
      width: te.dims[0],
      height: te.dims[1]
    };
    t(se);
  }
  const w = (K) => {
    n(K.target.value);
  }, x = (K) => {
    const te = K.target;
    te.scrollTop + te.clientHeight >= te.scrollHeight - 1e3 && l();
  };
  function _() {
    var K;
    (K = d.current) == null || K.focus();
  }
  function S() {
    m(u[0]);
  }
  function C() {
    h !== u[u.length - 1] && m(u[h.index + 1]);
  }
  function E() {
    h.index === 0 && _(), m(u[h.index - 1]);
  }
  function M() {
    const K = i[h.columnIndex][h.columnRowIndex + 1];
    K && m(K);
  }
  function $() {
    const K = i[h.columnIndex][h.columnRowIndex - 1];
    K ? m(K) : _();
  }
  function P(K) {
    var le;
    const se = document.querySelector(`[data-tenor-index="${h.index}"]`).getBoundingClientRect();
    let ce;
    K === "left" ? ce = se.left - se.width / 2 : ce = se.right + se.width / 2;
    let U = se.top + se.height / 3, F, oe = 0;
    for (; !F; ) {
      let pe = (le = document.elementFromPoint(ce, U)) == null ? void 0 : le.closest("[data-tenor-index]");
      if ((pe == null ? void 0 : pe.dataset.tenorIndex) !== void 0) {
        F = pe;
        break;
      }
      if (oe += 1, U -= 5, oe > 10)
        break;
    }
    F && m(u[F.dataset.tenorIndex]);
  }
  function W() {
    h.columnIndex !== i.length - 1 && P("right");
  }
  function z() {
    if (h.index === 0)
      return _();
    h.columnIndex !== 0 && P("left");
  }
  function Z(K) {
    switch (K.key) {
      case "Tab":
        return L(K);
      case "ArrowLeft":
        return Q(K);
      case "ArrowRight":
        return V(K);
      case "ArrowUp":
        return H(K);
      case "ArrowDown":
        return R(K);
      case "Enter":
        return q(K);
      default:
        return null;
    }
  }
  function L(K) {
    if (K.shiftKey) {
      if (h)
        return K.preventDefault(), E();
    } else {
      if ((K == null ? void 0 : K.target.tagName) === "INPUT")
        return K.preventDefault(), K.target.blur(), S();
      if (h)
        return K == null || K.preventDefault(), C();
    }
  }
  function Q(K) {
    h && (K.preventDefault(), z());
  }
  function V(K) {
    h && (K.preventDefault(), W());
  }
  function H(K) {
    h && (K.preventDefault(), $());
  }
  function R(K) {
    if (K.target.tagName === "INPUT")
      return K.preventDefault(), K.target.blur(), S();
    h && (K.preventDefault(), M());
  }
  function q(K) {
    if (K.preventDefault(), K.target.tagName === "INPUT")
      return K.target.blur(), S();
    if (h)
      return g(h);
  }
  const Y = r && !s;
  return /* @__PURE__ */ y.jsxs(
    "div",
    {
      ref: f,
      className: "flex h-[540px] flex-col rounded border border-grey-200 bg-grey-50 dark:border-none dark:bg-grey-900",
      "data-testid": "tenor-selector",
      onClick: (K) => K.stopPropagation(),
      children: [
        /* @__PURE__ */ y.jsx("header", { className: "p-6", children: /* @__PURE__ */ y.jsxs("div", { className: "relative w-full", children: [
          /* @__PURE__ */ y.jsx(o7e, { className: "absolute left-4 top-1/2 size-4 -translate-y-2 text-grey-500 dark:text-grey-800" }),
          /* @__PURE__ */ y.jsx(
            "input",
            {
              ref: d,
              className: "h-10 w-full rounded-full border border-grey-300 pl-10 pr-8 font-sans text-md font-normal text-black focus:border-green focus:shadow-insetgreen dark:border-grey-800 dark:bg-grey-950 dark:text-white dark:placeholder:text-grey-800 dark:focus:border-green",
              placeholder: "Search Tenor for GIFs",
              autoFocus: !0,
              onChange: w
            }
          )
        ] }) }),
        /* @__PURE__ */ y.jsx("div", { className: "relative h-full overflow-hidden", children: /* @__PURE__ */ y.jsxs("div", { className: "h-full overflow-auto px-6", onScroll: x, children: [
          !o && !Y && /* @__PURE__ */ y.jsx("div", { className: "flex gap-4", children: i.map((K, te) => (
            // eslint-disable-next-line react/no-array-index-key
            /* @__PURE__ */ y.jsx("section", { className: "flex grow basis-0 flex-col justify-start gap-4", children: K.map((se) => /* @__PURE__ */ y.jsx(d7e, { gif: se, highlightedGif: h, onClick: g }, se.id)) }, te)
          )) }),
          !!r && !o && /* @__PURE__ */ y.jsx(h7e, { isLazyLoading: s }),
          !!o && /* @__PURE__ */ y.jsx("div", { "data-testid": "tenor-selector-error", children: /* @__PURE__ */ y.jsx(f7e, { error: o }) })
        ] }) })
      ]
    }
  );
}, v7e = ({ nodeKey: t }) => {
  const { cardConfig: e } = j.useContext(dt), n = c7e({ config: e.tenor }), [i] = Oe.useLexicalComposerContext();
  j.useEffect(() => {
    const o = (a) => {
      a.key === "Escape" && i.dispatchCommand(Wc, { cardKey: t });
    };
    return window.addEventListener("keydown", o), () => {
      window.removeEventListener("keydown", o);
    };
  }, []);
  const r = () => {
    i.dispatchCommand(Wc, { cardKey: t });
  }, s = async (o) => {
    i.dispatchCommand(DY, o);
  };
  return /* @__PURE__ */ y.jsx(
    g7e,
    {
      onClickOutside: r,
      onGifInsert: s,
      ...n
    }
  );
};
var b7e = Object.defineProperty, y7e = (t, e, n) => e in t ? b7e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Wn = (t, e, n) => y7e(t, typeof e != "symbol" ? e + "" : e, n), $Y = { exports: {} }, Wm = {};
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var AI;
function w7e() {
  if (AI) return Wm;
  AI = 1;
  var t = j, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
  function o(a, l, u) {
    var f, d = {}, h = null, m = null;
    u !== void 0 && (h = "" + u), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (m = l.ref);
    for (f in l) i.call(l, f) && !s.hasOwnProperty(f) && (d[f] = l[f]);
    if (a && a.defaultProps) for (f in l = a.defaultProps, l) d[f] === void 0 && (d[f] = l[f]);
    return { $$typeof: e, type: a, key: h, ref: m, props: d, _owner: r.current };
  }
  return Wm.Fragment = n, Wm.jsx = o, Wm.jsxs = o, Wm;
}
$Y.exports = w7e();
var vt = $Y.exports;
class k7e {
  constructor(e = 3) {
    Wn(this, "columnCount"), Wn(this, "columns", []), Wn(this, "columnHeights"), this.columnCount = e, this.columns = [[]], this.columnHeights = null;
  }
  reset() {
    let e = [], n = [];
    for (let i = 0; i < this.columnCount; i += 1)
      e[i] = [], n[i] = 0;
    this.columns = e, this.columnHeights = n;
  }
  addColumns() {
    for (let e = 0; e < this.columnCount; e++)
      this.columns.push([]), this.columnHeights.push(0);
  }
  addPhotoToColumns(e) {
    this.columns || this.reset();
    let n = Math.min(...this.columnHeights), i = this.columnHeights.indexOf(n);
    this.columnHeights[i] += 300 * e.ratio, this.columns[i].push(e);
  }
  getColumns() {
    return this.columns;
  }
  changeColumnCount(e) {
    e !== this.columnCount && (this.columnCount = e, this.reset());
  }
}
const x7e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M20 5.5l-8 8-8-8m-3.5 13h23", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: 10, fill: "none" })), _7e = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "0 0 32 32", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M17.4 29c-.8.8-2 .8-2.8 0L2.3 16.2C-.8 13.1-.8 8 2.3 4.8c3.1-3.1 8.2-3.1 11.3 0L16 7.6l2.3-2.8c3.1-3.1 8.2-3.1 11.3 0 3.1 3.1 3.1 8.2 0 11.4L17.4 29z" })), O7e = {
  heart: _7e,
  download: x7e
}, FO = ({ icon: t, label: e, ...n }) => {
  let i = null;
  return t && (i = O7e[t]), /* @__PURE__ */ vt.jsxs(
    "a",
    {
      className: "text-grey-700 flex h-8 shrink-0 cursor-pointer items-center rounded-md bg-white px-3 py-2 font-sans text-sm font-medium leading-6 opacity-90 transition-all ease-in-out hover:opacity-100",
      onClick: (r) => r.stopPropagation(),
      ...n,
      children: [
        t && i && /* @__PURE__ */ vt.jsx(i, { className: `size-4 ${t === "heart" ? "fill-red" : ""} stroke-[3px] ${e && "mr-1"}` }),
        e && /* @__PURE__ */ vt.jsx("span", { children: e })
      ]
    }
  );
}, MY = ({ payload: t, srcUrl: e, links: n, likes: i, user: r, alt: s, urls: o, height: a, width: l, zoomed: u, insertImage: f, selectImg: d }) => {
  const h = (m) => {
    m.stopPropagation(), d(u ? null : t);
  };
  return /* @__PURE__ */ vt.jsxs(
    "div",
    {
      className: `relative mb-6 block ${u ? "h-full w-[max-content] cursor-zoom-out" : "w-full cursor-zoom-in"}`,
      style: { backgroundColor: t.color || "transparent" },
      "data-kg-unsplash-gallery-item": !0,
      onClick: h,
      children: [
        /* @__PURE__ */ vt.jsx(
          "img",
          {
            alt: s,
            className: `${u ? "h-full w-auto object-contain" : "block h-auto"}`,
            height: a,
            loading: "lazy",
            src: e,
            width: l,
            "data-kg-unsplash-gallery-img": !0
          }
        ),
        /* @__PURE__ */ vt.jsxs("div", { className: "absolute inset-0 flex flex-col justify-between bg-gradient-to-b from-black/5 via-black/5 to-black/30 p-5 opacity-0 transition-all ease-in-out hover:opacity-100", children: [
          /* @__PURE__ */ vt.jsxs("div", { className: "flex items-center justify-end gap-3", children: [
            /* @__PURE__ */ vt.jsx(
              FO,
              {
                "data-kg-button": "unsplash-like",
                href: `${n.html}/?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit`,
                icon: "heart",
                label: i.toString(),
                rel: "noopener noreferrer",
                target: "_blank"
              }
            ),
            /* @__PURE__ */ vt.jsx(
              FO,
              {
                "data-kg-button": "unsplash-download",
                href: `${n.download}/?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit&amp;force=true`,
                icon: "download"
              }
            )
          ] }),
          /* @__PURE__ */ vt.jsxs("div", { className: "flex items-center justify-between", children: [
            /* @__PURE__ */ vt.jsxs("div", { className: "flex items-center", children: [
              /* @__PURE__ */ vt.jsx("img", { alt: "author", className: "mr-2 size-8 rounded-full", src: r.profile_image.medium }),
              /* @__PURE__ */ vt.jsx("div", { className: "mr-2 truncate font-sans text-sm font-medium text-white", children: r.name })
            ] }),
            /* @__PURE__ */ vt.jsx(FO, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (m) => {
              m.stopPropagation(), f({
                src: o.regular.replace(/&w=1080/, "&w=2000"),
                caption: `<span>Photo by <a href="${r.links.html}">${r.name}</a> / <a href="https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit">Unsplash</a></span>`,
                height: a,
                width: l,
                alt: s,
                links: n
              });
            } })
          ] })
        ] })
      ]
    }
  );
}, S7e = ({ payload: t, insertImage: e, selectImg: n, zoomed: i }) => /* @__PURE__ */ vt.jsx("div", { className: "flex h-full grow basis-0 justify-center", "data-kg-unsplash-zoomed": !0, onClick: () => n(null), children: /* @__PURE__ */ vt.jsx(
  MY,
  {
    alt: t.alt_description,
    height: t.height,
    insertImage: e,
    likes: t.likes,
    links: t.links,
    payload: t,
    selectImg: n,
    srcUrl: t.urls.regular,
    urls: t.urls,
    user: t.user,
    width: t.width,
    zoomed: i
  }
) }), C7e = () => /* @__PURE__ */ vt.jsx("div", { className: "absolute inset-y-0 left-0 flex w-full items-center justify-center overflow-hidden pb-[8vh]", "data-kg-loader": !0, children: /* @__PURE__ */ vt.jsx("div", { className: "animate-spin before:bg-grey-800 relative inline-block size-[50px] rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full" }) }), E7e = (t) => /* @__PURE__ */ vt.jsx("div", { className: "mr-6 flex grow basis-0 flex-col justify-start last-of-type:mr-0", children: t.children }), T7e = (t) => t != null && t.columns ? t == null ? void 0 : t.columns.map((e, n) => (
  // eslint-disable-next-line react/no-array-index-key
  /* @__PURE__ */ vt.jsx(E7e, { children: e.map((i) => /* @__PURE__ */ vt.jsx(
    MY,
    {
      alt: i.alt_description,
      height: i.height,
      insertImage: t == null ? void 0 : t.insertImage,
      likes: i.likes,
      links: i.links,
      payload: i,
      selectImg: t == null ? void 0 : t.selectImg,
      srcUrl: i.urls.regular,
      urls: i.urls,
      user: i.user,
      width: i.width,
      zoomed: (t == null ? void 0 : t.zoomed) || null
    },
    i.id
  )) }, n)
)) : null, BO = (t) => /* @__PURE__ */ vt.jsx("div", { className: "relative h-full overflow-hidden", "data-kg-unsplash-gallery": !0, children: /* @__PURE__ */ vt.jsxs("div", { ref: t.galleryRef, className: `flex size-full justify-center overflow-auto px-20 ${t != null && t.zoomed ? "pb-10" : ""}`, "data-kg-unsplash-gallery-scrollref": !0, children: [
  t.children,
  (t == null ? void 0 : t.isLoading) && /* @__PURE__ */ vt.jsx(C7e, {})
] }) }), $7e = ({
  zoomed: t,
  error: e,
  galleryRef: n,
  isLoading: i,
  dataset: r,
  selectImg: s,
  insertImage: o
}) => t ? /* @__PURE__ */ vt.jsx(
  BO,
  {
    galleryRef: n,
    zoomed: t,
    children: /* @__PURE__ */ vt.jsx(
      S7e,
      {
        alt: t.alt_description,
        height: t.height,
        insertImage: o,
        likes: t.likes,
        links: t.links,
        payload: t,
        selectImg: s,
        srcUrl: t.urls.regular,
        urls: t.urls,
        user: t.user,
        width: t.width,
        zoomed: t
      }
    )
  }
) : e ? /* @__PURE__ */ vt.jsx(
  BO,
  {
    galleryRef: n,
    zoomed: t,
    children: /* @__PURE__ */ vt.jsxs("div", { className: "flex h-full flex-col items-center justify-center", children: [
      /* @__PURE__ */ vt.jsx("h1", { className: "mb-4 text-2xl font-bold", children: "Error" }),
      /* @__PURE__ */ vt.jsx("p", { className: "text-lg font-medium", children: e })
    ] })
  }
) : /* @__PURE__ */ vt.jsx(
  BO,
  {
    galleryRef: n,
    isLoading: i,
    zoomed: t,
    children: /* @__PURE__ */ vt.jsx(
      T7e,
      {
        columns: r,
        insertImage: o,
        selectImg: s,
        zoomed: t
      }
    )
  }
), M7e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M.75 23.249l22.5-22.5M23.25 23.249L.75.749" })), N7e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1.472 13.357a9.063 9.063 0 1 0 16.682-7.09 9.063 9.063 0 1 0-16.682 7.09Zm14.749 2.863 7.029 7.03" })), A7e = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 122.43 122.41", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z" })), D7e = ({ closeModal: t, handleSearch: e, children: n }) => /* @__PURE__ */ vt.jsxs(vt.Fragment, { children: [
  /* @__PURE__ */ vt.jsx("div", { className: "fixed inset-0 z-40 h-[100vh] bg-black opacity-60" }),
  /* @__PURE__ */ vt.jsxs("div", { className: "not-kg-prose fixed inset-8 z-50 overflow-hidden rounded bg-white shadow-xl", "data-kg-modal": "unsplash", children: [
    /* @__PURE__ */ vt.jsx("button", { className: "absolute right-6 top-6 cursor-pointer", type: "button", children: /* @__PURE__ */ vt.jsx(
      M7e,
      {
        className: "text-grey-400 size-4 stroke-2",
        "data-kg-modal-close-button": !0,
        onClick: () => t()
      }
    ) }),
    /* @__PURE__ */ vt.jsxs("div", { className: "flex h-full flex-col", children: [
      /* @__PURE__ */ vt.jsxs("header", { className: "flex shrink-0 items-center justify-between px-20 py-10", children: [
        /* @__PURE__ */ vt.jsxs("h1", { className: "flex items-center gap-2 font-sans text-3xl font-bold text-black", children: [
          /* @__PURE__ */ vt.jsx(A7e, { className: "mb-1" }),
          "Unsplash"
        ] }),
        /* @__PURE__ */ vt.jsxs("div", { className: "relative w-full max-w-sm", children: [
          /* @__PURE__ */ vt.jsx(N7e, { className: "text-grey-700 absolute left-4 top-1/2 size-4 -translate-y-2" }),
          /* @__PURE__ */ vt.jsx("input", { className: "border-grey-300 focus:border-grey-400 h-10 w-full rounded-full border border-solid pl-10 pr-8 font-sans text-md font-normal text-black focus-visible:outline-none", placeholder: "Search free high-resolution photos", autoFocus: !0, "data-kg-unsplash-search": !0, onChange: e })
        ] })
      ] }),
      n
    ] })
  ] })
] }), P7e = [
  {
    id: "TA5hw14Coh4",
    slug: "a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",
    alternative_slugs: {
      en: "a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4"
    },
    created_at: "2024-02-07T22:39:36Z",
    updated_at: "2024-03-07T23:46:14Z",
    promoted_at: null,
    width: 8640,
    height: 5760,
    color: "#8c5940",
    blur_hash: "LKD]brE2IUr?Lgwci_NaDjR*ofoe",
    description: "NEOM will be home to one of the world’s largest nature reserves: a 25,000 sq km stretch of wilderness, encompassing two deserts divided by a mountain range. | NEOM, Saudi Arabia",
    alt_description: "a person standing on a sand dune in the desert",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1707345512638-997d31a10eaa?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1707345512638-997d31a10eaa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707345512638-997d31a10eaa"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",
      html: "https://unsplash.com/photos/a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",
      download: "https://unsplash.com/photos/TA5hw14Coh4/download?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/TA5hw14Coh4/download?ixid=M3wxMTc3M3wxfDF8YWxsfDF8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 226,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: {
      impression_urls: [],
      tagline: "Made to Change",
      tagline_url: "https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",
      sponsor: {
        id: "mYizSrdJkkU",
        updated_at: "2024-03-11T08:54:08Z",
        username: "neom",
        name: "NEOM",
        first_name: "NEOM",
        last_name: null,
        twitter_username: "neom",
        portfolio_url: "http://www.neom.com",
        bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
        location: "NEOM, Saudi Arabia",
        links: {
          self: "https://api.unsplash.com/users/neom",
          html: "https://unsplash.com/@neom",
          photos: "https://api.unsplash.com/users/neom/photos",
          likes: "https://api.unsplash.com/users/neom/likes",
          portfolio: "https://api.unsplash.com/users/neom/portfolio",
          following: "https://api.unsplash.com/users/neom/following",
          followers: "https://api.unsplash.com/users/neom/followers"
        },
        profile_image: {
          small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
          medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
          large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
        },
        instagram_username: "discoverneom",
        total_collections: 7,
        total_likes: 1,
        total_photos: 222,
        total_promoted_photos: 72,
        accepted_tos: !0,
        for_hire: !1,
        social: {
          instagram_username: "discoverneom",
          portfolio_url: "http://www.neom.com",
          twitter_username: "neom",
          paypal_email: null
        }
      }
    },
    topic_submissions: {},
    user: {
      id: "mYizSrdJkkU",
      updated_at: "2024-03-11T08:54:08Z",
      username: "neom",
      name: "NEOM",
      first_name: "NEOM",
      last_name: null,
      twitter_username: "neom",
      portfolio_url: "http://www.neom.com",
      bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
      location: "NEOM, Saudi Arabia",
      links: {
        self: "https://api.unsplash.com/users/neom",
        html: "https://unsplash.com/@neom",
        photos: "https://api.unsplash.com/users/neom/photos",
        likes: "https://api.unsplash.com/users/neom/likes",
        portfolio: "https://api.unsplash.com/users/neom/portfolio",
        following: "https://api.unsplash.com/users/neom/following",
        followers: "https://api.unsplash.com/users/neom/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "discoverneom",
      total_collections: 7,
      total_likes: 1,
      total_photos: 222,
      total_promoted_photos: 72,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "discoverneom",
        portfolio_url: "http://www.neom.com",
        twitter_username: "neom",
        paypal_email: null
      }
    }
  },
  {
    id: "UArA9A02Kvk",
    slug: "a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",
    alternative_slugs: {
      en: "a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk"
    },
    created_at: "2024-03-05T15:48:31Z",
    updated_at: "2024-03-11T06:59:25Z",
    promoted_at: "2024-03-11T06:59:25Z",
    width: 2160,
    height: 2700,
    color: "#262626",
    blur_hash: "L78;S$~p00oLD%D%IVay9F9ZIUay",
    description: null,
    alt_description: "a black and white photo of a man with his head in his hands",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709653688483-fc2b356c1f36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709653688483-fc2b356c1f36"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",
      html: "https://unsplash.com/photos/a-black-and-white-photo-of-a-man-with-his-head-in-his-hands-UArA9A02Kvk",
      download: "https://unsplash.com/photos/UArA9A02Kvk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/UArA9A02Kvk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDJ8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 20,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "gwWL9kMcm2g",
      updated_at: "2024-03-11T10:14:07Z",
      username: "nickandreka",
      name: "Nick Andréka",
      first_name: "Nick",
      last_name: "Andréka",
      twitter_username: null,
      portfolio_url: null,
      bio: null,
      location: null,
      links: {
        self: "https://api.unsplash.com/users/nickandreka",
        html: "https://unsplash.com/@nickandreka",
        photos: "https://api.unsplash.com/users/nickandreka/photos",
        likes: "https://api.unsplash.com/users/nickandreka/likes",
        portfolio: "https://api.unsplash.com/users/nickandreka/portfolio",
        following: "https://api.unsplash.com/users/nickandreka/following",
        followers: "https://api.unsplash.com/users/nickandreka/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1698854198608-989031a5ccdeimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "andreka.art",
      total_collections: 0,
      total_likes: 8,
      total_photos: 35,
      total_promoted_photos: 19,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "andreka.art",
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "QX_7m4Lh2qg",
    slug: "a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",
    alternative_slugs: {
      en: "a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg"
    },
    created_at: "2024-03-10T16:46:33Z",
    updated_at: "2024-03-11T06:59:11Z",
    promoted_at: "2024-03-11T06:59:11Z",
    width: 4e3,
    height: 5751,
    color: "#f3f3f3",
    blur_hash: "LAQJiu~X-;9G-:?cIURj~qD%00xt",
    description: null,
    alt_description: "a black and white photo of a lighthouse",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710088912041-34d1767d376a?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710088912041-34d1767d376a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710088912041-34d1767d376a"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",
      html: "https://unsplash.com/photos/a-black-and-white-photo-of-a-lighthouse-QX_7m4Lh2qg",
      download: "https://unsplash.com/photos/QX_7m4Lh2qg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/QX_7m4Lh2qg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 21,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "ue6QWAAHoIQ",
      updated_at: "2024-03-11T08:53:54Z",
      username: "huzhewseh",
      name: "Volodymyr M",
      first_name: "Volodymyr",
      last_name: "M",
      twitter_username: "huzhewseh",
      portfolio_url: null,
      bio: null,
      location: null,
      links: {
        self: "https://api.unsplash.com/users/huzhewseh",
        html: "https://unsplash.com/@huzhewseh",
        photos: "https://api.unsplash.com/users/huzhewseh/photos",
        likes: "https://api.unsplash.com/users/huzhewseh/likes",
        portfolio: "https://api.unsplash.com/users/huzhewseh/portfolio",
        following: "https://api.unsplash.com/users/huzhewseh/following",
        followers: "https://api.unsplash.com/users/huzhewseh/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1663221970918-58b1620c49c9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "huzhewseh",
      total_collections: 0,
      total_likes: 0,
      total_photos: 18,
      total_promoted_photos: 3,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "huzhewseh",
        portfolio_url: null,
        twitter_username: "huzhewseh",
        paypal_email: null
      }
    }
  },
  {
    id: "fMNP7XVcct0",
    slug: "a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",
    alternative_slugs: {
      en: "a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0"
    },
    created_at: "2024-03-09T08:40:07Z",
    updated_at: "2024-03-11T06:58:58Z",
    promoted_at: "2024-03-11T06:58:58Z",
    width: 3264,
    height: 4928,
    color: "#262626",
    blur_hash: "L35hY|xu00D%-;xuIUD%00j[?bWB",
    description: null,
    alt_description: "a woman standing in a dark room with her eyes closed",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709973540503-77d699279634?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709973540503-77d699279634?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709973540503-77d699279634"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",
      html: "https://unsplash.com/photos/a-woman-standing-in-a-dark-room-with-her-eyes-closed-fMNP7XVcct0",
      download: "https://unsplash.com/photos/fMNP7XVcct0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/fMNP7XVcct0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDR8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 7,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "lSlibqdw_c8",
      updated_at: "2024-03-11T08:54:13Z",
      username: "vitaliyshev89",
      name: "Vitaliy Shevchenko",
      first_name: "Vitaliy",
      last_name: "Shevchenko",
      twitter_username: null,
      portfolio_url: null,
      bio: null,
      location: "Kharkiv, Ukraine",
      links: {
        self: "https://api.unsplash.com/users/vitaliyshev89",
        html: "https://unsplash.com/@vitaliyshev89",
        photos: "https://api.unsplash.com/users/vitaliyshev89/photos",
        likes: "https://api.unsplash.com/users/vitaliyshev89/likes",
        portfolio: "https://api.unsplash.com/users/vitaliyshev89/portfolio",
        following: "https://api.unsplash.com/users/vitaliyshev89/following",
        followers: "https://api.unsplash.com/users/vitaliyshev89/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1652271342920-31eebbc2c3d0image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: null,
      total_collections: 0,
      total_likes: 1,
      total_photos: 205,
      total_promoted_photos: 29,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: null,
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "b4kKyX0BQvc",
    slug: "a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",
    alternative_slugs: {
      en: "a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc"
    },
    created_at: "2024-03-08T21:58:28Z",
    updated_at: "2024-03-11T06:57:35Z",
    promoted_at: "2024-03-11T06:57:27Z",
    width: 6e3,
    height: 4e3,
    color: "#0c2626",
    blur_hash: "LSDJS6kD9Zxu~qkDM|xaS%j]xaV@",
    description: 'Stunning metro train station "Elbbrücken" in Hamburg, Germany during sunset',
    alt_description: "a train station with a train on the tracks",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709934645859-f1ed8d3a4954"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",
      html: "https://unsplash.com/photos/a-train-station-with-a-train-on-the-tracks-b4kKyX0BQvc",
      download: "https://unsplash.com/photos/b4kKyX0BQvc/download?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/b4kKyX0BQvc/download?ixid=M3wxMTc3M3wwfDF8YWxsfDV8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 8,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      "street-photography": {
        status: "approved",
        approved_on: "2024-03-11T06:57:35Z"
      }
    },
    user: {
      id: "TffftDPlBPk",
      updated_at: "2024-03-11T06:59:04Z",
      username: "christianlue",
      name: "Christian Lue",
      first_name: "Christian",
      last_name: "Lue",
      twitter_username: "chrrischii",
      portfolio_url: null,
      bio: null,
      location: "Frankfurt / Berlin",
      links: {
        self: "https://api.unsplash.com/users/christianlue",
        html: "https://unsplash.com/@christianlue",
        photos: "https://api.unsplash.com/users/christianlue/photos",
        likes: "https://api.unsplash.com/users/christianlue/likes",
        portfolio: "https://api.unsplash.com/users/christianlue/portfolio",
        following: "https://api.unsplash.com/users/christianlue/following",
        followers: "https://api.unsplash.com/users/christianlue/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1581889127238-ea4aa40e8cb4image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: null,
      total_collections: 7,
      total_likes: 15,
      total_photos: 571,
      total_promoted_photos: 103,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: null,
        portfolio_url: null,
        twitter_username: "chrrischii",
        paypal_email: null
      }
    }
  },
  {
    id: "9633dHhioC8",
    slug: "a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",
    alternative_slugs: {
      en: "a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8"
    },
    created_at: "2023-04-28T15:30:26Z",
    updated_at: "2024-03-10T10:46:58Z",
    promoted_at: "2023-05-13T12:02:35Z",
    width: 8316,
    height: 5544,
    color: "#734026",
    blur_hash: "LVHdd89G57-o.9IBsSR-~pD*M{xt",
    description: "Amongst expansive red sands and spectacular sandstone rock formations, Hisma Desert – NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",
    alt_description: "a person walking through a canyon in the desert",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1682695795255-b236b1f1267d?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1682695795255-b236b1f1267d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682695795255-b236b1f1267d"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",
      html: "https://unsplash.com/photos/a-person-walking-through-a-canyon-in-the-desert-9633dHhioC8",
      download: "https://unsplash.com/photos/9633dHhioC8/download?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/9633dHhioC8/download?ixid=M3wxMTc3M3wxfDF8YWxsfDZ8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 631,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: {
      impression_urls: [
        "https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515595&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif",
        "https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515798&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"
      ],
      tagline: "Made to Change",
      tagline_url: "https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",
      sponsor: {
        id: "mYizSrdJkkU",
        updated_at: "2024-03-11T08:54:08Z",
        username: "neom",
        name: "NEOM",
        first_name: "NEOM",
        last_name: null,
        twitter_username: "neom",
        portfolio_url: "http://www.neom.com",
        bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
        location: "NEOM, Saudi Arabia",
        links: {
          self: "https://api.unsplash.com/users/neom",
          html: "https://unsplash.com/@neom",
          photos: "https://api.unsplash.com/users/neom/photos",
          likes: "https://api.unsplash.com/users/neom/likes",
          portfolio: "https://api.unsplash.com/users/neom/portfolio",
          following: "https://api.unsplash.com/users/neom/following",
          followers: "https://api.unsplash.com/users/neom/followers"
        },
        profile_image: {
          small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
          medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
          large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
        },
        instagram_username: "discoverneom",
        total_collections: 7,
        total_likes: 1,
        total_photos: 222,
        total_promoted_photos: 72,
        accepted_tos: !0,
        for_hire: !1,
        social: {
          instagram_username: "discoverneom",
          portfolio_url: "http://www.neom.com",
          twitter_username: "neom",
          paypal_email: null
        }
      }
    },
    topic_submissions: {},
    user: {
      id: "mYizSrdJkkU",
      updated_at: "2024-03-11T08:54:08Z",
      username: "neom",
      name: "NEOM",
      first_name: "NEOM",
      last_name: null,
      twitter_username: "neom",
      portfolio_url: "http://www.neom.com",
      bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
      location: "NEOM, Saudi Arabia",
      links: {
        self: "https://api.unsplash.com/users/neom",
        html: "https://unsplash.com/@neom",
        photos: "https://api.unsplash.com/users/neom/photos",
        likes: "https://api.unsplash.com/users/neom/likes",
        portfolio: "https://api.unsplash.com/users/neom/portfolio",
        following: "https://api.unsplash.com/users/neom/following",
        followers: "https://api.unsplash.com/users/neom/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "discoverneom",
      total_collections: 7,
      total_likes: 1,
      total_photos: 222,
      total_promoted_photos: 72,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "discoverneom",
        portfolio_url: "http://www.neom.com",
        twitter_username: "neom",
        paypal_email: null
      }
    }
  },
  {
    id: "4PmYYBFhwFM",
    slug: "a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",
    alternative_slugs: {
      en: "a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM"
    },
    created_at: "2024-03-09T18:40:37Z",
    updated_at: "2024-03-11T06:57:23Z",
    promoted_at: "2024-03-11T06:57:23Z",
    width: 5248,
    height: 7872,
    color: "#a6a6a6",
    blur_hash: "LHDA40%MbGxu%L?bt7of_N%gIBRj",
    description: null,
    alt_description: "a close up of a car door with the word budder on it",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710009439657-c0dfdc051a28?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710009439657-c0dfdc051a28"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",
      html: "https://unsplash.com/photos/a-close-up-of-a-car-door-with-the-word-budder-on-it-4PmYYBFhwFM",
      download: "https://unsplash.com/photos/4PmYYBFhwFM/download?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/4PmYYBFhwFM/download?ixid=M3wxMTc3M3wwfDF8YWxsfDd8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 5,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "Xz7_QPPM2So",
      updated_at: "2024-03-11T08:27:09Z",
      username: "tiago_f_ferreira",
      name: "Tiago Ferreira",
      first_name: "Tiago",
      last_name: "Ferreira",
      twitter_username: null,
      portfolio_url: "https://tiagoferreira765.wixsite.com/photographyandmusic",
      bio: `Photography - a hobby, a passion.\r
Planet earth 🌎, a creative space to enjoy.`,
      location: "Lisboa, Portugal",
      links: {
        self: "https://api.unsplash.com/users/tiago_f_ferreira",
        html: "https://unsplash.com/@tiago_f_ferreira",
        photos: "https://api.unsplash.com/users/tiago_f_ferreira/photos",
        likes: "https://api.unsplash.com/users/tiago_f_ferreira/likes",
        portfolio: "https://api.unsplash.com/users/tiago_f_ferreira/portfolio",
        following: "https://api.unsplash.com/users/tiago_f_ferreira/following",
        followers: "https://api.unsplash.com/users/tiago_f_ferreira/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1595844391672-cdf854039843image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "tiago_f_ferreira",
      total_collections: 1,
      total_likes: 144,
      total_photos: 205,
      total_promoted_photos: 8,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "tiago_f_ferreira",
        portfolio_url: "https://tiagoferreira765.wixsite.com/photographyandmusic",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "BUhVFtY-890",
    slug: "a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",
    alternative_slugs: {
      en: "a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890"
    },
    created_at: "2024-03-09T10:03:28Z",
    updated_at: "2024-03-11T06:57:20Z",
    promoted_at: "2024-03-11T06:57:20Z",
    width: 3511,
    height: 2231,
    color: "#262626",
    blur_hash: "L24epEWB0eMx$*t8OEV@RPj]baay",
    description: null,
    alt_description: "a close up of a bird with a red head",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709978601970-036e92662b46?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709978601970-036e92662b46?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709978601970-036e92662b46"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",
      html: "https://unsplash.com/photos/a-close-up-of-a-bird-with-a-red-head-BUhVFtY-890",
      download: "https://unsplash.com/photos/BUhVFtY-890/download?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/BUhVFtY-890/download?ixid=M3wxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 8,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      "textures-patterns": {
        status: "rejected"
      },
      spring: {
        status: "rejected"
      },
      "earth-hour": {
        status: "approved",
        approved_on: "2024-03-10T12:31:10Z"
      },
      health: {
        status: "unevaluated"
      },
      animals: {
        status: "unevaluated"
      },
      film: {
        status: "unevaluated"
      },
      travel: {
        status: "unevaluated"
      },
      nature: {
        status: "unevaluated"
      },
      wallpapers: {
        status: "unevaluated"
      }
    },
    user: {
      id: "3SCC0WcF-wA",
      updated_at: "2024-03-11T09:44:02Z",
      username: "refargotohp",
      name: "refargotohp",
      first_name: "refargotohp",
      last_name: null,
      twitter_username: null,
      portfolio_url: null,
      bio: "Hello 👋🏼 My name is Pavel, and I am a photographer. I enjoy the photo in any of its manifestations. Sequential shooting, street, studio, portraiture - it's all me. Waiting for you on my social networks - @refargotohp",
      location: null,
      links: {
        self: "https://api.unsplash.com/users/refargotohp",
        html: "https://unsplash.com/@refargotohp",
        photos: "https://api.unsplash.com/users/refargotohp/photos",
        likes: "https://api.unsplash.com/users/refargotohp/likes",
        portfolio: "https://api.unsplash.com/users/refargotohp/portfolio",
        following: "https://api.unsplash.com/users/refargotohp/following",
        followers: "https://api.unsplash.com/users/refargotohp/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1653036388874-dab6bdb375bcimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "refargotohp",
      total_collections: 1,
      total_likes: 86,
      total_photos: 132,
      total_promoted_photos: 61,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "refargotohp",
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "99clkpyauJI",
    slug: "there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",
    alternative_slugs: {
      en: "there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI"
    },
    created_at: "2024-03-10T00:15:28Z",
    updated_at: "2024-03-11T06:56:32Z",
    promoted_at: "2024-03-11T06:56:32Z",
    width: 4299,
    height: 3448,
    color: "#f3f3f3",
    blur_hash: "LjJuGn?bM{xu~qoKRPM{9FM{t6M_",
    description: null,
    alt_description: "there are bottles of beer on a shelf in front of a window",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710029721414-9e2125e155c3?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710029721414-9e2125e155c3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710029721414-9e2125e155c3"
    },
    links: {
      self: "https://api.unsplash.com/photos/there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",
      html: "https://unsplash.com/photos/there-are-bottles-of-beer-on-a-shelf-in-front-of-a-window-99clkpyauJI",
      download: "https://unsplash.com/photos/99clkpyauJI/download?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA",
      download_location: "https://api.unsplash.com/photos/99clkpyauJI/download?ixid=M3wxMTc3M3wwfDF8YWxsfDl8fHx8fHwyfHwxNzEwMTUzMjA1fA"
    },
    likes: 2,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      film: {
        status: "approved",
        approved_on: "2024-03-10T16:39:06Z"
      }
    },
    user: {
      id: "TPCcwPbQzmY",
      updated_at: "2024-03-11T06:59:01Z",
      username: "suzm4film",
      name: "szm 4",
      first_name: "szm",
      last_name: "4",
      twitter_username: null,
      portfolio_url: null,
      bio: null,
      location: "Japan",
      links: {
        self: "https://api.unsplash.com/users/suzm4film",
        html: "https://unsplash.com/@suzm4film",
        photos: "https://api.unsplash.com/users/suzm4film/photos",
        likes: "https://api.unsplash.com/users/suzm4film/likes",
        portfolio: "https://api.unsplash.com/users/suzm4film/portfolio",
        following: "https://api.unsplash.com/users/suzm4film/following",
        followers: "https://api.unsplash.com/users/suzm4film/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1632890829763-5c518f873dee?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: null,
      total_collections: 0,
      total_likes: 0,
      total_photos: 189,
      total_promoted_photos: 19,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: null,
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "Lbt-cZyOUM4",
    slug: "an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",
    alternative_slugs: {
      en: "an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4"
    },
    created_at: "2024-03-09T16:58:57Z",
    updated_at: "2024-03-11T06:57:06Z",
    promoted_at: "2024-03-11T06:55:38Z",
    width: 5783,
    height: 3848,
    color: "#0c2626",
    blur_hash: "LkG[.y01Ri-:?bM{RjofM{xuRkWB",
    description: null,
    alt_description: "an old fashioned typewriter sitting on a table in front of a window",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710003364549-de37d4ed3413?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710003364549-de37d4ed3413?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710003364549-de37d4ed3413"
    },
    links: {
      self: "https://api.unsplash.com/photos/an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",
      html: "https://unsplash.com/photos/an-old-fashioned-typewriter-sitting-on-a-table-in-front-of-a-window-Lbt-cZyOUM4",
      download: "https://unsplash.com/photos/Lbt-cZyOUM4/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/Lbt-cZyOUM4/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 3,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "8D4VFtkiIuw",
      updated_at: "2024-03-11T07:28:57Z",
      username: "tama66",
      name: "Peter Herrmann",
      first_name: "Peter",
      last_name: "Herrmann",
      twitter_username: null,
      portfolio_url: null,
      bio: "Everything... but not boring! Instagram@Tiefstapler66",
      location: "Leverkusen/Germany",
      links: {
        self: "https://api.unsplash.com/users/tama66",
        html: "https://unsplash.com/@tama66",
        photos: "https://api.unsplash.com/users/tama66/photos",
        likes: "https://api.unsplash.com/users/tama66/likes",
        portfolio: "https://api.unsplash.com/users/tama66/portfolio",
        following: "https://api.unsplash.com/users/tama66/following",
        followers: "https://api.unsplash.com/users/tama66/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1611475141936-383e23c6cc6dimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "tiefstapler66",
      total_collections: 1,
      total_likes: 149,
      total_photos: 363,
      total_promoted_photos: 152,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "tiefstapler66",
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "D1jr0Mevs-c",
    slug: "an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",
    alternative_slugs: {
      en: "an-aerial-view-of-a-body-of-water-D1jr0Mevs-c"
    },
    created_at: "2024-02-07T22:34:15Z",
    updated_at: "2024-03-10T10:54:36Z",
    promoted_at: null,
    width: 5280,
    height: 2970,
    color: "#0c2626",
    blur_hash: "LH9[JL0i+HM{^}Ezw#R.b@n$nhbb",
    description: "The Islands of NEOM are home to kaleidoscopic-coloured coral reefs and an abundance of diverse marine life | Islands of NEOM – NEOM, Saudi Arabia",
    alt_description: "an aerial view of a body of water",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1707343843982-f8275f3994c5?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1707343843982-f8275f3994c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707343843982-f8275f3994c5"
    },
    links: {
      self: "https://api.unsplash.com/photos/an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",
      html: "https://unsplash.com/photos/an-aerial-view-of-a-body-of-water-D1jr0Mevs-c",
      download: "https://unsplash.com/photos/D1jr0Mevs-c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/D1jr0Mevs-c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDExfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 308,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: {
      impression_urls: [],
      tagline: "Made to Change",
      tagline_url: "https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",
      sponsor: {
        id: "mYizSrdJkkU",
        updated_at: "2024-03-11T08:54:08Z",
        username: "neom",
        name: "NEOM",
        first_name: "NEOM",
        last_name: null,
        twitter_username: "neom",
        portfolio_url: "http://www.neom.com",
        bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
        location: "NEOM, Saudi Arabia",
        links: {
          self: "https://api.unsplash.com/users/neom",
          html: "https://unsplash.com/@neom",
          photos: "https://api.unsplash.com/users/neom/photos",
          likes: "https://api.unsplash.com/users/neom/likes",
          portfolio: "https://api.unsplash.com/users/neom/portfolio",
          following: "https://api.unsplash.com/users/neom/following",
          followers: "https://api.unsplash.com/users/neom/followers"
        },
        profile_image: {
          small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
          medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
          large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
        },
        instagram_username: "discoverneom",
        total_collections: 7,
        total_likes: 1,
        total_photos: 222,
        total_promoted_photos: 72,
        accepted_tos: !0,
        for_hire: !1,
        social: {
          instagram_username: "discoverneom",
          portfolio_url: "http://www.neom.com",
          twitter_username: "neom",
          paypal_email: null
        }
      }
    },
    topic_submissions: {},
    user: {
      id: "mYizSrdJkkU",
      updated_at: "2024-03-11T08:54:08Z",
      username: "neom",
      name: "NEOM",
      first_name: "NEOM",
      last_name: null,
      twitter_username: "neom",
      portfolio_url: "http://www.neom.com",
      bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
      location: "NEOM, Saudi Arabia",
      links: {
        self: "https://api.unsplash.com/users/neom",
        html: "https://unsplash.com/@neom",
        photos: "https://api.unsplash.com/users/neom/photos",
        likes: "https://api.unsplash.com/users/neom/likes",
        portfolio: "https://api.unsplash.com/users/neom/portfolio",
        following: "https://api.unsplash.com/users/neom/following",
        followers: "https://api.unsplash.com/users/neom/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "discoverneom",
      total_collections: 7,
      total_likes: 1,
      total_photos: 222,
      total_promoted_photos: 72,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "discoverneom",
        portfolio_url: "http://www.neom.com",
        twitter_username: "neom",
        paypal_email: null
      }
    }
  },
  {
    id: "0RBEUjWQBBA",
    slug: "a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",
    alternative_slugs: {
      en: "a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA"
    },
    created_at: "2024-03-10T10:15:48Z",
    updated_at: "2024-03-11T06:55:22Z",
    promoted_at: "2024-03-11T06:55:22Z",
    width: 4672,
    height: 7008,
    color: "#262626",
    blur_hash: "LOG8o{t7WBWB~DofR*j@D%NGR%WB",
    description: null,
    alt_description: "a woman standing under a cherry blossom tree",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710065574765-a685385c6d9a?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710065574765-a685385c6d9a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710065574765-a685385c6d9a"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",
      html: "https://unsplash.com/photos/a-woman-standing-under-a-cherry-blossom-tree-0RBEUjWQBBA",
      download: "https://unsplash.com/photos/0RBEUjWQBBA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/0RBEUjWQBBA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEyfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 11,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "ePlndXHeIiM",
      updated_at: "2024-03-11T09:04:03Z",
      username: "lwdzl",
      name: "Jack Dong",
      first_name: "Jack",
      last_name: "Dong",
      twitter_username: null,
      portfolio_url: "https://www.xiaohongshu.com/user/profile/5f11b998000000000101d8d2?xhsshare=CopyLink&appuid=5f11b998000000000101d8d2&apptime=1696562673",
      bio: null,
      location: null,
      links: {
        self: "https://api.unsplash.com/users/lwdzl",
        html: "https://unsplash.com/@lwdzl",
        photos: "https://api.unsplash.com/users/lwdzl/photos",
        likes: "https://api.unsplash.com/users/lwdzl/likes",
        portfolio: "https://api.unsplash.com/users/lwdzl/portfolio",
        following: "https://api.unsplash.com/users/lwdzl/following",
        followers: "https://api.unsplash.com/users/lwdzl/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1696563144074-80a8da44bcd4?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: null,
      total_collections: 0,
      total_likes: 101,
      total_photos: 640,
      total_promoted_photos: 112,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: null,
        portfolio_url: "https://www.xiaohongshu.com/user/profile/5f11b998000000000101d8d2?xhsshare=CopyLink&appuid=5f11b998000000000101d8d2&apptime=1696562673",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "2IGDvJa2Bd0",
    slug: "a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",
    alternative_slugs: {
      en: "a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0"
    },
    created_at: "2024-02-21T14:32:53Z",
    updated_at: "2024-03-11T06:54:06Z",
    promoted_at: "2024-03-11T06:54:06Z",
    width: 4672,
    height: 5840,
    color: "#f3f3f3",
    blur_hash: "L#Gv00ofD%ay~qoeM_ay%NafWVj[",
    description: null,
    alt_description: "a path in the middle of a foggy forest",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1708525736169-534ee3e24e99?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1708525736169-534ee3e24e99?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708525736169-534ee3e24e99"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",
      html: "https://unsplash.com/photos/a-path-in-the-middle-of-a-foggy-forest-2IGDvJa2Bd0",
      download: "https://unsplash.com/photos/2IGDvJa2Bd0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/2IGDvJa2Bd0/download?ixid=M3wxMTc3M3wwfDF8YWxsfDEzfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 11,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "zL5HAN1fnJw",
      updated_at: "2024-03-11T06:58:57Z",
      username: "viklukphotography",
      name: "Viktor Mischke",
      first_name: "Viktor",
      last_name: "Mischke",
      twitter_username: null,
      portfolio_url: "https://www.istockphoto.com/de/portfolio/snoviktor",
      bio: null,
      location: "Schloss Holte-Stukenbrock",
      links: {
        self: "https://api.unsplash.com/users/viklukphotography",
        html: "https://unsplash.com/@viklukphotography",
        photos: "https://api.unsplash.com/users/viklukphotography/photos",
        likes: "https://api.unsplash.com/users/viklukphotography/likes",
        portfolio: "https://api.unsplash.com/users/viklukphotography/portfolio",
        following: "https://api.unsplash.com/users/viklukphotography/following",
        followers: "https://api.unsplash.com/users/viklukphotography/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1646051425690-ed09fae6858fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "viktormischke",
      total_collections: 0,
      total_likes: 141,
      total_photos: 38,
      total_promoted_photos: 8,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "viktormischke",
        portfolio_url: "https://www.istockphoto.com/de/portfolio/snoviktor",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "PZfeP0uwBpQ",
    slug: "a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",
    alternative_slugs: {
      en: "a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ"
    },
    created_at: "2024-02-24T10:57:49Z",
    updated_at: "2024-03-11T06:53:56Z",
    promoted_at: "2024-03-11T06:53:56Z",
    width: 2720,
    height: 4080,
    color: "#404026",
    blur_hash: "LIB:Tx%K56NGORbYxas:0KRj-poe",
    description: "A woman wearing a traditional coolie hat kneels in a field of green vegetables, carefully harvesting the crops.",
    alt_description: "a person with a hat on their head in a field",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1708771641703-0df3d179cec3?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1708771641703-0df3d179cec3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708771641703-0df3d179cec3"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",
      html: "https://unsplash.com/photos/a-person-with-a-hat-on-their-head-in-a-field-PZfeP0uwBpQ",
      download: "https://unsplash.com/photos/PZfeP0uwBpQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/PZfeP0uwBpQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE0fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 2,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      people: {
        status: "rejected"
      },
      experimental: {
        status: "rejected"
      }
    },
    user: {
      id: "mWjiXj5vQuQ",
      updated_at: "2024-03-11T06:58:57Z",
      username: "chanwei_snap",
      name: "Chanwei",
      first_name: "Chanwei",
      last_name: null,
      twitter_username: null,
      portfolio_url: null,
      bio: `👋 Just a snap-happy amateur sharing my photos with you!\r
📍Instagram: @chanwei.snap\r
`,
      location: "Taipei, Taiwan",
      links: {
        self: "https://api.unsplash.com/users/chanwei_snap",
        html: "https://unsplash.com/@chanwei_snap",
        photos: "https://api.unsplash.com/users/chanwei_snap/photos",
        likes: "https://api.unsplash.com/users/chanwei_snap/likes",
        portfolio: "https://api.unsplash.com/users/chanwei_snap/portfolio",
        following: "https://api.unsplash.com/users/chanwei_snap/following",
        followers: "https://api.unsplash.com/users/chanwei_snap/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1705518610211-a929b876f4d5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "chanwei.snap",
      total_collections: 15,
      total_likes: 63,
      total_photos: 150,
      total_promoted_photos: 2,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "chanwei.snap",
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "1JwHaWeSK9s",
    slug: "a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",
    alternative_slugs: {
      en: "a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s"
    },
    created_at: "2024-03-10T11:33:51Z",
    updated_at: "2024-03-11T06:57:09Z",
    promoted_at: "2024-03-11T06:53:39Z",
    width: 3586,
    height: 3917,
    color: "#f3f3d9",
    blur_hash: "LIQ0T^j=_4%M%MxbM{M{_4jZITbH",
    description: "Title: Christmas eve Artist: Callowhill, James Publisher: L. Prang & Co. Name on Item: JC Date: [ca. 1861–1897] https://www.digitalcommonwealth.org/search/commonwealth:7w62f880r",
    alt_description: "a picture of some white flowers on a white background",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710069455079-2059d3cefe91?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710069455079-2059d3cefe91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710069455079-2059d3cefe91"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",
      html: "https://unsplash.com/photos/a-picture-of-some-white-flowers-on-a-white-background-1JwHaWeSK9s",
      download: "https://unsplash.com/photos/1JwHaWeSK9s/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/1JwHaWeSK9s/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE1fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 7,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "piFVWeoWxU8",
      updated_at: "2024-03-11T07:28:12Z",
      username: "bostonpubliclibrary",
      name: "Boston Public Library",
      first_name: "Boston",
      last_name: "Public Library",
      twitter_username: null,
      portfolio_url: "https://www.bpl.org/",
      bio: "Considered a pioneer of public library service in the United States, the Boston Public Library is among the three largest collections in the country and is committed to be ‘Free for All’.",
      location: "Boston, USA",
      links: {
        self: "https://api.unsplash.com/users/bostonpubliclibrary",
        html: "https://unsplash.com/@bostonpubliclibrary",
        photos: "https://api.unsplash.com/users/bostonpubliclibrary/photos",
        likes: "https://api.unsplash.com/users/bostonpubliclibrary/likes",
        portfolio: "https://api.unsplash.com/users/bostonpubliclibrary/portfolio",
        following: "https://api.unsplash.com/users/bostonpubliclibrary/following",
        followers: "https://api.unsplash.com/users/bostonpubliclibrary/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1579171056760-0293bb679901image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: null,
      total_collections: 6,
      total_likes: 0,
      total_photos: 510,
      total_promoted_photos: 62,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: null,
        portfolio_url: "https://www.bpl.org/",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "efzvMAIpfWY",
    slug: "a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",
    alternative_slugs: {
      en: "a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY"
    },
    created_at: "2023-04-28T12:46:16Z",
    updated_at: "2024-03-11T09:48:19Z",
    promoted_at: null,
    width: 9504,
    height: 6336,
    color: "#c07359",
    blur_hash: "LELo7xNHxa~Bz:s9S4nO~VbwoLS~",
    description: "Amongst expansive red sands and spectacular sandstone rock formations, Hisma Desert – NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",
    alt_description: "a couple of people that are standing in the dirt",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1682685797742-42c9987a2c34?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1682685797742-42c9987a2c34?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682685797742-42c9987a2c34"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",
      html: "https://unsplash.com/photos/a-couple-of-people-that-are-standing-in-the-dirt-efzvMAIpfWY",
      download: "https://unsplash.com/photos/efzvMAIpfWY/download?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/efzvMAIpfWY/download?ixid=M3wxMTc3M3wxfDF8YWxsfDE2fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 211,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: {
      impression_urls: [
        "https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515544&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif",
        "https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515747&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"
      ],
      tagline: "Made to Change",
      tagline_url: "https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",
      sponsor: {
        id: "mYizSrdJkkU",
        updated_at: "2024-03-11T08:54:08Z",
        username: "neom",
        name: "NEOM",
        first_name: "NEOM",
        last_name: null,
        twitter_username: "neom",
        portfolio_url: "http://www.neom.com",
        bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
        location: "NEOM, Saudi Arabia",
        links: {
          self: "https://api.unsplash.com/users/neom",
          html: "https://unsplash.com/@neom",
          photos: "https://api.unsplash.com/users/neom/photos",
          likes: "https://api.unsplash.com/users/neom/likes",
          portfolio: "https://api.unsplash.com/users/neom/portfolio",
          following: "https://api.unsplash.com/users/neom/following",
          followers: "https://api.unsplash.com/users/neom/followers"
        },
        profile_image: {
          small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
          medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
          large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
        },
        instagram_username: "discoverneom",
        total_collections: 7,
        total_likes: 1,
        total_photos: 222,
        total_promoted_photos: 72,
        accepted_tos: !0,
        for_hire: !1,
        social: {
          instagram_username: "discoverneom",
          portfolio_url: "http://www.neom.com",
          twitter_username: "neom",
          paypal_email: null
        }
      }
    },
    topic_submissions: {},
    user: {
      id: "mYizSrdJkkU",
      updated_at: "2024-03-11T08:54:08Z",
      username: "neom",
      name: "NEOM",
      first_name: "NEOM",
      last_name: null,
      twitter_username: "neom",
      portfolio_url: "http://www.neom.com",
      bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
      location: "NEOM, Saudi Arabia",
      links: {
        self: "https://api.unsplash.com/users/neom",
        html: "https://unsplash.com/@neom",
        photos: "https://api.unsplash.com/users/neom/photos",
        likes: "https://api.unsplash.com/users/neom/likes",
        portfolio: "https://api.unsplash.com/users/neom/portfolio",
        following: "https://api.unsplash.com/users/neom/following",
        followers: "https://api.unsplash.com/users/neom/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "discoverneom",
      total_collections: 7,
      total_likes: 1,
      total_photos: 222,
      total_promoted_photos: 72,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "discoverneom",
        portfolio_url: "http://www.neom.com",
        twitter_username: "neom",
        paypal_email: null
      }
    }
  },
  {
    id: "j39-6Uto9QQ",
    slug: "a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",
    alternative_slugs: {
      en: "a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ"
    },
    created_at: "2024-03-09T22:12:40Z",
    updated_at: "2024-03-11T07:57:13Z",
    promoted_at: "2024-03-11T06:51:56Z",
    width: 3759,
    height: 5639,
    color: "#26260c",
    blur_hash: "L79tDG?H4;IURu%MM{RP~oohIoIo",
    description: null,
    alt_description: "a forest filled with lots of tall trees",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710020339360-ce951881b835?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710020339360-ce951881b835?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710020339360-ce951881b835"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",
      html: "https://unsplash.com/photos/a-forest-filled-with-lots-of-tall-trees-j39-6Uto9QQ",
      download: "https://unsplash.com/photos/j39-6Uto9QQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/j39-6Uto9QQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE3fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 1,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "MarIhx6ztc0",
      updated_at: "2024-03-11T06:51:56Z",
      username: "brice_cooper18",
      name: "Brice Cooper",
      first_name: "Brice",
      last_name: "Cooper",
      twitter_username: null,
      portfolio_url: null,
      bio: "Always down for an adventure, capturing those adventures one photo at a time. Never stop exploring!",
      location: "Florida",
      links: {
        self: "https://api.unsplash.com/users/brice_cooper18",
        html: "https://unsplash.com/@brice_cooper18",
        photos: "https://api.unsplash.com/users/brice_cooper18/photos",
        likes: "https://api.unsplash.com/users/brice_cooper18/likes",
        portfolio: "https://api.unsplash.com/users/brice_cooper18/portfolio",
        following: "https://api.unsplash.com/users/brice_cooper18/following",
        followers: "https://api.unsplash.com/users/brice_cooper18/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1673045276376-91bb892b6e94image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "brice_cooper18",
      total_collections: 14,
      total_likes: 0,
      total_photos: 1467,
      total_promoted_photos: 51,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "brice_cooper18",
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "oTE1p2Awp3I",
    slug: "a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",
    alternative_slugs: {
      en: "a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I"
    },
    created_at: "2024-02-27T22:15:01Z",
    updated_at: "2024-03-11T06:51:52Z",
    promoted_at: "2024-03-11T06:51:52Z",
    width: 4e3,
    height: 5333,
    color: "#c0c0c0",
    blur_hash: "LLE:C[u5IooJ_N%gE1ax~ps8Vsoe",
    description: null,
    alt_description: "a couple of people standing on top of a cliff next to the ocean",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709071784840-cf3ecc434749?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709071784840-cf3ecc434749?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709071784840-cf3ecc434749"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",
      html: "https://unsplash.com/photos/a-couple-of-people-standing-on-top-of-a-cliff-next-to-the-ocean-oTE1p2Awp3I",
      download: "https://unsplash.com/photos/oTE1p2Awp3I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/oTE1p2Awp3I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE4fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 8,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "khtnjqjzcq0",
      updated_at: "2024-03-11T06:51:53Z",
      username: "mitchorr",
      name: "Mitchell Orr",
      first_name: "Mitchell",
      last_name: "Orr",
      twitter_username: null,
      portfolio_url: "https://mitchorr.darkroom.tech/",
      bio: `If you feel you would like to support my work, any donations no matter how small, would be extremely helpful. \r
Thanks for looking!`,
      location: "Wirral",
      links: {
        self: "https://api.unsplash.com/users/mitchorr",
        html: "https://unsplash.com/@mitchorr",
        photos: "https://api.unsplash.com/users/mitchorr/photos",
        likes: "https://api.unsplash.com/users/mitchorr/likes",
        portfolio: "https://api.unsplash.com/users/mitchorr/portfolio",
        following: "https://api.unsplash.com/users/mitchorr/following",
        followers: "https://api.unsplash.com/users/mitchorr/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1687891061126-8858e815018fimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "mitchorr1",
      total_collections: 0,
      total_likes: 41,
      total_photos: 358,
      total_promoted_photos: 118,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "mitchorr1",
        portfolio_url: "https://mitchorr.darkroom.tech/",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "ihmo0uRQ3jA",
    slug: "a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",
    alternative_slugs: {
      en: "a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA"
    },
    created_at: "2024-02-24T20:00:04Z",
    updated_at: "2024-03-11T06:51:48Z",
    promoted_at: "2024-03-11T06:51:48Z",
    width: 4e3,
    height: 6e3,
    color: "#260c0c",
    blur_hash: "L78;b;?I4Xx?tcIUD+xt03oy-.M|",
    description: null,
    alt_description: "a bed sitting in a bedroom next to a window",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1708804309492-5ef3f3458c33?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1708804309492-5ef3f3458c33"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",
      html: "https://unsplash.com/photos/a-bed-sitting-in-a-bedroom-next-to-a-window-ihmo0uRQ3jA",
      download: "https://unsplash.com/photos/ihmo0uRQ3jA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/ihmo0uRQ3jA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDE5fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 20,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "Og5qBrDjufI",
      updated_at: "2024-03-11T06:51:49Z",
      username: "mariailves",
      name: "Maria Ilves",
      first_name: "Maria",
      last_name: "Ilves",
      twitter_username: null,
      portfolio_url: "http://www.mariailves.com",
      bio: null,
      location: "Ambleside",
      links: {
        self: "https://api.unsplash.com/users/mariailves",
        html: "https://unsplash.com/@mariailves",
        photos: "https://api.unsplash.com/users/mariailves/photos",
        likes: "https://api.unsplash.com/users/mariailves/likes",
        portfolio: "https://api.unsplash.com/users/mariailves/portfolio",
        following: "https://api.unsplash.com/users/mariailves/following",
        followers: "https://api.unsplash.com/users/mariailves/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1708802611867-ab4ff1564c8cimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "mariailves_",
      total_collections: 0,
      total_likes: 0,
      total_photos: 38,
      total_promoted_photos: 4,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "mariailves_",
        portfolio_url: "http://www.mariailves.com",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "UvQtTVdFi9I",
    slug: "UvQtTVdFi9I",
    alternative_slugs: {
      en: "UvQtTVdFi9I"
    },
    created_at: "2016-08-12T16:12:25Z",
    updated_at: "2024-03-11T06:50:27Z",
    promoted_at: "2024-03-11T06:50:27Z",
    width: 3648,
    height: 5472,
    color: "#8ca673",
    blur_hash: "LGG9g4IAVax[.Zxus=kB9HtQ%LRj",
    description: null,
    alt_description: null,
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1471018289981-5d9f06e2bf45?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1471018289981-5d9f06e2bf45"
    },
    links: {
      self: "https://api.unsplash.com/photos/UvQtTVdFi9I",
      html: "https://unsplash.com/photos/UvQtTVdFi9I",
      download: "https://unsplash.com/photos/UvQtTVdFi9I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/UvQtTVdFi9I/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 60,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "dhG1THiRwtA",
      updated_at: "2024-03-11T06:50:28Z",
      username: "clarissemeyer",
      name: "Clarisse Meyer",
      first_name: "Clarisse",
      last_name: "Meyer",
      twitter_username: "claireymeyer",
      portfolio_url: "https://www.clarisserae.com",
      bio: `Photo | Video | Design - Southern California & Beyond\r
Instagram: @clarisse.rae`,
      location: "Orange County, CA",
      links: {
        self: "https://api.unsplash.com/users/clarissemeyer",
        html: "https://unsplash.com/@clarissemeyer",
        photos: "https://api.unsplash.com/users/clarissemeyer/photos",
        likes: "https://api.unsplash.com/users/clarissemeyer/likes",
        portfolio: "https://api.unsplash.com/users/clarissemeyer/portfolio",
        following: "https://api.unsplash.com/users/clarissemeyer/following",
        followers: "https://api.unsplash.com/users/clarissemeyer/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1470948329031-558b487bdf37?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "clarisse.rae",
      total_collections: 2,
      total_likes: 139,
      total_photos: 99,
      total_promoted_photos: 58,
      accepted_tos: !1,
      for_hire: !1,
      social: {
        instagram_username: "clarisse.rae",
        portfolio_url: "https://www.clarisserae.com",
        twitter_username: "claireymeyer",
        paypal_email: null
      }
    }
  },
  {
    id: "iswshBYbTBk",
    slug: "a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",
    alternative_slugs: {
      en: "a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk"
    },
    created_at: "2024-02-27T19:26:10Z",
    updated_at: "2024-03-11T06:48:50Z",
    promoted_at: "2024-03-11T06:48:50Z",
    width: 3940,
    height: 2634,
    color: "#73a673",
    blur_hash: "LEDn~t%{y:WXDPVtH[jt8{o|VGk9",
    description: null,
    alt_description: "a woman riding an escalator down an escalator",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709061965707-9a89ffb23103?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709061965707-9a89ffb23103?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709061965707-9a89ffb23103"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",
      html: "https://unsplash.com/photos/a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",
      download: "https://unsplash.com/photos/iswshBYbTBk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/iswshBYbTBk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIyfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 4,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      people: {
        status: "rejected"
      }
    },
    user: {
      id: "d-2o2yQwtxY",
      updated_at: "2024-03-11T06:48:59Z",
      username: "vitalymazur",
      name: "Vitalii Mazur",
      first_name: "Vitalii",
      last_name: "Mazur",
      twitter_username: "@madebyvitalii",
      portfolio_url: "https://www.behance.net/vitaliimazur",
      bio: `Life through photography 🌿 \r
Feel free to support me via PayPal (vitaly.mazur@icloud.com) if you like to use my shots. Also I'm available for a photoshoot in Toronto 📸🇨🇦`,
      location: "Toronto, Canada",
      links: {
        self: "https://api.unsplash.com/users/vitalymazur",
        html: "https://unsplash.com/@vitalymazur",
        photos: "https://api.unsplash.com/users/vitalymazur/photos",
        likes: "https://api.unsplash.com/users/vitalymazur/likes",
        portfolio: "https://api.unsplash.com/users/vitalymazur/portfolio",
        following: "https://api.unsplash.com/users/vitalymazur/following",
        followers: "https://api.unsplash.com/users/vitalymazur/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1708119387274-fad12c7d293b?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "vitalymazur ",
      total_collections: 14,
      total_likes: 773,
      total_photos: 263,
      total_promoted_photos: 15,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "vitalymazur ",
        portfolio_url: "https://www.behance.net/vitaliimazur",
        twitter_username: "@madebyvitalii",
        paypal_email: null
      }
    }
  },
  {
    id: "uSNuKKh7wpA",
    slug: "a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",
    alternative_slugs: {
      en: "a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA"
    },
    created_at: "2024-03-01T10:58:28Z",
    updated_at: "2024-03-11T06:48:07Z",
    promoted_at: "2024-03-11T06:48:07Z",
    width: 9600,
    height: 5400,
    color: "#d9d9d9",
    blur_hash: "LJLq]_WI_3%eo$xa?cRi~qobITM|",
    description: "Made in blender 4.0",
    alt_description: "a picture of a green object with a white background",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709290649154-54c725bd4484?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709290649154-54c725bd4484?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709290649154-54c725bd4484"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",
      html: "https://unsplash.com/photos/a-picture-of-a-green-object-with-a-white-background-uSNuKKh7wpA",
      download: "https://unsplash.com/photos/uSNuKKh7wpA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/uSNuKKh7wpA/download?ixid=M3wxMTc3M3wwfDF8YWxsfDIzfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 42,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      "3d-renders": {
        status: "approved",
        approved_on: "2024-03-06T08:20:20Z"
      },
      experimental: {
        status: "approved",
        approved_on: "2024-03-06T07:38:30Z"
      }
    },
    user: {
      id: "5TCQxdaW0wE",
      updated_at: "2024-03-11T10:04:04Z",
      username: "theshubhamdhage",
      name: "Shubham Dhage",
      first_name: "Shubham",
      last_name: "Dhage",
      twitter_username: "theshubhamdhage",
      portfolio_url: "https://theshubhamdhage.com/",
      bio: "Creating things is my passion.",
      location: "Pune, India",
      links: {
        self: "https://api.unsplash.com/users/theshubhamdhage",
        html: "https://unsplash.com/@theshubhamdhage",
        photos: "https://api.unsplash.com/users/theshubhamdhage/photos",
        likes: "https://api.unsplash.com/users/theshubhamdhage/likes",
        portfolio: "https://api.unsplash.com/users/theshubhamdhage/portfolio",
        following: "https://api.unsplash.com/users/theshubhamdhage/following",
        followers: "https://api.unsplash.com/users/theshubhamdhage/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1702918491890-622aa47079a5image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "theshubhamdhage",
      total_collections: 2,
      total_likes: 296,
      total_photos: 734,
      total_promoted_photos: 147,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "theshubhamdhage",
        portfolio_url: "https://theshubhamdhage.com/",
        twitter_username: "theshubhamdhage",
        paypal_email: null
      }
    }
  },
  {
    id: "7lN8MJPnlXs",
    slug: "a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",
    alternative_slugs: {
      en: "a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs"
    },
    created_at: "2024-03-06T19:31:23Z",
    updated_at: "2024-03-11T06:47:23Z",
    promoted_at: "2024-03-11T06:47:23Z",
    width: 6720,
    height: 4480,
    color: "#26260c",
    blur_hash: "L05OKD},~lR7TJRj%d^$_0E49Is:",
    description: null,
    alt_description: "a close up of a pine tree with lots of needles",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709753422610-39ed7ddf9e08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709753422610-39ed7ddf9e08"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",
      html: "https://unsplash.com/photos/a-close-up-of-a-pine-tree-with-lots-of-needles-7lN8MJPnlXs",
      download: "https://unsplash.com/photos/7lN8MJPnlXs/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/7lN8MJPnlXs/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI0fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 5,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      "textures-patterns": {
        status: "approved",
        approved_on: "2024-03-11T06:47:18Z"
      }
    },
    user: {
      id: "gMFqynHNocY",
      updated_at: "2024-03-11T06:48:57Z",
      username: "blakecheekk",
      name: "Blake Cheek",
      first_name: "Blake",
      last_name: "Cheek",
      twitter_username: "blakecheekk",
      portfolio_url: "http://blakecheek.com",
      bio: "Photographer and Videographer. Lover of coffee and Jesus. ",
      location: "Atlanta, Ga",
      links: {
        self: "https://api.unsplash.com/users/blakecheekk",
        html: "https://unsplash.com/@blakecheekk",
        photos: "https://api.unsplash.com/users/blakecheekk/photos",
        likes: "https://api.unsplash.com/users/blakecheekk/likes",
        portfolio: "https://api.unsplash.com/users/blakecheekk/portfolio",
        following: "https://api.unsplash.com/users/blakecheekk/following",
        followers: "https://api.unsplash.com/users/blakecheekk/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1709746841716-156061dd4fe9image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "blakecheekk",
      total_collections: 4,
      total_likes: 0,
      total_photos: 423,
      total_promoted_photos: 165,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "blakecheekk",
        portfolio_url: "http://blakecheek.com",
        twitter_username: "blakecheekk",
        paypal_email: null
      }
    }
  },
  {
    id: "Fw8vp9G6FtE",
    slug: "the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",
    alternative_slugs: {
      en: "the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE"
    },
    created_at: "2024-03-10T00:43:31Z",
    updated_at: "2024-03-11T06:46:50Z",
    promoted_at: "2024-03-11T06:46:50Z",
    width: 6240,
    height: 4160,
    color: "#262626",
    blur_hash: "LIINNov{ae}=56I]eToaEmWC^iI;",
    description: null,
    alt_description: "the contents of a backpack laid out on a table",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710031407576-135a680d6e10?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710031407576-135a680d6e10?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710031407576-135a680d6e10"
    },
    links: {
      self: "https://api.unsplash.com/photos/the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",
      html: "https://unsplash.com/photos/the-contents-of-a-backpack-laid-out-on-a-table-Fw8vp9G6FtE",
      download: "https://unsplash.com/photos/Fw8vp9G6FtE/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/Fw8vp9G6FtE/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI1fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 4,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "UmKpkFAcSDE",
      updated_at: "2024-03-11T06:46:50Z",
      username: "taylorheeryphoto",
      name: "Taylor Heery",
      first_name: "Taylor",
      last_name: "Heery",
      twitter_username: "tahegri",
      portfolio_url: "http://www.taylorheery.com",
      bio: `VENMO: @taylorheeryphoto\r
Fujifilm fanatic.`,
      location: "Hendersonville, NC",
      links: {
        self: "https://api.unsplash.com/users/taylorheeryphoto",
        html: "https://unsplash.com/@taylorheeryphoto",
        photos: "https://api.unsplash.com/users/taylorheeryphoto/photos",
        likes: "https://api.unsplash.com/users/taylorheeryphoto/likes",
        portfolio: "https://api.unsplash.com/users/taylorheeryphoto/portfolio",
        following: "https://api.unsplash.com/users/taylorheeryphoto/following",
        followers: "https://api.unsplash.com/users/taylorheeryphoto/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1710031596049-549d947d2a3a?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "taylorheeryphoto",
      total_collections: 0,
      total_likes: 107,
      total_photos: 520,
      total_promoted_photos: 209,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "taylorheeryphoto",
        portfolio_url: "http://www.taylorheery.com",
        twitter_username: "tahegri",
        paypal_email: null
      }
    }
  },
  {
    id: "e75CfMG0Sgo",
    slug: "a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",
    alternative_slugs: {
      en: "a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo"
    },
    created_at: "2023-04-28T12:46:16Z",
    updated_at: "2024-03-10T11:50:20Z",
    promoted_at: null,
    width: 5429,
    height: 3619,
    color: "#a6c0d9",
    blur_hash: "LnHLYm%0IAi_?wn$ngj[OtRjs:f6",
    description: "Nature Reserve – NEOM, Saudi Arabia | The NEOM Nature Reserve region is being designed to deliver protection and restoration of biodiversity across 95% of NEOM.",
    alt_description: "a person with a backpack looking at mountains",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1682685796002-e05458d61f07?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1682685796002-e05458d61f07?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1682685796002-e05458d61f07"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",
      html: "https://unsplash.com/photos/a-person-with-a-backpack-looking-at-mountains-e75CfMG0Sgo",
      download: "https://unsplash.com/photos/e75CfMG0Sgo/download?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/e75CfMG0Sgo/download?ixid=M3wxMTc3M3wxfDF8YWxsfDI2fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 174,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: {
      impression_urls: [
        "https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515577&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif",
        "https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false&bannerID=11515780&rnd=[timestamp]&redir=https://secure.insightexpressai.com/adserver/1pixel.gif"
      ],
      tagline: "Made to Change",
      tagline_url: "https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",
      sponsor: {
        id: "mYizSrdJkkU",
        updated_at: "2024-03-11T08:54:08Z",
        username: "neom",
        name: "NEOM",
        first_name: "NEOM",
        last_name: null,
        twitter_username: "neom",
        portfolio_url: "http://www.neom.com",
        bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
        location: "NEOM, Saudi Arabia",
        links: {
          self: "https://api.unsplash.com/users/neom",
          html: "https://unsplash.com/@neom",
          photos: "https://api.unsplash.com/users/neom/photos",
          likes: "https://api.unsplash.com/users/neom/likes",
          portfolio: "https://api.unsplash.com/users/neom/portfolio",
          following: "https://api.unsplash.com/users/neom/following",
          followers: "https://api.unsplash.com/users/neom/followers"
        },
        profile_image: {
          small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
          medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
          large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
        },
        instagram_username: "discoverneom",
        total_collections: 7,
        total_likes: 1,
        total_photos: 222,
        total_promoted_photos: 72,
        accepted_tos: !0,
        for_hire: !1,
        social: {
          instagram_username: "discoverneom",
          portfolio_url: "http://www.neom.com",
          twitter_username: "neom",
          paypal_email: null
        }
      }
    },
    topic_submissions: {},
    user: {
      id: "mYizSrdJkkU",
      updated_at: "2024-03-11T08:54:08Z",
      username: "neom",
      name: "NEOM",
      first_name: "NEOM",
      last_name: null,
      twitter_username: "neom",
      portfolio_url: "http://www.neom.com",
      bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
      location: "NEOM, Saudi Arabia",
      links: {
        self: "https://api.unsplash.com/users/neom",
        html: "https://unsplash.com/@neom",
        photos: "https://api.unsplash.com/users/neom/photos",
        likes: "https://api.unsplash.com/users/neom/likes",
        portfolio: "https://api.unsplash.com/users/neom/portfolio",
        following: "https://api.unsplash.com/users/neom/following",
        followers: "https://api.unsplash.com/users/neom/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "discoverneom",
      total_collections: 7,
      total_likes: 1,
      total_photos: 222,
      total_promoted_photos: 72,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "discoverneom",
        portfolio_url: "http://www.neom.com",
        twitter_username: "neom",
        paypal_email: null
      }
    }
  },
  {
    id: "jSjHcyHFOdQ",
    slug: "a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",
    alternative_slugs: {
      en: "a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ"
    },
    created_at: "2024-02-08T15:36:25Z",
    updated_at: "2024-03-11T06:46:46Z",
    promoted_at: "2024-03-11T06:46:46Z",
    width: 8400,
    height: 5600,
    color: "#0c260c",
    blur_hash: "L44CLsVuD7pF.Po2R7R*-.oyX5My",
    description: null,
    alt_description: "a picture of a green plant in a dark room",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1707406543260-ed14bbd0d086?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707406543260-ed14bbd0d086"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",
      html: "https://unsplash.com/photos/a-picture-of-a-green-plant-in-a-dark-room-jSjHcyHFOdQ",
      download: "https://unsplash.com/photos/jSjHcyHFOdQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/jSjHcyHFOdQ/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI3fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 14,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "ogQykx6hk_c",
      updated_at: "2024-03-11T06:46:46Z",
      username: "pawel_czerwinski",
      name: "Pawel Czerwinski",
      first_name: "Pawel",
      last_name: "Czerwinski",
      twitter_username: "pm_cze",
      portfolio_url: "http://paypal.me/pmcze",
      bio: "Questions about how you can use the photos? help.unsplash.com/en/collections/1463188-unsplash-license 👍",
      location: "Poland",
      links: {
        self: "https://api.unsplash.com/users/pawel_czerwinski",
        html: "https://unsplash.com/@pawel_czerwinski",
        photos: "https://api.unsplash.com/users/pawel_czerwinski/photos",
        likes: "https://api.unsplash.com/users/pawel_czerwinski/likes",
        portfolio: "https://api.unsplash.com/users/pawel_czerwinski/portfolio",
        following: "https://api.unsplash.com/users/pawel_czerwinski/following",
        followers: "https://api.unsplash.com/users/pawel_czerwinski/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "pmcze",
      total_collections: 7,
      total_likes: 39154,
      total_photos: 2137,
      total_promoted_photos: 1760,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "pmcze",
        portfolio_url: "http://paypal.me/pmcze",
        twitter_username: "pm_cze",
        paypal_email: null
      }
    }
  },
  {
    id: "OfGHUYX0CCg",
    slug: "a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",
    alternative_slugs: {
      en: "a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg"
    },
    created_at: "2024-03-06T14:06:51Z",
    updated_at: "2024-03-11T08:56:52Z",
    promoted_at: "2024-03-11T06:45:54Z",
    width: 8192,
    height: 5460,
    color: "#260c0c",
    blur_hash: "LUF{kg=cj@fQ}XxFS3azxFfjS2WW",
    description: null,
    alt_description: "a body of water that has some waves on it",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709733167477-25398ca709c0?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709733167477-25398ca709c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709733167477-25398ca709c0"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",
      html: "https://unsplash.com/photos/a-body-of-water-that-has-some-waves-on-it-OfGHUYX0CCg",
      download: "https://unsplash.com/photos/OfGHUYX0CCg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/OfGHUYX0CCg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI4fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 16,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {
      "earth-hour": {
        status: "approved",
        approved_on: "2024-03-07T09:43:45Z"
      }
    },
    user: {
      id: "uFFemR6e1vs",
      updated_at: "2024-03-11T06:48:56Z",
      username: "marcospradobr",
      name: "Marcos Paulo Prado",
      first_name: "Marcos Paulo",
      last_name: "Prado",
      twitter_username: null,
      portfolio_url: "https://www.instagram.com/eusoumarcosprado",
      bio: "People and commercial photographer based in Rio de Janeiro, Brasil",
      location: "Rio de Janeiro, Brazil",
      links: {
        self: "https://api.unsplash.com/users/marcospradobr",
        html: "https://unsplash.com/@marcospradobr",
        photos: "https://api.unsplash.com/users/marcospradobr/photos",
        likes: "https://api.unsplash.com/users/marcospradobr/likes",
        portfolio: "https://api.unsplash.com/users/marcospradobr/portfolio",
        following: "https://api.unsplash.com/users/marcospradobr/following",
        followers: "https://api.unsplash.com/users/marcospradobr/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1572910425876-25d44d080554image?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "eusoumarcosprado",
      total_collections: 0,
      total_likes: 306,
      total_photos: 413,
      total_promoted_photos: 139,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "eusoumarcosprado",
        portfolio_url: "https://www.instagram.com/eusoumarcosprado",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "VKQpbzeWbrk",
    slug: "a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",
    alternative_slugs: {
      en: "a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk"
    },
    created_at: "2024-03-09T21:24:04Z",
    updated_at: "2024-03-11T06:45:51Z",
    promoted_at: "2024-03-11T06:45:51Z",
    width: 2592,
    height: 3872,
    color: "#8c2626",
    blur_hash: "LFI2{Exr0gE}Dlo|=_W-5RE3O=xH",
    description: null,
    alt_description: "a bouquet of orange and white tulips on a red door",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1710018337941-58197591d55a?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1710018337941-58197591d55a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1710018337941-58197591d55a"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",
      html: "https://unsplash.com/photos/a-bouquet-of-orange-and-white-tulips-on-a-red-door-VKQpbzeWbrk",
      download: "https://unsplash.com/photos/VKQpbzeWbrk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/VKQpbzeWbrk/download?ixid=M3wxMTc3M3wwfDF8YWxsfDI5fHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 3,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "H8-Yyg-eX4A",
      updated_at: "2024-03-11T06:48:56Z",
      username: "jaelphotos",
      name: "Jael Coon",
      first_name: "Jael",
      last_name: "Coon",
      twitter_username: null,
      portfolio_url: "https://linktr.ee/jaelcoon",
      bio: "Coffee drinker, photographer, artist and chef/baker",
      location: "USA",
      links: {
        self: "https://api.unsplash.com/users/jaelphotos",
        html: "https://unsplash.com/@jaelphotos",
        photos: "https://api.unsplash.com/users/jaelphotos/photos",
        likes: "https://api.unsplash.com/users/jaelphotos/likes",
        portfolio: "https://api.unsplash.com/users/jaelphotos/portfolio",
        following: "https://api.unsplash.com/users/jaelphotos/following",
        followers: "https://api.unsplash.com/users/jaelphotos/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1693432710439-47b22b3f6a9eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "jaelcoon",
      total_collections: 51,
      total_likes: 0,
      total_photos: 230,
      total_promoted_photos: 3,
      accepted_tos: !0,
      for_hire: !1,
      social: {
        instagram_username: "jaelcoon",
        portfolio_url: "https://linktr.ee/jaelcoon",
        twitter_username: null,
        paypal_email: null
      }
    }
  },
  {
    id: "W6AqsLH6HOg",
    slug: "a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",
    alternative_slugs: {
      en: "a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg"
    },
    created_at: "2024-03-06T06:59:15Z",
    updated_at: "2024-03-11T06:45:45Z",
    promoted_at: "2024-03-11T06:45:45Z",
    width: 6e3,
    height: 4e3,
    color: "#595959",
    blur_hash: "LYE_]gO?}qOsW--Ux]$%RPoeX9oz",
    description: null,
    alt_description: "a license plate on the back of a car",
    breadcrumbs: [],
    urls: {
      raw: "https://images.unsplash.com/photo-1709708210553-490ba885fcf6?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
      full: "https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
      regular: "https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
      small: "https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
      thumb: "https://images.unsplash.com/photo-1709708210553-490ba885fcf6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
      small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1709708210553-490ba885fcf6"
    },
    links: {
      self: "https://api.unsplash.com/photos/a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",
      html: "https://unsplash.com/photos/a-license-plate-on-the-back-of-a-car-W6AqsLH6HOg",
      download: "https://unsplash.com/photos/W6AqsLH6HOg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
      download_location: "https://api.unsplash.com/photos/W6AqsLH6HOg/download?ixid=M3wxMTc3M3wwfDF8YWxsfDMwfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
    },
    likes: 3,
    liked_by_user: !1,
    current_user_collections: [],
    sponsorship: null,
    topic_submissions: {},
    user: {
      id: "VNV70zPYNto",
      updated_at: "2024-03-11T06:48:56Z",
      username: "venajeborec",
      name: "Václav Pechar",
      first_name: "Václav",
      last_name: "Pechar",
      twitter_username: null,
      portfolio_url: null,
      bio: `Photographer from South Bohemia ✌🏻\r
Be free to contact me to book a shoot 🙏🏻`,
      location: "Czech Republic - Písek",
      links: {
        self: "https://api.unsplash.com/users/venajeborec",
        html: "https://unsplash.com/@venajeborec",
        photos: "https://api.unsplash.com/users/venajeborec/photos",
        likes: "https://api.unsplash.com/users/venajeborec/likes",
        portfolio: "https://api.unsplash.com/users/venajeborec/portfolio",
        following: "https://api.unsplash.com/users/venajeborec/following",
        followers: "https://api.unsplash.com/users/venajeborec/followers"
      },
      profile_image: {
        small: "https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
        medium: "https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
        large: "https://images.unsplash.com/profile-1687031143105-2420498da92eimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
      },
      instagram_username: "amazingvena",
      total_collections: 0,
      total_likes: 7,
      total_photos: 324,
      total_promoted_photos: 30,
      accepted_tos: !0,
      for_hire: !0,
      social: {
        instagram_username: "amazingvena",
        portfolio_url: null,
        twitter_username: null,
        paypal_email: null
      }
    }
  }
], I7e = P7e;
class L7e {
  constructor() {
    Wn(this, "photos", I7e), Wn(this, "PAGINATION", {}), Wn(this, "REQUEST_IS_RUNNING", !1), Wn(this, "SEARCH_IS_RUNNING", !1), Wn(this, "LAST_REQUEST_URL", ""), Wn(this, "ERROR", null), Wn(this, "IS_LOADING", !1), Wn(this, "currentPage", 1);
  }
  async fetchPhotos() {
    this.IS_LOADING = !0;
    const e = (this.currentPage - 1) * 30, n = this.currentPage * 30;
    return this.currentPage += 1, this.IS_LOADING = !1, this.photos.slice(e, n);
  }
  async fetchNextPage() {
    if (this.REQUEST_IS_RUNNING || this.SEARCH_IS_RUNNING)
      return null;
    const e = await this.fetchPhotos();
    return e.length > 0 ? e : null;
  }
  async searchPhotos(e) {
    this.SEARCH_IS_RUNNING = !0;
    const n = this.photos.filter(
      (i) => i.description && i.description.toLowerCase().includes(e.toLowerCase()) || i.alt_description && i.alt_description.toLowerCase().includes(e.toLowerCase())
    );
    return this.SEARCH_IS_RUNNING = !1, n;
  }
  searchIsRunning() {
    return this.SEARCH_IS_RUNNING;
  }
  triggerDownload(e) {
  }
}
class R7e {
  constructor(e) {
    Wn(this, "_provider"), this._provider = e;
  }
  async fetchPhotos() {
    return await this._provider.fetchPhotos();
  }
  async searchPhotos(e) {
    return await this._provider.searchPhotos(e);
  }
  async triggerDownload(e) {
    this._provider.triggerDownload(e);
  }
  async fetchNextPage() {
    return await this._provider.fetchNextPage() || null;
  }
  searchIsRunning() {
    return this._provider.searchIsRunning();
  }
}
class j7e {
  constructor(e) {
    Wn(this, "API_URL", "https://api.unsplash.com"), Wn(this, "HEADERS"), Wn(this, "ERROR", null), Wn(this, "PAGINATION", {}), Wn(this, "REQUEST_IS_RUNNING", !1), Wn(this, "SEARCH_IS_RUNNING", !1), Wn(this, "LAST_REQUEST_URL", ""), Wn(this, "IS_LOADING", !1), this.HEADERS = e;
  }
  async makeRequest(e) {
    if (this.REQUEST_IS_RUNNING)
      return null;
    this.LAST_REQUEST_URL = e;
    const n = {
      method: "GET",
      headers: this.HEADERS
    };
    try {
      this.REQUEST_IS_RUNNING = !0, this.IS_LOADING = !0;
      const i = await fetch(e, n), r = await this.checkStatus(i);
      this.extractPagination(r);
      const s = await r.json();
      return "results" in s ? s.results : s;
    } catch (i) {
      return this.ERROR = i, null;
    } finally {
      this.REQUEST_IS_RUNNING = !1, this.IS_LOADING = !1;
    }
  }
  extractPagination(e) {
    let n = new RegExp('<(.*)>; rel="(.*)"'), i = [], r = {};
    for (let s of e.headers.entries())
      s[0] === "link" && i.push(s[1]);
    return i && i.toString().split(",").forEach((s) => {
      if (s) {
        let o = n.exec(s);
        o && (r[o[2]] = o[1]);
      }
    }), this.PAGINATION = r, e;
  }
  async fetchPhotos() {
    const e = `${this.API_URL}/photos?per_page=30`;
    return await this.makeRequest(e);
  }
  async fetchNextPage() {
    if (this.REQUEST_IS_RUNNING || this.SEARCH_IS_RUNNING)
      return null;
    if (this.PAGINATION.next) {
      const e = `${this.PAGINATION.next}`, n = await this.makeRequest(e);
      if (n)
        return n;
    }
    return null;
  }
  async searchPhotos(e) {
    const n = `${this.API_URL}/search/photos?query=${e}&per_page=30`;
    return await this.makeRequest(n) || [];
  }
  async triggerDownload(e) {
    e.links.download_location && await this.makeRequest(e.links.download_location);
  }
  async checkStatus(e) {
    if (e.status >= 200 && e.status < 300)
      return e;
    let n = "", i;
    const r = e.headers.get("content-type");
    if (r === "application/json")
      i = e.json().then((s) => s.errors[0]);
    else if (r === "text/xml")
      i = e.text();
    else
      throw new Error("Unsupported content type");
    return i.then((s) => {
      throw e.status === 403 && e.headers.get("x-ratelimit-remaining") === "0" && (n = "Unsplash API rate limit reached, please try again later."), n = n || s || `Error ${e.status}: Uh-oh! Trouble reaching the Unsplash API`, this.ERROR = n, new Error(n);
    });
  }
  searchIsRunning() {
    return this.SEARCH_IS_RUNNING;
  }
}
class F7e {
  constructor(e, n) {
    Wn(this, "photoUseCases"), Wn(this, "masonryService"), Wn(this, "photos", []), this.photoUseCases = e, this.masonryService = n;
  }
  async loadNew() {
    let e = await this.photoUseCases.fetchPhotos();
    this.photos = e, await this.layoutPhotos();
  }
  async layoutPhotos() {
    this.masonryService.reset(), this.photos && this.photos.forEach((e) => {
      e.ratio = e.height / e.width, this.masonryService.addPhotoToColumns(e);
    });
  }
  getColumns() {
    return this.masonryService.getColumns();
  }
  async updateSearch(e) {
    let n = await this.photoUseCases.searchPhotos(e);
    this.photos = n, this.layoutPhotos();
  }
  async loadNextPage() {
    const e = await this.photoUseCases.fetchNextPage() || [];
    this.photos = [...this.photos, ...e], this.layoutPhotos();
  }
  clearPhotos() {
    this.photos = [];
  }
  triggerDownload(e) {
    this.photoUseCases.triggerDownload(e);
  }
  searchIsRunning() {
    return this.photoUseCases.searchIsRunning();
  }
}
const B7e = ({ onClose: t, onImageInsert: e, unsplashProviderConfig: n }) => {
  const i = Vm(() => n ? new j7e(n) : new L7e(), [n]), r = Vm(() => new R7e(i), [i]), s = Vm(() => new k7e(3), []), o = Vm(() => new F7e(r, s), [r, s]), a = ct(null), [l, u] = ft(0), [f, d] = ft(0), [h, m] = ft(o.searchIsRunning() || !0), g = ct(!1), [w, x] = ft(""), [_, S] = ft(null), [C, E] = ft([]);
  j.useEffect(() => {
    a.current && _ === null && f !== 0 && (a.current.scrollTop = f, d(0));
  }, [_, l, f]), j.useEffect(() => {
    const L = (Q) => {
      Q.key === "Escape" && t();
    };
    return window.addEventListener("keydown", L), () => {
      window.removeEventListener("keydown", L);
    };
  }, [t]), j.useEffect(() => {
    const L = a.current;
    if (!_)
      return L && L.addEventListener("scroll", () => {
        u(L.scrollTop);
      }), () => {
        L && L.removeEventListener("scroll", () => {
          u(L.scrollTop);
        });
      };
  }, [a, _]);
  const M = j.useCallback(async () => {
    if (g.current === !1 || w.length === 0) {
      E([]), o.clearPhotos(), await o.loadNew();
      const L = o.getColumns();
      E(L || []), a.current && a.current.scrollTop !== 0 && (a.current.scrollTop = 0), m(!1);
    }
  }, [o, w]), $ = async (L) => {
    const Q = L.target.value;
    Q.length > 2 && (S(null), x(Q)), Q.length === 0 && (x(""), g.current = !1, await M());
  }, P = j.useCallback(async () => {
    if (w) {
      m(!0), E([]), o.clearPhotos(), await o.updateSearch(w);
      const L = o.getColumns();
      L && E(L), a.current && a.current.scrollTop !== 0 && (a.current.scrollTop = 0), m(!1);
    }
  }, [w, o]);
  j.useEffect(() => {
    const L = setTimeout(async () => {
      w.length > 2 ? await P() : await M();
    }, 300);
    return () => {
      g.current = !0, clearTimeout(L);
    };
  }, [w, P, M]);
  const W = j.useCallback(async () => {
    m(!0), await o.loadNextPage();
    const L = o.getColumns();
    E(L || []), m(!1);
  }, [o]);
  j.useEffect(() => {
    const L = a.current;
    if (L) {
      const Q = async () => {
        _ === null && L.scrollTop + L.clientHeight >= L.scrollHeight - 1e3 && await W();
      };
      return L.addEventListener("scroll", Q), () => {
        L.removeEventListener("scroll", Q);
      };
    }
  }, [a, W, _]);
  const z = (L) => {
    L && (S(L), d(l)), L === null && (S(null), a.current && (a.current.scrollTop = f));
  };
  async function Z(L) {
    L.src && (o.triggerDownload(L), e(L));
  }
  return /* @__PURE__ */ vt.jsx(
    D7e,
    {
      closeModal: t,
      handleSearch: $,
      children: /* @__PURE__ */ vt.jsx(
        $7e,
        {
          dataset: C,
          error: null,
          galleryRef: a,
          insertImage: Z,
          isLoading: h,
          selectImg: z,
          zoomed: _
        }
      )
    }
  );
}, NY = ({ unsplashConf: t, onImageInsert: e, onClose: n }) => /* @__PURE__ */ y.jsx(Ff, { children: /* @__PURE__ */ y.jsx(
  B7e,
  {
    unsplashProviderConfig: t,
    onClose: n,
    onImageInsert: e
  }
) }), z7e = ({ nodeKey: t, isModalOpen: e = !0 }) => {
  const { cardConfig: n } = j.useContext(dt), [i] = Oe.useLexicalComposerContext(), [r, s] = j.useState(e), o = () => {
    t && i.update(() => {
      N.$getNodeByKey(t).remove();
    });
  }, a = async (l) => {
    i.update(() => {
      const u = N.$getNodeByKey(t);
      u.src = l.src, u.height = l.height, u.width = l.width, u.caption = l.caption, u.alt = l.alt;
      const f = mq({
        editor: u.__captionEditor,
        initialHtml: `${l.caption}`
      });
      u.__captionEditor.setEditorState(f);
      const d = N.$createNodeSelection();
      d.add(u.getKey()), N.$setSelection(d);
    }), s(!1);
  };
  return r ? /* @__PURE__ */ y.jsx(
    NY,
    {
      unsplashConf: n.unsplash,
      onClose: o,
      onImageInsert: a
    }
  ) : null;
}, AY = N.createCommand("OPEN_TENOR_SELECTOR_COMMAND"), DY = N.createCommand("INSERT_FROM_TENOR_COMMAND"), PY = N.createCommand("OPEN_UNSPLASH_SELECTOR_COMMAND"), W7e = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([ec])) {
      console.error("ImagePlugin: ImageNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        AY,
        async (e) => {
          const n = yh({ ...e, selector: v7e, isImageHidden: !0 });
          return t.dispatchCommand(Mn, { cardNode: n }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      ),
      t.registerCommand(
        DY,
        async (e) => {
          const n = yh(e), r = N.$getSelection().getNodes()[0];
          return t.dispatchCommand(Mn, { cardNode: n }), r.remove(), !0;
        },
        N.COMMAND_PRIORITY_LOW
      ),
      t.registerCommand(
        PY,
        async (e) => {
          const n = yh({ ...e, selector: z7e });
          return t.dispatchCommand(Mn, { cardNode: n }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, n6 = N.createCommand();
class ec extends h1 {
  constructor(n = {}, i) {
    super(n, i);
    // transient properties used to control node behaviour
    we(this, "__triggerFileDialog", !1);
    we(this, "__previewSrc", null);
    we(this, "__captionEditor");
    we(this, "__captionEditorInitialState");
    const { previewSrc: r, triggerFileDialog: s, initialFile: o, selector: a, isImageHidden: l } = n;
    this.__previewSrc = r || "", this.__triggerFileDialog = !n.src && s || !1, this.__initialFile = o || null, this.__selector = a, this.__isImageHidden = l, xi(this, "__captionEditor", { editor: n.captionEditor, nodes: pr }), !n.captionEditor && n.caption && _i(this, "__captionEditor", `${n.caption}`);
  }
  getIcon() {
    return NS;
  }
  getDataset() {
    const n = super.getDataset();
    n.__previewSrc = this.__previewSrc, n.__triggerFileDialog = this.__triggerFileDialog;
    const i = this.getLatest();
    return n.captionEditor = i.__captionEditor, n.captionEditorInitialState = i.__captionEditorInitialState, n;
  }
  get previewSrc() {
    return this.getLatest().__previewSrc;
  }
  set previewSrc(n) {
    const i = this.getWritable();
    i.__previewSrc = n;
  }
  set triggerFileDialog(n) {
    const i = this.getWritable();
    i.__triggerFileDialog = n;
  }
  createDOM() {
    return document.createElement("div");
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__captionEditor && this.__captionEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__captionEditor, null), r = mi(i, { firstChildInnerContent: !0 });
      n.caption = r;
    }), n;
  }
  decorate() {
    const n = this.__selector;
    return /* @__PURE__ */ y.jsxs(qn, { nodeKey: this.getKey(), width: this.__cardWidth, children: [
      this.__selector && /* @__PURE__ */ y.jsx(n, { nodeKey: this.getKey() }),
      !this.__isImageHidden && /* @__PURE__ */ y.jsx(
        s7e,
        {
          altText: this.__alt,
          captionEditor: this.__captionEditor,
          captionEditorInitialState: this.__captionEditorInitialState,
          href: this.href,
          initialFile: this.__initialFile,
          nodeKey: this.getKey(),
          previewSrc: this.previewSrc,
          src: this.src,
          triggerFileDialog: this.__triggerFileDialog
        }
      )
    ] });
  }
}
we(ec, "kgMenu", [
  {
    label: "Image",
    desc: "Upload, or embed with /image [url]",
    Icon: NS,
    insertCommand: n6,
    insertParams: {
      triggerFileDialog: !0
    },
    matches: ["image", "img"],
    queryParams: ["src"],
    priority: 1,
    shortcut: "/image"
  },
  {
    section: "Embeds",
    label: "Unsplash",
    desc: "/unsplash [search term or url]",
    Icon: Fj,
    insertCommand: PY,
    insertParams: {
      triggerFileDialog: !1
    },
    isHidden: ({ config: n }) => !(n != null && n.unsplash),
    matches: ["unsplash", "uns"],
    queryParams: ["src"],
    priority: 3,
    shortcut: "/unsplash"
  },
  {
    label: "GIF",
    desc: "Search and embed gifs",
    Icon: Mj,
    insertCommand: AY,
    insertParams: {
      triggerFileDialog: !1
    },
    matches: ["gif", "giphy", "tenor"],
    priority: 17,
    queryParams: ["src"],
    isHidden: ({ config: n }) => !(n != null && n.tenor),
    shortcut: "/gif"
  }
]), we(ec, "uploadType", "image");
const yh = (t) => new ec(t);
function H7e(t) {
  return t instanceof ec;
}
function Q7e(t, e, n, i) {
  var r = -1, s = t == null ? 0 : t.length;
  for (i && s && (n = t[++r]); ++r < s; )
    n = e(n, t[r], r, t);
  return n;
}
var U7e = Q7e;
function Z7e(t) {
  return function(e) {
    return t == null ? void 0 : t[e];
  };
}
var q7e = Z7e, Y7e = q7e, V7e = {
  // Latin-1 Supplement block.
  À: "A",
  Á: "A",
  Â: "A",
  Ã: "A",
  Ä: "A",
  Å: "A",
  à: "a",
  á: "a",
  â: "a",
  ã: "a",
  ä: "a",
  å: "a",
  Ç: "C",
  ç: "c",
  Ð: "D",
  ð: "d",
  È: "E",
  É: "E",
  Ê: "E",
  Ë: "E",
  è: "e",
  é: "e",
  ê: "e",
  ë: "e",
  Ì: "I",
  Í: "I",
  Î: "I",
  Ï: "I",
  ì: "i",
  í: "i",
  î: "i",
  ï: "i",
  Ñ: "N",
  ñ: "n",
  Ò: "O",
  Ó: "O",
  Ô: "O",
  Õ: "O",
  Ö: "O",
  Ø: "O",
  ò: "o",
  ó: "o",
  ô: "o",
  õ: "o",
  ö: "o",
  ø: "o",
  Ù: "U",
  Ú: "U",
  Û: "U",
  Ü: "U",
  ù: "u",
  ú: "u",
  û: "u",
  ü: "u",
  Ý: "Y",
  ý: "y",
  ÿ: "y",
  Æ: "Ae",
  æ: "ae",
  Þ: "Th",
  þ: "th",
  ß: "ss",
  // Latin Extended-A block.
  Ā: "A",
  Ă: "A",
  Ą: "A",
  ā: "a",
  ă: "a",
  ą: "a",
  Ć: "C",
  Ĉ: "C",
  Ċ: "C",
  Č: "C",
  ć: "c",
  ĉ: "c",
  ċ: "c",
  č: "c",
  Ď: "D",
  Đ: "D",
  ď: "d",
  đ: "d",
  Ē: "E",
  Ĕ: "E",
  Ė: "E",
  Ę: "E",
  Ě: "E",
  ē: "e",
  ĕ: "e",
  ė: "e",
  ę: "e",
  ě: "e",
  Ĝ: "G",
  Ğ: "G",
  Ġ: "G",
  Ģ: "G",
  ĝ: "g",
  ğ: "g",
  ġ: "g",
  ģ: "g",
  Ĥ: "H",
  Ħ: "H",
  ĥ: "h",
  ħ: "h",
  Ĩ: "I",
  Ī: "I",
  Ĭ: "I",
  Į: "I",
  İ: "I",
  ĩ: "i",
  ī: "i",
  ĭ: "i",
  į: "i",
  ı: "i",
  Ĵ: "J",
  ĵ: "j",
  Ķ: "K",
  ķ: "k",
  ĸ: "k",
  Ĺ: "L",
  Ļ: "L",
  Ľ: "L",
  Ŀ: "L",
  Ł: "L",
  ĺ: "l",
  ļ: "l",
  ľ: "l",
  ŀ: "l",
  ł: "l",
  Ń: "N",
  Ņ: "N",
  Ň: "N",
  Ŋ: "N",
  ń: "n",
  ņ: "n",
  ň: "n",
  ŋ: "n",
  Ō: "O",
  Ŏ: "O",
  Ő: "O",
  ō: "o",
  ŏ: "o",
  ő: "o",
  Ŕ: "R",
  Ŗ: "R",
  Ř: "R",
  ŕ: "r",
  ŗ: "r",
  ř: "r",
  Ś: "S",
  Ŝ: "S",
  Ş: "S",
  Š: "S",
  ś: "s",
  ŝ: "s",
  ş: "s",
  š: "s",
  Ţ: "T",
  Ť: "T",
  Ŧ: "T",
  ţ: "t",
  ť: "t",
  ŧ: "t",
  Ũ: "U",
  Ū: "U",
  Ŭ: "U",
  Ů: "U",
  Ű: "U",
  Ų: "U",
  ũ: "u",
  ū: "u",
  ŭ: "u",
  ů: "u",
  ű: "u",
  ų: "u",
  Ŵ: "W",
  ŵ: "w",
  Ŷ: "Y",
  ŷ: "y",
  Ÿ: "Y",
  Ź: "Z",
  Ż: "Z",
  Ž: "Z",
  ź: "z",
  ż: "z",
  ž: "z",
  Ĳ: "IJ",
  ĳ: "ij",
  Œ: "Oe",
  œ: "oe",
  ŉ: "'n",
  ſ: "s"
}, X7e = Y7e(V7e), G7e = X7e, K7e = G7e, J7e = I2, eNe = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, tNe = "\\u0300-\\u036f", nNe = "\\ufe20-\\ufe2f", iNe = "\\u20d0-\\u20ff", rNe = tNe + nNe + iNe, sNe = "[" + rNe + "]", oNe = RegExp(sNe, "g");
function aNe(t) {
  return t = J7e(t), t && t.replace(eNe, K7e).replace(oNe, "");
}
var lNe = aNe, uNe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
function cNe(t) {
  return t.match(uNe) || [];
}
var fNe = cNe, dNe = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
function hNe(t) {
  return dNe.test(t);
}
var pNe = hNe, IY = "\\ud800-\\udfff", mNe = "\\u0300-\\u036f", gNe = "\\ufe20-\\ufe2f", vNe = "\\u20d0-\\u20ff", bNe = mNe + gNe + vNe, LY = "\\u2700-\\u27bf", RY = "a-z\\xdf-\\xf6\\xf8-\\xff", yNe = "\\xac\\xb1\\xd7\\xf7", wNe = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", kNe = "\\u2000-\\u206f", xNe = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", jY = "A-Z\\xc0-\\xd6\\xd8-\\xde", _Ne = "\\ufe0e\\ufe0f", FY = yNe + wNe + kNe + xNe, BY = "['’]", DI = "[" + FY + "]", ONe = "[" + bNe + "]", zY = "\\d+", SNe = "[" + LY + "]", WY = "[" + RY + "]", HY = "[^" + IY + FY + zY + LY + RY + jY + "]", CNe = "\\ud83c[\\udffb-\\udfff]", ENe = "(?:" + ONe + "|" + CNe + ")", TNe = "[^" + IY + "]", QY = "(?:\\ud83c[\\udde6-\\uddff]){2}", UY = "[\\ud800-\\udbff][\\udc00-\\udfff]", Ud = "[" + jY + "]", $Ne = "\\u200d", PI = "(?:" + WY + "|" + HY + ")", MNe = "(?:" + Ud + "|" + HY + ")", II = "(?:" + BY + "(?:d|ll|m|re|s|t|ve))?", LI = "(?:" + BY + "(?:D|LL|M|RE|S|T|VE))?", ZY = ENe + "?", qY = "[" + _Ne + "]?", NNe = "(?:" + $Ne + "(?:" + [TNe, QY, UY].join("|") + ")" + qY + ZY + ")*", ANe = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", DNe = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", PNe = qY + ZY + NNe, INe = "(?:" + [SNe, QY, UY].join("|") + ")" + PNe, LNe = RegExp([
  Ud + "?" + WY + "+" + II + "(?=" + [DI, Ud, "$"].join("|") + ")",
  MNe + "+" + LI + "(?=" + [DI, Ud + PI, "$"].join("|") + ")",
  Ud + "?" + PI + "+" + II,
  Ud + "+" + LI,
  DNe,
  ANe,
  zY,
  INe
].join("|"), "g");
function RNe(t) {
  return t.match(LNe) || [];
}
var jNe = RNe, FNe = fNe, BNe = pNe, zNe = I2, WNe = jNe;
function HNe(t, e, n) {
  return t = zNe(t), e = n ? void 0 : e, e === void 0 ? BNe(t) ? WNe(t) : FNe(t) : t.match(e) || [];
}
var QNe = HNe, UNe = U7e, ZNe = lNe, qNe = QNe, YNe = "['’]", VNe = RegExp(YNe, "g");
function XNe(t) {
  return function(e) {
    return UNe(qNe(ZNe(e).replace(VNe, "")), t, "");
  };
}
var GNe = XNe, KNe = GNe, JNe = KNe(function(t, e, n) {
  return t + (n ? "-" : "") + e.toLowerCase();
}), eAe = JNe;
const V2 = /* @__PURE__ */ Gs(eAe), Oy = "koenigDndContainer", RI = `[data-${V2(Oy)}]`, i6 = "koenigDndDraggable", tAe = `[data-${V2(i6)}]`, r6 = "koenigDndDroppable", zO = `[data-${V2(r6)}]`, nAe = "koenigDndDisabled", iAe = `[data-${V2(nAe)}]`, jI = "koenig-drag-drop-indicator", s6 = 1e4, rAe = "koenig-drag-drop-ghost-container", sAe = s6 + 1;
function FI(t, e, n = "") {
  return t === -1 ? !0 : t === e || typeof e > "u" ? !1 : (n.match(/top/) && (e -= 1), n.match(/bottom/) && (e += 1), e !== t);
}
function Zd(t, e) {
  return ST(t, e, (n) => n.parentNode);
}
function oAe(t, e) {
  return t = t.nextElementSibling, ST(t, e, (n) => n.nextElementSibling);
}
function aAe(t, e) {
  return t = t.previousElementSibling, ST(t, e, (n) => n.previousElementSibling);
}
function lAe(t) {
  if (!t)
    return o6();
  let e = getComputedStyle(t).getPropertyValue("position"), n = e === "absolute", i = Zd(t, (r) => n && uAe(r) ? !1 : cAe(r));
  return e === "fixed" && !i ? o6() : i;
}
function o6() {
  var t;
  return ((t = document.scrollingElement) == null ? void 0 : t.body) || document.scrollingElement || document.element;
}
function BI(t, e) {
  t.style.webkitUserSelect = e, t.style.mozUserSelect = e, t.style.msUserSelect = e, t.style.oUserSelect = e, t.style.userSelect = e;
}
function ST(t, e, n) {
  if (!t)
    return null;
  let i = e, r = e, s = typeof e == "string", o = typeof e == "function";
  function a(u) {
    if (u) {
      if (s)
        return u.matches(i);
      if (o)
        return r(u);
    } else return u;
  }
  let l = t;
  do {
    if (a(l))
      return l;
    l = n(l);
  } while (l && l !== document.body && l !== document);
}
function uAe(t) {
  return getComputedStyle(t).getPropertyValue("position") === "static";
}
function cAe(t) {
  let e = /(auto|scroll)/, n = getComputedStyle(t, null), i = n.getPropertyValue("overflow") + n.getPropertyValue("overflow-y") + n.getPropertyValue("overflow-x");
  return e.test(i);
}
var YY = { exports: {} };
(function(t) {
  var e = Object.prototype.hasOwnProperty, n = "~";
  function i() {
  }
  Object.create && (i.prototype = /* @__PURE__ */ Object.create(null), new i().__proto__ || (n = !1));
  function r(l, u, f) {
    this.fn = l, this.context = u, this.once = f || !1;
  }
  function s(l, u, f, d, h) {
    if (typeof f != "function")
      throw new TypeError("The listener must be a function");
    var m = new r(f, d || l, h), g = n ? n + u : u;
    return l._events[g] ? l._events[g].fn ? l._events[g] = [l._events[g], m] : l._events[g].push(m) : (l._events[g] = m, l._eventsCount++), l;
  }
  function o(l, u) {
    --l._eventsCount === 0 ? l._events = new i() : delete l._events[u];
  }
  function a() {
    this._events = new i(), this._eventsCount = 0;
  }
  a.prototype.eventNames = function() {
    var u = [], f, d;
    if (this._eventsCount === 0) return u;
    for (d in f = this._events)
      e.call(f, d) && u.push(n ? d.slice(1) : d);
    return Object.getOwnPropertySymbols ? u.concat(Object.getOwnPropertySymbols(f)) : u;
  }, a.prototype.listeners = function(u) {
    var f = n ? n + u : u, d = this._events[f];
    if (!d) return [];
    if (d.fn) return [d.fn];
    for (var h = 0, m = d.length, g = new Array(m); h < m; h++)
      g[h] = d[h].fn;
    return g;
  }, a.prototype.listenerCount = function(u) {
    var f = n ? n + u : u, d = this._events[f];
    return d ? d.fn ? 1 : d.length : 0;
  }, a.prototype.emit = function(u, f, d, h, m, g) {
    var w = n ? n + u : u;
    if (!this._events[w]) return !1;
    var x = this._events[w], _ = arguments.length, S, C;
    if (x.fn) {
      switch (x.once && this.removeListener(u, x.fn, void 0, !0), _) {
        case 1:
          return x.fn.call(x.context), !0;
        case 2:
          return x.fn.call(x.context, f), !0;
        case 3:
          return x.fn.call(x.context, f, d), !0;
        case 4:
          return x.fn.call(x.context, f, d, h), !0;
        case 5:
          return x.fn.call(x.context, f, d, h, m), !0;
        case 6:
          return x.fn.call(x.context, f, d, h, m, g), !0;
      }
      for (C = 1, S = new Array(_ - 1); C < _; C++)
        S[C - 1] = arguments[C];
      x.fn.apply(x.context, S);
    } else {
      var E = x.length, M;
      for (C = 0; C < E; C++)
        switch (x[C].once && this.removeListener(u, x[C].fn, void 0, !0), _) {
          case 1:
            x[C].fn.call(x[C].context);
            break;
          case 2:
            x[C].fn.call(x[C].context, f);
            break;
          case 3:
            x[C].fn.call(x[C].context, f, d);
            break;
          case 4:
            x[C].fn.call(x[C].context, f, d, h);
            break;
          default:
            if (!S) for (M = 1, S = new Array(_ - 1); M < _; M++)
              S[M - 1] = arguments[M];
            x[C].fn.apply(x[C].context, S);
        }
    }
    return !0;
  }, a.prototype.on = function(u, f, d) {
    return s(this, u, f, d, !1);
  }, a.prototype.once = function(u, f, d) {
    return s(this, u, f, d, !0);
  }, a.prototype.removeListener = function(u, f, d, h) {
    var m = n ? n + u : u;
    if (!this._events[m]) return this;
    if (!f)
      return o(this, m), this;
    var g = this._events[m];
    if (g.fn)
      g.fn === f && (!h || g.once) && (!d || g.context === d) && o(this, m);
    else {
      for (var w = 0, x = [], _ = g.length; w < _; w++)
        (g[w].fn !== f || h && !g[w].once || d && g[w].context !== d) && x.push(g[w]);
      x.length ? this._events[m] = x.length === 1 ? x[0] : x : o(this, m);
    }
    return this;
  }, a.prototype.removeAllListeners = function(u) {
    var f;
    return u ? (f = n ? n + u : u, this._events[f] && o(this, f)) : (this._events = new i(), this._eventsCount = 0), this;
  }, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = n, a.EventEmitter = a, t.exports = a;
})(YY);
var fAe = YY.exports;
const dAe = /* @__PURE__ */ Gs(fAe);
class hAe {
  constructor(e, n) {
    we(this, "element", null);
    we(this, "draggables", []);
    we(this, "droppables", []);
    we(this, "isDragEnabled", !0);
    n.createGhostElement && (this._createGhostElement = n.createGhostElement, delete n.createGhostElement), Object.assign(this, {
      element: e,
      draggables: [],
      droppables: [],
      isDragEnabled: !0
    }, n), e.dataset[Oy] = "true", this.refresh();
  }
  // get the draggable type and any dataset. Types:
  // - image
  // - card
  // - file
  // TODO: review types
  // TODO: get proper dataset from the gallery component
  // should be overridden by passed in option
  getDraggableInfo() {
    return !1;
  }
  // should be overridden by passed in option
  getIndicatorPosition() {
    return !1;
  }
  // override these via constructor options
  onDragStart() {
  }
  onDragEnterContainer() {
  }
  onDragEnterDroppable() {
  }
  onDragOverDroppable() {
  }
  onDragLeaveDroppable() {
  }
  onDragLeaveContainer() {
  }
  onDragEnd() {
  }
  onDrop() {
  }
  onDropEnd() {
  }
  // TODO: allow configuration for ghost element creation
  // builds an element that is attached to the mouse pointer when dragging.
  // currently grabs the first <img> and uses that but should be configurable:
  // - a selector for which element in the draggable to copy
  // - a function to hand off element creation to the consumer
  createGhostElement(e) {
    let n;
    if (typeof this._createGhostElement == "function" && (n = this._createGhostElement(e)), !n && (e.type === "image" || e.cardName === "image")) {
      let i = e.element.querySelector("img");
      if (i) {
        let r = i.width / i.height, s, o;
        i.width > i.height ? (s = 200, o = 200 / r) : (s = 200 * r, o = 200), n = document.createElement("img"), n.width = s, n.height = o, n.id = "koenig-drag-drop-ghost", n.src = i.src, n.style.position = "absolute", n.style.top = "0", n.style.left = `-${s}px`, n.style.zIndex = sAe, n.style.willChange = "transform";
      } else {
        console.warn("No <img> element found in draggable");
        return;
      }
    }
    if (n)
      return n;
    console.warn(`No default createGhostElement handler for type "${e.type}"`);
  }
  enableDrag() {
    this.isDragEnabled = !0, this.element.dataset[Oy] = "true", this.refresh();
  }
  disableDrag() {
    this.isDragEnabled = !1, delete this.element.dataset[Oy], this.refresh();
  }
  // used to add data attributes to any draggable/droppable elements. This is
  // for more efficient lookup through DOM by the drag-drop-handler service
  refresh() {
    this.draggables.forEach((e) => {
      delete e.dataset[i6];
    }), this.droppables.forEach((e) => {
      delete e.dataset[r6];
    }), this.draggables = [], this.droppables = [], this.isDragEnabled && (this.element.querySelectorAll(this.draggableSelector).forEach((e) => {
      e.dataset[i6] = "true", this.draggables.push(e);
    }), this.element.querySelectorAll(this.droppableSelector).forEach((e) => {
      e.dataset[r6] = "true", this.droppables.push(e);
    }));
  }
}
const pAe = {
  speed: 8,
  sensitivity: 50
};
class mAe {
  constructor() {
    this.options = Object.assign({}, pAe), this.currentMousePosition = null, this.findScrollableElementFrame = null, this.scrollableElement = null, this.scrollAnimationFrame = null, this._scroll = this._scroll.bind(this), this._isSafari = navigator.userAgent.indexOf("Safari") !== -1 && navigator.userAgent.indexOf("Chrome") === -1;
  }
  dragStart(e) {
    this.findScrollableElementFrame = requestAnimationFrame(() => {
      this.scrollableElement = this.getScrollableElement(e.element);
    });
  }
  dragMove(e) {
    this.findScrollableElementFrame = requestAnimationFrame(() => {
      this.scrollableElement = this.getScrollableElement(e.target);
    }), this.scrollableElement && (this.currentMousePosition = {
      clientX: e.mousePosition.x,
      clientY: e.mousePosition.y
    }, this.scrollAnimationFrame = requestAnimationFrame(this._scroll));
  }
  dragStop() {
    cancelAnimationFrame(this.scrollAnimationFrame), cancelAnimationFrame(this.findScrollableElementFrame), this.currentMousePosition = null, this.findScrollableElementFrame = null, this.scrollableElement = null, this.scrollAnimationFrame = null;
  }
  getScrollableElement(e) {
    let n = lAe(e);
    return n === o6() && (n = document.querySelector(".gh-koenig-editor")), n;
  }
  _scroll() {
    if (!this.scrollableElement || !this.currentMousePosition)
      return;
    cancelAnimationFrame(this.scrollAnimationFrame);
    let { speed: e, sensitivity: n } = this.options, i = this.scrollableElement.getBoundingClientRect(), r = this.scrollableElement, s = this.currentMousePosition.clientX, o = this.currentMousePosition.clientY, { offsetHeight: a, offsetWidth: l } = r, u = i.top + a - o, f = o - i.top;
    u < n && !(this._isSafari && u < 0) ? r.scrollTop += e : f < n && !(this._isSafari && f < 0) && (r.scrollTop -= e), i.left + l - s < n ? r.scrollLeft += e : s - i.left < n && (r.scrollLeft -= e), this.scrollAnimationFrame = requestAnimationFrame(this._scroll);
  }
}
var kp = {};
/**
 * @license React
 * react-dom-server-legacy.browser.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var VY = j;
function Tt(t) {
  for (var e = "https://reactjs.org/docs/error-decoder.html?invariant=" + t, n = 1; n < arguments.length; n++) e += "&args[]=" + encodeURIComponent(arguments[n]);
  return "Minified React error #" + t + "; visit " + e + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
var ps = Object.prototype.hasOwnProperty, gAe = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, zI = {}, WI = {};
function XY(t) {
  return ps.call(WI, t) ? !0 : ps.call(zI, t) ? !1 : gAe.test(t) ? WI[t] = !0 : (zI[t] = !0, !1);
}
function as(t, e, n, i, r, s, o) {
  this.acceptsBooleans = e === 2 || e === 3 || e === 4, this.attributeName = i, this.attributeNamespace = r, this.mustUseProperty = n, this.propertyName = t, this.type = e, this.sanitizeURL = s, this.removeEmptyString = o;
}
var gr = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t) {
  gr[t] = new as(t, 0, !1, t, null, !1, !1);
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(t) {
  var e = t[0];
  gr[e] = new as(e, 1, !1, t[1], null, !1, !1);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(t) {
  gr[t] = new as(t, 2, !1, t.toLowerCase(), null, !1, !1);
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(t) {
  gr[t] = new as(t, 2, !1, t, null, !1, !1);
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t) {
  gr[t] = new as(t, 3, !1, t.toLowerCase(), null, !1, !1);
});
["checked", "multiple", "muted", "selected"].forEach(function(t) {
  gr[t] = new as(t, 3, !0, t, null, !1, !1);
});
["capture", "download"].forEach(function(t) {
  gr[t] = new as(t, 4, !1, t, null, !1, !1);
});
["cols", "rows", "size", "span"].forEach(function(t) {
  gr[t] = new as(t, 6, !1, t, null, !1, !1);
});
["rowSpan", "start"].forEach(function(t) {
  gr[t] = new as(t, 5, !1, t.toLowerCase(), null, !1, !1);
});
var CT = /[\-:]([a-z])/g;
function ET(t) {
  return t[1].toUpperCase();
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t) {
  var e = t.replace(
    CT,
    ET
  );
  gr[e] = new as(e, 1, !1, t, null, !1, !1);
});
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t) {
  var e = t.replace(CT, ET);
  gr[e] = new as(e, 1, !1, t, "http://www.w3.org/1999/xlink", !1, !1);
});
["xml:base", "xml:lang", "xml:space"].forEach(function(t) {
  var e = t.replace(CT, ET);
  gr[e] = new as(e, 1, !1, t, "http://www.w3.org/XML/1998/namespace", !1, !1);
});
["tabIndex", "crossOrigin"].forEach(function(t) {
  gr[t] = new as(t, 1, !1, t.toLowerCase(), null, !1, !1);
});
gr.xlinkHref = new as("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function(t) {
  gr[t] = new as(t, 1, !1, t.toLowerCase(), null, !0, !0);
});
var Sy = {
  animationIterationCount: !0,
  aspectRatio: !0,
  borderImageOutset: !0,
  borderImageSlice: !0,
  borderImageWidth: !0,
  boxFlex: !0,
  boxFlexGroup: !0,
  boxOrdinalGroup: !0,
  columnCount: !0,
  columns: !0,
  flex: !0,
  flexGrow: !0,
  flexPositive: !0,
  flexShrink: !0,
  flexNegative: !0,
  flexOrder: !0,
  gridArea: !0,
  gridRow: !0,
  gridRowEnd: !0,
  gridRowSpan: !0,
  gridRowStart: !0,
  gridColumn: !0,
  gridColumnEnd: !0,
  gridColumnSpan: !0,
  gridColumnStart: !0,
  fontWeight: !0,
  lineClamp: !0,
  lineHeight: !0,
  opacity: !0,
  order: !0,
  orphans: !0,
  tabSize: !0,
  widows: !0,
  zIndex: !0,
  zoom: !0,
  fillOpacity: !0,
  floodOpacity: !0,
  stopOpacity: !0,
  strokeDasharray: !0,
  strokeDashoffset: !0,
  strokeMiterlimit: !0,
  strokeOpacity: !0,
  strokeWidth: !0
}, vAe = ["Webkit", "ms", "Moz", "O"];
Object.keys(Sy).forEach(function(t) {
  vAe.forEach(function(e) {
    e = e + t.charAt(0).toUpperCase() + t.substring(1), Sy[e] = Sy[t];
  });
});
var bAe = /["'&<>]/;
function Yr(t) {
  if (typeof t == "boolean" || typeof t == "number") return "" + t;
  t = "" + t;
  var e = bAe.exec(t);
  if (e) {
    var n = "", i, r = 0;
    for (i = e.index; i < t.length; i++) {
      switch (t.charCodeAt(i)) {
        case 34:
          e = "&quot;";
          break;
        case 38:
          e = "&amp;";
          break;
        case 39:
          e = "&#x27;";
          break;
        case 60:
          e = "&lt;";
          break;
        case 62:
          e = "&gt;";
          break;
        default:
          continue;
      }
      r !== i && (n += t.substring(r, i)), r = i + 1, n += e;
    }
    t = r !== i ? n + t.substring(r, i) : n;
  }
  return t;
}
var yAe = /([A-Z])/g, wAe = /^ms-/, a6 = Array.isArray;
function ol(t, e) {
  return { insertionMode: t, selectedValue: e };
}
function kAe(t, e, n) {
  switch (e) {
    case "select":
      return ol(1, n.value != null ? n.value : n.defaultValue);
    case "svg":
      return ol(2, null);
    case "math":
      return ol(3, null);
    case "foreignObject":
      return ol(1, null);
    case "table":
      return ol(4, null);
    case "thead":
    case "tbody":
    case "tfoot":
      return ol(5, null);
    case "colgroup":
      return ol(7, null);
    case "tr":
      return ol(6, null);
  }
  return 4 <= t.insertionMode || t.insertionMode === 0 ? ol(1, null) : t;
}
var HI = /* @__PURE__ */ new Map();
function GY(t, e, n) {
  if (typeof n != "object") throw Error(Tt(62));
  e = !0;
  for (var i in n) if (ps.call(n, i)) {
    var r = n[i];
    if (r != null && typeof r != "boolean" && r !== "") {
      if (i.indexOf("--") === 0) {
        var s = Yr(i);
        r = Yr(("" + r).trim());
      } else {
        s = i;
        var o = HI.get(s);
        o !== void 0 || (o = Yr(s.replace(yAe, "-$1").toLowerCase().replace(wAe, "-ms-")), HI.set(s, o)), s = o, r = typeof r == "number" ? r === 0 || ps.call(Sy, i) ? "" + r : r + "px" : Yr(("" + r).trim());
      }
      e ? (e = !1, t.push(' style="', s, ":", r)) : t.push(";", s, ":", r);
    }
  }
  e || t.push('"');
}
function Ns(t, e, n, i) {
  switch (n) {
    case "style":
      GY(t, e, i);
      return;
    case "defaultValue":
    case "defaultChecked":
    case "innerHTML":
    case "suppressContentEditableWarning":
    case "suppressHydrationWarning":
      return;
  }
  if (!(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N") {
    if (e = gr.hasOwnProperty(n) ? gr[n] : null, e !== null) {
      switch (typeof i) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (!e.acceptsBooleans) return;
      }
      switch (n = e.attributeName, e.type) {
        case 3:
          i && t.push(" ", n, '=""');
          break;
        case 4:
          i === !0 ? t.push(" ", n, '=""') : i !== !1 && t.push(" ", n, '="', Yr(i), '"');
          break;
        case 5:
          isNaN(i) || t.push(" ", n, '="', Yr(i), '"');
          break;
        case 6:
          !isNaN(i) && 1 <= i && t.push(" ", n, '="', Yr(i), '"');
          break;
        default:
          e.sanitizeURL && (i = "" + i), t.push(" ", n, '="', Yr(i), '"');
      }
    } else if (XY(n)) {
      switch (typeof i) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (e = n.toLowerCase().slice(0, 5), e !== "data-" && e !== "aria-") return;
      }
      t.push(" ", n, '="', Yr(i), '"');
    }
  }
}
function Cy(t, e, n) {
  if (e != null) {
    if (n != null) throw Error(Tt(60));
    if (typeof e != "object" || !("__html" in e)) throw Error(Tt(61));
    e = e.__html, e != null && t.push("" + e);
  }
}
function xAe(t) {
  var e = "";
  return VY.Children.forEach(t, function(n) {
    n != null && (e += n);
  }), e;
}
function WO(t, e, n, i) {
  t.push(fa(n));
  var r = n = null, s;
  for (s in e) if (ps.call(e, s)) {
    var o = e[s];
    if (o != null) switch (s) {
      case "children":
        n = o;
        break;
      case "dangerouslySetInnerHTML":
        r = o;
        break;
      default:
        Ns(t, i, s, o);
    }
  }
  return t.push(">"), Cy(t, r, n), typeof n == "string" ? (t.push(Yr(n)), null) : n;
}
var _Ae = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, QI = /* @__PURE__ */ new Map();
function fa(t) {
  var e = QI.get(t);
  if (e === void 0) {
    if (!_Ae.test(t)) throw Error(Tt(65, t));
    e = "<" + t, QI.set(t, e);
  }
  return e;
}
function OAe(t, e, n, i, r) {
  switch (e) {
    case "select":
      t.push(fa("select"));
      var s = null, o = null;
      for (f in n) if (ps.call(n, f)) {
        var a = n[f];
        if (a != null) switch (f) {
          case "children":
            s = a;
            break;
          case "dangerouslySetInnerHTML":
            o = a;
            break;
          case "defaultValue":
          case "value":
            break;
          default:
            Ns(t, i, f, a);
        }
      }
      return t.push(">"), Cy(t, o, s), s;
    case "option":
      o = r.selectedValue, t.push(fa("option"));
      var l = a = null, u = null, f = null;
      for (s in n) if (ps.call(n, s)) {
        var d = n[s];
        if (d != null) switch (s) {
          case "children":
            a = d;
            break;
          case "selected":
            u = d;
            break;
          case "dangerouslySetInnerHTML":
            f = d;
            break;
          case "value":
            l = d;
          default:
            Ns(t, i, s, d);
        }
      }
      if (o != null) if (n = l !== null ? "" + l : xAe(a), a6(o)) {
        for (i = 0; i < o.length; i++)
          if ("" + o[i] === n) {
            t.push(' selected=""');
            break;
          }
      } else "" + o === n && t.push(' selected=""');
      else u && t.push(' selected=""');
      return t.push(">"), Cy(t, f, a), a;
    case "textarea":
      t.push(fa("textarea")), f = o = s = null;
      for (a in n) if (ps.call(n, a) && (l = n[a], l != null)) switch (a) {
        case "children":
          f = l;
          break;
        case "value":
          s = l;
          break;
        case "defaultValue":
          o = l;
          break;
        case "dangerouslySetInnerHTML":
          throw Error(Tt(91));
        default:
          Ns(
            t,
            i,
            a,
            l
          );
      }
      if (s === null && o !== null && (s = o), t.push(">"), f != null) {
        if (s != null) throw Error(Tt(92));
        if (a6(f) && 1 < f.length) throw Error(Tt(93));
        s = "" + f;
      }
      return typeof s == "string" && s[0] === `
` && t.push(`
`), s !== null && t.push(Yr("" + s)), null;
    case "input":
      t.push(fa("input")), l = f = a = s = null;
      for (o in n) if (ps.call(n, o) && (u = n[o], u != null)) switch (o) {
        case "children":
        case "dangerouslySetInnerHTML":
          throw Error(Tt(399, "input"));
        case "defaultChecked":
          l = u;
          break;
        case "defaultValue":
          a = u;
          break;
        case "checked":
          f = u;
          break;
        case "value":
          s = u;
          break;
        default:
          Ns(t, i, o, u);
      }
      return f !== null ? Ns(t, i, "checked", f) : l !== null && Ns(t, i, "checked", l), s !== null ? Ns(t, i, "value", s) : a !== null && Ns(t, i, "value", a), t.push("/>"), null;
    case "menuitem":
      t.push(fa("menuitem"));
      for (var h in n) if (ps.call(n, h) && (s = n[h], s != null)) switch (h) {
        case "children":
        case "dangerouslySetInnerHTML":
          throw Error(Tt(400));
        default:
          Ns(t, i, h, s);
      }
      return t.push(">"), null;
    case "title":
      t.push(fa("title")), s = null;
      for (d in n) if (ps.call(n, d) && (o = n[d], o != null)) switch (d) {
        case "children":
          s = o;
          break;
        case "dangerouslySetInnerHTML":
          throw Error(Tt(434));
        default:
          Ns(t, i, d, o);
      }
      return t.push(">"), s;
    case "listing":
    case "pre":
      t.push(fa(e)), o = s = null;
      for (l in n) if (ps.call(n, l) && (a = n[l], a != null)) switch (l) {
        case "children":
          s = a;
          break;
        case "dangerouslySetInnerHTML":
          o = a;
          break;
        default:
          Ns(t, i, l, a);
      }
      if (t.push(">"), o != null) {
        if (s != null) throw Error(Tt(60));
        if (typeof o != "object" || !("__html" in o)) throw Error(Tt(61));
        n = o.__html, n != null && (typeof n == "string" && 0 < n.length && n[0] === `
` ? t.push(`
`, n) : t.push("" + n));
      }
      return typeof s == "string" && s[0] === `
` && t.push(`
`), s;
    case "area":
    case "base":
    case "br":
    case "col":
    case "embed":
    case "hr":
    case "img":
    case "keygen":
    case "link":
    case "meta":
    case "param":
    case "source":
    case "track":
    case "wbr":
      t.push(fa(e));
      for (var m in n) if (ps.call(n, m) && (s = n[m], s != null)) switch (m) {
        case "children":
        case "dangerouslySetInnerHTML":
          throw Error(Tt(399, e));
        default:
          Ns(t, i, m, s);
      }
      return t.push("/>"), null;
    case "annotation-xml":
    case "color-profile":
    case "font-face":
    case "font-face-src":
    case "font-face-uri":
    case "font-face-format":
    case "font-face-name":
    case "missing-glyph":
      return WO(
        t,
        n,
        e,
        i
      );
    case "html":
      return r.insertionMode === 0 && t.push("<!DOCTYPE html>"), WO(t, n, e, i);
    default:
      if (e.indexOf("-") === -1 && typeof n.is != "string") return WO(t, n, e, i);
      t.push(fa(e)), o = s = null;
      for (u in n) if (ps.call(n, u) && (a = n[u], a != null)) switch (u) {
        case "children":
          s = a;
          break;
        case "dangerouslySetInnerHTML":
          o = a;
          break;
        case "style":
          GY(t, i, a);
          break;
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
          break;
        default:
          XY(u) && typeof a != "function" && typeof a != "symbol" && t.push(" ", u, '="', Yr(a), '"');
      }
      return t.push(">"), Cy(t, o, s), s;
  }
}
function UI(t, e, n) {
  if (t.push('<!--$?--><template id="'), n === null) throw Error(Tt(395));
  return t.push(n), t.push('"></template>');
}
function SAe(t, e, n, i) {
  switch (n.insertionMode) {
    case 0:
    case 1:
      return t.push('<div hidden id="'), t.push(e.segmentPrefix), e = i.toString(16), t.push(e), t.push('">');
    case 2:
      return t.push('<svg aria-hidden="true" style="display:none" id="'), t.push(e.segmentPrefix), e = i.toString(16), t.push(e), t.push('">');
    case 3:
      return t.push('<math aria-hidden="true" style="display:none" id="'), t.push(e.segmentPrefix), e = i.toString(16), t.push(e), t.push('">');
    case 4:
      return t.push('<table hidden id="'), t.push(e.segmentPrefix), e = i.toString(16), t.push(e), t.push('">');
    case 5:
      return t.push('<table hidden><tbody id="'), t.push(e.segmentPrefix), e = i.toString(16), t.push(e), t.push('">');
    case 6:
      return t.push('<table hidden><tr id="'), t.push(e.segmentPrefix), e = i.toString(16), t.push(e), t.push('">');
    case 7:
      return t.push('<table hidden><colgroup id="'), t.push(e.segmentPrefix), e = i.toString(16), t.push(e), t.push('">');
    default:
      throw Error(Tt(397));
  }
}
function CAe(t, e) {
  switch (e.insertionMode) {
    case 0:
    case 1:
      return t.push("</div>");
    case 2:
      return t.push("</svg>");
    case 3:
      return t.push("</math>");
    case 4:
      return t.push("</table>");
    case 5:
      return t.push("</tbody></table>");
    case 6:
      return t.push("</tr></table>");
    case 7:
      return t.push("</colgroup></table>");
    default:
      throw Error(Tt(397));
  }
}
var EAe = /[<\u2028\u2029]/g;
function HO(t) {
  return JSON.stringify(t).replace(EAe, function(e) {
    switch (e) {
      case "<":
        return "\\u003c";
      case "\u2028":
        return "\\u2028";
      case "\u2029":
        return "\\u2029";
      default:
        throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
    }
  });
}
function TAe(t, e) {
  return e = e === void 0 ? "" : e, { bootstrapChunks: [], startInlineScript: "<script>", placeholderPrefix: e + "P:", segmentPrefix: e + "S:", boundaryPrefix: e + "B:", idPrefix: e, nextSuspenseID: 0, sentCompleteSegmentFunction: !1, sentCompleteBoundaryFunction: !1, sentClientRenderFunction: !1, generateStaticMarkup: t };
}
function ZI(t, e, n, i) {
  return n.generateStaticMarkup ? (t.push(Yr(e)), !1) : (e === "" ? t = i : (i && t.push("<!-- -->"), t.push(Yr(e)), t = !0), t);
}
var Pg = Object.assign, $Ae = Symbol.for("react.element"), KY = Symbol.for("react.portal"), JY = Symbol.for("react.fragment"), eV = Symbol.for("react.strict_mode"), tV = Symbol.for("react.profiler"), nV = Symbol.for("react.provider"), iV = Symbol.for("react.context"), rV = Symbol.for("react.forward_ref"), sV = Symbol.for("react.suspense"), oV = Symbol.for("react.suspense_list"), aV = Symbol.for("react.memo"), TT = Symbol.for("react.lazy"), MAe = Symbol.for("react.scope"), NAe = Symbol.for("react.debug_trace_mode"), AAe = Symbol.for("react.legacy_hidden"), DAe = Symbol.for("react.default_value"), qI = Symbol.iterator;
function l6(t) {
  if (t == null) return null;
  if (typeof t == "function") return t.displayName || t.name || null;
  if (typeof t == "string") return t;
  switch (t) {
    case JY:
      return "Fragment";
    case KY:
      return "Portal";
    case tV:
      return "Profiler";
    case eV:
      return "StrictMode";
    case sV:
      return "Suspense";
    case oV:
      return "SuspenseList";
  }
  if (typeof t == "object") switch (t.$$typeof) {
    case iV:
      return (t.displayName || "Context") + ".Consumer";
    case nV:
      return (t._context.displayName || "Context") + ".Provider";
    case rV:
      var e = t.render;
      return t = t.displayName, t || (t = e.displayName || e.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
    case aV:
      return e = t.displayName || null, e !== null ? e : l6(t.type) || "Memo";
    case TT:
      e = t._payload, t = t._init;
      try {
        return l6(t(e));
      } catch {
      }
  }
  return null;
}
var lV = {};
function YI(t, e) {
  if (t = t.contextTypes, !t) return lV;
  var n = {}, i;
  for (i in t) n[i] = e[i];
  return n;
}
var Jc = null;
function X2(t, e) {
  if (t !== e) {
    t.context._currentValue2 = t.parentValue, t = t.parent;
    var n = e.parent;
    if (t === null) {
      if (n !== null) throw Error(Tt(401));
    } else {
      if (n === null) throw Error(Tt(401));
      X2(t, n);
    }
    e.context._currentValue2 = e.value;
  }
}
function uV(t) {
  t.context._currentValue2 = t.parentValue, t = t.parent, t !== null && uV(t);
}
function cV(t) {
  var e = t.parent;
  e !== null && cV(e), t.context._currentValue2 = t.value;
}
function fV(t, e) {
  if (t.context._currentValue2 = t.parentValue, t = t.parent, t === null) throw Error(Tt(402));
  t.depth === e.depth ? X2(t, e) : fV(t, e);
}
function dV(t, e) {
  var n = e.parent;
  if (n === null) throw Error(Tt(402));
  t.depth === n.depth ? X2(t, n) : dV(t, n), e.context._currentValue2 = e.value;
}
function rk(t) {
  var e = Jc;
  e !== t && (e === null ? cV(t) : t === null ? uV(e) : e.depth === t.depth ? X2(e, t) : e.depth > t.depth ? fV(e, t) : dV(e, t), Jc = t);
}
var VI = { isMounted: function() {
  return !1;
}, enqueueSetState: function(t, e) {
  t = t._reactInternals, t.queue !== null && t.queue.push(e);
}, enqueueReplaceState: function(t, e) {
  t = t._reactInternals, t.replace = !0, t.queue = [e];
}, enqueueForceUpdate: function() {
} };
function XI(t, e, n, i) {
  var r = t.state !== void 0 ? t.state : null;
  t.updater = VI, t.props = n, t.state = r;
  var s = { queue: [], replace: !1 };
  t._reactInternals = s;
  var o = e.contextType;
  if (t.context = typeof o == "object" && o !== null ? o._currentValue2 : i, o = e.getDerivedStateFromProps, typeof o == "function" && (o = o(n, r), r = o == null ? r : Pg({}, r, o), t.state = r), typeof e.getDerivedStateFromProps != "function" && typeof t.getSnapshotBeforeUpdate != "function" && (typeof t.UNSAFE_componentWillMount == "function" || typeof t.componentWillMount == "function")) if (e = t.state, typeof t.componentWillMount == "function" && t.componentWillMount(), typeof t.UNSAFE_componentWillMount == "function" && t.UNSAFE_componentWillMount(), e !== t.state && VI.enqueueReplaceState(t, t.state, null), s.queue !== null && 0 < s.queue.length) if (e = s.queue, o = s.replace, s.queue = null, s.replace = !1, o && e.length === 1) t.state = e[0];
  else {
    for (s = o ? e[0] : t.state, r = !0, o = o ? 1 : 0; o < e.length; o++) {
      var a = e[o];
      a = typeof a == "function" ? a.call(t, s, n, i) : a, a != null && (r ? (r = !1, s = Pg({}, s, a)) : Pg(s, a));
    }
    t.state = s;
  }
  else s.queue = null;
}
var PAe = { id: 1, overflow: "" };
function u6(t, e, n) {
  var i = t.id;
  t = t.overflow;
  var r = 32 - Ey(i) - 1;
  i &= ~(1 << r), n += 1;
  var s = 32 - Ey(e) + r;
  if (30 < s) {
    var o = r - r % 5;
    return s = (i & (1 << o) - 1).toString(32), i >>= o, r -= o, { id: 1 << 32 - Ey(e) + r | n << r | i, overflow: s + t };
  }
  return { id: 1 << s | n << r | i, overflow: t };
}
var Ey = Math.clz32 ? Math.clz32 : RAe, IAe = Math.log, LAe = Math.LN2;
function RAe(t) {
  return t >>>= 0, t === 0 ? 32 : 31 - (IAe(t) / LAe | 0) | 0;
}
function jAe(t, e) {
  return t === e && (t !== 0 || 1 / t === 1 / e) || t !== t && e !== e;
}
var FAe = typeof Object.is == "function" ? Object.is : jAe, Ml = null, $T = null, Ty = null, fn = null, fg = !1, sk = !1, M0 = 0, Tu = null, G2 = 0;
function Hc() {
  if (Ml === null) throw Error(Tt(321));
  return Ml;
}
function GI() {
  if (0 < G2) throw Error(Tt(312));
  return { memoizedState: null, queue: null, next: null };
}
function MT() {
  return fn === null ? Ty === null ? (fg = !1, Ty = fn = GI()) : (fg = !0, fn = Ty) : fn.next === null ? (fg = !1, fn = fn.next = GI()) : (fg = !0, fn = fn.next), fn;
}
function NT() {
  $T = Ml = null, sk = !1, Ty = null, G2 = 0, fn = Tu = null;
}
function hV(t, e) {
  return typeof e == "function" ? e(t) : e;
}
function KI(t, e, n) {
  if (Ml = Hc(), fn = MT(), fg) {
    var i = fn.queue;
    if (e = i.dispatch, Tu !== null && (n = Tu.get(i), n !== void 0)) {
      Tu.delete(i), i = fn.memoizedState;
      do
        i = t(i, n.action), n = n.next;
      while (n !== null);
      return fn.memoizedState = i, [i, e];
    }
    return [fn.memoizedState, e];
  }
  return t = t === hV ? typeof e == "function" ? e() : e : n !== void 0 ? n(e) : e, fn.memoizedState = t, t = fn.queue = { last: null, dispatch: null }, t = t.dispatch = BAe.bind(null, Ml, t), [fn.memoizedState, t];
}
function JI(t, e) {
  if (Ml = Hc(), fn = MT(), e = e === void 0 ? null : e, fn !== null) {
    var n = fn.memoizedState;
    if (n !== null && e !== null) {
      var i = n[1];
      e: if (i === null) i = !1;
      else {
        for (var r = 0; r < i.length && r < e.length; r++) if (!FAe(e[r], i[r])) {
          i = !1;
          break e;
        }
        i = !0;
      }
      if (i) return n[0];
    }
  }
  return t = t(), fn.memoizedState = [t, e], t;
}
function BAe(t, e, n) {
  if (25 <= G2) throw Error(Tt(301));
  if (t === Ml) if (sk = !0, t = { action: n, next: null }, Tu === null && (Tu = /* @__PURE__ */ new Map()), n = Tu.get(e), n === void 0) Tu.set(e, t);
  else {
    for (e = n; e.next !== null; ) e = e.next;
    e.next = t;
  }
}
function zAe() {
  throw Error(Tt(394));
}
function Lb() {
}
var eL = { readContext: function(t) {
  return t._currentValue2;
}, useContext: function(t) {
  return Hc(), t._currentValue2;
}, useMemo: JI, useReducer: KI, useRef: function(t) {
  Ml = Hc(), fn = MT();
  var e = fn.memoizedState;
  return e === null ? (t = { current: t }, fn.memoizedState = t) : e;
}, useState: function(t) {
  return KI(hV, t);
}, useInsertionEffect: Lb, useLayoutEffect: function() {
}, useCallback: function(t, e) {
  return JI(function() {
    return t;
  }, e);
}, useImperativeHandle: Lb, useEffect: Lb, useDebugValue: Lb, useDeferredValue: function(t) {
  return Hc(), t;
}, useTransition: function() {
  return Hc(), [
    !1,
    zAe
  ];
}, useId: function() {
  var t = $T.treeContext, e = t.overflow;
  t = t.id, t = (t & ~(1 << 32 - Ey(t) - 1)).toString(32) + e;
  var n = $y;
  if (n === null) throw Error(Tt(404));
  return e = M0++, t = ":" + n.idPrefix + "R" + t, 0 < e && (t += "H" + e.toString(32)), t + ":";
}, useMutableSource: function(t, e) {
  return Hc(), e(t._source);
}, useSyncExternalStore: function(t, e, n) {
  if (n === void 0) throw Error(Tt(407));
  return n();
} }, $y = null, QO = VY.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
function WAe(t) {
  return console.error(t), null;
}
function dg() {
}
function HAe(t, e, n, i, r, s, o, a, l) {
  var u = [], f = /* @__PURE__ */ new Set();
  return e = { destination: null, responseState: e, progressiveChunkSize: i === void 0 ? 12800 : i, status: 0, fatalError: null, nextSegmentId: 0, allPendingTasks: 0, pendingRootTasks: 0, completedRootSegment: null, abortableTasks: f, pingedTasks: u, clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], onError: r === void 0 ? WAe : r, onAllReady: dg, onShellReady: o === void 0 ? dg : o, onShellError: dg, onFatalError: dg }, n = ok(e, 0, null, n, !1, !1), n.parentFlushed = !0, t = AT(e, t, null, n, f, lV, null, PAe), u.push(t), e;
}
function AT(t, e, n, i, r, s, o, a) {
  t.allPendingTasks++, n === null ? t.pendingRootTasks++ : n.pendingTasks++;
  var l = { node: e, ping: function() {
    var u = t.pingedTasks;
    u.push(l), u.length === 1 && gV(t);
  }, blockedBoundary: n, blockedSegment: i, abortSet: r, legacyContext: s, context: o, treeContext: a };
  return r.add(l), l;
}
function ok(t, e, n, i, r, s) {
  return { status: 0, id: -1, index: e, parentFlushed: !1, chunks: [], children: [], formatContext: i, boundary: n, lastPushedText: r, textEmbedded: s };
}
function N0(t, e) {
  if (t = t.onError(e), t != null && typeof t != "string") throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + typeof t + '" instead');
  return t;
}
function ak(t, e) {
  var n = t.onShellError;
  n(e), n = t.onFatalError, n(e), t.destination !== null ? (t.status = 2, t.destination.destroy(e)) : (t.status = 1, t.fatalError = e);
}
function tL(t, e, n, i, r) {
  for (Ml = {}, $T = e, M0 = 0, t = n(i, r); sk; ) sk = !1, M0 = 0, G2 += 1, fn = null, t = n(i, r);
  return NT(), t;
}
function nL(t, e, n, i) {
  var r = n.render(), s = i.childContextTypes;
  if (s != null) {
    var o = e.legacyContext;
    if (typeof n.getChildContext != "function") i = o;
    else {
      n = n.getChildContext();
      for (var a in n) if (!(a in s)) throw Error(Tt(108, l6(i) || "Unknown", a));
      i = Pg({}, o, n);
    }
    e.legacyContext = i, Ps(t, e, r), e.legacyContext = o;
  } else Ps(t, e, r);
}
function iL(t, e) {
  if (t && t.defaultProps) {
    e = Pg({}, e), t = t.defaultProps;
    for (var n in t) e[n] === void 0 && (e[n] = t[n]);
    return e;
  }
  return e;
}
function c6(t, e, n, i, r) {
  if (typeof n == "function") if (n.prototype && n.prototype.isReactComponent) {
    r = YI(n, e.legacyContext);
    var s = n.contextType;
    s = new n(i, typeof s == "object" && s !== null ? s._currentValue2 : r), XI(s, n, i, r), nL(t, e, s, n);
  } else {
    s = YI(n, e.legacyContext), r = tL(t, e, n, i, s);
    var o = M0 !== 0;
    if (typeof r == "object" && r !== null && typeof r.render == "function" && r.$$typeof === void 0) XI(r, n, i, s), nL(t, e, r, n);
    else if (o) {
      i = e.treeContext, e.treeContext = u6(i, 1, 0);
      try {
        Ps(t, e, r);
      } finally {
        e.treeContext = i;
      }
    } else Ps(t, e, r);
  }
  else if (typeof n == "string") {
    switch (r = e.blockedSegment, s = OAe(r.chunks, n, i, t.responseState, r.formatContext), r.lastPushedText = !1, o = r.formatContext, r.formatContext = kAe(o, n, i), f6(t, e, s), r.formatContext = o, n) {
      case "area":
      case "base":
      case "br":
      case "col":
      case "embed":
      case "hr":
      case "img":
      case "input":
      case "keygen":
      case "link":
      case "meta":
      case "param":
      case "source":
      case "track":
      case "wbr":
        break;
      default:
        r.chunks.push("</", n, ">");
    }
    r.lastPushedText = !1;
  } else {
    switch (n) {
      case AAe:
      case NAe:
      case eV:
      case tV:
      case JY:
        Ps(t, e, i.children);
        return;
      case oV:
        Ps(t, e, i.children);
        return;
      case MAe:
        throw Error(Tt(343));
      case sV:
        e: {
          n = e.blockedBoundary, r = e.blockedSegment, s = i.fallback, i = i.children, o = /* @__PURE__ */ new Set();
          var a = { id: null, rootSegmentID: -1, parentFlushed: !1, pendingTasks: 0, forceClientRender: !1, completedSegments: [], byteSize: 0, fallbackAbortableTasks: o, errorDigest: null }, l = ok(t, r.chunks.length, a, r.formatContext, !1, !1);
          r.children.push(l), r.lastPushedText = !1;
          var u = ok(t, 0, null, r.formatContext, !1, !1);
          u.parentFlushed = !0, e.blockedBoundary = a, e.blockedSegment = u;
          try {
            if (f6(
              t,
              e,
              i
            ), t.responseState.generateStaticMarkup || u.lastPushedText && u.textEmbedded && u.chunks.push("<!-- -->"), u.status = 1, lk(a, u), a.pendingTasks === 0) break e;
          } catch (f) {
            u.status = 4, a.forceClientRender = !0, a.errorDigest = N0(t, f);
          } finally {
            e.blockedBoundary = n, e.blockedSegment = r;
          }
          e = AT(t, s, n, l, o, e.legacyContext, e.context, e.treeContext), t.pingedTasks.push(e);
        }
        return;
    }
    if (typeof n == "object" && n !== null) switch (n.$$typeof) {
      case rV:
        if (i = tL(t, e, n.render, i, r), M0 !== 0) {
          n = e.treeContext, e.treeContext = u6(n, 1, 0);
          try {
            Ps(t, e, i);
          } finally {
            e.treeContext = n;
          }
        } else Ps(t, e, i);
        return;
      case aV:
        n = n.type, i = iL(n, i), c6(t, e, n, i, r);
        return;
      case nV:
        if (r = i.children, n = n._context, i = i.value, s = n._currentValue2, n._currentValue2 = i, o = Jc, Jc = i = { parent: o, depth: o === null ? 0 : o.depth + 1, context: n, parentValue: s, value: i }, e.context = i, Ps(t, e, r), t = Jc, t === null) throw Error(Tt(403));
        i = t.parentValue, t.context._currentValue2 = i === DAe ? t.context._defaultValue : i, t = Jc = t.parent, e.context = t;
        return;
      case iV:
        i = i.children, i = i(n._currentValue2), Ps(t, e, i);
        return;
      case TT:
        r = n._init, n = r(n._payload), i = iL(n, i), c6(
          t,
          e,
          n,
          i,
          void 0
        );
        return;
    }
    throw Error(Tt(130, n == null ? n : typeof n, ""));
  }
}
function Ps(t, e, n) {
  if (e.node = n, typeof n == "object" && n !== null) {
    switch (n.$$typeof) {
      case $Ae:
        c6(t, e, n.type, n.props, n.ref);
        return;
      case KY:
        throw Error(Tt(257));
      case TT:
        var i = n._init;
        n = i(n._payload), Ps(t, e, n);
        return;
    }
    if (a6(n)) {
      rL(t, e, n);
      return;
    }
    if (n === null || typeof n != "object" ? i = null : (i = qI && n[qI] || n["@@iterator"], i = typeof i == "function" ? i : null), i && (i = i.call(n))) {
      if (n = i.next(), !n.done) {
        var r = [];
        do
          r.push(n.value), n = i.next();
        while (!n.done);
        rL(t, e, r);
      }
      return;
    }
    throw t = Object.prototype.toString.call(n), Error(Tt(31, t === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : t));
  }
  typeof n == "string" ? (i = e.blockedSegment, i.lastPushedText = ZI(e.blockedSegment.chunks, n, t.responseState, i.lastPushedText)) : typeof n == "number" && (i = e.blockedSegment, i.lastPushedText = ZI(e.blockedSegment.chunks, "" + n, t.responseState, i.lastPushedText));
}
function rL(t, e, n) {
  for (var i = n.length, r = 0; r < i; r++) {
    var s = e.treeContext;
    e.treeContext = u6(s, i, r);
    try {
      f6(t, e, n[r]);
    } finally {
      e.treeContext = s;
    }
  }
}
function f6(t, e, n) {
  var i = e.blockedSegment.formatContext, r = e.legacyContext, s = e.context;
  try {
    return Ps(t, e, n);
  } catch (l) {
    if (NT(), typeof l == "object" && l !== null && typeof l.then == "function") {
      n = l;
      var o = e.blockedSegment, a = ok(t, o.chunks.length, null, o.formatContext, o.lastPushedText, !0);
      o.children.push(a), o.lastPushedText = !1, t = AT(t, e.node, e.blockedBoundary, a, e.abortSet, e.legacyContext, e.context, e.treeContext).ping, n.then(t, t), e.blockedSegment.formatContext = i, e.legacyContext = r, e.context = s, rk(s);
    } else throw e.blockedSegment.formatContext = i, e.legacyContext = r, e.context = s, rk(s), l;
  }
}
function QAe(t) {
  var e = t.blockedBoundary;
  t = t.blockedSegment, t.status = 3, mV(this, e, t);
}
function pV(t, e, n) {
  var i = t.blockedBoundary;
  t.blockedSegment.status = 3, i === null ? (e.allPendingTasks--, e.status !== 2 && (e.status = 2, e.destination !== null && e.destination.push(null))) : (i.pendingTasks--, i.forceClientRender || (i.forceClientRender = !0, t = n === void 0 ? Error(Tt(432)) : n, i.errorDigest = e.onError(t), i.parentFlushed && e.clientRenderedBoundaries.push(i)), i.fallbackAbortableTasks.forEach(function(r) {
    return pV(r, e, n);
  }), i.fallbackAbortableTasks.clear(), e.allPendingTasks--, e.allPendingTasks === 0 && (i = e.onAllReady, i()));
}
function lk(t, e) {
  if (e.chunks.length === 0 && e.children.length === 1 && e.children[0].boundary === null) {
    var n = e.children[0];
    n.id = e.id, n.parentFlushed = !0, n.status === 1 && lk(t, n);
  } else t.completedSegments.push(e);
}
function mV(t, e, n) {
  if (e === null) {
    if (n.parentFlushed) {
      if (t.completedRootSegment !== null) throw Error(Tt(389));
      t.completedRootSegment = n;
    }
    t.pendingRootTasks--, t.pendingRootTasks === 0 && (t.onShellError = dg, e = t.onShellReady, e());
  } else e.pendingTasks--, e.forceClientRender || (e.pendingTasks === 0 ? (n.parentFlushed && n.status === 1 && lk(e, n), e.parentFlushed && t.completedBoundaries.push(e), e.fallbackAbortableTasks.forEach(QAe, t), e.fallbackAbortableTasks.clear()) : n.parentFlushed && n.status === 1 && (lk(e, n), e.completedSegments.length === 1 && e.parentFlushed && t.partialBoundaries.push(e)));
  t.allPendingTasks--, t.allPendingTasks === 0 && (t = t.onAllReady, t());
}
function gV(t) {
  if (t.status !== 2) {
    var e = Jc, n = QO.current;
    QO.current = eL;
    var i = $y;
    $y = t.responseState;
    try {
      var r = t.pingedTasks, s;
      for (s = 0; s < r.length; s++) {
        var o = r[s], a = t, l = o.blockedSegment;
        if (l.status === 0) {
          rk(o.context);
          try {
            Ps(a, o, o.node), a.responseState.generateStaticMarkup || l.lastPushedText && l.textEmbedded && l.chunks.push("<!-- -->"), o.abortSet.delete(o), l.status = 1, mV(a, o.blockedBoundary, l);
          } catch (g) {
            if (NT(), typeof g == "object" && g !== null && typeof g.then == "function") {
              var u = o.ping;
              g.then(u, u);
            } else {
              o.abortSet.delete(o), l.status = 4;
              var f = o.blockedBoundary, d = g, h = N0(a, d);
              if (f === null ? ak(a, d) : (f.pendingTasks--, f.forceClientRender || (f.forceClientRender = !0, f.errorDigest = h, f.parentFlushed && a.clientRenderedBoundaries.push(f))), a.allPendingTasks--, a.allPendingTasks === 0) {
                var m = a.onAllReady;
                m();
              }
            }
          } finally {
          }
        }
      }
      r.splice(0, s), t.destination !== null && DT(t, t.destination);
    } catch (g) {
      N0(t, g), ak(t, g);
    } finally {
      $y = i, QO.current = n, n === eL && rk(e);
    }
  }
}
function Rb(t, e, n) {
  switch (n.parentFlushed = !0, n.status) {
    case 0:
      var i = n.id = t.nextSegmentId++;
      return n.lastPushedText = !1, n.textEmbedded = !1, t = t.responseState, e.push('<template id="'), e.push(t.placeholderPrefix), t = i.toString(16), e.push(t), e.push('"></template>');
    case 1:
      n.status = 2;
      var r = !0;
      i = n.chunks;
      var s = 0;
      n = n.children;
      for (var o = 0; o < n.length; o++) {
        for (r = n[o]; s < r.index; s++) e.push(i[s]);
        r = K2(t, e, r);
      }
      for (; s < i.length - 1; s++) e.push(i[s]);
      return s < i.length && (r = e.push(i[s])), r;
    default:
      throw Error(Tt(390));
  }
}
function K2(t, e, n) {
  var i = n.boundary;
  if (i === null) return Rb(t, e, n);
  if (i.parentFlushed = !0, i.forceClientRender) return t.responseState.generateStaticMarkup || (i = i.errorDigest, e.push("<!--$!-->"), e.push("<template"), i && (e.push(' data-dgst="'), i = Yr(i), e.push(i), e.push('"')), e.push("></template>")), Rb(t, e, n), t = t.responseState.generateStaticMarkup ? !0 : e.push("<!--/$-->"), t;
  if (0 < i.pendingTasks) {
    i.rootSegmentID = t.nextSegmentId++, 0 < i.completedSegments.length && t.partialBoundaries.push(i);
    var r = t.responseState, s = r.nextSuspenseID++;
    return r = r.boundaryPrefix + s.toString(16), i = i.id = r, UI(e, t.responseState, i), Rb(t, e, n), e.push("<!--/$-->");
  }
  if (i.byteSize > t.progressiveChunkSize) return i.rootSegmentID = t.nextSegmentId++, t.completedBoundaries.push(i), UI(e, t.responseState, i.id), Rb(t, e, n), e.push("<!--/$-->");
  if (t.responseState.generateStaticMarkup || e.push("<!--$-->"), n = i.completedSegments, n.length !== 1) throw Error(Tt(391));
  return K2(t, e, n[0]), t = t.responseState.generateStaticMarkup ? !0 : e.push("<!--/$-->"), t;
}
function sL(t, e, n) {
  return SAe(e, t.responseState, n.formatContext, n.id), K2(t, e, n), CAe(e, n.formatContext);
}
function oL(t, e, n) {
  for (var i = n.completedSegments, r = 0; r < i.length; r++) vV(t, e, n, i[r]);
  if (i.length = 0, t = t.responseState, i = n.id, n = n.rootSegmentID, e.push(t.startInlineScript), t.sentCompleteBoundaryFunction ? e.push('$RC("') : (t.sentCompleteBoundaryFunction = !0, e.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')), i === null) throw Error(Tt(395));
  return n = n.toString(16), e.push(i), e.push('","'), e.push(t.segmentPrefix), e.push(n), e.push('")<\/script>');
}
function vV(t, e, n, i) {
  if (i.status === 2) return !0;
  var r = i.id;
  if (r === -1) {
    if ((i.id = n.rootSegmentID) === -1) throw Error(Tt(392));
    return sL(t, e, i);
  }
  return sL(t, e, i), t = t.responseState, e.push(t.startInlineScript), t.sentCompleteSegmentFunction ? e.push('$RS("') : (t.sentCompleteSegmentFunction = !0, e.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')), e.push(t.segmentPrefix), r = r.toString(16), e.push(r), e.push('","'), e.push(t.placeholderPrefix), e.push(r), e.push('")<\/script>');
}
function DT(t, e) {
  try {
    var n = t.completedRootSegment;
    if (n !== null && t.pendingRootTasks === 0) {
      K2(t, e, n), t.completedRootSegment = null;
      var i = t.responseState.bootstrapChunks;
      for (n = 0; n < i.length - 1; n++) e.push(i[n]);
      n < i.length && e.push(i[n]);
    }
    var r = t.clientRenderedBoundaries, s;
    for (s = 0; s < r.length; s++) {
      var o = r[s];
      i = e;
      var a = t.responseState, l = o.id, u = o.errorDigest, f = o.errorMessage, d = o.errorComponentStack;
      if (i.push(a.startInlineScript), a.sentClientRenderFunction ? i.push('$RX("') : (a.sentClientRenderFunction = !0, i.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')), l === null) throw Error(Tt(395));
      if (i.push(l), i.push('"'), u || f || d) {
        i.push(",");
        var h = HO(u || "");
        i.push(h);
      }
      if (f || d) {
        i.push(",");
        var m = HO(f || "");
        i.push(m);
      }
      if (d) {
        i.push(",");
        var g = HO(d);
        i.push(g);
      }
      if (!i.push(")<\/script>")) {
        t.destination = null, s++, r.splice(0, s);
        return;
      }
    }
    r.splice(0, s);
    var w = t.completedBoundaries;
    for (s = 0; s < w.length; s++) if (!oL(t, e, w[s])) {
      t.destination = null, s++, w.splice(0, s);
      return;
    }
    w.splice(0, s);
    var x = t.partialBoundaries;
    for (s = 0; s < x.length; s++) {
      var _ = x[s];
      e: {
        r = t, o = e;
        var S = _.completedSegments;
        for (a = 0; a < S.length; a++) if (!vV(r, o, _, S[a])) {
          a++, S.splice(0, a);
          var C = !1;
          break e;
        }
        S.splice(0, a), C = !0;
      }
      if (!C) {
        t.destination = null, s++, x.splice(0, s);
        return;
      }
    }
    x.splice(0, s);
    var E = t.completedBoundaries;
    for (s = 0; s < E.length; s++) if (!oL(t, e, E[s])) {
      t.destination = null, s++, E.splice(0, s);
      return;
    }
    E.splice(0, s);
  } finally {
    t.allPendingTasks === 0 && t.pingedTasks.length === 0 && t.clientRenderedBoundaries.length === 0 && t.completedBoundaries.length === 0 && e.push(null);
  }
}
function UAe(t, e) {
  try {
    var n = t.abortableTasks;
    n.forEach(function(i) {
      return pV(i, t, e);
    }), n.clear(), t.destination !== null && DT(t, t.destination);
  } catch (i) {
    N0(t, i), ak(t, i);
  }
}
function ZAe() {
}
function bV(t, e, n, i) {
  var r = !1, s = null, o = "", a = { push: function(u) {
    return u !== null && (o += u), !0;
  }, destroy: function(u) {
    r = !0, s = u;
  } }, l = !1;
  if (t = HAe(t, TAe(n, e ? e.identifierPrefix : void 0), { insertionMode: 1, selectedValue: null }, 1 / 0, ZAe, void 0, function() {
    l = !0;
  }), gV(t), UAe(t, i), t.status === 1) t.status = 2, a.destroy(t.fatalError);
  else if (t.status !== 2 && t.destination === null) {
    t.destination = a;
    try {
      DT(t, a);
    } catch (u) {
      N0(t, u), ak(t, u);
    }
  }
  if (r) throw s;
  if (!l) throw Error(Tt(426));
  return o;
}
kp.renderToNodeStream = function() {
  throw Error(Tt(207));
};
kp.renderToStaticMarkup = function(t, e) {
  return bV(t, e, !0, 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server');
};
kp.renderToStaticNodeStream = function() {
  throw Error(Tt(208));
};
kp.renderToString = function(t, e) {
  return bV(t, e, !1, 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server');
};
kp.version = "18.3.1";
var PT = {};
/**
 * @license React
 * react-dom-server.browser.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var yV = j;
function Nt(t) {
  for (var e = "https://reactjs.org/docs/error-decoder.html?invariant=" + t, n = 1; n < arguments.length; n++) e += "&args[]=" + encodeURIComponent(arguments[n]);
  return "Minified React error #" + t + "; visit " + e + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
var Is = null, Ls = 0;
function Ve(t, e) {
  if (e.length !== 0) if (512 < e.length) 0 < Ls && (t.enqueue(new Uint8Array(Is.buffer, 0, Ls)), Is = new Uint8Array(512), Ls = 0), t.enqueue(e);
  else {
    var n = Is.length - Ls;
    n < e.length && (n === 0 ? t.enqueue(Is) : (Is.set(e.subarray(0, n), Ls), t.enqueue(Is), e = e.subarray(n)), Is = new Uint8Array(512), Ls = 0), Is.set(e, Ls), Ls += e.length;
  }
}
function Cn(t, e) {
  return Ve(t, e), !0;
}
function aL(t) {
  Is && 0 < Ls && (t.enqueue(new Uint8Array(Is.buffer, 0, Ls)), Is = null, Ls = 0);
}
var wV = new TextEncoder();
function Pt(t) {
  return wV.encode(t);
}
function Ae(t) {
  return wV.encode(t);
}
function kV(t, e) {
  typeof t.error == "function" ? t.error(e) : t.close();
}
var ms = Object.prototype.hasOwnProperty, qAe = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, lL = {}, uL = {};
function xV(t) {
  return ms.call(uL, t) ? !0 : ms.call(lL, t) ? !1 : qAe.test(t) ? uL[t] = !0 : (lL[t] = !0, !1);
}
function ls(t, e, n, i, r, s, o) {
  this.acceptsBooleans = e === 2 || e === 3 || e === 4, this.attributeName = i, this.attributeNamespace = r, this.mustUseProperty = n, this.propertyName = t, this.type = e, this.sanitizeURL = s, this.removeEmptyString = o;
}
var vr = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t) {
  vr[t] = new ls(t, 0, !1, t, null, !1, !1);
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(t) {
  var e = t[0];
  vr[e] = new ls(e, 1, !1, t[1], null, !1, !1);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(t) {
  vr[t] = new ls(t, 2, !1, t.toLowerCase(), null, !1, !1);
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(t) {
  vr[t] = new ls(t, 2, !1, t, null, !1, !1);
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t) {
  vr[t] = new ls(t, 3, !1, t.toLowerCase(), null, !1, !1);
});
["checked", "multiple", "muted", "selected"].forEach(function(t) {
  vr[t] = new ls(t, 3, !0, t, null, !1, !1);
});
["capture", "download"].forEach(function(t) {
  vr[t] = new ls(t, 4, !1, t, null, !1, !1);
});
["cols", "rows", "size", "span"].forEach(function(t) {
  vr[t] = new ls(t, 6, !1, t, null, !1, !1);
});
["rowSpan", "start"].forEach(function(t) {
  vr[t] = new ls(t, 5, !1, t.toLowerCase(), null, !1, !1);
});
var IT = /[\-:]([a-z])/g;
function LT(t) {
  return t[1].toUpperCase();
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t) {
  var e = t.replace(
    IT,
    LT
  );
  vr[e] = new ls(e, 1, !1, t, null, !1, !1);
});
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t) {
  var e = t.replace(IT, LT);
  vr[e] = new ls(e, 1, !1, t, "http://www.w3.org/1999/xlink", !1, !1);
});
["xml:base", "xml:lang", "xml:space"].forEach(function(t) {
  var e = t.replace(IT, LT);
  vr[e] = new ls(e, 1, !1, t, "http://www.w3.org/XML/1998/namespace", !1, !1);
});
["tabIndex", "crossOrigin"].forEach(function(t) {
  vr[t] = new ls(t, 1, !1, t.toLowerCase(), null, !1, !1);
});
vr.xlinkHref = new ls("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function(t) {
  vr[t] = new ls(t, 1, !1, t.toLowerCase(), null, !0, !0);
});
var My = {
  animationIterationCount: !0,
  aspectRatio: !0,
  borderImageOutset: !0,
  borderImageSlice: !0,
  borderImageWidth: !0,
  boxFlex: !0,
  boxFlexGroup: !0,
  boxOrdinalGroup: !0,
  columnCount: !0,
  columns: !0,
  flex: !0,
  flexGrow: !0,
  flexPositive: !0,
  flexShrink: !0,
  flexNegative: !0,
  flexOrder: !0,
  gridArea: !0,
  gridRow: !0,
  gridRowEnd: !0,
  gridRowSpan: !0,
  gridRowStart: !0,
  gridColumn: !0,
  gridColumnEnd: !0,
  gridColumnSpan: !0,
  gridColumnStart: !0,
  fontWeight: !0,
  lineClamp: !0,
  lineHeight: !0,
  opacity: !0,
  order: !0,
  orphans: !0,
  tabSize: !0,
  widows: !0,
  zIndex: !0,
  zoom: !0,
  fillOpacity: !0,
  floodOpacity: !0,
  stopOpacity: !0,
  strokeDasharray: !0,
  strokeDashoffset: !0,
  strokeMiterlimit: !0,
  strokeOpacity: !0,
  strokeWidth: !0
}, YAe = ["Webkit", "ms", "Moz", "O"];
Object.keys(My).forEach(function(t) {
  YAe.forEach(function(e) {
    e = e + t.charAt(0).toUpperCase() + t.substring(1), My[e] = My[t];
  });
});
var VAe = /["'&<>]/;
function fr(t) {
  if (typeof t == "boolean" || typeof t == "number") return "" + t;
  t = "" + t;
  var e = VAe.exec(t);
  if (e) {
    var n = "", i, r = 0;
    for (i = e.index; i < t.length; i++) {
      switch (t.charCodeAt(i)) {
        case 34:
          e = "&quot;";
          break;
        case 38:
          e = "&amp;";
          break;
        case 39:
          e = "&#x27;";
          break;
        case 60:
          e = "&lt;";
          break;
        case 62:
          e = "&gt;";
          break;
        default:
          continue;
      }
      r !== i && (n += t.substring(r, i)), r = i + 1, n += e;
    }
    t = r !== i ? n + t.substring(r, i) : n;
  }
  return t;
}
var XAe = /([A-Z])/g, GAe = /^ms-/, d6 = Array.isArray, KAe = Ae("<script>"), JAe = Ae("<\/script>"), eDe = Ae('<script src="'), tDe = Ae('<script type="module" src="'), cL = Ae('" async=""><\/script>'), nDe = /(<\/|<)(s)(cript)/gi;
function iDe(t, e, n, i) {
  return "" + e + (n === "s" ? "\\u0073" : "\\u0053") + i;
}
function rDe(t, e, n, i, r) {
  t = t === void 0 ? "" : t, e = e === void 0 ? KAe : Ae('<script nonce="' + fr(e) + '">');
  var s = [];
  if (n !== void 0 && s.push(e, Pt(("" + n).replace(nDe, iDe)), JAe), i !== void 0) for (n = 0; n < i.length; n++) s.push(eDe, Pt(fr(i[n])), cL);
  if (r !== void 0) for (i = 0; i < r.length; i++) s.push(tDe, Pt(fr(r[i])), cL);
  return { bootstrapChunks: s, startInlineScript: e, placeholderPrefix: Ae(t + "P:"), segmentPrefix: Ae(t + "S:"), boundaryPrefix: t + "B:", idPrefix: t, nextSuspenseID: 0, sentCompleteSegmentFunction: !1, sentCompleteBoundaryFunction: !1, sentClientRenderFunction: !1 };
}
function da(t, e) {
  return { insertionMode: t, selectedValue: e };
}
function sDe(t) {
  return da(t === "http://www.w3.org/2000/svg" ? 2 : t === "http://www.w3.org/1998/Math/MathML" ? 3 : 0, null);
}
function oDe(t, e, n) {
  switch (e) {
    case "select":
      return da(1, n.value != null ? n.value : n.defaultValue);
    case "svg":
      return da(2, null);
    case "math":
      return da(3, null);
    case "foreignObject":
      return da(1, null);
    case "table":
      return da(4, null);
    case "thead":
    case "tbody":
    case "tfoot":
      return da(5, null);
    case "colgroup":
      return da(7, null);
    case "tr":
      return da(6, null);
  }
  return 4 <= t.insertionMode || t.insertionMode === 0 ? da(1, null) : t;
}
var RT = Ae("<!-- -->");
function fL(t, e, n, i) {
  return e === "" ? i : (i && t.push(RT), t.push(Pt(fr(e))), !0);
}
var dL = /* @__PURE__ */ new Map(), aDe = Ae(' style="'), hL = Ae(":"), lDe = Ae(";");
function _V(t, e, n) {
  if (typeof n != "object") throw Error(Nt(62));
  e = !0;
  for (var i in n) if (ms.call(n, i)) {
    var r = n[i];
    if (r != null && typeof r != "boolean" && r !== "") {
      if (i.indexOf("--") === 0) {
        var s = Pt(fr(i));
        r = Pt(fr(("" + r).trim()));
      } else {
        s = i;
        var o = dL.get(s);
        o !== void 0 || (o = Ae(fr(s.replace(XAe, "-$1").toLowerCase().replace(GAe, "-ms-"))), dL.set(s, o)), s = o, r = typeof r == "number" ? r === 0 || ms.call(My, i) ? Pt("" + r) : Pt(r + "px") : Pt(fr(("" + r).trim()));
      }
      e ? (e = !1, t.push(aDe, s, hL, r)) : t.push(lDe, s, hL, r);
    }
  }
  e || t.push(Qc);
}
var lu = Ae(" "), qd = Ae('="'), Qc = Ae('"'), pL = Ae('=""');
function As(t, e, n, i) {
  switch (n) {
    case "style":
      _V(t, e, i);
      return;
    case "defaultValue":
    case "defaultChecked":
    case "innerHTML":
    case "suppressContentEditableWarning":
    case "suppressHydrationWarning":
      return;
  }
  if (!(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N") {
    if (e = vr.hasOwnProperty(n) ? vr[n] : null, e !== null) {
      switch (typeof i) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (!e.acceptsBooleans) return;
      }
      switch (n = Pt(e.attributeName), e.type) {
        case 3:
          i && t.push(lu, n, pL);
          break;
        case 4:
          i === !0 ? t.push(lu, n, pL) : i !== !1 && t.push(lu, n, qd, Pt(fr(i)), Qc);
          break;
        case 5:
          isNaN(i) || t.push(lu, n, qd, Pt(fr(i)), Qc);
          break;
        case 6:
          !isNaN(i) && 1 <= i && t.push(lu, n, qd, Pt(fr(i)), Qc);
          break;
        default:
          e.sanitizeURL && (i = "" + i), t.push(lu, n, qd, Pt(fr(i)), Qc);
      }
    } else if (xV(n)) {
      switch (typeof i) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (e = n.toLowerCase().slice(0, 5), e !== "data-" && e !== "aria-") return;
      }
      t.push(lu, Pt(n), qd, Pt(fr(i)), Qc);
    }
  }
}
var uu = Ae(">"), mL = Ae("/>");
function Ny(t, e, n) {
  if (e != null) {
    if (n != null) throw Error(Nt(60));
    if (typeof e != "object" || !("__html" in e)) throw Error(Nt(61));
    e = e.__html, e != null && t.push(Pt("" + e));
  }
}
function uDe(t) {
  var e = "";
  return yV.Children.forEach(t, function(n) {
    n != null && (e += n);
  }), e;
}
var UO = Ae(' selected=""');
function ZO(t, e, n, i) {
  t.push(ha(n));
  var r = n = null, s;
  for (s in e) if (ms.call(e, s)) {
    var o = e[s];
    if (o != null) switch (s) {
      case "children":
        n = o;
        break;
      case "dangerouslySetInnerHTML":
        r = o;
        break;
      default:
        As(t, i, s, o);
    }
  }
  return t.push(uu), Ny(t, r, n), typeof n == "string" ? (t.push(Pt(fr(n))), null) : n;
}
var qO = Ae(`
`), cDe = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, gL = /* @__PURE__ */ new Map();
function ha(t) {
  var e = gL.get(t);
  if (e === void 0) {
    if (!cDe.test(t)) throw Error(Nt(65, t));
    e = Ae("<" + t), gL.set(t, e);
  }
  return e;
}
var fDe = Ae("<!DOCTYPE html>");
function dDe(t, e, n, i, r) {
  switch (e) {
    case "select":
      t.push(ha("select"));
      var s = null, o = null;
      for (f in n) if (ms.call(n, f)) {
        var a = n[f];
        if (a != null) switch (f) {
          case "children":
            s = a;
            break;
          case "dangerouslySetInnerHTML":
            o = a;
            break;
          case "defaultValue":
          case "value":
            break;
          default:
            As(t, i, f, a);
        }
      }
      return t.push(uu), Ny(t, o, s), s;
    case "option":
      o = r.selectedValue, t.push(ha("option"));
      var l = a = null, u = null, f = null;
      for (s in n) if (ms.call(n, s)) {
        var d = n[s];
        if (d != null) switch (s) {
          case "children":
            a = d;
            break;
          case "selected":
            u = d;
            break;
          case "dangerouslySetInnerHTML":
            f = d;
            break;
          case "value":
            l = d;
          default:
            As(t, i, s, d);
        }
      }
      if (o != null) if (n = l !== null ? "" + l : uDe(a), d6(o)) {
        for (i = 0; i < o.length; i++)
          if ("" + o[i] === n) {
            t.push(UO);
            break;
          }
      } else "" + o === n && t.push(UO);
      else u && t.push(UO);
      return t.push(uu), Ny(t, f, a), a;
    case "textarea":
      t.push(ha("textarea")), f = o = s = null;
      for (a in n) if (ms.call(n, a) && (l = n[a], l != null)) switch (a) {
        case "children":
          f = l;
          break;
        case "value":
          s = l;
          break;
        case "defaultValue":
          o = l;
          break;
        case "dangerouslySetInnerHTML":
          throw Error(Nt(91));
        default:
          As(t, i, a, l);
      }
      if (s === null && o !== null && (s = o), t.push(uu), f != null) {
        if (s != null) throw Error(Nt(92));
        if (d6(f) && 1 < f.length) throw Error(Nt(93));
        s = "" + f;
      }
      return typeof s == "string" && s[0] === `
` && t.push(qO), s !== null && t.push(Pt(fr("" + s))), null;
    case "input":
      t.push(ha("input")), l = f = a = s = null;
      for (o in n) if (ms.call(n, o) && (u = n[o], u != null)) switch (o) {
        case "children":
        case "dangerouslySetInnerHTML":
          throw Error(Nt(399, "input"));
        case "defaultChecked":
          l = u;
          break;
        case "defaultValue":
          a = u;
          break;
        case "checked":
          f = u;
          break;
        case "value":
          s = u;
          break;
        default:
          As(t, i, o, u);
      }
      return f !== null ? As(
        t,
        i,
        "checked",
        f
      ) : l !== null && As(t, i, "checked", l), s !== null ? As(t, i, "value", s) : a !== null && As(t, i, "value", a), t.push(mL), null;
    case "menuitem":
      t.push(ha("menuitem"));
      for (var h in n) if (ms.call(n, h) && (s = n[h], s != null)) switch (h) {
        case "children":
        case "dangerouslySetInnerHTML":
          throw Error(Nt(400));
        default:
          As(t, i, h, s);
      }
      return t.push(uu), null;
    case "title":
      t.push(ha("title")), s = null;
      for (d in n) if (ms.call(n, d) && (o = n[d], o != null)) switch (d) {
        case "children":
          s = o;
          break;
        case "dangerouslySetInnerHTML":
          throw Error(Nt(434));
        default:
          As(t, i, d, o);
      }
      return t.push(uu), s;
    case "listing":
    case "pre":
      t.push(ha(e)), o = s = null;
      for (l in n) if (ms.call(n, l) && (a = n[l], a != null)) switch (l) {
        case "children":
          s = a;
          break;
        case "dangerouslySetInnerHTML":
          o = a;
          break;
        default:
          As(t, i, l, a);
      }
      if (t.push(uu), o != null) {
        if (s != null) throw Error(Nt(60));
        if (typeof o != "object" || !("__html" in o)) throw Error(Nt(61));
        n = o.__html, n != null && (typeof n == "string" && 0 < n.length && n[0] === `
` ? t.push(qO, Pt(n)) : t.push(Pt("" + n)));
      }
      return typeof s == "string" && s[0] === `
` && t.push(qO), s;
    case "area":
    case "base":
    case "br":
    case "col":
    case "embed":
    case "hr":
    case "img":
    case "keygen":
    case "link":
    case "meta":
    case "param":
    case "source":
    case "track":
    case "wbr":
      t.push(ha(e));
      for (var m in n) if (ms.call(n, m) && (s = n[m], s != null)) switch (m) {
        case "children":
        case "dangerouslySetInnerHTML":
          throw Error(Nt(399, e));
        default:
          As(t, i, m, s);
      }
      return t.push(mL), null;
    case "annotation-xml":
    case "color-profile":
    case "font-face":
    case "font-face-src":
    case "font-face-uri":
    case "font-face-format":
    case "font-face-name":
    case "missing-glyph":
      return ZO(t, n, e, i);
    case "html":
      return r.insertionMode === 0 && t.push(fDe), ZO(t, n, e, i);
    default:
      if (e.indexOf("-") === -1 && typeof n.is != "string") return ZO(t, n, e, i);
      t.push(ha(e)), o = s = null;
      for (u in n) if (ms.call(n, u) && (a = n[u], a != null)) switch (u) {
        case "children":
          s = a;
          break;
        case "dangerouslySetInnerHTML":
          o = a;
          break;
        case "style":
          _V(t, i, a);
          break;
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
          break;
        default:
          xV(u) && typeof a != "function" && typeof a != "symbol" && t.push(lu, Pt(u), qd, Pt(fr(a)), Qc);
      }
      return t.push(uu), Ny(t, o, s), s;
  }
}
var hDe = Ae("</"), pDe = Ae(">"), mDe = Ae('<template id="'), gDe = Ae('"></template>'), vDe = Ae("<!--$-->"), bDe = Ae('<!--$?--><template id="'), yDe = Ae('"></template>'), wDe = Ae("<!--$!-->"), kDe = Ae("<!--/$-->"), xDe = Ae("<template"), _De = Ae('"'), ODe = Ae(' data-dgst="');
Ae(' data-msg="');
Ae(' data-stck="');
var SDe = Ae("></template>");
function vL(t, e, n) {
  if (Ve(t, bDe), n === null) throw Error(Nt(395));
  return Ve(t, n), Cn(t, yDe);
}
var CDe = Ae('<div hidden id="'), EDe = Ae('">'), TDe = Ae("</div>"), $De = Ae('<svg aria-hidden="true" style="display:none" id="'), MDe = Ae('">'), NDe = Ae("</svg>"), ADe = Ae('<math aria-hidden="true" style="display:none" id="'), DDe = Ae('">'), PDe = Ae("</math>"), IDe = Ae('<table hidden id="'), LDe = Ae('">'), RDe = Ae("</table>"), jDe = Ae('<table hidden><tbody id="'), FDe = Ae('">'), BDe = Ae("</tbody></table>"), zDe = Ae('<table hidden><tr id="'), WDe = Ae('">'), HDe = Ae("</tr></table>"), QDe = Ae('<table hidden><colgroup id="'), UDe = Ae('">'), ZDe = Ae("</colgroup></table>");
function qDe(t, e, n, i) {
  switch (n.insertionMode) {
    case 0:
    case 1:
      return Ve(t, CDe), Ve(t, e.segmentPrefix), Ve(t, Pt(i.toString(16))), Cn(t, EDe);
    case 2:
      return Ve(t, $De), Ve(t, e.segmentPrefix), Ve(t, Pt(i.toString(16))), Cn(t, MDe);
    case 3:
      return Ve(t, ADe), Ve(t, e.segmentPrefix), Ve(t, Pt(i.toString(16))), Cn(t, DDe);
    case 4:
      return Ve(t, IDe), Ve(t, e.segmentPrefix), Ve(t, Pt(i.toString(16))), Cn(t, LDe);
    case 5:
      return Ve(t, jDe), Ve(t, e.segmentPrefix), Ve(t, Pt(i.toString(16))), Cn(t, FDe);
    case 6:
      return Ve(t, zDe), Ve(t, e.segmentPrefix), Ve(t, Pt(i.toString(16))), Cn(t, WDe);
    case 7:
      return Ve(
        t,
        QDe
      ), Ve(t, e.segmentPrefix), Ve(t, Pt(i.toString(16))), Cn(t, UDe);
    default:
      throw Error(Nt(397));
  }
}
function YDe(t, e) {
  switch (e.insertionMode) {
    case 0:
    case 1:
      return Cn(t, TDe);
    case 2:
      return Cn(t, NDe);
    case 3:
      return Cn(t, PDe);
    case 4:
      return Cn(t, RDe);
    case 5:
      return Cn(t, BDe);
    case 6:
      return Cn(t, HDe);
    case 7:
      return Cn(t, ZDe);
    default:
      throw Error(Nt(397));
  }
}
var VDe = Ae('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'), XDe = Ae('$RS("'), GDe = Ae('","'), KDe = Ae('")<\/script>'), JDe = Ae('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'), ePe = Ae('$RC("'), tPe = Ae('","'), nPe = Ae('")<\/script>'), iPe = Ae('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'), rPe = Ae('$RX("'), sPe = Ae('"'), oPe = Ae(")<\/script>"), YO = Ae(","), aPe = /[<\u2028\u2029]/g;
function VO(t) {
  return JSON.stringify(t).replace(aPe, function(e) {
    switch (e) {
      case "<":
        return "\\u003c";
      case "\u2028":
        return "\\u2028";
      case "\u2029":
        return "\\u2029";
      default:
        throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
    }
  });
}
var Ig = Object.assign, lPe = Symbol.for("react.element"), OV = Symbol.for("react.portal"), SV = Symbol.for("react.fragment"), CV = Symbol.for("react.strict_mode"), EV = Symbol.for("react.profiler"), TV = Symbol.for("react.provider"), $V = Symbol.for("react.context"), MV = Symbol.for("react.forward_ref"), NV = Symbol.for("react.suspense"), AV = Symbol.for("react.suspense_list"), DV = Symbol.for("react.memo"), jT = Symbol.for("react.lazy"), uPe = Symbol.for("react.scope"), cPe = Symbol.for("react.debug_trace_mode"), fPe = Symbol.for("react.legacy_hidden"), dPe = Symbol.for("react.default_value"), bL = Symbol.iterator;
function h6(t) {
  if (t == null) return null;
  if (typeof t == "function") return t.displayName || t.name || null;
  if (typeof t == "string") return t;
  switch (t) {
    case SV:
      return "Fragment";
    case OV:
      return "Portal";
    case EV:
      return "Profiler";
    case CV:
      return "StrictMode";
    case NV:
      return "Suspense";
    case AV:
      return "SuspenseList";
  }
  if (typeof t == "object") switch (t.$$typeof) {
    case $V:
      return (t.displayName || "Context") + ".Consumer";
    case TV:
      return (t._context.displayName || "Context") + ".Provider";
    case MV:
      var e = t.render;
      return t = t.displayName, t || (t = e.displayName || e.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
    case DV:
      return e = t.displayName || null, e !== null ? e : h6(t.type) || "Memo";
    case jT:
      e = t._payload, t = t._init;
      try {
        return h6(t(e));
      } catch {
      }
  }
  return null;
}
var PV = {};
function yL(t, e) {
  if (t = t.contextTypes, !t) return PV;
  var n = {}, i;
  for (i in t) n[i] = e[i];
  return n;
}
var ef = null;
function J2(t, e) {
  if (t !== e) {
    t.context._currentValue = t.parentValue, t = t.parent;
    var n = e.parent;
    if (t === null) {
      if (n !== null) throw Error(Nt(401));
    } else {
      if (n === null) throw Error(Nt(401));
      J2(t, n);
    }
    e.context._currentValue = e.value;
  }
}
function IV(t) {
  t.context._currentValue = t.parentValue, t = t.parent, t !== null && IV(t);
}
function LV(t) {
  var e = t.parent;
  e !== null && LV(e), t.context._currentValue = t.value;
}
function RV(t, e) {
  if (t.context._currentValue = t.parentValue, t = t.parent, t === null) throw Error(Nt(402));
  t.depth === e.depth ? J2(t, e) : RV(t, e);
}
function jV(t, e) {
  var n = e.parent;
  if (n === null) throw Error(Nt(402));
  t.depth === n.depth ? J2(t, n) : jV(t, n), e.context._currentValue = e.value;
}
function uk(t) {
  var e = ef;
  e !== t && (e === null ? LV(t) : t === null ? IV(e) : e.depth === t.depth ? J2(e, t) : e.depth > t.depth ? RV(e, t) : jV(e, t), ef = t);
}
var wL = { isMounted: function() {
  return !1;
}, enqueueSetState: function(t, e) {
  t = t._reactInternals, t.queue !== null && t.queue.push(e);
}, enqueueReplaceState: function(t, e) {
  t = t._reactInternals, t.replace = !0, t.queue = [e];
}, enqueueForceUpdate: function() {
} };
function kL(t, e, n, i) {
  var r = t.state !== void 0 ? t.state : null;
  t.updater = wL, t.props = n, t.state = r;
  var s = { queue: [], replace: !1 };
  t._reactInternals = s;
  var o = e.contextType;
  if (t.context = typeof o == "object" && o !== null ? o._currentValue : i, o = e.getDerivedStateFromProps, typeof o == "function" && (o = o(n, r), r = o == null ? r : Ig({}, r, o), t.state = r), typeof e.getDerivedStateFromProps != "function" && typeof t.getSnapshotBeforeUpdate != "function" && (typeof t.UNSAFE_componentWillMount == "function" || typeof t.componentWillMount == "function")) if (e = t.state, typeof t.componentWillMount == "function" && t.componentWillMount(), typeof t.UNSAFE_componentWillMount == "function" && t.UNSAFE_componentWillMount(), e !== t.state && wL.enqueueReplaceState(t, t.state, null), s.queue !== null && 0 < s.queue.length) if (e = s.queue, o = s.replace, s.queue = null, s.replace = !1, o && e.length === 1) t.state = e[0];
  else {
    for (s = o ? e[0] : t.state, r = !0, o = o ? 1 : 0; o < e.length; o++) {
      var a = e[o];
      a = typeof a == "function" ? a.call(t, s, n, i) : a, a != null && (r ? (r = !1, s = Ig({}, s, a)) : Ig(s, a));
    }
    t.state = s;
  }
  else s.queue = null;
}
var hPe = { id: 1, overflow: "" };
function p6(t, e, n) {
  var i = t.id;
  t = t.overflow;
  var r = 32 - Ay(i) - 1;
  i &= ~(1 << r), n += 1;
  var s = 32 - Ay(e) + r;
  if (30 < s) {
    var o = r - r % 5;
    return s = (i & (1 << o) - 1).toString(32), i >>= o, r -= o, { id: 1 << 32 - Ay(e) + r | n << r | i, overflow: s + t };
  }
  return { id: 1 << s | n << r | i, overflow: t };
}
var Ay = Math.clz32 ? Math.clz32 : gPe, pPe = Math.log, mPe = Math.LN2;
function gPe(t) {
  return t >>>= 0, t === 0 ? 32 : 31 - (pPe(t) / mPe | 0) | 0;
}
function vPe(t, e) {
  return t === e && (t !== 0 || 1 / t === 1 / e) || t !== t && e !== e;
}
var bPe = typeof Object.is == "function" ? Object.is : vPe, Nl = null, FT = null, Dy = null, dn = null, hg = !1, ck = !1, A0 = 0, $u = null, ex = 0;
function Uc() {
  if (Nl === null) throw Error(Nt(321));
  return Nl;
}
function xL() {
  if (0 < ex) throw Error(Nt(312));
  return { memoizedState: null, queue: null, next: null };
}
function BT() {
  return dn === null ? Dy === null ? (hg = !1, Dy = dn = xL()) : (hg = !0, dn = Dy) : dn.next === null ? (hg = !1, dn = dn.next = xL()) : (hg = !0, dn = dn.next), dn;
}
function zT() {
  FT = Nl = null, ck = !1, Dy = null, ex = 0, dn = $u = null;
}
function FV(t, e) {
  return typeof e == "function" ? e(t) : e;
}
function _L(t, e, n) {
  if (Nl = Uc(), dn = BT(), hg) {
    var i = dn.queue;
    if (e = i.dispatch, $u !== null && (n = $u.get(i), n !== void 0)) {
      $u.delete(i), i = dn.memoizedState;
      do
        i = t(i, n.action), n = n.next;
      while (n !== null);
      return dn.memoizedState = i, [i, e];
    }
    return [dn.memoizedState, e];
  }
  return t = t === FV ? typeof e == "function" ? e() : e : n !== void 0 ? n(e) : e, dn.memoizedState = t, t = dn.queue = { last: null, dispatch: null }, t = t.dispatch = yPe.bind(null, Nl, t), [dn.memoizedState, t];
}
function OL(t, e) {
  if (Nl = Uc(), dn = BT(), e = e === void 0 ? null : e, dn !== null) {
    var n = dn.memoizedState;
    if (n !== null && e !== null) {
      var i = n[1];
      e: if (i === null) i = !1;
      else {
        for (var r = 0; r < i.length && r < e.length; r++) if (!bPe(e[r], i[r])) {
          i = !1;
          break e;
        }
        i = !0;
      }
      if (i) return n[0];
    }
  }
  return t = t(), dn.memoizedState = [t, e], t;
}
function yPe(t, e, n) {
  if (25 <= ex) throw Error(Nt(301));
  if (t === Nl) if (ck = !0, t = { action: n, next: null }, $u === null && ($u = /* @__PURE__ */ new Map()), n = $u.get(e), n === void 0) $u.set(e, t);
  else {
    for (e = n; e.next !== null; ) e = e.next;
    e.next = t;
  }
}
function wPe() {
  throw Error(Nt(394));
}
function jb() {
}
var SL = { readContext: function(t) {
  return t._currentValue;
}, useContext: function(t) {
  return Uc(), t._currentValue;
}, useMemo: OL, useReducer: _L, useRef: function(t) {
  Nl = Uc(), dn = BT();
  var e = dn.memoizedState;
  return e === null ? (t = { current: t }, dn.memoizedState = t) : e;
}, useState: function(t) {
  return _L(FV, t);
}, useInsertionEffect: jb, useLayoutEffect: function() {
}, useCallback: function(t, e) {
  return OL(function() {
    return t;
  }, e);
}, useImperativeHandle: jb, useEffect: jb, useDebugValue: jb, useDeferredValue: function(t) {
  return Uc(), t;
}, useTransition: function() {
  return Uc(), [!1, wPe];
}, useId: function() {
  var t = FT.treeContext, e = t.overflow;
  t = t.id, t = (t & ~(1 << 32 - Ay(t) - 1)).toString(32) + e;
  var n = Py;
  if (n === null) throw Error(Nt(404));
  return e = A0++, t = ":" + n.idPrefix + "R" + t, 0 < e && (t += "H" + e.toString(32)), t + ":";
}, useMutableSource: function(t, e) {
  return Uc(), e(t._source);
}, useSyncExternalStore: function(t, e, n) {
  if (n === void 0) throw Error(Nt(407));
  return n();
} }, Py = null, XO = yV.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
function kPe(t) {
  return console.error(t), null;
}
function pg() {
}
function xPe(t, e, n, i, r, s, o, a, l) {
  var u = [], f = /* @__PURE__ */ new Set();
  return e = { destination: null, responseState: e, progressiveChunkSize: i === void 0 ? 12800 : i, status: 0, fatalError: null, nextSegmentId: 0, allPendingTasks: 0, pendingRootTasks: 0, completedRootSegment: null, abortableTasks: f, pingedTasks: u, clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], onError: r === void 0 ? kPe : r, onAllReady: s === void 0 ? pg : s, onShellReady: o === void 0 ? pg : o, onShellError: a === void 0 ? pg : a, onFatalError: l === void 0 ? pg : l }, n = fk(e, 0, null, n, !1, !1), n.parentFlushed = !0, t = WT(e, t, null, n, f, PV, null, hPe), u.push(t), e;
}
function WT(t, e, n, i, r, s, o, a) {
  t.allPendingTasks++, n === null ? t.pendingRootTasks++ : n.pendingTasks++;
  var l = { node: e, ping: function() {
    var u = t.pingedTasks;
    u.push(l), u.length === 1 && WV(t);
  }, blockedBoundary: n, blockedSegment: i, abortSet: r, legacyContext: s, context: o, treeContext: a };
  return r.add(l), l;
}
function fk(t, e, n, i, r, s) {
  return { status: 0, id: -1, index: e, parentFlushed: !1, chunks: [], children: [], formatContext: i, boundary: n, lastPushedText: r, textEmbedded: s };
}
function D0(t, e) {
  if (t = t.onError(e), t != null && typeof t != "string") throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + typeof t + '" instead');
  return t;
}
function dk(t, e) {
  var n = t.onShellError;
  n(e), n = t.onFatalError, n(e), t.destination !== null ? (t.status = 2, kV(t.destination, e)) : (t.status = 1, t.fatalError = e);
}
function CL(t, e, n, i, r) {
  for (Nl = {}, FT = e, A0 = 0, t = n(i, r); ck; ) ck = !1, A0 = 0, ex += 1, dn = null, t = n(i, r);
  return zT(), t;
}
function EL(t, e, n, i) {
  var r = n.render(), s = i.childContextTypes;
  if (s != null) {
    var o = e.legacyContext;
    if (typeof n.getChildContext != "function") i = o;
    else {
      n = n.getChildContext();
      for (var a in n) if (!(a in s)) throw Error(Nt(108, h6(i) || "Unknown", a));
      i = Ig({}, o, n);
    }
    e.legacyContext = i, Rs(t, e, r), e.legacyContext = o;
  } else Rs(t, e, r);
}
function TL(t, e) {
  if (t && t.defaultProps) {
    e = Ig({}, e), t = t.defaultProps;
    for (var n in t) e[n] === void 0 && (e[n] = t[n]);
    return e;
  }
  return e;
}
function m6(t, e, n, i, r) {
  if (typeof n == "function") if (n.prototype && n.prototype.isReactComponent) {
    r = yL(n, e.legacyContext);
    var s = n.contextType;
    s = new n(i, typeof s == "object" && s !== null ? s._currentValue : r), kL(s, n, i, r), EL(t, e, s, n);
  } else {
    s = yL(n, e.legacyContext), r = CL(t, e, n, i, s);
    var o = A0 !== 0;
    if (typeof r == "object" && r !== null && typeof r.render == "function" && r.$$typeof === void 0) kL(r, n, i, s), EL(t, e, r, n);
    else if (o) {
      i = e.treeContext, e.treeContext = p6(i, 1, 0);
      try {
        Rs(t, e, r);
      } finally {
        e.treeContext = i;
      }
    } else Rs(t, e, r);
  }
  else if (typeof n == "string") {
    switch (r = e.blockedSegment, s = dDe(r.chunks, n, i, t.responseState, r.formatContext), r.lastPushedText = !1, o = r.formatContext, r.formatContext = oDe(o, n, i), g6(t, e, s), r.formatContext = o, n) {
      case "area":
      case "base":
      case "br":
      case "col":
      case "embed":
      case "hr":
      case "img":
      case "input":
      case "keygen":
      case "link":
      case "meta":
      case "param":
      case "source":
      case "track":
      case "wbr":
        break;
      default:
        r.chunks.push(hDe, Pt(n), pDe);
    }
    r.lastPushedText = !1;
  } else {
    switch (n) {
      case fPe:
      case cPe:
      case CV:
      case EV:
      case SV:
        Rs(t, e, i.children);
        return;
      case AV:
        Rs(t, e, i.children);
        return;
      case uPe:
        throw Error(Nt(343));
      case NV:
        e: {
          n = e.blockedBoundary, r = e.blockedSegment, s = i.fallback, i = i.children, o = /* @__PURE__ */ new Set();
          var a = { id: null, rootSegmentID: -1, parentFlushed: !1, pendingTasks: 0, forceClientRender: !1, completedSegments: [], byteSize: 0, fallbackAbortableTasks: o, errorDigest: null }, l = fk(t, r.chunks.length, a, r.formatContext, !1, !1);
          r.children.push(l), r.lastPushedText = !1;
          var u = fk(t, 0, null, r.formatContext, !1, !1);
          u.parentFlushed = !0, e.blockedBoundary = a, e.blockedSegment = u;
          try {
            if (g6(
              t,
              e,
              i
            ), u.lastPushedText && u.textEmbedded && u.chunks.push(RT), u.status = 1, hk(a, u), a.pendingTasks === 0) break e;
          } catch (f) {
            u.status = 4, a.forceClientRender = !0, a.errorDigest = D0(t, f);
          } finally {
            e.blockedBoundary = n, e.blockedSegment = r;
          }
          e = WT(t, s, n, l, o, e.legacyContext, e.context, e.treeContext), t.pingedTasks.push(e);
        }
        return;
    }
    if (typeof n == "object" && n !== null) switch (n.$$typeof) {
      case MV:
        if (i = CL(t, e, n.render, i, r), A0 !== 0) {
          n = e.treeContext, e.treeContext = p6(n, 1, 0);
          try {
            Rs(t, e, i);
          } finally {
            e.treeContext = n;
          }
        } else Rs(t, e, i);
        return;
      case DV:
        n = n.type, i = TL(n, i), m6(t, e, n, i, r);
        return;
      case TV:
        if (r = i.children, n = n._context, i = i.value, s = n._currentValue, n._currentValue = i, o = ef, ef = i = { parent: o, depth: o === null ? 0 : o.depth + 1, context: n, parentValue: s, value: i }, e.context = i, Rs(t, e, r), t = ef, t === null) throw Error(Nt(403));
        i = t.parentValue, t.context._currentValue = i === dPe ? t.context._defaultValue : i, t = ef = t.parent, e.context = t;
        return;
      case $V:
        i = i.children, i = i(n._currentValue), Rs(t, e, i);
        return;
      case jT:
        r = n._init, n = r(n._payload), i = TL(n, i), m6(t, e, n, i, void 0);
        return;
    }
    throw Error(Nt(
      130,
      n == null ? n : typeof n,
      ""
    ));
  }
}
function Rs(t, e, n) {
  if (e.node = n, typeof n == "object" && n !== null) {
    switch (n.$$typeof) {
      case lPe:
        m6(t, e, n.type, n.props, n.ref);
        return;
      case OV:
        throw Error(Nt(257));
      case jT:
        var i = n._init;
        n = i(n._payload), Rs(t, e, n);
        return;
    }
    if (d6(n)) {
      $L(t, e, n);
      return;
    }
    if (n === null || typeof n != "object" ? i = null : (i = bL && n[bL] || n["@@iterator"], i = typeof i == "function" ? i : null), i && (i = i.call(n))) {
      if (n = i.next(), !n.done) {
        var r = [];
        do
          r.push(n.value), n = i.next();
        while (!n.done);
        $L(t, e, r);
      }
      return;
    }
    throw t = Object.prototype.toString.call(n), Error(Nt(31, t === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : t));
  }
  typeof n == "string" ? (i = e.blockedSegment, i.lastPushedText = fL(e.blockedSegment.chunks, n, t.responseState, i.lastPushedText)) : typeof n == "number" && (i = e.blockedSegment, i.lastPushedText = fL(e.blockedSegment.chunks, "" + n, t.responseState, i.lastPushedText));
}
function $L(t, e, n) {
  for (var i = n.length, r = 0; r < i; r++) {
    var s = e.treeContext;
    e.treeContext = p6(s, i, r);
    try {
      g6(t, e, n[r]);
    } finally {
      e.treeContext = s;
    }
  }
}
function g6(t, e, n) {
  var i = e.blockedSegment.formatContext, r = e.legacyContext, s = e.context;
  try {
    return Rs(t, e, n);
  } catch (l) {
    if (zT(), typeof l == "object" && l !== null && typeof l.then == "function") {
      n = l;
      var o = e.blockedSegment, a = fk(t, o.chunks.length, null, o.formatContext, o.lastPushedText, !0);
      o.children.push(a), o.lastPushedText = !1, t = WT(t, e.node, e.blockedBoundary, a, e.abortSet, e.legacyContext, e.context, e.treeContext).ping, n.then(t, t), e.blockedSegment.formatContext = i, e.legacyContext = r, e.context = s, uk(s);
    } else throw e.blockedSegment.formatContext = i, e.legacyContext = r, e.context = s, uk(s), l;
  }
}
function _Pe(t) {
  var e = t.blockedBoundary;
  t = t.blockedSegment, t.status = 3, zV(this, e, t);
}
function BV(t, e, n) {
  var i = t.blockedBoundary;
  t.blockedSegment.status = 3, i === null ? (e.allPendingTasks--, e.status !== 2 && (e.status = 2, e.destination !== null && e.destination.close())) : (i.pendingTasks--, i.forceClientRender || (i.forceClientRender = !0, t = n === void 0 ? Error(Nt(432)) : n, i.errorDigest = e.onError(t), i.parentFlushed && e.clientRenderedBoundaries.push(i)), i.fallbackAbortableTasks.forEach(function(r) {
    return BV(r, e, n);
  }), i.fallbackAbortableTasks.clear(), e.allPendingTasks--, e.allPendingTasks === 0 && (i = e.onAllReady, i()));
}
function hk(t, e) {
  if (e.chunks.length === 0 && e.children.length === 1 && e.children[0].boundary === null) {
    var n = e.children[0];
    n.id = e.id, n.parentFlushed = !0, n.status === 1 && hk(t, n);
  } else t.completedSegments.push(e);
}
function zV(t, e, n) {
  if (e === null) {
    if (n.parentFlushed) {
      if (t.completedRootSegment !== null) throw Error(Nt(389));
      t.completedRootSegment = n;
    }
    t.pendingRootTasks--, t.pendingRootTasks === 0 && (t.onShellError = pg, e = t.onShellReady, e());
  } else e.pendingTasks--, e.forceClientRender || (e.pendingTasks === 0 ? (n.parentFlushed && n.status === 1 && hk(e, n), e.parentFlushed && t.completedBoundaries.push(e), e.fallbackAbortableTasks.forEach(_Pe, t), e.fallbackAbortableTasks.clear()) : n.parentFlushed && n.status === 1 && (hk(e, n), e.completedSegments.length === 1 && e.parentFlushed && t.partialBoundaries.push(e)));
  t.allPendingTasks--, t.allPendingTasks === 0 && (t = t.onAllReady, t());
}
function WV(t) {
  if (t.status !== 2) {
    var e = ef, n = XO.current;
    XO.current = SL;
    var i = Py;
    Py = t.responseState;
    try {
      var r = t.pingedTasks, s;
      for (s = 0; s < r.length; s++) {
        var o = r[s], a = t, l = o.blockedSegment;
        if (l.status === 0) {
          uk(o.context);
          try {
            Rs(a, o, o.node), l.lastPushedText && l.textEmbedded && l.chunks.push(RT), o.abortSet.delete(o), l.status = 1, zV(a, o.blockedBoundary, l);
          } catch (g) {
            if (zT(), typeof g == "object" && g !== null && typeof g.then == "function") {
              var u = o.ping;
              g.then(u, u);
            } else {
              o.abortSet.delete(o), l.status = 4;
              var f = o.blockedBoundary, d = g, h = D0(a, d);
              if (f === null ? dk(a, d) : (f.pendingTasks--, f.forceClientRender || (f.forceClientRender = !0, f.errorDigest = h, f.parentFlushed && a.clientRenderedBoundaries.push(f))), a.allPendingTasks--, a.allPendingTasks === 0) {
                var m = a.onAllReady;
                m();
              }
            }
          } finally {
          }
        }
      }
      r.splice(0, s), t.destination !== null && HT(t, t.destination);
    } catch (g) {
      D0(t, g), dk(t, g);
    } finally {
      Py = i, XO.current = n, n === SL && uk(e);
    }
  }
}
function Fb(t, e, n) {
  switch (n.parentFlushed = !0, n.status) {
    case 0:
      var i = n.id = t.nextSegmentId++;
      return n.lastPushedText = !1, n.textEmbedded = !1, t = t.responseState, Ve(e, mDe), Ve(e, t.placeholderPrefix), t = Pt(i.toString(16)), Ve(e, t), Cn(e, gDe);
    case 1:
      n.status = 2;
      var r = !0;
      i = n.chunks;
      var s = 0;
      n = n.children;
      for (var o = 0; o < n.length; o++) {
        for (r = n[o]; s < r.index; s++) Ve(e, i[s]);
        r = tx(t, e, r);
      }
      for (; s < i.length - 1; s++) Ve(e, i[s]);
      return s < i.length && (r = Cn(e, i[s])), r;
    default:
      throw Error(Nt(390));
  }
}
function tx(t, e, n) {
  var i = n.boundary;
  if (i === null) return Fb(t, e, n);
  if (i.parentFlushed = !0, i.forceClientRender) i = i.errorDigest, Cn(e, wDe), Ve(e, xDe), i && (Ve(e, ODe), Ve(e, Pt(fr(i))), Ve(e, _De)), Cn(e, SDe), Fb(t, e, n);
  else if (0 < i.pendingTasks) {
    i.rootSegmentID = t.nextSegmentId++, 0 < i.completedSegments.length && t.partialBoundaries.push(i);
    var r = t.responseState, s = r.nextSuspenseID++;
    r = Ae(r.boundaryPrefix + s.toString(16)), i = i.id = r, vL(e, t.responseState, i), Fb(t, e, n);
  } else if (i.byteSize > t.progressiveChunkSize) i.rootSegmentID = t.nextSegmentId++, t.completedBoundaries.push(i), vL(e, t.responseState, i.id), Fb(t, e, n);
  else {
    if (Cn(e, vDe), n = i.completedSegments, n.length !== 1) throw Error(Nt(391));
    tx(t, e, n[0]);
  }
  return Cn(e, kDe);
}
function ML(t, e, n) {
  return qDe(e, t.responseState, n.formatContext, n.id), tx(t, e, n), YDe(e, n.formatContext);
}
function NL(t, e, n) {
  for (var i = n.completedSegments, r = 0; r < i.length; r++) HV(t, e, n, i[r]);
  if (i.length = 0, t = t.responseState, i = n.id, n = n.rootSegmentID, Ve(e, t.startInlineScript), t.sentCompleteBoundaryFunction ? Ve(e, ePe) : (t.sentCompleteBoundaryFunction = !0, Ve(e, JDe)), i === null) throw Error(Nt(395));
  return n = Pt(n.toString(16)), Ve(e, i), Ve(e, tPe), Ve(e, t.segmentPrefix), Ve(e, n), Cn(e, nPe);
}
function HV(t, e, n, i) {
  if (i.status === 2) return !0;
  var r = i.id;
  if (r === -1) {
    if ((i.id = n.rootSegmentID) === -1) throw Error(Nt(392));
    return ML(t, e, i);
  }
  return ML(t, e, i), t = t.responseState, Ve(e, t.startInlineScript), t.sentCompleteSegmentFunction ? Ve(e, XDe) : (t.sentCompleteSegmentFunction = !0, Ve(e, VDe)), Ve(e, t.segmentPrefix), r = Pt(r.toString(16)), Ve(e, r), Ve(e, GDe), Ve(e, t.placeholderPrefix), Ve(e, r), Cn(e, KDe);
}
function HT(t, e) {
  Is = new Uint8Array(512), Ls = 0;
  try {
    var n = t.completedRootSegment;
    if (n !== null && t.pendingRootTasks === 0) {
      tx(t, e, n), t.completedRootSegment = null;
      var i = t.responseState.bootstrapChunks;
      for (n = 0; n < i.length - 1; n++) Ve(e, i[n]);
      n < i.length && Cn(e, i[n]);
    }
    var r = t.clientRenderedBoundaries, s;
    for (s = 0; s < r.length; s++) {
      var o = r[s];
      i = e;
      var a = t.responseState, l = o.id, u = o.errorDigest, f = o.errorMessage, d = o.errorComponentStack;
      if (Ve(i, a.startInlineScript), a.sentClientRenderFunction ? Ve(i, rPe) : (a.sentClientRenderFunction = !0, Ve(
        i,
        iPe
      )), l === null) throw Error(Nt(395));
      Ve(i, l), Ve(i, sPe), (u || f || d) && (Ve(i, YO), Ve(i, Pt(VO(u || "")))), (f || d) && (Ve(i, YO), Ve(i, Pt(VO(f || "")))), d && (Ve(i, YO), Ve(i, Pt(VO(d)))), Cn(i, oPe);
    }
    r.splice(0, s);
    var h = t.completedBoundaries;
    for (s = 0; s < h.length; s++) NL(t, e, h[s]);
    h.splice(0, s), aL(e), Is = new Uint8Array(512), Ls = 0;
    var m = t.partialBoundaries;
    for (s = 0; s < m.length; s++) {
      var g = m[s];
      e: {
        r = t, o = e;
        var w = g.completedSegments;
        for (a = 0; a < w.length; a++) if (!HV(
          r,
          o,
          g,
          w[a]
        )) {
          a++, w.splice(0, a);
          var x = !1;
          break e;
        }
        w.splice(0, a), x = !0;
      }
      if (!x) {
        t.destination = null, s++, m.splice(0, s);
        return;
      }
    }
    m.splice(0, s);
    var _ = t.completedBoundaries;
    for (s = 0; s < _.length; s++) NL(t, e, _[s]);
    _.splice(0, s);
  } finally {
    aL(e), t.allPendingTasks === 0 && t.pingedTasks.length === 0 && t.clientRenderedBoundaries.length === 0 && t.completedBoundaries.length === 0 && e.close();
  }
}
function AL(t, e) {
  try {
    var n = t.abortableTasks;
    n.forEach(function(i) {
      return BV(i, t, e);
    }), n.clear(), t.destination !== null && HT(t, t.destination);
  } catch (i) {
    D0(t, i), dk(t, i);
  }
}
PT.renderToReadableStream = function(t, e) {
  return new Promise(function(n, i) {
    var r, s, o = new Promise(function(f, d) {
      s = f, r = d;
    }), a = xPe(t, rDe(e ? e.identifierPrefix : void 0, e ? e.nonce : void 0, e ? e.bootstrapScriptContent : void 0, e ? e.bootstrapScripts : void 0, e ? e.bootstrapModules : void 0), sDe(e ? e.namespaceURI : void 0), e ? e.progressiveChunkSize : void 0, e ? e.onError : void 0, s, function() {
      var f = new ReadableStream({ type: "bytes", pull: function(d) {
        if (a.status === 1) a.status = 2, kV(d, a.fatalError);
        else if (a.status !== 2 && a.destination === null) {
          a.destination = d;
          try {
            HT(a, d);
          } catch (h) {
            D0(a, h), dk(a, h);
          }
        }
      }, cancel: function() {
        AL(a);
      } }, { highWaterMark: 0 });
      f.allReady = o, n(f);
    }, function(f) {
      o.catch(function() {
      }), i(f);
    }, r);
    if (e && e.signal) {
      var l = e.signal, u = function() {
        AL(a, l.reason), l.removeEventListener("abort", u);
      };
      l.addEventListener("abort", u);
    }
    WV(a);
  });
};
PT.version = "18.3.1";
var xp, QV;
xp = kp, QV = PT;
xp.version;
var UV = xp.renderToString;
xp.renderToStaticMarkup;
xp.renderToNodeStream;
xp.renderToStaticNodeStream;
QV.renderToReadableStream;
class OPe {
  // lifecycle ---------------------------------------------------------------
  constructor({ editorContainerElement: e }) {
    we(this, "EE", null);
    we(this, "editorContainerElement", null);
    we(this, "containers", null);
    we(this, "draggableInfo", null);
    we(this, "ghostInfo", null);
    we(this, "grabbedElement", null);
    we(this, "scrollHandler", null);
    we(this, "sourceContainer", null);
    we(this, "_currentOverContainer", null);
    we(this, "_currentOverContainerElem", null);
    we(this, "_currentOverDroppableElem", null);
    we(this, "_currentOverDroppablePosition", null);
    we(this, "_dropIndicator", null);
    we(this, "_elementsWithHoverRemoved", null);
    we(this, "_eventHandlers", null);
    we(this, "_ghostContainerElement", null);
    we(this, "_rafUpdateGhostElementPosition", null);
    we(this, "_transformedDroppables", null);
    we(this, "_waitForDragStartPromise", null);
    this.editorContainerElement = e || document.querySelector("[data-kg-editor] [data-lexical-editor]"), this.containers = [], this.scrollHandler = new mAe(), this._eventHandlers = [], this._transformedDroppables = [], this._rafUpdateGhostElementPosition = this._updateGhostElementPosition.bind(this), this._addGrabListeners(), this._appendGhostContainerElement(), this.EE = new dAe();
  }
  destroy() {
    this.cleanup(), this._removeGrabListeners(), this._removeDropIndicator(), this._removeGhostContainerElement();
  }
  // interface ---------------------------------------------------------------
  registerContainer(e, n) {
    const i = new hAe(e, n);
    return this.containers.push(i), {
      enableDrag: () => {
        i.enableDrag();
      },
      disableDrag: () => {
        i.disableDrag();
      },
      refresh: () => {
        i.refresh();
      },
      destroy: () => {
        i.disableDrag(), this.containers = this.containers.filter((r) => r !== i);
      }
    };
  }
  // remove all containers and event handlers, useful when leaving an editor route
  cleanup() {
    this.containers.forEach((e) => e.disableDrag()), this.containers = [], this._resetDrag();
  }
  // event handlers ----------------------------------------------------------
  // we use a custom "drag" detection rather than native drag events because it
  // allows better tracking across multiple containers and gives more flexibility
  // for handling touch events later if required
  _onMouseDown(e) {
    if (!this.isDragging && (e.button === void 0 || e.button === 0) && (this.grabbedElement = Zd(e.target, tAe), this.grabbedElement)) {
      const n = Zd(e.target, iAe);
      if (n && this.grabbedElement.contains(n))
        return;
      const i = Zd(this.grabbedElement, RI), r = this.containers.find((s) => s.element === i);
      this.sourceContainer = r, r != null && r.isDragEnabled && this._waitForDragStart(e).then(() => {
        window.getSelection().removeAllRanges(), this._initiateDrag(e);
      }).catch((s) => {
        if (!s.isCanceled)
          throw s;
      });
    }
  }
  _onMouseMove(e) {
    e.preventDefault(), this.draggableInfo && (this.draggableInfo.mousePosition.x = e.clientX, this.draggableInfo.mousePosition.y = e.clientY, this._handleDrag(e));
  }
  _onMouseUp() {
    if (this.draggableInfo) {
      let e = !1;
      this._currentOverContainer && (e = this._currentOverContainer.onDrop(
        this.draggableInfo,
        this._currentOverDroppableElem,
        this._currentOverDroppablePosition
      )), this.containers.forEach((n) => {
        n.onDropEnd(this.draggableInfo, e);
      });
    }
    this._resetDrag();
  }
  // cancel drag on escape
  _onKeyDown(e) {
    this.isDragging && e.key === "Escape" && this._resetDrag();
  }
  // private -----------------------------------------------------------------
  // called when we detect a mousedown event on a draggable element. Sets
  // up temporary event handlers for mousemove, mouseup, and drag. If
  // sufficient movement is detected before the mouse is released and we don't
  // detect a native drag event then the promise will resolve. Mouseup or drag
  // events will cancel the promise which will result in a rejection with {isCanceled: true}
  async _waitForDragStart(e) {
    this._waitForDragStartPromise && (this.EE.emit("drag-start-canceled"), this._waitForDragStartPromise = null);
    const i = (a) => {
      let { clientX: l, clientY: u } = a;
      (Math.abs(e.clientX - l) > 1 || Math.abs(e.clientY - u) > 1) && this.EE.emit("drag-start-conditions-met");
    }, r = () => {
      this.EE.emit("drag-start-canceled");
    }, s = () => {
      this.EE.emit("drag-start-canceled");
    }, o = () => (document.addEventListener("mousemove", i, { passive: !1 }), document.addEventListener("mouseup", r, { passive: !1 }), document.addEventListener("drag", s, { passive: !1 }), new Promise((a, l) => {
      const u = () => {
        this.EE.removeListener("drag-start-canceled", f), a();
      }, f = () => {
        this.EE.removeListener("drag-start-conditions-met", u), l({ isCanceled: !0 });
      };
      this.EE.once("drag-start-conditions-met", u), this.EE.once("drag-start-canceled", f);
    }));
    return this._waitForDragStartPromise = o().finally(() => {
      this._waitForDragStartPromise = null, document.removeEventListener("mousemove", i, { passive: !1 }), document.removeEventListener("mouseup", r, { passive: !1 }), document.removeEventListener("drag", s, { passive: !1 });
    }), this._waitForDragStartPromise;
  }
  // called once drag start conditions have been met, `startEvent` is the initial mousedown event
  _initiateDrag(e) {
    this.isDragging = !0, BI(document.body, "none");
    let n = this.sourceContainer.getDraggableInfo(this.grabbedElement);
    if (!n) {
      this._resetDrag();
      return;
    }
    this._appendDropIndicator(), n = Object.assign({}, n, {
      element: this.grabbedElement,
      mousePosition: {
        x: e.clientX,
        y: e.clientY
      }
    }), this.draggableInfo = n, this.containers.forEach((r) => {
      r.onDragStart(n);
    }), this.draggableInfo.element.style.opacity = 0.5;
    const i = this.sourceContainer.createGhostElement(this.draggableInfo);
    if (i && i instanceof HTMLElement) {
      this._ghostContainerElement.appendChild(i);
      const r = i.getBoundingClientRect(), s = {
        element: i,
        positionX: r.x,
        positionY: r.y
      };
      this.ghostInfo = s;
    } else {
      console.warn("container.createGhostElement did not return an element", this.draggableInfo, { ghostElement: i }), this._resetDrag();
      return;
    }
    this._addMoveListeners(), this._addReleaseListeners(), this._addKeyDownListeners(), requestAnimationFrame(this._rafUpdateGhostElementPosition), this.scrollHandler.dragStart(this.draggableInfo), document.querySelectorAll('[data-kg="editor"] [data-lexical-editor]').forEach((r) => {
      r.style.setProperty("cursor", "default", "important");
    }), this._removeHoverClasses(), this._handleDrag();
  }
  _removeHoverClasses() {
    this._restoreHoverClasses(), this._elementsWithHoverRemoved = /* @__PURE__ */ new Map(), document.querySelectorAll('[class*="hover:"]').forEach((n) => {
      const i = Array.from(n.classList.values()).filter((r) => r.startsWith("hover:"));
      this._elementsWithHoverRemoved.set(n, i), n.classList.remove(...i);
    });
  }
  _restoreHoverClasses() {
    this._elementsWithHoverRemoved && (this._elementsWithHoverRemoved.forEach((e, n) => {
      n.classList.add(...e);
    }), this._elementsWithHoverRemoved = /* @__PURE__ */ new Map());
  }
  // called when mouse moves whilst a drag is in progress
  _handleDrag(e) {
    this._ghostContainerElement.hidden = !0;
    const n = document.elementFromPoint(
      this.draggableInfo.mousePosition.x,
      this.draggableInfo.mousePosition.y
    );
    this.draggableInfo.target = n, this._ghostContainerElement.hidden = !1, this.scrollHandler.dragMove(this.draggableInfo);
    const i = Zd(n, RI);
    let r = Zd(n, zO);
    (!i || !i.contains(r)) && (r = null);
    const s = this._currentOverContainerElem && i !== this._currentOverContainerElem, o = this._currentOverDroppableElem && r !== this._currentOverDroppableElem, a = i && i !== this._currentOverContainer, l = r;
    if (s && (this._currentOverContainer.onDragLeaveContainer(this.draggableInfo), this._currentOverContainer = null, this._currentOverContainerElem = null, this._hideDropIndicator()), a) {
      const u = this.containers.find((f) => f.element === i);
      this._currentOverContainer || u.onDragEnterContainer(this.draggableInfo), this._currentOverContainer = u, this._currentOverContainerElem = i;
    }
    if (o && (this._currentOverContainer && this._currentOverContainer.onDragLeaveDroppable(r), this._currentOverDroppableElem = null), l) {
      const u = r.getBoundingClientRect(), f = this.draggableInfo.mousePosition.y < u.y + u.height / 2, d = this.draggableInfo.mousePosition.x < u.x + u.width / 2, h = `${f ? "top" : "bottom"}-${d ? "left" : "right"}`;
      if (this._currentOverDroppableElem || this._currentOverContainer.onDragEnterDroppable(r, h), r !== this._currentOverDroppableElem || h !== this._currentOverDroppablePosition) {
        this._currentOverDroppableElem = r, this._currentOverDroppablePosition = h, this._currentOverContainer.onDragOverDroppable(r, h);
        const m = this._currentOverContainer.getIndicatorPosition(this.draggableInfo, r, h);
        m ? (this.draggableInfo.insertIndex = m.insertIndex, this._showDropIndicator(m)) : this._hideDropIndicator();
      }
    }
  }
  _updateGhostElementPosition() {
    this.isDragging && requestAnimationFrame(this._rafUpdateGhostElementPosition);
    const { ghostInfo: e, draggableInfo: n } = this;
    if (n && e) {
      const i = e.positionX * -1 + n.mousePosition.x, r = e.positionY * -1 + n.mousePosition.y;
      e.element.style.transform = `translate3d(${i}px, ${r}px, 0)`;
    }
  }
  // direction = horizontal/vertical
  // horizontal = beforeElems shift left, afterElems shift right
  // vertical = afterElems shift down
  // position = above/below/left/right, used to place the indicator
  _showDropIndicator({ direction: e, position: n, beforeElems: i, afterElems: r }) {
    const s = this._dropIndicator;
    if (this._hideDropIndicator({ clearInsertIndex: !1 }), e === "horizontal") {
      i.forEach((S) => {
        S.style.transform = "translate3d(-30px, 0, 0)", S.style.transitionDuration = "250ms", this._transformedDroppables.push(S);
      }), r.forEach((S) => {
        S.style.transform = "translate3d(30px, 0, 0)", S.style.transitionDuration = "250ms", this._transformedDroppables.push(S);
      });
      let o = 0;
      const a = this._currentOverDroppableElem, l = getComputedStyle(a), u = a.offsetParent.getBoundingClientRect(), f = u.left + a.offsetLeft, d = u.top + a.offsetTop;
      n === "left" ? o -= parseInt(l.marginLeft) : o += parseInt(a.offsetWidth) + parseInt(l.marginRight), o -= 2;
      const h = s.parentNode.getBoundingClientRect(), m = parseInt(s.style.left), g = parseInt(s.style.top), w = f + o - h.left, x = d - h.top, _ = a.offsetHeight;
      x >= g - 1 && x <= g + 1 && w >= m - 1 && w <= m + 1 ? s.style.opacity = 1 : (s.style.opacity = 0, this._dropIndicatorTimeout = setTimeout(function() {
        s.style.width = "4px", s.style.height = `${_}px`, s.style.left = `${w}px`, s.style.top = `${x}px`, s.style.opacity = 1;
      }, 150));
    }
    if (e === "vertical") {
      let o = 60;
      const a = this._currentOverDroppableElem;
      let l, u;
      n === "top" ? (l = aAe(a, zO), u = a) : n === "bottom" && (l = a, u = oAe(a, zO));
      const f = (l || u).parentElement.children[0], d = getComputedStyle(f), h = parseInt(d.marginTop), m = a.offsetWidth, g = a.offsetLeft;
      let w;
      if (l && u) {
        const S = getComputedStyle(l), C = getComputedStyle(u), E = u.offsetTop, M = parseInt(S.marginBottom), $ = parseInt(C.marginTop), P = M + $;
        w = E - P / 2 + h;
      } else l ? w = l.offsetTop + l.offsetHeight + h : u && (w = -26, o = 30);
      w -= 2, w += 30;
      let x = parseInt(s.style.left), _ = parseInt(s.style.top);
      w >= _ - 1 && w <= _ + 1 && g >= x - 1 && g <= x + 1 ? s.style.opacity = 1 : (s.style.opacity = 0, this._dropIndicatorTimeout = setTimeout(() => {
        s.style.height = "4px", s.style.width = `${m}px`, s.style.left = `${g}px`, s.style.top = `${w}px`, s.style.opacity = 1;
      }, 150)), i.forEach((S) => {
        S.style.transform = "translate3d(0, 0, 0)", S.style.transitionDuration = "250ms", this._transformedDroppables.push(S);
      }), r.forEach((S) => {
        S.style.transform = `translate3d(0, ${o}px, 0)`, S.style.transitionDuration = "250ms", this._transformedDroppables.push(S);
      });
    }
  }
  _hideDropIndicator({ clearInsertIndex: e = !0 } = {}) {
    clearTimeout(this._dropIndicatorTimeout), e && this.draggableInfo && delete this.draggableInfo.insertIndex, this._transformedDroppables.forEach((n) => {
      n.style.transform = "";
    }), this.transformedDroppables = [], this._dropIndicator && (this._dropIndicator.style.opacity = 0);
  }
  _resetDrag() {
    this.EE.emit("drag-start-canceled"), this._hideDropIndicator(), this._removeMoveListeners(), this._removeReleaseListeners(), this.scrollHandler.dragStop(), this.grabbedElement && (this.grabbedElement.style.opacity = ""), this.isDragging = !1, this.grabbedElement = null, this.sourceContainer = null, this.ghostInfo && (this.ghostInfo.element.remove(), this.ghostInfo = null), this.containers.forEach((e) => {
      e.onDragEnd();
    }), this._restoreHoverClasses(), BI(document.body, ""), document.querySelectorAll('[data-kg="editor"] [data-lexical-editor]').forEach((e) => {
      e.style.cursor = "";
    });
  }
  _appendDropIndicator() {
    let e = document.querySelector(`#${jI}`);
    if (!e) {
      const n = () => {
        const r = {
          position: "absolute",
          opacity: 0,
          width: "4px",
          height: 0,
          zIndex: s6,
          pointerEvents: "none"
        };
        return /* @__PURE__ */ y.jsx("div", { className: "rounded-full bg-green", id: jI, style: r });
      }, i = document.createElement("div");
      i.innerHTML = UV(/* @__PURE__ */ y.jsx(n, {})), e = i.firstChild, this.editorContainerElement.appendChild(e);
    }
    this._dropIndicator = e;
  }
  _removeDropIndicator() {
    var e;
    (e = this._dropIndicator) == null || e.remove();
  }
  _appendGhostContainerElement() {
    if (!this._ghostContainerElement) {
      const e = document.createElement("div");
      e.id = rAe, e.style.position = "fixed", e.style.width = "100%", e.style.zIndex = s6 + 1, this.editorContainerElement.appendChild(e), this._ghostContainerElement = e;
    }
  }
  _removeGhostContainerElement() {
    var e;
    (e = this._ghostContainerElement) == null || e.remove();
  }
  _addGrabListeners() {
    this._addEventListener("mousedown", this._onMouseDown, { passive: !1 });
  }
  _removeGrabListeners() {
    this._removeEventListener("mousedown");
  }
  _addMoveListeners() {
    this._addEventListener("mousemove", this._onMouseMove, { passive: !1 });
  }
  _removeMoveListeners() {
    this._removeEventListener("mousemove");
  }
  _addReleaseListeners() {
    this._addEventListener("mouseup", this._onMouseUp, { passive: !1 });
  }
  _removeReleaseListeners() {
    this._removeEventListener("mouseup");
  }
  _addKeyDownListeners() {
    this._addEventListener("keydown", this._onKeyDown);
  }
  _removeKeyDownListeners() {
    this._removeEventListener("keydown");
  }
  _addEventListener(e, n, i) {
    if (!this._eventHandlers[e]) {
      let r = n.bind(this);
      this._eventHandlers[e] = { handler: r, options: i }, document.addEventListener(e, r, i);
    }
  }
  _removeEventListener(e) {
    let n = this._eventHandlers[e];
    n && (document.removeEventListener(e, n.handler, n.options), delete this._eventHandlers[e]);
  }
}
function DL(t) {
  t.preventDefault();
}
function SPe(t, e) {
  const n = j.useContext(dt), { setIsDragging: i, isEditingCard: r } = Rf(), s = j.useRef(null), o = j.useRef(!1), a = j.useRef(() => {
    s.current.refresh(), i(!0);
  }), l = j.useRef(() => {
    i(!1);
  }), u = j.useRef((g) => {
    let w;
    return t.update(() => {
      var _;
      const x = N.$getNearestNodeFromDOMNode(g);
      x && (w = {
        type: "card",
        nodeKey: x.getKey(),
        cardName: x.getType(),
        dataset: (_ = x.getDataset) == null ? void 0 : _.call(x),
        Icon: x.getIcon()
      });
    }), w || !1;
  }), f = j.useRef((g) => {
    const { cardName: w, Icon: x } = g;
    if (!w || w === "image")
      return;
    const _ = {
      top: "0",
      left: "-100%",
      zIndex: 10001,
      willChange: "transform"
    }, S = () => /* @__PURE__ */ y.jsx("div", { className: "absolute flex size-16 flex-col items-center justify-center rounded bg-white shadow-sm", style: _, children: /* @__PURE__ */ y.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ y.jsx(x, { className: "size-8" }) }) }), C = document.createElement("div");
    return C.innerHTML = UV(/* @__PURE__ */ y.jsx(S, {})), C.firstChild;
  }), d = j.useRef((g, w, x) => {
    const _ = Array.from(t.getRootElement().querySelectorAll(":scope > *")), S = _.indexOf(w), C = _.indexOf(g.element);
    if (g.type !== "card" && g.type !== "image")
      return !1;
    if (FI(C, S, x)) {
      let E = S;
      x.match(/bottom/) && (E += 1);
      let M, $;
      return x.match(/bottom/) ? (M = _.slice(0, S + 1), $ = _.slice(S + 1)) : (M = _.slice(0, S), $ = _.slice(S)), {
        direction: "vertical",
        position: x.match(/top/) ? "top" : "bottom",
        beforeElems: M,
        afterElems: $,
        insertIndex: E
      };
    }
    return !1;
  }), h = j.useRef((g) => {
    if (g.type !== "card" && g.type !== "image")
      return !1;
    const w = Array.from(t.getRootElement().querySelectorAll(":scope > *")), x = w.indexOf(g.element);
    if (FI(x, g.insertIndex)) {
      let _;
      return t.update(() => {
        if (g.type === "card") {
          const S = N.$getNodeByKey(g.nodeKey);
          g.insertIndex >= w.length ? N.$getNearestNodeFromDOMNode(w[w.length - 1]).insertAfter(S) : N.$getNearestNodeFromDOMNode(w[g.insertIndex]).insertBefore(S), N.$setSelection(null), o.current = !0, _ = !0;
          return;
        }
        if (g.type === "image") {
          const S = N.$getNearestNodeFromDOMNode(w[g.insertIndex]), C = yh(g.dataset);
          S.insertBefore(C);
          const E = N.$createNodeSelection();
          E.add(C.getKey()), N.$setSelection(E), _ = !0;
          return;
        }
      }), _;
    }
  }), m = j.useRef((g, w) => {
    if (o.current || !w || g.type !== "card") {
      o.current = !1;
      return;
    }
    t.update(() => {
      N.$getNodeByKey(g.nodeKey).remove(!1);
    });
  });
  j.useEffect(() => (n.dragDropHandler = new OPe({
    editorContainerElement: n.editorContainerRef.current
  }), s.current = n.dragDropHandler.registerContainer(t.getRootElement(), {
    draggableSelector: ":scope > div",
    // cards
    droppableSelector: ":scope > *",
    // all block elements
    onDragStart: a.current,
    onDragEnd: l.current,
    getDraggableInfo: u.current,
    createGhostElement: f.current,
    getIndicatorPosition: d.current,
    onDrop: h.current,
    onDropEnd: m.current
  }), () => {
    var g;
    s.current = null, (g = n.dragDropHandler) == null || g.destroy(), delete n.dragDropHandler;
  }), [t, n]), j.useEffect(() => t.registerUpdateListener(() => {
    var g;
    (g = s.current) == null || g.refresh();
  }), [t]), j.useEffect(() => t.registerRootListener((g, w) => {
    g == null || g.addEventListener("dragstart", DL), w == null || w.removeEventListener("dragstart", DL);
  }), [t]), j.useEffect(() => {
    var g, w;
    r ? (g = s.current) == null || g.disableDrag() : (w = s.current) == null || w.enableDrag();
  }, [r]);
}
function CPe() {
  const [t] = Oe.useLexicalComposerContext();
  return SPe(t, t._editable);
}
function ZV({ selection: t, editor: e }) {
  if (!t || !N.$isRangeSelection(t))
    return null;
  const n = t.anchor, i = t.focus, r = Ri.createDOMRange(e, n.getNode(), t.anchor.offset, i.getNode(), t.focus.offset);
  if (!r)
    return null;
  const s = Ri.createRectsFromDOMRange(e, r), o = s[0];
  if (s.length > 1)
    for (let a = 1; a < s.length; a++) {
      const l = s[a];
      l.top === o.top && (o.width += l.width);
    }
  return o;
}
const EPe = 10;
function TPe(t, e, n, i = {}) {
  i = Object.assign({
    verticalGap: EPe,
    controlOpacity: !1
  }, i);
  const r = n.parentElement;
  if (!t || !r || !e)
    return;
  const s = e.getBoundingClientRect(), o = r.getBoundingClientRect();
  let a = t.top - s.height - i.verticalGap, l = t.left + t.width / 2 - s.width / 2;
  l < o.left && (l = o.left), l + s.width > o.right && (l = o.right - s.width), i.controlOpacity && (e.style.opacity = "1"), e.style.top = `${a}px`, e.style.left = `${l}px`;
}
function qV({
  anchorElem: t,
  children: e,
  editor: n,
  isVisible: i,
  toolbarRef: r,
  targetElem: s,
  onReposition: o,
  shouldReposition: a = !0,
  controlOpacity: l
}) {
  const u = j.useCallback((f = !0) => {
    n.update(() => {
      const d = r == null ? void 0 : r.current;
      if (!d || d.style.opacity === "1" && !f)
        return;
      let h;
      if (s && (h = s.getClientRects()[0]), !h) {
        const m = N.$getSelection();
        h = ZV({ editor: n, selection: m });
      }
      h && TPe(h, d, t, { controlOpacity: l });
    });
  }, [t, l, n, s, r]);
  return j.useEffect(() => {
    i && (u(a), a && (o == null || o()));
  }, [i, o, a, u]), j.useEffect(() => {
    const f = Bh(t);
    return window.addEventListener("resize", u), f && f.addEventListener("scroll", u), () => {
      window.removeEventListener("resize", u), f && f.removeEventListener("scroll", u);
    };
  }, [t, u]), i ? /* @__PURE__ */ y.jsx(Ff, { children: /* @__PURE__ */ y.jsx("div", { ref: r, className: "not-kg-prose fixed z-[10000]", style: { opacity: 0, transition: "opacity 100ms ease" }, "data-kg-floating-toolbar": !0, children: e }) }) : null;
}
function QT() {
  return navigator.userAgent.indexOf("Mac") !== -1;
}
function GO() {
  return QT() ? "⌘" : "Ctrl";
}
function KO() {
  return QT() ? "⌃" : "Ctrl";
}
function PL() {
  return QT() ? "⌥" : "Alt";
}
function tc(t) {
  const e = t.anchor, n = t.focus, i = t.anchor.getNode(), r = t.focus.getNode();
  return i === r ? i : t.isBackward() ? Ri.$isAtNodeEnd(n) ? i : r : Ri.$isAtNodeEnd(e) ? r : i;
}
const $Pe = {
  bullet: "Bulleted List",
  check: "Check List",
  code: "Code Block",
  h1: "Heading 1",
  h2: "Heading 2",
  h3: "Heading 3",
  h4: "Heading 4",
  h5: "Heading 5",
  h6: "Heading 6",
  number: "Numbered List",
  paragraph: "Normal",
  quote: "Quote",
  "extended-quote": "Quote",
  aside: "Aside"
};
function MPe(t = "") {
  var e, n;
  return (e = t.endsWith) != null && e.call(t, "quote") ? "quoteOne" : (n = t.endsWith) != null && n.call(t, "aside") ? "quoteTwo" : "quote";
}
function NPe({
  editor: t,
  isSnippetsEnabled: e,
  isLinkSelected: n,
  onLinkClick: i,
  onSnippetClick: r,
  hiddenFormats: s = []
}) {
  var M, $;
  const [o, a] = j.useState(!1), [l, u] = j.useState(!1), [f, d] = j.useState("paragraph"), { cardConfig: { createSnippet: h } } = j.useContext(dt);
  let m = !1;
  t.hasNodes([rn.HeadingNode]) || (m = !0);
  let g = !1;
  t.hasNodes([rn.QuoteNode]) || (g = !0);
  let w = !e || !h;
  t._parentEditor && (w = !0);
  let x = !1;
  s.includes("bold") && (x = !0);
  const _ = j.useCallback(() => {
    t.getEditorState().read(() => {
      if (t.isComposing())
        return;
      const P = N.$getSelection();
      if (!N.$isRangeSelection(P))
        return;
      a(P.hasFormat("bold")), u(P.hasFormat("italic"));
      const W = tc(P), z = W.getKey() === "root" ? W : W.getTopLevelElementOrThrow(), Z = z.getKey();
      if (t.getElementByKey(Z) !== null)
        if (ni.$isListNode(z)) {
          const Q = lt.$getNearestNodeOfType(W, ni.ListNode), V = Q ? Q.getListType() : z.getListType();
          d(V);
        } else {
          const Q = rn.$isHeadingNode(z) ? z.getTag() : z.getType();
          Q in $Pe && d(Q);
        }
    });
  }, [t]);
  j.useEffect(() => (_(), t.registerUpdateListener(() => {
    _();
  })), [t, _]);
  const S = () => {
    f !== "paragraph" && t.update(() => {
      const P = N.$getSelection();
      N.$isRangeSelection(P) && Ri.$setBlocksType(P, () => N.$createParagraphNode());
    });
  }, C = (P) => {
    f !== P && t.update(() => {
      const W = N.$getSelection();
      N.$isRangeSelection(W) && Ri.$setBlocksType(W, () => rn.$createHeadingNode(P));
    });
  }, E = () => {
    t.update(() => {
      var W;
      const P = N.$getSelection();
      N.$isRangeSelection(P) && (f != null && f.endsWith("quote") ? Ri.$setBlocksType(P, () => FW()) : (W = f == null ? void 0 : f.endsWith) != null && W.call(f, "aside") ? Ri.$setBlocksType(P, () => N.$createParagraphNode()) : Ri.$setBlocksType(P, () => rn.$createQuoteNode()));
    });
  };
  return /* @__PURE__ */ y.jsxs(li, { children: [
    /* @__PURE__ */ y.jsx(
      at,
      {
        "data-kg-toolbar-button": "bold",
        hide: x,
        icon: "bold",
        isActive: o,
        label: "Bold",
        shortcutKeys: [GO(), "B"],
        onClick: () => t.dispatchCommand(N.FORMAT_TEXT_COMMAND, "bold")
      }
    ),
    /* @__PURE__ */ y.jsx(
      at,
      {
        "data-kg-toolbar-button": "italic",
        icon: "italic",
        isActive: l,
        label: "Emphasize",
        shortcutKeys: [GO(), "I"],
        onClick: () => t.dispatchCommand(N.FORMAT_TEXT_COMMAND, "italic")
      }
    ),
    /* @__PURE__ */ y.jsx(
      at,
      {
        "data-kg-toolbar-button": "h2",
        hide: m,
        icon: "headingTwo",
        isActive: f === "h2",
        label: "Heading 2",
        shortcutKeys: [KO(), PL(), "2"],
        onClick: () => f === "h2" ? S() : C("h2")
      }
    ),
    /* @__PURE__ */ y.jsx(
      at,
      {
        "data-kg-toolbar-button": "h3",
        hide: m,
        icon: "headingThree",
        isActive: f === "h3",
        label: "Heading 3",
        shortcutKeys: [KO(), PL(), "3"],
        onClick: () => f === "h3" ? S() : C("h3")
      }
    ),
    /* @__PURE__ */ y.jsx(Zn, { hide: g }),
    /* @__PURE__ */ y.jsx(
      at,
      {
        "data-kg-toolbar-button": "quote",
        hide: g,
        icon: MPe(f),
        isActive: ((M = f.endsWith) == null ? void 0 : M.call(f, "quote")) || (($ = f.endsWith) == null ? void 0 : $.call(f, "aside")),
        label: "Quote",
        shortcutKeys: [KO(), "Q"],
        onClick: E
      }
    ),
    /* @__PURE__ */ y.jsx(
      at,
      {
        "data-kg-toolbar-button": "link",
        icon: "link",
        isActive: !!n,
        label: "Link",
        shortcutKeys: [GO(), "K"],
        onClick: i
      }
    ),
    /* @__PURE__ */ y.jsx(Zn, { hide: w }),
    /* @__PURE__ */ y.jsx(
      at,
      {
        "data-kg-toolbar-button": "snippet",
        hide: w,
        icon: "snippet",
        isActive: !1,
        label: "Save as snippet",
        onClick: r
      }
    )
  ] });
}
function APe({ href: t, onClose: e, ...n }) {
  const [i] = Oe.useLexicalComposerContext(), r = (s) => {
    i.update(() => {
      i.dispatchCommand(ki.TOGGLE_LINK_COMMAND, s || null);
      const a = N.$getSelection().focus.getNode(), l = N.$createRangeSelection();
      l.setTextNodeRange(a, a.getTextContentSize(), a, a.getTextContentSize()), N.$setSelection(l), e();
    });
  };
  return /* @__PURE__ */ y.jsx(
    _T,
    {
      cancel: e,
      href: t,
      update: r,
      ...n
    }
  );
}
function YV({ href: t, update: e, cancel: n }) {
  const { cardConfig: { searchLinks: i } } = j.useContext(dt), [r, s] = j.useState(t), { isSearching: o, listOptions: a } = lT(r, i), l = j.useRef(null), u = "link-input";
  j.useEffect(() => {
    pi("Link dropdown: Opened", { context: "text" });
  }, []), j.useEffect(() => {
    s(t);
  }, [t]), j.useEffect(() => {
    const g = (x) => {
      l.current && !l.current.contains(x.target) && n();
    }, w = (x) => {
      x.key === "Escape" && n();
    };
    return window.addEventListener("mousedown", g), window.addEventListener("keydown", w), () => {
      window.removeEventListener("mousedown", g), window.removeEventListener("keydown", w);
    };
  }, [n]);
  const f = (g) => {
    e(g.value, g.type);
  }, d = (g, w, x, _) => /* @__PURE__ */ y.jsx(
    aT,
    {
      dataTestId: u,
      highlightString: r,
      item: g,
      scrollIntoView: _,
      selected: w,
      onClick: f,
      onMouseOver: x
    },
    g.value
  ), h = (g, { showSpinner: w } = {}) => /* @__PURE__ */ y.jsx(oT, { dataTestId: u, group: g, showSpinner: w }), m = o || a && !!a.length;
  return /* @__PURE__ */ y.jsxs("div", { ref: l, className: "relative m-0 flex w-full flex-col rounded-lg bg-white p-1 px-2 font-sans text-sm font-medium shadow-md dark:bg-grey-950", children: [
    /* @__PURE__ */ y.jsx(
      iT,
      {
        autoFocus: !0,
        className: "my-1 h-auto w-full rounded-md border border-transparent bg-grey-100 px-4 py-2 text-left text-sm font-medium leading-snug text-black placeholder:text-sm placeholder:font-medium placeholder:leading-snug placeholder:text-grey-500 focus:border-green focus:bg-white focus:shadow-[0_0_0_2px_rgba(48,207,67,.25)] dark:border-grey-800/80 dark:bg-grey-900 dark:text-white dark:selection:bg-grey-600/40 dark:selection:text-grey-100 dark:focus:border-green dark:focus:bg-grey-900",
        dataTestId: u,
        name: "link-input",
        placeholder: "Search or enter URL to link",
        value: r,
        "data-kg-link-input": !0,
        onChange: (g) => {
          s(g.target.value);
        },
        onKeyDown: (g) => {
          if (g.key === "Enter") {
            g.preventDefault(), e(r);
            return;
          }
        }
      }
    ),
    m && /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsxs("ul", { className: "max-h-[30vh] w-full overflow-y-auto bg-white py-1 dark:bg-grey-950", children: [
      o && !a.length && /* @__PURE__ */ y.jsx(xq, { dataTestId: u }),
      /* @__PURE__ */ y.jsx(
        sT,
        {
          getGroup: h,
          getItem: d,
          groups: a,
          isLoading: o,
          onSelect: f
        }
      )
    ] }) })
  ] });
}
YV.propTypes = {
  href: A.string
};
function DPe({ anchorElem: t, href: e, onClose: n, ...i }) {
  const [r] = Oe.useLexicalComposerContext(), { cardConfig: s } = j.useContext(dt), o = j.useMemo(() => Bh(r.getRootElement()), [r]), a = j.useRef(null), l = j.useCallback(() => {
    r.update(() => {
      const f = a.current;
      if (!f)
        return;
      const d = N.$getSelection();
      if (!d)
        return;
      const h = ZV({ editor: r, selection: d }), m = t.parentElement;
      if (!h || !m || !f)
        return;
      const g = m.getBoundingClientRect(), w = h.bottom + 10, x = g.left, _ = g.right;
      f.style.top = `${w}px`, f.style.left = `${x}px`, f.style.width = `${_ - x}px`;
      const S = window.innerHeight / 100 * 30 + 54, C = f.getBoundingClientRect();
      o.scrollTop + C.top + S > o.scrollHeight && (f.style.top = `${h.top - C.height - 55}px`);
    });
  }, [t, r, o]);
  j.useEffect(() => {
    l();
  }, [l]), j.useEffect(() => {
    const f = Bh(t);
    window.addEventListener("resize", l), f && f.addEventListener("scroll", l);
    const d = a.current, h = new MutationObserver(l);
    return h.observe(d, { childList: !0, subtree: !0 }), () => {
      window.removeEventListener("resize", l), f && f.removeEventListener("scroll", l), d && h.disconnect();
    };
  }, [t, l]);
  const u = (f, d) => {
    r.update(() => {
      r.dispatchCommand(ki.TOGGLE_LINK_COMMAND, f || null);
      const h = N.$getSelection();
      if (h) {
        const m = h.focus.getNode(), g = N.$createRangeSelection();
        g.setTextNodeRange(m, m.getTextContentSize(), m, m.getTextContentSize()), N.$setSelection(g);
      }
      if (n(), d === "internal" || d === "default")
        pi("Link dropdown: Internal link chosen", { context: "text", fromLatest: d === "default" });
      else
        try {
          const m = uT(f, s == null ? void 0 : s.siteUrl) ? "internal" : "external";
          pi("Link dropdown: URL entered", { context: "text", target: m });
        } catch {
        }
    });
  };
  return /* @__PURE__ */ y.jsx(Ff, { children: /* @__PURE__ */ y.jsx("div", { ref: a, className: "not-kg-prose fixed z-[10000]", children: /* @__PURE__ */ y.jsx(
    YV,
    {
      cancel: n,
      href: e,
      update: u,
      ...i
    }
  ) }) });
}
const PPe = 5, Do = {
  snippet: "snippet",
  link: "link",
  text: "text"
};
function IPe({
  editor: t,
  anchorElem: e,
  href: n,
  isSnippetsEnabled: i,
  toolbarItemType: r,
  setToolbarItemType: s,
  hiddenFormats: o = []
}) {
  const { cardConfig: a } = j.useContext(dt), l = typeof (a == null ? void 0 : a.searchLinks) == "function" || !1, u = j.useRef(null), f = r === Do.link && l, d = j.useCallback((_) => {
    var S;
    r && ((S = u.current) == null ? void 0 : S.style.opacity) === "0" && (u.current.style.opacity = "1");
  }, [r]);
  j.useEffect(() => {
    const _ = (S) => {
      t.getEditorState().read(() => {
        const C = N.$getSelection();
        N.$isRangeSelection(C) && C.getNodes().find((M) => {
          const $ = t.getElementByKey(M.getKey());
          return $ && ($.contains(S.target) || S.target.contains($));
        }) && d(S);
      });
    };
    return document.addEventListener("mouseup", _), document.addEventListener("touchend", _), () => {
      document.removeEventListener("mouseup", _), document.removeEventListener("touchend", _);
    };
  }, [t, d]), j.useEffect(() => lt.mergeRegister(
    t.registerCommand(
      N.DELETE_CHARACTER_COMMAND,
      () => (s(null), !1),
      N.COMMAND_PRIORITY_LOW
    )
  ), [t, s]), j.useEffect(() => {
    let _ = null;
    const C = bp((E) => {
      (E == null ? void 0 : E.buttons) > 0 || (_ || (_ = { x: E.clientX, y: E.clientY }), Math.sqrt(
        Math.pow(E.clientX - _.x, 2) + Math.pow(E.clientY - _.y, 2)
      ) < PPe) || (_ = null, t.getEditorState().read(() => {
        const $ = N.$getSelection();
        $ === null || !N.$isRangeSelection($) || $.getTextContent() !== null && d();
      }));
    }, 10);
    return document.addEventListener("mousemove", C), () => {
      document.removeEventListener("mousemove", C);
    };
  }, [t, d]);
  const h = () => {
    s(null);
  }, m = Do.snippet === r, g = Do.link === r, w = Do.text === r, x = w || l && g;
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs(
      qV,
      {
        anchorElem: e,
        controlOpacity: !w,
        editor: t,
        isVisible: !!r,
        shouldReposition: r !== Do.text,
        toolbarRef: u,
        children: [
          m && /* @__PURE__ */ y.jsx(
            ai,
            {
              onClose: h
            }
          ),
          g && !l && /* @__PURE__ */ y.jsx(
            APe,
            {
              href: n,
              onClose: h
            }
          ),
          x && /* @__PURE__ */ y.jsx(
            NPe,
            {
              editor: t,
              hiddenFormats: o,
              isLinkSelected: !!n || l && g,
              isSnippetsEnabled: i,
              onLinkClick: () => s(Do.link),
              onSnippetClick: () => s(Do.snippet)
            }
          )
        ]
      }
    ),
    f && /* @__PURE__ */ y.jsx(
      DPe,
      {
        anchorElem: e,
        href: n,
        onClose: h
      }
    )
  ] });
}
function LPe({ href: t, onEdit: e, onRemove: n }) {
  return /* @__PURE__ */ y.jsxs("div", { className: "relative m-0 flex items-center justify-evenly gap-1 rounded-lg bg-white px-1 font-sans text-md font-normal text-black shadow-md dark:bg-grey-950 dark:text-white", children: [
    /* @__PURE__ */ y.jsx("a", { className: "ml-3 mr-2 max-w-2xl truncate", href: t, rel: "noopener noreferrer", target: "_blank", children: t }),
    /* @__PURE__ */ y.jsx(
      at,
      {
        dataTestId: "edit-url",
        icon: "edit",
        isActive: !1,
        label: "Edit",
        secondary: !0,
        onClick: e
      }
    ),
    /* @__PURE__ */ y.jsx(
      at,
      {
        dataTestId: "remove-url",
        icon: "remove",
        isActive: !1,
        label: "Remove",
        secondary: !0,
        onClick: n
      }
    )
  ] });
}
function RPe({ anchorElem: t, onEditLink: e, disabled: n }) {
  const [i] = Oe.useLexicalComposerContext(), [r, s] = j.useState(null), [o, a] = j.useState(""), l = j.useRef(null), [u, f] = j.useState(null);
  j.useEffect(() => {
    if (n) {
      r && (s(null), a(""));
      return;
    }
    const g = bp((w) => {
      var x;
      (x = l.current) != null && x.contains(w.target) || i.update(() => {
        const _ = N.$getNearestNodeFromDOMNode(w.target);
        if (f(w.target), !(ki.$isLinkNode(_) || ki.$isLinkNode(_ == null ? void 0 : _.getParent()))) {
          r && s(null);
          return;
        }
        let C = ki.$isLinkNode(_) ? _ : _.getParent();
        s(C), a(C.getURL());
      });
    }, 50);
    return document.addEventListener("mousemove", g), () => {
      g.cancel(), document.removeEventListener("mousemove", g);
    };
  }, [n, i, r]);
  const d = () => {
    i.update(() => {
      const m = N.$createRangeSelection();
      m.setTextNodeRange(
        r.getFirstChild(),
        0,
        r.getLastChild(),
        r.getLastChild().getTextContentSize()
      ), N.$setSelection(m), e({ href: o });
    });
  }, h = () => {
    i.update(() => {
      r.select(), i.dispatchCommand(ki.TOGGLE_LINK_COMMAND, null), s(null);
    });
  };
  return r ? /* @__PURE__ */ y.jsx(
    qV,
    {
      anchorElem: t,
      controlOpacity: !0,
      editor: i,
      isVisible: !0,
      targetElem: u,
      toolbarRef: l,
      children: /* @__PURE__ */ y.jsx(LPe, { href: o, onEdit: d, onRemove: h })
    }
  ) : null;
}
function jPe({ anchorElem: t = document.body, isSnippetsEnabled: e, hiddenFormats: n = [] }) {
  const [i] = Oe.useLexicalComposerContext();
  return FPe(i, t, e, n);
}
function FPe(t, e, n, i = []) {
  const [r, s] = j.useState(null), [o, a] = j.useState(null), l = j.useCallback(() => {
    t.getEditorState().read(() => {
      if (t.isComposing())
        return;
      const f = N.$getSelection(), d = window.getSelection(), h = t.getRootElement();
      if (d !== null && (!N.$isRangeSelection(f) || h === null || !h.contains(d.anchorNode))) {
        s(null);
        return;
      }
      if (!N.$isRangeSelection(f) || cl(f.anchor.getNode())) {
        r && s(null);
        return;
      }
      const m = tc(f), g = m.getParent();
      if (ki.$isLinkNode(g) ? a(g.getURL()) : ki.$isLinkNode(m) ? a(m.getURL()) : a(""), f.getTextContent().trim() !== "" && (N.$isTextNode(m) || N.$isParagraphNode(m))) {
        s(Do.text);
        return;
      }
      s(null);
    });
  }, [t, r]);
  j.useEffect(() => {
    if (!(r && r !== Do.text))
      return document.addEventListener("selectionchange", l), () => {
        document.removeEventListener("selectionchange", l);
      };
  }, [l, r]), j.useEffect(() => {
    t.registerCommand(
      N.KEY_MODIFIER_COMMAND,
      (f) => {
        const { keyCode: d, ctrlKey: h, metaKey: m, shiftKey: g } = f;
        if (!g && d === 75 && (h || m)) {
          const w = N.$getSelection();
          if (N.$isRangeSelection(w) && !w.isCollapsed())
            return s(Do.link), f.preventDefault(), !0;
        }
        return !1;
      },
      N.COMMAND_PRIORITY_LOW
    );
  }, [t]), j.useEffect(() => {
    const f = (d) => {
      e.contains(d.target) || s(null);
    };
    return document.addEventListener("mousedown", f), () => {
      document.removeEventListener("mousedown", f);
    };
  });
  const u = (f) => {
    s(Do.link), a(f == null ? void 0 : f.href);
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      IPe,
      {
        anchorElem: e,
        editor: t,
        hiddenFormats: i,
        href: o,
        isSnippetsEnabled: n,
        setToolbarItemType: s,
        toolbarItemType: r
      }
    ),
    /* @__PURE__ */ y.jsx(
      RPe,
      {
        anchorElem: e,
        disabled: !!r,
        onEditLink: u
      }
    )
  ] });
}
var BPe = function(e, n) {
  return e === void 0 && (e = []), n === void 0 && (n = []), e.length !== n.length || e.some(function(i, r) {
    return !Object.is(i, n[r]);
  });
}, IL = {
  error: null
}, zPe = /* @__PURE__ */ function(t) {
  D9e(e, t);
  function e() {
    for (var i, r = arguments.length, s = new Array(r), o = 0; o < r; o++)
      s[o] = arguments[o];
    return i = t.call.apply(t, [this].concat(s)) || this, i.state = IL, i.resetErrorBoundary = function() {
      for (var a, l = arguments.length, u = new Array(l), f = 0; f < l; f++)
        u[f] = arguments[f];
      i.props.onReset == null || (a = i.props).onReset.apply(a, u), i.reset();
    }, i;
  }
  e.getDerivedStateFromError = function(r) {
    return {
      error: r
    };
  };
  var n = e.prototype;
  return n.reset = function() {
    this.setState(IL);
  }, n.componentDidCatch = function(r, s) {
    var o, a;
    (o = (a = this.props).onError) == null || o.call(a, r, s);
  }, n.componentDidUpdate = function(r, s) {
    var o = this.state.error, a = this.props.resetKeys;
    if (o !== null && s.error !== null && BPe(r.resetKeys, a)) {
      var l, u;
      (l = (u = this.props).onResetKeysChange) == null || l.call(u, r.resetKeys, a), this.reset();
    }
  }, n.render = function() {
    var r = this.state.error, s = this.props, o = s.fallbackRender, a = s.FallbackComponent, l = s.fallback;
    if (r !== null) {
      var u = {
        error: r,
        resetErrorBoundary: this.resetErrorBoundary
      };
      if (/* @__PURE__ */ J.isValidElement(l))
        return l;
      if (typeof o == "function")
        return o(u);
      if (a)
        return /* @__PURE__ */ J.createElement(a, u);
      throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");
    }
    return this.props.children;
  }, e;
}(J.Component);
function WPe({ children: t }) {
  const { onError: e } = j.useContext(dt);
  return /* @__PURE__ */ y.jsx(
    zPe,
    {
      fallback: /* @__PURE__ */ y.jsx("div", { className: "border border-red p-2", children: "An error was thrown." }),
      onError: e,
      children: t
    }
  );
}
function HPe() {
  return /* @__PURE__ */ y.jsx("hr", { className: "m-0 block h-[1px] border-0 border-t border-grey-300" });
}
const VV = N.createCommand();
class _p extends k1 {
  getIcon() {
    return CS;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { className: "inline-block", nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(HPe, {}) });
  }
}
we(_p, "kgMenu", {
  label: "Divider",
  desc: "Insert a dividing line",
  Icon: CS,
  insertCommand: VV,
  matches: ["divider", "horizontal-rule", "hr"],
  priority: 2,
  shortcut: "/hr"
});
function v6() {
  return new _p();
}
function QPe(t) {
  return t instanceof _p;
}
var jn = {}, Oi = {}, XV = { exports: {} };
(function(t) {
  var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
  /**
   * Prism: Lightweight, robust, elegant syntax highlighting
   *
   * @license MIT <https://opensource.org/licenses/MIT>
   * @author Lea Verou <https://lea.verou.me>
   * @namespace
   * @public
   */
  var n = function(i) {
    var r = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, s = 0, o = {}, a = {
      /**
       * 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 <script> to load Prism's script
       * ```
       *
       * @default false
       * @type {boolean}
       * @memberof Prism
       * @public
       */
      manual: i.Prism && i.Prism.manual,
      /**
       * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
       * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
       * own worker, you don't want it to do this.
       *
       * By setting this value to `true`, Prism will not add its own listeners to the worker.
       *
       * You obviously have to change this value before Prism executes. 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.disableWorkerMessageHandler = true;
       * // Load Prism's script
       * ```
       *
       * @default false
       * @type {boolean}
       * @memberof Prism
       * @public
       */
      disableWorkerMessageHandler: i.Prism && i.Prism.disableWorkerMessageHandler,
      /**
       * A namespace for utility methods.
       *
       * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
       * change or disappear at any time.
       *
       * @namespace
       * @memberof Prism
       */
      util: {
        encode: function S(C) {
          return C instanceof l ? new l(C.type, S(C.content), C.alias) : Array.isArray(C) ? C.map(S) : C.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
        },
        /**
         * Returns the name of the type of the given value.
         *
         * @param {any} o
         * @returns {string}
         * @example
         * type(null)      === 'Null'
         * type(undefined) === 'Undefined'
         * type(123)       === 'Number'
         * type('foo')     === 'String'
         * type(true)      === 'Boolean'
         * type([1, 2])    === 'Array'
         * type({})        === 'Object'
         * type(String)    === 'Function'
         * type(/abc+/)    === 'RegExp'
         */
        type: function(S) {
          return Object.prototype.toString.call(S).slice(8, -1);
        },
        /**
         * Returns a unique number for the given object. Later calls will still return the same number.
         *
         * @param {Object} obj
         * @returns {number}
         */
        objId: function(S) {
          return S.__id || Object.defineProperty(S, "__id", { value: ++s }), S.__id;
        },
        /**
         * Creates a deep clone of the given object.
         *
         * The main intended use of this function is to clone language definitions.
         *
         * @param {T} o
         * @param {Record<number, any>} [visited]
         * @returns {T}
         * @template T
         */
        clone: function S(C, E) {
          E = E || {};
          var M, $;
          switch (a.util.type(C)) {
            case "Object":
              if ($ = a.util.objId(C), E[$])
                return E[$];
              M = /** @type {Record<string, any>} */
              {}, E[$] = M;
              for (var P in C)
                C.hasOwnProperty(P) && (M[P] = S(C[P], E));
              return (
                /** @type {any} */
                M
              );
            case "Array":
              return $ = a.util.objId(C), E[$] ? E[$] : (M = [], E[$] = M, /** @type {Array} */
              /** @type {any} */
              C.forEach(function(W, z) {
                M[z] = S(W, E);
              }), /** @type {any} */
              M);
            default:
              return C;
          }
        },
        /**
         * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
         *
         * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
         *
         * @param {Element} element
         * @returns {string}
         */
        getLanguage: function(S) {
          for (; S; ) {
            var C = r.exec(S.className);
            if (C)
              return C[1].toLowerCase();
            S = S.parentElement;
          }
          return "none";
        },
        /**
         * Sets the Prism `language-xxxx` class of the given element.
         *
         * @param {Element} element
         * @param {string} language
         * @returns {void}
         */
        setLanguage: function(S, C) {
          S.className = S.className.replace(RegExp(r, "gi"), ""), S.classList.add("language-" + C);
        },
        /**
         * Returns the script element that is currently executing.
         *
         * This does __not__ work for line script element.
         *
         * @returns {HTMLScriptElement | null}
         */
        currentScript: function() {
          if (typeof document > "u")
            return null;
          if ("currentScript" in document)
            return (
              /** @type {any} */
              document.currentScript
            );
          try {
            throw new Error();
          } catch (M) {
            var S = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack) || [])[1];
            if (S) {
              var C = document.getElementsByTagName("script");
              for (var E in C)
                if (C[E].src == S)
                  return C[E];
            }
            return null;
          }
        },
        /**
         * Returns whether a given class is active for `element`.
         *
         * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
         * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
         * given class is just the given class with a `no-` prefix.
         *
         * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
         * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
         * ancestors have the given class or the negated version of it, then the default activation will be returned.
         *
         * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
         * version of it, the class is considered active.
         *
         * @param {Element} element
         * @param {string} className
         * @param {boolean} [defaultActivation=false]
         * @returns {boolean}
         */
        isActive: function(S, C, E) {
          for (var M = "no-" + C; S; ) {
            var $ = S.classList;
            if ($.contains(C))
              return !0;
            if ($.contains(M))
              return !1;
            S = S.parentElement;
          }
          return !!E;
        }
      },
      /**
       * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
       *
       * @namespace
       * @memberof Prism
       * @public
       */
      languages: {
        /**
         * The grammar for plain, unformatted text.
         */
        plain: o,
        plaintext: o,
        text: o,
        txt: o,
        /**
         * Creates a deep copy of the language with the given id and appends the given tokens.
         *
         * If a token in `redef` also appears in the copied language, then the existing token in the copied language
         * will be overwritten at its original position.
         *
         * ## Best practices
         *
         * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
         * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
         * understand the language definition because, normally, the order of tokens matters in Prism grammars.
         *
         * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
         * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
         *
         * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
         * @param {Grammar} redef The new tokens to append.
         * @returns {Grammar} The new language created.
         * @public
         * @example
         * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
         *     // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
         *     // at its original position
         *     'comment': { ... },
         *     // CSS doesn't have a 'color' token, so this token will be appended
         *     'color': /\b(?:red|green|blue)\b/
         * });
         */
        extend: function(S, C) {
          var E = a.util.clone(a.languages[S]);
          for (var M in C)
            E[M] = C[M];
          return E;
        },
        /**
         * Inserts tokens _before_ another token in a language definition or any other grammar.
         *
         * ## Usage
         *
         * This helper method makes it easy to modify existing languages. For example, the CSS language definition
         * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
         * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
         * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
         * this:
         *
         * ```js
         * Prism.languages.markup.style = {
         *     // token
         * };
         * ```
         *
         * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
         * before existing tokens. For the CSS example above, you would use it like this:
         *
         * ```js
         * Prism.languages.insertBefore('markup', 'cdata', {
         *     'style': {
         *         // token
         *     }
         * });
         * ```
         *
         * ## Special cases
         *
         * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
         * will be ignored.
         *
         * This behavior can be used to insert tokens after `before`:
         *
         * ```js
         * Prism.languages.insertBefore('markup', 'comment', {
         *     'comment': Prism.languages.markup.comment,
         *     // tokens after 'comment'
         * });
         * ```
         *
         * ## Limitations
         *
         * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
         * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
         * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
         * deleting properties which is necessary to insert at arbitrary positions.
         *
         * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
         * Instead, it will create a new object and replace all references to the target object with the new one. This
         * can be done without temporarily deleting properties, so the iteration order is well-defined.
         *
         * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
         * you hold the target object in a variable, then the value of the variable will not change.
         *
         * ```js
         * var oldMarkup = Prism.languages.markup;
         * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
         *
         * assert(oldMarkup !== Prism.languages.markup);
         * assert(newMarkup === Prism.languages.markup);
         * ```
         *
         * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
         * object to be modified.
         * @param {string} before The key to insert before.
         * @param {Grammar} insert An object containing the key-value pairs to be inserted.
         * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
         * object to be modified.
         *
         * Defaults to `Prism.languages`.
         * @returns {Grammar} The new grammar object.
         * @public
         */
        insertBefore: function(S, C, E, M) {
          M = M || /** @type {any} */
          a.languages;
          var $ = M[S], P = {};
          for (var W in $)
            if ($.hasOwnProperty(W)) {
              if (W == C)
                for (var z in E)
                  E.hasOwnProperty(z) && (P[z] = E[z]);
              E.hasOwnProperty(W) || (P[W] = $[W]);
            }
          var Z = M[S];
          return M[S] = P, a.languages.DFS(a.languages, function(L, Q) {
            Q === Z && L != S && (this[L] = P);
          }), P;
        },
        // Traverse a language definition with Depth First Search
        DFS: function S(C, E, M, $) {
          $ = $ || {};
          var P = a.util.objId;
          for (var W in C)
            if (C.hasOwnProperty(W)) {
              E.call(C, W, C[W], M || W);
              var z = C[W], Z = a.util.type(z);
              Z === "Object" && !$[P(z)] ? ($[P(z)] = !0, S(z, E, null, $)) : Z === "Array" && !$[P(z)] && ($[P(z)] = !0, S(z, E, W, $));
            }
        }
      },
      plugins: {},
      /**
       * This is the most high-level function in Prism’s API.
       * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on
       * each one of them.
       *
       * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.
       *
       * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.
       * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.
       * @memberof Prism
       * @public
       */
      highlightAll: function(S, C) {
        a.highlightAllUnder(document, S, C);
      },
      /**
       * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
       * {@link Prism.highlightElement} on each one of them.
       *
       * The following hooks will be run:
       * 1. `before-highlightall`
       * 2. `before-all-elements-highlight`
       * 3. All hooks of {@link Prism.highlightElement} for each element.
       *
       * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
       * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
       * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.
       * @memberof Prism
       * @public
       */
      highlightAllUnder: function(S, C, E) {
        var M = {
          callback: E,
          container: S,
          selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
        };
        a.hooks.run("before-highlightall", M), M.elements = Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)), a.hooks.run("before-all-elements-highlight", M);
        for (var $ = 0, P; P = M.elements[$++]; )
          a.highlightElement(P, C === !0, M.callback);
      },
      /**
       * Highlights the code inside a single element.
       *
       * The following hooks will be run:
       * 1. `before-sanity-check`
       * 2. `before-highlight`
       * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
       * 4. `before-insert`
       * 5. `after-highlight`
       * 6. `complete`
       *
       * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
       * the element's language.
       *
       * @param {Element} element The element containing the code.
       * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
       * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
       * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is
       * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).
       *
       * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for
       * asynchronous highlighting to work. You can build your own bundle on the
       * [Download page](https://prismjs.com/download.html).
       * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.
       * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.
       * @memberof Prism
       * @public
       */
      highlightElement: function(S, C, E) {
        var M = a.util.getLanguage(S), $ = a.languages[M];
        a.util.setLanguage(S, M);
        var P = S.parentElement;
        P && P.nodeName.toLowerCase() === "pre" && a.util.setLanguage(P, M);
        var W = S.textContent, z = {
          element: S,
          language: M,
          grammar: $,
          code: W
        };
        function Z(Q) {
          z.highlightedCode = Q, a.hooks.run("before-insert", z), z.element.innerHTML = z.highlightedCode, a.hooks.run("after-highlight", z), a.hooks.run("complete", z), E && E.call(z.element);
        }
        if (a.hooks.run("before-sanity-check", z), P = z.element.parentElement, P && P.nodeName.toLowerCase() === "pre" && !P.hasAttribute("tabindex") && P.setAttribute("tabindex", "0"), !z.code) {
          a.hooks.run("complete", z), E && E.call(z.element);
          return;
        }
        if (a.hooks.run("before-highlight", z), !z.grammar) {
          Z(a.util.encode(z.code));
          return;
        }
        if (C && i.Worker) {
          var L = new Worker(a.filename);
          L.onmessage = function(Q) {
            Z(Q.data);
          }, L.postMessage(JSON.stringify({
            language: z.language,
            code: z.code,
            immediateClose: !0
          }));
        } else
          Z(a.highlight(z.code, z.grammar, z.language));
      },
      /**
       * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
       * and the language definitions to use, and returns a string with the HTML produced.
       *
       * The following hooks will be run:
       * 1. `before-tokenize`
       * 2. `after-tokenize`
       * 3. `wrap`: On each {@link Token}.
       *
       * @param {string} text A string with the code to be highlighted.
       * @param {Grammar} grammar An object containing the tokens to use.
       *
       * Usually a language definition like `Prism.languages.markup`.
       * @param {string} language The name of the language definition passed to `grammar`.
       * @returns {string} The highlighted HTML.
       * @memberof Prism
       * @public
       * @example
       * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
       */
      highlight: function(S, C, E) {
        var M = {
          code: S,
          grammar: C,
          language: E
        };
        if (a.hooks.run("before-tokenize", M), !M.grammar)
          throw new Error('The language "' + M.language + '" has no grammar.');
        return M.tokens = a.tokenize(M.code, M.grammar), a.hooks.run("after-tokenize", M), l.stringify(a.util.encode(M.tokens), M.language);
      },
      /**
       * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
       * and the language definitions to use, and returns an array with the tokenized code.
       *
       * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
       *
       * This method could be useful in other contexts as well, as a very crude parser.
       *
       * @param {string} text A string with the code to be highlighted.
       * @param {Grammar} grammar An object containing the tokens to use.
       *
       * Usually a language definition like `Prism.languages.markup`.
       * @returns {TokenStream} An array of strings and tokens, a token stream.
       * @memberof Prism
       * @public
       * @example
       * let code = `var foo = 0;`;
       * let tokens = Prism.tokenize(code, Prism.languages.javascript);
       * tokens.forEach(token => {
       *     if (token instanceof Prism.Token && token.type === 'number') {
       *         console.log(`Found numeric literal: ${token.content}`);
       *     }
       * });
       */
      tokenize: function(S, C) {
        var E = C.rest;
        if (E) {
          for (var M in E)
            C[M] = E[M];
          delete C.rest;
        }
        var $ = new d();
        return h($, $.head, S), f(S, $, C, $.head, 0), g($);
      },
      /**
       * @namespace
       * @memberof Prism
       * @public
       */
      hooks: {
        all: {},
        /**
         * Adds the given callback to the list of callbacks for the given hook.
         *
         * The callback will be invoked when the hook it is registered for is run.
         * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
         *
         * One callback function can be registered to multiple hooks and the same hook multiple times.
         *
         * @param {string} name The name of the hook.
         * @param {HookCallback} callback The callback function which is given environment variables.
         * @public
         */
        add: function(S, C) {
          var E = a.hooks.all;
          E[S] = E[S] || [], E[S].push(C);
        },
        /**
         * Runs a hook invoking all registered callbacks with the given environment variables.
         *
         * Callbacks will be invoked synchronously and in the order in which they were registered.
         *
         * @param {string} name The name of the hook.
         * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
         * @public
         */
        run: function(S, C) {
          var E = a.hooks.all[S];
          if (!(!E || !E.length))
            for (var M = 0, $; $ = E[M++]; )
              $(C);
        }
      },
      Token: l
    };
    i.Prism = a;
    function l(S, C, E, M) {
      this.type = S, this.content = C, this.alias = E, this.length = (M || "").length | 0;
    }
    l.stringify = function S(C, E) {
      if (typeof C == "string")
        return C;
      if (Array.isArray(C)) {
        var M = "";
        return C.forEach(function(Z) {
          M += S(Z, E);
        }), M;
      }
      var $ = {
        type: C.type,
        content: S(C.content, E),
        tag: "span",
        classes: ["token", C.type],
        attributes: {},
        language: E
      }, P = C.alias;
      P && (Array.isArray(P) ? Array.prototype.push.apply($.classes, P) : $.classes.push(P)), a.hooks.run("wrap", $);
      var W = "";
      for (var z in $.attributes)
        W += " " + z + '="' + ($.attributes[z] || "").replace(/"/g, "&quot;") + '"';
      return "<" + $.tag + ' class="' + $.classes.join(" ") + '"' + W + ">" + $.content + "</" + $.tag + ">";
    };
    function u(S, C, E, M) {
      S.lastIndex = C;
      var $ = S.exec(E);
      if ($ && M && $[1]) {
        var P = $[1].length;
        $.index += P, $[0] = $[0].slice(P);
      }
      return $;
    }
    function f(S, C, E, M, $, P) {
      for (var W in E)
        if (!(!E.hasOwnProperty(W) || !E[W])) {
          var z = E[W];
          z = Array.isArray(z) ? z : [z];
          for (var Z = 0; Z < z.length; ++Z) {
            if (P && P.cause == W + "," + Z)
              return;
            var L = z[Z], Q = L.inside, V = !!L.lookbehind, H = !!L.greedy, R = L.alias;
            if (H && !L.pattern.global) {
              var q = L.pattern.toString().match(/[imsuy]*$/)[0];
              L.pattern = RegExp(L.pattern.source, q + "g");
            }
            for (var Y = L.pattern || L, K = M.next, te = $; K !== C.tail && !(P && te >= P.reach); te += K.value.length, K = K.next) {
              var se = K.value;
              if (C.length > S.length)
                return;
              if (!(se instanceof l)) {
                var ce = 1, U;
                if (H) {
                  if (U = u(Y, te, S, V), !U || U.index >= S.length)
                    break;
                  var pe = U.index, F = U.index + U[0].length, oe = te;
                  for (oe += K.value.length; pe >= oe; )
                    K = K.next, oe += K.value.length;
                  if (oe -= K.value.length, te = oe, K.value instanceof l)
                    continue;
                  for (var le = K; le !== C.tail && (oe < F || typeof le.value == "string"); le = le.next)
                    ce++, oe += le.value.length;
                  ce--, se = S.slice(te, oe), U.index -= te;
                } else if (U = u(Y, 0, se, V), !U)
                  continue;
                var pe = U.index, Re = U[0], ze = se.slice(0, pe), rt = se.slice(pe + Re.length), pt = te + se.length;
                P && pt > P.reach && (P.reach = pt);
                var ge = K.prev;
                ze && (ge = h(C, ge, ze), te += ze.length), m(C, ge, ce);
                var De = new l(W, Q ? a.tokenize(Re, Q) : Re, R, Re);
                if (K = h(C, ge, De), rt && h(C, K, rt), ce > 1) {
                  var st = {
                    cause: W + "," + Z,
                    reach: pt
                  };
                  f(S, C, E, K.prev, te, st), P && st.reach > P.reach && (P.reach = st.reach);
                }
              }
            }
          }
        }
    }
    function d() {
      var S = { value: null, prev: null, next: null }, C = { value: null, prev: S, next: null };
      S.next = C, this.head = S, this.tail = C, this.length = 0;
    }
    function h(S, C, E) {
      var M = C.next, $ = { value: E, prev: C, next: M };
      return C.next = $, M.prev = $, S.length++, $;
    }
    function m(S, C, E) {
      for (var M = C.next, $ = 0; $ < E && M !== S.tail; $++)
        M = M.next;
      C.next = M, M.prev = C, S.length -= $;
    }
    function g(S) {
      for (var C = [], E = S.head.next; E !== S.tail; )
        C.push(E.value), E = E.next;
      return C;
    }
    if (!i.document)
      return i.addEventListener && (a.disableWorkerMessageHandler || i.addEventListener("message", function(S) {
        var C = JSON.parse(S.data), E = C.language, M = C.code, $ = C.immediateClose;
        i.postMessage(a.highlight(M, a.languages[E], E)), $ && i.close();
      }, !1)), a;
    var w = a.util.currentScript();
    w && (a.filename = w.src, w.hasAttribute("data-manual") && (a.manual = !0));
    function x() {
      a.manual || a.highlightAll();
    }
    if (!a.manual) {
      var _ = document.readyState;
      _ === "loading" || _ === "interactive" && w && w.defer ? document.addEventListener("DOMContentLoaded", x) : window.requestAnimationFrame ? window.requestAnimationFrame(x) : window.setTimeout(x, 16);
    }
    return a;
  }(e);
  t.exports && (t.exports = n), typeof on < "u" && (on.Prism = n), n.languages.markup = {
    comment: {
      pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
      greedy: !0
    },
    prolog: {
      pattern: /<\?[\s\S]+?\?>/,
      greedy: !0
    },
    doctype: {
      // https://www.w3.org/TR/xml/#NT-doctypedecl
      pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
      greedy: !0,
      inside: {
        "internal-subset": {
          pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
          lookbehind: !0,
          greedy: !0,
          inside: null
          // see below
        },
        string: {
          pattern: /"[^"]*"|'[^']*'/,
          greedy: !0
        },
        punctuation: /^<!|>$|[[\]]/,
        "doctype-tag": /^DOCTYPE/i,
        name: /[^\s<>'"]+/
      }
    },
    cdata: {
      pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
      greedy: !0
    },
    tag: {
      pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
      greedy: !0,
      inside: {
        tag: {
          pattern: /^<\/?[^\s>\/]+/,
          inside: {
            punctuation: /^<\/?/,
            namespace: /^[^\s>\/:]+:/
          }
        },
        "special-attr": [],
        "attr-value": {
          pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
          inside: {
            punctuation: [
              {
                pattern: /^=/,
                alias: "attr-equals"
              },
              {
                pattern: /^(\s*)["']|["']$/,
                lookbehind: !0
              }
            ]
          }
        },
        punctuation: /\/?>/,
        "attr-name": {
          pattern: /[^\s>\/]+/,
          inside: {
            namespace: /^[^\s>\/:]+:/
          }
        }
      }
    },
    entity: [
      {
        pattern: /&[\da-z]{1,8};/i,
        alias: "named-entity"
      },
      /&#x?[\da-f]{1,8};/i
    ]
  }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(i) {
    i.type === "entity" && (i.attributes.title = i.content.replace(/&amp;/, "&"));
  }), Object.defineProperty(n.languages.markup.tag, "addInlined", {
    /**
     * Adds an inlined language to markup.
     *
     * An example of an inlined language is CSS with `<style>` tags.
     *
     * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
     * case insensitive.
     * @param {string} lang The language key.
     * @example
     * addInlined('style', 'css');
     */
    value: function(r, s) {
      var o = {};
      o["language-" + s] = {
        pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
        lookbehind: !0,
        inside: n.languages[s]
      }, o.cdata = /^<!\[CDATA\[|\]\]>$/i;
      var a = {
        "included-cdata": {
          pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
          inside: o
        }
      };
      a["language-" + s] = {
        pattern: /[\s\S]+/,
        inside: n.languages[s]
      };
      var l = {};
      l[r] = {
        pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
          return r;
        }), "i"),
        lookbehind: !0,
        greedy: !0,
        inside: a
      }, n.languages.insertBefore("markup", "cdata", l);
    }
  }), Object.defineProperty(n.languages.markup.tag, "addAttribute", {
    /**
     * Adds an pattern to highlight languages embedded in HTML attributes.
     *
     * An example of an inlined language is CSS with `style` attributes.
     *
     * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
     * case insensitive.
     * @param {string} lang The language key.
     * @example
     * addAttribute('style', 'css');
     */
    value: function(i, r) {
      n.languages.markup.tag.inside["special-attr"].push({
        pattern: RegExp(
          /(^|["'\s])/.source + "(?:" + i + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
          "i"
        ),
        lookbehind: !0,
        inside: {
          "attr-name": /^[^\s=]+/,
          "attr-value": {
            pattern: /=[\s\S]+/,
            inside: {
              value: {
                pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
                lookbehind: !0,
                alias: [r, "language-" + r],
                inside: n.languages[r]
              },
              punctuation: [
                {
                  pattern: /^=/,
                  alias: "attr-equals"
                },
                /"|'/
              ]
            }
          }
        }
      });
    }
  }), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(i) {
    var r = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
    i.languages.css = {
      comment: /\/\*[\s\S]*?\*\//,
      atrule: {
        pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + r.source + ")*?" + /(?:;|(?=\s*\{))/.source),
        inside: {
          rule: /^@[\w-]+/,
          "selector-function-argument": {
            pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
            lookbehind: !0,
            alias: "selector"
          },
          keyword: {
            pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
            lookbehind: !0
          }
          // See rest below
        }
      },
      url: {
        // https://drafts.csswg.org/css-values-3/#urls
        pattern: RegExp("\\burl\\((?:" + r.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
        greedy: !0,
        inside: {
          function: /^url/i,
          punctuation: /^\(|\)$/,
          string: {
            pattern: RegExp("^" + r.source + "$"),
            alias: "url"
          }
        }
      },
      selector: {
        pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + r.source + ")*(?=\\s*\\{)"),
        lookbehind: !0
      },
      string: {
        pattern: r,
        greedy: !0
      },
      property: {
        pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
        lookbehind: !0
      },
      important: /!important\b/i,
      function: {
        pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
        lookbehind: !0
      },
      punctuation: /[(){};:,]/
    }, i.languages.css.atrule.inside.rest = i.languages.css;
    var s = i.languages.markup;
    s && (s.tag.addInlined("style", "css"), s.tag.addAttribute("style", "css"));
  }(n), n.languages.clike = {
    comment: [
      {
        pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
        lookbehind: !0,
        greedy: !0
      },
      {
        pattern: /(^|[^\\:])\/\/.*/,
        lookbehind: !0,
        greedy: !0
      }
    ],
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: !0
    },
    "class-name": {
      pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
      lookbehind: !0,
      inside: {
        punctuation: /[.\\]/
      }
    },
    keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
    boolean: /\b(?:false|true)\b/,
    function: /\b\w+(?=\()/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
    punctuation: /[{}[\];(),.:]/
  }, n.languages.javascript = n.languages.extend("clike", {
    "class-name": [
      n.languages.clike["class-name"],
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
        lookbehind: !0
      }
    ],
    keyword: [
      {
        pattern: /((?:^|\})\s*)catch\b/,
        lookbehind: !0
      },
      {
        pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
        lookbehind: !0
      }
    ],
    // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
    function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
    number: {
      pattern: RegExp(
        /(^|[^\w$])/.source + "(?:" + // constant
        (/NaN|Infinity/.source + "|" + // binary integer
        /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
        /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
        /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
        /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
        /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
      ),
      lookbehind: !0
    },
    operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
  }), n.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, n.languages.insertBefore("javascript", "keyword", {
    regex: {
      pattern: RegExp(
        // lookbehind
        // eslint-disable-next-line regexp/no-dupe-characters-character-class
        /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
        // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
        // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
        // with the only syntax, so we have to define 2 different regex patterns.
        /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
        /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
        /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
      ),
      lookbehind: !0,
      greedy: !0,
      inside: {
        "regex-source": {
          pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
          lookbehind: !0,
          alias: "language-regex",
          inside: n.languages.regex
        },
        "regex-delimiter": /^\/|\/$/,
        "regex-flags": /^[a-z]+$/
      }
    },
    // This must be declared before keyword because we use "function" inside the look-forward
    "function-variable": {
      pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
      alias: "function"
    },
    parameter: [
      {
        pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
        lookbehind: !0,
        inside: n.languages.javascript
      },
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
        lookbehind: !0,
        inside: n.languages.javascript
      },
      {
        pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
        lookbehind: !0,
        inside: n.languages.javascript
      },
      {
        pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
        lookbehind: !0,
        inside: n.languages.javascript
      }
    ],
    constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
  }), n.languages.insertBefore("javascript", "string", {
    hashbang: {
      pattern: /^#!.*/,
      greedy: !0,
      alias: "comment"
    },
    "template-string": {
      pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
      greedy: !0,
      inside: {
        "template-punctuation": {
          pattern: /^`|`$/,
          alias: "string"
        },
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
          lookbehind: !0,
          inside: {
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            rest: n.languages.javascript
          }
        },
        string: /[\s\S]+/
      }
    },
    "string-property": {
      pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
      lookbehind: !0,
      greedy: !0,
      alias: "property"
    }
  }), n.languages.insertBefore("javascript", "operator", {
    "literal-property": {
      pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
      lookbehind: !0,
      alias: "property"
    }
  }), n.languages.markup && (n.languages.markup.tag.addInlined("script", "javascript"), n.languages.markup.tag.addAttribute(
    /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
    "javascript"
  )), n.languages.js = n.languages.javascript, function() {
    if (typeof n > "u" || typeof document > "u")
      return;
    Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
    var i = "Loading…", r = function(w, x) {
      return "✖ Error " + w + " while fetching file: " + x;
    }, s = "✖ Error: File does not exist or is empty", o = {
      js: "javascript",
      py: "python",
      rb: "ruby",
      ps1: "powershell",
      psm1: "powershell",
      sh: "bash",
      bat: "batch",
      h: "c",
      tex: "latex"
    }, a = "data-src-status", l = "loading", u = "loaded", f = "failed", d = "pre[data-src]:not([" + a + '="' + u + '"]):not([' + a + '="' + l + '"])';
    function h(w, x, _) {
      var S = new XMLHttpRequest();
      S.open("GET", w, !0), S.onreadystatechange = function() {
        S.readyState == 4 && (S.status < 400 && S.responseText ? x(S.responseText) : S.status >= 400 ? _(r(S.status, S.statusText)) : _(s));
      }, S.send(null);
    }
    function m(w) {
      var x = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(w || "");
      if (x) {
        var _ = Number(x[1]), S = x[2], C = x[3];
        return S ? C ? [_, Number(C)] : [_, void 0] : [_, _];
      }
    }
    n.hooks.add("before-highlightall", function(w) {
      w.selector += ", " + d;
    }), n.hooks.add("before-sanity-check", function(w) {
      var x = (
        /** @type {HTMLPreElement} */
        w.element
      );
      if (x.matches(d)) {
        w.code = "", x.setAttribute(a, l);
        var _ = x.appendChild(document.createElement("CODE"));
        _.textContent = i;
        var S = x.getAttribute("data-src"), C = w.language;
        if (C === "none") {
          var E = (/\.(\w+)$/.exec(S) || [, "none"])[1];
          C = o[E] || E;
        }
        n.util.setLanguage(_, C), n.util.setLanguage(x, C);
        var M = n.plugins.autoloader;
        M && M.loadLanguages(C), h(
          S,
          function($) {
            x.setAttribute(a, u);
            var P = m(x.getAttribute("data-range"));
            if (P) {
              var W = $.split(/\r\n?|\n/g), z = P[0], Z = P[1] == null ? W.length : P[1];
              z < 0 && (z += W.length), z = Math.max(0, Math.min(z - 1, W.length)), Z < 0 && (Z += W.length), Z = Math.max(0, Math.min(Z, W.length)), $ = W.slice(z, Z).join(`
`), x.hasAttribute("data-start") || x.setAttribute("data-start", String(z + 1));
            }
            _.textContent = $, n.highlightElement(_);
          },
          function($) {
            x.setAttribute(a, f), _.textContent = $;
          }
        );
      }
    }), n.plugins.fileHighlight = {
      /**
       * Executes the File Highlight plugin for all matching `pre` elements under the given container.
       *
       * Note: Elements which are already loaded or currently loading will not be touched by this method.
       *
       * @param {ParentNode} [container=document]
       */
      highlight: function(x) {
        for (var _ = (x || document).querySelectorAll(d), S = 0, C; C = _[S++]; )
          n.highlightElement(C);
      }
    };
    var g = !1;
    n.fileHighlight = function() {
      g || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), g = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
    };
  }();
})(XV);
var UPe = XV.exports;
Prism.languages.clike = {
  comment: [
    {
      pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
      lookbehind: !0,
      greedy: !0
    },
    {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: !0,
      greedy: !0
    }
  ],
  string: {
    pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
    greedy: !0
  },
  "class-name": {
    pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
    lookbehind: !0,
    inside: {
      punctuation: /[.\\]/
    }
  },
  keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
  boolean: /\b(?:false|true)\b/,
  function: /\b\w+(?=\()/,
  number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
  operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
  punctuation: /[{}[\];(),.:]/
};
Prism.languages.javascript = Prism.languages.extend("clike", {
  "class-name": [
    Prism.languages.clike["class-name"],
    {
      pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
      lookbehind: !0
    }
  ],
  keyword: [
    {
      pattern: /((?:^|\})\s*)catch\b/,
      lookbehind: !0
    },
    {
      pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
      lookbehind: !0
    }
  ],
  // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
  function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
  number: {
    pattern: RegExp(
      /(^|[^\w$])/.source + "(?:" + // constant
      (/NaN|Infinity/.source + "|" + // binary integer
      /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
      /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
      /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
      /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
      /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
    ),
    lookbehind: !0
  },
  operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
});
Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
Prism.languages.insertBefore("javascript", "keyword", {
  regex: {
    pattern: RegExp(
      // lookbehind
      // eslint-disable-next-line regexp/no-dupe-characters-character-class
      /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
      // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
      // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
      // with the only syntax, so we have to define 2 different regex patterns.
      /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
      /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
      /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
    ),
    lookbehind: !0,
    greedy: !0,
    inside: {
      "regex-source": {
        pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
        lookbehind: !0,
        alias: "language-regex",
        inside: Prism.languages.regex
      },
      "regex-delimiter": /^\/|\/$/,
      "regex-flags": /^[a-z]+$/
    }
  },
  // This must be declared before keyword because we use "function" inside the look-forward
  "function-variable": {
    pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
    alias: "function"
  },
  parameter: [
    {
      pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
      lookbehind: !0,
      inside: Prism.languages.javascript
    },
    {
      pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
      lookbehind: !0,
      inside: Prism.languages.javascript
    },
    {
      pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
      lookbehind: !0,
      inside: Prism.languages.javascript
    },
    {
      pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
      lookbehind: !0,
      inside: Prism.languages.javascript
    }
  ],
  constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
});
Prism.languages.insertBefore("javascript", "string", {
  hashbang: {
    pattern: /^#!.*/,
    greedy: !0,
    alias: "comment"
  },
  "template-string": {
    pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
    greedy: !0,
    inside: {
      "template-punctuation": {
        pattern: /^`|`$/,
        alias: "string"
      },
      interpolation: {
        pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
        lookbehind: !0,
        inside: {
          "interpolation-punctuation": {
            pattern: /^\$\{|\}$/,
            alias: "punctuation"
          },
          rest: Prism.languages.javascript
        }
      },
      string: /[\s\S]+/
    }
  },
  "string-property": {
    pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
    lookbehind: !0,
    greedy: !0,
    alias: "property"
  }
});
Prism.languages.insertBefore("javascript", "operator", {
  "literal-property": {
    pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
    lookbehind: !0,
    alias: "property"
  }
});
Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(
  /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
  "javascript"
));
Prism.languages.js = Prism.languages.javascript;
Prism.languages.markup = {
  comment: {
    pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
    greedy: !0
  },
  prolog: {
    pattern: /<\?[\s\S]+?\?>/,
    greedy: !0
  },
  doctype: {
    // https://www.w3.org/TR/xml/#NT-doctypedecl
    pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
    greedy: !0,
    inside: {
      "internal-subset": {
        pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
        lookbehind: !0,
        greedy: !0,
        inside: null
        // see below
      },
      string: {
        pattern: /"[^"]*"|'[^']*'/,
        greedy: !0
      },
      punctuation: /^<!|>$|[[\]]/,
      "doctype-tag": /^DOCTYPE/i,
      name: /[^\s<>'"]+/
    }
  },
  cdata: {
    pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
    greedy: !0
  },
  tag: {
    pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
    greedy: !0,
    inside: {
      tag: {
        pattern: /^<\/?[^\s>\/]+/,
        inside: {
          punctuation: /^<\/?/,
          namespace: /^[^\s>\/:]+:/
        }
      },
      "special-attr": [],
      "attr-value": {
        pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
        inside: {
          punctuation: [
            {
              pattern: /^=/,
              alias: "attr-equals"
            },
            {
              pattern: /^(\s*)["']|["']$/,
              lookbehind: !0
            }
          ]
        }
      },
      punctuation: /\/?>/,
      "attr-name": {
        pattern: /[^\s>\/]+/,
        inside: {
          namespace: /^[^\s>\/:]+:/
        }
      }
    }
  },
  entity: [
    {
      pattern: /&[\da-z]{1,8};/i,
      alias: "named-entity"
    },
    /&#x?[\da-f]{1,8};/i
  ]
};
Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity;
Prism.languages.markup.doctype.inside["internal-subset"].inside = Prism.languages.markup;
Prism.hooks.add("wrap", function(t) {
  t.type === "entity" && (t.attributes.title = t.content.replace(/&amp;/, "&"));
});
Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
  /**
   * Adds an inlined language to markup.
   *
   * An example of an inlined language is CSS with `<style>` tags.
   *
   * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
   * case insensitive.
   * @param {string} lang The language key.
   * @example
   * addInlined('style', 'css');
   */
  value: function(e, n) {
    var i = {};
    i["language-" + n] = {
      pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
      lookbehind: !0,
      inside: Prism.languages[n]
    }, i.cdata = /^<!\[CDATA\[|\]\]>$/i;
    var r = {
      "included-cdata": {
        pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
        inside: i
      }
    };
    r["language-" + n] = {
      pattern: /[\s\S]+/,
      inside: Prism.languages[n]
    };
    var s = {};
    s[e] = {
      pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
        return e;
      }), "i"),
      lookbehind: !0,
      greedy: !0,
      inside: r
    }, Prism.languages.insertBefore("markup", "cdata", s);
  }
});
Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
  /**
   * Adds an pattern to highlight languages embedded in HTML attributes.
   *
   * An example of an inlined language is CSS with `style` attributes.
   *
   * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
   * case insensitive.
   * @param {string} lang The language key.
   * @example
   * addAttribute('style', 'css');
   */
  value: function(t, e) {
    Prism.languages.markup.tag.inside["special-attr"].push({
      pattern: RegExp(
        /(^|["'\s])/.source + "(?:" + t + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
        "i"
      ),
      lookbehind: !0,
      inside: {
        "attr-name": /^[^\s=]+/,
        "attr-value": {
          pattern: /=[\s\S]+/,
          inside: {
            value: {
              pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
              lookbehind: !0,
              alias: [e, "language-" + e],
              inside: Prism.languages[e]
            },
            punctuation: [
              {
                pattern: /^=/,
                alias: "attr-equals"
              },
              /"|'/
            ]
          }
        }
      }
    });
  }
});
Prism.languages.html = Prism.languages.markup;
Prism.languages.mathml = Prism.languages.markup;
Prism.languages.svg = Prism.languages.markup;
Prism.languages.xml = Prism.languages.extend("markup", {});
Prism.languages.ssml = Prism.languages.xml;
Prism.languages.atom = Prism.languages.xml;
Prism.languages.rss = Prism.languages.xml;
(function(t) {
  var e = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
  function n(f) {
    return f = f.replace(/<inner>/g, function() {
      return e;
    }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + f + ")");
  }
  var i = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, r = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
    return i;
  }), s = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
  t.languages.markdown = t.languages.extend("markup", {}), t.languages.insertBefore("markdown", "prolog", {
    "front-matter-block": {
      pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
      lookbehind: !0,
      greedy: !0,
      inside: {
        punctuation: /^---|---$/,
        "front-matter": {
          pattern: /\S+(?:\s+\S+)*/,
          alias: ["yaml", "language-yaml"],
          inside: t.languages.yaml
        }
      }
    },
    blockquote: {
      // > ...
      pattern: /^>(?:[\t ]*>)*/m,
      alias: "punctuation"
    },
    table: {
      pattern: RegExp("^" + r + s + "(?:" + r + ")*", "m"),
      inside: {
        "table-data-rows": {
          pattern: RegExp("^(" + r + s + ")(?:" + r + ")*$"),
          lookbehind: !0,
          inside: {
            "table-data": {
              pattern: RegExp(i),
              inside: t.languages.markdown
            },
            punctuation: /\|/
          }
        },
        "table-line": {
          pattern: RegExp("^(" + r + ")" + s + "$"),
          lookbehind: !0,
          inside: {
            punctuation: /\||:?-{3,}:?/
          }
        },
        "table-header-row": {
          pattern: RegExp("^" + r + "$"),
          inside: {
            "table-header": {
              pattern: RegExp(i),
              alias: "important",
              inside: t.languages.markdown
            },
            punctuation: /\|/
          }
        }
      }
    },
    code: [
      {
        // Prefixed by 4 spaces or 1 tab and preceded by an empty line
        pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
        lookbehind: !0,
        alias: "keyword"
      },
      {
        // ```optional language
        // code block
        // ```
        pattern: /^```[\s\S]*?^```$/m,
        greedy: !0,
        inside: {
          "code-block": {
            pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
            lookbehind: !0
          },
          "code-language": {
            pattern: /^(```).+/,
            lookbehind: !0
          },
          punctuation: /```/
        }
      }
    ],
    title: [
      {
        // title 1
        // =======
        // title 2
        // -------
        pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
        alias: "important",
        inside: {
          punctuation: /==+$|--+$/
        }
      },
      {
        // # title 1
        // ###### title 6
        pattern: /(^\s*)#.+/m,
        lookbehind: !0,
        alias: "important",
        inside: {
          punctuation: /^#+|#+$/
        }
      }
    ],
    hr: {
      // ***
      // ---
      // * * *
      // -----------
      pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
      lookbehind: !0,
      alias: "punctuation"
    },
    list: {
      // * item
      // + item
      // - item
      // 1. item
      pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
      lookbehind: !0,
      alias: "punctuation"
    },
    "url-reference": {
      // [id]: http://example.com "Optional title"
      // [id]: http://example.com 'Optional title'
      // [id]: http://example.com (Optional title)
      // [id]: <http://example.com> "Optional title"
      pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
      inside: {
        variable: {
          pattern: /^(!?\[)[^\]]+/,
          lookbehind: !0
        },
        string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
        punctuation: /^[\[\]!:]|[<>]/
      },
      alias: "url"
    },
    bold: {
      // **strong**
      // __strong__
      // allow one nested instance of italic text using the same delimiter
      pattern: n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        content: {
          pattern: /(^..)[\s\S]+(?=..$)/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        punctuation: /\*\*|__/
      }
    },
    italic: {
      // *em*
      // _em_
      // allow one nested instance of bold text using the same delimiter
      pattern: n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        content: {
          pattern: /(^.)[\s\S]+(?=.$)/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        punctuation: /[*_]/
      }
    },
    strike: {
      // ~~strike through~~
      // ~strike~
      // eslint-disable-next-line regexp/strict
      pattern: n(/(~~?)(?:(?!~)<inner>)+\2/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        content: {
          pattern: /(^~~?)[\s\S]+(?=\1$)/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        punctuation: /~~?/
      }
    },
    "code-snippet": {
      // `code`
      // ``code``
      pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
      lookbehind: !0,
      greedy: !0,
      alias: ["code", "keyword"]
    },
    url: {
      // [example](http://example.com "Optional title")
      // [example][id]
      // [example] [id]
      pattern: n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        operator: /^!/,
        content: {
          pattern: /(^\[)[^\]]+(?=\])/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        variable: {
          pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
          lookbehind: !0
        },
        url: {
          pattern: /(^\]\()[^\s)]+/,
          lookbehind: !0
        },
        string: {
          pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
          lookbehind: !0
        }
      }
    }
  }), ["url", "bold", "italic", "strike"].forEach(function(f) {
    ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(d) {
      f !== d && (t.languages.markdown[f].inside.content.inside[d] = t.languages.markdown[d]);
    });
  }), t.hooks.add("after-tokenize", function(f) {
    if (f.language !== "markdown" && f.language !== "md")
      return;
    function d(h) {
      if (!(!h || typeof h == "string"))
        for (var m = 0, g = h.length; m < g; m++) {
          var w = h[m];
          if (w.type !== "code") {
            d(w.content);
            continue;
          }
          var x = w.content[1], _ = w.content[3];
          if (x && _ && x.type === "code-language" && _.type === "code-block" && typeof x.content == "string") {
            var S = x.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
            S = (/[a-z][\w-]*/i.exec(S) || [""])[0].toLowerCase();
            var C = "language-" + S;
            _.alias ? typeof _.alias == "string" ? _.alias = [_.alias, C] : _.alias.push(C) : _.alias = [C];
          }
        }
    }
    d(f.tokens);
  }), t.hooks.add("wrap", function(f) {
    if (f.type === "code-block") {
      for (var d = "", h = 0, m = f.classes.length; h < m; h++) {
        var g = f.classes[h], w = /language-(.+)/.exec(g);
        if (w) {
          d = w[1];
          break;
        }
      }
      var x = t.languages[d];
      if (x)
        f.content = t.highlight(u(f.content), x, d);
      else if (d && d !== "none" && t.plugins.autoloader) {
        var _ = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
        f.attributes.id = _, t.plugins.autoloader.loadLanguages(d, function() {
          var S = document.getElementById(_);
          S && (S.innerHTML = t.highlight(S.textContent, t.languages[d], d));
        });
      }
    }
  });
  var o = RegExp(t.languages.markup.tag.pattern.source, "gi"), a = {
    amp: "&",
    lt: "<",
    gt: ">",
    quot: '"'
  }, l = String.fromCodePoint || String.fromCharCode;
  function u(f) {
    var d = f.replace(o, "");
    return d = d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(h, m) {
      if (m = m.toLowerCase(), m[0] === "#") {
        var g;
        return m[1] === "x" ? g = parseInt(m.slice(2), 16) : g = Number(m.slice(1)), l(g);
      } else {
        var w = a[m];
        return w || h;
      }
    }), d;
  }
  t.languages.md = t.languages.markdown;
})(Prism);
Prism.languages.c = Prism.languages.extend("clike", {
  comment: {
    pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
    greedy: !0
  },
  string: {
    // https://en.cppreference.com/w/c/language/string_literal
    pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
    greedy: !0
  },
  "class-name": {
    pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
    lookbehind: !0
  },
  keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
  function: /\b[a-z_]\w*(?=\s*\()/i,
  number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
  operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
});
Prism.languages.insertBefore("c", "string", {
  char: {
    // https://en.cppreference.com/w/c/language/character_constant
    pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
    greedy: !0
  }
});
Prism.languages.insertBefore("c", "string", {
  macro: {
    // allow for multiline macro definitions
    // spaces after the # character compile fine with gcc
    pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
    lookbehind: !0,
    greedy: !0,
    alias: "property",
    inside: {
      string: [
        {
          // highlight the path of the include statement as a string
          pattern: /^(#\s*include\s*)<[^>]+>/,
          lookbehind: !0
        },
        Prism.languages.c.string
      ],
      char: Prism.languages.c.char,
      comment: Prism.languages.c.comment,
      "macro-name": [
        {
          pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
          lookbehind: !0
        },
        {
          pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
          lookbehind: !0,
          alias: "function"
        }
      ],
      // highlight macro directives as keywords
      directive: {
        pattern: /^(#\s*)[a-z]+/,
        lookbehind: !0,
        alias: "keyword"
      },
      "directive-hash": /^#/,
      punctuation: /##|\\(?=[\r\n])/,
      expression: {
        pattern: /\S[\s\S]*/,
        inside: Prism.languages.c
      }
    }
  }
});
Prism.languages.insertBefore("c", "function", {
  // highlight predefined macros as constants
  constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
});
delete Prism.languages.c.boolean;
(function(t) {
  var e = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
  t.languages.css = {
    comment: /\/\*[\s\S]*?\*\//,
    atrule: {
      pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + e.source + ")*?" + /(?:;|(?=\s*\{))/.source),
      inside: {
        rule: /^@[\w-]+/,
        "selector-function-argument": {
          pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
          lookbehind: !0,
          alias: "selector"
        },
        keyword: {
          pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
          lookbehind: !0
        }
        // See rest below
      }
    },
    url: {
      // https://drafts.csswg.org/css-values-3/#urls
      pattern: RegExp("\\burl\\((?:" + e.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
      greedy: !0,
      inside: {
        function: /^url/i,
        punctuation: /^\(|\)$/,
        string: {
          pattern: RegExp("^" + e.source + "$"),
          alias: "url"
        }
      }
    },
    selector: {
      pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + e.source + ")*(?=\\s*\\{)"),
      lookbehind: !0
    },
    string: {
      pattern: e,
      greedy: !0
    },
    property: {
      pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
      lookbehind: !0
    },
    important: /!important\b/i,
    function: {
      pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
      lookbehind: !0
    },
    punctuation: /[(){};:,]/
  }, t.languages.css.atrule.inside.rest = t.languages.css;
  var n = t.languages.markup;
  n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
})(Prism);
Prism.languages.objectivec = Prism.languages.extend("c", {
  string: {
    pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
    greedy: !0
  },
  keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,
  operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
});
delete Prism.languages.objectivec["class-name"];
Prism.languages.objc = Prism.languages.objectivec;
Prism.languages.sql = {
  comment: {
    pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
    lookbehind: !0
  },
  variable: [
    {
      pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
      greedy: !0
    },
    /@[\w.$]+/
  ],
  string: {
    pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
    greedy: !0,
    lookbehind: !0
  },
  identifier: {
    pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
    greedy: !0,
    lookbehind: !0,
    inside: {
      punctuation: /^`|`$/
    }
  },
  function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,
  // Should we highlight user defined functions too?
  keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
  boolean: /\b(?:FALSE|NULL|TRUE)\b/i,
  number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
  operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
  punctuation: /[;[\]()`,.]/
};
Prism.languages.python = {
  comment: {
    pattern: /(^|[^\\])#.*/,
    lookbehind: !0,
    greedy: !0
  },
  "string-interpolation": {
    pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
    greedy: !0,
    inside: {
      interpolation: {
        // "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
        pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
        lookbehind: !0,
        inside: {
          "format-spec": {
            pattern: /(:)[^:(){}]+(?=\}$)/,
            lookbehind: !0
          },
          "conversion-option": {
            pattern: /![sra](?=[:}]$)/,
            alias: "punctuation"
          },
          rest: null
        }
      },
      string: /[\s\S]+/
    }
  },
  "triple-quoted-string": {
    pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
    greedy: !0,
    alias: "string"
  },
  string: {
    pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
    greedy: !0
  },
  function: {
    pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
    lookbehind: !0
  },
  "class-name": {
    pattern: /(\bclass\s+)\w+/i,
    lookbehind: !0
  },
  decorator: {
    pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
    lookbehind: !0,
    alias: ["annotation", "punctuation"],
    inside: {
      punctuation: /\./
    }
  },
  keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
  builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
  boolean: /\b(?:False|None|True)\b/,
  number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
  operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
  punctuation: /[{}[\];(),.:]/
};
Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python;
Prism.languages.py = Prism.languages.python;
(function(t) {
  for (var e = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, n = 0; n < 2; n++)
    e = e.replace(/<self>/g, function() {
      return e;
    });
  e = e.replace(/<self>/g, function() {
    return /[^\s\S]/.source;
  }), t.languages.rust = {
    comment: [
      {
        pattern: RegExp(/(^|[^\\])/.source + e),
        lookbehind: !0,
        greedy: !0
      },
      {
        pattern: /(^|[^\\:])\/\/.*/,
        lookbehind: !0,
        greedy: !0
      }
    ],
    string: {
      pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,
      greedy: !0
    },
    char: {
      pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,
      greedy: !0
    },
    attribute: {
      pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,
      greedy: !0,
      alias: "attr-name",
      inside: {
        string: null
        // see below
      }
    },
    // Closure params should not be confused with bitwise OR |
    "closure-params": {
      pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,
      lookbehind: !0,
      greedy: !0,
      inside: {
        "closure-punctuation": {
          pattern: /^\||\|$/,
          alias: "punctuation"
        },
        rest: null
        // see below
      }
    },
    "lifetime-annotation": {
      pattern: /'\w+/,
      alias: "symbol"
    },
    "fragment-specifier": {
      pattern: /(\$\w+:)[a-z]+/,
      lookbehind: !0,
      alias: "punctuation"
    },
    variable: /\$\w+/,
    "function-definition": {
      pattern: /(\bfn\s+)\w+/,
      lookbehind: !0,
      alias: "function"
    },
    "type-definition": {
      pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
      lookbehind: !0,
      alias: "class-name"
    },
    "module-declaration": [
      {
        pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
        lookbehind: !0,
        alias: "namespace"
      },
      {
        pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
        lookbehind: !0,
        alias: "namespace",
        inside: {
          punctuation: /::/
        }
      }
    ],
    keyword: [
      // https://github.com/rust-lang/reference/blob/master/src/keywords.md
      /\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,
      // primitives and str
      // https://doc.rust-lang.org/stable/rust-by-example/primitives.html
      /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/
    ],
    // functions can technically start with an upper-case letter, but this will introduce a lot of false positives
    // and Rust's naming conventions recommend snake_case anyway.
    // https://doc.rust-lang.org/1.0.0/style/style/naming/README.html
    function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
    macro: {
      pattern: /\b\w+!/,
      alias: "property"
    },
    constant: /\b[A-Z_][A-Z_\d]+\b/,
    "class-name": /\b[A-Z]\w*\b/,
    namespace: {
      pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
      inside: {
        punctuation: /::/
      }
    },
    // Hex, oct, bin, dec numbers with visual separators and type suffix
    number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
    boolean: /\b(?:false|true)\b/,
    punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
    operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
  }, t.languages.rust["closure-params"].inside.rest = t.languages.rust, t.languages.rust.attribute.inside.string = t.languages.rust.string;
})(Prism);
Prism.languages.swift = {
  comment: {
    // Nested comments are supported up to 2 levels
    pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
    lookbehind: !0,
    greedy: !0
  },
  "string-literal": [
    // https://docs.swift.org/swift-book/LanguageGuide/StringsAndCharacters.html
    {
      pattern: RegExp(
        /(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source
      ),
      lookbehind: !0,
      greedy: !0,
      inside: {
        interpolation: {
          pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/,
          lookbehind: !0,
          inside: null
          // see below
        },
        "interpolation-punctuation": {
          pattern: /^\)|\\\($/,
          alias: "punctuation"
        },
        punctuation: /\\(?=[\r\n])/,
        string: /[\s\S]+/
      }
    },
    {
      pattern: RegExp(
        /(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"
      ),
      lookbehind: !0,
      greedy: !0,
      inside: {
        interpolation: {
          pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,
          lookbehind: !0,
          inside: null
          // see below
        },
        "interpolation-punctuation": {
          pattern: /^\)|\\#+\($/,
          alias: "punctuation"
        },
        string: /[\s\S]+/
      }
    }
  ],
  directive: {
    // directives with conditions
    pattern: RegExp(
      /#/.source + "(?:" + (/(?:elseif|if)\b/.source + "(?:[ 	]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+") + "|" + /(?:else|endif)\b/.source + ")"
    ),
    alias: "property",
    inside: {
      "directive-name": /^#\w+/,
      boolean: /\b(?:false|true)\b/,
      number: /\b\d+(?:\.\d+)*\b/,
      operator: /!|&&|\|\||[<>]=?/,
      punctuation: /[(),]/
    }
  },
  literal: {
    pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,
    alias: "constant"
  },
  "other-directive": {
    pattern: /#\w+\b/,
    alias: "property"
  },
  attribute: {
    pattern: /@\w+/,
    alias: "atrule"
  },
  "function-definition": {
    pattern: /(\bfunc\s+)\w+/,
    lookbehind: !0,
    alias: "function"
  },
  label: {
    // https://docs.swift.org/swift-book/LanguageGuide/ControlFlow.html#ID141
    pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,
    lookbehind: !0,
    alias: "important"
  },
  keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
  boolean: /\b(?:false|true)\b/,
  nil: {
    pattern: /\bnil\b/,
    alias: "constant"
  },
  "short-argument": /\$\d+\b/,
  omit: {
    pattern: /\b_\b/,
    alias: "keyword"
  },
  number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
  // A class name must start with an upper-case letter and be either 1 letter long or contain a lower-case letter.
  "class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,
  function: /\b[a-z_]\w*(?=\s*\()/i,
  constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
  // Operators are generic in Swift. Developers can even create new operators (e.g. +++).
  // https://docs.swift.org/swift-book/ReferenceManual/zzSummaryOfTheGrammar.html#ID481
  // This regex only supports ASCII operators.
  operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,
  punctuation: /[{}[\]();,.:\\]/
};
Prism.languages.swift["string-literal"].forEach(function(t) {
  t.inside.interpolation.inside = Prism.languages.swift;
});
(function(t) {
  t.languages.typescript = t.languages.extend("javascript", {
    "class-name": {
      pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
      lookbehind: !0,
      greedy: !0,
      inside: null
      // see below
    },
    builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
  }), t.languages.typescript.keyword.push(
    /\b(?:abstract|declare|is|keyof|readonly|require)\b/,
    // keywords that have to be followed by an identifier
    /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
    // This is for `import type *, {}`
    /\btype\b(?=\s*(?:[\{*]|$))/
  ), delete t.languages.typescript.parameter, delete t.languages.typescript["literal-property"];
  var e = t.languages.extend("typescript", {});
  delete e["class-name"], t.languages.typescript["class-name"].inside = e, t.languages.insertBefore("typescript", "function", {
    decorator: {
      pattern: /@[$\w\xA0-\uFFFF]+/,
      inside: {
        at: {
          pattern: /^@/,
          alias: "operator"
        },
        function: /^[\s\S]+/
      }
    },
    "generic-function": {
      // e.g. foo<T extends "bar" | "baz">( ...
      pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
      greedy: !0,
      inside: {
        function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
        generic: {
          pattern: /<[\s\S]+/,
          // everything after the first <
          alias: "class-name",
          inside: e
        }
      }
    }
  }), t.languages.ts = t.languages.typescript;
})(Prism);
(function(t) {
  var e = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, i = {
    pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
    lookbehind: !0,
    inside: {
      namespace: {
        pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
        inside: {
          punctuation: /\./
        }
      },
      punctuation: /\./
    }
  };
  t.languages.java = t.languages.extend("clike", {
    string: {
      pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
      lookbehind: !0,
      greedy: !0
    },
    "class-name": [
      i,
      {
        // variables, parameters, and constructor references
        // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
        pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
        lookbehind: !0,
        inside: i.inside
      },
      {
        // class names based on keyword
        // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
        pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + n + /[A-Z]\w*\b/.source),
        lookbehind: !0,
        inside: i.inside
      }
    ],
    keyword: e,
    function: [
      t.languages.clike.function,
      {
        pattern: /(::\s*)[a-z_]\w*/,
        lookbehind: !0
      }
    ],
    number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
    operator: {
      pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
      lookbehind: !0
    },
    constant: /\b[A-Z][A-Z_\d]+\b/
  }), t.languages.insertBefore("java", "string", {
    "triple-quoted-string": {
      // http://openjdk.java.net/jeps/355#Description
      pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
      greedy: !0,
      alias: "string"
    },
    char: {
      pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
      greedy: !0
    }
  }), t.languages.insertBefore("java", "class-name", {
    annotation: {
      pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
      lookbehind: !0,
      alias: "punctuation"
    },
    generics: {
      pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
      inside: {
        "class-name": i,
        keyword: e,
        punctuation: /[<>(),.:]/,
        operator: /[?&|]/
      }
    },
    import: [
      {
        pattern: RegExp(/(\bimport\s+)/.source + n + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
        lookbehind: !0,
        inside: {
          namespace: i.inside.namespace,
          punctuation: /\./,
          operator: /\*/,
          "class-name": /\w+/
        }
      },
      {
        pattern: RegExp(/(\bimport\s+static\s+)/.source + n + /(?:\w+|\*)(?=\s*;)/.source),
        lookbehind: !0,
        alias: "static",
        inside: {
          namespace: i.inside.namespace,
          static: /\b\w+$/,
          punctuation: /\./,
          operator: /\*/,
          "class-name": /\w+/
        }
      }
    ],
    namespace: {
      pattern: RegExp(
        /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
          return e.source;
        })
      ),
      lookbehind: !0,
      inside: {
        punctuation: /\./
      }
    }
  });
})(Prism);
(function(t) {
  var e = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, n = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
    return e.source;
  });
  t.languages.cpp = t.languages.extend("c", {
    "class-name": [
      {
        pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
          return e.source;
        })),
        lookbehind: !0
      },
      // This is intended to capture the class name of method implementations like:
      //   void foo::bar() const {}
      // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
      // it starts with an uppercase letter. This approximation should give decent results.
      /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
      // This will capture the class name before destructors like:
      //   Foo::~Foo() {}
      /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
      // This also intends to capture the class name of method implementations but here the class has template
      // parameters, so it can't be a namespace (until C++ adds generic namespaces).
      /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
    ],
    keyword: e,
    number: {
      pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
      greedy: !0
    },
    operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
    boolean: /\b(?:false|true)\b/
  }), t.languages.insertBefore("cpp", "string", {
    module: {
      // https://en.cppreference.com/w/cpp/language/modules
      pattern: RegExp(
        /(\b(?:import|module)\s+)/.source + "(?:" + // header-name
        /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + // module name or partition or both
        /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
          return n;
        }) + ")"
      ),
      lookbehind: !0,
      greedy: !0,
      inside: {
        string: /^[<"][\s\S]+/,
        operator: /:/,
        punctuation: /\./
      }
    },
    "raw-string": {
      pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
      alias: "string",
      greedy: !0
    }
  }), t.languages.insertBefore("cpp", "keyword", {
    "generic-function": {
      pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
      inside: {
        function: /^\w+/,
        generic: {
          pattern: /<[\s\S]+/,
          alias: "class-name",
          inside: t.languages.cpp
        }
      }
    }
  }), t.languages.insertBefore("cpp", "operator", {
    "double-colon": {
      pattern: /::/,
      alias: "punctuation"
    }
  }), t.languages.insertBefore("cpp", "class-name", {
    // the base clause is an optional list of parent classes
    // https://en.cppreference.com/w/cpp/language/class
    "base-clause": {
      pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
      lookbehind: !0,
      greedy: !0,
      inside: t.languages.extend("cpp", {})
    }
  }), t.languages.insertBefore("inside", "double-colon", {
    // All untokenized words that are not namespaces should be class names
    "class-name": /\b[a-z_]\w*\b(?!\s*::)/i
  }, t.languages.cpp["base-clause"]);
})(Prism);
var wh = UPe, lf = lt, be = N;
let LL = (t) => t != null && wh.languages.hasOwnProperty(t) ? t : void 0;
function GV(t, e) {
  for (let n of t.childNodes) {
    if (lf.isHTMLElement(n) && n.tagName === e) return !0;
    GV(n, e);
  }
  return !1;
}
let kh = class KV extends be.ElementNode {
  static getType() {
    return "code";
  }
  static clone(e) {
    return new KV(e.__language, e.__key);
  }
  constructor(e, n) {
    super(n), this.__language = LL(e);
  }
  createDOM(e) {
    let n = document.createElement("code");
    return lf.addClassNamesToElement(n, e.theme.code), n.setAttribute("spellcheck", "false"), (e = this.getLanguage()) && n.setAttribute("data-highlight-language", e), n;
  }
  updateDOM(e, n) {
    let i = this.__language;
    return e = e.__language, i ? i !== e && n.setAttribute("data-highlight-language", i) : e && n.removeAttribute("data-highlight-language"), !1;
  }
  exportDOM() {
    let e = document.createElement("pre");
    e.setAttribute("spellcheck", "false");
    let n = this.getLanguage();
    return n && e.setAttribute("data-highlight-language", n), { element: e };
  }
  static importDOM() {
    return { code: (e) => e.textContent != null && (/\r?\n/.test(e.textContent) || GV(e, "BR")) ? { conversion: RL, priority: 1 } : null, div: () => ({ conversion: ZPe, priority: 1 }), pre: () => ({ conversion: RL, priority: 0 }), table: (e) => JO(e) ? { conversion: qPe, priority: 3 } : null, td: (e) => {
      let n = e.closest("table");
      return e.classList.contains("js-file-line") ? { conversion: YPe, priority: 3 } : n && JO(n) ? { conversion: jL, priority: 3 } : null;
    }, tr: (e) => (e = e.closest("table")) && JO(e) ? { conversion: jL, priority: 3 } : null };
  }
  static importJSON(e) {
    let n = Op(e.language);
    return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n;
  }
  exportJSON() {
    return { ...super.exportJSON(), language: this.getLanguage(), type: "code", version: 1 };
  }
  insertNewAfter(e, n = !0) {
    var i = this.getChildren(), r = i.length;
    if (2 <= r && i[r - 1].getTextContent() === `
` && i[r - 2].getTextContent() === `
` && e.isCollapsed() && e.anchor.key === this.__key && e.anchor.offset === r) return i[r - 1].remove(), i[r - 2].remove(), e = be.$createParagraphNode(), this.insertAfter(e, n), e;
    let { anchor: s, focus: o } = e;
    if (n = (s.isBefore(o) ? s : o).getNode(), be.$isTextNode(n)) {
      for (r = Fu(n), i = []; ; ) if (be.$isTabNode(r)) i.push(be.$createTabNode()), r = r.getNextSibling();
      else if (Hn(r)) {
        for (var a = 0, l = r.getTextContent(), u = r.getTextContentSize(); a < u && l[a] === " "; a++) ;
        if (a !== 0 && i.push(nx(" ".repeat(a))), a !== u) break;
        r = r.getNextSibling();
      } else break;
      r = n.splitText(s.offset)[0], a = s.offset === 0 ? 0 : 1, a = r.getIndexWithinParent() + a, l = n.getParentOrThrow(), u = [be.$createLineBreakNode(), ...i], l.splice(a, 0, u), (i = i[i.length - 1]) ? i.select() : s.offset === 0 ? r.selectPrevious() : r.getNextSibling().selectNext(0, 0);
    }
    return vo(n) && ({ offset: e } = e.anchor, n.splice(e, 0, [be.$createLineBreakNode()]), n.select(e + 1, e + 1)), null;
  }
  canIndent() {
    return !1;
  }
  collapseAtStart() {
    let e = be.$createParagraphNode();
    return this.getChildren().forEach((n) => e.append(n)), this.replace(e), !0;
  }
  setLanguage(e) {
    this.getWritable().__language = LL(e);
  }
  getLanguage() {
    return this.getLatest().__language;
  }
};
function Op(t) {
  return be.$applyNodeReplacement(new kh(t));
}
function vo(t) {
  return t instanceof kh;
}
function RL(t) {
  let e;
  return lf.isHTMLElement(t) && (e = t.getAttribute("data-highlight-language")), { node: Op(e) };
}
function ZPe(t) {
  let e = t.style.fontFamily.match("monospace") !== null;
  return e || VPe(t) ? { after: (n) => {
    let i = t.parentNode;
    return i != null && t !== i.lastChild && n.push(be.$createLineBreakNode()), n;
  }, node: e ? Op() : null } : { node: null };
}
function qPe() {
  return { node: Op() };
}
function jL() {
  return { node: null };
}
function YPe(t) {
  return { after: (e) => (t.parentNode && t.parentNode.nextSibling && e.push(be.$createLineBreakNode()), e), node: null };
}
function VPe(t) {
  for (t = t.parentElement; t !== null; ) {
    if (t.style.fontFamily.match("monospace") !== null) return !0;
    t = t.parentElement;
  }
  return !1;
}
function JO(t) {
  return t.classList.contains("js-file-line-container");
}
let JV = { c: "C", clike: "C-like", cpp: "C++", css: "CSS", html: "HTML", java: "Java", js: "JavaScript", markdown: "Markdown", objc: "Objective-C", plain: "Plain Text", py: "Python", rust: "Rust", sql: "SQL", swift: "Swift", typescript: "TypeScript", xml: "XML" }, eX = { cpp: "cpp", java: "java", javascript: "js", md: "markdown", plaintext: "plain", python: "py", text: "plain", ts: "typescript" };
function tX(t) {
  return eX[t] || t;
}
let P0 = class nX extends be.TextNode {
  constructor(e, n, i) {
    super(e, i), this.__highlightType = n;
  }
  static getType() {
    return "code-highlight";
  }
  static clone(e) {
    return new nX(e.__text, e.__highlightType || void 0, e.__key);
  }
  getHighlightType() {
    return this.getLatest().__highlightType;
  }
  canHaveFormat() {
    return !1;
  }
  createDOM(e) {
    let n = super.createDOM(e);
    return e = eS(e.theme, this.__highlightType), lf.addClassNamesToElement(n, e), n;
  }
  updateDOM(e, n, i) {
    let r = super.updateDOM(e, n, i);
    return e = eS(i.theme, e.__highlightType), i = eS(i.theme, this.__highlightType), e !== i && (e && lf.removeClassNamesFromElement(n, e), i && lf.addClassNamesToElement(n, i)), r;
  }
  static importJSON(e) {
    let n = nx(e.text, e.highlightType);
    return n.setFormat(e.format), n.setDetail(e.detail), n.setMode(e.mode), n.setStyle(e.style), n;
  }
  exportJSON() {
    return { ...super.exportJSON(), highlightType: this.getHighlightType(), type: "code-highlight", version: 1 };
  }
  setFormat() {
    return this;
  }
  isParentRequired() {
    return !0;
  }
  createParentElementNode() {
    return Op();
  }
};
function eS(t, e) {
  return e && t && t.codeHighlight && t.codeHighlight[e];
}
function nx(t, e) {
  return be.$applyNodeReplacement(new P0(t, e));
}
function Hn(t) {
  return t instanceof P0;
}
function Fu(t) {
  let e = t;
  for (; Hn(t) || be.$isTabNode(t); ) e = t, t = t.getPreviousSibling();
  return e;
}
function xh(t) {
  let e = t;
  for (; Hn(t) || be.$isTabNode(t); ) e = t, t = t.getNextSibling();
  return e;
}
let iX = { defaultLanguage: "javascript", tokenize(t, e) {
  return wh.tokenize(t, wh.languages[e || ""] || wh.languages[this.defaultLanguage]);
} };
function rX(t, e) {
  let n = null;
  var i = null, r = t;
  let s = e, o = t.getTextContent();
  for (; ; ) {
    if (s === 0) {
      if (r = r.getPreviousSibling(), r === null) break;
      if (!(Hn(r) || be.$isTabNode(r) || be.$isLineBreakNode(r))) throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");
      if (be.$isLineBreakNode(r)) {
        n = { node: r, offset: 1 };
        break;
      }
      s = Math.max(0, r.getTextContentSize() - 1), o = r.getTextContent();
    } else s--;
    let a = o[s];
    Hn(r) && a !== " " && (i = { node: r, offset: s });
  }
  if (i !== null) return i;
  if (i = null, e < t.getTextContentSize() ? Hn(t) && (i = t.getTextContent()[e]) : (r = t.getNextSibling(), Hn(r) && (i = r.getTextContent()[0])), i !== null && i !== " ") return n;
  e: for (i = t, r = t.getTextContent(), t = t.getTextContentSize(); ; ) {
    if (!Hn(i) || e === t) {
      if (i = i.getNextSibling(), i === null || be.$isLineBreakNode(i)) {
        t = null;
        break e;
      }
      Hn(i) && (e = 0, r = i.getTextContent(), t = i.getTextContentSize());
    }
    if (Hn(i)) {
      if (r[e] !== " ") {
        t = { node: i, offset: e };
        break e;
      }
      e++;
    }
  }
  return t !== null ? t : n;
}
function sX(t) {
  if (t = xh(t), be.$isLineBreakNode(t)) throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");
  return t;
}
function FL(t, e, n) {
  let i = t.getParent();
  vo(i) ? oX(i, e, n) : Hn(t) && t.replace(be.$createTextNode(t.__text));
}
let tS = /* @__PURE__ */ new Set();
function oX(t, e, n) {
  let i = t.getKey();
  tS.has(i) || (tS.add(i), t.getLanguage() === void 0 && t.setLanguage(n.defaultLanguage), e.update(() => {
    XPe(i, () => {
      var r = be.$getNodeByKey(i);
      if (!vo(r) || !r.isAttached()) return !1;
      var s = r.getTextContent();
      s = n.tokenize(s, r.getLanguage() || n.defaultLanguage), s = b6(s);
      var o = r.getChildren();
      for (r = 0; r < o.length && BL(o[r], s[r]); ) r++;
      var a = o.length;
      let l = s.length, u = Math.min(a, l) - r, f = 0;
      for (; f < u; ) if (f++, !BL(o[a - f], s[l - f])) {
        f--;
        break;
      }
      o = r, a -= f, s = s.slice(r, l - f);
      let { from: d, to: h, nodesForReplacement: m } = { from: o, nodesForReplacement: s, to: a };
      return d !== h || m.length ? (t.splice(d, h - d, m), !0) : !1;
    });
  }, { onUpdate: () => {
    tS.delete(i);
  }, skipTransforms: !0 }));
}
function b6(t, e) {
  let n = [];
  for (let i of t) if (typeof i == "string") {
    t = i.split(/(\n|\t)/);
    let r = t.length;
    for (let s = 0; s < r; s++) {
      let o = t[s];
      o === `
` || o === `\r
` ? n.push(be.$createLineBreakNode()) : o === "	" ? n.push(be.$createTabNode()) : 0 < o.length && n.push(nx(o, e));
    }
  } else ({ content: t } = i), typeof t == "string" ? n.push(...b6([t], i.type)) : Array.isArray(t) && n.push(...b6(t, i.type));
  return n;
}
function XPe(t, e) {
  if (t = be.$getNodeByKey(t), vo(t) && t.isAttached()) {
    var n = be.$getSelection();
    if (be.$isRangeSelection(n)) {
      n = n.anchor;
      var i = n.offset, r = n.type === "element" && be.$isLineBreakNode(t.getChildAtIndex(n.offset - 1)), s = 0;
      if (!r) {
        let o = n.getNode();
        s = i + o.getPreviousSiblings().reduce((a, l) => a + l.getTextContentSize(), 0);
      }
      e() && (r ? n.getNode().select(i, i) : t.getChildren().some((o) => {
        let a = be.$isTextNode(o);
        if (a || be.$isLineBreakNode(o)) {
          let l = o.getTextContentSize();
          if (a && l >= s) return o.select(s, s), !0;
          s -= l;
        }
        return !1;
      }));
    } else e();
  }
}
function BL(t, e) {
  return Hn(t) && Hn(e) && t.__text === e.__text && t.__highlightType === e.__highlightType || be.$isTabNode(t) && be.$isTabNode(e) || be.$isLineBreakNode(t) && be.$isLineBreakNode(e);
}
function ix(t) {
  if (!be.$isRangeSelection(t)) return !1;
  var e = t.anchor.getNode();
  return t = t.focus.getNode(), e.is(t) && vo(e) ? !0 : (e = e.getParent(), vo(e) && e.is(t.getParent()));
}
function aX(t) {
  t = t.getNodes();
  let e = [[]];
  if (t.length === 1 && vo(t[0])) return e;
  let n = e[0];
  for (let i = 0; i < t.length; i++) {
    let r = t[i];
    if (!(Hn(r) || be.$isTabNode(r) || be.$isLineBreakNode(r))) throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");
    be.$isLineBreakNode(r) ? i !== 0 && 0 < n.length && (n = [], e.push(n)) : n.push(r);
  }
  return e;
}
function GPe(t) {
  var e = be.$getSelection();
  if (!be.$isRangeSelection(e) || !ix(e)) return null;
  let n = t ? be.OUTDENT_CONTENT_COMMAND : be.INDENT_CONTENT_COMMAND;
  if (t = t ? be.OUTDENT_CONTENT_COMMAND : be.INSERT_TAB_COMMAND, 1 < aX(e).length) return n;
  var i = e.getNodes()[0];
  if (!(vo(i) || Hn(i) || be.$isTabNode(i) || be.$isLineBreakNode(i))) throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");
  if (vo(i)) return n;
  let r = Fu(i);
  i = xh(i);
  var s = e.anchor;
  let o = e.focus;
  return o.isBefore(s) ? e = o : (e = s, s = o), r !== null && i !== null && e.key === r.getKey() && e.offset === 0 && s.key === i.getKey() && s.offset === i.getTextContentSize() ? n : t;
}
function zL(t) {
  var e = be.$getSelection();
  if (!be.$isRangeSelection(e) || !ix(e)) return !1;
  var n = aX(e);
  let i = n.length;
  if (1 < n.length) {
    for (e = 0; e < i; e++) {
      var r = n[e];
      0 < r.length && (r = r[0], e === 0 && (r = Fu(r)), r !== null && (t === be.INDENT_CONTENT_COMMAND ? r.insertBefore(be.$createTabNode()) : be.$isTabNode(r) && r.remove()));
    }
    return !0;
  }
  if (n = e.getNodes()[0], !(vo(n) || Hn(n) || be.$isTabNode(n) || be.$isLineBreakNode(n))) throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");
  if (vo(n)) return t === be.INDENT_CONTENT_COMMAND && e.insertNodes([be.$createTabNode()]), !0;
  if (n = Fu(n), n === null) throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");
  return t === be.INDENT_CONTENT_COMMAND ? be.$isLineBreakNode(n) ? n.insertAfter(be.$createTabNode()) : n.insertBefore(be.$createTabNode()) : be.$isTabNode(n) && n.remove(), !0;
}
function WL(t, e) {
  let n = be.$getSelection();
  if (!be.$isRangeSelection(n)) return !1;
  let { anchor: i, focus: r } = n, s = i.offset, o = r.offset, a = i.getNode(), l = r.getNode();
  var u = t === be.KEY_ARROW_UP_COMMAND;
  if (!ix(n) || !Hn(a) && !be.$isTabNode(a) || !Hn(l) && !be.$isTabNode(l)) return !1;
  if (!e.altKey) {
    if (n.isCollapsed()) {
      if (t = a.getParentOrThrow(), u && s === 0 && a.getPreviousSibling() === null) {
        if (t.getPreviousSibling() === null) return t.selectPrevious(), e.preventDefault(), !0;
      } else if (!u && s === a.getTextContentSize() && a.getNextSibling() === null && t.getNextSibling() === null) return t.selectNext(), e.preventDefault(), !0;
    }
    return !1;
  }
  let f;
  if (a.isBefore(l)) {
    var d = Fu(a);
    f = xh(l);
  } else d = Fu(l), f = xh(a);
  if (d == null || f == null) return !1;
  let h = d.getNodesBetween(f);
  for (let g = 0; g < h.length; g++) {
    let w = h[g];
    if (!Hn(w) && !be.$isTabNode(w) && !be.$isLineBreakNode(w)) return !1;
  }
  if (e.preventDefault(), e.stopPropagation(), e = u ? d.getPreviousSibling() : f.getNextSibling(), !be.$isLineBreakNode(e) || (d = u ? e.getPreviousSibling() : e.getNextSibling(), d == null)) return !0;
  u = Hn(d) || be.$isTabNode(d) || be.$isLineBreakNode(d) ? u ? Fu(d) : xh(d) : null;
  let m = u ?? d;
  return e.remove(), h.forEach((g) => g.remove()), t === be.KEY_ARROW_UP_COMMAND ? (h.forEach((g) => m.insertBefore(g)), m.insertBefore(e)) : (m.insertAfter(e), m = e, h.forEach((g) => {
    m.insertAfter(g), m = g;
  })), n.setTextNodeRange(a, s, l, o), !0;
}
function HL(t, e) {
  let n = be.$getSelection();
  if (!be.$isRangeSelection(n)) return !1;
  let { anchor: i, focus: r } = n;
  var s = i.getNode();
  let o = r.getNode();
  if (t = t === be.MOVE_TO_START, !Hn(s) && !be.$isTabNode(s) || !Hn(o) && !be.$isTabNode(o)) return !1;
  if (t) if (s = rX(o, r.offset), s !== null) {
    let { node: a, offset: l } = s;
    be.$isLineBreakNode(a) ? a.selectNext(0, 0) : n.setTextNodeRange(a, l, a, l);
  } else o.getParentOrThrow().selectStart();
  else sX(o).select();
  return e.preventDefault(), e.stopPropagation(), !0;
}
Oi.$createCodeHighlightNode = nx;
Oi.$createCodeNode = Op;
Oi.$isCodeHighlightNode = Hn;
Oi.$isCodeNode = vo;
Oi.CODE_LANGUAGE_FRIENDLY_NAME_MAP = JV;
Oi.CODE_LANGUAGE_MAP = eX;
Oi.CodeHighlightNode = P0;
Oi.CodeNode = kh;
Oi.DEFAULT_CODE_LANGUAGE = "javascript";
Oi.PrismTokenizer = iX;
Oi.getCodeLanguages = () => Object.keys(wh.languages).filter((t) => typeof wh.languages[t] != "function").sort();
Oi.getDefaultCodeLanguage = () => "javascript";
Oi.getEndOfCodeInLine = sX;
Oi.getFirstCodeNodeOfLine = Fu;
Oi.getLanguageFriendlyName = function(t) {
  return t = tX(t), JV[t] || t;
};
Oi.getLastCodeNodeOfLine = xh;
Oi.getStartOfCodeInLine = rX;
Oi.normalizeCodeLang = tX;
Oi.registerCodeHighlighting = function(t, e) {
  if (!t.hasNodes([kh, P0])) throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");
  return e == null && (e = iX), lf.mergeRegister(
    t.registerMutationListener(kh, (n) => {
      t.update(() => {
        for (let [s, o] of n) if (o !== "destroyed") {
          var i = be.$getNodeByKey(s);
          if (i !== null) e: {
            var r = i;
            if (i = t.getElementByKey(r.getKey()), i === null) break e;
            r = r.getChildren();
            let a = r.length;
            if (a === i.__cachedChildrenLength) break e;
            i.__cachedChildrenLength = a;
            let l = "1", u = 1;
            for (let f = 0; f < a; f++) be.$isLineBreakNode(r[f]) && (l += `
` + ++u);
            i.setAttribute("data-gutter", l);
          }
        }
      });
    }),
    t.registerNodeTransform(kh, (n) => oX(n, t, e)),
    t.registerNodeTransform(be.TextNode, (n) => FL(n, t, e)),
    t.registerNodeTransform(P0, (n) => FL(n, t, e)),
    t.registerCommand(be.KEY_TAB_COMMAND, (n) => {
      let i = GPe(n.shiftKey);
      return i === null ? !1 : (n.preventDefault(), t.dispatchCommand(i, void 0), !0);
    }, be.COMMAND_PRIORITY_LOW),
    t.registerCommand(be.INSERT_TAB_COMMAND, () => {
      let n = be.$getSelection();
      return ix(n) ? (be.$insertNodes([be.$createTabNode()]), !0) : !1;
    }, be.COMMAND_PRIORITY_LOW),
    t.registerCommand(be.INDENT_CONTENT_COMMAND, () => zL(be.INDENT_CONTENT_COMMAND), be.COMMAND_PRIORITY_LOW),
    t.registerCommand(be.OUTDENT_CONTENT_COMMAND, () => zL(be.OUTDENT_CONTENT_COMMAND), be.COMMAND_PRIORITY_LOW),
    t.registerCommand(be.KEY_ARROW_UP_COMMAND, (n) => WL(be.KEY_ARROW_UP_COMMAND, n), be.COMMAND_PRIORITY_LOW),
    t.registerCommand(be.KEY_ARROW_DOWN_COMMAND, (n) => WL(be.KEY_ARROW_DOWN_COMMAND, n), be.COMMAND_PRIORITY_LOW),
    t.registerCommand(be.MOVE_TO_END, (n) => HL(be.MOVE_TO_END, n), be.COMMAND_PRIORITY_LOW),
    t.registerCommand(be.MOVE_TO_START, (n) => HL(be.MOVE_TO_START, n), be.COMMAND_PRIORITY_LOW)
  );
};
const KPe = Oi;
var JPe = KPe, Bt = N, Lg = JPe, Zi = ni, Mu = rn, eIe = lt, nS = ki;
function y6(t, e) {
  let n = {};
  for (let i of t) t = e(i), n[t] ? n[t].push(i) : n[t] = [i];
  return n;
}
function UT(t) {
  return t = y6(t, (e) => e.type), { element: t.element || [], textFormat: t["text-format"] || [], textMatch: t["text-match"] || [] };
}
let pk = /[!-/:-@[-`{-~\s]/;
function tIe(t) {
  let e = UT(t), n = e.textFormat.filter((i) => i.format.length === 1);
  return (i) => {
    let r = [];
    i = (i || Bt.$getRoot()).getChildren();
    for (let s of i) i = nIe(s, e.element, n, e.textMatch), i != null && r.push(i);
    return r.join(`

`);
  };
}
function nIe(t, e, n, i) {
  for (let r of e) if (e = r.export(t, (s) => mk(s, n, i)), e != null) return e;
  return Bt.$isElementNode(t) ? mk(t, n, i) : Bt.$isDecoratorNode(t) ? t.getTextContent() : null;
}
function mk(t, e, n) {
  let i = [];
  t = t.getChildren();
  e: for (let r of t) {
    for (let s of n) if (t = s.export(r, (o) => mk(o, e, n), (o, a) => QL(o, a, e)), t != null) {
      i.push(t);
      continue e;
    }
    Bt.$isLineBreakNode(r) ? i.push(`
`) : Bt.$isTextNode(r) ? i.push(QL(r, r.getTextContent(), e)) : Bt.$isElementNode(r) ? i.push(mk(r, e, n)) : Bt.$isDecoratorNode(r) && i.push(r.getTextContent());
  }
  return i.join("");
}
function QL(t, e, n) {
  let i = e.trim(), r = i, s = /* @__PURE__ */ new Set();
  for (let a of n) {
    n = a.format[0];
    let l = a.tag;
    if (iS(t, n) && !s.has(n)) {
      s.add(n);
      var o = UL(t, !0);
      iS(o, n) || (r = l + r), o = UL(t, !1), iS(o, n) || (r += l);
    }
  }
  return e.replace(i, () => r);
}
function UL(t, e) {
  let n = e ? t.getPreviousSibling() : t.getNextSibling();
  for (n || (t = t.getParentOrThrow(), t.isInline() && (n = e ? t.getPreviousSibling() : t.getNextSibling())); n; ) {
    if (Bt.$isElementNode(n)) {
      if (!n.isInline()) break;
      if (t = e ? n.getLastDescendant() : n.getFirstDescendant(), Bt.$isTextNode(t)) return t;
      n = e ? n.getPreviousSibling() : n.getNextSibling();
    }
    if (Bt.$isTextNode(n)) return n;
    if (!Bt.$isElementNode(n)) break;
  }
  return null;
}
function iS(t, e) {
  return Bt.$isTextNode(t) && t.hasFormat(e);
}
let Sp = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", iIe = Sp && "documentMode" in document ? document.documentMode : null;
Sp && "InputEvent" in window && !iIe && "getTargetRanges" in new window.InputEvent("input");
let ZL = Sp && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), qL = Sp && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, rIe = Sp && /^(?=.*Chrome).*/i.test(navigator.userAgent), YL = Sp && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !rIe, sIe = /^\s{0,3}$/, VL = /^```(\w{1,10})?\s?$/;
function oIe(t) {
  let e = UT(t), n = lIe(e.textFormat);
  return (i, r) => {
    i = i.split(`
`);
    var s = i.length;
    r = r || Bt.$getRoot(), r.clear();
    for (let g = 0; g < s; g++) {
      var o = i[g];
      e: {
        var a = i, l = g, u = r, f = a[l].match(VL);
        if (f) {
          for (var d = l, h = a.length; ++d < h; ) if (a[d].match(VL)) {
            f = Lg.$createCodeNode(f[1]), a = Bt.$createTextNode(a.slice(l + 1, d).join(`
`)), f.append(a), u.append(f), u = [f, d];
            break e;
          }
        }
        u = [null, l];
      }
      let [w, x] = u;
      if (w != null) g = x;
      else {
        u = o, h = r;
        var m = e.element;
        d = n, a = e.textMatch, l = u.trim(), f = Bt.$createTextNode(l), o = Bt.$createParagraphNode(), o.append(f), h.append(o);
        for (let { regExp: _, replace: S } of m) if (h = u.match(_)) {
          f.setTextContent(u.slice(h[0].length)), S(o, [f], h, !0);
          break;
        }
        Iy(f, d, a), o.isAttached() && 0 < l.length && (u = o.getPreviousSibling(), Bt.$isParagraphNode(u) || Mu.$isQuoteNode(u) || Zi.$isListNode(u)) && (d = u, Zi.$isListNode(u) && (u = u.getLastDescendant(), d = u == null ? null : eIe.$findMatchingParent(u, Zi.$isListItemNode)), d != null && 0 < d.getTextContentSize() && (d.splice(d.getChildrenSize(), 0, [Bt.$createLineBreakNode(), ...o.getChildren()]), o.remove()));
      }
    }
    i = r.getChildren();
    for (let g of i) i = g, Bt.$isParagraphNode(i) ? (s = i.getFirstChild(), i = s == null || i.getChildrenSize() === 1 && Bt.$isTextNode(s) && sIe.test(s.getTextContent())) : i = !1, i && 1 < r.getChildrenSize() && g.remove();
    Bt.$getSelection() !== null && r.selectEnd();
  };
}
function Iy(t, e, n) {
  var i = t.getTextContent();
  let r = aIe(i, e);
  if (r) {
    var s, o;
    if (r[0] === i) var a = t;
    else {
      i = r.index || 0;
      let l = i + r[0].length;
      i === 0 ? [a, s] = t.splitText(l) : [o, a, s] = t.splitText(i, l);
    }
    if (a.setTextContent(r[2]), t = e.transformersByTag[r[1]]) for (let l of t.format) a.hasFormat(l) || a.toggleFormat(l);
    a.hasFormat("code") || Iy(a, e, n), o && Iy(o, e, n), s && Iy(s, e, n);
  } else lX(t, n);
}
function lX(t, e) {
  e: for (; t; ) {
    for (let n of e) {
      let i = t.getTextContent().match(n.importRegExp);
      if (!i) continue;
      let r = i.index || 0, s = r + i[0].length, o, a;
      r === 0 ? [o, t] = t.splitText(s) : [, o, a] = t.splitText(r, s), a && lX(a, e), n.replace(o, i);
      continue e;
    }
    break;
  }
}
function aIe(t, e) {
  var n = t.match(e.openTagsRegExp);
  if (n == null) return null;
  for (let s of n) {
    var i = s.replace(/^\s/, "");
    if (n = e.fullMatchRegExpByTag[i], n != null && (n = t.match(n), i = e.transformersByTag[i], n != null && i != null)) {
      if (i.intraword !== !1) return n;
      var { index: r = 0 } = n;
      if (i = t[r - 1], r = t[r + n[0].length], !(i && !pk.test(i) || r && !pk.test(r))) return n;
    }
  }
  return null;
}
function lIe(t) {
  let e = {}, n = {}, i = [];
  for (let r of t) {
    ({ tag: t } = r), e[t] = r;
    let s = t.replace(/(\*|\^|\+)/g, "\\$1");
    i.push(s), n[t] = ZL || qL || YL ? new RegExp(`(${s})(?![${s}\\s])(.*?[^${s}\\s])${s}(?!${s})`) : new RegExp(`(?<![\\\\${s}])(${s})((\\\\${s})?.*?[^${s}\\s](\\\\${s})?)((?<!\\\\)|(?<=\\\\\\\\))(${s})(?![\\\\${s}])`);
  }
  return { fullMatchRegExpByTag: n, openTagsRegExp: new RegExp((ZL || qL || YL ? "" : "(?<![\\\\])") + "(" + i.join("|") + ")", "g"), transformersByTag: e };
}
function XL(t, e, n) {
  let i = n.length;
  for (; e >= i; e--) {
    let r = e - i;
    if (uX(t, r, n, 0, i) && t[r + i] !== " ") return r;
  }
  return -1;
}
function uX(t, e, n, i, r) {
  for (let s = 0; s < r; s++) if (t[e + s] !== n[i + s]) return !1;
  return !0;
}
let cX = (t) => (e, n, i) => {
  i = t(i), i.append(...n), e.replace(i), i.select(0, 0);
}, ZT = (t) => (e, n, i) => {
  var r = e.getPreviousSibling(), s = e.getNextSibling();
  const o = Zi.$createListItemNode(t === "check" ? i[3] === "x" : void 0);
  Zi.$isListNode(s) && s.getListType() === t ? (r = s.getFirstChild(), r !== null ? r.insertBefore(o) : s.append(o), e.remove()) : Zi.$isListNode(r) && r.getListType() === t ? (r.append(o), e.remove()) : (s = Zi.$createListNode(t, t === "number" ? Number(i[2]) : void 0), s.append(o), e.replace(s)), o.append(...n), o.select(0, 0), (e = Math.floor(i[1].length / 4)) && o.setIndent(e);
}, rx = (t, e, n) => {
  const i = [];
  var r = t.getChildren();
  let s = 0;
  for (const a of r) if (Zi.$isListItemNode(a)) {
    if (a.getChildrenSize() === 1 && (r = a.getFirstChild(), Zi.$isListNode(r))) {
      i.push(rx(r, e, n + 1));
      continue;
    }
    r = " ".repeat(4 * n);
    var o = t.getListType();
    o = o === "number" ? `${t.getStart() + s}. ` : o === "check" ? `- [${a.getChecked() ? "x" : " "}] ` : "- ", i.push(r + o + e(a)), s++;
  }
  return i.join(`
`);
}, fX = { dependencies: [Mu.HeadingNode], export: (t, e) => {
  if (!Mu.$isHeadingNode(t)) return null;
  const n = Number(t.getTag().slice(1));
  return "#".repeat(n) + " " + e(t);
}, regExp: /^(#{1,6})\s/, replace: cX((t) => Mu.$createHeadingNode("h" + t[1].length)), type: "element" }, dX = { dependencies: [Mu.QuoteNode], export: (t, e) => {
  if (!Mu.$isQuoteNode(t)) return null;
  t = e(t).split(`
`), e = [];
  for (const n of t) e.push("> " + n);
  return e.join(`
`);
}, regExp: /^>\s/, replace: (t, e, n, i) => {
  if (i && (n = t.getPreviousSibling(), Mu.$isQuoteNode(n))) {
    n.splice(n.getChildrenSize(), 0, [Bt.$createLineBreakNode(), ...e]), n.select(0, 0), t.remove();
    return;
  }
  n = Mu.$createQuoteNode(), n.append(...e), t.replace(n), n.select(0, 0);
}, type: "element" }, hX = { dependencies: [Lg.CodeNode], export: (t) => {
  if (!Lg.$isCodeNode(t)) return null;
  const e = t.getTextContent();
  return "```" + (t.getLanguage() || "") + (e ? `
` + e : "") + "\n```";
}, regExp: /^```(\w{1,10})?\s/, replace: cX((t) => Lg.$createCodeNode(t ? t[1] : void 0)), type: "element" }, pX = { dependencies: [Zi.ListNode, Zi.ListItemNode], export: (t, e) => Zi.$isListNode(t) ? rx(t, e, 0) : null, regExp: /^(\s*)[-*+]\s/, replace: ZT("bullet"), type: "element" }, uIe = { dependencies: [Zi.ListNode, Zi.ListItemNode], export: (t, e) => Zi.$isListNode(t) ? rx(t, e, 0) : null, regExp: /^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i, replace: ZT("check"), type: "element" }, mX = { dependencies: [Zi.ListNode, Zi.ListItemNode], export: (t, e) => Zi.$isListNode(t) ? rx(t, e, 0) : null, regExp: /^(\s*)(\d{1,})\.\s/, replace: ZT("number"), type: "element" }, gX = { format: ["code"], tag: "`", type: "text-format" }, vX = { format: ["highlight"], tag: "==", type: "text-format" }, bX = { format: ["bold", "italic"], tag: "***", type: "text-format" }, yX = { format: ["bold", "italic"], intraword: !1, tag: "___", type: "text-format" }, wX = {
  format: ["bold"],
  tag: "**",
  type: "text-format"
}, kX = { format: ["bold"], intraword: !1, tag: "__", type: "text-format" }, xX = { format: ["strikethrough"], tag: "~~", type: "text-format" }, _X = { format: ["italic"], tag: "*", type: "text-format" }, OX = { format: ["italic"], intraword: !1, tag: "_", type: "text-format" }, SX = { dependencies: [nS.LinkNode], export: (t, e, n) => {
  if (!nS.$isLinkNode(t)) return null;
  e = (e = t.getTitle()) ? `[${t.getTextContent()}](${t.getURL()} "${e}")` : `[${t.getTextContent()}](${t.getURL()})`;
  const i = t.getFirstChild();
  return t.getChildrenSize() === 1 && Bt.$isTextNode(i) ? n(i, e) : e;
}, importRegExp: /(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/, regExp: /(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/, replace: (t, e) => {
  const [, n, i, r] = e;
  e = nS.$createLinkNode(i, { title: r });
  const s = Bt.$createTextNode(n);
  s.setFormat(t.getFormat()), e.append(s), t.replace(e);
}, trigger: ")", type: "text-match" }, CX = [fX, dX, hX, pX, mX], EX = [gX, bX, yX, wX, kX, vX, _X, OX, xX], TX = [SX], sx = [...CX, ...EX, ...TX];
jn.$convertFromMarkdownString = function(t, e = sx, n) {
  return oIe(e)(t, n);
};
jn.$convertToMarkdownString = function(t = sx, e) {
  return tIe(t)(e);
};
jn.BOLD_ITALIC_STAR = bX;
jn.BOLD_ITALIC_UNDERSCORE = yX;
jn.BOLD_STAR = wX;
jn.BOLD_UNDERSCORE = kX;
jn.CHECK_LIST = uIe;
jn.CODE = hX;
jn.ELEMENT_TRANSFORMERS = CX;
jn.HEADING = fX;
jn.HIGHLIGHT = vX;
jn.INLINE_CODE = gX;
jn.ITALIC_STAR = _X;
jn.ITALIC_UNDERSCORE = OX;
jn.LINK = SX;
jn.ORDERED_LIST = mX;
jn.QUOTE = dX;
jn.STRIKETHROUGH = xX;
jn.TEXT_FORMAT_TRANSFORMERS = EX;
jn.TEXT_MATCH_TRANSFORMERS = TX;
jn.TRANSFORMERS = sx;
jn.UNORDERED_LIST = pX;
jn.registerMarkdownShortcuts = function(t, e = sx) {
  let n = UT(e), i = y6(n.textFormat, ({ tag: s }) => s[s.length - 1]), r = y6(n.textMatch, ({ trigger: s }) => s);
  for (let s of e) if (e = s.type, e === "element" || e === "text-match") {
    e = s.dependencies;
    for (let o of e) if (!t.hasNode(o)) throw Error(`MarkdownShortcuts: missing dependency ${o.getType()} for transformer. Ensure node dependency is included in editor initial config.`);
  }
  return t.registerUpdateListener(({ tags: s, dirtyLeaves: o, editorState: a, prevEditorState: l }) => {
    if (!s.has("historic") && !t.isComposing()) {
      var u = a.read(Bt.$getSelection);
      if (s = l.read(Bt.$getSelection), Bt.$isRangeSelection(s) && Bt.$isRangeSelection(u) && u.isCollapsed()) {
        l = u.anchor.key;
        var f = u.anchor.offset, d = a._nodeMap.get(l);
        !Bt.$isTextNode(d) || !o.has(l) || f !== 1 && f > s.anchor.offset + 1 || t.update(() => {
          if (!d.hasFormat("code")) {
            var h = d.getParent();
            if (h !== null && !Lg.$isCodeNode(h)) {
              var m = u.anchor.offset;
              e: {
                var g = n.element, w = h.getParent();
                if (Bt.$isRootOrShadowRoot(w) && h.getFirstChild() === d && (w = d.getTextContent(), w[m - 1] === " ")) {
                  for (let {
                    regExp: M,
                    replace: $
                  } of g) if ((g = w.match(M)) && g[0].length === m) {
                    w = d.getNextSiblings();
                    let [P, W] = d.splitText(m);
                    P.remove(), w = W ? [W, ...w] : w, $(h, w, g, !1), h = !0;
                    break e;
                  }
                }
                h = !1;
              }
              if (!h) {
                e: {
                  if (g = d.getTextContent(), h = r[g[m - 1]], h != null) {
                    m < g.length && (g = g.slice(0, m));
                    for (_ of h) if (h = g.match(_.regExp), h !== null) {
                      g = h.index || 0, w = g + h[0].length;
                      var x = void 0;
                      g === 0 ? [x] = d.splitText(w) : [, x] = d.splitText(g, w), x.selectNext(0, 0), _.replace(x, h);
                      var _ = !0;
                      break e;
                    }
                  }
                  _ = !1;
                }
                if (!_) e: {
                  w = d.getTextContent(), --m;
                  var S = w[m];
                  if (_ = i[S]) for (let M of _) {
                    var { tag: C } = M;
                    _ = C.length;
                    let $ = m - _ + 1;
                    if (!(1 < _ && !uX(w, $, C, 0, _) || w[$ - 1] === " ") && (x = w[m + 1], M.intraword !== !1 || !x || pk.test(x))) {
                      h = x = d, g = XL(w, $, C);
                      for (var E = h; 0 > g && (E = E.getPreviousSibling()) && !Bt.$isLineBreakNode(E); ) Bt.$isTextNode(E) && (g = E.getTextContent(), h = E, g = XL(g, g.length, C));
                      if (!(0 > g || h === x && g + _ === $ || (C = h.getTextContent(), 0 < g && C[g - 1] === S || (E = C[g - 1], M.intraword === !1 && E && !pk.test(E))))) {
                        w = x.getTextContent(), w = w.slice(0, $) + w.slice(m + 1), x.setTextContent(w), w = h === x ? w : C, h.setTextContent(w.slice(0, g) + w.slice(g + _)), w = Bt.$getSelection(), S = Bt.$createRangeSelection(), Bt.$setSelection(S), m = m - _ * (h === x ? 2 : 1) + 1, S.anchor.set(h.__key, g, "text"), S.focus.set(x.__key, m, "text");
                        for (let P of M.format) S.hasFormat(P) || S.formatText(P);
                        S.anchor.set(S.focus.key, S.focus.offset, S.focus.type);
                        for (let P of M.format) S.hasFormat(P) && S.toggleFormat(P);
                        Bt.$isRangeSelection(w) && (S.format = w.format);
                        break e;
                      }
                    }
                  }
                }
              }
            }
          }
        });
      }
    }
  });
};
const cIe = jn;
var Li = cIe, qT = {}, q1 = {}, $X = {}, fIe = Oe, cu = N, Bb = j;
function GL(t, e) {
  return t.getEditorState().read(() => {
    let n = cu.$getNodeByKey(e);
    return n === null ? !1 : n.isSelected();
  });
}
$X.useLexicalNodeSelection = function(t) {
  let [e] = fIe.useLexicalComposerContext(), [n, i] = Bb.useState(() => GL(e, t));
  Bb.useEffect(() => {
    let o = !0, a = e.registerUpdateListener(() => {
      o && i(GL(e, t));
    });
    return () => {
      o = !1, a();
    };
  }, [e, t]);
  let r = Bb.useCallback((o) => {
    e.update(() => {
      let a = cu.$getSelection();
      cu.$isNodeSelection(a) || (a = cu.$createNodeSelection(), cu.$setSelection(a)), cu.$isNodeSelection(a) && (o ? a.add(t) : a.delete(t));
    });
  }, [e, t]), s = Bb.useCallback(
    () => {
      e.update(() => {
        const o = cu.$getSelection();
        cu.$isNodeSelection(o) && o.clear();
      });
    },
    [e]
  );
  return [n, r, s];
};
const dIe = $X;
var hIe = dIe, pIe = Oe, mIe = hIe, gIe = lt, eo = N, Ly = j;
let vIe = eo.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");
function bIe({ nodeKey: t }) {
  let [e] = pIe.useLexicalComposerContext(), [n, i, r] = mIe.useLexicalNodeSelection(t), s = Ly.useCallback((o) => (n && eo.$isNodeSelection(eo.$getSelection()) && (o.preventDefault(), o = eo.$getNodeByKey(t), NX(o) && o.remove()), !1), [n, t]);
  return Ly.useEffect(() => gIe.mergeRegister(e.registerCommand(eo.CLICK_COMMAND, (o) => {
    let a = e.getElementByKey(t);
    return o.target === a ? (o.shiftKey || r(), i(!n), !0) : !1;
  }, eo.COMMAND_PRIORITY_LOW), e.registerCommand(eo.KEY_DELETE_COMMAND, s, eo.COMMAND_PRIORITY_LOW), e.registerCommand(
    eo.KEY_BACKSPACE_COMMAND,
    s,
    eo.COMMAND_PRIORITY_LOW
  )), [r, e, n, t, s, i]), Ly.useEffect(() => {
    let o = e.getElementByKey(t);
    o !== null && (o.className = n ? "selected" : "");
  }, [e, n, t]), null;
}
let YT = class MX extends eo.DecoratorNode {
  static getType() {
    return "horizontalrule";
  }
  static clone(e) {
    return new MX(e.__key);
  }
  static importJSON() {
    return VT();
  }
  static importDOM() {
    return { hr: () => ({ conversion: yIe, priority: 0 }) };
  }
  exportJSON() {
    return { type: "horizontalrule", version: 1 };
  }
  exportDOM() {
    return { element: document.createElement("hr") };
  }
  createDOM() {
    return document.createElement("hr");
  }
  getTextContent() {
    return `
`;
  }
  isInline() {
    return !1;
  }
  updateDOM() {
    return !1;
  }
  decorate() {
    return Ly.createElement(bIe, { nodeKey: this.__key });
  }
};
function yIe() {
  return { node: VT() };
}
function VT() {
  return eo.$applyNodeReplacement(new YT());
}
function NX(t) {
  return t instanceof YT;
}
q1.$createHorizontalRuleNode = VT;
q1.$isHorizontalRuleNode = NX;
q1.HorizontalRuleNode = YT;
q1.INSERT_HORIZONTAL_RULE_COMMAND = vIe;
const wIe = q1;
var kIe = wIe, AX = Li, xIe = Oe, rS = kIe, _Ie = j;
let DX = [{ dependencies: [rS.HorizontalRuleNode], export: (t) => rS.$isHorizontalRuleNode(t) ? "***" : null, regExp: /^(---|\*\*\*|___)\s?$/, replace: (t, e, n, i) => {
  e = rS.$createHorizontalRuleNode(), i || t.getNextSibling() != null ? t.replace(e) : t.insertBefore(e), e.selectNext();
}, type: "element" }, ...AX.TRANSFORMERS];
qT.DEFAULT_TRANSFORMERS = DX;
qT.MarkdownShortcutPlugin = function({ transformers: t = DX }) {
  let [e] = xIe.useLexicalComposerContext();
  return _Ie.useEffect(() => AX.registerMarkdownShortcuts(e, t), [e, t]), null;
};
const OIe = qT;
var SIe = OIe;
const PX = {
  dependencies: [_p],
  export: (t) => QPe(t) ? "---" : null,
  regExp: /^(---|\*\*\*|___)\s?$/,
  replace: (t, e, n, i) => {
    const r = v6();
    i || t.getNextSibling() != null ? t.replace(r) : t.insertBefore(r), r.selectNext();
  },
  type: "element"
}, CIe = {
  dependencies: [A2],
  export: (t) => {
    if (!sTe(t))
      return null;
    const e = t.getTextContent();
    return "```" + (t.language || "") + (e ? `
` + e : "") + "\n```";
  },
  regExp: /^```(\w{1,10})?\s/,
  replace: (t, e, n) => {
    const i = n[1], r = BC({ language: i, _openInEditMode: !0 }), s = t.replace(r), o = N.$createNodeSelection();
    o.add(s.getKey()), N.$setSelection(o);
  },
  type: "element"
}, EIe = {
  dependencies: [ec],
  export: (t) => {
    if (H7e(t)) {
      const { src: e, alt: n } = t.dataset;
      return `![${n}](${e})`;
    } else
      return null;
  },
  regExp: /^image! $/,
  replace: (t, e, n) => {
    const s = yh({ altText: "", src: "" });
    t.replace(s);
  },
  type: "element"
}, TIe = {
  format: ["subscript"],
  tag: "~",
  type: "text-format"
}, $Ie = {
  format: ["superscript"],
  tag: "^",
  type: "text-format"
}, MIe = [
  Li.HEADING,
  Li.QUOTE,
  Li.UNORDERED_LIST,
  Li.ORDERED_LIST,
  PX,
  CIe,
  EIe
], ox = [
  TIe,
  $Ie
], NIe = [
  ...MIe,
  ...Li.TEXT_FORMAT_TRANSFORMERS,
  ...ox,
  ...Li.TEXT_MATCH_TRANSFORMERS
], IX = [
  ...Li.TEXT_FORMAT_TRANSFORMERS,
  ...ox,
  ...Li.TEXT_MATCH_TRANSFORMERS
], AIe = [
  Li.UNORDERED_LIST,
  Li.ORDERED_LIST,
  ...Li.TEXT_FORMAT_TRANSFORMERS,
  ...ox,
  ...Li.TEXT_MATCH_TRANSFORMERS
], DIe = [
  Li.HEADING,
  Li.QUOTE,
  Li.UNORDERED_LIST,
  Li.ORDERED_LIST,
  PX,
  ...Li.TEXT_FORMAT_TRANSFORMERS,
  ...ox,
  ...Li.TEXT_MATCH_TRANSFORMERS
];
function PIe({ transformers: t = NIe } = {}) {
  return SIe.MarkdownShortcutPlugin({ transformers: t });
}
function IIe(t, e, n, i = N.TextNode) {
  const [r] = Oe.useLexicalComposerContext();
  kt(() => lt.mergeRegister(
    ...LIe(r, t, e, n, i)
  ), [n, r, t, e, i]);
}
function LIe(t, e, n, i, r) {
  const s = (h) => h instanceof n, o = (h) => {
    const m = N.$createTextNode(h.getTextContent());
    m.setFormat(h.getFormat()), h.replace(m);
  }, a = (h) => h.getLatest().__mode, l = (h) => {
    if (!h.isSimpleText())
      return;
    const m = h.getPreviousSibling();
    let g = h.getTextContent(), w = h, x;
    if (N.$isTextNode(m)) {
      const _ = m.getTextContent(), S = _ + g, C = e(S);
      if (s(m))
        if (C === null || a(m) !== 0) {
          o(m);
          return;
        } else {
          const E = C.end - _.length;
          if (E > 0) {
            const M = g.slice(0, E), $ = _ + M;
            if (m.select(), m.setTextContent($), E === g.length)
              h.remove();
            else {
              const P = g.slice(E);
              h.setTextContent(P);
            }
            return;
          }
        }
      else if (C === null || C.start < _.length)
        return;
    }
    for (; ; ) {
      x = e(g);
      let _ = x === null ? "" : g.slice(x.end);
      if (g = _, _ === "") {
        const E = w == null ? void 0 : w.getNextSibling();
        if (N.$isTextNode(E)) {
          _ = w.getTextContent() + E.getTextContent();
          const M = e(_);
          if (M === null) {
            s(E) ? o(E) : E.markDirty();
            return;
          } else if (M.start !== 0)
            return;
        }
      } else {
        const E = e(_);
        if (E !== null && E.start === 0)
          return;
      }
      if (x === null)
        return;
      if (x.start === 0 && N.$isTextNode(m) && m.isTextEntity())
        continue;
      let S;
      x.start === 0 ? [S, w] = w.splitText(x.end) : [, S, w] = w.splitText(
        x.start,
        x.end
      );
      const C = i(S);
      if (C.setFormat(S.getFormat()), S.replace(C), w === null)
        return;
    }
  }, u = (h) => {
    const m = h.getTextContent(), g = e(m);
    if (g === null || g.start !== 0) {
      o(h);
      return;
    }
    if (m.length > g.end) {
      h.splitText(g.end);
      return;
    }
    const w = h.getPreviousSibling();
    N.$isTextNode(w) && w.isTextEntity() && (o(w), o(h));
    const x = h.getNextSibling();
    N.$isTextNode(x) && x.isTextEntity() && (o(x), s(h) && o(h));
  }, f = t.registerNodeTransform(
    r,
    l
  ), d = t.registerNodeTransform(
    n,
    u
  );
  return [f, d];
}
var RIe = wq, jIe = Ll, FIe = "Expected a function";
function BIe(t, e, n) {
  var i = !0, r = !0;
  if (typeof t != "function")
    throw new TypeError(FIe);
  return jIe(n) && (i = "leading" in n ? !!n.leading : i, r = "trailing" in n ? !!n.trailing : r), RIe(t, e, {
    leading: i,
    maxWait: e,
    trailing: r
  });
}
var zIe = BIe;
const LX = /* @__PURE__ */ Gs(zIe), RX = j.createContext({}), WIe = ({ children: t }) => {
  const e = j.useRef(/* @__PURE__ */ new Map()), [n, i] = j.useState({}), [r, s] = j.useState(0), o = j.useMemo(() => LX(() => {
    const h = e.current, m = {};
    let g = 0;
    h.forEach((w) => {
      w.forEach(({ topLevelNodeKey: x }, _) => {
        g = g + 1, m[x] === void 0 ? m[x] = [_] : m[x].push(_);
      });
    }), i(m), s(g);
  }, 5, { trailing: !0 }), []), a = j.useCallback((d, h, m) => {
    const g = e.current;
    g.has(d) || g.set(d, /* @__PURE__ */ new Map()), g.get(d).set(m, { topLevelNodeKey: h }), o();
  }, [o]), l = j.useCallback((d, h) => {
    var g, w;
    const m = e.current;
    (g = m.get(d)) == null || g.delete(h), ((w = m.get(d)) == null ? void 0 : w.size) === 0 && m.delete(d), o();
  }, [o]), u = j.useCallback((d) => {
    e.current.delete(d), o();
  }, [o]), f = j.useMemo(() => ({
    tkNodeMap: n,
    tkCount: r,
    addEditorTkNode: a,
    removeEditorTkNode: l,
    removeEditor: u
  }), [
    n,
    r,
    a,
    l,
    u
  ]);
  return /* @__PURE__ */ y.jsx(RX.Provider, { value: f, children: t });
}, jX = () => j.useContext(RX), KL = new RegExp(/(^|.)([^\p{L}\p{N}\s]*(TK|Tk|tk)+[^\p{L}\p{N}\s]*)(.)?/u), JL = new RegExp(new RegExp("\\p{L}|\\p{N}", "u"));
function HIe({ editor: t, rootElement: e, parentKey: n, nodeKeys: i }) {
  var w, x;
  const r = ((w = t._config.theme.tk) == null ? void 0 : w.split(" ")) || [], s = ((x = t._config.theme.tkHighlighted) == null ? void 0 : x.split(" ")) || [], o = t.getElementByKey(n), a = $t(() => {
    let _ = 0, S = -56;
    const C = e.getBoundingClientRect(), M = (o.querySelector("[data-kg-card]") || o).getBoundingClientRect();
    return _ = M.top - C.top + 4, M.right > C.right && (S = S - (M.right - C.right)), { top: _, right: S };
  }, [e, o]), [l, u] = ft(a()), f = (_) => {
    _.preventDefault(), _.stopPropagation(), t.update(() => {
      if (N.$isDecoratorNode(N.$getNodeByKey(n))) {
        t.dispatchCommand(ju, { cardKey: n });
        return;
      }
      let S = i[0];
      const C = N.$getSelection();
      if (N.$isRangeSelection(C) && LW(C.getNodes()[0])) {
        const M = i.indexOf(C.getNodes()[0].getKey());
        M === i.length - 1 ? S = i[0] : S = i[M + 1];
      }
      const E = N.$getNodeByKey(S);
      E.select(0, E.getTextContentSize());
    });
  }, d = (_) => {
    let S;
    t.getEditorState().read(() => {
      N.$isDecoratorNode(N.$getNodeByKey(n)) && (S = !0);
    }), !S && i.forEach((C) => {
      _ ? (t.getElementByKey(C).classList.remove(...r), t.getElementByKey(C).classList.add(...s)) : (t.getElementByKey(C).classList.add(...r), t.getElementByKey(C).classList.remove(...s));
    });
  }, h = (_) => {
    d(!0);
  }, m = (_) => {
    d(!1);
  };
  kt(() => {
    const _ = new ResizeObserver(() => u(a()));
    return _.observe(e), _.observe(o), () => {
      _.disconnect();
    };
  }, [e, o, a]);
  const g = {
    top: `${l.top}px`,
    right: `${l.right}px`
  };
  return /* @__PURE__ */ y.jsx(
    "div",
    {
      className: "absolute cursor-pointer p-1 text-2xs font-medium text-grey-600",
      "data-testid": "tk-indicator",
      style: g,
      onClick: f,
      onMouseEnter: h,
      onMouseLeave: m,
      children: "TK"
    }
  );
}
function QIe() {
  var h;
  const [t] = Oe.useLexicalComposerContext(), { tkNodeMap: e, addEditorTkNode: n, removeEditorTkNode: i, removeEditor: r } = jX(), { nodeKey: s } = Au(gn);
  kt(() => {
    if (!t.hasNodes([uo]))
      throw new Error("TKPlugin: TKNode not registered on editor");
    return () => {
      r(t.getKey());
    };
  }, [t, r]), kt(() => t.registerMutationListener(uo, (m) => {
    t.getEditorState().read(() => {
      var g;
      for (let [w, x] of m)
        if (x === "destroyed")
          i(t.getKey(), w);
        else {
          const _ = (g = N.$getNodeByKey(w).getTopLevelElement()) == null ? void 0 : g.getKey(), S = s || _;
          n(t.getKey(), S, w);
        }
    });
  }), [t, n, i, s]);
  const o = $t((m) => lE(m.getTextContent()), []), a = $t((m) => {
    let g = KL.exec(m);
    if (g === null)
      return null;
    function w(E) {
      return !(E[1] && E[1].trim() && JL.test(E[1]) && E[2].slice(0, 1) !== "—" || E[4] && E[4].trim() && JL.test(E[4]) && E[2].slice(-1) !== "—");
    }
    let x = "";
    for (; g !== null && !w(g); )
      x += m.slice(0, g.index + g[0].length - 1), m = m.slice(g.index + g[0].length - 1), g = KL.exec(m);
    if (g === null)
      return null;
    const S = x.length + g.index + g[1].length;
    return {
      end: S + g[2].length,
      start: S
    };
  }, []), l = t.hasNode(Fo) ? Fo : N.TextNode;
  if (IIe(
    a,
    uo,
    o,
    l
  ), s)
    return null;
  const u = t.getRootElement(), f = (h = t.getRootElement()) == null ? void 0 : h.parentElement;
  if (!f)
    return null;
  const d = Object.entries(e).map(([m, g]) => t.getElementByKey(m) ? /* @__PURE__ */ y.jsx(
    HIe,
    {
      editor: t,
      nodeKeys: g,
      parentKey: m,
      rootElement: u
    },
    m
  ) : !1).filter(Boolean);
  return _j(
    d,
    f
  );
}
var FX = {}, UIe = Oe, Rg = j;
function w6() {
  return w6 = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e], i;
      for (i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
    }
    return t;
  }, w6.apply(this, arguments);
}
var ZIe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Rg.useLayoutEffect : Rg.useEffect;
FX.ContentEditable = function({ ariaActiveDescendant: t, ariaAutoComplete: e, ariaControls: n, ariaDescribedBy: i, ariaExpanded: r, ariaLabel: s, ariaLabelledBy: o, ariaMultiline: a, ariaOwns: l, ariaRequired: u, autoCapitalize: f, className: d, id: h, role: m = "textbox", spellCheck: g = !0, style: w, tabIndex: x, "data-testid": _, ...S }) {
  let [C] = UIe.useLexicalComposerContext(), [E, M] = Rg.useState(!1), $ = Rg.useCallback((P) => {
    C.setRootElement(P);
  }, [C]);
  return ZIe(() => (M(C.isEditable()), C.registerEditableListener((P) => {
    M(P);
  })), [C]), Rg.createElement(
    "div",
    w6({}, S, { "aria-activedescendant": E ? t : void 0, "aria-autocomplete": E ? e : "none", "aria-controls": E ? n : void 0, "aria-describedby": i, "aria-expanded": E && m === "combobox" ? !!r : void 0, "aria-label": s, "aria-labelledby": o, "aria-multiline": a, "aria-owns": E ? l : void 0, "aria-readonly": E ? void 0 : !0, "aria-required": u, autoCapitalize: f, className: d, contentEditable: E, "data-testid": _, id: h, ref: $, role: m, spellCheck: g, style: w, tabIndex: x })
  );
};
const qIe = FX;
var YIe = qIe;
function VIe({ className: t, text: e }) {
  return /* @__PURE__ */ y.jsx(
    "div",
    {
      className: `pointer-events-none absolute left-0 top-0 min-w-full cursor-text font-serif text-xl text-grey-500 dark:text-grey-800 ${t}`,
      children: typeof e == "string" ? e : "Begin writing your post..."
    }
  );
}
const XIe = ({ registerAPI: t }) => {
  const [e] = Oe.useLexicalComposerContext();
  j.useEffect(() => t ? (t({
    // give access to the editor instance so the Lexical API can be used directly if needed
    editorInstance: e,
    // simplified API methods for typical consumer app actions
    serialize() {
      return JSON.stringify(e.getEditorState());
    },
    editorIsEmpty() {
      let i;
      return e.update(() => {
        i = ho.$canShowPlaceholder(!1, !0);
      }), i;
    },
    focusEditor({ position: i = "bottom" } = {}) {
      const r = {
        defaultSelection: i === "top" ? "rootStart" : null
      };
      e.focus(() => {
      }, r), i === "top" && e.update(() => {
        const o = N.$getRoot().getFirstChild();
        N.$isDecoratorNode(o) && (xr(o), e.getRootElement().focus());
      }), i === "bottom" && e.update(() => {
        const o = N.$getRoot().getLastChild();
        N.$isDecoratorNode(o) ? (xr(o), e.getRootElement().focus()) : o.select();
      });
    },
    blurEditor() {
      e.blur();
    },
    insertParagraphAtTop({ focus: i = !0 } = {}) {
      e.update(() => {
        const r = N.$createParagraphNode(), [s] = N.$getRoot().getChildren();
        s.insertBefore(r), i && r.selectStart();
      });
    },
    insertParagraphAtBottom({ focus: i = !0 } = {}) {
      e.update(() => {
        const r = N.$createParagraphNode();
        N.$getRoot().append(r), i && r.selectStart();
      });
    },
    insertFiles(i) {
      e.dispatchCommand(rn.DRAG_DROP_PASTE, i);
    },
    lastNodeIsDecorator() {
      let i = !1;
      return e.getEditorState().read(() => {
        const r = N.$getRoot().getChildren(), s = r[r.length - 1];
        i = s && N.$isDecoratorNode(s);
      }), i;
    }
  }), () => {
    t == null || t(null);
  }) : void 0, [e, t]);
};
var XT = {}, GT = {}, GIe = lt, un = N;
function KIe(t, e, n, i, r) {
  if (t === null || n.size === 0 && i.size === 0 && !r) return 0;
  var s = e._selection, o = t._selection;
  if (r) return 1;
  if (!(un.$isRangeSelection(s) && un.$isRangeSelection(o) && o.isCollapsed() && s.isCollapsed())) return 0;
  r = e._nodeMap;
  let a = [];
  for (let l of n) n = r.get(l), n !== void 0 && a.push(n);
  for (let [l, u] of i) u && (i = r.get(l), i === void 0 || un.$isRootNode(i) || a.push(i));
  return a.length === 0 ? 0 : 1 < a.length ? (i = e._nodeMap, e = i.get(s.anchor.key), o = i.get(o.anchor.key), e && o && !t._nodeMap.has(e.__key) && un.$isTextNode(e) && e.__text.length === 1 && s.anchor.offset === 1 ? 2 : 0) : (e = a[0], t = t._nodeMap.get(e.__key), !un.$isTextNode(t) || !un.$isTextNode(e) || t.__mode !== e.__mode || (t = t.__text, e = e.__text, t === e) || (s = s.anchor, o = o.anchor, s.key !== o.key || s.type !== "text") ? 0 : (s = s.offset, o = o.offset, t = e.length - t.length, t === 1 && o === s - 1 ? 2 : t === -1 && o === s + 1 ? 3 : t === -1 && o === s ? 4 : 0));
}
function JIe(t, e) {
  let n = Date.now(), i = 0;
  return (r, s, o, a, l, u) => {
    let f = Date.now();
    if (u.has("historic")) return i = 0, n = f, 2;
    let d = KIe(r, s, a, l, t.isComposing()), h = (() => {
      var m = o === null || o.editor === t, g = u.has("history-push");
      if (!g && m && u.has("history-merge")) return 0;
      if (r === null) return 1;
      var w = s._selection;
      if (!(0 < a.size || 0 < l.size)) return w !== null ? 0 : 2;
      if (g === !1 && d !== 0 && d === i && f < n + e && m) return 0;
      if (a.size === 1) {
        {
          g = Array.from(a)[0], m = r._nodeMap.get(g), g = s._nodeMap.get(g), w = r._selection;
          let x = s._selection, _ = !1;
          un.$isRangeSelection(w) && un.$isRangeSelection(x) && (_ = w.anchor.type === "element" && w.focus.type === "element" && x.anchor.type === "text" && x.focus.type === "text"), m = !_ && un.$isTextNode(m) && un.$isTextNode(g) ? m.__type === g.__type && m.__text === g.__text && m.__mode === g.__mode && m.__detail === g.__detail && m.__style === g.__style && m.__format === g.__format && m.__parent === g.__parent : !1;
        }
        if (m) return 0;
      }
      return 1;
    })();
    return n = f, i = d, h;
  };
}
GT.createEmptyHistoryState = function() {
  return { current: null, redoStack: [], undoStack: [] };
};
GT.registerHistory = function(t, e, n) {
  let i = JIe(t, n);
  n = ({ editorState: o, prevEditorState: a, dirtyLeaves: l, dirtyElements: u, tags: f }) => {
    const d = e.current, h = e.redoStack, m = e.undoStack, g = d === null ? null : d.editorState;
    if (d === null || o !== g) {
      if (a = i(a, o, d, l, u, f), a === 1) h.length !== 0 && (e.redoStack = [], t.dispatchCommand(un.CAN_REDO_COMMAND, !1)), d !== null && (m.push({ ...d }), t.dispatchCommand(un.CAN_UNDO_COMMAND, !0));
      else if (a === 2) return;
      e.current = { editor: t, editorState: o };
    }
  };
  let r = GIe.mergeRegister(t.registerCommand(
    un.UNDO_COMMAND,
    () => {
      let o = e.redoStack, a = e.undoStack;
      if (a.length !== 0) {
        let l = e.current, u = a.pop();
        l !== null && (o.push(l), t.dispatchCommand(un.CAN_REDO_COMMAND, !0)), a.length === 0 && t.dispatchCommand(un.CAN_UNDO_COMMAND, !1), e.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: "historic" });
      }
      return !0;
    },
    un.COMMAND_PRIORITY_EDITOR
  ), t.registerCommand(un.REDO_COMMAND, () => {
    let o = e.redoStack;
    var a = e.undoStack;
    if (o.length !== 0) {
      let l = e.current;
      l !== null && (a.push(l), t.dispatchCommand(un.CAN_UNDO_COMMAND, !0)), a = o.pop(), o.length === 0 && t.dispatchCommand(un.CAN_REDO_COMMAND, !1), e.current = a || null, a && a.editor.setEditorState(a.editorState, { tag: "historic" });
    }
    return !0;
  }, un.COMMAND_PRIORITY_EDITOR), t.registerCommand(un.CLEAR_EDITOR_COMMAND, () => (e.undoStack = [], e.redoStack = [], e.current = null, !1), un.COMMAND_PRIORITY_EDITOR), t.registerCommand(un.CLEAR_HISTORY_COMMAND, () => (e.undoStack = [], e.redoStack = [], e.current = null, t.dispatchCommand(un.CAN_REDO_COMMAND, !1), t.dispatchCommand(un.CAN_UNDO_COMMAND, !1), !0), un.COMMAND_PRIORITY_EDITOR), t.registerUpdateListener(n)), s = t.registerUpdateListener(n);
  return () => {
    r(), s();
  };
};
const eLe = GT;
var tLe = eLe, nLe = Oe, k6 = tLe, eR = j;
function iLe(t, e, n = 1e3) {
  let i = eR.useMemo(() => e || k6.createEmptyHistoryState(), [e]);
  eR.useEffect(() => k6.registerHistory(t, i, n), [n, t, i]);
}
XT.createEmptyHistoryState = k6.createEmptyHistoryState;
XT.HistoryPlugin = function({ externalHistoryState: t }) {
  let [e] = nLe.useLexicalComposerContext();
  return iLe(e, t), null;
};
const rLe = XT;
var BX = rLe;
const sLe = ({ onBlur: t }) => {
  const [e] = Oe.useLexicalComposerContext();
  return kt(() => {
    e.registerCommand(
      N.BLUR_COMMAND,
      () => {
        t == null || t();
      },
      N.COMMAND_PRIORITY_EDITOR
    );
  }, [e, t]), null;
}, oLe = ({ onFocus: t }) => {
  const [e] = Oe.useLexicalComposerContext();
  return kt(() => {
    e.registerCommand(
      N.FOCUS_COMMAND,
      () => {
        t == null || t();
      },
      N.COMMAND_PRIORITY_EDITOR
    );
  }, [e, t]), null;
};
var zX = {}, Pd = ki, aLe = Oe, lLe = lt, Id = N, uLe = j;
zX.LinkPlugin = function({ validateUrl: t }) {
  let [e] = aLe.useLexicalComposerContext();
  return uLe.useEffect(() => {
    if (!e.hasNodes([Pd.LinkNode])) throw Error("LinkPlugin: LinkNode not registered on editor");
    return lLe.mergeRegister(e.registerCommand(Pd.TOGGLE_LINK_COMMAND, (n) => {
      if (n === null) return Pd.toggleLink(n), !0;
      if (typeof n == "string") return t === void 0 || t(n) ? (Pd.toggleLink(n), !0) : !1;
      let { url: i, target: r, rel: s, title: o } = n;
      return Pd.toggleLink(i, { rel: s, target: r, title: o }), !0;
    }, Id.COMMAND_PRIORITY_LOW), t !== void 0 ? e.registerCommand(
      Id.PASTE_COMMAND,
      (n) => {
        let i = Id.$getSelection();
        if (!Id.$isRangeSelection(i) || i.isCollapsed() || !(n instanceof ClipboardEvent) || n.clipboardData == null) return !1;
        let r = n.clipboardData.getData("text");
        return t(r) ? i.getNodes().some((s) => Id.$isElementNode(s)) ? !1 : (e.dispatchCommand(Pd.TOGGLE_LINK_COMMAND, r), n.preventDefault(), !0) : !1;
      },
      Id.COMMAND_PRIORITY_LOW
    ) : () => {
    });
  }, [e, t]), null;
};
const cLe = zX;
var fLe = cLe, WX = {}, dLe = Oe, tR = j, hLe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? tR.useLayoutEffect : tR.useEffect;
WX.OnChangePlugin = function({ ignoreHistoryMergeTagChange: t = !0, ignoreSelectionChange: e = !1, onChange: n }) {
  let [i] = dLe.useLexicalComposerContext();
  return hLe(() => {
    if (n) return i.registerUpdateListener(({ editorState: r, dirtyElements: s, dirtyLeaves: o, prevEditorState: a, tags: l }) => {
      e && s.size === 0 && o.size === 0 || t && l.has("history-merge") || a.isEmpty() || n(r, i, l);
    });
  }, [i, t, e, n]), null;
};
const pLe = WX;
var HX = pLe, QX = {}, mLe = Oe, jg = j, gLe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? jg.useLayoutEffect : jg.useEffect;
function vLe(t) {
  let [e] = mLe.useLexicalComposerContext(), n = jg.useMemo(() => t(e), [e, t]), i = jg.useRef(n.initialValueFn()), [r, s] = jg.useState(i.current);
  return gLe(() => {
    let { initialValueFn: o, subscribe: a } = n, l = o();
    return i.current !== l && (i.current = l, s(l)), a((u) => {
      i.current = u, s(u);
    });
  }, [n, t]), r;
}
function bLe(t) {
  return { initialValueFn: () => t.isEditable(), subscribe: (e) => t.registerEditableListener(e) };
}
var yLe = function() {
  return vLe(bLe);
};
const wLe = yLe;
var kLe = wLe, UX = {}, zb = N;
UX.registerDragonSupport = function(t) {
  let e = window.location.origin, n = (i) => {
    if (i.origin === e) {
      var r = t.getRootElement();
      if (document.activeElement === r && (r = i.data, typeof r == "string")) {
        try {
          var s = JSON.parse(r);
        } catch {
          return;
        }
        if (s && s.protocol === "nuanria_messaging" && s.type === "request" && (s = s.payload) && s.functionId === "makeChanges" && (s = s.args)) {
          const [o, a, l, u, f] = s;
          t.update(() => {
            const d = zb.$getSelection();
            if (zb.$isRangeSelection(d)) {
              var h = d.anchor;
              let m = h.getNode(), g = 0, w = 0;
              zb.$isTextNode(m) && 0 <= o && 0 <= a && (g = o, w = o + a, d.setTextNodeRange(m, g, m, w)), (g !== w || l !== "") && (d.insertRawText(l), m = h.getNode()), zb.$isTextNode(m) && (g = u, w = u + f, h = m.getTextContentSize(), g = g > h ? h : g, w = w > h ? h : w, d.setTextNodeRange(m, g, m, w)), i.stopImmediatePropagation();
            }
          });
        }
      }
    }
  };
  return window.addEventListener("message", n, !0), () => {
    window.removeEventListener("message", n, !0);
  };
};
const xLe = UX;
var _Le = xLe, ZX = Oe, OLe = kLe, no = j, SLe = ho, qX = lt, nR = xj, CLe = _Le, ELe = rn, KT = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? no.useLayoutEffect : no.useEffect;
function iR(t) {
  return t.getEditorState().read(SLe.$canShowPlaceholderCurry(t.isComposing()));
}
function TLe(t) {
  let [e, n] = no.useState(() => iR(t));
  return KT(() => {
    function i() {
      let r = iR(t);
      n(r);
    }
    return i(), qX.mergeRegister(t.registerUpdateListener(() => {
      i();
    }), t.registerEditableListener(() => {
      i();
    }));
  }, [t]), e;
}
function $Le(t, e) {
  let [n, i] = no.useState(() => t.getDecorators());
  return KT(() => t.registerDecoratorListener((r) => {
    nR.flushSync(() => {
      i(r);
    });
  }), [t]), no.useEffect(() => {
    i(t.getDecorators());
  }, [t]), no.useMemo(() => {
    let r = [], s = Object.keys(n);
    for (let o = 0; o < s.length; o++) {
      let a = s[o], l = no.createElement(e, { onError: (f) => t._onError(f) }, no.createElement(no.Suspense, { fallback: null }, n[a])), u = t.getElementByKey(a);
      u !== null && r.push(nR.createPortal(l, u, a));
    }
    return r;
  }, [e, n, t]);
}
function MLe(t) {
  KT(() => qX.mergeRegister(ELe.registerRichText(t), CLe.registerDragonSupport(t)), [t]);
}
function NLe({ content: t }) {
  var [e] = ZX.useLexicalComposerContext();
  e = TLe(e);
  let n = OLe();
  return e ? typeof t == "function" ? t(n) : t : null;
}
QX.RichTextPlugin = function({ contentEditable: t, placeholder: e, ErrorBoundary: n }) {
  let [i] = ZX.useLexicalComposerContext();
  return n = $Le(i, n), MLe(i), no.createElement(no.Fragment, null, t, no.createElement(NLe, { content: e }), n);
};
const ALe = QX;
var DLe = ALe, JT = {}, YX = j;
let rR = [["Cat", "rgb(125, 50, 0)"], ["Dog", "rgb(100, 0, 0)"], ["Rabbit", "rgb(150, 0, 0)"], ["Frog", "rgb(200, 0, 0)"], ["Fox", "rgb(200, 75, 0)"], ["Hedgehog", "rgb(0, 75, 0)"], ["Pigeon", "rgb(0, 125, 0)"], ["Squirrel", "rgb(75, 100, 0)"], ["Bear", "rgb(125, 100, 0)"], ["Tiger", "rgb(0, 0, 150)"], ["Leopard", "rgb(0, 0, 200)"], ["Zebra", "rgb(0, 0, 250)"], ["Wolf", "rgb(0, 100, 150)"], ["Owl", "rgb(0, 100, 100)"], ["Gull", "rgb(100, 0, 100)"], ["Squid", "rgb(150, 0, 150)"]], sR = rR[Math.floor(Math.random() * rR.length)], VX = YX.createContext({
  clientID: 0,
  color: sR[1],
  isCollabActive: !1,
  name: sR[0],
  yjsDocMap: /* @__PURE__ */ new Map()
});
JT.CollaborationContext = VX;
JT.useCollaborationContext = function(t, e) {
  let n = YX.useContext(VX);
  return t != null && (n.name = t), e != null && (n.color = e), n;
};
const PLe = JT;
var ax = PLe;
const XX = j.createContext({}), ILe = ({ children: t }) => {
  const e = j.useMemo(
    () => ({ historyState: BX.createEmptyHistoryState() }),
    []
  );
  return /* @__PURE__ */ y.jsx(XX.Provider, { value: e, children: t });
}, LLe = () => j.useContext(XX), GX = j.createContext({}), RLe = ({ onChange: t, children: e }) => {
  const n = j.useMemo(
    () => ({ onChange: t }),
    [t]
  );
  return /* @__PURE__ */ y.jsx(GX.Provider, { value: n, children: e });
}, jLe = () => j.useContext(GX), lx = ({
  onChange: t,
  onBlur: e,
  onFocus: n,
  markdownTransformers: i,
  registerAPI: r,
  cursorDidExitAtTop: s,
  children: o,
  placeholder: a,
  singleParagraph: l,
  placeholderText: u,
  placeholderClassName: f = "",
  className: d = "",
  readOnly: h = !1,
  isDragEnabled: m = !0,
  inheritStyles: g = !1,
  isSnippetsEnabled: w = !0,
  hiddenFormats: x = [],
  useDefaultClasses: _ = !0,
  dataTestId: S
}) => {
  const { historyState: C } = LLe(), [E] = Oe.useLexicalComposerContext(), { isCollabActive: M } = ax.useCollaborationContext(), { editorContainerRef: $, darkMode: P, isTKEnabled: W } = j.useContext(dt), z = !!E._parentEditor, Z = m && !h && !z, { onChange: L } = jLe(), Q = j.useCallback((Y) => {
    if (L) {
      const te = (E._parentEditor || E).getEditorState().toJSON();
      L(te);
    }
    if (t) {
      const K = Y.toJSON();
      t(K);
    }
  }, [t, L, E]), V = (Y) => {
    z || ($.current = Y);
  }, [H, R] = j.useState(null), q = (Y) => {
    Y !== null && R(Y);
  };
  return /* @__PURE__ */ y.jsxs(
    "div",
    {
      ref: V,
      className: `${_ ? "koenig-lexical" : ""} ${g ? "kg-inherit-styles" : ""} ${P ? "dark" : ""} ${d}`,
      "data-koenig-dnd-disabled": !m,
      "data-testid": S,
      children: [
        /* @__PURE__ */ y.jsx(
          DLe.RichTextPlugin,
          {
            contentEditable: /* @__PURE__ */ y.jsx("div", { ref: q, "data-kg": "editor", children: /* @__PURE__ */ y.jsx(YIe.ContentEditable, { className: _ ? "kg-prose" : "", readOnly: h }) }),
            ErrorBoundary: WPe,
            placeholder: a || /* @__PURE__ */ y.jsx(VIe, { className: f, text: u })
          }
        ),
        /* @__PURE__ */ y.jsx(fLe.LinkPlugin, {}),
        /* @__PURE__ */ y.jsx(HX.OnChangePlugin, { ignoreHistoryMergeTagChange: !1, ignoreSelectionChange: !0, onChange: Q }),
        !M && /* @__PURE__ */ y.jsx(BX.HistoryPlugin, { externalHistoryState: C }),
        " ",
        /* @__PURE__ */ y.jsx(s$e, { containerElem: $, cursorDidExitAtTop: s, isNested: z }),
        /* @__PURE__ */ y.jsx(PIe, { transformers: i }),
        H && /* @__PURE__ */ y.jsx(jPe, { anchorElem: H, hiddenFormats: x, isSnippetsEnabled: w }),
        /* @__PURE__ */ y.jsx(l$e, {}),
        r ? /* @__PURE__ */ y.jsx(XIe, { registerAPI: r }) : null,
        Z && /* @__PURE__ */ y.jsx(CPe, { containerElem: $ }),
        l && /* @__PURE__ */ y.jsx(i_, { paragraphs: 1 }),
        e && /* @__PURE__ */ y.jsx(sLe, { onBlur: e }),
        n && /* @__PURE__ */ y.jsx(oLe, { onFocus: n }),
        /* @__PURE__ */ y.jsx(V9e, {}),
        W && /* @__PURE__ */ y.jsx(QIe, {}),
        o
      ]
    }
  );
}, FLe = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M6 16.079a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0Zm7.5-1.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0Z" }), /* @__PURE__ */ J.createElement("path", { d: "M16.5 14.579V9a1.5 1.5 0 0 0-1.864-1.455l-4.5.75A1.5 1.5 0 0 0 9 9.75v6.329" }), /* @__PURE__ */ J.createElement("path", { d: "M22.5 21.75a1.5 1.5 0 0 1-1.5 1.5H3a1.5 1.5 0 0 1-1.5-1.5V2.25A1.5 1.5 0 0 1 3 .75h15a1.5 1.5 0 0 1 1.047.426l3 2.883a1.5 1.5 0 0 1 .453 1.074Z" }));
function BLe({ onFileChange: t, fileInputRef: e, mimeTypes: n = ["audio/*"] }) {
  return /* @__PURE__ */ y.jsx("form", { onChange: t, children: /* @__PURE__ */ y.jsx(
    "input",
    {
      ref: e,
      accept: n.join(","),
      hidden: !0,
      name: "audio-input",
      type: "file"
    }
  ) });
}
const KX = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M23.14 10.608 2.253.164A1.559 1.559 0 0 0 0 1.557v20.887a1.558 1.558 0 0 0 2.253 1.392L23.14 13.393a1.557 1.557 0 0 0 0-2.785Z" })), zLe = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M15.189 2.021a9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h1.794a.249.249 0 0 1 .221.133 9.73 9.73 0 0 0 7.924 4.85h.06a1 1 0 0 0 1-1V3.02a1 1 0 0 0-1.06-.998Z" }));
function e8({ type: t, duration: e, theme: n, ...i }) {
  return /* @__PURE__ */ y.jsxs("div", { className: "mt-auto flex w-full items-center py-2", ...i, children: [
    /* @__PURE__ */ y.jsx(KX, { className: `mr-2 size-[1.4rem] ${n === "light" ? "fill-white" : "fill-black dark:fill-white"}` }),
    /* @__PURE__ */ y.jsxs("div", { className: `mb-[1px] font-sans text-sm font-medium ${n === "light" ? "text-white/60" : "text-black/50 dark:text-white/50"} `, children: [
      /* @__PURE__ */ y.jsx("span", { className: `${n === "light" ? "text-white" : "text-black dark:text-white"}`, children: "0:00 " }),
      "/ ",
      /* @__PURE__ */ y.jsx("span", { "data-testid": "media-duration", children: e })
    ] }),
    /* @__PURE__ */ y.jsx("div", { className: `relative mx-2 h-1 grow rounded ${n === "light" ? "bg-white/40" : "bg-grey/30 dark:bg-white/40"}`, children: /* @__PURE__ */ y.jsx("button", { className: "absolute left-0 top-[-6px] size-4 rounded-full border border-grey/50 bg-white shadow", type: "button" }) }),
    /* @__PURE__ */ y.jsx("button", { className: `mb-[1px] mr-4 px-1 font-sans text-sm font-medium ${n === "light" ? "text-white" : "text-current"}`, type: "button", children: "1×" }),
    /* @__PURE__ */ y.jsx("button", { type: "button", children: /* @__PURE__ */ y.jsx(zLe, { className: `${n === "light" ? "fill-white" : "fill-black dark:fill-black"}` }) }),
    /* @__PURE__ */ y.jsxs("div", { className: `relative ml-1 h-1 w-[80px] rounded ${n === "light" ? "bg-white/40" : "bg-grey/30 dark:bg-white/40"}`, children: [
      /* @__PURE__ */ y.jsx("div", { className: `absolute left-0 h-1 w-[60%] rounded ${n === "light" ? "bg-white" : "bg-black dark:bg-white"}` }),
      /* @__PURE__ */ y.jsx("button", { className: "absolute left-[55%] top-[-6px] size-4 rounded-full border border-grey/50 bg-white shadow", type: "button" })
    ] })
  ] });
}
e8.propTypes = {
  theme: A.oneOf(["light", "dark"])
};
function ko() {
  return /* @__PURE__ */ y.jsx("div", { className: "absolute top-0 z-10 !m-0 size-full cursor-default p-0" });
}
function JX({ progress: t }) {
  const e = {
    width: `${t == null ? void 0 : t.toFixed(0)}%`
  };
  return /* @__PURE__ */ y.jsx("div", { className: "h-full border border-transparent", children: /* @__PURE__ */ y.jsx("div", { className: "relative flex h-full items-center justify-center border border-grey/20 bg-grey-50 before:pb-[12.5%]", children: /* @__PURE__ */ y.jsx("div", { className: "flex w-full items-center justify-center overflow-hidden", children: /* @__PURE__ */ y.jsx(Xo, { style: e }) }) }) });
}
function eG({
  audioUploader: t,
  audioMimeTypes: e,
  onFileChange: n,
  setFileInputRef: i,
  audioDragHandler: r = {}
}) {
  const { isLoading: s, progress: o, errors: a } = t, l = j.useRef(null), u = (f) => {
    l.current = f, i(l);
  };
  return s ? /* @__PURE__ */ y.jsx(JX, { progress: o }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      mc,
      {
        desc: "Click to upload an audio file",
        errorDataTestId: "audio-upload-errors",
        errors: a,
        filePicker: () => Yi({ fileInputRef: l }),
        icon: "audio",
        isDraggedOver: r.isDraggedOver,
        placeholderRef: r.setRef,
        size: "xsmall"
      }
    ),
    /* @__PURE__ */ y.jsx(
      BLe,
      {
        fileInputRef: u,
        filePicker: () => Yi({ fileInputRef: l }),
        mimeTypes: e,
        onFileChange: n
      }
    )
  ] });
}
function tG({
  mimeTypes: t,
  src: e,
  progress: n,
  isUploading: i,
  isEditing: r,
  setFileInputRef: s,
  onFileChange: o,
  removeThumbnail: a,
  isDraggedOver: l,
  errors: u
}) {
  const f = j.useRef(null), d = (m) => {
    f.current = m, s(f);
  }, h = {
    width: `${n == null ? void 0 : n.toFixed(0)}%`
  };
  return l ? /* @__PURE__ */ y.jsx(
    "div",
    {
      className: "group relative flex aspect-square h-20 items-center justify-center rounded-md bg-purple",
      "data-testid": "audio-thumbnail-dragover",
      children: /* @__PURE__ */ y.jsx("p", { className: "font-sans text-sm font-semibold text-white", children: "Drop it 🔥" })
    }
  ) : u && u.length > 0 ? /* @__PURE__ */ y.jsx("span", { className: "group relative flex aspect-square h-20 items-center justify-center rounded-md bg-grey-200 px-1 text-center font-sans text-2xs font-semibold leading-snug text-red", "data-testid": "thumbnail-errors", children: u[0].message }) : e ? /* @__PURE__ */ y.jsxs("div", { className: "group/image relative flex aspect-square h-20 items-center justify-center rounded-md bg-purple", children: [
    /* @__PURE__ */ y.jsx("img", { alt: "Audio thumbnail", className: "size-full rounded-md object-cover transition ease-in", "data-testid": "audio-thumbnail", src: e }),
    r && /* @__PURE__ */ y.jsx("div", { className: "absolute right-2 top-2 flex opacity-0 transition-all group-hover/image:opacity-100", children: /* @__PURE__ */ y.jsx($l, { dataTestId: "remove-thumbnail", Icon: Bf, label: "Delete", onClick: a }) })
  ] }) : i ? /* @__PURE__ */ y.jsx("div", { className: "group flex aspect-square h-20 items-center justify-center rounded-md bg-purple", children: /* @__PURE__ */ y.jsx(Xo, { bgStyle: "transparent", style: h }) }) : /* @__PURE__ */ y.jsxs("div", { className: "group flex aspect-square h-20 items-center justify-center rounded-md bg-purple", children: [
    /* @__PURE__ */ y.jsx(
      "button",
      {
        className: "flex size-20 cursor-pointer items-center justify-center",
        "data-testid": "upload-thumbnail",
        type: "button",
        onClick: () => Yi({ fileInputRef: f }),
        children: r && /* @__PURE__ */ y.jsx(nY, { className: "ease-inx size-6 text-white transition-all duration-75 group-hover:scale-105" }) || /* @__PURE__ */ y.jsx(FLe, { className: "size-6 text-white" })
      }
    ),
    /* @__PURE__ */ y.jsx(
      z2,
      {
        disabled: !r,
        fileInputRef: d,
        filePicker: () => Yi({ fileInputRef: f }),
        mimeTypes: t,
        onFileChange: o
      }
    )
  ] });
}
function nG({
  isEditing: t,
  title: e,
  placeholder: n,
  thumbnailUploader: i,
  thumbnailMimeTypes: r,
  duration: s,
  updateTitle: o,
  thumbnailSrc: a,
  setFileInputRef: l,
  onFileChange: u,
  removeThumbnail: f,
  thumbnailDragHandler: d = {}
}) {
  const { isLoading: h, progress: m, errors: g } = i, w = (_) => {
    const S = Math.floor(_ / 60), C = Math.floor(_ - S * 60), E = C < 10 ? `0${C}` : `${C}`;
    return `${S}:${E}`;
  }, x = (_) => {
    o(_.target.value);
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs(
      "div",
      {
        ref: d.setRef,
        className: "flex rounded-md border border-grey/30 p-2",
        "data-testid": "audio-card-populated",
        children: [
          /* @__PURE__ */ y.jsx(
            tG,
            {
              errors: g,
              isDraggedOver: d.isDraggedOver,
              isEditing: t,
              isUploading: h,
              mimeTypes: r,
              progress: m,
              removeThumbnail: f,
              setFileInputRef: l,
              src: a,
              onFileChange: u
            }
          ),
          /* @__PURE__ */ y.jsxs("div", { className: "flex h-20 w-full flex-col justify-between px-4", children: [
            (t || e) && /* @__PURE__ */ y.jsx(
              Yw,
              {
                className: "bg-transparent font-sans text-lg font-bold text-current",
                "data-testid": "audio-title",
                name: "title",
                placeholder: n,
                readOnly: !t,
                value: e,
                onChange: x
              }
            ),
            /* @__PURE__ */ y.jsx(e8, { duration: w(s), theme: "dark" })
          ] })
        ]
      }
    ),
    !t && /* @__PURE__ */ y.jsx(ko, {})
  ] });
}
function iG({
  src: t,
  thumbnailSrc: e,
  title: n,
  isEditing: i,
  updateTitle: r,
  duration: s,
  audioUploader: o,
  audioMimeTypes: a,
  thumbnailUploader: l,
  thumbnailMimeTypes: u,
  audioFileInputRef: f,
  thumbnailFileInputRef: d,
  onAudioFileChange: h,
  onThumbnailFileChange: m,
  audioDragHandler: g,
  removeThumbnail: w,
  thumbnailDragHandler: x
}) {
  const _ = (C) => {
    f && (f.current = C.current);
  }, S = (C) => {
    d && (d.current = C.current);
  };
  return t ? /* @__PURE__ */ y.jsx("div", { className: "not-kg-prose", children: /* @__PURE__ */ y.jsx(
    nG,
    {
      duration: s,
      isEditing: i,
      placeholder: "Add a title...",
      removeThumbnail: w,
      setFileInputRef: S,
      setTitle: r,
      thumbnailDragHandler: x,
      thumbnailMimeTypes: u,
      thumbnailSrc: e,
      thumbnailUploader: l,
      title: n,
      updateTitle: r,
      onFileChange: m
    }
  ) }) : /* @__PURE__ */ y.jsx("div", { className: "not-kg-prose", children: /* @__PURE__ */ y.jsx(
    eG,
    {
      audioDragHandler: g,
      audioMimeTypes: a,
      audioUploader: o,
      setFileInputRef: _,
      onFileChange: h
    }
  ) });
}
iG.propTypes = {
  src: A.string,
  title: A.string,
  isEditing: A.bool,
  updateTitle: A.func,
  duration: A.number,
  thumbnailSrc: A.string,
  audioUploader: A.object,
  audioMimeTypes: A.array,
  thumbnailUploader: A.object,
  thumbnailMimeTypes: A.array,
  audioFileInputRef: A.object,
  thumbnailFileInputRef: A.object,
  onAudioFileChange: A.func,
  onThumbnailFileChange: A.func,
  audioDragHandler: A.object,
  removeThumbnail: A.func,
  thumbnailDragHandler: A.object
};
JX.propTypes = {
  progress: A.number
};
tG.propTypes = {
  errors: A.array,
  isDraggedOver: A.bool,
  isEditing: A.bool,
  isUploading: A.bool,
  mimeTypes: A.array,
  progress: A.number,
  removeThumbnail: A.func,
  setFileInputRef: A.func,
  src: A.string,
  onFileChange: A.func
};
nG.propTypes = {
  duration: A.number,
  errors: A.array,
  isEditing: A.bool,
  placeholder: A.string,
  removeThumbnail: A.func,
  setFileInputRef: A.func,
  thumbnailDragHandler: A.object,
  thumbnailMimeTypes: A.array,
  thumbnailSrc: A.string,
  thumbnailUploader: A.object,
  title: A.string,
  updateTitle: A.func,
  onFileChange: A.func
};
eG.propTypes = {
  audioDragHandler: A.object,
  audioMimeTypes: A.array,
  audioUploader: A.object,
  setFileInputRef: A.func,
  onFileChange: A.func
};
function WLe(t) {
  if (!t || typeof t != "string")
    return "";
  let e = t.split(".").slice(0, -1).join(".").replace(/[-_]/g, " ").replace(/[^\w\s]+/g, "").replace(/\s\s+/g, " ");
  return e.charAt(0).toUpperCase() + e.slice(1);
}
async function HLe(t) {
  let e = new Audio(), n;
  return new Promise((i) => {
    e.onloadedmetadata = function() {
      n = e.duration, i({
        duration: n
      });
    }, e.src = t;
  });
}
const sS = async (t, e, n, i) => {
  if (!t)
    return;
  const r = await i(t), s = r == null ? void 0 : r[0].url;
  if (!s)
    return;
  const o = t[0].name, a = WLe(o), l = URL.createObjectURL(t[0]), u = t[0].type, { duration: f } = await HLe(l);
  await n.update(() => {
    const d = N.$getNodeByKey(e);
    d.duration = f, d.src = s, d.mimeType = u, d.title = a;
  });
}, oR = async (t, e, n, i) => {
  if (!t)
    return;
  let r = "";
  n.getEditorState().read(() => {
    r = N.$getNodeByKey(e).src;
  });
  const s = await i(t, { formData: { url: r } });
  await n.update(() => {
    const o = N.$getNodeByKey(e);
    o.thumbnailSrc = s[0].url;
  });
};
function QLe({ duration: t, initialFile: e, nodeKey: n, src: i, thumbnailSrc: r, title: s, triggerFileDialog: o }) {
  var V, H;
  const [a] = Oe.useLexicalComposerContext(), { fileUploader: l, cardConfig: u } = j.useContext(dt), { isSelected: f, isEditing: d, setEditing: h } = j.useContext(gn), m = j.useRef(), g = j.useRef(), w = j.useContext(gn), [x, _] = j.useState(!1), S = l.useFileUpload("audio"), C = l.useFileUpload("mediaThumbnail"), E = Wo({ handleDrop: Z }), M = Wo({ handleDrop: L, disabled: !d });
  j.useEffect(() => {
    (async (q) => {
      q && !i && !S.isLoading && await sS([q], n, a, S.upload);
    })(e);
  }, []);
  const $ = async (R) => {
    const q = R.target.files;
    return await sS(q, n, a, S.upload);
  }, P = async (R) => {
    const q = R.target.files;
    return await oR(q, n, a, C.upload);
  }, W = (R) => {
    a.update(() => {
      const q = N.$getNodeByKey(n);
      q.title = R;
    });
  }, z = () => {
    a.update(() => {
      const R = N.$getNodeByKey(n);
      R.thumbnailSrc = "";
    });
  };
  async function Z(R) {
    await sS(R, n, a, S.upload);
  }
  async function L(R) {
    await oR(R, n, a, C.upload);
  }
  const Q = (R) => {
    R.preventDefault(), R.stopPropagation(), h(!0);
  };
  return j.useEffect(() => {
    if (!o)
      return;
    const R = setTimeout(() => {
      Yi({ fileInputRef: m }), a.update(() => {
        const q = N.$getNodeByKey(n);
        q.triggerFileDialog = !1;
      });
    });
    return () => {
      clearTimeout(R);
    };
  }), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      iG,
      {
        audioDragHandler: E,
        audioFileInputRef: m,
        audioMimeTypes: (V = l.fileTypes.audio) == null ? void 0 : V.mimeTypes,
        audioUploader: S,
        duration: t,
        isEditing: w.isEditing,
        nodeKey: n,
        removeThumbnail: z,
        src: i,
        thumbnailDragHandler: M,
        thumbnailFileInputRef: g,
        thumbnailMimeTypes: (H = l.fileTypes.image) == null ? void 0 : H.mimeTypes,
        thumbnailSrc: r,
        thumbnailUploader: C,
        title: s,
        updateTitle: W,
        onAudioFileChange: $,
        onThumbnailFileChange: P
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "audio",
        isVisible: x,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => _(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "audio",
        isVisible: i && f && !d && !x,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: Q }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !u.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !u.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Snippet",
              onClick: () => _(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const x6 = N.createCommand();
class I0 extends v1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__triggerFileDialog", !1);
    we(this, "__initialFile", null);
    const { triggerFileDialog: r, initialFile: s } = n;
    this.__triggerFileDialog = !n.src && r || !1, this.__initialFile = s || null;
  }
  getIcon() {
    return xS;
  }
  set triggerFileDialog(n) {
    const i = this.getWritable();
    i.__triggerFileDialog = n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(
      QLe,
      {
        duration: this.duration,
        initialFile: this.__initialFile,
        nodeKey: this.getKey(),
        src: this.src,
        thumbnailSrc: this.thumbnailSrc,
        title: this.title,
        triggerFileDialog: this.__triggerFileDialog
      }
    ) });
  }
}
we(I0, "kgMenu", [{
  label: "Audio",
  desc: "Upload and play an audio file",
  Icon: xS,
  insertCommand: x6,
  insertParams: {
    triggerFileDialog: !0
  },
  matches: ["audio"],
  priority: 14,
  shortcut: "/audio"
}]), we(I0, "uploadType", "audio");
const ULe = (t) => new I0(t), Y1 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h18M9 12h6M3 19h18" })), V1 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h18M3 12h6m-6 7h18" }));
function rG({
  alignment: t,
  buttonText: e,
  buttonPlaceholder: n,
  buttonUrl: i,
  handleAlignmentChange: r,
  handleButtonTextChange: s,
  handleButtonUrlChange: o,
  isEditing: a
}) {
  const l = [
    {
      label: "Left",
      name: "left",
      Icon: V1,
      dataTestId: "button-align-left"
    },
    {
      label: "Center",
      name: "center",
      Icon: Y1,
      dataTestId: "button-align-center"
    }
  ];
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx("div", { className: "inline-block w-full", children: /* @__PURE__ */ y.jsx("div", { className: `my-3 flex items-center ${a || i ? "opacity-100" : "opacity-50"} ${t === "left" ? "justify-start" : "justify-center"} `, "data-testid": "button-card", children: /* @__PURE__ */ y.jsx(Na, { dataTestId: "button-card-btn", href: i, placeholder: n, shrink: !0, value: e }) }) }),
    /* @__PURE__ */ y.jsx(ko, {}),
    a && /* @__PURE__ */ y.jsxs(Go, { children: [
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: l,
          label: "Content alignment",
          selectedName: t,
          onClick: r
        }
      ),
      /* @__PURE__ */ y.jsx(
        zf,
        {
          dataTestId: "button-input-text",
          label: "Button text",
          placeholder: "Add button text",
          value: e,
          onChange: s
        }
      ),
      /* @__PURE__ */ y.jsx(
        wp,
        {
          dataTestId: "button-input-url",
          label: "Button URL",
          value: i,
          onChange: o
        }
      )
    ] })
  ] });
}
rG.propTypes = {
  alignment: A.string,
  buttonText: A.string,
  buttonPlaceholder: A.string,
  buttonUrl: A.string,
  handleAlignmentChange: A.func,
  handleButtonTextChange: A.func,
  handleButtonUrlChange: A.func,
  handleButtonUrlFocus: A.func,
  handleOptionClick: A.func,
  isEditing: A.bool,
  suggestedUrls: A.array,
  suggestedUrlVisibility: A.bool
};
function ZLe({ alignment: t, buttonText: e, buttonUrl: n, nodeKey: i }) {
  const [r] = Oe.useLexicalComposerContext(), { isEditing: s, isSelected: o, setEditing: a } = j.useContext(gn), { cardConfig: l } = j.useContext(dt), [u, f] = j.useState(!1), d = (w) => {
    w.preventDefault(), w.stopPropagation(), a(!0);
  }, h = (w) => {
    r.update(() => {
      const x = N.$getNodeByKey(i);
      x.buttonText = w.target.value;
    });
  }, m = (w) => {
    r.update(() => {
      const x = N.$getNodeByKey(i);
      x.buttonUrl = w;
    });
  }, g = (w) => {
    r.update(() => {
      const x = N.$getNodeByKey(i);
      x.alignment = w;
    });
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      rG,
      {
        alignment: t,
        buttonPlaceholder: "Add button text",
        buttonText: e,
        buttonUrl: n,
        handleAlignmentChange: g,
        handleButtonTextChange: h,
        handleButtonUrlChange: m,
        isEditing: s
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "button",
        isVisible: u,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => f(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "button",
        isVisible: o && !s,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "edit-button-card", icon: "edit", isActive: !1, label: "Edit", onClick: d }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !l.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !l.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => f(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const sG = N.createCommand();
class ux extends O1 {
  static getType() {
    return "button";
  }
  getIcon() {
    return OS;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(
      qn,
      {
        nodeKey: this.getKey(),
        wrapperStyle: "wide",
        children: /* @__PURE__ */ y.jsx(
          ZLe,
          {
            alignment: this.alignment,
            buttonText: this.buttonText,
            buttonUrl: this.buttonUrl,
            nodeKey: this.getKey()
          }
        )
      }
    );
  }
}
we(ux, "kgMenu", {
  label: "Button",
  desc: "Add a button to your post",
  Icon: OS,
  insertCommand: sG,
  matches: ["button"],
  priority: 3,
  shortcut: "/button"
});
function qLe(t) {
  return new ux(t);
}
const YLe = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M22.5 2.25H1.5V9.75H22.5V2.25Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M1.5 21.75H22.5M1.5 15.75H22.5", stroke: "currentColor", strokeOpacity: 0.5, strokeLinecap: "round", strokeLinejoin: "round" }));
function VLe({
  autoFocus: t,
  focusNext: e,
  hasSettingsPanel: n,
  // Enter will focus the next card if this is true
  defaultKoenigEnterBehaviour: i = !1
}) {
  const [r] = Oe.useLexicalComposerContext(), { isEditing: s, nodeKey: o } = j.useContext(gn), [a, l] = j.useState(t);
  return j.useEffect(() => {
    s && a && r.focus(() => {
      r.getRootElement().focus({ preventScroll: !0 });
    });
  }, [a, r, s]), j.useEffect(() => lt.mergeRegister(
    // watch for editor becoming editable rather than relying on an `isEditing` prop
    // because the prop will change before the contenteditable becomes editable, meaning
    // we try to focus a non-editable editor which puts focus on the main editor instead
    r.registerEditableListener((u) => {
      t && l(!!u);
    }),
    r.registerCommand(
      N.KEY_ENTER_COMMAND,
      (u) => {
        var f;
        return document.querySelector("#typeahead-menu") ? !1 : u.metaKey || u.ctrlKey ? (u._fromNested = !0, (f = r._parentEditor) == null || f.dispatchCommand(N.KEY_ENTER_COMMAND, u), !0) : e && !u.shiftKey ? (u.preventDefault(), e.focus(() => {
          e.getRootElement().focus({ preventScroll: !0 });
        }), !0) : i ? u.shiftKey ? !1 : (u._fromNested = !0, r._parentEditor.dispatchCommand(N.KEY_ENTER_COMMAND, u), !0) : !1;
      },
      N.COMMAND_PRIORITY_LOW
    ),
    r.registerCommand(
      N.BLUR_COMMAND,
      () => n && r._parentEditor ? (r._parentEditor.getEditorState().read(() => {
        r._parentEditor.update(() => {
          if (!N.$getSelection()) {
            const u = N.$createNodeSelection();
            u.add(o), N.$setSelection(u);
          }
        }, { tag: "history-merge" });
      }), !0) : !1,
      N.COMMAND_PRIORITY_LOW
    )
  ), [r, t, e, o, n, i]), null;
}
const XLe = ({ text: t = "Type here", className: e = "" }) => /* @__PURE__ */ y.jsx("div", { className: "placeholder not-kg-prose pointer-events-none h-0 cursor-text overflow-visible", children: /* @__PURE__ */ y.jsx("div", { className: `line-clamp-1 translate-y-[-100%] xs:overflow-visible ${e}`, children: t }) }), Pr = ({
  initialEditor: t,
  initialEditorState: e,
  initialTheme: n,
  nodes: i = "basic",
  placeholderText: r = "",
  textClassName: s = "",
  placeholderClassName: o = "",
  autoFocus: a = !1,
  focusNext: l = null,
  singleParagraph: u = !1,
  hasSettingsPanel: f = !1,
  defaultKoenigEnterBehaviour: d = !1,
  hiddenFormats: h = [],
  useDefaultClasses: m = !0,
  dataTestId: g,
  children: w
}) => {
  const x = i === "minimal" ? pr : $f, _ = i === "minimal" ? IX : AIe;
  return /* @__PURE__ */ y.jsx(
    hee,
    {
      initialEditor: t,
      initialEditorState: e,
      initialNodes: x,
      initialTheme: n,
      children: /* @__PURE__ */ y.jsxs(
        lx,
        {
          className: s,
          dataTestId: g,
          hiddenFormats: h,
          inheritStyles: !0,
          isDragEnabled: !1,
          markdownTransformers: _,
          placeholder: /* @__PURE__ */ y.jsx(XLe, { className: o, text: r }),
          useDefaultClasses: m,
          children: [
            u && /* @__PURE__ */ y.jsx(i_, { paragraphs: 1 }),
            w,
            /* @__PURE__ */ y.jsx(
              VLe,
              {
                autoFocus: a,
                defaultKoenigEnterBehaviour: d,
                focusNext: l,
                hasSettingsPanel: f
              }
            ),
            /* @__PURE__ */ y.jsx(VE, {})
          ]
        }
      )
    }
  );
}, GLe = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M7.5 9H1.5V15H7.5V9Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M12 14.25H22.5M12 9.75H22.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M1.5 21.75H22.5M1.5 2.25H22.5", stroke: "currentColor", strokeOpacity: 0.4, strokeLinecap: "round", strokeLinejoin: "round" }));
function aR(t) {
  var r;
  if (t.hasFormat("code"))
    return;
  const e = t.getTextContent(), n = (r = e.match(/\{(\w*?)(?:,? *"(.*?)")?\}/)) == null ? void 0 : r[0];
  if (!n)
    return;
  e.split(/({.*?})/g).filter((s) => s !== "").reverse().forEach((s) => {
    const o = new N.TextNode(s);
    s === n && (o.setFormat("code"), o.select()), t.insertAfter(o);
  }), t.remove();
}
function KLe(t) {
  kt(() => {
    const e = t.registerNodeTransform(N.TextNode, aR);
    let n;
    return t.hasNode(Fo) && (n = t.registerNodeTransform(Fo, aR)), () => {
      e(), n && n();
    };
  }, [t]);
}
function cx() {
  const [t] = Oe.useLexicalComposerContext();
  return KLe(t);
}
const oG = {
  paragraph: void 0,
  heading: {
    h1: void 0,
    h2: void 0,
    h3: void 0,
    h4: void 0,
    h5: void 0,
    h6: void 0
  },
  quote: void 0,
  aside: void 0,
  list: {
    nested: {
      listitem: "!list-none"
    },
    ol: void 0,
    ul: void 0,
    listitem: void 0
  },
  link: void 0,
  text: {
    bold: void 0,
    italic: "italic",
    overflowed: void 0,
    hashtag: void 0,
    underline: "underline",
    strikethrough: "line-through",
    underlinestrikethrough: void 0,
    code: void 0
  },
  code: void 0,
  tkHighlighted: "bg-lime-500 dark:bg-lime-800 py-1",
  atLink: "inline-block bg-grey-200/70 mx-[-.2rem] px-1 pb-[.2rem] leading-[1.4] rounded dark:bg-grey-950",
  atLinkSearch: "after:content-[attr(data-placeholder)] after:text-grey-500 dark:after:text-grey-600 min-w-[5px]",
  atLinkIcon: "size-[1.5rem] stroke-[2.5] inline-block mx-1 mb-1 text-grey-600 dark:text-grey-500"
}, JLe = {
  none: "bg-transparent border-transparent",
  white: "bg-transparent border-grey-900/15 dark:border-grey-100/20",
  grey: "bg-grey/10 border-transparent",
  blue: "bg-blue/10 border-transparent",
  green: "bg-green/10 border-transparent",
  yellow: "bg-yellow/10 border-transparent",
  red: "bg-red/10 border-transparent",
  pink: "bg-pink/10 border-transparent",
  purple: "bg-purple/10 border-transparent"
};
function t8(t, e) {
  return e = { exports: {} }, t(e, e.exports), e.exports;
}
var Hm = {
  aliceblue: [240, 248, 255],
  antiquewhite: [250, 235, 215],
  aqua: [0, 255, 255],
  aquamarine: [127, 255, 212],
  azure: [240, 255, 255],
  beige: [245, 245, 220],
  bisque: [255, 228, 196],
  black: [0, 0, 0],
  blanchedalmond: [255, 235, 205],
  blue: [0, 0, 255],
  blueviolet: [138, 43, 226],
  brown: [165, 42, 42],
  burlywood: [222, 184, 135],
  cadetblue: [95, 158, 160],
  chartreuse: [127, 255, 0],
  chocolate: [210, 105, 30],
  coral: [255, 127, 80],
  cornflowerblue: [100, 149, 237],
  cornsilk: [255, 248, 220],
  crimson: [220, 20, 60],
  cyan: [0, 255, 255],
  darkblue: [0, 0, 139],
  darkcyan: [0, 139, 139],
  darkgoldenrod: [184, 134, 11],
  darkgray: [169, 169, 169],
  darkgreen: [0, 100, 0],
  darkgrey: [169, 169, 169],
  darkkhaki: [189, 183, 107],
  darkmagenta: [139, 0, 139],
  darkolivegreen: [85, 107, 47],
  darkorange: [255, 140, 0],
  darkorchid: [153, 50, 204],
  darkred: [139, 0, 0],
  darksalmon: [233, 150, 122],
  darkseagreen: [143, 188, 143],
  darkslateblue: [72, 61, 139],
  darkslategray: [47, 79, 79],
  darkslategrey: [47, 79, 79],
  darkturquoise: [0, 206, 209],
  darkviolet: [148, 0, 211],
  deeppink: [255, 20, 147],
  deepskyblue: [0, 191, 255],
  dimgray: [105, 105, 105],
  dimgrey: [105, 105, 105],
  dodgerblue: [30, 144, 255],
  firebrick: [178, 34, 34],
  floralwhite: [255, 250, 240],
  forestgreen: [34, 139, 34],
  fuchsia: [255, 0, 255],
  gainsboro: [220, 220, 220],
  ghostwhite: [248, 248, 255],
  gold: [255, 215, 0],
  goldenrod: [218, 165, 32],
  gray: [128, 128, 128],
  green: [0, 128, 0],
  greenyellow: [173, 255, 47],
  grey: [128, 128, 128],
  honeydew: [240, 255, 240],
  hotpink: [255, 105, 180],
  indianred: [205, 92, 92],
  indigo: [75, 0, 130],
  ivory: [255, 255, 240],
  khaki: [240, 230, 140],
  lavender: [230, 230, 250],
  lavenderblush: [255, 240, 245],
  lawngreen: [124, 252, 0],
  lemonchiffon: [255, 250, 205],
  lightblue: [173, 216, 230],
  lightcoral: [240, 128, 128],
  lightcyan: [224, 255, 255],
  lightgoldenrodyellow: [250, 250, 210],
  lightgray: [211, 211, 211],
  lightgreen: [144, 238, 144],
  lightgrey: [211, 211, 211],
  lightpink: [255, 182, 193],
  lightsalmon: [255, 160, 122],
  lightseagreen: [32, 178, 170],
  lightskyblue: [135, 206, 250],
  lightslategray: [119, 136, 153],
  lightslategrey: [119, 136, 153],
  lightsteelblue: [176, 196, 222],
  lightyellow: [255, 255, 224],
  lime: [0, 255, 0],
  limegreen: [50, 205, 50],
  linen: [250, 240, 230],
  magenta: [255, 0, 255],
  maroon: [128, 0, 0],
  mediumaquamarine: [102, 205, 170],
  mediumblue: [0, 0, 205],
  mediumorchid: [186, 85, 211],
  mediumpurple: [147, 112, 219],
  mediumseagreen: [60, 179, 113],
  mediumslateblue: [123, 104, 238],
  mediumspringgreen: [0, 250, 154],
  mediumturquoise: [72, 209, 204],
  mediumvioletred: [199, 21, 133],
  midnightblue: [25, 25, 112],
  mintcream: [245, 255, 250],
  mistyrose: [255, 228, 225],
  moccasin: [255, 228, 181],
  navajowhite: [255, 222, 173],
  navy: [0, 0, 128],
  oldlace: [253, 245, 230],
  olive: [128, 128, 0],
  olivedrab: [107, 142, 35],
  orange: [255, 165, 0],
  orangered: [255, 69, 0],
  orchid: [218, 112, 214],
  palegoldenrod: [238, 232, 170],
  palegreen: [152, 251, 152],
  paleturquoise: [175, 238, 238],
  palevioletred: [219, 112, 147],
  papayawhip: [255, 239, 213],
  peachpuff: [255, 218, 185],
  peru: [205, 133, 63],
  pink: [255, 192, 203],
  plum: [221, 160, 221],
  powderblue: [176, 224, 230],
  purple: [128, 0, 128],
  rebeccapurple: [102, 51, 153],
  red: [255, 0, 0],
  rosybrown: [188, 143, 143],
  royalblue: [65, 105, 225],
  saddlebrown: [139, 69, 19],
  salmon: [250, 128, 114],
  sandybrown: [244, 164, 96],
  seagreen: [46, 139, 87],
  seashell: [255, 245, 238],
  sienna: [160, 82, 45],
  silver: [192, 192, 192],
  skyblue: [135, 206, 235],
  slateblue: [106, 90, 205],
  slategray: [112, 128, 144],
  slategrey: [112, 128, 144],
  snow: [255, 250, 250],
  springgreen: [0, 255, 127],
  steelblue: [70, 130, 180],
  tan: [210, 180, 140],
  teal: [0, 128, 128],
  thistle: [216, 191, 216],
  tomato: [255, 99, 71],
  turquoise: [64, 224, 208],
  violet: [238, 130, 238],
  wheat: [245, 222, 179],
  white: [255, 255, 255],
  whitesmoke: [245, 245, 245],
  yellow: [255, 255, 0],
  yellowgreen: [154, 205, 50]
}, eRe = function(e) {
  return !e || typeof e == "string" ? !1 : e instanceof Array || Array.isArray(e) || e.length >= 0 && (e.splice instanceof Function || Object.getOwnPropertyDescriptor(e, e.length - 1) && e.constructor.name !== "String");
}, Qm = t8(function(t) {
  var e = Array.prototype.concat, n = Array.prototype.slice, i = t.exports = function(s) {
    for (var o = [], a = 0, l = s.length; a < l; a++) {
      var u = s[a];
      eRe(u) ? o = e.call(o, n.call(u)) : o.push(u);
    }
    return o;
  };
  i.wrap = function(r) {
    return function() {
      return r(i(arguments));
    };
  };
}), tf = t8(function(t) {
  var e = Object.hasOwnProperty, n = /* @__PURE__ */ Object.create(null);
  for (var i in Hm)
    e.call(Hm, i) && (n[Hm[i]] = i);
  var r = t.exports = {
    to: {},
    get: {}
  };
  r.get = function(a) {
    var l = a.substring(0, 3).toLowerCase(), u, f;
    switch (l) {
      case "hsl":
        u = r.get.hsl(a), f = "hsl";
        break;
      case "hwb":
        u = r.get.hwb(a), f = "hwb";
        break;
      default:
        u = r.get.rgb(a), f = "rgb";
        break;
    }
    return u ? { model: f, value: u } : null;
  }, r.get.rgb = function(a) {
    if (!a)
      return null;
    var l = /^#([a-f0-9]{3,4})$/i, u = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, f = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, d = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, h = /^(\w+)$/, m = [0, 0, 0, 1], g, w, x;
    if (g = a.match(u)) {
      for (x = g[2], g = g[1], w = 0; w < 3; w++) {
        var _ = w * 2;
        m[w] = parseInt(g.slice(_, _ + 2), 16);
      }
      x && (m[3] = parseInt(x, 16) / 255);
    } else if (g = a.match(l)) {
      for (g = g[1], x = g[3], w = 0; w < 3; w++)
        m[w] = parseInt(g[w] + g[w], 16);
      x && (m[3] = parseInt(x + x, 16) / 255);
    } else if (g = a.match(f)) {
      for (w = 0; w < 3; w++)
        m[w] = parseInt(g[w + 1], 0);
      g[4] && (g[5] ? m[3] = parseFloat(g[4]) * 0.01 : m[3] = parseFloat(g[4]));
    } else if (g = a.match(d)) {
      for (w = 0; w < 3; w++)
        m[w] = Math.round(parseFloat(g[w + 1]) * 2.55);
      g[4] && (g[5] ? m[3] = parseFloat(g[4]) * 0.01 : m[3] = parseFloat(g[4]));
    } else return (g = a.match(h)) ? g[1] === "transparent" ? [0, 0, 0, 0] : e.call(Hm, g[1]) ? (m = Hm[g[1]], m[3] = 1, m) : null : null;
    for (w = 0; w < 3; w++)
      m[w] = s(m[w], 0, 255);
    return m[3] = s(m[3], 0, 1), m;
  }, r.get.hsl = function(a) {
    if (!a)
      return null;
    var l = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, u = a.match(l);
    if (u) {
      var f = parseFloat(u[4]), d = (parseFloat(u[1]) % 360 + 360) % 360, h = s(parseFloat(u[2]), 0, 100), m = s(parseFloat(u[3]), 0, 100), g = s(isNaN(f) ? 1 : f, 0, 1);
      return [d, h, m, g];
    }
    return null;
  }, r.get.hwb = function(a) {
    if (!a)
      return null;
    var l = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, u = a.match(l);
    if (u) {
      var f = parseFloat(u[4]), d = (parseFloat(u[1]) % 360 + 360) % 360, h = s(parseFloat(u[2]), 0, 100), m = s(parseFloat(u[3]), 0, 100), g = s(isNaN(f) ? 1 : f, 0, 1);
      return [d, h, m, g];
    }
    return null;
  }, r.to.hex = function() {
    var a = Qm(arguments);
    return "#" + o(a[0]) + o(a[1]) + o(a[2]) + (a[3] < 1 ? o(Math.round(a[3] * 255)) : "");
  }, r.to.rgb = function() {
    var a = Qm(arguments);
    return a.length < 4 || a[3] === 1 ? "rgb(" + Math.round(a[0]) + ", " + Math.round(a[1]) + ", " + Math.round(a[2]) + ")" : "rgba(" + Math.round(a[0]) + ", " + Math.round(a[1]) + ", " + Math.round(a[2]) + ", " + a[3] + ")";
  }, r.to.rgb.percent = function() {
    var a = Qm(arguments), l = Math.round(a[0] / 255 * 100), u = Math.round(a[1] / 255 * 100), f = Math.round(a[2] / 255 * 100);
    return a.length < 4 || a[3] === 1 ? "rgb(" + l + "%, " + u + "%, " + f + "%)" : "rgba(" + l + "%, " + u + "%, " + f + "%, " + a[3] + ")";
  }, r.to.hsl = function() {
    var a = Qm(arguments);
    return a.length < 4 || a[3] === 1 ? "hsl(" + a[0] + ", " + a[1] + "%, " + a[2] + "%)" : "hsla(" + a[0] + ", " + a[1] + "%, " + a[2] + "%, " + a[3] + ")";
  }, r.to.hwb = function() {
    var a = Qm(arguments), l = "";
    return a.length >= 4 && a[3] !== 1 && (l = ", " + a[3]), "hwb(" + a[0] + ", " + a[1] + "%, " + a[2] + "%" + l + ")";
  }, r.to.keyword = function(a) {
    return n[a.slice(0, 3)];
  };
  function s(a, l, u) {
    return Math.min(Math.max(l, a), u);
  }
  function o(a) {
    var l = Math.round(a).toString(16).toUpperCase();
    return l.length < 2 ? "0" + l : l;
  }
});
tf.to;
tf.get;
var Lc = {
  aliceblue: [240, 248, 255],
  antiquewhite: [250, 235, 215],
  aqua: [0, 255, 255],
  aquamarine: [127, 255, 212],
  azure: [240, 255, 255],
  beige: [245, 245, 220],
  bisque: [255, 228, 196],
  black: [0, 0, 0],
  blanchedalmond: [255, 235, 205],
  blue: [0, 0, 255],
  blueviolet: [138, 43, 226],
  brown: [165, 42, 42],
  burlywood: [222, 184, 135],
  cadetblue: [95, 158, 160],
  chartreuse: [127, 255, 0],
  chocolate: [210, 105, 30],
  coral: [255, 127, 80],
  cornflowerblue: [100, 149, 237],
  cornsilk: [255, 248, 220],
  crimson: [220, 20, 60],
  cyan: [0, 255, 255],
  darkblue: [0, 0, 139],
  darkcyan: [0, 139, 139],
  darkgoldenrod: [184, 134, 11],
  darkgray: [169, 169, 169],
  darkgreen: [0, 100, 0],
  darkgrey: [169, 169, 169],
  darkkhaki: [189, 183, 107],
  darkmagenta: [139, 0, 139],
  darkolivegreen: [85, 107, 47],
  darkorange: [255, 140, 0],
  darkorchid: [153, 50, 204],
  darkred: [139, 0, 0],
  darksalmon: [233, 150, 122],
  darkseagreen: [143, 188, 143],
  darkslateblue: [72, 61, 139],
  darkslategray: [47, 79, 79],
  darkslategrey: [47, 79, 79],
  darkturquoise: [0, 206, 209],
  darkviolet: [148, 0, 211],
  deeppink: [255, 20, 147],
  deepskyblue: [0, 191, 255],
  dimgray: [105, 105, 105],
  dimgrey: [105, 105, 105],
  dodgerblue: [30, 144, 255],
  firebrick: [178, 34, 34],
  floralwhite: [255, 250, 240],
  forestgreen: [34, 139, 34],
  fuchsia: [255, 0, 255],
  gainsboro: [220, 220, 220],
  ghostwhite: [248, 248, 255],
  gold: [255, 215, 0],
  goldenrod: [218, 165, 32],
  gray: [128, 128, 128],
  green: [0, 128, 0],
  greenyellow: [173, 255, 47],
  grey: [128, 128, 128],
  honeydew: [240, 255, 240],
  hotpink: [255, 105, 180],
  indianred: [205, 92, 92],
  indigo: [75, 0, 130],
  ivory: [255, 255, 240],
  khaki: [240, 230, 140],
  lavender: [230, 230, 250],
  lavenderblush: [255, 240, 245],
  lawngreen: [124, 252, 0],
  lemonchiffon: [255, 250, 205],
  lightblue: [173, 216, 230],
  lightcoral: [240, 128, 128],
  lightcyan: [224, 255, 255],
  lightgoldenrodyellow: [250, 250, 210],
  lightgray: [211, 211, 211],
  lightgreen: [144, 238, 144],
  lightgrey: [211, 211, 211],
  lightpink: [255, 182, 193],
  lightsalmon: [255, 160, 122],
  lightseagreen: [32, 178, 170],
  lightskyblue: [135, 206, 250],
  lightslategray: [119, 136, 153],
  lightslategrey: [119, 136, 153],
  lightsteelblue: [176, 196, 222],
  lightyellow: [255, 255, 224],
  lime: [0, 255, 0],
  limegreen: [50, 205, 50],
  linen: [250, 240, 230],
  magenta: [255, 0, 255],
  maroon: [128, 0, 0],
  mediumaquamarine: [102, 205, 170],
  mediumblue: [0, 0, 205],
  mediumorchid: [186, 85, 211],
  mediumpurple: [147, 112, 219],
  mediumseagreen: [60, 179, 113],
  mediumslateblue: [123, 104, 238],
  mediumspringgreen: [0, 250, 154],
  mediumturquoise: [72, 209, 204],
  mediumvioletred: [199, 21, 133],
  midnightblue: [25, 25, 112],
  mintcream: [245, 255, 250],
  mistyrose: [255, 228, 225],
  moccasin: [255, 228, 181],
  navajowhite: [255, 222, 173],
  navy: [0, 0, 128],
  oldlace: [253, 245, 230],
  olive: [128, 128, 0],
  olivedrab: [107, 142, 35],
  orange: [255, 165, 0],
  orangered: [255, 69, 0],
  orchid: [218, 112, 214],
  palegoldenrod: [238, 232, 170],
  palegreen: [152, 251, 152],
  paleturquoise: [175, 238, 238],
  palevioletred: [219, 112, 147],
  papayawhip: [255, 239, 213],
  peachpuff: [255, 218, 185],
  peru: [205, 133, 63],
  pink: [255, 192, 203],
  plum: [221, 160, 221],
  powderblue: [176, 224, 230],
  purple: [128, 0, 128],
  rebeccapurple: [102, 51, 153],
  red: [255, 0, 0],
  rosybrown: [188, 143, 143],
  royalblue: [65, 105, 225],
  saddlebrown: [139, 69, 19],
  salmon: [250, 128, 114],
  sandybrown: [244, 164, 96],
  seagreen: [46, 139, 87],
  seashell: [255, 245, 238],
  sienna: [160, 82, 45],
  silver: [192, 192, 192],
  skyblue: [135, 206, 235],
  slateblue: [106, 90, 205],
  slategray: [112, 128, 144],
  slategrey: [112, 128, 144],
  snow: [255, 250, 250],
  springgreen: [0, 255, 127],
  steelblue: [70, 130, 180],
  tan: [210, 180, 140],
  teal: [0, 128, 128],
  thistle: [216, 191, 216],
  tomato: [255, 99, 71],
  turquoise: [64, 224, 208],
  violet: [238, 130, 238],
  wheat: [245, 222, 179],
  white: [255, 255, 255],
  whitesmoke: [245, 245, 245],
  yellow: [255, 255, 0],
  yellowgreen: [154, 205, 50]
}, si = t8(function(t) {
  var e = {};
  for (var n in Lc)
    Lc.hasOwnProperty(n) && (e[Lc[n]] = n);
  var i = t.exports = {
    rgb: { channels: 3, labels: "rgb" },
    hsl: { channels: 3, labels: "hsl" },
    hsv: { channels: 3, labels: "hsv" },
    hwb: { channels: 3, labels: "hwb" },
    cmyk: { channels: 4, labels: "cmyk" },
    xyz: { channels: 3, labels: "xyz" },
    lab: { channels: 3, labels: "lab" },
    lch: { channels: 3, labels: "lch" },
    hex: { channels: 1, labels: ["hex"] },
    keyword: { channels: 1, labels: ["keyword"] },
    ansi16: { channels: 1, labels: ["ansi16"] },
    ansi256: { channels: 1, labels: ["ansi256"] },
    hcg: { channels: 3, labels: ["h", "c", "g"] },
    apple: { channels: 3, labels: ["r16", "g16", "b16"] },
    gray: { channels: 1, labels: ["gray"] }
  };
  for (var r in i)
    if (i.hasOwnProperty(r)) {
      if (!("channels" in i[r]))
        throw new Error("missing channels property: " + r);
      if (!("labels" in i[r]))
        throw new Error("missing channel labels property: " + r);
      if (i[r].labels.length !== i[r].channels)
        throw new Error("channel and label counts mismatch: " + r);
      var s = i[r].channels, o = i[r].labels;
      delete i[r].channels, delete i[r].labels, Object.defineProperty(i[r], "channels", { value: s }), Object.defineProperty(i[r], "labels", { value: o });
    }
  i.rgb.hsl = function(l) {
    var u = l[0] / 255, f = l[1] / 255, d = l[2] / 255, h = Math.min(u, f, d), m = Math.max(u, f, d), g = m - h, w, x, _;
    return m === h ? w = 0 : u === m ? w = (f - d) / g : f === m ? w = 2 + (d - u) / g : d === m && (w = 4 + (u - f) / g), w = Math.min(w * 60, 360), w < 0 && (w += 360), _ = (h + m) / 2, m === h ? x = 0 : _ <= 0.5 ? x = g / (m + h) : x = g / (2 - m - h), [w, x * 100, _ * 100];
  }, i.rgb.hsv = function(l) {
    var u, f, d, h, m, g = l[0] / 255, w = l[1] / 255, x = l[2] / 255, _ = Math.max(g, w, x), S = _ - Math.min(g, w, x), C = function(E) {
      return (_ - E) / 6 / S + 1 / 2;
    };
    return S === 0 ? h = m = 0 : (m = S / _, u = C(g), f = C(w), d = C(x), g === _ ? h = d - f : w === _ ? h = 1 / 3 + u - d : x === _ && (h = 2 / 3 + f - u), h < 0 ? h += 1 : h > 1 && (h -= 1)), [
      h * 360,
      m * 100,
      _ * 100
    ];
  }, i.rgb.hwb = function(l) {
    var u = l[0], f = l[1], d = l[2], h = i.rgb.hsl(l)[0], m = 1 / 255 * Math.min(u, Math.min(f, d));
    return d = 1 - 1 / 255 * Math.max(u, Math.max(f, d)), [h, m * 100, d * 100];
  }, i.rgb.cmyk = function(l) {
    var u = l[0] / 255, f = l[1] / 255, d = l[2] / 255, h, m, g, w;
    return w = Math.min(1 - u, 1 - f, 1 - d), h = (1 - u - w) / (1 - w) || 0, m = (1 - f - w) / (1 - w) || 0, g = (1 - d - w) / (1 - w) || 0, [h * 100, m * 100, g * 100, w * 100];
  };
  function a(l, u) {
    return Math.pow(l[0] - u[0], 2) + Math.pow(l[1] - u[1], 2) + Math.pow(l[2] - u[2], 2);
  }
  i.rgb.keyword = function(l) {
    var u = e[l];
    if (u)
      return u;
    var f = 1 / 0, d;
    for (var h in Lc)
      if (Lc.hasOwnProperty(h)) {
        var m = Lc[h], g = a(l, m);
        g < f && (f = g, d = h);
      }
    return d;
  }, i.keyword.rgb = function(l) {
    return Lc[l];
  }, i.rgb.xyz = function(l) {
    var u = l[0] / 255, f = l[1] / 255, d = l[2] / 255;
    u = u > 0.04045 ? Math.pow((u + 0.055) / 1.055, 2.4) : u / 12.92, f = f > 0.04045 ? Math.pow((f + 0.055) / 1.055, 2.4) : f / 12.92, d = d > 0.04045 ? Math.pow((d + 0.055) / 1.055, 2.4) : d / 12.92;
    var h = u * 0.4124 + f * 0.3576 + d * 0.1805, m = u * 0.2126 + f * 0.7152 + d * 0.0722, g = u * 0.0193 + f * 0.1192 + d * 0.9505;
    return [h * 100, m * 100, g * 100];
  }, i.rgb.lab = function(l) {
    var u = i.rgb.xyz(l), f = u[0], d = u[1], h = u[2], m, g, w;
    return f /= 95.047, d /= 100, h /= 108.883, f = f > 8856e-6 ? Math.pow(f, 1 / 3) : 7.787 * f + 16 / 116, d = d > 8856e-6 ? Math.pow(d, 1 / 3) : 7.787 * d + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116, m = 116 * d - 16, g = 500 * (f - d), w = 200 * (d - h), [m, g, w];
  }, i.hsl.rgb = function(l) {
    var u = l[0] / 360, f = l[1] / 100, d = l[2] / 100, h, m, g, w, x;
    if (f === 0)
      return x = d * 255, [x, x, x];
    d < 0.5 ? m = d * (1 + f) : m = d + f - d * f, h = 2 * d - m, w = [0, 0, 0];
    for (var _ = 0; _ < 3; _++)
      g = u + 1 / 3 * -(_ - 1), g < 0 && g++, g > 1 && g--, 6 * g < 1 ? x = h + (m - h) * 6 * g : 2 * g < 1 ? x = m : 3 * g < 2 ? x = h + (m - h) * (2 / 3 - g) * 6 : x = h, w[_] = x * 255;
    return w;
  }, i.hsl.hsv = function(l) {
    var u = l[0], f = l[1] / 100, d = l[2] / 100, h = f, m = Math.max(d, 0.01), g, w;
    return d *= 2, f *= d <= 1 ? d : 2 - d, h *= m <= 1 ? m : 2 - m, w = (d + f) / 2, g = d === 0 ? 2 * h / (m + h) : 2 * f / (d + f), [u, g * 100, w * 100];
  }, i.hsv.rgb = function(l) {
    var u = l[0] / 60, f = l[1] / 100, d = l[2] / 100, h = Math.floor(u) % 6, m = u - Math.floor(u), g = 255 * d * (1 - f), w = 255 * d * (1 - f * m), x = 255 * d * (1 - f * (1 - m));
    switch (d *= 255, h) {
      case 0:
        return [d, x, g];
      case 1:
        return [w, d, g];
      case 2:
        return [g, d, x];
      case 3:
        return [g, w, d];
      case 4:
        return [x, g, d];
      case 5:
        return [d, g, w];
    }
  }, i.hsv.hsl = function(l) {
    var u = l[0], f = l[1] / 100, d = l[2] / 100, h = Math.max(d, 0.01), m, g, w;
    return w = (2 - f) * d, m = (2 - f) * h, g = f * h, g /= m <= 1 ? m : 2 - m, g = g || 0, w /= 2, [u, g * 100, w * 100];
  }, i.hwb.rgb = function(l) {
    var u = l[0] / 360, f = l[1] / 100, d = l[2] / 100, h = f + d, m, g, w, x;
    h > 1 && (f /= h, d /= h), m = Math.floor(6 * u), g = 1 - d, w = 6 * u - m, m & 1 && (w = 1 - w), x = f + w * (g - f);
    var _, S, C;
    switch (m) {
      default:
      case 6:
      case 0:
        _ = g, S = x, C = f;
        break;
      case 1:
        _ = x, S = g, C = f;
        break;
      case 2:
        _ = f, S = g, C = x;
        break;
      case 3:
        _ = f, S = x, C = g;
        break;
      case 4:
        _ = x, S = f, C = g;
        break;
      case 5:
        _ = g, S = f, C = x;
        break;
    }
    return [_ * 255, S * 255, C * 255];
  }, i.cmyk.rgb = function(l) {
    var u = l[0] / 100, f = l[1] / 100, d = l[2] / 100, h = l[3] / 100, m, g, w;
    return m = 1 - Math.min(1, u * (1 - h) + h), g = 1 - Math.min(1, f * (1 - h) + h), w = 1 - Math.min(1, d * (1 - h) + h), [m * 255, g * 255, w * 255];
  }, i.xyz.rgb = function(l) {
    var u = l[0] / 100, f = l[1] / 100, d = l[2] / 100, h, m, g;
    return h = u * 3.2406 + f * -1.5372 + d * -0.4986, m = u * -0.9689 + f * 1.8758 + d * 0.0415, g = u * 0.0557 + f * -0.204 + d * 1.057, h = h > 31308e-7 ? 1.055 * Math.pow(h, 1 / 2.4) - 0.055 : h * 12.92, m = m > 31308e-7 ? 1.055 * Math.pow(m, 1 / 2.4) - 0.055 : m * 12.92, g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92, h = Math.min(Math.max(0, h), 1), m = Math.min(Math.max(0, m), 1), g = Math.min(Math.max(0, g), 1), [h * 255, m * 255, g * 255];
  }, i.xyz.lab = function(l) {
    var u = l[0], f = l[1], d = l[2], h, m, g;
    return u /= 95.047, f /= 100, d /= 108.883, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, f = f > 8856e-6 ? Math.pow(f, 1 / 3) : 7.787 * f + 16 / 116, d = d > 8856e-6 ? Math.pow(d, 1 / 3) : 7.787 * d + 16 / 116, h = 116 * f - 16, m = 500 * (u - f), g = 200 * (f - d), [h, m, g];
  }, i.lab.xyz = function(l) {
    var u = l[0], f = l[1], d = l[2], h, m, g;
    m = (u + 16) / 116, h = f / 500 + m, g = m - d / 200;
    var w = Math.pow(m, 3), x = Math.pow(h, 3), _ = Math.pow(g, 3);
    return m = w > 8856e-6 ? w : (m - 16 / 116) / 7.787, h = x > 8856e-6 ? x : (h - 16 / 116) / 7.787, g = _ > 8856e-6 ? _ : (g - 16 / 116) / 7.787, h *= 95.047, m *= 100, g *= 108.883, [h, m, g];
  }, i.lab.lch = function(l) {
    var u = l[0], f = l[1], d = l[2], h, m, g;
    return h = Math.atan2(d, f), m = h * 360 / 2 / Math.PI, m < 0 && (m += 360), g = Math.sqrt(f * f + d * d), [u, g, m];
  }, i.lch.lab = function(l) {
    var u = l[0], f = l[1], d = l[2], h, m, g;
    return g = d / 360 * 2 * Math.PI, h = f * Math.cos(g), m = f * Math.sin(g), [u, h, m];
  }, i.rgb.ansi16 = function(l) {
    var u = l[0], f = l[1], d = l[2], h = 1 in arguments ? arguments[1] : i.rgb.hsv(l)[2];
    if (h = Math.round(h / 50), h === 0)
      return 30;
    var m = 30 + (Math.round(d / 255) << 2 | Math.round(f / 255) << 1 | Math.round(u / 255));
    return h === 2 && (m += 60), m;
  }, i.hsv.ansi16 = function(l) {
    return i.rgb.ansi16(i.hsv.rgb(l), l[2]);
  }, i.rgb.ansi256 = function(l) {
    var u = l[0], f = l[1], d = l[2];
    if (u === f && f === d)
      return u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232;
    var h = 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(f / 255 * 5) + Math.round(d / 255 * 5);
    return h;
  }, i.ansi16.rgb = function(l) {
    var u = l % 10;
    if (u === 0 || u === 7)
      return l > 50 && (u += 3.5), u = u / 10.5 * 255, [u, u, u];
    var f = (~~(l > 50) + 1) * 0.5, d = (u & 1) * f * 255, h = (u >> 1 & 1) * f * 255, m = (u >> 2 & 1) * f * 255;
    return [d, h, m];
  }, i.ansi256.rgb = function(l) {
    if (l >= 232) {
      var u = (l - 232) * 10 + 8;
      return [u, u, u];
    }
    l -= 16;
    var f, d = Math.floor(l / 36) / 5 * 255, h = Math.floor((f = l % 36) / 6) / 5 * 255, m = f % 6 / 5 * 255;
    return [d, h, m];
  }, i.rgb.hex = function(l) {
    var u = ((Math.round(l[0]) & 255) << 16) + ((Math.round(l[1]) & 255) << 8) + (Math.round(l[2]) & 255), f = u.toString(16).toUpperCase();
    return "000000".substring(f.length) + f;
  }, i.hex.rgb = function(l) {
    var u = l.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
    if (!u)
      return [0, 0, 0];
    var f = u[0];
    u[0].length === 3 && (f = f.split("").map(function(w) {
      return w + w;
    }).join(""));
    var d = parseInt(f, 16), h = d >> 16 & 255, m = d >> 8 & 255, g = d & 255;
    return [h, m, g];
  }, i.rgb.hcg = function(l) {
    var u = l[0] / 255, f = l[1] / 255, d = l[2] / 255, h = Math.max(Math.max(u, f), d), m = Math.min(Math.min(u, f), d), g = h - m, w, x;
    return g < 1 ? w = m / (1 - g) : w = 0, g <= 0 ? x = 0 : h === u ? x = (f - d) / g % 6 : h === f ? x = 2 + (d - u) / g : x = 4 + (u - f) / g + 4, x /= 6, x %= 1, [x * 360, g * 100, w * 100];
  }, i.hsl.hcg = function(l) {
    var u = l[1] / 100, f = l[2] / 100, d = 1, h = 0;
    return f < 0.5 ? d = 2 * u * f : d = 2 * u * (1 - f), d < 1 && (h = (f - 0.5 * d) / (1 - d)), [l[0], d * 100, h * 100];
  }, i.hsv.hcg = function(l) {
    var u = l[1] / 100, f = l[2] / 100, d = u * f, h = 0;
    return d < 1 && (h = (f - d) / (1 - d)), [l[0], d * 100, h * 100];
  }, i.hcg.rgb = function(l) {
    var u = l[0] / 360, f = l[1] / 100, d = l[2] / 100;
    if (f === 0)
      return [d * 255, d * 255, d * 255];
    var h = [0, 0, 0], m = u % 1 * 6, g = m % 1, w = 1 - g, x = 0;
    switch (Math.floor(m)) {
      case 0:
        h[0] = 1, h[1] = g, h[2] = 0;
        break;
      case 1:
        h[0] = w, h[1] = 1, h[2] = 0;
        break;
      case 2:
        h[0] = 0, h[1] = 1, h[2] = g;
        break;
      case 3:
        h[0] = 0, h[1] = w, h[2] = 1;
        break;
      case 4:
        h[0] = g, h[1] = 0, h[2] = 1;
        break;
      default:
        h[0] = 1, h[1] = 0, h[2] = w;
    }
    return x = (1 - f) * d, [
      (f * h[0] + x) * 255,
      (f * h[1] + x) * 255,
      (f * h[2] + x) * 255
    ];
  }, i.hcg.hsv = function(l) {
    var u = l[1] / 100, f = l[2] / 100, d = u + f * (1 - u), h = 0;
    return d > 0 && (h = u / d), [l[0], h * 100, d * 100];
  }, i.hcg.hsl = function(l) {
    var u = l[1] / 100, f = l[2] / 100, d = f * (1 - u) + 0.5 * u, h = 0;
    return d > 0 && d < 0.5 ? h = u / (2 * d) : d >= 0.5 && d < 1 && (h = u / (2 * (1 - d))), [l[0], h * 100, d * 100];
  }, i.hcg.hwb = function(l) {
    var u = l[1] / 100, f = l[2] / 100, d = u + f * (1 - u);
    return [l[0], (d - u) * 100, (1 - d) * 100];
  }, i.hwb.hcg = function(l) {
    var u = l[1] / 100, f = l[2] / 100, d = 1 - f, h = d - u, m = 0;
    return h < 1 && (m = (d - h) / (1 - h)), [l[0], h * 100, m * 100];
  }, i.apple.rgb = function(l) {
    return [l[0] / 65535 * 255, l[1] / 65535 * 255, l[2] / 65535 * 255];
  }, i.rgb.apple = function(l) {
    return [l[0] / 255 * 65535, l[1] / 255 * 65535, l[2] / 255 * 65535];
  }, i.gray.rgb = function(l) {
    return [l[0] / 100 * 255, l[0] / 100 * 255, l[0] / 100 * 255];
  }, i.gray.hsl = i.gray.hsv = function(l) {
    return [0, 0, l[0]];
  }, i.gray.hwb = function(l) {
    return [0, 100, l[0]];
  }, i.gray.cmyk = function(l) {
    return [0, 0, 0, l[0]];
  }, i.gray.lab = function(l) {
    return [l[0], 0, 0];
  }, i.gray.hex = function(l) {
    var u = Math.round(l[0] / 100 * 255) & 255, f = (u << 16) + (u << 8) + u, d = f.toString(16).toUpperCase();
    return "000000".substring(d.length) + d;
  }, i.rgb.gray = function(l) {
    var u = (l[0] + l[1] + l[2]) / 3;
    return [u / 255 * 100];
  };
});
si.rgb;
si.hsl;
si.hsv;
si.hwb;
si.cmyk;
si.xyz;
si.lab;
si.lch;
si.hex;
si.keyword;
si.ansi16;
si.ansi256;
si.hcg;
si.apple;
si.gray;
function tRe() {
  for (var t = {}, e = Object.keys(si), n = e.length, i = 0; i < n; i++)
    t[e[i]] = {
      // http://jsperf.com/1-vs-infinity
      // micro-opt, but this is simple.
      distance: -1,
      parent: null
    };
  return t;
}
function nRe(t) {
  var e = tRe(), n = [t];
  for (e[t].distance = 0; n.length; )
    for (var i = n.pop(), r = Object.keys(si[i]), s = r.length, o = 0; o < s; o++) {
      var a = r[o], l = e[a];
      l.distance === -1 && (l.distance = e[i].distance + 1, l.parent = i, n.unshift(a));
    }
  return e;
}
function iRe(t, e) {
  return function(n) {
    return e(t(n));
  };
}
function rRe(t, e) {
  for (var n = [e[t].parent, t], i = si[e[t].parent][t], r = e[t].parent; e[r].parent; )
    n.unshift(e[r].parent), i = iRe(si[e[r].parent][r], i), r = e[r].parent;
  return i.conversion = n, i;
}
var sRe = function(t) {
  for (var e = nRe(t), n = {}, i = Object.keys(e), r = i.length, s = 0; s < r; s++) {
    var o = i[s], a = e[o];
    a.parent !== null && (n[o] = rRe(o, e));
  }
  return n;
}, Yd = {}, oRe = Object.keys(si);
function aRe(t) {
  var e = function(n) {
    return n == null ? n : (arguments.length > 1 && (n = Array.prototype.slice.call(arguments)), t(n));
  };
  return "conversion" in t && (e.conversion = t.conversion), e;
}
function lRe(t) {
  var e = function(n) {
    if (n == null)
      return n;
    arguments.length > 1 && (n = Array.prototype.slice.call(arguments));
    var i = t(n);
    if (typeof i == "object")
      for (var r = i.length, s = 0; s < r; s++)
        i[s] = Math.round(i[s]);
    return i;
  };
  return "conversion" in t && (e.conversion = t.conversion), e;
}
oRe.forEach(function(t) {
  Yd[t] = {}, Object.defineProperty(Yd[t], "channels", { value: si[t].channels }), Object.defineProperty(Yd[t], "labels", { value: si[t].labels });
  var e = sRe(t), n = Object.keys(e);
  n.forEach(function(i) {
    var r = e[i];
    Yd[t][i] = lRe(r), Yd[t][i].raw = aRe(r);
  });
});
var Bs = Yd, n8 = [].slice, aG = [
  // to be honest, I don't really feel like keyword belongs in color convert, but eh.
  "keyword",
  // gray conflicts with some method names, and has its own method defined.
  "gray",
  // shouldn't really be in color-convert either...
  "hex"
], _6 = {};
Object.keys(Bs).forEach(function(t) {
  _6[n8.call(Bs[t].labels).sort().join("")] = t;
});
var gk = {};
function sr(t, e) {
  if (!(this instanceof sr))
    return new sr(t, e);
  if (e && e in aG && (e = null), e && !(e in Bs))
    throw new Error("Unknown model: " + e);
  var n, i;
  if (t == null)
    this.model = "rgb", this.color = [0, 0, 0], this.valpha = 1;
  else if (t instanceof sr)
    this.model = t.model, this.color = t.color.slice(), this.valpha = t.valpha;
  else if (typeof t == "string") {
    var r = tf.get(t);
    if (r === null)
      throw new Error("Unable to parse color from string: " + t);
    this.model = r.model, i = Bs[this.model].channels, this.color = r.value.slice(0, i), this.valpha = typeof r.value[i] == "number" ? r.value[i] : 1;
  } else if (t.length) {
    this.model = e || "rgb", i = Bs[this.model].channels;
    var s = n8.call(t, 0, i);
    this.color = O6(s, i), this.valpha = typeof t[i] == "number" ? t[i] : 1;
  } else if (typeof t == "number")
    t &= 16777215, this.model = "rgb", this.color = [
      t >> 16 & 255,
      t >> 8 & 255,
      t & 255
    ], this.valpha = 1;
  else {
    this.valpha = 1;
    var o = Object.keys(t);
    "alpha" in t && (o.splice(o.indexOf("alpha"), 1), this.valpha = typeof t.alpha == "number" ? t.alpha : 0);
    var a = o.sort().join("");
    if (!(a in _6))
      throw new Error("Unable to parse color from object: " + JSON.stringify(t));
    this.model = _6[a];
    var l = Bs[this.model].labels, u = [];
    for (n = 0; n < l.length; n++)
      u.push(t[l[n]]);
    this.color = O6(u);
  }
  if (gk[this.model])
    for (i = Bs[this.model].channels, n = 0; n < i; n++) {
      var f = gk[this.model][n];
      f && (this.color[n] = f(this.color[n]));
    }
  this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
}
sr.prototype = {
  toString: function() {
    return this.string();
  },
  toJSON: function() {
    return this[this.model]();
  },
  string: function(t) {
    var e = this.model in tf.to ? this : this.rgb();
    e = e.round(typeof t == "number" ? t : 1);
    var n = e.valpha === 1 ? e.color : e.color.concat(this.valpha);
    return tf.to[e.model](n);
  },
  percentString: function(t) {
    var e = this.rgb().round(typeof t == "number" ? t : 1), n = e.valpha === 1 ? e.color : e.color.concat(this.valpha);
    return tf.to.rgb.percent(n);
  },
  array: function() {
    return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);
  },
  object: function() {
    for (var t = {}, e = Bs[this.model].channels, n = Bs[this.model].labels, i = 0; i < e; i++)
      t[n[i]] = this.color[i];
    return this.valpha !== 1 && (t.alpha = this.valpha), t;
  },
  unitArray: function() {
    var t = this.rgb().color;
    return t[0] /= 255, t[1] /= 255, t[2] /= 255, this.valpha !== 1 && t.push(this.valpha), t;
  },
  unitObject: function() {
    var t = this.rgb().object();
    return t.r /= 255, t.g /= 255, t.b /= 255, this.valpha !== 1 && (t.alpha = this.valpha), t;
  },
  round: function(t) {
    return t = Math.max(t || 0, 0), new sr(this.color.map(cRe(t)).concat(this.valpha), this.model);
  },
  alpha: function(t) {
    return arguments.length ? new sr(this.color.concat(Math.max(0, Math.min(1, t))), this.model) : this.valpha;
  },
  // rgb
  red: Jn("rgb", 0, Mi(255)),
  green: Jn("rgb", 1, Mi(255)),
  blue: Jn("rgb", 2, Mi(255)),
  hue: Jn(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, function(t) {
    return (t % 360 + 360) % 360;
  }),
  // eslint-disable-line brace-style
  saturationl: Jn("hsl", 1, Mi(100)),
  lightness: Jn("hsl", 2, Mi(100)),
  saturationv: Jn("hsv", 1, Mi(100)),
  value: Jn("hsv", 2, Mi(100)),
  chroma: Jn("hcg", 1, Mi(100)),
  gray: Jn("hcg", 2, Mi(100)),
  white: Jn("hwb", 1, Mi(100)),
  wblack: Jn("hwb", 2, Mi(100)),
  cyan: Jn("cmyk", 0, Mi(100)),
  magenta: Jn("cmyk", 1, Mi(100)),
  yellow: Jn("cmyk", 2, Mi(100)),
  black: Jn("cmyk", 3, Mi(100)),
  x: Jn("xyz", 0, Mi(100)),
  y: Jn("xyz", 1, Mi(100)),
  z: Jn("xyz", 2, Mi(100)),
  l: Jn("lab", 0, Mi(100)),
  a: Jn("lab", 1),
  b: Jn("lab", 2),
  keyword: function(t) {
    return arguments.length ? new sr(t) : Bs[this.model].keyword(this.color);
  },
  hex: function(t) {
    return arguments.length ? new sr(t) : tf.to.hex(this.rgb().round().color);
  },
  rgbNumber: function() {
    var t = this.rgb().color;
    return (t[0] & 255) << 16 | (t[1] & 255) << 8 | t[2] & 255;
  },
  luminosity: function() {
    for (var t = this.rgb().color, e = [], n = 0; n < t.length; n++) {
      var i = t[n] / 255;
      e[n] = i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
    }
    return 0.2126 * e[0] + 0.7152 * e[1] + 0.0722 * e[2];
  },
  contrast: function(t) {
    var e = this.luminosity(), n = t.luminosity();
    return e > n ? (e + 0.05) / (n + 0.05) : (n + 0.05) / (e + 0.05);
  },
  level: function(t) {
    var e = this.contrast(t);
    return e >= 7.1 ? "AAA" : e >= 4.5 ? "AA" : "";
  },
  isDark: function() {
    var t = this.rgb().color, e = (t[0] * 299 + t[1] * 587 + t[2] * 114) / 1e3;
    return e < 128;
  },
  isLight: function() {
    return !this.isDark();
  },
  negate: function() {
    for (var t = this.rgb(), e = 0; e < 3; e++)
      t.color[e] = 255 - t.color[e];
    return t;
  },
  lighten: function(t) {
    var e = this.hsl();
    return e.color[2] += e.color[2] * t, e;
  },
  darken: function(t) {
    var e = this.hsl();
    return e.color[2] -= e.color[2] * t, e;
  },
  saturate: function(t) {
    var e = this.hsl();
    return e.color[1] += e.color[1] * t, e;
  },
  desaturate: function(t) {
    var e = this.hsl();
    return e.color[1] -= e.color[1] * t, e;
  },
  whiten: function(t) {
    var e = this.hwb();
    return e.color[1] += e.color[1] * t, e;
  },
  blacken: function(t) {
    var e = this.hwb();
    return e.color[2] += e.color[2] * t, e;
  },
  grayscale: function() {
    var t = this.rgb().color, e = t[0] * 0.3 + t[1] * 0.59 + t[2] * 0.11;
    return sr.rgb(e, e, e);
  },
  fade: function(t) {
    return this.alpha(this.valpha - this.valpha * t);
  },
  opaquer: function(t) {
    return this.alpha(this.valpha + this.valpha * t);
  },
  rotate: function(t) {
    var e = this.hsl(), n = e.color[0];
    return n = (n + t) % 360, n = n < 0 ? 360 + n : n, e.color[0] = n, e;
  },
  mix: function(t, e) {
    if (!t || !t.rgb)
      throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof t);
    var n = t.rgb(), i = this.rgb(), r = e === void 0 ? 0.5 : e, s = 2 * r - 1, o = n.alpha() - i.alpha(), a = ((s * o === -1 ? s : (s + o) / (1 + s * o)) + 1) / 2, l = 1 - a;
    return sr.rgb(
      a * n.red() + l * i.red(),
      a * n.green() + l * i.green(),
      a * n.blue() + l * i.blue(),
      n.alpha() * r + i.alpha() * (1 - r)
    );
  }
};
Object.keys(Bs).forEach(function(t) {
  if (aG.indexOf(t) === -1) {
    var e = Bs[t].channels;
    sr.prototype[t] = function() {
      if (this.model === t)
        return new sr(this);
      if (arguments.length)
        return new sr(arguments, t);
      var n = typeof arguments[e] == "number" ? e : this.valpha;
      return new sr(fRe(Bs[this.model][t].raw(this.color)).concat(n), t);
    }, sr[t] = function(n) {
      return typeof n == "number" && (n = O6(n8.call(arguments), e)), new sr(n, t);
    };
  }
});
function uRe(t, e) {
  return Number(t.toFixed(e));
}
function cRe(t) {
  return function(e) {
    return uRe(e, t);
  };
}
function Jn(t, e, n) {
  return t = Array.isArray(t) ? t : [t], t.forEach(function(i) {
    (gk[i] || (gk[i] = []))[e] = n;
  }), t = t[0], function(i) {
    var r;
    return arguments.length ? (n && (i = n(i)), r = this[t](), r.color[e] = i, r) : (r = this[t]().color[e], n && (r = n(r)), r);
  };
}
function Mi(t) {
  return function(e) {
    return Math.max(0, Math.min(t, e));
  };
}
function fRe(t) {
  return Array.isArray(t) ? t : [t];
}
function O6(t, e) {
  for (var n = 0; n < e; n++)
    typeof t[n] != "number" && (t[n] = 0);
  return t;
}
var Fg = sr;
function i8(t) {
  const e = Fg(t), n = Fg({ r: 255, g: 255, b: 255 }), i = Fg({ r: 0, g: 0, b: 0 });
  return e.red() * 0.299 + e.green() * 0.587 + e.b() * 0.114 >= 186 ? i : n;
}
const dRe = () => ({
  ...oG,
  link: "cta-link-color"
}), hRe = [
  {
    label: "None",
    name: "none",
    color: "bg-transparent border-black/15 dark:border-white/15 relative after:absolute after:left-1/2 after:top-1/2 after:h-[1px] after:w-[18px] after:-translate-x-1/2 after:-translate-y-1/2 after:-rotate-45 after:bg-red-500"
  },
  {
    label: "White",
    name: "white",
    color: "bg-transparent border-black/15 dark:border-white/15"
  },
  {
    label: "Grey",
    name: "grey",
    color: "bg-grey/20 border-black/[.08] dark:border-white/15"
  },
  {
    label: "Blue",
    name: "blue",
    color: "bg-blue/20 border-black/[.08] dark:border-white/15"
  },
  {
    label: "Green",
    name: "green",
    color: "bg-green/20 border-black/[.08] dark:border-white/15"
  },
  {
    label: "Yellow",
    name: "yellow",
    color: "bg-yellow/20 border-black/[.08] dark:border-white/15"
  },
  {
    label: "Red",
    name: "red",
    color: "bg-red/20 border-black/[.08] dark:border-white/15"
  },
  {
    label: "Pink",
    name: "pink",
    color: "bg-pink/20 border-black/[0.08] dark:border-white/15"
  },
  {
    label: "Purple",
    name: "purple",
    color: "bg-purple/20 border-black/[0.08] dark:border-white/15"
  }
], pRe = [
  {
    label: "Text color",
    name: "text",
    color: "bg-black border-black dark:bg-white dark:border-white"
  },
  {
    label: "Brand color",
    name: "accent",
    color: "bg-accent border-accent"
  }
];
function lG({
  alignment: t = "left",
  buttonColor: e = "",
  buttonText: n = "",
  buttonTextColor: i = "",
  buttonUrl: r = "",
  color: s = "none",
  hasSponsorLabel: o = !1,
  htmlEditor: a,
  htmlEditorInitialState: l,
  sponsorLabelHtmlEditor: u,
  sponsorLabelHtmlEditorInitialState: f,
  imageSrc: d = "",
  isEditing: h = !1,
  layout: m = "immersive",
  showButton: g = !1,
  showDividers: w = !0,
  visibilityOptions: x = {},
  handleButtonColor: _ = () => {
  },
  handleColorChange: S = () => {
  },
  handleLinkColorChange: C = () => {
  },
  onFileChange: E = () => {
  },
  onRemoveMedia: M = () => {
  },
  setFileInputRef: $ = () => {
  },
  updateAlignment: P = () => {
  },
  updateButtonText: W = () => {
  },
  updateButtonUrl: z = () => {
  },
  updateHasSponsorLabel: Z = () => {
  },
  updateLayout: L = () => {
  },
  updateShowButton: Q = () => {
  },
  updateShowDividers: V = () => {
  },
  toggleVisibility: H = () => {
  },
  imageDragHandler: R = {},
  imageUploader: q = () => {
  },
  linkColor: Y = "text",
  showVisibilitySettings: K = !1
}) {
  const [te, se] = ft(!1), { isLoading: ce, progress: U } = q || {}, F = [
    { id: "content", label: "Content" },
    { id: "design", label: "Design" },
    { id: "visibility", label: "Visibility" }
  ], oe = [
    {
      label: "Minimal",
      name: "minimal",
      Icon: GLe,
      dataTestId: "minimal-layout",
      ariaLabel: "Small, square image"
    },
    {
      label: "Full",
      name: "immersive",
      Icon: YLe,
      dataTestId: "immersive-layout",
      ariaLabel: "Full-width image"
    }
  ], le = [
    {
      label: "Left",
      name: "left",
      Icon: V1,
      dataTestId: "left-align"
    },
    {
      label: "Center",
      name: "center",
      Icon: Y1,
      dataTestId: "center-align"
    }
  ], pe = (ge) => ge === "transparent" ? "" : i8(ge === "accent" ? Ju() : ge).hex(), Re = dRe(), ze = /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      ks,
      {
        dataTestId: "sponsor-label-toggle",
        isChecked: o,
        label: "Sponsor label",
        onChange: Z
      }
    ),
    /* @__PURE__ */ y.jsx(
      H2,
      {
        alt: "Image",
        borderStyle: "rounded",
        desc: "Upload",
        icon: "file",
        isDraggedOver: R.isDraggedOver,
        isLoading: ce,
        label: "Image",
        mimeTypes: ["image/*"],
        placeholderRef: R.setRef,
        progress: U,
        setFileInputRef: $,
        src: d,
        type: "button",
        onFileChange: E,
        onRemoveMedia: M
      }
    ),
    /* @__PURE__ */ y.jsx("hr", { className: "not-kg-prose my-2 block border-t-grey-300 dark:border-t-grey-900" }),
    /* @__PURE__ */ y.jsx(
      ks,
      {
        dataTestId: "button-settings",
        isChecked: g,
        label: "Button",
        onChange: Q
      }
    ),
    g && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
      /* @__PURE__ */ y.jsx(
        zf,
        {
          dataTestId: "button-text",
          label: "Button text",
          placeholder: "Add button text",
          value: n,
          onChange: W
        }
      ),
      /* @__PURE__ */ y.jsx(
        wp,
        {
          dataTestId: "button-url",
          label: "Button URL",
          value: r,
          onChange: z
        }
      )
    ] })
  ] }), rt = /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      Aa,
      {
        buttons: oe,
        label: "Layout",
        selectedName: m,
        onClick: L
      }
    ),
    m === "immersive" && /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx(
      Aa,
      {
        buttons: le,
        label: "Alignment",
        selectedName: t,
        onClick: P
      }
    ) }),
    /* @__PURE__ */ y.jsx(
      tk,
      {
        buttons: hRe,
        dataTestId: "cta-background-color-picker",
        label: "Background",
        selectedName: s,
        onClick: S
      }
    ),
    s === "none" && /* @__PURE__ */ y.jsx(
      ks,
      {
        dataTestId: "button-settings",
        isChecked: w,
        label: "Dividers",
        onChange: V
      }
    ),
    /* @__PURE__ */ y.jsx(
      tk,
      {
        buttons: pRe,
        dataTestId: "cta-link-color-picker",
        label: "Link color",
        selectedName: Y,
        onClick: C
      }
    ),
    g && /* @__PURE__ */ y.jsx(
      C0,
      {
        dataTestId: "cta-button-color",
        eyedropper: !0,
        isExpanded: te,
        label: "Button Color",
        swatches: [
          { title: "Black", hex: "#000000" },
          { title: "Grey", hex: "#F0F0F0" },
          { title: "Brand color", accent: !0 }
        ],
        value: e,
        onPickerChange: (ge) => _(ge, pe(ge)),
        onSwatchChange: (ge) => {
          _(ge, pe(ge)), se(!1);
        },
        onTogglePicker: (ge) => {
          se(ge);
        }
      }
    )
  ] }), pt = /* @__PURE__ */ y.jsx(
    pT,
    {
      toggleVisibility: H,
      visibilityOptions: x
    }
  );
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs(
      "div",
      {
        className: nt(
          "w-full rounded-lg border",
          JLe[s],
          {
            "py-3": s === "none" && !o,
            "pb-3": s === "none" && o,
            "pt-1": s === "none" && !o && !w && !d
          }
        ),
        "data-cta-layout": m,
        style: {
          "--cta-link-color": Y === "accent" ? Ju() : "var(--cta-link-color-text)"
        },
        children: [
          o && /* @__PURE__ */ y.jsx("div", { className: nt(
            "py-3",
            { "mx-6": s !== "none" }
          ), children: /* @__PURE__ */ y.jsx(
            Pr,
            {
              autoFocus: !0,
              dataTestId: "sponsor-label-editor",
              hasSettingsPanel: !0,
              initialEditor: u,
              initialEditorState: f,
              initialTheme: Re,
              nodes: "basic",
              textClassName: nt(
                "koenig-lexical-cta-label not-kg-prose w-full whitespace-normal font-sans !text-xs font-semibold uppercase leading-8 tracking-normal text-grey-900/50 dark:text-grey-200/40"
              ),
              useDefaultClasses: !1,
              children: /* @__PURE__ */ y.jsx(i_, { allowBr: !1, paragraphs: 1 })
            }
          ) }),
          /* @__PURE__ */ y.jsxs("div", { className: nt(
            "flex gap-6",
            o && s !== "none" && d && m === "immersive" || s === "none" && !w ? "" : "pt-6",
            s === "none" && !w ? "" : d && !g ? "pb-8" : "pb-7",
            m === "immersive" ? "flex-col" : "flex-row",
            o && !(d && m === "immersive") && !(s === "none" && !w) && "border-t border-grey-900/15 dark:border-grey-100/20",
            s === "none" && w ? "border-y border-grey-900/15 dark:border-grey-100/20" : s !== "none" ? "mx-6" : ""
          ), children: [
            d && /* @__PURE__ */ y.jsx("div", { className: nt(
              "block",
              m === "immersive" ? "w-full" : "w-16 shrink-0"
            ), children: /* @__PURE__ */ y.jsx(
              "img",
              {
                alt: "Placeholder",
                className: nt(
                  m === "immersive" ? "h-auto w-full" : "aspect-square w-16 object-cover",
                  "rounded-md"
                ),
                "data-testid": "cta-card-image",
                src: d
              }
            ) }),
            /* @__PURE__ */ y.jsxs("div", { className: nt(
              "flex w-full flex-col gap-6",
              m === "immersive" && t === "center" ? "items-center" : ""
            ), children: [
              /* @__PURE__ */ y.jsx(
                Pr,
                {
                  autoFocus: !0,
                  dataTestId: "cta-card-content-editor",
                  hasSettingsPanel: !0,
                  initialEditor: a,
                  initialEditorState: l,
                  initialTheme: Re,
                  nodes: "basic",
                  placeholderClassName: "bg-transparent whitespace-normal font-serif text-xl !text-grey-500 !dark:text-grey-800 ",
                  placeholderText: "Write something worth clicking...",
                  textClassName: nt(
                    "koenig-lexical-cta-text w-full whitespace-normal text-pretty bg-transparent font-serif text-xl text-grey-900 dark:text-grey-200",
                    t === "center" && m === "immersive" ? "text-center [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left" : "text-left"
                  ),
                  children: /* @__PURE__ */ y.jsx(cx, {})
                }
              ),
              g && (h || n && r) && /* @__PURE__ */ y.jsx("div", { className: nt(
                m === "immersive" && d ? "w-full" : ""
              ), "data-test-cta-button-current-url": r, children: /* @__PURE__ */ y.jsx(
                Na,
                {
                  color: "accent",
                  "data-test-cta-button-current-url": r,
                  dataTestId: "cta-button",
                  placeholder: "Add button text",
                  size: m === "immersive" && d ? "medium" : "small",
                  style: e !== "accent" ? {
                    backgroundColor: e,
                    color: i
                  } : void 0,
                  value: n,
                  width: m === "minimal" || !d ? "regular" : "full"
                }
              ) })
            ] })
          ] }),
          !h && /* @__PURE__ */ y.jsx(ko, {})
        ]
      }
    ),
    h && /* @__PURE__ */ y.jsx(
      Go,
      {
        defaultTab: K ? "visibility" : "content",
        tabs: F,
        onMouseDown: (ge) => ge.preventDefault(),
        children: {
          content: ze,
          design: rt,
          visibility: pt
        }
      }
    )
  ] });
}
lG.propTypes = {
  alignment: A.oneOf(["left", "center"]),
  buttonText: A.string,
  buttonUrl: A.string,
  buttonColor: A.string,
  buttonTextColor: A.string,
  color: A.oneOf(["none", "grey", "white", "blue", "green", "yellow", "red", "pink", "purple"]),
  hasSponsorLabel: A.bool,
  imageSrc: A.string,
  isEditing: A.bool,
  layout: A.oneOf(["minimal", "immersive"]),
  showButton: A.bool,
  showDividers: A.bool,
  htmlEditor: A.object,
  htmlEditorInitialState: A.object,
  updateAlignment: A.func,
  updateButtonText: A.func,
  updateButtonUrl: A.func,
  updateHasSponsorLabel: A.func,
  updateShowButton: A.func,
  updateShowDividers: A.func,
  updateLayout: A.func,
  handleColorChange: A.func,
  handleButtonColor: A.func,
  onFileChange: A.func,
  setFileInputRef: A.func,
  onRemoveMedia: A.func,
  sponsorLabelHtmlEditor: A.object,
  sponsorLabelHtmlEditorInitialState: A.object,
  visibilityOptions: A.array,
  toggleVisibility: A.func,
  imageUploadHandler: A.func,
  imageDragHandler: A.object,
  linkColor: A.oneOf(["text", "accent"]),
  handleLinkColorChange: A.func,
  imageUploader: A.object,
  showVisibilitySettings: A.bool
};
const mRe = ({
  nodeKey: t,
  alignment: e,
  backgroundColor: n,
  buttonText: i,
  buttonUrl: r,
  hasSponsorLabel: s,
  imageUrl: o,
  layout: a,
  linkColor: l,
  showButton: u,
  showDividers: f,
  textValue: d,
  buttonColor: h,
  htmlEditor: m,
  htmlEditorInitialState: g,
  buttonTextColor: w,
  sponsorLabelHtmlEditor: x,
  sponsorLabelHtmlEditorInitialState: _
}) => {
  const [S] = Oe.useLexicalComposerContext(), { isEditing: C, isSelected: E, setEditing: M } = j.useContext(gn), { fileUploader: $, cardConfig: P } = j.useContext(dt), [W, z] = j.useState(!1), Z = Wo({ handleDrop: pt }), { visibilityOptions: L, toggleVisibility: Q } = mT(S, t, P), { showVisibilitySettings: V } = Rf(), H = (ge) => {
    ge.preventDefault(), ge.stopPropagation(), M(!0);
  }, R = ct(null), q = $.useFileUpload("image"), Y = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.showButton = !De.showButton;
    });
  }, K = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.showDividers = !De.showDividers;
    });
  }, te = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.buttonText = ge.target.value;
    });
  }, se = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.buttonUrl = ge;
    });
  }, ce = (ge, De) => {
    S.update(() => {
      const st = N.$getNodeByKey(t);
      st.buttonColor = ge, st.buttonTextColor = De;
    });
  }, U = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.hasSponsorLabel = !De.hasSponsorLabel;
    });
  }, F = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.backgroundColor = ge;
    });
  }, oe = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.linkColor = ge;
    });
  }, le = async (ge) => {
    const De = URL.createObjectURL(ge[0]);
    try {
      const { width: st, height: It } = await Wf(De), At = await q.upload(ge);
      S.update(() => {
        const Ut = N.$getNodeByKey(t);
        Ut.imageUrl = At == null ? void 0 : At[0].url, Ut.imageWidth = st, Ut.imageHeight = It;
      });
    } finally {
      URL.revokeObjectURL(De);
    }
  }, pe = async (ge) => {
    le(ge.target.files);
  }, Re = () => {
    S.update(() => {
      const ge = N.$getNodeByKey(t);
      ge.imageUrl = null, ge.imageWidth = null, ge.imageHeight = null;
    });
  }, ze = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.layout = ge;
    });
  }, rt = (ge) => {
    S.update(() => {
      const De = N.$getNodeByKey(t);
      De.alignment = ge;
    });
  };
  async function pt(ge) {
    await le(ge);
  }
  return j.useEffect(() => {
    m.setEditable(C);
  }, [C, m]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      lG,
      {
        alignment: e,
        buttonColor: h,
        buttonText: i,
        buttonTextColor: w,
        buttonUrl: r,
        color: n,
        handleButtonColor: ce,
        handleColorChange: F,
        handleLinkColorChange: oe,
        hasSponsorLabel: s,
        htmlEditor: m,
        htmlEditorInitialState: g,
        imageDragHandler: Z,
        imageSrc: o,
        imageUploader: q,
        isEditing: C,
        layout: a,
        linkColor: l,
        setEditing: M,
        setFileInputRef: (ge) => R.current = ge,
        showButton: u,
        showDividers: f,
        showVisibilitySettings: V,
        sponsorLabelHtmlEditor: x,
        sponsorLabelHtmlEditorInitialState: _,
        text: d,
        toggleVisibility: Q,
        updateAlignment: rt,
        updateButtonText: te,
        updateButtonUrl: se,
        updateHasSponsorLabel: U,
        updateLayout: ze,
        updateShowButton: Y,
        updateShowDividers: K,
        visibilityOptions: L,
        onFileChange: pe,
        onRemoveMedia: Re
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "button",
        isVisible: W,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => z(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "button",
        isVisible: E && !C && !W,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "edit-button-card", icon: "edit", isActive: !1, label: "Edit", onClick: H }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !P.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !P.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => z(!0)
            }
          )
        ] })
      }
    )
  ] });
}, uG = N.createCommand();
class fx extends y1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__callToActionHtmlEditor");
    we(this, "__callToActionHtmlEditorInitialState");
    we(this, "__sponsorLabelHtmlEditor");
    we(this, "__sponsorLabelHtmlEditorInitialState");
    xi(this, "__callToActionHtmlEditor", { editor: n.callToActionHtmlEditor, nodes: $f }), xi(this, "__sponsorLabelHtmlEditor", { editor: n.sponsorLabelHtmlEditor, nodes: $f }), !n.callToActionHtmlEditor && n.textValue && _i(this, "__callToActionHtmlEditor", `${n.textValue}`), n.sponsorLabelHtmlEditor || _i(this, "__sponsorLabelHtmlEditor", `${n.sponsorLabel || '<p><span style="white-space: pre-wrap;">SPONSORED</span></p>'}`);
  }
  static getType() {
    return "call-to-action";
  }
  getIcon() {
    return Ug;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.callToActionHtmlEditor = i.__callToActionHtmlEditor, n.callToActionHtmlEditorInitialState = i.__callToActionHtmlEditorInitialState, n.sponsorLabelHtmlEditor = i.__sponsorLabelHtmlEditor, n.sponsorLabelHtmlEditorInitialState = i.__sponsorLabelHtmlEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__callToActionHtmlEditor && this.__callToActionHtmlEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__callToActionHtmlEditor, null), r = mi(i, { allowBr: !0 });
      n.textValue = r;
    }), this.__sponsorLabelHtmlEditor && this.__sponsorLabelHtmlEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__sponsorLabelHtmlEditor, null), r = mi(i, { allowBr: !1 });
      n.sponsorLabel = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(
      qn,
      {
        nodeKey: this.getKey(),
        wrapperStyle: this.backgroundColor === "none" ? "wide" : "regular",
        children: /* @__PURE__ */ y.jsx(
          mRe,
          {
            alignment: this.alignment,
            backgroundColor: this.backgroundColor,
            buttonColor: this.buttonColor,
            buttonText: this.buttonText,
            buttonTextColor: this.buttonTextColor,
            buttonUrl: this.buttonUrl,
            hasSponsorLabel: this.hasSponsorLabel,
            href: this.href,
            htmlEditor: this.__callToActionHtmlEditor,
            htmlEditorInitialState: this.__callToActionHtmlEditorInitialState,
            imageUrl: this.imageUrl,
            layout: this.layout,
            linkColor: this.linkColor,
            nodeKey: this.getKey(),
            showButton: this.showButton,
            showDividers: this.showDividers,
            sponsorLabelHtmlEditor: this.__sponsorLabelHtmlEditor,
            sponsorLabelHtmlEditorInitialState: this.__sponsorLabelHtmlEditorInitialState,
            textValue: this.textValue
          }
        )
      }
    );
  }
}
we(fx, "kgMenu", {
  label: "Call to action",
  desc: "Add a call to action to your post",
  Icon: Ug,
  insertCommand: uG,
  matches: ["cta", "call-to-action", "email", "email-cta", "ad", "sponsored", "hidden"],
  priority: 7,
  shortcut: "/cta",
  isHidden: () => !1
});
function gRe(t) {
  return new fx(t);
}
const pr = [
  ki.LinkNode,
  uo
];
function vRe({ setInstanceRef: t, ...e }) {
  const n = ct(null), i = ct(null);
  function r(s) {
    i.current = s, t == null || t(s);
  }
  return i.current && i.current.update(e), kt(() => (r(new YE({ ...e, ref: n })), () => {
    r(null);
  }), []), j.createElement("div", { ref: n });
}
const cG = ({
  onEmojiClick: t,
  positionRef: e,
  data: n = KU,
  autoFocus: i = !0,
  dynamicWidth: r = !1,
  emojiButtonRadius: s = "100%",
  emojiButtonSize: o = 36,
  emojiSize: a = 24,
  icons: l = "outline",
  locale: u = "en",
  maxFrequentRows: f = 1,
  navPosition: d = "bottom",
  noCountryFlags: h = !1,
  noResultsEmoji: m = "cry",
  perLine: g = 9,
  previewEmoji: w = null,
  previewPosition: x = "none",
  searchPosition: _ = "sticky",
  set: S = "native",
  skin: C = 1,
  skinTonePosition: E = "preview",
  ...M
}) => {
  const [$, P] = j.useState(null), { darkMode: W } = j.useContext(dt), z = 35, Z = j.useCallback(() => {
    if (e.current) {
      const Y = e.current.getBoundingClientRect(), K = document.documentElement.scrollLeft, te = document.documentElement.scrollTop, se = window.innerHeight, ce = 352;
      let U = Y.top + te;
      U + ce > se && (U = Y.top - ce - z + te), P({ x: (Y.left + K) / 1.5, y: U });
    }
  }, [e]);
  if (j.useEffect(() => (Z(), document.addEventListener("scroll", Z, !0), () => {
    document.removeEventListener("scroll", Z, !0);
  }), [Z]), !$)
    return null;
  const { x: L, y: Q } = $, V = (Y) => {
    Y.stopPropagation();
  }, H = {
    left: L,
    top: Q,
    position: "fixed"
  }, q = { ...{
    theme: W ? "dark" : "light",
    autoFocus: i,
    dynamicWidth: r,
    emojiButtonRadius: s,
    emojiButtonSize: o,
    emojiSize: a,
    icons: l,
    locale: u,
    maxFrequentRows: f,
    navPosition: d,
    noCountryFlags: h,
    noResultsEmoji: m,
    perLine: g,
    previewEmoji: w,
    previewPosition: x,
    searchPosition: _,
    set: S,
    skin: C,
    skinTonePosition: E
  }, ...M };
  return /* @__PURE__ */ y.jsx(Ff, { children: /* @__PURE__ */ y.jsx("div", { className: "z-20 mr-9 mt-10 rounded-md bg-white", "data-testid": "emoji-picker-container", style: H, onClick: V, children: /* @__PURE__ */ y.jsx("div", { className: "", children: /* @__PURE__ */ y.jsx(
    vRe,
    {
      data: n,
      onEmojiSelect: t,
      ...q
    }
  ) }) }) });
};
cG.propTypes = {
  onEmojiClick: A.func.isRequired,
  positionRef: A.object,
  data: A.array,
  autoFocus: A.bool,
  dynamicWidth: A.bool,
  emojiButtonColors: A.arrayOf(A.string),
  emojiButtonRadius: A.string,
  emojiButtonSize: A.number,
  emojiSize: A.number,
  emojiVersion: A.oneOf([1, 2, 3, 4, 5, 11, 12, 12.1, 13, 13.1, 14]),
  exceptEmojis: A.arrayOf(A.string),
  icons: A.oneOf(["auto", "outline", "solid"]),
  locale: A.oneOf(["en", "ar", "be", "cs", "de", "es", "fa", "fi", "fr", "hi", "it", "ja", "kr", "nl", "pl", "pt", "ru", "sa", "tr", "uk", "vi", "zh"]),
  maxFrequentRows: A.number,
  navPosition: A.oneOf(["top", "bottom", "none"]),
  noCountryFlags: A.bool,
  noResultsEmoji: A.string,
  perLine: A.number,
  previewEmoji: A.string,
  previewPosition: A.oneOf(["top", "bottom", "none"]),
  searchPosition: A.oneOf(["sticky", "static", "none"]),
  set: A.oneOf(["native", "apple", "facebook", "google", "twitter"]),
  setInstanceRef: A.func,
  skin: A.oneOf([1, 2, 3, 4, 5, 6]),
  skinTonePosition: A.oneOf(["preview", "search", "none"])
};
const bRe = {
  white: "bg-transparent border-grey/30",
  grey: "bg-grey/10 border-transparent",
  blue: "bg-blue/10 border-transparent",
  green: "bg-green/10 border-transparent",
  yellow: "bg-yellow/10 border-transparent",
  red: "bg-red/10 border-transparent",
  pink: "bg-pink/10 border-transparent",
  purple: "bg-purple/10 border-transparent",
  accent: "bg-accent border-transparent"
}, su = "text-black dark:text-grey-300 caret-black dark:caret-grey-300", yRe = "text-white caret-white", wRe = {
  white: su,
  grey: su,
  blue: su,
  green: su,
  yellow: su,
  red: su,
  pink: su,
  purple: su,
  // .kg-callout-accent makes sure links are not in accent color anymore
  accent: yRe + " kg-callout-accent"
}, kRe = [
  {
    label: "White",
    name: "white",
    color: "bg-transparent border-black/15 dark:border-white/10"
  },
  {
    label: "Grey",
    name: "grey",
    color: "bg-grey/20 border-black/[0.08] dark:border-white/10"
  },
  {
    label: "Blue",
    name: "blue",
    color: "bg-blue/20 border-black/[0.08] dark:border-white/10"
  },
  {
    label: "Green",
    name: "green",
    color: "bg-green/20 border-black/[0.08] dark:border-white/10"
  },
  {
    label: "Yellow",
    name: "yellow",
    color: "bg-yellow/20 border-black/[0.08] dark:border-white/10"
  },
  {
    label: "Red",
    name: "red",
    color: "bg-red/20 border-black/[0.08] dark:border-white/10"
  },
  {
    label: "Pink",
    name: "pink",
    color: "bg-pink/20 border-black/[0.08] dark:border-white/10"
  },
  {
    label: "Purple",
    name: "purple",
    color: "bg-purple/20 border-black/[0.08] dark:border-white/10"
  },
  {
    label: "Accent",
    name: "accent",
    color: "bg-accent border-black/[0.08] dark:border-white/10"
  }
];
function fG({
  color: t = "green",
  isEditing: e,
  setShowEmojiPicker: n,
  toggleEmoji: i,
  hasEmoji: r = !0,
  handleColorChange: s,
  changeEmoji: o,
  calloutEmoji: a = "💡",
  textEditor: l,
  textEditorInitialState: u,
  nodeKey: f,
  toggleEmojiPicker: d,
  showEmojiPicker: h
}) {
  const m = j.useRef(null), { darkMode: g } = j.useContext(dt);
  return j.useEffect(() => {
    e || n(!1);
  }, [e, n]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs("div", { className: `flex rounded-md border px-7 py-5 ${bRe[t]} `, "data-testid": `callout-bg-${t}`, children: [
      /* @__PURE__ */ y.jsx("div", { children: r && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
        /* @__PURE__ */ y.jsx(
          "button",
          {
            ref: m,
            className: `mr-2 cursor-pointer rounded-md px-2 text-xl ${e ? "hover:bg-grey-500/20" : ""} `,
            "data-testid": "emoji-picker-button",
            type: "button",
            onClick: d,
            children: a
          }
        ),
        e && h && /* @__PURE__ */ y.jsx(
          cG,
          {
            positionRef: m,
            togglePortal: d,
            onEmojiClick: o
          }
        )
      ] }) }),
      /* @__PURE__ */ y.jsx(
        Pr,
        {
          autoFocus: !0,
          defaultKoenigEnterBehaviour: !0,
          initialEditor: l,
          initialEditorState: u,
          nodes: "minimal",
          placeholderClassName: "font-serif text-xl font-normal tracking-wide text-grey-500 !dark:text-white opacity-30",
          placeholderText: "Callout text...",
          singleParagraph: !0,
          textClassName: `!my-0 w-full whitespace-normal bg-transparent font-serif text-xl font-normal ${wRe[t]}`
        }
      )
    ] }),
    e ? /* @__PURE__ */ y.jsxs(
      Go,
      {
        darkMode: g,
        children: [
          /* @__PURE__ */ y.jsx(
            ks,
            {
              dataTestId: "emoji-toggle",
              isChecked: !!a,
              label: "Emoji",
              onChange: i
            }
          ),
          /* @__PURE__ */ y.jsx(
            tk,
            {
              buttons: kRe,
              dataTestId: "callout-color-picker",
              label: "Background",
              selectedName: t,
              onClick: s
            }
          )
        ]
      }
    ) : /* @__PURE__ */ y.jsx(ko, {})
  ] });
}
fG.propTypes = {
  color: A.oneOf(["white", "grey", "blue", "green", "yellow", "red", "pink", "purple", "accent"]),
  text: A.string,
  hasEmoji: A.bool,
  placeholder: A.string,
  isEditing: A.bool,
  updateText: A.func,
  calloutEmoji: A.string,
  setShowEmojiPicker: A.func,
  toggleEmoji: A.func,
  handleColorChange: A.func,
  changeEmoji: A.func,
  textEditor: A.object,
  textEditorInitialState: A.object,
  nodeKey: A.string,
  toggleEmojiPicker: A.func,
  showEmojiPicker: A.bool
};
function xRe({ nodeKey: t, textEditor: e, textEditorInitialState: n, backgroundColor: i, calloutEmoji: r }) {
  const [s] = Oe.useLexicalComposerContext(), { isSelected: o, isEditing: a, setEditing: l } = j.useContext(gn), { cardConfig: u } = j.useContext(dt), [f, d] = j.useState(!1), [h, m] = j.useState(!1), [g, w] = j.useState(r), [x, _] = j.useState(!!r), S = (P) => {
    P.stopPropagation(), l(!0), s.update(() => {
      const W = N.$getNodeByKey(t);
      _(P.target.checked), P.target.checked && g === "" ? W.calloutEmoji = "💡" : W.calloutEmoji = P.target.checked ? g : "";
    });
  }, C = (P) => {
    s.update(() => {
      const W = N.$getNodeByKey(t);
      W.backgroundColor = P;
    });
  }, E = (P) => {
    s.update(() => {
      const W = N.$getNodeByKey(t);
      w(P.native), W.calloutEmoji = P.native, M();
    });
  }, M = () => {
    a || l(!0), f && e.focus(), d(!f);
  }, $ = (P) => {
    P.preventDefault(), P.stopPropagation(), s.dispatchCommand(Vs, { cardKey: t, focusEditor: !1 });
  };
  return j.useEffect(() => {
    e.setEditable(a);
  }, [a, e]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      fG,
      {
        calloutEmoji: r,
        changeEmoji: E,
        color: i,
        handleColorChange: C,
        hasEmoji: x,
        isEditing: a,
        nodeKey: t,
        sanitizeHtml: F2,
        setShowEmojiPicker: d,
        showEmojiPicker: f,
        textEditor: e,
        textEditorInitialState: n,
        toggleEmoji: S,
        toggleEmojiPicker: M
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "callout",
        isVisible: h,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => m(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "callout",
        isVisible: o && !a && !h,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "edit-callout-card", icon: "edit", isActive: !1, label: "Edit", onClick: $ }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !u.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !u.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => m(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const dG = N.createCommand();
class dx extends b1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__calloutTextEditor");
    we(this, "__calloutTextEditorInitialState");
    xi(this, "__calloutTextEditor", { editor: n.calloutTextEditor, nodes: pr }), !n.calloutTextEditor && n.calloutText && _i(this, "__calloutTextEditor", `${n.calloutText}`);
  }
  getIcon() {
    return SS;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__calloutTextEditor && this.__calloutTextEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__calloutTextEditor, null), r = mi(i, { allowBr: !0 });
      n.calloutText = r;
    }), n;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.calloutTextEditor = i.__calloutTextEditor, n.calloutTextEditorInitialState = i.__calloutTextEditorInitialState, n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(
      xRe,
      {
        backgroundColor: this.backgroundColor,
        calloutEmoji: this.calloutEmoji,
        nodeKey: this.getKey(),
        textEditor: this.__calloutTextEditor,
        textEditorInitialState: this.__calloutTextEditorInitialState
      }
    ) });
  }
}
we(dx, "kgMenu", [{
  label: "Callout",
  desc: "Info boxes that stand out",
  Icon: SS,
  insertCommand: dG,
  matches: ["callout"],
  priority: 9,
  shortcut: "/callout"
}]);
const _Re = (t) => new dx(t), hG = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m3 5 9 8 9-8" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M20.182 4H3.818c-.48 0-.94.174-1.285.487a1.649 1.649 0 0 0-.394.54 1.56 1.56 0 0 0-.139.64v11.666c0 .443.192.866.533 1.179A1.9 1.9 0 0 0 3.818 19h16.364c.48.001.942-.174 1.286-.488.34-.313.532-.736.532-1.179V5.667c0-.22-.048-.437-.14-.64a1.65 1.65 0 0 0-.392-.539A1.904 1.904 0 0 0 20.182 4Z" }));
function pG({ message: t }) {
  return t ? /* @__PURE__ */ y.jsx("div", { className: "py-[.6rem] font-sans text-2xs font-semibold uppercase leading-8 tracking-normal text-grey dark:text-grey-800", "data-testid": "visibility-message", children: t }) : null;
}
function mG({
  alignment: t = "left",
  buttonText: e = "",
  buttonUrl: n = "",
  handleSegmentChange: i,
  htmlEditor: r,
  htmlEditorInitialState: s,
  isEditing: o = !1,
  segment: a = "status:free",
  showDividers: l = !0,
  showButton: u = !0,
  toggleDividers: f,
  updateAlignment: d,
  updateShowButton: h,
  updateButtonText: m,
  updateButtonUrl: g
}) {
  const w = [
    {
      label: "Left",
      name: "left",
      Icon: V1,
      dataTestId: "left-align"
    },
    {
      label: "Center",
      name: "center",
      Icon: Y1,
      dataTestId: "center-align"
    }
  ], x = [{
    label: "Free members",
    name: "status:free"
  }, {
    label: "Paid members",
    name: "status:-free"
  }], S = ((C) => {
    switch (C) {
      case "status:free":
        return "Hidden on website and paid newsletter";
      case "status:-free":
        return "Hidden on website and free newsletter";
      default:
        return "";
    }
  })(a);
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "w-full pb-6", children: [
      /* @__PURE__ */ y.jsx(pG, { message: S }),
      l && /* @__PURE__ */ y.jsx("hr", { className: "not-kg-prose mb-12 block border-t-grey-300 dark:border-t-grey-900", "data-testid": "top-divider" }),
      /* @__PURE__ */ y.jsx(
        Pr,
        {
          autoFocus: !0,
          hasSettingsPanel: !0,
          initialEditor: r,
          initialEditorState: s,
          nodes: "basic",
          placeholderClassName: "bg-transparent whitespace-normal font-serif text-xl !text-grey-500 !dark:text-grey-800 ",
          placeholderText: "Email only text... (optional)",
          textClassName: `w-full bg-transparent whitespace-normal font-serif text-xl text-grey-900 dark:text-grey-200 ${t === "left" ? "text-left" : "text-center mx-auto [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left"} `,
          children: /* @__PURE__ */ y.jsx(cx, {})
        }
      ),
      u && (o || e && n) && /* @__PURE__ */ y.jsx("div", { className: `mt-6 ${t === "left" ? "text-left" : "text-center"} `, children: /* @__PURE__ */ y.jsx(Na, { color: "accent", dataTestId: "cta-button", placeholder: "Add button text", value: e }) }),
      l && /* @__PURE__ */ y.jsx("hr", { className: "not-kg-prose mb-0 mt-12 block border-t-grey-300 dark:border-t-grey-900", "data-testid": "bottom-divider" }),
      !o && /* @__PURE__ */ y.jsx(ko, {})
    ] }),
    o && /* @__PURE__ */ y.jsxs(Go, { children: [
      /* @__PURE__ */ y.jsx(
        I9e,
        {
          description: "Visible for this audience when delivered by email. This card is not published on your site.",
          label: "Visibility",
          menu: x,
          value: a,
          onChange: i
        }
      ),
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: w,
          label: "Content alignment",
          selectedName: t,
          onClick: d
        }
      ),
      /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "dividers-settings",
          isChecked: l,
          label: "Separators",
          onChange: f
        }
      ),
      /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "button-settings",
          isChecked: u,
          label: "Button",
          onChange: h
        }
      ),
      u && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
        /* @__PURE__ */ y.jsx(
          zf,
          {
            dataTestId: "button-text",
            label: "Button text",
            placeholder: "Add button text",
            value: e,
            onChange: m
          }
        ),
        /* @__PURE__ */ y.jsx(
          wp,
          {
            dataTestId: "button-url",
            label: "Button URL",
            value: n,
            onChange: g
          }
        )
      ] })
    ] })
  ] });
}
mG.propTypes = {
  alignment: A.oneOf(["left", "center"]),
  buttonText: A.string,
  buttonUrl: A.string,
  isEditing: A.bool,
  segment: A.oneOf(["status:free", "status:-free"]),
  showButton: A.bool,
  showDividers: A.bool,
  updateAlignment: A.func,
  updateButtonText: A.func,
  updateButtonUrl: A.func,
  updateShowButton: A.func,
  toggleDividers: A.func,
  suggestedUrls: A.array,
  handleSegmentChange: A.func,
  htmlEditor: A.object,
  htmlEditorInitialState: A.object
};
function ORe({
  nodeKey: t,
  alignment: e,
  htmlEditor: n,
  htmlEditorInitialState: i,
  segment: r,
  showDividers: s,
  showButton: o,
  buttonText: a,
  buttonUrl: l
}) {
  const [u] = Oe.useLexicalComposerContext(), f = j.useContext(gn), { cardConfig: d } = j.useContext(dt), { isEditing: h, isSelected: m } = f, [g, w] = j.useState(!1), x = (P) => {
    P.preventDefault(), P.stopPropagation(), u.dispatchCommand(Vs, { cardKey: t, focusEditor: !1 });
  }, _ = (P) => {
    u.update(() => {
      const W = N.$getNodeByKey(t);
      W.segment = P;
    });
  };
  j.useEffect(() => {
    n.setEditable(h);
  }, [h, n]);
  const S = (P) => {
    u.update(() => {
      const W = N.$getNodeByKey(t);
      W.alignment = P;
    });
  }, C = (P) => {
    u.update(() => {
      const W = N.$getNodeByKey(t);
      W.showDividers = P.target.checked;
    });
  }, E = (P) => {
    u.update(() => {
      const W = N.$getNodeByKey(t);
      W.showButton = P.target.checked;
    });
  }, M = (P) => {
    u.update(() => {
      const W = N.$getNodeByKey(t);
      W.buttonText = P.target.value;
    });
  }, $ = (P) => {
    u.update(() => {
      const W = N.$getNodeByKey(t);
      W.buttonUrl = P;
    });
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      mG,
      {
        alignment: e,
        buttonText: a,
        buttonUrl: l,
        handleSegmentChange: _,
        htmlEditor: n,
        htmlEditorInitialState: i,
        isEditing: h,
        segment: r,
        showButton: o,
        showDividers: s,
        toggleDividers: C,
        updateAlignment: S,
        updateButtonText: M,
        updateButtonUrl: $,
        updateShowButton: E
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "email-cta",
        isVisible: g,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => w(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "email-cta",
        isVisible: m && !h && !g,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: x }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !d.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !d.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => w(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const gG = N.createCommand();
class hx extends D1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__htmlEditor");
    we(this, "__htmlEditorInitialState");
    xi(this, "__htmlEditor", { editor: n.htmlEditor, nodes: $f }), n.htmlEditor || _i(this, "__htmlEditor", n.html);
  }
  getIcon() {
    return Ug;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.htmlEditor = i.__htmlEditor, n.htmlEditorInitialState = i.__htmlEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__htmlEditor && this.__htmlEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__htmlEditor, null), r = mi(i, { removeCodeWrappers: !0, allowBr: !0 });
      n.html = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(
      qn,
      {
        IndicatorIcon: hG,
        nodeKey: this.getKey(),
        wrapperStyle: "wide",
        children: /* @__PURE__ */ y.jsx(
          ORe,
          {
            alignment: this.alignment,
            buttonText: this.buttonText,
            buttonUrl: this.buttonUrl,
            htmlEditor: this.__htmlEditor,
            htmlEditorInitialState: this.__htmlEditorInitialState,
            nodeKey: this.getKey(),
            segment: this.__segment,
            showButton: this.showButton,
            showDividers: this.showDividers
          }
        )
      }
    );
  }
  // override the default `isEmpty` check because we need to check the nested editors
  // rather than the data properties themselves
  isEmpty() {
    return this.__htmlEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1)) && (!this.showButton || !this.buttonText && !this.buttonUrl);
  }
}
we(hx, "kgMenu", {
  label: "Email call to action",
  desc: "Target free or paid members with a CTA",
  Icon: Ug,
  insertCommand: gG,
  matches: ["email", "cta", "email-cta"],
  priority: 7,
  postType: "post",
  shortcut: "/email-cta",
  isHidden: ({ config: n }) => {
    var i;
    return ((i = n == null ? void 0 : n.deprecated) == null ? void 0 : i.emailCta) ?? !0;
  }
});
function SRe() {
  return new hx();
}
function vG({
  htmlEditor: t,
  htmlEditorInitialState: e,
  isEditing: n = !1
}) {
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(pG, { message: "Hidden on website" }),
    /* @__PURE__ */ y.jsxs("div", { className: "w-full", children: [
      /* @__PURE__ */ y.jsx(
        Pr,
        {
          autoFocus: !0,
          initialEditor: t,
          initialEditorState: e,
          nodes: "basic",
          textClassName: "kg-email-html whitespace-normal pb-1",
          children: /* @__PURE__ */ y.jsx(cx, {})
        }
      ),
      !n && /* @__PURE__ */ y.jsx(ko, {})
    ] })
  ] });
}
vG.propTypes = {
  htmlEditor: A.object,
  isEditing: A.bool,
  htmlEditorInitialState: A.object
};
function CRe({ nodeKey: t, htmlEditor: e, htmlEditorInitialState: n }) {
  const [i] = Oe.useLexicalComposerContext(), r = j.useContext(gn), { cardConfig: s } = j.useContext(dt), { isEditing: o, isSelected: a } = r, [l, u] = j.useState(!1), f = (d) => {
    d.preventDefault(), d.stopPropagation(), i.dispatchCommand(Vs, { cardKey: t, focusEditor: !1 });
  };
  return j.useEffect(() => {
    e.setEditable(o);
  }, [o, e]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      vG,
      {
        htmlEditor: e,
        htmlEditorInitialState: n,
        isEditing: o
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "email",
        isVisible: l,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => u(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "email",
        isVisible: a && !o && !l,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: f }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !s.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !s.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => u(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const bG = N.createCommand();
class px extends N1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__htmlEditor");
    we(this, "__htmlEditorInitialState");
    xi(this, "__htmlEditor", { editor: n.htmlEditor, nodes: $f }), n.htmlEditor || _i(this, "__htmlEditor", n.html || '<p>Hey <code>{first_name, "there"}</code>,</p>');
  }
  getIcon() {
    return ES;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.htmlEditor = i.__htmlEditor, n.htmlEditorInitialState = i.__htmlEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__htmlEditor && this.__htmlEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__htmlEditor, null), r = mi(i, { removeCodeWrappers: !1, allowBr: !0 });
      n.html = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(
      qn,
      {
        IndicatorIcon: hG,
        nodeKey: this.getKey(),
        wrapperStyle: "wide",
        children: /* @__PURE__ */ y.jsx(
          CRe,
          {
            htmlEditor: this.__htmlEditor,
            htmlEditorInitialState: this.__htmlEditorInitialState,
            nodeKey: this.getKey()
          }
        )
      }
    );
  }
  // override the default `isEmpty` check because we need to check the nested editors
  // rather than the data properties themselves
  isEmpty() {
    return this.__htmlEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1));
  }
}
we(px, "kgMenu", [{
  label: "Email content",
  desc: "Only visible when delivered by email",
  Icon: ES,
  insertCommand: bG,
  matches: ["email content", "only email"],
  priority: 8,
  postType: "post",
  shortcut: "/email"
}]);
const ERe = (t) => new px(t);
function TRe({ onFileChange: t, fileInputRef: e }) {
  return /* @__PURE__ */ y.jsx("form", { onChange: t, children: /* @__PURE__ */ y.jsx(
    "input",
    {
      ref: e,
      hidden: !0,
      name: "file-input",
      type: "file"
    }
  ) });
}
const $Re = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("defs", null, /* @__PURE__ */ J.createElement("style", null, `
      .a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}
    `)), /* @__PURE__ */ J.createElement("path", { className: "a", d: "M8.25 14.25 12 18l3.75-3.75M12 6.75V18" }), /* @__PURE__ */ J.createElement("circle", { className: "a", cx: 12, cy: 12, r: 11.25 }));
function yG({ progress: t }) {
  const e = {
    width: `${t == null ? void 0 : t.toFixed(0)}%`
  };
  return /* @__PURE__ */ y.jsx("div", { className: "h-full border border-transparent", children: /* @__PURE__ */ y.jsx("div", { className: "relative flex h-full items-center justify-center border border-grey/20 bg-grey-50 before:pb-[12.5%] dark:bg-grey-900", children: /* @__PURE__ */ y.jsx("div", { className: "flex w-full items-center justify-center overflow-hidden", children: /* @__PURE__ */ y.jsx(Xo, { style: e }) }) }) });
}
function wG({ handleSelectorClick: t, fileDragHandler: e }) {
  return /* @__PURE__ */ y.jsx(
    mc,
    {
      desc: "Click to upload a file",
      filePicker: () => t(),
      icon: "file",
      isDraggedOver: e.isDraggedOver,
      placeholderRef: e.setRef,
      size: "xsmall"
    }
  );
}
function kG({ isEditing: t, title: e, titlePlaceholder: n, desc: i, descPlaceholder: r, name: s, size: o, handleFileTitle: a, handleFileDesc: l, ...u }) {
  return /* @__PURE__ */ y.jsxs("div", { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "flex justify-between rounded-md border border-grey/30 p-2", children: [
      /* @__PURE__ */ y.jsxs("div", { className: `flex w-full flex-col px-2 font-sans ${e || i || t ? "justify-between" : "justify-center"}`, ...u, children: [
        (t || e || i) && /* @__PURE__ */ y.jsxs("div", { className: "flex flex-col", children: [
          (t || e) && /* @__PURE__ */ y.jsx(
            Yw,
            {
              className: "h-[30px] bg-transparent text-lg font-bold leading-none tracking-tight text-black dark:text-grey-200",
              "data-kg-file-card": "fileTitle",
              maxLength: "80",
              placeholder: n,
              value: e,
              onChange: a
            }
          ),
          (t || i) && /* @__PURE__ */ y.jsx(
            Yw,
            {
              className: "h-[26px] bg-transparent pb-1 text-[1.6rem] font-normal leading-none text-grey-700 placeholder:text-grey-500 dark:text-grey-300 dark:placeholder:text-grey-800",
              "data-kg-file-card": "fileDescription",
              maxLength: "100",
              placeholder: r,
              value: i,
              onChange: l
            }
          )
        ] }),
        /* @__PURE__ */ y.jsxs("div", { className: "!mt-0 py-1 text-sm font-medium text-grey-900 dark:text-grey-200", "data-kg-file-card": "dataset", children: [
          s,
          /* @__PURE__ */ y.jsxs("span", { className: "text-grey-700", children: [
            " • ",
            o
          ] })
        ] })
      ] }),
      /* @__PURE__ */ y.jsx("div", { className: `!mt-0 flex w-full max-w-[96px] items-center justify-center rounded-md bg-grey-200 dark:bg-grey-900 ${e && i || t ? "h-[96px]" : e || i ? "h-[64px]" : "h-[40px]"}`, children: /* @__PURE__ */ y.jsx($Re, { className: `text-green transition-all duration-75 ease-in ${e || i || t ? "size-6" : "size-5"}` }) })
    ] }),
    !t && /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 z-50" })
  ] });
}
function xG({
  isPopulated: t,
  fileTitle: e,
  fileTitlePlaceholder: n,
  fileDesc: i,
  fileDescPlaceholder: r,
  fileName: s,
  fileSize: o,
  fileDragHandler: a,
  isEditing: l,
  fileInputRef: u,
  onFileChange: f,
  handleFileTitle: d,
  handleFileDesc: h,
  fileUploader: m,
  ...g
}) {
  const { isLoading: w, progress: x } = m || {}, _ = (E) => {
    u && (u.current = E.current);
  }, S = (E) => {
    u.current = E, _(u);
  }, C = () => {
    Yi({ fileInputRef: u });
  };
  return w ? /* @__PURE__ */ y.jsx(yG, { progress: x }) : t ? /* @__PURE__ */ y.jsx(
    kG,
    {
      desc: i,
      descPlaceholder: r,
      handleFileDesc: h,
      handleFileTitle: d,
      isEditing: l,
      name: s,
      size: o,
      title: e,
      titlePlaceholder: n,
      ...g
    }
  ) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      wG,
      {
        fileDragHandler: a,
        handleSelectorClick: C
      }
    ),
    /* @__PURE__ */ y.jsx(
      TRe,
      {
        fileInputRef: S,
        setFileInputRef: _,
        onFileChange: f
      }
    )
  ] });
}
xG.propTypes = {
  isPopulated: A.bool,
  fileTitle: A.string,
  fileTitlePlaceholder: A.string,
  fileDesc: A.string,
  fileDescPlaceholder: A.string,
  fileName: A.string,
  fileSize: A.string,
  fileDragHandler: A.object,
  isEditing: A.bool,
  fileInputRef: A.object,
  onFileChange: A.func,
  handleFileTitle: A.func,
  handleFileDesc: A.func,
  fileUploader: A.object
};
yG.propTypes = {
  progress: A.number
};
wG.propTypes = {
  fileDragHandler: A.object,
  handleSelectorClick: A.func
};
kG.propTypes = {
  desc: A.string,
  descPlaceholder: A.string,
  handleFileDesc: A.func,
  handleFileTitle: A.func,
  isEditing: A.bool,
  name: A.string,
  size: A.string,
  title: A.string,
  titlePlaceholder: A.string
};
const MRe = (t) => {
  const e = t.split(".").pop();
  return t.replace(`.${e}`, "");
}, oS = async (t, e, n, i) => {
  if (!t)
    return;
  const r = await i(t), s = t, o = s == null ? void 0 : s[0].name, a = s == null ? void 0 : s[0].size, l = r == null ? void 0 : r[0].url;
  let u = {
    fileName: o,
    fileSize: a,
    src: l
  };
  await n.update(() => {
    const f = N.$getNodeByKey(e);
    f.fileTitle = MRe(u.fileName), f.fileName = u.fileName, f.fileSize = u.fileSize, f.src = u.src;
  });
};
function NRe({
  fileDesc: t,
  fileDescPlaceholder: e,
  fileName: n,
  fileSize: i,
  fileTitle: r,
  fileTitlePlaceholder: s,
  fileSrc: o,
  nodeKey: a,
  triggerFileDialog: l,
  initialFile: u
}) {
  const [f] = Oe.useLexicalComposerContext(), [d, h] = j.useState(!1), { fileUploader: m } = j.useContext(dt), { isSelected: g, isEditing: w } = j.useContext(gn), x = j.useRef(), [_, S] = j.useState(!1), C = m.useFileUpload("file"), E = Wo({ handleDrop: z });
  j.useEffect(() => {
    (async (L) => {
      L && !o && await oS([L], a, f, C.upload);
    })(u);
  }, []);
  const M = async (Z) => {
    const L = Z.target.files;
    return f.update(() => {
      const Q = N.$getNodeByKey(a);
      Q.src = "";
    }), await oS(L, a, f, C.upload);
  };
  j.useEffect(() => {
    o && i && n && h(!0);
  }, [n, i, o]);
  const $ = (Z) => {
    Z.preventDefault(), Z.stopPropagation();
  }, P = (Z) => {
    const L = Z.target.value;
    f.update(() => {
      const Q = N.$getNodeByKey(a);
      Q.fileTitle = L;
    });
  }, W = (Z) => {
    const L = Z.target.value;
    f.update(() => {
      const Q = N.$getNodeByKey(a);
      Q.fileCaption = L;
    });
  };
  j.useEffect(() => {
    if (!l)
      return;
    const Z = setTimeout(() => {
      Yi({ fileInputRef: x }), f.update(() => {
        const L = N.$getNodeByKey(a);
        L.triggerFileDialog = !1;
      });
    });
    return () => {
      clearTimeout(Z);
    };
  }, [Yi]);
  async function z(Z) {
    await oS(Z, a, f, C.upload);
  }
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      xG,
      {
        fileDesc: t,
        fileDescPlaceholder: e,
        fileDragHandler: E,
        fileInputRef: x,
        fileName: n,
        fileSize: i,
        fileTitle: r,
        fileTitlePlaceholder: s,
        fileUploader: C,
        handleFileDesc: W,
        handleFileTitle: P,
        isEditing: w,
        isPopulated: d,
        onFileChange: M
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "file-upload",
        isVisible: _,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => S(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "file-upload",
        isVisible: g && d && !w && !_,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "edit-file-upload-card", icon: "edit", isActive: !1, label: "Edit", onClick: $ }),
          /* @__PURE__ */ y.jsx(Zn, {}),
          /* @__PURE__ */ y.jsx(
            at,
            {
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => S(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const _G = N.createCommand();
class L0 extends C1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__triggerFileDialog", !1);
    we(this, "__initialFile", null);
    const { triggerFileDialog: r, initialFile: s } = n;
    this.__triggerFileDialog = !n.src && r || !1, this.__initialFile = s || null;
  }
  getIcon() {
    return TS;
  }
  set triggerFileDialog(n) {
    const i = this.getWritable();
    i.__triggerFileDialog = n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(
      qn,
      {
        nodeKey: this.getKey(),
        children: /* @__PURE__ */ y.jsx(
          NRe,
          {
            fileDesc: this.fileCaption,
            fileDescPlaceholder: "Enter a description",
            fileName: this.fileName,
            fileSize: this.formattedFileSize,
            fileSrc: this.src,
            fileTitle: this.fileTitle,
            fileTitlePlaceholder: "Enter a title",
            initialFile: this.__initialFile,
            nodeKey: this.getKey(),
            triggerFileDialog: this.__triggerFileDialog
          }
        )
      }
    );
  }
}
we(L0, "kgMenu", [{
  label: "File",
  desc: "Upload a downloadable file",
  Icon: TS,
  insertCommand: _G,
  insertParams: {
    triggerFileDialog: !0
  },
  matches: ["file"],
  priority: 15,
  shortcut: "/file"
}]), we(L0, "uploadType", "file");
const ARe = (t) => new L0(t), OG = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "m21 3-7 7m0-7h7v7M3 21l7-7m-7 0v7h7" })), SG = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.5, d: "M23 3H12v18h11V3Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M12 3H1v18h11V3Z" })), CG = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ J.createElement("path", { d: "m14 10 8-8", "data-cap": "butt" }), /* @__PURE__ */ J.createElement("path", { d: "M21 10h-7V3" }), /* @__PURE__ */ J.createElement("path", { d: "m10 14-8 8", "data-cap": "butt" }), /* @__PURE__ */ J.createElement("path", { d: "M10 21v-7H3" })));
/*! Fast Average Color | © 2025 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
function DRe(t) {
  var e = t.toString(16);
  return e.length === 1 ? "0" + e : e;
}
function lR(t) {
  return "#" + t.map(DRe).join("");
}
function PRe(t) {
  var e = (t[0] * 299 + t[1] * 587 + t[2] * 114) / 1e3;
  return e < 128;
}
function IRe(t) {
  return t ? LRe(t) ? t : [t] : [];
}
function LRe(t) {
  return Array.isArray(t[0]);
}
function r8(t, e, n) {
  for (var i = 0; i < n.length; i++)
    if (RRe(t, e, n[i]))
      return !0;
  return !1;
}
function RRe(t, e, n) {
  switch (n.length) {
    case 3:
      if (jRe(t, e, n))
        return !0;
      break;
    case 4:
      if (FRe(t, e, n))
        return !0;
      break;
    case 5:
      if (BRe(t, e, n))
        return !0;
      break;
    default:
      return !1;
  }
}
function jRe(t, e, n) {
  return t[e + 3] !== 255 || t[e] === n[0] && t[e + 1] === n[1] && t[e + 2] === n[2];
}
function FRe(t, e, n) {
  return t[e + 3] && n[3] ? t[e] === n[0] && t[e + 1] === n[1] && t[e + 2] === n[2] && t[e + 3] === n[3] : t[e + 3] === n[3];
}
function Wb(t, e, n) {
  return t >= e - n && t <= e + n;
}
function BRe(t, e, n) {
  var i = n[0], r = n[1], s = n[2], o = n[3], a = n[4], l = t[e + 3], u = Wb(l, o, a);
  return o ? !!(!l && u || Wb(t[e], i, a) && Wb(t[e + 1], r, a) && Wb(t[e + 2], s, a) && u) : u;
}
var zRe = 24;
function WRe(t, e, n) {
  for (var i = {}, r = n.dominantDivider || zRe, s = n.ignoredColor, o = n.step, a = [0, 0, 0, 0, 0], l = 0; l < e; l += o) {
    var u = t[l], f = t[l + 1], d = t[l + 2], h = t[l + 3];
    if (!(s && r8(t, l, s))) {
      var m = Math.round(u / r) + "," + Math.round(f / r) + "," + Math.round(d / r);
      i[m] ? i[m] = [
        i[m][0] + u * h,
        i[m][1] + f * h,
        i[m][2] + d * h,
        i[m][3] + h,
        i[m][4] + 1
      ] : i[m] = [u * h, f * h, d * h, h, 1], a[4] < i[m][4] && (a = i[m]);
    }
  }
  var g = a[0], w = a[1], x = a[2], _ = a[3], S = a[4];
  return _ ? [
    Math.round(g / _),
    Math.round(w / _),
    Math.round(x / _),
    Math.round(_ / S)
  ] : n.defaultColor;
}
function HRe(t, e, n) {
  for (var i = 0, r = 0, s = 0, o = 0, a = 0, l = n.ignoredColor, u = n.step, f = 0; f < e; f += u) {
    var d = t[f + 3], h = t[f] * d, m = t[f + 1] * d, g = t[f + 2] * d;
    l && r8(t, f, l) || (i += h, r += m, s += g, o += d, a++);
  }
  return o ? [
    Math.round(i / o),
    Math.round(r / o),
    Math.round(s / o),
    Math.round(o / a)
  ] : n.defaultColor;
}
function QRe(t, e, n) {
  for (var i = 0, r = 0, s = 0, o = 0, a = 0, l = n.ignoredColor, u = n.step, f = 0; f < e; f += u) {
    var d = t[f], h = t[f + 1], m = t[f + 2], g = t[f + 3];
    l && r8(t, f, l) || (i += d * d * g, r += h * h * g, s += m * m * g, o += g, a++);
  }
  return o ? [
    Math.round(Math.sqrt(i / o)),
    Math.round(Math.sqrt(r / o)),
    Math.round(Math.sqrt(s / o)),
    Math.round(o / a)
  ] : n.defaultColor;
}
function uR(t) {
  return mg(t, "defaultColor", [0, 0, 0, 0]);
}
function mg(t, e, n) {
  return t[e] === void 0 ? n : t[e];
}
var cR = 10, S6 = 100;
function URe(t) {
  return t.search(/\.svg(\?|$)/i) !== -1;
}
function ZRe(t) {
  if (EG(t)) {
    var e = t.naturalWidth, n = t.naturalHeight;
    return !t.naturalWidth && URe(t.src) && (e = n = S6), {
      width: e,
      height: n
    };
  }
  return YRe(t) ? {
    width: t.videoWidth,
    height: t.videoHeight
  } : $G(t) ? {
    width: t.codedWidth,
    height: t.codedHeight
  } : {
    width: t.width,
    height: t.height
  };
}
function fR(t) {
  return VRe(t) ? "canvas" : qRe(t) ? "offscreencanvas" : $G(t) ? "videoframe" : XRe(t) ? "imagebitmap" : t.src;
}
function EG(t) {
  return typeof HTMLImageElement < "u" && t instanceof HTMLImageElement;
}
var TG = typeof OffscreenCanvas < "u";
function qRe(t) {
  return TG && t instanceof OffscreenCanvas;
}
function YRe(t) {
  return typeof HTMLVideoElement < "u" && t instanceof HTMLVideoElement;
}
function $G(t) {
  return typeof VideoFrame < "u" && t instanceof VideoFrame;
}
function VRe(t) {
  return typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement;
}
function XRe(t) {
  return typeof ImageBitmap < "u" && t instanceof ImageBitmap;
}
function GRe(t, e) {
  var n = mg(e, "left", 0), i = mg(e, "top", 0), r = mg(e, "width", t.width), s = mg(e, "height", t.height), o = r, a = s;
  if (e.mode === "precision")
    return {
      srcLeft: n,
      srcTop: i,
      srcWidth: r,
      srcHeight: s,
      destWidth: o,
      destHeight: a
    };
  var l;
  return r > s ? (l = r / s, o = S6, a = Math.round(o / l)) : (l = s / r, a = S6, o = Math.round(a / l)), (o > r || a > s || o < cR || a < cR) && (o = r, a = s), {
    srcLeft: n,
    srcTop: i,
    srcWidth: r,
    srcHeight: s,
    destWidth: o,
    destHeight: a
  };
}
var KRe = typeof window > "u";
function JRe() {
  return KRe ? TG ? new OffscreenCanvas(1, 1) : null : document.createElement("canvas");
}
var eje = "FastAverageColor: ";
function aa(t) {
  return Error(eje + t);
}
function Um(t, e) {
  e || console.error(t);
}
var MG = (
  /** @class */
  function() {
    function t() {
      this.canvas = null, this.ctx = null;
    }
    return t.prototype.getColorAsync = function(e, n) {
      if (!e)
        return Promise.reject(aa("call .getColorAsync() without resource"));
      if (typeof e == "string") {
        if (typeof Image > "u")
          return Promise.reject(aa("resource as string is not supported in this environment"));
        var i = new Image();
        return i.crossOrigin = n && n.crossOrigin || "", i.src = e, this.bindImageEvents(i, n);
      } else {
        if (EG(e) && !e.complete)
          return this.bindImageEvents(e, n);
        var r = this.getColor(e, n);
        return r.error ? Promise.reject(r.error) : Promise.resolve(r);
      }
    }, t.prototype.getColor = function(e, n) {
      n = n || {};
      var i = uR(n);
      if (!e) {
        var r = aa("call .getColor() without resource");
        return Um(r, n.silent), this.prepareResult(i, r);
      }
      var s = ZRe(e), o = GRe(s, n);
      if (!o.srcWidth || !o.srcHeight || !o.destWidth || !o.destHeight) {
        var r = aa('incorrect sizes for resource "'.concat(fR(e), '"'));
        return Um(r, n.silent), this.prepareResult(i, r);
      }
      if (!this.canvas && (this.canvas = JRe(), !this.canvas)) {
        var r = aa("OffscreenCanvas is not supported in this browser");
        return Um(r, n.silent), this.prepareResult(i, r);
      }
      if (!this.ctx) {
        if (this.ctx = this.canvas.getContext("2d", { willReadFrequently: !0 }), !this.ctx) {
          var r = aa("Canvas Context 2D is not supported in this browser");
          return Um(r, n.silent), this.prepareResult(i);
        }
        this.ctx.imageSmoothingEnabled = !1;
      }
      this.canvas.width = o.destWidth, this.canvas.height = o.destHeight;
      try {
        this.ctx.clearRect(0, 0, o.destWidth, o.destHeight), this.ctx.drawImage(e, o.srcLeft, o.srcTop, o.srcWidth, o.srcHeight, 0, 0, o.destWidth, o.destHeight);
        var a = this.ctx.getImageData(0, 0, o.destWidth, o.destHeight).data;
        return this.prepareResult(this.getColorFromArray4(a, n));
      } catch (l) {
        var r = aa("security error (CORS) for resource ".concat(fR(e), `.
Details: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image`));
        return Um(r, n.silent), n.silent || console.error(l), this.prepareResult(i, r);
      }
    }, t.prototype.getColorFromArray4 = function(e, n) {
      n = n || {};
      var i = 4, r = e.length, s = uR(n);
      if (r < i)
        return s;
      var o = r - r % i, a = (n.step || 1) * i, l;
      switch (n.algorithm || "sqrt") {
        case "simple":
          l = HRe;
          break;
        case "sqrt":
          l = QRe;
          break;
        case "dominant":
          l = WRe;
          break;
        default:
          throw aa("".concat(n.algorithm, " is unknown algorithm"));
      }
      return l(e, o, {
        defaultColor: s,
        ignoredColor: IRe(n.ignoredColor),
        step: a,
        dominantDivider: n.dominantDivider
      });
    }, t.prototype.prepareResult = function(e, n) {
      var i = e.slice(0, 3), r = [e[0], e[1], e[2], e[3] / 255], s = PRe(e);
      return {
        value: [e[0], e[1], e[2], e[3]],
        rgb: "rgb(" + i.join(",") + ")",
        rgba: "rgba(" + r.join(",") + ")",
        hex: lR(i),
        hexa: lR(e),
        isDark: s,
        isLight: !s,
        error: n
      };
    }, t.prototype.destroy = function() {
      this.canvas && (this.canvas.width = 1, this.canvas.height = 1, this.canvas = null), this.ctx = null;
    }, t.prototype.bindImageEvents = function(e, n) {
      var i = this;
      return new Promise(function(r, s) {
        var o = function() {
          u();
          var f = i.getColor(e, n);
          f.error ? s(f.error) : r(f);
        }, a = function() {
          u(), s(aa('Error loading image "'.concat(e.src, '"')));
        }, l = function() {
          u(), s(aa('Image "'.concat(e.src, '" loading aborted')));
        }, u = function() {
          e.removeEventListener("load", o), e.removeEventListener("error", a), e.removeEventListener("abort", l);
        };
        e.addEventListener("load", o), e.addEventListener("error", a), e.addEventListener("abort", l);
      });
    }, t;
  }()
);
function NG({
  alignment: t,
  buttonEnabled: e,
  buttonText: n,
  buttonUrl: i,
  showBackgroundImage: r,
  backgroundImageSrc: s,
  backgroundSize: o,
  backgroundColor: a,
  buttonColor: l,
  buttonTextColor: u,
  textColor: f,
  isEditing: d,
  fileUploader: h,
  handleAlignment: m,
  handleButtonText: g,
  handleButtonEnabled: w,
  handleShowBackgroundImage: x,
  handleHideBackgroundImage: _,
  handleClearBackgroundImage: S,
  handleBackgroundColor: C,
  handleButtonColor: E,
  handleLayout: M,
  handleTextColor: $,
  isPinturaEnabled: P,
  layout: W,
  onFileChange: z,
  openImageEditor: Z,
  imageDragHandler: L,
  headerTextEditor: Q,
  headerTextEditorInitialState: V,
  subheaderTextEditor: H,
  subheaderTextEditorInitialState: R,
  isSwapped: q,
  handleSwapLayout: Y,
  handleBackgroundSize: K,
  handleButtonTextBlur: te,
  handleButtonUrlBlur: se,
  handleButtonUrl: ce,
  setFileInputRef: U
}) {
  const [F, oe] = ft(!1), [le, pe] = ft(!1), Re = (ae) => ae === "transparent" ? "" : i8(At(ae)).hex(), ze = ({ r: ae, g: Ue, b: qt, a: Xn }) => {
    const Dt = Xn / 255;
    return Fg({
      r: ae * Dt + 255 * (1 - Dt),
      g: Ue * Dt + 255 * (1 - Dt),
      b: qt * Dt + 255 * (1 - Dt)
    }).hex();
  };
  kt(() => {
    s && W !== "split" && new MG().getColorAsync(s, { defaultColor: [255, 255, 255, 255] }).then((ae) => {
      const Ue = ze({
        r: ae.value[0],
        g: ae.value[1],
        b: ae.value[2],
        a: ae.value[3]
      });
      $(Re(Ue));
    });
  }, [s, W === "split"]), kt(() => {
    a && W === "split" && C(a, Re(a));
  }, [W === "split"]);
  const rt = [
    {
      label: "Regular",
      name: "regular",
      Icon: J0,
      dataTestId: "header-layout-regular"
    },
    {
      label: "Wide",
      name: "wide",
      Icon: e1,
      dataTestId: "header-layout-wide"
    },
    {
      label: "Full",
      name: "full",
      Icon: K0,
      dataTestId: "header-layout-full"
    },
    {
      label: "Split",
      name: "split",
      Icon: SG,
      dataTestId: "header-layout-split"
    }
  ], pt = [
    {
      label: "Left",
      name: "left",
      Icon: V1,
      dataTestId: "header-alignment-left"
    },
    {
      label: "Center",
      name: "center",
      Icon: Y1,
      dataTestId: "header-alignment-center"
    }
  ], { isLoading: ge, progress: De } = h || {}, st = W === "split" ? "Heading" : "Enter heading text", It = W === "split" ? "Subheading text" : "Enter subheading text", At = (ae) => ae === "accent" ? Ju().trim() : ae.trim(), Ut = () => s && W !== "split" && f ? {
    backgroundImage: `url(${s})`,
    backgroundSize: "cover",
    backgroundPosition: "center center",
    backgroundColor: "white",
    color: At(f)
  } : a && f ? {
    backgroundColor: At(a),
    color: At(f)
  } : {
    backgroundImage: `url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3ERectangle%3C/title%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath fill='%23F2F6F8' d='M0 0h24v24H0z'/%3E%3Cpath fill='%23E5ECF0' d='M0 0h12v12H0zM12 12h12v12H12z'/%3E%3C/g%3E%3C/svg%3E")`,
    backgroundColor: "transparent",
    color: At(f)
  }, He = (ae) => {
    ae.stopPropagation(), o === "cover" ? (K("contain"), pi("header Card Toggle Size", { size: "contain" })) : (K("cover"), pi("header Card Toggle Size", { size: "cover" }));
  }, Ct = () => {
    pi("header Card Toggle Swapped", { swapped: !q }), Y();
  }, Lt = () => {
    pi("header card button toggled", { buttonEnabled: !e }), w();
  }, Be = o === "contain" && s ? "contain" : "cover", Ie = (ae) => {
    if (ae === "regular" || ae === "wide")
      return "medium";
    if (ae === "full")
      return "large";
    if (ae === "split")
      return "medium";
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "flex w-full font-sans text-black transition-colors ease-in-out", "data-testid": "header-card-container", style: Ut(), children: [
      /* @__PURE__ */ y.jsxs("div", { className: nt(
        "flex w-full flex-col transition-colors ease-in-out sm:flex-row",
        W === "split" && q && "flex-col-reverse sm:flex-row-reverse",
        // This is needed to align the content with wide breakout width
        (W === "full" || W === "split" && Be === "contain") && "mx-auto w-[calc(740px+4rem)] xs:w-[calc(740px+8rem)] md:w-[calc(740px+12rem)] lg:w-[calc(740px+22rem)] xl:w-[calc(740px+40rem)]",
        s && W === "split" && Be === "contain" && "items-center"
      ), "data-testid": "header-card-content", children: [
        W === "split" && /* @__PURE__ */ y.jsx(
          W2,
          {
            additionalActions: /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx($l, { dataTestId: "media-upload-size", Icon: o === "cover" ? CG : OG, label: o === "cover" ? "Contain" : "Cover", onClick: He }) }),
            alt: "Background image",
            backgroundSize: o,
            className: nt(
              "sm:w-1/2",
              Be === "contain" && "sm:my-10 md:my-14",
              !q && Be === "contain" && "mt-10 px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:pl-[calc(92px-(12rem/2))] sm:pr-0 md:pl-[calc(92px-(12rem/2))] lg:pl-0",
              q && Be === "contain" && "mb-10 px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:pl-0 sm:pr-[calc(92px-(12rem/2))] md:pr-[calc(92px-(12rem/2))] lg:pr-0"
            ),
            desc: "Click to select an image",
            dragHandler: L,
            errors: h == null ? void 0 : h.errors,
            icon: "image",
            imgClassName: `${Be === "cover" && "aspect-[3/2]"}`,
            isEditing: d,
            isLoading: ge,
            isPinturaEnabled: P,
            mimeTypes: ["image/*"],
            openImageEditor: Z,
            progress: De,
            size: "large",
            src: s,
            onFileChange: z,
            onRemoveMedia: S
          }
        ),
        /* @__PURE__ */ y.jsxs(
          "div",
          {
            className: nt(
              "mx-auto flex w-full flex-1 flex-col justify-center",
              t === "center" && "items-center",
              W === "regular" && "p-[4rem] sm:py-[6rem] md:px-[6rem] md:py-[10rem] lg:px-[8rem]",
              W === "wide" && "max-w-[740px] p-[4rem] sm:py-[6rem] md:px-[8rem] md:py-[14rem] lg:px-0",
              W === "full" && "px-[calc(32px-(4rem/2))] py-[4rem] xs:px-[calc(92px-(8rem/2))] sm:py-[6rem] md:px-[calc(92px-(12rem/2))] md:py-[12rem] lg:px-0 lg:py-[14rem] xl:py-[18rem]",
              W === "split" && "p-[4rem] sm:py-[6rem] md:px-[6rem] md:py-[12rem] lg:px-[8rem] lg:py-[16rem]",
              !q && W === "split" && Be === "contain" && "px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:px-[calc(92px-(12rem/2))] md:pr-[calc(92px-(12rem/2))] lg:pr-0",
              q && W === "split" && Be === "contain" && "px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:px-[calc(92px-(12rem/2))] md:pl-[calc(92px-(12rem/2))] lg:pl-0"
            ),
            children: [
              /* @__PURE__ */ y.jsx(
                Pr,
                {
                  autoFocus: !0,
                  dataTestId: "header-heading-editor",
                  focusNext: H,
                  hasSettingsPanel: !0,
                  hiddenFormats: ["bold"],
                  initialEditor: Q,
                  initialEditorState: V,
                  nodes: "minimal",
                  placeholderClassName: nt(
                    "!font-bold !leading-[1.1] !tracking-tight opacity-50",
                    t === "center" && "text-center",
                    W === "regular" && "text-3xl sm:text-4xl",
                    (W === "wide" || W === "split") && "text-3xl sm:text-4xl md:text-5xl",
                    W === "full" && "text-3xl sm:text-4xl md:text-5xl lg:text-6xl"
                  ),
                  placeholderText: st,
                  singleParagraph: !0,
                  style: { color: Re(a) },
                  textClassName: nt(
                    "koenig-lexical-heading relative w-full whitespace-normal font-bold caret-current",
                    !d && po(Q) ? "hidden" : "peer",
                    t === "center" && "text-center [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left",
                    W === "regular" && "heading-small",
                    (W === "wide" || W === "split") && "heading-medium",
                    W === "full" && "heading-large"
                  )
                }
              ),
              /* @__PURE__ */ y.jsx(
                Pr,
                {
                  dataTestId: "header-subheader-editor",
                  defaultKoenigEnterBehavior: !0,
                  hasSettingsPanel: !0,
                  initialEditor: H,
                  initialEditorState: R,
                  nodes: "minimal",
                  placeholderClassName: nt(
                    "!font-medium !leading-snug !tracking-tight opacity-60",
                    t === "center" && "text-center",
                    W === "regular" && "text-lg sm:text-xl",
                    (W === "wide" || W === "split") && "text-lg leading-snug sm:text-xl md:text-[2.2rem]",
                    W === "full" && "text-lg sm:text-xl md:text-[2.2rem] lg:text-[2.6rem] xl:max-w-[880px]"
                  ),
                  placeholderText: It,
                  singleParagraph: !0,
                  style: { color: Re(a) },
                  textClassName: nt(
                    "koenig-lexical-subheading relative w-full whitespace-normal caret-current",
                    !d && po(H) ? "hidden" : "peer",
                    t === "center" && "text-center [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left",
                    W === "regular" && "subheading-small !mt-2",
                    (W === "wide" || W === "split") && "subheading-medium !mt-3",
                    W === "full" && "subheading-large !mt-3 xl:max-w-[880px]"
                  )
                }
              ),
              e && /* @__PURE__ */ y.jsx(
                "div",
                {
                  className: `text-${t} w-full ${W === "regular" ? "peer-[.koenig-lexical]:mt-8" : W === "wide" ? "peer-[.koenig-lexical]:mt-8 md:w-2/3" : W === "full" ? "peer-[.koenig-lexical]:mt-8 md:w-2/3 peer-[.koenig-lexical]:md:mt-8 xl:w-1/2" : "max-w-[500px] peer-[.koenig-lexical]:mt-8 peer-[.koenig-lexical]:md:mt-8"}`,
                  children: /* @__PURE__ */ y.jsx(
                    Na,
                    {
                      dataTestId: "header-card-button",
                      disabled: !0,
                      placeholder: "Add button text",
                      size: Ie(W),
                      style: l ? {
                        backgroundColor: At(l),
                        color: At(u)
                      } : {
                        backgroundColor: "#000000",
                        color: "#ffffff"
                      },
                      value: n
                    }
                  )
                }
              )
            ]
          }
        )
      ] }),
      !d && /* @__PURE__ */ y.jsx(ko, {})
    ] }),
    d && /* @__PURE__ */ y.jsxs(Go, { cardWidth: W, className: "mt-0", children: [
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: rt,
          label: "Layout",
          selectedName: W,
          onClick: M
        }
      ),
      W === "split" && /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "header-swapped",
          isChecked: q,
          label: "Flip Layout",
          onChange: Ct
        }
      ),
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: pt,
          label: "Alignment",
          selectedName: t,
          onClick: m
        }
      ),
      /* @__PURE__ */ y.jsx(
        C0,
        {
          dataTestId: "header-background-color",
          eyedropper: W === "split",
          hasTransparentOption: !0,
          isExpanded: F,
          label: "Background",
          swatches: [
            W !== "split" && {
              title: "Image",
              customContent: /* @__PURE__ */ y.jsxs(
                "button",
                {
                  className: nt(
                    "group relative flex size-6 shrink-0 items-center justify-center rounded-full border border-grey-300 bg-grey-100 text-black",
                    r && "outline outline-2 outline-green"
                  ),
                  "data-testid": "header-background-image-toggle",
                  title: "Image",
                  type: "button",
                  onClick: () => {
                    x(), oe(!1), pe(!1);
                  },
                  children: [
                    /* @__PURE__ */ y.jsx(dT, { className: "size-[1.4rem]" }),
                    /* @__PURE__ */ y.jsx(pc, { label: "Image" })
                  ]
                }
              )
            },
            { title: "Black", hex: "#000000" },
            { title: "Grey", hex: "#F0F0F0" },
            { title: "Brand color", accent: !0 }
          ].filter(Boolean),
          value: r && W !== "split" ? "image" : a,
          onPickerChange: (ae) => C(ae, Re(ae)),
          onSwatchChange: (ae) => {
            C(ae, Re(ae)), oe(!1);
          },
          onTogglePicker: (ae) => {
            ae && (W !== "split" && _(), a && C(a, Re(a))), oe(ae), ae && pe(!ae);
          },
          children: /* @__PURE__ */ y.jsx(
            H2,
            {
              alt: "Background image",
              borderStyle: "rounded",
              className: nt(
                "min-w-[296px]",
                (!r || W === "split") && "hidden"
              ),
              errors: h == null ? void 0 : h.errors,
              hideLabel: W !== "split",
              icon: "file",
              imgClassName: "w-full",
              isDraggedOver: L == null ? void 0 : L.isDraggedOver,
              isLoading: ge,
              isPinturaEnabled: P,
              label: "Image",
              mimeTypes: ["image/*"],
              openImageEditor: Z,
              placeholderRef: L == null ? void 0 : L.setRef,
              progress: De,
              setFileInputRef: U,
              size: "xsmall",
              src: s,
              stacked: !0,
              onFileChange: z,
              onRemoveMedia: () => {
                S(), $(Re(a));
              }
            }
          )
        }
      ),
      /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "header-button-toggle",
          isChecked: e,
          label: "Button",
          onChange: Lt
        }
      ),
      e && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
        /* @__PURE__ */ y.jsx(
          C0,
          {
            dataTestId: "header-button-color",
            eyedropper: W === "split",
            isExpanded: le,
            label: "Button Color",
            swatches: [
              { title: "White", hex: "#ffffff" },
              { title: "Black", hex: "#000000" },
              { title: "Brand color", accent: !0 }
            ],
            value: l,
            onPickerChange: (ae) => E(ae, Re(ae)),
            onSwatchChange: (ae) => {
              E(ae, Re(ae)), pe(!1);
            },
            onTogglePicker: (ae) => {
              pe(ae), ae && oe(!ae);
            }
          }
        ),
        /* @__PURE__ */ y.jsx(
          zf,
          {
            dataTestId: "header-button-text",
            label: "Button text",
            placeholder: "Add button text",
            value: n,
            onBlur: te,
            onChange: g
          }
        ),
        /* @__PURE__ */ y.jsx(
          wp,
          {
            dataTestId: "header-button-url",
            label: "Button URL",
            value: i,
            onChange: ce
          }
        )
      ] })
    ] })
  ] });
}
NG.propTypes = {
  alignment: A.oneOf(["left", "center"]),
  buttonColor: A.string,
  buttonText: A.string,
  buttonTextColor: A.string,
  buttonEnabled: A.bool,
  buttonPlaceholder: A.string,
  backgroundImageSrc: A.string,
  backgroundSize: A.oneOf(["cover", "contain"]),
  backgroundColor: A.string,
  textColor: A.string,
  showBackgroundImage: A.bool,
  isEditing: A.bool,
  isPinturaEnabled: A.bool,
  fileUploader: A.object,
  fileInputRef: A.object,
  handleLayout: A.func,
  handleAlignment: A.func,
  handleButtonText: A.func,
  handleClearBackgroundImage: A.func,
  handleBackgroundColor: A.func,
  handleShowBackgroundImage: A.func,
  handleHideBackgroundImage: A.func,
  handleButtonColor: A.func,
  handleTextColor: A.func,
  layout: A.oneOf(["regular", "wide", "full", "split"]),
  openFilePicker: A.func,
  onFileChange: A.func,
  openImageEditor: A.func,
  imageDragHandler: A.object,
  headerTextEditor: A.object,
  headerTextEditorInitialState: A.object,
  subheaderTextEditor: A.object,
  subheaderTextEditorInitialState: A.object,
  isSwapped: A.bool,
  handleSwapLayout: A.func,
  handleBackgroundSize: A.func,
  setFileInputRef: A.func,
  handleButtonTextBlur: A.func
};
function tje({
  alignment: t,
  backgroundColor: e,
  backgroundImageSrc: n,
  backgroundImageWidth: i,
  backgroundImageHeight: r,
  backgroundSize: s,
  buttonColor: o,
  buttonText: a,
  buttonTextColor: l,
  buttonUrl: u,
  buttonEnabled: f,
  nodeKey: d,
  header: h,
  headerTextEditor: m,
  headerTextEditorInitialState: g,
  layout: w,
  subheader: x,
  subheaderTextEditor: _,
  subheaderTextEditorInitialState: S,
  textColor: C,
  isSwapped: E,
  accentColor: M
}) {
  const [$] = Oe.useLexicalComposerContext(), { cardConfig: P } = Au(dt), { fileUploader: W } = Au(dt), { isEditing: z, isSelected: Z } = Au(gn), [L, Q] = ft(!1), [V, H] = ft(!!n), [R, q] = ft(n), [Y, K] = ft(!1), { isEnabled: te, openEditor: se } = Z2({ config: P.pinturaConfig }), ce = ct(null);
  kt(() => {
    w !== "split" && H(!!n), w === "split" && !n && R && st();
  }, [w]), kt(() => {
    let ae = Ju();
    $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.accentColor = ae;
    });
  }, [$, d]);
  const U = (ae) => {
    $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.alignment = ae;
    });
  }, F = (ae) => {
    $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.backgroundSize = ae;
    });
  }, oe = (ae) => {
    ae.preventDefault(), ae.stopPropagation(), $.dispatchCommand(Vs, { cardKey: d, focusEditor: !1 });
  }, le = W.useFileUpload("image"), pe = async (ae) => {
    $.update(() => {
      const Dt = N.$getNodeByKey(d);
      Dt.backgroundImageSrc = "";
    });
    const { imageSrc: Ue, width: qt, height: Xn } = await OT(ae, le.upload);
    $.update(() => {
      const Dt = N.$getNodeByKey(d);
      Dt.backgroundImageSrc = Ue, Dt.backgroundImageWidth = qt, Dt.backgroundImageHeight = Xn;
    }), q(Ue), K(!1);
  }, Re = async (ae) => {
    pe(ae.target.files);
  }, ze = Wo({ handleDrop: pe }), rt = (ae) => {
    $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.layout = ae;
    });
  }, pt = (ae) => {
    $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.buttonText = ae.target.value;
    });
  }, ge = (ae) => {
    ae.target.value || $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.buttonText = "";
    });
  }, De = () => {
    $.update(() => {
      const ae = N.$getNodeByKey(d);
      ae.backgroundImageSrc = "";
    }), K(!0);
  }, st = () => {
    H(!0), R && !Y ? $.update(() => {
      const ae = N.$getNodeByKey(d);
      ae.backgroundImageSrc = R;
    }) : Yi({ fileInputRef: ce });
  }, It = () => {
    H(!1), $.update(() => {
      const ae = N.$getNodeByKey(d);
      ae.backgroundImageSrc = "";
    });
  }, At = (ae, Ue) => {
    $.update(() => {
      const qt = N.$getNodeByKey(d);
      qt.backgroundColor = ae, qt.textColor = Ue, w !== "split" && It();
    });
  }, Ut = (ae) => {
    $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.textColor = ae;
    });
  }, He = (ae, Ue) => {
    $.update(() => {
      const qt = N.$getNodeByKey(d);
      qt.buttonColor = ae, qt.buttonTextColor = Ue;
    });
  }, Ct = () => {
    $.update(() => {
      const ae = N.$getNodeByKey(d);
      ae.swapped = !E;
    });
  }, Lt = () => {
    $.update(() => {
      const ae = N.$getNodeByKey(d);
      ae.buttonEnabled = !f;
    });
  }, Be = (ae) => {
    $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.buttonUrl = ae;
    });
  }, Ie = (ae) => {
    ae.target.value || $.update(() => {
      const Ue = N.$getNodeByKey(d);
      Ue.buttonUrl = "https://";
    });
  };
  return kt(() => {
    m.setEditable(z), _.setEditable(z);
  }, [z, m, _]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      NG,
      {
        alignment: t,
        backgroundColor: e,
        backgroundImageSrc: n,
        backgroundSize: s,
        buttonColor: o,
        buttonEnabled: f,
        buttonText: a,
        buttonTextColor: l,
        buttonUrl: u,
        fileUploader: le,
        handleAlignment: U,
        handleBackgroundColor: At,
        handleBackgroundSize: F,
        handleButtonColor: He,
        handleButtonEnabled: Lt,
        handleButtonText: pt,
        handleButtonTextBlur: ge,
        handleButtonUrl: Be,
        handleButtonUrlBlur: Ie,
        handleClearBackgroundImage: De,
        handleHideBackgroundImage: It,
        handleLayout: rt,
        handleShowBackgroundImage: st,
        handleSwapLayout: Ct,
        handleTextColor: Ut,
        header: h,
        headerTextEditor: m,
        headerTextEditorInitialState: g,
        imageDragHandler: ze,
        isEditing: z,
        isPinturaEnabled: te,
        isSwapped: E,
        layout: w,
        openImageEditor: se,
        setFileInputRef: (ae) => ce.current = ae,
        showBackgroundImage: V,
        subheader: x,
        subheaderTextEditor: _,
        subheaderTextEditorInitialState: S,
        textColor: C,
        onFileChange: Re
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "signup",
        isVisible: L,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => Q(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "signup",
        isVisible: Z && !z && !L,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: oe }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !P.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !P.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => Q(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const nje = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: {
  enableBackground: "new 0 0 24 24"
}, xmlSpace: "preserve", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M12.001 16.5a.75.75 0 0 1-.75-.75V5.561l-3.22 3.22a.746.746 0 0 1-1.06-.001c-.142-.141-.22-.33-.22-.53s.078-.389.22-.53l4.499-4.5a.74.74 0 0 1 .245-.163l.025-.009a.743.743 0 0 1 .522 0l.02.007c.097.04.179.095.25.166l4.499 4.499c.142.141.22.33.22.53s-.078.389-.22.53a.749.749 0 0 1-1.06 0l-3.22-3.22v10.19a.75.75 0 0 1-.75.75z" }), /* @__PURE__ */ J.createElement("path", { d: "M3.751 21a3.754 3.754 0 0 1-3.75-3.75v-1.5a.75.75 0 0 1 1.5 0v1.5a2.252 2.252 0 0 0 2.25 2.25h16.5a2.252 2.252 0 0 0 2.25-2.25v-1.5a.75.75 0 0 1 1.5 0v1.5a3.754 3.754 0 0 1-3.75 3.75h-16.5z" }));
function AG({ progress: t }) {
  const e = {
    width: `${t == null ? void 0 : t.toFixed(0)}%`
  };
  return /* @__PURE__ */ y.jsx("div", { className: "h-full border border-transparent", children: /* @__PURE__ */ y.jsx("div", { className: "relative flex h-[120px] items-center justify-center border border-grey/20 bg-grey-50 before:pb-[12.5%] dark:bg-grey-900", children: /* @__PURE__ */ y.jsx("div", { className: "flex w-full items-center justify-center overflow-hidden", children: /* @__PURE__ */ y.jsx(Xo, { style: e }) }) }) });
}
function DG({
  onFileChange: t,
  backgroundImageSrc: e,
  type: n,
  handleClearBackgroundImage: i,
  fileInputRef: r,
  openFilePicker: s,
  isUploading: o,
  progress: a
}) {
  return o ? /* @__PURE__ */ y.jsx(AG, { progress: a }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx("form", { onChange: t, children: /* @__PURE__ */ y.jsx(
      "input",
      {
        ref: r,
        accept: "image/*",
        hidden: !0,
        name: "image-input",
        type: "file"
      }
    ) }),
    n === "image" && /* @__PURE__ */ y.jsx("div", { className: "w-full", children: /* @__PURE__ */ y.jsx("div", { className: "relative", children: /* @__PURE__ */ y.jsx("div", { className: "flex w-full items-center justify-center", children: e ? /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsxs("div", { className: "group relative mb-4 w-full rounded-md", children: [
      /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 rounded-md bg-gradient-to-t from-black/0 via-black/5 to-black/30 opacity-0 transition-all group-hover:opacity-100" }),
      /* @__PURE__ */ y.jsx("div", { className: "absolute right-5 top-5 flex opacity-0 transition-all group-hover:opacity-100", children: /* @__PURE__ */ y.jsx("button", { className: "pointer-events-auto flex h-8 w-9 cursor-pointer items-center justify-center rounded-md bg-white/90 transition-all hover:bg-white", type: "button", onClick: i, children: /* @__PURE__ */ y.jsx(Bf, { className: "size-5 fill-grey-900 stroke-[3px] transition-all ease-linear group-hover:scale-105" }) }) }),
      /* @__PURE__ */ y.jsx("img", { alt: "backgroundHeaderImage", className: "max-h-64 w-full rounded-md object-cover", "data-testid": "image-picker-background", src: e })
    ] }) }) : /* @__PURE__ */ y.jsxs("button", { className: "group flex h-[120px] w-full cursor-pointer flex-col items-center justify-center rounded-md border border-grey-100 bg-grey-50 dark:border-grey-800 dark:bg-grey-900", type: "button", onClick: s, children: [
      /* @__PURE__ */ y.jsx(nje, { className: "size-5 fill-grey-700 stroke-[3px] transition-all ease-linear group-hover:scale-105" }),
      /* @__PURE__ */ y.jsx("span", { className: "px-1 text-[1.35rem] font-medium text-grey-700", children: "Click to upload background image" })
    ] }) }) }) })
  ] });
}
AG.propTypes = {
  progress: A.number
};
DG.propTypes = {
  backgroundImageSrc: A.string,
  fileInputRef: A.object,
  handleClearBackgroundImage: A.func,
  isUploading: A.bool,
  openFilePicker: A.func,
  progress: A.number,
  onFileChange: A.func
};
const ije = {
  dark: "bg-black",
  light: "bg-grey-100",
  accent: "bg-accent",
  image: "bg-grey-300 dark:bg-grey-950 bg-gradient-to-t from-black/0 via-black/5 to-black/30"
}, Hb = {
  dark: "text-white caret-white",
  light: "text-black caret-black",
  // kg-header-accent fixes the link color
  accent: "text-white caret-white kg-header-accent",
  image: "text-white caret-white"
};
function PG({
  isEditing: t,
  size: e,
  subheader: n,
  button: i,
  buttonText: r,
  buttonUrl: s,
  handleColorSelector: o,
  handleSizeSelector: a,
  handleButtonText: l,
  handleButtonUrl: u,
  backgroundImageSrc: f,
  onFileChange: d,
  handleClearBackgroundImage: h,
  fileInputRef: m,
  openFilePicker: g,
  type: w,
  header: x,
  headerTextEditor: _,
  subheaderTextEditor: S,
  fileUploader: C,
  headerTextEditorInitialState: E,
  subheaderTextEditorInitialState: M,
  handleButtonToggle: $
}) {
  const P = [
    {
      label: "S",
      name: "small"
    },
    {
      label: "M",
      name: "medium"
    },
    {
      label: "L",
      name: "large"
    }
  ], W = [
    {
      label: "Dark",
      name: "dark",
      color: "bg-black"
    },
    {
      label: "Light",
      name: "light",
      color: "bg-grey-50"
    },
    {
      label: "Accent",
      name: "accent",
      color: "bg-accent"
    },
    {
      label: "Background Image",
      // technically not a color, but it could have some styles associated with it when a background image is added.
      name: "image",
      color: "bg-grey-50"
    }
  ], { isLoading: z, progress: Z } = C || {}, L = "Enter heading text", Q = "Enter subheading text", V = "Add button text";
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs(
      "div",
      {
        className: `flex flex-col items-center justify-center text-center font-sans transition-colors ease-in-out ${e === "small" ? "min-h-[40vh] p-[14vmin]" : e === "medium" ? "min-h-[60vh] p-[12vmin]" : "min-h-[80vh] p-[18vmin]"} ${ije[w]} `,
        style: f && w === "image" ? {
          backgroundImage: `url(${f})`,
          backgroundSize: "cover",
          backgroundPosition: "center center",
          backgroundColor: "bg-grey-950"
        } : null,
        children: [
          (t || !!x || !po(_)) && /* @__PURE__ */ y.jsx(
            Pr,
            {
              autoFocus: !0,
              focusNext: S,
              hasSettingsPanel: !0,
              initialEditor: _,
              initialEditorState: E,
              nodes: "minimal",
              placeholderClassName: nt(
                "!text-center !font-bold !leading-[1.1] !tracking-tight opacity-50",
                e === "small" && "text-3xl sm:text-4xl md:text-5xl",
                (e === "medium" || e === "large") && "text-3xl sm:text-4xl md:text-5xl lg:text-6xl",
                Hb[w]
              ),
              placeholderText: L,
              singleParagraph: !0,
              textClassName: nt(
                "koenig-lexical-heading relative w-full whitespace-normal text-center font-bold [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left",
                e === "small" && "heading-medium",
                (e === "medium" || e === "large") && "heading-large",
                Hb[w]
              )
            }
          ),
          (t || !!n || !po(S)) && /* @__PURE__ */ y.jsx(
            Pr,
            {
              hasSettingsPanel: !0,
              initialEditor: S,
              initialEditorState: M,
              nodes: "minimal",
              placeholderClassName: nt(
                "!text-center !font-medium !leading-snug !tracking-tight opacity-50",
                e === "small" && "text-lg sm:text-xl",
                e === "medium" && "text-lg sm:text-xl md:text-[2.2rem]",
                e === "large" && "text-lg sm:text-xl md:text-[2.2rem] lg:text-2xl",
                Hb[w]
              ),
              placeholderText: Q,
              singleParagraph: !0,
              textClassName: nt(
                "koenig-lexical-subheading relative w-full whitespace-normal text-center [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left",
                e === "small" && "subheading-small !mt-2",
                e === "medium" && "subheading-medium !mt-3",
                e === "large" && "subheading-large !mt-3",
                Hb[w]
              )
            }
          ),
          i ? /* @__PURE__ */ y.jsx("div", { className: `${e === "small" ? "mt-6" : e === "medium" ? "mt-8" : "mt-10"}`, children: i && w === "light" && /* @__PURE__ */ y.jsx(Na, { dataTestId: "header-card-button", placeholder: V, size: e, value: r }) || i && /* @__PURE__ */ y.jsx(Na, { color: "white", dataTestId: "header-card-button", placeholder: V, size: e, value: r }) }) : void 0,
          !t && /* @__PURE__ */ y.jsx(ko, {})
        ]
      }
    ),
    t && /* @__PURE__ */ y.jsxs(Go, { className: "mt-0", children: [
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: P,
          label: "Size",
          selectedName: e,
          onClick: a
        }
      ),
      /* @__PURE__ */ y.jsx(
        tk,
        {
          buttons: W,
          dataTestId: "header-background-color",
          label: "Style",
          selectedName: w,
          onClick: o
        }
      ),
      /* @__PURE__ */ y.jsx(
        DG,
        {
          backgroundImageSrc: f,
          fileInputRef: m,
          handleClearBackgroundImage: h,
          isUploading: z,
          openFilePicker: g,
          progress: Z,
          type: w,
          onFileChange: d
        }
      ),
      /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "header-button-toggle",
          isChecked: i,
          label: "Button",
          onChange: $
        }
      ),
      i ? /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
        /* @__PURE__ */ y.jsx(
          zf,
          {
            dataTestId: "header-button-text",
            label: "Button text",
            placeholder: "Add button text",
            value: r,
            onChange: l
          }
        ),
        /* @__PURE__ */ y.jsx(
          wp,
          {
            dataTestId: "header-button-url",
            label: "Button URL",
            value: s,
            onChange: u
          }
        )
      ] }) : null
    ] })
  ] });
}
PG.propTypes = {
  size: A.oneOf(["small", "medium", "large"]),
  type: A.oneOf(["dark", "light", "accent", "image"]),
  heading: A.string,
  subheader: A.string,
  button: A.bool,
  buttonText: A.string,
  buttonUrl: A.string,
  backgroundImageSrc: A.string,
  isEditing: A.bool,
  isUploading: A.bool,
  progress: A.number,
  fileUploader: A.object,
  header: A.string,
  fileInputRef: A.object,
  handleSizeSelector: A.func,
  handleColorSelector: A.func,
  handleButtonToggle: A.func,
  handleButtonText: A.func,
  handleButtonUrl: A.func,
  handleClearBackgroundImage: A.func,
  openFilePicker: A.func,
  onFileChange: A.func,
  headerTextEditor: A.object,
  headerTextEditorInitialState: A.object,
  subheaderTextEditor: A.object,
  subheaderTextEditorInitialState: A.object
};
function rje({
  nodeKey: t,
  backgroundImageSrc: e,
  button: n,
  subheaderTextEditorInitialState: i,
  buttonText: r,
  buttonUrl: s,
  type: o,
  headerTextEditorInitialState: a,
  header: l,
  subheader: u,
  headerTextEditor: f,
  subheaderTextEditor: d,
  size: h
}) {
  const [m] = Oe.useLexicalComposerContext(), { cardConfig: g } = j.useContext(dt), { fileUploader: w } = j.useContext(dt), { isEditing: x, setEditing: _, isSelected: S } = j.useContext(gn), [C, E] = j.useState(!1), M = (q) => {
    q.preventDefault(), q.stopPropagation(), m.dispatchCommand(Vs, { cardKey: t, focusEditor: !1 });
  }, $ = w.useFileUpload("image"), P = async (q) => {
    const Y = q.target.files;
    m.update(() => {
      const te = N.$getNodeByKey(t);
      te.backgroundImageSrc = "";
    });
    const { imageSrc: K } = await OT(Y, $.upload);
    m.update(() => {
      const te = N.$getNodeByKey(t);
      te.backgroundImageSrc = K;
    });
  }, W = j.useRef(null), z = () => {
    W.current.click();
  }, Z = (q) => {
    q === "image" && e === "" && z(), m.update(() => {
      const Y = N.$getNodeByKey(t);
      Y.style = q;
    });
  }, L = (q) => {
    m.update(() => {
      const Y = N.$getNodeByKey(t);
      Y.size = q;
    });
  }, Q = (q) => {
    q.stopPropagation(), _(!0), m.update(() => {
      const Y = N.$getNodeByKey(t);
      Y.buttonEnabled = q.target.checked;
    });
  }, V = (q) => {
    m.update(() => {
      const Y = N.$getNodeByKey(t);
      Y.buttonText = q.target.value;
    });
  }, H = (q) => {
    m.update(() => {
      const Y = N.$getNodeByKey(t);
      Y.buttonUrl = q;
    });
  }, R = () => {
    m.update(() => {
      const q = N.$getNodeByKey(t);
      q.backgroundImageSrc = "";
    });
  };
  return j.useEffect(() => {
    f.setEditable(x), d.setEditable(x);
  }, [x, f, d]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      PG,
      {
        backgroundImageSrc: e,
        button: n,
        buttonText: r,
        buttonUrl: s,
        fileInputRef: W,
        fileUploader: $,
        handleButtonText: V,
        handleButtonToggle: Q,
        handleButtonUrl: H,
        handleClearBackgroundImage: R,
        handleColorSelector: Z,
        handleSizeSelector: L,
        header: l,
        headerTextEditor: f,
        headerTextEditorInitialState: a,
        isEditing: x,
        openFilePicker: z,
        size: h,
        subheader: u,
        subheaderTextEditor: d,
        subheaderTextEditorInitialState: i,
        type: o,
        onFileChange: P
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "header",
        isVisible: C,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => E(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "header",
        isVisible: S && !x && !C,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: M }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !g.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !g.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => E(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const C6 = N.createCommand();
class mx extends E1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__headerTextEditor");
    we(this, "__subheaderTextEditor");
    we(this, "__headerTextEditorInitialState");
    we(this, "__subheaderTextEditorInitialState");
    xi(this, "__headerTextEditor", { editor: n.headerTextEditor, nodes: pr }), xi(this, "__subheaderTextEditor", { editor: n.subheaderTextEditor, nodes: pr }), !n.headerTextEditor && n.header && _i(this, "__headerTextEditor", `${n.header}`), !n.subheaderTextEditor && n.subheader && _i(this, "__subheaderTextEditor", `${n.subheader}`);
  }
  getIcon() {
    return Xb;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__headerTextEditor && this.__headerTextEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__headerTextEditor, null), r = mi(i, { firstChildInnerContent: !0, allowBr: !0 });
      n.header = r;
    }), this.__subheaderTextEditor && this.__subheaderTextEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__subheaderTextEditor, null), r = mi(i, { firstChildInnerContent: !0, allowBr: !0 });
      n.subheader = r;
    }), n;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.headerTextEditor = i.__headerTextEditor, n.subheaderTextEditor = i.__subheaderTextEditor, n;
  }
  getCardWidth() {
    const n = this.version;
    if (n === 1)
      return "full";
    if (n === 2) {
      const i = this.layout;
      return i === "split" ? "full" : i;
    }
  }
  decorate() {
    if (this.version === 1)
      return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), width: this.getCardWidth(), children: /* @__PURE__ */ y.jsx(
        rje,
        {
          backgroundImageSrc: this.backgroundImageSrc,
          button: this.buttonEnabled,
          buttonText: this.buttonText,
          buttonUrl: this.buttonUrl,
          header: this.header,
          headerTextEditor: this.__headerTextEditor,
          headerTextEditorInitialState: this.__headerTextEditorInitialState,
          nodeKey: this.getKey(),
          size: this.size,
          subheader: this.subheader,
          subheaderTextEditor: this.__subheaderTextEditor,
          subheaderTextEditorInitialState: this.__subheaderTextEditorInitialState,
          type: this.style
        }
      ) });
    if (this.version === 2)
      return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), width: this.getCardWidth(), children: /* @__PURE__ */ y.jsx(
        tje,
        {
          accentColor: this.accentColor,
          alignment: this.alignment,
          backgroundColor: this.backgroundColor,
          backgroundImageHeight: this.backgroundImageHeight,
          backgroundImageSrc: this.backgroundImageSrc,
          backgroundImageWidth: this.backgroundImageWidth,
          backgroundSize: this.backgroundSize,
          buttonColor: this.buttonColor,
          buttonEnabled: this.buttonEnabled,
          buttonText: this.buttonText,
          buttonTextColor: this.buttonTextColor,
          buttonUrl: this.buttonUrl,
          header: this.header,
          headerTextEditor: this.__headerTextEditor,
          headerTextEditorState: this.__headerTextEditorInitialState,
          isSwapped: this.swapped,
          layout: this.layout,
          nodeKey: this.getKey(),
          subheader: this.subheader,
          subheaderTextEditor: this.__subheaderTextEditor,
          subheaderTextEditorInitialState: this.__subheaderTextEditorInitialState,
          subheaderTextEditorState: this.__subheaderTextEditorInitialState,
          textColor: this.textColor
        }
      ) });
  }
  // override the default `isEmpty` check because we need to check the nested editors
  // rather than the data properties themselves
  isEmpty() {
    const n = this.__headerTextEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1)), i = this.__subheaderTextEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1));
    return n && i && (!this.buttonEnabled || !this.buttonText && !this.buttonUrl) && !this.backgroundImageSrc;
  }
}
// We keep Header v1 here for testing and backwards compatibility
// we keep it hidden in the Menu in Ghost but visible in the Demo to ensure it remains tested till we full deprecate it in the future
we(mx, "kgMenu", [
  {
    label: "Header1",
    desc: "Add a header",
    Icon: Xb,
    insertCommand: C6,
    matches: ["v1_header", "v1_heading"],
    priority: 11,
    insertParams: () => ({
      version: 1
    }),
    isHidden: ({ config: n }) => {
      var i;
      return ((i = n == null ? void 0 : n.deprecated) == null ? void 0 : i.headerV1) ?? !0;
    },
    shortcut: "/header"
  },
  {
    label: "Header",
    desc: "Add a header",
    Icon: Xb,
    insertCommand: C6,
    matches: ["header", "heading"],
    priority: 11,
    insertParams: () => ({
      version: 2
    }),
    shortcut: "/header"
  }
]);
const sje = (t) => new mx(t), oje = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 25 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M21.073 5.727v11.75m-3.346-1.959 3.137 2.755L24 15.518m-10.454 2.755V5.727h-.966l-4.825 11.65H6.79L1.965 5.726H1v12.546" }));
function IG({ isOpen: t, onClose: e, children: n }) {
  const i = (r) => {
    r.stopPropagation(), r.preventDefault(), r.key === "Escape" && e();
  };
  return t ? /* @__PURE__ */ y.jsx(Ff, { children: /* @__PURE__ */ y.jsxs(
    "div",
    {
      className: "fixed left-0 top-0 z-40 flex size-full items-start justify-center overflow-auto",
      role: "dialog",
      "aria-modal": !0,
      onKeyDown: i,
      children: [
        /* @__PURE__ */ y.jsx("div", { className: "fixed inset-0 z-40 h-[100vh] bg-black opacity-60", onClick: e }),
        /* @__PURE__ */ y.jsxs("div", { className: "relative z-50 my-8 w-full max-w-[550px] rounded-lg bg-white drop-shadow-2xl dark:bg-black", children: [
          /* @__PURE__ */ y.jsx("button", { "aria-label": "Close dialog", className: "absolute right-6 top-6 cursor-pointer", type: "button", autoFocus: !0, children: /* @__PURE__ */ y.jsx(vp, { className: "size-4 stroke-2 text-grey-400", onClick: e }) }),
          n
        ] })
      ]
    }
  ) }) : null;
}
IG.propTypes = {
  isOpen: A.bool,
  onClose: A.func,
  children: A.node
};
function aS({ value: t }) {
  return /* @__PURE__ */ y.jsx("th", { className: "p-2 font-semibold", children: t });
}
function aje(t) {
  switch (t) {
    case "Super":
      return /* @__PURE__ */ y.jsxs("span", { children: [
        t,
        /* @__PURE__ */ y.jsx("sup", { children: "text" })
      ] });
    case "Sub":
      return /* @__PURE__ */ y.jsxs("span", { children: [
        t,
        /* @__PURE__ */ y.jsx("sub", { children: "text" })
      ] });
    default:
      return t;
  }
}
function wt({ value: t }) {
  return /* @__PURE__ */ y.jsx("td", { className: `p-2 font-normal ${t === "Bold" ? "!font-bold" : t === "Emphasize" ? "italic" : t === "Strike-through" ? "line-through" : t === "Link" ? "cursor-pointer text-green" : ""}`, children: /* @__PURE__ */ y.jsx("span", { className: ` ${t === "Inline code" ? "rounded-sm border border-grey-300 bg-grey-100 p-[.2rem] font-mono text-2xs dark:border-grey-900 dark:bg-grey-900" : t === "Highlight" ? "bg-[#ff0] dark:text-black" : ""}`, children: aje(t) }) });
}
function lje(t) {
  return /* @__PURE__ */ y.jsx(IG, { ...t, children: /* @__PURE__ */ y.jsxs("div", { className: "p-8 text-left font-sans", "data-testid": "markdown-help-dialog", children: [
    /* @__PURE__ */ y.jsx("header", { children: /* @__PURE__ */ y.jsx("h1", { className: "mr-6 text-2xl font-semibold leading-snug", children: "Markdown Help" }) }),
    /* @__PURE__ */ y.jsxs("section", { className: "text-sm leading-snug", children: [
      /* @__PURE__ */ y.jsxs("table", { className: "my-5 w-full", children: [
        /* @__PURE__ */ y.jsx("thead", { children: /* @__PURE__ */ y.jsxs("tr", { children: [
          /* @__PURE__ */ y.jsx(aS, { value: "Markdown" }),
          /* @__PURE__ */ y.jsx(aS, { value: "Result" }),
          /* @__PURE__ */ y.jsx(aS, { value: "Shortcut" })
        ] }) }),
        /* @__PURE__ */ y.jsxs("tbody", { children: [
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "**text**" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Bold" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + B" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "*text*" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Emphasize" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + I" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "~~text~~" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Strike-through" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + Alt + U" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "^text^" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Super" }),
            /* @__PURE__ */ y.jsx(wt, { value: "" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "~text~" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Sub" }),
            /* @__PURE__ */ y.jsx(wt, { value: "" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "[title](http://)" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Link" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + K" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "`code`" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Inline code" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + Alt + C" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "![alt](http://)" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Image" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + Shift + I" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "* item" }),
            /* @__PURE__ */ y.jsx(wt, { value: "List" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + L" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "1. item" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ordered List" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + Alt + L" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "> quote" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Blockquote" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + '" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "==Highlight==" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Highlight" }),
            /* @__PURE__ */ y.jsx(wt, { value: "" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "# Heading" }),
            /* @__PURE__ */ y.jsx(wt, { value: "H1" }),
            /* @__PURE__ */ y.jsx(wt, { value: "" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "## Heading" }),
            /* @__PURE__ */ y.jsx(wt, { value: "H2" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + H" })
          ] }),
          /* @__PURE__ */ y.jsxs("tr", { children: [
            /* @__PURE__ */ y.jsx(wt, { value: "### Heading" }),
            /* @__PURE__ */ y.jsx(wt, { value: "H3" }),
            /* @__PURE__ */ y.jsx(wt, { value: "Ctrl/⌘ + H (x2)" })
          ] })
        ] })
      ] }),
      /* @__PURE__ */ y.jsxs("span", { className: "text-sm font-normal", children: [
        "For further Markdown syntax reference: ",
        /* @__PURE__ */ y.jsx("a", { className: "font-medium text-green", href: "https://ghost.org/help/using-the-editor/#using-markdown", rel: "noopener noreferrer", target: "_blank", children: "Markdown Documentation" })
      ] })
    ] })
  ] }) });
}
function LG(t) {
  throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var RG = { exports: {} };
(function(t, e) {
  (function(n, i) {
    typeof LG == "function" ? t.exports = i() : n.pluralize = i();
  })(on, function() {
    var n = [], i = [], r = {}, s = {}, o = {};
    function a(w) {
      return typeof w == "string" ? new RegExp("^" + w + "$", "i") : w;
    }
    function l(w, x) {
      return w === x ? x : w === w.toLowerCase() ? x.toLowerCase() : w === w.toUpperCase() ? x.toUpperCase() : w[0] === w[0].toUpperCase() ? x.charAt(0).toUpperCase() + x.substr(1).toLowerCase() : x.toLowerCase();
    }
    function u(w, x) {
      return w.replace(/\$(\d{1,2})/g, function(_, S) {
        return x[S] || "";
      });
    }
    function f(w, x) {
      return w.replace(x[0], function(_, S) {
        var C = u(x[1], arguments);
        return l(_ === "" ? w[S - 1] : _, C);
      });
    }
    function d(w, x, _) {
      if (!w.length || r.hasOwnProperty(w))
        return x;
      for (var S = _.length; S--; ) {
        var C = _[S];
        if (C[0].test(x)) return f(x, C);
      }
      return x;
    }
    function h(w, x, _) {
      return function(S) {
        var C = S.toLowerCase();
        return x.hasOwnProperty(C) ? l(S, C) : w.hasOwnProperty(C) ? l(S, w[C]) : d(C, S, _);
      };
    }
    function m(w, x, _, S) {
      return function(C) {
        var E = C.toLowerCase();
        return x.hasOwnProperty(E) ? !0 : w.hasOwnProperty(E) ? !1 : d(E, E, _) === E;
      };
    }
    function g(w, x, _) {
      var S = x === 1 ? g.singular(w) : g.plural(w);
      return (_ ? x + " " : "") + S;
    }
    return g.plural = h(
      o,
      s,
      n
    ), g.isPlural = m(
      o,
      s,
      n
    ), g.singular = h(
      s,
      o,
      i
    ), g.isSingular = m(
      s,
      o,
      i
    ), g.addPluralRule = function(w, x) {
      n.push([a(w), x]);
    }, g.addSingularRule = function(w, x) {
      i.push([a(w), x]);
    }, g.addUncountableRule = function(w) {
      if (typeof w == "string") {
        r[w.toLowerCase()] = !0;
        return;
      }
      g.addPluralRule(w, "$0"), g.addSingularRule(w, "$0");
    }, g.addIrregularRule = function(w, x) {
      x = x.toLowerCase(), w = w.toLowerCase(), o[w] = x, s[x] = w;
    }, [
      // Pronouns.
      ["I", "we"],
      ["me", "us"],
      ["he", "they"],
      ["she", "they"],
      ["them", "them"],
      ["myself", "ourselves"],
      ["yourself", "yourselves"],
      ["itself", "themselves"],
      ["herself", "themselves"],
      ["himself", "themselves"],
      ["themself", "themselves"],
      ["is", "are"],
      ["was", "were"],
      ["has", "have"],
      ["this", "these"],
      ["that", "those"],
      // Words ending in with a consonant and `o`.
      ["echo", "echoes"],
      ["dingo", "dingoes"],
      ["volcano", "volcanoes"],
      ["tornado", "tornadoes"],
      ["torpedo", "torpedoes"],
      // Ends with `us`.
      ["genus", "genera"],
      ["viscus", "viscera"],
      // Ends with `ma`.
      ["stigma", "stigmata"],
      ["stoma", "stomata"],
      ["dogma", "dogmata"],
      ["lemma", "lemmata"],
      ["schema", "schemata"],
      ["anathema", "anathemata"],
      // Other irregular rules.
      ["ox", "oxen"],
      ["axe", "axes"],
      ["die", "dice"],
      ["yes", "yeses"],
      ["foot", "feet"],
      ["eave", "eaves"],
      ["goose", "geese"],
      ["tooth", "teeth"],
      ["quiz", "quizzes"],
      ["human", "humans"],
      ["proof", "proofs"],
      ["carve", "carves"],
      ["valve", "valves"],
      ["looey", "looies"],
      ["thief", "thieves"],
      ["groove", "grooves"],
      ["pickaxe", "pickaxes"],
      ["passerby", "passersby"]
    ].forEach(function(w) {
      return g.addIrregularRule(w[0], w[1]);
    }), [
      [/s?$/i, "s"],
      [/[^\u0000-\u007F]$/i, "$0"],
      [/([^aeiou]ese)$/i, "$1"],
      [/(ax|test)is$/i, "$1es"],
      [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
      [/(e[mn]u)s?$/i, "$1s"],
      [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
      [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
      [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
      [/(seraph|cherub)(?:im)?$/i, "$1im"],
      [/(her|at|gr)o$/i, "$1oes"],
      [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
      [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
      [/sis$/i, "ses"],
      [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
      [/([^aeiouy]|qu)y$/i, "$1ies"],
      [/([^ch][ieo][ln])ey$/i, "$1ies"],
      [/(x|ch|ss|sh|zz)$/i, "$1es"],
      [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
      [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
      [/(pe)(?:rson|ople)$/i, "$1ople"],
      [/(child)(?:ren)?$/i, "$1ren"],
      [/eaux$/i, "$0"],
      [/m[ae]n$/i, "men"],
      ["thou", "you"]
    ].forEach(function(w) {
      return g.addPluralRule(w[0], w[1]);
    }), [
      [/s$/i, ""],
      [/(ss)$/i, "$1"],
      [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
      [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
      [/ies$/i, "y"],
      [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
      [/\b(mon|smil)ies$/i, "$1ey"],
      [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
      [/(seraph|cherub)im$/i, "$1"],
      [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
      [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
      [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
      [/(test)(?:is|es)$/i, "$1is"],
      [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
      [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
      [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
      [/(alumn|alg|vertebr)ae$/i, "$1a"],
      [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
      [/(matr|append)ices$/i, "$1ix"],
      [/(pe)(rson|ople)$/i, "$1rson"],
      [/(child)ren$/i, "$1"],
      [/(eau)x?$/i, "$1"],
      [/men$/i, "man"]
    ].forEach(function(w) {
      return g.addSingularRule(w[0], w[1]);
    }), [
      // Singular words with no plurals.
      "adulthood",
      "advice",
      "agenda",
      "aid",
      "aircraft",
      "alcohol",
      "ammo",
      "analytics",
      "anime",
      "athletics",
      "audio",
      "bison",
      "blood",
      "bream",
      "buffalo",
      "butter",
      "carp",
      "cash",
      "chassis",
      "chess",
      "clothing",
      "cod",
      "commerce",
      "cooperation",
      "corps",
      "debris",
      "diabetes",
      "digestion",
      "elk",
      "energy",
      "equipment",
      "excretion",
      "expertise",
      "firmware",
      "flounder",
      "fun",
      "gallows",
      "garbage",
      "graffiti",
      "hardware",
      "headquarters",
      "health",
      "herpes",
      "highjinks",
      "homework",
      "housework",
      "information",
      "jeans",
      "justice",
      "kudos",
      "labour",
      "literature",
      "machinery",
      "mackerel",
      "mail",
      "media",
      "mews",
      "moose",
      "music",
      "mud",
      "manga",
      "news",
      "only",
      "personnel",
      "pike",
      "plankton",
      "pliers",
      "police",
      "pollution",
      "premises",
      "rain",
      "research",
      "rice",
      "salmon",
      "scissors",
      "series",
      "sewage",
      "shambles",
      "shrimp",
      "software",
      "species",
      "staff",
      "swine",
      "tennis",
      "traffic",
      "transportation",
      "trout",
      "tuna",
      "wealth",
      "welfare",
      "whiting",
      "wildebeest",
      "wildlife",
      "you",
      /pok[eé]mon$/i,
      // Regexes.
      /[^aeiou]ese$/i,
      // "chinese", "japanese"
      /deer$/i,
      // "deer", "reindeer"
      /fish$/i,
      // "fish", "blowfish", "angelfish"
      /measles$/i,
      /o[iu]s$/i,
      // "carnivorous"
      /pox$/i,
      // "chickpox", "smallpox"
      /sheep$/i
    ].forEach(g.addUncountableRule), g;
  });
})(RG);
var uje = RG.exports;
const cje = /* @__PURE__ */ Gs(uje);
function fje({ onChange: t, inputRef: e, progress: n, loading: i, filesNumber: r, errors: s = [] }) {
  const o = {
    width: `${n}%`
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    i && !!n && /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 z-10 flex min-w-full flex-col items-center justify-center overflow-hidden bg-white/70", children: /* @__PURE__ */ y.jsxs("div", { className: "mb-4 w-full text-center", children: [
      /* @__PURE__ */ y.jsxs("h3", { className: "mb-3 font-sans text-xl font-bold", children: [
        "Uploading ",
        r,
        " ",
        cje("image", r),
        "..."
      ] }),
      /* @__PURE__ */ y.jsx(Xo, { style: o })
    ] }) }),
    !!s.length && s.map((a) => /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 z-10 flex min-w-full flex-col items-center justify-center overflow-hidden bg-white/70", children: /* @__PURE__ */ y.jsxs("div", { className: "mb-4 w-3/5 text-center", children: [
      /* @__PURE__ */ y.jsxs("h3", { className: "mb-3 font-sans text-xl font-bold", children: [
        a.fileName,
        /* @__PURE__ */ y.jsx("span", { className: "text-red", children: " failed to upload." })
      ] }),
      /* @__PURE__ */ y.jsx("p", { className: "font-sans text-sm font-normal", children: a.message })
    ] }) }, `${a.fileName}-${a.message}`)),
    /* @__PURE__ */ y.jsx("form", { onChange: t, children: /* @__PURE__ */ y.jsx(
      "input",
      {
        ref: e,
        accept: "image/*",
        name: "image",
        type: "file",
        hidden: !0,
        multiple: !0
      }
    ) })
  ] });
}
var jG = { exports: {} };
(function(t, e) {
  (function(n, i) {
    t.exports = i();
  })(on, function() {
    var n = navigator.userAgent, i = navigator.platform, r = /gecko\/\d/i.test(n), s = /MSIE \d/.test(n), o = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n), a = /Edge\/(\d+)/.exec(n), l = s || o || a, u = l && (s ? document.documentMode || 6 : +(a || o)[1]), f = !a && /WebKit\//.test(n), d = f && /Qt\/\d+\.\d+/.test(n), h = !a && /Chrome\/(\d+)/.exec(n), m = h && +h[1], g = /Opera\//.test(n), w = /Apple Computer/.test(navigator.vendor), x = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n), _ = /PhantomJS/.test(n), S = w && (/Mobile\/\w+/.test(n) || navigator.maxTouchPoints > 2), C = /Android/.test(n), E = S || C || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n), M = S || /Mac/.test(i), $ = /\bCrOS\b/.test(n), P = /win/i.test(i), W = g && n.match(/Version\/(\d*\.\d*)/);
    W && (W = Number(W[1])), W && W >= 15 && (g = !1, f = !0);
    var z = M && (d || g && (W == null || W < 12.11)), Z = r || l && u >= 9;
    function L(c) {
      return new RegExp("(^|\\s)" + c + "(?:$|\\s)\\s*");
    }
    var Q = function(c, p) {
      var b = c.className, v = L(p).exec(b);
      if (v) {
        var k = b.slice(v.index + v[0].length);
        c.className = b.slice(0, v.index) + (k ? v[1] + k : "");
      }
    };
    function V(c) {
      for (var p = c.childNodes.length; p > 0; --p)
        c.removeChild(c.firstChild);
      return c;
    }
    function H(c, p) {
      return V(c).appendChild(p);
    }
    function R(c, p, b, v) {
      var k = document.createElement(c);
      if (b && (k.className = b), v && (k.style.cssText = v), typeof p == "string")
        k.appendChild(document.createTextNode(p));
      else if (p)
        for (var O = 0; O < p.length; ++O)
          k.appendChild(p[O]);
      return k;
    }
    function q(c, p, b, v) {
      var k = R(c, p, b, v);
      return k.setAttribute("role", "presentation"), k;
    }
    var Y;
    document.createRange ? Y = function(c, p, b, v) {
      var k = document.createRange();
      return k.setEnd(v || c, b), k.setStart(c, p), k;
    } : Y = function(c, p, b) {
      var v = document.body.createTextRange();
      try {
        v.moveToElementText(c.parentNode);
      } catch {
        return v;
      }
      return v.collapse(!0), v.moveEnd("character", b), v.moveStart("character", p), v;
    };
    function K(c, p) {
      if (p.nodeType == 3 && (p = p.parentNode), c.contains)
        return c.contains(p);
      do
        if (p.nodeType == 11 && (p = p.host), p == c)
          return !0;
      while (p = p.parentNode);
    }
    function te(c) {
      var p = c.ownerDocument || c, b;
      try {
        b = c.activeElement;
      } catch {
        b = p.body || null;
      }
      for (; b && b.shadowRoot && b.shadowRoot.activeElement; )
        b = b.shadowRoot.activeElement;
      return b;
    }
    function se(c, p) {
      var b = c.className;
      L(p).test(b) || (c.className += (b ? " " : "") + p);
    }
    function ce(c, p) {
      for (var b = c.split(" "), v = 0; v < b.length; v++)
        b[v] && !L(b[v]).test(p) && (p += " " + b[v]);
      return p;
    }
    var U = function(c) {
      c.select();
    };
    S ? U = function(c) {
      c.selectionStart = 0, c.selectionEnd = c.value.length;
    } : l && (U = function(c) {
      try {
        c.select();
      } catch {
      }
    });
    function F(c) {
      return c.display.wrapper.ownerDocument;
    }
    function oe(c) {
      return le(c.display.wrapper);
    }
    function le(c) {
      return c.getRootNode ? c.getRootNode() : c.ownerDocument;
    }
    function pe(c) {
      return F(c).defaultView;
    }
    function Re(c) {
      var p = Array.prototype.slice.call(arguments, 1);
      return function() {
        return c.apply(null, p);
      };
    }
    function ze(c, p, b) {
      p || (p = {});
      for (var v in c)
        c.hasOwnProperty(v) && (b !== !1 || !p.hasOwnProperty(v)) && (p[v] = c[v]);
      return p;
    }
    function rt(c, p, b, v, k) {
      p == null && (p = c.search(/[^\s\u00a0]/), p == -1 && (p = c.length));
      for (var O = v || 0, T = k || 0; ; ) {
        var D = c.indexOf("	", O);
        if (D < 0 || D >= p)
          return T + (p - O);
        T += D - O, T += b - T % b, O = D + 1;
      }
    }
    var pt = function() {
      this.id = null, this.f = null, this.time = 0, this.handler = Re(this.onTimeout, this);
    };
    pt.prototype.onTimeout = function(c) {
      c.id = 0, c.time <= +/* @__PURE__ */ new Date() ? c.f() : setTimeout(c.handler, c.time - +/* @__PURE__ */ new Date());
    }, pt.prototype.set = function(c, p) {
      this.f = p;
      var b = +/* @__PURE__ */ new Date() + c;
      (!this.id || b < this.time) && (clearTimeout(this.id), this.id = setTimeout(this.handler, c), this.time = b);
    };
    function ge(c, p) {
      for (var b = 0; b < c.length; ++b)
        if (c[b] == p)
          return b;
      return -1;
    }
    var De = 50, st = { toString: function() {
      return "CodeMirror.Pass";
    } }, It = { scroll: !1 }, At = { origin: "*mouse" }, Ut = { origin: "+move" };
    function He(c, p, b) {
      for (var v = 0, k = 0; ; ) {
        var O = c.indexOf("	", v);
        O == -1 && (O = c.length);
        var T = O - v;
        if (O == c.length || k + T >= p)
          return v + Math.min(T, p - k);
        if (k += O - v, k += b - k % b, v = O + 1, k >= p)
          return v;
      }
    }
    var Ct = [""];
    function Lt(c) {
      for (; Ct.length <= c; )
        Ct.push(Be(Ct) + " ");
      return Ct[c];
    }
    function Be(c) {
      return c[c.length - 1];
    }
    function Ie(c, p) {
      for (var b = [], v = 0; v < c.length; v++)
        b[v] = p(c[v], v);
      return b;
    }
    function ae(c, p, b) {
      for (var v = 0, k = b(p); v < c.length && b(c[v]) <= k; )
        v++;
      c.splice(v, 0, p);
    }
    function Ue() {
    }
    function qt(c, p) {
      var b;
      return Object.create ? b = Object.create(c) : (Ue.prototype = c, b = new Ue()), p && ze(p, b), b;
    }
    var Xn = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
    function Dt(c) {
      return /\w/.test(c) || c > "" && (c.toUpperCase() != c.toLowerCase() || Xn.test(c));
    }
    function vn(c, p) {
      return p ? p.source.indexOf("\\w") > -1 && Dt(c) ? !0 : p.test(c) : Dt(c);
    }
    function Os(c) {
      for (var p in c)
        if (c.hasOwnProperty(p) && c[p])
          return !1;
      return !0;
    }
    var Za = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
    function qa(c) {
      return c.charCodeAt(0) >= 768 && Za.test(c);
    }
    function Xf(c, p, b) {
      for (; (b < 0 ? p > 0 : p < c.length) && qa(c.charAt(p)); )
        p += b;
      return p;
    }
    function Ql(c, p, b) {
      for (var v = p > b ? -1 : 1; ; ) {
        if (p == b)
          return p;
        var k = (p + b) / 2, O = v < 0 ? Math.ceil(k) : Math.floor(k);
        if (O == p)
          return c(O) ? p : b;
        c(O) ? b = O : p = O + v;
      }
    }
    function Gf(c, p, b, v) {
      if (!c)
        return v(p, b, "ltr", 0);
      for (var k = !1, O = 0; O < c.length; ++O) {
        var T = c[O];
        (T.from < b && T.to > p || p == b && T.to == p) && (v(Math.max(T.from, p), Math.min(T.to, b), T.level == 1 ? "rtl" : "ltr", O), k = !0);
      }
      k || v(p, b, "ltr");
    }
    var Jo = null;
    function Rr(c, p, b) {
      var v;
      Jo = null;
      for (var k = 0; k < c.length; ++k) {
        var O = c[k];
        if (O.from < p && O.to > p)
          return k;
        O.to == p && (O.from != O.to && b == "before" ? v = k : Jo = k), O.from == p && (O.from != O.to && b != "before" ? v = k : Jo = k);
      }
      return v ?? Jo;
    }
    var Ul = /* @__PURE__ */ function() {
      var c = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", p = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
      function b(B) {
        return B <= 247 ? c.charAt(B) : 1424 <= B && B <= 1524 ? "R" : 1536 <= B && B <= 1785 ? p.charAt(B - 1536) : 1774 <= B && B <= 2220 ? "r" : 8192 <= B && B <= 8203 ? "w" : B == 8204 ? "b" : "L";
      }
      var v = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, k = /[stwN]/, O = /[LRr]/, T = /[Lb1n]/, D = /[1n]/;
      function I(B, G, ee) {
        this.level = B, this.from = G, this.to = ee;
      }
      return function(B, G) {
        var ee = G == "ltr" ? "L" : "R";
        if (B.length == 0 || G == "ltr" && !v.test(B))
          return !1;
        for (var re = B.length, ie = [], fe = 0; fe < re; ++fe)
          ie.push(b(B.charCodeAt(fe)));
        for (var de = 0, ke = ee; de < re; ++de) {
          var Se = ie[de];
          Se == "m" ? ie[de] = ke : ke = Se;
        }
        for (var Ee = 0, Ce = ee; Ee < re; ++Ee) {
          var Ne = ie[Ee];
          Ne == "1" && Ce == "r" ? ie[Ee] = "n" : O.test(Ne) && (Ce = Ne, Ne == "r" && (ie[Ee] = "R"));
        }
        for (var Je = 1, Ye = ie[0]; Je < re - 1; ++Je) {
          var Et = ie[Je];
          Et == "+" && Ye == "1" && ie[Je + 1] == "1" ? ie[Je] = "1" : Et == "," && Ye == ie[Je + 1] && (Ye == "1" || Ye == "n") && (ie[Je] = Ye), Ye = Et;
        }
        for (var tn = 0; tn < re; ++tn) {
          var Ti = ie[tn];
          if (Ti == ",")
            ie[tn] = "N";
          else if (Ti == "%") {
            var Dn = void 0;
            for (Dn = tn + 1; Dn < re && ie[Dn] == "%"; ++Dn)
              ;
            for (var ds = tn && ie[tn - 1] == "!" || Dn < re && ie[Dn] == "1" ? "1" : "N", Br = tn; Br < Dn; ++Br)
              ie[Br] = ds;
            tn = Dn - 1;
          }
        }
        for (var ci = 0, zr = ee; ci < re; ++ci) {
          var Bi = ie[ci];
          zr == "L" && Bi == "1" ? ie[ci] = "L" : O.test(Bi) && (zr = Bi);
        }
        for (var bi = 0; bi < re; ++bi)
          if (k.test(ie[bi])) {
            var fi = void 0;
            for (fi = bi + 1; fi < re && k.test(ie[fi]); ++fi)
              ;
            for (var Bn = (bi ? ie[bi - 1] : ee) == "L", Wr = (fi < re ? ie[fi] : ee) == "L", kd = Bn == Wr ? Bn ? "L" : "R" : ee, tu = bi; tu < fi; ++tu)
              ie[tu] = kd;
            bi = fi - 1;
          }
        for (var tr = [], ia, $i = 0; $i < re; )
          if (T.test(ie[$i])) {
            var e3 = $i;
            for (++$i; $i < re && T.test(ie[$i]); ++$i)
              ;
            tr.push(new I(0, e3, $i));
          } else {
            var nl = $i, $c = tr.length, Mc = G == "rtl" ? 1 : 0;
            for (++$i; $i < re && ie[$i] != "L"; ++$i)
              ;
            for (var yr = nl; yr < $i; )
              if (D.test(ie[yr])) {
                nl < yr && (tr.splice($c, 0, new I(1, nl, yr)), $c += Mc);
                var xd = yr;
                for (++yr; yr < $i && D.test(ie[yr]); ++yr)
                  ;
                tr.splice($c, 0, new I(2, xd, yr)), $c += Mc, nl = yr;
              } else
                ++yr;
            nl < $i && tr.splice($c, 0, new I(1, nl, $i));
          }
        return G == "ltr" && (tr[0].level == 1 && (ia = B.match(/^\s+/)) && (tr[0].from = ia[0].length, tr.unshift(new I(0, 0, ia[0].length))), Be(tr).level == 1 && (ia = B.match(/\s+$/)) && (Be(tr).to -= ia[0].length, tr.push(new I(0, re - ia[0].length, re)))), G == "rtl" ? tr.reverse() : tr;
      };
    }();
    function Ss(c, p) {
      var b = c.order;
      return b == null && (b = c.order = Ul(c.text, p)), b;
    }
    var Kf = [], tt = function(c, p, b) {
      if (c.addEventListener)
        c.addEventListener(p, b, !1);
      else if (c.attachEvent)
        c.attachEvent("on" + p, b);
      else {
        var v = c._handlers || (c._handlers = {});
        v[p] = (v[p] || Kf).concat(b);
      }
    };
    function Zl(c, p) {
      return c._handlers && c._handlers[p] || Kf;
    }
    function Fi(c, p, b) {
      if (c.removeEventListener)
        c.removeEventListener(p, b, !1);
      else if (c.detachEvent)
        c.detachEvent("on" + p, b);
      else {
        var v = c._handlers, k = v && v[p];
        if (k) {
          var O = ge(k, b);
          O > -1 && (v[p] = k.slice(0, O).concat(k.slice(O + 1)));
        }
      }
    }
    function Fn(c, p) {
      var b = Zl(c, p);
      if (b.length)
        for (var v = Array.prototype.slice.call(arguments, 2), k = 0; k < b.length; ++k)
          b[k].apply(null, v);
    }
    function bn(c, p, b) {
      return typeof p == "string" && (p = { type: p, preventDefault: function() {
        this.defaultPrevented = !0;
      } }), Fn(c, b || p.type, c, p), Jf(p) || p.codemirrorIgnore;
    }
    function iv(c) {
      var p = c._handlers && c._handlers.cursorActivity;
      if (p)
        for (var b = c.curOp.cursorActivityHandlers || (c.curOp.cursorActivityHandlers = []), v = 0; v < p.length; ++v)
          ge(b, p[v]) == -1 && b.push(p[v]);
    }
    function us(c, p) {
      return Zl(c, p).length > 0;
    }
    function yn(c) {
      c.prototype.on = function(p, b) {
        tt(this, p, b);
      }, c.prototype.off = function(p, b) {
        Fi(this, p, b);
      };
    }
    function Gn(c) {
      c.preventDefault ? c.preventDefault() : c.returnValue = !1;
    }
    function rv(c) {
      c.stopPropagation ? c.stopPropagation() : c.cancelBubble = !0;
    }
    function Jf(c) {
      return c.defaultPrevented != null ? c.defaultPrevented : c.returnValue == !1;
    }
    function Ya(c) {
      Gn(c), rv(c);
    }
    function ed(c) {
      return c.target || c.srcElement;
    }
    function Mp(c) {
      var p = c.which;
      return p == null && (c.button & 1 ? p = 1 : c.button & 2 ? p = 3 : c.button & 4 && (p = 2)), M && c.ctrlKey && p == 1 && (p = 3), p;
    }
    var r_ = function() {
      if (l && u < 9)
        return !1;
      var c = R("div");
      return "draggable" in c || "dragDrop" in c;
    }(), cs;
    function Va(c) {
      if (cs == null) {
        var p = R("span", "​");
        H(c, R("span", [p, document.createTextNode("x")])), c.firstChild.offsetHeight != 0 && (cs = p.offsetWidth <= 1 && p.offsetHeight > 2 && !(l && u < 8));
      }
      var b = cs ? R("span", "​") : R("span", " ", null, "display: inline-block; width: 1px; margin-right: -1px");
      return b.setAttribute("cm-text", ""), b;
    }
    var td;
    function sv(c) {
      if (td != null)
        return td;
      var p = H(c, document.createTextNode("AخA")), b = Y(p, 0, 1).getBoundingClientRect(), v = Y(p, 1, 2).getBoundingClientRect();
      return V(c), !b || b.left == b.right ? !1 : td = v.right - b.right < 3;
    }
    var yc = `

b`.split(/\n/).length != 3 ? function(c) {
      for (var p = 0, b = [], v = c.length; p <= v; ) {
        var k = c.indexOf(`
`, p);
        k == -1 && (k = c.length);
        var O = c.slice(p, c.charAt(k - 1) == "\r" ? k - 1 : k), T = O.indexOf("\r");
        T != -1 ? (b.push(O.slice(0, T)), p += T + 1) : (b.push(O), p = k + 1);
      }
      return b;
    } : function(c) {
      return c.split(/\r\n?|\n/);
    }, ov = window.getSelection ? function(c) {
      try {
        return c.selectionStart != c.selectionEnd;
      } catch {
        return !1;
      }
    } : function(c) {
      var p;
      try {
        p = c.ownerDocument.selection.createRange();
      } catch {
      }
      return !p || p.parentElement() != c ? !1 : p.compareEndPoints("StartToEnd", p) != 0;
    }, Oo = function() {
      var c = R("div");
      return "oncopy" in c ? !0 : (c.setAttribute("oncopy", "return;"), typeof c.oncopy == "function");
    }(), nd = null;
    function av(c) {
      if (nd != null)
        return nd;
      var p = H(c, R("span", "x")), b = p.getBoundingClientRect(), v = Y(p, 0, 1).getBoundingClientRect();
      return nd = Math.abs(b.left - v.left) > 1;
    }
    var id = {}, Xa = {};
    function s_(c, p) {
      arguments.length > 2 && (p.dependencies = Array.prototype.slice.call(arguments, 2)), id[c] = p;
    }
    function Ke(c, p) {
      Xa[c] = p;
    }
    function ne(c) {
      if (typeof c == "string" && Xa.hasOwnProperty(c))
        c = Xa[c];
      else if (c && typeof c.name == "string" && Xa.hasOwnProperty(c.name)) {
        var p = Xa[c.name];
        typeof p == "string" && (p = { name: p }), c = qt(p, c), c.name = p.name;
      } else {
        if (typeof c == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(c))
          return ne("application/xml");
        if (typeof c == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(c))
          return ne("application/json");
      }
      return typeof c == "string" ? { name: c } : c || { name: "null" };
    }
    function _e(c, p) {
      p = ne(p);
      var b = id[p.name];
      if (!b)
        return _e(c, "text/plain");
      var v = b(c, p);
      if (je.hasOwnProperty(p.name)) {
        var k = je[p.name];
        for (var O in k)
          k.hasOwnProperty(O) && (v.hasOwnProperty(O) && (v["_" + O] = v[O]), v[O] = k[O]);
      }
      if (v.name = p.name, p.helperType && (v.helperType = p.helperType), p.modeProps)
        for (var T in p.modeProps)
          v[T] = p.modeProps[T];
      return v;
    }
    var je = {};
    function an(c, p) {
      var b = je.hasOwnProperty(c) ? je[c] : je[c] = {};
      ze(p, b);
    }
    function Nn(c, p) {
      if (p === !0)
        return p;
      if (c.copyState)
        return c.copyState(p);
      var b = {};
      for (var v in p) {
        var k = p[v];
        k instanceof Array && (k = k.concat([])), b[v] = k;
      }
      return b;
    }
    function An(c, p) {
      for (var b; c.innerMode && (b = c.innerMode(p), !(!b || b.mode == c)); )
        p = b.state, c = b.mode;
      return b || { mode: c, state: p };
    }
    function Ji(c, p, b) {
      return c.startState ? c.startState(p, b) : !0;
    }
    var Yt = function(c, p, b) {
      this.pos = this.start = 0, this.string = c, this.tabSize = p || 8, this.lastColumnPos = this.lastColumnValue = 0, this.lineStart = 0, this.lineOracle = b;
    };
    Yt.prototype.eol = function() {
      return this.pos >= this.string.length;
    }, Yt.prototype.sol = function() {
      return this.pos == this.lineStart;
    }, Yt.prototype.peek = function() {
      return this.string.charAt(this.pos) || void 0;
    }, Yt.prototype.next = function() {
      if (this.pos < this.string.length)
        return this.string.charAt(this.pos++);
    }, Yt.prototype.eat = function(c) {
      var p = this.string.charAt(this.pos), b;
      if (typeof c == "string" ? b = p == c : b = p && (c.test ? c.test(p) : c(p)), b)
        return ++this.pos, p;
    }, Yt.prototype.eatWhile = function(c) {
      for (var p = this.pos; this.eat(c); )
        ;
      return this.pos > p;
    }, Yt.prototype.eatSpace = function() {
      for (var c = this.pos; /[\s\u00a0]/.test(this.string.charAt(this.pos)); )
        ++this.pos;
      return this.pos > c;
    }, Yt.prototype.skipToEnd = function() {
      this.pos = this.string.length;
    }, Yt.prototype.skipTo = function(c) {
      var p = this.string.indexOf(c, this.pos);
      if (p > -1)
        return this.pos = p, !0;
    }, Yt.prototype.backUp = function(c) {
      this.pos -= c;
    }, Yt.prototype.column = function() {
      return this.lastColumnPos < this.start && (this.lastColumnValue = rt(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue - (this.lineStart ? rt(this.string, this.lineStart, this.tabSize) : 0);
    }, Yt.prototype.indentation = function() {
      return rt(this.string, null, this.tabSize) - (this.lineStart ? rt(this.string, this.lineStart, this.tabSize) : 0);
    }, Yt.prototype.match = function(c, p, b) {
      if (typeof c == "string") {
        var v = function(T) {
          return b ? T.toLowerCase() : T;
        }, k = this.string.substr(this.pos, c.length);
        if (v(k) == v(c))
          return p !== !1 && (this.pos += c.length), !0;
      } else {
        var O = this.string.slice(this.pos).match(c);
        return O && O.index > 0 ? null : (O && p !== !1 && (this.pos += O[0].length), O);
      }
    }, Yt.prototype.current = function() {
      return this.string.slice(this.start, this.pos);
    }, Yt.prototype.hideFirstChars = function(c, p) {
      this.lineStart += c;
      try {
        return p();
      } finally {
        this.lineStart -= c;
      }
    }, Yt.prototype.lookAhead = function(c) {
      var p = this.lineOracle;
      return p && p.lookAhead(c);
    }, Yt.prototype.baseToken = function() {
      var c = this.lineOracle;
      return c && c.baseToken(this.pos);
    };
    function Fe(c, p) {
      if (p -= c.first, p < 0 || p >= c.size)
        throw new Error("There is no line " + (p + c.first) + " in the document.");
      for (var b = c; !b.lines; )
        for (var v = 0; ; ++v) {
          var k = b.children[v], O = k.chunkSize();
          if (p < O) {
            b = k;
            break;
          }
          p -= O;
        }
      return b.lines[p];
    }
    function So(c, p, b) {
      var v = [], k = p.line;
      return c.iter(p.line, b.line + 1, function(O) {
        var T = O.text;
        k == b.line && (T = T.slice(0, b.ch)), k == p.line && (T = T.slice(p.ch)), v.push(T), ++k;
      }), v;
    }
    function ui(c, p, b) {
      var v = [];
      return c.iter(p, b, function(k) {
        v.push(k.text);
      }), v;
    }
    function Cs(c, p) {
      var b = p - c.height;
      if (b)
        for (var v = c; v; v = v.parent)
          v.height += b;
    }
    function Wt(c) {
      if (c.parent == null)
        return null;
      for (var p = c.parent, b = ge(p.lines, c), v = p.parent; v; p = v, v = v.parent)
        for (var k = 0; v.children[k] != p; ++k)
          b += v.children[k].chunkSize();
      return b + p.first;
    }
    function wc(c, p) {
      var b = c.first;
      e: do {
        for (var v = 0; v < c.children.length; ++v) {
          var k = c.children[v], O = k.height;
          if (p < O) {
            c = k;
            continue e;
          }
          p -= O, b += k.chunkSize();
        }
        return b;
      } while (!c.lines);
      for (var T = 0; T < c.lines.length; ++T) {
        var D = c.lines[T], I = D.height;
        if (p < I)
          break;
        p -= I;
      }
      return b + T;
    }
    function Np(c, p) {
      return p >= c.first && p < c.first + c.size;
    }
    function o_(c, p) {
      return String(c.lineNumberFormatter(p + c.firstLineNumber));
    }
    function ye(c, p, b) {
      if (b === void 0 && (b = null), !(this instanceof ye))
        return new ye(c, p, b);
      this.line = c, this.ch = p, this.sticky = b;
    }
    function mt(c, p) {
      return c.line - p.line || c.ch - p.ch;
    }
    function a_(c, p) {
      return c.sticky == p.sticky && mt(c, p) == 0;
    }
    function l_(c) {
      return ye(c.line, c.ch);
    }
    function lv(c, p) {
      return mt(c, p) < 0 ? p : c;
    }
    function uv(c, p) {
      return mt(c, p) < 0 ? c : p;
    }
    function H8(c, p) {
      return Math.max(c.first, Math.min(p, c.first + c.size - 1));
    }
    function gt(c, p) {
      if (p.line < c.first)
        return ye(c.first, 0);
      var b = c.first + c.size - 1;
      return p.line > b ? ye(b, Fe(c, b).text.length) : pee(p, Fe(c, p.line).text.length);
    }
    function pee(c, p) {
      var b = c.ch;
      return b == null || b > p ? ye(c.line, p) : b < 0 ? ye(c.line, 0) : c;
    }
    function Q8(c, p) {
      for (var b = [], v = 0; v < p.length; v++)
        b[v] = gt(c, p[v]);
      return b;
    }
    var cv = function(c, p) {
      this.state = c, this.lookAhead = p;
    }, ea = function(c, p, b, v) {
      this.state = p, this.doc = c, this.line = b, this.maxLookAhead = v || 0, this.baseTokens = null, this.baseTokenPos = 1;
    };
    ea.prototype.lookAhead = function(c) {
      var p = this.doc.getLine(this.line + c);
      return p != null && c > this.maxLookAhead && (this.maxLookAhead = c), p;
    }, ea.prototype.baseToken = function(c) {
      if (!this.baseTokens)
        return null;
      for (; this.baseTokens[this.baseTokenPos] <= c; )
        this.baseTokenPos += 2;
      var p = this.baseTokens[this.baseTokenPos + 1];
      return {
        type: p && p.replace(/( |^)overlay .*/, ""),
        size: this.baseTokens[this.baseTokenPos] - c
      };
    }, ea.prototype.nextLine = function() {
      this.line++, this.maxLookAhead > 0 && this.maxLookAhead--;
    }, ea.fromSaved = function(c, p, b) {
      return p instanceof cv ? new ea(c, Nn(c.mode, p.state), b, p.lookAhead) : new ea(c, Nn(c.mode, p), b);
    }, ea.prototype.save = function(c) {
      var p = c !== !1 ? Nn(this.doc.mode, this.state) : this.state;
      return this.maxLookAhead > 0 ? new cv(p, this.maxLookAhead) : p;
    };
    function U8(c, p, b, v) {
      var k = [c.state.modeGen], O = {};
      G8(
        c,
        p.text,
        c.doc.mode,
        b,
        function(B, G) {
          return k.push(B, G);
        },
        O,
        v
      );
      for (var T = b.state, D = function(B) {
        b.baseTokens = k;
        var G = c.state.overlays[B], ee = 1, re = 0;
        b.state = !0, G8(c, p.text, G.mode, b, function(ie, fe) {
          for (var de = ee; re < ie; ) {
            var ke = k[ee];
            ke > ie && k.splice(ee, 1, ie, k[ee + 1], ke), ee += 2, re = Math.min(ie, ke);
          }
          if (fe)
            if (G.opaque)
              k.splice(de, ee - de, ie, "overlay " + fe), ee = de + 2;
            else
              for (; de < ee; de += 2) {
                var Se = k[de + 1];
                k[de + 1] = (Se ? Se + " " : "") + "overlay " + fe;
              }
        }, O), b.state = T, b.baseTokens = null, b.baseTokenPos = 1;
      }, I = 0; I < c.state.overlays.length; ++I) D(I);
      return { styles: k, classes: O.bgClass || O.textClass ? O : null };
    }
    function Z8(c, p, b) {
      if (!p.styles || p.styles[0] != c.state.modeGen) {
        var v = Ap(c, Wt(p)), k = p.text.length > c.options.maxHighlightLength && Nn(c.doc.mode, v.state), O = U8(c, p, v);
        k && (v.state = k), p.stateAfter = v.save(!k), p.styles = O.styles, O.classes ? p.styleClasses = O.classes : p.styleClasses && (p.styleClasses = null), b === c.doc.highlightFrontier && (c.doc.modeFrontier = Math.max(c.doc.modeFrontier, ++c.doc.highlightFrontier));
      }
      return p.styles;
    }
    function Ap(c, p, b) {
      var v = c.doc, k = c.display;
      if (!v.mode.startState)
        return new ea(v, !0, p);
      var O = mee(c, p, b), T = O > v.first && Fe(v, O - 1).stateAfter, D = T ? ea.fromSaved(v, T, O) : new ea(v, Ji(v.mode), O);
      return v.iter(O, p, function(I) {
        u_(c, I.text, D);
        var B = D.line;
        I.stateAfter = B == p - 1 || B % 5 == 0 || B >= k.viewFrom && B < k.viewTo ? D.save() : null, D.nextLine();
      }), b && (v.modeFrontier = D.line), D;
    }
    function u_(c, p, b, v) {
      var k = c.doc.mode, O = new Yt(p, c.options.tabSize, b);
      for (O.start = O.pos = v || 0, p == "" && q8(k, b.state); !O.eol(); )
        c_(k, O, b.state), O.start = O.pos;
    }
    function q8(c, p) {
      if (c.blankLine)
        return c.blankLine(p);
      if (c.innerMode) {
        var b = An(c, p);
        if (b.mode.blankLine)
          return b.mode.blankLine(b.state);
      }
    }
    function c_(c, p, b, v) {
      for (var k = 0; k < 10; k++) {
        v && (v[0] = An(c, b).mode);
        var O = c.token(p, b);
        if (p.pos > p.start)
          return O;
      }
      throw new Error("Mode " + c.name + " failed to advance stream.");
    }
    var Y8 = function(c, p, b) {
      this.start = c.start, this.end = c.pos, this.string = c.current(), this.type = p || null, this.state = b;
    };
    function V8(c, p, b, v) {
      var k = c.doc, O = k.mode, T;
      p = gt(k, p);
      var D = Fe(k, p.line), I = Ap(c, p.line, b), B = new Yt(D.text, c.options.tabSize, I), G;
      for (v && (G = []); (v || B.pos < p.ch) && !B.eol(); )
        B.start = B.pos, T = c_(O, B, I.state), v && G.push(new Y8(B, T, Nn(k.mode, I.state)));
      return v ? G : new Y8(B, T, I.state);
    }
    function X8(c, p) {
      if (c)
        for (; ; ) {
          var b = c.match(/(?:^|\s+)line-(background-)?(\S+)/);
          if (!b)
            break;
          c = c.slice(0, b.index) + c.slice(b.index + b[0].length);
          var v = b[1] ? "bgClass" : "textClass";
          p[v] == null ? p[v] = b[2] : new RegExp("(?:^|\\s)" + b[2] + "(?:$|\\s)").test(p[v]) || (p[v] += " " + b[2]);
        }
      return c;
    }
    function G8(c, p, b, v, k, O, T) {
      var D = b.flattenSpans;
      D == null && (D = c.options.flattenSpans);
      var I = 0, B = null, G = new Yt(p, c.options.tabSize, v), ee, re = c.options.addModeClass && [null];
      for (p == "" && X8(q8(b, v.state), O); !G.eol(); ) {
        if (G.pos > c.options.maxHighlightLength ? (D = !1, T && u_(c, p, v, G.pos), G.pos = p.length, ee = null) : ee = X8(c_(b, G, v.state, re), O), re) {
          var ie = re[0].name;
          ie && (ee = "m-" + (ee ? ie + " " + ee : ie));
        }
        if (!D || B != ee) {
          for (; I < G.start; )
            I = Math.min(G.start, I + 5e3), k(I, B);
          B = ee;
        }
        G.start = G.pos;
      }
      for (; I < G.pos; ) {
        var fe = Math.min(G.pos, I + 5e3);
        k(fe, B), I = fe;
      }
    }
    function mee(c, p, b) {
      for (var v, k, O = c.doc, T = b ? -1 : p - (c.doc.mode.innerMode ? 1e3 : 100), D = p; D > T; --D) {
        if (D <= O.first)
          return O.first;
        var I = Fe(O, D - 1), B = I.stateAfter;
        if (B && (!b || D + (B instanceof cv ? B.lookAhead : 0) <= O.modeFrontier))
          return D;
        var G = rt(I.text, null, c.options.tabSize);
        (k == null || v > G) && (k = D - 1, v = G);
      }
      return k;
    }
    function gee(c, p) {
      if (c.modeFrontier = Math.min(c.modeFrontier, p), !(c.highlightFrontier < p - 10)) {
        for (var b = c.first, v = p - 1; v > b; v--) {
          var k = Fe(c, v).stateAfter;
          if (k && (!(k instanceof cv) || v + k.lookAhead < p)) {
            b = v + 1;
            break;
          }
        }
        c.highlightFrontier = Math.min(c.highlightFrontier, b);
      }
    }
    var K8 = !1, Ga = !1;
    function vee() {
      K8 = !0;
    }
    function bee() {
      Ga = !0;
    }
    function fv(c, p, b) {
      this.marker = c, this.from = p, this.to = b;
    }
    function Dp(c, p) {
      if (c)
        for (var b = 0; b < c.length; ++b) {
          var v = c[b];
          if (v.marker == p)
            return v;
        }
    }
    function yee(c, p) {
      for (var b, v = 0; v < c.length; ++v)
        c[v] != p && (b || (b = [])).push(c[v]);
      return b;
    }
    function wee(c, p, b) {
      var v = b && window.WeakSet && (b.markedSpans || (b.markedSpans = /* @__PURE__ */ new WeakSet()));
      v && c.markedSpans && v.has(c.markedSpans) ? c.markedSpans.push(p) : (c.markedSpans = c.markedSpans ? c.markedSpans.concat([p]) : [p], v && v.add(c.markedSpans)), p.marker.attachLine(c);
    }
    function kee(c, p, b) {
      var v;
      if (c)
        for (var k = 0; k < c.length; ++k) {
          var O = c[k], T = O.marker, D = O.from == null || (T.inclusiveLeft ? O.from <= p : O.from < p);
          if (D || O.from == p && T.type == "bookmark" && (!b || !O.marker.insertLeft)) {
            var I = O.to == null || (T.inclusiveRight ? O.to >= p : O.to > p);
            (v || (v = [])).push(new fv(T, O.from, I ? null : O.to));
          }
        }
      return v;
    }
    function xee(c, p, b) {
      var v;
      if (c)
        for (var k = 0; k < c.length; ++k) {
          var O = c[k], T = O.marker, D = O.to == null || (T.inclusiveRight ? O.to >= p : O.to > p);
          if (D || O.from == p && T.type == "bookmark" && (!b || O.marker.insertLeft)) {
            var I = O.from == null || (T.inclusiveLeft ? O.from <= p : O.from < p);
            (v || (v = [])).push(new fv(
              T,
              I ? null : O.from - p,
              O.to == null ? null : O.to - p
            ));
          }
        }
      return v;
    }
    function f_(c, p) {
      if (p.full)
        return null;
      var b = Np(c, p.from.line) && Fe(c, p.from.line).markedSpans, v = Np(c, p.to.line) && Fe(c, p.to.line).markedSpans;
      if (!b && !v)
        return null;
      var k = p.from.ch, O = p.to.ch, T = mt(p.from, p.to) == 0, D = kee(b, k, T), I = xee(v, O, T), B = p.text.length == 1, G = Be(p.text).length + (B ? k : 0);
      if (D)
        for (var ee = 0; ee < D.length; ++ee) {
          var re = D[ee];
          if (re.to == null) {
            var ie = Dp(I, re.marker);
            ie ? B && (re.to = ie.to == null ? null : ie.to + G) : re.to = k;
          }
        }
      if (I)
        for (var fe = 0; fe < I.length; ++fe) {
          var de = I[fe];
          if (de.to != null && (de.to += G), de.from == null) {
            var ke = Dp(D, de.marker);
            ke || (de.from = G, B && (D || (D = [])).push(de));
          } else
            de.from += G, B && (D || (D = [])).push(de);
        }
      D && (D = J8(D)), I && I != D && (I = J8(I));
      var Se = [D];
      if (!B) {
        var Ee = p.text.length - 2, Ce;
        if (Ee > 0 && D)
          for (var Ne = 0; Ne < D.length; ++Ne)
            D[Ne].to == null && (Ce || (Ce = [])).push(new fv(D[Ne].marker, null, null));
        for (var Je = 0; Je < Ee; ++Je)
          Se.push(Ce);
        Se.push(I);
      }
      return Se;
    }
    function J8(c) {
      for (var p = 0; p < c.length; ++p) {
        var b = c[p];
        b.from != null && b.from == b.to && b.marker.clearWhenEmpty !== !1 && c.splice(p--, 1);
      }
      return c.length ? c : null;
    }
    function _ee(c, p, b) {
      var v = null;
      if (c.iter(p.line, b.line + 1, function(ie) {
        if (ie.markedSpans)
          for (var fe = 0; fe < ie.markedSpans.length; ++fe) {
            var de = ie.markedSpans[fe].marker;
            de.readOnly && (!v || ge(v, de) == -1) && (v || (v = [])).push(de);
          }
      }), !v)
        return null;
      for (var k = [{ from: p, to: b }], O = 0; O < v.length; ++O)
        for (var T = v[O], D = T.find(0), I = 0; I < k.length; ++I) {
          var B = k[I];
          if (!(mt(B.to, D.from) < 0 || mt(B.from, D.to) > 0)) {
            var G = [I, 1], ee = mt(B.from, D.from), re = mt(B.to, D.to);
            (ee < 0 || !T.inclusiveLeft && !ee) && G.push({ from: B.from, to: D.from }), (re > 0 || !T.inclusiveRight && !re) && G.push({ from: D.to, to: B.to }), k.splice.apply(k, G), I += G.length - 3;
          }
        }
      return k;
    }
    function e9(c) {
      var p = c.markedSpans;
      if (p) {
        for (var b = 0; b < p.length; ++b)
          p[b].marker.detachLine(c);
        c.markedSpans = null;
      }
    }
    function t9(c, p) {
      if (p) {
        for (var b = 0; b < p.length; ++b)
          p[b].marker.attachLine(c);
        c.markedSpans = p;
      }
    }
    function dv(c) {
      return c.inclusiveLeft ? -1 : 0;
    }
    function hv(c) {
      return c.inclusiveRight ? 1 : 0;
    }
    function d_(c, p) {
      var b = c.lines.length - p.lines.length;
      if (b != 0)
        return b;
      var v = c.find(), k = p.find(), O = mt(v.from, k.from) || dv(c) - dv(p);
      if (O)
        return -O;
      var T = mt(v.to, k.to) || hv(c) - hv(p);
      return T || p.id - c.id;
    }
    function n9(c, p) {
      var b = Ga && c.markedSpans, v;
      if (b)
        for (var k = void 0, O = 0; O < b.length; ++O)
          k = b[O], k.marker.collapsed && (p ? k.from : k.to) == null && (!v || d_(v, k.marker) < 0) && (v = k.marker);
      return v;
    }
    function i9(c) {
      return n9(c, !0);
    }
    function pv(c) {
      return n9(c, !1);
    }
    function Oee(c, p) {
      var b = Ga && c.markedSpans, v;
      if (b)
        for (var k = 0; k < b.length; ++k) {
          var O = b[k];
          O.marker.collapsed && (O.from == null || O.from < p) && (O.to == null || O.to > p) && (!v || d_(v, O.marker) < 0) && (v = O.marker);
        }
      return v;
    }
    function r9(c, p, b, v, k) {
      var O = Fe(c, p), T = Ga && O.markedSpans;
      if (T)
        for (var D = 0; D < T.length; ++D) {
          var I = T[D];
          if (I.marker.collapsed) {
            var B = I.marker.find(0), G = mt(B.from, b) || dv(I.marker) - dv(k), ee = mt(B.to, v) || hv(I.marker) - hv(k);
            if (!(G >= 0 && ee <= 0 || G <= 0 && ee >= 0) && (G <= 0 && (I.marker.inclusiveRight && k.inclusiveLeft ? mt(B.to, b) >= 0 : mt(B.to, b) > 0) || G >= 0 && (I.marker.inclusiveRight && k.inclusiveLeft ? mt(B.from, v) <= 0 : mt(B.from, v) < 0)))
              return !0;
          }
        }
    }
    function Co(c) {
      for (var p; p = i9(c); )
        c = p.find(-1, !0).line;
      return c;
    }
    function See(c) {
      for (var p; p = pv(c); )
        c = p.find(1, !0).line;
      return c;
    }
    function Cee(c) {
      for (var p, b; p = pv(c); )
        c = p.find(1, !0).line, (b || (b = [])).push(c);
      return b;
    }
    function h_(c, p) {
      var b = Fe(c, p), v = Co(b);
      return b == v ? p : Wt(v);
    }
    function s9(c, p) {
      if (p > c.lastLine())
        return p;
      var b = Fe(c, p), v;
      if (!ql(c, b))
        return p;
      for (; v = pv(b); )
        b = v.find(1, !0).line;
      return Wt(b) + 1;
    }
    function ql(c, p) {
      var b = Ga && p.markedSpans;
      if (b) {
        for (var v = void 0, k = 0; k < b.length; ++k)
          if (v = b[k], !!v.marker.collapsed) {
            if (v.from == null)
              return !0;
            if (!v.marker.widgetNode && v.from == 0 && v.marker.inclusiveLeft && p_(c, p, v))
              return !0;
          }
      }
    }
    function p_(c, p, b) {
      if (b.to == null) {
        var v = b.marker.find(1, !0);
        return p_(c, v.line, Dp(v.line.markedSpans, b.marker));
      }
      if (b.marker.inclusiveRight && b.to == p.text.length)
        return !0;
      for (var k = void 0, O = 0; O < p.markedSpans.length; ++O)
        if (k = p.markedSpans[O], k.marker.collapsed && !k.marker.widgetNode && k.from == b.to && (k.to == null || k.to != b.from) && (k.marker.inclusiveLeft || b.marker.inclusiveRight) && p_(c, p, k))
          return !0;
    }
    function Ka(c) {
      c = Co(c);
      for (var p = 0, b = c.parent, v = 0; v < b.lines.length; ++v) {
        var k = b.lines[v];
        if (k == c)
          break;
        p += k.height;
      }
      for (var O = b.parent; O; b = O, O = b.parent)
        for (var T = 0; T < O.children.length; ++T) {
          var D = O.children[T];
          if (D == b)
            break;
          p += D.height;
        }
      return p;
    }
    function mv(c) {
      if (c.height == 0)
        return 0;
      for (var p = c.text.length, b, v = c; b = i9(v); ) {
        var k = b.find(0, !0);
        v = k.from.line, p += k.from.ch - k.to.ch;
      }
      for (v = c; b = pv(v); ) {
        var O = b.find(0, !0);
        p -= v.text.length - O.from.ch, v = O.to.line, p += v.text.length - O.to.ch;
      }
      return p;
    }
    function m_(c) {
      var p = c.display, b = c.doc;
      p.maxLine = Fe(b, b.first), p.maxLineLength = mv(p.maxLine), p.maxLineChanged = !0, b.iter(function(v) {
        var k = mv(v);
        k > p.maxLineLength && (p.maxLineLength = k, p.maxLine = v);
      });
    }
    var rd = function(c, p, b) {
      this.text = c, t9(this, p), this.height = b ? b(this) : 1;
    };
    rd.prototype.lineNo = function() {
      return Wt(this);
    }, yn(rd);
    function Eee(c, p, b, v) {
      c.text = p, c.stateAfter && (c.stateAfter = null), c.styles && (c.styles = null), c.order != null && (c.order = null), e9(c), t9(c, b);
      var k = v ? v(c) : 1;
      k != c.height && Cs(c, k);
    }
    function Tee(c) {
      c.parent = null, e9(c);
    }
    var $ee = {}, Mee = {};
    function o9(c, p) {
      if (!c || /^\s*$/.test(c))
        return null;
      var b = p.addModeClass ? Mee : $ee;
      return b[c] || (b[c] = c.replace(/\S+/g, "cm-$&"));
    }
    function a9(c, p) {
      var b = q("span", null, null, f ? "padding-right: .1px" : null), v = {
        pre: q("pre", [b], "CodeMirror-line"),
        content: b,
        col: 0,
        pos: 0,
        cm: c,
        trailingSpace: !1,
        splitSpaces: c.getOption("lineWrapping")
      };
      p.measure = {};
      for (var k = 0; k <= (p.rest ? p.rest.length : 0); k++) {
        var O = k ? p.rest[k - 1] : p.line, T = void 0;
        v.pos = 0, v.addToken = Aee, sv(c.display.measure) && (T = Ss(O, c.doc.direction)) && (v.addToken = Pee(v.addToken, T)), v.map = [];
        var D = p != c.display.externalMeasured && Wt(O);
        Iee(O, v, Z8(c, O, D)), O.styleClasses && (O.styleClasses.bgClass && (v.bgClass = ce(O.styleClasses.bgClass, v.bgClass || "")), O.styleClasses.textClass && (v.textClass = ce(O.styleClasses.textClass, v.textClass || ""))), v.map.length == 0 && v.map.push(0, 0, v.content.appendChild(Va(c.display.measure))), k == 0 ? (p.measure.map = v.map, p.measure.cache = {}) : ((p.measure.maps || (p.measure.maps = [])).push(v.map), (p.measure.caches || (p.measure.caches = [])).push({}));
      }
      if (f) {
        var I = v.content.lastChild;
        (/\bcm-tab\b/.test(I.className) || I.querySelector && I.querySelector(".cm-tab")) && (v.content.className = "cm-tab-wrap-hack");
      }
      return Fn(c, "renderLine", c, p.line, v.pre), v.pre.className && (v.textClass = ce(v.pre.className, v.textClass || "")), v;
    }
    function Nee(c) {
      var p = R("span", "•", "cm-invalidchar");
      return p.title = "\\u" + c.charCodeAt(0).toString(16), p.setAttribute("aria-label", p.title), p;
    }
    function Aee(c, p, b, v, k, O, T) {
      if (p) {
        var D = c.splitSpaces ? Dee(p, c.trailingSpace) : p, I = c.cm.state.specialChars, B = !1, G;
        if (!I.test(p))
          c.col += p.length, G = document.createTextNode(D), c.map.push(c.pos, c.pos + p.length, G), l && u < 9 && (B = !0), c.pos += p.length;
        else {
          G = document.createDocumentFragment();
          for (var ee = 0; ; ) {
            I.lastIndex = ee;
            var re = I.exec(p), ie = re ? re.index - ee : p.length - ee;
            if (ie) {
              var fe = document.createTextNode(D.slice(ee, ee + ie));
              l && u < 9 ? G.appendChild(R("span", [fe])) : G.appendChild(fe), c.map.push(c.pos, c.pos + ie, fe), c.col += ie, c.pos += ie;
            }
            if (!re)
              break;
            ee += ie + 1;
            var de = void 0;
            if (re[0] == "	") {
              var ke = c.cm.options.tabSize, Se = ke - c.col % ke;
              de = G.appendChild(R("span", Lt(Se), "cm-tab")), de.setAttribute("role", "presentation"), de.setAttribute("cm-text", "	"), c.col += Se;
            } else re[0] == "\r" || re[0] == `
` ? (de = G.appendChild(R("span", re[0] == "\r" ? "␍" : "␤", "cm-invalidchar")), de.setAttribute("cm-text", re[0]), c.col += 1) : (de = c.cm.options.specialCharPlaceholder(re[0]), de.setAttribute("cm-text", re[0]), l && u < 9 ? G.appendChild(R("span", [de])) : G.appendChild(de), c.col += 1);
            c.map.push(c.pos, c.pos + 1, de), c.pos++;
          }
        }
        if (c.trailingSpace = D.charCodeAt(p.length - 1) == 32, b || v || k || B || O || T) {
          var Ee = b || "";
          v && (Ee += v), k && (Ee += k);
          var Ce = R("span", [G], Ee, O);
          if (T)
            for (var Ne in T)
              T.hasOwnProperty(Ne) && Ne != "style" && Ne != "class" && Ce.setAttribute(Ne, T[Ne]);
          return c.content.appendChild(Ce);
        }
        c.content.appendChild(G);
      }
    }
    function Dee(c, p) {
      if (c.length > 1 && !/  /.test(c))
        return c;
      for (var b = p, v = "", k = 0; k < c.length; k++) {
        var O = c.charAt(k);
        O == " " && b && (k == c.length - 1 || c.charCodeAt(k + 1) == 32) && (O = " "), v += O, b = O == " ";
      }
      return v;
    }
    function Pee(c, p) {
      return function(b, v, k, O, T, D, I) {
        k = k ? k + " cm-force-border" : "cm-force-border";
        for (var B = b.pos, G = B + v.length; ; ) {
          for (var ee = void 0, re = 0; re < p.length && (ee = p[re], !(ee.to > B && ee.from <= B)); re++)
            ;
          if (ee.to >= G)
            return c(b, v, k, O, T, D, I);
          c(b, v.slice(0, ee.to - B), k, O, null, D, I), O = null, v = v.slice(ee.to - B), B = ee.to;
        }
      };
    }
    function l9(c, p, b, v) {
      var k = !v && b.widgetNode;
      k && c.map.push(c.pos, c.pos + p, k), !v && c.cm.display.input.needsContentAttribute && (k || (k = c.content.appendChild(document.createElement("span"))), k.setAttribute("cm-marker", b.id)), k && (c.cm.display.input.setUneditable(k), c.content.appendChild(k)), c.pos += p, c.trailingSpace = !1;
    }
    function Iee(c, p, b) {
      var v = c.markedSpans, k = c.text, O = 0;
      if (!v) {
        for (var T = 1; T < b.length; T += 2)
          p.addToken(p, k.slice(O, O = b[T]), o9(b[T + 1], p.cm.options));
        return;
      }
      for (var D = k.length, I = 0, B = 1, G = "", ee, re, ie = 0, fe, de, ke, Se, Ee; ; ) {
        if (ie == I) {
          fe = de = ke = re = "", Ee = null, Se = null, ie = 1 / 0;
          for (var Ce = [], Ne = void 0, Je = 0; Je < v.length; ++Je) {
            var Ye = v[Je], Et = Ye.marker;
            if (Et.type == "bookmark" && Ye.from == I && Et.widgetNode)
              Ce.push(Et);
            else if (Ye.from <= I && (Ye.to == null || Ye.to > I || Et.collapsed && Ye.to == I && Ye.from == I)) {
              if (Ye.to != null && Ye.to != I && ie > Ye.to && (ie = Ye.to, de = ""), Et.className && (fe += " " + Et.className), Et.css && (re = (re ? re + ";" : "") + Et.css), Et.startStyle && Ye.from == I && (ke += " " + Et.startStyle), Et.endStyle && Ye.to == ie && (Ne || (Ne = [])).push(Et.endStyle, Ye.to), Et.title && ((Ee || (Ee = {})).title = Et.title), Et.attributes)
                for (var tn in Et.attributes)
                  (Ee || (Ee = {}))[tn] = Et.attributes[tn];
              Et.collapsed && (!Se || d_(Se.marker, Et) < 0) && (Se = Ye);
            } else Ye.from > I && ie > Ye.from && (ie = Ye.from);
          }
          if (Ne)
            for (var Ti = 0; Ti < Ne.length; Ti += 2)
              Ne[Ti + 1] == ie && (de += " " + Ne[Ti]);
          if (!Se || Se.from == I)
            for (var Dn = 0; Dn < Ce.length; ++Dn)
              l9(p, 0, Ce[Dn]);
          if (Se && (Se.from || 0) == I) {
            if (l9(
              p,
              (Se.to == null ? D + 1 : Se.to) - I,
              Se.marker,
              Se.from == null
            ), Se.to == null)
              return;
            Se.to == I && (Se = !1);
          }
        }
        if (I >= D)
          break;
        for (var ds = Math.min(D, ie); ; ) {
          if (G) {
            var Br = I + G.length;
            if (!Se) {
              var ci = Br > ds ? G.slice(0, ds - I) : G;
              p.addToken(
                p,
                ci,
                ee ? ee + fe : fe,
                ke,
                I + ci.length == ie ? de : "",
                re,
                Ee
              );
            }
            if (Br >= ds) {
              G = G.slice(ds - I), I = ds;
              break;
            }
            I = Br, ke = "";
          }
          G = k.slice(O, O = b[B++]), ee = o9(b[B++], p.cm.options);
        }
      }
    }
    function u9(c, p, b) {
      this.line = p, this.rest = Cee(p), this.size = this.rest ? Wt(Be(this.rest)) - b + 1 : 1, this.node = this.text = null, this.hidden = ql(c, p);
    }
    function gv(c, p, b) {
      for (var v = [], k, O = p; O < b; O = k) {
        var T = new u9(c.doc, Fe(c.doc, O), O);
        k = O + T.size, v.push(T);
      }
      return v;
    }
    var sd = null;
    function Lee(c) {
      sd ? sd.ops.push(c) : c.ownsGroup = sd = {
        ops: [c],
        delayedCallbacks: []
      };
    }
    function Ree(c) {
      var p = c.delayedCallbacks, b = 0;
      do {
        for (; b < p.length; b++)
          p[b].call(null);
        for (var v = 0; v < c.ops.length; v++) {
          var k = c.ops[v];
          if (k.cursorActivityHandlers)
            for (; k.cursorActivityCalled < k.cursorActivityHandlers.length; )
              k.cursorActivityHandlers[k.cursorActivityCalled++].call(null, k.cm);
        }
      } while (b < p.length);
    }
    function jee(c, p) {
      var b = c.ownsGroup;
      if (b)
        try {
          Ree(b);
        } finally {
          sd = null, p(b);
        }
    }
    var Pp = null;
    function Si(c, p) {
      var b = Zl(c, p);
      if (b.length) {
        var v = Array.prototype.slice.call(arguments, 2), k;
        sd ? k = sd.delayedCallbacks : Pp ? k = Pp : (k = Pp = [], setTimeout(Fee, 0));
        for (var O = function(D) {
          k.push(function() {
            return b[D].apply(null, v);
          });
        }, T = 0; T < b.length; ++T)
          O(T);
      }
    }
    function Fee() {
      var c = Pp;
      Pp = null;
      for (var p = 0; p < c.length; ++p)
        c[p]();
    }
    function c9(c, p, b, v) {
      for (var k = 0; k < p.changes.length; k++) {
        var O = p.changes[k];
        O == "text" ? zee(c, p) : O == "gutter" ? d9(c, p, b, v) : O == "class" ? g_(c, p) : O == "widget" && Wee(c, p, v);
      }
      p.changes = null;
    }
    function Ip(c) {
      return c.node == c.text && (c.node = R("div", null, null, "position: relative"), c.text.parentNode && c.text.parentNode.replaceChild(c.node, c.text), c.node.appendChild(c.text), l && u < 8 && (c.node.style.zIndex = 2)), c.node;
    }
    function Bee(c, p) {
      var b = p.bgClass ? p.bgClass + " " + (p.line.bgClass || "") : p.line.bgClass;
      if (b && (b += " CodeMirror-linebackground"), p.background)
        b ? p.background.className = b : (p.background.parentNode.removeChild(p.background), p.background = null);
      else if (b) {
        var v = Ip(p);
        p.background = v.insertBefore(R("div", null, b), v.firstChild), c.display.input.setUneditable(p.background);
      }
    }
    function f9(c, p) {
      var b = c.display.externalMeasured;
      return b && b.line == p.line ? (c.display.externalMeasured = null, p.measure = b.measure, b.built) : a9(c, p);
    }
    function zee(c, p) {
      var b = p.text.className, v = f9(c, p);
      p.text == p.node && (p.node = v.pre), p.text.parentNode.replaceChild(v.pre, p.text), p.text = v.pre, v.bgClass != p.bgClass || v.textClass != p.textClass ? (p.bgClass = v.bgClass, p.textClass = v.textClass, g_(c, p)) : b && (p.text.className = b);
    }
    function g_(c, p) {
      Bee(c, p), p.line.wrapClass ? Ip(p).className = p.line.wrapClass : p.node != p.text && (p.node.className = "");
      var b = p.textClass ? p.textClass + " " + (p.line.textClass || "") : p.line.textClass;
      p.text.className = b || "";
    }
    function d9(c, p, b, v) {
      if (p.gutter && (p.node.removeChild(p.gutter), p.gutter = null), p.gutterBackground && (p.node.removeChild(p.gutterBackground), p.gutterBackground = null), p.line.gutterClass) {
        var k = Ip(p);
        p.gutterBackground = R(
          "div",
          null,
          "CodeMirror-gutter-background " + p.line.gutterClass,
          "left: " + (c.options.fixedGutter ? v.fixedPos : -v.gutterTotalWidth) + "px; width: " + v.gutterTotalWidth + "px"
        ), c.display.input.setUneditable(p.gutterBackground), k.insertBefore(p.gutterBackground, p.text);
      }
      var O = p.line.gutterMarkers;
      if (c.options.lineNumbers || O) {
        var T = Ip(p), D = p.gutter = R("div", null, "CodeMirror-gutter-wrapper", "left: " + (c.options.fixedGutter ? v.fixedPos : -v.gutterTotalWidth) + "px");
        if (D.setAttribute("aria-hidden", "true"), c.display.input.setUneditable(D), T.insertBefore(D, p.text), p.line.gutterClass && (D.className += " " + p.line.gutterClass), c.options.lineNumbers && (!O || !O["CodeMirror-linenumbers"]) && (p.lineNumber = D.appendChild(
          R(
            "div",
            o_(c.options, b),
            "CodeMirror-linenumber CodeMirror-gutter-elt",
            "left: " + v.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + c.display.lineNumInnerWidth + "px"
          )
        )), O)
          for (var I = 0; I < c.display.gutterSpecs.length; ++I) {
            var B = c.display.gutterSpecs[I].className, G = O.hasOwnProperty(B) && O[B];
            G && D.appendChild(R(
              "div",
              [G],
              "CodeMirror-gutter-elt",
              "left: " + v.gutterLeft[B] + "px; width: " + v.gutterWidth[B] + "px"
            ));
          }
      }
    }
    function Wee(c, p, b) {
      p.alignable && (p.alignable = null);
      for (var v = L("CodeMirror-linewidget"), k = p.node.firstChild, O = void 0; k; k = O)
        O = k.nextSibling, v.test(k.className) && p.node.removeChild(k);
      h9(c, p, b);
    }
    function Hee(c, p, b, v) {
      var k = f9(c, p);
      return p.text = p.node = k.pre, k.bgClass && (p.bgClass = k.bgClass), k.textClass && (p.textClass = k.textClass), g_(c, p), d9(c, p, b, v), h9(c, p, v), p.node;
    }
    function h9(c, p, b) {
      if (p9(c, p.line, p, b, !0), p.rest)
        for (var v = 0; v < p.rest.length; v++)
          p9(c, p.rest[v], p, b, !1);
    }
    function p9(c, p, b, v, k) {
      if (p.widgets)
        for (var O = Ip(b), T = 0, D = p.widgets; T < D.length; ++T) {
          var I = D[T], B = R("div", [I.node], "CodeMirror-linewidget" + (I.className ? " " + I.className : ""));
          I.handleMouseEvents || B.setAttribute("cm-ignore-events", "true"), Qee(I, B, b, v), c.display.input.setUneditable(B), k && I.above ? O.insertBefore(B, b.gutter || b.text) : O.appendChild(B), Si(I, "redraw");
        }
    }
    function Qee(c, p, b, v) {
      if (c.noHScroll) {
        (b.alignable || (b.alignable = [])).push(p);
        var k = v.wrapperWidth;
        p.style.left = v.fixedPos + "px", c.coverGutter || (k -= v.gutterTotalWidth, p.style.paddingLeft = v.gutterTotalWidth + "px"), p.style.width = k + "px";
      }
      c.coverGutter && (p.style.zIndex = 5, p.style.position = "relative", c.noHScroll || (p.style.marginLeft = -v.gutterTotalWidth + "px"));
    }
    function Lp(c) {
      if (c.height != null)
        return c.height;
      var p = c.doc.cm;
      if (!p)
        return 0;
      if (!K(document.body, c.node)) {
        var b = "position: relative;";
        c.coverGutter && (b += "margin-left: -" + p.display.gutters.offsetWidth + "px;"), c.noHScroll && (b += "width: " + p.display.wrapper.clientWidth + "px;"), H(p.display.measure, R("div", [c.node], null, b));
      }
      return c.height = c.node.parentNode.offsetHeight;
    }
    function Ja(c, p) {
      for (var b = ed(p); b != c.wrapper; b = b.parentNode)
        if (!b || b.nodeType == 1 && b.getAttribute("cm-ignore-events") == "true" || b.parentNode == c.sizer && b != c.mover)
          return !0;
    }
    function vv(c) {
      return c.lineSpace.offsetTop;
    }
    function v_(c) {
      return c.mover.offsetHeight - c.lineSpace.offsetHeight;
    }
    function m9(c) {
      if (c.cachedPaddingH)
        return c.cachedPaddingH;
      var p = H(c.measure, R("pre", "x", "CodeMirror-line-like")), b = window.getComputedStyle ? window.getComputedStyle(p) : p.currentStyle, v = { left: parseInt(b.paddingLeft), right: parseInt(b.paddingRight) };
      return !isNaN(v.left) && !isNaN(v.right) && (c.cachedPaddingH = v), v;
    }
    function ta(c) {
      return De - c.display.nativeBarWidth;
    }
    function kc(c) {
      return c.display.scroller.clientWidth - ta(c) - c.display.barWidth;
    }
    function b_(c) {
      return c.display.scroller.clientHeight - ta(c) - c.display.barHeight;
    }
    function Uee(c, p, b) {
      var v = c.options.lineWrapping, k = v && kc(c);
      if (!p.measure.heights || v && p.measure.width != k) {
        var O = p.measure.heights = [];
        if (v) {
          p.measure.width = k;
          for (var T = p.text.firstChild.getClientRects(), D = 0; D < T.length - 1; D++) {
            var I = T[D], B = T[D + 1];
            Math.abs(I.bottom - B.bottom) > 2 && O.push((I.bottom + B.top) / 2 - b.top);
          }
        }
        O.push(b.bottom - b.top);
      }
    }
    function g9(c, p, b) {
      if (c.line == p)
        return { map: c.measure.map, cache: c.measure.cache };
      if (c.rest) {
        for (var v = 0; v < c.rest.length; v++)
          if (c.rest[v] == p)
            return { map: c.measure.maps[v], cache: c.measure.caches[v] };
        for (var k = 0; k < c.rest.length; k++)
          if (Wt(c.rest[k]) > b)
            return { map: c.measure.maps[k], cache: c.measure.caches[k], before: !0 };
      }
    }
    function Zee(c, p) {
      p = Co(p);
      var b = Wt(p), v = c.display.externalMeasured = new u9(c.doc, p, b);
      v.lineN = b;
      var k = v.built = a9(c, v);
      return v.text = k.pre, H(c.display.lineMeasure, k.pre), v;
    }
    function v9(c, p, b, v) {
      return na(c, od(c, p), b, v);
    }
    function y_(c, p) {
      if (p >= c.display.viewFrom && p < c.display.viewTo)
        return c.display.view[Oc(c, p)];
      var b = c.display.externalMeasured;
      if (b && p >= b.lineN && p < b.lineN + b.size)
        return b;
    }
    function od(c, p) {
      var b = Wt(p), v = y_(c, b);
      v && !v.text ? v = null : v && v.changes && (c9(c, v, b, O_(c)), c.curOp.forceUpdate = !0), v || (v = Zee(c, p));
      var k = g9(v, p, b);
      return {
        line: p,
        view: v,
        rect: null,
        map: k.map,
        cache: k.cache,
        before: k.before,
        hasHeights: !1
      };
    }
    function na(c, p, b, v, k) {
      p.before && (b = -1);
      var O = b + (v || ""), T;
      return p.cache.hasOwnProperty(O) ? T = p.cache[O] : (p.rect || (p.rect = p.view.text.getBoundingClientRect()), p.hasHeights || (Uee(c, p.view, p.rect), p.hasHeights = !0), T = Yee(c, p, b, v), T.bogus || (p.cache[O] = T)), {
        left: T.left,
        right: T.right,
        top: k ? T.rtop : T.top,
        bottom: k ? T.rbottom : T.bottom
      };
    }
    var b9 = { left: 0, right: 0, top: 0, bottom: 0 };
    function y9(c, p, b) {
      for (var v, k, O, T, D, I, B = 0; B < c.length; B += 3)
        if (D = c[B], I = c[B + 1], p < D ? (k = 0, O = 1, T = "left") : p < I ? (k = p - D, O = k + 1) : (B == c.length - 3 || p == I && c[B + 3] > p) && (O = I - D, k = O - 1, p >= I && (T = "right")), k != null) {
          if (v = c[B + 2], D == I && b == (v.insertLeft ? "left" : "right") && (T = b), b == "left" && k == 0)
            for (; B && c[B - 2] == c[B - 3] && c[B - 1].insertLeft; )
              v = c[(B -= 3) + 2], T = "left";
          if (b == "right" && k == I - D)
            for (; B < c.length - 3 && c[B + 3] == c[B + 4] && !c[B + 5].insertLeft; )
              v = c[(B += 3) + 2], T = "right";
          break;
        }
      return { node: v, start: k, end: O, collapse: T, coverStart: D, coverEnd: I };
    }
    function qee(c, p) {
      var b = b9;
      if (p == "left")
        for (var v = 0; v < c.length && (b = c[v]).left == b.right; v++)
          ;
      else
        for (var k = c.length - 1; k >= 0 && (b = c[k]).left == b.right; k--)
          ;
      return b;
    }
    function Yee(c, p, b, v) {
      var k = y9(p.map, b, v), O = k.node, T = k.start, D = k.end, I = k.collapse, B;
      if (O.nodeType == 3) {
        for (var G = 0; G < 4; G++) {
          for (; T && qa(p.line.text.charAt(k.coverStart + T)); )
            --T;
          for (; k.coverStart + D < k.coverEnd && qa(p.line.text.charAt(k.coverStart + D)); )
            ++D;
          if (l && u < 9 && T == 0 && D == k.coverEnd - k.coverStart ? B = O.parentNode.getBoundingClientRect() : B = qee(Y(O, T, D).getClientRects(), v), B.left || B.right || T == 0)
            break;
          D = T, T = T - 1, I = "right";
        }
        l && u < 11 && (B = Vee(c.display.measure, B));
      } else {
        T > 0 && (I = v = "right");
        var ee;
        c.options.lineWrapping && (ee = O.getClientRects()).length > 1 ? B = ee[v == "right" ? ee.length - 1 : 0] : B = O.getBoundingClientRect();
      }
      if (l && u < 9 && !T && (!B || !B.left && !B.right)) {
        var re = O.parentNode.getClientRects()[0];
        re ? B = { left: re.left, right: re.left + ld(c.display), top: re.top, bottom: re.bottom } : B = b9;
      }
      for (var ie = B.top - p.rect.top, fe = B.bottom - p.rect.top, de = (ie + fe) / 2, ke = p.view.measure.heights, Se = 0; Se < ke.length - 1 && !(de < ke[Se]); Se++)
        ;
      var Ee = Se ? ke[Se - 1] : 0, Ce = ke[Se], Ne = {
        left: (I == "right" ? B.right : B.left) - p.rect.left,
        right: (I == "left" ? B.left : B.right) - p.rect.left,
        top: Ee,
        bottom: Ce
      };
      return !B.left && !B.right && (Ne.bogus = !0), c.options.singleCursorHeightPerLine || (Ne.rtop = ie, Ne.rbottom = fe), Ne;
    }
    function Vee(c, p) {
      if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !av(c))
        return p;
      var b = screen.logicalXDPI / screen.deviceXDPI, v = screen.logicalYDPI / screen.deviceYDPI;
      return {
        left: p.left * b,
        right: p.right * b,
        top: p.top * v,
        bottom: p.bottom * v
      };
    }
    function w9(c) {
      if (c.measure && (c.measure.cache = {}, c.measure.heights = null, c.rest))
        for (var p = 0; p < c.rest.length; p++)
          c.measure.caches[p] = {};
    }
    function k9(c) {
      c.display.externalMeasure = null, V(c.display.lineMeasure);
      for (var p = 0; p < c.display.view.length; p++)
        w9(c.display.view[p]);
    }
    function Rp(c) {
      k9(c), c.display.cachedCharWidth = c.display.cachedTextHeight = c.display.cachedPaddingH = null, c.options.lineWrapping || (c.display.maxLineChanged = !0), c.display.lineNumChars = null;
    }
    function x9(c) {
      return h && C ? -(c.body.getBoundingClientRect().left - parseInt(getComputedStyle(c.body).marginLeft)) : c.defaultView.pageXOffset || (c.documentElement || c.body).scrollLeft;
    }
    function _9(c) {
      return h && C ? -(c.body.getBoundingClientRect().top - parseInt(getComputedStyle(c.body).marginTop)) : c.defaultView.pageYOffset || (c.documentElement || c.body).scrollTop;
    }
    function w_(c) {
      var p = Co(c), b = p.widgets, v = 0;
      if (b)
        for (var k = 0; k < b.length; ++k)
          b[k].above && (v += Lp(b[k]));
      return v;
    }
    function bv(c, p, b, v, k) {
      if (!k) {
        var O = w_(p);
        b.top += O, b.bottom += O;
      }
      if (v == "line")
        return b;
      v || (v = "local");
      var T = Ka(p);
      if (v == "local" ? T += vv(c.display) : T -= c.display.viewOffset, v == "page" || v == "window") {
        var D = c.display.lineSpace.getBoundingClientRect();
        T += D.top + (v == "window" ? 0 : _9(F(c)));
        var I = D.left + (v == "window" ? 0 : x9(F(c)));
        b.left += I, b.right += I;
      }
      return b.top += T, b.bottom += T, b;
    }
    function O9(c, p, b) {
      if (b == "div")
        return p;
      var v = p.left, k = p.top;
      if (b == "page")
        v -= x9(F(c)), k -= _9(F(c));
      else if (b == "local" || !b) {
        var O = c.display.sizer.getBoundingClientRect();
        v += O.left, k += O.top;
      }
      var T = c.display.lineSpace.getBoundingClientRect();
      return { left: v - T.left, top: k - T.top };
    }
    function yv(c, p, b, v, k) {
      return v || (v = Fe(c.doc, p.line)), bv(c, v, v9(c, v, p.ch, k), b);
    }
    function Eo(c, p, b, v, k, O) {
      v = v || Fe(c.doc, p.line), k || (k = od(c, v));
      function T(fe, de) {
        var ke = na(c, k, fe, de ? "right" : "left", O);
        return de ? ke.left = ke.right : ke.right = ke.left, bv(c, v, ke, b);
      }
      var D = Ss(v, c.doc.direction), I = p.ch, B = p.sticky;
      if (I >= v.text.length ? (I = v.text.length, B = "before") : I <= 0 && (I = 0, B = "after"), !D)
        return T(B == "before" ? I - 1 : I, B == "before");
      function G(fe, de, ke) {
        var Se = D[de], Ee = Se.level == 1;
        return T(ke ? fe - 1 : fe, Ee != ke);
      }
      var ee = Rr(D, I, B), re = Jo, ie = G(I, ee, B == "before");
      return re != null && (ie.other = G(I, re, B != "before")), ie;
    }
    function S9(c, p) {
      var b = 0;
      p = gt(c.doc, p), c.options.lineWrapping || (b = ld(c.display) * p.ch);
      var v = Fe(c.doc, p.line), k = Ka(v) + vv(c.display);
      return { left: b, right: b, top: k, bottom: k + v.height };
    }
    function k_(c, p, b, v, k) {
      var O = ye(c, p, b);
      return O.xRel = k, v && (O.outside = v), O;
    }
    function x_(c, p, b) {
      var v = c.doc;
      if (b += c.display.viewOffset, b < 0)
        return k_(v.first, 0, null, -1, -1);
      var k = wc(v, b), O = v.first + v.size - 1;
      if (k > O)
        return k_(v.first + v.size - 1, Fe(v, O).text.length, null, 1, 1);
      p < 0 && (p = 0);
      for (var T = Fe(v, k); ; ) {
        var D = Xee(c, T, k, p, b), I = Oee(T, D.ch + (D.xRel > 0 || D.outside > 0 ? 1 : 0));
        if (!I)
          return D;
        var B = I.find(1);
        if (B.line == k)
          return B;
        T = Fe(v, k = B.line);
      }
    }
    function C9(c, p, b, v) {
      v -= w_(p);
      var k = p.text.length, O = Ql(function(T) {
        return na(c, b, T - 1).bottom <= v;
      }, k, 0);
      return k = Ql(function(T) {
        return na(c, b, T).top > v;
      }, O, k), { begin: O, end: k };
    }
    function E9(c, p, b, v) {
      b || (b = od(c, p));
      var k = bv(c, p, na(c, b, v), "line").top;
      return C9(c, p, b, k);
    }
    function __(c, p, b, v) {
      return c.bottom <= b ? !1 : c.top > b ? !0 : (v ? c.left : c.right) > p;
    }
    function Xee(c, p, b, v, k) {
      k -= Ka(p);
      var O = od(c, p), T = w_(p), D = 0, I = p.text.length, B = !0, G = Ss(p, c.doc.direction);
      if (G) {
        var ee = (c.options.lineWrapping ? Kee : Gee)(c, p, b, O, G, v, k);
        B = ee.level != 1, D = B ? ee.from : ee.to - 1, I = B ? ee.to : ee.from - 1;
      }
      var re = null, ie = null, fe = Ql(function(Je) {
        var Ye = na(c, O, Je);
        return Ye.top += T, Ye.bottom += T, __(Ye, v, k, !1) ? (Ye.top <= k && Ye.left <= v && (re = Je, ie = Ye), !0) : !1;
      }, D, I), de, ke, Se = !1;
      if (ie) {
        var Ee = v - ie.left < ie.right - v, Ce = Ee == B;
        fe = re + (Ce ? 0 : 1), ke = Ce ? "after" : "before", de = Ee ? ie.left : ie.right;
      } else {
        !B && (fe == I || fe == D) && fe++, ke = fe == 0 ? "after" : fe == p.text.length ? "before" : na(c, O, fe - (B ? 1 : 0)).bottom + T <= k == B ? "after" : "before";
        var Ne = Eo(c, ye(b, fe, ke), "line", p, O);
        de = Ne.left, Se = k < Ne.top ? -1 : k >= Ne.bottom ? 1 : 0;
      }
      return fe = Xf(p.text, fe, 1), k_(b, fe, ke, Se, v - de);
    }
    function Gee(c, p, b, v, k, O, T) {
      var D = Ql(function(ee) {
        var re = k[ee], ie = re.level != 1;
        return __(Eo(
          c,
          ye(b, ie ? re.to : re.from, ie ? "before" : "after"),
          "line",
          p,
          v
        ), O, T, !0);
      }, 0, k.length - 1), I = k[D];
      if (D > 0) {
        var B = I.level != 1, G = Eo(
          c,
          ye(b, B ? I.from : I.to, B ? "after" : "before"),
          "line",
          p,
          v
        );
        __(G, O, T, !0) && G.top > T && (I = k[D - 1]);
      }
      return I;
    }
    function Kee(c, p, b, v, k, O, T) {
      var D = C9(c, p, v, T), I = D.begin, B = D.end;
      /\s/.test(p.text.charAt(B - 1)) && B--;
      for (var G = null, ee = null, re = 0; re < k.length; re++) {
        var ie = k[re];
        if (!(ie.from >= B || ie.to <= I)) {
          var fe = ie.level != 1, de = na(c, v, fe ? Math.min(B, ie.to) - 1 : Math.max(I, ie.from)).right, ke = de < O ? O - de + 1e9 : de - O;
          (!G || ee > ke) && (G = ie, ee = ke);
        }
      }
      return G || (G = k[k.length - 1]), G.from < I && (G = { from: I, to: G.to, level: G.level }), G.to > B && (G = { from: G.from, to: B, level: G.level }), G;
    }
    var xc;
    function ad(c) {
      if (c.cachedTextHeight != null)
        return c.cachedTextHeight;
      if (xc == null) {
        xc = R("pre", null, "CodeMirror-line-like");
        for (var p = 0; p < 49; ++p)
          xc.appendChild(document.createTextNode("x")), xc.appendChild(R("br"));
        xc.appendChild(document.createTextNode("x"));
      }
      H(c.measure, xc);
      var b = xc.offsetHeight / 50;
      return b > 3 && (c.cachedTextHeight = b), V(c.measure), b || 1;
    }
    function ld(c) {
      if (c.cachedCharWidth != null)
        return c.cachedCharWidth;
      var p = R("span", "xxxxxxxxxx"), b = R("pre", [p], "CodeMirror-line-like");
      H(c.measure, b);
      var v = p.getBoundingClientRect(), k = (v.right - v.left) / 10;
      return k > 2 && (c.cachedCharWidth = k), k || 10;
    }
    function O_(c) {
      for (var p = c.display, b = {}, v = {}, k = p.gutters.clientLeft, O = p.gutters.firstChild, T = 0; O; O = O.nextSibling, ++T) {
        var D = c.display.gutterSpecs[T].className;
        b[D] = O.offsetLeft + O.clientLeft + k, v[D] = O.clientWidth;
      }
      return {
        fixedPos: S_(p),
        gutterTotalWidth: p.gutters.offsetWidth,
        gutterLeft: b,
        gutterWidth: v,
        wrapperWidth: p.wrapper.clientWidth
      };
    }
    function S_(c) {
      return c.scroller.getBoundingClientRect().left - c.sizer.getBoundingClientRect().left;
    }
    function T9(c) {
      var p = ad(c.display), b = c.options.lineWrapping, v = b && Math.max(5, c.display.scroller.clientWidth / ld(c.display) - 3);
      return function(k) {
        if (ql(c.doc, k))
          return 0;
        var O = 0;
        if (k.widgets)
          for (var T = 0; T < k.widgets.length; T++)
            k.widgets[T].height && (O += k.widgets[T].height);
        return b ? O + (Math.ceil(k.text.length / v) || 1) * p : O + p;
      };
    }
    function C_(c) {
      var p = c.doc, b = T9(c);
      p.iter(function(v) {
        var k = b(v);
        k != v.height && Cs(v, k);
      });
    }
    function _c(c, p, b, v) {
      var k = c.display;
      if (!b && ed(p).getAttribute("cm-not-content") == "true")
        return null;
      var O, T, D = k.lineSpace.getBoundingClientRect();
      try {
        O = p.clientX - D.left, T = p.clientY - D.top;
      } catch {
        return null;
      }
      var I = x_(c, O, T), B;
      if (v && I.xRel > 0 && (B = Fe(c.doc, I.line).text).length == I.ch) {
        var G = rt(B, B.length, c.options.tabSize) - B.length;
        I = ye(I.line, Math.max(0, Math.round((O - m9(c.display).left) / ld(c.display)) - G));
      }
      return I;
    }
    function Oc(c, p) {
      if (p >= c.display.viewTo || (p -= c.display.viewFrom, p < 0))
        return null;
      for (var b = c.display.view, v = 0; v < b.length; v++)
        if (p -= b[v].size, p < 0)
          return v;
    }
    function jr(c, p, b, v) {
      p == null && (p = c.doc.first), b == null && (b = c.doc.first + c.doc.size), v || (v = 0);
      var k = c.display;
      if (v && b < k.viewTo && (k.updateLineNumbers == null || k.updateLineNumbers > p) && (k.updateLineNumbers = p), c.curOp.viewChanged = !0, p >= k.viewTo)
        Ga && h_(c.doc, p) < k.viewTo && Vl(c);
      else if (b <= k.viewFrom)
        Ga && s9(c.doc, b + v) > k.viewFrom ? Vl(c) : (k.viewFrom += v, k.viewTo += v);
      else if (p <= k.viewFrom && b >= k.viewTo)
        Vl(c);
      else if (p <= k.viewFrom) {
        var O = wv(c, b, b + v, 1);
        O ? (k.view = k.view.slice(O.index), k.viewFrom = O.lineN, k.viewTo += v) : Vl(c);
      } else if (b >= k.viewTo) {
        var T = wv(c, p, p, -1);
        T ? (k.view = k.view.slice(0, T.index), k.viewTo = T.lineN) : Vl(c);
      } else {
        var D = wv(c, p, p, -1), I = wv(c, b, b + v, 1);
        D && I ? (k.view = k.view.slice(0, D.index).concat(gv(c, D.lineN, I.lineN)).concat(k.view.slice(I.index)), k.viewTo += v) : Vl(c);
      }
      var B = k.externalMeasured;
      B && (b < B.lineN ? B.lineN += v : p < B.lineN + B.size && (k.externalMeasured = null));
    }
    function Yl(c, p, b) {
      c.curOp.viewChanged = !0;
      var v = c.display, k = c.display.externalMeasured;
      if (k && p >= k.lineN && p < k.lineN + k.size && (v.externalMeasured = null), !(p < v.viewFrom || p >= v.viewTo)) {
        var O = v.view[Oc(c, p)];
        if (O.node != null) {
          var T = O.changes || (O.changes = []);
          ge(T, b) == -1 && T.push(b);
        }
      }
    }
    function Vl(c) {
      c.display.viewFrom = c.display.viewTo = c.doc.first, c.display.view = [], c.display.viewOffset = 0;
    }
    function wv(c, p, b, v) {
      var k = Oc(c, p), O, T = c.display.view;
      if (!Ga || b == c.doc.first + c.doc.size)
        return { index: k, lineN: b };
      for (var D = c.display.viewFrom, I = 0; I < k; I++)
        D += T[I].size;
      if (D != p) {
        if (v > 0) {
          if (k == T.length - 1)
            return null;
          O = D + T[k].size - p, k++;
        } else
          O = D - p;
        p += O, b += O;
      }
      for (; h_(c.doc, b) != b; ) {
        if (k == (v < 0 ? 0 : T.length - 1))
          return null;
        b += v * T[k - (v < 0 ? 1 : 0)].size, k += v;
      }
      return { index: k, lineN: b };
    }
    function Jee(c, p, b) {
      var v = c.display, k = v.view;
      k.length == 0 || p >= v.viewTo || b <= v.viewFrom ? (v.view = gv(c, p, b), v.viewFrom = p) : (v.viewFrom > p ? v.view = gv(c, p, v.viewFrom).concat(v.view) : v.viewFrom < p && (v.view = v.view.slice(Oc(c, p))), v.viewFrom = p, v.viewTo < b ? v.view = v.view.concat(gv(c, v.viewTo, b)) : v.viewTo > b && (v.view = v.view.slice(0, Oc(c, b)))), v.viewTo = b;
    }
    function $9(c) {
      for (var p = c.display.view, b = 0, v = 0; v < p.length; v++) {
        var k = p[v];
        !k.hidden && (!k.node || k.changes) && ++b;
      }
      return b;
    }
    function jp(c) {
      c.display.input.showSelection(c.display.input.prepareSelection());
    }
    function M9(c, p) {
      p === void 0 && (p = !0);
      var b = c.doc, v = {}, k = v.cursors = document.createDocumentFragment(), O = v.selection = document.createDocumentFragment(), T = c.options.$customCursor;
      T && (p = !0);
      for (var D = 0; D < b.sel.ranges.length; D++)
        if (!(!p && D == b.sel.primIndex)) {
          var I = b.sel.ranges[D];
          if (!(I.from().line >= c.display.viewTo || I.to().line < c.display.viewFrom)) {
            var B = I.empty();
            if (T) {
              var G = T(c, I);
              G && E_(c, G, k);
            } else (B || c.options.showCursorWhenSelecting) && E_(c, I.head, k);
            B || ete(c, I, O);
          }
        }
      return v;
    }
    function E_(c, p, b) {
      var v = Eo(c, p, "div", null, null, !c.options.singleCursorHeightPerLine), k = b.appendChild(R("div", " ", "CodeMirror-cursor"));
      if (k.style.left = v.left + "px", k.style.top = v.top + "px", k.style.height = Math.max(0, v.bottom - v.top) * c.options.cursorHeight + "px", /\bcm-fat-cursor\b/.test(c.getWrapperElement().className)) {
        var O = yv(c, p, "div", null, null), T = O.right - O.left;
        k.style.width = (T > 0 ? T : c.defaultCharWidth()) + "px";
      }
      if (v.other) {
        var D = b.appendChild(R("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor"));
        D.style.display = "", D.style.left = v.other.left + "px", D.style.top = v.other.top + "px", D.style.height = (v.other.bottom - v.other.top) * 0.85 + "px";
      }
    }
    function kv(c, p) {
      return c.top - p.top || c.left - p.left;
    }
    function ete(c, p, b) {
      var v = c.display, k = c.doc, O = document.createDocumentFragment(), T = m9(c.display), D = T.left, I = Math.max(v.sizerWidth, kc(c) - v.sizer.offsetLeft) - T.right, B = k.direction == "ltr";
      function G(Ce, Ne, Je, Ye) {
        Ne < 0 && (Ne = 0), Ne = Math.round(Ne), Ye = Math.round(Ye), O.appendChild(R("div", null, "CodeMirror-selected", "position: absolute; left: " + Ce + `px;
                             top: ` + Ne + "px; width: " + (Je ?? I - Ce) + `px;
                             height: ` + (Ye - Ne) + "px"));
      }
      function ee(Ce, Ne, Je) {
        var Ye = Fe(k, Ce), Et = Ye.text.length, tn, Ti;
        function Dn(ci, zr) {
          return yv(c, ye(Ce, ci), "div", Ye, zr);
        }
        function ds(ci, zr, Bi) {
          var bi = E9(c, Ye, null, ci), fi = zr == "ltr" == (Bi == "after") ? "left" : "right", Bn = Bi == "after" ? bi.begin : bi.end - (/\s/.test(Ye.text.charAt(bi.end - 1)) ? 2 : 1);
          return Dn(Bn, fi)[fi];
        }
        var Br = Ss(Ye, k.direction);
        return Gf(Br, Ne || 0, Je ?? Et, function(ci, zr, Bi, bi) {
          var fi = Bi == "ltr", Bn = Dn(ci, fi ? "left" : "right"), Wr = Dn(zr - 1, fi ? "right" : "left"), kd = Ne == null && ci == 0, tu = Je == null && zr == Et, tr = bi == 0, ia = !Br || bi == Br.length - 1;
          if (Wr.top - Bn.top <= 3) {
            var $i = (B ? kd : tu) && tr, e3 = (B ? tu : kd) && ia, nl = $i ? D : (fi ? Bn : Wr).left, $c = e3 ? I : (fi ? Wr : Bn).right;
            G(nl, Bn.top, $c - nl, Bn.bottom);
          } else {
            var Mc, yr, xd, t3;
            fi ? (Mc = B && kd && tr ? D : Bn.left, yr = B ? I : ds(ci, Bi, "before"), xd = B ? D : ds(zr, Bi, "after"), t3 = B && tu && ia ? I : Wr.right) : (Mc = B ? ds(ci, Bi, "before") : D, yr = !B && kd && tr ? I : Bn.right, xd = !B && tu && ia ? D : Wr.left, t3 = B ? ds(zr, Bi, "after") : I), G(Mc, Bn.top, yr - Mc, Bn.bottom), Bn.bottom < Wr.top && G(D, Bn.bottom, null, Wr.top), G(xd, Wr.top, t3 - xd, Wr.bottom);
          }
          (!tn || kv(Bn, tn) < 0) && (tn = Bn), kv(Wr, tn) < 0 && (tn = Wr), (!Ti || kv(Bn, Ti) < 0) && (Ti = Bn), kv(Wr, Ti) < 0 && (Ti = Wr);
        }), { start: tn, end: Ti };
      }
      var re = p.from(), ie = p.to();
      if (re.line == ie.line)
        ee(re.line, re.ch, ie.ch);
      else {
        var fe = Fe(k, re.line), de = Fe(k, ie.line), ke = Co(fe) == Co(de), Se = ee(re.line, re.ch, ke ? fe.text.length + 1 : null).end, Ee = ee(ie.line, ke ? 0 : null, ie.ch).start;
        ke && (Se.top < Ee.top - 2 ? (G(Se.right, Se.top, null, Se.bottom), G(D, Ee.top, Ee.left, Ee.bottom)) : G(Se.right, Se.top, Ee.left - Se.right, Se.bottom)), Se.bottom < Ee.top && G(D, Se.bottom, null, Ee.top);
      }
      b.appendChild(O);
    }
    function T_(c) {
      if (c.state.focused) {
        var p = c.display;
        clearInterval(p.blinker);
        var b = !0;
        p.cursorDiv.style.visibility = "", c.options.cursorBlinkRate > 0 ? p.blinker = setInterval(function() {
          c.hasFocus() || ud(c), p.cursorDiv.style.visibility = (b = !b) ? "" : "hidden";
        }, c.options.cursorBlinkRate) : c.options.cursorBlinkRate < 0 && (p.cursorDiv.style.visibility = "hidden");
      }
    }
    function N9(c) {
      c.hasFocus() || (c.display.input.focus(), c.state.focused || M_(c));
    }
    function $_(c) {
      c.state.delayingBlurEvent = !0, setTimeout(function() {
        c.state.delayingBlurEvent && (c.state.delayingBlurEvent = !1, c.state.focused && ud(c));
      }, 100);
    }
    function M_(c, p) {
      c.state.delayingBlurEvent && !c.state.draggingText && (c.state.delayingBlurEvent = !1), c.options.readOnly != "nocursor" && (c.state.focused || (Fn(c, "focus", c, p), c.state.focused = !0, se(c.display.wrapper, "CodeMirror-focused"), !c.curOp && c.display.selForContextMenu != c.doc.sel && (c.display.input.reset(), f && setTimeout(function() {
        return c.display.input.reset(!0);
      }, 20)), c.display.input.receivedFocus()), T_(c));
    }
    function ud(c, p) {
      c.state.delayingBlurEvent || (c.state.focused && (Fn(c, "blur", c, p), c.state.focused = !1, Q(c.display.wrapper, "CodeMirror-focused")), clearInterval(c.display.blinker), setTimeout(function() {
        c.state.focused || (c.display.shift = !1);
      }, 150));
    }
    function xv(c) {
      for (var p = c.display, b = p.lineDiv.offsetTop, v = Math.max(0, p.scroller.getBoundingClientRect().top), k = p.lineDiv.getBoundingClientRect().top, O = 0, T = 0; T < p.view.length; T++) {
        var D = p.view[T], I = c.options.lineWrapping, B = void 0, G = 0;
        if (!D.hidden) {
          if (k += D.line.height, l && u < 8) {
            var ee = D.node.offsetTop + D.node.offsetHeight;
            B = ee - b, b = ee;
          } else {
            var re = D.node.getBoundingClientRect();
            B = re.bottom - re.top, !I && D.text.firstChild && (G = D.text.firstChild.getBoundingClientRect().right - re.left - 1);
          }
          var ie = D.line.height - B;
          if ((ie > 5e-3 || ie < -5e-3) && (k < v && (O -= ie), Cs(D.line, B), A9(D.line), D.rest))
            for (var fe = 0; fe < D.rest.length; fe++)
              A9(D.rest[fe]);
          if (G > c.display.sizerWidth) {
            var de = Math.ceil(G / ld(c.display));
            de > c.display.maxLineLength && (c.display.maxLineLength = de, c.display.maxLine = D.line, c.display.maxLineChanged = !0);
          }
        }
      }
      Math.abs(O) > 2 && (p.scroller.scrollTop += O);
    }
    function A9(c) {
      if (c.widgets)
        for (var p = 0; p < c.widgets.length; ++p) {
          var b = c.widgets[p], v = b.node.parentNode;
          v && (b.height = v.offsetHeight);
        }
    }
    function _v(c, p, b) {
      var v = b && b.top != null ? Math.max(0, b.top) : c.scroller.scrollTop;
      v = Math.floor(v - vv(c));
      var k = b && b.bottom != null ? b.bottom : v + c.wrapper.clientHeight, O = wc(p, v), T = wc(p, k);
      if (b && b.ensure) {
        var D = b.ensure.from.line, I = b.ensure.to.line;
        D < O ? (O = D, T = wc(p, Ka(Fe(p, D)) + c.wrapper.clientHeight)) : Math.min(I, p.lastLine()) >= T && (O = wc(p, Ka(Fe(p, I)) - c.wrapper.clientHeight), T = I);
      }
      return { from: O, to: Math.max(T, O + 1) };
    }
    function tte(c, p) {
      if (!bn(c, "scrollCursorIntoView")) {
        var b = c.display, v = b.sizer.getBoundingClientRect(), k = null, O = b.wrapper.ownerDocument;
        if (p.top + v.top < 0 ? k = !0 : p.bottom + v.top > (O.defaultView.innerHeight || O.documentElement.clientHeight) && (k = !1), k != null && !_) {
          var T = R("div", "​", null, `position: absolute;
                         top: ` + (p.top - b.viewOffset - vv(c.display)) + `px;
                         height: ` + (p.bottom - p.top + ta(c) + b.barHeight) + `px;
                         left: ` + p.left + "px; width: " + Math.max(2, p.right - p.left) + "px;");
          c.display.lineSpace.appendChild(T), T.scrollIntoView(k), c.display.lineSpace.removeChild(T);
        }
      }
    }
    function nte(c, p, b, v) {
      v == null && (v = 0);
      var k;
      !c.options.lineWrapping && p == b && (b = p.sticky == "before" ? ye(p.line, p.ch + 1, "before") : p, p = p.ch ? ye(p.line, p.sticky == "before" ? p.ch - 1 : p.ch, "after") : p);
      for (var O = 0; O < 5; O++) {
        var T = !1, D = Eo(c, p), I = !b || b == p ? D : Eo(c, b);
        k = {
          left: Math.min(D.left, I.left),
          top: Math.min(D.top, I.top) - v,
          right: Math.max(D.left, I.left),
          bottom: Math.max(D.bottom, I.bottom) + v
        };
        var B = N_(c, k), G = c.doc.scrollTop, ee = c.doc.scrollLeft;
        if (B.scrollTop != null && (Bp(c, B.scrollTop), Math.abs(c.doc.scrollTop - G) > 1 && (T = !0)), B.scrollLeft != null && (Sc(c, B.scrollLeft), Math.abs(c.doc.scrollLeft - ee) > 1 && (T = !0)), !T)
          break;
      }
      return k;
    }
    function ite(c, p) {
      var b = N_(c, p);
      b.scrollTop != null && Bp(c, b.scrollTop), b.scrollLeft != null && Sc(c, b.scrollLeft);
    }
    function N_(c, p) {
      var b = c.display, v = ad(c.display);
      p.top < 0 && (p.top = 0);
      var k = c.curOp && c.curOp.scrollTop != null ? c.curOp.scrollTop : b.scroller.scrollTop, O = b_(c), T = {};
      p.bottom - p.top > O && (p.bottom = p.top + O);
      var D = c.doc.height + v_(b), I = p.top < v, B = p.bottom > D - v;
      if (p.top < k)
        T.scrollTop = I ? 0 : p.top;
      else if (p.bottom > k + O) {
        var G = Math.min(p.top, (B ? D : p.bottom) - O);
        G != k && (T.scrollTop = G);
      }
      var ee = c.options.fixedGutter ? 0 : b.gutters.offsetWidth, re = c.curOp && c.curOp.scrollLeft != null ? c.curOp.scrollLeft : b.scroller.scrollLeft - ee, ie = kc(c) - b.gutters.offsetWidth, fe = p.right - p.left > ie;
      return fe && (p.right = p.left + ie), p.left < 10 ? T.scrollLeft = 0 : p.left < re ? T.scrollLeft = Math.max(0, p.left + ee - (fe ? 0 : 10)) : p.right > ie + re - 3 && (T.scrollLeft = p.right + (fe ? 0 : 10) - ie), T;
    }
    function A_(c, p) {
      p != null && (Ov(c), c.curOp.scrollTop = (c.curOp.scrollTop == null ? c.doc.scrollTop : c.curOp.scrollTop) + p);
    }
    function cd(c) {
      Ov(c);
      var p = c.getCursor();
      c.curOp.scrollToPos = { from: p, to: p, margin: c.options.cursorScrollMargin };
    }
    function Fp(c, p, b) {
      (p != null || b != null) && Ov(c), p != null && (c.curOp.scrollLeft = p), b != null && (c.curOp.scrollTop = b);
    }
    function rte(c, p) {
      Ov(c), c.curOp.scrollToPos = p;
    }
    function Ov(c) {
      var p = c.curOp.scrollToPos;
      if (p) {
        c.curOp.scrollToPos = null;
        var b = S9(c, p.from), v = S9(c, p.to);
        D9(c, b, v, p.margin);
      }
    }
    function D9(c, p, b, v) {
      var k = N_(c, {
        left: Math.min(p.left, b.left),
        top: Math.min(p.top, b.top) - v,
        right: Math.max(p.right, b.right),
        bottom: Math.max(p.bottom, b.bottom) + v
      });
      Fp(c, k.scrollLeft, k.scrollTop);
    }
    function Bp(c, p) {
      Math.abs(c.doc.scrollTop - p) < 2 || (r || P_(c, { top: p }), P9(c, p, !0), r && P_(c), Hp(c, 100));
    }
    function P9(c, p, b) {
      p = Math.max(0, Math.min(c.display.scroller.scrollHeight - c.display.scroller.clientHeight, p)), !(c.display.scroller.scrollTop == p && !b) && (c.doc.scrollTop = p, c.display.scrollbars.setScrollTop(p), c.display.scroller.scrollTop != p && (c.display.scroller.scrollTop = p));
    }
    function Sc(c, p, b, v) {
      p = Math.max(0, Math.min(p, c.display.scroller.scrollWidth - c.display.scroller.clientWidth)), !((b ? p == c.doc.scrollLeft : Math.abs(c.doc.scrollLeft - p) < 2) && !v) && (c.doc.scrollLeft = p, F9(c), c.display.scroller.scrollLeft != p && (c.display.scroller.scrollLeft = p), c.display.scrollbars.setScrollLeft(p));
    }
    function zp(c) {
      var p = c.display, b = p.gutters.offsetWidth, v = Math.round(c.doc.height + v_(c.display));
      return {
        clientHeight: p.scroller.clientHeight,
        viewHeight: p.wrapper.clientHeight,
        scrollWidth: p.scroller.scrollWidth,
        clientWidth: p.scroller.clientWidth,
        viewWidth: p.wrapper.clientWidth,
        barLeft: c.options.fixedGutter ? b : 0,
        docHeight: v,
        scrollHeight: v + ta(c) + p.barHeight,
        nativeBarWidth: p.nativeBarWidth,
        gutterWidth: b
      };
    }
    var Cc = function(c, p, b) {
      this.cm = b;
      var v = this.vert = R("div", [R("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"), k = this.horiz = R("div", [R("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
      v.tabIndex = k.tabIndex = -1, c(v), c(k), tt(v, "scroll", function() {
        v.clientHeight && p(v.scrollTop, "vertical");
      }), tt(k, "scroll", function() {
        k.clientWidth && p(k.scrollLeft, "horizontal");
      }), this.checkedZeroWidth = !1, l && u < 8 && (this.horiz.style.minHeight = this.vert.style.minWidth = "18px");
    };
    Cc.prototype.update = function(c) {
      var p = c.scrollWidth > c.clientWidth + 1, b = c.scrollHeight > c.clientHeight + 1, v = c.nativeBarWidth;
      if (b) {
        this.vert.style.display = "block", this.vert.style.bottom = p ? v + "px" : "0";
        var k = c.viewHeight - (p ? v : 0);
        this.vert.firstChild.style.height = Math.max(0, c.scrollHeight - c.clientHeight + k) + "px";
      } else
        this.vert.scrollTop = 0, this.vert.style.display = "", this.vert.firstChild.style.height = "0";
      if (p) {
        this.horiz.style.display = "block", this.horiz.style.right = b ? v + "px" : "0", this.horiz.style.left = c.barLeft + "px";
        var O = c.viewWidth - c.barLeft - (b ? v : 0);
        this.horiz.firstChild.style.width = Math.max(0, c.scrollWidth - c.clientWidth + O) + "px";
      } else
        this.horiz.style.display = "", this.horiz.firstChild.style.width = "0";
      return !this.checkedZeroWidth && c.clientHeight > 0 && (v == 0 && this.zeroWidthHack(), this.checkedZeroWidth = !0), { right: b ? v : 0, bottom: p ? v : 0 };
    }, Cc.prototype.setScrollLeft = function(c) {
      this.horiz.scrollLeft != c && (this.horiz.scrollLeft = c), this.disableHoriz && this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
    }, Cc.prototype.setScrollTop = function(c) {
      this.vert.scrollTop != c && (this.vert.scrollTop = c), this.disableVert && this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
    }, Cc.prototype.zeroWidthHack = function() {
      var c = M && !x ? "12px" : "18px";
      this.horiz.style.height = this.vert.style.width = c, this.horiz.style.visibility = this.vert.style.visibility = "hidden", this.disableHoriz = new pt(), this.disableVert = new pt();
    }, Cc.prototype.enableZeroWidthBar = function(c, p, b) {
      c.style.visibility = "";
      function v() {
        var k = c.getBoundingClientRect(), O = b == "vert" ? document.elementFromPoint(k.right - 1, (k.top + k.bottom) / 2) : document.elementFromPoint((k.right + k.left) / 2, k.bottom - 1);
        O != c ? c.style.visibility = "hidden" : p.set(1e3, v);
      }
      p.set(1e3, v);
    }, Cc.prototype.clear = function() {
      var c = this.horiz.parentNode;
      c.removeChild(this.horiz), c.removeChild(this.vert);
    };
    var Wp = function() {
    };
    Wp.prototype.update = function() {
      return { bottom: 0, right: 0 };
    }, Wp.prototype.setScrollLeft = function() {
    }, Wp.prototype.setScrollTop = function() {
    }, Wp.prototype.clear = function() {
    };
    function fd(c, p) {
      p || (p = zp(c));
      var b = c.display.barWidth, v = c.display.barHeight;
      I9(c, p);
      for (var k = 0; k < 4 && b != c.display.barWidth || v != c.display.barHeight; k++)
        b != c.display.barWidth && c.options.lineWrapping && xv(c), I9(c, zp(c)), b = c.display.barWidth, v = c.display.barHeight;
    }
    function I9(c, p) {
      var b = c.display, v = b.scrollbars.update(p);
      b.sizer.style.paddingRight = (b.barWidth = v.right) + "px", b.sizer.style.paddingBottom = (b.barHeight = v.bottom) + "px", b.heightForcer.style.borderBottom = v.bottom + "px solid transparent", v.right && v.bottom ? (b.scrollbarFiller.style.display = "block", b.scrollbarFiller.style.height = v.bottom + "px", b.scrollbarFiller.style.width = v.right + "px") : b.scrollbarFiller.style.display = "", v.bottom && c.options.coverGutterNextToScrollbar && c.options.fixedGutter ? (b.gutterFiller.style.display = "block", b.gutterFiller.style.height = v.bottom + "px", b.gutterFiller.style.width = p.gutterWidth + "px") : b.gutterFiller.style.display = "";
    }
    var L9 = { native: Cc, null: Wp };
    function R9(c) {
      c.display.scrollbars && (c.display.scrollbars.clear(), c.display.scrollbars.addClass && Q(c.display.wrapper, c.display.scrollbars.addClass)), c.display.scrollbars = new L9[c.options.scrollbarStyle](function(p) {
        c.display.wrapper.insertBefore(p, c.display.scrollbarFiller), tt(p, "mousedown", function() {
          c.state.focused && setTimeout(function() {
            return c.display.input.focus();
          }, 0);
        }), p.setAttribute("cm-not-content", "true");
      }, function(p, b) {
        b == "horizontal" ? Sc(c, p) : Bp(c, p);
      }, c), c.display.scrollbars.addClass && se(c.display.wrapper, c.display.scrollbars.addClass);
    }
    var ste = 0;
    function Ec(c) {
      c.curOp = {
        cm: c,
        viewChanged: !1,
        // Flag that indicates that lines might need to be redrawn
        startHeight: c.doc.height,
        // Used to detect need to update scrollbar
        forceUpdate: !1,
        // Used to force a redraw
        updateInput: 0,
        // Whether to reset the input textarea
        typing: !1,
        // Whether this reset should be careful to leave existing text (for compositing)
        changeObjs: null,
        // Accumulated changes, for firing change events
        cursorActivityHandlers: null,
        // Set of handlers to fire cursorActivity on
        cursorActivityCalled: 0,
        // Tracks which cursorActivity handlers have been called already
        selectionChanged: !1,
        // Whether the selection needs to be redrawn
        updateMaxLine: !1,
        // Set when the widest line needs to be determined anew
        scrollLeft: null,
        scrollTop: null,
        // Intermediate scroll position, not pushed to DOM yet
        scrollToPos: null,
        // Used to scroll to a specific position
        focus: !1,
        id: ++ste,
        // Unique ID
        markArrays: null
        // Used by addMarkedSpan
      }, Lee(c.curOp);
    }
    function Tc(c) {
      var p = c.curOp;
      p && jee(p, function(b) {
        for (var v = 0; v < b.ops.length; v++)
          b.ops[v].cm.curOp = null;
        ote(b);
      });
    }
    function ote(c) {
      for (var p = c.ops, b = 0; b < p.length; b++)
        ate(p[b]);
      for (var v = 0; v < p.length; v++)
        lte(p[v]);
      for (var k = 0; k < p.length; k++)
        ute(p[k]);
      for (var O = 0; O < p.length; O++)
        cte(p[O]);
      for (var T = 0; T < p.length; T++)
        fte(p[T]);
    }
    function ate(c) {
      var p = c.cm, b = p.display;
      hte(p), c.updateMaxLine && m_(p), c.mustUpdate = c.viewChanged || c.forceUpdate || c.scrollTop != null || c.scrollToPos && (c.scrollToPos.from.line < b.viewFrom || c.scrollToPos.to.line >= b.viewTo) || b.maxLineChanged && p.options.lineWrapping, c.update = c.mustUpdate && new Sv(p, c.mustUpdate && { top: c.scrollTop, ensure: c.scrollToPos }, c.forceUpdate);
    }
    function lte(c) {
      c.updatedDisplay = c.mustUpdate && D_(c.cm, c.update);
    }
    function ute(c) {
      var p = c.cm, b = p.display;
      c.updatedDisplay && xv(p), c.barMeasure = zp(p), b.maxLineChanged && !p.options.lineWrapping && (c.adjustWidthTo = v9(p, b.maxLine, b.maxLine.text.length).left + 3, p.display.sizerWidth = c.adjustWidthTo, c.barMeasure.scrollWidth = Math.max(b.scroller.clientWidth, b.sizer.offsetLeft + c.adjustWidthTo + ta(p) + p.display.barWidth), c.maxScrollLeft = Math.max(0, b.sizer.offsetLeft + c.adjustWidthTo - kc(p))), (c.updatedDisplay || c.selectionChanged) && (c.preparedSelection = b.input.prepareSelection());
    }
    function cte(c) {
      var p = c.cm;
      c.adjustWidthTo != null && (p.display.sizer.style.minWidth = c.adjustWidthTo + "px", c.maxScrollLeft < p.doc.scrollLeft && Sc(p, Math.min(p.display.scroller.scrollLeft, c.maxScrollLeft), !0), p.display.maxLineChanged = !1);
      var b = c.focus && c.focus == te(oe(p));
      c.preparedSelection && p.display.input.showSelection(c.preparedSelection, b), (c.updatedDisplay || c.startHeight != p.doc.height) && fd(p, c.barMeasure), c.updatedDisplay && L_(p, c.barMeasure), c.selectionChanged && T_(p), p.state.focused && c.updateInput && p.display.input.reset(c.typing), b && N9(c.cm);
    }
    function fte(c) {
      var p = c.cm, b = p.display, v = p.doc;
      if (c.updatedDisplay && j9(p, c.update), b.wheelStartX != null && (c.scrollTop != null || c.scrollLeft != null || c.scrollToPos) && (b.wheelStartX = b.wheelStartY = null), c.scrollTop != null && P9(p, c.scrollTop, c.forceScroll), c.scrollLeft != null && Sc(p, c.scrollLeft, !0, !0), c.scrollToPos) {
        var k = nte(
          p,
          gt(v, c.scrollToPos.from),
          gt(v, c.scrollToPos.to),
          c.scrollToPos.margin
        );
        tte(p, k);
      }
      var O = c.maybeHiddenMarkers, T = c.maybeUnhiddenMarkers;
      if (O)
        for (var D = 0; D < O.length; ++D)
          O[D].lines.length || Fn(O[D], "hide");
      if (T)
        for (var I = 0; I < T.length; ++I)
          T[I].lines.length && Fn(T[I], "unhide");
      b.wrapper.offsetHeight && (v.scrollTop = p.display.scroller.scrollTop), c.changeObjs && Fn(p, "changes", p, c.changeObjs), c.update && c.update.finish();
    }
    function fs(c, p) {
      if (c.curOp)
        return p();
      Ec(c);
      try {
        return p();
      } finally {
        Tc(c);
      }
    }
    function Ci(c, p) {
      return function() {
        if (c.curOp)
          return p.apply(c, arguments);
        Ec(c);
        try {
          return p.apply(c, arguments);
        } finally {
          Tc(c);
        }
      };
    }
    function br(c) {
      return function() {
        if (this.curOp)
          return c.apply(this, arguments);
        Ec(this);
        try {
          return c.apply(this, arguments);
        } finally {
          Tc(this);
        }
      };
    }
    function Ei(c) {
      return function() {
        var p = this.cm;
        if (!p || p.curOp)
          return c.apply(this, arguments);
        Ec(p);
        try {
          return c.apply(this, arguments);
        } finally {
          Tc(p);
        }
      };
    }
    function Hp(c, p) {
      c.doc.highlightFrontier < c.display.viewTo && c.state.highlight.set(p, Re(dte, c));
    }
    function dte(c) {
      var p = c.doc;
      if (!(p.highlightFrontier >= c.display.viewTo)) {
        var b = +/* @__PURE__ */ new Date() + c.options.workTime, v = Ap(c, p.highlightFrontier), k = [];
        p.iter(v.line, Math.min(p.first + p.size, c.display.viewTo + 500), function(O) {
          if (v.line >= c.display.viewFrom) {
            var T = O.styles, D = O.text.length > c.options.maxHighlightLength ? Nn(p.mode, v.state) : null, I = U8(c, O, v, !0);
            D && (v.state = D), O.styles = I.styles;
            var B = O.styleClasses, G = I.classes;
            G ? O.styleClasses = G : B && (O.styleClasses = null);
            for (var ee = !T || T.length != O.styles.length || B != G && (!B || !G || B.bgClass != G.bgClass || B.textClass != G.textClass), re = 0; !ee && re < T.length; ++re)
              ee = T[re] != O.styles[re];
            ee && k.push(v.line), O.stateAfter = v.save(), v.nextLine();
          } else
            O.text.length <= c.options.maxHighlightLength && u_(c, O.text, v), O.stateAfter = v.line % 5 == 0 ? v.save() : null, v.nextLine();
          if (+/* @__PURE__ */ new Date() > b)
            return Hp(c, c.options.workDelay), !0;
        }), p.highlightFrontier = v.line, p.modeFrontier = Math.max(p.modeFrontier, v.line), k.length && fs(c, function() {
          for (var O = 0; O < k.length; O++)
            Yl(c, k[O], "text");
        });
      }
    }
    var Sv = function(c, p, b) {
      var v = c.display;
      this.viewport = p, this.visible = _v(v, c.doc, p), this.editorIsHidden = !v.wrapper.offsetWidth, this.wrapperHeight = v.wrapper.clientHeight, this.wrapperWidth = v.wrapper.clientWidth, this.oldDisplayWidth = kc(c), this.force = b, this.dims = O_(c), this.events = [];
    };
    Sv.prototype.signal = function(c, p) {
      us(c, p) && this.events.push(arguments);
    }, Sv.prototype.finish = function() {
      for (var c = 0; c < this.events.length; c++)
        Fn.apply(null, this.events[c]);
    };
    function hte(c) {
      var p = c.display;
      !p.scrollbarsClipped && p.scroller.offsetWidth && (p.nativeBarWidth = p.scroller.offsetWidth - p.scroller.clientWidth, p.heightForcer.style.height = ta(c) + "px", p.sizer.style.marginBottom = -p.nativeBarWidth + "px", p.sizer.style.borderRightWidth = ta(c) + "px", p.scrollbarsClipped = !0);
    }
    function pte(c) {
      if (c.hasFocus())
        return null;
      var p = te(oe(c));
      if (!p || !K(c.display.lineDiv, p))
        return null;
      var b = { activeElt: p };
      if (window.getSelection) {
        var v = pe(c).getSelection();
        v.anchorNode && v.extend && K(c.display.lineDiv, v.anchorNode) && (b.anchorNode = v.anchorNode, b.anchorOffset = v.anchorOffset, b.focusNode = v.focusNode, b.focusOffset = v.focusOffset);
      }
      return b;
    }
    function mte(c) {
      if (!(!c || !c.activeElt || c.activeElt == te(le(c.activeElt))) && (c.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(c.activeElt.nodeName) && c.anchorNode && K(document.body, c.anchorNode) && K(document.body, c.focusNode))) {
        var p = c.activeElt.ownerDocument, b = p.defaultView.getSelection(), v = p.createRange();
        v.setEnd(c.anchorNode, c.anchorOffset), v.collapse(!1), b.removeAllRanges(), b.addRange(v), b.extend(c.focusNode, c.focusOffset);
      }
    }
    function D_(c, p) {
      var b = c.display, v = c.doc;
      if (p.editorIsHidden)
        return Vl(c), !1;
      if (!p.force && p.visible.from >= b.viewFrom && p.visible.to <= b.viewTo && (b.updateLineNumbers == null || b.updateLineNumbers >= b.viewTo) && b.renderedView == b.view && $9(c) == 0)
        return !1;
      B9(c) && (Vl(c), p.dims = O_(c));
      var k = v.first + v.size, O = Math.max(p.visible.from - c.options.viewportMargin, v.first), T = Math.min(k, p.visible.to + c.options.viewportMargin);
      b.viewFrom < O && O - b.viewFrom < 20 && (O = Math.max(v.first, b.viewFrom)), b.viewTo > T && b.viewTo - T < 20 && (T = Math.min(k, b.viewTo)), Ga && (O = h_(c.doc, O), T = s9(c.doc, T));
      var D = O != b.viewFrom || T != b.viewTo || b.lastWrapHeight != p.wrapperHeight || b.lastWrapWidth != p.wrapperWidth;
      Jee(c, O, T), b.viewOffset = Ka(Fe(c.doc, b.viewFrom)), c.display.mover.style.top = b.viewOffset + "px";
      var I = $9(c);
      if (!D && I == 0 && !p.force && b.renderedView == b.view && (b.updateLineNumbers == null || b.updateLineNumbers >= b.viewTo))
        return !1;
      var B = pte(c);
      return I > 4 && (b.lineDiv.style.display = "none"), gte(c, b.updateLineNumbers, p.dims), I > 4 && (b.lineDiv.style.display = ""), b.renderedView = b.view, mte(B), V(b.cursorDiv), V(b.selectionDiv), b.gutters.style.height = b.sizer.style.minHeight = 0, D && (b.lastWrapHeight = p.wrapperHeight, b.lastWrapWidth = p.wrapperWidth, Hp(c, 400)), b.updateLineNumbers = null, !0;
    }
    function j9(c, p) {
      for (var b = p.viewport, v = !0; ; v = !1) {
        if (!v || !c.options.lineWrapping || p.oldDisplayWidth == kc(c)) {
          if (b && b.top != null && (b = { top: Math.min(c.doc.height + v_(c.display) - b_(c), b.top) }), p.visible = _v(c.display, c.doc, b), p.visible.from >= c.display.viewFrom && p.visible.to <= c.display.viewTo)
            break;
        } else v && (p.visible = _v(c.display, c.doc, b));
        if (!D_(c, p))
          break;
        xv(c);
        var k = zp(c);
        jp(c), fd(c, k), L_(c, k), p.force = !1;
      }
      p.signal(c, "update", c), (c.display.viewFrom != c.display.reportedViewFrom || c.display.viewTo != c.display.reportedViewTo) && (p.signal(c, "viewportChange", c, c.display.viewFrom, c.display.viewTo), c.display.reportedViewFrom = c.display.viewFrom, c.display.reportedViewTo = c.display.viewTo);
    }
    function P_(c, p) {
      var b = new Sv(c, p);
      if (D_(c, b)) {
        xv(c), j9(c, b);
        var v = zp(c);
        jp(c), fd(c, v), L_(c, v), b.finish();
      }
    }
    function gte(c, p, b) {
      var v = c.display, k = c.options.lineNumbers, O = v.lineDiv, T = O.firstChild;
      function D(fe) {
        var de = fe.nextSibling;
        return f && M && c.display.currentWheelTarget == fe ? fe.style.display = "none" : fe.parentNode.removeChild(fe), de;
      }
      for (var I = v.view, B = v.viewFrom, G = 0; G < I.length; G++) {
        var ee = I[G];
        if (!ee.hidden) if (!ee.node || ee.node.parentNode != O) {
          var re = Hee(c, ee, B, b);
          O.insertBefore(re, T);
        } else {
          for (; T != ee.node; )
            T = D(T);
          var ie = k && p != null && p <= B && ee.lineNumber;
          ee.changes && (ge(ee.changes, "gutter") > -1 && (ie = !1), c9(c, ee, B, b)), ie && (V(ee.lineNumber), ee.lineNumber.appendChild(document.createTextNode(o_(c.options, B)))), T = ee.node.nextSibling;
        }
        B += ee.size;
      }
      for (; T; )
        T = D(T);
    }
    function I_(c) {
      var p = c.gutters.offsetWidth;
      c.sizer.style.marginLeft = p + "px", Si(c, "gutterChanged", c);
    }
    function L_(c, p) {
      c.display.sizer.style.minHeight = p.docHeight + "px", c.display.heightForcer.style.top = p.docHeight + "px", c.display.gutters.style.height = p.docHeight + c.display.barHeight + ta(c) + "px";
    }
    function F9(c) {
      var p = c.display, b = p.view;
      if (!(!p.alignWidgets && (!p.gutters.firstChild || !c.options.fixedGutter))) {
        for (var v = S_(p) - p.scroller.scrollLeft + c.doc.scrollLeft, k = p.gutters.offsetWidth, O = v + "px", T = 0; T < b.length; T++)
          if (!b[T].hidden) {
            c.options.fixedGutter && (b[T].gutter && (b[T].gutter.style.left = O), b[T].gutterBackground && (b[T].gutterBackground.style.left = O));
            var D = b[T].alignable;
            if (D)
              for (var I = 0; I < D.length; I++)
                D[I].style.left = O;
          }
        c.options.fixedGutter && (p.gutters.style.left = v + k + "px");
      }
    }
    function B9(c) {
      if (!c.options.lineNumbers)
        return !1;
      var p = c.doc, b = o_(c.options, p.first + p.size - 1), v = c.display;
      if (b.length != v.lineNumChars) {
        var k = v.measure.appendChild(R(
          "div",
          [R("div", b)],
          "CodeMirror-linenumber CodeMirror-gutter-elt"
        )), O = k.firstChild.offsetWidth, T = k.offsetWidth - O;
        return v.lineGutter.style.width = "", v.lineNumInnerWidth = Math.max(O, v.lineGutter.offsetWidth - T) + 1, v.lineNumWidth = v.lineNumInnerWidth + T, v.lineNumChars = v.lineNumInnerWidth ? b.length : -1, v.lineGutter.style.width = v.lineNumWidth + "px", I_(c.display), !0;
      }
      return !1;
    }
    function R_(c, p) {
      for (var b = [], v = !1, k = 0; k < c.length; k++) {
        var O = c[k], T = null;
        if (typeof O != "string" && (T = O.style, O = O.className), O == "CodeMirror-linenumbers")
          if (p)
            v = !0;
          else
            continue;
        b.push({ className: O, style: T });
      }
      return p && !v && b.push({ className: "CodeMirror-linenumbers", style: null }), b;
    }
    function z9(c) {
      var p = c.gutters, b = c.gutterSpecs;
      V(p), c.lineGutter = null;
      for (var v = 0; v < b.length; ++v) {
        var k = b[v], O = k.className, T = k.style, D = p.appendChild(R("div", null, "CodeMirror-gutter " + O));
        T && (D.style.cssText = T), O == "CodeMirror-linenumbers" && (c.lineGutter = D, D.style.width = (c.lineNumWidth || 1) + "px");
      }
      p.style.display = b.length ? "" : "none", I_(c);
    }
    function Qp(c) {
      z9(c.display), jr(c), F9(c);
    }
    function vte(c, p, b, v) {
      var k = this;
      this.input = b, k.scrollbarFiller = R("div", null, "CodeMirror-scrollbar-filler"), k.scrollbarFiller.setAttribute("cm-not-content", "true"), k.gutterFiller = R("div", null, "CodeMirror-gutter-filler"), k.gutterFiller.setAttribute("cm-not-content", "true"), k.lineDiv = q("div", null, "CodeMirror-code"), k.selectionDiv = R("div", null, null, "position: relative; z-index: 1"), k.cursorDiv = R("div", null, "CodeMirror-cursors"), k.measure = R("div", null, "CodeMirror-measure"), k.lineMeasure = R("div", null, "CodeMirror-measure"), k.lineSpace = q(
        "div",
        [k.measure, k.lineMeasure, k.selectionDiv, k.cursorDiv, k.lineDiv],
        null,
        "position: relative; outline: none"
      );
      var O = q("div", [k.lineSpace], "CodeMirror-lines");
      k.mover = R("div", [O], null, "position: relative"), k.sizer = R("div", [k.mover], "CodeMirror-sizer"), k.sizerWidth = null, k.heightForcer = R("div", null, null, "position: absolute; height: " + De + "px; width: 1px;"), k.gutters = R("div", null, "CodeMirror-gutters"), k.lineGutter = null, k.scroller = R("div", [k.sizer, k.heightForcer, k.gutters], "CodeMirror-scroll"), k.scroller.setAttribute("tabIndex", "-1"), k.wrapper = R("div", [k.scrollbarFiller, k.gutterFiller, k.scroller], "CodeMirror"), h && m === 105 && (k.wrapper.style.clipPath = "inset(0px)"), k.wrapper.setAttribute("translate", "no"), l && u < 8 && (k.gutters.style.zIndex = -1, k.scroller.style.paddingRight = 0), !f && !(r && E) && (k.scroller.draggable = !0), c && (c.appendChild ? c.appendChild(k.wrapper) : c(k.wrapper)), k.viewFrom = k.viewTo = p.first, k.reportedViewFrom = k.reportedViewTo = p.first, k.view = [], k.renderedView = null, k.externalMeasured = null, k.viewOffset = 0, k.lastWrapHeight = k.lastWrapWidth = 0, k.updateLineNumbers = null, k.nativeBarWidth = k.barHeight = k.barWidth = 0, k.scrollbarsClipped = !1, k.lineNumWidth = k.lineNumInnerWidth = k.lineNumChars = null, k.alignWidgets = !1, k.cachedCharWidth = k.cachedTextHeight = k.cachedPaddingH = null, k.maxLine = null, k.maxLineLength = 0, k.maxLineChanged = !1, k.wheelDX = k.wheelDY = k.wheelStartX = k.wheelStartY = null, k.shift = !1, k.selForContextMenu = null, k.activeTouch = null, k.gutterSpecs = R_(v.gutters, v.lineNumbers), z9(k), b.init(k);
    }
    var Cv = 0, el = null;
    l ? el = -0.53 : r ? el = 15 : h ? el = -0.7 : w && (el = -1 / 3);
    function W9(c) {
      var p = c.wheelDeltaX, b = c.wheelDeltaY;
      return p == null && c.detail && c.axis == c.HORIZONTAL_AXIS && (p = c.detail), b == null && c.detail && c.axis == c.VERTICAL_AXIS ? b = c.detail : b == null && (b = c.wheelDelta), { x: p, y: b };
    }
    function bte(c) {
      var p = W9(c);
      return p.x *= el, p.y *= el, p;
    }
    function H9(c, p) {
      h && m == 102 && (c.display.chromeScrollHack == null ? c.display.sizer.style.pointerEvents = "none" : clearTimeout(c.display.chromeScrollHack), c.display.chromeScrollHack = setTimeout(function() {
        c.display.chromeScrollHack = null, c.display.sizer.style.pointerEvents = "";
      }, 100));
      var b = W9(p), v = b.x, k = b.y, O = el;
      p.deltaMode === 0 && (v = p.deltaX, k = p.deltaY, O = 1);
      var T = c.display, D = T.scroller, I = D.scrollWidth > D.clientWidth, B = D.scrollHeight > D.clientHeight;
      if (v && I || k && B) {
        if (k && M && f) {
          e: for (var G = p.target, ee = T.view; G != D; G = G.parentNode)
            for (var re = 0; re < ee.length; re++)
              if (ee[re].node == G) {
                c.display.currentWheelTarget = G;
                break e;
              }
        }
        if (v && !r && !g && O != null) {
          k && B && Bp(c, Math.max(0, D.scrollTop + k * O)), Sc(c, Math.max(0, D.scrollLeft + v * O)), (!k || k && B) && Gn(p), T.wheelStartX = null;
          return;
        }
        if (k && O != null) {
          var ie = k * O, fe = c.doc.scrollTop, de = fe + T.wrapper.clientHeight;
          ie < 0 ? fe = Math.max(0, fe + ie - 50) : de = Math.min(c.doc.height, de + ie + 50), P_(c, { top: fe, bottom: de });
        }
        Cv < 20 && p.deltaMode !== 0 && (T.wheelStartX == null ? (T.wheelStartX = D.scrollLeft, T.wheelStartY = D.scrollTop, T.wheelDX = v, T.wheelDY = k, setTimeout(function() {
          if (T.wheelStartX != null) {
            var ke = D.scrollLeft - T.wheelStartX, Se = D.scrollTop - T.wheelStartY, Ee = Se && T.wheelDY && Se / T.wheelDY || ke && T.wheelDX && ke / T.wheelDX;
            T.wheelStartX = T.wheelStartY = null, Ee && (el = (el * Cv + Ee) / (Cv + 1), ++Cv);
          }
        }, 200)) : (T.wheelDX += v, T.wheelDY += k));
      }
    }
    var Es = function(c, p) {
      this.ranges = c, this.primIndex = p;
    };
    Es.prototype.primary = function() {
      return this.ranges[this.primIndex];
    }, Es.prototype.equals = function(c) {
      if (c == this)
        return !0;
      if (c.primIndex != this.primIndex || c.ranges.length != this.ranges.length)
        return !1;
      for (var p = 0; p < this.ranges.length; p++) {
        var b = this.ranges[p], v = c.ranges[p];
        if (!a_(b.anchor, v.anchor) || !a_(b.head, v.head))
          return !1;
      }
      return !0;
    }, Es.prototype.deepCopy = function() {
      for (var c = [], p = 0; p < this.ranges.length; p++)
        c[p] = new Zt(l_(this.ranges[p].anchor), l_(this.ranges[p].head));
      return new Es(c, this.primIndex);
    }, Es.prototype.somethingSelected = function() {
      for (var c = 0; c < this.ranges.length; c++)
        if (!this.ranges[c].empty())
          return !0;
      return !1;
    }, Es.prototype.contains = function(c, p) {
      p || (p = c);
      for (var b = 0; b < this.ranges.length; b++) {
        var v = this.ranges[b];
        if (mt(p, v.from()) >= 0 && mt(c, v.to()) <= 0)
          return b;
      }
      return -1;
    };
    var Zt = function(c, p) {
      this.anchor = c, this.head = p;
    };
    Zt.prototype.from = function() {
      return uv(this.anchor, this.head);
    }, Zt.prototype.to = function() {
      return lv(this.anchor, this.head);
    }, Zt.prototype.empty = function() {
      return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
    };
    function To(c, p, b) {
      var v = c && c.options.selectionsMayTouch, k = p[b];
      p.sort(function(re, ie) {
        return mt(re.from(), ie.from());
      }), b = ge(p, k);
      for (var O = 1; O < p.length; O++) {
        var T = p[O], D = p[O - 1], I = mt(D.to(), T.from());
        if (v && !T.empty() ? I > 0 : I >= 0) {
          var B = uv(D.from(), T.from()), G = lv(D.to(), T.to()), ee = D.empty() ? T.from() == T.head : D.from() == D.head;
          O <= b && --b, p.splice(--O, 2, new Zt(ee ? G : B, ee ? B : G));
        }
      }
      return new Es(p, b);
    }
    function Xl(c, p) {
      return new Es([new Zt(c, p || c)], 0);
    }
    function Gl(c) {
      return c.text ? ye(
        c.from.line + c.text.length - 1,
        Be(c.text).length + (c.text.length == 1 ? c.from.ch : 0)
      ) : c.to;
    }
    function Q9(c, p) {
      if (mt(c, p.from) < 0)
        return c;
      if (mt(c, p.to) <= 0)
        return Gl(p);
      var b = c.line + p.text.length - (p.to.line - p.from.line) - 1, v = c.ch;
      return c.line == p.to.line && (v += Gl(p).ch - p.to.ch), ye(b, v);
    }
    function j_(c, p) {
      for (var b = [], v = 0; v < c.sel.ranges.length; v++) {
        var k = c.sel.ranges[v];
        b.push(new Zt(
          Q9(k.anchor, p),
          Q9(k.head, p)
        ));
      }
      return To(c.cm, b, c.sel.primIndex);
    }
    function U9(c, p, b) {
      return c.line == p.line ? ye(b.line, c.ch - p.ch + b.ch) : ye(b.line + (c.line - p.line), c.ch);
    }
    function yte(c, p, b) {
      for (var v = [], k = ye(c.first, 0), O = k, T = 0; T < p.length; T++) {
        var D = p[T], I = U9(D.from, k, O), B = U9(Gl(D), k, O);
        if (k = D.to, O = B, b == "around") {
          var G = c.sel.ranges[T], ee = mt(G.head, G.anchor) < 0;
          v[T] = new Zt(ee ? B : I, ee ? I : B);
        } else
          v[T] = new Zt(I, I);
      }
      return new Es(v, c.sel.primIndex);
    }
    function F_(c) {
      c.doc.mode = _e(c.options, c.doc.modeOption), Up(c);
    }
    function Up(c) {
      c.doc.iter(function(p) {
        p.stateAfter && (p.stateAfter = null), p.styles && (p.styles = null);
      }), c.doc.modeFrontier = c.doc.highlightFrontier = c.doc.first, Hp(c, 100), c.state.modeGen++, c.curOp && jr(c);
    }
    function Z9(c, p) {
      return p.from.ch == 0 && p.to.ch == 0 && Be(p.text) == "" && (!c.cm || c.cm.options.wholeLineUpdateBefore);
    }
    function B_(c, p, b, v) {
      function k(Ee) {
        return b ? b[Ee] : null;
      }
      function O(Ee, Ce, Ne) {
        Eee(Ee, Ce, Ne, v), Si(Ee, "change", Ee, p);
      }
      function T(Ee, Ce) {
        for (var Ne = [], Je = Ee; Je < Ce; ++Je)
          Ne.push(new rd(B[Je], k(Je), v));
        return Ne;
      }
      var D = p.from, I = p.to, B = p.text, G = Fe(c, D.line), ee = Fe(c, I.line), re = Be(B), ie = k(B.length - 1), fe = I.line - D.line;
      if (p.full)
        c.insert(0, T(0, B.length)), c.remove(B.length, c.size - B.length);
      else if (Z9(c, p)) {
        var de = T(0, B.length - 1);
        O(ee, ee.text, ie), fe && c.remove(D.line, fe), de.length && c.insert(D.line, de);
      } else if (G == ee)
        if (B.length == 1)
          O(G, G.text.slice(0, D.ch) + re + G.text.slice(I.ch), ie);
        else {
          var ke = T(1, B.length - 1);
          ke.push(new rd(re + G.text.slice(I.ch), ie, v)), O(G, G.text.slice(0, D.ch) + B[0], k(0)), c.insert(D.line + 1, ke);
        }
      else if (B.length == 1)
        O(G, G.text.slice(0, D.ch) + B[0] + ee.text.slice(I.ch), k(0)), c.remove(D.line + 1, fe);
      else {
        O(G, G.text.slice(0, D.ch) + B[0], k(0)), O(ee, re + ee.text.slice(I.ch), ie);
        var Se = T(1, B.length - 1);
        fe > 1 && c.remove(D.line + 1, fe - 1), c.insert(D.line + 1, Se);
      }
      Si(c, "change", c, p);
    }
    function Kl(c, p, b) {
      function v(k, O, T) {
        if (k.linked)
          for (var D = 0; D < k.linked.length; ++D) {
            var I = k.linked[D];
            if (I.doc != O) {
              var B = T && I.sharedHist;
              b && !B || (p(I.doc, B), v(I.doc, k, B));
            }
          }
      }
      v(c, null, !0);
    }
    function q9(c, p) {
      if (p.cm)
        throw new Error("This document is already in use.");
      c.doc = p, p.cm = c, C_(c), F_(c), Y9(c), c.options.direction = p.direction, c.options.lineWrapping || m_(c), c.options.mode = p.modeOption, jr(c);
    }
    function Y9(c) {
      (c.doc.direction == "rtl" ? se : Q)(c.display.lineDiv, "CodeMirror-rtl");
    }
    function wte(c) {
      fs(c, function() {
        Y9(c), jr(c);
      });
    }
    function Ev(c) {
      this.done = [], this.undone = [], this.undoDepth = c ? c.undoDepth : 1 / 0, this.lastModTime = this.lastSelTime = 0, this.lastOp = this.lastSelOp = null, this.lastOrigin = this.lastSelOrigin = null, this.generation = this.maxGeneration = c ? c.maxGeneration : 1;
    }
    function z_(c, p) {
      var b = { from: l_(p.from), to: Gl(p), text: So(c, p.from, p.to) };
      return G9(c, b, p.from.line, p.to.line + 1), Kl(c, function(v) {
        return G9(v, b, p.from.line, p.to.line + 1);
      }, !0), b;
    }
    function V9(c) {
      for (; c.length; ) {
        var p = Be(c);
        if (p.ranges)
          c.pop();
        else
          break;
      }
    }
    function kte(c, p) {
      if (p)
        return V9(c.done), Be(c.done);
      if (c.done.length && !Be(c.done).ranges)
        return Be(c.done);
      if (c.done.length > 1 && !c.done[c.done.length - 2].ranges)
        return c.done.pop(), Be(c.done);
    }
    function X9(c, p, b, v) {
      var k = c.history;
      k.undone.length = 0;
      var O = +/* @__PURE__ */ new Date(), T, D;
      if ((k.lastOp == v || k.lastOrigin == p.origin && p.origin && (p.origin.charAt(0) == "+" && k.lastModTime > O - (c.cm ? c.cm.options.historyEventDelay : 500) || p.origin.charAt(0) == "*")) && (T = kte(k, k.lastOp == v)))
        D = Be(T.changes), mt(p.from, p.to) == 0 && mt(p.from, D.to) == 0 ? D.to = Gl(p) : T.changes.push(z_(c, p));
      else {
        var I = Be(k.done);
        for ((!I || !I.ranges) && Tv(c.sel, k.done), T = {
          changes: [z_(c, p)],
          generation: k.generation
        }, k.done.push(T); k.done.length > k.undoDepth; )
          k.done.shift(), k.done[0].ranges || k.done.shift();
      }
      k.done.push(b), k.generation = ++k.maxGeneration, k.lastModTime = k.lastSelTime = O, k.lastOp = k.lastSelOp = v, k.lastOrigin = k.lastSelOrigin = p.origin, D || Fn(c, "historyAdded");
    }
    function xte(c, p, b, v) {
      var k = p.charAt(0);
      return k == "*" || k == "+" && b.ranges.length == v.ranges.length && b.somethingSelected() == v.somethingSelected() && /* @__PURE__ */ new Date() - c.history.lastSelTime <= (c.cm ? c.cm.options.historyEventDelay : 500);
    }
    function _te(c, p, b, v) {
      var k = c.history, O = v && v.origin;
      b == k.lastSelOp || O && k.lastSelOrigin == O && (k.lastModTime == k.lastSelTime && k.lastOrigin == O || xte(c, O, Be(k.done), p)) ? k.done[k.done.length - 1] = p : Tv(p, k.done), k.lastSelTime = +/* @__PURE__ */ new Date(), k.lastSelOrigin = O, k.lastSelOp = b, v && v.clearRedo !== !1 && V9(k.undone);
    }
    function Tv(c, p) {
      var b = Be(p);
      b && b.ranges && b.equals(c) || p.push(c);
    }
    function G9(c, p, b, v) {
      var k = p["spans_" + c.id], O = 0;
      c.iter(Math.max(c.first, b), Math.min(c.first + c.size, v), function(T) {
        T.markedSpans && ((k || (k = p["spans_" + c.id] = {}))[O] = T.markedSpans), ++O;
      });
    }
    function Ote(c) {
      if (!c)
        return null;
      for (var p, b = 0; b < c.length; ++b)
        c[b].marker.explicitlyCleared ? p || (p = c.slice(0, b)) : p && p.push(c[b]);
      return p ? p.length ? p : null : c;
    }
    function Ste(c, p) {
      var b = p["spans_" + c.id];
      if (!b)
        return null;
      for (var v = [], k = 0; k < p.text.length; ++k)
        v.push(Ote(b[k]));
      return v;
    }
    function K9(c, p) {
      var b = Ste(c, p), v = f_(c, p);
      if (!b)
        return v;
      if (!v)
        return b;
      for (var k = 0; k < b.length; ++k) {
        var O = b[k], T = v[k];
        if (O && T)
          e: for (var D = 0; D < T.length; ++D) {
            for (var I = T[D], B = 0; B < O.length; ++B)
              if (O[B].marker == I.marker)
                continue e;
            O.push(I);
          }
        else T && (b[k] = T);
      }
      return b;
    }
    function dd(c, p, b) {
      for (var v = [], k = 0; k < c.length; ++k) {
        var O = c[k];
        if (O.ranges) {
          v.push(b ? Es.prototype.deepCopy.call(O) : O);
          continue;
        }
        var T = O.changes, D = [];
        v.push({ changes: D });
        for (var I = 0; I < T.length; ++I) {
          var B = T[I], G = void 0;
          if (D.push({ from: B.from, to: B.to, text: B.text }), p)
            for (var ee in B)
              (G = ee.match(/^spans_(\d+)$/)) && ge(p, Number(G[1])) > -1 && (Be(D)[ee] = B[ee], delete B[ee]);
        }
      }
      return v;
    }
    function W_(c, p, b, v) {
      if (v) {
        var k = c.anchor;
        if (b) {
          var O = mt(p, k) < 0;
          O != mt(b, k) < 0 ? (k = p, p = b) : O != mt(p, b) < 0 && (p = b);
        }
        return new Zt(k, p);
      } else
        return new Zt(b || p, p);
    }
    function $v(c, p, b, v, k) {
      k == null && (k = c.cm && (c.cm.display.shift || c.extend)), er(c, new Es([W_(c.sel.primary(), p, b, k)], 0), v);
    }
    function J9(c, p, b) {
      for (var v = [], k = c.cm && (c.cm.display.shift || c.extend), O = 0; O < c.sel.ranges.length; O++)
        v[O] = W_(c.sel.ranges[O], p[O], null, k);
      var T = To(c.cm, v, c.sel.primIndex);
      er(c, T, b);
    }
    function H_(c, p, b, v) {
      var k = c.sel.ranges.slice(0);
      k[p] = b, er(c, To(c.cm, k, c.sel.primIndex), v);
    }
    function e$(c, p, b, v) {
      er(c, Xl(p, b), v);
    }
    function Cte(c, p, b) {
      var v = {
        ranges: p.ranges,
        update: function(k) {
          this.ranges = [];
          for (var O = 0; O < k.length; O++)
            this.ranges[O] = new Zt(
              gt(c, k[O].anchor),
              gt(c, k[O].head)
            );
        },
        origin: b && b.origin
      };
      return Fn(c, "beforeSelectionChange", c, v), c.cm && Fn(c.cm, "beforeSelectionChange", c.cm, v), v.ranges != p.ranges ? To(c.cm, v.ranges, v.ranges.length - 1) : p;
    }
    function t$(c, p, b) {
      var v = c.history.done, k = Be(v);
      k && k.ranges ? (v[v.length - 1] = p, Mv(c, p, b)) : er(c, p, b);
    }
    function er(c, p, b) {
      Mv(c, p, b), _te(c, c.sel, c.cm ? c.cm.curOp.id : NaN, b);
    }
    function Mv(c, p, b) {
      (us(c, "beforeSelectionChange") || c.cm && us(c.cm, "beforeSelectionChange")) && (p = Cte(c, p, b));
      var v = b && b.bias || (mt(p.primary().head, c.sel.primary().head) < 0 ? -1 : 1);
      n$(c, r$(c, p, v, !0)), !(b && b.scroll === !1) && c.cm && c.cm.getOption("readOnly") != "nocursor" && cd(c.cm);
    }
    function n$(c, p) {
      p.equals(c.sel) || (c.sel = p, c.cm && (c.cm.curOp.updateInput = 1, c.cm.curOp.selectionChanged = !0, iv(c.cm)), Si(c, "cursorActivity", c));
    }
    function i$(c) {
      n$(c, r$(c, c.sel, null, !1));
    }
    function r$(c, p, b, v) {
      for (var k, O = 0; O < p.ranges.length; O++) {
        var T = p.ranges[O], D = p.ranges.length == c.sel.ranges.length && c.sel.ranges[O], I = Nv(c, T.anchor, D && D.anchor, b, v), B = T.head == T.anchor ? I : Nv(c, T.head, D && D.head, b, v);
        (k || I != T.anchor || B != T.head) && (k || (k = p.ranges.slice(0, O)), k[O] = new Zt(I, B));
      }
      return k ? To(c.cm, k, p.primIndex) : p;
    }
    function hd(c, p, b, v, k) {
      var O = Fe(c, p.line);
      if (O.markedSpans)
        for (var T = 0; T < O.markedSpans.length; ++T) {
          var D = O.markedSpans[T], I = D.marker, B = "selectLeft" in I ? !I.selectLeft : I.inclusiveLeft, G = "selectRight" in I ? !I.selectRight : I.inclusiveRight;
          if ((D.from == null || (B ? D.from <= p.ch : D.from < p.ch)) && (D.to == null || (G ? D.to >= p.ch : D.to > p.ch))) {
            if (k && (Fn(I, "beforeCursorEnter"), I.explicitlyCleared))
              if (O.markedSpans) {
                --T;
                continue;
              } else
                break;
            if (!I.atomic)
              continue;
            if (b) {
              var ee = I.find(v < 0 ? 1 : -1), re = void 0;
              if ((v < 0 ? G : B) && (ee = s$(c, ee, -v, ee && ee.line == p.line ? O : null)), ee && ee.line == p.line && (re = mt(ee, b)) && (v < 0 ? re < 0 : re > 0))
                return hd(c, ee, p, v, k);
            }
            var ie = I.find(v < 0 ? -1 : 1);
            return (v < 0 ? B : G) && (ie = s$(c, ie, v, ie.line == p.line ? O : null)), ie ? hd(c, ie, p, v, k) : null;
          }
        }
      return p;
    }
    function Nv(c, p, b, v, k) {
      var O = v || 1, T = hd(c, p, b, O, k) || !k && hd(c, p, b, O, !0) || hd(c, p, b, -O, k) || !k && hd(c, p, b, -O, !0);
      return T || (c.cantEdit = !0, ye(c.first, 0));
    }
    function s$(c, p, b, v) {
      return b < 0 && p.ch == 0 ? p.line > c.first ? gt(c, ye(p.line - 1)) : null : b > 0 && p.ch == (v || Fe(c, p.line)).text.length ? p.line < c.first + c.size - 1 ? ye(p.line + 1, 0) : null : new ye(p.line, p.ch + b);
    }
    function o$(c) {
      c.setSelection(ye(c.firstLine(), 0), ye(c.lastLine()), It);
    }
    function a$(c, p, b) {
      var v = {
        canceled: !1,
        from: p.from,
        to: p.to,
        text: p.text,
        origin: p.origin,
        cancel: function() {
          return v.canceled = !0;
        }
      };
      return b && (v.update = function(k, O, T, D) {
        k && (v.from = gt(c, k)), O && (v.to = gt(c, O)), T && (v.text = T), D !== void 0 && (v.origin = D);
      }), Fn(c, "beforeChange", c, v), c.cm && Fn(c.cm, "beforeChange", c.cm, v), v.canceled ? (c.cm && (c.cm.curOp.updateInput = 2), null) : { from: v.from, to: v.to, text: v.text, origin: v.origin };
    }
    function pd(c, p, b) {
      if (c.cm) {
        if (!c.cm.curOp)
          return Ci(c.cm, pd)(c, p, b);
        if (c.cm.state.suppressEdits)
          return;
      }
      if (!((us(c, "beforeChange") || c.cm && us(c.cm, "beforeChange")) && (p = a$(c, p, !0), !p))) {
        var v = K8 && !b && _ee(c, p.from, p.to);
        if (v)
          for (var k = v.length - 1; k >= 0; --k)
            l$(c, { from: v[k].from, to: v[k].to, text: k ? [""] : p.text, origin: p.origin });
        else
          l$(c, p);
      }
    }
    function l$(c, p) {
      if (!(p.text.length == 1 && p.text[0] == "" && mt(p.from, p.to) == 0)) {
        var b = j_(c, p);
        X9(c, p, b, c.cm ? c.cm.curOp.id : NaN), Zp(c, p, b, f_(c, p));
        var v = [];
        Kl(c, function(k, O) {
          !O && ge(v, k.history) == -1 && (d$(k.history, p), v.push(k.history)), Zp(k, p, null, f_(k, p));
        });
      }
    }
    function Av(c, p, b) {
      var v = c.cm && c.cm.state.suppressEdits;
      if (!(v && !b)) {
        for (var k = c.history, O, T = c.sel, D = p == "undo" ? k.done : k.undone, I = p == "undo" ? k.undone : k.done, B = 0; B < D.length && (O = D[B], !(b ? O.ranges && !O.equals(c.sel) : !O.ranges)); B++)
          ;
        if (B != D.length) {
          for (k.lastOrigin = k.lastSelOrigin = null; ; )
            if (O = D.pop(), O.ranges) {
              if (Tv(O, I), b && !O.equals(c.sel)) {
                er(c, O, { clearRedo: !1 });
                return;
              }
              T = O;
            } else if (v) {
              D.push(O);
              return;
            } else
              break;
          var G = [];
          Tv(T, I), I.push({ changes: G, generation: k.generation }), k.generation = O.generation || ++k.maxGeneration;
          for (var ee = us(c, "beforeChange") || c.cm && us(c.cm, "beforeChange"), re = function(de) {
            var ke = O.changes[de];
            if (ke.origin = p, ee && !a$(c, ke, !1))
              return D.length = 0, {};
            G.push(z_(c, ke));
            var Se = de ? j_(c, ke) : Be(D);
            Zp(c, ke, Se, K9(c, ke)), !de && c.cm && c.cm.scrollIntoView({ from: ke.from, to: Gl(ke) });
            var Ee = [];
            Kl(c, function(Ce, Ne) {
              !Ne && ge(Ee, Ce.history) == -1 && (d$(Ce.history, ke), Ee.push(Ce.history)), Zp(Ce, ke, null, K9(Ce, ke));
            });
          }, ie = O.changes.length - 1; ie >= 0; --ie) {
            var fe = re(ie);
            if (fe) return fe.v;
          }
        }
      }
    }
    function u$(c, p) {
      if (p != 0 && (c.first += p, c.sel = new Es(Ie(c.sel.ranges, function(k) {
        return new Zt(
          ye(k.anchor.line + p, k.anchor.ch),
          ye(k.head.line + p, k.head.ch)
        );
      }), c.sel.primIndex), c.cm)) {
        jr(c.cm, c.first, c.first - p, p);
        for (var b = c.cm.display, v = b.viewFrom; v < b.viewTo; v++)
          Yl(c.cm, v, "gutter");
      }
    }
    function Zp(c, p, b, v) {
      if (c.cm && !c.cm.curOp)
        return Ci(c.cm, Zp)(c, p, b, v);
      if (p.to.line < c.first) {
        u$(c, p.text.length - 1 - (p.to.line - p.from.line));
        return;
      }
      if (!(p.from.line > c.lastLine())) {
        if (p.from.line < c.first) {
          var k = p.text.length - 1 - (c.first - p.from.line);
          u$(c, k), p = {
            from: ye(c.first, 0),
            to: ye(p.to.line + k, p.to.ch),
            text: [Be(p.text)],
            origin: p.origin
          };
        }
        var O = c.lastLine();
        p.to.line > O && (p = {
          from: p.from,
          to: ye(O, Fe(c, O).text.length),
          text: [p.text[0]],
          origin: p.origin
        }), p.removed = So(c, p.from, p.to), b || (b = j_(c, p)), c.cm ? Ete(c.cm, p, v) : B_(c, p, v), Mv(c, b, It), c.cantEdit && Nv(c, ye(c.firstLine(), 0)) && (c.cantEdit = !1);
      }
    }
    function Ete(c, p, b) {
      var v = c.doc, k = c.display, O = p.from, T = p.to, D = !1, I = O.line;
      c.options.lineWrapping || (I = Wt(Co(Fe(v, O.line))), v.iter(I, T.line + 1, function(ie) {
        if (ie == k.maxLine)
          return D = !0, !0;
      })), v.sel.contains(p.from, p.to) > -1 && iv(c), B_(v, p, b, T9(c)), c.options.lineWrapping || (v.iter(I, O.line + p.text.length, function(ie) {
        var fe = mv(ie);
        fe > k.maxLineLength && (k.maxLine = ie, k.maxLineLength = fe, k.maxLineChanged = !0, D = !1);
      }), D && (c.curOp.updateMaxLine = !0)), gee(v, O.line), Hp(c, 400);
      var B = p.text.length - (T.line - O.line) - 1;
      p.full ? jr(c) : O.line == T.line && p.text.length == 1 && !Z9(c.doc, p) ? Yl(c, O.line, "text") : jr(c, O.line, T.line + 1, B);
      var G = us(c, "changes"), ee = us(c, "change");
      if (ee || G) {
        var re = {
          from: O,
          to: T,
          text: p.text,
          removed: p.removed,
          origin: p.origin
        };
        ee && Si(c, "change", c, re), G && (c.curOp.changeObjs || (c.curOp.changeObjs = [])).push(re);
      }
      c.display.selForContextMenu = null;
    }
    function md(c, p, b, v, k) {
      var O;
      v || (v = b), mt(v, b) < 0 && (O = [v, b], b = O[0], v = O[1]), typeof p == "string" && (p = c.splitLines(p)), pd(c, { from: b, to: v, text: p, origin: k });
    }
    function c$(c, p, b, v) {
      b < c.line ? c.line += v : p < c.line && (c.line = p, c.ch = 0);
    }
    function f$(c, p, b, v) {
      for (var k = 0; k < c.length; ++k) {
        var O = c[k], T = !0;
        if (O.ranges) {
          O.copied || (O = c[k] = O.deepCopy(), O.copied = !0);
          for (var D = 0; D < O.ranges.length; D++)
            c$(O.ranges[D].anchor, p, b, v), c$(O.ranges[D].head, p, b, v);
          continue;
        }
        for (var I = 0; I < O.changes.length; ++I) {
          var B = O.changes[I];
          if (b < B.from.line)
            B.from = ye(B.from.line + v, B.from.ch), B.to = ye(B.to.line + v, B.to.ch);
          else if (p <= B.to.line) {
            T = !1;
            break;
          }
        }
        T || (c.splice(0, k + 1), k = 0);
      }
    }
    function d$(c, p) {
      var b = p.from.line, v = p.to.line, k = p.text.length - (v - b) - 1;
      f$(c.done, b, v, k), f$(c.undone, b, v, k);
    }
    function qp(c, p, b, v) {
      var k = p, O = p;
      return typeof p == "number" ? O = Fe(c, H8(c, p)) : k = Wt(p), k == null ? null : (v(O, k) && c.cm && Yl(c.cm, k, b), O);
    }
    function Yp(c) {
      this.lines = c, this.parent = null;
      for (var p = 0, b = 0; b < c.length; ++b)
        c[b].parent = this, p += c[b].height;
      this.height = p;
    }
    Yp.prototype = {
      chunkSize: function() {
        return this.lines.length;
      },
      // Remove the n lines at offset 'at'.
      removeInner: function(c, p) {
        for (var b = c, v = c + p; b < v; ++b) {
          var k = this.lines[b];
          this.height -= k.height, Tee(k), Si(k, "delete");
        }
        this.lines.splice(c, p);
      },
      // Helper used to collapse a small branch into a single leaf.
      collapse: function(c) {
        c.push.apply(c, this.lines);
      },
      // Insert the given array of lines at offset 'at', count them as
      // having the given height.
      insertInner: function(c, p, b) {
        this.height += b, this.lines = this.lines.slice(0, c).concat(p).concat(this.lines.slice(c));
        for (var v = 0; v < p.length; ++v)
          p[v].parent = this;
      },
      // Used to iterate over a part of the tree.
      iterN: function(c, p, b) {
        for (var v = c + p; c < v; ++c)
          if (b(this.lines[c]))
            return !0;
      }
    };
    function Vp(c) {
      this.children = c;
      for (var p = 0, b = 0, v = 0; v < c.length; ++v) {
        var k = c[v];
        p += k.chunkSize(), b += k.height, k.parent = this;
      }
      this.size = p, this.height = b, this.parent = null;
    }
    Vp.prototype = {
      chunkSize: function() {
        return this.size;
      },
      removeInner: function(c, p) {
        this.size -= p;
        for (var b = 0; b < this.children.length; ++b) {
          var v = this.children[b], k = v.chunkSize();
          if (c < k) {
            var O = Math.min(p, k - c), T = v.height;
            if (v.removeInner(c, O), this.height -= T - v.height, k == O && (this.children.splice(b--, 1), v.parent = null), (p -= O) == 0)
              break;
            c = 0;
          } else
            c -= k;
        }
        if (this.size - p < 25 && (this.children.length > 1 || !(this.children[0] instanceof Yp))) {
          var D = [];
          this.collapse(D), this.children = [new Yp(D)], this.children[0].parent = this;
        }
      },
      collapse: function(c) {
        for (var p = 0; p < this.children.length; ++p)
          this.children[p].collapse(c);
      },
      insertInner: function(c, p, b) {
        this.size += p.length, this.height += b;
        for (var v = 0; v < this.children.length; ++v) {
          var k = this.children[v], O = k.chunkSize();
          if (c <= O) {
            if (k.insertInner(c, p, b), k.lines && k.lines.length > 50) {
              for (var T = k.lines.length % 25 + 25, D = T; D < k.lines.length; ) {
                var I = new Yp(k.lines.slice(D, D += 25));
                k.height -= I.height, this.children.splice(++v, 0, I), I.parent = this;
              }
              k.lines = k.lines.slice(0, T), this.maybeSpill();
            }
            break;
          }
          c -= O;
        }
      },
      // When a node has grown, check whether it should be split.
      maybeSpill: function() {
        if (!(this.children.length <= 10)) {
          var c = this;
          do {
            var p = c.children.splice(c.children.length - 5, 5), b = new Vp(p);
            if (c.parent) {
              c.size -= b.size, c.height -= b.height;
              var k = ge(c.parent.children, c);
              c.parent.children.splice(k + 1, 0, b);
            } else {
              var v = new Vp(c.children);
              v.parent = c, c.children = [v, b], c = v;
            }
            b.parent = c.parent;
          } while (c.children.length > 10);
          c.parent.maybeSpill();
        }
      },
      iterN: function(c, p, b) {
        for (var v = 0; v < this.children.length; ++v) {
          var k = this.children[v], O = k.chunkSize();
          if (c < O) {
            var T = Math.min(p, O - c);
            if (k.iterN(c, T, b))
              return !0;
            if ((p -= T) == 0)
              break;
            c = 0;
          } else
            c -= O;
        }
      }
    };
    var Xp = function(c, p, b) {
      if (b)
        for (var v in b)
          b.hasOwnProperty(v) && (this[v] = b[v]);
      this.doc = c, this.node = p;
    };
    Xp.prototype.clear = function() {
      var c = this.doc.cm, p = this.line.widgets, b = this.line, v = Wt(b);
      if (!(v == null || !p)) {
        for (var k = 0; k < p.length; ++k)
          p[k] == this && p.splice(k--, 1);
        p.length || (b.widgets = null);
        var O = Lp(this);
        Cs(b, Math.max(0, b.height - O)), c && (fs(c, function() {
          h$(c, b, -O), Yl(c, v, "widget");
        }), Si(c, "lineWidgetCleared", c, this, v));
      }
    }, Xp.prototype.changed = function() {
      var c = this, p = this.height, b = this.doc.cm, v = this.line;
      this.height = null;
      var k = Lp(this) - p;
      k && (ql(this.doc, v) || Cs(v, v.height + k), b && fs(b, function() {
        b.curOp.forceUpdate = !0, h$(b, v, k), Si(b, "lineWidgetChanged", b, c, Wt(v));
      }));
    }, yn(Xp);
    function h$(c, p, b) {
      Ka(p) < (c.curOp && c.curOp.scrollTop || c.doc.scrollTop) && A_(c, b);
    }
    function Tte(c, p, b, v) {
      var k = new Xp(c, b, v), O = c.cm;
      return O && k.noHScroll && (O.display.alignWidgets = !0), qp(c, p, "widget", function(T) {
        var D = T.widgets || (T.widgets = []);
        if (k.insertAt == null ? D.push(k) : D.splice(Math.min(D.length, Math.max(0, k.insertAt)), 0, k), k.line = T, O && !ql(c, T)) {
          var I = Ka(T) < c.scrollTop;
          Cs(T, T.height + Lp(k)), I && A_(O, k.height), O.curOp.forceUpdate = !0;
        }
        return !0;
      }), O && Si(O, "lineWidgetAdded", O, k, typeof p == "number" ? p : Wt(p)), k;
    }
    var p$ = 0, Jl = function(c, p) {
      this.lines = [], this.type = p, this.doc = c, this.id = ++p$;
    };
    Jl.prototype.clear = function() {
      if (!this.explicitlyCleared) {
        var c = this.doc.cm, p = c && !c.curOp;
        if (p && Ec(c), us(this, "clear")) {
          var b = this.find();
          b && Si(this, "clear", b.from, b.to);
        }
        for (var v = null, k = null, O = 0; O < this.lines.length; ++O) {
          var T = this.lines[O], D = Dp(T.markedSpans, this);
          c && !this.collapsed ? Yl(c, Wt(T), "text") : c && (D.to != null && (k = Wt(T)), D.from != null && (v = Wt(T))), T.markedSpans = yee(T.markedSpans, D), D.from == null && this.collapsed && !ql(this.doc, T) && c && Cs(T, ad(c.display));
        }
        if (c && this.collapsed && !c.options.lineWrapping)
          for (var I = 0; I < this.lines.length; ++I) {
            var B = Co(this.lines[I]), G = mv(B);
            G > c.display.maxLineLength && (c.display.maxLine = B, c.display.maxLineLength = G, c.display.maxLineChanged = !0);
          }
        v != null && c && this.collapsed && jr(c, v, k + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, c && i$(c.doc)), c && Si(c, "markerCleared", c, this, v, k), p && Tc(c), this.parent && this.parent.clear();
      }
    }, Jl.prototype.find = function(c, p) {
      c == null && this.type == "bookmark" && (c = 1);
      for (var b, v, k = 0; k < this.lines.length; ++k) {
        var O = this.lines[k], T = Dp(O.markedSpans, this);
        if (T.from != null && (b = ye(p ? O : Wt(O), T.from), c == -1))
          return b;
        if (T.to != null && (v = ye(p ? O : Wt(O), T.to), c == 1))
          return v;
      }
      return b && { from: b, to: v };
    }, Jl.prototype.changed = function() {
      var c = this, p = this.find(-1, !0), b = this, v = this.doc.cm;
      !p || !v || fs(v, function() {
        var k = p.line, O = Wt(p.line), T = y_(v, O);
        if (T && (w9(T), v.curOp.selectionChanged = v.curOp.forceUpdate = !0), v.curOp.updateMaxLine = !0, !ql(b.doc, k) && b.height != null) {
          var D = b.height;
          b.height = null;
          var I = Lp(b) - D;
          I && Cs(k, k.height + I);
        }
        Si(v, "markerChanged", v, c);
      });
    }, Jl.prototype.attachLine = function(c) {
      if (!this.lines.length && this.doc.cm) {
        var p = this.doc.cm.curOp;
        (!p.maybeHiddenMarkers || ge(p.maybeHiddenMarkers, this) == -1) && (p.maybeUnhiddenMarkers || (p.maybeUnhiddenMarkers = [])).push(this);
      }
      this.lines.push(c);
    }, Jl.prototype.detachLine = function(c) {
      if (this.lines.splice(ge(this.lines, c), 1), !this.lines.length && this.doc.cm) {
        var p = this.doc.cm.curOp;
        (p.maybeHiddenMarkers || (p.maybeHiddenMarkers = [])).push(this);
      }
    }, yn(Jl);
    function gd(c, p, b, v, k) {
      if (v && v.shared)
        return $te(c, p, b, v, k);
      if (c.cm && !c.cm.curOp)
        return Ci(c.cm, gd)(c, p, b, v, k);
      var O = new Jl(c, k), T = mt(p, b);
      if (v && ze(v, O, !1), T > 0 || T == 0 && O.clearWhenEmpty !== !1)
        return O;
      if (O.replacedWith && (O.collapsed = !0, O.widgetNode = q("span", [O.replacedWith], "CodeMirror-widget"), v.handleMouseEvents || O.widgetNode.setAttribute("cm-ignore-events", "true"), v.insertLeft && (O.widgetNode.insertLeft = !0)), O.collapsed) {
        if (r9(c, p.line, p, b, O) || p.line != b.line && r9(c, b.line, p, b, O))
          throw new Error("Inserting collapsed marker partially overlapping an existing one");
        bee();
      }
      O.addToHistory && X9(c, { from: p, to: b, origin: "markText" }, c.sel, NaN);
      var D = p.line, I = c.cm, B;
      if (c.iter(D, b.line + 1, function(ee) {
        I && O.collapsed && !I.options.lineWrapping && Co(ee) == I.display.maxLine && (B = !0), O.collapsed && D != p.line && Cs(ee, 0), wee(ee, new fv(
          O,
          D == p.line ? p.ch : null,
          D == b.line ? b.ch : null
        ), c.cm && c.cm.curOp), ++D;
      }), O.collapsed && c.iter(p.line, b.line + 1, function(ee) {
        ql(c, ee) && Cs(ee, 0);
      }), O.clearOnEnter && tt(O, "beforeCursorEnter", function() {
        return O.clear();
      }), O.readOnly && (vee(), (c.history.done.length || c.history.undone.length) && c.clearHistory()), O.collapsed && (O.id = ++p$, O.atomic = !0), I) {
        if (B && (I.curOp.updateMaxLine = !0), O.collapsed)
          jr(I, p.line, b.line + 1);
        else if (O.className || O.startStyle || O.endStyle || O.css || O.attributes || O.title)
          for (var G = p.line; G <= b.line; G++)
            Yl(I, G, "text");
        O.atomic && i$(I.doc), Si(I, "markerAdded", I, O);
      }
      return O;
    }
    var Gp = function(c, p) {
      this.markers = c, this.primary = p;
      for (var b = 0; b < c.length; ++b)
        c[b].parent = this;
    };
    Gp.prototype.clear = function() {
      if (!this.explicitlyCleared) {
        this.explicitlyCleared = !0;
        for (var c = 0; c < this.markers.length; ++c)
          this.markers[c].clear();
        Si(this, "clear");
      }
    }, Gp.prototype.find = function(c, p) {
      return this.primary.find(c, p);
    }, yn(Gp);
    function $te(c, p, b, v, k) {
      v = ze(v), v.shared = !1;
      var O = [gd(c, p, b, v, k)], T = O[0], D = v.widgetNode;
      return Kl(c, function(I) {
        D && (v.widgetNode = D.cloneNode(!0)), O.push(gd(I, gt(I, p), gt(I, b), v, k));
        for (var B = 0; B < I.linked.length; ++B)
          if (I.linked[B].isParent)
            return;
        T = Be(O);
      }), new Gp(O, T);
    }
    function m$(c) {
      return c.findMarks(ye(c.first, 0), c.clipPos(ye(c.lastLine())), function(p) {
        return p.parent;
      });
    }
    function Mte(c, p) {
      for (var b = 0; b < p.length; b++) {
        var v = p[b], k = v.find(), O = c.clipPos(k.from), T = c.clipPos(k.to);
        if (mt(O, T)) {
          var D = gd(c, O, T, v.primary, v.primary.type);
          v.markers.push(D), D.parent = v;
        }
      }
    }
    function Nte(c) {
      for (var p = function(v) {
        var k = c[v], O = [k.primary.doc];
        Kl(k.primary.doc, function(I) {
          return O.push(I);
        });
        for (var T = 0; T < k.markers.length; T++) {
          var D = k.markers[T];
          ge(O, D.doc) == -1 && (D.parent = null, k.markers.splice(T--, 1));
        }
      }, b = 0; b < c.length; b++) p(b);
    }
    var Ate = 0, Fr = function(c, p, b, v, k) {
      if (!(this instanceof Fr))
        return new Fr(c, p, b, v, k);
      b == null && (b = 0), Vp.call(this, [new Yp([new rd("", null)])]), this.first = b, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = b;
      var O = ye(b, 0);
      this.sel = Xl(O), this.history = new Ev(null), this.id = ++Ate, this.modeOption = p, this.lineSep = v, this.direction = k == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof c == "string" && (c = this.splitLines(c)), B_(this, { from: O, to: O, text: c }), er(this, Xl(O), It);
    };
    Fr.prototype = qt(Vp.prototype, {
      constructor: Fr,
      // Iterate over the document. Supports two forms -- with only one
      // argument, it calls that for each line in the document. With
      // three, it iterates over the range given by the first two (with
      // the second being non-inclusive).
      iter: function(c, p, b) {
        b ? this.iterN(c - this.first, p - c, b) : this.iterN(this.first, this.first + this.size, c);
      },
      // Non-public interface for adding and removing lines.
      insert: function(c, p) {
        for (var b = 0, v = 0; v < p.length; ++v)
          b += p[v].height;
        this.insertInner(c - this.first, p, b);
      },
      remove: function(c, p) {
        this.removeInner(c - this.first, p);
      },
      // From here, the methods are part of the public interface. Most
      // are also available from CodeMirror (editor) instances.
      getValue: function(c) {
        var p = ui(this, this.first, this.first + this.size);
        return c === !1 ? p : p.join(c || this.lineSeparator());
      },
      setValue: Ei(function(c) {
        var p = ye(this.first, 0), b = this.first + this.size - 1;
        pd(this, {
          from: p,
          to: ye(b, Fe(this, b).text.length),
          text: this.splitLines(c),
          origin: "setValue",
          full: !0
        }, !0), this.cm && Fp(this.cm, 0, 0), er(this, Xl(p), It);
      }),
      replaceRange: function(c, p, b, v) {
        p = gt(this, p), b = b ? gt(this, b) : p, md(this, c, p, b, v);
      },
      getRange: function(c, p, b) {
        var v = So(this, gt(this, c), gt(this, p));
        return b === !1 ? v : b === "" ? v.join("") : v.join(b || this.lineSeparator());
      },
      getLine: function(c) {
        var p = this.getLineHandle(c);
        return p && p.text;
      },
      getLineHandle: function(c) {
        if (Np(this, c))
          return Fe(this, c);
      },
      getLineNumber: function(c) {
        return Wt(c);
      },
      getLineHandleVisualStart: function(c) {
        return typeof c == "number" && (c = Fe(this, c)), Co(c);
      },
      lineCount: function() {
        return this.size;
      },
      firstLine: function() {
        return this.first;
      },
      lastLine: function() {
        return this.first + this.size - 1;
      },
      clipPos: function(c) {
        return gt(this, c);
      },
      getCursor: function(c) {
        var p = this.sel.primary(), b;
        return c == null || c == "head" ? b = p.head : c == "anchor" ? b = p.anchor : c == "end" || c == "to" || c === !1 ? b = p.to() : b = p.from(), b;
      },
      listSelections: function() {
        return this.sel.ranges;
      },
      somethingSelected: function() {
        return this.sel.somethingSelected();
      },
      setCursor: Ei(function(c, p, b) {
        e$(this, gt(this, typeof c == "number" ? ye(c, p || 0) : c), null, b);
      }),
      setSelection: Ei(function(c, p, b) {
        e$(this, gt(this, c), gt(this, p || c), b);
      }),
      extendSelection: Ei(function(c, p, b) {
        $v(this, gt(this, c), p && gt(this, p), b);
      }),
      extendSelections: Ei(function(c, p) {
        J9(this, Q8(this, c), p);
      }),
      extendSelectionsBy: Ei(function(c, p) {
        var b = Ie(this.sel.ranges, c);
        J9(this, Q8(this, b), p);
      }),
      setSelections: Ei(function(c, p, b) {
        if (c.length) {
          for (var v = [], k = 0; k < c.length; k++)
            v[k] = new Zt(
              gt(this, c[k].anchor),
              gt(this, c[k].head || c[k].anchor)
            );
          p == null && (p = Math.min(c.length - 1, this.sel.primIndex)), er(this, To(this.cm, v, p), b);
        }
      }),
      addSelection: Ei(function(c, p, b) {
        var v = this.sel.ranges.slice(0);
        v.push(new Zt(gt(this, c), gt(this, p || c))), er(this, To(this.cm, v, v.length - 1), b);
      }),
      getSelection: function(c) {
        for (var p = this.sel.ranges, b, v = 0; v < p.length; v++) {
          var k = So(this, p[v].from(), p[v].to());
          b = b ? b.concat(k) : k;
        }
        return c === !1 ? b : b.join(c || this.lineSeparator());
      },
      getSelections: function(c) {
        for (var p = [], b = this.sel.ranges, v = 0; v < b.length; v++) {
          var k = So(this, b[v].from(), b[v].to());
          c !== !1 && (k = k.join(c || this.lineSeparator())), p[v] = k;
        }
        return p;
      },
      replaceSelection: function(c, p, b) {
        for (var v = [], k = 0; k < this.sel.ranges.length; k++)
          v[k] = c;
        this.replaceSelections(v, p, b || "+input");
      },
      replaceSelections: Ei(function(c, p, b) {
        for (var v = [], k = this.sel, O = 0; O < k.ranges.length; O++) {
          var T = k.ranges[O];
          v[O] = { from: T.from(), to: T.to(), text: this.splitLines(c[O]), origin: b };
        }
        for (var D = p && p != "end" && yte(this, v, p), I = v.length - 1; I >= 0; I--)
          pd(this, v[I]);
        D ? t$(this, D) : this.cm && cd(this.cm);
      }),
      undo: Ei(function() {
        Av(this, "undo");
      }),
      redo: Ei(function() {
        Av(this, "redo");
      }),
      undoSelection: Ei(function() {
        Av(this, "undo", !0);
      }),
      redoSelection: Ei(function() {
        Av(this, "redo", !0);
      }),
      setExtending: function(c) {
        this.extend = c;
      },
      getExtending: function() {
        return this.extend;
      },
      historySize: function() {
        for (var c = this.history, p = 0, b = 0, v = 0; v < c.done.length; v++)
          c.done[v].ranges || ++p;
        for (var k = 0; k < c.undone.length; k++)
          c.undone[k].ranges || ++b;
        return { undo: p, redo: b };
      },
      clearHistory: function() {
        var c = this;
        this.history = new Ev(this.history), Kl(this, function(p) {
          return p.history = c.history;
        }, !0);
      },
      markClean: function() {
        this.cleanGeneration = this.changeGeneration(!0);
      },
      changeGeneration: function(c) {
        return c && (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null), this.history.generation;
      },
      isClean: function(c) {
        return this.history.generation == (c || this.cleanGeneration);
      },
      getHistory: function() {
        return {
          done: dd(this.history.done),
          undone: dd(this.history.undone)
        };
      },
      setHistory: function(c) {
        var p = this.history = new Ev(this.history);
        p.done = dd(c.done.slice(0), null, !0), p.undone = dd(c.undone.slice(0), null, !0);
      },
      setGutterMarker: Ei(function(c, p, b) {
        return qp(this, c, "gutter", function(v) {
          var k = v.gutterMarkers || (v.gutterMarkers = {});
          return k[p] = b, !b && Os(k) && (v.gutterMarkers = null), !0;
        });
      }),
      clearGutter: Ei(function(c) {
        var p = this;
        this.iter(function(b) {
          b.gutterMarkers && b.gutterMarkers[c] && qp(p, b, "gutter", function() {
            return b.gutterMarkers[c] = null, Os(b.gutterMarkers) && (b.gutterMarkers = null), !0;
          });
        });
      }),
      lineInfo: function(c) {
        var p;
        if (typeof c == "number") {
          if (!Np(this, c) || (p = c, c = Fe(this, c), !c))
            return null;
        } else if (p = Wt(c), p == null)
          return null;
        return {
          line: p,
          handle: c,
          text: c.text,
          gutterMarkers: c.gutterMarkers,
          textClass: c.textClass,
          bgClass: c.bgClass,
          wrapClass: c.wrapClass,
          widgets: c.widgets
        };
      },
      addLineClass: Ei(function(c, p, b) {
        return qp(this, c, p == "gutter" ? "gutter" : "class", function(v) {
          var k = p == "text" ? "textClass" : p == "background" ? "bgClass" : p == "gutter" ? "gutterClass" : "wrapClass";
          if (!v[k])
            v[k] = b;
          else {
            if (L(b).test(v[k]))
              return !1;
            v[k] += " " + b;
          }
          return !0;
        });
      }),
      removeLineClass: Ei(function(c, p, b) {
        return qp(this, c, p == "gutter" ? "gutter" : "class", function(v) {
          var k = p == "text" ? "textClass" : p == "background" ? "bgClass" : p == "gutter" ? "gutterClass" : "wrapClass", O = v[k];
          if (O)
            if (b == null)
              v[k] = null;
            else {
              var T = O.match(L(b));
              if (!T)
                return !1;
              var D = T.index + T[0].length;
              v[k] = O.slice(0, T.index) + (!T.index || D == O.length ? "" : " ") + O.slice(D) || null;
            }
          else return !1;
          return !0;
        });
      }),
      addLineWidget: Ei(function(c, p, b) {
        return Tte(this, c, p, b);
      }),
      removeLineWidget: function(c) {
        c.clear();
      },
      markText: function(c, p, b) {
        return gd(this, gt(this, c), gt(this, p), b, b && b.type || "range");
      },
      setBookmark: function(c, p) {
        var b = {
          replacedWith: p && (p.nodeType == null ? p.widget : p),
          insertLeft: p && p.insertLeft,
          clearWhenEmpty: !1,
          shared: p && p.shared,
          handleMouseEvents: p && p.handleMouseEvents
        };
        return c = gt(this, c), gd(this, c, c, b, "bookmark");
      },
      findMarksAt: function(c) {
        c = gt(this, c);
        var p = [], b = Fe(this, c.line).markedSpans;
        if (b)
          for (var v = 0; v < b.length; ++v) {
            var k = b[v];
            (k.from == null || k.from <= c.ch) && (k.to == null || k.to >= c.ch) && p.push(k.marker.parent || k.marker);
          }
        return p;
      },
      findMarks: function(c, p, b) {
        c = gt(this, c), p = gt(this, p);
        var v = [], k = c.line;
        return this.iter(c.line, p.line + 1, function(O) {
          var T = O.markedSpans;
          if (T)
            for (var D = 0; D < T.length; D++) {
              var I = T[D];
              !(I.to != null && k == c.line && c.ch >= I.to || I.from == null && k != c.line || I.from != null && k == p.line && I.from >= p.ch) && (!b || b(I.marker)) && v.push(I.marker.parent || I.marker);
            }
          ++k;
        }), v;
      },
      getAllMarks: function() {
        var c = [];
        return this.iter(function(p) {
          var b = p.markedSpans;
          if (b)
            for (var v = 0; v < b.length; ++v)
              b[v].from != null && c.push(b[v].marker);
        }), c;
      },
      posFromIndex: function(c) {
        var p, b = this.first, v = this.lineSeparator().length;
        return this.iter(function(k) {
          var O = k.text.length + v;
          if (O > c)
            return p = c, !0;
          c -= O, ++b;
        }), gt(this, ye(b, p));
      },
      indexFromPos: function(c) {
        c = gt(this, c);
        var p = c.ch;
        if (c.line < this.first || c.ch < 0)
          return 0;
        var b = this.lineSeparator().length;
        return this.iter(this.first, c.line, function(v) {
          p += v.text.length + b;
        }), p;
      },
      copy: function(c) {
        var p = new Fr(
          ui(this, this.first, this.first + this.size),
          this.modeOption,
          this.first,
          this.lineSep,
          this.direction
        );
        return p.scrollTop = this.scrollTop, p.scrollLeft = this.scrollLeft, p.sel = this.sel, p.extend = !1, c && (p.history.undoDepth = this.history.undoDepth, p.setHistory(this.getHistory())), p;
      },
      linkedDoc: function(c) {
        c || (c = {});
        var p = this.first, b = this.first + this.size;
        c.from != null && c.from > p && (p = c.from), c.to != null && c.to < b && (b = c.to);
        var v = new Fr(ui(this, p, b), c.mode || this.modeOption, p, this.lineSep, this.direction);
        return c.sharedHist && (v.history = this.history), (this.linked || (this.linked = [])).push({ doc: v, sharedHist: c.sharedHist }), v.linked = [{ doc: this, isParent: !0, sharedHist: c.sharedHist }], Mte(v, m$(this)), v;
      },
      unlinkDoc: function(c) {
        if (c instanceof wn && (c = c.doc), this.linked)
          for (var p = 0; p < this.linked.length; ++p) {
            var b = this.linked[p];
            if (b.doc == c) {
              this.linked.splice(p, 1), c.unlinkDoc(this), Nte(m$(this));
              break;
            }
          }
        if (c.history == this.history) {
          var v = [c.id];
          Kl(c, function(k) {
            return v.push(k.id);
          }, !0), c.history = new Ev(null), c.history.done = dd(this.history.done, v), c.history.undone = dd(this.history.undone, v);
        }
      },
      iterLinkedDocs: function(c) {
        Kl(this, c);
      },
      getMode: function() {
        return this.mode;
      },
      getEditor: function() {
        return this.cm;
      },
      splitLines: function(c) {
        return this.lineSep ? c.split(this.lineSep) : yc(c);
      },
      lineSeparator: function() {
        return this.lineSep || `
`;
      },
      setDirection: Ei(function(c) {
        c != "rtl" && (c = "ltr"), c != this.direction && (this.direction = c, this.iter(function(p) {
          return p.order = null;
        }), this.cm && wte(this.cm));
      })
    }), Fr.prototype.eachLine = Fr.prototype.iter;
    var g$ = 0;
    function Dte(c) {
      var p = this;
      if (v$(p), !(bn(p, c) || Ja(p.display, c))) {
        Gn(c), l && (g$ = +/* @__PURE__ */ new Date());
        var b = _c(p, c, !0), v = c.dataTransfer.files;
        if (!(!b || p.isReadOnly()))
          if (v && v.length && window.FileReader && window.File)
            for (var k = v.length, O = Array(k), T = 0, D = function() {
              ++T == k && Ci(p, function() {
                b = gt(p.doc, b);
                var ie = {
                  from: b,
                  to: b,
                  text: p.doc.splitLines(
                    O.filter(function(fe) {
                      return fe != null;
                    }).join(p.doc.lineSeparator())
                  ),
                  origin: "paste"
                };
                pd(p.doc, ie), t$(p.doc, Xl(gt(p.doc, b), gt(p.doc, Gl(ie))));
              })();
            }, I = function(ie, fe) {
              if (p.options.allowDropFileTypes && ge(p.options.allowDropFileTypes, ie.type) == -1) {
                D();
                return;
              }
              var de = new FileReader();
              de.onerror = function() {
                return D();
              }, de.onload = function() {
                var ke = de.result;
                if (/[\x00-\x08\x0e-\x1f]{2}/.test(ke)) {
                  D();
                  return;
                }
                O[fe] = ke, D();
              }, de.readAsText(ie);
            }, B = 0; B < v.length; B++)
              I(v[B], B);
          else {
            if (p.state.draggingText && p.doc.sel.contains(b) > -1) {
              p.state.draggingText(c), setTimeout(function() {
                return p.display.input.focus();
              }, 20);
              return;
            }
            try {
              var G = c.dataTransfer.getData("Text");
              if (G) {
                var ee;
                if (p.state.draggingText && !p.state.draggingText.copy && (ee = p.listSelections()), Mv(p.doc, Xl(b, b)), ee)
                  for (var re = 0; re < ee.length; ++re)
                    md(p.doc, "", ee[re].anchor, ee[re].head, "drag");
                p.replaceSelection(G, "around", "paste"), p.display.input.focus();
              }
            } catch {
            }
          }
      }
    }
    function Pte(c, p) {
      if (l && (!c.state.draggingText || +/* @__PURE__ */ new Date() - g$ < 100)) {
        Ya(p);
        return;
      }
      if (!(bn(c, p) || Ja(c.display, p)) && (p.dataTransfer.setData("Text", c.getSelection()), p.dataTransfer.effectAllowed = "copyMove", p.dataTransfer.setDragImage && !w)) {
        var b = R("img", null, null, "position: fixed; left: 0; top: 0;");
        b.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", g && (b.width = b.height = 1, c.display.wrapper.appendChild(b), b._top = b.offsetTop), p.dataTransfer.setDragImage(b, 0, 0), g && b.parentNode.removeChild(b);
      }
    }
    function Ite(c, p) {
      var b = _c(c, p);
      if (b) {
        var v = document.createDocumentFragment();
        E_(c, b, v), c.display.dragCursor || (c.display.dragCursor = R("div", null, "CodeMirror-cursors CodeMirror-dragcursors"), c.display.lineSpace.insertBefore(c.display.dragCursor, c.display.cursorDiv)), H(c.display.dragCursor, v);
      }
    }
    function v$(c) {
      c.display.dragCursor && (c.display.lineSpace.removeChild(c.display.dragCursor), c.display.dragCursor = null);
    }
    function b$(c) {
      if (document.getElementsByClassName) {
        for (var p = document.getElementsByClassName("CodeMirror"), b = [], v = 0; v < p.length; v++) {
          var k = p[v].CodeMirror;
          k && b.push(k);
        }
        b.length && b[0].operation(function() {
          for (var O = 0; O < b.length; O++)
            c(b[O]);
        });
      }
    }
    var y$ = !1;
    function Lte() {
      y$ || (Rte(), y$ = !0);
    }
    function Rte() {
      var c;
      tt(window, "resize", function() {
        c == null && (c = setTimeout(function() {
          c = null, b$(jte);
        }, 100));
      }), tt(window, "blur", function() {
        return b$(ud);
      });
    }
    function jte(c) {
      var p = c.display;
      p.cachedCharWidth = p.cachedTextHeight = p.cachedPaddingH = null, p.scrollbarsClipped = !1, c.setSize();
    }
    for (var eu = {
      3: "Pause",
      8: "Backspace",
      9: "Tab",
      13: "Enter",
      16: "Shift",
      17: "Ctrl",
      18: "Alt",
      19: "Pause",
      20: "CapsLock",
      27: "Esc",
      32: "Space",
      33: "PageUp",
      34: "PageDown",
      35: "End",
      36: "Home",
      37: "Left",
      38: "Up",
      39: "Right",
      40: "Down",
      44: "PrintScrn",
      45: "Insert",
      46: "Delete",
      59: ";",
      61: "=",
      91: "Mod",
      92: "Mod",
      93: "Mod",
      106: "*",
      107: "=",
      109: "-",
      110: ".",
      111: "/",
      145: "ScrollLock",
      173: "-",
      186: ";",
      187: "=",
      188: ",",
      189: "-",
      190: ".",
      191: "/",
      192: "`",
      219: "[",
      220: "\\",
      221: "]",
      222: "'",
      224: "Mod",
      63232: "Up",
      63233: "Down",
      63234: "Left",
      63235: "Right",
      63272: "Delete",
      63273: "Home",
      63275: "End",
      63276: "PageUp",
      63277: "PageDown",
      63302: "Insert"
    }, Kp = 0; Kp < 10; Kp++)
      eu[Kp + 48] = eu[Kp + 96] = String(Kp);
    for (var Dv = 65; Dv <= 90; Dv++)
      eu[Dv] = String.fromCharCode(Dv);
    for (var Jp = 1; Jp <= 12; Jp++)
      eu[Jp + 111] = eu[Jp + 63235] = "F" + Jp;
    var tl = {};
    tl.basic = {
      Left: "goCharLeft",
      Right: "goCharRight",
      Up: "goLineUp",
      Down: "goLineDown",
      End: "goLineEnd",
      Home: "goLineStartSmart",
      PageUp: "goPageUp",
      PageDown: "goPageDown",
      Delete: "delCharAfter",
      Backspace: "delCharBefore",
      "Shift-Backspace": "delCharBefore",
      Tab: "defaultTab",
      "Shift-Tab": "indentAuto",
      Enter: "newlineAndIndent",
      Insert: "toggleOverwrite",
      Esc: "singleSelection"
    }, tl.pcDefault = {
      "Ctrl-A": "selectAll",
      "Ctrl-D": "deleteLine",
      "Ctrl-Z": "undo",
      "Shift-Ctrl-Z": "redo",
      "Ctrl-Y": "redo",
      "Ctrl-Home": "goDocStart",
      "Ctrl-End": "goDocEnd",
      "Ctrl-Up": "goLineUp",
      "Ctrl-Down": "goLineDown",
      "Ctrl-Left": "goGroupLeft",
      "Ctrl-Right": "goGroupRight",
      "Alt-Left": "goLineStart",
      "Alt-Right": "goLineEnd",
      "Ctrl-Backspace": "delGroupBefore",
      "Ctrl-Delete": "delGroupAfter",
      "Ctrl-S": "save",
      "Ctrl-F": "find",
      "Ctrl-G": "findNext",
      "Shift-Ctrl-G": "findPrev",
      "Shift-Ctrl-F": "replace",
      "Shift-Ctrl-R": "replaceAll",
      "Ctrl-[": "indentLess",
      "Ctrl-]": "indentMore",
      "Ctrl-U": "undoSelection",
      "Shift-Ctrl-U": "redoSelection",
      "Alt-U": "redoSelection",
      fallthrough: "basic"
    }, tl.emacsy = {
      "Ctrl-F": "goCharRight",
      "Ctrl-B": "goCharLeft",
      "Ctrl-P": "goLineUp",
      "Ctrl-N": "goLineDown",
      "Ctrl-A": "goLineStart",
      "Ctrl-E": "goLineEnd",
      "Ctrl-V": "goPageDown",
      "Shift-Ctrl-V": "goPageUp",
      "Ctrl-D": "delCharAfter",
      "Ctrl-H": "delCharBefore",
      "Alt-Backspace": "delWordBefore",
      "Ctrl-K": "killLine",
      "Ctrl-T": "transposeChars",
      "Ctrl-O": "openLine"
    }, tl.macDefault = {
      "Cmd-A": "selectAll",
      "Cmd-D": "deleteLine",
      "Cmd-Z": "undo",
      "Shift-Cmd-Z": "redo",
      "Cmd-Y": "redo",
      "Cmd-Home": "goDocStart",
      "Cmd-Up": "goDocStart",
      "Cmd-End": "goDocEnd",
      "Cmd-Down": "goDocEnd",
      "Alt-Left": "goGroupLeft",
      "Alt-Right": "goGroupRight",
      "Cmd-Left": "goLineLeft",
      "Cmd-Right": "goLineRight",
      "Alt-Backspace": "delGroupBefore",
      "Ctrl-Alt-Backspace": "delGroupAfter",
      "Alt-Delete": "delGroupAfter",
      "Cmd-S": "save",
      "Cmd-F": "find",
      "Cmd-G": "findNext",
      "Shift-Cmd-G": "findPrev",
      "Cmd-Alt-F": "replace",
      "Shift-Cmd-Alt-F": "replaceAll",
      "Cmd-[": "indentLess",
      "Cmd-]": "indentMore",
      "Cmd-Backspace": "delWrappedLineLeft",
      "Cmd-Delete": "delWrappedLineRight",
      "Cmd-U": "undoSelection",
      "Shift-Cmd-U": "redoSelection",
      "Ctrl-Up": "goDocStart",
      "Ctrl-Down": "goDocEnd",
      fallthrough: ["basic", "emacsy"]
    }, tl.default = M ? tl.macDefault : tl.pcDefault;
    function Fte(c) {
      var p = c.split(/-(?!$)/);
      c = p[p.length - 1];
      for (var b, v, k, O, T = 0; T < p.length - 1; T++) {
        var D = p[T];
        if (/^(cmd|meta|m)$/i.test(D))
          O = !0;
        else if (/^a(lt)?$/i.test(D))
          b = !0;
        else if (/^(c|ctrl|control)$/i.test(D))
          v = !0;
        else if (/^s(hift)?$/i.test(D))
          k = !0;
        else
          throw new Error("Unrecognized modifier name: " + D);
      }
      return b && (c = "Alt-" + c), v && (c = "Ctrl-" + c), O && (c = "Cmd-" + c), k && (c = "Shift-" + c), c;
    }
    function Bte(c) {
      var p = {};
      for (var b in c)
        if (c.hasOwnProperty(b)) {
          var v = c[b];
          if (/^(name|fallthrough|(de|at)tach)$/.test(b))
            continue;
          if (v == "...") {
            delete c[b];
            continue;
          }
          for (var k = Ie(b.split(" "), Fte), O = 0; O < k.length; O++) {
            var T = void 0, D = void 0;
            O == k.length - 1 ? (D = k.join(" "), T = v) : (D = k.slice(0, O + 1).join(" "), T = "...");
            var I = p[D];
            if (!I)
              p[D] = T;
            else if (I != T)
              throw new Error("Inconsistent bindings for " + D);
          }
          delete c[b];
        }
      for (var B in p)
        c[B] = p[B];
      return c;
    }
    function vd(c, p, b, v) {
      p = Pv(p);
      var k = p.call ? p.call(c, v) : p[c];
      if (k === !1)
        return "nothing";
      if (k === "...")
        return "multi";
      if (k != null && b(k))
        return "handled";
      if (p.fallthrough) {
        if (Object.prototype.toString.call(p.fallthrough) != "[object Array]")
          return vd(c, p.fallthrough, b, v);
        for (var O = 0; O < p.fallthrough.length; O++) {
          var T = vd(c, p.fallthrough[O], b, v);
          if (T)
            return T;
        }
      }
    }
    function w$(c) {
      var p = typeof c == "string" ? c : eu[c.keyCode];
      return p == "Ctrl" || p == "Alt" || p == "Shift" || p == "Mod";
    }
    function k$(c, p, b) {
      var v = c;
      return p.altKey && v != "Alt" && (c = "Alt-" + c), (z ? p.metaKey : p.ctrlKey) && v != "Ctrl" && (c = "Ctrl-" + c), (z ? p.ctrlKey : p.metaKey) && v != "Mod" && (c = "Cmd-" + c), !b && p.shiftKey && v != "Shift" && (c = "Shift-" + c), c;
    }
    function x$(c, p) {
      if (g && c.keyCode == 34 && c.char)
        return !1;
      var b = eu[c.keyCode];
      return b == null || c.altGraphKey ? !1 : (c.keyCode == 3 && c.code && (b = c.code), k$(b, c, p));
    }
    function Pv(c) {
      return typeof c == "string" ? tl[c] : c;
    }
    function bd(c, p) {
      for (var b = c.doc.sel.ranges, v = [], k = 0; k < b.length; k++) {
        for (var O = p(b[k]); v.length && mt(O.from, Be(v).to) <= 0; ) {
          var T = v.pop();
          if (mt(T.from, O.from) < 0) {
            O.from = T.from;
            break;
          }
        }
        v.push(O);
      }
      fs(c, function() {
        for (var D = v.length - 1; D >= 0; D--)
          md(c.doc, "", v[D].from, v[D].to, "+delete");
        cd(c);
      });
    }
    function Q_(c, p, b) {
      var v = Xf(c.text, p + b, b);
      return v < 0 || v > c.text.length ? null : v;
    }
    function U_(c, p, b) {
      var v = Q_(c, p.ch, b);
      return v == null ? null : new ye(p.line, v, b < 0 ? "after" : "before");
    }
    function Z_(c, p, b, v, k) {
      if (c) {
        p.doc.direction == "rtl" && (k = -k);
        var O = Ss(b, p.doc.direction);
        if (O) {
          var T = k < 0 ? Be(O) : O[0], D = k < 0 == (T.level == 1), I = D ? "after" : "before", B;
          if (T.level > 0 || p.doc.direction == "rtl") {
            var G = od(p, b);
            B = k < 0 ? b.text.length - 1 : 0;
            var ee = na(p, G, B).top;
            B = Ql(function(re) {
              return na(p, G, re).top == ee;
            }, k < 0 == (T.level == 1) ? T.from : T.to - 1, B), I == "before" && (B = Q_(b, B, 1));
          } else
            B = k < 0 ? T.to : T.from;
          return new ye(v, B, I);
        }
      }
      return new ye(v, k < 0 ? b.text.length : 0, k < 0 ? "before" : "after");
    }
    function zte(c, p, b, v) {
      var k = Ss(p, c.doc.direction);
      if (!k)
        return U_(p, b, v);
      b.ch >= p.text.length ? (b.ch = p.text.length, b.sticky = "before") : b.ch <= 0 && (b.ch = 0, b.sticky = "after");
      var O = Rr(k, b.ch, b.sticky), T = k[O];
      if (c.doc.direction == "ltr" && T.level % 2 == 0 && (v > 0 ? T.to > b.ch : T.from < b.ch))
        return U_(p, b, v);
      var D = function(Se, Ee) {
        return Q_(p, Se instanceof ye ? Se.ch : Se, Ee);
      }, I, B = function(Se) {
        return c.options.lineWrapping ? (I = I || od(c, p), E9(c, p, I, Se)) : { begin: 0, end: p.text.length };
      }, G = B(b.sticky == "before" ? D(b, -1) : b.ch);
      if (c.doc.direction == "rtl" || T.level == 1) {
        var ee = T.level == 1 == v < 0, re = D(b, ee ? 1 : -1);
        if (re != null && (ee ? re <= T.to && re <= G.end : re >= T.from && re >= G.begin)) {
          var ie = ee ? "before" : "after";
          return new ye(b.line, re, ie);
        }
      }
      var fe = function(Se, Ee, Ce) {
        for (var Ne = function(tn, Ti) {
          return Ti ? new ye(b.line, D(tn, 1), "before") : new ye(b.line, tn, "after");
        }; Se >= 0 && Se < k.length; Se += Ee) {
          var Je = k[Se], Ye = Ee > 0 == (Je.level != 1), Et = Ye ? Ce.begin : D(Ce.end, -1);
          if (Je.from <= Et && Et < Je.to || (Et = Ye ? Je.from : D(Je.to, -1), Ce.begin <= Et && Et < Ce.end))
            return Ne(Et, Ye);
        }
      }, de = fe(O + v, v, G);
      if (de)
        return de;
      var ke = v > 0 ? G.end : D(G.begin, -1);
      return ke != null && !(v > 0 && ke == p.text.length) && (de = fe(v > 0 ? 0 : k.length - 1, v, B(ke)), de) ? de : null;
    }
    var em = {
      selectAll: o$,
      singleSelection: function(c) {
        return c.setSelection(c.getCursor("anchor"), c.getCursor("head"), It);
      },
      killLine: function(c) {
        return bd(c, function(p) {
          if (p.empty()) {
            var b = Fe(c.doc, p.head.line).text.length;
            return p.head.ch == b && p.head.line < c.lastLine() ? { from: p.head, to: ye(p.head.line + 1, 0) } : { from: p.head, to: ye(p.head.line, b) };
          } else
            return { from: p.from(), to: p.to() };
        });
      },
      deleteLine: function(c) {
        return bd(c, function(p) {
          return {
            from: ye(p.from().line, 0),
            to: gt(c.doc, ye(p.to().line + 1, 0))
          };
        });
      },
      delLineLeft: function(c) {
        return bd(c, function(p) {
          return {
            from: ye(p.from().line, 0),
            to: p.from()
          };
        });
      },
      delWrappedLineLeft: function(c) {
        return bd(c, function(p) {
          var b = c.charCoords(p.head, "div").top + 5, v = c.coordsChar({ left: 0, top: b }, "div");
          return { from: v, to: p.from() };
        });
      },
      delWrappedLineRight: function(c) {
        return bd(c, function(p) {
          var b = c.charCoords(p.head, "div").top + 5, v = c.coordsChar({ left: c.display.lineDiv.offsetWidth + 100, top: b }, "div");
          return { from: p.from(), to: v };
        });
      },
      undo: function(c) {
        return c.undo();
      },
      redo: function(c) {
        return c.redo();
      },
      undoSelection: function(c) {
        return c.undoSelection();
      },
      redoSelection: function(c) {
        return c.redoSelection();
      },
      goDocStart: function(c) {
        return c.extendSelection(ye(c.firstLine(), 0));
      },
      goDocEnd: function(c) {
        return c.extendSelection(ye(c.lastLine()));
      },
      goLineStart: function(c) {
        return c.extendSelectionsBy(
          function(p) {
            return _$(c, p.head.line);
          },
          { origin: "+move", bias: 1 }
        );
      },
      goLineStartSmart: function(c) {
        return c.extendSelectionsBy(
          function(p) {
            return O$(c, p.head);
          },
          { origin: "+move", bias: 1 }
        );
      },
      goLineEnd: function(c) {
        return c.extendSelectionsBy(
          function(p) {
            return Wte(c, p.head.line);
          },
          { origin: "+move", bias: -1 }
        );
      },
      goLineRight: function(c) {
        return c.extendSelectionsBy(function(p) {
          var b = c.cursorCoords(p.head, "div").top + 5;
          return c.coordsChar({ left: c.display.lineDiv.offsetWidth + 100, top: b }, "div");
        }, Ut);
      },
      goLineLeft: function(c) {
        return c.extendSelectionsBy(function(p) {
          var b = c.cursorCoords(p.head, "div").top + 5;
          return c.coordsChar({ left: 0, top: b }, "div");
        }, Ut);
      },
      goLineLeftSmart: function(c) {
        return c.extendSelectionsBy(function(p) {
          var b = c.cursorCoords(p.head, "div").top + 5, v = c.coordsChar({ left: 0, top: b }, "div");
          return v.ch < c.getLine(v.line).search(/\S/) ? O$(c, p.head) : v;
        }, Ut);
      },
      goLineUp: function(c) {
        return c.moveV(-1, "line");
      },
      goLineDown: function(c) {
        return c.moveV(1, "line");
      },
      goPageUp: function(c) {
        return c.moveV(-1, "page");
      },
      goPageDown: function(c) {
        return c.moveV(1, "page");
      },
      goCharLeft: function(c) {
        return c.moveH(-1, "char");
      },
      goCharRight: function(c) {
        return c.moveH(1, "char");
      },
      goColumnLeft: function(c) {
        return c.moveH(-1, "column");
      },
      goColumnRight: function(c) {
        return c.moveH(1, "column");
      },
      goWordLeft: function(c) {
        return c.moveH(-1, "word");
      },
      goGroupRight: function(c) {
        return c.moveH(1, "group");
      },
      goGroupLeft: function(c) {
        return c.moveH(-1, "group");
      },
      goWordRight: function(c) {
        return c.moveH(1, "word");
      },
      delCharBefore: function(c) {
        return c.deleteH(-1, "codepoint");
      },
      delCharAfter: function(c) {
        return c.deleteH(1, "char");
      },
      delWordBefore: function(c) {
        return c.deleteH(-1, "word");
      },
      delWordAfter: function(c) {
        return c.deleteH(1, "word");
      },
      delGroupBefore: function(c) {
        return c.deleteH(-1, "group");
      },
      delGroupAfter: function(c) {
        return c.deleteH(1, "group");
      },
      indentAuto: function(c) {
        return c.indentSelection("smart");
      },
      indentMore: function(c) {
        return c.indentSelection("add");
      },
      indentLess: function(c) {
        return c.indentSelection("subtract");
      },
      insertTab: function(c) {
        return c.replaceSelection("	");
      },
      insertSoftTab: function(c) {
        for (var p = [], b = c.listSelections(), v = c.options.tabSize, k = 0; k < b.length; k++) {
          var O = b[k].from(), T = rt(c.getLine(O.line), O.ch, v);
          p.push(Lt(v - T % v));
        }
        c.replaceSelections(p);
      },
      defaultTab: function(c) {
        c.somethingSelected() ? c.indentSelection("add") : c.execCommand("insertTab");
      },
      // Swap the two chars left and right of each selection's head.
      // Move cursor behind the two swapped characters afterwards.
      //
      // Doesn't consider line feeds a character.
      // Doesn't scan more than one line above to find a character.
      // Doesn't do anything on an empty line.
      // Doesn't do anything with non-empty selections.
      transposeChars: function(c) {
        return fs(c, function() {
          for (var p = c.listSelections(), b = [], v = 0; v < p.length; v++)
            if (p[v].empty()) {
              var k = p[v].head, O = Fe(c.doc, k.line).text;
              if (O) {
                if (k.ch == O.length && (k = new ye(k.line, k.ch - 1)), k.ch > 0)
                  k = new ye(k.line, k.ch + 1), c.replaceRange(
                    O.charAt(k.ch - 1) + O.charAt(k.ch - 2),
                    ye(k.line, k.ch - 2),
                    k,
                    "+transpose"
                  );
                else if (k.line > c.doc.first) {
                  var T = Fe(c.doc, k.line - 1).text;
                  T && (k = new ye(k.line, 1), c.replaceRange(
                    O.charAt(0) + c.doc.lineSeparator() + T.charAt(T.length - 1),
                    ye(k.line - 1, T.length - 1),
                    k,
                    "+transpose"
                  ));
                }
              }
              b.push(new Zt(k, k));
            }
          c.setSelections(b);
        });
      },
      newlineAndIndent: function(c) {
        return fs(c, function() {
          for (var p = c.listSelections(), b = p.length - 1; b >= 0; b--)
            c.replaceRange(c.doc.lineSeparator(), p[b].anchor, p[b].head, "+input");
          p = c.listSelections();
          for (var v = 0; v < p.length; v++)
            c.indentLine(p[v].from().line, null, !0);
          cd(c);
        });
      },
      openLine: function(c) {
        return c.replaceSelection(`
`, "start");
      },
      toggleOverwrite: function(c) {
        return c.toggleOverwrite();
      }
    };
    function _$(c, p) {
      var b = Fe(c.doc, p), v = Co(b);
      return v != b && (p = Wt(v)), Z_(!0, c, v, p, 1);
    }
    function Wte(c, p) {
      var b = Fe(c.doc, p), v = See(b);
      return v != b && (p = Wt(v)), Z_(!0, c, b, p, -1);
    }
    function O$(c, p) {
      var b = _$(c, p.line), v = Fe(c.doc, b.line), k = Ss(v, c.doc.direction);
      if (!k || k[0].level == 0) {
        var O = Math.max(b.ch, v.text.search(/\S/)), T = p.line == b.line && p.ch <= O && p.ch;
        return ye(b.line, T ? 0 : O, b.sticky);
      }
      return b;
    }
    function Iv(c, p, b) {
      if (typeof p == "string" && (p = em[p], !p))
        return !1;
      c.display.input.ensurePolled();
      var v = c.display.shift, k = !1;
      try {
        c.isReadOnly() && (c.state.suppressEdits = !0), b && (c.display.shift = !1), k = p(c) != st;
      } finally {
        c.display.shift = v, c.state.suppressEdits = !1;
      }
      return k;
    }
    function Hte(c, p, b) {
      for (var v = 0; v < c.state.keyMaps.length; v++) {
        var k = vd(p, c.state.keyMaps[v], b, c);
        if (k)
          return k;
      }
      return c.options.extraKeys && vd(p, c.options.extraKeys, b, c) || vd(p, c.options.keyMap, b, c);
    }
    var Qte = new pt();
    function tm(c, p, b, v) {
      var k = c.state.keySeq;
      if (k) {
        if (w$(p))
          return "handled";
        if (/\'$/.test(p) ? c.state.keySeq = null : Qte.set(50, function() {
          c.state.keySeq == k && (c.state.keySeq = null, c.display.input.reset());
        }), S$(c, k + " " + p, b, v))
          return !0;
      }
      return S$(c, p, b, v);
    }
    function S$(c, p, b, v) {
      var k = Hte(c, p, v);
      return k == "multi" && (c.state.keySeq = p), k == "handled" && Si(c, "keyHandled", c, p, b), (k == "handled" || k == "multi") && (Gn(b), T_(c)), !!k;
    }
    function C$(c, p) {
      var b = x$(p, !0);
      return b ? p.shiftKey && !c.state.keySeq ? tm(c, "Shift-" + b, p, function(v) {
        return Iv(c, v, !0);
      }) || tm(c, b, p, function(v) {
        if (typeof v == "string" ? /^go[A-Z]/.test(v) : v.motion)
          return Iv(c, v);
      }) : tm(c, b, p, function(v) {
        return Iv(c, v);
      }) : !1;
    }
    function Ute(c, p, b) {
      return tm(c, "'" + b + "'", p, function(v) {
        return Iv(c, v, !0);
      });
    }
    var q_ = null;
    function E$(c) {
      var p = this;
      if (!(c.target && c.target != p.display.input.getField()) && (p.curOp.focus = te(oe(p)), !bn(p, c))) {
        l && u < 11 && c.keyCode == 27 && (c.returnValue = !1);
        var b = c.keyCode;
        p.display.shift = b == 16 || c.shiftKey;
        var v = C$(p, c);
        g && (q_ = v ? b : null, !v && b == 88 && !Oo && (M ? c.metaKey : c.ctrlKey) && p.replaceSelection("", null, "cut")), r && !M && !v && b == 46 && c.shiftKey && !c.ctrlKey && document.execCommand && document.execCommand("cut"), b == 18 && !/\bCodeMirror-crosshair\b/.test(p.display.lineDiv.className) && Zte(p);
      }
    }
    function Zte(c) {
      var p = c.display.lineDiv;
      se(p, "CodeMirror-crosshair");
      function b(v) {
        (v.keyCode == 18 || !v.altKey) && (Q(p, "CodeMirror-crosshair"), Fi(document, "keyup", b), Fi(document, "mouseover", b));
      }
      tt(document, "keyup", b), tt(document, "mouseover", b);
    }
    function T$(c) {
      c.keyCode == 16 && (this.doc.sel.shift = !1), bn(this, c);
    }
    function $$(c) {
      var p = this;
      if (!(c.target && c.target != p.display.input.getField()) && !(Ja(p.display, c) || bn(p, c) || c.ctrlKey && !c.altKey || M && c.metaKey)) {
        var b = c.keyCode, v = c.charCode;
        if (g && b == q_) {
          q_ = null, Gn(c);
          return;
        }
        if (!(g && (!c.which || c.which < 10) && C$(p, c))) {
          var k = String.fromCharCode(v ?? b);
          k != "\b" && (Ute(p, c, k) || p.display.input.onKeyPress(c));
        }
      }
    }
    var qte = 400, Y_ = function(c, p, b) {
      this.time = c, this.pos = p, this.button = b;
    };
    Y_.prototype.compare = function(c, p, b) {
      return this.time + qte > c && mt(p, this.pos) == 0 && b == this.button;
    };
    var nm, im;
    function Yte(c, p) {
      var b = +/* @__PURE__ */ new Date();
      return im && im.compare(b, c, p) ? (nm = im = null, "triple") : nm && nm.compare(b, c, p) ? (im = new Y_(b, c, p), nm = null, "double") : (nm = new Y_(b, c, p), im = null, "single");
    }
    function M$(c) {
      var p = this, b = p.display;
      if (!(bn(p, c) || b.activeTouch && b.input.supportsTouch())) {
        if (b.input.ensurePolled(), b.shift = c.shiftKey, Ja(b, c)) {
          f || (b.scroller.draggable = !1, setTimeout(function() {
            return b.scroller.draggable = !0;
          }, 100));
          return;
        }
        if (!V_(p, c)) {
          var v = _c(p, c), k = Mp(c), O = v ? Yte(v, k) : "single";
          pe(p).focus(), k == 1 && p.state.selectingText && p.state.selectingText(c), !(v && Vte(p, k, v, O, c)) && (k == 1 ? v ? Gte(p, v, O, c) : ed(c) == b.scroller && Gn(c) : k == 2 ? (v && $v(p.doc, v), setTimeout(function() {
            return b.input.focus();
          }, 20)) : k == 3 && (Z ? p.display.input.onContextMenu(c) : $_(p)));
        }
      }
    }
    function Vte(c, p, b, v, k) {
      var O = "Click";
      return v == "double" ? O = "Double" + O : v == "triple" && (O = "Triple" + O), O = (p == 1 ? "Left" : p == 2 ? "Middle" : "Right") + O, tm(c, k$(O, k), k, function(T) {
        if (typeof T == "string" && (T = em[T]), !T)
          return !1;
        var D = !1;
        try {
          c.isReadOnly() && (c.state.suppressEdits = !0), D = T(c, b) != st;
        } finally {
          c.state.suppressEdits = !1;
        }
        return D;
      });
    }
    function Xte(c, p, b) {
      var v = c.getOption("configureMouse"), k = v ? v(c, p, b) : {};
      if (k.unit == null) {
        var O = $ ? b.shiftKey && b.metaKey : b.altKey;
        k.unit = O ? "rectangle" : p == "single" ? "char" : p == "double" ? "word" : "line";
      }
      return (k.extend == null || c.doc.extend) && (k.extend = c.doc.extend || b.shiftKey), k.addNew == null && (k.addNew = M ? b.metaKey : b.ctrlKey), k.moveOnDrag == null && (k.moveOnDrag = !(M ? b.altKey : b.ctrlKey)), k;
    }
    function Gte(c, p, b, v) {
      l ? setTimeout(Re(N9, c), 0) : c.curOp.focus = te(oe(c));
      var k = Xte(c, b, v), O = c.doc.sel, T;
      c.options.dragDrop && r_ && !c.isReadOnly() && b == "single" && (T = O.contains(p)) > -1 && (mt((T = O.ranges[T]).from(), p) < 0 || p.xRel > 0) && (mt(T.to(), p) > 0 || p.xRel < 0) ? Kte(c, v, p, k) : Jte(c, v, p, k);
    }
    function Kte(c, p, b, v) {
      var k = c.display, O = !1, T = Ci(c, function(B) {
        f && (k.scroller.draggable = !1), c.state.draggingText = !1, c.state.delayingBlurEvent && (c.hasFocus() ? c.state.delayingBlurEvent = !1 : $_(c)), Fi(k.wrapper.ownerDocument, "mouseup", T), Fi(k.wrapper.ownerDocument, "mousemove", D), Fi(k.scroller, "dragstart", I), Fi(k.scroller, "drop", T), O || (Gn(B), v.addNew || $v(c.doc, b, null, null, v.extend), f && !w || l && u == 9 ? setTimeout(function() {
          k.wrapper.ownerDocument.body.focus({ preventScroll: !0 }), k.input.focus();
        }, 20) : k.input.focus());
      }), D = function(B) {
        O = O || Math.abs(p.clientX - B.clientX) + Math.abs(p.clientY - B.clientY) >= 10;
      }, I = function() {
        return O = !0;
      };
      f && (k.scroller.draggable = !0), c.state.draggingText = T, T.copy = !v.moveOnDrag, tt(k.wrapper.ownerDocument, "mouseup", T), tt(k.wrapper.ownerDocument, "mousemove", D), tt(k.scroller, "dragstart", I), tt(k.scroller, "drop", T), c.state.delayingBlurEvent = !0, setTimeout(function() {
        return k.input.focus();
      }, 20), k.scroller.dragDrop && k.scroller.dragDrop();
    }
    function N$(c, p, b) {
      if (b == "char")
        return new Zt(p, p);
      if (b == "word")
        return c.findWordAt(p);
      if (b == "line")
        return new Zt(ye(p.line, 0), gt(c.doc, ye(p.line + 1, 0)));
      var v = b(c, p);
      return new Zt(v.from, v.to);
    }
    function Jte(c, p, b, v) {
      l && $_(c);
      var k = c.display, O = c.doc;
      Gn(p);
      var T, D, I = O.sel, B = I.ranges;
      if (v.addNew && !v.extend ? (D = O.sel.contains(b), D > -1 ? T = B[D] : T = new Zt(b, b)) : (T = O.sel.primary(), D = O.sel.primIndex), v.unit == "rectangle")
        v.addNew || (T = new Zt(b, b)), b = _c(c, p, !0, !0), D = -1;
      else {
        var G = N$(c, b, v.unit);
        v.extend ? T = W_(T, G.anchor, G.head, v.extend) : T = G;
      }
      v.addNew ? D == -1 ? (D = B.length, er(
        O,
        To(c, B.concat([T]), D),
        { scroll: !1, origin: "*mouse" }
      )) : B.length > 1 && B[D].empty() && v.unit == "char" && !v.extend ? (er(
        O,
        To(c, B.slice(0, D).concat(B.slice(D + 1)), 0),
        { scroll: !1, origin: "*mouse" }
      ), I = O.sel) : H_(O, D, T, At) : (D = 0, er(O, new Es([T], 0), At), I = O.sel);
      var ee = b;
      function re(Ce) {
        if (mt(ee, Ce) != 0)
          if (ee = Ce, v.unit == "rectangle") {
            for (var Ne = [], Je = c.options.tabSize, Ye = rt(Fe(O, b.line).text, b.ch, Je), Et = rt(Fe(O, Ce.line).text, Ce.ch, Je), tn = Math.min(Ye, Et), Ti = Math.max(Ye, Et), Dn = Math.min(b.line, Ce.line), ds = Math.min(c.lastLine(), Math.max(b.line, Ce.line)); Dn <= ds; Dn++) {
              var Br = Fe(O, Dn).text, ci = He(Br, tn, Je);
              tn == Ti ? Ne.push(new Zt(ye(Dn, ci), ye(Dn, ci))) : Br.length > ci && Ne.push(new Zt(ye(Dn, ci), ye(Dn, He(Br, Ti, Je))));
            }
            Ne.length || Ne.push(new Zt(b, b)), er(
              O,
              To(c, I.ranges.slice(0, D).concat(Ne), D),
              { origin: "*mouse", scroll: !1 }
            ), c.scrollIntoView(Ce);
          } else {
            var zr = T, Bi = N$(c, Ce, v.unit), bi = zr.anchor, fi;
            mt(Bi.anchor, bi) > 0 ? (fi = Bi.head, bi = uv(zr.from(), Bi.anchor)) : (fi = Bi.anchor, bi = lv(zr.to(), Bi.head));
            var Bn = I.ranges.slice(0);
            Bn[D] = ene(c, new Zt(gt(O, bi), fi)), er(O, To(c, Bn, D), At);
          }
      }
      var ie = k.wrapper.getBoundingClientRect(), fe = 0;
      function de(Ce) {
        var Ne = ++fe, Je = _c(c, Ce, !0, v.unit == "rectangle");
        if (Je)
          if (mt(Je, ee) != 0) {
            c.curOp.focus = te(oe(c)), re(Je);
            var Ye = _v(k, O);
            (Je.line >= Ye.to || Je.line < Ye.from) && setTimeout(Ci(c, function() {
              fe == Ne && de(Ce);
            }), 150);
          } else {
            var Et = Ce.clientY < ie.top ? -20 : Ce.clientY > ie.bottom ? 20 : 0;
            Et && setTimeout(Ci(c, function() {
              fe == Ne && (k.scroller.scrollTop += Et, de(Ce));
            }), 50);
          }
      }
      function ke(Ce) {
        c.state.selectingText = !1, fe = 1 / 0, Ce && (Gn(Ce), k.input.focus()), Fi(k.wrapper.ownerDocument, "mousemove", Se), Fi(k.wrapper.ownerDocument, "mouseup", Ee), O.history.lastSelOrigin = null;
      }
      var Se = Ci(c, function(Ce) {
        Ce.buttons === 0 || !Mp(Ce) ? ke(Ce) : de(Ce);
      }), Ee = Ci(c, ke);
      c.state.selectingText = Ee, tt(k.wrapper.ownerDocument, "mousemove", Se), tt(k.wrapper.ownerDocument, "mouseup", Ee);
    }
    function ene(c, p) {
      var b = p.anchor, v = p.head, k = Fe(c.doc, b.line);
      if (mt(b, v) == 0 && b.sticky == v.sticky)
        return p;
      var O = Ss(k);
      if (!O)
        return p;
      var T = Rr(O, b.ch, b.sticky), D = O[T];
      if (D.from != b.ch && D.to != b.ch)
        return p;
      var I = T + (D.from == b.ch == (D.level != 1) ? 0 : 1);
      if (I == 0 || I == O.length)
        return p;
      var B;
      if (v.line != b.line)
        B = (v.line - b.line) * (c.doc.direction == "ltr" ? 1 : -1) > 0;
      else {
        var G = Rr(O, v.ch, v.sticky), ee = G - T || (v.ch - b.ch) * (D.level == 1 ? -1 : 1);
        G == I - 1 || G == I ? B = ee < 0 : B = ee > 0;
      }
      var re = O[I + (B ? -1 : 0)], ie = B == (re.level == 1), fe = ie ? re.from : re.to, de = ie ? "after" : "before";
      return b.ch == fe && b.sticky == de ? p : new Zt(new ye(b.line, fe, de), v);
    }
    function A$(c, p, b, v) {
      var k, O;
      if (p.touches)
        k = p.touches[0].clientX, O = p.touches[0].clientY;
      else
        try {
          k = p.clientX, O = p.clientY;
        } catch {
          return !1;
        }
      if (k >= Math.floor(c.display.gutters.getBoundingClientRect().right))
        return !1;
      v && Gn(p);
      var T = c.display, D = T.lineDiv.getBoundingClientRect();
      if (O > D.bottom || !us(c, b))
        return Jf(p);
      O -= D.top - T.viewOffset;
      for (var I = 0; I < c.display.gutterSpecs.length; ++I) {
        var B = T.gutters.childNodes[I];
        if (B && B.getBoundingClientRect().right >= k) {
          var G = wc(c.doc, O), ee = c.display.gutterSpecs[I];
          return Fn(c, b, c, G, ee.className, p), Jf(p);
        }
      }
    }
    function V_(c, p) {
      return A$(c, p, "gutterClick", !0);
    }
    function D$(c, p) {
      Ja(c.display, p) || tne(c, p) || bn(c, p, "contextmenu") || Z || c.display.input.onContextMenu(p);
    }
    function tne(c, p) {
      return us(c, "gutterContextMenu") ? A$(c, p, "gutterContextMenu", !1) : !1;
    }
    function P$(c) {
      c.display.wrapper.className = c.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + c.options.theme.replace(/(^|\s)\s*/g, " cm-s-"), Rp(c);
    }
    var yd = { toString: function() {
      return "CodeMirror.Init";
    } }, I$ = {}, Lv = {};
    function nne(c) {
      var p = c.optionHandlers;
      function b(v, k, O, T) {
        c.defaults[v] = k, O && (p[v] = T ? function(D, I, B) {
          B != yd && O(D, I, B);
        } : O);
      }
      c.defineOption = b, c.Init = yd, b("value", "", function(v, k) {
        return v.setValue(k);
      }, !0), b("mode", null, function(v, k) {
        v.doc.modeOption = k, F_(v);
      }, !0), b("indentUnit", 2, F_, !0), b("indentWithTabs", !1), b("smartIndent", !0), b("tabSize", 4, function(v) {
        Up(v), Rp(v), jr(v);
      }, !0), b("lineSeparator", null, function(v, k) {
        if (v.doc.lineSep = k, !!k) {
          var O = [], T = v.doc.first;
          v.doc.iter(function(I) {
            for (var B = 0; ; ) {
              var G = I.text.indexOf(k, B);
              if (G == -1)
                break;
              B = G + k.length, O.push(ye(T, G));
            }
            T++;
          });
          for (var D = O.length - 1; D >= 0; D--)
            md(v.doc, k, O[D], ye(O[D].line, O[D].ch + k.length));
        }
      }), b("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, function(v, k, O) {
        v.state.specialChars = new RegExp(k.source + (k.test("	") ? "" : "|	"), "g"), O != yd && v.refresh();
      }), b("specialCharPlaceholder", Nee, function(v) {
        return v.refresh();
      }, !0), b("electricChars", !0), b("inputStyle", E ? "contenteditable" : "textarea", function() {
        throw new Error("inputStyle can not (yet) be changed in a running editor");
      }, !0), b("spellcheck", !1, function(v, k) {
        return v.getInputField().spellcheck = k;
      }, !0), b("autocorrect", !1, function(v, k) {
        return v.getInputField().autocorrect = k;
      }, !0), b("autocapitalize", !1, function(v, k) {
        return v.getInputField().autocapitalize = k;
      }, !0), b("rtlMoveVisually", !P), b("wholeLineUpdateBefore", !0), b("theme", "default", function(v) {
        P$(v), Qp(v);
      }, !0), b("keyMap", "default", function(v, k, O) {
        var T = Pv(k), D = O != yd && Pv(O);
        D && D.detach && D.detach(v, T), T.attach && T.attach(v, D || null);
      }), b("extraKeys", null), b("configureMouse", null), b("lineWrapping", !1, rne, !0), b("gutters", [], function(v, k) {
        v.display.gutterSpecs = R_(k, v.options.lineNumbers), Qp(v);
      }, !0), b("fixedGutter", !0, function(v, k) {
        v.display.gutters.style.left = k ? S_(v.display) + "px" : "0", v.refresh();
      }, !0), b("coverGutterNextToScrollbar", !1, function(v) {
        return fd(v);
      }, !0), b("scrollbarStyle", "native", function(v) {
        R9(v), fd(v), v.display.scrollbars.setScrollTop(v.doc.scrollTop), v.display.scrollbars.setScrollLeft(v.doc.scrollLeft);
      }, !0), b("lineNumbers", !1, function(v, k) {
        v.display.gutterSpecs = R_(v.options.gutters, k), Qp(v);
      }, !0), b("firstLineNumber", 1, Qp, !0), b("lineNumberFormatter", function(v) {
        return v;
      }, Qp, !0), b("showCursorWhenSelecting", !1, jp, !0), b("resetSelectionOnContextMenu", !0), b("lineWiseCopyCut", !0), b("pasteLinesPerSelection", !0), b("selectionsMayTouch", !1), b("readOnly", !1, function(v, k) {
        k == "nocursor" && (ud(v), v.display.input.blur()), v.display.input.readOnlyChanged(k);
      }), b("screenReaderLabel", null, function(v, k) {
        k = k === "" ? null : k, v.display.input.screenReaderLabelChanged(k);
      }), b("disableInput", !1, function(v, k) {
        k || v.display.input.reset();
      }, !0), b("dragDrop", !0, ine), b("allowDropFileTypes", null), b("cursorBlinkRate", 530), b("cursorScrollMargin", 0), b("cursorHeight", 1, jp, !0), b("singleCursorHeightPerLine", !0, jp, !0), b("workTime", 100), b("workDelay", 100), b("flattenSpans", !0, Up, !0), b("addModeClass", !1, Up, !0), b("pollInterval", 100), b("undoDepth", 200, function(v, k) {
        return v.doc.history.undoDepth = k;
      }), b("historyEventDelay", 1250), b("viewportMargin", 10, function(v) {
        return v.refresh();
      }, !0), b("maxHighlightLength", 1e4, Up, !0), b("moveInputWithCursor", !0, function(v, k) {
        k || v.display.input.resetPosition();
      }), b("tabindex", null, function(v, k) {
        return v.display.input.getField().tabIndex = k || "";
      }), b("autofocus", null), b("direction", "ltr", function(v, k) {
        return v.doc.setDirection(k);
      }, !0), b("phrases", null);
    }
    function ine(c, p, b) {
      var v = b && b != yd;
      if (!p != !v) {
        var k = c.display.dragFunctions, O = p ? tt : Fi;
        O(c.display.scroller, "dragstart", k.start), O(c.display.scroller, "dragenter", k.enter), O(c.display.scroller, "dragover", k.over), O(c.display.scroller, "dragleave", k.leave), O(c.display.scroller, "drop", k.drop);
      }
    }
    function rne(c) {
      c.options.lineWrapping ? (se(c.display.wrapper, "CodeMirror-wrap"), c.display.sizer.style.minWidth = "", c.display.sizerWidth = null) : (Q(c.display.wrapper, "CodeMirror-wrap"), m_(c)), C_(c), jr(c), Rp(c), setTimeout(function() {
        return fd(c);
      }, 100);
    }
    function wn(c, p) {
      var b = this;
      if (!(this instanceof wn))
        return new wn(c, p);
      this.options = p = p ? ze(p) : {}, ze(I$, p, !1);
      var v = p.value;
      typeof v == "string" ? v = new Fr(v, p.mode, null, p.lineSeparator, p.direction) : p.mode && (v.modeOption = p.mode), this.doc = v;
      var k = new wn.inputStyles[p.inputStyle](this), O = this.display = new vte(c, v, k, p);
      O.wrapper.CodeMirror = this, P$(this), p.lineWrapping && (this.display.wrapper.className += " CodeMirror-wrap"), R9(this), this.state = {
        keyMaps: [],
        // stores maps added by addKeyMap
        overlays: [],
        // highlighting overlays, as added by addOverlay
        modeGen: 0,
        // bumped when mode/overlay changes, used to invalidate highlighting info
        overwrite: !1,
        delayingBlurEvent: !1,
        focused: !1,
        suppressEdits: !1,
        // used to disable editing during key handlers when in readOnly mode
        pasteIncoming: -1,
        cutIncoming: -1,
        // help recognize paste/cut edits in input.poll
        selectingText: !1,
        draggingText: !1,
        highlight: new pt(),
        // stores highlight worker timeout
        keySeq: null,
        // Unfinished key sequence
        specialChars: null
      }, p.autofocus && !E && O.input.focus(), l && u < 11 && setTimeout(function() {
        return b.display.input.reset(!0);
      }, 20), sne(this), Lte(), Ec(this), this.curOp.forceUpdate = !0, q9(this, v), p.autofocus && !E || this.hasFocus() ? setTimeout(function() {
        b.hasFocus() && !b.state.focused && M_(b);
      }, 20) : ud(this);
      for (var T in Lv)
        Lv.hasOwnProperty(T) && Lv[T](this, p[T], yd);
      B9(this), p.finishInit && p.finishInit(this);
      for (var D = 0; D < X_.length; ++D)
        X_[D](this);
      Tc(this), f && p.lineWrapping && getComputedStyle(O.lineDiv).textRendering == "optimizelegibility" && (O.lineDiv.style.textRendering = "auto");
    }
    wn.defaults = I$, wn.optionHandlers = Lv;
    function sne(c) {
      var p = c.display;
      tt(p.scroller, "mousedown", Ci(c, M$)), l && u < 11 ? tt(p.scroller, "dblclick", Ci(c, function(I) {
        if (!bn(c, I)) {
          var B = _c(c, I);
          if (!(!B || V_(c, I) || Ja(c.display, I))) {
            Gn(I);
            var G = c.findWordAt(B);
            $v(c.doc, G.anchor, G.head);
          }
        }
      })) : tt(p.scroller, "dblclick", function(I) {
        return bn(c, I) || Gn(I);
      }), tt(p.scroller, "contextmenu", function(I) {
        return D$(c, I);
      }), tt(p.input.getField(), "contextmenu", function(I) {
        p.scroller.contains(I.target) || D$(c, I);
      });
      var b, v = { end: 0 };
      function k() {
        p.activeTouch && (b = setTimeout(function() {
          return p.activeTouch = null;
        }, 1e3), v = p.activeTouch, v.end = +/* @__PURE__ */ new Date());
      }
      function O(I) {
        if (I.touches.length != 1)
          return !1;
        var B = I.touches[0];
        return B.radiusX <= 1 && B.radiusY <= 1;
      }
      function T(I, B) {
        if (B.left == null)
          return !0;
        var G = B.left - I.left, ee = B.top - I.top;
        return G * G + ee * ee > 20 * 20;
      }
      tt(p.scroller, "touchstart", function(I) {
        if (!bn(c, I) && !O(I) && !V_(c, I)) {
          p.input.ensurePolled(), clearTimeout(b);
          var B = +/* @__PURE__ */ new Date();
          p.activeTouch = {
            start: B,
            moved: !1,
            prev: B - v.end <= 300 ? v : null
          }, I.touches.length == 1 && (p.activeTouch.left = I.touches[0].pageX, p.activeTouch.top = I.touches[0].pageY);
        }
      }), tt(p.scroller, "touchmove", function() {
        p.activeTouch && (p.activeTouch.moved = !0);
      }), tt(p.scroller, "touchend", function(I) {
        var B = p.activeTouch;
        if (B && !Ja(p, I) && B.left != null && !B.moved && /* @__PURE__ */ new Date() - B.start < 300) {
          var G = c.coordsChar(p.activeTouch, "page"), ee;
          !B.prev || T(B, B.prev) ? ee = new Zt(G, G) : !B.prev.prev || T(B, B.prev.prev) ? ee = c.findWordAt(G) : ee = new Zt(ye(G.line, 0), gt(c.doc, ye(G.line + 1, 0))), c.setSelection(ee.anchor, ee.head), c.focus(), Gn(I);
        }
        k();
      }), tt(p.scroller, "touchcancel", k), tt(p.scroller, "scroll", function() {
        p.scroller.clientHeight && (Bp(c, p.scroller.scrollTop), Sc(c, p.scroller.scrollLeft, !0), Fn(c, "scroll", c));
      }), tt(p.scroller, "mousewheel", function(I) {
        return H9(c, I);
      }), tt(p.scroller, "DOMMouseScroll", function(I) {
        return H9(c, I);
      }), tt(p.wrapper, "scroll", function() {
        return p.wrapper.scrollTop = p.wrapper.scrollLeft = 0;
      }), p.dragFunctions = {
        enter: function(I) {
          bn(c, I) || Ya(I);
        },
        over: function(I) {
          bn(c, I) || (Ite(c, I), Ya(I));
        },
        start: function(I) {
          return Pte(c, I);
        },
        drop: Ci(c, Dte),
        leave: function(I) {
          bn(c, I) || v$(c);
        }
      };
      var D = p.input.getField();
      tt(D, "keyup", function(I) {
        return T$.call(c, I);
      }), tt(D, "keydown", Ci(c, E$)), tt(D, "keypress", Ci(c, $$)), tt(D, "focus", function(I) {
        return M_(c, I);
      }), tt(D, "blur", function(I) {
        return ud(c, I);
      });
    }
    var X_ = [];
    wn.defineInitHook = function(c) {
      return X_.push(c);
    };
    function rm(c, p, b, v) {
      var k = c.doc, O;
      b == null && (b = "add"), b == "smart" && (k.mode.indent ? O = Ap(c, p).state : b = "prev");
      var T = c.options.tabSize, D = Fe(k, p), I = rt(D.text, null, T);
      D.stateAfter && (D.stateAfter = null);
      var B = D.text.match(/^\s*/)[0], G;
      if (!v && !/\S/.test(D.text))
        G = 0, b = "not";
      else if (b == "smart" && (G = k.mode.indent(O, D.text.slice(B.length), D.text), G == st || G > 150)) {
        if (!v)
          return;
        b = "prev";
      }
      b == "prev" ? p > k.first ? G = rt(Fe(k, p - 1).text, null, T) : G = 0 : b == "add" ? G = I + c.options.indentUnit : b == "subtract" ? G = I - c.options.indentUnit : typeof b == "number" && (G = I + b), G = Math.max(0, G);
      var ee = "", re = 0;
      if (c.options.indentWithTabs)
        for (var ie = Math.floor(G / T); ie; --ie)
          re += T, ee += "	";
      if (re < G && (ee += Lt(G - re)), ee != B)
        return md(k, ee, ye(p, 0), ye(p, B.length), "+input"), D.stateAfter = null, !0;
      for (var fe = 0; fe < k.sel.ranges.length; fe++) {
        var de = k.sel.ranges[fe];
        if (de.head.line == p && de.head.ch < B.length) {
          var ke = ye(p, B.length);
          H_(k, fe, new Zt(ke, ke));
          break;
        }
      }
    }
    var $o = null;
    function Rv(c) {
      $o = c;
    }
    function G_(c, p, b, v, k) {
      var O = c.doc;
      c.display.shift = !1, v || (v = O.sel);
      var T = +/* @__PURE__ */ new Date() - 200, D = k == "paste" || c.state.pasteIncoming > T, I = yc(p), B = null;
      if (D && v.ranges.length > 1)
        if ($o && $o.text.join(`
`) == p) {
          if (v.ranges.length % $o.text.length == 0) {
            B = [];
            for (var G = 0; G < $o.text.length; G++)
              B.push(O.splitLines($o.text[G]));
          }
        } else I.length == v.ranges.length && c.options.pasteLinesPerSelection && (B = Ie(I, function(Se) {
          return [Se];
        }));
      for (var ee = c.curOp.updateInput, re = v.ranges.length - 1; re >= 0; re--) {
        var ie = v.ranges[re], fe = ie.from(), de = ie.to();
        ie.empty() && (b && b > 0 ? fe = ye(fe.line, fe.ch - b) : c.state.overwrite && !D ? de = ye(de.line, Math.min(Fe(O, de.line).text.length, de.ch + Be(I).length)) : D && $o && $o.lineWise && $o.text.join(`
`) == I.join(`
`) && (fe = de = ye(fe.line, 0)));
        var ke = {
          from: fe,
          to: de,
          text: B ? B[re % B.length] : I,
          origin: k || (D ? "paste" : c.state.cutIncoming > T ? "cut" : "+input")
        };
        pd(c.doc, ke), Si(c, "inputRead", c, ke);
      }
      p && !D && R$(c, p), cd(c), c.curOp.updateInput < 2 && (c.curOp.updateInput = ee), c.curOp.typing = !0, c.state.pasteIncoming = c.state.cutIncoming = -1;
    }
    function L$(c, p) {
      var b = c.clipboardData && c.clipboardData.getData("Text");
      if (b)
        return c.preventDefault(), !p.isReadOnly() && !p.options.disableInput && p.hasFocus() && fs(p, function() {
          return G_(p, b, 0, null, "paste");
        }), !0;
    }
    function R$(c, p) {
      if (!(!c.options.electricChars || !c.options.smartIndent))
        for (var b = c.doc.sel, v = b.ranges.length - 1; v >= 0; v--) {
          var k = b.ranges[v];
          if (!(k.head.ch > 100 || v && b.ranges[v - 1].head.line == k.head.line)) {
            var O = c.getModeAt(k.head), T = !1;
            if (O.electricChars) {
              for (var D = 0; D < O.electricChars.length; D++)
                if (p.indexOf(O.electricChars.charAt(D)) > -1) {
                  T = rm(c, k.head.line, "smart");
                  break;
                }
            } else O.electricInput && O.electricInput.test(Fe(c.doc, k.head.line).text.slice(0, k.head.ch)) && (T = rm(c, k.head.line, "smart"));
            T && Si(c, "electricInput", c, k.head.line);
          }
        }
    }
    function j$(c) {
      for (var p = [], b = [], v = 0; v < c.doc.sel.ranges.length; v++) {
        var k = c.doc.sel.ranges[v].head.line, O = { anchor: ye(k, 0), head: ye(k + 1, 0) };
        b.push(O), p.push(c.getRange(O.anchor, O.head));
      }
      return { text: p, ranges: b };
    }
    function K_(c, p, b, v) {
      c.setAttribute("autocorrect", b ? "on" : "off"), c.setAttribute("autocapitalize", v ? "on" : "off"), c.setAttribute("spellcheck", !!p);
    }
    function F$() {
      var c = R("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"), p = R("div", [c], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
      return f ? c.style.width = "1000px" : c.setAttribute("wrap", "off"), S && (c.style.border = "1px solid black"), p;
    }
    function one(c) {
      var p = c.optionHandlers, b = c.helpers = {};
      c.prototype = {
        constructor: c,
        focus: function() {
          pe(this).focus(), this.display.input.focus();
        },
        setOption: function(v, k) {
          var O = this.options, T = O[v];
          O[v] == k && v != "mode" || (O[v] = k, p.hasOwnProperty(v) && Ci(this, p[v])(this, k, T), Fn(this, "optionChange", this, v));
        },
        getOption: function(v) {
          return this.options[v];
        },
        getDoc: function() {
          return this.doc;
        },
        addKeyMap: function(v, k) {
          this.state.keyMaps[k ? "push" : "unshift"](Pv(v));
        },
        removeKeyMap: function(v) {
          for (var k = this.state.keyMaps, O = 0; O < k.length; ++O)
            if (k[O] == v || k[O].name == v)
              return k.splice(O, 1), !0;
        },
        addOverlay: br(function(v, k) {
          var O = v.token ? v : c.getMode(this.options, v);
          if (O.startState)
            throw new Error("Overlays may not be stateful.");
          ae(
            this.state.overlays,
            {
              mode: O,
              modeSpec: v,
              opaque: k && k.opaque,
              priority: k && k.priority || 0
            },
            function(T) {
              return T.priority;
            }
          ), this.state.modeGen++, jr(this);
        }),
        removeOverlay: br(function(v) {
          for (var k = this.state.overlays, O = 0; O < k.length; ++O) {
            var T = k[O].modeSpec;
            if (T == v || typeof v == "string" && T.name == v) {
              k.splice(O, 1), this.state.modeGen++, jr(this);
              return;
            }
          }
        }),
        indentLine: br(function(v, k, O) {
          typeof k != "string" && typeof k != "number" && (k == null ? k = this.options.smartIndent ? "smart" : "prev" : k = k ? "add" : "subtract"), Np(this.doc, v) && rm(this, v, k, O);
        }),
        indentSelection: br(function(v) {
          for (var k = this.doc.sel.ranges, O = -1, T = 0; T < k.length; T++) {
            var D = k[T];
            if (D.empty())
              D.head.line > O && (rm(this, D.head.line, v, !0), O = D.head.line, T == this.doc.sel.primIndex && cd(this));
            else {
              var I = D.from(), B = D.to(), G = Math.max(O, I.line);
              O = Math.min(this.lastLine(), B.line - (B.ch ? 0 : 1)) + 1;
              for (var ee = G; ee < O; ++ee)
                rm(this, ee, v);
              var re = this.doc.sel.ranges;
              I.ch == 0 && k.length == re.length && re[T].from().ch > 0 && H_(this.doc, T, new Zt(I, re[T].to()), It);
            }
          }
        }),
        // Fetch the parser token for a given character. Useful for hacks
        // that want to inspect the mode state (say, for completion).
        getTokenAt: function(v, k) {
          return V8(this, v, k);
        },
        getLineTokens: function(v, k) {
          return V8(this, ye(v), k, !0);
        },
        getTokenTypeAt: function(v) {
          v = gt(this.doc, v);
          var k = Z8(this, Fe(this.doc, v.line)), O = 0, T = (k.length - 1) / 2, D = v.ch, I;
          if (D == 0)
            I = k[2];
          else
            for (; ; ) {
              var B = O + T >> 1;
              if ((B ? k[B * 2 - 1] : 0) >= D)
                T = B;
              else if (k[B * 2 + 1] < D)
                O = B + 1;
              else {
                I = k[B * 2 + 2];
                break;
              }
            }
          var G = I ? I.indexOf("overlay ") : -1;
          return G < 0 ? I : G == 0 ? null : I.slice(0, G - 1);
        },
        getModeAt: function(v) {
          var k = this.doc.mode;
          return k.innerMode ? c.innerMode(k, this.getTokenAt(v).state).mode : k;
        },
        getHelper: function(v, k) {
          return this.getHelpers(v, k)[0];
        },
        getHelpers: function(v, k) {
          var O = [];
          if (!b.hasOwnProperty(k))
            return O;
          var T = b[k], D = this.getModeAt(v);
          if (typeof D[k] == "string")
            T[D[k]] && O.push(T[D[k]]);
          else if (D[k])
            for (var I = 0; I < D[k].length; I++) {
              var B = T[D[k][I]];
              B && O.push(B);
            }
          else D.helperType && T[D.helperType] ? O.push(T[D.helperType]) : T[D.name] && O.push(T[D.name]);
          for (var G = 0; G < T._global.length; G++) {
            var ee = T._global[G];
            ee.pred(D, this) && ge(O, ee.val) == -1 && O.push(ee.val);
          }
          return O;
        },
        getStateAfter: function(v, k) {
          var O = this.doc;
          return v = H8(O, v ?? O.first + O.size - 1), Ap(this, v + 1, k).state;
        },
        cursorCoords: function(v, k) {
          var O, T = this.doc.sel.primary();
          return v == null ? O = T.head : typeof v == "object" ? O = gt(this.doc, v) : O = v ? T.from() : T.to(), Eo(this, O, k || "page");
        },
        charCoords: function(v, k) {
          return yv(this, gt(this.doc, v), k || "page");
        },
        coordsChar: function(v, k) {
          return v = O9(this, v, k || "page"), x_(this, v.left, v.top);
        },
        lineAtHeight: function(v, k) {
          return v = O9(this, { top: v, left: 0 }, k || "page").top, wc(this.doc, v + this.display.viewOffset);
        },
        heightAtLine: function(v, k, O) {
          var T = !1, D;
          if (typeof v == "number") {
            var I = this.doc.first + this.doc.size - 1;
            v < this.doc.first ? v = this.doc.first : v > I && (v = I, T = !0), D = Fe(this.doc, v);
          } else
            D = v;
          return bv(this, D, { top: 0, left: 0 }, k || "page", O || T).top + (T ? this.doc.height - Ka(D) : 0);
        },
        defaultTextHeight: function() {
          return ad(this.display);
        },
        defaultCharWidth: function() {
          return ld(this.display);
        },
        getViewport: function() {
          return { from: this.display.viewFrom, to: this.display.viewTo };
        },
        addWidget: function(v, k, O, T, D) {
          var I = this.display;
          v = Eo(this, gt(this.doc, v));
          var B = v.bottom, G = v.left;
          if (k.style.position = "absolute", k.setAttribute("cm-ignore-events", "true"), this.display.input.setUneditable(k), I.sizer.appendChild(k), T == "over")
            B = v.top;
          else if (T == "above" || T == "near") {
            var ee = Math.max(I.wrapper.clientHeight, this.doc.height), re = Math.max(I.sizer.clientWidth, I.lineSpace.clientWidth);
            (T == "above" || v.bottom + k.offsetHeight > ee) && v.top > k.offsetHeight ? B = v.top - k.offsetHeight : v.bottom + k.offsetHeight <= ee && (B = v.bottom), G + k.offsetWidth > re && (G = re - k.offsetWidth);
          }
          k.style.top = B + "px", k.style.left = k.style.right = "", D == "right" ? (G = I.sizer.clientWidth - k.offsetWidth, k.style.right = "0px") : (D == "left" ? G = 0 : D == "middle" && (G = (I.sizer.clientWidth - k.offsetWidth) / 2), k.style.left = G + "px"), O && ite(this, { left: G, top: B, right: G + k.offsetWidth, bottom: B + k.offsetHeight });
        },
        triggerOnKeyDown: br(E$),
        triggerOnKeyPress: br($$),
        triggerOnKeyUp: T$,
        triggerOnMouseDown: br(M$),
        execCommand: function(v) {
          if (em.hasOwnProperty(v))
            return em[v].call(null, this);
        },
        triggerElectric: br(function(v) {
          R$(this, v);
        }),
        findPosH: function(v, k, O, T) {
          var D = 1;
          k < 0 && (D = -1, k = -k);
          for (var I = gt(this.doc, v), B = 0; B < k && (I = J_(this.doc, I, D, O, T), !I.hitSide); ++B)
            ;
          return I;
        },
        moveH: br(function(v, k) {
          var O = this;
          this.extendSelectionsBy(function(T) {
            return O.display.shift || O.doc.extend || T.empty() ? J_(O.doc, T.head, v, k, O.options.rtlMoveVisually) : v < 0 ? T.from() : T.to();
          }, Ut);
        }),
        deleteH: br(function(v, k) {
          var O = this.doc.sel, T = this.doc;
          O.somethingSelected() ? T.replaceSelection("", null, "+delete") : bd(this, function(D) {
            var I = J_(T, D.head, v, k, !1);
            return v < 0 ? { from: I, to: D.head } : { from: D.head, to: I };
          });
        }),
        findPosV: function(v, k, O, T) {
          var D = 1, I = T;
          k < 0 && (D = -1, k = -k);
          for (var B = gt(this.doc, v), G = 0; G < k; ++G) {
            var ee = Eo(this, B, "div");
            if (I == null ? I = ee.left : ee.left = I, B = B$(this, ee, D, O), B.hitSide)
              break;
          }
          return B;
        },
        moveV: br(function(v, k) {
          var O = this, T = this.doc, D = [], I = !this.display.shift && !T.extend && T.sel.somethingSelected();
          if (T.extendSelectionsBy(function(G) {
            if (I)
              return v < 0 ? G.from() : G.to();
            var ee = Eo(O, G.head, "div");
            G.goalColumn != null && (ee.left = G.goalColumn), D.push(ee.left);
            var re = B$(O, ee, v, k);
            return k == "page" && G == T.sel.primary() && A_(O, yv(O, re, "div").top - ee.top), re;
          }, Ut), D.length)
            for (var B = 0; B < T.sel.ranges.length; B++)
              T.sel.ranges[B].goalColumn = D[B];
        }),
        // Find the word at the given position (as returned by coordsChar).
        findWordAt: function(v) {
          var k = this.doc, O = Fe(k, v.line).text, T = v.ch, D = v.ch;
          if (O) {
            var I = this.getHelper(v, "wordChars");
            (v.sticky == "before" || D == O.length) && T ? --T : ++D;
            for (var B = O.charAt(T), G = vn(B, I) ? function(ee) {
              return vn(ee, I);
            } : /\s/.test(B) ? function(ee) {
              return /\s/.test(ee);
            } : function(ee) {
              return !/\s/.test(ee) && !vn(ee);
            }; T > 0 && G(O.charAt(T - 1)); )
              --T;
            for (; D < O.length && G(O.charAt(D)); )
              ++D;
          }
          return new Zt(ye(v.line, T), ye(v.line, D));
        },
        toggleOverwrite: function(v) {
          v != null && v == this.state.overwrite || ((this.state.overwrite = !this.state.overwrite) ? se(this.display.cursorDiv, "CodeMirror-overwrite") : Q(this.display.cursorDiv, "CodeMirror-overwrite"), Fn(this, "overwriteToggle", this, this.state.overwrite));
        },
        hasFocus: function() {
          return this.display.input.getField() == te(oe(this));
        },
        isReadOnly: function() {
          return !!(this.options.readOnly || this.doc.cantEdit);
        },
        scrollTo: br(function(v, k) {
          Fp(this, v, k);
        }),
        getScrollInfo: function() {
          var v = this.display.scroller;
          return {
            left: v.scrollLeft,
            top: v.scrollTop,
            height: v.scrollHeight - ta(this) - this.display.barHeight,
            width: v.scrollWidth - ta(this) - this.display.barWidth,
            clientHeight: b_(this),
            clientWidth: kc(this)
          };
        },
        scrollIntoView: br(function(v, k) {
          v == null ? (v = { from: this.doc.sel.primary().head, to: null }, k == null && (k = this.options.cursorScrollMargin)) : typeof v == "number" ? v = { from: ye(v, 0), to: null } : v.from == null && (v = { from: v, to: null }), v.to || (v.to = v.from), v.margin = k || 0, v.from.line != null ? rte(this, v) : D9(this, v.from, v.to, v.margin);
        }),
        setSize: br(function(v, k) {
          var O = this, T = function(I) {
            return typeof I == "number" || /^\d+$/.test(String(I)) ? I + "px" : I;
          };
          v != null && (this.display.wrapper.style.width = T(v)), k != null && (this.display.wrapper.style.height = T(k)), this.options.lineWrapping && k9(this);
          var D = this.display.viewFrom;
          this.doc.iter(D, this.display.viewTo, function(I) {
            if (I.widgets) {
              for (var B = 0; B < I.widgets.length; B++)
                if (I.widgets[B].noHScroll) {
                  Yl(O, D, "widget");
                  break;
                }
            }
            ++D;
          }), this.curOp.forceUpdate = !0, Fn(this, "refresh", this);
        }),
        operation: function(v) {
          return fs(this, v);
        },
        startOperation: function() {
          return Ec(this);
        },
        endOperation: function() {
          return Tc(this);
        },
        refresh: br(function() {
          var v = this.display.cachedTextHeight;
          jr(this), this.curOp.forceUpdate = !0, Rp(this), Fp(this, this.doc.scrollLeft, this.doc.scrollTop), I_(this.display), (v == null || Math.abs(v - ad(this.display)) > 0.5 || this.options.lineWrapping) && C_(this), Fn(this, "refresh", this);
        }),
        swapDoc: br(function(v) {
          var k = this.doc;
          return k.cm = null, this.state.selectingText && this.state.selectingText(), q9(this, v), Rp(this), this.display.input.reset(), Fp(this, v.scrollLeft, v.scrollTop), this.curOp.forceScroll = !0, Si(this, "swapDoc", this, k), k;
        }),
        phrase: function(v) {
          var k = this.options.phrases;
          return k && Object.prototype.hasOwnProperty.call(k, v) ? k[v] : v;
        },
        getInputField: function() {
          return this.display.input.getField();
        },
        getWrapperElement: function() {
          return this.display.wrapper;
        },
        getScrollerElement: function() {
          return this.display.scroller;
        },
        getGutterElement: function() {
          return this.display.gutters;
        }
      }, yn(c), c.registerHelper = function(v, k, O) {
        b.hasOwnProperty(v) || (b[v] = c[v] = { _global: [] }), b[v][k] = O;
      }, c.registerGlobalHelper = function(v, k, O, T) {
        c.registerHelper(v, k, T), b[v]._global.push({ pred: O, val: T });
      };
    }
    function J_(c, p, b, v, k) {
      var O = p, T = b, D = Fe(c, p.line), I = k && c.direction == "rtl" ? -b : b;
      function B() {
        var Ee = p.line + I;
        return Ee < c.first || Ee >= c.first + c.size ? !1 : (p = new ye(Ee, p.ch, p.sticky), D = Fe(c, Ee));
      }
      function G(Ee) {
        var Ce;
        if (v == "codepoint") {
          var Ne = D.text.charCodeAt(p.ch + (b > 0 ? 0 : -1));
          if (isNaN(Ne))
            Ce = null;
          else {
            var Je = b > 0 ? Ne >= 55296 && Ne < 56320 : Ne >= 56320 && Ne < 57343;
            Ce = new ye(p.line, Math.max(0, Math.min(D.text.length, p.ch + b * (Je ? 2 : 1))), -b);
          }
        } else k ? Ce = zte(c.cm, D, p, b) : Ce = U_(D, p, b);
        if (Ce == null)
          if (!Ee && B())
            p = Z_(k, c.cm, D, p.line, I);
          else
            return !1;
        else
          p = Ce;
        return !0;
      }
      if (v == "char" || v == "codepoint")
        G();
      else if (v == "column")
        G(!0);
      else if (v == "word" || v == "group")
        for (var ee = null, re = v == "group", ie = c.cm && c.cm.getHelper(p, "wordChars"), fe = !0; !(b < 0 && !G(!fe)); fe = !1) {
          var de = D.text.charAt(p.ch) || `
`, ke = vn(de, ie) ? "w" : re && de == `
` ? "n" : !re || /\s/.test(de) ? null : "p";
          if (re && !fe && !ke && (ke = "s"), ee && ee != ke) {
            b < 0 && (b = 1, G(), p.sticky = "after");
            break;
          }
          if (ke && (ee = ke), b > 0 && !G(!fe))
            break;
        }
      var Se = Nv(c, p, O, T, !0);
      return a_(O, Se) && (Se.hitSide = !0), Se;
    }
    function B$(c, p, b, v) {
      var k = c.doc, O = p.left, T;
      if (v == "page") {
        var D = Math.min(c.display.wrapper.clientHeight, pe(c).innerHeight || k(c).documentElement.clientHeight), I = Math.max(D - 0.5 * ad(c.display), 3);
        T = (b > 0 ? p.bottom : p.top) + b * I;
      } else v == "line" && (T = b > 0 ? p.bottom + 3 : p.top - 3);
      for (var B; B = x_(c, O, T), !!B.outside; ) {
        if (b < 0 ? T <= 0 : T >= k.height) {
          B.hitSide = !0;
          break;
        }
        T += b * 5;
      }
      return B;
    }
    var Xt = function(c) {
      this.cm = c, this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null, this.polling = new pt(), this.composing = null, this.gracePeriod = !1, this.readDOMTimeout = null;
    };
    Xt.prototype.init = function(c) {
      var p = this, b = this, v = b.cm, k = b.div = c.lineDiv;
      k.contentEditable = !0, K_(k, v.options.spellcheck, v.options.autocorrect, v.options.autocapitalize);
      function O(D) {
        for (var I = D.target; I; I = I.parentNode) {
          if (I == k)
            return !0;
          if (/\bCodeMirror-(?:line)?widget\b/.test(I.className))
            break;
        }
        return !1;
      }
      tt(k, "paste", function(D) {
        !O(D) || bn(v, D) || L$(D, v) || u <= 11 && setTimeout(Ci(v, function() {
          return p.updateFromDOM();
        }), 20);
      }), tt(k, "compositionstart", function(D) {
        p.composing = { data: D.data, done: !1 };
      }), tt(k, "compositionupdate", function(D) {
        p.composing || (p.composing = { data: D.data, done: !1 });
      }), tt(k, "compositionend", function(D) {
        p.composing && (D.data != p.composing.data && p.readFromDOMSoon(), p.composing.done = !0);
      }), tt(k, "touchstart", function() {
        return b.forceCompositionEnd();
      }), tt(k, "input", function() {
        p.composing || p.readFromDOMSoon();
      });
      function T(D) {
        if (!(!O(D) || bn(v, D))) {
          if (v.somethingSelected())
            Rv({ lineWise: !1, text: v.getSelections() }), D.type == "cut" && v.replaceSelection("", null, "cut");
          else if (v.options.lineWiseCopyCut) {
            var I = j$(v);
            Rv({ lineWise: !0, text: I.text }), D.type == "cut" && v.operation(function() {
              v.setSelections(I.ranges, 0, It), v.replaceSelection("", null, "cut");
            });
          } else
            return;
          if (D.clipboardData) {
            D.clipboardData.clearData();
            var B = $o.text.join(`
`);
            if (D.clipboardData.setData("Text", B), D.clipboardData.getData("Text") == B) {
              D.preventDefault();
              return;
            }
          }
          var G = F$(), ee = G.firstChild;
          K_(ee), v.display.lineSpace.insertBefore(G, v.display.lineSpace.firstChild), ee.value = $o.text.join(`
`);
          var re = te(le(k));
          U(ee), setTimeout(function() {
            v.display.lineSpace.removeChild(G), re.focus(), re == k && b.showPrimarySelection();
          }, 50);
        }
      }
      tt(k, "copy", T), tt(k, "cut", T);
    }, Xt.prototype.screenReaderLabelChanged = function(c) {
      c ? this.div.setAttribute("aria-label", c) : this.div.removeAttribute("aria-label");
    }, Xt.prototype.prepareSelection = function() {
      var c = M9(this.cm, !1);
      return c.focus = te(le(this.div)) == this.div, c;
    }, Xt.prototype.showSelection = function(c, p) {
      !c || !this.cm.display.view.length || ((c.focus || p) && this.showPrimarySelection(), this.showMultipleSelections(c));
    }, Xt.prototype.getSelection = function() {
      return this.cm.display.wrapper.ownerDocument.getSelection();
    }, Xt.prototype.showPrimarySelection = function() {
      var c = this.getSelection(), p = this.cm, b = p.doc.sel.primary(), v = b.from(), k = b.to();
      if (p.display.viewTo == p.display.viewFrom || v.line >= p.display.viewTo || k.line < p.display.viewFrom) {
        c.removeAllRanges();
        return;
      }
      var O = jv(p, c.anchorNode, c.anchorOffset), T = jv(p, c.focusNode, c.focusOffset);
      if (!(O && !O.bad && T && !T.bad && mt(uv(O, T), v) == 0 && mt(lv(O, T), k) == 0)) {
        var D = p.display.view, I = v.line >= p.display.viewFrom && z$(p, v) || { node: D[0].measure.map[2], offset: 0 }, B = k.line < p.display.viewTo && z$(p, k);
        if (!B) {
          var G = D[D.length - 1].measure, ee = G.maps ? G.maps[G.maps.length - 1] : G.map;
          B = { node: ee[ee.length - 1], offset: ee[ee.length - 2] - ee[ee.length - 3] };
        }
        if (!I || !B) {
          c.removeAllRanges();
          return;
        }
        var re = c.rangeCount && c.getRangeAt(0), ie;
        try {
          ie = Y(I.node, I.offset, B.offset, B.node);
        } catch {
        }
        ie && (!r && p.state.focused ? (c.collapse(I.node, I.offset), ie.collapsed || (c.removeAllRanges(), c.addRange(ie))) : (c.removeAllRanges(), c.addRange(ie)), re && c.anchorNode == null ? c.addRange(re) : r && this.startGracePeriod()), this.rememberSelection();
      }
    }, Xt.prototype.startGracePeriod = function() {
      var c = this;
      clearTimeout(this.gracePeriod), this.gracePeriod = setTimeout(function() {
        c.gracePeriod = !1, c.selectionChanged() && c.cm.operation(function() {
          return c.cm.curOp.selectionChanged = !0;
        });
      }, 20);
    }, Xt.prototype.showMultipleSelections = function(c) {
      H(this.cm.display.cursorDiv, c.cursors), H(this.cm.display.selectionDiv, c.selection);
    }, Xt.prototype.rememberSelection = function() {
      var c = this.getSelection();
      this.lastAnchorNode = c.anchorNode, this.lastAnchorOffset = c.anchorOffset, this.lastFocusNode = c.focusNode, this.lastFocusOffset = c.focusOffset;
    }, Xt.prototype.selectionInEditor = function() {
      var c = this.getSelection();
      if (!c.rangeCount)
        return !1;
      var p = c.getRangeAt(0).commonAncestorContainer;
      return K(this.div, p);
    }, Xt.prototype.focus = function() {
      this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || te(le(this.div)) != this.div) && this.showSelection(this.prepareSelection(), !0), this.div.focus());
    }, Xt.prototype.blur = function() {
      this.div.blur();
    }, Xt.prototype.getField = function() {
      return this.div;
    }, Xt.prototype.supportsTouch = function() {
      return !0;
    }, Xt.prototype.receivedFocus = function() {
      var c = this, p = this;
      this.selectionInEditor() ? setTimeout(function() {
        return c.pollSelection();
      }, 20) : fs(this.cm, function() {
        return p.cm.curOp.selectionChanged = !0;
      });
      function b() {
        p.cm.state.focused && (p.pollSelection(), p.polling.set(p.cm.options.pollInterval, b));
      }
      this.polling.set(this.cm.options.pollInterval, b);
    }, Xt.prototype.selectionChanged = function() {
      var c = this.getSelection();
      return c.anchorNode != this.lastAnchorNode || c.anchorOffset != this.lastAnchorOffset || c.focusNode != this.lastFocusNode || c.focusOffset != this.lastFocusOffset;
    }, Xt.prototype.pollSelection = function() {
      if (!(this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged())) {
        var c = this.getSelection(), p = this.cm;
        if (C && h && this.cm.display.gutterSpecs.length && ane(c.anchorNode)) {
          this.cm.triggerOnKeyDown({ type: "keydown", keyCode: 8, preventDefault: Math.abs }), this.blur(), this.focus();
          return;
        }
        if (!this.composing) {
          this.rememberSelection();
          var b = jv(p, c.anchorNode, c.anchorOffset), v = jv(p, c.focusNode, c.focusOffset);
          b && v && fs(p, function() {
            er(p.doc, Xl(b, v), It), (b.bad || v.bad) && (p.curOp.selectionChanged = !0);
          });
        }
      }
    }, Xt.prototype.pollContent = function() {
      this.readDOMTimeout != null && (clearTimeout(this.readDOMTimeout), this.readDOMTimeout = null);
      var c = this.cm, p = c.display, b = c.doc.sel.primary(), v = b.from(), k = b.to();
      if (v.ch == 0 && v.line > c.firstLine() && (v = ye(v.line - 1, Fe(c.doc, v.line - 1).length)), k.ch == Fe(c.doc, k.line).text.length && k.line < c.lastLine() && (k = ye(k.line + 1, 0)), v.line < p.viewFrom || k.line > p.viewTo - 1)
        return !1;
      var O, T, D;
      v.line == p.viewFrom || (O = Oc(c, v.line)) == 0 ? (T = Wt(p.view[0].line), D = p.view[0].node) : (T = Wt(p.view[O].line), D = p.view[O - 1].node.nextSibling);
      var I = Oc(c, k.line), B, G;
      if (I == p.view.length - 1 ? (B = p.viewTo - 1, G = p.lineDiv.lastChild) : (B = Wt(p.view[I + 1].line) - 1, G = p.view[I + 1].node.previousSibling), !D)
        return !1;
      for (var ee = c.doc.splitLines(lne(c, D, G, T, B)), re = So(c.doc, ye(T, 0), ye(B, Fe(c.doc, B).text.length)); ee.length > 1 && re.length > 1; )
        if (Be(ee) == Be(re))
          ee.pop(), re.pop(), B--;
        else if (ee[0] == re[0])
          ee.shift(), re.shift(), T++;
        else
          break;
      for (var ie = 0, fe = 0, de = ee[0], ke = re[0], Se = Math.min(de.length, ke.length); ie < Se && de.charCodeAt(ie) == ke.charCodeAt(ie); )
        ++ie;
      for (var Ee = Be(ee), Ce = Be(re), Ne = Math.min(
        Ee.length - (ee.length == 1 ? ie : 0),
        Ce.length - (re.length == 1 ? ie : 0)
      ); fe < Ne && Ee.charCodeAt(Ee.length - fe - 1) == Ce.charCodeAt(Ce.length - fe - 1); )
        ++fe;
      if (ee.length == 1 && re.length == 1 && T == v.line)
        for (; ie && ie > v.ch && Ee.charCodeAt(Ee.length - fe - 1) == Ce.charCodeAt(Ce.length - fe - 1); )
          ie--, fe++;
      ee[ee.length - 1] = Ee.slice(0, Ee.length - fe).replace(/^\u200b+/, ""), ee[0] = ee[0].slice(ie).replace(/\u200b+$/, "");
      var Je = ye(T, ie), Ye = ye(B, re.length ? Be(re).length - fe : 0);
      if (ee.length > 1 || ee[0] || mt(Je, Ye))
        return md(c.doc, ee, Je, Ye, "+input"), !0;
    }, Xt.prototype.ensurePolled = function() {
      this.forceCompositionEnd();
    }, Xt.prototype.reset = function() {
      this.forceCompositionEnd();
    }, Xt.prototype.forceCompositionEnd = function() {
      this.composing && (clearTimeout(this.readDOMTimeout), this.composing = null, this.updateFromDOM(), this.div.blur(), this.div.focus());
    }, Xt.prototype.readFromDOMSoon = function() {
      var c = this;
      this.readDOMTimeout == null && (this.readDOMTimeout = setTimeout(function() {
        if (c.readDOMTimeout = null, c.composing)
          if (c.composing.done)
            c.composing = null;
          else
            return;
        c.updateFromDOM();
      }, 80));
    }, Xt.prototype.updateFromDOM = function() {
      var c = this;
      (this.cm.isReadOnly() || !this.pollContent()) && fs(this.cm, function() {
        return jr(c.cm);
      });
    }, Xt.prototype.setUneditable = function(c) {
      c.contentEditable = "false";
    }, Xt.prototype.onKeyPress = function(c) {
      c.charCode == 0 || this.composing || (c.preventDefault(), this.cm.isReadOnly() || Ci(this.cm, G_)(this.cm, String.fromCharCode(c.charCode == null ? c.keyCode : c.charCode), 0));
    }, Xt.prototype.readOnlyChanged = function(c) {
      this.div.contentEditable = String(c != "nocursor");
    }, Xt.prototype.onContextMenu = function() {
    }, Xt.prototype.resetPosition = function() {
    }, Xt.prototype.needsContentAttribute = !0;
    function z$(c, p) {
      var b = y_(c, p.line);
      if (!b || b.hidden)
        return null;
      var v = Fe(c.doc, p.line), k = g9(b, v, p.line), O = Ss(v, c.doc.direction), T = "left";
      if (O) {
        var D = Rr(O, p.ch);
        T = D % 2 ? "right" : "left";
      }
      var I = y9(k.map, p.ch, T);
      return I.offset = I.collapse == "right" ? I.end : I.start, I;
    }
    function ane(c) {
      for (var p = c; p; p = p.parentNode)
        if (/CodeMirror-gutter-wrapper/.test(p.className))
          return !0;
      return !1;
    }
    function wd(c, p) {
      return p && (c.bad = !0), c;
    }
    function lne(c, p, b, v, k) {
      var O = "", T = !1, D = c.doc.lineSeparator(), I = !1;
      function B(ie) {
        return function(fe) {
          return fe.id == ie;
        };
      }
      function G() {
        T && (O += D, I && (O += D), T = I = !1);
      }
      function ee(ie) {
        ie && (G(), O += ie);
      }
      function re(ie) {
        if (ie.nodeType == 1) {
          var fe = ie.getAttribute("cm-text");
          if (fe) {
            ee(fe);
            return;
          }
          var de = ie.getAttribute("cm-marker"), ke;
          if (de) {
            var Se = c.findMarks(ye(v, 0), ye(k + 1, 0), B(+de));
            Se.length && (ke = Se[0].find(0)) && ee(So(c.doc, ke.from, ke.to).join(D));
            return;
          }
          if (ie.getAttribute("contenteditable") == "false")
            return;
          var Ee = /^(pre|div|p|li|table|br)$/i.test(ie.nodeName);
          if (!/^br$/i.test(ie.nodeName) && ie.textContent.length == 0)
            return;
          Ee && G();
          for (var Ce = 0; Ce < ie.childNodes.length; Ce++)
            re(ie.childNodes[Ce]);
          /^(pre|p)$/i.test(ie.nodeName) && (I = !0), Ee && (T = !0);
        } else ie.nodeType == 3 && ee(ie.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
      }
      for (; re(p), p != b; )
        p = p.nextSibling, I = !1;
      return O;
    }
    function jv(c, p, b) {
      var v;
      if (p == c.display.lineDiv) {
        if (v = c.display.lineDiv.childNodes[b], !v)
          return wd(c.clipPos(ye(c.display.viewTo - 1)), !0);
        p = null, b = 0;
      } else
        for (v = p; ; v = v.parentNode) {
          if (!v || v == c.display.lineDiv)
            return null;
          if (v.parentNode && v.parentNode == c.display.lineDiv)
            break;
        }
      for (var k = 0; k < c.display.view.length; k++) {
        var O = c.display.view[k];
        if (O.node == v)
          return une(O, p, b);
      }
    }
    function une(c, p, b) {
      var v = c.text.firstChild, k = !1;
      if (!p || !K(v, p))
        return wd(ye(Wt(c.line), 0), !0);
      if (p == v && (k = !0, p = v.childNodes[b], b = 0, !p)) {
        var O = c.rest ? Be(c.rest) : c.line;
        return wd(ye(Wt(O), O.text.length), k);
      }
      var T = p.nodeType == 3 ? p : null, D = p;
      for (!T && p.childNodes.length == 1 && p.firstChild.nodeType == 3 && (T = p.firstChild, b && (b = T.nodeValue.length)); D.parentNode != v; )
        D = D.parentNode;
      var I = c.measure, B = I.maps;
      function G(ke, Se, Ee) {
        for (var Ce = -1; Ce < (B ? B.length : 0); Ce++)
          for (var Ne = Ce < 0 ? I.map : B[Ce], Je = 0; Je < Ne.length; Je += 3) {
            var Ye = Ne[Je + 2];
            if (Ye == ke || Ye == Se) {
              var Et = Wt(Ce < 0 ? c.line : c.rest[Ce]), tn = Ne[Je] + Ee;
              return (Ee < 0 || Ye != ke) && (tn = Ne[Je + (Ee ? 1 : 0)]), ye(Et, tn);
            }
          }
      }
      var ee = G(T, D, b);
      if (ee)
        return wd(ee, k);
      for (var re = D.nextSibling, ie = T ? T.nodeValue.length - b : 0; re; re = re.nextSibling) {
        if (ee = G(re, re.firstChild, 0), ee)
          return wd(ye(ee.line, ee.ch - ie), k);
        ie += re.textContent.length;
      }
      for (var fe = D.previousSibling, de = b; fe; fe = fe.previousSibling) {
        if (ee = G(fe, fe.firstChild, -1), ee)
          return wd(ye(ee.line, ee.ch + de), k);
        de += fe.textContent.length;
      }
    }
    var Kn = function(c) {
      this.cm = c, this.prevInput = "", this.pollingFast = !1, this.polling = new pt(), this.hasSelection = !1, this.composing = null, this.resetting = !1;
    };
    Kn.prototype.init = function(c) {
      var p = this, b = this, v = this.cm;
      this.createField(c);
      var k = this.textarea;
      c.wrapper.insertBefore(this.wrapper, c.wrapper.firstChild), S && (k.style.width = "0px"), tt(k, "input", function() {
        l && u >= 9 && p.hasSelection && (p.hasSelection = null), b.poll();
      }), tt(k, "paste", function(T) {
        bn(v, T) || L$(T, v) || (v.state.pasteIncoming = +/* @__PURE__ */ new Date(), b.fastPoll());
      });
      function O(T) {
        if (!bn(v, T)) {
          if (v.somethingSelected())
            Rv({ lineWise: !1, text: v.getSelections() });
          else if (v.options.lineWiseCopyCut) {
            var D = j$(v);
            Rv({ lineWise: !0, text: D.text }), T.type == "cut" ? v.setSelections(D.ranges, null, It) : (b.prevInput = "", k.value = D.text.join(`
`), U(k));
          } else
            return;
          T.type == "cut" && (v.state.cutIncoming = +/* @__PURE__ */ new Date());
        }
      }
      tt(k, "cut", O), tt(k, "copy", O), tt(c.scroller, "paste", function(T) {
        if (!(Ja(c, T) || bn(v, T))) {
          if (!k.dispatchEvent) {
            v.state.pasteIncoming = +/* @__PURE__ */ new Date(), b.focus();
            return;
          }
          var D = new Event("paste");
          D.clipboardData = T.clipboardData, k.dispatchEvent(D);
        }
      }), tt(c.lineSpace, "selectstart", function(T) {
        Ja(c, T) || Gn(T);
      }), tt(k, "compositionstart", function() {
        var T = v.getCursor("from");
        b.composing && b.composing.range.clear(), b.composing = {
          start: T,
          range: v.markText(T, v.getCursor("to"), { className: "CodeMirror-composing" })
        };
      }), tt(k, "compositionend", function() {
        b.composing && (b.poll(), b.composing.range.clear(), b.composing = null);
      });
    }, Kn.prototype.createField = function(c) {
      this.wrapper = F$(), this.textarea = this.wrapper.firstChild;
      var p = this.cm.options;
      K_(this.textarea, p.spellcheck, p.autocorrect, p.autocapitalize);
    }, Kn.prototype.screenReaderLabelChanged = function(c) {
      c ? this.textarea.setAttribute("aria-label", c) : this.textarea.removeAttribute("aria-label");
    }, Kn.prototype.prepareSelection = function() {
      var c = this.cm, p = c.display, b = c.doc, v = M9(c);
      if (c.options.moveInputWithCursor) {
        var k = Eo(c, b.sel.primary().head, "div"), O = p.wrapper.getBoundingClientRect(), T = p.lineDiv.getBoundingClientRect();
        v.teTop = Math.max(0, Math.min(
          p.wrapper.clientHeight - 10,
          k.top + T.top - O.top
        )), v.teLeft = Math.max(0, Math.min(
          p.wrapper.clientWidth - 10,
          k.left + T.left - O.left
        ));
      }
      return v;
    }, Kn.prototype.showSelection = function(c) {
      var p = this.cm, b = p.display;
      H(b.cursorDiv, c.cursors), H(b.selectionDiv, c.selection), c.teTop != null && (this.wrapper.style.top = c.teTop + "px", this.wrapper.style.left = c.teLeft + "px");
    }, Kn.prototype.reset = function(c) {
      if (!(this.contextMenuPending || this.composing && c)) {
        var p = this.cm;
        if (this.resetting = !0, p.somethingSelected()) {
          this.prevInput = "";
          var b = p.getSelection();
          this.textarea.value = b, p.state.focused && U(this.textarea), l && u >= 9 && (this.hasSelection = b);
        } else c || (this.prevInput = this.textarea.value = "", l && u >= 9 && (this.hasSelection = null));
        this.resetting = !1;
      }
    }, Kn.prototype.getField = function() {
      return this.textarea;
    }, Kn.prototype.supportsTouch = function() {
      return !1;
    }, Kn.prototype.focus = function() {
      if (this.cm.options.readOnly != "nocursor" && (!E || te(le(this.textarea)) != this.textarea))
        try {
          this.textarea.focus();
        } catch {
        }
    }, Kn.prototype.blur = function() {
      this.textarea.blur();
    }, Kn.prototype.resetPosition = function() {
      this.wrapper.style.top = this.wrapper.style.left = 0;
    }, Kn.prototype.receivedFocus = function() {
      this.slowPoll();
    }, Kn.prototype.slowPoll = function() {
      var c = this;
      this.pollingFast || this.polling.set(this.cm.options.pollInterval, function() {
        c.poll(), c.cm.state.focused && c.slowPoll();
      });
    }, Kn.prototype.fastPoll = function() {
      var c = !1, p = this;
      p.pollingFast = !0;
      function b() {
        var v = p.poll();
        !v && !c ? (c = !0, p.polling.set(60, b)) : (p.pollingFast = !1, p.slowPoll());
      }
      p.polling.set(20, b);
    }, Kn.prototype.poll = function() {
      var c = this, p = this.cm, b = this.textarea, v = this.prevInput;
      if (this.contextMenuPending || this.resetting || !p.state.focused || ov(b) && !v && !this.composing || p.isReadOnly() || p.options.disableInput || p.state.keySeq)
        return !1;
      var k = b.value;
      if (k == v && !p.somethingSelected())
        return !1;
      if (l && u >= 9 && this.hasSelection === k || M && /[\uf700-\uf7ff]/.test(k))
        return p.display.input.reset(), !1;
      if (p.doc.sel == p.display.selForContextMenu) {
        var O = k.charCodeAt(0);
        if (O == 8203 && !v && (v = "​"), O == 8666)
          return this.reset(), this.cm.execCommand("undo");
      }
      for (var T = 0, D = Math.min(v.length, k.length); T < D && v.charCodeAt(T) == k.charCodeAt(T); )
        ++T;
      return fs(p, function() {
        G_(
          p,
          k.slice(T),
          v.length - T,
          null,
          c.composing ? "*compose" : null
        ), k.length > 1e3 || k.indexOf(`
`) > -1 ? b.value = c.prevInput = "" : c.prevInput = k, c.composing && (c.composing.range.clear(), c.composing.range = p.markText(
          c.composing.start,
          p.getCursor("to"),
          { className: "CodeMirror-composing" }
        ));
      }), !0;
    }, Kn.prototype.ensurePolled = function() {
      this.pollingFast && this.poll() && (this.pollingFast = !1);
    }, Kn.prototype.onKeyPress = function() {
      l && u >= 9 && (this.hasSelection = null), this.fastPoll();
    }, Kn.prototype.onContextMenu = function(c) {
      var p = this, b = p.cm, v = b.display, k = p.textarea;
      p.contextMenuPending && p.contextMenuPending();
      var O = _c(b, c), T = v.scroller.scrollTop;
      if (!O || g)
        return;
      var D = b.options.resetSelectionOnContextMenu;
      D && b.doc.sel.contains(O) == -1 && Ci(b, er)(b.doc, Xl(O), It);
      var I = k.style.cssText, B = p.wrapper.style.cssText, G = p.wrapper.offsetParent.getBoundingClientRect();
      p.wrapper.style.cssText = "position: static", k.style.cssText = `position: absolute; width: 30px; height: 30px;
      top: ` + (c.clientY - G.top - 5) + "px; left: " + (c.clientX - G.left - 5) + `px;
      z-index: 1000; background: ` + (l ? "rgba(255, 255, 255, .05)" : "transparent") + `;
      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;
      var ee;
      f && (ee = k.ownerDocument.defaultView.scrollY), v.input.focus(), f && k.ownerDocument.defaultView.scrollTo(null, ee), v.input.reset(), b.somethingSelected() || (k.value = p.prevInput = " "), p.contextMenuPending = ie, v.selForContextMenu = b.doc.sel, clearTimeout(v.detectingSelectAll);
      function re() {
        if (k.selectionStart != null) {
          var de = b.somethingSelected(), ke = "​" + (de ? k.value : "");
          k.value = "⇚", k.value = ke, p.prevInput = de ? "" : "​", k.selectionStart = 1, k.selectionEnd = ke.length, v.selForContextMenu = b.doc.sel;
        }
      }
      function ie() {
        if (p.contextMenuPending == ie && (p.contextMenuPending = !1, p.wrapper.style.cssText = B, k.style.cssText = I, l && u < 9 && v.scrollbars.setScrollTop(v.scroller.scrollTop = T), k.selectionStart != null)) {
          (!l || l && u < 9) && re();
          var de = 0, ke = function() {
            v.selForContextMenu == b.doc.sel && k.selectionStart == 0 && k.selectionEnd > 0 && p.prevInput == "​" ? Ci(b, o$)(b) : de++ < 10 ? v.detectingSelectAll = setTimeout(ke, 500) : (v.selForContextMenu = null, v.input.reset());
          };
          v.detectingSelectAll = setTimeout(ke, 200);
        }
      }
      if (l && u >= 9 && re(), Z) {
        Ya(c);
        var fe = function() {
          Fi(window, "mouseup", fe), setTimeout(ie, 20);
        };
        tt(window, "mouseup", fe);
      } else
        setTimeout(ie, 50);
    }, Kn.prototype.readOnlyChanged = function(c) {
      c || this.reset(), this.textarea.disabled = c == "nocursor", this.textarea.readOnly = !!c;
    }, Kn.prototype.setUneditable = function() {
    }, Kn.prototype.needsContentAttribute = !1;
    function cne(c, p) {
      if (p = p ? ze(p) : {}, p.value = c.value, !p.tabindex && c.tabIndex && (p.tabindex = c.tabIndex), !p.placeholder && c.placeholder && (p.placeholder = c.placeholder), p.autofocus == null) {
        var b = te(le(c));
        p.autofocus = b == c || c.getAttribute("autofocus") != null && b == document.body;
      }
      function v() {
        c.value = D.getValue();
      }
      var k;
      if (c.form && (tt(c.form, "submit", v), !p.leaveSubmitMethodAlone)) {
        var O = c.form;
        k = O.submit;
        try {
          var T = O.submit = function() {
            v(), O.submit = k, O.submit(), O.submit = T;
          };
        } catch {
        }
      }
      p.finishInit = function(I) {
        I.save = v, I.getTextArea = function() {
          return c;
        }, I.toTextArea = function() {
          I.toTextArea = isNaN, v(), c.parentNode.removeChild(I.getWrapperElement()), c.style.display = "", c.form && (Fi(c.form, "submit", v), !p.leaveSubmitMethodAlone && typeof c.form.submit == "function" && (c.form.submit = k));
        };
      }, c.style.display = "none";
      var D = wn(
        function(I) {
          return c.parentNode.insertBefore(I, c.nextSibling);
        },
        p
      );
      return D;
    }
    function fne(c) {
      c.off = Fi, c.on = tt, c.wheelEventPixels = bte, c.Doc = Fr, c.splitLines = yc, c.countColumn = rt, c.findColumn = He, c.isWordChar = Dt, c.Pass = st, c.signal = Fn, c.Line = rd, c.changeEnd = Gl, c.scrollbarModel = L9, c.Pos = ye, c.cmpPos = mt, c.modes = id, c.mimeModes = Xa, c.resolveMode = ne, c.getMode = _e, c.modeExtensions = je, c.extendMode = an, c.copyState = Nn, c.startState = Ji, c.innerMode = An, c.commands = em, c.keyMap = tl, c.keyName = x$, c.isModifierKey = w$, c.lookupKey = vd, c.normalizeKeyMap = Bte, c.StringStream = Yt, c.SharedTextMarker = Gp, c.TextMarker = Jl, c.LineWidget = Xp, c.e_preventDefault = Gn, c.e_stopPropagation = rv, c.e_stop = Ya, c.addClass = se, c.contains = K, c.rmClass = Q, c.keyNames = eu;
    }
    nne(wn), one(wn);
    var dne = "iter insert remove copy getEditor constructor".split(" ");
    for (var Fv in Fr.prototype)
      Fr.prototype.hasOwnProperty(Fv) && ge(dne, Fv) < 0 && (wn.prototype[Fv] = /* @__PURE__ */ function(c) {
        return function() {
          return c.apply(this.doc, arguments);
        };
      }(Fr.prototype[Fv]));
    return yn(Fr), wn.inputStyles = { textarea: Kn, contenteditable: Xt }, wn.defineMode = function(c) {
      !wn.defaults.mode && c != "null" && (wn.defaults.mode = c), s_.apply(this, arguments);
    }, wn.defineMIME = Ke, wn.defineMode("null", function() {
      return { token: function(c) {
        return c.skipToEnd();
      } };
    }), wn.defineMIME("text/plain", "null"), wn.defineExtension = function(c, p) {
      wn.prototype[c] = p;
    }, wn.defineDocExtension = function(c, p) {
      Fr.prototype[c] = p;
    }, wn.fromTextArea = cne, fne(wn), wn.version = "5.65.20", wn;
  });
})(jG);
var Ko = jG.exports;
(function(t, e) {
  (function(n) {
    n(Ko);
  })(function(n) {
    var i = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, r = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, s = /[*+-]\s/;
    n.commands.newlineAndIndentContinueMarkdownList = function(a) {
      if (a.getOption("disableInput")) return n.Pass;
      for (var l = a.listSelections(), u = [], f = 0; f < l.length; f++) {
        var d = l[f].head, h = a.getStateAfter(d.line), m = n.innerMode(a.getMode(), h);
        if (m.mode.name !== "markdown" && m.mode.helperType !== "markdown") {
          a.execCommand("newlineAndIndent");
          return;
        } else
          h = m.state;
        var g = h.list !== !1, w = h.quote !== 0, x = a.getLine(d.line), _ = i.exec(x), S = /^\s*$/.test(x.slice(0, d.ch));
        if (!l[f].empty() || !g && !w || !_ || S) {
          a.execCommand("newlineAndIndent");
          return;
        }
        if (r.test(x)) {
          var C = w && />\s*$/.test(x), E = !/>\s*$/.test(x);
          (C || E) && a.replaceRange("", {
            line: d.line,
            ch: 0
          }, {
            line: d.line,
            ch: d.ch + 1
          }), u[f] = `
`;
        } else {
          var M = _[1], $ = _[5], P = !(s.test(_[2]) || _[2].indexOf(">") >= 0), W = P ? parseInt(_[3], 10) + 1 + _[4] : _[2].replace("x", " ");
          u[f] = `
` + M + W + $, P && o(a, d);
        }
      }
      a.replaceSelections(u);
    };
    function o(a, l) {
      var u = l.line, f = 0, d = 0, h = i.exec(a.getLine(u)), m = h[1];
      do {
        f += 1;
        var g = u + f, w = a.getLine(g), x = i.exec(w);
        if (x) {
          var _ = x[1], S = parseInt(h[3], 10) + f - d, C = parseInt(x[3], 10), E = C;
          if (m === _ && !isNaN(C))
            S === C && (E = C + 1), S > C && (E = S + 1), a.replaceRange(
              w.replace(i, _ + E + x[4] + x[5]),
              {
                line: g,
                ch: 0
              },
              {
                line: g,
                ch: w.length
              }
            );
          else {
            if (m.length > _.length || m.length < _.length && f === 1) return;
            d += 1;
          }
        }
      } while (x);
    }
  });
})();
var FG = Ko;
FG.commands.tabAndIndentMarkdownList = function(t) {
  var e = t.listSelections(), n = e[0].head, i = t.getStateAfter(n.line), r = i.list !== !1;
  if (r) {
    t.execCommand("indentMore");
    return;
  }
  if (t.options.indentWithTabs)
    t.execCommand("insertTab");
  else {
    var s = Array(t.options.tabSize + 1).join(" ");
    t.replaceSelection(s);
  }
};
FG.commands.shiftTabAndUnindentMarkdownList = function(t) {
  var e = t.listSelections(), n = e[0].head, i = t.getStateAfter(n.line), r = i.list !== !1;
  if (r) {
    t.execCommand("indentLess");
    return;
  }
  if (t.options.indentWithTabs)
    t.execCommand("insertTab");
  else {
    var s = Array(t.options.tabSize + 1).join(" ");
    t.replaceSelection(s);
  }
};
(function(t, e) {
  (function(n) {
    n(Ko);
  })(function(n) {
    n.defineOption("fullScreen", !1, function(s, o, a) {
      a == n.Init && (a = !1), !a != !o && (o ? i(s) : r(s));
    });
    function i(s) {
      var o = s.getWrapperElement();
      s.state.fullScreenRestore = {
        scrollTop: window.pageYOffset,
        scrollLeft: window.pageXOffset,
        width: o.style.width,
        height: o.style.height
      }, o.style.width = "", o.style.height = "auto", o.className += " CodeMirror-fullscreen", document.documentElement.style.overflow = "hidden", s.refresh();
    }
    function r(s) {
      var o = s.getWrapperElement();
      o.className = o.className.replace(/\s*CodeMirror-fullscreen\b/, ""), document.documentElement.style.overflow = "";
      var a = s.state.fullScreenRestore;
      o.style.width = a.width, o.style.height = a.height, window.scrollTo(a.scrollLeft, a.scrollTop), s.refresh();
    }
  });
})();
var dje = { exports: {} }, hje = { exports: {} };
(function(t, e) {
  (function(n) {
    n(Ko);
  })(function(n) {
    var i = {
      autoSelfClosers: {
        area: !0,
        base: !0,
        br: !0,
        col: !0,
        command: !0,
        embed: !0,
        frame: !0,
        hr: !0,
        img: !0,
        input: !0,
        keygen: !0,
        link: !0,
        meta: !0,
        param: !0,
        source: !0,
        track: !0,
        wbr: !0,
        menuitem: !0
      },
      implicitlyClosed: {
        dd: !0,
        li: !0,
        optgroup: !0,
        option: !0,
        p: !0,
        rp: !0,
        rt: !0,
        tbody: !0,
        td: !0,
        tfoot: !0,
        th: !0,
        tr: !0
      },
      contextGrabbers: {
        dd: { dd: !0, dt: !0 },
        dt: { dd: !0, dt: !0 },
        li: { li: !0 },
        option: { option: !0, optgroup: !0 },
        optgroup: { optgroup: !0 },
        p: {
          address: !0,
          article: !0,
          aside: !0,
          blockquote: !0,
          dir: !0,
          div: !0,
          dl: !0,
          fieldset: !0,
          footer: !0,
          form: !0,
          h1: !0,
          h2: !0,
          h3: !0,
          h4: !0,
          h5: !0,
          h6: !0,
          header: !0,
          hgroup: !0,
          hr: !0,
          menu: !0,
          nav: !0,
          ol: !0,
          p: !0,
          pre: !0,
          section: !0,
          table: !0,
          ul: !0
        },
        rp: { rp: !0, rt: !0 },
        rt: { rp: !0, rt: !0 },
        tbody: { tbody: !0, tfoot: !0 },
        td: { td: !0, th: !0 },
        tfoot: { tbody: !0 },
        th: { td: !0, th: !0 },
        thead: { tbody: !0, tfoot: !0 },
        tr: { tr: !0 }
      },
      doNotIndent: { pre: !0 },
      allowUnquoted: !0,
      allowMissing: !0,
      caseFold: !0
    }, r = {
      autoSelfClosers: {},
      implicitlyClosed: {},
      contextGrabbers: {},
      doNotIndent: {},
      allowUnquoted: !1,
      allowMissing: !1,
      allowMissingTagName: !1,
      caseFold: !1
    };
    n.defineMode("xml", function(s, o) {
      var a = s.indentUnit, l = {}, u = o.htmlMode ? i : r;
      for (var f in u) l[f] = u[f];
      for (var f in o) l[f] = o[f];
      var d, h;
      function m(R, q) {
        function Y(se) {
          return q.tokenize = se, se(R, q);
        }
        var K = R.next();
        if (K == "<")
          return R.eat("!") ? R.eat("[") ? R.match("CDATA[") ? Y(x("atom", "]]>")) : null : R.match("--") ? Y(x("comment", "-->")) : R.match("DOCTYPE", !0, !0) ? (R.eatWhile(/[\w\._\-]/), Y(_(1))) : null : R.eat("?") ? (R.eatWhile(/[\w\._\-]/), q.tokenize = x("meta", "?>"), "meta") : (d = R.eat("/") ? "closeTag" : "openTag", q.tokenize = g, "tag bracket");
        if (K == "&") {
          var te;
          return R.eat("#") ? R.eat("x") ? te = R.eatWhile(/[a-fA-F\d]/) && R.eat(";") : te = R.eatWhile(/[\d]/) && R.eat(";") : te = R.eatWhile(/[\w\.\-:]/) && R.eat(";"), te ? "atom" : "error";
        } else
          return R.eatWhile(/[^&<]/), null;
      }
      m.isInText = !0;
      function g(R, q) {
        var Y = R.next();
        if (Y == ">" || Y == "/" && R.eat(">"))
          return q.tokenize = m, d = Y == ">" ? "endTag" : "selfcloseTag", "tag bracket";
        if (Y == "=")
          return d = "equals", null;
        if (Y == "<") {
          q.tokenize = m, q.state = $, q.tagName = q.tagStart = null;
          var K = q.tokenize(R, q);
          return K ? K + " tag error" : "tag error";
        } else return /[\'\"]/.test(Y) ? (q.tokenize = w(Y), q.stringStartCol = R.column(), q.tokenize(R, q)) : (R.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/), "word");
      }
      function w(R) {
        var q = function(Y, K) {
          for (; !Y.eol(); )
            if (Y.next() == R) {
              K.tokenize = g;
              break;
            }
          return "string";
        };
        return q.isInAttribute = !0, q;
      }
      function x(R, q) {
        return function(Y, K) {
          for (; !Y.eol(); ) {
            if (Y.match(q)) {
              K.tokenize = m;
              break;
            }
            Y.next();
          }
          return R;
        };
      }
      function _(R) {
        return function(q, Y) {
          for (var K; (K = q.next()) != null; ) {
            if (K == "<")
              return Y.tokenize = _(R + 1), Y.tokenize(q, Y);
            if (K == ">")
              if (R == 1) {
                Y.tokenize = m;
                break;
              } else
                return Y.tokenize = _(R - 1), Y.tokenize(q, Y);
          }
          return "meta";
        };
      }
      function S(R) {
        return R && R.toLowerCase();
      }
      function C(R, q, Y) {
        this.prev = R.context, this.tagName = q || "", this.indent = R.indented, this.startOfLine = Y, (l.doNotIndent.hasOwnProperty(q) || R.context && R.context.noIndent) && (this.noIndent = !0);
      }
      function E(R) {
        R.context && (R.context = R.context.prev);
      }
      function M(R, q) {
        for (var Y; ; ) {
          if (!R.context || (Y = R.context.tagName, !l.contextGrabbers.hasOwnProperty(S(Y)) || !l.contextGrabbers[S(Y)].hasOwnProperty(S(q))))
            return;
          E(R);
        }
      }
      function $(R, q, Y) {
        return R == "openTag" ? (Y.tagStart = q.column(), P) : R == "closeTag" ? W : $;
      }
      function P(R, q, Y) {
        return R == "word" ? (Y.tagName = q.current(), h = "tag", L) : l.allowMissingTagName && R == "endTag" ? (h = "tag bracket", L(R, q, Y)) : (h = "error", P);
      }
      function W(R, q, Y) {
        if (R == "word") {
          var K = q.current();
          return Y.context && Y.context.tagName != K && l.implicitlyClosed.hasOwnProperty(S(Y.context.tagName)) && E(Y), Y.context && Y.context.tagName == K || l.matchClosing === !1 ? (h = "tag", z) : (h = "tag error", Z);
        } else return l.allowMissingTagName && R == "endTag" ? (h = "tag bracket", z(R, q, Y)) : (h = "error", Z);
      }
      function z(R, q, Y) {
        return R != "endTag" ? (h = "error", z) : (E(Y), $);
      }
      function Z(R, q, Y) {
        return h = "error", z(R, q, Y);
      }
      function L(R, q, Y) {
        if (R == "word")
          return h = "attribute", Q;
        if (R == "endTag" || R == "selfcloseTag") {
          var K = Y.tagName, te = Y.tagStart;
          return Y.tagName = Y.tagStart = null, R == "selfcloseTag" || l.autoSelfClosers.hasOwnProperty(S(K)) ? M(Y, K) : (M(Y, K), Y.context = new C(Y, K, te == Y.indented)), $;
        }
        return h = "error", L;
      }
      function Q(R, q, Y) {
        return R == "equals" ? V : (l.allowMissing || (h = "error"), L(R, q, Y));
      }
      function V(R, q, Y) {
        return R == "string" ? H : R == "word" && l.allowUnquoted ? (h = "string", L) : (h = "error", L(R, q, Y));
      }
      function H(R, q, Y) {
        return R == "string" ? H : L(R, q, Y);
      }
      return {
        startState: function(R) {
          var q = {
            tokenize: m,
            state: $,
            indented: R || 0,
            tagName: null,
            tagStart: null,
            context: null
          };
          return R != null && (q.baseIndent = R), q;
        },
        token: function(R, q) {
          if (!q.tagName && R.sol() && (q.indented = R.indentation()), R.eatSpace()) return null;
          d = null;
          var Y = q.tokenize(R, q);
          return (Y || d) && Y != "comment" && (h = null, q.state = q.state(d || Y, R, q), h && (Y = h == "error" ? Y + " error" : h)), Y;
        },
        indent: function(R, q, Y) {
          var K = R.context;
          if (R.tokenize.isInAttribute)
            return R.tagStart == R.indented ? R.stringStartCol + 1 : R.indented + a;
          if (K && K.noIndent) return n.Pass;
          if (R.tokenize != g && R.tokenize != m)
            return Y ? Y.match(/^(\s*)/)[0].length : 0;
          if (R.tagName)
            return l.multilineTagIndentPastTag !== !1 ? R.tagStart + R.tagName.length + 2 : R.tagStart + a * (l.multilineTagIndentFactor || 1);
          if (l.alignCDATA && /<!\[CDATA\[/.test(q)) return 0;
          var te = q && /^<(\/)?([\w_:\.-]*)/.exec(q);
          if (te && te[1])
            for (; K; )
              if (K.tagName == te[2]) {
                K = K.prev;
                break;
              } else if (l.implicitlyClosed.hasOwnProperty(S(K.tagName)))
                K = K.prev;
              else
                break;
          else if (te)
            for (; K; ) {
              var se = l.contextGrabbers[S(K.tagName)];
              if (se && se.hasOwnProperty(S(te[2])))
                K = K.prev;
              else
                break;
            }
          for (; K && K.prev && !K.startOfLine; )
            K = K.prev;
          return K ? K.indent + a : R.baseIndent || 0;
        },
        electricInput: /<\/[\s\w:]+>$/,
        blockCommentStart: "<!--",
        blockCommentEnd: "-->",
        configuration: l.htmlMode ? "html" : "xml",
        helperType: l.htmlMode ? "html" : "xml",
        skipAttribute: function(R) {
          R.state == V && (R.state = L);
        },
        xmlCurrentTag: function(R) {
          return R.tagName ? { name: R.tagName, close: R.type == "closeTag" } : null;
        },
        xmlCurrentContext: function(R) {
          for (var q = [], Y = R.context; Y; Y = Y.prev)
            q.push(Y.tagName);
          return q.reverse();
        }
      };
    }), n.defineMIME("text/xml", "xml"), n.defineMIME("application/xml", "xml"), n.mimeModes.hasOwnProperty("text/html") || n.defineMIME("text/html", { name: "xml", htmlMode: !0 });
  });
})();
var pje = hje.exports, dR = { exports: {} }, hR;
function mje() {
  return hR || (hR = 1, function(t, e) {
    (function(n) {
      n(Ko);
    })(function(n) {
      n.modeInfo = [
        { name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"] },
        { name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"] },
        { name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"] },
        { name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i },
        { name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"] },
        { name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"] },
        { name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"] },
        { name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy", "cbl"] },
        { name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"] },
        { name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"] },
        { name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"] },
        { name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"] },
        { name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/ },
        { name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"] },
        { name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"] },
        { name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"] },
        { name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"] },
        { name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"] },
        { name: "CSS", mime: "text/css", mode: "css", ext: ["css"] },
        { name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"] },
        { name: "D", mime: "text/x-d", mode: "d", ext: ["d"] },
        { name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"] },
        { name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"] },
        { name: "Django", mime: "text/x-django", mode: "django" },
        { name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/ },
        { name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"] },
        { name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"] },
        { name: "EBNF", mime: "text/x-ebnf", mode: "ebnf" },
        { name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"] },
        { name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"] },
        { name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"] },
        { name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"] },
        { name: "Embedded JavaScript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"] },
        { name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"] },
        { name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"] },
        { name: "Esper", mime: "text/x-esper", mode: "sql" },
        { name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"] },
        { name: "FCL", mime: "text/x-fcl", mode: "fcl" },
        { name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"] },
        { name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"] },
        { name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"] },
        { name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"] },
        { name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"] },
        { name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i },
        { name: "Go", mime: "text/x-go", mode: "go", ext: ["go"] },
        { name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/ },
        { name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"] },
        { name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"] },
        { name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"] },
        { name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"] },
        { name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"] },
        { name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"] },
        { name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"] },
        { name: "HTTP", mime: "message/http", mode: "http" },
        { name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"] },
        { name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"] },
        { name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"] },
        { name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"] },
        {
          name: "JavaScript",
          mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
          mode: "javascript",
          ext: ["js"],
          alias: ["ecmascript", "js", "node"]
        },
        { name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"] },
        { name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"] },
        { name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"] },
        { name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"] },
        { name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"] },
        { name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"] },
        { name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"] },
        { name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"] },
        { name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"] },
        { name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"] },
        { name: "mIRC", mime: "text/mirc", mode: "mirc" },
        { name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql" },
        { name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"] },
        { name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"] },
        { name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"] },
        { name: "MS SQL", mime: "text/x-mssql", mode: "sql" },
        { name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"] },
        { name: "MySQL", mime: "text/x-mysql", mode: "sql" },
        { name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i },
        { name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"] },
        {
          name: "NTriples",
          mimes: ["application/n-triples", "application/n-quads", "text/n-triples"],
          mode: "ntriples",
          ext: ["nt", "nq"]
        },
        { name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"] },
        { name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"] },
        { name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"] },
        { name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"] },
        { name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"] },
        { name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"] },
        { name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"] },
        { name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"] },
        { name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"] },
        { name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"] },
        { name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"] },
        { name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"] },
        { name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql" },
        { name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"] },
        { name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"] },
        { name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"] },
        { name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/ },
        { name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"] },
        { name: "Q", mime: "text/x-q", mode: "q", ext: ["q"] },
        { name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"] },
        { name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"] },
        { name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm" },
        { name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"] },
        { name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"] },
        { name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"] },
        { name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"] },
        { name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"] },
        { name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"] },
        { name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"] },
        { name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"] },
        { name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/ },
        { name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"] },
        { name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"] },
        { name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"] },
        { name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"] },
        { name: "Solr", mime: "text/x-solr", mode: "solr" },
        { name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"] },
        { name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"] },
        { name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"] },
        { name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"] },
        { name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"] },
        { name: "SQLite", mime: "text/x-sqlite", mode: "sql" },
        { name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"] },
        { name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"] },
        { name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"] },
        { name: "sTeX", mime: "text/x-stex", mode: "stex" },
        { name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"] },
        { name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"] },
        { name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"] },
        { name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"] },
        { name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki" },
        { name: "Tiki wiki", mime: "text/tiki", mode: "tiki" },
        { name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"] },
        { name: "Tornado", mime: "text/x-tornado", mode: "tornado" },
        { name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"] },
        { name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"] },
        { name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"] },
        { name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"] },
        { name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"] },
        { name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"] },
        { name: "Twig", mime: "text/x-twig", mode: "twig" },
        { name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"] },
        { name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"] },
        { name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"] },
        { name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"] },
        { name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"] },
        { name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"] },
        { name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"] },
        { name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"] },
        { name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"] },
        { name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"] },
        { name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"] },
        { name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"] },
        { name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"] },
        { name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"] },
        { name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"] },
        { name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"] }
      ];
      for (var i = 0; i < n.modeInfo.length; i++) {
        var r = n.modeInfo[i];
        r.mimes && (r.mime = r.mimes[0]);
      }
      n.findModeByMIME = function(s) {
        s = s.toLowerCase();
        for (var o = 0; o < n.modeInfo.length; o++) {
          var a = n.modeInfo[o];
          if (a.mime == s) return a;
          if (a.mimes) {
            for (var l = 0; l < a.mimes.length; l++)
              if (a.mimes[l] == s) return a;
          }
        }
        if (/\+xml$/.test(s)) return n.findModeByMIME("application/xml");
        if (/\+json$/.test(s)) return n.findModeByMIME("application/json");
      }, n.findModeByExtension = function(s) {
        s = s.toLowerCase();
        for (var o = 0; o < n.modeInfo.length; o++) {
          var a = n.modeInfo[o];
          if (a.ext) {
            for (var l = 0; l < a.ext.length; l++)
              if (a.ext[l] == s) return a;
          }
        }
      }, n.findModeByFileName = function(s) {
        for (var o = 0; o < n.modeInfo.length; o++) {
          var a = n.modeInfo[o];
          if (a.file && a.file.test(s)) return a;
        }
        var l = s.lastIndexOf("."), u = l > -1 && s.substring(l + 1, s.length);
        if (u) return n.findModeByExtension(u);
      }, n.findModeByName = function(s) {
        s = s.toLowerCase();
        for (var o = 0; o < n.modeInfo.length; o++) {
          var a = n.modeInfo[o];
          if (a.name.toLowerCase() == s) return a;
          if (a.alias) {
            for (var l = 0; l < a.alias.length; l++)
              if (a.alias[l].toLowerCase() == s) return a;
          }
        }
      };
    });
  }()), dR.exports;
}
(function(t, e) {
  (function(n) {
    n(Ko, pje, mje());
  })(function(n) {
    n.defineMode("markdown", function(i, r) {
      var s = n.getMode(i, "text/html"), o = s.name == "null";
      function a(U) {
        if (n.findModeByName) {
          var F = n.findModeByName(U);
          F && (U = F.mime || F.mimes[0]);
        }
        var oe = n.getMode(i, U);
        return oe.name == "null" ? null : oe;
      }
      r.highlightFormatting === void 0 && (r.highlightFormatting = !1), r.maxBlockquoteDepth === void 0 && (r.maxBlockquoteDepth = 0), r.taskLists === void 0 && (r.taskLists = !1), r.strikethrough === void 0 && (r.strikethrough = !1), r.emoji === void 0 && (r.emoji = !1), r.fencedCodeBlockHighlighting === void 0 && (r.fencedCodeBlockHighlighting = !0), r.fencedCodeBlockDefaultMode === void 0 && (r.fencedCodeBlockDefaultMode = "text/plain"), r.xml === void 0 && (r.xml = !0), r.tokenTypeOverrides === void 0 && (r.tokenTypeOverrides = {});
      var l = {
        header: "header",
        code: "comment",
        quote: "quote",
        list1: "variable-2",
        list2: "variable-3",
        list3: "keyword",
        hr: "hr",
        image: "image",
        imageAltText: "image-alt-text",
        imageMarker: "image-marker",
        formatting: "formatting",
        linkInline: "link",
        linkEmail: "link",
        linkText: "link",
        linkHref: "string",
        em: "em",
        strong: "strong",
        strikethrough: "strikethrough",
        emoji: "builtin"
      };
      for (var u in l)
        l.hasOwnProperty(u) && r.tokenTypeOverrides[u] && (l[u] = r.tokenTypeOverrides[u]);
      var f = /^([*\-_])(?:\s*\1){2,}\s*$/, d = /^(?:[*\-+]|^[0-9]+([.)]))\s+/, h = /^\[(x| )\](?=\s)/i, m = r.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/, g = /^ {0,3}(?:\={1,}|-{2,})\s*$/, w = /^[^#!\[\]*_\\<>` "'(~:]+/, x = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/, _ = /^\s*\[[^\]]+?\]:.*$/, S = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/, C = "    ";
      function E(U, F, oe) {
        return F.f = F.inline = oe, oe(U, F);
      }
      function M(U, F, oe) {
        return F.f = F.block = oe, oe(U, F);
      }
      function $(U) {
        return !U || !/\S/.test(U.string);
      }
      function P(U) {
        if (U.linkTitle = !1, U.linkHref = !1, U.linkText = !1, U.em = !1, U.strong = !1, U.strikethrough = !1, U.quote = 0, U.indentedCode = !1, U.f == z) {
          var F = o;
          if (!F) {
            var oe = n.innerMode(s, U.htmlState);
            F = oe.mode.name == "xml" && oe.state.tagStart === null && !oe.state.context && oe.state.tokenize.isInText;
          }
          F && (U.f = V, U.block = W, U.htmlState = null);
        }
        return U.trailingSpace = 0, U.trailingSpaceNewLine = !1, U.prevLine = U.thisLine, U.thisLine = { stream: null }, null;
      }
      function W(U, F) {
        var oe = U.column() === F.indentation, le = $(F.prevLine.stream), pe = F.indentedCode, Re = F.prevLine.hr, ze = F.list !== !1, rt = (F.listStack[F.listStack.length - 1] || 0) + 3;
        F.indentedCode = !1;
        var pt = F.indentation;
        if (F.indentationDiff === null && (F.indentationDiff = F.indentation, ze)) {
          for (F.list = null; pt < F.listStack[F.listStack.length - 1]; )
            F.listStack.pop(), F.listStack.length ? F.indentation = F.listStack[F.listStack.length - 1] : F.list = !1;
          F.list !== !1 && (F.indentationDiff = pt - F.listStack[F.listStack.length - 1]);
        }
        var ge = !le && !Re && !F.prevLine.header && (!ze || !pe) && !F.prevLine.fencedCodeEnd, De = (F.list === !1 || Re || le) && F.indentation <= rt && U.match(f), st = null;
        if (F.indentationDiff >= 4 && (pe || F.prevLine.fencedCodeEnd || F.prevLine.header || le))
          return U.skipToEnd(), F.indentedCode = !0, l.code;
        if (U.eatSpace())
          return null;
        if (oe && F.indentation <= rt && (st = U.match(m)) && st[1].length <= 6)
          return F.quote = 0, F.header = st[1].length, F.thisLine.header = !0, r.highlightFormatting && (F.formatting = "header"), F.f = F.inline, L(F);
        if (F.indentation <= rt && U.eat(">"))
          return F.quote = oe ? 1 : F.quote + 1, r.highlightFormatting && (F.formatting = "quote"), U.eatSpace(), L(F);
        if (!De && !F.setext && oe && F.indentation <= rt && (st = U.match(d))) {
          var It = st[1] ? "ol" : "ul";
          return F.indentation = pt + U.current().length, F.list = !0, F.quote = 0, F.listStack.push(F.indentation), F.em = !1, F.strong = !1, F.code = !1, F.strikethrough = !1, r.taskLists && U.match(h, !1) && (F.taskList = !0), F.f = F.inline, r.highlightFormatting && (F.formatting = ["list", "list-" + It]), L(F);
        } else {
          if (oe && F.indentation <= rt && (st = U.match(x, !0)))
            return F.quote = 0, F.fencedEndRE = new RegExp(st[1] + "+ *$"), F.localMode = r.fencedCodeBlockHighlighting && a(st[2] || r.fencedCodeBlockDefaultMode), F.localMode && (F.localState = n.startState(F.localMode)), F.f = F.block = Z, r.highlightFormatting && (F.formatting = "code-block"), F.code = -1, L(F);
          if (
            // if setext set, indicates line after ---/===
            F.setext || // line before ---/===
            (!ge || !ze) && !F.quote && F.list === !1 && !F.code && !De && !_.test(U.string) && (st = U.lookAhead(1)) && (st = st.match(g))
          )
            return F.setext ? (F.header = F.setext, F.setext = 0, U.skipToEnd(), r.highlightFormatting && (F.formatting = "header")) : (F.header = st[0].charAt(0) == "=" ? 1 : 2, F.setext = F.header), F.thisLine.header = !0, F.f = F.inline, L(F);
          if (De)
            return U.skipToEnd(), F.hr = !0, F.thisLine.hr = !0, l.hr;
          if (U.peek() === "[")
            return E(U, F, K);
        }
        return E(U, F, F.inline);
      }
      function z(U, F) {
        var oe = s.token(U, F.htmlState);
        if (!o) {
          var le = n.innerMode(s, F.htmlState);
          (le.mode.name == "xml" && le.state.tagStart === null && !le.state.context && le.state.tokenize.isInText || F.md_inside && U.current().indexOf(">") > -1) && (F.f = V, F.block = W, F.htmlState = null);
        }
        return oe;
      }
      function Z(U, F) {
        var oe = F.listStack[F.listStack.length - 1] || 0, le = F.indentation < oe, pe = oe + 3;
        if (F.fencedEndRE && F.indentation <= pe && (le || U.match(F.fencedEndRE))) {
          r.highlightFormatting && (F.formatting = "code-block");
          var Re;
          return le || (Re = L(F)), F.localMode = F.localState = null, F.block = W, F.f = V, F.fencedEndRE = null, F.code = 0, F.thisLine.fencedCodeEnd = !0, le ? M(U, F, F.block) : Re;
        } else return F.localMode ? F.localMode.token(U, F.localState) : (U.skipToEnd(), l.code);
      }
      function L(U) {
        var F = [];
        if (U.formatting) {
          F.push(l.formatting), typeof U.formatting == "string" && (U.formatting = [U.formatting]);
          for (var oe = 0; oe < U.formatting.length; oe++)
            F.push(l.formatting + "-" + U.formatting[oe]), U.formatting[oe] === "header" && F.push(l.formatting + "-" + U.formatting[oe] + "-" + U.header), U.formatting[oe] === "quote" && (!r.maxBlockquoteDepth || r.maxBlockquoteDepth >= U.quote ? F.push(l.formatting + "-" + U.formatting[oe] + "-" + U.quote) : F.push("error"));
        }
        if (U.taskOpen)
          return F.push("meta"), F.length ? F.join(" ") : null;
        if (U.taskClosed)
          return F.push("property"), F.length ? F.join(" ") : null;
        if (U.linkHref ? F.push(l.linkHref, "url") : (U.strong && F.push(l.strong), U.em && F.push(l.em), U.strikethrough && F.push(l.strikethrough), U.emoji && F.push(l.emoji), U.linkText && F.push(l.linkText), U.code && F.push(l.code), U.image && F.push(l.image), U.imageAltText && F.push(l.imageAltText, "link"), U.imageMarker && F.push(l.imageMarker)), U.header && F.push(l.header, l.header + "-" + U.header), U.quote && (F.push(l.quote), !r.maxBlockquoteDepth || r.maxBlockquoteDepth >= U.quote ? F.push(l.quote + "-" + U.quote) : F.push(l.quote + "-" + r.maxBlockquoteDepth)), U.list !== !1) {
          var le = (U.listStack.length - 1) % 3;
          le ? le === 1 ? F.push(l.list2) : F.push(l.list3) : F.push(l.list1);
        }
        return U.trailingSpaceNewLine ? F.push("trailing-space-new-line") : U.trailingSpace && F.push("trailing-space-" + (U.trailingSpace % 2 ? "a" : "b")), F.length ? F.join(" ") : null;
      }
      function Q(U, F) {
        if (U.match(w, !0))
          return L(F);
      }
      function V(U, F) {
        var oe = F.text(U, F);
        if (typeof oe < "u")
          return oe;
        if (F.list)
          return F.list = null, L(F);
        if (F.taskList) {
          var le = U.match(h, !0)[1] === " ";
          return le ? F.taskOpen = !0 : F.taskClosed = !0, r.highlightFormatting && (F.formatting = "task"), F.taskList = !1, L(F);
        }
        if (F.taskOpen = !1, F.taskClosed = !1, F.header && U.match(/^#+$/, !0))
          return r.highlightFormatting && (F.formatting = "header"), L(F);
        var pe = U.next();
        if (F.linkTitle) {
          F.linkTitle = !1;
          var Re = pe;
          pe === "(" && (Re = ")"), Re = (Re + "").replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
          var ze = "^\\s*(?:[^" + Re + "\\\\]+|\\\\\\\\|\\\\.)" + Re;
          if (U.match(new RegExp(ze), !0))
            return l.linkHref;
        }
        if (pe === "`") {
          var rt = F.formatting;
          r.highlightFormatting && (F.formatting = "code"), U.eatWhile("`");
          var pt = U.current().length;
          if (F.code == 0 && (!F.quote || pt == 1))
            return F.code = pt, L(F);
          if (pt == F.code) {
            var ge = L(F);
            return F.code = 0, ge;
          } else
            return F.formatting = rt, L(F);
        } else if (F.code)
          return L(F);
        if (pe === "\\" && (U.next(), r.highlightFormatting)) {
          var De = L(F), st = l.formatting + "-escape";
          return De ? De + " " + st : st;
        }
        if (pe === "!" && U.match(/\[[^\]]*\] ?(?:\(|\[)/, !1))
          return F.imageMarker = !0, F.image = !0, r.highlightFormatting && (F.formatting = "image"), L(F);
        if (pe === "[" && F.imageMarker && U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, !1))
          return F.imageMarker = !1, F.imageAltText = !0, r.highlightFormatting && (F.formatting = "image"), L(F);
        if (pe === "]" && F.imageAltText) {
          r.highlightFormatting && (F.formatting = "image");
          var De = L(F);
          return F.imageAltText = !1, F.image = !1, F.inline = F.f = R, De;
        }
        if (pe === "[" && !F.image)
          return F.linkText && U.match(/^.*?\]/) || (F.linkText = !0, r.highlightFormatting && (F.formatting = "link")), L(F);
        if (pe === "]" && F.linkText) {
          r.highlightFormatting && (F.formatting = "link");
          var De = L(F);
          return F.linkText = !1, F.inline = F.f = U.match(/\(.*?\)| ?\[.*?\]/, !1) ? R : V, De;
        }
        if (pe === "<" && U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, !1)) {
          F.f = F.inline = H, r.highlightFormatting && (F.formatting = "link");
          var De = L(F);
          return De ? De += " " : De = "", De + l.linkInline;
        }
        if (pe === "<" && U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, !1)) {
          F.f = F.inline = H, r.highlightFormatting && (F.formatting = "link");
          var De = L(F);
          return De ? De += " " : De = "", De + l.linkEmail;
        }
        if (r.xml && pe === "<" && U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, !1)) {
          var It = U.string.indexOf(">", U.pos);
          if (It != -1) {
            var At = U.string.substring(U.start, It);
            /markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(At) && (F.md_inside = !0);
          }
          return U.backUp(1), F.htmlState = n.startState(s), M(U, F, z);
        }
        if (r.xml && pe === "<" && U.match(/^\/\w*?>/))
          return F.md_inside = !1, "tag";
        if (pe === "*" || pe === "_") {
          for (var Ut = 1, He = U.pos == 1 ? " " : U.string.charAt(U.pos - 2); Ut < 3 && U.eat(pe); ) Ut++;
          var Ct = U.peek() || " ", Lt = !/\s/.test(Ct) && (!S.test(Ct) || /\s/.test(He) || S.test(He)), Be = !/\s/.test(He) && (!S.test(He) || /\s/.test(Ct) || S.test(Ct)), Ie = null, ae = null;
          if (Ut % 2 && (!F.em && Lt && (pe === "*" || !Be || S.test(He)) ? Ie = !0 : F.em == pe && Be && (pe === "*" || !Lt || S.test(Ct)) && (Ie = !1)), Ut > 1 && (!F.strong && Lt && (pe === "*" || !Be || S.test(He)) ? ae = !0 : F.strong == pe && Be && (pe === "*" || !Lt || S.test(Ct)) && (ae = !1)), ae != null || Ie != null) {
            r.highlightFormatting && (F.formatting = Ie == null ? "strong" : ae == null ? "em" : "strong em"), Ie === !0 && (F.em = pe), ae === !0 && (F.strong = pe);
            var ge = L(F);
            return Ie === !1 && (F.em = !1), ae === !1 && (F.strong = !1), ge;
          }
        } else if (pe === " " && (U.eat("*") || U.eat("_"))) {
          if (U.peek() === " ")
            return L(F);
          U.backUp(1);
        }
        if (r.strikethrough) {
          if (pe === "~" && U.eatWhile(pe)) {
            if (F.strikethrough) {
              r.highlightFormatting && (F.formatting = "strikethrough");
              var ge = L(F);
              return F.strikethrough = !1, ge;
            } else if (U.match(/^[^\s]/, !1))
              return F.strikethrough = !0, r.highlightFormatting && (F.formatting = "strikethrough"), L(F);
          } else if (pe === " " && U.match("~~", !0)) {
            if (U.peek() === " ")
              return L(F);
            U.backUp(2);
          }
        }
        if (r.emoji && pe === ":" && U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
          F.emoji = !0, r.highlightFormatting && (F.formatting = "emoji");
          var Ue = L(F);
          return F.emoji = !1, Ue;
        }
        return pe === " " && (U.match(/^ +$/, !1) ? F.trailingSpace++ : F.trailingSpace && (F.trailingSpaceNewLine = !0)), L(F);
      }
      function H(U, F) {
        var oe = U.next();
        if (oe === ">") {
          F.f = F.inline = V, r.highlightFormatting && (F.formatting = "link");
          var le = L(F);
          return le ? le += " " : le = "", le + l.linkInline;
        }
        return U.match(/^[^>]+/, !0), l.linkInline;
      }
      function R(U, F) {
        if (U.eatSpace())
          return null;
        var oe = U.next();
        return oe === "(" || oe === "[" ? (F.f = F.inline = Y(oe === "(" ? ")" : "]"), r.highlightFormatting && (F.formatting = "link-string"), F.linkHref = !0, L(F)) : "error";
      }
      var q = {
        ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
        "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
      };
      function Y(U) {
        return function(F, oe) {
          var le = F.next();
          if (le === U) {
            oe.f = oe.inline = V, r.highlightFormatting && (oe.formatting = "link-string");
            var pe = L(oe);
            return oe.linkHref = !1, pe;
          }
          return F.match(q[U]), oe.linkHref = !0, L(oe);
        };
      }
      function K(U, F) {
        return U.match(/^([^\]\\]|\\.)*\]:/, !1) ? (F.f = te, U.next(), r.highlightFormatting && (F.formatting = "link"), F.linkText = !0, L(F)) : E(U, F, V);
      }
      function te(U, F) {
        if (U.match("]:", !0)) {
          F.f = F.inline = se, r.highlightFormatting && (F.formatting = "link");
          var oe = L(F);
          return F.linkText = !1, oe;
        }
        return U.match(/^([^\]\\]|\\.)+/, !0), l.linkText;
      }
      function se(U, F) {
        return U.eatSpace() ? null : (U.match(/^[^\s]+/, !0), U.peek() === void 0 ? F.linkTitle = !0 : U.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/, !0), F.f = F.inline = V, l.linkHref + " url");
      }
      var ce = {
        startState: function() {
          return {
            f: W,
            prevLine: { stream: null },
            thisLine: { stream: null },
            block: W,
            htmlState: null,
            indentation: 0,
            inline: V,
            text: Q,
            formatting: !1,
            linkText: !1,
            linkHref: !1,
            linkTitle: !1,
            code: 0,
            em: !1,
            strong: !1,
            header: 0,
            setext: 0,
            hr: !1,
            taskList: !1,
            list: !1,
            listStack: [],
            quote: 0,
            trailingSpace: 0,
            trailingSpaceNewLine: !1,
            strikethrough: !1,
            emoji: !1,
            fencedEndRE: null
          };
        },
        copyState: function(U) {
          return {
            f: U.f,
            prevLine: U.prevLine,
            thisLine: U.thisLine,
            block: U.block,
            htmlState: U.htmlState && n.copyState(s, U.htmlState),
            indentation: U.indentation,
            localMode: U.localMode,
            localState: U.localMode ? n.copyState(U.localMode, U.localState) : null,
            inline: U.inline,
            text: U.text,
            formatting: !1,
            linkText: U.linkText,
            linkTitle: U.linkTitle,
            linkHref: U.linkHref,
            code: U.code,
            em: U.em,
            strong: U.strong,
            strikethrough: U.strikethrough,
            emoji: U.emoji,
            header: U.header,
            setext: U.setext,
            hr: U.hr,
            taskList: U.taskList,
            list: U.list,
            listStack: U.listStack.slice(0),
            quote: U.quote,
            indentedCode: U.indentedCode,
            trailingSpace: U.trailingSpace,
            trailingSpaceNewLine: U.trailingSpaceNewLine,
            md_inside: U.md_inside,
            fencedEndRE: U.fencedEndRE
          };
        },
        token: function(U, F) {
          if (F.formatting = !1, U != F.thisLine.stream) {
            if (F.header = 0, F.hr = !1, U.match(/^\s*$/, !0))
              return P(F), null;
            if (F.prevLine = F.thisLine, F.thisLine = { stream: U }, F.taskList = !1, F.trailingSpace = 0, F.trailingSpaceNewLine = !1, !F.localState && (F.f = F.block, F.f != z)) {
              var oe = U.match(/^\s*/, !0)[0].replace(/\t/g, C).length;
              if (F.indentation = oe, F.indentationDiff = null, oe > 0) return null;
            }
          }
          return F.f(U, F);
        },
        innerMode: function(U) {
          return U.block == z ? { state: U.htmlState, mode: s } : U.localState ? { state: U.localState, mode: U.localMode } : { state: U, mode: ce };
        },
        indent: function(U, F, oe) {
          return U.block == z && s.indent ? s.indent(U.htmlState, F, oe) : U.localState && U.localMode.indent ? U.localMode.indent(U.localState, F, oe) : n.Pass;
        },
        blankLine: P,
        getType: L,
        blockCommentStart: "<!--",
        blockCommentEnd: "-->",
        closeBrackets: "()[]{}''\"\"``",
        fold: "markdown"
      };
      return ce;
    }, "xml"), n.defineMIME("text/markdown", "markdown"), n.defineMIME("text/x-markdown", "markdown");
  });
})();
var gje = dje.exports, vje = { exports: {} };
(function(t, e) {
  (function(n) {
    n(Ko);
  })(function(n) {
    n.overlayMode = function(i, r, s) {
      return {
        startState: function() {
          return {
            base: n.startState(i),
            overlay: n.startState(r),
            basePos: 0,
            baseCur: null,
            overlayPos: 0,
            overlayCur: null,
            streamSeen: null
          };
        },
        copyState: function(o) {
          return {
            base: n.copyState(i, o.base),
            overlay: n.copyState(r, o.overlay),
            basePos: o.basePos,
            baseCur: null,
            overlayPos: o.overlayPos,
            overlayCur: null
          };
        },
        token: function(o, a) {
          return (o != a.streamSeen || Math.min(a.basePos, a.overlayPos) < o.start) && (a.streamSeen = o, a.basePos = a.overlayPos = o.start), o.start == a.basePos && (a.baseCur = i.token(o, a.base), a.basePos = o.pos), o.start == a.overlayPos && (o.pos = o.start, a.overlayCur = r.token(o, a.overlay), a.overlayPos = o.pos), o.pos = Math.min(a.basePos, a.overlayPos), a.overlayCur == null ? a.baseCur : a.baseCur != null && a.overlay.combineTokens || s && a.overlay.combineTokens == null ? a.baseCur + " " + a.overlayCur : a.overlayCur;
        },
        indent: i.indent && function(o, a, l) {
          return i.indent(o.base, a, l);
        },
        electricChars: i.electricChars,
        innerMode: function(o) {
          return { state: o.base, mode: i };
        },
        blankLine: function(o) {
          var a, l;
          return i.blankLine && (a = i.blankLine(o.base)), r.blankLine && (l = r.blankLine(o.overlay)), l == null ? a : s && a != null ? a + " " + l : l;
        }
      };
    };
  });
})();
var bje = vje.exports;
(function(t, e) {
  (function(n) {
    n(Ko);
  })(function(n) {
    n.defineOption("placeholder", "", function(u, f, d) {
      var h = d && d != n.Init;
      if (f && !h)
        u.on("blur", o), u.on("change", a), u.on("swapDoc", a), n.on(u.getInputField(), "compositionupdate", u.state.placeholderCompose = function() {
          s(u);
        }), a(u);
      else if (!f && h) {
        u.off("blur", o), u.off("change", a), u.off("swapDoc", a), n.off(u.getInputField(), "compositionupdate", u.state.placeholderCompose), i(u);
        var m = u.getWrapperElement();
        m.className = m.className.replace(" CodeMirror-empty", "");
      }
      f && !u.hasFocus() && o(u);
    });
    function i(u) {
      u.state.placeholder && (u.state.placeholder.parentNode.removeChild(u.state.placeholder), u.state.placeholder = null);
    }
    function r(u) {
      i(u);
      var f = u.state.placeholder = document.createElement("pre");
      f.style.cssText = "height: 0; overflow: visible", f.style.direction = u.getOption("direction"), f.className = "CodeMirror-placeholder CodeMirror-line-like";
      var d = u.getOption("placeholder");
      typeof d == "string" && (d = document.createTextNode(d)), f.appendChild(d), u.display.lineSpace.insertBefore(f, u.display.lineSpace.firstChild);
    }
    function s(u) {
      setTimeout(function() {
        var f = !1;
        if (u.lineCount() == 1) {
          var d = u.getInputField();
          f = d.nodeName == "TEXTAREA" ? !u.getLine(0).length : !/[^\u200b]/.test(d.querySelector(".CodeMirror-line").textContent);
        }
        f ? r(u) : i(u);
      }, 20);
    }
    function o(u) {
      l(u) && r(u);
    }
    function a(u) {
      var f = u.getWrapperElement(), d = l(u);
      f.className = f.className.replace(" CodeMirror-empty", "") + (d ? " CodeMirror-empty" : ""), d ? r(u) : i(u);
    }
    function l(u) {
      return u.lineCount() === 1 && u.getLine(0) === "";
    }
  });
})();
(function(t, e) {
  (function(n) {
    n(Ko);
  })(function(n) {
    n.defineOption("styleSelectedText", !1, function(h, m, g) {
      var w = g && g != n.Init;
      m && !w ? (h.state.markedSelection = [], h.state.markedSelectionStyle = typeof m == "string" ? m : "CodeMirror-selectedtext", f(h), h.on("cursorActivity", i), h.on("change", r)) : !m && w && (h.off("cursorActivity", i), h.off("change", r), u(h), h.state.markedSelection = h.state.markedSelectionStyle = null);
    });
    function i(h) {
      h.state.markedSelection && h.operation(function() {
        d(h);
      });
    }
    function r(h) {
      h.state.markedSelection && h.state.markedSelection.length && h.operation(function() {
        u(h);
      });
    }
    var s = 8, o = n.Pos, a = n.cmpPos;
    function l(h, m, g, w) {
      if (a(m, g) != 0)
        for (var x = h.state.markedSelection, _ = h.state.markedSelectionStyle, S = m.line; ; ) {
          var C = S == m.line ? m : o(S, 0), E = S + s, M = E >= g.line, $ = M ? g : o(E, 0), P = h.markText(C, $, { className: _ });
          if (w == null ? x.push(P) : x.splice(w++, 0, P), M) break;
          S = E;
        }
    }
    function u(h) {
      for (var m = h.state.markedSelection, g = 0; g < m.length; ++g) m[g].clear();
      m.length = 0;
    }
    function f(h) {
      u(h);
      for (var m = h.listSelections(), g = 0; g < m.length; g++)
        l(h, m[g].from(), m[g].to());
    }
    function d(h) {
      if (!h.somethingSelected()) return u(h);
      if (h.listSelections().length > 1) return f(h);
      var m = h.getCursor("start"), g = h.getCursor("end"), w = h.state.markedSelection;
      if (!w.length) return l(h, m, g);
      var x = w[0].find(), _ = w[w.length - 1].find();
      if (!x || !_ || g.line - m.line <= s || a(m, _.to) >= 0 || a(g, x.from) <= 0)
        return f(h);
      for (; a(m, x.from) > 0; )
        w.shift().clear(), x = w[0].find();
      for (a(m, x.from) < 0 && (x.to.line - m.line < s ? (w.shift().clear(), l(h, m, x.to, 0)) : l(h, m, x.from, 0)); a(g, _.to) < 0; )
        w.pop().clear(), _ = w[w.length - 1].find();
      a(g, _.to) > 0 && (g.line - _.from.line < s ? (w.pop().clear(), l(h, _.from, g)) : l(h, _.to, g));
    }
  });
})();
(function(t, e) {
  (function(n) {
    n(Ko, gje, bje);
  })(function(n) {
    var i = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;
    n.defineMode("gfm", function(r, s) {
      var o = 0;
      function a(d) {
        return d.code = !1, null;
      }
      var l = {
        startState: function() {
          return {
            code: !1,
            codeBlock: !1,
            ateSpace: !1
          };
        },
        copyState: function(d) {
          return {
            code: d.code,
            codeBlock: d.codeBlock,
            ateSpace: d.ateSpace
          };
        },
        token: function(d, h) {
          if (h.combineTokens = null, h.codeBlock)
            return d.match(/^```+/) ? (h.codeBlock = !1, null) : (d.skipToEnd(), null);
          if (d.sol() && (h.code = !1), d.sol() && d.match(/^```+/))
            return d.skipToEnd(), h.codeBlock = !0, null;
          if (d.peek() === "`") {
            d.next();
            var m = d.pos;
            d.eatWhile("`");
            var g = 1 + d.pos - m;
            return h.code ? g === o && (h.code = !1) : (o = g, h.code = !0), null;
          } else if (h.code)
            return d.next(), null;
          if (d.eatSpace())
            return h.ateSpace = !0, null;
          if ((d.sol() || h.ateSpace) && (h.ateSpace = !1, s.gitHubSpice !== !1)) {
            if (d.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))
              return h.combineTokens = !0, "link";
            if (d.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))
              return h.combineTokens = !0, "link";
          }
          return d.match(i) && d.string.slice(d.start - 2, d.start) != "](" && (d.start == 0 || /\W/.test(d.string.charAt(d.start - 1))) ? (h.combineTokens = !0, "link") : (d.next(), null);
        },
        blankLine: a
      }, u = {
        taskLists: !0,
        strikethrough: !0,
        emoji: !0
      };
      for (var f in s)
        u[f] = s[f];
      return u.name = "markdown", n.overlayMode(n.getMode(r, u), l);
    }, "markdown"), n.defineMIME("text/x-gfm", "gfm");
  });
})();
var BG = { exports: {} };
(function(t) {
  var e;
  (function() {
    e = function(n, i, r, s) {
      s = s || {}, this.dictionary = null, this.rules = {}, this.dictionaryTable = {}, this.compoundRules = [], this.compoundRuleCodes = {}, this.replacementTable = [], this.flags = s.flags || {}, this.memoized = {}, this.loaded = !1;
      var o = this, a, l, u, f, d;
      n && (o.dictionary = n, i && r ? w() : typeof window < "u" && "chrome" in window && "extension" in window.chrome && "getURL" in window.chrome.extension ? (s.dictionaryPath ? a = s.dictionaryPath : a = "typo/dictionaries", i || h(chrome.extension.getURL(a + "/" + n + "/" + n + ".aff"), m), r || h(chrome.extension.getURL(a + "/" + n + "/" + n + ".dic"), g)) : (s.dictionaryPath ? a = s.dictionaryPath : typeof __dirname < "u" ? a = __dirname + "/dictionaries" : a = "./dictionaries", i || h(a + "/" + n + "/" + n + ".aff", m), r || h(a + "/" + n + "/" + n + ".dic", g)));
      function h(x, _) {
        var S = o._readFile(x, null, s.asyncLoad);
        s.asyncLoad ? S.then(function(C) {
          _(C);
        }) : _(S);
      }
      function m(x) {
        i = x, r && w();
      }
      function g(x) {
        r = x, i && w();
      }
      function w() {
        for (o.rules = o._parseAFF(i), o.compoundRuleCodes = {}, l = 0, f = o.compoundRules.length; l < f; l++) {
          var x = o.compoundRules[l];
          for (u = 0, d = x.length; u < d; u++)
            o.compoundRuleCodes[x[u]] = [];
        }
        "ONLYINCOMPOUND" in o.flags && (o.compoundRuleCodes[o.flags.ONLYINCOMPOUND] = []), o.dictionaryTable = o._parseDIC(r);
        for (l in o.compoundRuleCodes)
          o.compoundRuleCodes[l].length === 0 && delete o.compoundRuleCodes[l];
        for (l = 0, f = o.compoundRules.length; l < f; l++) {
          var _ = o.compoundRules[l], S = "";
          for (u = 0, d = _.length; u < d; u++) {
            var C = _[u];
            C in o.compoundRuleCodes ? S += "(" + o.compoundRuleCodes[C].join("|") + ")" : S += C;
          }
          o.compoundRules[l] = new RegExp(S, "i");
        }
        o.loaded = !0, s.asyncLoad && s.loadedCallback && s.loadedCallback(o);
      }
      return this;
    }, e.prototype = {
      /**
       * Loads a Typo instance from a hash of all of the Typo properties.
       *
       * @param object obj A hash of Typo properties, probably gotten from a JSON.parse(JSON.stringify(typo_instance)).
       */
      load: function(n) {
        for (var i in n)
          n.hasOwnProperty(i) && (this[i] = n[i]);
        return this;
      },
      /**
       * Read the contents of a file.
       * 
       * @param {String} path The path (relative) to the file.
       * @param {String} [charset="ISO8859-1"] The expected charset of the file
       * @param {Boolean} async If true, the file will be read asynchronously. For node.js this does nothing, all
       *        files are read synchronously.
       * @returns {String} The file data if async is false, otherwise a promise object. If running node.js, the data is
       *          always returned.
       */
      _readFile: function(n, i, r) {
        if (i = i || "utf8", typeof XMLHttpRequest < "u") {
          var s, o = new XMLHttpRequest();
          return o.open("GET", n, r), r && (s = new Promise(function(l, u) {
            o.onload = function() {
              o.status === 200 ? l(o.responseText) : u(o.statusText);
            }, o.onerror = function() {
              u(o.statusText);
            };
          })), o.overrideMimeType && o.overrideMimeType("text/plain; charset=" + i), o.send(null), r ? s : o.responseText;
        } else if (typeof LG < "u") {
          var a = i0;
          try {
            if (a.existsSync(n))
              return a.readFileSync(n, i);
            console.log("Path " + n + " does not exist.");
          } catch (l) {
            return console.log(l), "";
          }
        }
      },
      /**
       * Parse the rules out from a .aff file.
       *
       * @param {String} data The contents of the affix file.
       * @returns object The rules from the file.
       */
      _parseAFF: function(n) {
        var i = {}, r, s, o, a, l, u, f, d, h = n.split(/\r?\n/);
        for (l = 0, f = h.length; l < f; l++)
          if (r = this._removeAffixComments(h[l]), r = r.trim(), !!r) {
            var m = r.split(/\s+/), g = m[0];
            if (g == "PFX" || g == "SFX") {
              var w = m[1], x = m[2];
              o = parseInt(m[3], 10);
              var _ = [];
              for (u = l + 1, d = l + 1 + o; u < d; u++) {
                s = h[u], a = s.split(/\s+/);
                var S = a[2], C = a[3].split("/"), E = C[0];
                E === "0" && (E = "");
                var M = this.parseRuleCodes(C[1]), $ = a[4], P = {};
                P.add = E, M.length > 0 && (P.continuationClasses = M), $ !== "." && (g === "SFX" ? P.match = new RegExp($ + "$") : P.match = new RegExp("^" + $)), S != "0" && (g === "SFX" ? P.remove = new RegExp(S + "$") : P.remove = S), _.push(P);
              }
              i[w] = { type: g, combineable: x == "Y", entries: _ }, l += o;
            } else if (g === "COMPOUNDRULE") {
              for (o = parseInt(m[1], 10), u = l + 1, d = l + 1 + o; u < d; u++)
                r = h[u], a = r.split(/\s+/), this.compoundRules.push(a[1]);
              l += o;
            } else g === "REP" ? (a = r.split(/\s+/), a.length === 3 && this.replacementTable.push([a[1], a[2]])) : this.flags[g] = m[1];
          }
        return i;
      },
      /**
       * Removes comments.
       *
       * @param {String} data A line from an affix file.
       * @return {String} The cleaned-up line.
       */
      _removeAffixComments: function(n) {
        return n.match(/^\s*#/, "") ? "" : n;
      },
      /**
       * Parses the words out from the .dic file.
       *
       * @param {String} data The data from the dictionary file.
       * @returns object The lookup table containing all of the words and
       *                 word forms from the dictionary.
       */
      _parseDIC: function(n) {
        n = this._removeDicComments(n);
        var i = n.split(/\r?\n/), r = {};
        function s(L, Q) {
          r.hasOwnProperty(L) || (r[L] = null), Q.length > 0 && (r[L] === null && (r[L] = []), r[L].push(Q));
        }
        for (var o = 1, a = i.length; o < a; o++) {
          var l = i[o];
          if (l) {
            var u = l.split("/", 2), f = u[0];
            if (u.length > 1) {
              var d = this.parseRuleCodes(u[1]);
              (!("NEEDAFFIX" in this.flags) || d.indexOf(this.flags.NEEDAFFIX) == -1) && s(f, d);
              for (var h = 0, m = d.length; h < m; h++) {
                var g = d[h], w = this.rules[g];
                if (w)
                  for (var x = this._applyRule(f, w), _ = 0, S = x.length; _ < S; _++) {
                    var C = x[_];
                    if (s(C, []), w.combineable)
                      for (var E = h + 1; E < m; E++) {
                        var M = d[E], $ = this.rules[M];
                        if ($ && $.combineable && w.type != $.type)
                          for (var P = this._applyRule(C, $), W = 0, z = P.length; W < z; W++) {
                            var Z = P[W];
                            s(Z, []);
                          }
                      }
                  }
                g in this.compoundRuleCodes && this.compoundRuleCodes[g].push(f);
              }
            } else
              s(f.trim(), []);
          }
        }
        return r;
      },
      /**
       * Removes comment lines and then cleans up blank lines and trailing whitespace.
       *
       * @param {String} data The data from a .dic file.
       * @return {String} The cleaned-up data.
       */
      _removeDicComments: function(n) {
        return n = n.replace(/^\t.*$/mg, ""), n;
      },
      parseRuleCodes: function(n) {
        if (n)
          if ("FLAG" in this.flags)
            if (this.flags.FLAG === "long") {
              for (var i = [], r = 0, s = n.length; r < s; r += 2)
                i.push(n.substr(r, 2));
              return i;
            } else return this.flags.FLAG === "num" ? n.split(",") : this.flags.FLAG === "UTF-8" ? Array.from(n) : n.split("");
          else return n.split("");
        else return [];
      },
      /**
       * Applies an affix rule to a word.
       *
       * @param {String} word The base word.
       * @param {Object} rule The affix rule.
       * @returns {String[]} The new words generated by the rule.
       */
      _applyRule: function(n, i) {
        for (var r = i.entries, s = [], o = 0, a = r.length; o < a; o++) {
          var l = r[o];
          if (!l.match || n.match(l.match)) {
            var u = n;
            if (l.remove && (u = u.replace(l.remove, "")), i.type === "SFX" ? u = u + l.add : u = l.add + u, s.push(u), "continuationClasses" in l)
              for (var f = 0, d = l.continuationClasses.length; f < d; f++) {
                var h = this.rules[l.continuationClasses[f]];
                h && (s = s.concat(this._applyRule(u, h)));
              }
          }
        }
        return s;
      },
      /**
       * Checks whether a word or a capitalization variant exists in the current dictionary.
       * The word is trimmed and several variations of capitalizations are checked.
       * If you want to check a word without any changes made to it, call checkExact()
       *
       * @see http://blog.stevenlevithan.com/archives/faster-trim-javascript re:trimming function
       *
       * @param {String} aWord The word to check.
       * @returns {Boolean}
       */
      check: function(n) {
        if (!this.loaded)
          throw "Dictionary not loaded.";
        var i = n.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
        if (this.checkExact(i))
          return !0;
        if (i.toUpperCase() === i) {
          var r = i[0] + i.substring(1).toLowerCase();
          if (this.hasFlag(r, "KEEPCASE"))
            return !1;
          if (this.checkExact(r) || this.checkExact(i.toLowerCase()))
            return !0;
        }
        var s = i[0].toLowerCase() + i.substring(1);
        if (s !== i) {
          if (this.hasFlag(s, "KEEPCASE"))
            return !1;
          if (this.checkExact(s))
            return !0;
        }
        return !1;
      },
      /**
       * Checks whether a word exists in the current dictionary.
       *
       * @param {String} word The word to check.
       * @returns {Boolean}
       */
      checkExact: function(n) {
        if (!this.loaded)
          throw "Dictionary not loaded.";
        var i = this.dictionaryTable[n], r, s;
        if (typeof i > "u") {
          if ("COMPOUNDMIN" in this.flags && n.length >= this.flags.COMPOUNDMIN) {
            for (r = 0, s = this.compoundRules.length; r < s; r++)
              if (n.match(this.compoundRules[r]))
                return !0;
          }
        } else {
          if (i === null)
            return !0;
          if (typeof i == "object") {
            for (r = 0, s = i.length; r < s; r++)
              if (!this.hasFlag(n, "ONLYINCOMPOUND", i[r]))
                return !0;
          }
        }
        return !1;
      },
      /**
       * Looks up whether a given word is flagged with a given flag.
       *
       * @param {String} word The word in question.
       * @param {String} flag The flag in question.
       * @return {Boolean}
       */
      hasFlag: function(n, i, r) {
        if (!this.loaded)
          throw "Dictionary not loaded.";
        return !!(i in this.flags && (typeof r > "u" && (r = Array.prototype.concat.apply([], this.dictionaryTable[n])), r && r.indexOf(this.flags[i]) !== -1));
      },
      /**
       * Returns a list of suggestions for a misspelled word.
       *
       * @see http://www.norvig.com/spell-correct.html for the basis of this suggestor.
       * This suggestor is primitive, but it works.
       *
       * @param {String} word The misspelling.
       * @param {Number} [limit=5] The maximum number of suggestions to return.
       * @returns {String[]} The array of suggestions.
       */
      alphabet: "",
      suggest: function(n, i) {
        if (!this.loaded)
          throw "Dictionary not loaded.";
        if (i = i || 5, this.memoized.hasOwnProperty(n)) {
          var r = this.memoized[n].limit;
          if (i <= r || this.memoized[n].suggestions.length < r)
            return this.memoized[n].suggestions.slice(0, i);
        }
        if (this.check(n)) return [];
        for (var s = 0, o = this.replacementTable.length; s < o; s++) {
          var a = this.replacementTable[s];
          if (n.indexOf(a[0]) !== -1) {
            var l = n.replace(a[0], a[1]);
            if (this.check(l))
              return [l];
          }
        }
        if (!this.alphabet) {
          this.alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "TRY" in this.flags && (this.alphabet += this.flags.TRY), "WORDCHARS" in this.flags && (this.alphabet += this.flags.WORDCHARS);
          var u = this.alphabet.split("");
          u.sort();
          for (var f = {}, s = 0; s < u.length; s++)
            f[u[s]] = !0;
          this.alphabet = "";
          for (var s in f)
            this.alphabet += s;
        }
        var d = this;
        function h(g, w) {
          var x = {}, _, S, C, E, M = d.alphabet.length;
          if (typeof g == "string") {
            var $ = g;
            g = {}, g[$] = !0;
          }
          for (var $ in g)
            for (_ = 0, C = $.length + 1; _ < C; _++) {
              var P = [$.substring(0, _), $.substring(_)];
              if (P[1] && (E = P[0] + P[1].substring(1), (!w || d.check(E)) && (E in x ? x[E] += 1 : x[E] = 1)), P[1].length > 1 && P[1][1] !== P[1][0] && (E = P[0] + P[1][1] + P[1][0] + P[1].substring(2), (!w || d.check(E)) && (E in x ? x[E] += 1 : x[E] = 1)), P[1]) {
                var W = P[1].substring(0, 1).toUpperCase() === P[1].substring(0, 1) ? "uppercase" : "lowercase";
                for (S = 0; S < M; S++) {
                  var z = d.alphabet[S];
                  W === "uppercase" && (z = z.toUpperCase()), z != P[1].substring(0, 1) && (E = P[0] + z + P[1].substring(1), (!w || d.check(E)) && (E in x ? x[E] += 1 : x[E] = 1));
                }
              }
              if (P[1])
                for (S = 0; S < M; S++) {
                  var W = P[0].substring(-1).toUpperCase() === P[0].substring(-1) && P[1].substring(0, 1).toUpperCase() === P[1].substring(0, 1) ? "uppercase" : "lowercase", z = d.alphabet[S];
                  W === "uppercase" && (z = z.toUpperCase()), E = P[0] + z + P[1], (!w || d.check(E)) && (E in x ? x[E] += 1 : x[E] = 1);
                }
            }
          return x;
        }
        function m(g) {
          var w = h(g), x = h(w, !0), _ = x;
          for (var S in w)
            d.check(S) && (S in _ ? _[S] += w[S] : _[S] = w[S]);
          var C, E = [];
          for (C in _)
            _.hasOwnProperty(C) && E.push([C, _[C]]);
          function M(z, Z) {
            var L = z[1], Q = Z[1];
            return L < Q ? -1 : L > Q ? 1 : Z[0].localeCompare(z[0]);
          }
          E.sort(M).reverse();
          var $ = [], P = "lowercase";
          g.toUpperCase() === g ? P = "uppercase" : g.substr(0, 1).toUpperCase() + g.substr(1).toLowerCase() === g && (P = "capitalized");
          var W = i;
          for (C = 0; C < Math.min(W, E.length); C++)
            P === "uppercase" ? E[C][0] = E[C][0].toUpperCase() : P === "capitalized" && (E[C][0] = E[C][0].substr(0, 1).toUpperCase() + E[C][0].substr(1)), !d.hasFlag(E[C][0], "NOSUGGEST") && $.indexOf(E[C][0]) == -1 ? $.push(E[C][0]) : W++;
          return $;
        }
        return this.memoized[n] = {
          suggestions: m(n),
          limit: i
        }, this.memoized[n].suggestions;
      }
    };
  })(), t.exports = e;
})(BG);
var yje = BG.exports, pR = yje;
function kn(t) {
  if (t = t || {}, typeof t.codeMirrorInstance != "function" || typeof t.codeMirrorInstance.defineMode != "function") {
    console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");
    return;
  }
  String.prototype.includes || (String.prototype.includes = function() {
    return String.prototype.indexOf.apply(this, arguments) !== -1;
  }), t.codeMirrorInstance.defineMode("spell-checker", function(e) {
    if (!kn.aff_loading) {
      kn.aff_loading = !0;
      var n = new XMLHttpRequest();
      n.open("GET", "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff", !0), n.onload = function() {
        n.readyState === 4 && n.status === 200 && (kn.aff_data = n.responseText, kn.num_loaded++, kn.num_loaded == 2 && (kn.typo = new pR("en_US", kn.aff_data, kn.dic_data, {
          platform: "any"
        })));
      }, n.send(null);
    }
    if (!kn.dic_loading) {
      kn.dic_loading = !0;
      var i = new XMLHttpRequest();
      i.open("GET", "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic", !0), i.onload = function() {
        i.readyState === 4 && i.status === 200 && (kn.dic_data = i.responseText, kn.num_loaded++, kn.num_loaded == 2 && (kn.typo = new pR("en_US", kn.aff_data, kn.dic_data, {
          platform: "any"
        })));
      }, i.send(null);
    }
    var r = '!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ', s = {
      token: function(a) {
        var l = a.peek(), u = "";
        if (r.includes(l))
          return a.next(), null;
        for (; (l = a.peek()) != null && !r.includes(l); )
          u += l, a.next();
        return kn.typo && !kn.typo.check(u) ? "spell-error" : null;
      }
    }, o = t.codeMirrorInstance.getMode(
      e,
      e.backdrop || "text/plain"
    );
    return t.codeMirrorInstance.overlayMode(o, s, !0);
  });
}
kn.num_loaded = 0;
kn.aff_loading = !1;
kn.dic_loading = !1;
kn.aff_data = "";
kn.dic_data = "";
kn.typo;
var wje = kn, mR = Ko, kje = wje, E6 = navigator.userAgent, zG = navigator.platform, xje = /Edge\/(\d+)/.exec(E6), _je = !xje && /AppleWebKit/.test(E6) && /Mobile\/\w+/.test(E6), T6 = _je || /Mac/.test(zG), Oje = /win/i.test(zG), vk = {
  toggleBold: gx,
  toggleItalic: vx,
  drawLink: Tx,
  toggleHeadingSmaller: R0,
  toggleHeadingBigger: kx,
  drawImage: $x,
  toggleBlockquote: wx,
  toggleOrderedList: Cx,
  toggleUnorderedList: Sx,
  toggleCodeBlock: yx,
  togglePreview: Px,
  toggleStrikethrough: bx,
  toggleHeading1: xx,
  toggleHeading2: _x,
  toggleHeading3: Ox,
  cleanBlock: Ex,
  drawTable: Mx,
  drawHorizontalRule: Nx,
  undo: Ax,
  redo: Dx,
  toggleSideBySide: Cp,
  toggleFullScreen: _f
}, Sje = {
  toggleBold: "Cmd-B",
  toggleItalic: "Cmd-I",
  drawLink: "Cmd-K",
  toggleHeadingSmaller: "Cmd-H",
  toggleHeadingBigger: "Shift-Cmd-H",
  cleanBlock: "Cmd-E",
  drawImage: "Cmd-Alt-I",
  toggleBlockquote: "Cmd-'",
  toggleOrderedList: "Cmd-Alt-L",
  toggleUnorderedList: "Cmd-L",
  toggleCodeBlock: "Cmd-Alt-C",
  togglePreview: "Cmd-P",
  toggleSideBySide: "F9",
  toggleFullScreen: "F11"
}, Cje = function(t) {
  for (var e in vk)
    if (vk[e] === t)
      return e;
  return null;
}, Eje = function() {
  var t = !1;
  return function(e) {
    (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4))) && (t = !0);
  }(navigator.userAgent || navigator.vendor || window.opera), t;
};
function WG(t) {
  return T6 ? t = t.replace("Ctrl", "Cmd") : t = t.replace("Cmd", "Ctrl"), t;
}
function Tje(t, e, n) {
  t = t || {};
  var i = document.createElement("a");
  return e = e ?? !0, t.title && e && (i.title = Mje(t.title, t.action, n), T6 && !t.useCtrlOnMac && (i.title = i.title.replace("Ctrl", "⌘")), T6 && (i.title = i.title.replace("Alt", "⌥"))), i.tabIndex = -1, i.className = t.className, i;
}
function $je() {
  var t = document.createElement("i");
  return t.className = "separator", t.innerHTML = "|", t;
}
function Mje(t, e, n) {
  var i, r = t;
  return e && (i = Cje(e), n[i] && (r += " (" + WG(n[i]) + ")")), r;
}
function gc(t, e) {
  e = e || t.getCursor("start");
  var n = t.getTokenAt(e);
  if (!n.type) return {};
  for (var i = n.type.split(" "), r = {}, s, o, a = 0; a < i.length; a++)
    s = i[a], s === "strong" ? r.bold = !0 : s === "variable-2" ? (o = t.getLine(e.line), /^\s*\d+\.\s/.test(o) ? r["ordered-list"] = !0 : r["unordered-list"] = !0) : s === "atom" ? r.quote = !0 : s === "em" ? r.italic = !0 : s === "quote" ? r.quote = !0 : s === "strikethrough" ? r.strikethrough = !0 : s === "comment" ? r.code = !0 : s === "link" ? r.link = !0 : s === "tag" ? r.image = !0 : s.match(/^header(\-[1-6])?$/) && (r[s.replace("header", "heading")] = !0);
  return r;
}
var gR = "";
function _f(t) {
  var e = t.codemirror;
  e.setOption("fullScreen", !e.getOption("fullScreen")), e.getOption("fullScreen") ? (gR = document.body.style.overflow, document.body.style.overflow = "hidden") : document.body.style.overflow = gR;
  var n = e.getWrapperElement();
  /fullscreen/.test(n.previousSibling.className) ? n.previousSibling.className = n.previousSibling.className.replace(/\s*fullscreen\b/, "") : n.previousSibling.className += " fullscreen";
  var i = t.toolbarElements.fullscreen;
  /active/.test(i.className) ? i.className = i.className.replace(/\s*active\s*/g, "") : i.className += " active";
  var r = e.getWrapperElement().nextSibling;
  /editor-preview-active-side/.test(r.className) && Cp(t);
}
function gx(t) {
  o8(t, "bold", t.options.blockStyles.bold);
}
function vx(t) {
  o8(t, "italic", t.options.blockStyles.italic);
}
function bx(t) {
  o8(t, "strikethrough", "~~");
}
function yx(t) {
  var e = t.options.blockStyles.code;
  function n(H) {
    if (typeof H != "object")
      throw "fencing_line() takes a 'line' object (not a line number, or line text).  Got: " + typeof H + ": " + H;
    return H.styles && H.styles[2] && H.styles[2].indexOf("formatting-code-block") !== -1;
  }
  function i(H) {
    return H.state.base.base || H.state.base;
  }
  function r(H, R, q, Y, K) {
    q = q || H.getLineHandle(R), Y = Y || H.getTokenAt({
      line: R,
      ch: 1
    }), K = K || !!q.text && H.getTokenAt({
      line: R,
      ch: q.text.length - 1
    });
    var te = Y.type ? Y.type.split(" ") : [];
    return K && i(K).indentedCode ? "indented" : te.indexOf("comment") === -1 ? !1 : i(Y).fencedChars || i(K).fencedChars || n(q) ? "fenced" : "single";
  }
  function s(H, R, q, Y) {
    var K = R.line + 1, te = q.line + 1, se = R.line !== q.line, ce = Y + `
`, U = `
` + Y;
    se && te++, se && q.ch === 0 && (U = Y + `
`, te--), zh(H, !1, [ce, U]), H.setSelection({
      line: K,
      ch: 0
    }, {
      line: te,
      ch: 0
    });
  }
  var o = t.codemirror, a = o.getCursor("start"), l = o.getCursor("end"), u = o.getTokenAt({
    line: a.line,
    ch: a.ch || 1
  }), f = o.getLineHandle(a.line), d = r(o, a.line, f, u), h, m, g;
  if (d === "single") {
    var w = f.text.slice(0, a.ch).replace("`", ""), x = f.text.slice(a.ch).replace("`", "");
    o.replaceRange(w + x, {
      line: a.line,
      ch: 0
    }, {
      line: a.line,
      ch: 99999999999999
    }), a.ch--, a !== l && l.ch--, o.setSelection(a, l), o.focus();
  } else if (d === "fenced")
    if (a.line !== l.line || a.ch !== l.ch) {
      for (h = a.line; h >= 0 && (f = o.getLineHandle(h), !n(f)); h--)
        ;
      var _ = o.getTokenAt({
        line: h,
        ch: 1
      }), S = i(_).fencedChars, C, E, M, $;
      n(o.getLineHandle(a.line)) ? (C = "", E = a.line) : n(o.getLineHandle(a.line - 1)) ? (C = "", E = a.line - 1) : (C = S + `
`, E = a.line), n(o.getLineHandle(l.line)) ? (M = "", $ = l.line, l.ch === 0 && ($ += 1)) : l.ch !== 0 && n(o.getLineHandle(l.line + 1)) ? (M = "", $ = l.line + 1) : (M = S + `
`, $ = l.line + 1), l.ch === 0 && ($ -= 1), o.operation(function() {
        o.replaceRange(M, {
          line: $,
          ch: 0
        }, {
          line: $ + (M ? 0 : 1),
          ch: 0
        }), o.replaceRange(C, {
          line: E,
          ch: 0
        }, {
          line: E + (C ? 0 : 1),
          ch: 0
        });
      }), o.setSelection({
        line: E + (C ? 1 : 0),
        ch: 0
      }, {
        line: $ + (C ? 1 : -1),
        ch: 0
      }), o.focus();
    } else {
      var P = a.line;
      if (n(o.getLineHandle(a.line)) && (r(o, a.line + 1) === "fenced" ? (h = a.line, P = a.line + 1) : (m = a.line, P = a.line - 1)), h === void 0)
        for (h = P; h >= 0 && (f = o.getLineHandle(h), !n(f)); h--)
          ;
      if (m === void 0)
        for (g = o.lineCount(), m = P; m < g && (f = o.getLineHandle(m), !n(f)); m++)
          ;
      o.operation(function() {
        o.replaceRange("", {
          line: h,
          ch: 0
        }, {
          line: h + 1,
          ch: 0
        }), o.replaceRange("", {
          line: m - 1,
          ch: 0
        }, {
          line: m,
          ch: 0
        });
      }), o.focus();
    }
  else if (d === "indented") {
    if (a.line !== l.line || a.ch !== l.ch)
      h = a.line, m = l.line, l.ch === 0 && m--;
    else {
      for (h = a.line; h >= 0; h--)
        if (f = o.getLineHandle(h), !f.text.match(/^\s*$/) && r(o, h, f) !== "indented") {
          h += 1;
          break;
        }
      for (g = o.lineCount(), m = a.line; m < g; m++)
        if (f = o.getLineHandle(m), !f.text.match(/^\s*$/) && r(o, m, f) !== "indented") {
          m -= 1;
          break;
        }
    }
    var W = o.getLineHandle(m + 1), z = W && o.getTokenAt({
      line: m + 1,
      ch: W.text.length - 1
    }), Z = z && i(z).indentedCode;
    Z && o.replaceRange(`
`, {
      line: m + 1,
      ch: 0
    });
    for (var L = h; L <= m; L++)
      o.indentLine(L, "subtract");
    o.focus();
  } else {
    var Q = a.line === l.line && a.ch === l.ch && a.ch === 0, V = a.line !== l.line;
    Q || V ? s(o, a, l, e) : zh(o, !1, ["`", "`"]);
  }
}
function wx(t) {
  var e = t.codemirror;
  s8(e, "quote");
}
function R0(t) {
  var e = t.codemirror;
  X1(e, "smaller");
}
function kx(t) {
  var e = t.codemirror;
  X1(e, "bigger");
}
function xx(t) {
  var e = t.codemirror;
  X1(e, void 0, 1);
}
function _x(t) {
  var e = t.codemirror;
  X1(e, void 0, 2);
}
function Ox(t) {
  var e = t.codemirror;
  X1(e, void 0, 3);
}
function Sx(t) {
  var e = t.codemirror;
  s8(e, "unordered-list");
}
function Cx(t) {
  var e = t.codemirror;
  s8(e, "ordered-list");
}
function Ex(t) {
  var e = t.codemirror;
  Nje(e);
}
function Tx(t) {
  var e = t.codemirror, n = gc(e), i = t.options, r = "http://";
  if (i.promptURLs && (r = prompt(i.promptTexts.link), !r))
    return !1;
  zh(e, n.link, i.insertTexts.link, r);
}
function $x(t) {
  var e = t.codemirror, n = gc(e), i = t.options, r = "http://";
  if (i.promptURLs && (r = prompt(i.promptTexts.image), !r))
    return !1;
  zh(e, n.image, i.insertTexts.image, r);
}
function Mx(t) {
  var e = t.codemirror, n = gc(e), i = t.options;
  zh(e, n.table, i.insertTexts.table);
}
function Nx(t) {
  var e = t.codemirror, n = gc(e), i = t.options;
  zh(e, n.image, i.insertTexts.horizontalRule);
}
function Ax(t) {
  var e = t.codemirror;
  e.undo(), e.focus();
}
function Dx(t) {
  var e = t.codemirror;
  e.redo(), e.focus();
}
function Cp(t) {
  var e = t.codemirror, n = e.getWrapperElement(), i = n.nextSibling, r = t.toolbarElements["side-by-side"], s = !1;
  /editor-preview-active-side/.test(i.className) ? (i.className = i.className.replace(
    /\s*editor-preview-active-side\s*/g,
    ""
  ), r.className = r.className.replace(/\s*active\s*/g, ""), n.className = n.className.replace(/\s*CodeMirror-sided\s*/g, " ")) : (setTimeout(function() {
    e.getOption("fullScreen") || _f(t), i.className += " editor-preview-active-side";
  }, 1), r.className += " active", n.className += " CodeMirror-sided", s = !0);
  var o = n.lastChild;
  if (/editor-preview-active/.test(o.className)) {
    o.className = o.className.replace(
      /\s*editor-preview-active\s*/g,
      ""
    );
    var a = t.toolbarElements.preview, l = n.previousSibling;
    a.className = a.className.replace(/\s*active\s*/g, ""), l.className = l.className.replace(/\s*disabled-for-preview*/g, "");
  }
  var u = function() {
    i.innerHTML = t.options.previewRender(t.value(), i);
  };
  e.sideBySideRenderingFunction || (e.sideBySideRenderingFunction = u), s ? (i.innerHTML = t.options.previewRender(t.value(), i), e.on("update", e.sideBySideRenderingFunction)) : e.off("update", e.sideBySideRenderingFunction), e.refresh();
}
function Px(t) {
  var e = t.codemirror, n = e.getWrapperElement(), i = n.previousSibling, r = t.options.toolbar ? t.toolbarElements.preview : !1, s = n.lastChild;
  (!s || !/editor-preview/.test(s.className)) && (s = document.createElement("div"), s.className = "editor-preview", n.appendChild(s)), /editor-preview-active/.test(s.className) ? (s.className = s.className.replace(
    /\s*editor-preview-active\s*/g,
    ""
  ), r && (r.className = r.className.replace(/\s*active\s*/g, ""), i.className = i.className.replace(/\s*disabled-for-preview*/g, ""))) : (setTimeout(function() {
    s.className += " editor-preview-active";
  }, 1), r && (r.className += " active", i.className += " disabled-for-preview")), s.innerHTML = t.options.previewRender(t.value(), s);
  var o = e.getWrapperElement().nextSibling;
  /editor-preview-active-side/.test(o.className) && Cp(t);
}
function zh(t, e, n, i) {
  if (!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)) {
    var r, s = n[0], o = n[1], a = t.getCursor("start"), l = t.getCursor("end");
    i && (o = o.replace("#url#", i)), e ? (r = t.getLine(a.line), s = r.slice(0, a.ch), o = r.slice(a.ch), t.replaceRange(s + o, {
      line: a.line,
      ch: 0
    })) : (r = t.getSelection(), t.replaceSelection(s + r + o), a.ch += s.length, a !== l && (l.ch += s.length)), t.setSelection(a, l), t.focus();
  }
}
function X1(t, e, n) {
  if (!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)) {
    for (var i = t.getCursor("start"), r = t.getCursor("end"), s = i.line; s <= r.line; s++)
      (function(o) {
        var a = t.getLine(o), l = a.search(/[^#]/);
        e !== void 0 ? l <= 0 ? e == "bigger" ? a = "###### " + a : a = "# " + a : l == 6 && e == "smaller" ? a = a.substr(7) : l == 1 && e == "bigger" ? a = a.substr(2) : e == "bigger" ? a = a.substr(1) : a = "#" + a : n == 1 ? l <= 0 ? a = "# " + a : l == n ? a = a.substr(l + 1) : a = "# " + a.substr(l + 1) : n == 2 ? l <= 0 ? a = "## " + a : l == n ? a = a.substr(l + 1) : a = "## " + a.substr(l + 1) : l <= 0 ? a = "### " + a : l == n ? a = a.substr(l + 1) : a = "### " + a.substr(l + 1), t.replaceRange(a, {
          line: o,
          ch: 0
        }, {
          line: o,
          ch: 99999999999999
        });
      })(s);
    t.focus();
  }
}
function s8(t, e) {
  if (!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)) {
    for (var n = gc(t), i = t.getCursor("start"), r = t.getCursor("end"), s = {
      quote: /^(\s*)\>\s+/,
      "unordered-list": /^(\s*)(\*|\-|\+)\s+/,
      "ordered-list": /^(\s*)\d+\.\s+/
    }, o = {
      quote: "> ",
      "unordered-list": "* ",
      "ordered-list": "1. "
    }, a = i.line; a <= r.line; a++)
      (function(l) {
        var u = t.getLine(l);
        n[e] ? u = u.replace(s[e], "$1") : u = o[e] + u, t.replaceRange(u, {
          line: l,
          ch: 0
        }, {
          line: l,
          ch: 99999999999999
        });
      })(a);
    t.focus();
  }
}
function o8(t, e, n, i) {
  if (!/editor-preview-active/.test(t.codemirror.getWrapperElement().lastChild.className)) {
    i = typeof i > "u" ? n : i;
    var r = t.codemirror, s = gc(r), o, a = n, l = i, u = r.getCursor("start"), f = r.getCursor("end");
    s[e] ? (o = r.getLine(u.line), a = o.slice(0, u.ch), l = o.slice(u.ch), e == "bold" ? (a = a.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/, ""), l = l.replace(/(\*\*|__)/, "")) : e == "italic" ? (a = a.replace(/(\*|_)(?![\s\S]*(\*|_))/, ""), l = l.replace(/(\*|_)/, "")) : e == "strikethrough" && (a = a.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/, ""), l = l.replace(/(\*\*|~~)/, "")), r.replaceRange(a + l, {
      line: u.line,
      ch: 0
    }, {
      line: u.line,
      ch: 99999999999999
    }), e == "bold" || e == "strikethrough" ? (u.ch -= 2, u !== f && (f.ch -= 2)) : e == "italic" && (u.ch -= 1, u !== f && (f.ch -= 1))) : (o = r.getSelection(), e == "bold" ? (o = o.split("**").join(""), o = o.split("__").join("")) : e == "italic" ? (o = o.split("*").join(""), o = o.split("_").join("")) : e == "strikethrough" && (o = o.split("~~").join("")), r.replaceSelection(a + o + l), u.ch += n.length, f.ch = u.ch + o.length), r.setSelection(u, f), r.focus();
  }
}
function Nje(t) {
  if (!/editor-preview-active/.test(t.getWrapperElement().lastChild.className))
    for (var e = t.getCursor("start"), n = t.getCursor("end"), i, r = e.line; r <= n.line; r++)
      i = t.getLine(r), i = i.replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/, ""), t.replaceRange(i, {
        line: r,
        ch: 0
      }, {
        line: r,
        ch: 99999999999999
      });
}
function HG(t, e) {
  for (var n in e)
    e.hasOwnProperty(n) && (e[n] instanceof Array ? t[n] = e[n].concat(t[n] instanceof Array ? t[n] : []) : e[n] !== null && typeof e[n] == "object" && e[n].constructor === Object ? t[n] = HG(t[n] || {}, e[n]) : t[n] = e[n]);
  return t;
}
function Qb(t) {
  for (var e = 1; e < arguments.length; e++)
    t = HG(t, arguments[e]);
  return t;
}
function vR(t) {
  var e = /[a-zA-Z0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g, n = t.match(e), i = 0;
  if (n === null) return i;
  for (var r = 0; r < n.length; r++)
    n[r].charCodeAt(0) >= 19968 ? i += n[r].length : i += 1;
  return i;
}
var Bg = {
  bold: {
    name: "bold",
    action: gx,
    className: "fa fa-bold",
    title: "Bold",
    default: !0
  },
  italic: {
    name: "italic",
    action: vx,
    className: "fa fa-italic",
    title: "Italic",
    default: !0
  },
  strikethrough: {
    name: "strikethrough",
    action: bx,
    className: "fa fa-strikethrough",
    title: "Strikethrough"
  },
  heading: {
    name: "heading",
    action: R0,
    className: "fa fa-header",
    title: "Heading",
    default: !0
  },
  "heading-smaller": {
    name: "heading-smaller",
    action: R0,
    className: "fa fa-header fa-header-x fa-header-smaller",
    title: "Smaller Heading"
  },
  "heading-bigger": {
    name: "heading-bigger",
    action: kx,
    className: "fa fa-header fa-header-x fa-header-bigger",
    title: "Bigger Heading"
  },
  "heading-1": {
    name: "heading-1",
    action: xx,
    className: "fa fa-header fa-header-x fa-header-1",
    title: "Big Heading"
  },
  "heading-2": {
    name: "heading-2",
    action: _x,
    className: "fa fa-header fa-header-x fa-header-2",
    title: "Medium Heading"
  },
  "heading-3": {
    name: "heading-3",
    action: Ox,
    className: "fa fa-header fa-header-x fa-header-3",
    title: "Small Heading"
  },
  "separator-1": {
    name: "separator-1"
  },
  code: {
    name: "code",
    action: yx,
    className: "fa fa-code",
    title: "Code"
  },
  quote: {
    name: "quote",
    action: wx,
    className: "fa fa-quote-left",
    title: "Quote",
    default: !0
  },
  "unordered-list": {
    name: "unordered-list",
    action: Sx,
    className: "fa fa-list-ul",
    title: "Generic List",
    default: !0
  },
  "ordered-list": {
    name: "ordered-list",
    action: Cx,
    className: "fa fa-list-ol",
    title: "Numbered List",
    default: !0
  },
  "clean-block": {
    name: "clean-block",
    action: Ex,
    className: "fa fa-eraser fa-clean-block",
    title: "Clean block"
  },
  "separator-2": {
    name: "separator-2"
  },
  link: {
    name: "link",
    action: Tx,
    className: "fa fa-link",
    title: "Create Link",
    default: !0
  },
  image: {
    name: "image",
    action: $x,
    className: "fa fa-picture-o",
    title: "Insert Image",
    default: !0
  },
  table: {
    name: "table",
    action: Mx,
    className: "fa fa-table",
    title: "Insert Table"
  },
  "horizontal-rule": {
    name: "horizontal-rule",
    action: Nx,
    className: "fa fa-minus",
    title: "Insert Horizontal Line"
  },
  "separator-3": {
    name: "separator-3"
  },
  preview: {
    name: "preview",
    action: Px,
    className: "fa fa-eye no-disable",
    title: "Toggle Preview",
    default: !0
  },
  "side-by-side": {
    name: "side-by-side",
    action: Cp,
    className: "fa fa-columns no-disable no-mobile",
    title: "Toggle Side by Side",
    default: !0
  },
  fullscreen: {
    name: "fullscreen",
    action: _f,
    className: "fa fa-arrows-alt no-disable no-mobile",
    title: "Toggle Fullscreen",
    default: !0
  },
  "separator-4": {
    name: "separator-4"
  },
  guide: {
    name: "guide",
    action: "https://simplemde.com/markdown-guide",
    className: "fa fa-question-circle",
    title: "Markdown Guide",
    default: !0
  },
  "separator-5": {
    name: "separator-5"
  },
  undo: {
    name: "undo",
    action: Ax,
    className: "fa fa-undo no-disable",
    title: "Undo"
  },
  redo: {
    name: "redo",
    action: Dx,
    className: "fa fa-repeat no-disable",
    title: "Redo"
  }
}, Aje = {
  link: ["[", "](#url#)"],
  image: ["![](", "#url#)"],
  table: ["", `

| Column 1 | Column 2 | Column 3 |
| -------- | -------- | -------- |
| Text     | Text     | Text     |

`],
  horizontalRule: ["", `

-----

`]
}, Dje = {
  link: "URL for the link:",
  image: "URL of the image:"
}, Pje = {
  bold: "**",
  code: "```",
  italic: "*"
};
function Ge(t) {
  t = t || {}, t.parent = this;
  var e = !0;
  if (t.autoDownloadFontAwesome === !1 && (e = !1), t.autoDownloadFontAwesome !== !0)
    for (var n = document.styleSheets, i = 0; i < n.length; i++)
      n[i].href && n[i].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/") > -1 && (e = !1);
  if (e) {
    var r = document.createElement("link");
    r.rel = "stylesheet", r.href = "https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css", document.getElementsByTagName("head")[0].appendChild(r);
  }
  if (t.element)
    this.element = t.element;
  else if (t.element === null) {
    console.log("SimpleMDE: Error. No element was found.");
    return;
  }
  if (t.toolbar === void 0) {
    t.toolbar = [];
    for (var s in Bg)
      Bg.hasOwnProperty(s) && (s.indexOf("separator-") != -1 && t.toolbar.push("|"), (Bg[s].default === !0 || t.showIcons && t.showIcons.constructor === Array && t.showIcons.indexOf(s) != -1) && t.toolbar.push(s));
  }
  t.hasOwnProperty("status") || (t.status = ["autosave", "lines", "words", "cursor"]), t.previewRender || (t.previewRender = function(o) {
    return this.parent.markdown(o);
  }), t.parsingConfig = Qb({
    highlightFormatting: !0
    // needed for toggleCodeBlock to detect types of code
  }, t.parsingConfig || {}), t.insertTexts = Qb({}, Aje, t.insertTexts || {}), t.promptTexts = Dje, t.blockStyles = Qb({}, Pje, t.blockStyles || {}), t.shortcuts = Qb({}, Sje, t.shortcuts || {}), t.autosave != null && t.autosave.unique_id != null && t.autosave.unique_id != "" && (t.autosave.uniqueId = t.autosave.unique_id), this.options = t, this.render(), t.initialValue && (!this.options.autosave || this.options.autosave.foundSavedValue !== !0) && this.value(t.initialValue);
}
Ge.prototype.markdown = function(t) {
};
Ge.prototype.render = function(t) {
  if (t || (t = this.element || document.getElementsByTagName("textarea")[0]), !(this._rendered && this._rendered === t)) {
    this.element = t;
    var e = this.options, n = this, i = {};
    for (var r in e.shortcuts)
      e.shortcuts[r] !== null && vk[r] !== null && function(u) {
        i[WG(e.shortcuts[u])] = function() {
          vk[u](n);
        };
      }(r);
    i.Enter = "newlineAndIndentContinueMarkdownList", i.Tab = "tabAndIndentMarkdownList", i["Shift-Tab"] = "shiftTabAndUnindentMarkdownList", i.Esc = function(u) {
      u.getOption("fullScreen") && _f(n);
    }, Oje && (i.Home = "goLineLeftSmart", i.End = "goLineRight"), document.addEventListener("keydown", function(u) {
      u = u || window.event, u.keyCode == 27 && n.codemirror.getOption("fullScreen") && _f(n);
    }, !1);
    var s, o;
    if (e.spellChecker !== !1 ? (s = "spell-checker", o = e.parsingConfig, o.name = "gfm", o.gitHubSpice = !1, kje({
      codeMirrorInstance: mR
    })) : (s = e.parsingConfig, s.name = "gfm", s.gitHubSpice = !1), this.codemirror = mR.fromTextArea(t, {
      mode: s,
      backdrop: o,
      theme: "paper",
      tabSize: e.tabSize != null ? e.tabSize : 2,
      indentUnit: e.tabSize != null ? e.tabSize : 2,
      indentWithTabs: e.indentWithTabs !== !1,
      lineNumbers: !1,
      autofocus: e.autofocus === !0,
      extraKeys: i,
      lineWrapping: e.lineWrapping !== !1,
      allowDropFileTypes: ["text/plain"],
      placeholder: e.placeholder || t.getAttribute("placeholder") || "",
      styleSelectedText: e.styleSelectedText != null ? e.styleSelectedText : !0
    }), e.forceSync === !0) {
      var a = this.codemirror;
      a.on("change", function() {
        a.save();
      });
    }
    this.gui = {}, e.toolbar !== !1 && (this.gui.toolbar = this.createToolbar()), e.status !== !1 && (this.gui.statusbar = this.createStatusbar()), e.autosave != null && e.autosave.enabled === !0 && this.autosave(), this.gui.sideBySide = this.createSideBySide(), this._rendered = this.element;
    var l = this.codemirror;
    setTimeout((function() {
      l.refresh();
    }).bind(l), 0);
  }
};
function QG() {
  if (typeof localStorage == "object")
    try {
      localStorage.setItem("smde_localStorage", 1), localStorage.removeItem("smde_localStorage");
    } catch {
      return !1;
    }
  else
    return !1;
  return !0;
}
Ge.prototype.autosave = function() {
  if (QG()) {
    var t = this;
    if (this.options.autosave.uniqueId == null || this.options.autosave.uniqueId == "") {
      console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");
      return;
    }
    t.element.form != null && t.element.form != null && t.element.form.addEventListener("submit", function() {
      localStorage.removeItem("smde_" + t.options.autosave.uniqueId);
    }), this.options.autosave.loaded !== !0 && (typeof localStorage.getItem("smde_" + this.options.autosave.uniqueId) == "string" && localStorage.getItem("smde_" + this.options.autosave.uniqueId) != "" && (this.codemirror.setValue(localStorage.getItem("smde_" + this.options.autosave.uniqueId)), this.options.autosave.foundSavedValue = !0), this.options.autosave.loaded = !0), localStorage.setItem("smde_" + this.options.autosave.uniqueId, t.value());
    var e = document.getElementById("autosaved");
    if (e != null && e != null && e != "") {
      var n = /* @__PURE__ */ new Date(), i = n.getHours(), r = n.getMinutes(), s = "am", o = i;
      o >= 12 && (o = i - 12, s = "pm"), o == 0 && (o = 12), r = r < 10 ? "0" + r : r, e.innerHTML = "Autosaved: " + o + ":" + r + " " + s;
    }
    this.autosaveTimeoutId = setTimeout(function() {
      t.autosave();
    }, this.options.autosave.delay || 1e4);
  } else
    console.log("SimpleMDE: localStorage not available, cannot autosave");
};
Ge.prototype.clearAutosavedValue = function() {
  if (QG()) {
    if (this.options.autosave == null || this.options.autosave.uniqueId == null || this.options.autosave.uniqueId == "") {
      console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");
      return;
    }
    localStorage.removeItem("smde_" + this.options.autosave.uniqueId);
  } else
    console.log("SimpleMDE: localStorage not available, cannot autosave");
};
Ge.prototype.createSideBySide = function() {
  var t = this.codemirror, e = t.getWrapperElement(), n = e.nextSibling;
  (!n || !/editor-preview-side/.test(n.className)) && (n = document.createElement("div"), n.className = "editor-preview-side", e.parentNode.insertBefore(n, e.nextSibling));
  var i = !1, r = !1;
  return t.on("scroll", function(s) {
    if (i) {
      i = !1;
      return;
    }
    r = !0;
    var o = s.getScrollInfo().height - s.getScrollInfo().clientHeight, a = parseFloat(s.getScrollInfo().top) / o, l = (n.scrollHeight - n.clientHeight) * a;
    n.scrollTop = l;
  }), n.onscroll = function() {
    if (r) {
      r = !1;
      return;
    }
    i = !0;
    var s = n.scrollHeight - n.clientHeight, o = parseFloat(n.scrollTop) / s, a = (t.getScrollInfo().height - t.getScrollInfo().clientHeight) * o;
    t.scrollTo(0, a);
  }, n;
};
Ge.prototype.createToolbar = function(t) {
  if (t = t || this.options.toolbar, !(!t || t.length === 0)) {
    var e;
    for (e = 0; e < t.length; e++)
      Bg[t[e]] != null && (t[e] = Bg[t[e]]);
    var n = document.createElement("div");
    n.className = "editor-toolbar";
    var i = this, r = {};
    for (i.toolbar = t, e = 0; e < t.length; e++)
      if (!(t[e].name == "guide" && i.options.toolbarGuideIcon === !1) && !(i.options.hideIcons && i.options.hideIcons.indexOf(t[e].name) != -1) && !((t[e].name == "fullscreen" || t[e].name == "side-by-side") && Eje())) {
        if (t[e] === "|") {
          for (var s = !1, o = e + 1; o < t.length; o++)
            t[o] !== "|" && (!i.options.hideIcons || i.options.hideIcons.indexOf(t[o].name) == -1) && (s = !0);
          if (!s)
            continue;
        }
        (function(u) {
          var f;
          u === "|" ? f = $je() : f = Tje(u, i.options.toolbarTips, i.options.shortcuts), u.action && (typeof u.action == "function" ? f.onclick = function(d) {
            d.preventDefault(), u.action(i);
          } : typeof u.action == "string" && (f.href = u.action, f.target = "_blank")), r[u.name || u] = f, n.appendChild(f);
        })(t[e]);
      }
    i.toolbarElements = r;
    var a = this.codemirror;
    a.on("cursorActivity", function() {
      var u = gc(a);
      for (var f in r)
        (function(d) {
          var h = r[d];
          u[d] ? h.className += " active" : d != "fullscreen" && d != "side-by-side" && d != "spellcheck" && d != "hemmingway" && (h.className = h.className.replace(/\s*active\s*/g, ""));
        })(f);
    });
    var l = a.getWrapperElement();
    return l.parentNode.append(n), n;
  }
};
Ge.prototype.createStatusbar = function(t) {
  t = t || this.options.status;
  var e = this.options, n = this.codemirror;
  if (!(!t || t.length === 0)) {
    var i = [], r, s, o;
    for (r = 0; r < t.length; r++)
      if (s = void 0, o = void 0, typeof t[r] == "object")
        i.push({
          className: t[r].className,
          defaultValue: t[r].defaultValue,
          onUpdate: t[r].onUpdate
        });
      else {
        var a = t[r];
        a === "words" ? (o = function(h) {
          h.innerHTML = vR(n.getValue());
        }, s = function(h) {
          h.innerHTML = vR(n.getValue());
        }) : a === "lines" ? (o = function(h) {
          h.innerHTML = n.lineCount();
        }, s = function(h) {
          h.innerHTML = n.lineCount();
        }) : a === "cursor" ? (o = function(h) {
          h.innerHTML = "0:0";
        }, s = function(h) {
          var m = n.getCursor();
          h.innerHTML = m.line + ":" + m.ch;
        }) : a === "autosave" && (o = function(h) {
          e.autosave != null && e.autosave.enabled === !0 && h.setAttribute("id", "autosaved");
        }), i.push({
          className: a,
          defaultValue: o,
          onUpdate: s
        });
      }
    var l = document.createElement("div");
    for (l.className = "editor-statusbar", r = 0; r < i.length; r++) {
      var u = i[r], f = document.createElement("span");
      f.className = u.className, typeof u.defaultValue == "function" && u.defaultValue(f), typeof u.onUpdate == "function" && this.codemirror.on("update", /* @__PURE__ */ function(h, m) {
        return function() {
          m.onUpdate(h);
        };
      }(f, u)), l.appendChild(f);
    }
    var d = this.codemirror.getWrapperElement();
    return d.parentNode.insertBefore(l, d.nextSibling), l;
  }
};
Ge.prototype.value = function(t) {
  return t === void 0 ? this.codemirror.getValue() : (this.codemirror.getDoc().setValue(t), this);
};
Ge.toggleBold = gx;
Ge.toggleItalic = vx;
Ge.toggleStrikethrough = bx;
Ge.toggleBlockquote = wx;
Ge.toggleHeadingSmaller = R0;
Ge.toggleHeadingBigger = kx;
Ge.toggleHeading1 = xx;
Ge.toggleHeading2 = _x;
Ge.toggleHeading3 = Ox;
Ge.toggleCodeBlock = yx;
Ge.toggleUnorderedList = Sx;
Ge.toggleOrderedList = Cx;
Ge.cleanBlock = Ex;
Ge.drawLink = Tx;
Ge.drawImage = $x;
Ge.drawTable = Mx;
Ge.drawHorizontalRule = Nx;
Ge.undo = Ax;
Ge.redo = Dx;
Ge.togglePreview = Px;
Ge.toggleSideBySide = Cp;
Ge.toggleFullScreen = _f;
Ge.prototype.toggleBold = function() {
  gx(this);
};
Ge.prototype.toggleItalic = function() {
  vx(this);
};
Ge.prototype.toggleStrikethrough = function() {
  bx(this);
};
Ge.prototype.toggleBlockquote = function() {
  wx(this);
};
Ge.prototype.toggleHeadingSmaller = function() {
  R0(this);
};
Ge.prototype.toggleHeadingBigger = function() {
  kx(this);
};
Ge.prototype.toggleHeading1 = function() {
  xx(this);
};
Ge.prototype.toggleHeading2 = function() {
  _x(this);
};
Ge.prototype.toggleHeading3 = function() {
  Ox(this);
};
Ge.prototype.toggleCodeBlock = function() {
  yx(this);
};
Ge.prototype.toggleUnorderedList = function() {
  Sx(this);
};
Ge.prototype.toggleOrderedList = function() {
  Cx(this);
};
Ge.prototype.cleanBlock = function() {
  Ex(this);
};
Ge.prototype.drawLink = function() {
  Tx(this);
};
Ge.prototype.drawImage = function() {
  $x(this);
};
Ge.prototype.drawTable = function() {
  Mx(this);
};
Ge.prototype.drawHorizontalRule = function() {
  Nx(this);
};
Ge.prototype.undo = function() {
  Ax(this);
};
Ge.prototype.redo = function() {
  Dx(this);
};
Ge.prototype.togglePreview = function() {
  Px(this);
};
Ge.prototype.toggleSideBySide = function() {
  Cp(this);
};
Ge.prototype.toggleFullScreen = function() {
  _f(this);
};
Ge.prototype.isPreviewActive = function() {
  var t = this.codemirror, e = t.getWrapperElement(), n = e.lastChild;
  return /editor-preview-active/.test(n.className);
};
Ge.prototype.isSideBySideActive = function() {
  var t = this.codemirror, e = t.getWrapperElement(), n = e.nextSibling;
  return /editor-preview-active-side/.test(n.className);
};
Ge.prototype.isFullscreenActive = function() {
  var t = this.codemirror;
  return t.getOption("fullScreen");
};
Ge.prototype.getState = function() {
  var t = this.codemirror;
  return gc(t);
};
Ge.prototype.toTextArea = function() {
  var t = this.codemirror, e = t.getWrapperElement();
  e.parentNode && (this.gui.toolbar && e.parentNode.removeChild(this.gui.toolbar), this.gui.statusbar && e.parentNode.removeChild(this.gui.statusbar), this.gui.sideBySide && e.parentNode.removeChild(this.gui.sideBySide)), t.toTextArea(), this.autosaveTimeoutId && (clearTimeout(this.autosaveTimeoutId), this.autosaveTimeoutId = void 0, this.clearAutosavedValue());
};
var Ije = Ge;
const Lje = /* @__PURE__ */ Gs(Ije), Ub = navigator.userAgent.indexOf("Mac") !== -1 ? "Cmd" : "Ctrl";
function Rje(t, e) {
  const n = ct(null), { progress: i, upload: r, errors: s, isLoading: o, filesNumber: a } = e("image"), l = async (h) => {
    const m = h.target.files, g = await r(m);
    d(g);
  };
  function u() {
    n.current.click();
  }
  function f({ src: h, alt: m, caption: g }) {
    let w = {
      alt: m,
      url: h,
      credit: `<small>${g}</small>`
    };
    d([w]);
  }
  function d(h = []) {
    const m = t.current.codemirror;
    let w = h.map((x) => {
      if (typeof x == "string") {
        let _ = x.split("/").pop(), S = _;
        return _.lastIndexOf(".") > 0 && (S = _.slice(0, _.lastIndexOf("."))), `![${S}](${x})`;
      } else {
        let _ = `![${x.fileName}](${x.url})`;
        return x.credit && (_ += `
${x.credit}`), _;
      }
    }).join(`

`);
    t.current.codemirror.focus(), m.replaceSelection(w, "end");
  }
  return {
    openImageUploadDialog: u,
    uploadImages: l,
    insertUnsplashImage: f,
    imageInputRef: n,
    progress: i,
    errors: s,
    isLoading: o,
    filesNumber: a
  };
}
function jje({
  markdown: t,
  updateMarkdown: e,
  imageUploader: n,
  unsplashConf: i,
  autofocus: r = !0,
  placeholder: s = ""
}) {
  const o = ct(null), a = ct(null), [l, u] = ft(!1), [f, d] = ft(!1), {
    openImageUploadDialog: h,
    uploadImages: m,
    insertUnsplashImage: g,
    imageInputRef: w,
    progress: x,
    errors: _,
    isLoading: S,
    filesNumber: C
  } = Rje(a, n), E = {
    openImageDialog: `${Ub}-Alt-I`,
    toggleSpellcheck: `${Ub}-Alt-S`,
    openUnsplashDialog: `${Ub}-Alt-O`
  };
  rh(() => {
    a.current = new Lje({
      element: o.current,
      autofocus: r,
      indentWithTabs: !1,
      placeholder: s,
      tabSize: 4,
      // disable shortcuts for side-by-side and fullscreen because they
      // trigger internal SimpleMDE methods that will result in broken
      // layouts
      shortcuts: {
        toggleFullScreen: null,
        togglePreview: null,
        toggleSideBySide: null,
        drawImage: null,
        // Enable strikethrough with CMD + Alt + U
        toggleStrikethrough: `${Ub}-Alt-U`
      },
      hideIcons: Z(),
      // hide status bar
      status: [],
      // Ghost-specific SimpleMDE toolbar config - allows us to create a
      // bridge between SimpleMDE buttons and Ember actions
      toolbar: [
        "bold",
        "italic",
        "heading",
        "|",
        "quote",
        "unordered-list",
        "ordered-list",
        "|",
        "link",
        {
          name: "image",
          action: h,
          className: "fa fa-picture-o",
          title: `Upload Image(s) (${E.openImageDialog})`
        },
        {
          name: "unsplash",
          action: L,
          className: "fa fa-camera",
          title: `Add Image from Unsplash (${E.openUnsplashDialog})`
        },
        "|",
        {
          name: "spellcheck",
          action: $,
          className: "fa fa-check",
          title: `Spellcheck (${E.toggleSpellcheck})`
        },
        {
          name: "guide",
          action: W,
          className: "fa fa-question-circle",
          title: "Markdown Guide"
        }
      ]
    });
    const H = a.current;
    return H.value(t ?? ""), H.codemirror.on("change", (q, Y) => {
      Y.origin !== "setValue" && e(a.current.value());
    }), H.codemirror.setOption("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\xa0]/g), r && H.codemirror.execCommand("goDocEnd"), H.codemirror.on("mousedown", (q, Y) => {
      Y.stopPropagation();
    }), M(), a.current.codemirror.setOption("mode", "gfm"), () => {
      a.current.toTextArea();
    };
  }, []);
  function M() {
    const H = a.current.codemirror, R = H.getOption("extraKeys");
    R[E.toggleSpellcheck] = $, R[E.openImageDialog] = h, i && (R[E.openUnsplashDialog] = L), H.setOption("extraKeys", R);
  }
  function $() {
    let H = a.current.codemirror;
    H.getOption("mode") === "spell-checker" ? H.setOption("mode", "gfm") : H.setOption("mode", "spell-checker"), P(), H.focus();
  }
  function P() {
    let H = a.current.toolbarElements.spellcheck;
    H && (a.current.codemirror.getOption("mode") === "spell-checker" ? H.classList.add("active") : H.classList.remove("active"));
  }
  function W() {
    u(!0);
  }
  function z() {
    u(!1), a.current.codemirror.focus();
  }
  function Z() {
    let H = [];
    return i || H.push("unsplash"), H;
  }
  function L() {
    d(!0);
  }
  function Q() {
    a.current.codemirror.focus(), d(!1);
  }
  function V(H) {
    g(H), d(!1);
  }
  return /* @__PURE__ */ y.jsxs("div", { className: "not-kg-prose", children: [
    /* @__PURE__ */ y.jsx("textarea", { ref: o }),
    /* @__PURE__ */ y.jsx(
      lje,
      {
        isOpen: l,
        onClose: z
      }
    ),
    /* @__PURE__ */ y.jsx(
      fje,
      {
        errors: _,
        filesNumber: C,
        inputRef: w,
        loading: S,
        progress: x,
        onChange: m
      }
    ),
    f && /* @__PURE__ */ y.jsx(
      NY,
      {
        unsplashConf: i,
        onClose: Q,
        onImageInsert: V
      }
    )
  ] });
}
function UG({ markdown: t = "", updateMarkdown: e, isEditing: n, imageUploader: i, unsplashConf: r }) {
  return /* @__PURE__ */ y.jsx(y.Fragment, { children: n ? /* @__PURE__ */ y.jsx("div", { className: "markdown-editor", children: /* @__PURE__ */ y.jsx(
    jje,
    {
      imageUploader: i,
      markdown: t,
      unsplashConf: r,
      updateMarkdown: e
    }
  ) }) : /* @__PURE__ */ y.jsx(ZG, { markdown: t }) });
}
function ZG({ markdown: t }) {
  const e = aY.render(t), n = F2(e, { replaceJS: !0 });
  return /* @__PURE__ */ y.jsxs("div", { className: "relative", children: [
    /* @__PURE__ */ y.jsx("div", { dangerouslySetInnerHTML: { __html: n }, className: "whitespace-normal" }),
    /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 z-50 mt-0" })
  ] });
}
UG.propTypes = {
  markdown: A.string,
  updateMarkdown: A.func,
  isEditing: A.bool,
  imageUploader: A.func,
  unsplashConf: A.object
};
ZG.propTypes = {
  markdown: A.string
};
function Fje({ nodeKey: t, markdown: e }) {
  const [n] = Oe.useLexicalComposerContext(), i = j.useContext(gn), { fileUploader: r, cardConfig: s } = j.useContext(dt), [o, a] = j.useState(!1), l = (f) => {
    n.update(() => {
      const d = N.$getNodeByKey(t);
      d.markdown = f;
    });
  }, u = (f) => {
    f.preventDefault(), f.stopPropagation(), n.dispatchCommand(Vs, { cardKey: t, focusEditor: !1 });
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      UG,
      {
        imageUploader: r.useFileUpload,
        isEditing: i.isEditing,
        markdown: e,
        nodeKey: t,
        unsplashConf: s.unsplash,
        updateMarkdown: l
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "markdown",
        isVisible: o,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => a(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "markdown",
        isVisible: e && i.isSelected && !i.isEditing && !o,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: u }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !s.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !s.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => a(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const qG = N.createCommand();
class Ix extends m1 {
  getIcon() {
    return PS;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(
      qn,
      {
        IndicatorIcon: oje,
        nodeKey: this.getKey(),
        wrapperStyle: "wide",
        children: /* @__PURE__ */ y.jsx(
          Fje,
          {
            markdown: this.__markdown,
            nodeKey: this.getKey()
          }
        )
      }
    );
  }
}
we(Ix, "kgMenu", {
  label: "Markdown",
  desc: "Insert a Markdown editor card",
  Icon: PS,
  insertCommand: qG,
  matches: ["markdown", "md"],
  priority: 19,
  shortcut: "/md"
});
function Bje(t) {
  return new Ix(t);
}
function zje() {
  return /* @__PURE__ */ y.jsxs("div", { className: "flex h-3 items-center whitespace-pre text-center font-sans text-2xs font-semibold uppercase text-grey-500 before:mr-2 before:flex-1 before:border-t before:border-grey-300 before:content-[''] after:ml-2 after:flex-1 after:border-t after:border-grey-300 dark:text-grey-800", children: [
    "Free public preview",
    /* @__PURE__ */ y.jsx("span", { className: "mx-2 text-green", children: "↑" }),
    "/",
    /* @__PURE__ */ y.jsx("span", { className: "mx-2 text-green", children: "↓" }),
    "Only visible to members"
  ] });
}
const YG = N.createCommand();
class a8 extends T1 {
  getIcon() {
    return LS;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { className: "inline-block", nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(zje, {}) });
  }
}
we(a8, "kgMenu", {
  label: "Public preview",
  desc: "Attract signups with a public intro",
  Icon: LS,
  insertCommand: YG,
  matches: ["public preview", "preview", "public intro", "members only", "paywall"],
  priority: 6,
  shortcut: "/paywall"
});
function bR() {
  return new a8();
}
function Wje({
  imgSrc: t,
  imgUploader: e = {},
  imgDragHandler: n = {},
  onImgChange: i,
  imgMimeTypes: r,
  onRemoveImage: s,
  isPinturaEnabled: o,
  openImageEditor: a,
  isEditing: l
}) {
  var m;
  const u = j.useRef(null), f = (g) => {
    g.stopPropagation(), s();
  }, d = n.isDraggedOver || !t, h = {
    width: `${(m = e.progress) == null ? void 0 : m.toFixed(0)}%`
  };
  return /* @__PURE__ */ y.jsx("div", { className: "not-kg-prose group/image relative mb-4 w-full rounded-md", children: d ? /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      mc,
      {
        desc: l ? "Click to select a product image" : "",
        errors: e.errors,
        filePicker: () => Yi({ fileInputRef: u }),
        icon: "product",
        isDraggedOver: n.isDraggedOver,
        placeholderRef: n.setRef,
        size: "small"
      }
    ),
    /* @__PURE__ */ y.jsx("form", { onChange: i, children: /* @__PURE__ */ y.jsx(
      "input",
      {
        ref: u,
        accept: r.join(","),
        hidden: !0,
        name: "image-input",
        type: "file"
      }
    ) })
  ] }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx("img", { alt: "Product thumbnail", className: "mx-auto max-h-[100%] rounded-md object-cover", "data-testid": "product-card-image", src: t }),
    l && /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 rounded-md bg-gradient-to-t from-black/0 via-black/5 to-black/30 opacity-0 transition-all group-hover/image:opacity-100" }) }),
    l && /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx("div", { className: "absolute right-5 top-5 flex opacity-0 transition-all group-hover/image:opacity-100", children: /* @__PURE__ */ y.jsx($l, { dataTestId: "replace-product-image", Icon: Bf, label: "Delete", onClick: f }) }) }),
    l && o && /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx("div", { className: "absolute right-16 top-5 flex opacity-0 transition-all group-hover/image:opacity-100", children: /* @__PURE__ */ y.jsx($l, { dataTestId: "replace-product-image", Icon: N2, label: "Edit", onClick: () => a({
      image: t,
      handleSave: (g) => {
        i({
          target: {
            files: [g]
          }
        });
      }
    }) }) }) }),
    e.isLoading && /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-white/50", children: /* @__PURE__ */ y.jsx(Xo, { bgStyle: "transparent", style: h }) })
  ] }) });
}
const Hje = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { className: "a", d: "M12.729,1.2l3.346,6.629,6.44.638a.805.805,0,0,1,.5,1.374l-5.3,5.253,1.965,7.138a.813.813,0,0,1-1.151.935L12,19.934,5.48,23.163a.813.813,0,0,1-1.151-.935L6.294,15.09.99,9.837a.805.805,0,0,1,.5-1.374l6.44-.638L11.271,1.2A.819.819,0,0,1,12.729,1.2Z" }));
function Qje({ rating: t, onRatingChange: e }) {
  const [n, i] = j.useState(-1), r = () => {
    i(-1);
  }, s = (o) => {
    const a = {
      active: t >= o + 1 ? "fill-grey-900 dark:fill-white" : "fill-grey-200 dark:fill-grey-900",
      hovered: n >= o ? "opacity-70" : ""
    };
    return Object.values(a).join(" ");
  };
  return /* @__PURE__ */ y.jsx(
    "div",
    {
      className: "not-kg-prose ml-auto flex transition-all duration-75",
      "data-testid": "product-stars",
      onMouseLeave: r,
      children: [...Array(5).keys()].map((o, a) => /* @__PURE__ */ y.jsx(
        "button",
        {
          className: `flex h-7 w-5 cursor-pointer items-center justify-center ${s(a)}`,
          type: "button",
          onClick: () => e(a + 1),
          onMouseOver: () => i(a),
          children: /* @__PURE__ */ y.jsx(Hje, { className: "w-4" })
        },
        o
      ))
    }
  );
}
function VG({
  isEditing: t,
  imgSrc: e,
  isButtonEnabled: n,
  buttonText: i,
  buttonUrl: r,
  rating: s,
  isRatingEnabled: o,
  onButtonToggle: a,
  onButtonTextChange: l,
  onButtonUrlChange: u,
  onRatingToggle: f,
  imgDragHandler: d,
  onImgChange: h,
  imgMimeTypes: m,
  imgUploader: g,
  isPinturaEnabled: w,
  openImageEditor: x,
  onRemoveImage: _,
  titleEditor: S,
  titleEditorInitialState: C,
  descriptionEditor: E,
  descriptionEditorInitialState: M,
  onRatingChange: $
}) {
  const P = !!r && !!i && n, W = n && t;
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "mx-auto my-4 flex w-full max-w-[550px] flex-col rounded-md border border-grey/40 p-5 font-sans dark:border-grey/20", children: [
      /* @__PURE__ */ y.jsx(
        Wje,
        {
          imgDragHandler: d,
          imgMimeTypes: m,
          imgSrc: e,
          imgUploader: g,
          isEditing: t,
          isPinturaEnabled: w,
          openImageEditor: x,
          onImgChange: h,
          onRemoveImage: _
        }
      ),
      /* @__PURE__ */ y.jsxs("div", { className: "!m-0 flex items-start justify-between", children: [
        (t || !po(S)) && /* @__PURE__ */ y.jsx("div", { className: "mr-2 flex-1", children: /* @__PURE__ */ y.jsx(
          Pr,
          {
            autoFocus: !0,
            focusNext: E,
            hasSettingsPanel: !0,
            initialEditor: S,
            initialEditorState: C,
            nodes: "minimal",
            placeholderClassName: "whitespace-normal !font-sans !text-2xl !leading-[1.1] !font-bold !tracking-tight text-black dark:text-grey-50 opacity-40",
            placeholderText: "Product title",
            singleParagraph: !0,
            textClassName: "koenig-lexical-heading heading-xsmall whitespace-normal"
          }
        ) }),
        o && /* @__PURE__ */ y.jsx(Qje, { rating: s, onRatingChange: $ })
      ] }),
      (t || !po(E)) && /* @__PURE__ */ y.jsx("div", { className: "!mt-2", children: /* @__PURE__ */ y.jsx(
        Pr,
        {
          hasSettingsPanel: !0,
          initialEditor: E,
          initialEditorState: M,
          placeholderClassName: "!text-[1.6rem] !font-sans !font-normal !tracking-tight !leading-snug text-grey-700 opacity-50",
          placeholderText: "Description",
          textClassName: "koenig-lexical-subheading subheading-xsmall whitespace-normal text-grey-700"
        }
      ) }),
      (W || P) && /* @__PURE__ */ y.jsx("div", { className: `not-kg-prose mt-6 w-full ${t || r ? "opacity-100" : "opacity-50"} `, children: /* @__PURE__ */ y.jsx(Na, { dataTestId: "product-button", href: r, value: i, width: "full" }) })
    ] }),
    t && /* @__PURE__ */ y.jsxs(Go, { children: [
      /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "product-rating-toggle",
          isChecked: o,
          label: "Rating",
          onChange: f
        }
      ),
      /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "product-button-toggle",
          isChecked: n,
          label: "Button",
          onChange: a
        }
      ),
      n && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
        /* @__PURE__ */ y.jsx(
          zf,
          {
            dataTestId: "product-button-text-input",
            label: "Button text",
            placeholder: "Add button text",
            value: i,
            onChange: l
          }
        ),
        /* @__PURE__ */ y.jsx(
          wp,
          {
            dataTestId: "product-button-url-input",
            label: "Button URL",
            value: r,
            onChange: u
          }
        )
      ] })
    ] }),
    !t && /* @__PURE__ */ y.jsx(ko, {})
  ] });
}
VG.propTypes = {
  isEditing: A.bool,
  imgSrc: A.string,
  isButtonEnabled: A.bool,
  buttonText: A.string,
  buttonUrl: A.string,
  isRatingEnabled: A.bool,
  rating: A.number,
  onButtonToggle: A.func,
  onButtonTextChange: A.func,
  onButtonUrlChange: A.func,
  onRatingToggle: A.func,
  onImgChange: A.func,
  onRemoveImage: A.func,
  imgDragHandler: A.object,
  imgUploader: A.object,
  imgMimeTypes: A.array,
  isPinturaEnabled: A.bool,
  openImageEditor: A.func,
  title: A.string,
  description: A.string,
  titleEditor: A.object,
  titleEditorInitialState: A.object,
  descriptionEditor: A.object,
  descriptionEditorInitialState: A.object,
  onRatingChange: A.func
};
function Uje({
  nodeKey: t,
  buttonText: e,
  buttonUrl: n,
  imgHeight: i,
  imgSrc: r,
  imgWidth: s,
  isButtonEnabled: o,
  isRatingEnabled: a,
  starRating: l,
  title: u,
  titleEditor: f,
  titleEditorInitialState: d,
  descriptionEditor: h,
  descriptionEditorInitialState: m,
  description: g
}) {
  var oe;
  const [w] = Oe.useLexicalComposerContext(), { isEditing: x, isSelected: _, setEditing: S } = j.useContext(gn), { fileUploader: C, cardConfig: E } = j.useContext(dt), M = ((oe = C.fileTypes.image) == null ? void 0 : oe.mimeTypes) || ["image/*"], { isEnabled: $, openEditor: P } = Z2({ config: E.pinturaConfig }), W = Wo({ handleDrop: Y, disabled: !x }), z = C.useFileUpload("image"), [Z, L] = j.useState(""), [Q, V] = j.useState(!1);
  j.useEffect(() => {
    f.setEditable(x), h.setEditable(x);
  }, [x, f, h]);
  const H = async (le) => {
    var ge;
    const pe = URL.createObjectURL(le[0]);
    L(pe);
    const { width: Re, height: ze } = await Wf(pe), rt = await z.upload(le), pt = (ge = rt == null ? void 0 : rt[0]) == null ? void 0 : ge.url;
    pt && w.update(() => {
      const De = N.$getNodeByKey(t);
      De.productImageSrc = pt, De.productImageHeight = ze, De.productImageWidth = Re;
    }), L(""), URL.revokeObjectURL(pe);
  }, R = async (le) => {
    le.target.files[0] && await H(le.target.files);
  }, q = () => {
    w.update(() => {
      const le = N.$getNodeByKey(t);
      le.productImageSrc = "";
    });
  };
  async function Y(le) {
    await H(le);
  }
  const K = (le) => {
    w.update(() => {
      const pe = N.$getNodeByKey(t);
      pe.productButtonEnabled = le.target.checked;
    });
  }, te = (le) => {
    w.update(() => {
      const pe = N.$getNodeByKey(t);
      pe.productButton = le.target.value;
    });
  }, se = (le) => {
    w.update(() => {
      const pe = N.$getNodeByKey(t);
      pe.productUrl = le;
    });
  }, ce = (le) => {
    w.update(() => {
      const pe = N.$getNodeByKey(t);
      pe.productRatingEnabled = le.target.checked;
    });
  }, U = (le) => {
    w.update(() => {
      const pe = N.$getNodeByKey(t);
      pe.productStarRating = le;
    });
  }, F = (le) => {
    le.preventDefault(), le.stopPropagation(), S(!0);
  };
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      VG,
      {
        buttonText: e,
        buttonUrl: n,
        description: g,
        descriptionEditor: h,
        descriptionEditorInitialState: m,
        imgDragHandler: W,
        imgHeight: i,
        imgMimeTypes: M,
        imgSrc: Z || r,
        imgUploader: z,
        imgWidth: s,
        isButtonEnabled: o,
        isEditing: x,
        isPinturaEnabled: $,
        isRatingEnabled: a,
        openImageEditor: P,
        rating: l,
        title: u,
        titleEditor: f,
        titleEditorInitialState: d,
        onButtonTextChange: te,
        onButtonToggle: K,
        onButtonUrlChange: se,
        onImgChange: R,
        onRatingChange: U,
        onRatingToggle: ce,
        onRemoveImage: q
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "product",
        isVisible: Q,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => V(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "product",
        isVisible: _ && !x && !Q,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "edit-product-card", icon: "edit", isActive: !1, label: "Edit", onClick: F }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !E.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !E.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => V(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const XG = N.createCommand();
class Lx extends $1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__productTitleEditor");
    we(this, "__productTitleEditorInitialState");
    we(this, "__productDescriptionEditor");
    we(this, "__productDescriptionEditorInitialState");
    xi(this, "__productTitleEditor", { editor: n.productTitleEditor, nodes: pr }), xi(this, "__productDescriptionEditor", { editor: n.productDescriptionEditor, nodes: $f }), !n.productTitleEditor && n.productTitle && _i(this, "__productTitleEditor", `${n.productTitle}`), n.productDescriptionEditor || _i(this, "__productDescriptionEditor", n.productDescription);
  }
  getIcon() {
    return RS;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.productTitleEditor = i.__productTitleEditor, n.productTitleEditorInitialState = i.__productTitleEditorInitialState, n.productDescriptionEditor = i.__productDescriptionEditor, n.productDescriptionEditorInitialState = i.__productDescriptionEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__productTitleEditor && this.__productTitleEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__productTitleEditor, null), r = mi(i, { firstChildInnerContent: !0, allowBr: !0 });
      n.productTitle = r;
    }), this.__productDescriptionEditor && this.__productDescriptionEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__productDescriptionEditor, null), r = mi(i, { allowBr: !0 });
      n.productDescription = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(
      Uje,
      {
        buttonText: this.productButton,
        buttonUrl: this.productUrl,
        description: this.productDescription,
        descriptionEditor: this.__productDescriptionEditor,
        descriptionEditorInitialState: this.__productDescriptionEditorInitialState,
        imgHeight: this.productImageHeight,
        imgSrc: this.productImageSrc,
        imgWidth: this.productImageWidth,
        isButtonEnabled: this.productButtonEnabled,
        isRatingEnabled: this.productRatingEnabled,
        nodeKey: this.getKey(),
        starRating: this.productStarRating,
        title: this.productTitle,
        titleEditor: this.__productTitleEditor,
        titleEditorInitialState: this.__productTitleEditorInitialState
      }
    ) });
  }
  // override the default `isEmpty` check because we need to check the nested editors
  // rather than the data properties themselves
  isEmpty() {
    const n = po(this.__productTitleEditor), i = po(this.__productDescriptionEditor), r = this.productButtonEnabled && this.productUrl && this.productButton;
    return n && i && !r && !this.productImageSrc && !this.productRatingEnabled;
  }
}
we(Lx, "kgMenu", [{
  label: "Product",
  desc: "Add a product recommendation",
  Icon: RS,
  insertCommand: XG,
  matches: ["product"],
  priority: 16,
  shortcut: "/product"
}]);
const Zje = (t) => new Lx(t), yR = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2 }, /* @__PURE__ */ J.createElement("path", { d: "M11 13c-2.824 0-5.329.638-6.975 1.193A2.99 2.99 0 0 0 2 17.032V21h10", "data-cap": "butt" }), /* @__PURE__ */ J.createElement("path", { d: "M11 13h0c-2.761 0-5-3.239-5-6V6a5 5 0 0 1 5-5h0a5 5 0 0 1 5 5v1c0 2.761-2.239 6-5 6zm8 3v6m-3-3h6" })));
function qje({ dataTestId: t, placeholder: e, value: n, buttonSize: i, buttonText: r, buttonStyle: s, onChange: o, onFocus: a, onBlur: l, disabled: u }) {
  const f = (d) => {
    o && o(d);
  };
  return /* @__PURE__ */ y.jsxs("div", { className: nt(
    "relative flex rounded-md border border-grey-500/30 bg-white",
    i === "large" ? "p-[3px]" : "p-[2px]"
  ), children: [
    /* @__PURE__ */ y.jsx(
      "input",
      {
        className: nt(
          "relative w-full bg-white px-4 py-2 font-sans font-normal text-grey-900 focus-visible:outline-none",
          i === "small" && "h-10 text-md leading-[4rem]",
          i === "medium" && "h-11 text-[1.6rem] leading-[4.4rem]",
          i === "large" && "h-12 text-lg leading-[4.8rem]"
        ),
        defaultValue: n,
        placeholder: e,
        tabIndex: u ? "-1" : "",
        readOnly: !0,
        onBlur: l,
        onChange: f,
        onFocus: a
      }
    ),
    /* @__PURE__ */ y.jsx(Na, { dataTestId: t, disabled: u, placeholder: "", size: i, style: s, value: r })
  ] });
}
function GG({
  alignment: t,
  buttonText: e,
  showBackgroundImage: n,
  backgroundImageSrc: i,
  backgroundSize: r,
  backgroundColor: s,
  buttonColor: o,
  buttonTextColor: a,
  textColor: l,
  isEditing: u,
  fileUploader: f,
  handleAlignment: d,
  handleButtonText: h,
  handleShowBackgroundImage: m,
  handleHideBackgroundImage: g,
  handleClearBackgroundImage: w,
  handleBackgroundColor: x,
  handleButtonColor: _,
  handleLayout: S,
  handleTextColor: C,
  isPinturaEnabled: E,
  labels: M,
  layout: $,
  availableLabels: P,
  handleLabels: W,
  onFileChange: z,
  openImageEditor: Z,
  imageDragHandler: L,
  headerTextEditor: Q,
  headerTextEditorInitialState: V,
  renderLabels: H,
  subheaderTextEditor: R,
  subheaderTextEditorInitialState: q,
  disclaimerTextEditor: Y,
  disclaimerTextEditorInitialState: K,
  isSwapped: te,
  handleSwapLayout: se,
  handleBackgroundSize: ce,
  handleButtonTextBlur: U,
  setFileInputRef: F
}) {
  const [oe, le] = ft(!1), [pe, Re] = ft(!1), ze = (ae) => ae === "transparent" ? "" : i8(He(ae)).hex(), rt = ({ r: ae, g: Ue, b: qt, a: Xn }) => {
    const Dt = Xn / 255;
    return Fg({
      r: ae * Dt + 255 * (1 - Dt),
      g: Ue * Dt + 255 * (1 - Dt),
      b: qt * Dt + 255 * (1 - Dt)
    }).hex();
  };
  kt(() => {
    i && $ !== "split" && new MG().getColorAsync(i, { defaultColor: [255, 255, 255, 255] }).then((ae) => {
      const Ue = rt({
        r: ae.value[0],
        g: ae.value[1],
        b: ae.value[2],
        a: ae.value[3]
      });
      C(ze(Ue));
    });
  }, [i, $ === "split"]), kt(() => {
    s && $ === "split" && x(s, ze(s));
  }, [$ === "split"]);
  const pt = [
    {
      label: "Regular",
      name: "regular",
      Icon: J0,
      dataTestId: "signup-layout-regular"
    },
    {
      label: "Wide",
      name: "wide",
      Icon: e1,
      dataTestId: "signup-layout-wide"
    },
    {
      label: "Full",
      name: "full",
      Icon: K0,
      dataTestId: "signup-layout-full"
    },
    {
      label: "Split",
      name: "split",
      Icon: SG,
      dataTestId: "signup-layout-split"
    }
  ], ge = [
    {
      label: "Left",
      name: "left",
      Icon: V1,
      dataTestId: "signup-alignment-left"
    },
    {
      label: "Center",
      name: "center",
      Icon: Y1,
      dataTestId: "signup-alignment-center"
    }
  ], { isLoading: De, progress: st } = f || {}, It = $ === "split" ? "Heading" : "Enter heading text", At = $ === "split" ? "Subheading text" : "Enter subheading text", Ut = $ === "split" ? "Disclaimer text" : "Enter disclaimer text", He = (ae) => ae === "accent" ? Ju().trim() : ae.trim(), Ct = () => i && $ !== "split" && l ? {
    backgroundImage: `url(${i})`,
    backgroundSize: "cover",
    backgroundPosition: "center center",
    backgroundColor: "white",
    color: He(l)
  } : s && l ? {
    backgroundColor: He(s),
    color: He(l)
  } : {
    backgroundImage: `url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3ERectangle%3C/title%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath fill='%23F2F6F8' d='M0 0h24v24H0z'/%3E%3Cpath fill='%23E5ECF0' d='M0 0h12v12H0zM12 12h12v12H12z'/%3E%3C/g%3E%3C/svg%3E")`,
    backgroundColor: "transparent",
    color: He(l)
  }, Lt = (ae) => {
    ae.stopPropagation(), r === "cover" ? (ce("contain"), pi("Signup Card Toggle Size", { size: "contain" })) : (ce("cover"), pi("Signup Card Toggle Size", { size: "cover" }));
  }, Be = () => {
    pi("Signup Card Toggle Swapped", { swapped: !te }), se();
  }, Ie = r === "contain" && i ? "contain" : "cover";
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "flex w-full font-sans text-black transition-colors ease-in-out", "data-testid": "signup-card-container", style: Ct(), children: [
      /* @__PURE__ */ y.jsxs("div", { className: nt(
        "flex w-full flex-col transition-colors ease-in-out sm:flex-row",
        $ === "split" && te && "flex-col-reverse sm:flex-row-reverse",
        // This is needed to align the content with wide breakout width
        ($ === "full" || $ === "split" && Ie === "contain") && "mx-auto w-[calc(740px+4rem)] xs:w-[calc(740px+8rem)] md:w-[calc(740px+12rem)] lg:w-[calc(740px+22rem)] xl:w-[calc(740px+40rem)]",
        i && $ === "split" && Ie === "contain" && "items-center"
      ), "data-testid": "signup-card-content", children: [
        $ === "split" && /* @__PURE__ */ y.jsx(
          W2,
          {
            additionalActions: /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx($l, { dataTestId: "media-upload-size", Icon: r === "cover" ? CG : OG, label: r === "cover" ? "Contain" : "Cover", onClick: Lt }) }),
            alt: "Background image",
            backgroundSize: r,
            borderStyle: "squared",
            className: nt(
              "sm:w-1/2",
              Ie === "contain" && "sm:my-10 md:my-14",
              !te && Ie === "contain" && "mt-10 px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:pl-[calc(92px-(12rem/2))] sm:pr-0 md:pl-[calc(92px-(12rem/2))] lg:pl-0",
              te && Ie === "contain" && "mb-10 px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:pl-0 sm:pr-[calc(92px-(12rem/2))] md:pr-[calc(92px-(12rem/2))] lg:pr-0"
            ),
            desc: "Click to select an image",
            dragHandler: L,
            errors: f == null ? void 0 : f.errors,
            icon: "image",
            imgClassName: `${Ie === "cover" && "aspect-[3/2]"}`,
            isEditing: u,
            isLoading: De,
            isPinturaEnabled: E,
            mimeTypes: ["image/*"],
            openImageEditor: Z,
            progress: st,
            size: "large",
            src: i,
            onFileChange: z,
            onRemoveMedia: w
          }
        ),
        /* @__PURE__ */ y.jsxs(
          "div",
          {
            className: nt(
              "mx-auto flex w-full flex-1 flex-col justify-center",
              t === "center" && "items-center",
              $ === "regular" && "p-[4rem] sm:py-[6rem] md:px-[6rem] md:py-[8rem] lg:px-[8rem]",
              $ === "wide" && "max-w-[740px] p-[4rem] sm:py-[6rem] md:px-[8rem] md:py-[10rem] lg:px-0",
              $ === "full" && "px-[calc(32px-(4rem/2))] py-[4rem] xs:px-[calc(92px-(8rem/2))] sm:py-[6rem] md:px-[calc(92px-(12rem/2))] md:py-[12rem] lg:px-0 lg:py-[14rem] xl:py-[18rem]",
              $ === "split" && "p-[4rem] sm:py-[6rem] md:px-[6rem] md:py-[12rem] lg:px-[8rem] lg:py-[16rem] xl:py-[18rem]",
              !te && $ === "split" && Ie === "contain" && "px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:px-[calc(92px-(12rem/2))] md:pr-[calc(92px-(12rem/2))] lg:pr-0",
              te && $ === "split" && Ie === "contain" && "px-[calc(32px-(4rem/2))] xs:px-[calc(92px-(8rem/2))] sm:px-[calc(92px-(12rem/2))] md:pl-[calc(92px-(12rem/2))] lg:pl-0"
            ),
            children: [
              /* @__PURE__ */ y.jsx(
                Pr,
                {
                  autoFocus: !0,
                  dataTestId: "signup-header-editor",
                  focusNext: R,
                  hasSettingsPanel: !0,
                  hiddenFormats: ["bold"],
                  initialEditor: Q,
                  initialEditorState: V,
                  nodes: "minimal",
                  placeholderClassName: nt(
                    "!font-bold !leading-[1.1] !tracking-tight opacity-50",
                    t === "center" && "text-center",
                    $ === "regular" && "text-3xl sm:text-4xl",
                    ($ === "wide" || $ === "split") && "text-3xl sm:text-4xl md:text-5xl",
                    $ === "full" && "text-3xl sm:text-4xl md:text-5xl lg:text-6xl"
                  ),
                  placeholderText: It,
                  singleParagraph: !0,
                  style: { color: ze(s) },
                  textClassName: nt(
                    "koenig-lexical-heading relative w-full whitespace-normal font-bold caret-current",
                    !u && po(Q) ? "hidden" : "peer",
                    t === "center" && "text-center [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left",
                    $ === "regular" && "heading-small",
                    ($ === "wide" || $ === "split") && "heading-medium",
                    $ === "full" && "heading-large"
                  )
                }
              ),
              /* @__PURE__ */ y.jsx(
                Pr,
                {
                  dataTestId: "signup-subheader-editor",
                  focusNext: Y,
                  hasSettingsPanel: !0,
                  initialEditor: R,
                  initialEditorState: q,
                  nodes: "minimal",
                  placeholderClassName: nt(
                    "!font-medium !leading-snug !tracking-tight opacity-60",
                    t === "center" && "text-center",
                    $ === "regular" && "text-lg sm:text-xl",
                    ($ === "wide" || $ === "split") && "text-lg sm:text-xl md:text-[2.2rem]",
                    $ === "full" && "text-lg sm:text-xl md:text-[2.2rem] lg:text-2xl xl:max-w-[880px]"
                  ),
                  placeholderText: At,
                  singleParagraph: !0,
                  style: { color: ze(s) },
                  textClassName: nt(
                    "koenig-lexical-subheading relative w-full whitespace-normal caret-current",
                    !u && po(R) ? "hidden" : "peer",
                    t === "center" && "text-center [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left",
                    $ === "regular" && "subheading-small !mt-2",
                    ($ === "wide" || $ === "split") && "subheading-medium !mt-3",
                    $ === "full" && "subheading-large !mt-3 xl:max-w-[880px]"
                  )
                }
              ),
              /* @__PURE__ */ y.jsx("div", { className: `w-full ${$ === "regular" ? "peer-[.koenig-lexical]:mt-10" : $ === "wide" ? "peer-[.koenig-lexical]:mt-12 md:w-2/3" : $ === "full" ? "peer-[.koenig-lexical]:mt-12 md:w-2/3 peer-[.koenig-lexical]:md:mt-16 xl:w-1/2" : "max-w-[500px] peer-[.koenig-lexical]:mt-10 peer-[.koenig-lexical]:md:mt-16"}`, children: /* @__PURE__ */ y.jsx(
                qje,
                {
                  buttonSize: `${$ === "regular" ? "medium" : "large"}`,
                  buttonStyle: o ? {
                    backgroundColor: He(o),
                    color: He(a)
                  } : {
                    backgroundColor: "#000000",
                    color: "#ffffff"
                  },
                  buttonText: e,
                  dataTestId: "signup-card-button",
                  disabled: !0,
                  placeholder: "Your email"
                }
              ) }),
              /* @__PURE__ */ y.jsx(
                Pr,
                {
                  dataTestId: "signup-disclaimer-editor",
                  defaultKoenigEnterBehaviour: !0,
                  hasSettingsPanel: !0,
                  initialEditor: Y,
                  initialEditorState: K,
                  nodes: "minimal",
                  placeholderClassName: "opacity-60 !leading-snug !font-normal !text-[1.6rem] !tracking-tight",
                  placeholderText: Ut,
                  singleParagraph: !0,
                  style: { color: ze(s) },
                  textClassName: nt(
                    "koenig-lexical-subheading subheading-xsmall relative !mt-4 w-full whitespace-normal caret-current",
                    !u && po(Y) && "hidden",
                    t === "center" && "text-center [&:has(.placeholder)]:w-fit [&:has(.placeholder)]:text-left"
                  )
                }
              )
            ]
          }
        )
      ] }),
      !u && /* @__PURE__ */ y.jsx(ko, {})
    ] }),
    u && /* @__PURE__ */ y.jsx("div", { className: "!mt-0 flex items-center justify-center bg-grey-100 p-2 font-sans text-sm font-normal leading-none text-grey-600 dark:bg-grey-950 dark:text-grey-800", children: "Only visible to logged out visitors, this card is not shown in emails or to existing members." }),
    u && /* @__PURE__ */ y.jsxs(Go, { cardWidth: $, className: "mt-0", children: [
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: pt,
          label: "Layout",
          selectedName: $,
          onClick: S
        }
      ),
      $ === "split" && /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "signup-swapped",
          isChecked: te,
          label: "Flip Layout",
          onChange: Be
        }
      ),
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: ge,
          label: "Alignment",
          selectedName: t,
          onClick: d
        }
      ),
      /* @__PURE__ */ y.jsx(
        C0,
        {
          dataTestId: "signup-background-color",
          eyedropper: $ === "split",
          hasTransparentOption: !0,
          isExpanded: oe,
          label: "Background",
          swatches: [
            $ !== "split" && {
              title: "Image",
              customContent: /* @__PURE__ */ y.jsxs(
                "button",
                {
                  className: nt(
                    "group relative flex size-6 shrink-0 items-center justify-center rounded-full border border-grey-300 bg-grey-100 text-black",
                    n && "outline outline-2 outline-green"
                  ),
                  "data-testid": "signup-background-image-toggle",
                  title: "Image",
                  type: "button",
                  onClick: () => {
                    m(), le(!1), Re(!1);
                  },
                  children: [
                    /* @__PURE__ */ y.jsx(dT, { className: "size-[1.4rem]" }),
                    /* @__PURE__ */ y.jsx(pc, { label: "Image" })
                  ]
                }
              )
            },
            { title: "Grey", hex: "#F0F0F0" },
            { title: "Black", hex: "#000000" },
            { title: "Brand color", accent: !0 }
          ].filter(Boolean),
          value: n && $ !== "split" ? "image" : s,
          onPickerChange: (ae) => x(ae, ze(ae)),
          onSwatchChange: (ae) => {
            x(ae, ze(ae)), le(!1);
          },
          onTogglePicker: (ae) => {
            ae && ($ !== "split" && g(), s && x(s, ze(s))), le(ae), ae && Re(!ae);
          },
          children: /* @__PURE__ */ y.jsx(
            H2,
            {
              alt: "Background image",
              borderStyle: "rounded",
              className: nt(
                "min-w-[296px]",
                (!n || $ === "split") && "hidden"
              ),
              errors: f == null ? void 0 : f.errors,
              hideLabel: $ !== "split",
              icon: "file",
              imgClassName: "w-full",
              isDraggedOver: L == null ? void 0 : L.isDraggedOver,
              isLoading: De,
              isPinturaEnabled: E,
              label: "Image",
              mimeTypes: ["image/*"],
              openImageEditor: Z,
              placeholderRef: L == null ? void 0 : L.setRef,
              progress: st,
              setFileInputRef: F,
              size: "xsmall",
              src: i,
              stacked: !0,
              onFileChange: z,
              onRemoveMedia: () => {
                w(), C(ze(s));
              }
            }
          )
        }
      ),
      /* @__PURE__ */ y.jsx(
        C0,
        {
          dataTestId: "signup-button-color",
          eyedropper: $ === "split",
          isExpanded: pe,
          label: "Button color",
          swatches: [
            { title: "White", hex: "#ffffff" },
            { title: "Black", hex: "#000000" },
            { title: "Brand color", accent: !0 }
          ],
          value: o,
          onPickerChange: (ae) => _(ae, ze(ae)),
          onSwatchChange: (ae) => {
            _(ae, ze(ae)), Re(!1);
          },
          onTogglePicker: (ae) => {
            Re(ae), ae && le(!ae);
          }
        }
      ),
      /* @__PURE__ */ y.jsx(
        zf,
        {
          dataTestId: "signup-button-text",
          label: "Button text",
          placeholder: "Add button text",
          value: e,
          onBlur: U,
          onChange: h
        }
      ),
      H && /* @__PURE__ */ y.jsx(
        L9e,
        {
          availableItems: P,
          dataTestId: "labels-dropdown",
          description: "Added to members created using this form",
          items: M,
          label: "Labels",
          placeholder: "Type to search",
          onChange: W
        }
      )
    ] })
  ] });
}
GG.propTypes = {
  alignment: A.oneOf(["left", "center"]),
  buttonColor: A.string,
  buttonText: A.string,
  buttonTextColor: A.string,
  buttonPlaceholder: A.string,
  backgroundImageSrc: A.string,
  backgroundSize: A.oneOf(["cover", "contain"]),
  backgroundColor: A.string,
  textColor: A.string,
  showBackgroundImage: A.bool,
  isEditing: A.bool,
  isPinturaEnabled: A.bool,
  fileUploader: A.object,
  fileInputRef: A.object,
  handleLayout: A.func,
  handleAlignment: A.func,
  handleButtonText: A.func,
  handleClearBackgroundImage: A.func,
  handleBackgroundColor: A.func,
  handleShowBackgroundImage: A.func,
  handleHideBackgroundImage: A.func,
  handleButtonColor: A.func,
  handleLabels: A.func,
  handleTextColor: A.func,
  labels: A.arrayOf(A.string),
  layout: A.oneOf(["regular", "wide", "full", "split"]),
  availableLabels: A.arrayOf(A.string),
  openFilePicker: A.func,
  onFileChange: A.func,
  openImageEditor: A.func,
  imageDragHandler: A.object,
  headerTextEditor: A.object,
  headerTextEditorInitialState: A.object,
  renderLabels: A.bool,
  subheaderTextEditor: A.object,
  subheaderTextEditorInitialState: A.object,
  disclaimerTextEditor: A.object,
  disclaimerTextEditorInitialState: A.object,
  isSwapped: A.bool,
  handleSwapLayout: A.func,
  handleBackgroundSize: A.func,
  setFileInputRef: A.func,
  handleButtonTextBlur: A.func
};
function Yje({
  alignment: t,
  backgroundColor: e,
  backgroundImageSrc: n,
  backgroundSize: i,
  buttonColor: r,
  buttonText: s,
  buttonTextColor: o,
  nodeKey: a,
  disclaimer: l,
  disclaimerTextEditor: u,
  disclaimerTextEditorInitialState: f,
  header: d,
  headerTextEditor: h,
  headerTextEditorInitialState: m,
  labels: g,
  layout: w,
  subheader: x,
  subheaderTextEditor: _,
  subheaderTextEditorInitialState: S,
  textColor: C,
  isSwapped: E
}) {
  const [M] = Oe.useLexicalComposerContext(), { cardConfig: $ } = Au(dt), { fileUploader: P } = Au(dt), { isEditing: W, isSelected: z } = Au(gn), [Z, L] = ft(!1), [Q, V] = ft([]), [H, R] = ft(!!n), [q, Y] = ft(n), [K, te] = ft(!1), { isEnabled: se, openEditor: ce } = Z2({ config: $.pinturaConfig }), U = ct(null);
  kt(() => {
    $.renderLabels && $.fetchLabels && $.fetchLabels().then((Ie) => {
      V(Ie);
    });
  }, [$]), kt(() => {
    w !== "split" && R(!!n), w === "split" && !n && q && It();
  }, [w]);
  const F = (Ie) => {
    M.update(() => {
      const ae = N.$getNodeByKey(a);
      ae.alignment = Ie;
    });
  }, oe = (Ie) => {
    M.update(() => {
      const ae = N.$getNodeByKey(a);
      ae.backgroundSize = Ie;
    });
  }, le = (Ie) => {
    Ie.preventDefault(), Ie.stopPropagation(), M.dispatchCommand(Vs, { cardKey: a, focusEditor: !1 });
  }, pe = P.useFileUpload("image"), Re = async (Ie) => {
    M.update(() => {
      const Ue = N.$getNodeByKey(a);
      Ue.backgroundImageSrc = "";
    });
    const { imageSrc: ae } = await OT(Ie, pe.upload);
    M.update(() => {
      const Ue = N.$getNodeByKey(a);
      Ue.backgroundImageSrc = ae;
    }), Y(ae), te(!1);
  }, ze = async (Ie) => {
    Re(Ie.target.files);
  }, rt = Wo({ handleDrop: Re }), pt = (Ie) => {
    M.update(() => {
      const ae = N.$getNodeByKey(a);
      ae.layout = Ie;
    });
  }, ge = (Ie) => {
    M.update(() => {
      const ae = N.$getNodeByKey(a);
      ae.buttonText = Ie.target.value;
    });
  }, De = (Ie) => {
    Ie.target.value || M.update(() => {
      const ae = N.$getNodeByKey(a);
      ae.buttonText = "Subscribe";
    });
  }, st = () => {
    M.update(() => {
      const Ie = N.$getNodeByKey(a);
      Ie.backgroundImageSrc = "";
    }), te(!0);
  }, It = () => {
    R(!0), q && !K ? M.update(() => {
      const Ie = N.$getNodeByKey(a);
      Ie.backgroundImageSrc = q;
    }) : Yi({ fileInputRef: U });
  }, At = () => {
    R(!1), M.update(() => {
      const Ie = N.$getNodeByKey(a);
      Ie.backgroundImageSrc = "";
    });
  }, Ut = (Ie, ae) => {
    M.update(() => {
      const Ue = N.$getNodeByKey(a);
      Ue.backgroundColor = Ie, Ue.textColor = ae, w !== "split" && At();
    });
  }, He = (Ie) => {
    M.update(() => {
      const ae = N.$getNodeByKey(a);
      ae.textColor = Ie;
    });
  }, Ct = (Ie, ae) => {
    M.update(() => {
      const Ue = N.$getNodeByKey(a);
      Ue.buttonColor = Ie, Ue.buttonTextColor = ae;
    });
  }, Lt = (Ie) => {
    M.update(() => {
      N.$getNodeByKey(a).setLabels(Ie);
    });
  }, Be = () => {
    M.update(() => {
      const Ie = N.$getNodeByKey(a);
      Ie.swapped = !E;
    });
  };
  return kt(() => {
    h.setEditable(W), _.setEditable(W), u.setEditable(W);
  }, [W, h, _, u]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      GG,
      {
        alignment: t,
        availableLabels: Q,
        backgroundColor: e,
        backgroundImageSrc: n,
        backgroundSize: i,
        buttonColor: r,
        buttonText: s,
        buttonTextColor: o,
        disclaimer: l,
        disclaimerTextEditor: u,
        disclaimerTextEditorInitialState: f,
        fileUploader: pe,
        handleAlignment: F,
        handleBackgroundColor: Ut,
        handleBackgroundSize: oe,
        handleButtonColor: Ct,
        handleButtonText: ge,
        handleButtonTextBlur: De,
        handleClearBackgroundImage: st,
        handleHideBackgroundImage: At,
        handleLabels: Lt,
        handleLayout: pt,
        handleShowBackgroundImage: It,
        handleSwapLayout: Be,
        handleTextColor: He,
        header: d,
        headerTextEditor: h,
        headerTextEditorInitialState: m,
        imageDragHandler: rt,
        isEditing: W,
        isPinturaEnabled: se,
        isSwapped: E,
        labels: g,
        layout: w,
        openImageEditor: ce,
        renderLabels: $.renderLabels,
        setFileInputRef: (Ie) => U.current = Ie,
        showBackgroundImage: H,
        subheader: x,
        subheaderTextEditor: _,
        subheaderTextEditorInitialState: S,
        textColor: C,
        onFileChange: ze
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "signup",
        isVisible: Z,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => L(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "signup",
        isVisible: z && !W && !Z,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: le }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !$.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !$.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => L(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const { INSERT_SIGNUP_COMMAND: KG } = N.createCommand();
class Rx extends P1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__disclaimerTextEditor");
    we(this, "__disclaimerTextEditorInitialState");
    we(this, "__headerTextEditor");
    we(this, "__headerTextEditorInitialState");
    we(this, "__subheaderTextEditor");
    we(this, "__subheaderTextEditorInitialState");
    xi(this, "__headerTextEditor", { editor: n.headerTextEditor, nodes: pr }), xi(this, "__subheaderTextEditor", { editor: n.subheaderTextEditor, nodes: pr }), xi(this, "__disclaimerTextEditor", { editor: n.disclaimerTextEditor, nodes: pr }), !n.headerTextEditor && n.header && _i(this, "__headerTextEditor", `${n.header}`), !n.subheaderTextEditor && n.subheader && _i(this, "__subheaderTextEditor", `${n.subheader}`), !n.disclaimerTextEditor && n.disclaimer && _i(this, "__disclaimerTextEditor", `${n.disclaimer}`);
  }
  getIcon() {
    return yR;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__disclaimerTextEditor && this.__disclaimerTextEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__disclaimerTextEditor, null), r = mi(i, { firstChildInnerContent: !0, allowBr: !0 });
      n.disclaimer = r;
    }), this.__headerTextEditor && this.__headerTextEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__headerTextEditor, null), r = mi(i, { firstChildInnerContent: !0, allowBr: !0 });
      n.header = r;
    }), this.__subheaderTextEditor && this.__subheaderTextEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__subheaderTextEditor, null), r = mi(i, { firstChildInnerContent: !0, allowBr: !0 });
      n.subheader = r;
    }), n;
  }
  createDOM() {
    return document.createElement("div");
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.disclaimerTextEditor = i.__disclaimerTextEditor, n.headerTextEditor = i.__headerTextEditor, n.subheaderTextEditor = i.__subheaderTextEditor, n;
  }
  getCardWidth() {
    const n = this.layout;
    return n === "split" ? "full" : n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), width: this.getCardWidth(), children: /* @__PURE__ */ y.jsx(
      Yje,
      {
        alignment: this.alignment,
        backgroundColor: this.backgroundColor,
        backgroundImageSrc: this.backgroundImageSrc,
        backgroundSize: this.backgroundSize,
        buttonColor: this.buttonColor,
        buttonText: this.buttonText,
        buttonTextColor: this.buttonTextColor,
        disclaimer: this.disclaimer,
        disclaimerTextEditor: this.__disclaimerTextEditor,
        disclaimerTextEditorInitialState: this.__disclaimerTextEditorInitialState,
        header: this.header,
        headerTextEditor: this.__headerTextEditor,
        headerTextEditorInitialState: this.__headerTextEditorInitialState,
        isSwapped: this.swapped,
        labels: this.labels,
        layout: this.layout,
        nodeKey: this.getKey(),
        subheader: this.subheader,
        subheaderTextEditor: this.__subheaderTextEditor,
        subheaderTextEditorInitialState: this.__subheaderTextEditorInitialState,
        textColor: this.textColor
      }
    ) });
  }
  // override the default `isEmpty` check because we need to check the nested editors
  // rather than the data properties themselves
  isEmpty() {
    const n = this.__headerTextEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1)), i = this.__subheaderTextEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1)), r = this.__disclaimerTextEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1));
    return !this.__backgroundColor && !this.__backgroundImageSrc && !this.__buttonColor && !this.__buttonText && r && n && !this.__labels.length && i;
  }
}
we(Rx, "kgMenu", {
  label: "Signup",
  desc: "Convert visitors into members",
  Icon: yR,
  insertCommand: KG,
  matches: ["signup", "subscribe"],
  priority: 10,
  isHidden: ({ config: n }) => !(n == null ? void 0 : n.membersEnabled),
  insertParams: ({ config: n }) => ({
    header: n != null && n.siteTitle ? `Sign up for ${n.siteTitle}` : "",
    subheader: (n == null ? void 0 : n.siteDescription) || "",
    disclaimer: "No spam. Unsubscribe anytime."
  }),
  shortcut: "/signup"
});
const Vje = (t) => new Rx(t), Xje = (t) => /* @__PURE__ */ J.createElement("svg", { id: "Regular", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("defs", null, /* @__PURE__ */ J.createElement("style", null, ".cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;fill-rule:evenodd;}")), /* @__PURE__ */ J.createElement("path", { className: "cls-1", d: "M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311" }));
function JG({
  contentEditor: t,
  contentEditorInitialState: e,
  contentPlaceholder: n = "Collapsible content",
  headingEditor: i,
  headingEditorInitialState: r,
  headingPlaceholder: s = "Toggle header",
  isEditing: o = !1
}) {
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "rounded-md border border-grey/40 px-6 py-4 dark:border-grey/30", children: [
      /* @__PURE__ */ y.jsxs("div", { className: "flex cursor-text items-start justify-between", children: [
        /* @__PURE__ */ y.jsx("div", { className: "mr-2 w-full", children: /* @__PURE__ */ y.jsx(
          Pr,
          {
            autoFocus: !0,
            focusNext: t,
            initialEditor: i,
            initialEditorState: r,
            nodes: "minimal",
            placeholderClassName: "!font-sans !text-2xl !leading-[1.1] !font-bold !tracking-tight text-black dark:text-grey-50 opacity-40",
            placeholderText: s,
            singleParagraph: !0,
            textClassName: "koenig-lexical-heading heading-xsmall whitespace-normal text-black dark:text-grey-50 opacity-100"
          }
        ) }),
        /* @__PURE__ */ y.jsx("div", { className: "z-20 !mt-[-1px] ml-auto flex size-8 shrink-0 items-center justify-center", children: /* @__PURE__ */ y.jsx(Xje, { className: "size-4 stroke-2 text-grey-400 dark:text-grey/30" }) })
      ] }),
      /* @__PURE__ */ y.jsx("div", { className: "!mt-2 w-full", children: /* @__PURE__ */ y.jsx(
        Pr,
        {
          initialEditor: t,
          initialEditorState: e,
          placeholderClassName: "font-serif text-xl font-normal !leading-[1.6em] text-grey-900 dark:text-grey-100 opacity-40",
          placeholderText: n,
          textClassName: "whitespace-normal font-serif text-xl font-normal text-grey-900 dark:text-grey-100 opacity-100"
        }
      ) })
    ] }),
    !o && /* @__PURE__ */ y.jsx(ko, {})
  ] });
}
JG.propTypes = {
  contentEditor: A.object,
  contentPlaceholder: A.string,
  headingEditor: A.object,
  headingPlaceholder: A.string,
  isEditing: A.bool,
  contentEditorInitialState: A.object,
  headingEditorInitialState: A.object
};
function Gje({ nodeKey: t, headingEditor: e, headingEditorInitialState: n, contentEditor: i, contentEditorInitialState: r }) {
  const [s] = Oe.useLexicalComposerContext(), o = j.useContext(gn), { cardConfig: a } = j.useContext(dt), { isEditing: l, isSelected: u } = o, [f, d] = j.useState(!1), h = (m) => {
    m.preventDefault(), m.stopPropagation(), s.dispatchCommand(Vs, { cardKey: t, focusEditor: !1 });
  };
  return j.useEffect(() => {
    e.setEditable(l), i.setEditable(l);
  }, [l, e, i]), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      JG,
      {
        contentEditor: i,
        contentEditorInitialState: r,
        contentPlaceholder: "Collapsible content",
        headingEditor: e,
        headingEditorInitialState: n,
        headingPlaceholder: "Toggle header",
        isEditing: l
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "toggle",
        isVisible: f,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => d(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "toggle",
        isVisible: u && !l && !f,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { icon: "edit", isActive: !1, label: "Edit", onClick: h }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !a.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !a.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => d(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const eK = N.createCommand();
class jx extends _1 {
  constructor(n = {}, i) {
    super(n, i);
    we(this, "__headingEditor");
    we(this, "__headingEditorInitialState");
    we(this, "__contentEditor");
    we(this, "__contentEditorInitialState");
    xi(this, "__headingEditor", { editor: n.headingEditor, nodes: pr }), xi(this, "__contentEditor", { editor: n.contentEditor, nodes: $f }), !n.headingEditor && n.heading && _i(this, "__headingEditor", `${n.heading}`), !n.contentEditor && n.content && _i(this, "__contentEditor", n.content);
  }
  getIcon() {
    return jS;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.headingEditor = i.__headingEditor, n.headingEditorInitialState = i.__headingEditorInitialState, n.contentEditor = i.__contentEditor, n.contentEditorInitialState = i.__contentEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__headingEditor && this.__headingEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__headingEditor, null), r = mi(i, { firstChildInnerContent: !0, allowBr: !0 });
      n.heading = r;
    }), this.__contentEditor && this.__contentEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__contentEditor, null), r = mi(i, { allowBr: !0 });
      n.content = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), children: /* @__PURE__ */ y.jsx(
      Gje,
      {
        contentEditor: this.__contentEditor,
        contentEditorInitialState: this.__contentEditorInitialState,
        headingEditor: this.__headingEditor,
        headingEditorInitialState: this.__headingEditorInitialState,
        nodeKey: this.getKey()
      }
    ) });
  }
  // override the default `isEmpty` check because we need to check the nested editors
  // rather than the data properties themselves
  isEmpty() {
    const n = this.__headingEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1)), i = this.__contentEditor.getEditorState().read(ho.$canShowPlaceholderCurry(!1));
    return n && i;
  }
}
we(jx, "kgMenu", [{
  label: "Toggle",
  desc: "Add collapsible content",
  Icon: jS,
  insertCommand: eK,
  matches: ["toggle", "collapse"],
  priority: 12,
  shortcut: "/toggle"
}]);
const Kje = (t) => new jx(t), $6 = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "5 0.5 144 144", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("title", null, "transistor"), /* @__PURE__ */ J.createElement("g", { fill: "currentColor" }, /* @__PURE__ */ J.createElement("path", { d: "M77 120.3c-2.6 0-4.8-2.1-4.8-4.8V29.4c0-2.6 2.1-4.8 4.8-4.8s4.8 2.1 4.8 4.8v86.2c0 2.6-2.2 4.7-4.8 4.7z" }), /* @__PURE__ */ J.createElement("path", { d: "M57 77.3H34c-2.6 0-4.8-2.1-4.8-4.8 0-2.6 2.1-4.8 4.8-4.8h23c2.6 0 4.8 2.1 4.8 4.8 0 2.6-2.1 4.8-4.8 4.8z" }), /* @__PURE__ */ J.createElement("path", { d: "M120.1 77.3h-23c-2.6 0-4.8-2.1-4.8-4.8 0-2.6 2.1-4.8 4.8-4.8h23c2.6 0 4.8 2.1 4.8 4.8 0 2.6-2.2 4.8-4.8 4.8z" }), /* @__PURE__ */ J.createElement("path", { d: "M77 144.5c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72zM77 10c-34.4 0-62.4 28-62.4 62.4 0 34.4 28 62.4 62.4 62.4 34.4 0 62.4-28 62.4-62.4C139.4 38 111.4 10 77 10z" })));
function tK({
  accentColor: t = "",
  backgroundColor: e = ""
  // TODO: Re-enable when design tab is implemented
  // isEditing = false,
  // visibilityOptions = {},
  // handleAccentColorChange = () => {},
  // handleBackgroundColorChange = () => {},
  // toggleVisibility = () => {},
  // showVisibilitySettings = false
}) {
  return /* @__PURE__ */ y.jsx("div", { className: "w-full rounded-lg border border-grey-300 bg-grey-100 dark:border-grey-900 dark:bg-grey-950", children: /* @__PURE__ */ y.jsx(
    nK,
    {
      accentColor: t,
      backgroundColor: e
    }
  ) });
}
function nK({ accentColor: t, backgroundColor: e }) {
  const n = {
    backgroundColor: e || "#FFFFFF",
    borderColor: t || "#000000"
  }, i = {
    color: t || "#000000"
  };
  return /* @__PURE__ */ y.jsx(
    "div",
    {
      className: "flex min-h-[180px] items-center justify-center rounded-lg p-8 transition-colors",
      "data-testid": "transistor-placeholder",
      style: n,
      children: /* @__PURE__ */ y.jsxs("div", { className: "text-center", children: [
        /* @__PURE__ */ y.jsx("div", { className: "mb-3 flex justify-center", children: /* @__PURE__ */ y.jsx($6, { className: "size-12", style: i }) }),
        /* @__PURE__ */ y.jsx("div", { className: "mb-2 text-lg font-semibold", style: { color: t || "#000000" }, children: "Transistor Private Podcast" }),
        /* @__PURE__ */ y.jsx("div", { className: "text-sm text-grey-700 dark:text-grey-400", children: "Your private RSS feeds" })
      ] })
    }
  );
}
tK.propTypes = {
  accentColor: A.string,
  backgroundColor: A.string
  // TODO: Re-enable when design tab is implemented
  // isEditing: PropTypes.bool,
  // visibilityOptions: PropTypes.array,
  // handleAccentColorChange: PropTypes.func,
  // handleBackgroundColorChange: PropTypes.func,
  // toggleVisibility: PropTypes.func,
  // showVisibilitySettings: PropTypes.bool
};
nK.propTypes = {
  accentColor: A.string,
  backgroundColor: A.string
};
const Jje = ({
  nodeKey: t,
  accentColor: e,
  backgroundColor: n
}) => {
  const [i] = Oe.useLexicalComposerContext(), { isEditing: r, isSelected: s, setEditing: o } = j.useContext(gn), { cardConfig: a, darkMode: l } = j.useContext(dt), [u, f] = j.useState(!1), { visibilityOptions: d, toggleVisibility: h } = mT(i, t, a), m = j.useMemo(() => d.map((_) => ({
    ..._,
    toggles: _.toggles.filter((S) => S.key !== "nonMembers")
  })), [d]), g = [
    { id: "visibility", label: "Visibility" }
  ], w = (_) => {
    _.preventDefault(), _.stopPropagation(), o(!0);
  }, x = /* @__PURE__ */ y.jsx(
    pT,
    {
      toggleVisibility: h,
      visibilityOptions: m
    }
  );
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      tK,
      {
        accentColor: e,
        backgroundColor: n
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "transistor",
        isVisible: u,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => f(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "transistor",
        isVisible: s && !r && !u,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "edit-transistor-card",
              icon: "edit",
              isActive: !1,
              label: "Edit",
              onClick: w
            }
          ),
          /* @__PURE__ */ y.jsx(Zn, { hide: !a.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !a.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => f(!0)
            }
          )
        ] })
      }
    ),
    r && /* @__PURE__ */ y.jsx(
      Go,
      {
        darkMode: l,
        defaultTab: "visibility",
        tabs: g,
        onMouseDown: (_) => {
          _.preventDefault(), _.stopPropagation();
        },
        children: {
          visibility: x
        }
      }
    )
  ] });
}, iK = N.createCommand();
class Fx extends I1 {
  constructor(e = {}, n) {
    super(e, n);
  }
  getIcon() {
    return $6;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), wrapperStyle: "regular", children: /* @__PURE__ */ y.jsx(
      Jje,
      {
        accentColor: this.accentColor,
        backgroundColor: this.backgroundColor,
        nodeKey: this.getKey()
      }
    ) });
  }
}
we(Fx, "kgMenu", [{
  label: "Transistor",
  desc: "Embed a Transistor podcast player",
  Icon: $6,
  insertCommand: iK,
  matches: ["transistor", "podcast"],
  priority: 8,
  shortcut: "/transistor",
  isHidden: ({ config: e }) => {
    var n;
    return ((n = e == null ? void 0 : e.feature) == null ? void 0 : n.transistor) !== !0;
  }
}]);
function eFe(t) {
  return new Fx(t);
}
function tFe(t) {
  return new Promise((e, n) => {
    const i = t.type;
    let r, s, o;
    const a = document.createElement("video");
    a.muted = !0, a.playsInline = !0, a.onerror = n, a.onloadedmetadata = function() {
      r = a.duration, s = a.videoWidth, o = a.videoHeight;
    }, a.oncanplay = function() {
      a.currentTime = 0.5, a.oncanplay = null;
    }, a.onseeked = function() {
      const l = document.createElement("canvas");
      l.width = s, l.height = o;
      const u = l.getContext("2d");
      u.drawImage(a, 0, 0, s, o), window.URL.revokeObjectURL(a.src), u.canvas.toBlob((f) => {
        e({
          duration: r,
          width: s,
          height: o,
          mimeType: i,
          thumbnailBlob: f
        });
      }, "image/jpeg", 0.75);
    }, a.src = URL.createObjectURL(t), a.load();
  });
}
function rK({
  thumbnail: t,
  customThumbnail: e,
  onCustomThumbnailChange: n,
  videoUploader: i = {},
  customThumbnailUploader: r = {},
  onRemoveCustomThumbnail: s,
  totalDuration: o,
  cardWidth: a,
  isLoopChecked: l,
  onLoopChange: u,
  onCardWidthChange: f,
  isEditing: d,
  thumbnailMimeTypes: h,
  thumbnailDragHandler: m = {}
}) {
  var x;
  const g = {
    width: `${(x = i.progress) == null ? void 0 : x.toFixed(0)}%`
  }, w = [
    {
      label: "Regular",
      name: "regular",
      Icon: J0
    },
    {
      label: "Wide",
      name: "wide",
      Icon: e1
    },
    {
      label: "Full",
      name: "full",
      Icon: K0
    }
  ];
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsxs("div", { className: "not-kg-prose relative", "data-testid": "video-card-populated", children: [
      /* @__PURE__ */ y.jsxs("div", { children: [
        /* @__PURE__ */ y.jsx("img", { alt: "Video thumbnail", className: "mx-auto", src: t }),
        e && /* @__PURE__ */ y.jsx("img", { alt: "Video custom thumbnail", className: "absolute inset-0 size-full bg-white object-cover", src: e })
      ] }),
      /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-t from-black/0 via-black/5 to-black/30", children: i.isLoading || /* @__PURE__ */ y.jsx("button", { className: "flex size-20 items-center justify-center rounded-full bg-black/50", type: "button", children: /* @__PURE__ */ y.jsx(KX, { className: "h-auto w-5 fill-white" }) }) }),
      /* @__PURE__ */ y.jsx("div", { className: `absolute bottom-0 flex h-20 w-full justify-end bg-gradient-to-b from-black/0 to-black/50 ${a === "full" ? "px-7 py-4" : "px-4"}`, children: /* @__PURE__ */ y.jsx(e8, { duration: o, theme: "light" }) }),
      /* @__PURE__ */ y.jsx(ko, {})
    ] }),
    i.isLoading && /* @__PURE__ */ y.jsx("div", { className: "absolute inset-0 flex min-w-full items-center justify-center overflow-hidden bg-white/50", "data-testid": "video-progress", children: /* @__PURE__ */ y.jsx(Xo, { bgStyle: "transparent", style: g }) }),
    !!t && !i.isLoading && d && /* @__PURE__ */ y.jsxs(Go, { children: [
      /* @__PURE__ */ y.jsx(
        Aa,
        {
          buttons: w,
          label: "Video width",
          selectedName: a,
          onClick: f
        }
      ),
      /* @__PURE__ */ y.jsx(
        ks,
        {
          dataTestId: "loop-video",
          description: "Autoplay your video on a loop without sound.",
          isChecked: l,
          label: "Loop",
          onChange: u
        }
      ),
      /* @__PURE__ */ y.jsx(
        H2,
        {
          alt: "Custom thumbnail",
          borderStyle: "rounded",
          dataTestId: "custom-thumbnail-replace",
          errors: r.errors,
          icon: "file",
          isDraggedOver: m.isDraggedOver,
          isLoading: r.isLoading,
          label: "Custom thumbnail",
          mimeTypes: h,
          placeholderRef: m.setRef,
          progress: r.progress,
          size: "xsmall",
          src: e,
          onFileChange: n,
          onRemoveMedia: s
        }
      )
    ] })
  ] });
}
function sK({ onFileChange: t, fileInputRef: e, errors: n, videoMimeTypes: i = [], videoDragHandler: r = {} }) {
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      mc,
      {
        desc: "Click to select a video",
        errors: n,
        filePicker: () => Yi({ fileInputRef: e }),
        icon: "video",
        isDraggedOver: r.isDraggedOver,
        placeholderRef: r.setRef
      }
    ),
    /* @__PURE__ */ y.jsx("form", { onChange: t, children: /* @__PURE__ */ y.jsx(
      "input",
      {
        ref: e,
        accept: i.join(","),
        hidden: !0,
        name: "image-input",
        type: "file"
      }
    ) })
  ] });
}
const oK = ({
  fileInputRef: t,
  onVideoFileChange: e,
  videoDragHandler: n,
  videoUploader: i = {},
  videoUploadErrors: r,
  videoMimeTypes: s,
  ...o
}) => o.customThumbnail || o.thumbnail || i.isLoading ? /* @__PURE__ */ y.jsx(rK, { ...o, videoUploader: i }) : /* @__PURE__ */ y.jsx(
  sK,
  {
    errors: r,
    fileInputRef: t,
    videoDragHandler: n,
    videoMimeTypes: s,
    onFileChange: e
  }
);
function aK({
  captionEditor: t,
  captionEditorInitialState: e,
  isSelected: n,
  isEditing: i,
  ...r
}) {
  return /* @__PURE__ */ y.jsxs("figure", { className: "not-kg-prose", children: [
    /* @__PURE__ */ y.jsx(oK, { ...r, isEditing: i }),
    /* @__PURE__ */ y.jsx(
      gp,
      {
        captionEditor: t,
        captionEditorInitialState: e,
        captionPlaceholder: "Type caption for video (optional)",
        dataTestId: "video-card-caption",
        isSelected: n
      }
    )
  ] });
}
aK.propTypes = {
  captionEditor: A.object,
  captionEditorInitialState: A.object,
  isSelected: A.bool,
  isEditing: A.bool
};
rK.propTypes = {
  thumbnail: A.string,
  customThumbnail: A.string,
  onCustomThumbnailChange: A.func,
  videoUploader: A.object,
  customThumbnailUploader: A.object,
  onRemoveCustomThumbnail: A.func,
  totalDuration: A.string,
  cardWidth: A.string,
  isLoopChecked: A.bool,
  onLoopChange: A.func,
  onCardWidthChange: A.func,
  isEditing: A.bool,
  thumbnailMimeTypes: A.array,
  thumbnailDragHandler: A.object
};
sK.propTypes = {
  onFileChange: A.func,
  fileInputRef: A.object,
  errors: A.array,
  videoMimeTypes: A.array,
  videoDragHandler: A.object
};
oK.propTypes = {
  fileInputRef: A.object,
  onVideoFileChange: A.func,
  videoDragHandler: A.object,
  videoUploader: A.object,
  videoUploadErrors: A.array,
  videoMimeTypes: A.array,
  customThumbnail: A.string,
  thumbnail: A.string
};
function nFe({
  nodeKey: t,
  thumbnail: e,
  customThumbnail: n,
  captionEditor: i,
  captionEditorInitialState: r,
  totalDuration: s,
  cardWidth: o,
  triggerFileDialog: a,
  isLoopChecked: l,
  initialFile: u
}) {
  var U;
  const [f] = Oe.useLexicalComposerContext(), { fileUploader: d, cardConfig: h } = j.useContext(dt), m = j.useContext(gn), g = j.useRef(), [w, x] = ft(""), _ = d.useFileUpload("video"), S = d.useFileUpload("mediaThumbnail"), C = d.useFileUpload("image"), E = Wo({ handleDrop: R }), M = Wo({ handleDrop: q }), [$, P] = ft([]), [W, z] = ft(!1), Z = ((U = d.fileTypes.video) == null ? void 0 : U.mimeTypes) || ["video/*"];
  j.useEffect(() => {
    (async (oe) => {
      oe && !_.isLoading && await L([oe]);
    })(u);
  }, []);
  const L = async (F) => {
    var At, Ut;
    const oe = F[0];
    if (!oe)
      return;
    let le, pe, Re, ze, rt;
    try {
      ({ thumbnailBlob: le, duration: pe, width: Re, height: ze, mimeType: rt } = await tFe(oe));
    } catch {
      P([{
        name: oe.name,
        message: `The file type you uploaded is not supported. Please use .${Z.join(", .").toUpperCase()}`
      }]);
    }
    x(URL.createObjectURL(le));
    const pt = await _.upload([oe]), ge = (At = pt == null ? void 0 : pt[0]) == null ? void 0 : At.url;
    if (!ge) {
      x("");
      return;
    }
    ge && f.update(() => {
      const He = N.$getNodeByKey(t);
      He.src = ge, He.duration = pe, He.fileName = oe.name, He.width = Re, He.height = ze, He.mimeType = rt, He.customThumbnailSrc || (He.thumbnailWidth = Re, He.thumbnailHeight = ze);
    });
    const De = new File([le], `${oe.name}.jpg`, { type: "image/jpeg" }), st = await S.upload([De], { formData: { url: ge } }), It = (Ut = st == null ? void 0 : st[0]) == null ? void 0 : Ut.url;
    It && f.update(() => {
      const He = N.$getNodeByKey(t);
      He.thumbnailSrc = It;
    }), x("");
  }, Q = async (F) => {
    F.target.files[0] && await L(F.target.files);
  }, V = async (F) => {
    var ze;
    const oe = await C.upload(F), le = (ze = oe == null ? void 0 : oe[0]) == null ? void 0 : ze.url, { width: pe, height: Re } = await Wf(le);
    le && f.update(() => {
      const rt = N.$getNodeByKey(t);
      rt.customThumbnailSrc = le, rt.thumbnailWidth = pe, rt.thumbnailHeight = Re;
    });
  }, H = async (F) => {
    await V(F.target.files);
  };
  async function R(F) {
    await L(F);
  }
  async function q(F) {
    await V(F);
  }
  const Y = () => {
    f.update(() => {
      const F = N.$getNodeByKey(t);
      F.customThumbnailSrc = "", F.thumbnailHeight = F.height, F.thumbnailWidth = F.width;
    });
  }, K = (F) => {
    f.update(() => {
      const oe = N.$getNodeByKey(t);
      oe.loop = F.target.checked;
    });
  }, te = (F) => {
    f.update(() => {
      const oe = N.$getNodeByKey(t);
      oe.cardWidth = F, m.setCardWidth(F);
    });
  }, se = (F) => {
    F.preventDefault(), F.stopPropagation(), m.setEditing(!0);
  };
  j.useEffect(() => {
    if (!a)
      return;
    const F = setTimeout(() => {
      Yi({ fileInputRef: g }), f.update(() => {
        const oe = N.$getNodeByKey(t);
        oe.triggerFileDialog = !1;
      });
    });
    return () => {
      clearTimeout(F);
    };
  });
  const ce = n || e;
  return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
    /* @__PURE__ */ y.jsx(
      aK,
      {
        captionEditor: i,
        captionEditorInitialState: r,
        cardWidth: o,
        customThumbnail: n,
        customThumbnailUploader: C,
        fileInputRef: g,
        isEditing: m.isEditing,
        isLoopChecked: l,
        isSelected: m.isSelected,
        thumbnail: w || e,
        thumbnailDragHandler: M,
        thumbnailMimeTypes: d.fileTypes.image.mimeTypes,
        totalDuration: s,
        videoDragHandler: E,
        videoMimeTypes: Z,
        videoUploader: _,
        videoUploadErrors: [...S.errors, ...$, ..._.errors],
        onCardWidthChange: te,
        onCustomThumbnailChange: H,
        onLoopChange: K,
        onRemoveCustomThumbnail: Y,
        onVideoFileChange: Q
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "video",
        isVisible: W,
        children: /* @__PURE__ */ y.jsx(ai, { onClose: () => z(!1) })
      }
    ),
    /* @__PURE__ */ y.jsx(
      St,
      {
        "data-kg-card-toolbar": "video",
        isVisible: ce && m.isSelected && !m.isEditing && !W,
        children: /* @__PURE__ */ y.jsxs(li, { children: [
          /* @__PURE__ */ y.jsx(at, { dataTestId: "edit-video-card", icon: "edit", isActive: !1, label: "Edit", onClick: se }),
          /* @__PURE__ */ y.jsx(Zn, { hide: !h.createSnippet }),
          /* @__PURE__ */ y.jsx(
            at,
            {
              dataTestId: "create-snippet",
              hide: !h.createSnippet,
              icon: "snippet",
              isActive: !1,
              label: "Save as snippet",
              onClick: () => z(!0)
            }
          )
        ] })
      }
    )
  ] });
}
const M6 = N.createCommand();
class j0 extends g1 {
  constructor(n = {}, i) {
    super(n, i);
    // transient properties used to control node behaviour
    we(this, "__triggerFileDialog", !1);
    we(this, "__initialFile", null);
    we(this, "__captionEditor");
    we(this, "__captionEditorInitialState");
    const { triggerFileDialog: r, initialFile: s } = n;
    this.__triggerFileDialog = !n.src && r, this.__initialFile = s || null, xi(this, "__captionEditor", { editor: n.captionEditor, nodes: pr }), !n.captionEditor && n.caption && _i(this, "__captionEditor", `${n.caption}`);
  }
  getIcon() {
    return FS;
  }
  set triggerFileDialog(n) {
    const i = this.getWritable();
    i.__triggerFileDialog = n;
  }
  getDataset() {
    const n = super.getDataset(), i = this.getLatest();
    return n.captionEditor = i.__captionEditor, n.captionEditorInitialState = i.__captionEditorInitialState, n;
  }
  exportJSON() {
    const n = super.exportJSON();
    return this.__captionEditor && this.__captionEditor.getEditorState().read(() => {
      const i = Rn.$generateHtmlFromNodes(this.__captionEditor, null), r = mi(i);
      n.caption = r;
    }), n;
  }
  decorate() {
    return /* @__PURE__ */ y.jsx(qn, { nodeKey: this.getKey(), width: this.cardWidth, children: /* @__PURE__ */ y.jsx(
      nFe,
      {
        captionEditor: this.__captionEditor,
        captionEditorInitialState: this.__captionEditorInitialState,
        cardWidth: this.cardWidth,
        customThumbnail: this.customThumbnailSrc,
        initialFile: this.__initialFile,
        isLoopChecked: this.loop,
        nodeKey: this.getKey(),
        thumbnail: this.thumbnailSrc,
        totalDuration: this.formattedDuration,
        triggerFileDialog: this.__triggerFileDialog
      }
    ) });
  }
}
we(j0, "kgMenu", [{
  label: "Video",
  desc: "Upload and play a video file",
  Icon: FS,
  insertCommand: M6,
  insertParams: {
    triggerFileDialog: !0
  },
  matches: ["video"],
  priority: 13,
  shortcut: "/video"
}]), we(j0, "uploadType", "video");
const iFe = (t) => new j0(t), rFe = [
  Fo,
  c2,
  rn.HeadingNode,
  uc,
  f2,
  rn.QuoteNode,
  If,
  aE,
  ni.ListNode,
  ni.ListItemNode,
  cE,
  ki.LinkNode,
  A2,
  _p,
  ec,
  Ix,
  I0,
  j0,
  dx,
  Z1,
  L0,
  ux,
  fx,
  jx,
  mx,
  L2,
  a8,
  Lx,
  px,
  hx,
  R2,
  Y2,
  Rx,
  Fx,
  uo,
  Ma,
  cc,
  Lf
];
var lK = {}, Ua = {};
const qi = () => /* @__PURE__ */ new Map(), N6 = (t) => {
  const e = qi();
  return t.forEach((n, i) => {
    e.set(i, n);
  }), e;
}, Vr = (t, e, n) => {
  let i = t.get(e);
  return i === void 0 && t.set(e, i = n()), i;
}, sFe = (t, e) => {
  const n = [];
  for (const [i, r] of t)
    n.push(e(r, i));
  return n;
}, oFe = (t, e) => {
  for (const [n, i] of t)
    if (e(i, n))
      return !0;
  return !1;
}, nc = () => /* @__PURE__ */ new Set(), lS = (t) => t[t.length - 1], aFe = (t, e) => {
  for (let n = 0; n < e.length; n++)
    t.push(e[n]);
}, Al = Array.from, lFe = (t, e) => {
  for (let n = 0; n < t.length; n++)
    if (e(t[n], n, t))
      return !0;
  return !1;
}, uFe = (t, e) => {
  const n = new Array(t);
  for (let i = 0; i < t; i++)
    n[i] = e(i, n);
  return n;
}, A6 = Array.isArray;
class Bx {
  constructor() {
    this._observers = qi();
  }
  /**
   * @template {keyof EVENTS & string} NAME
   * @param {NAME} name
   * @param {EVENTS[NAME]} f
   */
  on(e, n) {
    return Vr(
      this._observers,
      /** @type {string} */
      e,
      nc
    ).add(n), n;
  }
  /**
   * @template {keyof EVENTS & string} NAME
   * @param {NAME} name
   * @param {EVENTS[NAME]} f
   */
  once(e, n) {
    const i = (...r) => {
      this.off(
        e,
        /** @type {any} */
        i
      ), n(...r);
    };
    this.on(
      e,
      /** @type {any} */
      i
    );
  }
  /**
   * @template {keyof EVENTS & string} NAME
   * @param {NAME} name
   * @param {EVENTS[NAME]} f
   */
  off(e, n) {
    const i = this._observers.get(e);
    i !== void 0 && (i.delete(n), i.size === 0 && this._observers.delete(e));
  }
  /**
   * Emit a named event. All registered event listeners that listen to the
   * specified name will receive the event.
   *
   * @todo This should catch exceptions
   *
   * @template {keyof EVENTS & string} NAME
   * @param {NAME} name The event name.
   * @param {Parameters<EVENTS[NAME]>} args The arguments that are applied to the event listener.
   */
  emit(e, n) {
    return Al((this._observers.get(e) || qi()).values()).forEach((i) => i(...n));
  }
  destroy() {
    this._observers = qi();
  }
}
class cFe {
  constructor() {
    this._observers = qi();
  }
  /**
   * @param {N} name
   * @param {function} f
   */
  on(e, n) {
    Vr(this._observers, e, nc).add(n);
  }
  /**
   * @param {N} name
   * @param {function} f
   */
  once(e, n) {
    const i = (...r) => {
      this.off(e, i), n(...r);
    };
    this.on(e, i);
  }
  /**
   * @param {N} name
   * @param {function} f
   */
  off(e, n) {
    const i = this._observers.get(e);
    i !== void 0 && (i.delete(n), i.size === 0 && this._observers.delete(e));
  }
  /**
   * Emit a named event. All registered event listeners that listen to the
   * specified name will receive the event.
   *
   * @todo This should catch exceptions
   *
   * @param {N} name The event name.
   * @param {Array<any>} args The arguments that are applied to the event listener.
   */
  emit(e, n) {
    return Al((this._observers.get(e) || qi()).values()).forEach((i) => i(...n));
  }
  destroy() {
    this._observers = qi();
  }
}
class fFe extends Bx {
  /**
   * @param {Doc} ydoc
   * @param {any} awareness
   */
  constructor(e, n) {
    super(), this.doc = e, this.awareness = n;
  }
}
const Dl = Math.floor, Ry = Math.abs, l8 = (t, e) => t < e ? t : e, Hf = (t, e) => t > e ? t : e, dFe = Math.pow, uK = (t) => t !== 0 ? t < 0 : 1 / t < 0, wR = 1, kR = 2, uS = 4, cS = 8, F0 = 32, bl = 64, Us = 128, zx = 31, D6 = 63, uf = 127, hFe = 2147483647, cK = Number.MAX_SAFE_INTEGER, pFe = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && Dl(t) === t), mFe = String.fromCharCode, gFe = (t) => t.toLowerCase(), vFe = /^\s*/g, bFe = (t) => t.replace(vFe, ""), yFe = /([A-Z])/g, xR = (t, e) => bFe(t.replace(yFe, (n) => `${e}${gFe(n)}`)), wFe = (t) => {
  const e = unescape(encodeURIComponent(t)), n = e.length, i = new Uint8Array(n);
  for (let r = 0; r < n; r++)
    i[r] = /** @type {number} */
    e.codePointAt(r);
  return i;
}, B0 = (
  /** @type {TextEncoder} */
  typeof TextEncoder < "u" ? new TextEncoder() : null
), kFe = (t) => B0.encode(t), xFe = B0 ? kFe : wFe;
let zg = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
zg && zg.decode(new Uint8Array()).length === 1 && (zg = null);
const _Fe = (t, e) => uFe(e, () => t).join("");
class G1 {
  constructor() {
    this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = [];
  }
}
const Wi = () => new G1(), u8 = (t) => {
  let e = t.cpos;
  for (let n = 0; n < t.bufs.length; n++)
    e += t.bufs[n].length;
  return e;
}, Sn = (t) => {
  const e = new Uint8Array(u8(t));
  let n = 0;
  for (let i = 0; i < t.bufs.length; i++) {
    const r = t.bufs[i];
    e.set(r, n), n += r.length;
  }
  return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), n), e;
}, OFe = (t, e) => {
  const n = t.cbuf.length;
  n - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(Hf(n, e) * 2), t.cpos = 0);
}, zi = (t, e) => {
  const n = t.cbuf.length;
  t.cpos === n && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(n * 2), t.cpos = 0), t.cbuf[t.cpos++] = e;
}, z0 = zi, We = (t, e) => {
  for (; e > uf; )
    zi(t, Us | uf & e), e = Dl(e / 128);
  zi(t, uf & e);
}, Wx = (t, e) => {
  const n = uK(e);
  for (n && (e = -e), zi(t, (e > D6 ? Us : 0) | (n ? bl : 0) | D6 & e), e = Dl(e / 64); e > 0; )
    zi(t, (e > uf ? Us : 0) | uf & e), e = Dl(e / 128);
}, P6 = new Uint8Array(3e4), SFe = P6.length / 3, CFe = (t, e) => {
  if (e.length < SFe) {
    const n = B0.encodeInto(e, P6).written || 0;
    We(t, n);
    for (let i = 0; i < n; i++)
      zi(t, P6[i]);
  } else
    di(t, xFe(e));
}, EFe = (t, e) => {
  const n = unescape(encodeURIComponent(e)), i = n.length;
  We(t, i);
  for (let r = 0; r < i; r++)
    zi(
      t,
      /** @type {number} */
      n.codePointAt(r)
    );
}, Bu = B0 && /** @type {any} */
B0.encodeInto ? CFe : EFe, TFe = (t, e) => K1(t, Sn(e)), K1 = (t, e) => {
  const n = t.cbuf.length, i = t.cpos, r = l8(n - i, e.length), s = e.length - r;
  t.cbuf.set(e.subarray(0, r), i), t.cpos += r, s > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(Hf(n * 2, s)), t.cbuf.set(e.subarray(r)), t.cpos = s);
}, di = (t, e) => {
  We(t, e.byteLength), K1(t, e);
}, c8 = (t, e) => {
  OFe(t, e);
  const n = new DataView(t.cbuf.buffer, t.cpos, e);
  return t.cpos += e, n;
}, $Fe = (t, e) => c8(t, 4).setFloat32(0, e, !1), MFe = (t, e) => c8(t, 8).setFloat64(0, e, !1), NFe = (t, e) => (
  /** @type {any} */
  c8(t, 8).setBigInt64(0, e, !1)
), _R = new DataView(new ArrayBuffer(4)), AFe = (t) => (_R.setFloat32(0, t), _R.getFloat32(0) === t), W0 = (t, e) => {
  switch (typeof e) {
    case "string":
      zi(t, 119), Bu(t, e);
      break;
    case "number":
      pFe(e) && Ry(e) <= hFe ? (zi(t, 125), Wx(t, e)) : AFe(e) ? (zi(t, 124), $Fe(t, e)) : (zi(t, 123), MFe(t, e));
      break;
    case "bigint":
      zi(t, 122), NFe(t, e);
      break;
    case "object":
      if (e === null)
        zi(t, 126);
      else if (A6(e)) {
        zi(t, 117), We(t, e.length);
        for (let n = 0; n < e.length; n++)
          W0(t, e[n]);
      } else if (e instanceof Uint8Array)
        zi(t, 116), di(t, e);
      else {
        zi(t, 118);
        const n = Object.keys(e);
        We(t, n.length);
        for (let i = 0; i < n.length; i++) {
          const r = n[i];
          Bu(t, r), W0(t, e[r]);
        }
      }
      break;
    case "boolean":
      zi(t, e ? 120 : 121);
      break;
    default:
      zi(t, 127);
  }
};
class OR extends G1 {
  /**
   * @param {function(Encoder, T):void} writer
   */
  constructor(e) {
    super(), this.w = e, this.s = null, this.count = 0;
  }
  /**
   * @param {T} v
   */
  write(e) {
    this.s === e ? this.count++ : (this.count > 0 && We(this, this.count - 1), this.count = 1, this.w(this, e), this.s = e);
  }
}
const SR = (t) => {
  t.count > 0 && (Wx(t.encoder, t.count === 1 ? t.s : -t.s), t.count > 1 && We(t.encoder, t.count - 2));
};
class jy {
  constructor() {
    this.encoder = new G1(), this.s = 0, this.count = 0;
  }
  /**
   * @param {number} v
   */
  write(e) {
    this.s === e ? this.count++ : (SR(this), this.count = 1, this.s = e);
  }
  /**
   * Flush the encoded state and transform this to a Uint8Array.
   *
   * Note that this should only be called once.
   */
  toUint8Array() {
    return SR(this), Sn(this.encoder);
  }
}
const CR = (t) => {
  if (t.count > 0) {
    const e = t.diff * 2 + (t.count === 1 ? 0 : 1);
    Wx(t.encoder, e), t.count > 1 && We(t.encoder, t.count - 2);
  }
};
class fS {
  constructor() {
    this.encoder = new G1(), this.s = 0, this.count = 0, this.diff = 0;
  }
  /**
   * @param {number} v
   */
  write(e) {
    this.diff === e - this.s ? (this.s = e, this.count++) : (CR(this), this.count = 1, this.diff = e - this.s, this.s = e);
  }
  /**
   * Flush the encoded state and transform this to a Uint8Array.
   *
   * Note that this should only be called once.
   */
  toUint8Array() {
    return CR(this), Sn(this.encoder);
  }
}
class DFe {
  constructor() {
    this.sarr = [], this.s = "", this.lensE = new jy();
  }
  /**
   * @param {string} string
   */
  write(e) {
    this.s += e, this.s.length > 19 && (this.sarr.push(this.s), this.s = ""), this.lensE.write(e.length);
  }
  toUint8Array() {
    const e = new G1();
    return this.sarr.push(this.s), this.s = "", Bu(e, this.sarr.join("")), K1(e, this.lensE.toUint8Array()), Sn(e);
  }
}
const ic = (t) => new Error(t), Ta = () => {
  throw ic("Method unimplemented");
}, _s = () => {
  throw ic("Unexpected case");
}, fK = ic("Unexpected end of array"), dK = ic("Integer out of Range");
class Hx {
  /**
   * @param {Uint8Array} uint8Array Binary data to decode
   */
  constructor(e) {
    this.arr = e, this.pos = 0;
  }
}
const Vi = (t) => new Hx(t), hK = (t) => t.pos !== t.arr.length, PFe = (t, e) => {
  const n = new Uint8Array(t.arr.buffer, t.pos + t.arr.byteOffset, e);
  return t.pos += e, n;
}, _r = (t) => PFe(t, bt(t)), Wh = (t) => t.arr[t.pos++], bt = (t) => {
  let e = 0, n = 1;
  const i = t.arr.length;
  for (; t.pos < i; ) {
    const r = t.arr[t.pos++];
    if (e = e + (r & uf) * n, n *= 128, r < Us)
      return e;
    if (e > cK)
      throw dK;
  }
  throw fK;
}, Qx = (t) => {
  let e = t.arr[t.pos++], n = e & D6, i = 64;
  const r = (e & bl) > 0 ? -1 : 1;
  if (!(e & Us))
    return r * n;
  const s = t.arr.length;
  for (; t.pos < s; ) {
    if (e = t.arr[t.pos++], n = n + (e & uf) * i, i *= 128, e < Us)
      return r * n;
    if (n > cK)
      throw dK;
  }
  throw fK;
}, IFe = (t) => {
  let e = bt(t);
  if (e === 0)
    return "";
  {
    let n = String.fromCodePoint(Wh(t));
    if (--e < 100)
      for (; e--; )
        n += String.fromCodePoint(Wh(t));
    else
      for (; e > 0; ) {
        const i = e < 1e4 ? e : 1e4, r = t.arr.subarray(t.pos, t.pos + i);
        t.pos += i, n += String.fromCodePoint.apply(
          null,
          /** @type {any} */
          r
        ), e -= i;
      }
    return decodeURIComponent(escape(n));
  }
}, LFe = (t) => (
  /** @type any */
  zg.decode(_r(t))
), yl = zg ? LFe : IFe, f8 = (t, e) => {
  const n = new DataView(t.arr.buffer, t.arr.byteOffset + t.pos, e);
  return t.pos += e, n;
}, RFe = (t) => f8(t, 4).getFloat32(0, !1), jFe = (t) => f8(t, 8).getFloat64(0, !1), FFe = (t) => (
  /** @type {any} */
  f8(t, 8).getBigInt64(0, !1)
), BFe = [
  (t) => {
  },
  // CASE 127: undefined
  (t) => null,
  // CASE 126: null
  Qx,
  // CASE 125: integer
  RFe,
  // CASE 124: float32
  jFe,
  // CASE 123: float64
  FFe,
  // CASE 122: bigint
  (t) => !1,
  // CASE 121: boolean (false)
  (t) => !0,
  // CASE 120: boolean (true)
  yl,
  // CASE 119: string
  (t) => {
    const e = bt(t), n = {};
    for (let i = 0; i < e; i++) {
      const r = yl(t);
      n[r] = H0(t);
    }
    return n;
  },
  (t) => {
    const e = bt(t), n = [];
    for (let i = 0; i < e; i++)
      n.push(H0(t));
    return n;
  },
  _r
  // CASE 116: Uint8Array
], H0 = (t) => BFe[127 - Wh(t)](t);
class ER extends Hx {
  /**
   * @param {Uint8Array} uint8Array
   * @param {function(Decoder):T} reader
   */
  constructor(e, n) {
    super(e), this.reader = n, this.s = null, this.count = 0;
  }
  read() {
    return this.count === 0 && (this.s = this.reader(this), hK(this) ? this.count = bt(this) + 1 : this.count = -1), this.count--, /** @type {T} */
    this.s;
  }
}
class Fy extends Hx {
  /**
   * @param {Uint8Array} uint8Array
   */
  constructor(e) {
    super(e), this.s = 0, this.count = 0;
  }
  read() {
    if (this.count === 0) {
      this.s = Qx(this);
      const e = uK(this.s);
      this.count = 1, e && (this.s = -this.s, this.count = bt(this) + 2);
    }
    return this.count--, /** @type {number} */
    this.s;
  }
}
class dS extends Hx {
  /**
   * @param {Uint8Array} uint8Array
   */
  constructor(e) {
    super(e), this.s = 0, this.count = 0, this.diff = 0;
  }
  /**
   * @return {number}
   */
  read() {
    if (this.count === 0) {
      const e = Qx(this), n = e & 1;
      this.diff = Dl(e / 2), this.count = 1, n && (this.count = bt(this) + 2);
    }
    return this.s += this.diff, this.count--, this.s;
  }
}
class zFe {
  /**
   * @param {Uint8Array} uint8Array
   */
  constructor(e) {
    this.decoder = new Fy(e), this.str = yl(this.decoder), this.spos = 0;
  }
  /**
   * @return {string}
   */
  read() {
    const e = this.spos + this.decoder.read(), n = this.str.slice(this.spos, e);
    return this.spos = e, n;
  }
}
class d8 {
  /**
   * @param {number} clock
   * @param {number} len
   */
  constructor(e, n) {
    this.clock = e, this.len = n;
  }
}
class Ep {
  constructor() {
    this.clients = /* @__PURE__ */ new Map();
  }
}
const Of = (t, e, n) => e.clients.forEach((i, r) => {
  const s = (
    /** @type {Array<GC|Item>} */
    t.doc.store.clients.get(r)
  );
  if (s != null) {
    const o = s[s.length - 1], a = o.id.clock + o.length;
    for (let l = 0, u = i[l]; l < i.length && u.clock < a; u = i[++l])
      jK(t, s, u.clock, u.len, n);
  }
}), WFe = (t, e) => {
  let n = 0, i = t.length - 1;
  for (; n <= i; ) {
    const r = Dl((n + i) / 2), s = t[r], o = s.clock;
    if (o <= e) {
      if (e < o + s.len)
        return r;
      n = r + 1;
    } else
      i = r - 1;
  }
  return null;
}, Qf = (t, e) => {
  const n = t.clients.get(e.client);
  return n !== void 0 && WFe(n, e.clock) !== null;
}, h8 = (t) => {
  t.clients.forEach((e) => {
    e.sort((r, s) => r.clock - s.clock);
    let n, i;
    for (n = 1, i = 1; n < e.length; n++) {
      const r = e[i - 1], s = e[n];
      r.clock + r.len >= s.clock ? r.len = Hf(r.len, s.clock + s.len - r.clock) : (i < n && (e[i] = s), i++);
    }
    e.length = i;
  });
}, Sf = (t) => {
  const e = new Ep();
  for (let n = 0; n < t.length; n++)
    t[n].clients.forEach((i, r) => {
      if (!e.clients.has(r)) {
        const s = i.slice();
        for (let o = n + 1; o < t.length; o++)
          aFe(s, t[o].clients.get(r) || []);
        e.clients.set(r, s);
      }
    });
  return h8(e), e;
}, Q0 = (t, e, n, i) => {
  Vr(t.clients, e, () => (
    /** @type {Array<DeleteItem>} */
    []
  )).push(new d8(n, i));
}, Ux = () => new Ep(), p8 = (t) => {
  const e = Ux();
  return t.clients.forEach((n, i) => {
    const r = [];
    for (let s = 0; s < n.length; s++) {
      const o = n[s];
      if (o.deleted) {
        const a = o.id.clock;
        let l = o.length;
        if (s + 1 < n.length)
          for (let u = n[s + 1]; s + 1 < n.length && u.deleted; u = n[++s + 1])
            l += u.length;
        r.push(new d8(a, l));
      }
    }
    r.length > 0 && e.clients.set(i, r);
  }), e;
}, Da = (t, e) => {
  We(t.restEncoder, e.clients.size), Al(e.clients.entries()).sort((n, i) => i[0] - n[0]).forEach(([n, i]) => {
    t.resetDsCurVal(), We(t.restEncoder, n);
    const r = i.length;
    We(t.restEncoder, r);
    for (let s = 0; s < r; s++) {
      const o = i[s];
      t.writeDsClock(o.clock), t.writeDsLen(o.len);
    }
  });
}, Pl = (t) => {
  const e = new Ep(), n = bt(t.restDecoder);
  for (let i = 0; i < n; i++) {
    t.resetDsCurVal();
    const r = bt(t.restDecoder), s = bt(t.restDecoder);
    if (s > 0) {
      const o = Vr(e.clients, r, () => (
        /** @type {Array<DeleteItem>} */
        []
      ));
      for (let a = 0; a < s; a++)
        o.push(new d8(t.readDsClock(), t.readDsLen()));
    }
  }
  return e;
}, TR = (t, e, n) => {
  const i = new Ep(), r = bt(t.restDecoder);
  for (let s = 0; s < r; s++) {
    t.resetDsCurVal();
    const o = bt(t.restDecoder), a = bt(t.restDecoder), l = n.clients.get(o) || [], u = Un(n, o);
    for (let f = 0; f < a; f++) {
      const d = t.readDsClock(), h = d + t.readDsLen();
      if (d < u) {
        u < h && Q0(i, o, u, h - u);
        let m = bo(l, d), g = l[m];
        for (!g.deleted && g.id.clock < d && (l.splice(m + 1, 0, kk(e, g, d - g.id.clock)), m++); m < l.length && (g = l[m++], g.id.clock < h); )
          g.deleted || (h < g.id.clock + g.length && l.splice(m, 0, kk(e, g, h - g.id.clock)), g.delete(e));
      } else
        Q0(i, o, d, h - d);
    }
  }
  if (i.clients.size > 0) {
    const s = new Ho();
    return We(s.restEncoder, 0), Da(s, i), s.toUint8Array();
  }
  return null;
}, pK = (t, e) => {
  if (t.clients.size !== e.clients.size) return !1;
  for (const [n, i] of t.clients.entries()) {
    const r = (
      /** @type {Array<import('../internals.js').DeleteItem>} */
      e.clients.get(n)
    );
    if (r === void 0 || i.length !== r.length) return !1;
    for (let s = 0; s < i.length; s++) {
      const o = i[s], a = r[s];
      if (o.clock !== a.clock || o.len !== a.len)
        return !1;
    }
  }
  return !0;
}, HFe = crypto.getRandomValues.bind(crypto), mK = () => HFe(new Uint32Array(1))[0], QFe = "10000000-1000-4000-8000" + -1e11, UFe = () => QFe.replace(
  /[018]/g,
  /** @param {number} c */
  (t) => (t ^ mK() & 15 >> t / 4).toString(16)
), rc = Date.now, $R = (t) => (
  /** @type {Promise<T>} */
  new Promise(t)
);
Promise.all.bind(Promise);
const gK = mK;
class Bl extends Bx {
  /**
   * @param {DocOpts} opts configuration
   */
  constructor({ guid: e = UFe(), collectionid: n = null, gc: i = !0, gcFilter: r = () => !0, meta: s = null, autoLoad: o = !1, shouldLoad: a = !0 } = {}) {
    super(), this.gc = i, this.gcFilter = r, this.clientID = gK(), this.guid = e, this.collectionid = n, this.share = /* @__PURE__ */ new Map(), this.store = new LK(), this._transaction = null, this._transactionCleanups = [], this.subdocs = /* @__PURE__ */ new Set(), this._item = null, this.shouldLoad = a, this.autoLoad = o, this.meta = s, this.isLoaded = !1, this.isSynced = !1, this.isDestroyed = !1, this.whenLoaded = $R((u) => {
      this.on("load", () => {
        this.isLoaded = !0, u(this);
      });
    });
    const l = () => $R((u) => {
      const f = (d) => {
        (d === void 0 || d === !0) && (this.off("sync", f), u());
      };
      this.on("sync", f);
    });
    this.on("sync", (u) => {
      u === !1 && this.isSynced && (this.whenSynced = l()), this.isSynced = u === void 0 || u === !0, this.isSynced && !this.isLoaded && this.emit("load", [this]);
    }), this.whenSynced = l();
  }
  /**
   * Notify the parent document that you request to load data into this subdocument (if it is a subdocument).
   *
   * `load()` might be used in the future to request any provider to load the most current data.
   *
   * It is safe to call `load()` multiple times.
   */
  load() {
    const e = this._item;
    e !== null && !this.shouldLoad && nn(
      /** @type {any} */
      e.parent.doc,
      (n) => {
        n.subdocsLoaded.add(this);
      },
      null,
      !0
    ), this.shouldLoad = !0;
  }
  getSubdocs() {
    return this.subdocs;
  }
  getSubdocGuids() {
    return new Set(Al(this.subdocs).map((e) => e.guid));
  }
  /**
   * Changes that happen inside of a transaction are bundled. This means that
   * the observer fires _after_ the transaction is finished and that all changes
   * that happened inside of the transaction are sent as one message to the
   * other peers.
   *
   * @template T
   * @param {function(Transaction):T} f The function that should be executed as a transaction
   * @param {any} [origin] Origin of who started the transaction. Will be stored on transaction.origin
   * @return T
   *
   * @public
   */
  transact(e, n = null) {
    return nn(this, e, n);
  }
  /**
   * Define a shared data type.
   *
   * Multiple calls of `ydoc.get(name, TypeConstructor)` yield the same result
   * and do not overwrite each other. I.e.
   * `ydoc.get(name, Y.Array) === ydoc.get(name, Y.Array)`
   *
   * After this method is called, the type is also available on `ydoc.share.get(name)`.
   *
   * *Best Practices:*
   * Define all types right after the Y.Doc instance is created and store them in a separate object.
   * Also use the typed methods `getText(name)`, `getArray(name)`, ..
   *
   * @template {typeof AbstractType<any>} Type
   * @example
   *   const ydoc = new Y.Doc(..)
   *   const appState = {
   *     document: ydoc.getText('document')
   *     comments: ydoc.getArray('comments')
   *   }
   *
   * @param {string} name
   * @param {Type} TypeConstructor The constructor of the type definition. E.g. Y.Text, Y.Array, Y.Map, ...
   * @return {InstanceType<Type>} The created type. Constructed with TypeConstructor
   *
   * @public
   */
  get(e, n = (
    /** @type {any} */
    ji
  )) {
    const i = Vr(this.share, e, () => {
      const s = new n();
      return s._integrate(this, null), s;
    }), r = i.constructor;
    if (n !== ji && r !== n)
      if (r === ji) {
        const s = new n();
        s._map = i._map, i._map.forEach(
          /** @param {Item?} n */
          (o) => {
            for (; o !== null; o = o.left)
              o.parent = s;
          }
        ), s._start = i._start;
        for (let o = s._start; o !== null; o = o.right)
          o.parent = s;
        return s._length = i._length, this.share.set(e, s), s._integrate(this, null), /** @type {InstanceType<Type>} */
        s;
      } else
        throw new Error(`Type with the name ${e} has already been defined with a different constructor`);
    return (
      /** @type {InstanceType<Type>} */
      i
    );
  }
  /**
   * @template T
   * @param {string} [name]
   * @return {YArray<T>}
   *
   * @public
   */
  getArray(e = "") {
    return (
      /** @type {YArray<T>} */
      this.get(e, wl)
    );
  }
  /**
   * @param {string} [name]
   * @return {YText}
   *
   * @public
   */
  getText(e = "") {
    return this.get(e, Cf);
  }
  /**
   * @template T
   * @param {string} [name]
   * @return {YMap<T>}
   *
   * @public
   */
  getMap(e = "") {
    return (
      /** @type {YMap<T>} */
      this.get(e, oc)
    );
  }
  /**
   * @param {string} [name]
   * @return {YXmlElement}
   *
   * @public
   */
  getXmlElement(e = "") {
    return (
      /** @type {YXmlElement<{[key:string]:string}>} */
      this.get(e, lc)
    );
  }
  /**
   * @param {string} [name]
   * @return {YXmlFragment}
   *
   * @public
   */
  getXmlFragment(e = "") {
    return this.get(e, ac);
  }
  /**
   * Converts the entire document into a js object, recursively traversing each yjs type
   * Doesn't log types that have not been defined (using ydoc.getType(..)).
   *
   * @deprecated Do not use this method and rather call toJSON directly on the shared types.
   *
   * @return {Object<string, any>}
   */
  toJSON() {
    const e = {};
    return this.share.forEach((n, i) => {
      e[i] = n.toJSON();
    }), e;
  }
  /**
   * Emit `destroy` event and unregister all event handlers.
   */
  destroy() {
    this.isDestroyed = !0, Al(this.subdocs).forEach((n) => n.destroy());
    const e = this._item;
    if (e !== null) {
      this._item = null;
      const n = (
        /** @type {ContentDoc} */
        e.content
      );
      n.doc = new Bl({ guid: this.guid, ...n.opts, shouldLoad: !1 }), n.doc._item = e, nn(
        /** @type {any} */
        e.parent.doc,
        (i) => {
          const r = n.doc;
          e.deleted || i.subdocsAdded.add(r), i.subdocsRemoved.add(this);
        },
        null,
        !0
      );
    }
    this.emit("destroyed", [!0]), this.emit("destroy", [this]), super.destroy();
  }
}
const MR = (t) => t === void 0 ? null : t;
class ZFe {
  constructor() {
    this.map = /* @__PURE__ */ new Map();
  }
  /**
   * @param {string} key
   * @param {any} newValue
   */
  setItem(e, n) {
    this.map.set(e, n);
  }
  /**
   * @param {string} key
   */
  getItem(e) {
    return this.map.get(e);
  }
}
let vK = new ZFe(), m8 = !0;
try {
  typeof localStorage < "u" && localStorage && (vK = localStorage, m8 = !1);
} catch {
}
const bK = vK, qFe = (t) => m8 || addEventListener(
  "storage",
  /** @type {any} */
  t
), YFe = (t) => m8 || removeEventListener(
  "storage",
  /** @type {any} */
  t
), VFe = Object.assign, yK = Object.keys, XFe = (t, e) => {
  for (const n in t)
    e(t[n], n);
}, GFe = (t, e) => {
  const n = [];
  for (const i in t)
    n.push(e(t[i], i));
  return n;
}, NR = (t) => yK(t).length, AR = (t) => yK(t).length, KFe = (t) => {
  for (const e in t)
    return !1;
  return !0;
}, JFe = (t, e) => {
  for (const n in t)
    if (!e(t[n], n))
      return !1;
  return !0;
}, wK = (t, e) => Object.prototype.hasOwnProperty.call(t, e), eBe = (t, e) => t === e || AR(t) === AR(e) && JFe(t, (n, i) => (n !== void 0 || wK(e, i)) && e[i] === n), tBe = Object.freeze, kK = (t) => {
  for (const e in t) {
    const n = t[e];
    (typeof n == "object" || typeof n == "function") && kK(t[e]);
  }
  return tBe(t);
}, DR = Symbol("Equality"), g8 = (t, e, n = 0) => {
  try {
    for (; n < t.length; n++)
      t[n](...e);
  } finally {
    n < t.length && g8(t, e, n + 1);
  }
}, xK = (t) => t, Wg = (t, e) => {
  if (t === e)
    return !0;
  if (t == null || e == null || t.constructor !== e.constructor)
    return !1;
  if (t[DR] != null)
    return t[DR](e);
  switch (t.constructor) {
    case ArrayBuffer:
      t = new Uint8Array(t), e = new Uint8Array(e);
    case Uint8Array: {
      if (t.byteLength !== e.byteLength)
        return !1;
      for (let n = 0; n < t.length; n++)
        if (t[n] !== e[n])
          return !1;
      break;
    }
    case Set: {
      if (t.size !== e.size)
        return !1;
      for (const n of t)
        if (!e.has(n))
          return !1;
      break;
    }
    case Map: {
      if (t.size !== e.size)
        return !1;
      for (const n of t.keys())
        if (!e.has(n) || !Wg(t.get(n), e.get(n)))
          return !1;
      break;
    }
    case Object:
      if (NR(t) !== NR(e))
        return !1;
      for (const n in t)
        if (!wK(t, n) || !Wg(t[n], e[n]))
          return !1;
      break;
    case Array:
      if (t.length !== e.length)
        return !1;
      for (let n = 0; n < t.length; n++)
        if (!Wg(t[n], e[n]))
          return !1;
      break;
    default:
      return !1;
  }
  return !0;
}, nBe = (t, e) => e.includes(t), sc = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]", _K = typeof window < "u" && typeof document < "u" && !sc;
let la;
const iBe = () => {
  if (la === void 0)
    if (sc) {
      la = qi();
      const t = process.argv;
      let e = null;
      for (let n = 0; n < t.length; n++) {
        const i = t[n];
        i[0] === "-" ? (e !== null && la.set(e, ""), e = i) : e !== null && (la.set(e, i), e = null);
      }
      e !== null && la.set(e, "");
    } else typeof location == "object" ? (la = qi(), (location.search || "?").slice(1).split("&").forEach((t) => {
      if (t.length !== 0) {
        const [e, n] = t.split("=");
        la.set(`--${xR(e, "-")}`, n), la.set(`-${xR(e, "-")}`, n);
      }
    })) : la = qi();
  return la;
}, I6 = (t) => iBe().has(t), bk = (t) => MR(sc ? process.env[t.toUpperCase().replaceAll("-", "_")] : bK.getItem(t)), OK = (t) => I6("--" + t) || bk(t) !== null;
OK("production");
const rBe = sc && nBe(process.env.FORCE_COLOR, ["true", "1", "2"]), sBe = rBe || !I6("--no-colors") && // @todo deprecate --no-colors
!OK("no-color") && (!sc || process.stdout.isTTY) && (!sc || I6("--color") || bk("COLORTERM") !== null || (bk("TERM") || "").includes("color")), SK = (t) => new Uint8Array(t), oBe = (t, e, n) => new Uint8Array(t, e, n), aBe = (t) => new Uint8Array(t), lBe = (t) => {
  let e = "";
  for (let n = 0; n < t.byteLength; n++)
    e += mFe(t[n]);
  return btoa(e);
}, uBe = (t) => Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), cBe = (t) => {
  const e = atob(t), n = SK(e.length);
  for (let i = 0; i < e.length; i++)
    n[i] = e.charCodeAt(i);
  return n;
}, fBe = (t) => {
  const e = Buffer.from(t, "base64");
  return oBe(e.buffer, e.byteOffset, e.byteLength);
}, dBe = _K ? lBe : uBe, hBe = _K ? cBe : fBe, pBe = (t) => {
  const e = SK(t.byteLength);
  return e.set(t), e;
};
class U0 {
  /**
   * @param {decoding.Decoder} decoder
   */
  constructor(e) {
    this.restDecoder = e;
  }
  resetDsCurVal() {
  }
  /**
   * @return {number}
   */
  readDsClock() {
    return bt(this.restDecoder);
  }
  /**
   * @return {number}
   */
  readDsLen() {
    return bt(this.restDecoder);
  }
}
class xo extends U0 {
  /**
   * @return {ID}
   */
  readLeftID() {
    return _t(bt(this.restDecoder), bt(this.restDecoder));
  }
  /**
   * @return {ID}
   */
  readRightID() {
    return _t(bt(this.restDecoder), bt(this.restDecoder));
  }
  /**
   * Read the next client id.
   * Use this in favor of readID whenever possible to reduce the number of objects created.
   */
  readClient() {
    return bt(this.restDecoder);
  }
  /**
   * @return {number} info An unsigned 8-bit integer
   */
  readInfo() {
    return Wh(this.restDecoder);
  }
  /**
   * @return {string}
   */
  readString() {
    return yl(this.restDecoder);
  }
  /**
   * @return {boolean} isKey
   */
  readParentInfo() {
    return bt(this.restDecoder) === 1;
  }
  /**
   * @return {number} info An unsigned 8-bit integer
   */
  readTypeRef() {
    return bt(this.restDecoder);
  }
  /**
   * Write len of a struct - well suited for Opt RLE encoder.
   *
   * @return {number} len
   */
  readLen() {
    return bt(this.restDecoder);
  }
  /**
   * @return {any}
   */
  readAny() {
    return H0(this.restDecoder);
  }
  /**
   * @return {Uint8Array}
   */
  readBuf() {
    return pBe(_r(this.restDecoder));
  }
  /**
   * Legacy implementation uses JSON parse. We use any-decoding in v2.
   *
   * @return {any}
   */
  readJSON() {
    return JSON.parse(yl(this.restDecoder));
  }
  /**
   * @return {string}
   */
  readKey() {
    return yl(this.restDecoder);
  }
}
class CK {
  /**
   * @param {decoding.Decoder} decoder
   */
  constructor(e) {
    this.dsCurrVal = 0, this.restDecoder = e;
  }
  resetDsCurVal() {
    this.dsCurrVal = 0;
  }
  /**
   * @return {number}
   */
  readDsClock() {
    return this.dsCurrVal += bt(this.restDecoder), this.dsCurrVal;
  }
  /**
   * @return {number}
   */
  readDsLen() {
    const e = bt(this.restDecoder) + 1;
    return this.dsCurrVal += e, e;
  }
}
class Xs extends CK {
  /**
   * @param {decoding.Decoder} decoder
   */
  constructor(e) {
    super(e), this.keys = [], bt(e), this.keyClockDecoder = new dS(_r(e)), this.clientDecoder = new Fy(_r(e)), this.leftClockDecoder = new dS(_r(e)), this.rightClockDecoder = new dS(_r(e)), this.infoDecoder = new ER(_r(e), Wh), this.stringDecoder = new zFe(_r(e)), this.parentInfoDecoder = new ER(_r(e), Wh), this.typeRefDecoder = new Fy(_r(e)), this.lenDecoder = new Fy(_r(e));
  }
  /**
   * @return {ID}
   */
  readLeftID() {
    return new cf(this.clientDecoder.read(), this.leftClockDecoder.read());
  }
  /**
   * @return {ID}
   */
  readRightID() {
    return new cf(this.clientDecoder.read(), this.rightClockDecoder.read());
  }
  /**
   * Read the next client id.
   * Use this in favor of readID whenever possible to reduce the number of objects created.
   */
  readClient() {
    return this.clientDecoder.read();
  }
  /**
   * @return {number} info An unsigned 8-bit integer
   */
  readInfo() {
    return (
      /** @type {number} */
      this.infoDecoder.read()
    );
  }
  /**
   * @return {string}
   */
  readString() {
    return this.stringDecoder.read();
  }
  /**
   * @return {boolean}
   */
  readParentInfo() {
    return this.parentInfoDecoder.read() === 1;
  }
  /**
   * @return {number} An unsigned 8-bit integer
   */
  readTypeRef() {
    return this.typeRefDecoder.read();
  }
  /**
   * Write len of a struct - well suited for Opt RLE encoder.
   *
   * @return {number}
   */
  readLen() {
    return this.lenDecoder.read();
  }
  /**
   * @return {any}
   */
  readAny() {
    return H0(this.restDecoder);
  }
  /**
   * @return {Uint8Array}
   */
  readBuf() {
    return _r(this.restDecoder);
  }
  /**
   * This is mainly here for legacy purposes.
   *
   * Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
   *
   * @return {any}
   */
  readJSON() {
    return H0(this.restDecoder);
  }
  /**
   * @return {string}
   */
  readKey() {
    const e = this.keyClockDecoder.read();
    if (e < this.keys.length)
      return this.keys[e];
    {
      const n = this.stringDecoder.read();
      return this.keys.push(n), n;
    }
  }
}
class Hh {
  constructor() {
    this.restEncoder = Wi();
  }
  toUint8Array() {
    return Sn(this.restEncoder);
  }
  resetDsCurVal() {
  }
  /**
   * @param {number} clock
   */
  writeDsClock(e) {
    We(this.restEncoder, e);
  }
  /**
   * @param {number} len
   */
  writeDsLen(e) {
    We(this.restEncoder, e);
  }
}
class vc extends Hh {
  /**
   * @param {ID} id
   */
  writeLeftID(e) {
    We(this.restEncoder, e.client), We(this.restEncoder, e.clock);
  }
  /**
   * @param {ID} id
   */
  writeRightID(e) {
    We(this.restEncoder, e.client), We(this.restEncoder, e.clock);
  }
  /**
   * Use writeClient and writeClock instead of writeID if possible.
   * @param {number} client
   */
  writeClient(e) {
    We(this.restEncoder, e);
  }
  /**
   * @param {number} info An unsigned 8-bit integer
   */
  writeInfo(e) {
    z0(this.restEncoder, e);
  }
  /**
   * @param {string} s
   */
  writeString(e) {
    Bu(this.restEncoder, e);
  }
  /**
   * @param {boolean} isYKey
   */
  writeParentInfo(e) {
    We(this.restEncoder, e ? 1 : 0);
  }
  /**
   * @param {number} info An unsigned 8-bit integer
   */
  writeTypeRef(e) {
    We(this.restEncoder, e);
  }
  /**
   * Write len of a struct - well suited for Opt RLE encoder.
   *
   * @param {number} len
   */
  writeLen(e) {
    We(this.restEncoder, e);
  }
  /**
   * @param {any} any
   */
  writeAny(e) {
    W0(this.restEncoder, e);
  }
  /**
   * @param {Uint8Array} buf
   */
  writeBuf(e) {
    di(this.restEncoder, e);
  }
  /**
   * @param {any} embed
   */
  writeJSON(e) {
    Bu(this.restEncoder, JSON.stringify(e));
  }
  /**
   * @param {string} key
   */
  writeKey(e) {
    Bu(this.restEncoder, e);
  }
}
class Zx {
  constructor() {
    this.restEncoder = Wi(), this.dsCurrVal = 0;
  }
  toUint8Array() {
    return Sn(this.restEncoder);
  }
  resetDsCurVal() {
    this.dsCurrVal = 0;
  }
  /**
   * @param {number} clock
   */
  writeDsClock(e) {
    const n = e - this.dsCurrVal;
    this.dsCurrVal = e, We(this.restEncoder, n);
  }
  /**
   * @param {number} len
   */
  writeDsLen(e) {
    e === 0 && _s(), We(this.restEncoder, e - 1), this.dsCurrVal += e;
  }
}
class Ho extends Zx {
  constructor() {
    super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new fS(), this.clientEncoder = new jy(), this.leftClockEncoder = new fS(), this.rightClockEncoder = new fS(), this.infoEncoder = new OR(z0), this.stringEncoder = new DFe(), this.parentInfoEncoder = new OR(z0), this.typeRefEncoder = new jy(), this.lenEncoder = new jy();
  }
  toUint8Array() {
    const e = Wi();
    return We(e, 0), di(e, this.keyClockEncoder.toUint8Array()), di(e, this.clientEncoder.toUint8Array()), di(e, this.leftClockEncoder.toUint8Array()), di(e, this.rightClockEncoder.toUint8Array()), di(e, Sn(this.infoEncoder)), di(e, this.stringEncoder.toUint8Array()), di(e, Sn(this.parentInfoEncoder)), di(e, this.typeRefEncoder.toUint8Array()), di(e, this.lenEncoder.toUint8Array()), K1(e, Sn(this.restEncoder)), Sn(e);
  }
  /**
   * @param {ID} id
   */
  writeLeftID(e) {
    this.clientEncoder.write(e.client), this.leftClockEncoder.write(e.clock);
  }
  /**
   * @param {ID} id
   */
  writeRightID(e) {
    this.clientEncoder.write(e.client), this.rightClockEncoder.write(e.clock);
  }
  /**
   * @param {number} client
   */
  writeClient(e) {
    this.clientEncoder.write(e);
  }
  /**
   * @param {number} info An unsigned 8-bit integer
   */
  writeInfo(e) {
    this.infoEncoder.write(e);
  }
  /**
   * @param {string} s
   */
  writeString(e) {
    this.stringEncoder.write(e);
  }
  /**
   * @param {boolean} isYKey
   */
  writeParentInfo(e) {
    this.parentInfoEncoder.write(e ? 1 : 0);
  }
  /**
   * @param {number} info An unsigned 8-bit integer
   */
  writeTypeRef(e) {
    this.typeRefEncoder.write(e);
  }
  /**
   * Write len of a struct - well suited for Opt RLE encoder.
   *
   * @param {number} len
   */
  writeLen(e) {
    this.lenEncoder.write(e);
  }
  /**
   * @param {any} any
   */
  writeAny(e) {
    W0(this.restEncoder, e);
  }
  /**
   * @param {Uint8Array} buf
   */
  writeBuf(e) {
    di(this.restEncoder, e);
  }
  /**
   * This is mainly here for legacy purposes.
   *
   * Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
   *
   * @param {any} embed
   */
  writeJSON(e) {
    W0(this.restEncoder, e);
  }
  /**
   * Property keys are often reused. For example, in y-prosemirror the key `bold` might
   * occur very often. For a 3d application, the key `position` might occur very often.
   *
   * We cache these keys in a Map and refer to them via a unique number.
   *
   * @param {string} key
   */
  writeKey(e) {
    const n = this.keyMap.get(e);
    n === void 0 ? (this.keyClockEncoder.write(this.keyClock++), this.stringEncoder.write(e)) : this.keyClockEncoder.write(n);
  }
}
const mBe = (t, e, n, i) => {
  i = Hf(i, e[0].id.clock);
  const r = bo(e, i);
  We(t.restEncoder, e.length - r), t.writeClient(n), We(t.restEncoder, i);
  const s = e[r];
  s.write(t, i - s.id.clock);
  for (let o = r + 1; o < e.length; o++)
    e[o].write(t, 0);
}, v8 = (t, e, n) => {
  const i = /* @__PURE__ */ new Map();
  n.forEach((r, s) => {
    Un(e, s) > r && i.set(s, r);
  }), J1(e).forEach((r, s) => {
    n.has(s) || i.set(s, 0);
  }), We(t.restEncoder, i.size), Al(i.entries()).sort((r, s) => s[0] - r[0]).forEach(([r, s]) => {
    mBe(
      t,
      /** @type {Array<GC|Item>} */
      e.clients.get(r),
      r,
      s
    );
  });
}, gBe = (t, e) => {
  const n = qi(), i = bt(t.restDecoder);
  for (let r = 0; r < i; r++) {
    const s = bt(t.restDecoder), o = new Array(s), a = t.readClient();
    let l = bt(t.restDecoder);
    n.set(a, { i: 0, refs: o });
    for (let u = 0; u < s; u++) {
      const f = t.readInfo();
      switch (zx & f) {
        case 0: {
          const d = t.readLen();
          o[u] = new bs(_t(a, l), d), l += d;
          break;
        }
        case 10: {
          const d = bt(t.restDecoder);
          o[u] = new Xr(_t(a, l), d), l += d;
          break;
        }
        default: {
          const d = (f & (bl | Us)) === 0, h = new en(
            _t(a, l),
            null,
            // left
            (f & Us) === Us ? t.readLeftID() : null,
            // origin
            null,
            // right
            (f & bl) === bl ? t.readRightID() : null,
            // right origin
            d ? t.readParentInfo() ? e.get(t.readString()) : t.readLeftID() : null,
            // parent
            d && (f & F0) === F0 ? t.readString() : null,
            // parentSub
            EJ(t, f)
            // item content
          );
          o[u] = h, l += h.length;
        }
      }
    }
  }
  return n;
}, vBe = (t, e, n) => {
  const i = [];
  let r = Al(n.keys()).sort((m, g) => m - g);
  if (r.length === 0)
    return null;
  const s = () => {
    if (r.length === 0)
      return null;
    let m = (
      /** @type {{i:number,refs:Array<GC|Item>}} */
      n.get(r[r.length - 1])
    );
    for (; m.refs.length === m.i; )
      if (r.pop(), r.length > 0)
        m = /** @type {{i:number,refs:Array<GC|Item>}} */
        n.get(r[r.length - 1]);
      else
        return null;
    return m;
  };
  let o = s();
  if (o === null)
    return null;
  const a = new LK(), l = /* @__PURE__ */ new Map(), u = (m, g) => {
    const w = l.get(m);
    (w == null || w > g) && l.set(m, g);
  };
  let f = (
    /** @type {any} */
    o.refs[
      /** @type {any} */
      o.i++
    ]
  );
  const d = /* @__PURE__ */ new Map(), h = () => {
    for (const m of i) {
      const g = m.id.client, w = n.get(g);
      w ? (w.i--, a.clients.set(g, w.refs.slice(w.i)), n.delete(g), w.i = 0, w.refs = []) : a.clients.set(g, [m]), r = r.filter((x) => x !== g);
    }
    i.length = 0;
  };
  for (; ; ) {
    if (f.constructor !== Xr) {
      const g = Vr(d, f.id.client, () => Un(e, f.id.client)) - f.id.clock;
      if (g < 0)
        i.push(f), u(f.id.client, f.id.clock - 1), h();
      else {
        const w = f.getMissing(t, e);
        if (w !== null) {
          i.push(f);
          const x = n.get(
            /** @type {number} */
            w
          ) || { refs: [], i: 0 };
          if (x.refs.length === x.i)
            u(
              /** @type {number} */
              w,
              Un(e, w)
            ), h();
          else {
            f = x.refs[x.i++];
            continue;
          }
        } else (g === 0 || g < f.length) && (f.integrate(t, g), d.set(f.id.client, f.id.clock + f.length));
      }
    }
    if (i.length > 0)
      f = /** @type {GC|Item} */
      i.pop();
    else if (o !== null && o.i < o.refs.length)
      f = /** @type {GC|Item} */
      o.refs[o.i++];
    else {
      if (o = s(), o === null)
        break;
      f = /** @type {GC|Item} */
      o.refs[o.i++];
    }
  }
  if (a.clients.size > 0) {
    const m = new Ho();
    return v8(m, a, /* @__PURE__ */ new Map()), We(m.restEncoder, 0), { missing: l, update: m.toUint8Array() };
  }
  return null;
}, bBe = (t, e) => v8(t, e.doc.store, e.beforeState), b8 = (t, e, n, i = new Xs(t)) => nn(e, (r) => {
  r.local = !1;
  let s = !1;
  const o = r.doc, a = o.store, l = gBe(i, o), u = vBe(r, a, l), f = a.pendingStructs;
  if (f) {
    for (const [h, m] of f.missing)
      if (m < Un(a, h)) {
        s = !0;
        break;
      }
    if (u) {
      for (const [h, m] of u.missing) {
        const g = f.missing.get(h);
        (g == null || g > m) && f.missing.set(h, m);
      }
      f.update = q0([f.update, u.update]);
    }
  } else
    a.pendingStructs = u;
  const d = TR(i, r, a);
  if (a.pendingDs) {
    const h = new Xs(Vi(a.pendingDs));
    bt(h.restDecoder);
    const m = TR(h, r, a);
    d && m ? a.pendingDs = q0([d, m]) : a.pendingDs = d || m;
  } else
    a.pendingDs = d;
  if (s) {
    const h = (
      /** @type {{update: Uint8Array}} */
      a.pendingStructs.update
    );
    a.pendingStructs = null, qx(r.doc, h);
  }
}, n, !1), yBe = (t, e, n) => b8(t, e, n, new xo(t)), qx = (t, e, n, i = Xs) => {
  const r = Vi(e);
  b8(r, t, n, new i(r));
}, EK = (t, e, n) => qx(t, e, n, xo), wBe = (t, e, n = /* @__PURE__ */ new Map()) => {
  v8(t, e.store, n), Da(t, p8(e.store));
}, TK = (t, e = new Uint8Array([0]), n = new Ho()) => {
  const i = y8(e);
  wBe(n, t, i);
  const r = [n.toUint8Array()];
  if (t.store.pendingDs && r.push(t.store.pendingDs), t.store.pendingStructs && r.push(C8(t.store.pendingStructs.update, e)), r.length > 1) {
    if (n.constructor === vc)
      return GK(r.map((s, o) => o === 0 ? s : nJ(s)));
    if (n.constructor === Ho)
      return q0(r);
  }
  return r[0];
}, $K = (t, e) => TK(t, e, new vc()), MK = (t) => {
  const e = /* @__PURE__ */ new Map(), n = bt(t.restDecoder);
  for (let i = 0; i < n; i++) {
    const r = bt(t.restDecoder), s = bt(t.restDecoder);
    e.set(r, s);
  }
  return e;
}, y8 = (t) => MK(new U0(Vi(t))), w8 = (t, e) => (We(t.restEncoder, e.size), Al(e.entries()).sort((n, i) => i[0] - n[0]).forEach(([n, i]) => {
  We(t.restEncoder, n), We(t.restEncoder, i);
}), t), kBe = (t, e) => w8(t, J1(e.store)), xBe = (t, e = new Zx()) => (t instanceof Map ? w8(e, t) : kBe(e, t), e.toUint8Array()), NK = (t) => xBe(t, new Hh());
class _Be {
  constructor() {
    this.l = [];
  }
}
const PR = () => new _Be(), IR = (t, e) => t.l.push(e), LR = (t, e) => {
  const n = t.l, i = n.length;
  t.l = n.filter((r) => e !== r), i === t.l.length && console.error("[yjs] Tried to remove event handler that doesn't exist.");
}, AK = (t, e, n) => g8(t.l, [e, n]);
class cf {
  /**
   * @param {number} client client id
   * @param {number} clock unique per client id, continuous number
   */
  constructor(e, n) {
    this.client = e, this.clock = n;
  }
}
const nf = (t, e) => t === e || t !== null && e !== null && t.client === e.client && t.clock === e.clock, _t = (t, e) => new cf(t, e), RR = (t, e) => {
  We(t, e.client), We(t, e.clock);
}, jR = (t) => _t(bt(t), bt(t)), k8 = (t) => {
  for (const [e, n] of t.doc.share.entries())
    if (n === t)
      return e;
  throw _s();
}, Z0 = (t, e) => {
  for (; e !== null; ) {
    if (e.parent === t)
      return !0;
    e = /** @type {AbstractType<any>} */
    e.parent._item;
  }
  return !1;
}, OBe = (t) => {
  const e = [];
  let n = t._start;
  for (; n; )
    e.push(n), n = n.right;
  console.log("Children: ", e), console.log("Children content: ", e.filter((i) => !i.deleted).map((i) => i.content));
};
class SBe {
  /**
   * @param {Doc} doc
   * @param {YMap<any>} [storeType]
   */
  constructor(e, n = e.getMap("users")) {
    const i = /* @__PURE__ */ new Map();
    this.yusers = n, this.doc = e, this.clients = /* @__PURE__ */ new Map(), this.dss = i;
    const r = (s, o) => {
      const a = s.get("ds"), l = s.get("ids"), u = (
        /** @param {number} clientid */
        (f) => this.clients.set(f, o)
      );
      a.observe(
        /** @param {YArrayEvent<any>} event */
        (f) => {
          f.changes.added.forEach((d) => {
            d.content.getContent().forEach((h) => {
              h instanceof Uint8Array && this.dss.set(o, Sf([this.dss.get(o) || Ux(), Pl(new U0(Vi(h)))]));
            });
          });
        }
      ), this.dss.set(o, Sf(a.map((f) => Pl(new U0(Vi(f)))))), l.observe(
        /** @param {YArrayEvent<any>} event */
        (f) => f.changes.added.forEach((d) => d.content.getContent().forEach(u))
      ), l.forEach(u);
    };
    n.observe((s) => {
      s.keysChanged.forEach(
        (o) => r(n.get(o), o)
      );
    }), n.forEach(r);
  }
  /**
   * @param {Doc} doc
   * @param {number} clientid
   * @param {string} userDescription
   * @param {Object} conf
   * @param {function(Transaction, DeleteSet):boolean} [conf.filter]
   */
  setUserMapping(e, n, i, { filter: r = () => !0 } = {}) {
    const s = this.yusers;
    let o = s.get(i);
    o || (o = new oc(), o.set("ids", new wl()), o.set("ds", new wl()), s.set(i, o)), o.get("ids").push([n]), s.observe((a) => {
      setTimeout(() => {
        const l = s.get(i);
        if (l !== o) {
          o = l, this.clients.forEach((d, h) => {
            i === d && o.get("ids").push([h]);
          });
          const u = new Hh(), f = this.dss.get(i);
          f && (Da(u, f), o.get("ds").push([u.toUint8Array()]));
        }
      }, 0);
    }), e.on(
      "afterTransaction",
      /** @param {Transaction} transaction */
      (a) => {
        setTimeout(() => {
          const l = o.get("ds"), u = a.deleteSet;
          if (a.local && u.clients.size > 0 && r(a, u)) {
            const f = new Hh();
            Da(f, u), l.push([f.toUint8Array()]);
          }
        });
      }
    );
  }
  /**
   * @param {number} clientid
   * @return {any}
   */
  getUserByClientId(e) {
    return this.clients.get(e) || null;
  }
  /**
   * @param {ID} id
   * @return {string | null}
   */
  getUserByDeletedId(e) {
    for (const [n, i] of this.dss.entries())
      if (Qf(i, e))
        return n;
    return null;
  }
}
class Yx {
  /**
   * @param {ID|null} type
   * @param {string|null} tname
   * @param {ID|null} item
   * @param {number} assoc
   */
  constructor(e, n, i, r = 0) {
    this.type = e, this.tname = n, this.item = i, this.assoc = r;
  }
}
const CBe = (t) => {
  const e = {};
  return t.type && (e.type = t.type), t.tname && (e.tname = t.tname), t.item && (e.item = t.item), t.assoc != null && (e.assoc = t.assoc), e;
}, EBe = (t) => new Yx(t.type == null ? null : _t(t.type.client, t.type.clock), t.tname ?? null, t.item == null ? null : _t(t.item.client, t.item.clock), t.assoc == null ? 0 : t.assoc);
class DK {
  /**
   * @param {AbstractType<any>} type
   * @param {number} index
   * @param {number} [assoc]
   */
  constructor(e, n, i = 0) {
    this.type = e, this.index = n, this.assoc = i;
  }
}
const TBe = (t, e, n = 0) => new DK(t, e, n), Zb = (t, e, n) => {
  let i = null, r = null;
  return t._item === null ? r = k8(t) : i = _t(t._item.id.client, t._item.id.clock), new Yx(i, r, e, n);
}, $Be = (t, e, n = 0) => {
  let i = t._start;
  if (n < 0) {
    if (e === 0)
      return Zb(t, null, n);
    e--;
  }
  for (; i !== null; ) {
    if (!i.deleted && i.countable) {
      if (i.length > e)
        return Zb(t, _t(i.id.client, i.id.clock + e), n);
      e -= i.length;
    }
    if (i.right === null && n < 0)
      return Zb(t, i.lastId, n);
    i = i.right;
  }
  return Zb(t, null, n);
}, MBe = (t, e) => {
  const { type: n, tname: i, item: r, assoc: s } = e;
  if (r !== null)
    We(t, 0), RR(t, r);
  else if (i !== null)
    z0(t, 1), Bu(t, i);
  else if (n !== null)
    z0(t, 2), RR(t, n);
  else
    throw _s();
  return Wx(t, s), t;
}, NBe = (t) => {
  const e = Wi();
  return MBe(e, t), Sn(e);
}, ABe = (t) => {
  let e = null, n = null, i = null;
  switch (bt(t)) {
    case 0:
      i = jR(t);
      break;
    case 1:
      n = yl(t);
      break;
    case 2:
      e = jR(t);
  }
  const r = hK(t) ? Qx(t) : 0;
  return new Yx(e, n, i, r);
}, DBe = (t) => ABe(Vi(t)), PBe = (t, e) => {
  const n = ff(t, e), i = e.clock - n.id.clock;
  return {
    item: n,
    diff: i
  };
}, IBe = (t, e, n = !0) => {
  const i = e.store, r = t.item, s = t.type, o = t.tname, a = t.assoc;
  let l = null, u = 0;
  if (r !== null) {
    if (Un(i, r.client) <= r.clock)
      return null;
    const f = n ? z6(i, r) : PBe(i, r), d = f.item;
    if (!(d instanceof en))
      return null;
    if (l = /** @type {AbstractType<any>} */
    d.parent, l._item === null || !l._item.deleted) {
      u = d.deleted || !d.countable ? 0 : f.diff + (a >= 0 ? 0 : 1);
      let h = d.left;
      for (; h !== null; )
        !h.deleted && h.countable && (u += h.length), h = h.left;
    }
  } else {
    if (o !== null)
      l = e.get(o);
    else if (s !== null) {
      if (Un(i, s.client) <= s.clock)
        return null;
      const { item: f } = n ? z6(i, s) : { item: ff(i, s) };
      if (f instanceof en && f.content instanceof _o)
        l = f.content.type;
      else
        return null;
    } else
      throw _s();
    a >= 0 ? u = l._length : u = 0;
  }
  return TBe(l, u, t.assoc);
}, LBe = (t, e) => t === e || t !== null && e !== null && t.tname === e.tname && nf(t.item, e.item) && nf(t.type, e.type) && t.assoc === e.assoc;
class x8 {
  /**
   * @param {DeleteSet} ds
   * @param {Map<number,number>} sv state map
   */
  constructor(e, n) {
    this.ds = e, this.sv = n;
  }
}
const RBe = (t, e) => {
  const n = t.ds.clients, i = e.ds.clients, r = t.sv, s = e.sv;
  if (r.size !== s.size || n.size !== i.size)
    return !1;
  for (const [o, a] of r.entries())
    if (s.get(o) !== a)
      return !1;
  for (const [o, a] of n.entries()) {
    const l = i.get(o) || [];
    if (a.length !== l.length)
      return !1;
    for (let u = 0; u < a.length; u++) {
      const f = a[u], d = l[u];
      if (f.clock !== d.clock || f.len !== d.len)
        return !1;
    }
  }
  return !0;
}, PK = (t, e = new Zx()) => (Da(e, t.ds), w8(e, t.sv), e.toUint8Array()), jBe = (t) => PK(t, new Hh()), IK = (t, e = new CK(Vi(t))) => new x8(Pl(e), MK(e)), FBe = (t) => IK(t, new U0(Vi(t))), _8 = (t, e) => new x8(t, e), BBe = _8(Ux(), /* @__PURE__ */ new Map()), zBe = (t) => _8(p8(t.store), J1(t.store)), yu = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && (e.sv.get(t.id.client) || 0) > t.id.clock && !Qf(e.ds, t.id), L6 = (t, e) => {
  const n = Vr(t.meta, L6, nc), i = t.doc.store;
  n.has(e) || (e.sv.forEach((r, s) => {
    r < Un(i, s) && Nr(t, _t(s, r));
  }), Of(t, e.ds, (r) => {
  }), n.add(e));
}, WBe = (t, e, n = new Bl()) => {
  if (t.gc)
    throw new Error("Garbage-collection must be disabled in `originDoc`!");
  const { sv: i, ds: r } = e, s = new Ho();
  return t.transact((o) => {
    let a = 0;
    i.forEach((l) => {
      l > 0 && a++;
    }), We(s.restEncoder, a);
    for (const [l, u] of i) {
      if (u === 0)
        continue;
      u < Un(t.store, l) && Nr(o, _t(l, u));
      const f = t.store.clients.get(l) || [], d = bo(f, u - 1);
      We(s.restEncoder, d + 1), s.writeClient(l), We(s.restEncoder, 0);
      for (let h = 0; h <= d; h++)
        f[h].write(s, 0);
    }
    Da(s, r);
  }), qx(n, s.toUint8Array(), "snapshot"), n;
}, HBe = (t, e, n = Xs) => {
  const i = new n(Vi(e)), r = new bc(i, !1);
  for (let o = r.curr; o !== null; o = r.next())
    if ((t.sv.get(o.id.client) || 0) < o.id.clock + o.length)
      return !1;
  const s = Sf([t.ds, Pl(i)]);
  return pK(t.ds, s);
}, QBe = (t, e) => HBe(t, e, xo);
class LK {
  constructor() {
    this.clients = /* @__PURE__ */ new Map(), this.pendingStructs = null, this.pendingDs = null;
  }
}
const J1 = (t) => {
  const e = /* @__PURE__ */ new Map();
  return t.clients.forEach((n, i) => {
    const r = n[n.length - 1];
    e.set(i, r.id.clock + r.length);
  }), e;
}, Un = (t, e) => {
  const n = t.clients.get(e);
  if (n === void 0)
    return 0;
  const i = n[n.length - 1];
  return i.id.clock + i.length;
}, RK = (t, e) => {
  let n = t.clients.get(e.id.client);
  if (n === void 0)
    n = [], t.clients.set(e.id.client, n);
  else {
    const i = n[n.length - 1];
    if (i.id.clock + i.length !== e.id.clock)
      throw _s();
  }
  n.push(e);
}, bo = (t, e) => {
  let n = 0, i = t.length - 1, r = t[i], s = r.id.clock;
  if (s === e)
    return i;
  let o = Dl(e / (s + r.length - 1) * i);
  for (; n <= i; ) {
    if (r = t[o], s = r.id.clock, s <= e) {
      if (e < s + r.length)
        return o;
      n = o + 1;
    } else
      i = o - 1;
    o = Dl((n + i) / 2);
  }
  throw _s();
}, UBe = (t, e) => {
  const n = t.clients.get(e.client);
  return n[bo(n, e.clock)];
}, ff = (
  /** @type {function(StructStore,ID):Item} */
  UBe
), R6 = (t, e, n) => {
  const i = bo(e, n), r = e[i];
  return r.id.clock < n && r instanceof en ? (e.splice(i + 1, 0, kk(t, r, n - r.id.clock)), i + 1) : i;
}, Nr = (t, e) => {
  const n = (
    /** @type {Array<Item>} */
    t.doc.store.clients.get(e.client)
  );
  return n[R6(t, n, e.clock)];
}, j6 = (t, e, n) => {
  const i = e.clients.get(n.client), r = bo(i, n.clock), s = i[r];
  return n.clock !== s.id.clock + s.length - 1 && s.constructor !== bs && i.splice(r + 1, 0, kk(t, s, n.clock - s.id.clock + 1)), s;
}, ZBe = (t, e, n) => {
  const i = (
    /** @type {Array<GC|Item>} */
    t.clients.get(e.id.client)
  );
  i[bo(i, e.id.clock)] = n;
}, jK = (t, e, n, i, r) => {
  if (i === 0)
    return;
  const s = n + i;
  let o = R6(t, e, n), a;
  do
    a = e[o++], s < a.id.clock + a.length && R6(t, e, s), r(a);
  while (o < e.length && e[o].id.clock < s);
};
class qBe {
  /**
   * @param {L} left
   * @param {R} right
   */
  constructor(e, n) {
    this.left = e, this.right = n;
  }
}
const al = (t, e) => new qBe(t, e);
typeof DOMParser < "u" && new DOMParser();
const YBe = (t) => sFe(t, (e, n) => `${n}:${e};`).join(""), zl = Symbol, FK = zl(), BK = zl(), VBe = zl(), XBe = zl(), GBe = zl(), zK = zl(), KBe = zl(), O8 = zl(), JBe = zl(), eze = (t) => {
  var r;
  t.length === 1 && ((r = t[0]) == null ? void 0 : r.constructor) === Function && (t = /** @type {Array<string|Symbol|Object|number>} */
  /** @type {[function]} */
  t[0]());
  const e = [], n = [];
  let i = 0;
  for (; i < t.length; i++) {
    const s = t[i];
    if (s === void 0)
      break;
    if (s.constructor === String || s.constructor === Number)
      e.push(s);
    else if (s.constructor === Object)
      break;
  }
  for (i > 0 && n.push(e.join("")); i < t.length; i++) {
    const s = t[i];
    s instanceof Symbol || n.push(s);
  }
  return n;
}, tze = {
  [FK]: al("font-weight", "bold"),
  [BK]: al("font-weight", "normal"),
  [VBe]: al("color", "blue"),
  [GBe]: al("color", "green"),
  [XBe]: al("color", "grey"),
  [zK]: al("color", "red"),
  [KBe]: al("color", "purple"),
  [O8]: al("color", "orange"),
  // not well supported in chrome when debugging node with inspector - TODO: deprecate
  [JBe]: al("color", "black")
}, nze = (t) => {
  var o;
  t.length === 1 && ((o = t[0]) == null ? void 0 : o.constructor) === Function && (t = /** @type {Array<string|Symbol|Object|number>} */
  /** @type {[function]} */
  t[0]());
  const e = [], n = [], i = qi();
  let r = [], s = 0;
  for (; s < t.length; s++) {
    const a = t[s], l = tze[a];
    if (l !== void 0)
      i.set(l.left, l.right);
    else {
      if (a === void 0)
        break;
      if (a.constructor === String || a.constructor === Number) {
        const u = YBe(i);
        s > 0 || u.length > 0 ? (e.push("%c" + a), n.push(u)) : e.push(a);
      } else
        break;
    }
  }
  for (s > 0 && (r = n, r.unshift(e.join(""))); s < t.length; s++) {
    const a = t[s];
    a instanceof Symbol || r.push(a);
  }
  return r;
}, WK = sBe ? nze : eze, F6 = (...t) => {
  console.log(...WK(t)), QK.forEach((e) => e.print(t));
}, HK = (...t) => {
  console.warn(...WK(t)), t.unshift(O8), QK.forEach((e) => e.print(t));
}, QK = nc();
class UK {
  /**
   * @param {Doc} doc
   * @param {any} origin
   * @param {boolean} local
   */
  constructor(e, n, i) {
    this.doc = e, this.deleteSet = new Ep(), this.beforeState = J1(e.store), this.afterState = /* @__PURE__ */ new Map(), this.changed = /* @__PURE__ */ new Map(), this.changedParentTypes = /* @__PURE__ */ new Map(), this._mergeStructs = [], this.origin = n, this.meta = /* @__PURE__ */ new Map(), this.local = i, this.subdocsAdded = /* @__PURE__ */ new Set(), this.subdocsRemoved = /* @__PURE__ */ new Set(), this.subdocsLoaded = /* @__PURE__ */ new Set(), this._needFormattingCleanup = !1;
  }
}
const FR = (t, e) => e.deleteSet.clients.size === 0 && !oFe(e.afterState, (n, i) => e.beforeState.get(i) !== n) ? !1 : (h8(e.deleteSet), bBe(t, e), Da(t, e.deleteSet), !0), BR = (t, e, n) => {
  const i = e._item;
  (i === null || i.id.clock < (t.beforeState.get(i.id.client) || 0) && !i.deleted) && Vr(t.changed, e, nc).add(n);
}, By = (t, e) => {
  let n = t[e], i = t[e - 1], r = e;
  for (; r > 0; n = i, i = t[--r - 1]) {
    if (i.deleted === n.deleted && i.constructor === n.constructor && i.mergeWith(n)) {
      n instanceof en && n.parentSub !== null && /** @type {AbstractType<any>} */
      n.parent._map.get(n.parentSub) === n && n.parent._map.set(
        n.parentSub,
        /** @type {Item} */
        i
      );
      continue;
    }
    break;
  }
  const s = e - r;
  return s && t.splice(e + 1 - s, s), s;
}, ZK = (t, e, n) => {
  for (const [i, r] of t.clients.entries()) {
    const s = (
      /** @type {Array<GC|Item>} */
      e.clients.get(i)
    );
    for (let o = r.length - 1; o >= 0; o--) {
      const a = r[o], l = a.clock + a.len;
      for (let u = bo(s, a.clock), f = s[u]; u < s.length && f.id.clock < l; f = s[++u]) {
        const d = s[u];
        if (a.clock + a.len <= d.id.clock)
          break;
        d instanceof en && d.deleted && !d.keep && n(d) && d.gc(e, !1);
      }
    }
  }
}, qK = (t, e) => {
  t.clients.forEach((n, i) => {
    const r = (
      /** @type {Array<GC|Item>} */
      e.clients.get(i)
    );
    for (let s = n.length - 1; s >= 0; s--) {
      const o = n[s], a = l8(r.length - 1, 1 + bo(r, o.clock + o.len - 1));
      for (let l = a, u = r[l]; l > 0 && u.id.clock >= o.clock; u = r[l])
        l -= 1 + By(r, l);
    }
  });
}, ize = (t, e, n) => {
  ZK(t, e, n), qK(t, e);
}, YK = (t, e) => {
  if (e < t.length) {
    const n = t[e], i = n.doc, r = i.store, s = n.deleteSet, o = n._mergeStructs;
    try {
      h8(s), n.afterState = J1(n.doc.store), i.emit("beforeObserverCalls", [n, i]);
      const a = [];
      n.changed.forEach(
        (l, u) => a.push(() => {
          (u._item === null || !u._item.deleted) && u._callObserver(n, l);
        })
      ), a.push(() => {
        n.changedParentTypes.forEach((l, u) => {
          u._dEH.l.length > 0 && (u._item === null || !u._item.deleted) && (l = l.filter(
            (f) => f.target._item === null || !f.target._item.deleted
          ), l.forEach((f) => {
            f.currentTarget = u, f._path = null;
          }), l.sort((f, d) => f.path.length - d.path.length), a.push(() => {
            AK(u._dEH, l, n);
          }));
        }), a.push(() => i.emit("afterTransaction", [n, i])), a.push(() => {
          n._needFormattingCleanup && $ze(n);
        });
      }), g8(a, []);
    } finally {
      i.gc && ZK(s, r, i.gcFilter), qK(s, r), n.afterState.forEach((f, d) => {
        const h = n.beforeState.get(d) || 0;
        if (h !== f) {
          const m = (
            /** @type {Array<GC|Item>} */
            r.clients.get(d)
          ), g = Hf(bo(m, h), 1);
          for (let w = m.length - 1; w >= g; )
            w -= 1 + By(m, w);
        }
      });
      for (let f = o.length - 1; f >= 0; f--) {
        const { client: d, clock: h } = o[f].id, m = (
          /** @type {Array<GC|Item>} */
          r.clients.get(d)
        ), g = bo(m, h);
        g + 1 < m.length && By(m, g + 1) > 1 || g > 0 && By(m, g);
      }
      if (!n.local && n.afterState.get(i.clientID) !== n.beforeState.get(i.clientID) && (F6(O8, FK, "[yjs] ", BK, zK, "Changed the client-id because another client seems to be using it."), i.clientID = gK()), i.emit("afterTransactionCleanup", [n, i]), i._observers.has("update")) {
        const f = new vc();
        FR(f, n) && i.emit("update", [f.toUint8Array(), n.origin, i, n]);
      }
      if (i._observers.has("updateV2")) {
        const f = new Ho();
        FR(f, n) && i.emit("updateV2", [f.toUint8Array(), n.origin, i, n]);
      }
      const { subdocsAdded: a, subdocsLoaded: l, subdocsRemoved: u } = n;
      (a.size > 0 || u.size > 0 || l.size > 0) && (a.forEach((f) => {
        f.clientID = i.clientID, f.collectionid == null && (f.collectionid = i.collectionid), i.subdocs.add(f);
      }), u.forEach((f) => i.subdocs.delete(f)), i.emit("subdocs", [{ loaded: l, added: a, removed: u }, i, n]), u.forEach((f) => f.destroy())), t.length <= e + 1 ? (i._transactionCleanups = [], i.emit("afterAllTransactions", [i, t])) : YK(t, e + 1);
    }
  }
}, nn = (t, e, n = null, i = !0) => {
  const r = t._transactionCleanups;
  let s = !1, o = null;
  t._transaction === null && (s = !0, t._transaction = new UK(t, n, i), r.push(t._transaction), r.length === 1 && t.emit("beforeAllTransactions", [t]), t.emit("beforeTransaction", [t._transaction, t]));
  try {
    o = e(t._transaction);
  } finally {
    if (s) {
      const a = t._transaction === r[0];
      t._transaction = null, a && YK(r, 0);
    }
  }
  return o;
};
class rze {
  /**
   * @param {DeleteSet} deletions
   * @param {DeleteSet} insertions
   */
  constructor(e, n) {
    this.insertions = n, this.deletions = e, this.meta = /* @__PURE__ */ new Map();
  }
}
const zR = (t, e, n) => {
  Of(t, n.deletions, (i) => {
    i instanceof en && e.scope.some((r) => r === t.doc || Z0(
      /** @type {AbstractType<any>} */
      r,
      i
    )) && N8(i, !1);
  });
}, WR = (t, e, n) => {
  let i = null;
  const r = t.doc, s = t.scope;
  nn(r, (a) => {
    for (; e.length > 0 && t.currStackItem === null; ) {
      const l = r.store, u = (
        /** @type {StackItem} */
        e.pop()
      ), f = /* @__PURE__ */ new Set(), d = [];
      let h = !1;
      Of(a, u.insertions, (m) => {
        if (m instanceof en) {
          if (m.redone !== null) {
            let { item: g, diff: w } = z6(l, m.id);
            w > 0 && (g = Nr(a, _t(g.id.client, g.id.clock + w))), m = g;
          }
          !m.deleted && s.some((g) => g === a.doc || Z0(
            /** @type {AbstractType<any>} */
            g,
            /** @type {Item} */
            m
          )) && d.push(m);
        }
      }), Of(a, u.deletions, (m) => {
        m instanceof en && s.some((g) => g === a.doc || Z0(
          /** @type {AbstractType<any>} */
          g,
          m
        )) && // Never redo structs in stackItem.insertions because they were created and deleted in the same capture interval.
        !Qf(u.insertions, m.id) && f.add(m);
      }), f.forEach((m) => {
        h = CJ(a, m, f, u.insertions, t.ignoreRemoteMapChanges, t) !== null || h;
      });
      for (let m = d.length - 1; m >= 0; m--) {
        const g = d[m];
        t.deleteFilter(g) && (g.delete(a), h = !0);
      }
      t.currStackItem = h ? u : null;
    }
    a.changed.forEach((l, u) => {
      l.has(null) && u._searchMarker && (u._searchMarker.length = 0);
    }), i = a;
  }, t);
  const o = t.currStackItem;
  if (o != null) {
    const a = i.changedParentTypes;
    t.emit("stack-item-popped", [{ stackItem: o, type: n, changedParentTypes: a, origin: t }, t]), t.currStackItem = null;
  }
  return o;
};
class sze extends Bx {
  /**
   * @param {Doc|AbstractType<any>|Array<AbstractType<any>>} typeScope Limits the scope of the UndoManager. If this is set to a ydoc instance, all changes on that ydoc will be undone. If set to a specific type, only changes on that type or its children will be undone. Also accepts an array of types.
   * @param {UndoManagerOptions} options
   */
  constructor(e, {
    captureTimeout: n = 500,
    captureTransaction: i = (l) => !0,
    deleteFilter: r = () => !0,
    trackedOrigins: s = /* @__PURE__ */ new Set([null]),
    ignoreRemoteMapChanges: o = !1,
    doc: a = (
      /** @type {Doc} */
      A6(e) ? e[0].doc : e instanceof Bl ? e : e.doc
    )
  } = {}) {
    super(), this.scope = [], this.doc = a, this.addToScope(e), this.deleteFilter = r, s.add(this), this.trackedOrigins = s, this.captureTransaction = i, this.undoStack = [], this.redoStack = [], this.undoing = !1, this.redoing = !1, this.currStackItem = null, this.lastChange = 0, this.ignoreRemoteMapChanges = o, this.captureTimeout = n, this.afterTransactionHandler = (l) => {
      if (!this.captureTransaction(l) || !this.scope.some((x) => l.changedParentTypes.has(
        /** @type {AbstractType<any>} */
        x
      ) || x === this.doc) || !this.trackedOrigins.has(l.origin) && (!l.origin || !this.trackedOrigins.has(l.origin.constructor)))
        return;
      const u = this.undoing, f = this.redoing, d = u ? this.redoStack : this.undoStack;
      u ? this.stopCapturing() : f || this.clear(!1, !0);
      const h = new Ep();
      l.afterState.forEach((x, _) => {
        const S = l.beforeState.get(_) || 0, C = x - S;
        C > 0 && Q0(h, _, S, C);
      });
      const m = rc();
      let g = !1;
      if (this.lastChange > 0 && m - this.lastChange < this.captureTimeout && d.length > 0 && !u && !f) {
        const x = d[d.length - 1];
        x.deletions = Sf([x.deletions, l.deleteSet]), x.insertions = Sf([x.insertions, h]);
      } else
        d.push(new rze(l.deleteSet, h)), g = !0;
      !u && !f && (this.lastChange = m), Of(
        l,
        l.deleteSet,
        /** @param {Item|GC} item */
        (x) => {
          x instanceof en && this.scope.some((_) => _ === l.doc || Z0(
            /** @type {AbstractType<any>} */
            _,
            x
          )) && N8(x, !0);
        }
      );
      const w = [{ stackItem: d[d.length - 1], origin: l.origin, type: u ? "redo" : "undo", changedParentTypes: l.changedParentTypes }, this];
      g ? this.emit("stack-item-added", w) : this.emit("stack-item-updated", w);
    }, this.doc.on("afterTransaction", this.afterTransactionHandler), this.doc.on("destroy", () => {
      this.destroy();
    });
  }
  /**
   * Extend the scope.
   *
   * @param {Array<AbstractType<any> | Doc> | AbstractType<any> | Doc} ytypes
   */
  addToScope(e) {
    const n = new Set(this.scope);
    e = A6(e) ? e : [e], e.forEach((i) => {
      n.has(i) || (n.add(i), (i instanceof ji ? i.doc !== this.doc : i !== this.doc) && HK("[yjs#509] Not same Y.Doc"), this.scope.push(i));
    });
  }
  /**
   * @param {any} origin
   */
  addTrackedOrigin(e) {
    this.trackedOrigins.add(e);
  }
  /**
   * @param {any} origin
   */
  removeTrackedOrigin(e) {
    this.trackedOrigins.delete(e);
  }
  clear(e = !0, n = !0) {
    (e && this.canUndo() || n && this.canRedo()) && this.doc.transact((i) => {
      e && (this.undoStack.forEach((r) => zR(i, this, r)), this.undoStack = []), n && (this.redoStack.forEach((r) => zR(i, this, r)), this.redoStack = []), this.emit("stack-cleared", [{ undoStackCleared: e, redoStackCleared: n }]);
    });
  }
  /**
   * UndoManager merges Undo-StackItem if they are created within time-gap
   * smaller than `options.captureTimeout`. Call `um.stopCapturing()` so that the next
   * StackItem won't be merged.
   *
   *
   * @example
   *     // without stopCapturing
   *     ytext.insert(0, 'a')
   *     ytext.insert(1, 'b')
   *     um.undo()
   *     ytext.toString() // => '' (note that 'ab' was removed)
   *     // with stopCapturing
   *     ytext.insert(0, 'a')
   *     um.stopCapturing()
   *     ytext.insert(0, 'b')
   *     um.undo()
   *     ytext.toString() // => 'a' (note that only 'b' was removed)
   *
   */
  stopCapturing() {
    this.lastChange = 0;
  }
  /**
   * Undo last changes on type.
   *
   * @return {StackItem?} Returns StackItem if a change was applied
   */
  undo() {
    this.undoing = !0;
    let e;
    try {
      e = WR(this, this.undoStack, "undo");
    } finally {
      this.undoing = !1;
    }
    return e;
  }
  /**
   * Redo last undo operation.
   *
   * @return {StackItem?} Returns StackItem if a change was applied
   */
  redo() {
    this.redoing = !0;
    let e;
    try {
      e = WR(this, this.redoStack, "redo");
    } finally {
      this.redoing = !1;
    }
    return e;
  }
  /**
   * Are undo steps available?
   *
   * @return {boolean} `true` if undo is possible
   */
  canUndo() {
    return this.undoStack.length > 0;
  }
  /**
   * Are redo steps available?
   *
   * @return {boolean} `true` if redo is possible
   */
  canRedo() {
    return this.redoStack.length > 0;
  }
  destroy() {
    this.trackedOrigins.delete(this), this.doc.off("afterTransaction", this.afterTransactionHandler), super.destroy();
  }
}
function* oze(t) {
  const e = bt(t.restDecoder);
  for (let n = 0; n < e; n++) {
    const i = bt(t.restDecoder), r = t.readClient();
    let s = bt(t.restDecoder);
    for (let o = 0; o < i; o++) {
      const a = t.readInfo();
      if (a === 10) {
        const l = bt(t.restDecoder);
        yield new Xr(_t(r, s), l), s += l;
      } else if (zx & a) {
        const l = (a & (bl | Us)) === 0, u = new en(
          _t(r, s),
          null,
          // left
          (a & Us) === Us ? t.readLeftID() : null,
          // origin
          null,
          // right
          (a & bl) === bl ? t.readRightID() : null,
          // right origin
          // @ts-ignore Force writing a string here.
          l ? t.readParentInfo() ? t.readString() : t.readLeftID() : null,
          // parent
          l && (a & F0) === F0 ? t.readString() : null,
          // parentSub
          EJ(t, a)
          // item content
        );
        yield u, s += u.length;
      } else {
        const l = t.readLen();
        yield new bs(_t(r, s), l), s += l;
      }
    }
  }
}
class bc {
  /**
   * @param {UpdateDecoderV1 | UpdateDecoderV2} decoder
   * @param {boolean} filterSkips
   */
  constructor(e, n) {
    this.gen = oze(e), this.curr = null, this.done = !1, this.filterSkips = n, this.next();
  }
  /**
   * @return {Item | GC | Skip |null}
   */
  next() {
    do
      this.curr = this.gen.next().value || null;
    while (this.filterSkips && this.curr !== null && this.curr.constructor === Xr);
    return this.curr;
  }
}
const aze = (t) => VK(t, xo), VK = (t, e = Xs) => {
  const n = [], i = new e(Vi(t)), r = new bc(i, !1);
  for (let o = r.curr; o !== null; o = r.next())
    n.push(o);
  F6("Structs: ", n);
  const s = Pl(i);
  F6("DeleteSet: ", s);
}, lze = (t) => XK(t, xo), XK = (t, e = Xs) => {
  const n = [], i = new e(Vi(t)), r = new bc(i, !1);
  for (let s = r.curr; s !== null; s = r.next())
    n.push(s);
  return {
    structs: n,
    ds: Pl(i)
  };
};
class S8 {
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   */
  constructor(e) {
    this.currClient = 0, this.startClock = 0, this.written = 0, this.encoder = e, this.clientStructs = [];
  }
}
const GK = (t) => q0(t, xo, vc), KK = (t, e = Zx, n = Xs) => {
  const i = new e(), r = new bc(new n(Vi(t)), !1);
  let s = r.curr;
  if (s !== null) {
    let o = 0, a = s.id.client, l = s.id.clock !== 0, u = l ? 0 : s.id.clock + s.length;
    for (; s !== null; s = r.next())
      a !== s.id.client && (u !== 0 && (o++, We(i.restEncoder, a), We(i.restEncoder, u)), a = s.id.client, u = 0, l = s.id.clock !== 0), s.constructor === Xr && (l = !0), l || (u = s.id.clock + s.length);
    u !== 0 && (o++, We(i.restEncoder, a), We(i.restEncoder, u));
    const f = Wi();
    return We(f, o), TFe(f, i.restEncoder), i.restEncoder = f, i.toUint8Array();
  } else
    return We(i.restEncoder, 0), i.toUint8Array();
}, uze = (t) => KK(t, Hh, xo), JK = (t, e = Xs) => {
  const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), r = new bc(new e(Vi(t)), !1);
  let s = r.curr;
  if (s !== null) {
    let o = s.id.client, a = s.id.clock;
    for (n.set(o, a); s !== null; s = r.next())
      o !== s.id.client && (i.set(o, a), n.set(s.id.client, s.id.clock), o = s.id.client), a = s.id.clock + s.length;
    i.set(o, a);
  }
  return { from: n, to: i };
}, cze = (t) => JK(t, xo), fze = (t, e) => {
  if (t.constructor === bs) {
    const { client: n, clock: i } = t.id;
    return new bs(_t(n, i + e), t.length - e);
  } else if (t.constructor === Xr) {
    const { client: n, clock: i } = t.id;
    return new Xr(_t(n, i + e), t.length - e);
  } else {
    const n = (
      /** @type {Item} */
      t
    ), { client: i, clock: r } = n.id;
    return new en(
      _t(i, r + e),
      null,
      _t(i, r + e - 1),
      null,
      n.rightOrigin,
      n.parent,
      n.parentSub,
      n.content.splice(e)
    );
  }
}, q0 = (t, e = Xs, n = Ho) => {
  if (t.length === 1)
    return t[0];
  const i = t.map((f) => new e(Vi(f)));
  let r = i.map((f) => new bc(f, !0)), s = null;
  const o = new n(), a = new S8(o);
  for (; r = r.filter((h) => h.curr !== null), r.sort(
    /** @type {function(any,any):number} */
    (h, m) => {
      if (h.curr.id.client === m.curr.id.client) {
        const g = h.curr.id.clock - m.curr.id.clock;
        return g === 0 ? h.curr.constructor === m.curr.constructor ? 0 : h.curr.constructor === Xr ? 1 : -1 : g;
      } else
        return m.curr.id.client - h.curr.id.client;
    }
  ), r.length !== 0; ) {
    const f = r[0], d = (
      /** @type {Item | GC} */
      f.curr.id.client
    );
    if (s !== null) {
      let h = (
        /** @type {Item | GC | null} */
        f.curr
      ), m = !1;
      for (; h !== null && h.id.clock + h.length <= s.struct.id.clock + s.struct.length && h.id.client >= s.struct.id.client; )
        h = f.next(), m = !0;
      if (h === null || // current decoder is empty
      h.id.client !== d || // check whether there is another decoder that has has updates from `firstClient`
      m && h.id.clock > s.struct.id.clock + s.struct.length)
        continue;
      if (d !== s.struct.id.client)
        wu(a, s.struct, s.offset), s = { struct: h, offset: 0 }, f.next();
      else if (s.struct.id.clock + s.struct.length < h.id.clock)
        if (s.struct.constructor === Xr)
          s.struct.length = h.id.clock + h.length - s.struct.id.clock;
        else {
          wu(a, s.struct, s.offset);
          const g = h.id.clock - s.struct.id.clock - s.struct.length;
          s = { struct: new Xr(_t(d, s.struct.id.clock + s.struct.length), g), offset: 0 };
        }
      else {
        const g = s.struct.id.clock + s.struct.length - h.id.clock;
        g > 0 && (s.struct.constructor === Xr ? s.struct.length -= g : h = fze(h, g)), s.struct.mergeWith(
          /** @type {any} */
          h
        ) || (wu(a, s.struct, s.offset), s = { struct: h, offset: 0 }, f.next());
      }
    } else
      s = { struct: (
        /** @type {Item | GC} */
        f.curr
      ), offset: 0 }, f.next();
    for (let h = f.curr; h !== null && h.id.client === d && h.id.clock === s.struct.id.clock + s.struct.length && h.constructor !== Xr; h = f.next())
      wu(a, s.struct, s.offset), s = { struct: h, offset: 0 };
  }
  s !== null && (wu(a, s.struct, s.offset), s = null), E8(a);
  const l = i.map((f) => Pl(f)), u = Sf(l);
  return Da(o, u), o.toUint8Array();
}, C8 = (t, e, n = Xs, i = Ho) => {
  const r = y8(e), s = new i(), o = new S8(s), a = new n(Vi(t)), l = new bc(a, !1);
  for (; l.curr; ) {
    const f = l.curr, d = f.id.client, h = r.get(d) || 0;
    if (l.curr.constructor === Xr) {
      l.next();
      continue;
    }
    if (f.id.clock + f.length > h)
      for (wu(o, f, Hf(h - f.id.clock, 0)), l.next(); l.curr && l.curr.id.client === d; )
        wu(o, l.curr, 0), l.next();
    else
      for (; l.curr && l.curr.id.client === d && l.curr.id.clock + l.curr.length <= h; )
        l.next();
  }
  E8(o);
  const u = Pl(a);
  return Da(s, u), s.toUint8Array();
}, dze = (t, e) => C8(t, e, xo, vc), eJ = (t) => {
  t.written > 0 && (t.clientStructs.push({ written: t.written, restEncoder: Sn(t.encoder.restEncoder) }), t.encoder.restEncoder = Wi(), t.written = 0);
}, wu = (t, e, n) => {
  t.written > 0 && t.currClient !== e.id.client && eJ(t), t.written === 0 && (t.currClient = e.id.client, t.encoder.writeClient(e.id.client), We(t.encoder.restEncoder, e.id.clock + n)), e.write(t.encoder, n), t.written++;
}, E8 = (t) => {
  eJ(t);
  const e = t.encoder.restEncoder;
  We(e, t.clientStructs.length);
  for (let n = 0; n < t.clientStructs.length; n++) {
    const i = t.clientStructs[n];
    We(e, i.written), K1(e, i.restEncoder);
  }
}, Vx = (t, e, n, i) => {
  const r = new n(Vi(t)), s = new bc(r, !1), o = new i(), a = new S8(o);
  for (let u = s.curr; u !== null; u = s.next())
    wu(a, e(u), 0);
  E8(a);
  const l = Pl(r);
  return Da(o, l), o.toUint8Array();
}, tJ = ({ formatting: t = !0, subdocs: e = !0, yxml: n = !0 } = {}) => {
  let i = 0;
  const r = qi(), s = qi(), o = qi(), a = qi();
  return a.set(null, null), (l) => {
    switch (l.constructor) {
      case bs:
      case Xr:
        return l;
      case en: {
        const u = (
          /** @type {Item} */
          l
        ), f = u.content;
        switch (f.constructor) {
          case Ef:
            break;
          case _o: {
            if (n) {
              const d = (
                /** @type {ContentType} */
                f.type
              );
              d instanceof lc && (d.nodeName = Vr(s, d.nodeName, () => "node-" + i)), d instanceof Qh && (d.hookName = Vr(s, d.hookName, () => "hook-" + i));
            }
            break;
          }
          case Il: {
            const d = (
              /** @type {ContentAny} */
              f
            );
            d.arr = d.arr.map(() => i);
            break;
          }
          case Uf: {
            const d = (
              /** @type {ContentBinary} */
              f
            );
            d.content = new Uint8Array([i]);
            break;
          }
          case Zf: {
            const d = (
              /** @type {ContentDoc} */
              f
            );
            e && (d.opts = {}, d.doc.guid = i + "");
            break;
          }
          case Wl: {
            const d = (
              /** @type {ContentEmbed} */
              f
            );
            d.embed = {};
            break;
          }
          case vi: {
            const d = (
              /** @type {ContentFormat} */
              f
            );
            t && (d.key = Vr(o, d.key, () => i + ""), d.value = Vr(a, d.value, () => ({ i })));
            break;
          }
          case Uh: {
            const d = (
              /** @type {ContentJSON} */
              f
            );
            d.arr = d.arr.map(() => i);
            break;
          }
          case yo: {
            const d = (
              /** @type {ContentString} */
              f
            );
            d.str = _Fe(i % 10 + "", d.str.length);
            break;
          }
          default:
            _s();
        }
        return u.parentSub && (u.parentSub = Vr(r, u.parentSub, () => i + "")), i++, l;
      }
      default:
        _s();
    }
  };
}, hze = (t, e) => Vx(t, tJ(e), xo, vc), pze = (t, e) => Vx(t, tJ(e), Xs, Ho), mze = (t) => Vx(t, xK, xo, Ho), nJ = (t) => Vx(t, xK, Xs, vc), HR = "You must not compute changes after the event-handler fired.";
class ev {
  /**
   * @param {T} target The changed type.
   * @param {Transaction} transaction
   */
  constructor(e, n) {
    this.target = e, this.currentTarget = e, this.transaction = n, this._changes = null, this._keys = null, this._delta = null, this._path = null;
  }
  /**
   * Computes the path from `y` to the changed type.
   *
   * @todo v14 should standardize on path: Array<{parent, index}> because that is easier to work with.
   *
   * The following property holds:
   * @example
   *   let type = y
   *   event.path.forEach(dir => {
   *     type = type.get(dir)
   *   })
   *   type === event.target // => true
   */
  get path() {
    return this._path || (this._path = gze(this.currentTarget, this.target));
  }
  /**
   * Check if a struct is deleted by this event.
   *
   * In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
   *
   * @param {AbstractStruct} struct
   * @return {boolean}
   */
  deletes(e) {
    return Qf(this.transaction.deleteSet, e.id);
  }
  /**
   * @type {Map<string, { action: 'add' | 'update' | 'delete', oldValue: any }>}
   */
  get keys() {
    if (this._keys === null) {
      if (this.transaction.doc._transactionCleanups.length === 0)
        throw ic(HR);
      const e = /* @__PURE__ */ new Map(), n = this.target;
      /** @type Set<string|null> */
      this.transaction.changed.get(n).forEach((r) => {
        if (r !== null) {
          const s = (
            /** @type {Item} */
            n._map.get(r)
          );
          let o, a;
          if (this.adds(s)) {
            let l = s.left;
            for (; l !== null && this.adds(l); )
              l = l.left;
            if (this.deletes(s))
              if (l !== null && this.deletes(l))
                o = "delete", a = lS(l.content.getContent());
              else
                return;
            else
              l !== null && this.deletes(l) ? (o = "update", a = lS(l.content.getContent())) : (o = "add", a = void 0);
          } else if (this.deletes(s))
            o = "delete", a = lS(
              /** @type {Item} */
              s.content.getContent()
            );
          else
            return;
          e.set(r, { action: o, oldValue: a });
        }
      }), this._keys = e;
    }
    return this._keys;
  }
  /**
   * This is a computed property. Note that this can only be safely computed during the
   * event call. Computing this property after other changes happened might result in
   * unexpected behavior (incorrect computation of deltas). A safe way to collect changes
   * is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
   *
   * @type {Array<{insert?: string | Array<any> | object | AbstractType<any>, retain?: number, delete?: number, attributes?: Object<string, any>}>}
   */
  get delta() {
    return this.changes.delta;
  }
  /**
   * Check if a struct is added by this event.
   *
   * In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
   *
   * @param {AbstractStruct} struct
   * @return {boolean}
   */
  adds(e) {
    return e.id.clock >= (this.transaction.beforeState.get(e.id.client) || 0);
  }
  /**
   * This is a computed property. Note that this can only be safely computed during the
   * event call. Computing this property after other changes happened might result in
   * unexpected behavior (incorrect computation of deltas). A safe way to collect changes
   * is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
   *
   * @type {{added:Set<Item>,deleted:Set<Item>,keys:Map<string,{action:'add'|'update'|'delete',oldValue:any}>,delta:Array<{insert?:Array<any>|string, delete?:number, retain?:number}>}}
   */
  get changes() {
    let e = this._changes;
    if (e === null) {
      if (this.transaction.doc._transactionCleanups.length === 0)
        throw ic(HR);
      const n = this.target, i = nc(), r = nc(), s = [];
      if (e = {
        added: i,
        deleted: r,
        delta: s,
        keys: this.keys
      }, /** @type Set<string|null> */
      this.transaction.changed.get(n).has(null)) {
        let a = null;
        const l = () => {
          a && s.push(a);
        };
        for (let u = n._start; u !== null; u = u.right)
          u.deleted ? this.deletes(u) && !this.adds(u) && ((a === null || a.delete === void 0) && (l(), a = { delete: 0 }), a.delete += u.length, r.add(u)) : this.adds(u) ? ((a === null || a.insert === void 0) && (l(), a = { insert: [] }), a.insert = a.insert.concat(u.content.getContent()), i.add(u)) : ((a === null || a.retain === void 0) && (l(), a = { retain: 0 }), a.retain += u.length);
        a !== null && a.retain === void 0 && l();
      }
      this._changes = e;
    }
    return (
      /** @type {any} */
      e
    );
  }
}
const gze = (t, e) => {
  const n = [];
  for (; e._item !== null && e !== t; ) {
    if (e._item.parentSub !== null)
      n.unshift(e._item.parentSub);
    else {
      let i = 0, r = (
        /** @type {AbstractType<any>} */
        e._item.parent._start
      );
      for (; r !== e._item && r !== null; )
        !r.deleted && r.countable && (i += r.length), r = r.right;
      n.unshift(i);
    }
    e = /** @type {AbstractType<any>} */
    e._item.parent;
  }
  return n;
}, iJ = (t) => ({
  /**
   * @return {IterableIterator<T>}
   */
  [Symbol.iterator]() {
    return this;
  },
  // @ts-ignore
  next: t
}), vze = (t, e) => iJ(() => {
  let n;
  do
    n = t.next();
  while (!n.done && !e(n.value));
  return n;
}), hS = (t, e) => iJ(() => {
  const { done: n, value: i } = t.next();
  return { done: n, value: n ? void 0 : e(i) };
}), mr = () => {
  HK("Invalid access: Add Yjs type to a document before reading data.");
}, rJ = 80;
let T8 = 0;
class bze {
  /**
   * @param {Item} p
   * @param {number} index
   */
  constructor(e, n) {
    e.marker = !0, this.p = e, this.index = n, this.timestamp = T8++;
  }
}
const yze = (t) => {
  t.timestamp = T8++;
}, sJ = (t, e, n) => {
  t.p.marker = !1, t.p = e, e.marker = !0, t.index = n, t.timestamp = T8++;
}, wze = (t, e, n) => {
  if (t.length >= rJ) {
    const i = t.reduce((r, s) => r.timestamp < s.timestamp ? r : s);
    return sJ(i, e, n), i;
  } else {
    const i = new bze(e, n);
    return t.push(i), i;
  }
}, Xx = (t, e) => {
  if (t._start === null || e === 0 || t._searchMarker === null)
    return null;
  const n = t._searchMarker.length === 0 ? null : t._searchMarker.reduce((s, o) => Ry(e - s.index) < Ry(e - o.index) ? s : o);
  let i = t._start, r = 0;
  for (n !== null && (i = n.p, r = n.index, yze(n)); i.right !== null && r < e; ) {
    if (!i.deleted && i.countable) {
      if (e < r + i.length)
        break;
      r += i.length;
    }
    i = i.right;
  }
  for (; i.left !== null && r > e; )
    i = i.left, !i.deleted && i.countable && (r -= i.length);
  for (; i.left !== null && i.left.id.client === i.id.client && i.left.id.clock + i.left.length === i.id.clock; )
    i = i.left, !i.deleted && i.countable && (r -= i.length);
  return n !== null && Ry(n.index - r) < /** @type {YText|YArray<any>} */
  i.parent.length / rJ ? (sJ(n, i, r), n) : wze(t._searchMarker, i, r);
}, Y0 = (t, e, n) => {
  for (let i = t.length - 1; i >= 0; i--) {
    const r = t[i];
    if (n > 0) {
      let s = r.p;
      for (s.marker = !1; s && (s.deleted || !s.countable); )
        s = s.left, s && !s.deleted && s.countable && (r.index -= s.length);
      if (s === null || s.marker === !0) {
        t.splice(i, 1);
        continue;
      }
      r.p = s, s.marker = !0;
    }
    (e < r.index || n > 0 && e === r.index) && (r.index = Hf(e, r.index + n));
  }
}, kze = (t) => {
  t.doc ?? mr();
  let e = t._start;
  const n = [];
  for (; e; )
    n.push(e), e = e.right;
  return n;
}, Gx = (t, e, n) => {
  const i = t, r = e.changedParentTypes;
  for (; Vr(r, t, () => []).push(n), t._item !== null; )
    t = /** @type {AbstractType<any>} */
    t._item.parent;
  AK(i._eH, n, e);
};
class ji {
  constructor() {
    this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = PR(), this._dEH = PR(), this._searchMarker = null;
  }
  /**
   * @return {AbstractType<any>|null}
   */
  get parent() {
    return this._item ? (
      /** @type {AbstractType<any>} */
      this._item.parent
    ) : null;
  }
  /**
   * Integrate this type into the Yjs instance.
   *
   * * Save this struct in the os
   * * This type is sent to other client
   * * Observer functions are fired
   *
   * @param {Doc} y The Yjs instance
   * @param {Item|null} item
   */
  _integrate(e, n) {
    this.doc = e, this._item = n;
  }
  /**
   * @return {AbstractType<EventType>}
   */
  _copy() {
    throw Ta();
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {AbstractType<EventType>}
   */
  clone() {
    throw Ta();
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} _encoder
   */
  _write(e) {
  }
  /**
   * The first non-deleted item
   */
  get _first() {
    let e = this._start;
    for (; e !== null && e.deleted; )
      e = e.right;
    return e;
  }
  /**
   * Creates YEvent and calls all type observers.
   * Must be implemented by each type.
   *
   * @param {Transaction} transaction
   * @param {Set<null|string>} _parentSubs Keys changed on this type. `null` if list was modified.
   */
  _callObserver(e, n) {
    !e.local && this._searchMarker && (this._searchMarker.length = 0);
  }
  /**
   * Observe all events that are created on this type.
   *
   * @param {function(EventType, Transaction):void} f Observer function
   */
  observe(e) {
    IR(this._eH, e);
  }
  /**
   * Observe all events that are created by this type and its children.
   *
   * @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
   */
  observeDeep(e) {
    IR(this._dEH, e);
  }
  /**
   * Unregister an observer function.
   *
   * @param {function(EventType,Transaction):void} f Observer function
   */
  unobserve(e) {
    LR(this._eH, e);
  }
  /**
   * Unregister an observer function.
   *
   * @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
   */
  unobserveDeep(e) {
    LR(this._dEH, e);
  }
  /**
   * @abstract
   * @return {any}
   */
  toJSON() {
  }
}
const oJ = (t, e, n) => {
  t.doc ?? mr(), e < 0 && (e = t._length + e), n < 0 && (n = t._length + n);
  let i = n - e;
  const r = [];
  let s = t._start;
  for (; s !== null && i > 0; ) {
    if (s.countable && !s.deleted) {
      const o = s.content.getContent();
      if (o.length <= e)
        e -= o.length;
      else {
        for (let a = e; a < o.length && i > 0; a++)
          r.push(o[a]), i--;
        e = 0;
      }
    }
    s = s.right;
  }
  return r;
}, aJ = (t) => {
  t.doc ?? mr();
  const e = [];
  let n = t._start;
  for (; n !== null; ) {
    if (n.countable && !n.deleted) {
      const i = n.content.getContent();
      for (let r = 0; r < i.length; r++)
        e.push(i[r]);
    }
    n = n.right;
  }
  return e;
}, xze = (t, e) => {
  const n = [];
  let i = t._start;
  for (; i !== null; ) {
    if (i.countable && yu(i, e)) {
      const r = i.content.getContent();
      for (let s = 0; s < r.length; s++)
        n.push(r[s]);
    }
    i = i.right;
  }
  return n;
}, V0 = (t, e) => {
  let n = 0, i = t._start;
  for (t.doc ?? mr(); i !== null; ) {
    if (i.countable && !i.deleted) {
      const r = i.content.getContent();
      for (let s = 0; s < r.length; s++)
        e(r[s], n++, t);
    }
    i = i.right;
  }
}, lJ = (t, e) => {
  const n = [];
  return V0(t, (i, r) => {
    n.push(e(i, r, t));
  }), n;
}, _ze = (t) => {
  let e = t._start, n = null, i = 0;
  return {
    [Symbol.iterator]() {
      return this;
    },
    next: () => {
      if (n === null) {
        for (; e !== null && e.deleted; )
          e = e.right;
        if (e === null)
          return {
            done: !0,
            value: void 0
          };
        n = e.content.getContent(), i = 0, e = e.right;
      }
      const r = n[i++];
      return n.length <= i && (n = null), {
        done: !1,
        value: r
      };
    }
  };
}, uJ = (t, e) => {
  t.doc ?? mr();
  const n = Xx(t, e);
  let i = t._start;
  for (n !== null && (i = n.p, e -= n.index); i !== null; i = i.right)
    if (!i.deleted && i.countable) {
      if (e < i.length)
        return i.content.getContent()[e];
      e -= i.length;
    }
}, yk = (t, e, n, i) => {
  let r = n;
  const s = t.doc, o = s.clientID, a = s.store, l = n === null ? e._start : n.right;
  let u = [];
  const f = () => {
    u.length > 0 && (r = new en(_t(o, Un(a, o)), r, r && r.lastId, l, l && l.id, e, null, new Il(u)), r.integrate(t, 0), u = []);
  };
  i.forEach((d) => {
    if (d === null)
      u.push(d);
    else
      switch (d.constructor) {
        case Number:
        case Object:
        case Boolean:
        case Array:
        case String:
          u.push(d);
          break;
        default:
          switch (f(), d.constructor) {
            case Uint8Array:
            case ArrayBuffer:
              r = new en(_t(o, Un(a, o)), r, r && r.lastId, l, l && l.id, e, null, new Uf(new Uint8Array(
                /** @type {Uint8Array} */
                d
              ))), r.integrate(t, 0);
              break;
            case Bl:
              r = new en(_t(o, Un(a, o)), r, r && r.lastId, l, l && l.id, e, null, new Zf(
                /** @type {Doc} */
                d
              )), r.integrate(t, 0);
              break;
            default:
              if (d instanceof ji)
                r = new en(_t(o, Un(a, o)), r, r && r.lastId, l, l && l.id, e, null, new _o(d)), r.integrate(t, 0);
              else
                throw new Error("Unexpected content type in insert operation");
          }
      }
  }), f();
}, cJ = () => ic("Length exceeded!"), fJ = (t, e, n, i) => {
  if (n > e._length)
    throw cJ();
  if (n === 0)
    return e._searchMarker && Y0(e._searchMarker, n, i.length), yk(t, e, null, i);
  const r = n, s = Xx(e, n);
  let o = e._start;
  for (s !== null && (o = s.p, n -= s.index, n === 0 && (o = o.prev, n += o && o.countable && !o.deleted ? o.length : 0)); o !== null; o = o.right)
    if (!o.deleted && o.countable) {
      if (n <= o.length) {
        n < o.length && Nr(t, _t(o.id.client, o.id.clock + n));
        break;
      }
      n -= o.length;
    }
  return e._searchMarker && Y0(e._searchMarker, r, i.length), yk(t, e, o, i);
}, Oze = (t, e, n) => {
  let r = (e._searchMarker || []).reduce((s, o) => o.index > s.index ? o : s, { index: 0, p: e._start }).p;
  if (r)
    for (; r.right; )
      r = r.right;
  return yk(t, e, r, n);
}, dJ = (t, e, n, i) => {
  if (i === 0)
    return;
  const r = n, s = i, o = Xx(e, n);
  let a = e._start;
  for (o !== null && (a = o.p, n -= o.index); a !== null && n > 0; a = a.right)
    !a.deleted && a.countable && (n < a.length && Nr(t, _t(a.id.client, a.id.clock + n)), n -= a.length);
  for (; i > 0 && a !== null; )
    a.deleted || (i < a.length && Nr(t, _t(a.id.client, a.id.clock + i)), a.delete(t), i -= a.length), a = a.right;
  if (i > 0)
    throw cJ();
  e._searchMarker && Y0(
    e._searchMarker,
    r,
    -s + i
    /* in case we remove the above exception */
  );
}, wk = (t, e, n) => {
  const i = e._map.get(n);
  i !== void 0 && i.delete(t);
}, $8 = (t, e, n, i) => {
  const r = e._map.get(n) || null, s = t.doc, o = s.clientID;
  let a;
  if (i == null)
    a = new Il([i]);
  else
    switch (i.constructor) {
      case Number:
      case Object:
      case Boolean:
      case Array:
      case String:
      case Date:
      case BigInt:
        a = new Il([i]);
        break;
      case Uint8Array:
        a = new Uf(
          /** @type {Uint8Array} */
          i
        );
        break;
      case Bl:
        a = new Zf(
          /** @type {Doc} */
          i
        );
        break;
      default:
        if (i instanceof ji)
          a = new _o(i);
        else
          throw new Error("Unexpected content type");
    }
  new en(_t(o, Un(s.store, o)), r, r && r.lastId, null, null, e, n, a).integrate(t, 0);
}, M8 = (t, e) => {
  t.doc ?? mr();
  const n = t._map.get(e);
  return n !== void 0 && !n.deleted ? n.content.getContent()[n.length - 1] : void 0;
}, hJ = (t) => {
  const e = {};
  return t.doc ?? mr(), t._map.forEach((n, i) => {
    n.deleted || (e[i] = n.content.getContent()[n.length - 1]);
  }), e;
}, pJ = (t, e) => {
  t.doc ?? mr();
  const n = t._map.get(e);
  return n !== void 0 && !n.deleted;
}, Sze = (t, e, n) => {
  let i = t._map.get(e) || null;
  for (; i !== null && (!n.sv.has(i.id.client) || i.id.clock >= (n.sv.get(i.id.client) || 0)); )
    i = i.left;
  return i !== null && yu(i, n) ? i.content.getContent()[i.length - 1] : void 0;
}, mJ = (t, e) => {
  const n = {};
  return t._map.forEach((i, r) => {
    let s = i;
    for (; s !== null && (!e.sv.has(s.id.client) || s.id.clock >= (e.sv.get(s.id.client) || 0)); )
      s = s.left;
    s !== null && yu(s, e) && (n[r] = s.content.getContent()[s.length - 1]);
  }), n;
}, qb = (t) => (t.doc ?? mr(), vze(
  t._map.entries(),
  /** @param {any} entry */
  (e) => !e[1].deleted
));
class gJ extends ev {
}
class wl extends ji {
  constructor() {
    super(), this._prelimContent = [], this._searchMarker = [];
  }
  /**
   * Construct a new YArray containing the specified items.
   * @template {Object<string,any>|Array<any>|number|null|string|Uint8Array} T
   * @param {Array<T>} items
   * @return {YArray<T>}
   */
  static from(e) {
    const n = new wl();
    return n.push(e), n;
  }
  /**
   * Integrate this type into the Yjs instance.
   *
   * * Save this struct in the os
   * * This type is sent to other client
   * * Observer functions are fired
   *
   * @param {Doc} y The Yjs instance
   * @param {Item} item
   */
  _integrate(e, n) {
    super._integrate(e, n), this.insert(
      0,
      /** @type {Array<any>} */
      this._prelimContent
    ), this._prelimContent = null;
  }
  /**
   * @return {YArray<T>}
   */
  _copy() {
    return new wl();
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {YArray<T>}
   */
  clone() {
    const e = new wl();
    return e.insert(0, this.toArray().map(
      (n) => n instanceof ji ? (
        /** @type {typeof el} */
        n.clone()
      ) : n
    )), e;
  }
  get length() {
    return this.doc ?? mr(), this._length;
  }
  /**
   * Creates YArrayEvent and calls observers.
   *
   * @param {Transaction} transaction
   * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
   */
  _callObserver(e, n) {
    super._callObserver(e, n), Gx(this, e, new gJ(this, e));
  }
  /**
   * Inserts new content at an index.
   *
   * Important: This function expects an array of content. Not just a content
   * object. The reason for this "weirdness" is that inserting several elements
   * is very efficient when it is done as a single operation.
   *
   * @example
   *  // Insert character 'a' at position 0
   *  yarray.insert(0, ['a'])
   *  // Insert numbers 1, 2 at position 1
   *  yarray.insert(1, [1, 2])
   *
   * @param {number} index The index to insert content at.
   * @param {Array<T>} content The array of content
   */
  insert(e, n) {
    this.doc !== null ? nn(this.doc, (i) => {
      fJ(
        i,
        this,
        e,
        /** @type {any} */
        n
      );
    }) : this._prelimContent.splice(e, 0, ...n);
  }
  /**
   * Appends content to this YArray.
   *
   * @param {Array<T>} content Array of content to append.
   *
   * @todo Use the following implementation in all types.
   */
  push(e) {
    this.doc !== null ? nn(this.doc, (n) => {
      Oze(
        n,
        this,
        /** @type {any} */
        e
      );
    }) : this._prelimContent.push(...e);
  }
  /**
   * Prepends content to this YArray.
   *
   * @param {Array<T>} content Array of content to prepend.
   */
  unshift(e) {
    this.insert(0, e);
  }
  /**
   * Deletes elements starting from an index.
   *
   * @param {number} index Index at which to start deleting elements
   * @param {number} length The number of elements to remove. Defaults to 1.
   */
  delete(e, n = 1) {
    this.doc !== null ? nn(this.doc, (i) => {
      dJ(i, this, e, n);
    }) : this._prelimContent.splice(e, n);
  }
  /**
   * Returns the i-th element from a YArray.
   *
   * @param {number} index The index of the element to return from the YArray
   * @return {T}
   */
  get(e) {
    return uJ(this, e);
  }
  /**
   * Transforms this YArray to a JavaScript Array.
   *
   * @return {Array<T>}
   */
  toArray() {
    return aJ(this);
  }
  /**
   * Returns a portion of this YArray into a JavaScript Array selected
   * from start to end (end not included).
   *
   * @param {number} [start]
   * @param {number} [end]
   * @return {Array<T>}
   */
  slice(e = 0, n = this.length) {
    return oJ(this, e, n);
  }
  /**
   * Transforms this Shared Type to a JSON object.
   *
   * @return {Array<any>}
   */
  toJSON() {
    return this.map((e) => e instanceof ji ? e.toJSON() : e);
  }
  /**
   * Returns an Array with the result of calling a provided function on every
   * element of this YArray.
   *
   * @template M
   * @param {function(T,number,YArray<T>):M} f Function that produces an element of the new Array
   * @return {Array<M>} A new array with each element being the result of the
   *                 callback function
   */
  map(e) {
    return lJ(
      this,
      /** @type {any} */
      e
    );
  }
  /**
   * Executes a provided function once on every element of this YArray.
   *
   * @param {function(T,number,YArray<T>):void} f A function to execute on every element of this YArray.
   */
  forEach(e) {
    V0(this, e);
  }
  /**
   * @return {IterableIterator<T>}
   */
  [Symbol.iterator]() {
    return _ze(this);
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   */
  _write(e) {
    e.writeTypeRef(Zze);
  }
}
const Cze = (t) => new wl();
class vJ extends ev {
  /**
   * @param {YMap<T>} ymap The YArray that changed.
   * @param {Transaction} transaction
   * @param {Set<any>} subs The keys that changed.
   */
  constructor(e, n, i) {
    super(e, n), this.keysChanged = i;
  }
}
class oc extends ji {
  /**
   *
   * @param {Iterable<readonly [string, any]>=} entries - an optional iterable to initialize the YMap
   */
  constructor(e) {
    super(), this._prelimContent = null, e === void 0 ? this._prelimContent = /* @__PURE__ */ new Map() : this._prelimContent = new Map(e);
  }
  /**
   * Integrate this type into the Yjs instance.
   *
   * * Save this struct in the os
   * * This type is sent to other client
   * * Observer functions are fired
   *
   * @param {Doc} y The Yjs instance
   * @param {Item} item
   */
  _integrate(e, n) {
    super._integrate(e, n), this._prelimContent.forEach((i, r) => {
      this.set(r, i);
    }), this._prelimContent = null;
  }
  /**
   * @return {YMap<MapType>}
   */
  _copy() {
    return new oc();
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {YMap<MapType>}
   */
  clone() {
    const e = new oc();
    return this.forEach((n, i) => {
      e.set(i, n instanceof ji ? (
        /** @type {typeof value} */
        n.clone()
      ) : n);
    }), e;
  }
  /**
   * Creates YMapEvent and calls observers.
   *
   * @param {Transaction} transaction
   * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
   */
  _callObserver(e, n) {
    Gx(this, e, new vJ(this, e, n));
  }
  /**
   * Transforms this Shared Type to a JSON object.
   *
   * @return {Object<string,any>}
   */
  toJSON() {
    this.doc ?? mr();
    const e = {};
    return this._map.forEach((n, i) => {
      if (!n.deleted) {
        const r = n.content.getContent()[n.length - 1];
        e[i] = r instanceof ji ? r.toJSON() : r;
      }
    }), e;
  }
  /**
   * Returns the size of the YMap (count of key/value pairs)
   *
   * @return {number}
   */
  get size() {
    return [...qb(this)].length;
  }
  /**
   * Returns the keys for each element in the YMap Type.
   *
   * @return {IterableIterator<string>}
   */
  keys() {
    return hS(
      qb(this),
      /** @param {any} v */
      (e) => e[0]
    );
  }
  /**
   * Returns the values for each element in the YMap Type.
   *
   * @return {IterableIterator<MapType>}
   */
  values() {
    return hS(
      qb(this),
      /** @param {any} v */
      (e) => e[1].content.getContent()[e[1].length - 1]
    );
  }
  /**
   * Returns an Iterator of [key, value] pairs
   *
   * @return {IterableIterator<[string, MapType]>}
   */
  entries() {
    return hS(
      qb(this),
      /** @param {any} v */
      (e) => (
        /** @type {any} */
        [e[0], e[1].content.getContent()[e[1].length - 1]]
      )
    );
  }
  /**
   * Executes a provided function on once on every key-value pair.
   *
   * @param {function(MapType,string,YMap<MapType>):void} f A function to execute on every element of this YArray.
   */
  forEach(e) {
    this.doc ?? mr(), this._map.forEach((n, i) => {
      n.deleted || e(n.content.getContent()[n.length - 1], i, this);
    });
  }
  /**
   * Returns an Iterator of [key, value] pairs
   *
   * @return {IterableIterator<[string, MapType]>}
   */
  [Symbol.iterator]() {
    return this.entries();
  }
  /**
   * Remove a specified element from this YMap.
   *
   * @param {string} key The key of the element to remove.
   */
  delete(e) {
    this.doc !== null ? nn(this.doc, (n) => {
      wk(n, this, e);
    }) : this._prelimContent.delete(e);
  }
  /**
   * Adds or updates an element with a specified key and value.
   * @template {MapType} VAL
   *
   * @param {string} key The key of the element to add to this YMap
   * @param {VAL} value The value of the element to add
   * @return {VAL}
   */
  set(e, n) {
    return this.doc !== null ? nn(this.doc, (i) => {
      $8(
        i,
        this,
        e,
        /** @type {any} */
        n
      );
    }) : this._prelimContent.set(e, n), n;
  }
  /**
   * Returns a specified element from this YMap.
   *
   * @param {string} key
   * @return {MapType|undefined}
   */
  get(e) {
    return (
      /** @type {any} */
      M8(this, e)
    );
  }
  /**
   * Returns a boolean indicating whether the specified key exists or not.
   *
   * @param {string} key The key to test.
   * @return {boolean}
   */
  has(e) {
    return pJ(this, e);
  }
  /**
   * Removes all elements from this YMap.
   */
  clear() {
    this.doc !== null ? nn(this.doc, (e) => {
      this.forEach(function(n, i, r) {
        wk(e, r, i);
      });
    }) : this._prelimContent.clear();
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   */
  _write(e) {
    e.writeTypeRef(qze);
  }
}
const Eze = (t) => new oc(), Nu = (t, e) => t === e || typeof t == "object" && typeof e == "object" && t && e && eBe(t, e);
class B6 {
  /**
   * @param {Item|null} left
   * @param {Item|null} right
   * @param {number} index
   * @param {Map<string,any>} currentAttributes
   */
  constructor(e, n, i, r) {
    this.left = e, this.right = n, this.index = i, this.currentAttributes = r;
  }
  /**
   * Only call this if you know that this.right is defined
   */
  forward() {
    switch (this.right === null && _s(), this.right.content.constructor) {
      case vi:
        this.right.deleted || Tp(
          this.currentAttributes,
          /** @type {ContentFormat} */
          this.right.content
        );
        break;
      default:
        this.right.deleted || (this.index += this.right.length);
        break;
    }
    this.left = this.right, this.right = this.right.right;
  }
}
const QR = (t, e, n) => {
  for (; e.right !== null && n > 0; ) {
    switch (e.right.content.constructor) {
      case vi:
        e.right.deleted || Tp(
          e.currentAttributes,
          /** @type {ContentFormat} */
          e.right.content
        );
        break;
      default:
        e.right.deleted || (n < e.right.length && Nr(t, _t(e.right.id.client, e.right.id.clock + n)), e.index += e.right.length, n -= e.right.length);
        break;
    }
    e.left = e.right, e.right = e.right.right;
  }
  return e;
}, Yb = (t, e, n, i) => {
  const r = /* @__PURE__ */ new Map(), s = i ? Xx(e, n) : null;
  if (s) {
    const o = new B6(s.p.left, s.p, s.index, r);
    return QR(t, o, n - s.index);
  } else {
    const o = new B6(null, e._start, 0, r);
    return QR(t, o, n);
  }
}, bJ = (t, e, n, i) => {
  for (; n.right !== null && (n.right.deleted === !0 || n.right.content.constructor === vi && Nu(
    i.get(
      /** @type {ContentFormat} */
      n.right.content.key
    ),
    /** @type {ContentFormat} */
    n.right.content.value
  )); )
    n.right.deleted || i.delete(
      /** @type {ContentFormat} */
      n.right.content.key
    ), n.forward();
  const r = t.doc, s = r.clientID;
  i.forEach((o, a) => {
    const l = n.left, u = n.right, f = new en(_t(s, Un(r.store, s)), l, l && l.lastId, u, u && u.id, e, null, new vi(a, o));
    f.integrate(t, 0), n.right = f, n.forward();
  });
}, Tp = (t, e) => {
  const { key: n, value: i } = e;
  i === null ? t.delete(n) : t.set(n, i);
}, yJ = (t, e) => {
  for (; t.right !== null; ) {
    if (!(t.right.deleted || t.right.content.constructor === vi && Nu(
      e[
        /** @type {ContentFormat} */
        t.right.content.key
      ] ?? null,
      /** @type {ContentFormat} */
      t.right.content.value
    ))) break;
    t.forward();
  }
}, wJ = (t, e, n, i) => {
  const r = t.doc, s = r.clientID, o = /* @__PURE__ */ new Map();
  for (const a in i) {
    const l = i[a], u = n.currentAttributes.get(a) ?? null;
    if (!Nu(u, l)) {
      o.set(a, u);
      const { left: f, right: d } = n;
      n.right = new en(_t(s, Un(r.store, s)), f, f && f.lastId, d, d && d.id, e, null, new vi(a, l)), n.right.integrate(t, 0), n.forward();
    }
  }
  return o;
}, pS = (t, e, n, i, r) => {
  n.currentAttributes.forEach((h, m) => {
    r[m] === void 0 && (r[m] = null);
  });
  const s = t.doc, o = s.clientID;
  yJ(n, r);
  const a = wJ(t, e, n, r), l = i.constructor === String ? new yo(
    /** @type {string} */
    i
  ) : i instanceof ji ? new _o(i) : new Wl(i);
  let { left: u, right: f, index: d } = n;
  e._searchMarker && Y0(e._searchMarker, n.index, l.getLength()), f = new en(_t(o, Un(s.store, o)), u, u && u.lastId, f, f && f.id, e, null, l), f.integrate(t, 0), n.right = f, n.index = d, n.forward(), bJ(t, e, n, a);
}, UR = (t, e, n, i, r) => {
  const s = t.doc, o = s.clientID;
  yJ(n, r);
  const a = wJ(t, e, n, r);
  e: for (; n.right !== null && (i > 0 || a.size > 0 && (n.right.deleted || n.right.content.constructor === vi)); ) {
    if (!n.right.deleted)
      switch (n.right.content.constructor) {
        case vi: {
          const { key: l, value: u } = (
            /** @type {ContentFormat} */
            n.right.content
          ), f = r[l];
          if (f !== void 0) {
            if (Nu(f, u))
              a.delete(l);
            else {
              if (i === 0)
                break e;
              a.set(l, u);
            }
            n.right.delete(t);
          } else
            n.currentAttributes.set(l, u);
          break;
        }
        default:
          i < n.right.length && Nr(t, _t(n.right.id.client, n.right.id.clock + i)), i -= n.right.length;
          break;
      }
    n.forward();
  }
  if (i > 0) {
    let l = "";
    for (; i > 0; i--)
      l += `
`;
    n.right = new en(_t(o, Un(s.store, o)), n.left, n.left && n.left.lastId, n.right, n.right && n.right.id, e, null, new yo(l)), n.right.integrate(t, 0), n.forward();
  }
  bJ(t, e, n, a);
}, kJ = (t, e, n, i, r) => {
  let s = e;
  const o = qi();
  for (; s && (!s.countable || s.deleted); ) {
    if (!s.deleted && s.content.constructor === vi) {
      const u = (
        /** @type {ContentFormat} */
        s.content
      );
      o.set(u.key, u);
    }
    s = s.right;
  }
  let a = 0, l = !1;
  for (; e !== s; ) {
    if (n === e && (l = !0), !e.deleted) {
      const u = e.content;
      switch (u.constructor) {
        case vi: {
          const { key: f, value: d } = (
            /** @type {ContentFormat} */
            u
          ), h = i.get(f) ?? null;
          (o.get(f) !== u || h === d) && (e.delete(t), a++, !l && (r.get(f) ?? null) === d && h !== d && (h === null ? r.delete(f) : r.set(f, h))), !l && !e.deleted && Tp(
            r,
            /** @type {ContentFormat} */
            u
          );
          break;
        }
      }
    }
    e = /** @type {Item} */
    e.right;
  }
  return a;
}, Tze = (t, e) => {
  for (; e && e.right && (e.right.deleted || !e.right.countable); )
    e = e.right;
  const n = /* @__PURE__ */ new Set();
  for (; e && (e.deleted || !e.countable); ) {
    if (!e.deleted && e.content.constructor === vi) {
      const i = (
        /** @type {ContentFormat} */
        e.content.key
      );
      n.has(i) ? e.delete(t) : n.add(i);
    }
    e = e.left;
  }
}, xJ = (t) => {
  let e = 0;
  return nn(
    /** @type {Doc} */
    t.doc,
    (n) => {
      let i = (
        /** @type {Item} */
        t._start
      ), r = t._start, s = qi();
      const o = N6(s);
      for (; r; ) {
        if (r.deleted === !1)
          switch (r.content.constructor) {
            case vi:
              Tp(
                o,
                /** @type {ContentFormat} */
                r.content
              );
              break;
            default:
              e += kJ(n, i, r, s, o), s = N6(o), i = r;
              break;
          }
        r = r.right;
      }
    }
  ), e;
}, $ze = (t) => {
  const e = /* @__PURE__ */ new Set(), n = t.doc;
  for (const [i, r] of t.afterState.entries()) {
    const s = t.beforeState.get(i) || 0;
    r !== s && jK(
      t,
      /** @type {Array<Item|GC>} */
      n.store.clients.get(i),
      s,
      r,
      (o) => {
        !o.deleted && /** @type {Item} */
        o.content.constructor === vi && o.constructor !== bs && e.add(
          /** @type {any} */
          o.parent
        );
      }
    );
  }
  nn(n, (i) => {
    Of(t, t.deleteSet, (r) => {
      if (r instanceof bs || !/** @type {YText} */
      r.parent._hasFormatting || e.has(
        /** @type {YText} */
        r.parent
      ))
        return;
      const s = (
        /** @type {YText} */
        r.parent
      );
      r.content.constructor === vi ? e.add(s) : Tze(i, r);
    });
    for (const r of e)
      xJ(r);
  });
}, ZR = (t, e, n) => {
  const i = n, r = N6(e.currentAttributes), s = e.right;
  for (; n > 0 && e.right !== null; ) {
    if (e.right.deleted === !1)
      switch (e.right.content.constructor) {
        case _o:
        case Wl:
        case yo:
          n < e.right.length && Nr(t, _t(e.right.id.client, e.right.id.clock + n)), n -= e.right.length, e.right.delete(t);
          break;
      }
    e.forward();
  }
  s && kJ(t, s, e.right, r, e.currentAttributes);
  const o = (
    /** @type {AbstractType<any>} */
    /** @type {Item} */
    (e.left || e.right).parent
  );
  return o._searchMarker && Y0(o._searchMarker, e.index, -i + n), e;
};
class _J extends ev {
  /**
   * @param {YText} ytext
   * @param {Transaction} transaction
   * @param {Set<any>} subs The keys that changed
   */
  constructor(e, n, i) {
    super(e, n), this.childListChanged = !1, this.keysChanged = /* @__PURE__ */ new Set(), i.forEach((r) => {
      r === null ? this.childListChanged = !0 : this.keysChanged.add(r);
    });
  }
  /**
   * @type {{added:Set<Item>,deleted:Set<Item>,keys:Map<string,{action:'add'|'update'|'delete',oldValue:any}>,delta:Array<{insert?:Array<any>|string, delete?:number, retain?:number}>}}
   */
  get changes() {
    if (this._changes === null) {
      const e = {
        keys: this.keys,
        delta: this.delta,
        added: /* @__PURE__ */ new Set(),
        deleted: /* @__PURE__ */ new Set()
      };
      this._changes = e;
    }
    return (
      /** @type {any} */
      this._changes
    );
  }
  /**
   * Compute the changes in the delta format.
   * A {@link https://quilljs.com/docs/delta/|Quill Delta}) that represents the changes on the document.
   *
   * @type {Array<{insert?:string|object|AbstractType<any>, delete?:number, retain?:number, attributes?: Object<string,any>}>}
   *
   * @public
   */
  get delta() {
    if (this._delta === null) {
      const e = (
        /** @type {Doc} */
        this.target.doc
      ), n = [];
      nn(e, (i) => {
        const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
        let o = this.target._start, a = null;
        const l = {};
        let u = "", f = 0, d = 0;
        const h = () => {
          if (a !== null) {
            let m = null;
            switch (a) {
              case "delete":
                d > 0 && (m = { delete: d }), d = 0;
                break;
              case "insert":
                (typeof u == "object" || u.length > 0) && (m = { insert: u }, r.size > 0 && (m.attributes = {}, r.forEach((g, w) => {
                  g !== null && (m.attributes[w] = g);
                }))), u = "";
                break;
              case "retain":
                f > 0 && (m = { retain: f }, KFe(l) || (m.attributes = VFe({}, l))), f = 0;
                break;
            }
            m && n.push(m), a = null;
          }
        };
        for (; o !== null; ) {
          switch (o.content.constructor) {
            case _o:
            case Wl:
              this.adds(o) ? this.deletes(o) || (h(), a = "insert", u = o.content.getContent()[0], h()) : this.deletes(o) ? (a !== "delete" && (h(), a = "delete"), d += 1) : o.deleted || (a !== "retain" && (h(), a = "retain"), f += 1);
              break;
            case yo:
              this.adds(o) ? this.deletes(o) || (a !== "insert" && (h(), a = "insert"), u += /** @type {ContentString} */
              o.content.str) : this.deletes(o) ? (a !== "delete" && (h(), a = "delete"), d += o.length) : o.deleted || (a !== "retain" && (h(), a = "retain"), f += o.length);
              break;
            case vi: {
              const { key: m, value: g } = (
                /** @type {ContentFormat} */
                o.content
              );
              if (this.adds(o)) {
                if (!this.deletes(o)) {
                  const w = r.get(m) ?? null;
                  Nu(w, g) ? g !== null && o.delete(i) : (a === "retain" && h(), Nu(g, s.get(m) ?? null) ? delete l[m] : l[m] = g);
                }
              } else if (this.deletes(o)) {
                s.set(m, g);
                const w = r.get(m) ?? null;
                Nu(w, g) || (a === "retain" && h(), l[m] = w);
              } else if (!o.deleted) {
                s.set(m, g);
                const w = l[m];
                w !== void 0 && (Nu(w, g) ? w !== null && o.delete(i) : (a === "retain" && h(), g === null ? delete l[m] : l[m] = g));
              }
              o.deleted || (a === "insert" && h(), Tp(
                r,
                /** @type {ContentFormat} */
                o.content
              ));
              break;
            }
          }
          o = o.right;
        }
        for (h(); n.length > 0; ) {
          const m = n[n.length - 1];
          if (m.retain !== void 0 && m.attributes === void 0)
            n.pop();
          else
            break;
        }
      }), this._delta = n;
    }
    return (
      /** @type {any} */
      this._delta
    );
  }
}
class Cf extends ji {
  /**
   * @param {String} [string] The initial value of the YText.
   */
  constructor(e) {
    super(), this._pending = e !== void 0 ? [() => this.insert(0, e)] : [], this._searchMarker = [], this._hasFormatting = !1;
  }
  /**
   * Number of characters of this text type.
   *
   * @type {number}
   */
  get length() {
    return this.doc ?? mr(), this._length;
  }
  /**
   * @param {Doc} y
   * @param {Item} item
   */
  _integrate(e, n) {
    super._integrate(e, n);
    try {
      this._pending.forEach((i) => i());
    } catch (i) {
      console.error(i);
    }
    this._pending = null;
  }
  _copy() {
    return new Cf();
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {YText}
   */
  clone() {
    const e = new Cf();
    return e.applyDelta(this.toDelta()), e;
  }
  /**
   * Creates YTextEvent and calls observers.
   *
   * @param {Transaction} transaction
   * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
   */
  _callObserver(e, n) {
    super._callObserver(e, n);
    const i = new _J(this, e, n);
    Gx(this, e, i), !e.local && this._hasFormatting && (e._needFormattingCleanup = !0);
  }
  /**
   * Returns the unformatted string representation of this YText type.
   *
   * @public
   */
  toString() {
    this.doc ?? mr();
    let e = "", n = this._start;
    for (; n !== null; )
      !n.deleted && n.countable && n.content.constructor === yo && (e += /** @type {ContentString} */
      n.content.str), n = n.right;
    return e;
  }
  /**
   * Returns the unformatted string representation of this YText type.
   *
   * @return {string}
   * @public
   */
  toJSON() {
    return this.toString();
  }
  /**
   * Apply a {@link Delta} on this shared YText type.
   *
   * @param {Array<any>} delta The changes to apply on this element.
   * @param {object}  opts
   * @param {boolean} [opts.sanitize] Sanitize input delta. Removes ending newlines if set to true.
   *
   *
   * @public
   */
  applyDelta(e, { sanitize: n = !0 } = {}) {
    this.doc !== null ? nn(this.doc, (i) => {
      const r = new B6(null, this._start, 0, /* @__PURE__ */ new Map());
      for (let s = 0; s < e.length; s++) {
        const o = e[s];
        if (o.insert !== void 0) {
          const a = !n && typeof o.insert == "string" && s === e.length - 1 && r.right === null && o.insert.slice(-1) === `
` ? o.insert.slice(0, -1) : o.insert;
          (typeof a != "string" || a.length > 0) && pS(i, this, r, a, o.attributes || {});
        } else o.retain !== void 0 ? UR(i, this, r, o.retain, o.attributes || {}) : o.delete !== void 0 && ZR(i, r, o.delete);
      }
    }) : this._pending.push(() => this.applyDelta(e));
  }
  /**
   * Returns the Delta representation of this YText type.
   *
   * @param {Snapshot} [snapshot]
   * @param {Snapshot} [prevSnapshot]
   * @param {function('removed' | 'added', ID):any} [computeYChange]
   * @return {any} The Delta representation of this type.
   *
   * @public
   */
  toDelta(e, n, i) {
    this.doc ?? mr();
    const r = [], s = /* @__PURE__ */ new Map(), o = (
      /** @type {Doc} */
      this.doc
    );
    let a = "", l = this._start;
    function u() {
      if (a.length > 0) {
        const d = {};
        let h = !1;
        s.forEach((g, w) => {
          h = !0, d[w] = g;
        });
        const m = { insert: a };
        h && (m.attributes = d), r.push(m), a = "";
      }
    }
    const f = () => {
      for (; l !== null; ) {
        if (yu(l, e) || n !== void 0 && yu(l, n))
          switch (l.content.constructor) {
            case yo: {
              const d = s.get("ychange");
              e !== void 0 && !yu(l, e) ? (d === void 0 || d.user !== l.id.client || d.type !== "removed") && (u(), s.set("ychange", i ? i("removed", l.id) : { type: "removed" })) : n !== void 0 && !yu(l, n) ? (d === void 0 || d.user !== l.id.client || d.type !== "added") && (u(), s.set("ychange", i ? i("added", l.id) : { type: "added" })) : d !== void 0 && (u(), s.delete("ychange")), a += /** @type {ContentString} */
              l.content.str;
              break;
            }
            case _o:
            case Wl: {
              u();
              const d = {
                insert: l.content.getContent()[0]
              };
              if (s.size > 0) {
                const h = (
                  /** @type {Object<string,any>} */
                  {}
                );
                d.attributes = h, s.forEach((m, g) => {
                  h[g] = m;
                });
              }
              r.push(d);
              break;
            }
            case vi:
              yu(l, e) && (u(), Tp(
                s,
                /** @type {ContentFormat} */
                l.content
              ));
              break;
          }
        l = l.right;
      }
      u();
    };
    return e || n ? nn(o, (d) => {
      e && L6(d, e), n && L6(d, n), f();
    }, "cleanup") : f(), r;
  }
  /**
   * Insert text at a given index.
   *
   * @param {number} index The index at which to start inserting.
   * @param {String} text The text to insert at the specified position.
   * @param {TextAttributes} [attributes] Optionally define some formatting
   *                                    information to apply on the inserted
   *                                    Text.
   * @public
   */
  insert(e, n, i) {
    if (n.length <= 0)
      return;
    const r = this.doc;
    r !== null ? nn(r, (s) => {
      const o = Yb(s, this, e, !i);
      i || (i = {}, o.currentAttributes.forEach((a, l) => {
        i[l] = a;
      })), pS(s, this, o, n, i);
    }) : this._pending.push(() => this.insert(e, n, i));
  }
  /**
   * Inserts an embed at a index.
   *
   * @param {number} index The index to insert the embed at.
   * @param {Object | AbstractType<any>} embed The Object that represents the embed.
   * @param {TextAttributes} [attributes] Attribute information to apply on the
   *                                    embed
   *
   * @public
   */
  insertEmbed(e, n, i) {
    const r = this.doc;
    r !== null ? nn(r, (s) => {
      const o = Yb(s, this, e, !i);
      pS(s, this, o, n, i || {});
    }) : this._pending.push(() => this.insertEmbed(e, n, i || {}));
  }
  /**
   * Deletes text starting from an index.
   *
   * @param {number} index Index at which to start deleting.
   * @param {number} length The number of characters to remove. Defaults to 1.
   *
   * @public
   */
  delete(e, n) {
    if (n === 0)
      return;
    const i = this.doc;
    i !== null ? nn(i, (r) => {
      ZR(r, Yb(r, this, e, !0), n);
    }) : this._pending.push(() => this.delete(e, n));
  }
  /**
   * Assigns properties to a range of text.
   *
   * @param {number} index The position where to start formatting.
   * @param {number} length The amount of characters to assign properties to.
   * @param {TextAttributes} attributes Attribute information to apply on the
   *                                    text.
   *
   * @public
   */
  format(e, n, i) {
    if (n === 0)
      return;
    const r = this.doc;
    r !== null ? nn(r, (s) => {
      const o = Yb(s, this, e, !1);
      o.right !== null && UR(s, this, o, n, i);
    }) : this._pending.push(() => this.format(e, n, i));
  }
  /**
   * Removes an attribute.
   *
   * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
   *
   * @param {String} attributeName The attribute name that is to be removed.
   *
   * @public
   */
  removeAttribute(e) {
    this.doc !== null ? nn(this.doc, (n) => {
      wk(n, this, e);
    }) : this._pending.push(() => this.removeAttribute(e));
  }
  /**
   * Sets or updates an attribute.
   *
   * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
   *
   * @param {String} attributeName The attribute name that is to be set.
   * @param {any} attributeValue The attribute value that is to be set.
   *
   * @public
   */
  setAttribute(e, n) {
    this.doc !== null ? nn(this.doc, (i) => {
      $8(i, this, e, n);
    }) : this._pending.push(() => this.setAttribute(e, n));
  }
  /**
   * Returns an attribute value that belongs to the attribute name.
   *
   * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
   *
   * @param {String} attributeName The attribute name that identifies the
   *                               queried value.
   * @return {any} The queried attribute value.
   *
   * @public
   */
  getAttribute(e) {
    return (
      /** @type {any} */
      M8(this, e)
    );
  }
  /**
   * Returns all attribute name/value pairs in a JSON Object.
   *
   * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
   *
   * @return {Object<string, any>} A JSON Object that describes the attributes.
   *
   * @public
   */
  getAttributes() {
    return hJ(this);
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   */
  _write(e) {
    e.writeTypeRef(Yze);
  }
}
const Mze = (t) => new Cf();
class mS {
  /**
   * @param {YXmlFragment | YXmlElement} root
   * @param {function(AbstractType<any>):boolean} [f]
   */
  constructor(e, n = () => !0) {
    this._filter = n, this._root = e, this._currentNode = /** @type {Item} */
    e._start, this._firstCall = !0, e.doc ?? mr();
  }
  [Symbol.iterator]() {
    return this;
  }
  /**
   * Get the next node.
   *
   * @return {IteratorResult<YXmlElement|YXmlText|YXmlHook>} The next node.
   *
   * @public
   */
  next() {
    let e = this._currentNode, n = e && e.content && /** @type {any} */
    e.content.type;
    if (e !== null && (!this._firstCall || e.deleted || !this._filter(n)))
      do
        if (n = /** @type {any} */
        e.content.type, !e.deleted && (n.constructor === lc || n.constructor === ac) && n._start !== null)
          e = n._start;
        else
          for (; e !== null; ) {
            const i = e.next;
            if (i !== null) {
              e = i;
              break;
            } else e.parent === this._root ? e = null : e = /** @type {AbstractType<any>} */
            e.parent._item;
          }
      while (e !== null && (e.deleted || !this._filter(
        /** @type {ContentType} */
        e.content.type
      )));
    return this._firstCall = !1, e === null ? { value: void 0, done: !0 } : (this._currentNode = e, { value: (
      /** @type {any} */
      e.content.type
    ), done: !1 });
  }
}
class ac extends ji {
  constructor() {
    super(), this._prelimContent = [];
  }
  /**
   * @type {YXmlElement|YXmlText|null}
   */
  get firstChild() {
    const e = this._first;
    return e ? e.content.getContent()[0] : null;
  }
  /**
   * Integrate this type into the Yjs instance.
   *
   * * Save this struct in the os
   * * This type is sent to other client
   * * Observer functions are fired
   *
   * @param {Doc} y The Yjs instance
   * @param {Item} item
   */
  _integrate(e, n) {
    super._integrate(e, n), this.insert(
      0,
      /** @type {Array<any>} */
      this._prelimContent
    ), this._prelimContent = null;
  }
  _copy() {
    return new ac();
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {YXmlFragment}
   */
  clone() {
    const e = new ac();
    return e.insert(0, this.toArray().map((n) => n instanceof ji ? n.clone() : n)), e;
  }
  get length() {
    return this.doc ?? mr(), this._prelimContent === null ? this._length : this._prelimContent.length;
  }
  /**
   * Create a subtree of childNodes.
   *
   * @example
   * const walker = elem.createTreeWalker(dom => dom.nodeName === 'div')
   * for (let node in walker) {
   *   // `node` is a div node
   *   nop(node)
   * }
   *
   * @param {function(AbstractType<any>):boolean} filter Function that is called on each child element and
   *                          returns a Boolean indicating whether the child
   *                          is to be included in the subtree.
   * @return {YXmlTreeWalker} A subtree and a position within it.
   *
   * @public
   */
  createTreeWalker(e) {
    return new mS(this, e);
  }
  /**
   * Returns the first YXmlElement that matches the query.
   * Similar to DOM's {@link querySelector}.
   *
   * Query support:
   *   - tagname
   * TODO:
   *   - id
   *   - attribute
   *
   * @param {CSS_Selector} query The query on the children.
   * @return {YXmlElement|YXmlText|YXmlHook|null} The first element that matches the query or null.
   *
   * @public
   */
  querySelector(e) {
    e = e.toUpperCase();
    const i = new mS(this, (r) => r.nodeName && r.nodeName.toUpperCase() === e).next();
    return i.done ? null : i.value;
  }
  /**
   * Returns all YXmlElements that match the query.
   * Similar to Dom's {@link querySelectorAll}.
   *
   * @todo Does not yet support all queries. Currently only query by tagName.
   *
   * @param {CSS_Selector} query The query on the children
   * @return {Array<YXmlElement|YXmlText|YXmlHook|null>} The elements that match this query.
   *
   * @public
   */
  querySelectorAll(e) {
    return e = e.toUpperCase(), Al(new mS(this, (n) => n.nodeName && n.nodeName.toUpperCase() === e));
  }
  /**
   * Creates YXmlEvent and calls observers.
   *
   * @param {Transaction} transaction
   * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
   */
  _callObserver(e, n) {
    Gx(this, e, new OJ(this, n, e));
  }
  /**
   * Get the string representation of all the children of this YXmlFragment.
   *
   * @return {string} The string representation of all children.
   */
  toString() {
    return lJ(this, (e) => e.toString()).join("");
  }
  /**
   * @return {string}
   */
  toJSON() {
    return this.toString();
  }
  /**
   * Creates a Dom Element that mirrors this YXmlElement.
   *
   * @param {Document} [_document=document] The document object (you must define
   *                                        this when calling this method in
   *                                        nodejs)
   * @param {Object<string, any>} [hooks={}] Optional property to customize how hooks
   *                                             are presented in the DOM
   * @param {any} [binding] You should not set this property. This is
   *                               used if DomBinding wants to create a
   *                               association to the created DOM type.
   * @return {Node} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
   *
   * @public
   */
  toDOM(e = document, n = {}, i) {
    const r = e.createDocumentFragment();
    return i !== void 0 && i._createAssociation(r, this), V0(this, (s) => {
      r.insertBefore(s.toDOM(e, n, i), null);
    }), r;
  }
  /**
   * Inserts new content at an index.
   *
   * @example
   *  // Insert character 'a' at position 0
   *  xml.insert(0, [new Y.XmlText('text')])
   *
   * @param {number} index The index to insert content at
   * @param {Array<YXmlElement|YXmlText>} content The array of content
   */
  insert(e, n) {
    this.doc !== null ? nn(this.doc, (i) => {
      fJ(i, this, e, n);
    }) : this._prelimContent.splice(e, 0, ...n);
  }
  /**
   * Inserts new content at an index.
   *
   * @example
   *  // Insert character 'a' at position 0
   *  xml.insert(0, [new Y.XmlText('text')])
   *
   * @param {null|Item|YXmlElement|YXmlText} ref The index to insert content at
   * @param {Array<YXmlElement|YXmlText>} content The array of content
   */
  insertAfter(e, n) {
    if (this.doc !== null)
      nn(this.doc, (i) => {
        const r = e && e instanceof ji ? e._item : e;
        yk(i, this, r, n);
      });
    else {
      const i = (
        /** @type {Array<any>} */
        this._prelimContent
      ), r = e === null ? 0 : i.findIndex((s) => s === e) + 1;
      if (r === 0 && e !== null)
        throw ic("Reference item not found");
      i.splice(r, 0, ...n);
    }
  }
  /**
   * Deletes elements starting from an index.
   *
   * @param {number} index Index at which to start deleting elements
   * @param {number} [length=1] The number of elements to remove. Defaults to 1.
   */
  delete(e, n = 1) {
    this.doc !== null ? nn(this.doc, (i) => {
      dJ(i, this, e, n);
    }) : this._prelimContent.splice(e, n);
  }
  /**
   * Transforms this YArray to a JavaScript Array.
   *
   * @return {Array<YXmlElement|YXmlText|YXmlHook>}
   */
  toArray() {
    return aJ(this);
  }
  /**
   * Appends content to this YArray.
   *
   * @param {Array<YXmlElement|YXmlText>} content Array of content to append.
   */
  push(e) {
    this.insert(this.length, e);
  }
  /**
   * Prepends content to this YArray.
   *
   * @param {Array<YXmlElement|YXmlText>} content Array of content to prepend.
   */
  unshift(e) {
    this.insert(0, e);
  }
  /**
   * Returns the i-th element from a YArray.
   *
   * @param {number} index The index of the element to return from the YArray
   * @return {YXmlElement|YXmlText}
   */
  get(e) {
    return uJ(this, e);
  }
  /**
   * Returns a portion of this YXmlFragment into a JavaScript Array selected
   * from start to end (end not included).
   *
   * @param {number} [start]
   * @param {number} [end]
   * @return {Array<YXmlElement|YXmlText>}
   */
  slice(e = 0, n = this.length) {
    return oJ(this, e, n);
  }
  /**
   * Executes a provided function on once on every child element.
   *
   * @param {function(YXmlElement|YXmlText,number, typeof self):void} f A function to execute on every element of this YArray.
   */
  forEach(e) {
    V0(this, e);
  }
  /**
   * Transform the properties of this type to binary and write it to an
   * BinaryEncoder.
   *
   * This is called when this Item is sent to a remote peer.
   *
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
   */
  _write(e) {
    e.writeTypeRef(Xze);
  }
}
const Nze = (t) => new ac();
class lc extends ac {
  constructor(e = "UNDEFINED") {
    super(), this.nodeName = e, this._prelimAttrs = /* @__PURE__ */ new Map();
  }
  /**
   * @type {YXmlElement|YXmlText|null}
   */
  get nextSibling() {
    const e = this._item ? this._item.next : null;
    return e ? (
      /** @type {YXmlElement|YXmlText} */
      /** @type {ContentType} */
      e.content.type
    ) : null;
  }
  /**
   * @type {YXmlElement|YXmlText|null}
   */
  get prevSibling() {
    const e = this._item ? this._item.prev : null;
    return e ? (
      /** @type {YXmlElement|YXmlText} */
      /** @type {ContentType} */
      e.content.type
    ) : null;
  }
  /**
   * Integrate this type into the Yjs instance.
   *
   * * Save this struct in the os
   * * This type is sent to other client
   * * Observer functions are fired
   *
   * @param {Doc} y The Yjs instance
   * @param {Item} item
   */
  _integrate(e, n) {
    super._integrate(e, n), /** @type {Map<string, any>} */
    this._prelimAttrs.forEach((i, r) => {
      this.setAttribute(r, i);
    }), this._prelimAttrs = null;
  }
  /**
   * Creates an Item with the same effect as this Item (without position effect)
   *
   * @return {YXmlElement}
   */
  _copy() {
    return new lc(this.nodeName);
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {YXmlElement<KV>}
   */
  clone() {
    const e = new lc(this.nodeName), n = this.getAttributes();
    return XFe(n, (i, r) => {
      e.setAttribute(
        r,
        /** @type {any} */
        i
      );
    }), e.insert(0, this.toArray().map((i) => i instanceof ji ? i.clone() : i)), e;
  }
  /**
   * Returns the XML serialization of this YXmlElement.
   * The attributes are ordered by attribute-name, so you can easily use this
   * method to compare YXmlElements
   *
   * @return {string} The string representation of this type.
   *
   * @public
   */
  toString() {
    const e = this.getAttributes(), n = [], i = [];
    for (const a in e)
      i.push(a);
    i.sort();
    const r = i.length;
    for (let a = 0; a < r; a++) {
      const l = i[a];
      n.push(l + '="' + e[l] + '"');
    }
    const s = this.nodeName.toLocaleLowerCase(), o = n.length > 0 ? " " + n.join(" ") : "";
    return `<${s}${o}>${super.toString()}</${s}>`;
  }
  /**
   * Removes an attribute from this YXmlElement.
   *
   * @param {string} attributeName The attribute name that is to be removed.
   *
   * @public
   */
  removeAttribute(e) {
    this.doc !== null ? nn(this.doc, (n) => {
      wk(n, this, e);
    }) : this._prelimAttrs.delete(e);
  }
  /**
   * Sets or updates an attribute.
   *
   * @template {keyof KV & string} KEY
   *
   * @param {KEY} attributeName The attribute name that is to be set.
   * @param {KV[KEY]} attributeValue The attribute value that is to be set.
   *
   * @public
   */
  setAttribute(e, n) {
    this.doc !== null ? nn(this.doc, (i) => {
      $8(i, this, e, n);
    }) : this._prelimAttrs.set(e, n);
  }
  /**
   * Returns an attribute value that belongs to the attribute name.
   *
   * @template {keyof KV & string} KEY
   *
   * @param {KEY} attributeName The attribute name that identifies the
   *                               queried value.
   * @return {KV[KEY]|undefined} The queried attribute value.
   *
   * @public
   */
  getAttribute(e) {
    return (
      /** @type {any} */
      M8(this, e)
    );
  }
  /**
   * Returns whether an attribute exists
   *
   * @param {string} attributeName The attribute name to check for existence.
   * @return {boolean} whether the attribute exists.
   *
   * @public
   */
  hasAttribute(e) {
    return (
      /** @type {any} */
      pJ(this, e)
    );
  }
  /**
   * Returns all attribute name/value pairs in a JSON Object.
   *
   * @param {Snapshot} [snapshot]
   * @return {{ [Key in Extract<keyof KV,string>]?: KV[Key]}} A JSON Object that describes the attributes.
   *
   * @public
   */
  getAttributes(e) {
    return (
      /** @type {any} */
      e ? mJ(this, e) : hJ(this)
    );
  }
  /**
   * Creates a Dom Element that mirrors this YXmlElement.
   *
   * @param {Document} [_document=document] The document object (you must define
   *                                        this when calling this method in
   *                                        nodejs)
   * @param {Object<string, any>} [hooks={}] Optional property to customize how hooks
   *                                             are presented in the DOM
   * @param {any} [binding] You should not set this property. This is
   *                               used if DomBinding wants to create a
   *                               association to the created DOM type.
   * @return {Node} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
   *
   * @public
   */
  toDOM(e = document, n = {}, i) {
    const r = e.createElement(this.nodeName), s = this.getAttributes();
    for (const o in s) {
      const a = s[o];
      typeof a == "string" && r.setAttribute(o, a);
    }
    return V0(this, (o) => {
      r.appendChild(o.toDOM(e, n, i));
    }), i !== void 0 && i._createAssociation(r, this), r;
  }
  /**
   * Transform the properties of this type to binary and write it to an
   * BinaryEncoder.
   *
   * This is called when this Item is sent to a remote peer.
   *
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
   */
  _write(e) {
    e.writeTypeRef(Vze), e.writeKey(this.nodeName);
  }
}
const Aze = (t) => new lc(t.readKey());
class OJ extends ev {
  /**
   * @param {YXmlElement|YXmlText|YXmlFragment} target The target on which the event is created.
   * @param {Set<string|null>} subs The set of changed attributes. `null` is included if the
   *                   child list changed.
   * @param {Transaction} transaction The transaction instance with which the
   *                                  change was created.
   */
  constructor(e, n, i) {
    super(e, i), this.childListChanged = !1, this.attributesChanged = /* @__PURE__ */ new Set(), n.forEach((r) => {
      r === null ? this.childListChanged = !0 : this.attributesChanged.add(r);
    });
  }
}
class Qh extends oc {
  /**
   * @param {string} hookName nodeName of the Dom Node.
   */
  constructor(e) {
    super(), this.hookName = e;
  }
  /**
   * Creates an Item with the same effect as this Item (without position effect)
   */
  _copy() {
    return new Qh(this.hookName);
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {YXmlHook}
   */
  clone() {
    const e = new Qh(this.hookName);
    return this.forEach((n, i) => {
      e.set(i, n);
    }), e;
  }
  /**
   * Creates a Dom Element that mirrors this YXmlElement.
   *
   * @param {Document} [_document=document] The document object (you must define
   *                                        this when calling this method in
   *                                        nodejs)
   * @param {Object.<string, any>} [hooks] Optional property to customize how hooks
   *                                             are presented in the DOM
   * @param {any} [binding] You should not set this property. This is
   *                               used if DomBinding wants to create a
   *                               association to the created DOM type
   * @return {Element} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
   *
   * @public
   */
  toDOM(e = document, n = {}, i) {
    const r = n[this.hookName];
    let s;
    return r !== void 0 ? s = r.createDom(this) : s = document.createElement(this.hookName), s.setAttribute("data-yjs-hook", this.hookName), i !== void 0 && i._createAssociation(s, this), s;
  }
  /**
   * Transform the properties of this type to binary and write it to an
   * BinaryEncoder.
   *
   * This is called when this Item is sent to a remote peer.
   *
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
   */
  _write(e) {
    e.writeTypeRef(Gze), e.writeKey(this.hookName);
  }
}
const Dze = (t) => new Qh(t.readKey());
class X0 extends Cf {
  /**
   * @type {YXmlElement|YXmlText|null}
   */
  get nextSibling() {
    const e = this._item ? this._item.next : null;
    return e ? (
      /** @type {YXmlElement|YXmlText} */
      /** @type {ContentType} */
      e.content.type
    ) : null;
  }
  /**
   * @type {YXmlElement|YXmlText|null}
   */
  get prevSibling() {
    const e = this._item ? this._item.prev : null;
    return e ? (
      /** @type {YXmlElement|YXmlText} */
      /** @type {ContentType} */
      e.content.type
    ) : null;
  }
  _copy() {
    return new X0();
  }
  /**
   * Makes a copy of this data type that can be included somewhere else.
   *
   * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
   *
   * @return {YXmlText}
   */
  clone() {
    const e = new X0();
    return e.applyDelta(this.toDelta()), e;
  }
  /**
   * Creates a Dom Element that mirrors this YXmlText.
   *
   * @param {Document} [_document=document] The document object (you must define
   *                                        this when calling this method in
   *                                        nodejs)
   * @param {Object<string, any>} [hooks] Optional property to customize how hooks
   *                                             are presented in the DOM
   * @param {any} [binding] You should not set this property. This is
   *                               used if DomBinding wants to create a
   *                               association to the created DOM type.
   * @return {Text} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
   *
   * @public
   */
  toDOM(e = document, n, i) {
    const r = e.createTextNode(this.toString());
    return i !== void 0 && i._createAssociation(r, this), r;
  }
  toString() {
    return this.toDelta().map((e) => {
      const n = [];
      for (const r in e.attributes) {
        const s = [];
        for (const o in e.attributes[r])
          s.push({ key: o, value: e.attributes[r][o] });
        s.sort((o, a) => o.key < a.key ? -1 : 1), n.push({ nodeName: r, attrs: s });
      }
      n.sort((r, s) => r.nodeName < s.nodeName ? -1 : 1);
      let i = "";
      for (let r = 0; r < n.length; r++) {
        const s = n[r];
        i += `<${s.nodeName}`;
        for (let o = 0; o < s.attrs.length; o++) {
          const a = s.attrs[o];
          i += ` ${a.key}="${a.value}"`;
        }
        i += ">";
      }
      i += e.insert;
      for (let r = n.length - 1; r >= 0; r--)
        i += `</${n[r].nodeName}>`;
      return i;
    }).join("");
  }
  /**
   * @return {string}
   */
  toJSON() {
    return this.toString();
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   */
  _write(e) {
    e.writeTypeRef(Kze);
  }
}
const Pze = (t) => new X0();
class Kx {
  /**
   * @param {ID} id
   * @param {number} length
   */
  constructor(e, n) {
    this.id = e, this.length = n;
  }
  /**
   * @type {boolean}
   */
  get deleted() {
    throw Ta();
  }
  /**
   * Merge this struct with the item to the right.
   * This method is already assuming that `this.id.clock + this.length === this.id.clock`.
   * Also this method does *not* remove right from StructStore!
   * @param {AbstractStruct} right
   * @return {boolean} whether this merged with right
   */
  mergeWith(e) {
    return !1;
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
   * @param {number} offset
   * @param {number} encodingRef
   */
  write(e, n, i) {
    throw Ta();
  }
  /**
   * @param {Transaction} transaction
   * @param {number} offset
   */
  integrate(e, n) {
    throw Ta();
  }
}
const Ize = 0;
class bs extends Kx {
  get deleted() {
    return !0;
  }
  delete() {
  }
  /**
   * @param {GC} right
   * @return {boolean}
   */
  mergeWith(e) {
    return this.constructor !== e.constructor ? !1 : (this.length += e.length, !0);
  }
  /**
   * @param {Transaction} transaction
   * @param {number} offset
   */
  integrate(e, n) {
    n > 0 && (this.id.clock += n, this.length -= n), RK(e.doc.store, this);
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeInfo(Ize), e.writeLen(this.length - n);
  }
  /**
   * @param {Transaction} transaction
   * @param {StructStore} store
   * @return {null | number}
   */
  getMissing(e, n) {
    return null;
  }
}
class Uf {
  /**
   * @param {Uint8Array} content
   */
  constructor(e) {
    this.content = e;
  }
  /**
   * @return {number}
   */
  getLength() {
    return 1;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return [this.content];
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !0;
  }
  /**
   * @return {ContentBinary}
   */
  copy() {
    return new Uf(this.content);
  }
  /**
   * @param {number} offset
   * @return {ContentBinary}
   */
  splice(e) {
    throw Ta();
  }
  /**
   * @param {ContentBinary} right
   * @return {boolean}
   */
  mergeWith(e) {
    return !1;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeBuf(this.content);
  }
  /**
   * @return {number}
   */
  getRef() {
    return 3;
  }
}
const Lze = (t) => new Uf(t.readBuf());
class Ef {
  /**
   * @param {number} len
   */
  constructor(e) {
    this.len = e;
  }
  /**
   * @return {number}
   */
  getLength() {
    return this.len;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return [];
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !1;
  }
  /**
   * @return {ContentDeleted}
   */
  copy() {
    return new Ef(this.len);
  }
  /**
   * @param {number} offset
   * @return {ContentDeleted}
   */
  splice(e) {
    const n = new Ef(this.len - e);
    return this.len = e, n;
  }
  /**
   * @param {ContentDeleted} right
   * @return {boolean}
   */
  mergeWith(e) {
    return this.len += e.len, !0;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
    Q0(e.deleteSet, n.id.client, n.id.clock, this.len), n.markDeleted();
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeLen(this.len - n);
  }
  /**
   * @return {number}
   */
  getRef() {
    return 1;
  }
}
const Rze = (t) => new Ef(t.readLen()), SJ = (t, e) => new Bl({ guid: t, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 });
class Zf {
  /**
   * @param {Doc} doc
   */
  constructor(e) {
    e._item && console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."), this.doc = e;
    const n = {};
    this.opts = n, e.gc || (n.gc = !1), e.autoLoad && (n.autoLoad = !0), e.meta !== null && (n.meta = e.meta);
  }
  /**
   * @return {number}
   */
  getLength() {
    return 1;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return [this.doc];
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !0;
  }
  /**
   * @return {ContentDoc}
   */
  copy() {
    return new Zf(SJ(this.doc.guid, this.opts));
  }
  /**
   * @param {number} offset
   * @return {ContentDoc}
   */
  splice(e) {
    throw Ta();
  }
  /**
   * @param {ContentDoc} right
   * @return {boolean}
   */
  mergeWith(e) {
    return !1;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
    this.doc._item = n, e.subdocsAdded.add(this.doc), this.doc.shouldLoad && e.subdocsLoaded.add(this.doc);
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
    e.subdocsAdded.has(this.doc) ? e.subdocsAdded.delete(this.doc) : e.subdocsRemoved.add(this.doc);
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeString(this.doc.guid), e.writeAny(this.opts);
  }
  /**
   * @return {number}
   */
  getRef() {
    return 9;
  }
}
const jze = (t) => new Zf(SJ(t.readString(), t.readAny()));
class Wl {
  /**
   * @param {Object} embed
   */
  constructor(e) {
    this.embed = e;
  }
  /**
   * @return {number}
   */
  getLength() {
    return 1;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return [this.embed];
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !0;
  }
  /**
   * @return {ContentEmbed}
   */
  copy() {
    return new Wl(this.embed);
  }
  /**
   * @param {number} offset
   * @return {ContentEmbed}
   */
  splice(e) {
    throw Ta();
  }
  /**
   * @param {ContentEmbed} right
   * @return {boolean}
   */
  mergeWith(e) {
    return !1;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeJSON(this.embed);
  }
  /**
   * @return {number}
   */
  getRef() {
    return 5;
  }
}
const Fze = (t) => new Wl(t.readJSON());
class vi {
  /**
   * @param {string} key
   * @param {Object} value
   */
  constructor(e, n) {
    this.key = e, this.value = n;
  }
  /**
   * @return {number}
   */
  getLength() {
    return 1;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return [];
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !1;
  }
  /**
   * @return {ContentFormat}
   */
  copy() {
    return new vi(this.key, this.value);
  }
  /**
   * @param {number} _offset
   * @return {ContentFormat}
   */
  splice(e) {
    throw Ta();
  }
  /**
   * @param {ContentFormat} _right
   * @return {boolean}
   */
  mergeWith(e) {
    return !1;
  }
  /**
   * @param {Transaction} _transaction
   * @param {Item} item
   */
  integrate(e, n) {
    const i = (
      /** @type {YText} */
      n.parent
    );
    i._searchMarker = null, i._hasFormatting = !0;
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeKey(this.key), e.writeJSON(this.value);
  }
  /**
   * @return {number}
   */
  getRef() {
    return 6;
  }
}
const Bze = (t) => new vi(t.readKey(), t.readJSON());
class Uh {
  /**
   * @param {Array<any>} arr
   */
  constructor(e) {
    this.arr = e;
  }
  /**
   * @return {number}
   */
  getLength() {
    return this.arr.length;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return this.arr;
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !0;
  }
  /**
   * @return {ContentJSON}
   */
  copy() {
    return new Uh(this.arr);
  }
  /**
   * @param {number} offset
   * @return {ContentJSON}
   */
  splice(e) {
    const n = new Uh(this.arr.slice(e));
    return this.arr = this.arr.slice(0, e), n;
  }
  /**
   * @param {ContentJSON} right
   * @return {boolean}
   */
  mergeWith(e) {
    return this.arr = this.arr.concat(e.arr), !0;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    const i = this.arr.length;
    e.writeLen(i - n);
    for (let r = n; r < i; r++) {
      const s = this.arr[r];
      e.writeString(s === void 0 ? "undefined" : JSON.stringify(s));
    }
  }
  /**
   * @return {number}
   */
  getRef() {
    return 2;
  }
}
const zze = (t) => {
  const e = t.readLen(), n = [];
  for (let i = 0; i < e; i++) {
    const r = t.readString();
    r === "undefined" ? n.push(void 0) : n.push(JSON.parse(r));
  }
  return new Uh(n);
}, Wze = bk("node_env") === "development";
class Il {
  /**
   * @param {Array<any>} arr
   */
  constructor(e) {
    this.arr = e, Wze && kK(e);
  }
  /**
   * @return {number}
   */
  getLength() {
    return this.arr.length;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return this.arr;
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !0;
  }
  /**
   * @return {ContentAny}
   */
  copy() {
    return new Il(this.arr);
  }
  /**
   * @param {number} offset
   * @return {ContentAny}
   */
  splice(e) {
    const n = new Il(this.arr.slice(e));
    return this.arr = this.arr.slice(0, e), n;
  }
  /**
   * @param {ContentAny} right
   * @return {boolean}
   */
  mergeWith(e) {
    return this.arr = this.arr.concat(e.arr), !0;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    const i = this.arr.length;
    e.writeLen(i - n);
    for (let r = n; r < i; r++) {
      const s = this.arr[r];
      e.writeAny(s);
    }
  }
  /**
   * @return {number}
   */
  getRef() {
    return 8;
  }
}
const Hze = (t) => {
  const e = t.readLen(), n = [];
  for (let i = 0; i < e; i++)
    n.push(t.readAny());
  return new Il(n);
};
class yo {
  /**
   * @param {string} str
   */
  constructor(e) {
    this.str = e;
  }
  /**
   * @return {number}
   */
  getLength() {
    return this.str.length;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return this.str.split("");
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !0;
  }
  /**
   * @return {ContentString}
   */
  copy() {
    return new yo(this.str);
  }
  /**
   * @param {number} offset
   * @return {ContentString}
   */
  splice(e) {
    const n = new yo(this.str.slice(e));
    this.str = this.str.slice(0, e);
    const i = this.str.charCodeAt(e - 1);
    return i >= 55296 && i <= 56319 && (this.str = this.str.slice(0, e - 1) + "�", n.str = "�" + n.str.slice(1)), n;
  }
  /**
   * @param {ContentString} right
   * @return {boolean}
   */
  mergeWith(e) {
    return this.str += e.str, !0;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeString(n === 0 ? this.str : this.str.slice(n));
  }
  /**
   * @return {number}
   */
  getRef() {
    return 4;
  }
}
const Qze = (t) => new yo(t.readString()), Uze = [
  Cze,
  Eze,
  Mze,
  Aze,
  Nze,
  Dze,
  Pze
], Zze = 0, qze = 1, Yze = 2, Vze = 3, Xze = 4, Gze = 5, Kze = 6;
class _o {
  /**
   * @param {AbstractType<any>} type
   */
  constructor(e) {
    this.type = e;
  }
  /**
   * @return {number}
   */
  getLength() {
    return 1;
  }
  /**
   * @return {Array<any>}
   */
  getContent() {
    return [this.type];
  }
  /**
   * @return {boolean}
   */
  isCountable() {
    return !0;
  }
  /**
   * @return {ContentType}
   */
  copy() {
    return new _o(this.type._copy());
  }
  /**
   * @param {number} offset
   * @return {ContentType}
   */
  splice(e) {
    throw Ta();
  }
  /**
   * @param {ContentType} right
   * @return {boolean}
   */
  mergeWith(e) {
    return !1;
  }
  /**
   * @param {Transaction} transaction
   * @param {Item} item
   */
  integrate(e, n) {
    this.type._integrate(e.doc, n);
  }
  /**
   * @param {Transaction} transaction
   */
  delete(e) {
    let n = this.type._start;
    for (; n !== null; )
      n.deleted ? n.id.clock < (e.beforeState.get(n.id.client) || 0) && e._mergeStructs.push(n) : n.delete(e), n = n.right;
    this.type._map.forEach((i) => {
      i.deleted ? i.id.clock < (e.beforeState.get(i.id.client) || 0) && e._mergeStructs.push(i) : i.delete(e);
    }), e.changed.delete(this.type);
  }
  /**
   * @param {StructStore} store
   */
  gc(e) {
    let n = this.type._start;
    for (; n !== null; )
      n.gc(e, !0), n = n.right;
    this.type._start = null, this.type._map.forEach(
      /** @param {Item | null} item */
      (i) => {
        for (; i !== null; )
          i.gc(e, !0), i = i.left;
      }
    ), this.type._map = /* @__PURE__ */ new Map();
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    this.type._write(e);
  }
  /**
   * @return {number}
   */
  getRef() {
    return 7;
  }
}
const Jze = (t) => new _o(Uze[t.readTypeRef()](t)), z6 = (t, e) => {
  let n = e, i = 0, r;
  do
    i > 0 && (n = _t(n.client, n.clock + i)), r = ff(t, n), i = n.clock - r.id.clock, n = r.redone;
  while (n !== null && r instanceof en);
  return {
    item: r,
    diff: i
  };
}, N8 = (t, e) => {
  for (; t !== null && t.keep !== e; )
    t.keep = e, t = /** @type {AbstractType<any>} */
    t.parent._item;
}, kk = (t, e, n) => {
  const { client: i, clock: r } = e.id, s = new en(
    _t(i, r + n),
    e,
    _t(i, r + n - 1),
    e.right,
    e.rightOrigin,
    e.parent,
    e.parentSub,
    e.content.splice(n)
  );
  return e.deleted && s.markDeleted(), e.keep && (s.keep = !0), e.redone !== null && (s.redone = _t(e.redone.client, e.redone.clock + n)), e.right = s, s.right !== null && (s.right.left = s), t._mergeStructs.push(s), s.parentSub !== null && s.right === null && s.parent._map.set(s.parentSub, s), e.length = n, s;
}, qR = (t, e) => lFe(
  t,
  /** @param {StackItem} s */
  (n) => Qf(n.deletions, e)
), CJ = (t, e, n, i, r, s) => {
  const o = t.doc, a = o.store, l = o.clientID, u = e.redone;
  if (u !== null)
    return Nr(t, u);
  let f = (
    /** @type {AbstractType<any>} */
    e.parent._item
  ), d = null, h;
  if (f !== null && f.deleted === !0) {
    if (f.redone === null && (!n.has(f) || CJ(t, f, n, i, r, s) === null))
      return null;
    for (; f.redone !== null; )
      f = Nr(t, f.redone);
  }
  const m = f === null ? (
    /** @type {AbstractType<any>} */
    e.parent
  ) : (
    /** @type {ContentType} */
    f.content.type
  );
  if (e.parentSub === null) {
    for (d = e.left, h = e; d !== null; ) {
      let _ = d;
      for (; _ !== null && /** @type {AbstractType<any>} */
      _.parent._item !== f; )
        _ = _.redone === null ? null : Nr(t, _.redone);
      if (_ !== null && /** @type {AbstractType<any>} */
      _.parent._item === f) {
        d = _;
        break;
      }
      d = d.left;
    }
    for (; h !== null; ) {
      let _ = h;
      for (; _ !== null && /** @type {AbstractType<any>} */
      _.parent._item !== f; )
        _ = _.redone === null ? null : Nr(t, _.redone);
      if (_ !== null && /** @type {AbstractType<any>} */
      _.parent._item === f) {
        h = _;
        break;
      }
      h = h.right;
    }
  } else if (h = null, e.right && !r) {
    for (d = e; d !== null && d.right !== null && (d.right.redone || Qf(i, d.right.id) || qR(s.undoStack, d.right.id) || qR(s.redoStack, d.right.id)); )
      for (d = d.right; d.redone; ) d = Nr(t, d.redone);
    if (d && d.right !== null)
      return null;
  } else
    d = m._map.get(e.parentSub) || null;
  const g = Un(a, l), w = _t(l, g), x = new en(
    w,
    d,
    d && d.lastId,
    h,
    h && h.id,
    m,
    e.parentSub,
    e.content.copy()
  );
  return e.redone = w, N8(x, !0), x.integrate(t, 0), x;
};
class en extends Kx {
  /**
   * @param {ID} id
   * @param {Item | null} left
   * @param {ID | null} origin
   * @param {Item | null} right
   * @param {ID | null} rightOrigin
   * @param {AbstractType<any>|ID|null} parent Is a type if integrated, is null if it is possible to copy parent from left or right, is ID before integration to search for it.
   * @param {string | null} parentSub
   * @param {AbstractContent} content
   */
  constructor(e, n, i, r, s, o, a, l) {
    super(e, l.getLength()), this.origin = i, this.left = n, this.right = r, this.rightOrigin = s, this.parent = o, this.parentSub = a, this.redone = null, this.content = l, this.info = this.content.isCountable() ? kR : 0;
  }
  /**
   * This is used to mark the item as an indexed fast-search marker
   *
   * @type {boolean}
   */
  set marker(e) {
    (this.info & cS) > 0 !== e && (this.info ^= cS);
  }
  get marker() {
    return (this.info & cS) > 0;
  }
  /**
   * If true, do not garbage collect this Item.
   */
  get keep() {
    return (this.info & wR) > 0;
  }
  set keep(e) {
    this.keep !== e && (this.info ^= wR);
  }
  get countable() {
    return (this.info & kR) > 0;
  }
  /**
   * Whether this item was deleted or not.
   * @type {Boolean}
   */
  get deleted() {
    return (this.info & uS) > 0;
  }
  set deleted(e) {
    this.deleted !== e && (this.info ^= uS);
  }
  markDeleted() {
    this.info |= uS;
  }
  /**
   * Return the creator clientID of the missing op or define missing items and return null.
   *
   * @param {Transaction} transaction
   * @param {StructStore} store
   * @return {null | number}
   */
  getMissing(e, n) {
    if (this.origin && this.origin.client !== this.id.client && this.origin.clock >= Un(n, this.origin.client))
      return this.origin.client;
    if (this.rightOrigin && this.rightOrigin.client !== this.id.client && this.rightOrigin.clock >= Un(n, this.rightOrigin.client))
      return this.rightOrigin.client;
    if (this.parent && this.parent.constructor === cf && this.id.client !== this.parent.client && this.parent.clock >= Un(n, this.parent.client))
      return this.parent.client;
    if (this.origin && (this.left = j6(e, n, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = Nr(e, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === bs || this.right && this.right.constructor === bs)
      this.parent = null;
    else if (!this.parent)
      this.left && this.left.constructor === en ? (this.parent = this.left.parent, this.parentSub = this.left.parentSub) : this.right && this.right.constructor === en && (this.parent = this.right.parent, this.parentSub = this.right.parentSub);
    else if (this.parent.constructor === cf) {
      const i = ff(n, this.parent);
      i.constructor === bs ? this.parent = null : this.parent = /** @type {ContentType} */
      i.content.type;
    }
    return null;
  }
  /**
   * @param {Transaction} transaction
   * @param {number} offset
   */
  integrate(e, n) {
    if (n > 0 && (this.id.clock += n, this.left = j6(e, e.doc.store, _t(this.id.client, this.id.clock - 1)), this.origin = this.left.lastId, this.content = this.content.splice(n), this.length -= n), this.parent) {
      if (!this.left && (!this.right || this.right.left !== null) || this.left && this.left.right !== this.right) {
        let i = this.left, r;
        if (i !== null)
          r = i.right;
        else if (this.parentSub !== null)
          for (r = /** @type {AbstractType<any>} */
          this.parent._map.get(this.parentSub) || null; r !== null && r.left !== null; )
            r = r.left;
        else
          r = /** @type {AbstractType<any>} */
          this.parent._start;
        const s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
        for (; r !== null && r !== this.right; ) {
          if (o.add(r), s.add(r), nf(this.origin, r.origin)) {
            if (r.id.client < this.id.client)
              i = r, s.clear();
            else if (nf(this.rightOrigin, r.rightOrigin))
              break;
          } else if (r.origin !== null && o.has(ff(e.doc.store, r.origin)))
            s.has(ff(e.doc.store, r.origin)) || (i = r, s.clear());
          else
            break;
          r = r.right;
        }
        this.left = i;
      }
      if (this.left !== null) {
        const i = this.left.right;
        this.right = i, this.left.right = this;
      } else {
        let i;
        if (this.parentSub !== null)
          for (i = /** @type {AbstractType<any>} */
          this.parent._map.get(this.parentSub) || null; i !== null && i.left !== null; )
            i = i.left;
        else
          i = /** @type {AbstractType<any>} */
          this.parent._start, this.parent._start = this;
        this.right = i;
      }
      this.right !== null ? this.right.left = this : this.parentSub !== null && (this.parent._map.set(this.parentSub, this), this.left !== null && this.left.delete(e)), this.parentSub === null && this.countable && !this.deleted && (this.parent._length += this.length), RK(e.doc.store, this), this.content.integrate(e, this), BR(
        e,
        /** @type {AbstractType<any>} */
        this.parent,
        this.parentSub
      ), /** @type {AbstractType<any>} */
      (this.parent._item !== null && /** @type {AbstractType<any>} */
      this.parent._item.deleted || this.parentSub !== null && this.right !== null) && this.delete(e);
    } else
      new bs(this.id, this.length).integrate(e, 0);
  }
  /**
   * Returns the next non-deleted item
   */
  get next() {
    let e = this.right;
    for (; e !== null && e.deleted; )
      e = e.right;
    return e;
  }
  /**
   * Returns the previous non-deleted item
   */
  get prev() {
    let e = this.left;
    for (; e !== null && e.deleted; )
      e = e.left;
    return e;
  }
  /**
   * Computes the last content address of this Item.
   */
  get lastId() {
    return this.length === 1 ? this.id : _t(this.id.client, this.id.clock + this.length - 1);
  }
  /**
   * Try to merge two items
   *
   * @param {Item} right
   * @return {boolean}
   */
  mergeWith(e) {
    if (this.constructor === e.constructor && nf(e.origin, this.lastId) && this.right === e && nf(this.rightOrigin, e.rightOrigin) && this.id.client === e.id.client && this.id.clock + this.length === e.id.clock && this.deleted === e.deleted && this.redone === null && e.redone === null && this.content.constructor === e.content.constructor && this.content.mergeWith(e.content)) {
      const n = (
        /** @type {AbstractType<any>} */
        this.parent._searchMarker
      );
      return n && n.forEach((i) => {
        i.p === e && (i.p = this, !this.deleted && this.countable && (i.index -= this.length));
      }), e.keep && (this.keep = !0), this.right = e.right, this.right !== null && (this.right.left = this), this.length += e.length, !0;
    }
    return !1;
  }
  /**
   * Mark this Item as deleted.
   *
   * @param {Transaction} transaction
   */
  delete(e) {
    if (!this.deleted) {
      const n = (
        /** @type {AbstractType<any>} */
        this.parent
      );
      this.countable && this.parentSub === null && (n._length -= this.length), this.markDeleted(), Q0(e.deleteSet, this.id.client, this.id.clock, this.length), BR(e, n, this.parentSub), this.content.delete(e);
    }
  }
  /**
   * @param {StructStore} store
   * @param {boolean} parentGCd
   */
  gc(e, n) {
    if (!this.deleted)
      throw _s();
    this.content.gc(e), n ? ZBe(e, this, new bs(this.id, this.length)) : this.content = new Ef(this.length);
  }
  /**
   * Transform the properties of this type to binary and write it to an
   * BinaryEncoder.
   *
   * This is called when this Item is sent to a remote peer.
   *
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
   * @param {number} offset
   */
  write(e, n) {
    const i = n > 0 ? _t(this.id.client, this.id.clock + n - 1) : this.origin, r = this.rightOrigin, s = this.parentSub, o = this.content.getRef() & zx | (i === null ? 0 : Us) | // origin is defined
    (r === null ? 0 : bl) | // right origin is defined
    (s === null ? 0 : F0);
    if (e.writeInfo(o), i !== null && e.writeLeftID(i), r !== null && e.writeRightID(r), i === null && r === null) {
      const a = (
        /** @type {AbstractType<any>} */
        this.parent
      );
      if (a._item !== void 0) {
        const l = a._item;
        if (l === null) {
          const u = k8(a);
          e.writeParentInfo(!0), e.writeString(u);
        } else
          e.writeParentInfo(!1), e.writeLeftID(l.id);
      } else a.constructor === String ? (e.writeParentInfo(!0), e.writeString(a)) : a.constructor === cf ? (e.writeParentInfo(!1), e.writeLeftID(a)) : _s();
      s !== null && e.writeString(s);
    }
    this.content.write(e, n);
  }
}
const EJ = (t, e) => eWe[e & zx](t), eWe = [
  () => {
    _s();
  },
  // GC is not ItemContent
  Rze,
  // 1
  zze,
  // 2
  Lze,
  // 3
  Qze,
  // 4
  Fze,
  // 5
  Bze,
  // 6
  Jze,
  // 7
  Hze,
  // 8
  jze,
  // 9
  () => {
    _s();
  }
  // 10 - Skip is not ItemContent
], tWe = 10;
class Xr extends Kx {
  get deleted() {
    return !0;
  }
  delete() {
  }
  /**
   * @param {Skip} right
   * @return {boolean}
   */
  mergeWith(e) {
    return this.constructor !== e.constructor ? !1 : (this.length += e.length, !0);
  }
  /**
   * @param {Transaction} transaction
   * @param {number} offset
   */
  integrate(e, n) {
    _s();
  }
  /**
   * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
   * @param {number} offset
   */
  write(e, n) {
    e.writeInfo(tWe), We(e.restEncoder, this.length - n);
  }
  /**
   * @param {Transaction} transaction
   * @param {StructStore} store
   * @return {null | number}
   */
  getMissing(e, n) {
    return null;
  }
}
const TJ = (
  /** @type {any} */
  typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : {}
), $J = "__ $YJS$ __";
TJ[$J] === !0 && console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");
TJ[$J] = !0;
const nWe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  AbsolutePosition: DK,
  AbstractConnector: fFe,
  AbstractStruct: Kx,
  AbstractType: ji,
  Array: wl,
  ContentAny: Il,
  ContentBinary: Uf,
  ContentDeleted: Ef,
  ContentDoc: Zf,
  ContentEmbed: Wl,
  ContentFormat: vi,
  ContentJSON: Uh,
  ContentString: yo,
  ContentType: _o,
  Doc: Bl,
  GC: bs,
  ID: cf,
  Item: en,
  Map: oc,
  PermanentUserData: SBe,
  RelativePosition: Yx,
  Skip: Xr,
  Snapshot: x8,
  Text: Cf,
  Transaction: UK,
  UndoManager: sze,
  UpdateDecoderV1: xo,
  UpdateDecoderV2: Xs,
  UpdateEncoderV1: vc,
  UpdateEncoderV2: Ho,
  XmlElement: lc,
  XmlFragment: ac,
  XmlHook: Qh,
  XmlText: X0,
  YArrayEvent: gJ,
  YEvent: ev,
  YMapEvent: vJ,
  YTextEvent: _J,
  YXmlEvent: OJ,
  applyUpdate: EK,
  applyUpdateV2: qx,
  cleanupYTextFormatting: xJ,
  compareIDs: nf,
  compareRelativePositions: LBe,
  convertUpdateFormatV1ToV2: mze,
  convertUpdateFormatV2ToV1: nJ,
  createAbsolutePositionFromRelativePosition: IBe,
  createDeleteSet: Ux,
  createDeleteSetFromStructStore: p8,
  createDocFromSnapshot: WBe,
  createID: _t,
  createRelativePositionFromJSON: EBe,
  createRelativePositionFromTypeIndex: $Be,
  createSnapshot: _8,
  decodeRelativePosition: DBe,
  decodeSnapshot: FBe,
  decodeSnapshotV2: IK,
  decodeStateVector: y8,
  decodeUpdate: lze,
  decodeUpdateV2: XK,
  diffUpdate: dze,
  diffUpdateV2: C8,
  emptySnapshot: BBe,
  encodeRelativePosition: NBe,
  encodeSnapshot: jBe,
  encodeSnapshotV2: PK,
  encodeStateAsUpdate: $K,
  encodeStateAsUpdateV2: TK,
  encodeStateVector: NK,
  encodeStateVectorFromUpdate: uze,
  encodeStateVectorFromUpdateV2: KK,
  equalDeleteSets: pK,
  equalSnapshots: RBe,
  findIndexSS: bo,
  findRootTypeKey: k8,
  getItem: ff,
  getItemCleanEnd: j6,
  getItemCleanStart: Nr,
  getState: Un,
  getTypeChildren: kze,
  isDeleted: Qf,
  isParentOf: Z0,
  iterateDeletedStructs: Of,
  logType: OBe,
  logUpdate: aze,
  logUpdateV2: VK,
  mergeDeleteSets: Sf,
  mergeUpdates: GK,
  mergeUpdatesV2: q0,
  obfuscateUpdate: hze,
  obfuscateUpdateV2: pze,
  parseUpdateMeta: cze,
  parseUpdateMetaV2: JK,
  readUpdate: yBe,
  readUpdateV2: b8,
  relativePositionToJSON: CBe,
  snapshot: zBe,
  snapshotContainsUpdate: QBe,
  transact: nn,
  tryGc: ize,
  typeListToArraySnapshot: xze,
  typeMapGetAllSnapshot: mJ,
  typeMapGetSnapshot: Sze
}, Symbol.toStringTag, { value: "Module" })), MJ = /* @__PURE__ */ Sk(nWe);
var Jx = {}, rf = N;
function NJ(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
let AJ = class {
  constructor(e, n, i = 1) {
    this._offsetMap = e, this._firstNode = n, this._blockOffsetSize = i;
  }
  createSelectionFromOffsets(e, n, i) {
    var r = this._firstNode;
    if (r === null) return null;
    var s = gg(r, e, this._blockOffsetSize);
    let o = gg(r, n, this._blockOffsetSize);
    if (i !== void 0 && (e = YR(e, s, i, this, this._blockOffsetSize), s = gg(r, e, this._blockOffsetSize), n = YR(n, o, i, this, this._blockOffsetSize), o = gg(r, n, this._blockOffsetSize)), s === null || o === null) return null;
    i = s.key, r = o.key;
    let a = rf.$getNodeByKey(i), l = rf.$getNodeByKey(r);
    if (a === null || l === null) return null;
    let u = 0, f = 0, d = "element", h = "element";
    return s.type === "text" ? (u = e - s.start, d = "text", s = a.getNextSibling(), e !== n && u === a.getTextContentSize() && rf.$isTextNode(s) && (u = 0, i = s.__key)) : s.type === "inline" && (i = a.getParentOrThrow().getKey(), u = n > s.start ? s.end : s.start), o.type === "text" ? (f = n - o.start, h = "text") : o.type === "inline" && (r = l.getParentOrThrow().getKey(), f = n > o.start ? o.end : o.start), e = rf.$createRangeSelection(), e === null ? null : (e.anchor.set(i, u, d), e.focus.set(r, f, h), e);
  }
  getOffsetsFromSelection(e) {
    var n = e.anchor, i = e.focus, r = this._offsetMap;
    let s = n.offset;
    var o = i.offset;
    let a = e = -1;
    if (n.type === "text") n = r.get(n.key), n !== void 0 && (e = n.start + s);
    else if (n = n.getNode().getDescendantByIndex(s), n !== null) {
      let l = r.get(n.getKey());
      l !== void 0 && (e = n.getIndexWithinParent() !== s ? l.end : l.start);
    }
    return i.type === "text" ? (o = r.get(i.key), o !== void 0 && (a = o.start + i.offset)) : (i = i.getNode().getDescendantByIndex(o), i !== null && (r = r.get(i.getKey()), r !== void 0 && (a = i.getIndexWithinParent() !== o ? r.end : r.start))), [e, a];
  }
};
function YR(t, e, n, i, r) {
  let s = n._offsetMap;
  i = i._offsetMap;
  let o = /* @__PURE__ */ new Set(), a = t;
  for (; e !== null; ) {
    var l = e.key, u = s.get(l), f = e.end - e.start;
    if (o.add(l), u === void 0 ? a += f : (l = u.end - u.start, l !== f && (a += f - l)), f = e.prev, f !== null) e = f;
    else {
      for (e = e.parent; e !== null; ) u = e.prev, u !== null && (f = u.key, l = s.get(f), u = u.end - u.start, o.add(f), l === void 0 ? a += u : (f = l.end - l.start, f !== u && (a += u - f))), e = e.parent;
      break;
    }
  }
  if (n = n._firstNode, n !== null) {
    for (e = gg(n, t, r), t = !1; e !== null; ) {
      if (!o.has(e.key)) {
        t = !0;
        break;
      }
      e = e.parent;
    }
    if (!t) for (; e !== null; ) t = e.key, o.has(t) || (r = i.get(t), t = e.end - e.start, r === void 0 ? a -= t : (r = r.end - r.start, t !== r && (a += r - t))), e = e.prev;
  }
  return a;
}
function gg(t, e, n) {
  for (; t !== null; ) {
    if (e < t.end + (t.type !== "element" || n === 0 ? 1 : 0)) {
      let i = t.child;
      if (i !== null) {
        t = i;
        continue;
      }
      return t;
    }
    if (t = t.next, t === null) break;
  }
  return null;
}
function DJ(t, e, n, i, r, s) {
  let o = null, a = null, l = e.length;
  for (let x = 0; x < l; x++) {
    {
      var u = t, f = e[x], d = n, h = i, m = r, g = s, w = h.get(f);
      w === void 0 && NJ(3);
      let _ = u.offset;
      if (rf.$isElementNode(w)) {
        let S = A8(w, h);
        h = (w = S.length === 0) ? null : DJ(u, S, null, h, m, g), (!u.prevIsBlock || w) && (u.prevIsBlock = !0, u.offset += g), d = { child: h, end: _, key: f, next: null, parent: d, prev: null, start: _, type: "element" }, h !== null && (h.parent = d), d.end = u.offset, m.set(f, d), f = d;
      } else u.prevIsBlock = !1, g = rf.$isTextNode(w), u = { child: null, end: u.offset += g ? w.__text.length : 1, key: f, next: null, parent: d, prev: null, start: _, type: g ? "text" : "inline" }, m.set(f, u), f = u;
    }
    a === null ? o = f : (f.prev = a, a.next = f), a = f;
  }
  return o;
}
function A8(t, e) {
  let n = [];
  for (t = t.__first; t !== null; ) {
    let i = e === null ? rf.$getNodeByKey(t) : e.get(t);
    i != null || NJ(101), n.push(t), t = i.__next;
  }
  return n;
}
Jx.$createOffsetView = function(t, e = 1, n) {
  n = (n || t._pendingEditorState || t._editorState)._nodeMap;
  let i = n.get("root");
  return t = /* @__PURE__ */ new Map(), n = DJ({ offset: 0, prevIsBlock: !1 }, A8(i, n), null, n, t, e), new AJ(t, n, e);
};
Jx.OffsetView = AJ;
Jx.createChildrenArray = A8;
const iWe = Jx;
var rWe = iWe, ot = N, $n = MJ, VR = Ri, XR = rWe;
function or(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
class vg {
  constructor(e, n) {
    this._key = "", this._map = e, this._parent = n, this._type = "linebreak";
  }
  getNode() {
    let e = ot.$getNodeByKey(this._key);
    return ot.$isLineBreakNode(e) ? e : null;
  }
  getKey() {
    return this._key;
  }
  getSharedType() {
    return this._map;
  }
  getType() {
    return this._type;
  }
  getSize() {
    return 1;
  }
  getOffset() {
    return this._parent.getChildOffset(this);
  }
  destroy(e) {
    e.collabNodeMap.delete(this._key);
  }
}
function PJ(t, e) {
  return e = new vg(t, e), t._collabNode = e;
}
class gs {
  constructor(e, n, i, r) {
    this._key = "", this._map = e, this._parent = i, this._text = n, this._type = r, this._normalized = !1;
  }
  getPrevNode(e) {
    return e === null ? null : (e = e.get(this._key), ot.$isTextNode(e) ? e : null);
  }
  getNode() {
    let e = ot.$getNodeByKey(this._key);
    return ot.$isTextNode(e) ? e : null;
  }
  getSharedType() {
    return this._map;
  }
  getType() {
    return this._type;
  }
  getKey() {
    return this._key;
  }
  getSize() {
    return this._text.length + (this._normalized ? 0 : 1);
  }
  getOffset() {
    return this._parent.getChildOffset(this);
  }
  spliceText(e, n, i) {
    let r = this._parent._xmlText;
    e = this.getOffset() + 1 + e, n !== 0 && r.delete(e, n), i !== "" && r.insert(e, i);
  }
  syncPropertiesAndTextFromLexical(e, n, i) {
    var r = this.getPrevNode(i);
    if (i = n.__text, I8(e, this._map, r, n), r !== null && (e = r.__text, e !== i)) {
      r = n.__key, n = e;
      var s = ot.$getSelection();
      e = i.length, ot.$isRangeSelection(s) && s.isCollapsed() && (s = s.anchor, s.key === r && (e = s.offset)), r = n.length;
      let o = i.length, a = s = 0;
      for (; s < r && s < o && n[s] === i[s] && s < e; ) s++;
      for (; a + s < r && a + s < o && n[r - a - 1] === i[o - a - 1]; ) a++;
      for (; a + s < r && a + s < o && n[s] === i[s]; ) s++;
      n = s, e = i.slice(s, o - a), r = r - s - a, this.spliceText(
        n,
        r,
        e
      ), this._text = i;
    }
  }
  syncPropertiesAndTextFromYjs(e, n) {
    let i = this.getNode();
    i === null && or(84), P8(e, this._map, i, n), e = this._text, i.__text !== e && (i.getWritable().__text = e);
  }
  destroy(e) {
    e.collabNodeMap.delete(this._key);
  }
}
function IJ(t, e, n, i) {
  return e = new gs(t, e, n, i), t._collabNode = e;
}
let sWe = /* @__PURE__ */ new Set(["__key", "__parent", "__next", "__prev"]), oWe = /* @__PURE__ */ new Set(["__first", "__last", "__size"]), aWe = /* @__PURE__ */ new Set(["__cachedText"]), lWe = /* @__PURE__ */ new Set(["__text"]);
function LJ(t, e, n) {
  if (sWe.has(t)) return !0;
  if (ot.$isTextNode(e)) {
    if (lWe.has(t)) return !0;
  } else if (ot.$isElementNode(e) && (oWe.has(t) || ot.$isRootNode(e) && aWe.has(t))) return !0;
  return e = n.excludedProperties.get(e.constructor), e != null && e.has(t);
}
function Zm(t) {
  return t = ot.$getNodeByKey(t), t === null && or(85), t;
}
function GR(t, e, n) {
  let i = e.__type;
  if (ot.$isElementNode(e)) {
    var r = new $n.XmlText();
    r = L8(r, n, i), r.syncPropertiesFromLexical(t, e, null), r.syncChildrenFromLexical(t, e, null, null, null);
  } else ot.$isTextNode(e) ? (r = new $n.Map(), r = IJ(r, e.__text, n, i), r.syncPropertiesAndTextFromLexical(t, e, null)) : ot.$isLineBreakNode(e) ? (t = new $n.Map(), t.set("__type", "linebreak"), r = PJ(t, n)) : ot.$isDecoratorNode(e) ? (r = new $n.XmlElement(), r = RJ(r, n, i), r.syncPropertiesFromLexical(t, e, null)) : or(86);
  return r._key = e.__key, r;
}
function D8(t, e, n) {
  let i = e._collabNode;
  if (i === void 0) {
    var r = t.editor._nodes;
    let s = e instanceof $n.Map ? e.get("__type") : e.getAttribute("__type");
    if (s == null && or(87), r.get(s) === void 0 && or(88, s), r = e.parent, t = n === void 0 && r !== null ? D8(t, r) : n || null, t instanceof tv || or(89), e instanceof $n.XmlText) return L8(e, t, s);
    if (e instanceof $n.Map) return s === "linebreak" ? PJ(e, t) : IJ(e, "", t, s);
    if (e instanceof $n.XmlElement) return RJ(e, t, s);
  }
  return i;
}
function P8(t, e, n, i) {
  i = i === null ? e instanceof $n.Map ? Array.from(e.keys()) : Object.keys(e.getAttributes()) : Array.from(i);
  let r;
  for (let o = 0; o < i.length; o++) {
    let a = i[o];
    if (LJ(a, n, t)) continue;
    var s = n[a];
    let l = e instanceof $n.Map ? e.get(a) : e.getAttribute(a);
    if (s !== l) {
      if (l instanceof $n.Doc) {
        let u = t.docMap;
        s instanceof $n.Doc && u.delete(s.guid), s = ot.createEditor();
        let f = l.guid;
        s._key = f, u.set(f, l), l = s;
      }
      r === void 0 && (r = n.getWritable()), r[a] = l;
    }
  }
}
function I8(t, e, n, i) {
  var r = i.__type, s = t.nodeProperties;
  let o = s.get(r);
  for (o === void 0 && (o = Object.keys(i).filter((l) => !LJ(l, i, t)), s.set(r, o)), r = t.editor.constructor, s = 0; s < o.length; s++) {
    let l = o[s];
    var a = n === null ? void 0 : n[l];
    let u = i[l];
    if (a !== u) {
      if (u instanceof r) {
        let f = t.docMap, d;
        a instanceof r && (a = a._key, d = f.get(a), f.delete(a)), a = d || new $n.Doc();
        let h = a.guid;
        u._key = h, f.set(h, a), u = a, t.editor.update(() => {
          i.markDirty();
        });
      }
      e instanceof $n.Map ? e.set(l, u) : e.setAttribute(l, u);
    }
  }
}
function zy(t, e, n) {
  let i = 0, r = 0, s = t._children, o = s.length;
  for (; r < o; r++) {
    t = s[r];
    let a = i, l = t.getSize();
    if (i += l, (n ? i >= e : i > e) && t instanceof gs) return n = e - a - 1, 0 > n && (n = 0), { length: i - e, node: t, nodeIndex: r, offset: n };
    if (i > e) return { length: 0, node: t, nodeIndex: r, offset: a };
    if (r === o - 1) return { length: 0, node: null, nodeIndex: r + 1, offset: a + 1 };
  }
  return { length: 0, node: null, nodeIndex: 0, offset: 0 };
}
function KR(t) {
  let e = t.anchor;
  t = t.focus;
  let n = !1;
  try {
    let i = e.getNode(), r = t.getNode();
    (!i.isAttached() || !r.isAttached() || ot.$isTextNode(i) && e.offset > i.getTextContentSize() || ot.$isTextNode(r) && t.offset > r.getTextContentSize()) && (n = !0);
  } catch {
    n = !0;
  }
  return n;
}
function uWe(t, e) {
  t.doc.transact(e, t);
}
function gS(t, e) {
  let n = [];
  for (t = t.__first; t !== null; ) {
    let i = e === null ? ot.$getNodeByKey(t) : e.get(t);
    i != null || or(101), n.push(t), t = i.__next;
  }
  return n;
}
function JR(t) {
  var e = t.getParent();
  if (e !== null) {
    let r = t.getWritable();
    e = e.getWritable();
    var n = t.getPreviousSibling();
    if (t = t.getNextSibling(), n === null) if (t !== null) {
      var i = t.getWritable();
      e.__first = t.__key, i.__prev = null;
    } else e.__first = null;
    else {
      if (i = n.getWritable(), t !== null) {
        let s = t.getWritable();
        s.__prev = i.__key, i.__next = s.__key;
      } else i.__next = null;
      r.__prev = null;
    }
    t === null ? n !== null ? (t = n.getWritable(), e.__last = n.__key, t.__next = null) : e.__last = null : (t = t.getWritable(), n !== null ? (n = n.getWritable(), n.__next = t.__key, t.__prev = n.__key) : t.__prev = null, r.__next = null), e.__size--, r.__parent = null;
  }
}
class gu {
  constructor(e, n, i) {
    this._key = "", this._xmlElem = e, this._parent = n, this._type = i;
  }
  getPrevNode(e) {
    return e === null ? null : (e = e.get(this._key), ot.$isDecoratorNode(e) ? e : null);
  }
  getNode() {
    let e = ot.$getNodeByKey(this._key);
    return ot.$isDecoratorNode(e) ? e : null;
  }
  getSharedType() {
    return this._xmlElem;
  }
  getType() {
    return this._type;
  }
  getKey() {
    return this._key;
  }
  getSize() {
    return 1;
  }
  getOffset() {
    return this._parent.getChildOffset(this);
  }
  syncPropertiesFromLexical(e, n, i) {
    i = this.getPrevNode(i), I8(e, this._xmlElem, i, n);
  }
  syncPropertiesFromYjs(e, n) {
    let i = this.getNode();
    i === null && or(83), P8(e, this._xmlElem, i, n);
  }
  destroy(e) {
    e.collabNodeMap.delete(this._key);
  }
}
function RJ(t, e, n) {
  return e = new gu(t, e, n), t._collabNode = e;
}
let tv = class jc {
  constructor(e, n, i) {
    this._key = "", this._children = [], this._xmlText = e, this._type = i, this._parent = n;
  }
  getPrevNode(e) {
    return e === null ? null : (e = e.get(this._key), ot.$isElementNode(e) ? e : null);
  }
  getNode() {
    let e = ot.$getNodeByKey(this._key);
    return ot.$isElementNode(e) ? e : null;
  }
  getSharedType() {
    return this._xmlText;
  }
  getType() {
    return this._type;
  }
  getKey() {
    return this._key;
  }
  isEmpty() {
    return this._children.length === 0;
  }
  getSize() {
    return 1;
  }
  getOffset() {
    let e = this._parent;
    return e === null && or(90), e.getChildOffset(this);
  }
  syncPropertiesFromYjs(e, n) {
    let i = this.getNode();
    i === null && or(91), P8(e, this._xmlText, i, n);
  }
  applyChildrenYjsDelta(e, n) {
    let i = this._children, r = 0;
    for (let d = 0; d < n.length; d++) {
      var s = n[d], o = s.insert, a = s.delete;
      if (s.retain != null) r += s.retain;
      else if (typeof a == "number") for (o = a; 0 < o; ) {
        let { node: h, nodeIndex: m, offset: g, length: w } = zy(this, r, !1);
        if (h instanceof jc || h instanceof vg || h instanceof gu) i.splice(m, 1), --o;
        else if (h instanceof gs) {
          s = Math.min(o, w), a = m !== 0 ? i[m - 1] : null;
          var l = h.getSize();
          if (g === 0 && s === 1 && 0 < m && a instanceof gs && w === l && Array.from(h._map.keys()).length === 0) a._text += h._text, i.splice(m, 1);
          else if (g === 0 && s === l) i.splice(m, 1);
          else {
            a = h, l = h._text;
            var u = g, f = s;
            l = l.slice(0, u) + "" + l.slice(u + f), a._text = l;
          }
          o -= s;
        } else break;
      }
      else if (o != null) if (typeof o == "string") {
        let { node: h, offset: m } = zy(this, r, !0);
        h instanceof gs ? (s = h, a = h._text, l = m, u = o, a = a.slice(0, l) + u + a.slice(l + 0), s._text = a) : this._xmlText.delete(m, o.length), r += o.length;
      } else s = o, { nodeIndex: o } = zy(this, r, !1), s = D8(e, s, this), i.splice(o, 0, s), r += 1;
      else throw Error("Unexpected delta format");
    }
  }
  syncChildrenFromYjs(e) {
    var n = this.getNode();
    n === null && or(92);
    var i = n.__key;
    let r = gS(n, null), s = r.length;
    var o = this._children;
    let a = o.length, l = e.collabNodeMap, u = /* @__PURE__ */ new Set(), f, d = 0;
    var h = null;
    a !== s && n.getWritable();
    for (let C = 0; C < a; C++) {
      var m = r[d], g = o[C], w = g.getNode(), x = g._key;
      if (w !== null && m === x) h = ot.$isTextNode(w), u.add(m), h && (g._key = m, g instanceof jc ? (h = g._xmlText, g.syncPropertiesFromYjs(e, null), g.applyChildrenYjsDelta(e, h.toDelta()), g.syncChildrenFromYjs(e)) : g instanceof gs ? g.syncPropertiesAndTextFromYjs(e, null) : g instanceof gu ? g.syncPropertiesFromYjs(
        e,
        null
      ) : g instanceof vg || or(93)), h = w, d++;
      else {
        if (f === void 0) for (f = /* @__PURE__ */ new Set(), x = 0; x < a; x++) {
          var _ = o[x]._key;
          _ !== "" && f.add(_);
        }
        if (w !== null && m !== void 0 && !f.has(m)) {
          g = Zm(m), JR(g), C--, d++;
          continue;
        }
        w = n.getWritable(), m = e, x = g, _ = i;
        var S = x.getType();
        let E = m.editor._nodes.get(S);
        E === void 0 && or(88, S), S = new E.klass(), S.__parent = _, x._key = S.__key, x instanceof jc ? (_ = x._xmlText, x.syncPropertiesFromYjs(m, null), x.applyChildrenYjsDelta(m, _.toDelta()), x.syncChildrenFromYjs(m)) : x instanceof gs ? x.syncPropertiesAndTextFromYjs(m, null) : x instanceof gu && x.syncPropertiesFromYjs(m, null), m.collabNodeMap.set(S.__key, x), m = S, x = m.__key, l.set(x, g), h === null ? (h = w.getFirstChild(), w.__first = x, h !== null && (h = h.getWritable(), h.__prev = x, m.__next = h.__key)) : (g = h.getWritable(), _ = h.getNextSibling(), g.__next = x, m.__prev = h.__key, _ !== null && (h = _.getWritable(), h.__prev = x, m.__next = h.__key)), C === a - 1 && (w.__last = x), w.__size++, h = m;
      }
    }
    for (n = 0; n < s; n++) o = r[n], u.has(o) || (i = Zm(o), o = e.collabNodeMap.get(o), o !== void 0 && o.destroy(e), JR(i));
  }
  syncPropertiesFromLexical(e, n, i) {
    I8(
      e,
      this._xmlText,
      this.getPrevNode(i),
      n
    );
  }
  _syncChildFromLexical(e, n, i, r, s, o) {
    n = this._children[n], i = Zm(i), n instanceof jc && ot.$isElementNode(i) ? (n.syncPropertiesFromLexical(e, i, r), n.syncChildrenFromLexical(e, i, r, s, o)) : n instanceof gs && ot.$isTextNode(i) ? n.syncPropertiesAndTextFromLexical(e, i, r) : n instanceof gu && ot.$isDecoratorNode(i) && n.syncPropertiesFromLexical(e, i, r);
  }
  syncChildrenFromLexical(e, n, i, r, s) {
    var o = this.getPrevNode(i);
    let a = o === null ? [] : gS(o, i);
    o = gS(n, null);
    let l = a.length - 1, u = o.length - 1, f = e.collabNodeMap, d, h, m = 0;
    for (n = 0; m <= l && n <= u; ) {
      var g = a[m];
      let x = o[n];
      if (g === x) this._syncChildFromLexical(e, n, x, i, r, s), m++, n++;
      else {
        d === void 0 && (d = new Set(a)), h === void 0 && (h = new Set(o));
        var w = h.has(g);
        g = d.has(x), w ? (w = Zm(x), w = GR(e, w, this), f.set(x, w), g ? (this.splice(e, n, 1, w), m++) : this.splice(e, n, 0, w), n++) : (this.splice(e, n, 1), m++);
      }
    }
    if (i = m > l, r = n > u, i && !r) for (; n <= u; ++n) i = o[n], r = Zm(i), r = GR(e, r, this), this.append(r), f.set(i, r);
    else if (r && !i) for (o = this._children.length - 1; o >= n; o--) this.splice(e, o, 1);
  }
  append(e) {
    let n = this._xmlText;
    var i = this._children;
    if (i = i[i.length - 1], i = i !== void 0 ? i.getOffset() + i.getSize() : 0, e instanceof jc) n.insertEmbed(i, e._xmlText);
    else if (e instanceof gs) {
      let r = e._map;
      r.parent === null && n.insertEmbed(i, r), n.insert(i + 1, e._text);
    } else e instanceof vg ? n.insertEmbed(i, e._map) : e instanceof gu && n.insertEmbed(i, e._xmlElem);
    this._children.push(e);
  }
  splice(e, n, i, r) {
    let s = this._children;
    var o = s[n];
    if (o === void 0) r === void 0 && or(94), this.append(r);
    else {
      var a = o.getOffset();
      a === -1 && or(95);
      var l = this._xmlText;
      if (i !== 0 && l.delete(a, o.getSize()), r instanceof jc ? l.insertEmbed(a, r._xmlText) : r instanceof gs ? (o = r._map, o.parent === null && l.insertEmbed(a, o), l.insert(a + 1, r._text)) : r instanceof vg ? l.insertEmbed(a, r._map) : r instanceof gu && l.insertEmbed(a, r._xmlElem), i !== 0) for (a = s.slice(n, n + i), l = 0; l < a.length; l++) a[l].destroy(e);
      r !== void 0 ? s.splice(n, i, r) : s.splice(n, i);
    }
  }
  getChildOffset(e) {
    let n = 0, i = this._children;
    for (let r = 0; r < i.length; r++) {
      let s = i[r];
      if (s === e) return n;
      n += s.getSize();
    }
    return -1;
  }
  destroy(e) {
    let n = e.collabNodeMap, i = this._children;
    for (let r = 0; r < i.length; r++) i[r].destroy(e);
    n.delete(this._key);
  }
};
function L8(t, e, n) {
  return e = new tv(t, e, n), t._collabNode = e;
}
function ej(t, e) {
  var n = e.collabNodeMap.get(t.key);
  if (n === void 0) return null;
  e = t.offset;
  let i = n.getSharedType();
  if (n instanceof gs) {
    if (i = n._parent._xmlText, t = n.getOffset(), t === -1) return null;
    e = t + 1 + e;
  } else if (n instanceof tv && t.type === "element") {
    var r = t.getNode();
    if (!ot.$isElementNode(r)) throw Error("Element point must be an element node");
    for (n = t = 0, r = r.getFirstChild(); r !== null && n++ < e; ) ot.$isTextNode(r) ? t += r.getTextContentSize() + 1 : t++, r = r.getNextSibling();
    e = t;
  }
  return $n.createRelativePositionFromTypeIndex(
    i,
    e
  );
}
function tj(t, e) {
  if (t == null) {
    if (e != null) return !0;
  } else if (e == null || !$n.compareRelativePositions(t, e)) return !0;
  return !1;
}
function nj(t, e) {
  if (t = t.cursorsContainer, t !== null) {
    e = e.selections;
    let n = e.length;
    for (let i = 0; i < n; i++) t.removeChild(e[i]);
  }
}
function ij(t, e) {
  var n = e.awareness.getLocalState();
  if (n !== null && (e = n.anchorPos, n = n.focusPos, e !== null && n !== null && (e = $n.createAbsolutePositionFromRelativePosition(e, t.doc), t = $n.createAbsolutePositionFromRelativePosition(n, t.doc), e !== null && t !== null))) {
    let [i, r] = xk(e.type, e.index), [s, o] = xk(t.type, t.index);
    if (i !== null && s !== null) {
      e = i.getKey(), n = s.getKey();
      let a = ot.$getSelection();
      ot.$isRangeSelection(a) && (t = a.focus, rj(a.anchor, e, r), rj(t, n, o));
    }
  }
}
function rj(t, e, n) {
  if (t.key !== e || t.offset !== n) {
    let i = ot.$getNodeByKey(e);
    if (i !== null && !ot.$isElementNode(i) && !ot.$isTextNode(i)) {
      let r = i.getParentOrThrow();
      e = r.getKey(), n = i.getIndexWithinParent(), i = r;
    }
    t.set(e, n, ot.$isElementNode(i) ? "element" : "text");
  }
}
function xk(t, e) {
  if (t = t._collabNode, t === void 0) return [null, 0];
  if (t instanceof tv) {
    let { node: n, offset: i } = zy(t, e, !0);
    return n === null ? [t, 0] : [n, i];
  }
  return [null, 0];
}
function jJ(t, e) {
  var n = Array.from(e.awareness.getStates()), i = t.clientID;
  e = t.cursors;
  var r = t.editor._editorState._nodeMap;
  let s = /* @__PURE__ */ new Set();
  for (var o = 0; o < n.length; o++) {
    let [C, E] = n[o];
    if (C !== i) {
      s.add(C);
      let { anchorPos: M, focusPos: $, name: P, color: W, focusing: z } = E;
      var a = null, l = e.get(C);
      if (l === void 0 && (l = { color: W, name: P, selection: null }, e.set(C, l)), M !== null && $ !== null && z) {
        var u = $n.createAbsolutePositionFromRelativePosition(M, t.doc), f = $n.createAbsolutePositionFromRelativePosition($, t.doc);
        if (u !== null && f !== null) {
          let [Z, L] = xk(u.type, u.index), [Q, V] = xk(f.type, f.index);
          if (Z !== null && Q !== null) {
            u = Z.getKey();
            var d = Q.getKey();
            if (a = l.selection, a === null) {
              a = l, f = L;
              var h = V, m = a.color, g = document.createElement("span");
              g.style.cssText = `position:absolute;top:0;bottom:0;right:-1px;width:1px;background-color:${m};z-index:10;`;
              var w = document.createElement("span");
              w.textContent = a.name, w.style.cssText = `position:absolute;left:-2px;top:-16px;background-color:${m};color:#fff;line-height:12px;font-size:12px;padding:2px;font-family:Arial;font-weight:bold;white-space:nowrap;`, g.appendChild(w), a = { anchor: { key: u, offset: f }, caret: g, color: m, focus: { key: d, offset: h }, name: w, selections: [] };
            } else f = a.anchor, h = a.focus, f.key = u, f.offset = L, h.key = d, h.offset = V;
          }
        }
      }
      e: if (u = t, f = l, g = a, m = r, h = u.editor, a = h.getRootElement(), l = u.cursorsContainer, l !== null && a !== null && (a = l.offsetParent, a !== null)) if (a = a.getBoundingClientRect(), d = f.selection, g === null) d !== null && (f.selection = null, nj(u, d));
      else {
        f.selection = g, f = g.caret, d = g.color, u = g.selections, w = g.anchor, g = g.focus;
        var x = w.key, _ = g.key, S = m.get(x);
        if (m = m.get(_), S != null && m != null) {
          if (S === m && ot.$isLineBreakNode(S)) m = [h.getElementByKey(x).getBoundingClientRect()];
          else {
            if (m = VR.createDOMRange(h, S, w.offset, m, g.offset), m === null) break e;
            m = VR.createRectsFromDOMRange(h, m);
          }
          for (g = u.length, h = m.length, w = 0; w < h; w++) S = m[w], x = u[w], x === void 0 && (x = document.createElement("span"), u[w] = x, _ = document.createElement("span"), x.appendChild(_), l.appendChild(x)), S = `position:absolute;top:${S.top - a.top}px;left:${S.left - a.left}px;height:${S.height}px;width:${S.width}px;pointer-events:none;z-index:5;`, x.style.cssText = S, x.firstChild.style.cssText = `${S}left:0;top:0;background-color:${d};opacity:0.3;`, w === h - 1 && f.parentNode !== x && x.appendChild(f);
          for (a = g - 1; a >= h; a--) l.removeChild(u[a]), u.pop();
        }
      }
    }
  }
  for (n = Array.from(e.keys()), i = 0; i < n.length; i++) r = n[i], s.has(r) || (o = e.get(r), o !== void 0 && (o = o.selection, o !== null && nj(t, o), e.delete(r)));
}
function FJ(t, e, n, i) {
  e = e.awareness;
  var r = e.getLocalState();
  if (r !== null) {
    var { anchorPos: s, focusPos: o, name: a, color: l, focusing: u, awarenessData: f } = r, d = r = null;
    (i !== null && (s === null || i.is(n)) || n !== null) && (ot.$isRangeSelection(i) && (r = ej(i.anchor, t), d = ej(i.focus, t)), (tj(s, r) || tj(o, d)) && e.setLocalState({ anchorPos: r, awarenessData: f, color: l, focusPos: d, focusing: u, name: a }));
  }
}
let cWe = ot.createCommand("CONNECTED_COMMAND"), fWe = ot.createCommand("TOGGLE_CONNECT_COMMAND");
Ua.CONNECTED_COMMAND = cWe;
Ua.TOGGLE_CONNECT_COMMAND = fWe;
Ua.createBinding = function(t, e, n, i, r, s) {
  return i != null || or(81), e = i.get("root", $n.XmlText), e = L8(e, null, "root"), e._key = "root", { clientID: i.clientID, collabNodeMap: /* @__PURE__ */ new Map(), cursors: /* @__PURE__ */ new Map(), cursorsContainer: null, doc: i, docMap: r, editor: t, excludedProperties: s || /* @__PURE__ */ new Map(), id: n, nodeProperties: /* @__PURE__ */ new Map(), root: e };
};
Ua.createUndoManager = function(t, e) {
  return new $n.UndoManager(e, { trackedOrigins: /* @__PURE__ */ new Set([t, null]) });
};
Ua.initLocalState = function(t, e, n, i, r) {
  t.awareness.setLocalState({ anchorPos: null, awarenessData: r, color: n, focusPos: null, focusing: i, name: e });
};
Ua.setLocalStateFocus = function(t, e, n, i, r) {
  ({ awareness: t } = t);
  let s = t.getLocalState();
  s === null && (s = { anchorPos: null, awarenessData: r, color: n, focusPos: null, focusing: i, name: e }), s.focusing = i, t.setLocalState(s);
};
Ua.syncCursorPositions = jJ;
Ua.syncLexicalUpdateToYjs = function(t, e, n, i, r, s, o, a) {
  uWe(t, () => {
    i.read(() => {
      if (a.has("collaboration") || a.has("historic")) {
        if (0 < o.size) {
          var l = Array.from(o), u = t.collabNodeMap, f = [];
          for (let g = 0; g < l.length; g++) {
            var d = l[g], h = ot.$getNodeByKey(d), m = u.get(d);
            if (m instanceof gs) if (ot.$isTextNode(h)) f.push([m, h.__text]);
            else {
              if (h = m.getOffset(), h === -1) continue;
              let w = m._parent;
              m._normalized = !0, w._xmlText.delete(h, 1), u.delete(d), d = w._children, m = d.indexOf(m), d.splice(m, 1);
            }
          }
          for (l = 0; l < f.length; l++) {
            let [g, w] = f[l];
            g instanceof gs && typeof w == "string" && (g._text = w);
          }
        }
      } else r.has("root") && (f = n._nodeMap, l = ot.$getRoot(), u = t.root, u.syncPropertiesFromLexical(t, l, f), u.syncChildrenFromLexical(t, l, f, r, s)), f = ot.$getSelection(), FJ(t, e, n._selection, f);
    });
  });
};
Ua.syncYjsChangesToLexical = function(t, e, n, i) {
  let r = t.editor, s = r._editorState;
  n.forEach((o) => o.delta), r.update(() => {
    for (var o = r._pendingEditorState, a = 0; a < n.length; a++) {
      var l = t, u = n[a], { target: f } = u;
      if (f = D8(l, f), f instanceof tv && u instanceof $n.YTextEvent) {
        let { keysChanged: d, childListChanged: h, delta: m } = u;
        0 < d.size && f.syncPropertiesFromYjs(l, d), h && (f.applyChildrenYjsDelta(l, m), f.syncChildrenFromYjs(l));
      } else f instanceof gs && u instanceof $n.YMapEvent ? ({ keysChanged: u } = u, 0 < u.size && f.syncPropertiesAndTextFromYjs(
        l,
        u
      )) : f instanceof gu && u instanceof $n.YXmlEvent ? ({ attributesChanged: u } = u, 0 < u.size && f.syncPropertiesFromYjs(l, u)) : or(82);
    }
    if (a = ot.$getSelection(), ot.$isRangeSelection(a)) if (KR(a)) {
      if (l = s._selection, ot.$isRangeSelection(l)) {
        f = XR.$createOffsetView(r, 0, s), o = XR.$createOffsetView(r, 0, o);
        let [d, h] = f.getOffsetsFromSelection(l);
        o = 0 <= d && 0 <= h ? o.createSelectionFromOffsets(d, h, f) : null, o !== null ? ot.$setSelection(o) : (ij(t, e), KR(a) && (o = ot.$getRoot(), o.getChildrenSize() === 0 && o.append(ot.$createParagraphNode()), ot.$getRoot().selectEnd()));
      }
      FJ(
        t,
        e,
        l,
        ot.$getSelection()
      );
    } else ij(t, e);
  }, { onUpdate: () => {
    jJ(t, e);
  }, skipTransforms: !0, tag: i ? "historic" : "collaboration" });
};
const dWe = Ua;
var hWe = dWe, pWe = ax, mWe = Oe, Or = j, BJ = lt, ma = hWe, Er = N, gWe = xj, vWe = MJ;
function bWe(t, e, n, i, r, s, o, a, l, u, f) {
  let d = Or.useRef(!1), [h, m] = Or.useState(i.get(e)), g = Or.useMemo(() => ma.createBinding(t, n, e, h, i, u), [t, n, e, i, h, u]), w = Or.useCallback(() => {
    n.connect();
  }, [n]), x = Or.useCallback(() => {
    try {
      n.disconnect();
    } catch {
    }
  }, [n]);
  Or.useEffect(() => {
    let { root: S } = g, { awareness: C } = n, E = ({ status: Z }) => {
      t.dispatchCommand(ma.CONNECTED_COMMAND, Z === "connected");
    }, M = (Z) => {
      o && Z && S.isEmpty() && S._xmlText._length === 0 && d.current === !1 && kWe(t, l), d.current = !1;
    }, $ = () => {
      ma.syncCursorPositions(g, n);
    }, P = (Z, L) => {
      L = L.origin, L !== g && ma.syncYjsChangesToLexical(g, n, Z, L instanceof vWe.UndoManager);
    };
    ma.initLocalState(n, r, s, document.activeElement === t.getRootElement(), f || {});
    let W = (Z) => {
      xWe(t, g), m(Z), i.set(e, Z), d.current = !0;
    };
    n.on("reload", W), n.on("status", E), n.on("sync", M), C.on("update", $), S.getSharedType().observeDeep(P);
    let z = t.registerUpdateListener(({ prevEditorState: Z, editorState: L, dirtyLeaves: Q, dirtyElements: V, normalizedNodes: H, tags: R }) => {
      R.has("skip-collab") === !1 && ma.syncLexicalUpdateToYjs(g, n, Z, L, V, Q, H, R);
    });
    return w(), () => {
      d.current === !1 && x(), n.off("sync", M), n.off("status", E), n.off("reload", W), C.off("update", $), S.getSharedType().unobserveDeep(P), i.delete(e), z();
    };
  }, [g, s, w, x, i, t, e, l, r, n, o, f]);
  let _ = Or.useMemo(() => gWe.createPortal(Or.createElement("div", { ref: (S) => {
    g.cursorsContainer = S;
  } }), a && a.current || document.body), [g, a]);
  return Or.useEffect(
    () => t.registerCommand(ma.TOGGLE_CONNECT_COMMAND, (S) => (w !== void 0 && x !== void 0 && (S ? (console.log("Collaboration connected!"), w()) : (console.log("Collaboration disconnected!"), x())), !0), Er.COMMAND_PRIORITY_EDITOR),
    [w, x, t]
  ), [_, g];
}
function yWe(t, e, n, i, r) {
  Or.useEffect(() => BJ.mergeRegister(t.registerCommand(Er.FOCUS_COMMAND, () => (ma.setLocalStateFocus(e, n, i, !0, r || {}), !1), Er.COMMAND_PRIORITY_EDITOR), t.registerCommand(Er.BLUR_COMMAND, () => (ma.setLocalStateFocus(e, n, i, !1, r || {}), !1), Er.COMMAND_PRIORITY_EDITOR)), [i, t, n, e, r]);
}
function wWe(t, e) {
  let n = Or.useMemo(() => ma.createUndoManager(e, e.root.getSharedType()), [e]);
  Or.useEffect(() => BJ.mergeRegister(t.registerCommand(Er.UNDO_COMMAND, () => (n.undo(), !0), Er.COMMAND_PRIORITY_EDITOR), t.registerCommand(Er.REDO_COMMAND, () => (n.redo(), !0), Er.COMMAND_PRIORITY_EDITOR)));
  let i = Or.useCallback(() => {
    n.clear();
  }, [n]);
  return Or.useEffect(() => {
    let r = () => {
      t.dispatchCommand(Er.CAN_UNDO_COMMAND, 0 < n.undoStack.length), t.dispatchCommand(Er.CAN_REDO_COMMAND, 0 < n.redoStack.length);
    };
    return n.on(
      "stack-item-added",
      r
    ), n.on("stack-item-popped", r), n.on("stack-cleared", r), () => {
      n.off("stack-item-added", r), n.off("stack-item-popped", r), n.off("stack-cleared", r);
    };
  }, [t, n]), i;
}
function kWe(t, e) {
  t.update(() => {
    var n = Er.$getRoot();
    if (n.isEmpty()) if (e) switch (typeof e) {
      case "string":
        var i = t.parseEditorState(e);
        t.setEditorState(i, { tag: "history-merge" });
        break;
      case "object":
        t.setEditorState(e, { tag: "history-merge" });
        break;
      case "function":
        t.update(() => {
          Er.$getRoot().isEmpty() && e(t);
        }, { tag: "history-merge" });
    }
    else i = Er.$createParagraphNode(), n.append(i), { activeElement: n } = document, (Er.$getSelection() !== null || n !== null && n === t.getRootElement()) && i.select();
  }, { tag: "history-merge" });
}
function xWe(t, e) {
  if (t.update(() => {
    let i = Er.$getRoot();
    i.clear(), i.select();
  }, { tag: "skip-collab" }), e.cursors != null && (t = e.cursors, t != null && (e = e.cursorsContainer, e != null))) {
    t = Array.from(t.values());
    for (let i = 0; i < t.length; i++) {
      var n = t[i].selection;
      if (n && n.selections != null) {
        n = n.selections;
        for (let r = 0; r < n.length; r++) e.removeChild(n[i]);
      }
    }
  }
}
lK.CollaborationPlugin = function({ id: t, providerFactory: e, shouldBootstrap: n, username: i, cursorColor: r, cursorsContainerRef: s, initialEditorState: o, excludedProperties: a, awarenessData: l }) {
  let u = pWe.useCollaborationContext(i, r), { yjsDocMap: f, name: d, color: h } = u, [m] = mWe.useLexicalComposerContext();
  Or.useEffect(() => (u.isCollabActive = !0, () => {
    m._parentEditor == null && (u.isCollabActive = !1);
  }), [u, m]), i = Or.useMemo(() => e(t, f), [t, e, f]);
  let [g, w] = bWe(m, t, i, f, d, h, n, s, o, a, l);
  return u.clientID = w.clientID, wWe(m, w), yWe(m, i, d, h, l), g;
};
const _We = lK;
var zJ = _We, WJ = {}, sj = Oe, bg = N, _k = j;
let HJ = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
var OWe = HJ ? _k.useLayoutEffect : _k.useEffect;
let Vb = { tag: "history-merge" };
function SWe(t, e) {
  if (e !== null) {
    if (e === void 0) t.update(() => {
      var n = bg.$getRoot();
      if (n.isEmpty()) {
        let i = bg.$createParagraphNode();
        n.append(i), n = HJ ? document.activeElement : null, (bg.$getSelection() !== null || n !== null && n === t.getRootElement()) && i.select();
      }
    }, Vb);
    else if (e !== null) switch (typeof e) {
      case "string":
        let n = t.parseEditorState(e);
        t.setEditorState(n, Vb);
        break;
      case "object":
        t.setEditorState(e, Vb);
        break;
      case "function":
        t.update(() => {
          bg.$getRoot().isEmpty() && e(t);
        }, Vb);
    }
  }
}
WJ.LexicalComposer = function({ initialConfig: t, children: e }) {
  let n = _k.useMemo(() => {
    const { theme: i, namespace: r, editor__DEPRECATED: s, nodes: o, onError: a, editorState: l, html: u } = t, f = sj.createLexicalComposerContext(null, i);
    let d = s || null;
    if (d === null) {
      const h = bg.createEditor({ editable: t.editable, html: u, namespace: r, nodes: o, onError: (m) => a(m, h), theme: i });
      SWe(h, l), d = h;
    }
    return [d, f];
  }, []);
  return OWe(() => {
    let i = t.editable, [r] = n;
    r.setEditable(i !== void 0 ? i : !0);
  }, []), _k.createElement(
    sj.LexicalComposerContext.Provider,
    { value: n },
    e
  );
};
const CWe = WJ;
var EWe = CWe;
const QJ = /* @__PURE__ */ new Map();
class TWe {
  /**
   * @param {string} room
   */
  constructor(e) {
    this.room = e, this.onmessage = null, this._onChange = (n) => n.key === e && this.onmessage !== null && this.onmessage({ data: hBe(n.newValue || "") }), qFe(this._onChange);
  }
  /**
   * @param {ArrayBuffer} buf
   */
  postMessage(e) {
    bK.setItem(this.room, dBe(aBe(e)));
  }
  close() {
    YFe(this._onChange);
  }
}
const $We = typeof BroadcastChannel > "u" ? TWe : BroadcastChannel, R8 = (t) => Vr(QJ, t, () => {
  const e = nc(), n = new $We(t);
  return n.onmessage = (i) => e.forEach((r) => r(i.data, "broadcastchannel")), {
    bc: n,
    subs: e
  };
}), MWe = (t, e) => (R8(t).subs.add(e), e), NWe = (t, e) => {
  const n = R8(t), i = n.subs.delete(e);
  return i && n.subs.size === 0 && (n.bc.close(), QJ.delete(t)), i;
}, Vd = (t, e, n = null) => {
  const i = R8(t);
  i.bc.postMessage(e), i.subs.forEach((r) => r(e, n));
}, UJ = 0, j8 = 1, ZJ = 2, W6 = (t, e) => {
  We(t, UJ);
  const n = NK(e);
  di(t, n);
}, qJ = (t, e, n) => {
  We(t, j8), di(t, $K(e, n));
}, AWe = (t, e, n) => qJ(e, n, _r(t)), YJ = (t, e, n) => {
  try {
    EK(e, _r(t), n);
  } catch (i) {
    console.error("Caught error while handling a Yjs update", i);
  }
}, DWe = (t, e) => {
  We(t, ZJ), di(t, e);
}, PWe = YJ, IWe = (t, e, n, i) => {
  const r = bt(t);
  switch (r) {
    case UJ:
      AWe(t, e, n);
      break;
    case j8:
      YJ(t, n, i);
      break;
    case ZJ:
      PWe(t, n, i);
      break;
    default:
      throw new Error("Unknown message type");
  }
  return r;
}, LWe = 0, RWe = (t, e, n) => {
  switch (bt(t)) {
    case LWe:
      n(e, yl(t));
  }
}, vS = 3e4;
class jWe extends cFe {
  /**
   * @param {Y.Doc} doc
   */
  constructor(e) {
    super(), this.doc = e, this.clientID = e.clientID, this.states = /* @__PURE__ */ new Map(), this.meta = /* @__PURE__ */ new Map(), this._checkInterval = /** @type {any} */
    setInterval(() => {
      const n = rc();
      this.getLocalState() !== null && vS / 2 <= n - /** @type {{lastUpdated:number}} */
      this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState());
      const i = [];
      this.meta.forEach((r, s) => {
        s !== this.clientID && vS <= n - r.lastUpdated && this.states.has(s) && i.push(s);
      }), i.length > 0 && F8(this, i, "timeout");
    }, Dl(vS / 10)), e.on("destroy", () => {
      this.destroy();
    }), this.setLocalState({});
  }
  destroy() {
    this.emit("destroy", [this]), this.setLocalState(null), super.destroy(), clearInterval(this._checkInterval);
  }
  /**
   * @return {Object<string,any>|null}
   */
  getLocalState() {
    return this.states.get(this.clientID) || null;
  }
  /**
   * @param {Object<string,any>|null} state
   */
  setLocalState(e) {
    const n = this.clientID, i = this.meta.get(n), r = i === void 0 ? 0 : i.clock + 1, s = this.states.get(n);
    e === null ? this.states.delete(n) : this.states.set(n, e), this.meta.set(n, {
      clock: r,
      lastUpdated: rc()
    });
    const o = [], a = [], l = [], u = [];
    e === null ? u.push(n) : s == null ? e != null && o.push(n) : (a.push(n), Wg(s, e) || l.push(n)), (o.length > 0 || l.length > 0 || u.length > 0) && this.emit("change", [{ added: o, updated: l, removed: u }, "local"]), this.emit("update", [{ added: o, updated: a, removed: u }, "local"]);
  }
  /**
   * @param {string} field
   * @param {any} value
   */
  setLocalStateField(e, n) {
    const i = this.getLocalState();
    i !== null && this.setLocalState({
      ...i,
      [e]: n
    });
  }
  /**
   * @return {Map<number,Object<string,any>>}
   */
  getStates() {
    return this.states;
  }
}
const F8 = (t, e, n) => {
  const i = [];
  for (let r = 0; r < e.length; r++) {
    const s = e[r];
    if (t.states.has(s)) {
      if (t.states.delete(s), s === t.clientID) {
        const o = (
          /** @type {MetaClientState} */
          t.meta.get(s)
        );
        t.meta.set(s, {
          clock: o.clock + 1,
          lastUpdated: rc()
        });
      }
      i.push(s);
    }
  }
  i.length > 0 && (t.emit("change", [{ added: [], updated: [], removed: i }, n]), t.emit("update", [{ added: [], updated: [], removed: i }, n]));
}, Hg = (t, e, n = t.states) => {
  const i = e.length, r = Wi();
  We(r, i);
  for (let s = 0; s < i; s++) {
    const o = e[s], a = n.get(o) || null, l = (
      /** @type {MetaClientState} */
      t.meta.get(o).clock
    );
    We(r, o), We(r, l), Bu(r, JSON.stringify(a));
  }
  return Sn(r);
}, FWe = (t, e, n) => {
  const i = Vi(e), r = rc(), s = [], o = [], a = [], l = [], u = bt(i);
  for (let f = 0; f < u; f++) {
    const d = bt(i);
    let h = bt(i);
    const m = JSON.parse(yl(i)), g = t.meta.get(d), w = t.states.get(d), x = g === void 0 ? 0 : g.clock;
    (x < h || x === h && m === null && t.states.has(d)) && (m === null ? d === t.clientID && t.getLocalState() != null ? h++ : t.states.delete(d) : t.states.set(d, m), t.meta.set(d, {
      clock: h,
      lastUpdated: r
    }), g === void 0 && m !== null ? s.push(d) : g !== void 0 && m === null ? l.push(d) : m !== null && (Wg(m, w) || a.push(d), o.push(d)));
  }
  (s.length > 0 || a.length > 0 || l.length > 0) && t.emit("change", [{
    added: s,
    updated: a,
    removed: l
  }, n]), (s.length > 0 || o.length > 0 || l.length > 0) && t.emit("update", [{
    added: s,
    updated: o,
    removed: l
  }, n]);
}, BWe = (t) => GFe(t, (e, n) => `${encodeURIComponent(n)}=${encodeURIComponent(e)}`).join("&"), sf = 0, VJ = 3, _h = 1, zWe = 2, nv = [];
nv[sf] = (t, e, n, i, r) => {
  We(t, sf);
  const s = IWe(
    e,
    t,
    n.doc,
    n
  );
  i && s === j8 && !n.synced && (n.synced = !0);
};
nv[VJ] = (t, e, n, i, r) => {
  We(t, _h), di(
    t,
    Hg(
      n.awareness,
      Array.from(n.awareness.getStates().keys())
    )
  );
};
nv[_h] = (t, e, n, i, r) => {
  FWe(
    n.awareness,
    _r(e),
    n
  );
};
nv[zWe] = (t, e, n, i, r) => {
  RWe(
    e,
    n.doc,
    (s, o) => WWe(n, o)
  );
};
const oj = 3e4, WWe = (t, e) => console.warn(`Permission denied to access ${t.url}.
${e}`), XJ = (t, e, n) => {
  const i = Vi(e), r = Wi(), s = bt(i), o = t.messageHandlers[s];
  return /** @type {any} */ o ? o(r, i, t, n, s) : console.error("Unable to compute message"), r;
}, H6 = (t, e, n) => {
  e === t.ws && (t.emit("connection-close", [n, t]), t.ws = null, e.close(), t.wsconnecting = !1, t.wsconnected ? (t.wsconnected = !1, t.synced = !1, F8(
    t.awareness,
    Array.from(t.awareness.getStates().keys()).filter(
      (i) => i !== t.doc.clientID
    ),
    t
  ), t.emit("status", [{
    status: "disconnected"
  }])) : t.wsUnsuccessfulReconnects++, setTimeout(
    GJ,
    l8(
      dFe(2, t.wsUnsuccessfulReconnects) * 100,
      t.maxBackoffTime
    ),
    t
  ));
}, GJ = (t) => {
  if (t.shouldConnect && t.ws === null) {
    const e = new t._WS(t.url, t.protocols);
    e.binaryType = "arraybuffer", t.ws = e, t.wsconnecting = !0, t.wsconnected = !1, t.synced = !1, e.onmessage = (n) => {
      t.wsLastMessageReceived = rc();
      const i = XJ(t, new Uint8Array(n.data), !0);
      u8(i) > 1 && e.send(Sn(i));
    }, e.onerror = (n) => {
      t.emit("connection-error", [n, t]);
    }, e.onclose = (n) => {
      H6(t, e, n);
    }, e.onopen = () => {
      t.wsLastMessageReceived = rc(), t.wsconnecting = !1, t.wsconnected = !0, t.wsUnsuccessfulReconnects = 0, t.emit("status", [{
        status: "connected"
      }]);
      const n = Wi();
      if (We(n, sf), W6(n, t.doc), e.send(Sn(n)), t.awareness.getLocalState() !== null) {
        const i = Wi();
        We(i, _h), di(
          i,
          Hg(t.awareness, [
            t.doc.clientID
          ])
        ), e.send(Sn(i));
      }
    }, t.emit("status", [{
      status: "connecting"
    }]);
  }
}, bS = (t, e) => {
  const n = t.ws;
  t.wsconnected && n && n.readyState === n.OPEN && n.send(e), t.bcconnected && Vd(t.bcChannel, e, t);
};
class HWe extends Bx {
  /**
   * @param {string} serverUrl
   * @param {string} roomname
   * @param {Y.Doc} doc
   * @param {object} opts
   * @param {boolean} [opts.connect]
   * @param {awarenessProtocol.Awareness} [opts.awareness]
   * @param {Object<string,string>} [opts.params] specify url parameters
   * @param {Array<string>} [opts.protocols] specify websocket protocols
   * @param {typeof WebSocket} [opts.WebSocketPolyfill] Optionall provide a WebSocket polyfill
   * @param {number} [opts.resyncInterval] Request server state every `resyncInterval` milliseconds
   * @param {number} [opts.maxBackoffTime] Maximum amount of time to wait before trying to reconnect (we try to reconnect using exponential backoff)
   * @param {boolean} [opts.disableBc] Disable cross-tab BroadcastChannel communication
   */
  constructor(e, n, i, {
    connect: r = !0,
    awareness: s = new jWe(i),
    params: o = {},
    protocols: a = [],
    WebSocketPolyfill: l = WebSocket,
    resyncInterval: u = -1,
    maxBackoffTime: f = 2500,
    disableBc: d = !1
  } = {}) {
    for (super(); e[e.length - 1] === "/"; )
      e = e.slice(0, e.length - 1);
    this.serverUrl = e, this.bcChannel = e + "/" + n, this.maxBackoffTime = f, this.params = o, this.protocols = a, this.roomname = n, this.doc = i, this._WS = l, this.awareness = s, this.wsconnected = !1, this.wsconnecting = !1, this.bcconnected = !1, this.disableBc = d, this.wsUnsuccessfulReconnects = 0, this.messageHandlers = nv.slice(), this._synced = !1, this.ws = null, this.wsLastMessageReceived = 0, this.shouldConnect = r, this._resyncInterval = 0, u > 0 && (this._resyncInterval = /** @type {any} */
    setInterval(() => {
      if (this.ws && this.ws.readyState === WebSocket.OPEN) {
        const h = Wi();
        We(h, sf), W6(h, i), this.ws.send(Sn(h));
      }
    }, u)), this._bcSubscriber = (h, m) => {
      if (m !== this) {
        const g = XJ(this, new Uint8Array(h), !1);
        u8(g) > 1 && Vd(this.bcChannel, Sn(g), this);
      }
    }, this._updateHandler = (h, m) => {
      if (m !== this) {
        const g = Wi();
        We(g, sf), DWe(g, h), bS(this, Sn(g));
      }
    }, this.doc.on("update", this._updateHandler), this._awarenessUpdateHandler = ({ added: h, updated: m, removed: g }, w) => {
      const x = h.concat(m).concat(g), _ = Wi();
      We(_, _h), di(
        _,
        Hg(s, x)
      ), bS(this, Sn(_));
    }, this._exitHandler = () => {
      F8(
        this.awareness,
        [i.clientID],
        "app closed"
      );
    }, sc && typeof process < "u" && process.on("exit", this._exitHandler), s.on("update", this._awarenessUpdateHandler), this._checkInterval = /** @type {any} */
    setInterval(() => {
      this.wsconnected && oj < rc() - this.wsLastMessageReceived && H6(
        this,
        /** @type {WebSocket} */
        this.ws,
        null
      );
    }, oj / 10), r && this.connect();
  }
  get url() {
    const e = BWe(this.params);
    return this.serverUrl + "/" + this.roomname + (e.length === 0 ? "" : "?" + e);
  }
  /**
   * @type {boolean}
   */
  get synced() {
    return this._synced;
  }
  set synced(e) {
    this._synced !== e && (this._synced = e, this.emit("synced", [e]), this.emit("sync", [e]));
  }
  destroy() {
    this._resyncInterval !== 0 && clearInterval(this._resyncInterval), clearInterval(this._checkInterval), this.disconnect(), sc && typeof process < "u" && process.off("exit", this._exitHandler), this.awareness.off("update", this._awarenessUpdateHandler), this.doc.off("update", this._updateHandler), super.destroy();
  }
  connectBc() {
    if (this.disableBc)
      return;
    this.bcconnected || (MWe(this.bcChannel, this._bcSubscriber), this.bcconnected = !0);
    const e = Wi();
    We(e, sf), W6(e, this.doc), Vd(this.bcChannel, Sn(e), this);
    const n = Wi();
    We(n, sf), qJ(n, this.doc), Vd(this.bcChannel, Sn(n), this);
    const i = Wi();
    We(i, VJ), Vd(
      this.bcChannel,
      Sn(i),
      this
    );
    const r = Wi();
    We(r, _h), di(
      r,
      Hg(this.awareness, [
        this.doc.clientID
      ])
    ), Vd(
      this.bcChannel,
      Sn(r),
      this
    );
  }
  disconnectBc() {
    const e = Wi();
    We(e, _h), di(
      e,
      Hg(this.awareness, [
        this.doc.clientID
      ], /* @__PURE__ */ new Map())
    ), bS(this, Sn(e)), this.bcconnected && (NWe(this.bcChannel, this._bcSubscriber), this.bcconnected = !1);
  }
  disconnect() {
    this.shouldConnect = !1, this.disconnectBc(), this.ws !== null && H6(this, this.ws, null);
  }
  connect() {
    this.shouldConnect = !0, !this.wsconnected && this.ws === null && (GJ(this), this.connectBc());
  }
}
function QWe(t) {
  console.error(t);
}
const UWe = {
  namespace: "KoenigEditor",
  theme: oG,
  html: jW.html
}, gZe = ({
  initialEditorState: t,
  nodes: e = [...rFe],
  onError: n = QWe,
  fileUploader: i = {},
  cardConfig: r = {},
  darkMode: s = !1,
  enableMultiplayer: o = !1,
  isTKEnabled: a,
  multiplayerEndpoint: l,
  multiplayerDebug: u = !0,
  multiplayerDocId: f,
  multiplayerUsername: d,
  children: h
}) => {
  const m = j.useMemo(() => {
    var S, C;
    let _ = t;
    return _ && (typeof _ == "string" && (_ = JSON.parse(_)), ((C = (S = _.root) == null ? void 0 : S.children) == null ? void 0 : C.length) === 0 && _.root.children.push({
      children: [],
      direction: null,
      format: "",
      indent: 0,
      type: "paragraph",
      version: 1
    }), _ = JSON.stringify(_)), Object.assign({}, UWe, {
      nodes: e,
      editorState: o ? null : _,
      onError: n
    });
  }, [o, t, e, n]), g = j.useRef(null), w = j.useRef(null);
  i.useFileUpload || (i.useFileUpload = function() {
    console.error("<KoenigComposer> requires a `fileUploader` prop object to be passed containing a `useFileUpload` custom hook");
  });
  const x = j.useCallback((_, S) => {
    let C = S.get(_);
    C === void 0 ? (C = new Bl(), S.set(_, C)) : C.load();
    const E = new HWe(
      l,
      f + "/" + _,
      C,
      { connect: !1 }
    );
    return u && E.on("status", (M) => {
      console.log(M.status, `id: ${f}/${_}`);
    }), E;
  }, [l, f, u]);
  return /* @__PURE__ */ y.jsx(EWe.LexicalComposer, { initialConfig: m, children: /* @__PURE__ */ y.jsx(dt.Provider, { value: {
    fileUploader: i,
    editorContainerRef: g,
    cardConfig: r,
    darkMode: s,
    enableMultiplayer: o,
    isTKEnabled: a,
    multiplayerEndpoint: l,
    multiplayerDocId: f,
    multiplayerUsername: d,
    createWebsocketProvider: x,
    onWordCountChangeRef: w
  }, children: /* @__PURE__ */ y.jsx(w2e, { children: /* @__PURE__ */ y.jsxs(WIe, { children: [
    o ? /* @__PURE__ */ y.jsx(
      zJ.CollaborationPlugin,
      {
        id: "main",
        initialEditorState: t,
        providerFactory: x,
        shouldBootstrap: !0,
        username: d
      }
    ) : null,
    h
  ] }) }) }) });
};
function ZWe({ atLinkNode: t, isSearching: e, listOptions: n, query: i, onSelect: r }) {
  const [s] = Oe.useLexicalComposerContext();
  j.useEffect(() => {
    i || pi("Link dropdown: Opened", { context: "at-link" });
  }, []);
  const o = j.useMemo(() => Bh(s.getRootElement()), [s]), a = j.useRef(null), l = "at-link-results", u = j.useCallback(() => {
    s.update(() => {
      const h = a.current;
      if (!h || !N.$getSelection())
        return;
      const w = s.getElementByKey(t.getKey()).getBoundingClientRect(), x = s.getRootElement();
      if (!w || !x || !h)
        return;
      const _ = x.getBoundingClientRect(), S = w.bottom + 10, C = _.left, E = _.right;
      h.style.top = `${S}px`, h.style.left = `${C}px`, h.style.width = `${E - C}px`;
      const M = window.innerHeight / 100 * 30 + 54, $ = h.getBoundingClientRect();
      o.scrollTop + $.top + M > o.scrollHeight && (h.style.top = `${w.top - $.height - 10}px`);
    });
  }, [s, t, o]);
  j.useEffect(() => {
    u();
  }, [u]), j.useEffect(() => {
    window.addEventListener("resize", u), o && o.addEventListener("scroll", u);
    const h = a.current, m = new MutationObserver(u);
    return m.observe(h, { childList: !0, subtree: !0 }), () => {
      window.removeEventListener("resize", u), o && o.removeEventListener("scroll", u), h && m.disconnect();
    };
  }, [s, o, u]);
  const f = (h, m, g, w) => /* @__PURE__ */ y.jsx(
    aT,
    {
      dataTestId: l,
      highlightString: i,
      item: h,
      scrollIntoView: w,
      selected: m,
      onClick: r,
      onMouseOver: g
    },
    h.value
  ), d = (h, { showSpinner: m } = {}) => /* @__PURE__ */ y.jsx(oT, { dataTestId: l, group: h, showSpinner: m });
  return /* @__PURE__ */ y.jsx("div", { ref: a, className: "not-kg-prose fixed z-[10000]", "data-testid": "at-link-results", children: /* @__PURE__ */ y.jsx("div", { className: "relative m-0 flex w-full flex-col rounded-lg bg-white p-1 px-2 font-sans text-sm font-medium shadow-md dark:bg-grey-950", children: /* @__PURE__ */ y.jsx("ul", { className: "max-h-[30vh] w-full overflow-y-auto bg-white py-1 dark:bg-grey-950", children: /* @__PURE__ */ y.jsx(
    sT,
    {
      getGroup: d,
      getItem: f,
      groups: n,
      isLoading: e,
      onSelect: r
    }
  ) }) }) });
}
function ou(t, { focus: e = !1 } = {}) {
  if (!ul(t)) {
    console.warn("$removeAtLink called on a non-at-link node", t);
    return;
  }
  const n = t.getChildAtIndex(1), i = N.$createTextNode("@" + n.getTextContent());
  i.setFormat(t.getLinkFormat()), t.replace(i), e && i.selectEnd();
}
function qWe() {
  return [{
    label: "No results found"
  }];
}
const YWe = ({ searchLinks: t, siteUrl: e }) => {
  const [n] = Oe.useLexicalComposerContext(), [i, r] = j.useState(null), [s, o] = j.useState(""), a = j.useMemo(() => ({ noResultOptions: qWe }), []), { isSearching: l, listOptions: u } = lT(s, t, a);
  j.useEffect(() => {
    const d = n.getRootElement(), h = (g) => {
      if (!g.isComposing && g.inputType === "insertText" && g.data === "@") {
        let w = !1;
        n.getEditorState().read(() => {
          const x = N.$getSelection();
          if (!N.$isRangeSelection(x) || !x.isCollapsed())
            return;
          const _ = x.anchor;
          if (_.type !== "text")
            return;
          const S = _.getNode();
          if (!S.isSimpleText())
            return;
          let C = _.offset, E = S.getTextContent().slice(0, C), M = S.getTextContent().slice(C);
          const $ = S.getPreviousSibling(), P = S.getNextSibling();
          C === 0 && N.$isTextNode($) && (E = $.getTextContent()), C === S.getTextContent().length && N.$isTextNode(P) && (M = P.getTextContent());
          const W = /(^|\s)@$/, z = /^($|\s|\.)/;
          W.test(E) && z.test(M) && (w = !0);
        }), w && n.update(() => {
          const x = N.$getSelection(), _ = x.anchor.getNode().getFormat();
          x.deleteCharacter(!0);
          const S = uE();
          S.setLinkFormat(_);
          const C = N4();
          S.append(C);
          const E = Sg("");
          S.append(E), x.insertNodes([S]), S.select(1, 1);
          const M = S.getChildAtIndex(1), $ = N.$getSelection();
          N.$isRangeSelection($) && ($.anchor.set(M.getKey(), 0, "element"), $.focus.set(M.getKey(), 0, "element"));
        });
      }
    }, m = (g) => {
      g.inputType === "insertText" && g.data === "@" && n.update(() => {
        const w = N.$getSelection();
        N.$isRangeSelection(w) && w.isCollapsed() && !w.anchor.getNode().getPreviousSibling() && h(g);
      });
    };
    return d.addEventListener("input", h), d.addEventListener("beforeinput", m), () => {
      d.removeEventListener("input", h), d.removeEventListener("beforeinput", m);
    };
  }, [n]), j.useEffect(() => n.registerUpdateListener(() => {
    n.isComposing() || n.update(() => {
      var m;
      const d = N.$nodesOfType(Ma), h = N.$getSelection();
      if (!N.$isRangeSelection(h)) {
        d.forEach(ou), r(null), o("");
        return;
      }
      if (h.isCollapsed()) {
        const g = h.anchor.getNode();
        let w;
        if (ul(g) && (w = g), ul(g.getParent()) && (w = g.getParent()), d.forEach((x) => {
          x !== w && ou(x);
        }), w) {
          r(w);
          const x = w.getChildAtIndex(1), _ = (m = x == null ? void 0 : x.getTextContent) == null ? void 0 : m.call(x);
          if (o(_), zd(h.focus.getNode()) && window.getSelection().anchorOffset === 0) {
            w.select(1, 1);
            const S = N.$getSelection();
            N.$isRangeSelection(S) && (S.anchor.set(x.getKey(), 0, "element"), S.focus.set(x.getKey(), 0, "element"));
          }
          _ === "" && zd(h.anchor.getNode()) && ou(w, { focus: !0 });
        } else
          r(null), o("");
        return;
      }
    });
  }), [n]), j.useEffect(() => {
    function d() {
      const h = N.$getSelection();
      return !!(N.$isRangeSelection(h) && cl(h.anchor.getNode()));
    }
    return lt.mergeRegister(
      // revert to '@' when pressing escape with a focused at-link node
      n.registerCommand(
        N.KEY_ESCAPE_COMMAND,
        () => {
          const h = N.$getSelection();
          if (N.$isRangeSelection(h)) {
            const m = h.anchor.getNode();
            if (ul(m))
              return ou(m, { focus: !0 }), !0;
            if (cl(m) || zd(m) && ul(m.getParent()))
              return ou(m.getParent(), { focus: !0 }), !0;
          }
          return !1;
        },
        N.COMMAND_PRIORITY_HIGH
      ),
      // revert to '@' when backspacing or deleting chars at the beginning/end of an at-link node
      n.registerCommand(
        N.DELETE_CHARACTER_COMMAND,
        (h) => {
          const m = N.$getSelection();
          if (N.$isRangeSelection(m)) {
            const g = m.anchor.getNode();
            if (cl(g) || zd(g) && ul(g.getParent())) {
              const w = m.anchor.offset;
              if (h && w === 0)
                return ou(g.getParent(), { focus: !0 }), !0;
              if (!h && w === g.getTextContentSize())
                return ou(g.getParent(), { focus: !0 }), !0;
            }
          }
          return !1;
        },
        N.COMMAND_PRIORITY_HIGH
      ),
      // prevent formatting commands when an at-link-search node is focused
      n.registerCommand(
        N.FORMAT_TEXT_COMMAND,
        d,
        N.COMMAND_PRIORITY_HIGH
      ),
      n.registerCommand(
        N.FORMAT_ELEMENT_COMMAND,
        d,
        N.COMMAND_PRIORITY_HIGH
      ),
      // prevent paste in the search node triggering external paste handlers
      n.registerCommand(
        N.PASTE_COMMAND,
        (h) => {
          const m = N.$getSelection();
          if (!m || document.activeElement !== n.getRootElement())
            return !1;
          const g = m.anchor.getNode();
          if (N.$isRangeSelection(m) && (ul(g) || cl(g))) {
            h.preventDefault();
            const w = cl(g) ? g : g.getChildAtIndex(1), x = h.clipboardData.getData("text/plain");
            return x && (w.setTextContent(w.getTextContent() + x), w.selectEnd()), !0;
          }
          return !1;
        },
        N.COMMAND_PRIORITY_HIGH
      )
    );
  }), j.useEffect(() => n.registerNodeTransform(Ma, (d) => {
    if (!zd(d.getFirstChild())) {
      const w = N4();
      lt.$insertFirst(d, w);
    }
    if (!cl(d.getChildAtIndex(1))) {
      const w = Sg("");
      d.append(w);
    }
    d.getChildren().forEach((w, x) => {
      var _;
      if (x > 0 && !cl(w)) {
        const S = (_ = w.getTextContent) == null ? void 0 : _.call(w);
        if (!S)
          w.remove();
        else {
          const C = Sg(S);
          w.replace(C);
        }
      }
    });
    const h = d.getChildAtIndex(1), m = h.getTextContent();
    let g = m;
    d.getChildren().forEach((w, x) => {
      x > 1 && (g += w.getTextContent(), w.remove());
    }), g !== m && h.setTextContent(g);
  }), [n]);
  const f = j.useCallback((d) => {
    n.update(() => {
      if (!(d != null && d.value)) {
        ou(i, { focus: !0 });
        return;
      }
      const m = i.getParent().getChildren();
      let g = m.length !== 1 || !ul(m[0]);
      if (g) {
        const w = ki.$createLinkNode(d.value), x = N.$createTextNode(d.label);
        w.append(x), w.setFormat(i.getLinkFormat()), i.replace(w), w.selectEnd(), o(""), r(null);
      } else {
        const w = cT({
          url: d.value,
          title: d.label
        });
        i.replace(w), w.selectEnd();
      }
      if (d.type === "internal" || d.type === "default")
        pi("Link dropdown: Internal link chosen", { context: "at-link", fromLatest: d.type === "default", isBookmark: !g });
      else {
        let w = uT(d.value, e) ? "internal" : "external";
        pi("Link dropdown: URL entered", { context: "at-link", target: w, isBookmark: !g });
      }
    });
  }, [n, i, e]);
  return i ? /* @__PURE__ */ y.jsx(Ff, { "data-testid": "at-link-popup", children: /* @__PURE__ */ y.jsx(
    ZWe,
    {
      atLinkNode: i,
      isSearching: l,
      listOptions: u,
      query: s,
      onSelect: f
    }
  ) }) : null;
}, VWe = () => {
  const { cardConfig: t } = j.useContext(dt), [e] = Oe.useLexicalComposerContext();
  return !(typeof (t == null ? void 0 : t.searchLinks) == "function") || !e.hasNodes([Ma, cc]) ? null : /* @__PURE__ */ y.jsx(YWe, { searchLinks: t.searchLinks, siteUrl: t.siteUrl });
}, XWe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([fx])) {
      console.error("CallToActionPlugin: CallToActionNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        uG,
        async (e) => {
          const n = gRe(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, GWe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return kt(() => t.registerUpdateListener(() => {
    t.update(() => {
      if (t.isComposing())
        return;
      const e = N.$getSelection();
      if (!N.$isRangeSelection(e) || !e.type === "text" || !e.isCollapsed())
        return;
      const n = /---?./, i = tc(e), r = i.getTextContent();
      if (!i || !N.$isTextNode(i) || !(r != null && r.match) || !r.match(n))
        return;
      const o = window.getSelection().anchorNode, a = t.getRootElement();
      if ((o == null ? void 0 : o.nodeType) !== Node.TEXT_NODE || !a.contains(o))
        return;
      const l = /---([^-])/, u = /[^-]--(\s)/, f = r.match(l);
      if (f) {
        const h = f == null ? void 0 : f.index, m = r.slice(0, h) + "—" + r.slice(h + 3);
        i.setTextContent(m), e.anchor.offset = h + 2, e.focus.offset = h + 2;
        return;
      }
      const d = r.match(u);
      if (d) {
        const h = d == null ? void 0 : d.index, m = r.slice(0, h + 1) + "–" + r.slice(h + 3);
        i.setTextContent(m), e.anchor.offset = h + 3, e.focus.offset = h + 3;
        return;
      }
    }, { tag: "history-merge" });
  }), [t]), null;
}, KJ = () => {
  const [t] = Oe.useLexicalComposerContext();
  return kt(() => {
    if (!t.hasNodes([])) {
      console.error("HorizontalRulePlugin: HorizontalRuleNode not registered");
      return;
    }
    return t.registerCommand(
      VV,
      () => {
        const e = N.$getSelection();
        if (!N.$isRangeSelection(e))
          return !1;
        if (e.focus.getNode() !== null) {
          const i = v6(), r = e.focus.getNode();
          N.$isParagraphNode(r) && r.getTextContent() !== "" && e.insertParagraph(), e.focus.getNode().getTopLevelElementOrThrow().insertBefore(i);
        }
        return !0;
      },
      N.COMMAND_PRIORITY_EDITOR
    );
  }, [t]), kt(() => t.registerUpdateListener(() => {
    t.update(() => {
      if (t.isComposing())
        return;
      const e = N.$getSelection();
      if (!N.$isRangeSelection(e) || !e.type === "text" || !e.isCollapsed())
        return;
      const n = /^(---|\*\*\*|___)\s?$/, i = tc(e).getTopLevelElement();
      if (!i || !N.$isParagraphNode(i) || !i.getTextContent().match(n))
        return;
      const s = window.getSelection().anchorNode, o = t.getRootElement();
      if ((s == null ? void 0 : s.nodeType) !== Node.TEXT_NODE || !o.contains(s))
        return;
      const a = v6(), l = i.getTopLevelElement();
      l.getNextSibling() ? l.replace(a) : (l.insertBefore(a), l.replace(N.$createParagraphNode())), a.selectNext();
    });
  }), [t]), null;
}, KWe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([Z1])) {
      console.error("HtmlPlugin: HtmlNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        oY,
        async (e) => {
          const n = B9e(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, JWe = () => {
  const [t] = Oe.useLexicalComposerContext(), { fileUploader: e } = j.useContext(dt), n = e.useFileUpload("image"), i = j.useCallback(async (r, s) => {
    if ((r == null ? void 0 : r.length) > 0)
      return await cg(r, s, t, n.upload);
  }, [n.upload, t]);
  return j.useEffect(() => {
    if (!t.hasNodes([ec])) {
      console.error("ImagePlugin: ImageNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        n6,
        async (r) => {
          const s = yh(r);
          return t.dispatchCommand(Mn, { cardNode: s }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      ),
      t.registerCommand(
        U2,
        async (r) => r.type === "image" ? (t.dispatchCommand(n6, { initialFile: r.file }), !0) : !1,
        N.COMMAND_PRIORITY_HIGH
      )
    );
  }, [t, e, i]), null;
}, eHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([Ix])) {
      console.error("MarkdownPlugin: MarkdownNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        qG,
        async (e) => {
          const n = Bje(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_HIGH
      )
    );
  }, [t]), null;
}, tHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([I0])) {
      console.error("AudioPlugin: AudioNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        x6,
        async (e) => {
          const n = ULe(e);
          return t.dispatchCommand(Mn, { cardNode: n }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      ),
      t.registerCommand(
        U2,
        async (e) => e.type === "audio" ? (t.dispatchCommand(x6, { initialFile: e.file }), !0) : !1,
        N.COMMAND_PRIORITY_HIGH
      )
    );
  }, [t]), null;
}, nHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([L2])) {
      console.error("BookmarkPlugin: BookmarkNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        Mq,
        async (e) => {
          const n = N.$getSelection();
          if (!N.$isRangeSelection(n))
            return !1;
          if (n.focus.getNode() !== null) {
            const r = cT(e);
            t.dispatchCommand(Mn, { cardNode: r });
          }
          return !0;
        },
        N.COMMAND_PRIORITY_HIGH
      )
    );
  }, [t]), null;
}, iHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([ux])) {
      console.error("ButtonPlugin: ButtonNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        sG,
        async (e) => {
          const n = qLe(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, rHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([dx])) {
      console.error("CalloutPlugin: CalloutNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        dG,
        async (e) => {
          const n = _Re(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }), null;
}, sHe = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "-0.75 -0.75 24 24", height: 24, width: 24, ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M8.4375 8.4375a2.8125 2.8125 0 1 1 3.75 2.6521875 1.40625 1.40625 0 0 0 -0.9375 1.3265625v0.943125", strokeWidth: 1.5 }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", d: "M11.25 16.875a0.3515625 0.3515625 0 0 1 0 -0.703125", strokeWidth: 1.5 }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", d: "M11.25 16.875a0.3515625 0.3515625 0 0 0 0 -0.703125", strokeWidth: 1.5 }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeMiterlimit: 10, d: "M11.25 21.796875c5.8246875000000005 0 10.546875 -4.7221874999999995 10.546875 -10.546875S17.0746875 0.703125 11.25 0.703125 0.703125 5.4253124999999995 0.703125 11.25 5.4253124999999995 21.796875 11.25 21.796875Z", strokeWidth: 1.5 })), oHe = ({ label: t, children: e, ...n }) => {
  let i = "";
  return t === "Primary" ? i = "https://ghost.org/help/cards/" : t === "Snippets" && (i = "https://ghost.org/help/snippets/"), /* @__PURE__ */ y.jsxs("li", { className: "flex shrink-0 flex-col justify-center border-t border-grey-200 text-[1.1rem] font-semibold tracking-wide text-grey-600 first-of-type:border-t-0 dark:border-grey-900 dark:text-grey-600", role: "separator", ...n, children: [
    /* @__PURE__ */ y.jsxs(
      "span",
      {
        className: "flex items-center justify-between px-4 pb-2 pt-3 uppercase",
        "data-card-menu-section": "label",
        style: { minWidth: "calc(100% - 3.2rem)" },
        children: [
          t,
          i && /* @__PURE__ */ y.jsx("a", { href: i, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ y.jsx(sHe, { className: "-m-1 size-6 cursor-pointer p-1 transition-all hover:text-green-600" }) })
        ]
      }
    ),
    /* @__PURE__ */ y.jsx("ul", { className: "md:grid md:gap-y-[.2rem] md:px-2", role: "menu", children: e })
  ] });
}, aHe = ({ label: t, shortcut: e, desc: n, isSelected: i, scrollToItem: r, onClick: s, Icon: o, ...a }) => {
  const l = j.useRef(null);
  j.useEffect(() => {
    r && l.current.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
  }, [r]);
  const u = (f) => {
    f.preventDefault();
  };
  return /* @__PURE__ */ y.jsx("li", { className: "mb-0", role: "presentation", children: /* @__PURE__ */ y.jsxs(
    "button",
    {
      ref: l,
      className: `group flex w-full cursor-pointer flex-row items-center gap-3 border border-transparent px-2 py-[.6rem] text-left text-grey-800 hover:bg-grey-100 dark:hover:bg-grey-900 md:rounded-md  ${i ? "bg-grey-100 dark:bg-grey-900" : ""}`,
      "data-kg-card-menu-item": t,
      "data-kg-cardmenu-selected": i,
      role: "menuitem",
      type: "button",
      onClick: s,
      onMouseDown: u,
      ...a,
      children: [
        /* @__PURE__ */ y.jsx("div", { className: "flex size-7 shrink-0 items-center justify-center rounded-md bg-white text-grey-900 dark:bg-transparent dark:text-grey-500", children: /* @__PURE__ */ y.jsx(o, { className: "size-[1.8rem]" }) }),
        /* @__PURE__ */ y.jsxs("div", { className: "flex w-full justify-between", children: [
          /* @__PURE__ */ y.jsx("div", { className: "m-0 truncate text-[1.35rem] font-medium leading-snug tracking-[.02rem] text-grey-900 dark:text-grey-200", children: t }),
          /* @__PURE__ */ y.jsx("div", { className: "invisible m-0 truncate text-[1.35rem] font-medium leading-snug tracking-[.02rem] text-grey-500 group-hover:visible dark:text-grey-200", children: e })
        ] })
      ]
    }
  ) });
}, lHe = ({ label: t, isSelected: e, scrollToItem: n, Icon: i, onRemove: r, closeMenu: s, ...o }) => {
  const a = j.useRef(null);
  j.useEffect(() => {
    n && a.current.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
  }, [n]);
  const l = (f) => {
    f.stopPropagation(), r(), s();
  }, u = (f) => {
    f.stopPropagation(), f.preventDefault();
  };
  return /* @__PURE__ */ y.jsx("li", { className: "mb-0 md:col-span-2", role: "presentation", children: /* @__PURE__ */ y.jsxs(
    "div",
    {
      ref: a,
      className: `kg-cardmenu-card-hover group flex w-full cursor-pointer flex-row items-center rounded-md border border-transparent px-2 py-1 text-grey-800 hover:bg-grey-100 dark:hover:bg-grey-900 ${e ? "bg-grey-100 dark:bg-grey-900" : ""}`,
      "data-kg-cardmenu-selected": e,
      role: "menuitem",
      onMouseDown: u,
      ...o,
      children: [
        /* @__PURE__ */ y.jsx("div", { className: "flex size-7 shrink-0 items-center justify-center rounded-md bg-white text-grey-900 dark:bg-transparent dark:text-grey-500", children: /* @__PURE__ */ y.jsx(i, { className: "size-[1.8rem] stroke-2" }) }),
        /* @__PURE__ */ y.jsx("div", { className: "m-0 ml-4 truncate text-[1.35rem] font-medium leading-snug tracking-[.02rem] text-grey-900 dark:text-grey-200", children: t }),
        !!r && /* @__PURE__ */ y.jsx("button", { className: "ml-auto cursor-pointer rounded-md p-[4px] hover:bg-grey-200 group-hover:block dark:hover:bg-grey-950", title: "Remove snippet", type: "button", onClick: l, children: /* @__PURE__ */ y.jsx(Bf, { className: "size-[1.8rem] stroke-red stroke-[1.5] text-red" }) })
      ]
    }
  ) });
}, JJ = ({ menu: t = /* @__PURE__ */ new Map(), insert: e = () => {
}, selectedItemIndex: n, scrollToSelectedItem: i, closeMenu: r }) => {
  const s = [];
  let o = 0;
  for (const [a, l] of t) {
    const u = [];
    l.forEach((f) => {
      const d = o === n, h = (m) => {
        m.preventDefault(), m.stopPropagation(), e == null || e(f.insertCommand, { insertParams: f.insertParams, queryParams: f.queryParams });
        const g = f.type === "snippet" ? "Snippet" : f.label;
        pi("Card Added", { card: g });
      };
      !f.type || f.type === "card" ? u.push(
        /* @__PURE__ */ y.jsx(
          aHe,
          {
            "data-kg-cardmenu-idx": o,
            desc: f.desc,
            Icon: f.Icon,
            isSelected: d,
            label: f.label,
            scrollToItem: d && i,
            shortcut: f.shortcut,
            onClick: h
          },
          o
        )
      ) : f.type === "snippet" && u.push(
        /* @__PURE__ */ y.jsx(
          lHe,
          {
            closeMenu: r,
            "data-kg-cardmenu-idx": o,
            Icon: f.Icon,
            isSelected: d,
            label: f.label,
            scrollToItem: d && i,
            onClick: h,
            onRemove: f.onRemove
          },
          o
        )
      ), o = o + 1;
    }), s.push(/* @__PURE__ */ y.jsx(oHe, { label: a, children: u }, a));
  }
  return /* @__PURE__ */ y.jsx("ul", { className: "not-kg-prose z-[9999999] m-0 mb-3 max-h-[420px] w-[312px] scroll-p-2 flex-col overflow-y-auto rounded-lg bg-white bg-clip-padding p-0 font-sans text-sm shadow-md after:block after:pb-1 dark:bg-grey-950 md:w-[348px]", role: "menu", children: s });
};
function uHe({ onClick: t }) {
  return /* @__PURE__ */ y.jsx("div", { className: "absolute left-[-32px] top-[-2px] xs:left-[-66px]", "data-kg-plus-button": !0, children: /* @__PURE__ */ y.jsx(
    "button",
    {
      "aria-label": "Add a card",
      className: "group relative flex size-7 cursor-pointer items-center justify-center rounded-full border border-grey transition-all ease-linear hover:border-grey-800 dark:border-grey-800 dark:hover:border-grey-400 md:size-9",
      type: "button",
      onClick: t,
      children: /* @__PURE__ */ y.jsx(Ek, { className: "size-4 stroke-grey-800 stroke-2 dark:stroke-grey-300" })
    }
  ) });
}
function cHe({ children: t }) {
  return /* @__PURE__ */ y.jsx("div", { className: "absolute left-[-16px]", "data-kg-plus-menu": !0, children: t });
}
const eee = N.createCommand("INSERT_SNIPPET_COMMAND"), fHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => lt.mergeRegister(
    t.registerCommand(
      eee,
      async (e) => (t.update(() => {
        const n = JSON.parse(e.value), i = mf.$generateNodesFromSerializedNodes(n.nodes), r = i.length === 1 && i[0], s = !!i.length && i[i.length - 1];
        if (r && qc(r))
          return t.dispatchCommand(Mn, { cardNode: r }), !0;
        const o = N.$getSelection();
        if (mf.$insertGeneratedNodes(t, i, o), s && qc(s) && !s.getNextSibling())
          try {
            const a = N.$createParagraphNode();
            s.getTopLevelElementOrThrow().insertAfter(a);
          } catch (a) {
            console.log(a);
          }
      }), !0),
      N.COMMAND_PRIORITY_LOW
    )
  ), [t]), null;
};
function tee(t, { query: e, config: n } = {}) {
  var o;
  let i = /* @__PURE__ */ new Map();
  e = e == null ? void 0 : e.toLowerCase();
  let r = -1;
  function s(a) {
    var f, d, h, m, g, w;
    if (a.isHidden && ((f = a.isHidden) != null && f.call(a, { config: n })) || a.postType && ((d = n == null ? void 0 : n.post) != null && d.displayName) && a.postType !== ((h = n == null ? void 0 : n.post) == null ? void 0 : h.displayName))
      return;
    const l = typeof (a == null ? void 0 : a.matches) == "function" ? (m = a == null ? void 0 : a.matches) == null ? void 0 : m.call(a, e, a.label) : (w = (g = a == null ? void 0 : a.matches) == null ? void 0 : g.find) == null ? void 0 : w.call(g, (x) => x.startsWith(e));
    if (e && !l)
      return;
    typeof a.insertParams == "function" && (a.insertParams = a.insertParams({ config: n }));
    const u = a.section || "Primary";
    i.has(u) ? i.get(u).push(a) : i.set(u, [a]), r = r + 1;
  }
  for (const [a, l] of t)
    Array.isArray(l.kgMenu) ? l.kgMenu.forEach((u) => s({ nodeType: a, ...u })) : s({ nodeType: a, ...l.kgMenu });
  return (o = n == null ? void 0 : n.snippets) == null || o.forEach((a) => {
    const l = dHe(a, n);
    s(l);
  }), i = new Map([...i.entries()].map(([a, l]) => [a, l.sort((u, f) => u.priority === f.priority ? 0 : u.priority === void 0 ? 1 : f.priority === void 0 ? -1 : u.priority - f.priority)])), i = new Map([...i.entries()].sort((a, l) => a[0] === "Primary" ? -1 : 1)), { menu: i, maxItemIndex: r };
}
function dHe(t, e) {
  const n = t.name.toLowerCase();
  return {
    type: "snippet",
    label: t.name,
    Icon: Lj,
    section: "Snippets",
    matches: (r) => n.indexOf(r) > -1 || "snippets".indexOf(r) > -1,
    insertCommand: eee,
    insertParams: t,
    ...e.deleteSnippet && { onRemove: () => e.deleteSnippet(t) }
  };
}
function hHe(t) {
  var L;
  const [e, n] = j.useState(!1), [i, r] = j.useState(!1), [s, o] = j.useState(0), [a, l] = j.useState(null), [u, f] = j.useState({}), d = j.useRef(null), { cardConfig: h } = j.useContext(dt);
  function m(Q) {
    const V = Q.getBoundingClientRect(), H = Q.parentNode.getBoundingClientRect();
    return V.top - H.top;
  }
  function g(Q) {
    const V = new Range();
    return V.setStart(Q, 0), V.setEnd(Q, 0), V;
  }
  const w = j.useCallback(() => {
    a && (document.getSelection().removeAllRanges(), document.getSelection().addRange(a));
  }, [a]), x = j.useCallback((Q) => {
    const V = g(Q);
    l(V), n(!0);
  }, [n, l]), _ = j.useCallback(() => {
    n(!1), r(!1), l(null);
  }, [n, r, l]), S = j.useCallback((Q) => {
    Q == null || Q.preventDefault(), t.update(() => {
      N.$setSelection(null);
    }, { discrete: !0 }), w(), r(!0);
  }, [t, w, r]), C = j.useCallback(({ resetCursor: Q = !1 } = {}) => {
    Q && w(), r(!1);
  }, [w, r]), E = j.useCallback(() => {
    t.getEditorState().read(() => {
      if (t.isComposing())
        return;
      const Q = N.$getSelection();
      if (!N.$isRangeSelection(Q) || !Q.type === "text" || !Q.isCollapsed()) {
        _();
        return;
      }
      const V = tc(Q);
      if (!N.$isParagraphNode(V) || V.getTextContent() !== "") {
        _();
        return;
      }
      const R = window.getSelection().anchorNode, q = t.getRootElement();
      if ((R == null ? void 0 : R.tagName) !== "P" || !q.contains(R)) {
        _();
        return;
      }
      o(m(R)), x(R);
    });
  }, [t, x, _]), M = j.useCallback((Q, { insertParams: V = {} } = {}) => {
    const H = { ...V };
    t.dispatchCommand(Q, H), C();
  }, [t, C]);
  j.useEffect(() => t.registerUpdateListener(() => {
    E();
  }, [t, E]));
  const $ = j.useCallback(() => {
    var Q;
    if (e) {
      const V = window.getSelection();
      if (i && ((Q = d.current) != null && Q.contains(V.anchorNode)))
        return;
      t.getRootElement().contains(V.anchorNode) || _();
    }
  }, [t, e, i, _]);
  j.useEffect(() => (document.addEventListener("selectionchange", $), () => {
    document.removeEventListener("selectionchange", $);
  }), [$]);
  const P = j.useCallback((Q) => {
    if (i)
      return;
    const V = t.getRootElement();
    let { pageX: H, pageY: R } = Q, q = V.getBoundingClientRect();
    H < q.left && (H = H + 40);
    const Y = document.elementFromPoint(H, R);
    V.contains(Y) && !Y.closest("[data-kg-card]") && ((Y == null ? void 0 : Y.tagName) === "P" && Y.textContent === "" ? (o(m(Y)), x(Y)) : E());
  }, [t, i, o, x, E]);
  j.useEffect(() => (window.addEventListener("mousemove", P), () => {
    window.removeEventListener("mousemove", P);
  }), [P]);
  const W = j.useCallback((Q) => {
    var V;
    if (i && !((V = d.current) != null && V.contains(Q.target)))
      return C();
  }, [i, C]);
  j.useEffect(() => (window.addEventListener("mousedown", W), () => {
    window.removeEventListener("mousedown", W);
  }), [W]);
  const z = j.useCallback((Q) => {
    if (i) {
      if (Q.key === "Escape") {
        C({ resetCursor: !0 });
        return;
      }
      ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(Q.key) && C();
    }
  }, [i, C]);
  j.useEffect(() => (window.addEventListener("keydown", z), () => {
    window.removeEventListener("keydown", z);
  })), j.useEffect(() => {
    const Q = wT(t);
    f(tee(Q, { config: h }));
  }, [h, t, f]);
  const Z = {
    top: `${s}px`
  };
  return ((L = u.menu) == null ? void 0 : L.size) === 0 ? null : e ? /* @__PURE__ */ y.jsxs("div", { ref: d, className: "absolute z-50", style: Z, "data-kg-plus-container": !0, children: [
    e && /* @__PURE__ */ y.jsx(uHe, { onClick: S }),
    i && /* @__PURE__ */ y.jsx(cHe, { children: /* @__PURE__ */ y.jsx(JJ, { closeMenu: C, insert: M, menu: u.menu }) })
  ] }) : null;
}
function pHe() {
  const [t] = Oe.useLexicalComposerContext();
  return hHe(t);
}
function mHe({ children: t }) {
  return /* @__PURE__ */ y.jsx("div", { "data-kg-slash-menu": !0, children: t });
}
function gHe(t) {
  var W;
  const [e, n] = j.useState(!1), [i, r] = j.useState({}), [s, o] = j.useState(""), [a, l] = j.useState([]), [u, f] = j.useState({}), [d, h] = j.useState(0), [m, g] = j.useState(!1), w = j.useRef(null), x = j.useRef(null), { cardConfig: _ } = j.useContext(dt);
  function S(z) {
    const Z = z.getBoundingClientRect(), L = z.parentNode.getBoundingClientRect(), Q = x.current.getBoundingClientRect(), V = Z.bottom - L.top + Q.height > window.innerHeight, H = Z.top - Q.height < 0;
    if (V && !H) {
      const R = L.height - z.offsetTop;
      r({ top: null, left: 0, bottom: R });
    } else {
      const R = z.offsetTop + Z.height;
      r({ top: R, left: 0, bottom: null });
    }
  }
  function C() {
    const z = window.getSelection();
    let Z;
    return z.anchorNode.nodeType === Node.TEXT_NODE ? Z = z.anchorNode.parentNode.closest("p") : Z = z.anchorNode, Z;
  }
  function E() {
    w.current && (document.getSelection().removeAllRanges(), document.getSelection().addRange(w.current));
  }
  const M = j.useCallback(() => {
    n(!0);
  }, [n]), $ = j.useCallback(({ resetCursor: z = !1 } = {}) => {
    z && E(), n(!1), o(""), a.length > 0 && l([]), g(!1), w.current = null;
  }, [n, a]), P = j.useCallback((z, { insertParams: Z = {}, queryParams: L = {} } = {}) => {
    const Q = { ...Z };
    for (let V = 0; V < L.length; V++)
      if (a[V]) {
        const H = L[V], R = a[V];
        Q[H] = R;
      }
    t.update(() => {
      const H = N.$getSelection().focus.getNode().getTopLevelElement(), R = N.$createParagraphNode();
      H.insertAfter(R), H.remove(), R.select(), t.dispatchCommand(z, Q);
    }), $();
  }, [t, a, $]);
  return j.useEffect(() => t.registerUpdateListener(() => {
    t.getEditorState().read(() => {
      var Y, K;
      if (t.isComposing())
        return;
      const z = N.$getSelection();
      if (!N.$isRangeSelection(z) || !z.type === "text" || !z.isCollapsed()) {
        const se = window.getSelection().anchorNode;
        if ((K = (Y = se == null ? void 0 : se.parentNode) == null ? void 0 : Y.dataset) == null ? void 0 : K.cardMenuSection)
          return;
        $();
        return;
      }
      const Z = tc(z).getTopLevelElement();
      if (!Z || !N.$isParagraphNode(Z) || !Z.getTextContent().startsWith("/")) {
        $();
        return;
      }
      const L = window.getSelection(), Q = L.anchorNode, V = t.getRootElement();
      if ((Q == null ? void 0 : Q.nodeType) !== Node.TEXT_NODE || !V.contains(Q)) {
        $();
        return;
      }
      w.current = L.getRangeAt(0);
      const H = Z.getTextContent().slice(1), [R, ...q] = H.split(" ");
      o(R), l(q);
    });
  }), [t, e, $, o, l]), j.useEffect(() => {
    if (e)
      return;
    const z = (Z) => {
      const { key: L, isComposing: Q, ctrlKey: V, metaKey: H } = Z;
      L !== "/" || Q || V || H || !t.getRootElement().matches(":focus") || t.getEditorState().read(() => {
        const q = N.$getSelection(), Y = tc(q).getTopLevelElement();
        if (!Y || !N.$isParagraphNode(Y))
          return;
        const K = Y.getTextContentSize(), te = q.isCollapsed() && Y.getTextContent() === "", se = !q.isCollapsed() && (q.anchor.offset === 0 && q.focus.offset === K || q.anchor.offset === K && q.focus.offset === 0);
        (te || se) && M();
      });
    };
    return window.addEventListener("keypress", z), () => {
      window.removeEventListener("keypress", z);
    };
  }, [t, e, M]), j.useEffect(() => {
    if (!e)
      return;
    const z = (Z) => {
      if (Z.key === "Escape") {
        $({ resetCursor: !0 });
        return;
      }
    };
    return window.addEventListener("keydown", z), () => {
      window.removeEventListener("keydown", z);
    };
  }, [e, $]), j.useEffect(() => {
    if (!e)
      return;
    const z = (Z) => {
      var L;
      (L = x.current) != null && L.contains(Z.target) || $();
    };
    return window.addEventListener("mousedown", z), () => {
      window.removeEventListener("mousedown", z);
    };
  }, [e, $]), j.useEffect(() => {
    if (!e)
      return;
    const z = (Q) => (h(d === 0 ? u.maxItemIndex : d - 1), g(!0), Q.preventDefault(), !0), Z = (Q) => (d === u.maxItemIndex ? h(0) : h(d + 1), g(!0), Q.preventDefault(), !0), L = (Q) => {
      var V;
      return (V = document.querySelector(`[data-kg-slash-menu] [data-kg-cardmenu-idx="${d}"]`)) == null || V.click(), Q.preventDefault(), !0;
    };
    return lt.mergeRegister(
      t.registerCommand(
        N.KEY_ARROW_DOWN_COMMAND,
        Z,
        N.COMMAND_PRIORITY_HIGH
      ),
      t.registerCommand(
        N.KEY_ARROW_UP_COMMAND,
        z,
        N.COMMAND_PRIORITY_HIGH
      ),
      t.registerCommand(
        N.KEY_ARROW_RIGHT_COMMAND,
        Z,
        N.COMMAND_PRIORITY_HIGH
      ),
      t.registerCommand(
        N.KEY_ARROW_LEFT_COMMAND,
        z,
        N.COMMAND_PRIORITY_HIGH
      ),
      t.registerCommand(
        N.KEY_ENTER_COMMAND,
        L,
        N.COMMAND_PRIORITY_HIGH
      )
    );
  }, [t, e, u, d]), j.useEffect(() => {
    const z = wT(t);
    f(tee(z, { query: s, config: _ })), h(0);
  }, [t, s, P, f, h, _]), j.useEffect(() => {
    if (!e)
      return;
    const z = new ResizeObserver(() => {
      S(C());
    });
    return z.observe(window.document.body), () => {
      z.disconnect();
    };
  }, [e]), j.useLayoutEffect(() => {
    e && (!x || !x.current || S(C()));
  }, [e]), ((W = u.menu) == null ? void 0 : W.size) === 0 ? null : e ? /* @__PURE__ */ y.jsx("div", { ref: x, className: "absolute -left-2 z-50 mt-2", style: i, "data-kg-slash-container": !0, children: /* @__PURE__ */ y.jsx(mHe, { children: /* @__PURE__ */ y.jsx(
    JJ,
    {
      closeMenu: $,
      insert: P,
      menu: u.menu,
      scrollToSelectedItem: m,
      selectedItemIndex: d
    }
  ) }) }) : null;
}
function vHe() {
  const [t] = Oe.useLexicalComposerContext();
  return gHe(t);
}
const bHe = () => /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
  /* @__PURE__ */ y.jsx(pHe, {}),
  /* @__PURE__ */ y.jsx(vHe, {})
] }), yHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([hx])) {
      console.error("EmailPlugin: EmailCtaNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        gG,
        async (e) => {
          const n = SRe();
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, wHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([px])) {
      console.error("EmailPlugin: EmailNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        bG,
        async (e) => {
          const n = ERe(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, kHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([R2])) {
      console.error("EmbedPlugin: EmbedNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        au,
        async (e) => {
          const n = Dq(e);
          return t.dispatchCommand(Mn, { cardNode: n }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, xHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([L0])) {
      console.error("FilePlugin: FileNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        _G,
        async (e) => {
          const n = ARe(e);
          return t.dispatchCommand(Mn, { cardNode: n }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }), null;
}, _He = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([Y2])) {
      console.error("GalleryPlugin: GalleryNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        _Y,
        async (e) => {
          const n = OY(e);
          return t.dispatchCommand(Mn, { cardNode: n }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, OHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([mx])) {
      console.error("HeaderPlugin: HeaderNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        C6,
        async (e) => {
          const n = sje(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }), null;
};
var nee = {}, fl = ni, SHe = Oe, iee = j, CHe = lt, qm = N;
function EHe(t) {
  iee.useEffect(() => CHe.mergeRegister(t.registerCommand(fl.INSERT_ORDERED_LIST_COMMAND, () => (fl.insertList(t, "number"), !0), qm.COMMAND_PRIORITY_LOW), t.registerCommand(fl.INSERT_UNORDERED_LIST_COMMAND, () => (fl.insertList(t, "bullet"), !0), qm.COMMAND_PRIORITY_LOW), t.registerCommand(fl.REMOVE_LIST_COMMAND, () => (fl.removeList(t), !0), qm.COMMAND_PRIORITY_LOW), t.registerCommand(qm.INSERT_PARAGRAPH_COMMAND, () => !!fl.$handleListInsertParagraph(), qm.COMMAND_PRIORITY_LOW)), [t]);
}
nee.ListPlugin = function() {
  let [t] = SHe.useLexicalComposerContext();
  return iee.useEffect(() => {
    if (!t.hasNodes([fl.ListNode, fl.ListItemNode])) throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
  }, [t]), EHe(t), null;
};
const THe = nee;
var B8 = THe;
const $He = () => {
  const [t] = Oe.useLexicalComposerContext();
  return kt(() => {
    if (!t.hasNodes([])) {
      console.error("PaywallPlugin: PaywallNode not registered");
      return;
    }
    return t.registerCommand(
      YG,
      () => {
        const e = N.$getSelection();
        if (!N.$isRangeSelection(e))
          return !1;
        if (e.focus.getNode() !== null) {
          const i = bR(), r = e.focus.getNode();
          N.$isParagraphNode(r) && r.getTextContent() !== "" && e.insertParagraph(), e.focus.getNode().getTopLevelElementOrThrow().insertBefore(i);
        }
        return !0;
      },
      N.COMMAND_PRIORITY_EDITOR
    );
  }, [t]), kt(() => t.registerUpdateListener(() => {
    t.update(() => {
      if (t.isComposing())
        return;
      const e = N.$getSelection();
      if (!N.$isRangeSelection(e) || !e.type === "text" || !e.isCollapsed())
        return;
      const n = /^(===)\s?$/, i = tc(e).getTopLevelElement();
      if (!i || !N.$isParagraphNode(i) || !i.getTextContent().match(n))
        return;
      const s = window.getSelection().anchorNode, o = t.getRootElement();
      if ((s == null ? void 0 : s.nodeType) !== Node.TEXT_NODE || !o.contains(s))
        return;
      const a = bR(), l = i.getTopLevelElement();
      l.getNextSibling() ? l.replace(a) : (l.insertBefore(a), l.replace(N.$createParagraphNode())), a.selectNext();
    });
  }), [t]), null;
}, MHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([Lx])) {
      console.error("ProductPlugin: ProductNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        XG,
        async (e) => {
          const n = Zje(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, NHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([Rx])) {
      console.error("SignupPlugin: SignupNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        KG,
        async (e) => {
          const n = Vje(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, AHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([jx])) {
      console.error("TogglePlugin: ToggleNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        eK,
        async (e) => {
          const n = Kje(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, DHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([Fx]))
      throw new Error("TransistorPlugin: TransistorNode not registered");
    return lt.mergeRegister(
      t.registerCommand(
        iK,
        async (e) => {
          const n = eFe(e);
          return t.dispatchCommand(Mn, { cardNode: n, openInEditMode: !0 }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      )
    );
  }, [t]), null;
}, PHe = () => {
  const [t] = Oe.useLexicalComposerContext();
  return j.useEffect(() => {
    if (!t.hasNodes([j0])) {
      console.error("VideoPlugin: VideoNode not registered");
      return;
    }
    return lt.mergeRegister(
      t.registerCommand(
        M6,
        async (e) => {
          const n = iFe(e);
          return t.dispatchCommand(Mn, { cardNode: n }), !0;
        },
        N.COMMAND_PRIORITY_LOW
      ),
      t.registerCommand(
        U2,
        async (e) => e.type === "video" ? (t.dispatchCommand(M6, { initialFile: e.file }), !0) : !1,
        N.COMMAND_PRIORITY_HIGH
      )
    );
  }, [t]), null;
}, IHe = () => /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
  /* @__PURE__ */ y.jsx(B8.ListPlugin, {}),
  " ",
  /* @__PURE__ */ y.jsx(bHe, {}),
  /* @__PURE__ */ y.jsx(fHe, {}),
  /* @__PURE__ */ y.jsx(W7e, {}),
  " ",
  /* @__PURE__ */ y.jsx(VE, {}),
  /* @__PURE__ */ y.jsx(VWe, {}),
  /* @__PURE__ */ y.jsx(tHe, {}),
  /* @__PURE__ */ y.jsx(JWe, {}),
  /* @__PURE__ */ y.jsx(_He, {}),
  /* @__PURE__ */ y.jsx(PHe, {}),
  /* @__PURE__ */ y.jsx(eHe, {}),
  /* @__PURE__ */ y.jsx(GWe, {}),
  /* @__PURE__ */ y.jsx(KJ, {}),
  /* @__PURE__ */ y.jsx(rHe, {}),
  /* @__PURE__ */ y.jsx(KWe, {}),
  /* @__PURE__ */ y.jsx(xHe, {}),
  /* @__PURE__ */ y.jsx(iHe, {}),
  /* @__PURE__ */ y.jsx(AHe, {}),
  /* @__PURE__ */ y.jsx(OHe, {}),
  /* @__PURE__ */ y.jsx(nHe, {}),
  /* @__PURE__ */ y.jsx($He, {}),
  /* @__PURE__ */ y.jsx(MHe, {}),
  /* @__PURE__ */ y.jsx(yHe, {}),
  /* @__PURE__ */ y.jsx(wHe, {}),
  /* @__PURE__ */ y.jsx(kHe, {}),
  /* @__PURE__ */ y.jsx(NHe, {}),
  /* @__PURE__ */ y.jsx(DHe, {}),
  /* @__PURE__ */ y.jsx(XWe, {})
] }), vZe = ({
  onChange: t,
  children: e,
  ...n
}) => /* @__PURE__ */ y.jsx(ILe, { children: /* @__PURE__ */ y.jsx(RLe, { onChange: t, children: /* @__PURE__ */ y.jsxs(lx, { ...n, children: [
  /* @__PURE__ */ y.jsx(IHe, {}),
  e
] }) }) }), bZe = ({
  children: t,
  ...e
}) => /* @__PURE__ */ y.jsxs(
  lx,
  {
    isSnippetsEnabled: !1,
    markdownTransformers: DIe,
    ...e,
    children: [
      /* @__PURE__ */ y.jsx(B8.ListPlugin, {}),
      /* @__PURE__ */ y.jsx(cx, {}),
      /* @__PURE__ */ y.jsx(KJ, {}),
      t
    ]
  }
);
var LHe = typeof global == "object" && global && global.Object === Object && global, ree = LHe, RHe = typeof self == "object" && self && self.Object === Object && self, jHe = ree || RHe || Function("return this")(), Hl = jHe, FHe = Hl.Symbol, Pa = FHe, see = Object.prototype, BHe = see.hasOwnProperty, zHe = see.toString, Ym = Pa ? Pa.toStringTag : void 0;
function WHe(t) {
  var e = BHe.call(t, Ym), n = t[Ym];
  try {
    t[Ym] = void 0;
    var i = !0;
  } catch {
  }
  var r = zHe.call(t);
  return i && (e ? t[Ym] = n : delete t[Ym]), r;
}
var HHe = Object.prototype, QHe = HHe.toString;
function UHe(t) {
  return QHe.call(t);
}
var ZHe = "[object Null]", qHe = "[object Undefined]", aj = Pa ? Pa.toStringTag : void 0;
function e_(t) {
  return t == null ? t === void 0 ? qHe : ZHe : aj && aj in Object(t) ? WHe(t) : UHe(t);
}
function oee(t) {
  var e = typeof t;
  return t != null && (e == "object" || e == "function");
}
var YHe = "[object AsyncFunction]", VHe = "[object Function]", XHe = "[object GeneratorFunction]", GHe = "[object Proxy]";
function aee(t) {
  if (!oee(t))
    return !1;
  var e = e_(t);
  return e == VHe || e == XHe || e == YHe || e == GHe;
}
var KHe = 9007199254740991;
function JHe(t) {
  return typeof t == "number" && t > -1 && t % 1 == 0 && t <= KHe;
}
function eQe(t) {
  return t != null && JHe(t.length) && !aee(t);
}
function z8(t) {
  return t != null && typeof t == "object";
}
function tQe(t, e) {
  for (var n = -1, i = t == null ? 0 : t.length, r = Array(i); ++n < i; )
    r[n] = e(t[n], n, t);
  return r;
}
function nQe(t, e) {
  for (var n = -1, i = Array(t); ++n < t; )
    i[n] = e(n);
  return i;
}
var iQe = "[object Arguments]";
function lj(t) {
  return z8(t) && e_(t) == iQe;
}
var lee = Object.prototype, rQe = lee.hasOwnProperty, sQe = lee.propertyIsEnumerable;
lj(/* @__PURE__ */ function() {
  return arguments;
}());
var uee = typeof exports == "object" && exports && !exports.nodeType && exports, uj = uee && typeof module == "object" && module && !module.nodeType && module, oQe = uj && uj.exports === uee, cj = oQe ? Hl.Buffer : void 0;
cj && cj.isBuffer;
var cee = typeof exports == "object" && exports && !exports.nodeType && exports, Qg = cee && typeof module == "object" && module && !module.nodeType && module, aQe = Qg && Qg.exports === cee, yS = aQe && ree.process, lQe = function() {
  try {
    var t = Qg && Qg.require && Qg.require("util").types;
    return t || yS && yS.binding && yS.binding("util");
  } catch {
  }
}(), fj = lQe;
fj && fj.isTypedArray;
function uQe() {
  this.__data__ = [], this.size = 0;
}
function cQe(t, e) {
  return t === e || t !== t && e !== e;
}
function t_(t, e) {
  for (var n = t.length; n--; )
    if (cQe(t[n][0], e))
      return n;
  return -1;
}
var fQe = Array.prototype, dQe = fQe.splice;
function hQe(t) {
  var e = this.__data__, n = t_(e, t);
  if (n < 0)
    return !1;
  var i = e.length - 1;
  return n == i ? e.pop() : dQe.call(e, n, 1), --this.size, !0;
}
function pQe(t) {
  var e = this.__data__, n = t_(e, t);
  return n < 0 ? void 0 : e[n][1];
}
function mQe(t) {
  return t_(this.__data__, t) > -1;
}
function gQe(t, e) {
  var n = this.__data__, i = t_(n, t);
  return i < 0 ? (++this.size, n.push([t, e])) : n[i][1] = e, this;
}
function $p(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var i = t[e];
    this.set(i[0], i[1]);
  }
}
$p.prototype.clear = uQe;
$p.prototype.delete = hQe;
$p.prototype.get = pQe;
$p.prototype.has = mQe;
$p.prototype.set = gQe;
var vQe = Hl["__core-js_shared__"], wS = vQe, dj = function() {
  var t = /[^.]+$/.exec(wS && wS.keys && wS.keys.IE_PROTO || "");
  return t ? "Symbol(src)_1." + t : "";
}();
function bQe(t) {
  return !!dj && dj in t;
}
var yQe = Function.prototype, wQe = yQe.toString;
function qf(t) {
  if (t != null) {
    try {
      return wQe.call(t);
    } catch {
    }
    try {
      return t + "";
    } catch {
    }
  }
  return "";
}
var kQe = /[\\^$.*+?()[\]{}|]/g, xQe = /^\[object .+?Constructor\]$/, _Qe = Function.prototype, OQe = Object.prototype, SQe = _Qe.toString, CQe = OQe.hasOwnProperty, EQe = RegExp(
  "^" + SQe.call(CQe).replace(kQe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function TQe(t) {
  if (!oee(t) || bQe(t))
    return !1;
  var e = aee(t) ? EQe : xQe;
  return e.test(qf(t));
}
function $Qe(t, e) {
  return t == null ? void 0 : t[e];
}
function Yf(t, e) {
  var n = $Qe(t, e);
  return TQe(n) ? n : void 0;
}
var MQe = Yf(Hl, "Map"), Ok = MQe, NQe = Yf(Object, "create"), G0 = NQe;
function AQe() {
  this.__data__ = G0 ? G0(null) : {}, this.size = 0;
}
function DQe(t) {
  var e = this.has(t) && delete this.__data__[t];
  return this.size -= e ? 1 : 0, e;
}
var PQe = "__lodash_hash_undefined__", IQe = Object.prototype, LQe = IQe.hasOwnProperty;
function RQe(t) {
  var e = this.__data__;
  if (G0) {
    var n = e[t];
    return n === PQe ? void 0 : n;
  }
  return LQe.call(e, t) ? e[t] : void 0;
}
var jQe = Object.prototype, FQe = jQe.hasOwnProperty;
function BQe(t) {
  var e = this.__data__;
  return G0 ? e[t] !== void 0 : FQe.call(e, t);
}
var zQe = "__lodash_hash_undefined__";
function WQe(t, e) {
  var n = this.__data__;
  return this.size += this.has(t) ? 0 : 1, n[t] = G0 && e === void 0 ? zQe : e, this;
}
function Tf(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var i = t[e];
    this.set(i[0], i[1]);
  }
}
Tf.prototype.clear = AQe;
Tf.prototype.delete = DQe;
Tf.prototype.get = RQe;
Tf.prototype.has = BQe;
Tf.prototype.set = WQe;
function HQe() {
  this.size = 0, this.__data__ = {
    hash: new Tf(),
    map: new (Ok || $p)(),
    string: new Tf()
  };
}
function QQe(t) {
  var e = typeof t;
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
function n_(t, e) {
  var n = t.__data__;
  return QQe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
}
function UQe(t) {
  var e = n_(this, t).delete(t);
  return this.size -= e ? 1 : 0, e;
}
function ZQe(t) {
  return n_(this, t).get(t);
}
function qQe(t) {
  return n_(this, t).has(t);
}
function YQe(t, e) {
  var n = n_(this, t), i = n.size;
  return n.set(t, e), this.size += n.size == i ? 0 : 1, this;
}
function Vf(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var i = t[e];
    this.set(i[0], i[1]);
  }
}
Vf.prototype.clear = HQe;
Vf.prototype.delete = UQe;
Vf.prototype.get = ZQe;
Vf.prototype.has = qQe;
Vf.prototype.set = YQe;
Hl.Uint8Array;
var hj = Pa ? Pa.prototype : void 0;
hj && hj.valueOf;
function VQe(t, e) {
  for (var n = -1, i = t == null ? 0 : t.length, r = 0, s = []; ++n < i; ) {
    var o = t[n];
    e(o, n, t) && (s[r++] = o);
  }
  return s;
}
var XQe = Yf(Hl, "DataView"), Q6 = XQe, GQe = Yf(Hl, "Promise"), U6 = GQe, KQe = Yf(Hl, "Set"), Z6 = KQe, JQe = Yf(Hl, "WeakMap"), q6 = JQe, pj = "[object Map]", eUe = "[object Object]", mj = "[object Promise]", gj = "[object Set]", vj = "[object WeakMap]", bj = "[object DataView]", tUe = qf(Q6), nUe = qf(Ok), iUe = qf(U6), rUe = qf(Z6), sUe = qf(q6), Ld = e_;
(Q6 && Ld(new Q6(new ArrayBuffer(1))) != bj || Ok && Ld(new Ok()) != pj || U6 && Ld(U6.resolve()) != mj || Z6 && Ld(new Z6()) != gj || q6 && Ld(new q6()) != vj) && (Ld = function(t) {
  var e = e_(t), n = e == eUe ? t.constructor : void 0, i = n ? qf(n) : "";
  if (i)
    switch (i) {
      case tUe:
        return bj;
      case nUe:
        return pj;
      case iUe:
        return mj;
      case rUe:
        return gj;
      case sUe:
        return vj;
    }
  return e;
});
var oUe = "Expected a function";
function W8(t, e) {
  if (typeof t != "function" || e != null && typeof e != "function")
    throw new TypeError(oUe);
  var n = function() {
    var i = arguments, r = e ? e.apply(this, i) : i[0], s = n.cache;
    if (s.has(r))
      return s.get(r);
    var o = t.apply(this, i);
    return n.cache = s.set(r, o) || s, o;
  };
  return n.cache = new (W8.Cache || Vf)(), n;
}
W8.Cache = Vf;
var aUe = 500;
function lUe(t) {
  var e = W8(t, function(i) {
    return n.size === aUe && n.clear(), i;
  }), n = e.cache;
  return e;
}
var uUe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, cUe = /\\(\\)?/g;
lUe(function(t) {
  var e = [];
  return t.charCodeAt(0) === 46 && e.push(""), t.replace(uUe, function(n, i, r, s) {
    e.push(r ? s.replace(cUe, "$1") : i || n);
  }), e;
});
var yj = Pa ? Pa.prototype : void 0;
yj && yj.toString;
function fee(t) {
  return t;
}
function fUe(t) {
  return function(e) {
    return e == null ? void 0 : e[t];
  };
}
function dUe(t) {
  if (!t)
    return 0;
  Object.prototype.hasOwnProperty.call(t, "string") && (t = t.string), t = t.replace(/<("[^"]*"|'[^']*'|[^'">])+\/?>/g, " ");
  const e = /[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g, n = /([\u0600-\u06ff]+|[\u0591-\u05F4]+)/g, i = t.match(e) || t.match(n);
  let r = 0;
  if (i === null)
    return r;
  for (var s = 0; s < i.length; s += 1)
    i[s].charCodeAt(0) >= 19968 ? r += i[s].length : r += 1;
  return r;
}
Pa && Pa.isConcatSpreadable;
function hUe(t, e, n) {
  switch (n.length) {
    case 0:
      return t.call(e);
    case 1:
      return t.call(e, n[0]);
    case 2:
      return t.call(e, n[0], n[1]);
    case 3:
      return t.call(e, n[0], n[1], n[2]);
  }
  return t.apply(e, n);
}
var wj = Math.max;
function pUe(t, e, n) {
  return e = wj(e === void 0 ? t.length - 1 : e, 0), function() {
    for (var i = arguments, r = -1, s = wj(i.length - e, 0), o = Array(s); ++r < s; )
      o[r] = i[e + r];
    r = -1;
    for (var a = Array(e + 1); ++r < e; )
      a[r] = i[r];
    return a[e] = n(o), hUe(t, this, a);
  };
}
function mUe(t) {
  return function() {
    return t;
  };
}
var gUe = function() {
  try {
    var t = Yf(Object, "defineProperty");
    return t({}, "", {}), t;
  } catch {
  }
}(), kj = gUe, vUe = kj ? function(t, e) {
  return kj(t, "toString", {
    configurable: !0,
    enumerable: !1,
    value: mUe(e),
    writable: !0
  });
} : fee, bUe = vUe, yUe = 800, wUe = 16, kUe = Date.now;
function xUe(t) {
  var e = 0, n = 0;
  return function() {
    var i = kUe(), r = wUe - (i - n);
    if (n = i, r > 0) {
      if (++e >= yUe)
        return arguments[0];
    } else
      e = 0;
    return t.apply(void 0, arguments);
  };
}
var _Ue = xUe(bUe), OUe = _Ue;
function SUe(t, e) {
  return OUe(pUe(t, e, fee), t + "");
}
function CUe(t) {
  return z8(t) && eQe(t);
}
var EUe = Math.max;
function TUe(t) {
  if (!(t && t.length))
    return [];
  var e = 0;
  return t = VQe(t, function(n) {
    if (CUe(n))
      return e = EUe(n.length, e), !0;
  }), nQe(e, function(n) {
    return tQe(t, fUe(n));
  });
}
SUe(TUe);
const $Ue = {
  countWords: dUe
}, { countWords: MUe } = $Ue, NUe = ({ onChange: t, language: e = "en" } = {}) => {
  const [n] = Oe.useLexicalComposerContext(), { onWordCountChangeRef: i } = j.useContext(dt);
  j.useLayoutEffect(() => {
    if (!t)
      return;
    n._parentEditor || (i.current = t);
    let r = 0;
    const s = () => {
      let l = 0, u = n;
      for (; u._parentEditor; )
        u = u._parentEditor;
      u.getEditorState().read(() => {
        const f = N.$getRoot();
        let d = "";
        const h = f.getChildren(), m = h.length;
        for (let g = 0; g < m; g++) {
          const w = h[g];
          d += w.getTextContent(), N.$isElementNode(w) && g !== m - 1 && !w.isInline() && (d += `

`);
        }
        l = MUe(d);
      }), l !== r && (r = l, t(l)), l === 0 && r === 0 && t(0);
    };
    s();
    const o = LX(s, 200), a = lt.mergeRegister(
      n.registerUpdateListener(({
        dirtyElements: l,
        dirtyLeaves: u,
        prevEditorState: f,
        tags: d
      }) => {
        l.size === 0 && u.size === 0 || d.has("history-merge") || f.isEmpty() || o();
      })
    );
    return () => {
      o.cancel(), a(), n._parentEditor || (i.current = null);
    };
  }, [n, t, i]);
};
var dee = {}, AUe = ax, kS = Oe, Rd = j;
function DUe(t) {
  let e = new URLSearchParams();
  e.append("code", t);
  for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
  throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
}
dee.LexicalNestedComposer = function({ initialEditor: t, children: e, initialNodes: n, initialTheme: i, skipCollabChecks: r }) {
  let s = Rd.useRef(!1), o = Rd.useContext(kS.LexicalComposerContext);
  o == null && DUe(9);
  let [a, { getTheme: l }] = o, u = Rd.useMemo(() => {
    var m = i || l() || void 0;
    const g = kS.createLexicalComposerContext(o, m);
    if (m !== void 0 && (t._config.theme = m), t._parentEditor = a, n) for (var w of n) {
      var x = m = null;
      typeof w != "function" && (x = w, w = x.replace, m = x.with, x = x.withKlass || null);
      const _ = t._nodes.get(w.getType());
      t._nodes.set(
        w.getType(),
        { exportDOM: _ ? _.exportDOM : void 0, klass: w, replace: m, replaceWithKlass: x, transforms: /* @__PURE__ */ new Set() }
      );
    }
    else {
      w = t._nodes = new Map(a._nodes);
      for (const [_, S] of w) t._nodes.set(_, { exportDOM: S.exportDOM, klass: S.klass, replace: S.replace, replaceWithKlass: S.replaceWithKlass, transforms: /* @__PURE__ */ new Set() });
    }
    return t._config.namespace = a._config.namespace, t._editable = a._editable, [t, g];
  }, []), { isCollabActive: f, yjsDocMap: d } = AUe.useCollaborationContext(), h = r || s.current || d.has(t.getKey());
  return Rd.useEffect(() => {
    h && (s.current = !0);
  }, [h]), Rd.useEffect(() => a.registerEditableListener((m) => {
    t.setEditable(m);
  }), [t, a]), Rd.createElement(kS.LexicalComposerContext.Provider, { value: u }, !f || h ? e : null);
};
const PUe = dee;
var IUe = PUe;
const hee = ({ initialEditor: t, initialEditorState: e, initialNodes: n, initialTheme: i, skipCollabChecks: r, children: s } = {}) => {
  const { isCollabActive: o } = ax.useCollaborationContext(), { createWebsocketProvider: a, onWordCountChangeRef: l } = j.useContext(dt);
  return /* @__PURE__ */ y.jsxs(
    IUe.LexicalNestedComposer,
    {
      initialEditor: t,
      initialNodes: n,
      initialTheme: i,
      skipCollabChecks: r,
      children: [
        o ? /* @__PURE__ */ y.jsx(
          zJ.CollaborationPlugin,
          {
            id: t.getKey(),
            initialEditorState: e,
            providerFactory: a,
            shouldBootstrap: !0
          }
        ) : null,
        l != null && l.current ? /* @__PURE__ */ y.jsx(NUe, { onChange: l.current }) : null,
        s
      ]
    }
  );
}, yZe = ({ html: t = "", setHtml: e }) => {
  const [n] = Oe.useLexicalComposerContext(), i = j.useRef(!0);
  j.useLayoutEffect(() => {
    i.current && (i.current = !1, t && n.update(() => {
      const o = new DOMParser().parseFromString(t, "text/html"), l = Rn.$generateNodesFromDOM(n, o).filter((u) => u.getTextContent().trim());
      N.$getRoot().select(), N.$getRoot().clear(), N.$insertNodes(l);
    }));
  }, []);
  const r = j.useCallback(() => {
    n.update(() => {
      const s = Rn.$generateHtmlFromNodes(n, null);
      new DOMParser().parseFromString(s, "text/html").documentElement.textContent ? e == null || e(s) : e("");
    });
  }, [n, e]);
  return /* @__PURE__ */ y.jsx(HX.OnChangePlugin, { onChange: r });
}, i_ = ({ paragraphs: t, allowBr: e }) => {
  const [n] = Oe.useLexicalComposerContext();
  return j.useEffect(() => lt.mergeRegister(
    n.registerNodeTransform(N.RootNode, (i) => {
      if (!n._updating)
        return;
      const r = N.$getSelection();
      if (!N.$isRangeSelection(r) || !r.isCollapsed())
        return;
      const s = i.getChildren();
      if (!(s.length <= t && s.every(N.$isParagraphNode))) {
        let a = s.filter((l) => !N.$isDecoratorNode(l));
        a = a.slice(0, t), a = a.map((l) => {
          if (ni.$isListNode(l)) {
            const u = l.getChildren()[0];
            return N.$createParagraphNode().append(...u.getChildren());
          } else return N.$isParagraphNode(l) ? l : N.$createParagraphNode().append(...l.getChildren());
        }), s.forEach((l) => l.remove()), a.forEach((l) => i.append(l)), i.selectEnd();
      }
    }),
    n.registerCommand(
      N.PASTE_COMMAND,
      (i) => {
        var a, l;
        const r = (a = i == null ? void 0 : i.clipboardData) == null ? void 0 : a.getData(vT), s = (l = i == null ? void 0 : i.clipboardData) == null ? void 0 : l.getData(bT), o = r == null ? void 0 : r.match(/^(https?:\/\/[^\s]+)$/);
        if (o)
          return i.preventDefault(), n.dispatchCommand(KC, { linkMatch: o }), !0;
        if (r && !s)
          return n.dispatchCommand(gT, { text: r, allowBr: e }), !0;
      },
      N.COMMAND_PRIORITY_LOW
    )
  ), [e, n, t]), null;
};
function wZe({ onChange: t }) {
  const { tkCount: e } = jX();
  j.useEffect(() => {
    t && t(e);
  }, [t, e]);
}
const $f = [
  ni.ListNode,
  ni.ListItemNode,
  ki.LinkNode,
  uo
], kZe = [
  Fo,
  c2,
  rn.HeadingNode,
  uc,
  f2,
  rn.QuoteNode,
  ni.ListNode,
  ni.ListItemNode,
  ki.LinkNode,
  _p
], xZe = "1.7.10", _Ze = B8.ListPlugin;
export {
  tI as $isAtStartOfDocument,
  nI as $isAtTopOfNode,
  xr as $selectDecoratorNode,
  IHe as AllDefaultPlugins,
  tHe as AudioPlugin,
  $f as BASIC_NODES,
  AIe as BASIC_TRANSFORMERS,
  CIe as CODE_BLOCK_TRANSFORMER,
  XWe as CallToActionPlugin,
  rHe as CalloutPlugin,
  bHe as CardMenuPlugin,
  rFe as DEFAULT_NODES,
  NIe as DEFAULT_TRANSFORMERS,
  FUe as DesignSandbox,
  l$e as DragDropPastePlugin,
  CPe as DragDropReorderPlugin,
  MIe as ELEMENT_TRANSFORMERS,
  kZe as EMAIL_NODES,
  DIe as EMAIL_TRANSFORMERS,
  VE as EmojiPickerPlugin,
  XIe as ExternalControlPlugin,
  xHe as FilePlugin,
  jPe as FloatingToolbarPlugin,
  _He as GalleryPlugin,
  PX as HR_TRANSFORMER,
  OHe as HeaderPlugin,
  KJ as HorizontalRulePlugin,
  yZe as HtmlOutputPlugin,
  JWe as ImagePlugin,
  s$e as KoenigBehaviourPlugin,
  qn as KoenigCardWrapper,
  lx as KoenigComposableEditor,
  gZe as KoenigComposer,
  vZe as KoenigEditor,
  bZe as KoenigEmailEditor,
  hee as KoenigNestedComposer,
  _Ze as ListPlugin,
  pr as MINIMAL_NODES,
  IX as MINIMAL_TRANSFORMERS,
  eHe as MarkdownPlugin,
  PIe as MarkdownShortcutPlugin,
  pHe as PlusCardMenuPlugin,
  cx as ReplacementStringsPlugin,
  i_ as RestrictContentPlugin,
  NHe as SignupPlugin,
  vHe as SlashCardMenuPlugin,
  wZe as TKCountPlugin,
  AHe as TogglePlugin,
  DHe as TransistorPlugin,
  PHe as VideoPlugin,
  NUe as WordCountPlugin,
  Bq as getTopLevelNativeElement,
  xZe as version
};
//# sourceMappingURL=koenig-lexical.js.map
