import { MentionableCategory as a } from "../../Plugins/MentionPlugin/types.es.js";
import { defaultNodeTypes as T } from "./types.es.js";
const n = "[\\d=a-z]+", s = Object.values(a).join("|"), c = `@\\[(${s}):${n}\\]`, N = `@\\[(${s}):(${n})\\]`, _ = new RegExp(c, "gi"), r = new RegExp(N, "i"), o = "<br>", l = "link", t = {
  nodeTypes: T,
  ignoreParagraphNewline: !1,
  listDepth: 0,
  linkDestinationKey: l
}, R = (e) => {
  var E;
  return {
    ...t,
    ...e,
    nodeTypes: {
      ...t.nodeTypes,
      ...e == null ? void 0 : e.nodeTypes,
      heading: {
        ...t.nodeTypes.heading,
        ...(E = e == null ? void 0 : e.nodeTypes) == null ? void 0 : E.heading
      }
    }
  };
}, g = (e) => /^(javascript:|data:text\/).+/i.test(e), d = {
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;",
  "&": "&amp;"
}, O = (e) => e.replaceAll(/&(?!(#\d+|[A-Za-z]+);)|["'<>]/g, (E) => d[E] ?? E);
export {
  o as BREAK_TAG,
  l as LINK_DESTINATION_KEY,
  r as MENTION_DESERIALIZE_REGEX,
  _ as MENTION_SERIALIZE_REGEX,
  N as MENTION_WITH_GROUPS_REGEX_PATTERN,
  t as defaultOptions,
  O as escapeHtmlPreserveEntities,
  R as getSelectedOptions,
  g as isMaliciousLink
};
//# sourceMappingURL=utils.es.js.map
